aboutsummaryrefslogtreecommitdiff
path: root/map/dungeons.gbasm
diff options
context:
space:
mode:
Diffstat (limited to 'map/dungeons.gbasm')
-rw-r--r--map/dungeons.gbasm59
1 files changed, 59 insertions, 0 deletions
diff --git a/map/dungeons.gbasm b/map/dungeons.gbasm
new file mode 100644
index 0000000..dde998a
--- /dev/null
+++ b/map/dungeons.gbasm
@@ -0,0 +1,59 @@
+Load_Dungeon: ; pointer to Dungeon struct in HL
+ LD A, (HL+)
+ LD B, A
+ LD A, (HL+)
+ LD C, A
+
+ PUSH HL
+ PUSH BC
+ LD H, B
+ LD L, C
+
+ CALL =strlen
+ LD B, A
+
+ LD A, $14
+ SUB B
+ SRA A
+
+ LD HL, $9e80
+ ADD L
+ LD L, A
+ LD A, H
+ ADC $00
+ LD H, A
+ POP BC
+ CALL =Print_str
+
+ POP HL
+
+ INC HL
+
+ ; TODO FIX THE THING WHEN THERE'S MORE THAN 256/7 FLOORS
+ LD A, $mem_floor_count
+ LD C, A
+ LD B, $07
+ CALL =MUL
+ LD C, A
+ LD B, (HL)
+ CALL =MUL
+ DBG
+ CALL =RNG_Step
+ AND $01
+ ADD E
+ DBG
+
+ RET
+
+Dungeon:
+ .name: .DB =Dungeon_Name_1_Txt
+ .max_floor: .DB 0x0a, inv(0x0a)
+ .spawning_patterns:
+ .DB $02, $02, $02, $05, 0b10000000
+ .DB $02, $02, $03, $05, 0b11000100
+ .DB $02, $02, $00, $05, 0b11110100
+ .DB $00, $02, $03, $05, 0b10111000
+ .DB $02, $02, $00, $05, 0b11111100
+ .DB $02, $00, $03, $05, 0b11111000
+ .DB $00, $00, $03, $05, 0b11111000
+ .DB $00, $00, $03, $05, 0b11111100