moar worldbuilding with textfile
This commit is contained in:
parent
b36c9a6d62
commit
a729b0459b
4 changed files with 5 additions and 10 deletions
4
Engine.c
4
Engine.c
|
@ -528,6 +528,7 @@ void mainmenu()
|
|||
switch (menucounter)
|
||||
{
|
||||
case 0:
|
||||
playing = 1;
|
||||
thisChunk = LEVEL1;
|
||||
nextChunk = LEVEL1;
|
||||
|
||||
|
@ -539,7 +540,6 @@ void mainmenu()
|
|||
hero->point.x = 160;
|
||||
hero->point.y = 90;
|
||||
|
||||
playing = 1;
|
||||
fclose(saveData);
|
||||
break;
|
||||
|
||||
|
@ -548,6 +548,7 @@ void mainmenu()
|
|||
{
|
||||
fscanf(saveData, "%d %d %d %d %lld", &level, &roomNo, &xPos, &yPos, &eventState);
|
||||
}
|
||||
playing = 1;
|
||||
thisChunk = (enum dataChunks)(level);
|
||||
nextChunk = (enum dataChunks)(level);
|
||||
|
||||
|
@ -559,7 +560,6 @@ void mainmenu()
|
|||
hero->point.y = yPos;
|
||||
warpto(mapData[roomNo]);
|
||||
|
||||
playing = 1;
|
||||
fclose(saveData);
|
||||
printf("Loaded save: level %d, room %d (%d,%d) state: %lld\n", level, roomNo, xPos, yPos, eventState);
|
||||
break;
|
||||
|
|
|
@ -16,5 +16,5 @@ void cleanHyperKaos(HyperKaos* self);
|
|||
|
||||
void run(HyperKaos* self);
|
||||
void addKaos(HyperKaos* self, Kaos* target);
|
||||
int isCompleted(int x);
|
||||
int hasCompleted(int x);
|
||||
int notCompleted(int x);
|
||||
|
|
2
Player.c
2
Player.c
|
@ -243,6 +243,8 @@ int playerFaces(Player* self, char dir)
|
|||
return 0;
|
||||
}
|
||||
|
||||
// collision helper functions
|
||||
|
||||
int playerIsInRect(Player* self, SDL_Rect* rect)
|
||||
{
|
||||
SDL_Rect* pBox = &(self->boundBox);
|
||||
|
|
7
main.c
7
main.c
|
@ -14,12 +14,6 @@
|
|||
#include "WorldData.h"
|
||||
#include "Scene.h"
|
||||
|
||||
/*const int SCREEN_WIDTH = 320;
|
||||
const int SCREEN_HEIGHT = 180;
|
||||
const int SCREEN_BPP = 32;
|
||||
|
||||
const int FRAMES_PER_SECOND = 30;*/
|
||||
|
||||
int fullscreen = 0;
|
||||
int playing = 0;
|
||||
int quit = 0;
|
||||
|
@ -79,7 +73,6 @@ int main (int argc, char* args[])
|
|||
|
||||
intro();
|
||||
|
||||
// main game loop
|
||||
while (!quit)
|
||||
{
|
||||
mainmenu();
|
||||
|
|
Loading…
Reference in a new issue