diff --git a/build/bg2tset.c b/build/bg2tset.c index 14d1af8f..3b71ed53 100644 --- a/build/bg2tset.c +++ b/build/bg2tset.c @@ -67,7 +67,6 @@ static const struct { {0xb4, "drawbridge"}, {0x80, "factory1"}, {0x90, "factory2"}, - {0xac, "field_bg"}, {0xa0, "fullcore1"}, {0xb0, "fullcore2"}, {0xa0, "furniture"}, @@ -104,6 +103,7 @@ static const struct { {0xb0, "terrain_hoist"}, {0x00, "terrain_shared_0"}, {0x10, "terrain_shared_1"}, + {0x40, "terrain_teleport"}, {0x50, "thorns_anim0"}, {0xaa, "tree"}, {0x90, "volcanic1"}, diff --git a/src/chr.asm b/src/chr.asm index 010753d8..45c6afa6 100644 --- a/src/chr.asm +++ b/src/chr.asm @@ -562,8 +562,7 @@ _chr_begin: chr_inc "steam_pipes" chr_inc "volcanic1" chr_inc "volcanic2" - chr_res $06 - chr_inc "field_bg" + chr_res $0a chr_inc "arch" chr_inc "boiler" chr_inc "terrain_boss_lava" @@ -963,7 +962,7 @@ _chr_begin: chr_inc "shadow1" chr_inc "shadow2" chr_inc "shadow3" - chr_inc "field_bg" + chr_res $04 chr_inc "tank" chr_res $06 END_CHR_BANK @@ -971,6 +970,18 @@ _chr_begin: ;;;=========================================================================;;; +.SEGMENT "CHR_BgTeleport" + +.EXPORT Ppu_ChrBgTeleport +.PROC Ppu_ChrBgTeleport + CHR1_BANK $40 + chr_inc "terrain_teleport" + chr_res $04 + END_CHR_BANK +.ENDPROC + +;;;=========================================================================;;; + .SEGMENT "CHR_BgTemple" .EXPORT Ppu_ChrBgTemple @@ -1004,7 +1015,7 @@ _chr_begin: .EXPORT Ppu_ChrBgWheel .PROC Ppu_ChrBgWheel - CHR1_BANK $c0 + CHR1_BANK $40 chr_inc "wheel1" chr_inc "wheel2" chr_inc "wheel3" diff --git a/src/cutscene.asm b/src/cutscene.asm index c803e7ae..58115377 100644 --- a/src/cutscene.asm +++ b/src/cutscene.asm @@ -80,6 +80,7 @@ .IMPORT Ram_ActorVelX_i16_1_arr .IMPORT Ram_ActorVelY_i16_0_arr .IMPORT Ram_ActorVelY_i16_1_arr +.IMPORT Ram_DeviceAnim_u8_arr .IMPORTZP Zp_AvatarFlags_bObj .IMPORTZP Zp_AvatarPosX_i16 .IMPORTZP Zp_AvatarPosY_i16 @@ -385,6 +386,7 @@ _InitMainFork: d_entry table, SetAvatarVelX, _SetAvatarVelX d_entry table, SetAvatarVelY, _SetAvatarVelY d_entry table, SetCutsceneFlags, _SetCutsceneFlags + d_entry table, SetDeviceAnim, _SetDeviceAnim d_entry table, SetScrollFlags, _SetScrollFlags d_entry table, ShakeRoom, _ShakeRoom d_entry table, SwimNpcAlex, _SwimNpcAlex @@ -655,6 +657,14 @@ _SetAvatarVelY: sta Zp_AvatarVelY_i16 + 1 iny jmp FuncA_Cutscene_AdvanceForkAndExecute +_SetDeviceAnim: + lda (T1T0), y + tax ; device index + iny + lda (T1T0), y + sta Ram_DeviceAnim_u8_arr, x + iny + jmp FuncA_Cutscene_AdvanceForkAndExecute _SetCutsceneFlags: lda (T1T0), y sta Zp_CutsceneFlags_bCutscene diff --git a/src/cutscene.inc b/src/cutscene.inc index 721ee4ff..d749bb1e 100644 --- a/src/cutscene.inc +++ b/src/cutscene.inc @@ -145,6 +145,9 @@ kMaxForks = 4 ;; Sets the cutscene tick flags to the specified value, then the current ;; cutscene fork immediately continues on to the next action. SetCutsceneFlags ; args: bCutscene value + ;; Sets a field on the specified device to the specified value, then the + ;; current cutscene fork immediately continues on to the next action. + SetDeviceAnim ; args: device index, new anim value ;; Sets the camera scroll flags, then the current cutscene fork immediately ;; continues on to the next action. SetScrollFlags ; args: bScroll value @@ -312,6 +315,10 @@ kMaxForks = 4 .word $ffff & (VELY) .ENDMACRO +.MACRO act_SetDeviceAnim INDEX, ANIM + .byte eAction::SetDeviceAnim, INDEX, ANIM +.ENDMACRO + .MACRO act_SetCutsceneFlags BCUTSCENE .byte eAction::SetCutsceneFlags, BCUTSCENE .ENDMACRO diff --git a/src/device.asm b/src/device.asm index ee5fe80c..7ec8d20e 100644 --- a/src/device.asm +++ b/src/device.asm @@ -33,6 +33,7 @@ .IMPORT FuncA_Objects_DrawLockedDoorDevice .IMPORT FuncA_Objects_DrawPaperDevice .IMPORT FuncA_Objects_DrawScreenDevice +.IMPORT FuncA_Objects_DrawTeleporterDevice .IMPORT FuncA_Objects_DrawUnlockedDoorDevice .IMPORT FuncA_Objects_DrawUpgradeDevice .IMPORT Func_Noop @@ -175,7 +176,7 @@ _Continue: d_entry table, FlowerInert, FuncA_Objects_DrawFlowerDevice d_entry table, Mousehole, Func_Noop d_entry table, Placeholder, Func_Noop - d_entry table, Teleporter, Func_Noop + d_entry table, Teleporter, FuncA_Objects_DrawTeleporterDevice d_entry table, BreakerReady, FuncA_Objects_DrawBreakerReadyDevice d_entry table, Console, FuncA_Objects_DrawConsoleDevice d_entry table, Door1Open, Func_Noop diff --git a/src/devices/teleporter.asm b/src/devices/teleporter.asm new file mode 100644 index 00000000..737efabd --- /dev/null +++ b/src/devices/teleporter.asm @@ -0,0 +1,391 @@ +;;;=========================================================================;;; +;;; Copyright 2022 Matthew D. Steele ;;; +;;; ;;; +;;; This file is part of Annalog. ;;; +;;; ;;; +;;; Annalog is free software: you can redistribute it and/or modify it ;;; +;;; under the terms of the GNU General Public License as published by the ;;; +;;; Free Software Foundation, either version 3 of the License, or (at your ;;; +;;; option) any later version. ;;; +;;; ;;; +;;; Annalog is distributed in the hope that it will be useful, but WITHOUT ;;; +;;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ;;; +;;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ;;; +;;; for more details. ;;; +;;; ;;; +;;; You should have received a copy of the GNU General Public License along ;;; +;;; with Annalog. If not, see . ;;; +;;;=========================================================================;;; + +.INCLUDE "../avatar.inc" +.INCLUDE "../cutscene.inc" +.INCLUDE "../irq.inc" +.INCLUDE "../macros.inc" +.INCLUDE "../mmc3.inc" +.INCLUDE "../ppu.inc" +.INCLUDE "../spawn.inc" +.INCLUDE "teleporter.inc" + +.IMPORT FuncA_Avatar_SpawnAtDevice +.IMPORT FuncM_SwitchPrgcAndLoadRoom +.IMPORT Func_AckIrqAndLatchWindowFromParam4 +.IMPORT Func_BufferPpuTransfer +.IMPORT Func_FadeOutToBlack +.IMPORT Func_FindEmptyActorSlot +.IMPORT Func_InitActorSmokeExplosion +.IMPORT Func_SetActorCenterToPoint +.IMPORT Func_SetLastSpawnPoint +.IMPORT Func_SetPointToAvatarCenter +.IMPORT Main_Explore_EnterRoom +.IMPORT Ppu_ChrBgTeleport +.IMPORT Ram_DeviceAnim_u8_arr +.IMPORT Ram_DeviceTarget_byte_arr +.IMPORTZP Zp_Active_sIrq +.IMPORTZP Zp_AvatarPose_eAvatar +.IMPORTZP Zp_Buffered_sIrq +.IMPORTZP Zp_Chr04Bank_u8 +.IMPORTZP Zp_Next_eCutscene +.IMPORTZP Zp_PpuTransferLen_u8 +.IMPORTZP Zp_RoomScrollY_u8 + +;;;=========================================================================;;; + +;;; The room pixel Y-position below which no teleporter BG tiles will be drawn. +kTeleportZoneBottomY = $90 + +;;; The tile row/col in the upper nametable for the top-left corner of the BG +;;; tiles for the teleport zap. +kTeleportZapStartRow = 12 +kTeleportZapStartCol = 15 + +;;; The PPU addresses for the start (left) of each row of the teleport zap. +.LINECONT + +Ppu_TeleportZapRow0Start = Ppu_Nametable0_sName + sName::Tiles_u8_arr + \ + kScreenWidthTiles * (kTeleportZapStartRow + 0) + kTeleportZapStartCol +Ppu_TeleportZapRow1Start = Ppu_Nametable0_sName + sName::Tiles_u8_arr + \ + kScreenWidthTiles * (kTeleportZapStartRow + 1) + kTeleportZapStartCol +Ppu_TeleportZapRow2Start = Ppu_Nametable0_sName + sName::Tiles_u8_arr + \ + kScreenWidthTiles * (kTeleportZapStartRow + 2) + kTeleportZapStartCol +Ppu_TeleportZapRow3Start = Ppu_Nametable0_sName + sName::Tiles_u8_arr + \ + kScreenWidthTiles * (kTeleportZapStartRow + 3) + kTeleportZapStartCol +Ppu_TeleportZapRow4Start = Ppu_Nametable0_sName + sName::Tiles_u8_arr + \ + kScreenWidthTiles * (kTeleportZapStartRow + 4) + kTeleportZapStartCol +.LINECONT - + +;;; Don't attempt to update the teleport zap BG tiles if the PPU transfer +;;; buffer already has this many bytes or more in it (so we don't risk putting +;;; more in the buffer than can be processed in one VBlank). The specific +;;; value chosen for this limit is somewhat arbitrary; but in particular, it's +;;; high to still allow for transferring a full window row (which takes $24 +;;; buffer bytes). +kTeleportTransferThreshold = $30 + +;;;=========================================================================;;; + +.SEGMENT "PRG8" + +;;; Mode for leaving the current room via a teleporter and entering the next +;;; room. +;;; @prereq Rendering is enabled. +;;; @prereq Explore mode is already initialized. +;;; @prereq There is a Teleporter device in the current room. +.PROC Main_GoThroughTeleporter + jsr Func_FadeOutToBlack + ldx Ram_DeviceTarget_byte_arr + kTeleporterDeviceIndex ; param: eRoom + jsr FuncM_SwitchPrgcAndLoadRoom + jsr_prga FuncA_Avatar_EnterRoomViaTeleporter + jmp Main_Explore_EnterRoom +.ENDPROC + +;;;=========================================================================;;; + +.SEGMENT "PRGA_Avatar" + +;;; Called when entering a new room via a teleporter. Marks the entrance +;;; teleporter as the last spawn point and positions the player avatar at that +;;; teleporter. Also sets up the "teleport in" cutscene. +;;; @prereq The new room is loaded. +;;; @prereq There is a Teleporter device in the new room. +.PROC FuncA_Avatar_EnterRoomViaTeleporter + lda #bSpawn::Device | kTeleporterDeviceIndex ; param: bSpawn value + jsr Func_SetLastSpawnPoint + ldx #kTeleporterDeviceIndex ; param: device index + jsr FuncA_Avatar_SpawnAtDevice +_InitCutsceneState: + lda #eAvatar::Hidden + sta Zp_AvatarPose_eAvatar + lda #eCutscene::SharedTeleportIn + sta Zp_Next_eCutscene + rts +.ENDPROC + +;;;=========================================================================;;; + +.SEGMENT "PRGA_Cutscene" + +.EXPORT DataA_Cutscene_SharedTeleportOut_sCutscene +.PROC DataA_Cutscene_SharedTeleportOut_sCutscene + act_SetAvatarPose eAvatar::Hidden + act_CallFunc FuncA_Cutscene_MakeTeleportSmokePuff + act_WaitFrames 75 + act_JumpToMain Main_GoThroughTeleporter +.ENDPROC + +.EXPORT DataA_Cutscene_SharedTeleportIn_sCutscene +.PROC DataA_Cutscene_SharedTeleportIn_sCutscene + act_WaitFrames 50 + act_ShakeRoom kTeleportShakeFrames + act_SetDeviceAnim kTeleporterDeviceIndex, kTeleporterAnimFull + act_CallFunc FuncA_Cutscene_MakeTeleportSmokePuff + act_ContinueExploring +.ENDPROC + +;;; Spawns a smoke explosion actor at the player avatar's current position, +;;; representing the avatar teleporting in/out. +.PROC FuncA_Cutscene_MakeTeleportSmokePuff + jsr Func_FindEmptyActorSlot ; sets C on failure, returns X + bcs @done + jsr Func_SetPointToAvatarCenter ; preserves X + jsr Func_SetActorCenterToPoint ; preserves X + jmp Func_InitActorSmokeExplosion + @done: + rts +.ENDPROC + +;;;=========================================================================;;; + +.SEGMENT "PRGA_Objects" + +.PROC DataA_Objects_TeleportTransferBlank_arr + ;; Row 0: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_TeleportZapRow0Start + 1 ; transfer destination + .byte 3 + .byte 0, 0, 0 + ;; Row 1: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_TeleportZapRow1Start + 1 ; transfer destination + .byte 6 + .byte 0, 0, 0, 0, 0, 0 + ;; Row 2: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_TeleportZapRow2Start + 0 ; transfer destination + .byte 8 + .byte 0, 0, 0, 0, 0, 0, 0, 0 + ;; Row 3: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_TeleportZapRow3Start + 0 ; transfer destination + .byte 8 + .byte 0, 0, 0, 0, 0, 0, 0, 0 + ;; Row 4: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_TeleportZapRow4Start + 3 ; transfer destination + .byte 4 + .byte 0, 0, 0, 0 +.ENDPROC + +.PROC DataA_Objects_TeleportTransferBolt1_arr + ;; Row 0: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_TeleportZapRow0Start + 1 ; transfer destination + .byte 3 + .byte 0, $48, 0 + ;; Row 1: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_TeleportZapRow1Start + 1 ; transfer destination + .byte 6 + .byte $49, $4a, 0, 0, $4b, $4c + ;; Row 2: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_TeleportZapRow2Start + 0 ; transfer destination + .byte 8 + .byte $4d, $4e, $4f, $50, $51, $52, $53, $54 + ;; Row 3: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_TeleportZapRow3Start + 0 ; transfer destination + .byte 8 + .byte $55, 0, 0, $56, $57, 0, 0, $58 + ;; Row 4: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_TeleportZapRow4Start + 3 ; transfer destination + .byte 4 + .byte $59, 0, 0, 0 +.ENDPROC + +.PROC DataA_Objects_TeleportTransferBolt2_arr + ;; Row 0: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_TeleportZapRow0Start + 1 ; transfer destination + .byte 3 + .byte 0, 0, $5a + ;; Row 1: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_TeleportZapRow1Start + 1 ; transfer destination + .byte 6 + .byte 0, $5b, $5c, $5d, 0, 0 + ;; Row 2: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_TeleportZapRow2Start + 0 ; transfer destination + .byte 8 + .byte $5e, 0, $5f, $60, $61, $62, 0, $63 + ;; Row 3: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_TeleportZapRow3Start + 0 ; transfer destination + .byte 8 + .byte $64, $65, $66, 0, $67, $68, $69, $6a + ;; Row 4: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_TeleportZapRow4Start + 3 ; transfer destination + .byte 4 + .byte 0, 0, $6b, $6c +.ENDPROC + +.PROC DataA_Objects_TeleportTransferDisp1_arr + ;; Row 0: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_TeleportZapRow0Start + 1 ; transfer destination + .byte 3 + .byte $6d, 0, 0 + ;; Row 1: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_TeleportZapRow1Start + 1 ; transfer destination + .byte 6 + .byte $6e, $6f, 0, 0, 0, $70 + ;; Row 2: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_TeleportZapRow2Start + 0 ; transfer destination + .byte 8 + .byte 0, 0, 0, 0, 0, $71, $72, 0 + ;; Row 3: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_TeleportZapRow3Start + 0 ; transfer destination + .byte 8 + .byte 0, 0, 0, $73, $74, 0, 0, 0 + ;; Row 4: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_TeleportZapRow4Start + 3 ; transfer destination + .byte 4 + .byte $75, 0, 0, 0 +.ENDPROC + +.PROC DataA_Objects_TeleportTransferDisp2_arr + ;; Row 0: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_TeleportZapRow0Start + 1 ; transfer destination + .byte 3 + .byte $76, 0, 0 + ;; Row 1: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_TeleportZapRow1Start + 1 ; transfer destination + .byte 6 + .byte $77, $78, 0, 0, $79, $7a + ;; Row 2: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_TeleportZapRow2Start + 0 ; transfer destination + .byte 8 + .byte 0, 0, 0, 0, 0, 0, 0, 0 + ;; Row 3: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_TeleportZapRow3Start + 0 ; transfer destination + .byte 8 + .byte 0, 0, 0, $7b, 0, 0, 0, 0 + ;; Row 4: + .byte kPpuCtrlFlagsHorz + .dbyt Ppu_TeleportZapRow4Start + 3 ; transfer destination + .byte 4 + .byte 0, 0, 0, 0 +.ENDPROC + +;;; Draws a teleporter device. +;;; @param X The device index. +;;; @preserve X +.EXPORT FuncA_Objects_DrawTeleporterDevice +.PROC FuncA_Objects_DrawTeleporterDevice +_SetUpIrq: + ;; Compute the IRQ latch value to set between the bottom of the teleport + ;; zone and the top of the window (if any), and set that as Param4_byte. + lda Zp_Buffered_sIrq + sIrq::Latch_u8 + sub #kTeleportZoneBottomY + add Zp_RoomScrollY_u8 + sta Zp_Buffered_sIrq + sIrq::Param4_byte ; window latch + ;; Set up our own sIrq struct to switch CHR04 banks. + lda #kTeleportZoneBottomY - 1 + sub Zp_RoomScrollY_u8 + sta Zp_Buffered_sIrq + sIrq::Latch_u8 + ldya #Int_TeleportZoneBottomIrq + stya Zp_Buffered_sIrq + sIrq::FirstIrq_int_ptr + ;; Store next frame's CHR04 bank for animated terrain so that the IRQ for + ;; the bottom of the teleport zone can restore it. + lda Zp_Chr04Bank_u8 + sta Zp_Buffered_sIrq + sIrq::Param3_byte ; terrain CHR04 bank + ;; Set up the CHR04 bank used by the teleporter. + lda #<.bank(Ppu_ChrBgTeleport) + sta Zp_Chr04Bank_u8 +_TransferBgTiles: + ;; If the PPU transfer buffer already has a fair bit of data in it, don't + ;; update the teleport zap BG tiles this frame. + lda Zp_PpuTransferLen_u8 + cmp #kTeleportTransferThreshold + bge @done + ;; Use the device animation to determine which animation shape to draw for + ;; the teleport zap this frame. + lda Ram_DeviceAnim_u8_arr, x + stx T3 ; teleporter device index + div #kTeleportZapSlowdown + tay + ldx _Transfer_arr_ptr_0_arr, y ; param: data pointer (lo) + lda _Transfer_arr_ptr_1_arr, y ; param: data pointer (hi) + ;; The transfer entries we're choosing between are all the same size. + .linecont + + .assert .sizeof(DataA_Objects_TeleportTransferBolt1_arr) = \ + .sizeof(DataA_Objects_TeleportTransferBlank_arr), error + .assert .sizeof(DataA_Objects_TeleportTransferBolt2_arr) = \ + .sizeof(DataA_Objects_TeleportTransferBlank_arr), error + .assert .sizeof(DataA_Objects_TeleportTransferDisp1_arr) = \ + .sizeof(DataA_Objects_TeleportTransferBlank_arr), error + .assert .sizeof(DataA_Objects_TeleportTransferDisp2_arr) = \ + .sizeof(DataA_Objects_TeleportTransferBlank_arr), error + .linecont - + ldy #.sizeof(DataA_Objects_TeleportTransferBlank_arr) ; param: data len + jsr Func_BufferPpuTransfer ; preserves T3+ + ldx T3 ; teleporter device index + @done: + rts +.REPEAT 2, table + D_TABLE_LO table, _Transfer_arr_ptr_0_arr + D_TABLE_HI table, _Transfer_arr_ptr_1_arr + D_TABLE kTeleportZapNumAnimShapes + d_entry table, 0, DataA_Objects_TeleportTransferBlank_arr + d_entry table, 1, DataA_Objects_TeleportTransferDisp2_arr + d_entry table, 2, DataA_Objects_TeleportTransferBlank_arr + d_entry table, 3, DataA_Objects_TeleportTransferDisp1_arr + d_entry table, 4, DataA_Objects_TeleportTransferBolt2_arr + d_entry table, 5, DataA_Objects_TeleportTransferBolt1_arr + D_END +.ENDREPEAT +.ENDPROC + +;;;=========================================================================;;; + +.SEGMENT "PRGE_Irq" + +;;; HBlank IRQ handler function for the bottom of the teleportation zone in the +;;; LavaTeleport and ShadowTeleport rooms. Switches the CHR04 bank to support +;;; animated terrain at the bottom of the room. +.PROC Int_TeleportZoneBottomIrq + pha + ;; At this point, the first HBlank is already almost over. Ack the current + ;; IRQ and prepare for the next one. + jsr Func_AckIrqAndLatchWindowFromParam4 ; preserves X and Y + ;; Busy-wait for a bit, so that the CHR04 bank switch will occur during the + ;; next HBlank. + lda #7 + @busyLoop: + sub #1 + bne @busyLoop + irq_chr04 Zp_Active_sIrq + sIrq::Param3_byte ; terrain CHR04 bank + pla + rti +.ENDPROC + +;;;=========================================================================;;; diff --git a/src/teleport.inc b/src/devices/teleporter.inc similarity index 75% rename from src/teleport.inc rename to src/devices/teleporter.inc index 96e118c5..d3e5d7a4 100644 --- a/src/teleport.inc +++ b/src/devices/teleporter.inc @@ -21,4 +21,19 @@ ;;; player avatar should spawn when teleporting into the room. kTeleporterDeviceIndex = 0 +;;; How many frames the room shakes for during a full-power teleport zap. +kTeleportShakeFrames = 20 + +;;; The number of VBlank frames per animation shape of the teleporter zap +;;; effect. +.DEFINE kTeleportZapSlowdown 4 + +;;; The number of distinct animation shapes in the teleporter zap effect. +kTeleportZapNumAnimShapes = 6 + +;;; The number of VBlank frames to animate a teleporter zap, for either a full +;;; or partial zap. +kTeleporterAnimFull = kTeleportZapSlowdown * kTeleportZapNumAnimShapes - 1 +kTeleporterAnimPartial = kTeleportZapSlowdown * 4 - 1 + ;;;=========================================================================;;; diff --git a/src/linker.cfg b/src/linker.cfg index ef21f669..25f0da0f 100644 --- a/src/linker.cfg +++ b/src/linker.cfg @@ -310,9 +310,10 @@ SEGMENTS { CHR_BgPrison: load=CHR1_2F, type=ro; CHR_BgSewer: load=CHR1_30, type=ro; CHR_BgShadow: load=CHR1_31, type=ro; - CHR_BgTemple: load=CHR1_32, type=ro; - CHR_BgTitle: load=CHR1_33, type=ro; - CHR_BgWheel: load=CHR1_34, type=ro; + CHR_BgTeleport: load=CHR1_32, type=ro; + CHR_BgTemple: load=CHR1_33, type=ro; + CHR_BgTitle: load=CHR1_34, type=ro; + CHR_BgWheel: load=CHR1_35, type=ro; CHR_BgAnimStatic: load=CHR1_3F, type=ro; CHR_BgAnimB0: load=CHR1_40, type=ro; CHR_BgAnimB1: load=CHR1_41, type=ro; diff --git a/src/machines/field.asm b/src/machines/field.asm index 2e2451e6..1da7ed59 100644 --- a/src/machines/field.asm +++ b/src/machines/field.asm @@ -18,6 +18,7 @@ ;;;=========================================================================;;; .INCLUDE "../cutscene.inc" +.INCLUDE "../devices/teleporter.inc" .INCLUDE "../machine.inc" .INCLUDE "../macros.inc" .INCLUDE "../oam.inc" @@ -29,10 +30,9 @@ .IMPORT FuncA_Machine_StartWaiting .IMPORT FuncA_Objects_Draw1x1Shape .IMPORT FuncA_Objects_GetMachineLightTileId -.IMPORT FuncA_Objects_MoveShapeDownOneTile -.IMPORT FuncA_Objects_MoveShapeRightByA -.IMPORT FuncA_Objects_MoveShapeUpOneTile .IMPORT FuncA_Objects_SetShapePosToMachineTopLeft +.IMPORT Func_ShakeRoom +.IMPORT Ram_DeviceAnim_u8_arr .IMPORT Ram_MachineState1_byte_arr .IMPORT Ram_PlatformBottom_i16_0_arr .IMPORT Ram_PlatformBottom_i16_1_arr @@ -104,10 +104,17 @@ kFieldActCooldown = $20 cmp #kFieldMaxChargePoints * kFieldFramesPerChargePoint bge _IsCharged _NotCharged: - ;; TODO: small smoke puff - jmp _Cooldown + lda #kTeleporterAnimPartial + sta Ram_DeviceAnim_u8_arr + kTeleporterDeviceIndex + .assert kTeleporterAnimPartial > 0, error + bne _Cooldown ; unconditional _IsCharged: - ;; TODO: large smoke puff + ;; TODO: Instead of immediately doing the teleport zap, animate energy + ;; balls for a few frames first. + lda #kTeleportShakeFrames + jsr Func_ShakeRoom + lda #kTeleporterAnimFull + sta Ram_DeviceAnim_u8_arr + kTeleporterDeviceIndex _TryTeleport: ;; Get the platform index for the machine's primary platform. ldy #sMachine::MainPlatform_u8 @@ -198,24 +205,8 @@ _Light: jsr FuncA_Objects_GetMachineLightTileId ; returns A (param: tile ID) ldy #kPaletteObjMachineLight ; param: object flags jsr FuncA_Objects_Draw1x1Shape -_BottomLeftCorner: - jsr FuncA_Objects_MoveShapeDownOneTile - ldy #bObj::FlipH | kPaletteObjMachineLight ; param: object flags - lda #kTileIdObjMachineCorner ; param: tile ID - jsr FuncA_Objects_Draw1x1Shape -_BottomRightCorner: - lda #kFieldMachineWidth + kTeleportFieldWidth + kTileWidthPx - jsr FuncA_Objects_MoveShapeRightByA - ldy #kPaletteObjMachineLight ; param: object flags - lda #kTileIdObjMachineCorner ; param: tile ID - jsr FuncA_Objects_Draw1x1Shape -_TopRightCorner: - jsr FuncA_Objects_MoveShapeUpOneTile - ldy #bObj::FlipV | kPaletteObjMachineLight ; param: object flags - lda #kTileIdObjMachineCorner ; param: tile ID - jsr FuncA_Objects_Draw1x1Shape _Zap: - ;; TODO: draw teleportation effect + ;; TODO: draw energy balls rts .ENDPROC diff --git a/src/newgame.asm b/src/newgame.asm index f6c8206f..8d106118 100644 --- a/src/newgame.asm +++ b/src/newgame.asm @@ -19,13 +19,13 @@ .INCLUDE "boss.inc" .INCLUDE "charmap.inc" +.INCLUDE "devices/teleporter.inc" .INCLUDE "flag.inc" .INCLUDE "macros.inc" .INCLUDE "mmc3.inc" .INCLUDE "newgame.inc" .INCLUDE "room.inc" .INCLUDE "spawn.inc" -.INCLUDE "teleport.inc" .IMPORT Func_SetFlag .IMPORT Sram_LastSafe_bSpawn diff --git a/src/rooms/lava_teleport.asm b/src/rooms/lava_teleport.asm index 0013d240..95fd2001 100644 --- a/src/rooms/lava_teleport.asm +++ b/src/rooms/lava_teleport.asm @@ -20,6 +20,7 @@ .INCLUDE "../actor.inc" .INCLUDE "../charmap.inc" .INCLUDE "../device.inc" +.INCLUDE "../devices/teleporter.inc" .INCLUDE "../flag.inc" .INCLUDE "../machine.inc" .INCLUDE "../machines/field.inc" @@ -29,7 +30,6 @@ .INCLUDE "../ppu.inc" .INCLUDE "../program.inc" .INCLUDE "../room.inc" -.INCLUDE "../teleport.inc" .IMPORT DataA_Room_Lava_sTileset .IMPORT Data_Empty_sActor_arr @@ -53,7 +53,7 @@ kFieldPlatformIndex = 0 ;;; The platform positions for the LavaTeleportField machine. .LINECONT + kFieldPlatformTop = $70 -kFieldPlatformLeft1 = $48 +kFieldPlatformLeft1 = $68 kFieldPlatformLeft2 = \ kFieldPlatformLeft1 + kFieldMachineWidth + kTeleportFieldWidth .LINECONT - @@ -65,8 +65,8 @@ kFieldPlatformLeft2 = \ .EXPORT DataC_Lava_Teleport_sRoom .PROC DataC_Lava_Teleport_sRoom D_STRUCT sRoom - d_byte MinScrollX_u8, $00 - d_word MaxScrollX_u16, $0000 + d_byte MinScrollX_u8, $20 + d_word MaxScrollX_u16, $0020 d_byte Flags_bRoom, eArea::Lava d_byte MinimapStartRow_u8, 13 d_byte MinimapStartCol_u8, 13 @@ -90,7 +90,7 @@ _Ext_sRoomExt: D_END _TerrainData: : .incbin "out/rooms/lava_teleport.room" - .assert * - :- = 17 * 15, error + .assert * - :- = 19 * 15, error _Machines_sMachine_arr: : .assert * - :- = kFieldMachineIndex * .sizeof(sMachine), error D_STRUCT sMachine @@ -133,7 +133,7 @@ _Platforms_sPlatform_arr: d_byte Type_ePlatform, ePlatform::Harm d_word WidthPx_u16, $50 d_byte HeightPx_u8, $08 - d_word Left_i16, $0050 + d_word Left_i16, $0070 d_word Top_i16, $00ce D_END .assert * - :- <= kMaxPlatforms * .sizeof(sPlatform), error @@ -143,13 +143,13 @@ _Devices_sDevice_arr: D_STRUCT sDevice d_byte Type_eDevice, eDevice::Teleporter d_byte BlockRow_u8, 7 - d_byte BlockCol_u8, 7 + d_byte BlockCol_u8, 9 d_byte Target_byte, eRoom::ShadowTeleport D_END D_STRUCT sDevice d_byte Type_eDevice, eDevice::Console d_byte BlockRow_u8, 10 - d_byte BlockCol_u8, 11 + d_byte BlockCol_u8, 13 d_byte Target_byte, kFieldMachineIndex D_END .assert * - :- <= kMaxDevices * .sizeof(sDevice), error diff --git a/src/rooms/lava_teleport.bg b/src/rooms/lava_teleport.bg index b4861b0d..1c67ac04 100644 --- a/src/rooms/lava_teleport.bg +++ b/src/rooms/lava_teleport.bg @@ -1,21 +1,22 @@ -@BG 0 0 0 17x15 +@BG 0 0 0 19x15 >lava_0 >lava_1 >lava_4 >lava_5 +>lava_6 -CCCCCCCCCJCMCICCCCCCCJCICCCCCCCCCC -CJCICCCJCICCCCCJCICCCCCJCICJCICCCC -CCCJ BL BLBG BH BLCICCCCCC -CJBG BLCICCCC -CJ CICCCC -CC CJCICC -CC CKCA CACBCL CICCCC -CJ CCAM ANCC BK CICCCC -CJ CKCBCJ CICL BL -CCBE BL BL BD -CCCA BEAB CACBCA -CJCI BA CACBCLBFCMCICC -CCCJCKCBCLAOAOCNAOAPCICJCICACCCCCC -DDDDDDDFCCCCCCCCCJCICCCCCJCICCCCCC -CCCCCCDACCCCCCCCCCCCCCCCCCCCCCCCCC +CCCCCCCCCCCCCJCMCICCCCCCCJCICCCCCCCCCC +CCCCCJCICCCJCICCCCCJCICCCCCJCICJCICCCC +CCCCCCCJ BL BLBG BH BLCICCCCCC +CCCCCJBG BLCICCCC +CCCCCJ CICCCC +CCCCCC CJCICC +CCCCCC CKCA CACBCL CICCCC +CCCCCJ EIAM ANEJ BK CICCCC +CCCCCJ CKCBCJ CICL BL +CCCCCCBE BL BL BD +CCCCCCCA BEAB CACBCA +CCCCCJCI BA CACBCLBFCMCICC +CCCCCCCJCKCBCLAOAOCNAOAPCICJCICACCCCCC +CCCCDDDDDDDFCCCCCCCCCJCICCCCCJCICCCCCC +CCCCCCCCCCDACCCCCCCCCCCCCCCCCCCCCCCCCC diff --git a/src/rooms/mermaid_spring.asm b/src/rooms/mermaid_spring.asm index 17c919e3..d6f32c1d 100644 --- a/src/rooms/mermaid_spring.asm +++ b/src/rooms/mermaid_spring.asm @@ -62,7 +62,6 @@ .IMPORT Func_ShakeRoom .IMPORT Ppu_ChrObjSewer .IMPORT Ram_ActorType_eActor_arr -.IMPORT Ram_DeviceAnim_u8_arr .IMPORT Ram_DeviceType_eDevice_arr .IMPORT Ram_MachineGoalVert_u8_arr .IMPORT Ram_MachineStatus_eMachine_arr @@ -472,6 +471,8 @@ _SpawnExplosionAtPoint: act_WaitUntilZ _DropMonitorPlatform act_WaitFrames 15 act_CallFunc _FixConsole + act_SetDeviceAnim kConsoleDeviceIndex, kConsoleAnimCountdown + act_SetScrollFlags 0 act_WaitFrames 70 act_SetActorState1 kAlexActorIndex, eNpcChild::AlexStanding act_WaitFrames 45 @@ -510,13 +511,9 @@ _DropMonitorPlatform: lda #1 ; param: max move by jmp Func_MovePlatformTopTowardPointY ; returns Z _FixConsole: - lda #0 - sta Zp_Camera_bScroll ;; TODO: play a sound for the console turning on lda #eDevice::Console sta Ram_DeviceType_eDevice_arr + kConsoleDeviceIndex - lda #kConsoleAnimCountdown - sta Ram_DeviceAnim_u8_arr + kConsoleDeviceIndex ldx #eFlag::MermaidSpringConsoleFixed ; param: flag jmp Func_SetFlag .ENDPROC diff --git a/src/rooms/shadow_entry.asm b/src/rooms/shadow_entry.asm index 000cf414..bb9beb76 100644 --- a/src/rooms/shadow_entry.asm +++ b/src/rooms/shadow_entry.asm @@ -30,7 +30,6 @@ .INCLUDE "../ppu.inc" .INCLUDE "../program.inc" .INCLUDE "../room.inc" -.INCLUDE "../teleport.inc" .IMPORT DataA_Room_Shadow_sTileset .IMPORT FuncA_Machine_Error diff --git a/src/rooms/shadow_teleport.asm b/src/rooms/shadow_teleport.asm index 0b67eb97..e086cf60 100644 --- a/src/rooms/shadow_teleport.asm +++ b/src/rooms/shadow_teleport.asm @@ -20,6 +20,7 @@ .INCLUDE "../actor.inc" .INCLUDE "../charmap.inc" .INCLUDE "../device.inc" +.INCLUDE "../devices/teleporter.inc" .INCLUDE "../dialog.inc" .INCLUDE "../flag.inc" .INCLUDE "../machine.inc" @@ -29,7 +30,6 @@ .INCLUDE "../platform.inc" .INCLUDE "../program.inc" .INCLUDE "../room.inc" -.INCLUDE "../teleport.inc" .IMPORT DataA_Room_Shadow_sTileset .IMPORT Data_Empty_sActor_arr diff --git a/src/rooms/shadow_teleport.bg b/src/rooms/shadow_teleport.bg index 90ed31b3..34599ffa 100644 --- a/src/rooms/shadow_teleport.bg +++ b/src/rooms/shadow_teleport.bg @@ -12,7 +12,7 @@ EBEGEHBBBBCJ BD BC BD EM ENENEFCJ CGBABACL CKBACBCGCN EM ENEFEMBD CGBABEBAED EBEDEMBFBBBBEC ECBBCP EC -ENENEHCOBBCFEMAM ANEM EM +ENENEHCOBBCFEIAM ANEJ EM CKED EDBACB EG COBBEE ENENEF AB EC AB EM diff --git a/src/teleport.asm b/src/teleport.asm deleted file mode 100644 index 31c80525..00000000 --- a/src/teleport.asm +++ /dev/null @@ -1,106 +0,0 @@ -;;;=========================================================================;;; -;;; Copyright 2022 Matthew D. Steele ;;; -;;; ;;; -;;; This file is part of Annalog. ;;; -;;; ;;; -;;; Annalog is free software: you can redistribute it and/or modify it ;;; -;;; under the terms of the GNU General Public License as published by the ;;; -;;; Free Software Foundation, either version 3 of the License, or (at your ;;; -;;; option) any later version. ;;; -;;; ;;; -;;; Annalog is distributed in the hope that it will be useful, but WITHOUT ;;; -;;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ;;; -;;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ;;; -;;; for more details. ;;; -;;; ;;; -;;; You should have received a copy of the GNU General Public License along ;;; -;;; with Annalog. If not, see . ;;; -;;;=========================================================================;;; - -.INCLUDE "avatar.inc" -.INCLUDE "cutscene.inc" -.INCLUDE "macros.inc" -.INCLUDE "mmc3.inc" -.INCLUDE "spawn.inc" -.INCLUDE "teleport.inc" - -.IMPORT FuncA_Avatar_SpawnAtDevice -.IMPORT FuncM_SwitchPrgcAndLoadRoom -.IMPORT Func_FadeOutToBlack -.IMPORT Func_FindEmptyActorSlot -.IMPORT Func_InitActorSmokeExplosion -.IMPORT Func_SetActorCenterToPoint -.IMPORT Func_SetLastSpawnPoint -.IMPORT Func_SetPointToAvatarCenter -.IMPORT Main_Explore_EnterRoom -.IMPORT Ram_DeviceTarget_byte_arr -.IMPORTZP Zp_AvatarPose_eAvatar -.IMPORTZP Zp_Next_eCutscene - -;;;=========================================================================;;; - -.SEGMENT "PRG8" - -;;; Mode for leaving the current room via a teleporter and entering the next -;;; room. -;;; @prereq Rendering is enabled. -;;; @prereq Explore mode is already initialized. -;;; @prereq There is a Teleporter device in the current room. -.PROC Main_GoThroughTeleporter - jsr Func_FadeOutToBlack - ldx Ram_DeviceTarget_byte_arr + kTeleporterDeviceIndex ; param: eRoom - jsr FuncM_SwitchPrgcAndLoadRoom - jsr_prga FuncA_Avatar_EnterRoomViaTeleporter - jmp Main_Explore_EnterRoom -.ENDPROC - -;;;=========================================================================;;; - -.SEGMENT "PRGA_Cutscene" - -.EXPORT DataA_Cutscene_SharedTeleportOut_sCutscene -.PROC DataA_Cutscene_SharedTeleportOut_sCutscene - act_SetAvatarPose eAvatar::Hidden - act_CallFunc _MakeSmokePuff - act_WaitFrames 60 - act_JumpToMain Main_GoThroughTeleporter -_MakeSmokePuff: - jsr Func_FindEmptyActorSlot ; sets C on failure, returns X - bcs @done - jsr Func_SetPointToAvatarCenter ; preserves X - jsr Func_SetActorCenterToPoint ; preserves X - jmp Func_InitActorSmokeExplosion - @done: - rts -.ENDPROC - -.EXPORT DataA_Cutscene_SharedTeleportIn_sCutscene -.PROC DataA_Cutscene_SharedTeleportIn_sCutscene - act_WaitFrames 30 - ;; TODO: spawn a teleport zap actor - act_ContinueExploring -.ENDPROC - -;;;=========================================================================;;; - -.SEGMENT "PRGA_Avatar" - -;;; Called when entering a new room via a teleporter. Marks the entrance -;;; teleporter as the last spawn point and positions the player avatar at that -;;; teleporter. Also sets up the "teleport in" cutscene. -;;; @prereq The new room is loaded. -;;; @prereq There is a Teleporter device in the new room. -.PROC FuncA_Avatar_EnterRoomViaTeleporter - lda #bSpawn::Device | kTeleporterDeviceIndex ; param: bSpawn value - jsr Func_SetLastSpawnPoint - ldx #kTeleporterDeviceIndex ; param: device index - jsr FuncA_Avatar_SpawnAtDevice -_InitCutsceneState: - lda #eAvatar::Hidden - sta Zp_AvatarPose_eAvatar - lda #eCutscene::SharedTeleportIn - sta Zp_Next_eCutscene - rts -.ENDPROC - -;;;=========================================================================;;; diff --git a/src/tiles/terrain_teleport.ahi b/src/tiles/terrain_teleport.ahi new file mode 100644 index 00000000..ec551e80 --- /dev/null +++ b/src/tiles/terrain_teleport.ahi @@ -0,0 +1,543 @@ +ahi1 f0 p1 i60 w8 h8 + +;0;FF0;ECEEEC;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0 + +33333333 +03111111 +03111113 +03333333 +00311113 +00311113 +00333333 +00311113 + +33333333 +31111130 +31111130 +33333330 +31111300 +31111300 +33333300 +31111300 + +00311113 +00333333 +00311113 +00311113 +03333333 +03111113 +03111111 +33333333 + +31111300 +33333300 +31111300 +31111300 +33333330 +31111130 +11111130 +33333333 + +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 + +33333330 +11111113 +33333313 +33111313 +33311313 +33331313 +33333313 +33333313 + +31333333 +31333333 +31313333 +31311333 +31311133 +31333333 +31111111 +03333333 + +33333313 +33333313 +33331313 +33311313 +33111313 +33333313 +11111113 +33333330 + +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +00300000 +03330000 + +00000000 +00000000 +00000003 +00000033 +00000333 +00003333 +00033330 +00033300 + +33330000 +33333000 +33333300 +33033300 +30033330 +00003330 +00003333 +00000333 + +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000003 +00000033 + +00000000 +00000000 +00000000 +00000000 +00000000 +30000000 +33000000 +33300000 + +00000000 +00030000 +00030000 +00000003 +00000033 +00000033 +00000333 +00003330 + +00333000 +03330000 +33300000 +33000000 +30000000 +00000000 +00000000 +00000000 + +00000333 +00000033 +00000033 +00000003 +00000003 +00000000 +00000000 +00000000 + +30000000 +33000000 +33000000 +33300000 +33330000 +33330000 +03333000 +03333300 + +00000000 +00000000 +00000000 +00000000 +00000003 +00000333 +00003333 +00033333 + +00003333 +00033333 +03333330 +33333300 +33333000 +33330000 +33300000 +30000000 + +33330000 +33333000 +33333330 +00333333 +00033333 +00000333 +00000003 +00000000 + +00000000 +00000000 +00000000 +00000300 +30003300 +33000000 +33300000 +33330000 + +03003300 +03300000 +00000000 +00000000 +00000000 +00000300 +00000330 +00000000 + +00333300 +00333330 +00033333 +00033333 +00003333 +00003333 +00000333 +00000333 + +03333333 +33333330 +33333300 +33333000 +33330000 +33300000 +33000000 +30000000 + +00330000 +00000000 +00000030 +00000030 +03000000 +33000000 +00000000 +00000000 + +00000033 +00000030 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 + +00000000 +00000000 +00000000 +00000000 +00000000 +00000330 +00003330 +00003333 + +00000000 +00000000 +00000000 +00000000 +00000000 +00000003 +00000033 +00000033 + +00033333 +00333333 +03333333 +03333333 +33333333 +33333333 +33333333 +33333033 + +30000000 +30000000 +33000000 +33300000 +33300000 +33330000 +33333000 +33333000 + +00003000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +00003333 + +00000333 +00003333 +00033333 +00033333 +00333333 +03333330 +33333330 +33333300 + +33330003 +33300003 +33000000 +30000000 +00000000 +00000000 +00000000 +00000000 + +33333300 +33333300 +33333330 +03333333 +00333333 +00333333 +00033333 +00003333 + +00000000 +00000000 +00000000 +00000000 +00000000 +30000000 +33000000 +33000000 + +00000000 +00000300 +00000000 +00000000 +00000000 +00000000 +00000000 +00330000 + +30003333 +00000333 +00000003 +00000000 +00000000 +00000000 +00000000 +00000030 + +33330003 +33333333 +33333333 +03333333 +00333333 +00003333 +00000030 +00000000 + +33333000 +33330000 +33300000 +33000000 +30000000 +00000000 +00000000 +00000000 + +00000333 +00000033 +00000033 +00000003 +00000000 +00000000 +00000000 +00000000 + +33300000 +33330000 +33330000 +33333000 +33333300 +03333300 +03333330 +00333333 + +00000000 +00000003 +00000033 +00003333 +00033333 +00333330 +33333300 +33330000 + +33330000 +33300000 +33000000 +30000003 +00000000 +00000000 +03000000 +00000000 + +00033333 +00003333 +00003333 +00000333 +00000030 +00000000 +00000000 +00000000 + +33300000 +33000000 +30000000 +00000000 +00000000 +00000000 +00000000 +00000000 + +00000000 +00000000 +00000000 +00000000 +00000000 +00000030 +00000033 +00000333 + +00003333 +00003333 +00033300 +00330000 +00000000 +00000000 +00000000 +00000000 + +30000000 +33000000 +33000000 +03300000 +03300000 +00330000 +00030000 +00003000 + +00000000 +00000000 +00000000 +00000000 +00300000 +03330000 +03333000 +33033000 + +00000003 +00000003 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 + +30003300 +00000330 +00000033 +00000003 +00000000 +00000000 +00000000 +00000000 + +00000000 +00000000 +00300000 +00330000 +00033000 +00003300 +00003333 +00000333 + +00000000 +00000000 +00000000 +00300000 +03300000 +33000000 +30000000 +00000000 + +00000033 +00000030 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 + +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000030 +00000333 + +00003300 +00030000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 + +00000000 +30000000 +33000000 +03000000 +00000000 +00000000 +00000000 +00000000 + +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000003 +00000030 + +00000000 +00000000 +00000000 +00000000 +03000000 +33000000 +30030000 +00033000 + +00000000 +00000000 +00000000 +00000000 +00030000 +00033003 +00003330 +00000330 diff --git a/src/tilesets/lava.bg b/src/tilesets/lava.bg index 8ada288c..8fee3b1e 100644 --- a/src/tilesets/lava.bg +++ b/src/tilesets/lava.bg @@ -1,5 +1,5 @@ @BG 0 0 0 32x14 ->field_bg +>terrain_teleport >steam_pipes >terrain_shared_0 >terrain_shared_1 @@ -21,5 +21,5 @@ EAEBEBEAEDECEDFEEEEFEFEEEEEFEFEEEDECEDECEAEBEAEBEDECEAEBED BMBN ECEDECEDECEDECFFEGEHEHEGEHEGEGEHFAEDECFBFAEDECFBFAFBFAFBEC BOBP BBECEDBBEDECBABAEDECBFECBBECBGBABBECBABCBBECEDECBABKBJECEDECBJEC BBEDECBBBABAECEDBEBABBEDBHEDECEDBDEDECEDBGBAECBEECEDBHFBBABKBBED -BBBBEDBBBHECEDECEDECEDBBEDBE BEBABHECEDBBEBBJBJECBBEC -BBBBBFBBBABABFBEBABFECBGECBB BBEDECEDBABHECBBBGBABGBK +BBBBEDBBBHECEDECEDECEDBBEDBE ED AFECBEBABHECEDBBEBBJBJECBBEC +BBBBBFBBBABABFBEBABFECBGECBB ECAGAHEDBBEDECEDBABHECBBBGBABGBK diff --git a/src/tilesets/shadow.bg b/src/tilesets/shadow.bg index a55c1931..14a57608 100644 --- a/src/tilesets/shadow.bg +++ b/src/tilesets/shadow.bg @@ -1,6 +1,6 @@ @BG 0 0 0 32x12 >acid_anim0 ->field_bg +>terrain_teleport >lava_anim0 >shadow1 >shadow2