diff --git a/data/maps/headers/OaksLab.asm b/data/maps/headers/OaksLab.asm index a31d9d37..0cc37744 100644 --- a/data/maps/headers/OaksLab.asm +++ b/data/maps/headers/OaksLab.asm @@ -1,2 +1,2 @@ - map_header OaksLab, OAKS_LAB, GYM, 0 + map_header OaksLab, OAKS_LAB, FOSSILLAB, 0 end_map_header diff --git a/data/maps/objects/OaksLab.asm b/data/maps/objects/OaksLab.asm index f25c51b2..a6657727 100644 --- a/data/maps/objects/OaksLab.asm +++ b/data/maps/objects/OaksLab.asm @@ -1,11 +1,13 @@ OaksLab_Object: - db $3 ; border block + db $17 ; border block def_warp_events warp_event 6, 11, LAST_MAP, 3 warp_event 7, 11, LAST_MAP, 3 def_bg_events + bg_event 10, 6, 30 ; PC because it keeps breaking + bg_event 11, 6, 30 ; PC because it keeps breaking def_object_events object_event 6, 4, SPRITE_BLUE, STAY, NONE, 1, OPP_RIVAL1, 1 @@ -19,7 +21,7 @@ OaksLab_Object: ;object_event 2, 11, SPRITE_GIRL, WALK, UP_DOWN, 9 ; person ;object_event 4, 11, SPRITE_SCIENTIST, STAY, NONE, 10 ; person ;object_event 11, 11, SPRITE_SCIENTIST, STAY, NONE, 11 ; person - object_event 4, 3, SPRITE_POKE_BALL, STAY, NONE, 28 ; person, Pikachu - object_event 5, 3, SPRITE_POKE_BALL, STAY, NONE, 29 ; person, Eevee + object_event 8, 6, SPRITE_POKE_BALL, STAY, NONE, 28 ; person, Pikachu + object_event 9, 6, SPRITE_POKE_BALL, STAY, NONE, 29 ; person, Eevee def_warps_to OAKS_LAB diff --git a/data/text_predef_pointers.asm b/data/text_predef_pointers.asm index ca6e0362..5f9aff3d 100644 --- a/data/text_predef_pointers.asm +++ b/data/text_predef_pointers.asm @@ -11,7 +11,7 @@ TextPredefs:: add_tx_pre PushStartText ; 05 add_tx_pre SaveOptionText ; 06 add_tx_pre StrengthsAndWeaknessesText ; 07 - add_tx_pre OakLabEmailText ; 08 +; add_tx_pre OakLabEmailText ; 08 add_tx_pre AerodactylFossilText ; 09 add_tx_pre Route15UpstairsBinocularsText ; 0A add_tx_pre KabutopsFossilText ; 0B diff --git a/data/tilesets/collision_tile_ids.asm b/data/tilesets/collision_tile_ids.asm index ba42e2dd..2c2c0669 100644 --- a/data/tilesets/collision_tile_ids.asm +++ b/data/tilesets/collision_tile_ids.asm @@ -55,10 +55,12 @@ Lobby_Coll:: Mansion_Coll:: coll_tiles $01, $05, $11, $12, $14, $1a, $1c, $2c, $53 -FossilLab_Coll:: ; It has the same tileset except the trees are the fossil machine, so... Lab_Coll:: coll_tiles $0c, $26, $16, $1e, $34, $37 +FossilLab_Coll:: ; Originally just the Lab collision, but now that Oak uses it, it's using separate collision. Added plenty just to be sure. + coll_tiles $0c, $26, $16, $1e, $34, $37, $17, $4C, $47, $58, $57, $59, $27, $4D + Club_Coll:: coll_tiles $0f, $1a, $1f, $26, $28, $29, $2c, $2d, $2e, $2f, $41 diff --git a/engine/events/hidden_objects/oaks_lab_email.asm b/engine/events/hidden_objects/oaks_lab_email.asm index b66babe0..0a244a35 100644 --- a/engine/events/hidden_objects/oaks_lab_email.asm +++ b/engine/events/hidden_objects/oaks_lab_email.asm @@ -1,10 +1,6 @@ -DisplayOakLabEmailText: - ld a, [wSpritePlayerStateData1FacingDirection] - cp SPRITE_FACING_UP - ret nz - call EnableAutoTextBoxDrawing - tx_pre_jump OakLabEmailText - -OakLabEmailText:: - text_far _OakLabEmailText - text_end +;DisplayOakLabEmailText: +; ld a, [wSpritePlayerStateData1FacingDirection] +; cp SPRITE_FACING_UP +; ret nz +; call EnableAutoTextBoxDrawing +; tx_pre_jump OakLabEmailText diff --git a/gfx/blocksets/fossillab.bst b/gfx/blocksets/fossillab.bst index 91f66791..ba89bc10 100644 Binary files a/gfx/blocksets/fossillab.bst and b/gfx/blocksets/fossillab.bst differ diff --git a/gfx/tilesets/fossillab.png b/gfx/tilesets/fossillab.png index 55e627ba..542b5436 100644 Binary files a/gfx/tilesets/fossillab.png and b/gfx/tilesets/fossillab.png differ diff --git a/maps/OaksLab.blk b/maps/OaksLab.blk index 0e87062e..91d6bb9a 100644 --- a/maps/OaksLab.blk +++ b/maps/OaksLab.blk @@ -1 +1,2 @@ -hhhghhhijijmnmnhhhhhh \ No newline at end of file +  # (   + 6 \ No newline at end of file diff --git a/scripts/OaksLab.asm b/scripts/OaksLab.asm index 052f2225..e820cc45 100644 --- a/scripts/OaksLab.asm +++ b/scripts/OaksLab.asm @@ -285,25 +285,31 @@ OaksLabScript8: ld de, .PikachuMovement1 jr z, .moveBlue .PikachuMovement1 - db NPC_MOVEMENT_LEFT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_DOWN db -1 ; end .Eevee ld de, .EeveeMovement1 - ld a, [wYCoord] - cp 4 ; is the player standing below the table? - jr z, .moveBlue - ld de, .EeveeMovement2 +; ld a, [wYCoord] +; cp 4 ; is the player standing below the table? +; jr z, .moveBlue +; ld de, .EeveeMovement2 jp .moveBlue .EeveeMovement1 +; db NPC_MOVEMENT_DOWN +; db NPC_MOVEMENT_LEFT +; db NPC_MOVEMENT_LEFT +; db NPC_MOVEMENT_UP + db NPC_MOVEMENT_RIGHT + db NPC_MOVEMENT_RIGHT db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_LEFT - db NPC_MOVEMENT_LEFT - db NPC_MOVEMENT_UP db -1 ; end -.EeveeMovement2 - db NPC_MOVEMENT_LEFT - db NPC_MOVEMENT_LEFT +;.EeveeMovement2 +; db NPC_MOVEMENT_LEFT +; db NPC_MOVEMENT_LEFT db -1 ; end .moveBlue @@ -323,9 +329,20 @@ OaksLabScript9: ; This is where Blue picks up the ball and removes the sprite. ld [wJoyIgnore], a ld a, $1 ldh [hSpriteIndex], a + + ; So when using this new table system, we actually need to add cases for when you have the new starters... + + ld a, [wPlayerStarter] + cp STARTER4 + jr z, .skip + cp STARTER5 + jr z, .skip + ; Since he's just moved down, we just need to skip this process. It's actually harder for him to pick up the regular starters! ld a, SPRITE_FACING_UP ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay +.skip + ld a, $d ldh [hSpriteIndexOrTextID], a call DisplayTextID @@ -361,11 +378,21 @@ OaksLabScript9: ; This is where Blue picks up the ball and removes the sprite. ld [wcf91], a ld [wd11e], a call GetMonName + + ; why does he do this twice why does he do this twice why does he do this twice + ld a, [wPlayerStarter] + cp STARTER4 + jr z, .skip2 + cp STARTER5 + jr z, .skip2 + ld a, $1 ldh [hSpriteIndex], a ld a, SPRITE_FACING_UP ldh [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay + +.skip2 ld a, $e ldh [hSpriteIndexOrTextID], a call DisplayTextID @@ -803,6 +830,7 @@ OaksLab_TextPointers: dw OaksLabText27 dw OaksLabTextPikachu dw OaksLabTextEevee + dw OakLabEmailText OaksLab_TextPointers2: dw OaksLabText1 @@ -1368,3 +1396,15 @@ PikachuEeveeShows: db HS_DAMIEN ; Charmander guy db HS_VERMILION_JENNY ; Squirtle db -1 ; end + +; Moved here to turn into a new bg event +OakLabEmailText: + text_asm + call EnableAutoTextBoxDrawing + ld hl, OakLabEmailTextGet + call PrintText + jp TextScriptEnd + +OakLabEmailTextGet: + text_far _OakLabEmailText + text_end