mapgen: fixed typo
authorLukas Krickl <lukas@krickl.dev>
Tue, 16 Sep 2025 07:05:25 +0000 (09:05 +0200)
committerLukas Krickl <lukas@krickl.dev>
Tue, 16 Sep 2025 07:05:25 +0000 (09:05 +0200)
src/mapgen.s

index 1c6fe7719337a719e33baba79ae3dac6c673d7c9..c1ed69918df15b1138b575faa2aac58d337ff73b 100644 (file)
@@ -523,7 +523,7 @@ mapgen_place_actors:
 
                ; move to next actor table entry
                push hl
-               call mapgent_unit_randomize_position
+               call mapgen_unit_randomize_position
                ld hl, act_size
                add hl, de
                push hl
@@ -540,7 +540,7 @@ mapgen_place_actors:
        ; inputs:
        ;               de: actor table entry
        ; preserves all registers
-mapgent_unit_randomize_position:
+mapgen_unit_randomize_position:
        push_all
 @retry:
        ld hl, act_pos_y
@@ -552,7 +552,7 @@ mapgent_unit_randomize_position:
        and a, MAP_H - 1
        ld b, a
        call rand
-       and a, MAP_H - 1
+       and a, MAP_W - 1
        ld c, a
        ; bc = y/x