tangled
alpha
login
or
join now
cass.cityboundforest.com
/
pathdelver
0
fork
atom
A dungeon delver roguelike using Pathfinder 2nd edition rules
0
fork
atom
overview
issues
pulls
pipelines
Dungeon generation algorithm is a go
cass.cityboundforest.com
1 year ago
53a48c32
6c138eac
+10
-6
2 changed files
expand all
collapse all
unified
split
gb
src
dungeon.asm
main.asm
+6
-2
gb/src/dungeon.asm
···
29
29
; Starting Width: B
30
30
; Starting Height: C
31
31
; Dungeon Area: D
32
32
-
; Two Thirds Dungeon Area: E
32
32
+
; Three Fourths Dungeon Area: E
33
33
InitDungeon::
34
34
ld a, b ; wCurrentWidth = REG_B
35
35
ld [wCurrentWidth], a
···
157
157
inc c ; REG_C += 1
158
158
jp .LoopCheck ; LOOP
159
159
.LoopSkip
160
160
+
; wCurrentRoom = wEntrance
161
161
+
ld hl, wEntrance
162
162
+
ld a, [hl]
163
163
+
ld [wCurrentRoom], a
160
164
ret
161
165
162
166
GenerateRoom::
···
335
339
call Modulo
336
340
pop bc
337
341
cp 0
338
338
-
jp nc, .FuncEnd ; RETURN
342
342
+
jp c, .FuncEnd ; RETURN
339
343
jp z, .FuncEnd
340
344
ret
341
345
.Body5
+4
-4
gb/src/main.asm
···
25
25
call srand
26
26
27
27
; Initialize Dungeon
28
28
-
ld b, 6
29
29
-
ld c, 6
30
30
-
ld d, 36
31
31
-
ld e, 27
28
28
+
ld b, 15 ; Starting Width
29
29
+
ld c, 15 ; Starting Height
30
30
+
ld d, 225 ; W * H
31
31
+
ld e, 168 ; W * H * 0.75
32
32
call InitDungeon
33
33
call GenerateDungeon
34
34