added ranks to nes/gb versions
This commit is contained in:
+18
@@ -37,6 +37,7 @@
|
||||
#define EZJOY_B 6
|
||||
#define EZJOY_SL 7
|
||||
#define EZJOY_ST 8
|
||||
#define EZJOY_COMBO 9
|
||||
|
||||
#define EZ_CORNER_UL (char) 20
|
||||
#define EZ_CORNER_UR (char) 18
|
||||
@@ -197,6 +198,23 @@ void wait_for_start_rand() {
|
||||
srand(_ez_entropy);
|
||||
}
|
||||
|
||||
/* wait for Start or a button combination */
|
||||
u8 wait_for_start_or_combo(u8 combo_mask) {
|
||||
u8 last_joy = 0, joy, pressed;
|
||||
/* wait until the previous key is released */
|
||||
while(joy_read(JOY_1));
|
||||
/* wait for a new press */
|
||||
while(1) {
|
||||
++_ez_entropy;
|
||||
joy = joy_read(JOY_1);
|
||||
pressed = joy & ~last_joy;
|
||||
if(pressed == combo_mask) return EZJOY_COMBO;
|
||||
if(pressed & JOY_BTN_4_MASK) return EZJOY_ST;
|
||||
last_joy = joy;
|
||||
waitvsync();
|
||||
}
|
||||
}
|
||||
|
||||
/* Generic helper methods */
|
||||
|
||||
/* Array shuffle method */
|
||||
|
||||
Reference in New Issue
Block a user