Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
0421916
Add team names and initials to HUD
kwinthrop Oct 8, 2019
55b4659
further edit to team name in HUD
kwinthrop Oct 8, 2019
a34e471
increase max text length so team name can be added
kwinthrop Oct 8, 2019
830e894
reverse incorrect changes
kwinthrop Oct 8, 2019
7a16292
add team info in HUD
kwinthrop Oct 8, 2019
5916d22
team name edits
kwinthrop Oct 8, 2019
e8d9692
revert changes that weren't working - add team name to text prompt
kwinthrop Oct 8, 2019
ecce457
revert changes, add team name to welcome message upon joining server
kwinthrop Oct 8, 2019
8864472
put welcome message on one line
kwinthrop Oct 8, 2019
f66b8d3
replace welcome with team
kwinthrop Oct 8, 2019
df33c9b
Update main.c
vagojolu7 Oct 8, 2019
7d2073b
fixed names
juss2017 Nov 7, 2019
f73f120
indentation on text
juss2017 Nov 7, 2019
8c054a0
text test
juss2017 Nov 7, 2019
d85a39e
text test part 2
juss2017 Nov 7, 2019
60fa736
text test part 3
juss2017 Nov 7, 2019
b2f15ea
Printing on screen test
kwinthrop Nov 20, 2019
1ec437c
test 2 of printing item text
kwinthrop Nov 20, 2019
8bc7999
Merge branch 'master' of https://github.com/kwinthrop/not2bad-Craft
kwinthrop Nov 20, 2019
7e44a38
Testing item name in top text box
kwinthrop Dec 4, 2019
0692036
Testing item name in top text box
kwinthrop Dec 4, 2019
0c97835
Merge branch 'master' of https://github.com/kwinthrop/not2bad-Craft
kwinthrop Dec 4, 2019
cf99f03
commenting out previous code
kwinthrop Dec 4, 2019
33626fd
fixing segfault
kwinthrop Dec 4, 2019
ff900eb
.
kwinthrop Dec 4, 2019
233cc9c
..
kwinthrop Dec 4, 2019
0751786
fixed strcpy
kwinthrop Dec 4, 2019
032229a
checking for segfault
kwinthrop Dec 4, 2019
f814232
fixing item_index crash
kwinthrop Dec 4, 2019
9876472
Added string enum for item names
kwinthrop Dec 4, 2019
8bbdff8
Made item_names externally visible
kwinthrop Dec 4, 2019
e3dda66
fixed item_names
kwinthrop Dec 4, 2019
ae758b2
Removed unneeded %d in top text line
kwinthrop Dec 4, 2019
42523a1
removed test print
kwinthrop Dec 4, 2019
4fc1aaa
testing multiple boxes
kwinthrop Dec 4, 2019
0c681b2
testing multiple boxes .
kwinthrop Dec 4, 2019
7784918
testing
kwinthrop Dec 4, 2019
2278cfd
Multiple text boxes rendered
kwinthrop Dec 4, 2019
7926837
Renaming color blocks so their names are more descriptive when displayed
kwinthrop Dec 7, 2019
348244d
Revert "Renaming color blocks so their names are more descriptive whe…
kwinthrop Dec 7, 2019
6fefbf9
testing new line
juss2017 Dec 7, 2019
767aff5
Giving meaningful names to block colors
kwinthrop Dec 7, 2019
99aa453
new line test part 2
juss2017 Dec 7, 2019
7ba0ccb
Merge branch 'master' of https://github.com/kwinthrop/not2bad-Craft
juss2017 Dec 7, 2019
4a72051
Fixing color names
kwinthrop Dec 7, 2019
aeaa44f
Merge branch 'master' of https://github.com/kwinthrop/not2bad-Craft
kwinthrop Dec 7, 2019
eee3ec7
new line test part 3
juss2017 Dec 7, 2019
b961930
Revert "new line test part 2"
juss2017 Dec 7, 2019
dbafa32
Merge branch 'master' of https://github.com/kwinthrop/not2bad-Craft
juss2017 Dec 7, 2019
e652c64
testing to see if text can be alignned to the right
juss2017 Dec 8, 2019
1afd655
gave line more char space to see if that will resolve the issue
juss2017 Dec 8, 2019
7ae93c1
forgot to give the actual string the space
juss2017 Dec 8, 2019
d07e740
fitting text and giving labels
juss2017 Dec 8, 2019
27b37be
swapping coordiantes and misc line for aesthetic reasons
juss2017 Dec 8, 2019
61ceb10
doing what i said before but hopefully actually doing it this time
juss2017 Dec 8, 2019
e7f28f8
Add existing file
Dec 9, 2019
65f399f
time of day update / resolved merge conflict
Dec 9, 2019
93fcd59
Fix seg fault when cycling through items by adding missing commas
kwinthrop Dec 9, 2019
60f491a
commit modified: src/item.c
vagojolu7 Dec 11, 2019
a6ae45a
Merge branch 'master' of https://github.com/kwinthrop/not2bad-Craft
vagojolu7 Dec 11, 2019
a3c95fa
Unnecessary file
vagojolu7 Dec 11, 2019
ee684f2
Unnecessary file
vagojolu7 Dec 11, 2019
e7291bc
Unnecessary file
vagojolu7 Dec 11, 2019
d68e016
Cleaning Duty
vagojolu7 Dec 11, 2019
69d9800
Cleaning Duty
vagojolu7 Dec 11, 2019
ba7e6c1
Cleaning Duty
vagojolu7 Dec 11, 2019
231c326
Merge https://github.com/kwinthrop/not2bad-Craft
vagojolu7 Dec 11, 2019
df4c188
format item names
kwinthrop Dec 12, 2019
8d38380
re-adding my changes
juss2017 Dec 12, 2019
25e555a
adding compass back in *my bad*
juss2017 Dec 12, 2019
7506f78
adding compass again and comments to code edited
juss2017 Dec 12, 2019
e6f3cf5
trying this again
juss2017 Dec 12, 2019
897ab39
trying again
juss2017 Dec 12, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added deps/glfw/examples/particles
Binary file not shown.
57 changes: 57 additions & 0 deletions deps/glfw/src/glfw3ConfigVersion.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# This is a basic version file for the Config-mode of find_package().
# It is used by write_basic_package_version_file() as input file for configure_file()
# to create a version-file which can be installed along a config.cmake file.
#
# The created file sets PACKAGE_VERSION_EXACT if the current version string and
# the requested version string are exactly the same and it sets
# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version,
# but only if the requested major version is the same as the current one.
# The variable CVF_VERSION must be set before calling configure_file().


set(PACKAGE_VERSION "3.1.2")

if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()

if("3.1.2" MATCHES "^([0-9]+)\\.")
set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
else()
set(CVF_VERSION_MAJOR "3.1.2")
endif()

if(PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR)
set(PACKAGE_VERSION_COMPATIBLE TRUE)
else()
set(PACKAGE_VERSION_COMPATIBLE FALSE)
endif()

if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
set(PACKAGE_VERSION_EXACT TRUE)
endif()
endif()


<<<<<<< HEAD
# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "")
return()
=======
# if the installed project requested no architecture check, don't perform the check
if("FALSE")
return()
endif()

# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "")
return()
>>>>>>> 93fcd5937f56d295675c10ebd11b6b0b9cee9a43
endif()

# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "8")
math(EXPR installedBits "8 * 8")
set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
set(PACKAGE_VERSION_UNSUITABLE TRUE)
endif()
110 changes: 110 additions & 0 deletions deps/glfw/src/glfw_config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
//========================================================================
// GLFW 3.1 - www.glfw.org
//------------------------------------------------------------------------
// Copyright (c) 2010 Camilla Berglund <[email protected]>
//
// This software is provided 'as-is', without any express or implied
// warranty. In no event will the authors be held liable for any damages
// arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it
// freely, subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you must not
// claim that you wrote the original software. If you use this software
// in a product, an acknowledgment in the product documentation would
// be appreciated but is not required.
//
// 2. Altered source versions must be plainly marked as such, and must not
// be misrepresented as being the original software.
//
// 3. This notice may not be removed or altered from any source
// distribution.
//
//========================================================================
// As glfw_config.h.in, this file is used by CMake to produce the
// glfw_config.h configuration header file. If you are adding a feature
// requiring conditional compilation, this is where to add the macro.
//========================================================================
// As glfw_config.h, this file defines compile-time option macros for a
// specific platform and development environment. If you are using the
// GLFW CMake files, modify glfw_config.h.in instead of this file. If you
// are using your own build system, make this file define the appropriate
// macros in whatever way is suitable.
//========================================================================

// Define this to 1 if building GLFW for X11
<<<<<<< HEAD
#define _GLFW_X11
// Define this to 1 if building GLFW for Win32
/* #undef _GLFW_WIN32 */
// Define this to 1 if building GLFW for Cocoa
/* #undef _GLFW_COCOA */
=======
/* #undef _GLFW_X11 */
// Define this to 1 if building GLFW for Win32
/* #undef _GLFW_WIN32 */
// Define this to 1 if building GLFW for Cocoa
#define _GLFW_COCOA
>>>>>>> 93fcd5937f56d295675c10ebd11b6b0b9cee9a43
// Define this to 1 if building GLFW for Wayland
/* #undef _GLFW_WAYLAND */
// Define this to 1 if building GLFW for Mir
/* #undef _GLFW_MIR */

// Define this to 1 if building GLFW for EGL
/* #undef _GLFW_EGL */
// Define this to 1 if building GLFW for GLX
<<<<<<< HEAD
#define _GLFW_GLX
// Define this to 1 if building GLFW for WGL
/* #undef _GLFW_WGL */
// Define this to 1 if building GLFW for NSGL
/* #undef _GLFW_NSGL */
=======
/* #undef _GLFW_GLX */
// Define this to 1 if building GLFW for WGL
/* #undef _GLFW_WGL */
// Define this to 1 if building GLFW for NSGL
#define _GLFW_NSGL
>>>>>>> 93fcd5937f56d295675c10ebd11b6b0b9cee9a43

// Define this to 1 if building as a shared library / dynamic library / DLL
/* #undef _GLFW_BUILD_DLL */

// Define this to 1 to force use of high-performance GPU on hybrid systems
/* #undef _GLFW_USE_HYBRID_HPG */

// Define this to 1 if the XInput X11 extension is available
<<<<<<< HEAD
#define _GLFW_HAS_XINPUT
// Define this to 1 if the Xxf86vm X11 extension is available
#define _GLFW_HAS_XF86VM

// Define this to 1 if glfwInit should change the current directory
/* #undef _GLFW_USE_CHDIR */
// Define this to 1 if glfwCreateWindow should populate the menu bar
/* #undef _GLFW_USE_MENUBAR */
// Define this to 1 if windows should use full resolution on Retina displays
/* #undef _GLFW_USE_RETINA */
=======
/* #undef _GLFW_HAS_XINPUT */
// Define this to 1 if the Xxf86vm X11 extension is available
/* #undef _GLFW_HAS_XF86VM */

// Define this to 1 if glfwInit should change the current directory
#define _GLFW_USE_CHDIR
// Define this to 1 if glfwCreateWindow should populate the menu bar
#define _GLFW_USE_MENUBAR
// Define this to 1 if windows should use full resolution on Retina displays
#define _GLFW_USE_RETINA
>>>>>>> 93fcd5937f56d295675c10ebd11b6b0b9cee9a43

// Define this to 1 if using OpenGL as the client library
#define _GLFW_USE_OPENGL
// Define this to 1 if using OpenGL ES 1.1 as the client library
/* #undef _GLFW_USE_GLESV1 */
// Define this to 1 if using OpenGL ES 2.0 as the client library
/* #undef _GLFW_USE_GLESV2 */

Binary file added deps/glfw/tests/cursor
Binary file not shown.
Binary file added deps/glfw/tests/empty
Binary file not shown.
Binary file added deps/glfw/tests/monitors
Binary file not shown.
Binary file added deps/glfw/tests/msaa
Binary file not shown.
2 changes: 1 addition & 1 deletion server.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def on_connect(self, client):
self.clients.append(client)
client.send(YOU, client.client_id, *client.position)
client.send(TIME, time.time(), DAY_LENGTH)
client.send(TALK, 'Welcome to Craft!')
client.send(TALK, 'CSE2410 not2bad')
client.send(TALK, 'Type "/help" for a list of commands.')
self.send_position(client)
self.send_positions(client)
Expand Down
37 changes: 37 additions & 0 deletions src/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"files.associations": {
"array": "cpp",
"*.tcc": "cpp",
"cctype": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"cstdarg": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"unordered_map": "cpp",
"vector": "cpp",
"exception": "cpp",
"fstream": "cpp",
"initializer_list": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"limits": "cpp",
"new": "cpp",
"optional": "cpp",
"ostream": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"cinttypes": "cpp",
"type_traits": "cpp",
"tuple": "cpp",
"typeinfo": "cpp",
"utility": "cpp"
}
}
2 changes: 1 addition & 1 deletion src/cube.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void make_cube(
int left, int right, int top, int bottom, int front, int back,
float x, float y, float z, float n, int w)
{
int wleft = blocks[w][0];
int wleft = blocks[w][0];
int wright = blocks[w][1];
int wtop = blocks[w][2];
int wbottom = blocks[w][3];
Expand Down
101 changes: 101 additions & 0 deletions src/item.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,64 @@ const int items[] = {
COLOR_31
};

const char* item_names[] = {
// items the user can build
"Grass",
"Sand",
"Stone",
"Brick",
"Wood",
"Cement",
"Dirt",
"Plank",
"Snow",
"Glass",
"Cobble",
"Light Stone",
"Dark Stone",
"Chest",
"Leaves",
"Tall Grass",
"Yellow Flower",
"Red Flower",
"Purple Flower",
"Sun Flower",
"White Flower",
"Blue Flower",
"Bright Yellow",
"Light Green",
"Bright Green",
"Teal",
"Forest Green",
"Dark Brown",
"Blue Black",
"Navy Blue",
"Light Gray",
"Dark Gray",
"Purple",
"Red",
"Coral",
"Pink",
"Olive Green",
"Light Brown",
"Black",
"Indigo",
"Plum",
"Deep Brown",
"Light Brown",
"Orange",
"Tan",
"Beige",
"Deep Blue",
"Bright Blue",
"Sky Blue",
"Turquoise",
"Ice Blue",
"White",
"Blue Gray",
"Silver"
};

const int item_count = sizeof(items) / sizeof(int);

const int blocks[256][6] = {
Expand Down Expand Up @@ -141,6 +199,49 @@ const int plants[256] = {
54, // 23 - blue flower
};

const char *compassNav[] = {
" N ",
" ",
"W + E",
" ",
" S ",
" E",
"N ",
" + ",
" S",
"W ",
" E ",
" ",
"N + S",
" ",
" W ",
" S",
"E ",
" + ",
" W",
"N ",
" S ",
" ",
"E + W",
" ",
" N ",
" W",
"S ",
" + ",
" N",
"E ",
" W ",
" ",
"S + N",
" ",
" E ",
" N",
"W ",
" + ",
" E",
"S "
};

int is_plant(int w) {
switch (w) {
case TALL_GRASS:
Expand Down
2 changes: 2 additions & 0 deletions src/item.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ extern const int items[];
extern const int item_count;
extern const int blocks[256][6];
extern const int plants[256];
extern const char* item_names[];
extern const char* compassNav[];

int is_plant(int w);
int is_obstacle(int w);
Expand Down
Loading