; generates a new set of seeds
; and places them into map_seeds
mapgen_seed:
+ ld hl, map_seeds
+ ; 2 bytes per seed
+ ld b, FLOOR_MAP_COUNT*2
+
+@loop:
+ push hl
+ call rand
+ pop hl
+ ld [hl+], a
+ dec b
+ jr nz, @loop REL
+
ret
; places a rectangular room
; list of seeds used
; for the current maps
; fill using mapgen_seed
+ ; the seeds will be accessed via the map's
+ ; seed index
map_seeds: .adv FLOOR_MAP_COUNT * 2
; map tiles and collision data
tile_bank3 = "bank9000"
exit_table = "map_c_exit_table"
actor_table_ptr = "map_actor_table_null"
-map_seed_index = "0"
+map_seed_index = 0
map_name = "noname"
NAME_LEN = 8
print("dw " + tile_bank2)
print("dw " + tile_bank3)
print("dw " + exit_table)
- print("dw " + map_seed_index)
+ print("dw " + str(map_seed_index))
print("")
def get_flag(tile):
elif name == 'exit_table':
exit_table = value
elif name == 'seed_index':
- seed_index = int(value)
+ map_seed_index = int(value)
return