aboutsummaryrefslogtreecommitdiff
path: root/Source/Menu.c
diff options
context:
space:
mode:
authorXaviDCR92 <xavi.dcr@gmail.com>2017-05-22 07:06:17 +0200
committerXaviDCR92 <xavi.dcr@gmail.com>2017-05-22 07:06:17 +0200
commitaefe5f8c1c45f4cdeafe08113953a9f03df3c644 (patch)
treec7f609ec694a2180237b77c182705a79f81f4725 /Source/Menu.c
parent3a8f91466126c97427d7cf0c86c36581662981be (diff)
downloadairport-aefe5f8c1c45f4cdeafe08113953a9f03df3c644.tar.gz
* Split screen from now on is only calling GsDrawList() once. The reason for this is that now DMA is used instead of GPIO for drawenv/dispenv management.
* (PSXSDK internals): incorrect bit shifting was being made on 0xE3 and 0xE4 GPU instructions (drawenv management). * (Bugfix): Timers were not being reset properly because pad1_cheat_timer and pad2_cheat_timer were being accidentally reset to NULL on calling memset() for cheatsArray. * Timers are now updated every 100 ms instead of every second. * Mouse sprite should be now drawn on X_SCREEN_RESOLUTION >> 2 in 2-player mode. TODO: check why this isn't working!
Diffstat (limited to 'Source/Menu.c')
-rw-r--r--Source/Menu.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/Source/Menu.c b/Source/Menu.c
index 32d0e45..0a922c4 100644
--- a/Source/Menu.c
+++ b/Source/Menu.c
@@ -72,7 +72,6 @@ typedef enum
}MMBtn_Offset;
-#pragma pack(1)
typedef struct
{
MMBtn_Offset offset_u;
@@ -90,7 +89,6 @@ typedef struct
bool was_selected;
}TYPE_MMBtn;
-#pragma pack()
/* **************************************
* Local prototypes *
@@ -251,7 +249,8 @@ void MainMenuInit(void)
void MainMenu(void)
{
-
+ unsigned short* cheat_array;
+ uint8_t i;
MainMenuInit();
#ifndef NO_INTRO
@@ -271,6 +270,11 @@ void MainMenu(void)
GsSortCls(0,0,40);
MainMenuDrawButton(&MainMenuBtn[PLAY_BUTTON_INDEX]);
MainMenuDrawButton(&MainMenuBtn[OPTIONS_BUTTON_INDEX]);
+
+ for(cheat_array = PadGetPlayerOneCheatArray(), i = 0; *cheat_array != 0; cheat_array++, i += 16)
+ {
+ GfxDrawButton(i, 220, *cheat_array);
+ }
GfxDrawScene();
break;
@@ -280,6 +284,12 @@ void MainMenu(void)
GsSortCls(0,0,40);
MainMenuDrawButton(&MainMenuBtn[ONE_PLAYER_BUTTON_INDEX]);
MainMenuDrawButton(&MainMenuBtn[TWO_PLAYER_BUTTON_INDEX]);
+
+ for(cheat_array = PadGetPlayerOneCheatArray(), i = 0; *cheat_array != 0; cheat_array++, i += 16)
+ {
+ GfxDrawButton(i, 220, *cheat_array);
+ }
+
GfxDrawScene();
break;