Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case REGCHAR: if(move_input == 'q'|| move_input == 'Q'){ //for quit
- state = EXIT;}
- else if(move_input == 'p'|| move_input == 'P'){ //for pause
- while(1){
- char pause = getch();
- if(pause == 'p' || pause == 'P'){
- break;
- }
- }
- }else if(move_input == 's' || move_input == 'S'){//for save
- FILE *saveFile;
- saveFile = fopen("./saves/save_0.game", "w");
- //fputc(score, saveFile);
- //fputc(health, saveFile);
- int i, j;
- for(i=0; i++; i<100){
- for(j=0; j++; j<100){
- fprintf(saveFile, "%d", tiles[i][j]->state[CURRENT]);
- }
- }
- fclose(saveFile);
- save_counter++;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement