diff options
| author | Daniel Harding <corrnondacqb@yahoo.com> | 2015-07-22 10:24:00 -0500 | 
|---|---|---|
| committer | Daniel Harding <corrnondacqb@yahoo.com> | 2015-07-22 10:24:00 -0500 | 
| commit | c34156c5fb333864c1ae85036ea587c9f615a65a (patch) | |
| tree | 70a98bceda2ec783da896bf3eb4efd1b0861c2a3 /engine/menu | |
| parent | a6f04b434980f2176cb275a7c3ba50d5cbcd6ace (diff) | |
| parent | dcc7f3bc9f41f2d5e0f7448b4688c1058da0040b (diff) | |
Merge pull request #107 from YamaArashi/master
enumerate events
Diffstat (limited to 'engine/menu')
| -rw-r--r-- | engine/menu/bills_pc.asm | 9 | ||||
| -rwxr-xr-x | engine/menu/pc.asm | 3 | ||||
| -rwxr-xr-x | engine/menu/start_menu.asm | 9 | 
3 files changed, 7 insertions, 14 deletions
| diff --git a/engine/menu/bills_pc.asm b/engine/menu/bills_pc.asm index d491cd38..a810afd2 100644 --- a/engine/menu/bills_pc.asm +++ b/engine/menu/bills_pc.asm @@ -5,8 +5,7 @@ DisplayPCMainMenu:: ; 213c8 (8:53c8)  	ld a, [wNumHoFTeams]  	and a  	jr nz, .leaguePCAvailable -	ld a, [wd74b] -	bit 5, a ; received pokedex? +	CheckEvent EVENT_GOT_POKEDEX  	jr z, .noOaksPC  	ld a, [wNumHoFTeams]  	and a @@ -29,8 +28,7 @@ DisplayPCMainMenu:: ; 213c8 (8:53c8)  	call UpdateSprites  	ld a, 3  	ld [wMaxMenuItem], a -	ld a, [wd7f1] -	bit 0, a +	CheckEvent EVENT_MET_BILL  	jr nz, .metBill  	coord hl, 2, 2  	ld de, SomeonesPCText @@ -47,8 +45,7 @@ DisplayPCMainMenu:: ; 213c8 (8:53c8)  	ld h, b  	ld de, PlayersPCText  	call PlaceString -	ld a, [wd74b] -	bit 5, a ; received pokedex? +	CheckEvent EVENT_GOT_POKEDEX  	jr z, .noOaksPC2  	coord hl, 2, 6  	ld de, OaksPCText diff --git a/engine/menu/pc.asm b/engine/menu/pc.asm index b5281964..a804abb2 100755 --- a/engine/menu/pc.asm +++ b/engine/menu/pc.asm @@ -74,8 +74,7 @@ BillsPC: ; 17ee4 (5:7ee4)  	ld a, SFX_ENTER_PC  	call PlaySound  	call WaitForSoundToFinish -	ld a, [wd7f1] ;has to do with having met Bill -	bit 0, a +	CheckEvent EVENT_MET_BILL  	jr nz, .billsPC ;if you've met bill, use that bill's instead of someone's  	ld hl, AccessedSomeonesPCText  	jr .printText diff --git a/engine/menu/start_menu.asm b/engine/menu/start_menu.asm index bd876f5b..3c48e6ed 100755 --- a/engine/menu/start_menu.asm +++ b/engine/menu/start_menu.asm @@ -24,8 +24,7 @@ RedisplayStartMenu:: ; 2adf (0:2adf)  	and a  	jr nz,.loop  ; if the player pressed tried to go past the top item, wrap around to the bottom -	ld a,[wd74b] -	bit 5,a ; does the player have the pokedex? +	CheckEvent EVENT_GOT_POKEDEX  	ld a,6 ; there are 7 menu items with the pokedex, so the max index is 6  	jr nz,.wrapMenuItemId  	dec a ; there are only 6 menu items without the pokedex @@ -37,8 +36,7 @@ RedisplayStartMenu:: ; 2adf (0:2adf)  	bit 7,a  	jr z,.buttonPressed  ; if the player pressed tried to go past the bottom item, wrap around to the top -	ld a,[wd74b] -	bit 5,a ; does the player have the pokedex? +	CheckEvent EVENT_GOT_POKEDEX  	ld a,[wCurrentMenuItem]  	ld c,7 ; there are 7 menu items with the pokedex  	jr nz,.checkIfPastBottom @@ -59,8 +57,7 @@ RedisplayStartMenu:: ; 2adf (0:2adf)  	and a,%00001010 ; was the Start button or B button pressed?  	jp nz,CloseStartMenu  	call SaveScreenTilesToBuffer2 ; copy background from wTileMap to wTileMapBackup2 -	ld a,[wd74b] -	bit 5,a ; does the player have the pokedex? +	CheckEvent EVENT_GOT_POKEDEX  	ld a,[wCurrentMenuItem]  	jr nz,.displayMenuItem  	inc a ; adjust position to account for missing pokedex menu item | 
