diff --git a/backlog.md b/backlog.md new file mode 100644 index 000000000..13168b53f --- /dev/null +++ b/backlog.md @@ -0,0 +1,10 @@ +For each task: + +Status: Assigned person and sprint number, pull request and sprint number, accepted and sprint number. + +User Story A: + 001 Create textures and models for NPCs + 002 Create folder for all new NPC textures models and behaviors. + 003 Display NPC and level it will the world map. // <-- i dont understand this one + 004 Code in movement and animal behavior + diff --git a/features.md b/features.md new file mode 100644 index 000000000..a67741561 --- /dev/null +++ b/features.md @@ -0,0 +1 @@ +001 Create textures for npc diff --git a/src/config.h b/src/config.h index 599bbc181..ecee69623 100644 --- a/src/config.h +++ b/src/config.h @@ -25,6 +25,7 @@ #define SHOW_INFO_TEXT 1 #define SHOW_CHAT_TEXT 1 #define SHOW_PLAYER_NAMES 1 +#define SHOW_NPC 1 // key bindings #define CRAFT_KEY_FORWARD 'W' diff --git a/src/cube.c b/src/cube.c index db23a88fe..ebaa11dac 100644 --- a/src/cube.c +++ b/src/cube.c @@ -4,13 +4,14 @@ #include "matrix.h" #include "util.h" + void make_cube_faces( float *data, float ao[6][4], float light[6][4], int left, int right, int top, int bottom, int front, int back, int wleft, int wright, int wtop, int wbottom, int wfront, int wback, float x, float y, float z, float n) { - static const float positions[6][4][3] = { + positions[6][4][3] = { {{-1, -1, -1}, {-1, -1, +1}, {-1, +1, -1}, {-1, +1, +1}}, {{+1, -1, -1}, {+1, -1, +1}, {+1, +1, -1}, {+1, +1, +1}}, {{-1, +1, -1}, {-1, +1, +1}, {+1, +1, -1}, {+1, +1, +1}}, diff --git a/src/item.c b/src/item.c index 907c4c30b..462bbcdad 100644 --- a/src/item.c +++ b/src/item.c @@ -1,6 +1,4 @@ -#include "item.h" -#include "util.h" - += const int items[] = { // items the user can build GRASS, diff --git a/src/npc.h b/src/npc.h new file mode 100644 index 000000000..f4222ba7d --- /dev/null +++ b/src/npc.h @@ -0,0 +1,26 @@ +#ifndef _npc_h_ +#define _npc_h_ + +void make_cube_faces( + float *data, float ao[6][4], float light[6][4], + int left, int right, int top, int bottom, int front, int back, + int wleft, int wright, int wtop, int wbottom, int wfront, int wback, + float x, float y, float z, float n); + +void make_cube( + float *data, float ao[6][4], float light[6][4], + int left, int right, int top, int bottom, int front, int back, + float x, float y, float z, float n, int w); + +void make_cube_wireframe( + float *data, float x, float y, float z, float n); + +void make_npc( + float *data, + float x, float y, float n, float m, char c); + +void make_character_3d( + float *data, float x, float y, float z, float n, int face, char c); + +void make_sphere(float *data, float r, int detail); +#endif diff --git a/textures/texture.png b/textures/texture.png index 20d033bdc..d94cfadb6 100644 Binary files a/textures/texture.png and b/textures/texture.png differ