diff --git a/build/bg2tset.c b/build/bg2tset.c index 3b71ed53..dc752b00 100644 --- a/build/bg2tset.c +++ b/build/bg2tset.c @@ -73,8 +73,6 @@ static const struct { {0xb6, "hill"}, {0xa0, "house"}, {0x90, "hut"}, - {0x80, "hut1"}, - {0x90, "hut2"}, {0x80, "indoors"}, {0x80, "jungle1"}, {0x90, "jungle2"}, @@ -101,6 +99,10 @@ static const struct { {0xa0, "temple3"}, {0xb0, "temple4"}, {0xb0, "terrain_hoist"}, + {0x80, "terrain_hut0"}, + {0x90, "terrain_hut1"}, + {0xa0, "terrain_hut2"}, + {0xb0, "terrain_hut3"}, {0x00, "terrain_shared_0"}, {0x10, "terrain_shared_1"}, {0x40, "terrain_teleport"}, diff --git a/src/actors/breakball.asm b/src/actors/breakball.asm index 6f013c13..26f0f127 100644 --- a/src/actors/breakball.asm +++ b/src/actors/breakball.asm @@ -30,7 +30,7 @@ .IMPORT FuncA_Actor_NegateVelX .IMPORT FuncA_Actor_NegateVelY .IMPORT FuncA_Actor_PlaySfxBounce -.IMPORT FuncA_Objects_Alloc2x2Shape +.IMPORT FuncA_Objects_Draw2x2MirroredShape .IMPORT FuncA_Objects_SetShapePosToActorCenter .IMPORT Func_FindEmptyActorSlot .IMPORT Func_InitActorDefault @@ -49,7 +49,6 @@ .IMPORT Ram_ActorVelX_i16_1_arr .IMPORT Ram_ActorVelY_i16_0_arr .IMPORT Ram_ActorVelY_i16_1_arr -.IMPORT Ram_Oam_sObj_arr64 .IMPORTZP Zp_FrameCounter_u8 ;;;=========================================================================;;; @@ -208,25 +207,12 @@ _Explode: .EXPORT FuncA_Objects_DrawActorProjBreakball .PROC FuncA_Objects_DrawActorProjBreakball jsr FuncA_Objects_SetShapePosToActorCenter ; preserves X - lda #kPaletteObjBreakball ; param: object flags - jsr FuncA_Objects_Alloc2x2Shape ; preserves X, returns C and Y - bcs @done lda Zp_FrameCounter_u8 div #kProjBreakballAnimSlowdown and #$01 - add #kTileIdObjBreakballFirst - sta Ram_Oam_sObj_arr64 + .sizeof(sObj) * 0 + sObj::Tile_u8, y - sta Ram_Oam_sObj_arr64 + .sizeof(sObj) * 1 + sObj::Tile_u8, y - sta Ram_Oam_sObj_arr64 + .sizeof(sObj) * 2 + sObj::Tile_u8, y - sta Ram_Oam_sObj_arr64 + .sizeof(sObj) * 3 + sObj::Tile_u8, y - lda #kPaletteObjBreakball | bObj::FlipV - sta Ram_Oam_sObj_arr64 + .sizeof(sObj) * 1 + sObj::Flags_bObj, y - lda #kPaletteObjBreakball | bObj::FlipH - sta Ram_Oam_sObj_arr64 + .sizeof(sObj) * 2 + sObj::Flags_bObj, y - lda #kPaletteObjBreakball | bObj::FlipHV - sta Ram_Oam_sObj_arr64 + .sizeof(sObj) * 3 + sObj::Flags_bObj, y - @done: - rts + add #kTileIdObjBreakballFirst ; param: tile ID + ldy #kPaletteObjBreakball ; param: object flags + jmp FuncA_Objects_Draw2x2MirroredShape .ENDPROC ;;;=========================================================================;;; diff --git a/src/actors/jelly.asm b/src/actors/jelly.asm index 41f5544f..d5944d4d 100644 --- a/src/actors/jelly.asm +++ b/src/actors/jelly.asm @@ -20,7 +20,6 @@ .INCLUDE "../actor.inc" .INCLUDE "../cpu.inc" .INCLUDE "../macros.inc" -.INCLUDE "../oam.inc" .INCLUDE "../ppu.inc" .INCLUDE "../program.inc" .INCLUDE "jelly.inc" @@ -28,7 +27,7 @@ .IMPORT FuncA_Actor_HarmAvatarIfCollision .IMPORT FuncA_Actor_SetPointInDirFromActor .IMPORT FuncA_Actor_ZeroVel -.IMPORT FuncA_Objects_Alloc2x2Shape +.IMPORT FuncA_Objects_Draw2x2MirroredShape .IMPORT FuncA_Objects_SetShapePosToActorCenter .IMPORT Func_PointHitsTerrain .IMPORT Ram_ActorPosX_i16_0_arr @@ -41,7 +40,6 @@ .IMPORT Ram_ActorVelX_i16_1_arr .IMPORT Ram_ActorVelY_i16_0_arr .IMPORT Ram_ActorVelY_i16_1_arr -.IMPORT Ram_Oam_sObj_arr64 ;;;=========================================================================;;; @@ -165,29 +163,14 @@ _SetVelocity: ;;; @preserve X .EXPORT FuncA_Objects_DrawActorBadJelly .PROC FuncA_Objects_DrawActorBadJelly + jsr FuncA_Objects_SetShapePosToActorCenter ; preserves X lda Ram_ActorState2_byte_arr, x ; animation counter div #kBadJellyAnimSlowdown and #$03 tay - lda _TileId_arr4, y - pha - jsr FuncA_Objects_SetShapePosToActorCenter ; preserves X - lda #kPaletteObjJelly ; param: object flags - jsr FuncA_Objects_Alloc2x2Shape ; preserves X, returns C and Y - pla - bcs @done - sta Ram_Oam_sObj_arr64 + .sizeof(sObj) * 0 + sObj::Tile_u8, y - sta Ram_Oam_sObj_arr64 + .sizeof(sObj) * 1 + sObj::Tile_u8, y - sta Ram_Oam_sObj_arr64 + .sizeof(sObj) * 2 + sObj::Tile_u8, y - sta Ram_Oam_sObj_arr64 + .sizeof(sObj) * 3 + sObj::Tile_u8, y - lda #kPaletteObjJelly | bObj::FlipV - sta Ram_Oam_sObj_arr64 + .sizeof(sObj) * 1 + sObj::Flags_bObj, y - lda #kPaletteObjJelly | bObj::FlipH - sta Ram_Oam_sObj_arr64 + .sizeof(sObj) * 2 + sObj::Flags_bObj, y - lda #kPaletteObjJelly | bObj::FlipHV - sta Ram_Oam_sObj_arr64 + .sizeof(sObj) * 3 + sObj::Flags_bObj, y - @done: - rts + lda _TileId_arr4, y ; param: tile ID + ldy #kPaletteObjJelly ; param: object flags + jmp FuncA_Objects_Draw2x2MirroredShape _TileId_arr4: .byte kTileIdObjBadJellyFirst + 0 .byte kTileIdObjBadJellyFirst + 1 diff --git a/src/chr.asm b/src/chr.asm index 03ec1ffb..7c5e62f9 100644 --- a/src/chr.asm +++ b/src/chr.asm @@ -64,6 +64,7 @@ .INCLUDE "machines/carriage.inc" .INCLUDE "machines/conveyor.inc" .INCLUDE "machines/crane.inc" +.INCLUDE "machines/drums.inc" .INCLUDE "machines/emitter.inc" .INCLUDE "machines/field.inc" .INCLUDE "machines/hoist.inc" @@ -78,6 +79,7 @@ .INCLUDE "machines/rotor.inc" .INCLUDE "machines/semaphore.inc" .INCLUDE "machines/shared.inc" +.INCLUDE "machines/trombone.inc" .INCLUDE "machines/winch.inc" .INCLUDE "pause.inc" .INCLUDE "platforms/barrier.inc" @@ -550,9 +552,10 @@ _chr_begin: .EXPORT Ppu_ChrBgHut .PROC Ppu_ChrBgHut CHR1_BANK $80 - chr_inc "hut1" - chr_inc "hut2" - chr_res $26 + chr_inc "terrain_hut0" + chr_inc "terrain_hut1" + chr_inc "terrain_hut2" + chr_inc "terrain_hut3" END_CHR_BANK .ENDPROC @@ -1358,9 +1361,10 @@ _chr_begin: chr_inc "pump_light", kTileIdObjPumpLight chr_inc "platform_water", kTileIdObjPlatformWaterFirst chr_inc "bad_jelly", kTileIdObjBadJellyFirst - chr_res $02 + chr_inc "machine_trombone", kTileIdObjMachineTromboneFirst chr_inc "upgrade_opaddsub", kTileIdObjUpgradeOpAddSubFirst - chr_res $06 + chr_inc "machine_drums", kTileIdObjMachineDrumsFirst + chr_res $04 chr_inc "monitor", kTileIdObjMonitorFirst chr_inc "platform_rocks", kTileIdObjPlatformRocksFirst chr_res $02 diff --git a/src/machines/drums.inc b/src/machines/drums.inc new file mode 100644 index 00000000..b888c49e --- /dev/null +++ b/src/machines/drums.inc @@ -0,0 +1,28 @@ +;;;=========================================================================;;; +;;; 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 . ;;; +;;;=========================================================================;;; + +;;; State bytes for trombone machines: +;;; * State1: Unused. +;;; * State2: Unused. +;;; * State3: Unused. + +;;; OBJ tile IDs used for drawing trombone machines. +kTileIdObjMachineDrumsFirst = $8e + +;;;=========================================================================;;; diff --git a/src/machines/shared.asm b/src/machines/shared.asm index 04afda18..70069b05 100644 --- a/src/machines/shared.asm +++ b/src/machines/shared.asm @@ -271,10 +271,10 @@ lda Ram_MachineGoalHorz_u8_arr, y mul #kBlockHeightPx sta T2 ; goal delta - txa ; max platform left (lo) + txa ; min platform left (lo) add T2 ; goal delta sta Zp_PointX_i16 + 0 - lda T0 ; max platform left (hi) + lda T0 ; min platform left (hi) adc #0 sta Zp_PointX_i16 + 1 ;; Move the machine horizontally, as necessary. diff --git a/src/machines/trombone.inc b/src/machines/trombone.inc new file mode 100644 index 00000000..e7ced6c2 --- /dev/null +++ b/src/machines/trombone.inc @@ -0,0 +1,28 @@ +;;;=========================================================================;;; +;;; 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 . ;;; +;;;=========================================================================;;; + +;;; State bytes for trombone machines: +;;; * State1: Unused. +;;; * State2: Unused. +;;; * State3: Unused. + +;;; OBJ tile IDs used for drawing trombone machines. +kTileIdObjMachineTromboneFirst = $8a + +;;;=========================================================================;;; diff --git a/src/oam.asm b/src/oam.asm index 52864e19..431464e9 100644 --- a/src/oam.asm +++ b/src/oam.asm @@ -749,4 +749,39 @@ _FinishAllocation: rts .ENDPROC +;;; Draws a 2x2 shape centered on the current shape position, using the given +;;; tile ID for all four objects, mirroring each around the shape position. +;;; The caller can then further modify the objects if needed. +;;; @param A The tile ID to use for all four objects. +;;; @param Y The Flags_bObj value to set for the top-left object. The other +;;; three objects will be mirrored from this starting value. +;;; @return C Set if no OAM slots were allocated, cleared otherwise. +;;; @return Y The OAM byte offset for the first of the four objects. +;;; @preserve X +.EXPORT FuncA_Objects_Draw2x2MirroredShape +.PROC FuncA_Objects_Draw2x2MirroredShape + sty T3 ; object flags + sta T2 ; tile ID + lda #0 ; param: object flags + jsr FuncA_Objects_Alloc2x2Shape ; preserves X and T2+, returns C and Y + bcs @done + ;; Set tile IDs. + lda T2 ; tile ID + sta Ram_Oam_sObj_arr64 + .sizeof(sObj) * 0 + sObj::Tile_u8, y + sta Ram_Oam_sObj_arr64 + .sizeof(sObj) * 1 + sObj::Tile_u8, y + sta Ram_Oam_sObj_arr64 + .sizeof(sObj) * 2 + sObj::Tile_u8, y + sta Ram_Oam_sObj_arr64 + .sizeof(sObj) * 3 + sObj::Tile_u8, y + ;; Set object flags. + lda T3 ; object flags + sta Ram_Oam_sObj_arr64 + .sizeof(sObj) * 0 + sObj::Flags_bObj, y + eor #bObj::FlipV + sta Ram_Oam_sObj_arr64 + .sizeof(sObj) * 1 + sObj::Flags_bObj, y + eor #bObj::FlipHV + sta Ram_Oam_sObj_arr64 + .sizeof(sObj) * 2 + sObj::Flags_bObj, y + eor #bObj::FlipV + sta Ram_Oam_sObj_arr64 + .sizeof(sObj) * 3 + sObj::Flags_bObj, y + @done: + rts +.ENDPROC + ;;;=========================================================================;;; diff --git a/src/platforms/force.asm b/src/platforms/force.asm index a3ed2001..cdc55c87 100644 --- a/src/platforms/force.asm +++ b/src/platforms/force.asm @@ -18,15 +18,13 @@ ;;;=========================================================================;;; .INCLUDE "../macros.inc" -.INCLUDE "../oam.inc" .INCLUDE "../platform.inc" .INCLUDE "../ppu.inc" .INCLUDE "force.inc" -.IMPORT FuncA_Objects_Alloc2x2Shape +.IMPORT FuncA_Objects_Draw2x2MirroredShape .IMPORT FuncA_Objects_MoveShapeDownAndRightOneTile .IMPORT FuncA_Objects_SetShapePosToPlatformTopLeft -.IMPORT Ram_Oam_sObj_arr64 .IMPORT Ram_PlatformType_ePlatform_arr .IMPORTZP Zp_FrameCounter_u8 @@ -55,26 +53,13 @@ kPaletteObjForcefield = 1 and #$07 .assert kTileIdObjForcefieldFirst .mod $08 = 0, error ora #kTileIdObjForcefieldFirst - sta T2 ; tile ID - ;; Allocate the objects. + ;; Draw the objects. + pha ; tile ID jsr FuncA_Objects_SetShapePosToPlatformTopLeft ; preserves X and T0+ jsr FuncA_Objects_MoveShapeDownAndRightOneTile ; preserves X and T0+ - lda #kPaletteObjForcefield ; param: object flags - jsr FuncA_Objects_Alloc2x2Shape ; preserves X and T2+, returns C and Y - bcs @done - ;; Set tile IDs. - lda T2 ; tile ID - sta Ram_Oam_sObj_arr64 + .sizeof(sObj) * 0 + sObj::Tile_u8, y - sta Ram_Oam_sObj_arr64 + .sizeof(sObj) * 1 + sObj::Tile_u8, y - sta Ram_Oam_sObj_arr64 + .sizeof(sObj) * 2 + sObj::Tile_u8, y - sta Ram_Oam_sObj_arr64 + .sizeof(sObj) * 3 + sObj::Tile_u8, y - ;; Set object flags. - lda #kPaletteObjForcefield | bObj::FlipV - sta Ram_Oam_sObj_arr64 + .sizeof(sObj) * 1 + sObj::Flags_bObj, y - lda #kPaletteObjForcefield | bObj::FlipH - sta Ram_Oam_sObj_arr64 + .sizeof(sObj) * 2 + sObj::Flags_bObj, y - lda #kPaletteObjForcefield | bObj::FlipHV - sta Ram_Oam_sObj_arr64 + .sizeof(sObj) * 3 + sObj::Flags_bObj, y + pla ; param: tile ID + ldy #kPaletteObjForcefield ; param: object flags + jmp FuncA_Objects_Draw2x2MirroredShape @done: rts .ENDPROC diff --git a/src/program.inc b/src/program.inc index b4c14701..4ba3072d 100644 --- a/src/program.inc +++ b/src/program.inc @@ -199,6 +199,9 @@ ShadowFlowerLaser ShadowHeartEmitterX ShadowHeartEmitterY + MermaidHut6Drums + MermaidHut6Organ + MermaidHut6Trombone NUM_VALUES .ENDENUM diff --git a/src/rooms/mermaid_hut2.bg b/src/rooms/mermaid_hut2.bg index 482da345..30473a14 100644 --- a/src/rooms/mermaid_hut2.bg +++ b/src/rooms/mermaid_hut2.bg @@ -10,8 +10,8 @@ COCMCLCLCLCLCNCP COCMCLCLCLCLCLCLCNCP CB CA - CB CC - CD CA + CBBOBE BOCC + CDBBBB BACA CB AP CC CD AK CA CDBPBPAOBPBPBPBPBPCC diff --git a/src/rooms/mermaid_hut3.bg b/src/rooms/mermaid_hut3.bg index 9c2d75f8..233988fb 100644 --- a/src/rooms/mermaid_hut3.bg +++ b/src/rooms/mermaid_hut3.bg @@ -12,8 +12,8 @@ COCMCLCLCLCLCLCNCP COCMCLCLCLCLCLCLCLCNCP CB CA - CB CC - CB AP CC + CB BO BMBBCC + CBBBBB AP CC CD AK CA CDBPBPBPAMBPBPBPBPBPCC CFCGCGCGCGCGCGCGCGCGCE diff --git a/src/rooms/mermaid_hut6.asm b/src/rooms/mermaid_hut6.asm index 2051ea61..304837e1 100644 --- a/src/rooms/mermaid_hut6.asm +++ b/src/rooms/mermaid_hut6.asm @@ -20,38 +20,105 @@ .INCLUDE "../actor.inc" .INCLUDE "../charmap.inc" .INCLUDE "../device.inc" +.INCLUDE "../flag.inc" .INCLUDE "../machine.inc" +.INCLUDE "../machines/drums.inc" +.INCLUDE "../machines/trombone.inc" .INCLUDE "../macros.inc" +.INCLUDE "../oam.inc" .INCLUDE "../platform.inc" -.INCLUDE "../ppu.inc" .INCLUDE "../program.inc" .INCLUDE "../room.inc" .IMPORT DataA_Room_Hut_sTileset .IMPORT Data_Empty_sActor_arr .IMPORT FuncA_Machine_Error +.IMPORT FuncA_Machine_GenericTryMoveX +.IMPORT FuncA_Machine_GenericTryMoveY .IMPORT FuncA_Machine_GetGenericMoveSpeed +.IMPORT FuncA_Machine_PlaySfxBeep .IMPORT FuncA_Machine_ReachedGoal -.IMPORT FuncA_Machine_StartWorking -.IMPORT FuncA_Objects_DrawGirderPlatform +.IMPORT FuncA_Machine_StartWaiting +.IMPORT FuncA_Objects_Draw1x1Shape +.IMPORT FuncA_Objects_Draw2x2MirroredShape +.IMPORT FuncA_Objects_DrawPumpMachine +.IMPORT FuncA_Objects_MoveShapeDownByA +.IMPORT FuncA_Objects_MoveShapeLeftOneTile +.IMPORT FuncA_Objects_MoveShapeRightByA +.IMPORT FuncA_Objects_SetShapePosToMachineTopLeft +.IMPORT FuncA_Objects_SetShapePosToPlatformTopLeft +.IMPORT Func_MovePlatformLeftTowardPointX .IMPORT Func_MovePlatformTopTowardPointY .IMPORT Func_Noop -.IMPORT Ppu_ChrObjVillage +.IMPORT Func_PlaySfxFlopDown +.IMPORT Ppu_ChrObjSewer +.IMPORT Ram_MachineGoalHorz_u8_arr +.IMPORT Ram_MachineGoalVert_u8_arr +.IMPORT Ram_MachineSlowdown_u8_arr +.IMPORT Ram_PlatformLeft_i16_0_arr .IMPORT Ram_PlatformTop_i16_0_arr -.IMPORTZP Zp_MachineIndex_u8 +.IMPORTZP Zp_PointX_i16 .IMPORTZP Zp_PointY_i16 -.IMPORTZP Zp_RoomState ;;;=========================================================================;;; -kMachineInitPlatformTop = $90 -kMachineMoveCountdown = $10 +;;; The machine indices for the machines in this room. +kTromboneMachineIndex = 0 +kDrumsMachineIndex = 1 +kOrganMachineIndex = 2 -;;; Defines room-specific state data for this particular room. -.STRUCT sState - MachineGoalY_u8_arr .res 2 -.ENDSTRUCT -.ASSERT .sizeof(sState) <= kRoomStateSize, error +;;; The platform indices for the machines in this room. +kTrombonePlatformIndex = 0 +kTromboneSlidePlatformIndex = 1 +kDrumsPlatformIndex = 2 +kDrumsHiHatPlatformIndex = 3 +kOrganPlatformIndex = 4 + +;;;=========================================================================;;; + +;;; The initial and maximum permitted horizontal goal values for the trombone. +kTromboneInitGoalX = 0 +kTromboneMaxGoalX = 9 + +;;; How far the trombone slide moves per X register increment, in pixels. +.DEFINE kTromboneSlideStep 4 + +;;; The minimum and initial X-positions for the left of the trombone slide. +.LINECONT + +kTromboneSlideMinPlatformLeft = $006c +kTromboneSlideInitPlatformLeft = \ + kTromboneSlideMinPlatformLeft + kTromboneInitGoalX * kTromboneSlideStep +.LINECONT - + +;;;=========================================================================;;; + +;;; The initial and maximum permitted vertical goal values for the drums. +kDrumsInitGoalY = 1 +kDrumsMaxGoalY = 1 + +;;; How far the drums hi-hat moves per Y register increment, in pixels. +.DEFINE kDrumsHiHatStep 2 + +;;; The maximum and initial Y-positions for the top of the drums hi-hat. +.LINECONT + +kDrumsHiHatMaxPlatformTop = $00a5 +kDrumsHiHatInitPlatformTop = \ + kDrumsHiHatMaxPlatformTop - kDrumsInitGoalY * kDrumsHiHatStep +.LINECONT - + +;;;=========================================================================;;; + +;;; OBJ tile IDs used for drawing various parts of the machines in this room. +kTileIdObjMachineDrumsBass = kTileIdObjMachineDrumsFirst + 0 +kTileIdObjMachineDrumsHiHat = kTileIdObjMachineDrumsFirst + 1 +kTileIdObjMachineTromboneSlideMiddle = kTileIdObjMachineTromboneFirst + 0 +kTileIdObjMachineTromboneSlideEnd = kTileIdObjMachineTromboneFirst + 1 + +;;; The OBJ palette numbers used for drawing various parts of the machines in +;;; this room. +kPaletteObjDrumsBass = 0 +kPaletteObjDrumsHiHat = 0 +kPaletteObjTromboneSlide = 0 ;;;=========================================================================;;; @@ -66,9 +133,9 @@ kMachineMoveCountdown = $10 d_byte MinimapStartRow_u8, 10 d_byte MinimapStartCol_u8, 16 d_addr TerrainData_ptr, _TerrainData - d_byte NumMachines_u8, 2 + d_byte NumMachines_u8, 3 d_addr Machines_sMachine_arr_ptr, _Machines_sMachine_arr - d_byte Chr18Bank_u8, <.bank(Ppu_ChrObjVillage) + d_byte Chr18Bank_u8, <.bank(Ppu_ChrObjSewer) d_addr Ext_sRoomExt_ptr, _Ext_sRoomExt D_END _Ext_sRoomExt: @@ -87,57 +154,104 @@ _TerrainData: : .incbin "out/rooms/mermaid_hut6.room" .assert * - :- = 16 * 15, error _Machines_sMachine_arr: - ;; TODO: replace these with real machines for this room +: .assert * - :- = kTromboneMachineIndex * .sizeof(sMachine), error D_STRUCT sMachine - d_byte Code_eProgram, eProgram::GardenCrossroadLift - d_byte Breaker_eFlag, 0 - d_byte Flags_bMachine, bMachine::MoveV - d_byte Status_eDiagram, eDiagram::Lift + d_byte Code_eProgram, eProgram::MermaidHut6Trombone + d_byte Breaker_eFlag, eFlag::BreakerTemple + d_byte Flags_bMachine, bMachine::MoveH | bMachine::Act + d_byte Status_eDiagram, eDiagram::Trolley ; TODO d_word ScrollGoalX_u16, $00 - d_byte ScrollGoalY_u8, $00 - d_byte RegNames_u8_arr4, 0, 0, 0, "Y" - d_byte MainPlatform_u8, 0 - d_addr Init_func_ptr, Func_Noop - d_addr ReadReg_func_ptr, FuncC_Mermaid_Hut6Machine_ReadReg + d_byte ScrollGoalY_u8, $30 + d_byte RegNames_u8_arr4, 0, 0, "X", 0 + d_byte MainPlatform_u8, kTrombonePlatformIndex + d_addr Init_func_ptr, FuncA_Room_MermaidHut6Trombone_InitReset + d_addr ReadReg_func_ptr, FuncC_Mermaid_Hut6Trombone_ReadReg d_addr WriteReg_func_ptr, Func_Noop - d_addr TryMove_func_ptr, FuncC_Mermaid_Hut6Machine_TryMove - d_addr TryAct_func_ptr, FuncA_Machine_Error - d_addr Tick_func_ptr, FuncC_Mermaid_Hut6Machine_Tick - d_addr Draw_func_ptr, FuncA_Objects_MermaidHut6Machine_Draw - d_addr Reset_func_ptr, FuncC_Mermaid_Hut6Machine_Reset + d_addr TryMove_func_ptr, FuncA_Machine_MermaidHut6Trombone_TryMove + d_addr TryAct_func_ptr, FuncA_Machine_MermaidHut6Trombone_TryAct + d_addr Tick_func_ptr, FuncA_Machine_MermaidHut6Trombone_Tick + d_addr Draw_func_ptr, FuncC_Mermaid_Hut6Trombone_Draw + d_addr Reset_func_ptr, FuncA_Room_MermaidHut6Trombone_InitReset D_END + .assert * - :- = kDrumsMachineIndex * .sizeof(sMachine), error D_STRUCT sMachine - d_byte Code_eProgram, eProgram::PrisonCellLift - d_byte Breaker_eFlag, 0 - d_byte Flags_bMachine, bMachine::MoveV - d_byte Status_eDiagram, eDiagram::Lift + d_byte Code_eProgram, eProgram::MermaidHut6Drums + d_byte Breaker_eFlag, eFlag::BreakerGarden + d_byte Flags_bMachine, bMachine::MoveV | bMachine::Act + d_byte Status_eDiagram, eDiagram::Lift ; TODO d_word ScrollGoalX_u16, $00 - d_byte ScrollGoalY_u8, $00 + d_byte ScrollGoalY_u8, $30 d_byte RegNames_u8_arr4, 0, 0, 0, "Y" - d_byte MainPlatform_u8, 1 - d_addr Init_func_ptr, Func_Noop - d_addr ReadReg_func_ptr, FuncC_Mermaid_Hut6Machine_ReadReg + d_byte MainPlatform_u8, kDrumsPlatformIndex + d_addr Init_func_ptr, FuncA_Room_MermaidHut6Drums_InitReset + d_addr ReadReg_func_ptr, FuncC_Mermaid_Hut6Drums_ReadReg d_addr WriteReg_func_ptr, Func_Noop - d_addr TryMove_func_ptr, FuncC_Mermaid_Hut6Machine_TryMove - d_addr TryAct_func_ptr, FuncA_Machine_Error - d_addr Tick_func_ptr, FuncC_Mermaid_Hut6Machine_Tick - d_addr Draw_func_ptr, FuncA_Objects_MermaidHut6Machine_Draw - d_addr Reset_func_ptr, FuncC_Mermaid_Hut6Machine_Reset + d_addr TryMove_func_ptr, FuncA_Machine_MermaidHut6Drums_TryMove + d_addr TryAct_func_ptr, FuncA_Machine_MermaidHut6Drums_TryAct + d_addr Tick_func_ptr, FuncA_Machine_MermaidHut6Drums_Tick + d_addr Draw_func_ptr, FuncC_Mermaid_Hut6Drums_Draw + d_addr Reset_func_ptr, FuncA_Room_MermaidHut6Drums_InitReset + D_END + .assert * - :- = kOrganMachineIndex * .sizeof(sMachine), error + D_STRUCT sMachine + d_byte Code_eProgram, eProgram::MermaidHut6Organ + d_byte Breaker_eFlag, eFlag::BreakerLava + d_byte Flags_bMachine, bMachine::WriteC | bMachine::Act + d_byte Status_eDiagram, eDiagram::Multiplexer ; TODO + d_word ScrollGoalX_u16, $00 + d_byte ScrollGoalY_u8, $30 + d_byte RegNames_u8_arr4, "J", 0, 0, 0 + d_byte MainPlatform_u8, kOrganPlatformIndex + d_addr Init_func_ptr, FuncA_Room_MermaidHut6Organ_InitReset + d_addr ReadReg_func_ptr, FuncC_Mermaid_Hut6Organ_ReadReg + d_addr WriteReg_func_ptr, FuncA_Machine_MermaidHut6Organ_WriteReg + d_addr TryMove_func_ptr, FuncA_Machine_Error + d_addr TryAct_func_ptr, FuncA_Machine_MermaidHut6Organ_TryAct + d_addr Tick_func_ptr, FuncA_Machine_ReachedGoal + d_addr Draw_func_ptr, FuncC_Mermaid_Hut6Organ_Draw + d_addr Reset_func_ptr, FuncA_Room_MermaidHut6Organ_InitReset D_END + .assert * - :- <= kMaxMachines * .sizeof(sMachine), error _Platforms_sPlatform_arr: -: D_STRUCT sPlatform - d_byte Type_ePlatform, ePlatform::Solid - d_word WidthPx_u16, $10 +: .assert * - :- = kTrombonePlatformIndex * .sizeof(sPlatform), error + D_STRUCT sPlatform + d_byte Type_ePlatform, ePlatform::Zone + d_word WidthPx_u16, $08 + d_byte HeightPx_u8, $08 + d_word Left_i16, $0047 + d_word Top_i16, $0072 + D_END + .assert * - :- = kTromboneSlidePlatformIndex * .sizeof(sPlatform), error + D_STRUCT sPlatform + d_byte Type_ePlatform, ePlatform::Zone + d_word WidthPx_u16, $08 + d_byte HeightPx_u8, $08 + d_word Left_i16, kTromboneSlideInitPlatformLeft + d_word Top_i16, $0078 + D_END + .assert * - :- = kDrumsPlatformIndex * .sizeof(sPlatform), error + D_STRUCT sPlatform + d_byte Type_ePlatform, ePlatform::Zone + d_word WidthPx_u16, $08 + d_byte HeightPx_u8, $08 + d_word Left_i16, $0057 + d_word Top_i16, $00b7 + D_END + .assert * - :- = kDrumsHiHatPlatformIndex * .sizeof(sPlatform), error + D_STRUCT sPlatform + d_byte Type_ePlatform, ePlatform::Zone + d_word WidthPx_u16, $0f d_byte HeightPx_u8, $08 - d_word Left_i16, $0050 - d_word Top_i16, kMachineInitPlatformTop + d_word Left_i16, $0051 + d_word Top_i16, kDrumsHiHatInitPlatformTop D_END + .assert * - :- = kOrganPlatformIndex * .sizeof(sPlatform), error D_STRUCT sPlatform - d_byte Type_ePlatform, ePlatform::Solid - d_word WidthPx_u16, $10 + d_byte Type_ePlatform, ePlatform::Zone + d_word WidthPx_u16, $08 d_byte HeightPx_u8, $08 - d_word Left_i16, $0070 - d_word Top_i16, kMachineInitPlatformTop + d_word Left_i16, $0091 + d_word Top_i16, $0087 D_END .assert * - :- <= kMaxPlatforms * .sizeof(sPlatform), error .byte ePlatform::None @@ -145,14 +259,20 @@ _Devices_sDevice_arr: : D_STRUCT sDevice d_byte Type_eDevice, eDevice::ConsoleFloor d_byte BlockRow_u8, 11 - d_byte BlockCol_u8, 5 - d_byte Target_byte, 0 ; TODO: use constant + d_byte BlockCol_u8, 4 + d_byte Target_byte, kTromboneMachineIndex D_END D_STRUCT sDevice d_byte Type_eDevice, eDevice::ConsoleFloor d_byte BlockRow_u8, 11 d_byte BlockCol_u8, 7 - d_byte Target_byte, 1 ; TODO: use constant + d_byte Target_byte, kDrumsMachineIndex + D_END + D_STRUCT sDevice + d_byte Type_eDevice, eDevice::ConsoleFloor + d_byte BlockRow_u8, 11 + d_byte BlockCol_u8, 11 + d_byte Target_byte, kOrganMachineIndex D_END D_STRUCT sDevice d_byte Type_eDevice, eDevice::Door1Open @@ -164,68 +284,185 @@ _Devices_sDevice_arr: .byte eDevice::None .ENDPROC -.PROC FuncC_Mermaid_Hut6Machine_Reset - ldx Zp_MachineIndex_u8 - lda #0 - sta Zp_RoomState + sState::MachineGoalY_u8_arr, x +.PROC FuncC_Mermaid_Hut6Trombone_ReadReg + lda Ram_PlatformLeft_i16_0_arr + kTromboneSlidePlatformIndex + sub #<(kTromboneSlideMinPlatformLeft - kTromboneSlideStep / 2) + div #kTromboneSlideStep rts .ENDPROC -.PROC FuncC_Mermaid_Hut6Machine_ReadReg - ldx Zp_MachineIndex_u8 - lda #kMachineInitPlatformTop + kTileHeightPx - sub Ram_PlatformTop_i16_0_arr, x - div #kBlockHeightPx +.PROC FuncC_Mermaid_Hut6Drums_ReadReg + lda #<(kDrumsHiHatMaxPlatformTop + kDrumsHiHatStep / 2) + sub Ram_PlatformTop_i16_0_arr + kDrumsHiHatPlatformIndex + div #kDrumsHiHatStep rts .ENDPROC -.PROC FuncC_Mermaid_Hut6Machine_TryMove - cpx #eDir::Down - beq @moveDown - @moveUp: - ldx Zp_MachineIndex_u8 - lda Zp_RoomState + sState::MachineGoalY_u8_arr, x - bne @error - inc Zp_RoomState + sState::MachineGoalY_u8_arr, x - jmp FuncA_Machine_StartWorking - @moveDown: - ldx Zp_MachineIndex_u8 - lda Zp_RoomState + sState::MachineGoalY_u8_arr, x - beq @error - dec Zp_RoomState + sState::MachineGoalY_u8_arr, x - jmp FuncA_Machine_StartWorking - @error: - jmp FuncA_Machine_Error -.ENDPROC - -.PROC FuncC_Mermaid_Hut6Machine_Tick - ldx Zp_MachineIndex_u8 - ;; Calculate the desired Y-position for the top edge of the lift, in - ;; room-space pixels, storing it in Zp_PointY_i16. - lda Zp_RoomState + sState::MachineGoalY_u8_arr, x - mul #kBlockHeightPx ; fits in one byte - sta T0 - lda #kMachineInitPlatformTop - sub T0 - sta Zp_PointY_i16 + 0 - lda #0 - sta Zp_PointY_i16 + 1 - ;; Move the lift vertically, as necessary. - jsr FuncA_Machine_GetGenericMoveSpeed ; returns A - jsr Func_MovePlatformTopTowardPointY ; returns Z and A - beq @done +.PROC FuncC_Mermaid_Hut6Organ_ReadReg + lda Ram_MachineGoalHorz_u8_arr + kOrganMachineIndex rts +.ENDPROC + +;;; @prereq PRGA_Objects is loaded. +;;; @prereq Zp_MachineIndex_u8 and Zp_Current_sMachine_ptr are initialized. +.PROC FuncC_Mermaid_Hut6Trombone_Draw + ;; TODO: Animate horn when playing a note. +_TromboneSlide: + ldx #kTromboneSlidePlatformIndex ; param: platform index + jsr FuncA_Objects_SetShapePosToPlatformTopLeft + ldx #5 + lda #kTileIdObjMachineTromboneSlideEnd ; param: tile ID + bne @start ; unconditional + @loop: + lda #kTileIdObjMachineTromboneSlideMiddle ; param: tile ID + @start: + ldy #bObj::Pri | kPaletteObjTromboneSlide ; param: object flags + jsr FuncA_Objects_Draw1x1Shape ; preserves X + jsr FuncA_Objects_MoveShapeLeftOneTile + dex + bne @loop +_MachineLight: + jmp FuncA_Objects_DrawPumpMachine +.ENDPROC + +;;; @prereq PRGA_Objects is loaded. +;;; @prereq Zp_MachineIndex_u8 and Zp_Current_sMachine_ptr are initialized. +.PROC FuncC_Mermaid_Hut6Drums_Draw +_Drum: + lda Ram_MachineSlowdown_u8_arr + kDrumsMachineIndex + beq @done + jsr FuncA_Objects_SetShapePosToMachineTopLeft + lda #16 ; param: offset + jsr FuncA_Objects_MoveShapeRightByA + lda #1 ; param: offset + jsr FuncA_Objects_MoveShapeDownByA + lda #kTileIdObjMachineDrumsBass ; param: tile ID + ldy #kPaletteObjDrumsBass ; param: object flags + jsr FuncA_Objects_Draw2x2MirroredShape @done: - jmp FuncA_Machine_ReachedGoal +_HiHat: + ldx #kDrumsHiHatPlatformIndex ; param: platform index + jsr FuncA_Objects_SetShapePosToPlatformTopLeft + lda #kTileIdObjMachineDrumsHiHat ; param: tile ID + ldy #kPaletteObjDrumsHiHat ; param: object flags + jsr FuncA_Objects_Draw1x1Shape + lda #7 ; param: offset + jsr FuncA_Objects_MoveShapeRightByA + lda #kTileIdObjMachineDrumsHiHat ; param: tile ID + ldy #kPaletteObjDrumsHiHat | bObj::FlipH ; param: object flags + jsr FuncA_Objects_Draw1x1Shape +_MachineLight: + jmp FuncA_Objects_DrawPumpMachine +.ENDPROC + +;;; @prereq PRGA_Objects is loaded. +;;; @prereq Zp_MachineIndex_u8 and Zp_Current_sMachine_ptr are initialized. +.PROC FuncC_Mermaid_Hut6Organ_Draw +_Indicator: + ;; TODO: if machine is not halted, draw indicator light for selected pipe +_MachineLight: + jmp FuncA_Objects_DrawPumpMachine +.ENDPROC + +;;;=========================================================================;;; + +.SEGMENT "PRGA_Room" + +.PROC FuncA_Room_MermaidHut6Trombone_InitReset + lda #kTromboneInitGoalX + sta Ram_MachineGoalHorz_u8_arr + kTromboneMachineIndex + rts +.ENDPROC + +.PROC FuncA_Room_MermaidHut6Drums_InitReset + lda #kDrumsInitGoalY + sta Ram_MachineGoalVert_u8_arr + kDrumsMachineIndex + rts +.ENDPROC + +.PROC FuncA_Room_MermaidHut6Organ_InitReset + lda #2 + sta Ram_MachineGoalHorz_u8_arr + kOrganMachineIndex + rts .ENDPROC ;;;=========================================================================;;; -.SEGMENT "PRGA_Objects" +.SEGMENT "PRGA_Machine" + +.PROC FuncA_Machine_MermaidHut6Trombone_TryMove + lda #9 ; param: max goal horz + jmp FuncA_Machine_GenericTryMoveX +.ENDPROC + +.PROC FuncA_Machine_MermaidHut6Trombone_TryAct + lda Ram_MachineGoalHorz_u8_arr + kTromboneMachineIndex ; param: tone + jsr FuncA_Machine_PlaySfxBeep ; TODO: different sound for trombone + lda #$10 ; param: num frames + jmp FuncA_Machine_StartWaiting +.ENDPROC + +.PROC FuncA_Machine_MermaidHut6Trombone_Tick + ;; Calculate the desired X-position for the left edge of the slide + ;; platform, in room-space pixels, storing it in Zp_PointX_i16. + lda Ram_MachineGoalHorz_u8_arr + kTromboneMachineIndex + mul #kTromboneSlideStep + adc #kTromboneSlideMinPlatformLeft ; carry is already clear from mul + sta Zp_PointX_i16 + 1 + ;; Move the trombone slide horizontally, as necessary. + jsr FuncA_Machine_GetGenericMoveSpeed ; returns A (param: max move delta) + ldx #kTromboneSlidePlatformIndex ; param: platform index + jsr Func_MovePlatformLeftTowardPointX ; returns Z + jeq FuncA_Machine_ReachedGoal + rts +.ENDPROC + +.PROC FuncA_Machine_MermaidHut6Drums_TryMove + lda #1 ; param: max vertical goal + jsr FuncA_Machine_GenericTryMoveY + lda #$08 ; param: num frames + jmp FuncA_Machine_StartWaiting +.ENDPROC + +.PROC FuncA_Machine_MermaidHut6Drums_TryAct + jsr Func_PlaySfxFlopDown ; TODO: use kick drum sample instead + lda #$08 + sta Ram_MachineSlowdown_u8_arr + kDrumsMachineIndex + mul #2 ; param: num frames + jmp FuncA_Machine_StartWaiting +.ENDPROC + +.PROC FuncA_Machine_MermaidHut6Drums_Tick + ldx #kDrumsHiHatMaxPlatformTop - kDrumsHiHatStep + lda #1 + ldy Ram_MachineGoalVert_u8_arr + kDrumsMachineIndex + bne @move + ldx #kDrumsHiHatMaxPlatformTop + mul #2 + @move: + stx Zp_PointY_i16 + 0 + ldx #0 + stx Zp_PointY_i16 + 1 + ldx #kDrumsHiHatPlatformIndex ; param: platform index + jsr Func_MovePlatformTopTowardPointY ; returns Z + ;; TODO: when reached Y=0, play hi-hat sound + jeq FuncA_Machine_ReachedGoal + rts +.ENDPROC + +.PROC FuncA_Machine_MermaidHut6Organ_WriteReg + sta Ram_MachineGoalHorz_u8_arr + kOrganMachineIndex + rts +.ENDPROC -.PROC FuncA_Objects_MermaidHut6Machine_Draw - ldx Zp_MachineIndex_u8 ; param: platform index - jmp FuncA_Objects_DrawGirderPlatform +.PROC FuncA_Machine_MermaidHut6Organ_TryAct + lda Ram_MachineGoalHorz_u8_arr + kOrganMachineIndex ; param: tone + jsr FuncA_Machine_PlaySfxBeep ; TODO: different sound for organ + lda #$10 ; param: num frames + jmp FuncA_Machine_StartWaiting .ENDPROC ;;;=========================================================================;;; diff --git a/src/rooms/mermaid_hut6.bg b/src/rooms/mermaid_hut6.bg index a3c85cdb..608b9c19 100644 --- a/src/rooms/mermaid_hut6.bg +++ b/src/rooms/mermaid_hut6.bg @@ -9,10 +9,10 @@ COCMCLCLCNCP COCMCLCLCLCLCNCP COCMCLCLCLCLCLCLCNCP - CB CA - CB BO BO CC - CDBBBBBBBB BO BOCA - CB AP BABBBBCC - CD AK CA - CD AB AB AJ CC + CBACAD CA + CBAEAFAG BCBDBECC + CDBBBBBBBB BFBGBHCA + CB AP BMBBBBBBCC + CD BI AK CA + CDABBJBKAB AJ ABCC CFCGCGCGCGCGCGCGCGCE diff --git a/src/tiles/machine_drums.ahi b/src/tiles/machine_drums.ahi new file mode 100644 index 00000000..cb5ada6f --- /dev/null +++ b/src/tiles/machine_drums.ahi @@ -0,0 +1,21 @@ +ahi1 f0 p1 i2 w8 h8 + +0008;FF0;54;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0 + +00000000 +00000000 +00000222 +00022222 +00022222 +00222222 +00222222 +00222222 + +00000000 +00000000 +00000000 +00000002 +00000002 +00000022 +00022222 +02222222 diff --git a/src/tiles/machine_trombone.ahi b/src/tiles/machine_trombone.ahi new file mode 100644 index 00000000..bb9c3b4a --- /dev/null +++ b/src/tiles/machine_trombone.ahi @@ -0,0 +1,21 @@ +ahi1 f0 p1 i2 w8 h8 + +0008;0;54;ECEEEC;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0 + +22222222 +22222222 +12121212 +00000000 +00000000 +22222222 +22222222 +12121212 + +22222200 +22222220 +12121220 +00000220 +00000220 +22222210 +22222220 +12121200 diff --git a/src/tiles/hut1.ahi b/src/tiles/terrain_hut0.ahi similarity index 100% rename from src/tiles/hut1.ahi rename to src/tiles/terrain_hut0.ahi diff --git a/src/tiles/hut2.ahi b/src/tiles/terrain_hut1.ahi similarity index 63% rename from src/tiles/hut2.ahi rename to src/tiles/terrain_hut1.ahi index 94fb6d33..c076e4a7 100644 --- a/src/tiles/hut2.ahi +++ b/src/tiles/terrain_hut1.ahi @@ -1,4 +1,4 @@ -ahi1 f0 p1 i10 w8 h8 +ahi1 f0 p1 i16 w8 h8 000B;0;54;ECEEEC;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0 @@ -91,3 +91,57 @@ ahi1 f0 p1 i10 w8 h8 00000000 00000000 00000000 + +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 + +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 + +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 + +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 + +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 + +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 diff --git a/src/tiles/terrain_hut2.ahi b/src/tiles/terrain_hut2.ahi new file mode 100644 index 00000000..eb27a3ac --- /dev/null +++ b/src/tiles/terrain_hut2.ahi @@ -0,0 +1,147 @@ +ahi1 f0 p1 i16 w8 h8 + +0008;0;54;ECEEEC;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0 + +00000000 +00000000 +00000000 +00000000 +00000000 +00002222 +00222222 +00221212 + +00000000 +00000000 +00000000 +00000000 +00000000 +22222222 +22222222 +12121212 + +02212000 +02220000 +02210002 +02220022 +02210021 +02220021 +02212221 +02220021 + +00200000 +00200000 +22222220 +11111222 +12221122 +21112122 +21112122 +21112122 + +02210021 +02220022 +02210002 +02220000 +02212000 +00222222 +00212222 +00001212 + +12221122 +11111122 +22222222 +00200000 +00200000 +22222222 +22222222 +12121212 + +22222222 +22222222 +12121212 +00000000 +00000000 +22222222 +22222222 +12121212 + +00000020 +00000020 +00000220 +00022220 +02222220 +22222220 +22222220 +12112220 + +22222222 +22222222 +12121222 +00000022 +00000022 +22222222 +22222222 +12121222 + +02221220 +00022120 +00000210 +00000020 +00000020 +00000000 +00000000 +00000000 + +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 + +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 + +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 + +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 + +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 + +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 diff --git a/src/tiles/terrain_hut3.ahi b/src/tiles/terrain_hut3.ahi new file mode 100644 index 00000000..52534f1e --- /dev/null +++ b/src/tiles/terrain_hut3.ahi @@ -0,0 +1,147 @@ +ahi1 f0 p1 i16 w8 h8 + +0008;0;54;ECEEEC;FF0;FF0;982220;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0 + +20200000 +22100000 +22202020 +22102210 +22202220 +22102210 +22202220 +22102210 + +00000000 +00000000 +00000000 +00000000 +20200000 +22100000 +22202020 +22102210 + +22202220 +22102210 +22202220 +22102210 +22202220 +22102210 +22202220 +22102210 + +22222222 +11111111 +22222222 +21222122 +21222122 +22222222 +11111111 +22222222 + +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +00000000 +02222222 + +22222222 +11111112 +22222212 +21222122 +21222122 +22222212 +11111112 +22222220 + +22111111 +21122211 +21211121 +21211121 +21211121 +21122211 +22111111 +02222222 + +20000000 +20000000 +20000000 +20000000 +20000000 +20000002 +20000002 +22222202 + +00000002 +00000021 +00000021 +00000021 +00000221 +00002021 +00002021 +00020002 + +11111222 +12221122 +21112122 +21112121 +21112121 +12221121 +11111221 +22222202 + +00000000 +00000000 +00000000 +00000000 +00000000 +00222222 +00002222 +00000002 + +00000000 +00000000 +00000000 +20000000 +20000000 +22222220 +22222000 +22000000 + +00002222 +00221111 +02111222 +21122222 +21222222 +11222222 +12222222 +12222222 + +22000000 +11220000 +21112000 +22211200 +22221200 +22221120 +22222120 +22222120 + +12222222 +12222222 +11222222 +21222222 +21122222 +12111222 +22221111 +22002222 + +22222120 +22222120 +22221120 +22221200 +22211200 +21112000 +11222200 +22002220 diff --git a/src/tilesets/hut.bg b/src/tilesets/hut.bg index 6199682a..76d0a915 100644 --- a/src/tilesets/hut.bg +++ b/src/tilesets/hut.bg @@ -1,13 +1,15 @@ @BG 0 0 0 32x10 ->hut1 ->hut2 +>terrain_hut0 +>terrain_hut1 +>terrain_hut2 +>terrain_hut3 >terrain_shared_0 >water_anim0 - CMCN AIAJ DEDFACADDEDFAEAF - COCP AIAJAEAFAAABAIAJACADAGAHAGAH -BIBJBJBJ BABA DADA - BCBD + EMEN CCCD CJ AIAJ FEFFACADFEFFAEAF + EOEPCACBCBCHCECFCGCGCGCI AIAJAEAFAAABAIAJACADAGAHAGAH +BIBJBJBJ DADB DEDCDCDCDCDA DHDMDN BIBABA FAFA + DCDCDADB DGDDDDDDDDDFDKDLDIDJDODP BCBD