Mover juego de pruebas a su propio directorio

This commit is contained in:
2014-08-22 23:23:56 +02:00
committed by Valeriano A.R
parent f12d831878
commit 2d05545acf
6 changed files with 21 additions and 20 deletions

View File

@@ -42,8 +42,6 @@ DrawImg img_axe[2];
DrawImg img_goatMan[2];
DrawImg img_Princess[2];
float grav=0.5f;
float vTerminal=10.0f;
Entity ent_Wizard;
Entity ent_MagikBall;
Entity ent_Earth;
@@ -67,6 +65,8 @@ Entity ent_Princess;
int EntityApplyGravity(Entity e){
float grav=10.0f;
float vTerminal=50.0f;
vec2 vGrav;
// Only apply gravity to some entity types
@@ -171,11 +171,11 @@ void player_proc(Entity e,int ft){
float acel=1.0f;
float maxVel=6.0f;
float jumpVel=8.0f;
float shootVel=10.0f;
void wizard_proc(Entity e,int ft){
float acel=8.0f;
float maxVel=30.0f;
float jumpVel=50.0f;
float shootVel=50.0f;
if(Input_GetKey(InputKey_Jump)==InputKey_Pressed ||
Input_GetKey(InputKey_Up)==InputKey_Pressed)
@@ -233,7 +233,7 @@ void wizard_proc(Entity e,int ft){
// Scroll View
GameLib_MoveToPosH(e->pos,0.1f);
GameLib_MoveToPosH(e->pos,0.6f);
}
@@ -362,7 +362,6 @@ void bunny_proc(Entity e,int ft){
vec2_set(left,-acel,0.0f);
Entity_AddVelLimit(e,left,maxVel);
AnimPlay_SetImg(&e->anim,img_bunny[0]);
}
if(e->A==1){
@@ -602,6 +601,7 @@ void GameEnts_Init(){
ent_Wizard->radius=24;
ent_Wizard->width=24;
ent_Wizard->height=58;
ent_Wizard->elast=0.1f;
ent_Wizard->fric_static=0.0f;
ent_Wizard->fric_dynamic=0.2f;
ent_Wizard->child=ent_MagikBall;
@@ -636,7 +636,7 @@ void GameEnts_Init(){
ent_StoneBrick->width=32;
ent_StoneBrick->height=32;
ent_StoneBrick->fric_static=0.0f;
ent_StoneBrick->fric_dynamic=0.2f;
ent_StoneBrick->fric_dynamic=-0.01f;
// FIXME: Stone Bricks back

View File

@@ -60,7 +60,7 @@ int main(int argc,char *argv[]){
}
}
GameLib_Init(640,480,"Game",60,60);
GameLib_Init(640,480,"Game",20,60);

View File

@@ -29,11 +29,11 @@ RES_GAMELIB_OUT = $(BUILDDIR)/$(RES_GAMELIB)
#####################
# Game Declarations #
#####################
GAME_HEADS = $(GAMELIB_HEADS) GameEnts.h GameMap.h
GAME_HEADS = $(GAMELIB_HEADS) Game/GameEnts.h Game/GameMap.h
GAME_OBJS = \
$(BUILDDIR)/GameEnts.o \
$(BUILDDIR)/GameMap.o \
$(BUILDDIR)/main.o
$(BUILDDIR)/Game/GameEnts.o \
$(BUILDDIR)/Game/GameMap.o \
$(BUILDDIR)/Game/main.o
RES_GAME_OUT = $(BUILDDIR)/$(RES_GAME)
@@ -45,6 +45,7 @@ all: $(BUILDDIR) $(RES_GAME_OUT)
$(BUILDDIR):
$(MKDIR) $(BUILDDIR)
$(MKDIR) $(BUILDDIR)/GameLib
$(MKDIR) $(BUILDDIR)/Game
clean:
$(RM) $(GAMELIBS_OBJS) $(RES_GAMELIB_OUT) $(GAME_OBJS) $(RES_GAME_OUT)
@@ -81,14 +82,14 @@ $(BUILDDIR)/GameLib/GameLib.o: GameLib/GameLib.c $(HEADS)
# Game Rules #
##############
$(BUILDDIR)/GameEnts.o: GameEnts.c $(HEADS)
$(CC) -c GameEnts.c -o $(BUILDDIR)/GameEnts.o $(CFLAGS)
$(BUILDDIR)/Game/GameEnts.o: Game/GameEnts.c $(HEADS)
$(CC) -c Game/GameEnts.c -o $(BUILDDIR)/Game/GameEnts.o $(CFLAGS)
$(BUILDDIR)/GameMap.o: GameMap.c $(HEADS)
$(CC) -c GameMap.c -o $(BUILDDIR)/GameMap.o $(CFLAGS)
$(BUILDDIR)/Game/GameMap.o: Game/GameMap.c $(HEADS)
$(CC) -c Game/GameMap.c -o $(BUILDDIR)/Game/GameMap.o $(CFLAGS)
$(BUILDDIR)/main.o: main.c $(HEADS)
$(CC) -c main.c -o $(BUILDDIR)/main.o $(CFLAGS)
$(BUILDDIR)/Game/main.o: Game/main.c $(HEADS)
$(CC) -c Game/main.c -o $(BUILDDIR)/Game/main.o $(CFLAGS)
################