2022-08-17 05:20:57 +00:00
|
|
|
// start
|
|
|
|
|
|
|
|
bool selectingStartMenu, aboutShowing;
|
|
|
|
u8 currentStartMenu;
|
|
|
|
|
|
|
|
#define START_W 32
|
|
|
|
#define START_H 28
|
|
|
|
|
|
|
|
#define START_I 32
|
|
|
|
|
|
|
|
|
|
|
|
// events
|
|
|
|
|
|
|
|
static void loadGameFromStart(){
|
|
|
|
selectingStartMenu = FALSE;
|
|
|
|
aboutShowing = FALSE;
|
|
|
|
VDP_clearTileMapRect(BG_A, 0, 0, START_W, START_H);
|
|
|
|
VDP_clearTileMapRect(BG_B, 0, 0, START_W, START_H);
|
|
|
|
loadGame();
|
|
|
|
}
|
|
|
|
|
|
|
|
static void selectStartMenu(){
|
|
|
|
selectingStartMenu = TRUE;
|
|
|
|
switch(currentStartMenu){
|
|
|
|
case 0: loadGameFromStart(); break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// draw
|
|
|
|
|
|
|
|
static void drawStartBg(){
|
|
|
|
VDP_fillTileMapRect(BG_B, TILE_ATTR_FULL(PAL2, 0, 0, 0, START_I), 0, 0, START_W, START_H);
|
|
|
|
}
|
|
|
|
|
|
|
|
#define LOGO_X 8
|
|
|
|
#define LOGO_Y 6
|
|
|
|
|
|
|
|
static void drawStartLogo(){
|
|
|
|
VDP_drawImageEx(BG_B, &startLogo1, TILE_ATTR_FULL(PAL1, 0, 0, 0, START_I + 32), LOGO_X, LOGO_Y, 0, DMA);
|
|
|
|
}
|
|
|
|
|
|
|
|
#define MENU_X 13
|
|
|
|
#define MENU_Y 14
|
|
|
|
#define ARROW_X 13
|
|
|
|
|
|
|
|
static void drawStartMenu(){
|
|
|
|
// VDP_drawText(">", ARROW_X, MENU_Y);
|
|
|
|
VDP_drawText("start?", MENU_X, MENU_Y);
|
|
|
|
VDP_drawText("HOW-TO", MENU_X, MENU_Y + 2);
|
|
|
|
VDP_drawText("ABOUT!", MENU_X, MENU_Y + 4);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// loop
|
|
|
|
|
|
|
|
void loadStart(){
|
|
|
|
VDP_setScreenWidth256();
|
|
|
|
currentStartMenu = 0;
|
|
|
|
VDP_loadTileSet(startBg1.tileset, START_I, DMA);
|
|
|
|
|
2022-08-17 13:05:08 +00:00
|
|
|
// drawStartBg();
|
|
|
|
// drawStartLogo();
|
|
|
|
// drawStartMenu();
|
|
|
|
// VDP_drawText("VER 0.1", 1, 26);
|
|
|
|
|
|
|
|
loadGameFromStart();
|
|
|
|
|
2022-08-17 05:20:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void updateStart(){
|
|
|
|
if((ctrl.a || ctrl.start) && !aboutShowing && !selectingStartMenu) selectStartMenu();
|
|
|
|
}
|