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

Animal #262

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions backlog.md
Original file line number Diff line number Diff line change
@@ -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

1 change: 1 addition & 0 deletions features.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
001 Create textures for npc
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
26 changes: 26 additions & 0 deletions src/npc.h
Original file line number Diff line number Diff line change
@@ -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
Binary file modified textures/texture.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.