diff --git a/src/rooms/boss_city.asm b/src/rooms/boss_city.asm index 426e7641..2f266697 100644 --- a/src/rooms/boss_city.asm +++ b/src/rooms/boss_city.asm @@ -308,7 +308,7 @@ _Ext_sRoomExt: d_addr Devices_sDevice_arr_ptr, _Devices_sDevice_arr d_addr Passages_sPassage_arr_ptr, 0 d_addr Enter_func_ptr, FuncA_Room_BossCity_EnterRoom - d_addr FadeIn_func_ptr, FuncC_Boss_City_FadeInRoom + d_addr FadeIn_func_ptr, FuncA_Terrain_BossCity_FadeInRoom d_addr Tick_func_ptr, FuncC_Boss_City_TickRoom d_addr Draw_func_ptr, FuncC_Boss_City_DrawRoom D_END @@ -552,46 +552,6 @@ _Devices_sDevice_arr: .byte 0, 1, 1, 1, 2, 2, 2, 3, 3, 4, 5, 6, 6, 7, 7, 8, 8, 8, 9, 9, 9, 9, 8 .ENDPROC -.PROC DataC_Boss_CityInitTransfer_arr - .assert kBossBgWidthTiles = 8, error - .assert kBossBgHeightTiles = 6, error - ;; Row 0: - .byte kPpuCtrlFlagsHorz - .dbyt Ppu_BossRow0Start + 1 ; transfer destination - .byte 6 - .byte $4c, $4d, $4e, $4f, $50, $51 - ;; Row 1: - .byte kPpuCtrlFlagsHorz - .dbyt Ppu_BossRow1Start ; transfer destination - .byte 8 - .byte $52, $53, $54, $55, $56, $57, $58, $59 - ;; Row 2: - .byte kPpuCtrlFlagsHorz - .dbyt Ppu_BossRow2Start + 1 ; transfer destination - .byte 6 - .byte $40, $41, $42, $43, $44, $45 - ;; Row 3: - .byte kPpuCtrlFlagsHorz - .dbyt Ppu_BossRow3Start + 1 ; transfer destination - .byte 6 - .byte $46, $47, $48, $49, $4a, $4b - ;; Row 4: - .byte kPpuCtrlFlagsHorz - .dbyt Ppu_BossRow4Start ; transfer destination - .byte 8 - .byte $5a, $5b, $5c, $5d, $5e, $5f, $60, $61 - ;; Row 5: - .byte kPpuCtrlFlagsHorz - .dbyt Ppu_BossRow5Start + 1 ; transfer destination - .byte 6 - .byte $62, $63, $64, $65, $66, $67 - ;; Attributes: - .byte kPpuCtrlFlagsHorz - .dbyt Ppu_BossCoreAttrs ; transfer destination - .byte 1 - .byte $11 -.ENDPROC - .PROC DataC_Boss_CityBlinkTransfer_arr ;; Row 2: .byte kPpuCtrlFlagsHorz @@ -618,12 +578,6 @@ _Devices_sDevice_arr: .byte $48, $49 .ENDPROC -.PROC FuncC_Boss_City_FadeInRoom - ldax #DataC_Boss_CityInitTransfer_arr ; param: data pointer - ldy #.sizeof(DataC_Boss_CityInitTransfer_arr) ; param: data length - jmp Func_BufferPpuTransfer -.ENDPROC - ;;; Room tick function for the BossCity room. ;;; @prereq PRGA_Room is loaded. .PROC FuncC_Boss_City_TickRoom @@ -1214,6 +1168,56 @@ _Error: ;;;=========================================================================;;; +.SEGMENT "PRGA_Terrain" + +.PROC DataA_Terrain_BossCityInitTransfer_arr + .assert kBossBgWidthTiles = 8, error + .assert kBossBgHeightTiles = 6, error + ;; Row 0: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_BossRow0Start + 1 ; transfer destination + .byte 6 + .byte $4c, $4d, $4e, $4f, $50, $51 + ;; Row 1: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_BossRow1Start ; transfer destination + .byte 8 + .byte $52, $53, $54, $55, $56, $57, $58, $59 + ;; Row 2: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_BossRow2Start + 1 ; transfer destination + .byte 6 + .byte $40, $41, $42, $43, $44, $45 + ;; Row 3: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_BossRow3Start + 1 ; transfer destination + .byte 6 + .byte $46, $47, $48, $49, $4a, $4b + ;; Row 4: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_BossRow4Start ; transfer destination + .byte 8 + .byte $5a, $5b, $5c, $5d, $5e, $5f, $60, $61 + ;; Row 5: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_BossRow5Start + 1 ; transfer destination + .byte 6 + .byte $62, $63, $64, $65, $66, $67 + ;; Attributes: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_BossCoreAttrs ; transfer destination + .byte 1 + .byte $11 +.ENDPROC + +.PROC FuncA_Terrain_BossCity_FadeInRoom + ldax #DataA_Terrain_BossCityInitTransfer_arr ; param: data pointer + ldy #.sizeof(DataA_Terrain_BossCityInitTransfer_arr) ; param: data length + jmp Func_BufferPpuTransfer +.ENDPROC + +;;;=========================================================================;;; + .SEGMENT "PRGE_Irq" ;;; HBlank IRQ handler function for the top of the boss's zone in the BossCity diff --git a/src/rooms/boss_crypt.asm b/src/rooms/boss_crypt.asm index 879ac359..d0b89274 100644 --- a/src/rooms/boss_crypt.asm +++ b/src/rooms/boss_crypt.asm @@ -273,7 +273,7 @@ _Ext_sRoomExt: d_addr Devices_sDevice_arr_ptr, _Devices_sDevice_arr d_addr Passages_sPassage_arr_ptr, 0 d_addr Enter_func_ptr, FuncC_Boss_Crypt_EnterRoom - d_addr FadeIn_func_ptr, FuncC_Boss_Crypt_FadeInRoom + d_addr FadeIn_func_ptr, FuncA_Terrain_BossCrypt_FadeInRoom d_addr Tick_func_ptr, FuncA_Room_BossCrypt_TickRoom d_addr Draw_func_ptr, FuncA_Objects_DrawBoss D_END @@ -518,36 +518,6 @@ _Inner: rts .ENDPROC -.PROC DataC_Boss_CryptInitTransfer_arr - .assert kBossWidthTiles = 6, error - .assert kBossHeightTiles = 4, error - ;; Row 0: - .byte kPpuCtrlFlagsHorz - .dbyt Ppu_BossRow0Start ; transfer destination - .byte 6 - .byte $6c, $6d, $6e, $6f, $70, $71 - ;; Row 1: - .byte kPpuCtrlFlagsHorz - .dbyt Ppu_BossRow1Start ; transfer destination - .byte 6 - .byte $72, $73, $a4, $a6, $74, $75 - ;; Row 2: - .byte kPpuCtrlFlagsHorz - .dbyt Ppu_BossRow2Start ; transfer destination - .byte 6 - .byte $7c, $7d, $a5, $a7, $7e, $7f - ;; Row 3: - .byte kPpuCtrlFlagsHorz - .dbyt Ppu_BossRow3Start ; transfer destination - .byte 6 - .byte $76, $77, $78, $79, $7a, $7b - ;; Nametable attributes to color eyeball red: - .byte kPpuCtrlFlagsHorz - .dbyt Ppu_BossEyeAttrs ; transfer destination - .byte 1 - .byte $04 -.ENDPROC - ;;; Room init function for the BossCrypt room. ;;; @prereq PRGA_Room is loaded. .PROC FuncC_Boss_Crypt_EnterRoom @@ -571,16 +541,6 @@ _BossIsDead: rts .ENDPROC -.PROC FuncC_Boss_Crypt_FadeInRoom - ldx #4 ; param: num bytes to write - ldy #$50 ; param: attribute value - lda #$32 ; param: initial byte offset - jsr Func_WriteToUpperAttributeTable - ldax #DataC_Boss_CryptInitTransfer_arr ; param: data pointer - ldy #.sizeof(DataC_Boss_CryptInitTransfer_arr) ; param: data length - jmp Func_BufferPpuTransfer -.ENDPROC - ;;; Performs per-frame upates for the boss in this room. ;;; @prereq PRGA_Room is loaded. .PROC FuncC_Boss_Crypt_TickBoss @@ -953,6 +913,60 @@ _Error: ;;;=========================================================================;;; +.SEGMENT "PRGA_Terrain" + +.PROC DataA_Terrain_BossCryptInitTransfer_arr + .assert kBossWidthTiles = 6, error + .assert kBossHeightTiles = 4, error + ;; Row 0: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_BossRow0Start ; transfer destination + .byte 6 + .byte $6c, $6d, $6e, $6f, $70, $71 + ;; Row 1: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_BossRow1Start ; transfer destination + .byte 6 + .byte $72, $73, $a4, $a6, $74, $75 + ;; Row 2: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_BossRow2Start ; transfer destination + .byte 6 + .byte $7c, $7d, $a5, $a7, $7e, $7f + ;; Row 3: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_BossRow3Start ; transfer destination + .byte 6 + .byte $76, $77, $78, $79, $7a, $7b + ;; Nametable attributes to color eyeball red: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_BossEyeAttrs ; transfer destination + .byte 1 + .byte $04 +.ENDPROC + +.PROC FuncA_Terrain_BossCrypt_FadeInRoom + ldx #4 ; param: num bytes to write + ldy #$50 ; param: attribute value + lda #$32 ; param: initial byte offset + jsr Func_WriteToUpperAttributeTable + ldax #DataA_Terrain_BossCryptInitTransfer_arr ; param: data pointer + ldy #.sizeof(DataA_Terrain_BossCryptInitTransfer_arr) ; param: data length + jmp Func_BufferPpuTransfer +.ENDPROC + +;;;=========================================================================;;; + +.SEGMENT "PRGA_Objects" + +;;; Draws the BossCryptWinch machine. +.PROC FuncA_Objects_BossCryptWinch_Draw + ldx #kSpikeballPlatformIndex ; param: spikeball platform index + jmp FuncA_Objects_DrawWinchMachineWithSpikeball +.ENDPROC + +;;;=========================================================================;;; + .SEGMENT "PRGE_Irq" ;;; HBlank IRQ handler function for the top of the boss's zone in the BossCrypt @@ -1037,13 +1051,3 @@ _Error: .ENDPROC ;;;=========================================================================;;; - -.SEGMENT "PRGA_Objects" - -;;; Draws the BossCryptWinch machine. -.PROC FuncA_Objects_BossCryptWinch_Draw - ldx #kSpikeballPlatformIndex ; param: spikeball platform index - jmp FuncA_Objects_DrawWinchMachineWithSpikeball -.ENDPROC - -;;;=========================================================================;;; diff --git a/src/rooms/boss_lava.asm b/src/rooms/boss_lava.asm index 64fe4ba5..be3c1300 100644 --- a/src/rooms/boss_lava.asm +++ b/src/rooms/boss_lava.asm @@ -276,7 +276,7 @@ _Ext_sRoomExt: d_addr Devices_sDevice_arr_ptr, _Devices_sDevice_arr d_addr Passages_sPassage_arr_ptr, 0 d_addr Enter_func_ptr, FuncA_Room_BossLava_EnterRoom - d_addr FadeIn_func_ptr, FuncC_Boss_Lava_FadeInRoom + d_addr FadeIn_func_ptr, FuncA_Terrain_BossLava_FadeInRoom d_addr Tick_func_ptr, FuncA_Room_BossLava_TickRoom d_addr Draw_func_ptr, FuncC_Boss_Lava_DrawRoom D_END @@ -475,39 +475,6 @@ _Devices_sDevice_arr: D_END .ENDPROC -.PROC DataC_Boss_LavaInitTransfer_arr - .assert kBossFullWidthTiles = 8, error - .assert kBossHeightTiles = 4, error - .assert kTileIdBgAnimBossLavaFirst = $50, error - ;; Row 0: - .byte kPpuCtrlFlagsHorz - .dbyt Ppu_BossRow0Start ; transfer destination - .byte 8 - .byte $50, $54, $58, $b8, $b9, $5c, $60, $64 - ;; Row 1: - .byte kPpuCtrlFlagsHorz - .dbyt Ppu_BossRow1Start ; transfer destination - .byte 8 - .byte $51, $55, $59, $ba, $bb, $5d, $61, $65 - ;; Row 2: - .byte kPpuCtrlFlagsHorz - .dbyt Ppu_BossRow2Start ; transfer destination - .byte 8 - .byte $52, $56, $5a, $bc, $bd, $5e, $62, $66 - ;; Row 3: - .byte kPpuCtrlFlagsHorz - .dbyt Ppu_BossRow3Start ; transfer destination - .byte 8 - .byte $53, $57, $5b, $be, $bf, $5f, $63, $67 -.ENDPROC - -.PROC FuncC_Boss_Lava_FadeInRoom - ldax #DataC_Boss_LavaInitTransfer_arr ; param: data pointer - ldy #.sizeof(DataC_Boss_LavaInitTransfer_arr) ; param: data length - jsr Func_BufferPpuTransfer - jmp FuncA_Terrain_FadeInShortRoomWithLava -.ENDPROC - ;;; Performs per-frame upates for the boss in this room. ;;; @prereq PRGA_Room is loaded. .PROC FuncC_Boss_Lava_TickBoss @@ -1076,6 +1043,43 @@ _ValvePipePlatformIndex_u8_arr4: ;;;=========================================================================;;; +.SEGMENT "PRGA_Terrain" + +.PROC DataA_Terrain_BossLavaInitTransfer_arr + .assert kBossFullWidthTiles = 8, error + .assert kBossHeightTiles = 4, error + .assert kTileIdBgAnimBossLavaFirst = $50, error + ;; Row 0: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_BossRow0Start ; transfer destination + .byte 8 + .byte $50, $54, $58, $b8, $b9, $5c, $60, $64 + ;; Row 1: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_BossRow1Start ; transfer destination + .byte 8 + .byte $51, $55, $59, $ba, $bb, $5d, $61, $65 + ;; Row 2: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_BossRow2Start ; transfer destination + .byte 8 + .byte $52, $56, $5a, $bc, $bd, $5e, $62, $66 + ;; Row 3: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_BossRow3Start ; transfer destination + .byte 8 + .byte $53, $57, $5b, $be, $bf, $5f, $63, $67 +.ENDPROC + +.PROC FuncA_Terrain_BossLava_FadeInRoom + ldax #DataA_Terrain_BossLavaInitTransfer_arr ; param: data pointer + ldy #.sizeof(DataA_Terrain_BossLavaInitTransfer_arr) ; param: data length + jsr Func_BufferPpuTransfer + jmp FuncA_Terrain_FadeInShortRoomWithLava +.ENDPROC + +;;;=========================================================================;;; + .SEGMENT "PRGE_Irq" ;;; HBlank IRQ handler function for the top of the boss's zone in the BossLava diff --git a/src/rooms/town_house1.bg b/src/rooms/town_house1.bg index e8bce2b4..92469c6e 100644 --- a/src/rooms/town_house1.bg +++ b/src/rooms/town_house1.bg @@ -1,7 +1,7 @@ @BG 0 0 0 16x15 >house_0 >house_1 ->house_4 +>house_2 diff --git a/src/rooms/town_house2.bg b/src/rooms/town_house2.bg index 1166cf83..a8cd0fc7 100644 --- a/src/rooms/town_house2.bg +++ b/src/rooms/town_house2.bg @@ -1,7 +1,7 @@ @BG 0 0 0 16x15 >house_0 >house_1 ->house_4 +>house_2 diff --git a/src/rooms/town_house3.bg b/src/rooms/town_house3.bg index 16815128..029c47a8 100644 --- a/src/rooms/town_house3.bg +++ b/src/rooms/town_house3.bg @@ -1,7 +1,7 @@ @BG 0 0 0 16x15 >house_0 >house_1 ->house_4 +>house_2 diff --git a/src/rooms/town_house4.bg b/src/rooms/town_house4.bg index 16308309..eae3438a 100644 --- a/src/rooms/town_house4.bg +++ b/src/rooms/town_house4.bg @@ -1,7 +1,7 @@ @BG 0 0 0 16x15 >house_0 >house_1 ->house_4 +>house_2 diff --git a/src/rooms/town_house5.bg b/src/rooms/town_house5.bg index a2c5f399..f58efd15 100644 --- a/src/rooms/town_house5.bg +++ b/src/rooms/town_house5.bg @@ -1,7 +1,7 @@ @BG 0 0 0 16x15 >house_0 >house_1 ->house_4 +>house_2 diff --git a/src/rooms/town_house6.bg b/src/rooms/town_house6.bg index 03570683..565722b8 100644 --- a/src/rooms/town_house6.bg +++ b/src/rooms/town_house6.bg @@ -1,7 +1,7 @@ @BG 0 0 0 16x15 >house_0 >house_1 ->house_4 +>house_2 diff --git a/src/rooms/town_outdoors1.bg b/src/rooms/town_outdoors1.bg index e61176d1..8f97f342 100644 --- a/src/rooms/town_outdoors1.bg +++ b/src/rooms/town_outdoors1.bg @@ -1,8 +1,8 @@ @BG 0 0 0 32x15 >outdoors_0 >outdoors_1 +>outdoors_2 >outdoors_3 ->outdoors_4 AN AO AN AN AN AN AO AN AN AN AO AP AN AO AN AN AO AP AN AO AN AN diff --git a/src/rooms/town_outdoors2.bg b/src/rooms/town_outdoors2.bg index 632609c6..5b55b38a 100644 --- a/src/rooms/town_outdoors2.bg +++ b/src/rooms/town_outdoors2.bg @@ -1,8 +1,8 @@ @BG 0 0 0 32x15 >outdoors_0 >outdoors_1 +>outdoors_2 >outdoors_3 ->outdoors_4 AN AO AN AN AN AN AO AN AN AN AO AP AN AO AN AN AO AP AN AO AN AN diff --git a/src/rooms/town_outdoors3.bg b/src/rooms/town_outdoors3.bg index 367d31b3..54d67769 100644 --- a/src/rooms/town_outdoors3.bg +++ b/src/rooms/town_outdoors3.bg @@ -1,8 +1,8 @@ @BG 0 0 0 32x15 >outdoors_0 >outdoors_1 +>outdoors_2 >outdoors_3 ->outdoors_4 AN AO AN AN AN AN AO AN AN AN AO AP AN AO AN AN AO AP AN AO AN AN diff --git a/src/tileset.asm b/src/tileset.asm index 3a61abef..a9cd9085 100644 --- a/src/tileset.asm +++ b/src/tileset.asm @@ -185,7 +185,7 @@ d_addr UpperRight_u8_arr_ptr, DataA_Terrain_HouseUpperRight_u8_arr d_addr LowerRight_u8_arr_ptr, DataA_Terrain_HouseLowerRight_u8_arr d_byte Chr08Bank_u8, <.bank(Ppu_ChrBgHouse) - d_byte FirstSolidTerrainType_u8, $40 + d_byte FirstSolidTerrainType_u8, $20 D_END .ENDPROC @@ -245,7 +245,7 @@ d_addr UpperRight_u8_arr_ptr, DataA_Terrain_OutdoorsUpperRight_u8_arr d_addr LowerRight_u8_arr_ptr, DataA_Terrain_OutdoorsLowerRight_u8_arr d_byte Chr08Bank_u8, <.bank(Ppu_ChrBgOutdoors) - d_byte FirstSolidTerrainType_u8, $40 + d_byte FirstSolidTerrainType_u8, $30 D_END .ENDPROC diff --git a/src/tilesets/house.bg b/src/tilesets/house.bg index d0612114..bb9c105b 100644 --- a/src/tilesets/house.bg +++ b/src/tilesets/house.bg @@ -1,4 +1,4 @@ -@BG 0 0 0 32x10 +@BG 0 0 0 32x6 >furniture >indoors >window @@ -7,9 +7,5 @@ BABB BEBFABACACADAIAJAKALAEAF CACB CCCD - - - - BG BJBH BLBH BJBKBK BOBP BJ BH BIBN BJBH BJ BMBM BQBR BMBU diff --git a/src/tilesets/outdoors.bg b/src/tilesets/outdoors.bg index 1bf5048c..c64148c8 100644 --- a/src/tilesets/outdoors.bg +++ b/src/tilesets/outdoors.bg @@ -1,4 +1,4 @@ -@BG 0 0 0 32x10 +@BG 0 0 0 32x8 >hill >house >outdoors @@ -12,8 +12,6 @@ CICJHCHDEKELCKCLCMCNCOCP CKCLCN CD CECF DADGDHDBDEDGDHDF HCHDBCBDDHDGBE BI BGBG BI DKDL DCDGDHDDDGDGDHDGHAHBBABB BEBFDHDGBC BG BHBH BGDIDJDHDG - - GJ GH GJ GH GKGIGLGGGL GC GIGLGGGL GJ GJ GF GH CBCB CBCB GKGIGLGIGLGEGL GKGGGL GAGIGDGGGD GCCACAGIGDGGGDBJBJFA ABCAFA AA