(20111222) 20:00

This commit is contained in:
2011-12-22 20:00:00 +01:00
parent 969064b44c
commit 123dfa03cd
22 changed files with 387 additions and 206 deletions

41
main.c
View File

@@ -12,6 +12,7 @@
int play;
int game_started=0;
int game_level=0;
int game_level_point=1;
int game_level_reset=0;
@@ -26,12 +27,17 @@ int ProcTitle(){
Draw_Clean(0,0,0);
Draw_DrawImg(img_logo,170,100);
Draw_DrawText(font ,"Press [Space] to Start.",300,300);
if(!game_started){
Draw_DrawText(font ,"Press [Space] to Start.",300,300);
}else{
Draw_DrawText(font ,"Press [Space] to Continue.",300,300);
}
Draw_DrawText(font ,"By Kableado (VAR)",200,440);
if(Input_AnyKey()){
if( Input_GetKey(InputKey_Jump)==InputKey_Pressed||
Input_GetKey(InputKey_Continue)==InputKey_Pressed)
{
play=1;
return(0);
}
@@ -43,11 +49,14 @@ int ProcEnd(){
Draw_DrawImg(img_end,170,100);
Draw_DrawText(font ,"Congratulations you saved the kittie!",300,320);
Draw_DrawText(font ,"Congratulations you saved the kittie!",250,320);
Draw_DrawText(font ,"Thanks for playing!",250,350);
Draw_DrawText(font ,"Thanks for playing!",100,440);
Draw_DrawText(font ,"Press [Space] to Title.",300,400);
if(Input_AnyKey()){
if( Input_GetKey(InputKey_Jump)==InputKey_Pressed||
Input_GetKey(InputKey_Continue)==InputKey_Pressed)
{
return(0);
}
return(1);
@@ -78,7 +87,7 @@ void PostProcGame(){
}
if(game_level_reset){
if( Input_AnyKey()){
if(Input_AnyKey()){
if(GameMap_CreateLevel(game_level,game_level_point)){
if(game_level_reset==2){
int pos[2]={0,0};
@@ -107,19 +116,21 @@ int main(int argc,char *argv[]){
font=Draw_DefaultFont(255,255,255,255);
font_shad=Draw_DefaultFont(0,0,0,127);
GameEnts_Init();
do{
play=0;
Draw_Loop(ProcTitle);
if(play==1){
int pos[2]={0,0};
GameLib_SetPos(pos);
game_level=0;
game_level_point=1;
game_level_reset=0;
GameMap_CreateLevel(game_level,game_level_point);
if(!game_started){
int pos[2]={0,0};
GameLib_SetPos(pos);
game_level=3;
game_level_point=2;
game_level_reset=0;
GameMap_CreateLevel(game_level,game_level_point);
}
game_started=1;
GameLib_Loop(ProcGame,PostProcGame);
}
if(play==2){