#include #include #include "game.h" #include "menu.h" #include "minefield.h" #include "fonctionUtile.h" #include "number.h" #include "save.h" #include "overclock.h" tSaveData Init_tSaveData() { int i; int j; int k; tSaveData game; game.num_game = 0; for (k=0;k<3;k++) { game.difficult[k].num_lost = 0; game.difficult[k].num_win = 0; for(i=0;i<3;i++) { game.difficult[k].score[i].time = 0; for (j=0;j<3;j++) game.difficult[k].score[i].name[j] = 'A'; game.difficult[k].score[i].name[3] = '\0'; } } return game; } int main() { int freq; freq = (*((volatile unsigned int*)0xA4150000) & 0x3F000000) >> 24; if(freq < PLL_24x) overclock(PLL_24x); tSaveData game; game = Init_tSaveData(); tMinefield minef; if (!Load_file(&game)) { Save_file(game); } Display_title_screen(); if (Menu(&minef)) { Bdisp_AllClr_VRAM(); game = Game(game, minef); } Save_file(game); overclock(freq); return 0; }