Skip to content

Commit

Permalink
Add diagram for blaster machines
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsteele committed May 9, 2024
1 parent e24f285 commit c94ff0f
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/chr.asm
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,8 @@ _chr_begin:
chr_res $10
.assert .bank(*) = kChrBankDiagramRotor, error
chr_inc "diagram_rotor", kTileIdBgDiagramRotorFirst
chr_res $10
.assert .bank(*) = kChrBankDiagramBlaster, error
chr_inc "diagram_blaster", kTileIdBgDiagramBlasterFirst
END_CHR_BANK
.ENDPROC

Expand Down
3 changes: 3 additions & 0 deletions src/diagram.asm
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
.INCLUDE "charmap.inc"
.INCLUDE "machine.inc"
.INCLUDE "machines/ammorack.inc"
.INCLUDE "machines/blaster.inc"
.INCLUDE "machines/boiler.inc"
.INCLUDE "machines/bridge.inc"
.INCLUDE "machines/cannon.inc"
Expand Down Expand Up @@ -76,6 +77,7 @@ kNoPowerWidthTiles = 19
.PROC DataA_Console_DiagramBank_u8_arr
D_ARRAY .enum, eDiagram
d_byte AmmoRack, kChrBankDiagramAmmoRack
d_byte Blaster, kChrBankDiagramBlaster
d_byte Boiler, kChrBankDiagramBoiler
d_byte BridgeLeft, kChrBankDiagramBridgeLeft
d_byte BridgeRight, kChrBankDiagramBridgeRight
Expand Down Expand Up @@ -112,6 +114,7 @@ kNoPowerWidthTiles = 19
.PROC DataA_Console_DiagramFirstTileId_u8_arr
D_ARRAY .enum, eDiagram
d_byte AmmoRack, kTileIdBgDiagramAmmoRackFirst
d_byte Blaster, kTileIdBgDiagramBlasterFirst
d_byte Boiler, kTileIdBgDiagramBoilerFirst
d_byte BridgeLeft, kTileIdBgDiagramBridgeLeftFirst
d_byte BridgeRight, kTileIdBgDiagramBridgeRightFirst
Expand Down
1 change: 1 addition & 0 deletions src/machine.inc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ kMachineRegNameB = $61 ; 'B'
;;; Diagrams for various kinds of machines.
.ENUM eDiagram
AmmoRack
Blaster
Boiler
BridgeLeft
BridgeRight
Expand Down
6 changes: 6 additions & 0 deletions src/machines/blaster.inc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ kBlasterMachineHeightPx = $10
;;; The number of frames between mirror angles when animating a blaster mirror.
.DEFINE kBlasterMirrorAnimSlowdown 2

;;; The CHR bank number containing the diagram for blaster machines.
kChrBankDiagramBlaster = $0f

;;; BG tile IDs for blaster machine diagrams.
kTileIdBgDiagramBlasterFirst = $f0

;;; OBJ tile IDs used for drawing blaster machines.
kTileIdObjBlasterFirst = $98
kTileIdObjMirrorFirst = $d0
Expand Down
2 changes: 1 addition & 1 deletion src/rooms/boss_lava.asm
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ _Machines_sMachine_arr:
d_byte Code_eProgram, eProgram::BossLavaBlaster
d_byte Breaker_eFlag, 0
d_byte Flags_bMachine, bMachine::MoveH | bMachine::Act | bMachine::WriteCD
d_byte Status_eDiagram, eDiagram::LauncherDown ; TODO
d_byte Status_eDiagram, eDiagram::Blaster
d_word ScrollGoalX_u16, $00
d_byte ScrollGoalY_u8, $00
d_byte RegNames_u8_arr4, "L", "R", "X", "D"
Expand Down
4 changes: 1 addition & 3 deletions src/rooms/core_boss.asm
Original file line number Diff line number Diff line change
Expand Up @@ -323,10 +323,8 @@ _Machines_sMachine_arr:
D_STRUCT sMachine
d_byte Code_eProgram, eProgram::CoreBossBlaster
d_byte Breaker_eFlag, 0
.linecont +
d_byte Flags_bMachine, bMachine::MoveH | bMachine::Act | bMachine::WriteC
.linecont -
d_byte Status_eDiagram, eDiagram::LauncherDown ; TODO
d_byte Status_eDiagram, eDiagram::Blaster
d_word ScrollGoalX_u16, $0110
d_byte ScrollGoalY_u8, $00
d_byte RegNames_u8_arr4, "M", 0, "X", 0
Expand Down
2 changes: 1 addition & 1 deletion src/rooms/lava_center.asm
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ _Machines_sMachine_arr:
d_byte Code_eProgram, eProgram::LavaCenterBlaster
d_byte Breaker_eFlag, 0
d_byte Flags_bMachine, bMachine::MoveH | bMachine::Act | bMachine::WriteCD
d_byte Status_eDiagram, eDiagram::LauncherDown ; TODO
d_byte Status_eDiagram, eDiagram::Blaster
d_word ScrollGoalX_u16, $0010
d_byte ScrollGoalY_u8, $00
d_byte RegNames_u8_arr4, "M", "L", "X", 0
Expand Down
2 changes: 1 addition & 1 deletion src/rooms/lava_east.asm
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ _Machines_sMachine_arr:
d_byte Code_eProgram, eProgram::LavaEastBlaster
d_byte Breaker_eFlag, 0
d_byte Flags_bMachine, bMachine::MoveH | bMachine::Act | bMachine::WriteCDF
d_byte Status_eDiagram, eDiagram::LauncherDown ; TODO
d_byte Status_eDiagram, eDiagram::Blaster
d_word ScrollGoalX_u16, $090
d_byte ScrollGoalY_u8, $00
d_byte RegNames_u8_arr4, "M", "U", "X", "L"
Expand Down
36 changes: 36 additions & 0 deletions src/tiles/diagram_blaster.ahi
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
ahi1 f0 p1 i1 w32 h32

0;FF0;FF0;ECEEEC;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0;FF0

00000000000000000000000000000000
00330030000300033033303330330000
00303030003030300003003000303000
00330030003330030003003300330000
00303030003030003003003000303000
00330033303030330003003330303000
00000000000000000000000000000000
00000000000000000000000000000000
00000000003333333333330000000000
00000000030000000000003000000000
00030000030330000033003000003000
00300000030300000300303000000300
03333330030000000300303003333330
00300000030000000033003000000300
00030000030000000000003000003000
00000000033333033033333000000000
00000000000003000030000000000000
00000000003003000030030000000000
00000000003003000030030000000000
00000000003003300330030000003000
00000000003303333330330000003000
00000000000003000030000000030300
00000000000000033000000000030300
00000000000000000000000000333330
00300300300000033000000000330330
03303303000000000000000003333333
03000303300003033000000000000000
00000000000003300000000000033000
00000030000000333030303030300300
00000033333300033030303030300300
00000000000000303300000000033000
00000000000000330330000000000000

0 comments on commit c94ff0f

Please sign in to comment.