From 162cf3dbd2f28ed9250479fd7b018dbf793c3eea Mon Sep 17 00:00:00 2001 From: Keturah Edwards <33634413+Turah09@users.noreply.github.com> Date: Wed, 29 Apr 2020 14:57:52 -0400 Subject: [PATCH] branching into my respiratory --- src/config.h | 1 + src/cube.c | 3 ++- src/item.c | 4 +--- src/npc.h | 17 +++++++++++++++++ 4 files changed, 21 insertions(+), 4 deletions(-) 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 index 3a5187079..f4222ba7d 100644 --- a/src/npc.h +++ b/src/npc.h @@ -1,9 +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