Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

branching into my respiratory #1

Merged
merged 1 commit into from
Apr 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
3 changes: 2 additions & 1 deletion src/cube.c
Original file line number Diff line number Diff line change
Expand Up @@ -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}},
Expand Down
4 changes: 1 addition & 3 deletions src/item.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#include "item.h"
#include "util.h"

=
const int items[] = {
// items the user can build
GRASS,
Expand Down
17 changes: 17 additions & 0 deletions src/npc.h
Original file line number Diff line number Diff line change
@@ -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