A dungeon delver roguelike using Pathfinder 2nd edition rules

Removing previous code

-2001
-5
.gitignore
··· 1 - *.gbc 2 - *.gb 3 - *.gba 4 - *.sav 5 - .vscode
-3
.gitmodules
··· 1 - [submodule "gb/include/hardware.inc"] 2 - path = gb/include/hardware.inc 3 - url = https://github.com/gbdev/hardware.inc
-3
gb/.gitignore
··· 1 - obj/ 2 - bin/ 3 - src/generated/
-102
gb/Makefile
··· 1 - include project.mk 2 - 3 - SRCDIR = src 4 - OBJDIR = obj 5 - BINDIR = bin 6 - LIBDIR = libs 7 - RESDIR = $(SRCDIR)/resources 8 - ASMDIR = $(SRCDIR)/main 9 - RESSPRITES = $(RESDIR)/sprites 10 - RESBACKGROUNDS = $(RESDIR)/backgrounds 11 - GENDIR = $(SRCDIR)/generated 12 - GENSPRITES = $(GENDIR)/sprites 13 - GENBACKGROUNDS = $(GENDIR)/backgrounds 14 - BINS = $(BINDIR)/$(ROMNAME).$(ROMEXT) 15 - 16 - RGBDS ?= 17 - ASM := $(RGBDS)rgbasm 18 - LINK := $(RGBDS)rgblink 19 - FIX := $(RGBDS)rgbfix 20 - GFX := $(RGBDS)rgbgfx 21 - 22 - INCLUDEDIRS = include/ 23 - WARNINGS = all extra 24 - ASMFLAGS := -p $(PADVALUE) $(addprefix -I,$(INCLUDEDIRS)) $(addprefix -W,$(WARNINGS)) 25 - LINKFLAGS := -p $(PADVALUE) 26 - FIXFLAGS := -v -p $(PADVALUE) -i "$(GAMEID)" -k "$(LICENSEE)" -l $(OLDLIC) -m $(MBC) -n $(VERSION) -r $(SRAMSIZE) -t $(TITLE) 27 - 28 - # https://stackoverflow.com/a/18258352 29 - # Make does not offer a recursive wild card function, so here's one: 30 - rwildcard = $(foreach d,\ 31 - $(wildcard $(1:=/*)), \ 32 - $(call rwildcard,$d,$2) $(filter $(subst *,%,$2),$d) \ 33 - ) 34 - 35 - # https://stackoverflow.com/a/16151140 36 - # This makes it so every entry in a space-delimited list appears only once 37 - unique = $(if $1,\ 38 - $(firstword $1) $(call unique,$(filter-out $(firstword $1),$1)) \ 39 - ) 40 - 41 - ASMSOURCES_COLLECTED = $(call rwildcard,$(ASMDIR),*.asm) $(call rwildcard,$(LIBDIR),*.asm) 42 - OBJS = $(patsubst %.asm,$(OBJDIR)/%.o,$(notdir $(ASMSOURCES_COLLECTED))) $(OBJDIR)/build_date.o 43 - 44 - all: $(BINS) 45 - 46 - NEEDED_GRAPHICS = \ 47 - $(GENBACKGROUNDS)/title.tilemap \ 48 - $(GENBACKGROUNDS)/text-font.2bpp 49 - 50 - GRAPHICS_DIR = $(GENDIR)/graphics 51 - GRAPHICS_CODE = $(call rwildcard,$(GRAPHICS_DIR),*.asm) 52 - GRAPHICS_OBJS = $(patsubst %.asm,$(OBJDIR)/%.o,$(notdir $(GRAPHICS_CODE))) 53 - 54 - test: 55 - echo 56 - 57 - $(GENSPRITES)/%.2bpp: $(RESSPRITES)/%.png | $(GENSPRITES) 58 - $(GFX) -c '#fff,#cfcfcf,#686868,#000;' --columns -o $@ $< 59 - 60 - $(GENBACKGROUNDS)/%.2bpp: $(RESBACKGROUNDS)/%.png | $(GENBACKGROUNDS) 61 - $(GFX) -c '#fff,#9fa29f,#545654,#000;' -o $@ $< 62 - 63 - $(GENBACKGROUNDS)/%.tilemap: $(RESBACKGROUNDS)/%.png | $(GENBACKGROUNDS) 64 - $(GFX) -c '#fff,#9fa29f,#545654,#000;' \ 65 - --tilemap $@ \ 66 - --unique-tiles \ 67 - -o $(GENBACKGROUNDS)/$*.2bpp \ 68 - $< 69 - 70 - ASMSOURCES_DIRS = $(patsubst %,%%.asm,\ 71 - $(call unique,$(dir $(ASMSOURCES_COLLECTED))) \ 72 - ) 73 - 74 - define object-from-asm 75 - $(OBJDIR)/%.o: $1 | $(OBJDIR) $(NEEDED_GRAPHICS) 76 - $$(ASM) $$(ASMFLAGS) -o $$@ $$< 77 - endef 78 - 79 - $(foreach i, $(ASMSOURCES_DIRS), $(eval $(call object-from-asm,$i))) 80 - 81 - $(eval $(call object-from-asm,$(GRAPHICS_DIR)/%.asm)) 82 - 83 - $(BINS): $(OBJS) $(GRAPHICS_OBJS) | $(BINDIR) 84 - $(LINK) $(LINKFLAGS) -m $(@:.gb=.map) -n $(@:.gb=.sym) -o $@ $^ 85 - $(FIX) $(FIXFLAGS) $@ 86 - 87 - $(OBJDIR)/build_date.o: $(SRCDIR)/assets/build_date.asm | $(OBJDIR) 88 - $(ASM) $(ASMFLAGS) -o $@ $^ 89 - 90 - define ensure-directory 91 - $1: 92 - mkdir -p $$@ 93 - endef 94 - 95 - PREPARE_DIRECTORIES = $(OBJDIR) $(GENSPRITES) $(GENBACKGROUNDS) $(BINDIR) 96 - 97 - $(foreach i, $(PREPARE_DIRECTORIES), $(eval $(call ensure-directory,$i))) 98 - 99 - clean: 100 - rm -rfv $(PREPARE_DIRECTORIES) 101 - 102 - .PHONY: clean all test
-39
gb/libs/input.asm
··· 1 - INCLUDE "hardware.inc/hardware.inc" 2 - 3 - SECTION "Input", ROM0 4 - 5 - Input:: 6 - ; Poll half the controller 7 - ld a, P1F_GET_BTN 8 - call .onenibble 9 - ld b, a ; B7-4 = 1; B3-0 = unpressed buttons 10 - 11 - ; Poll the other half 12 - ld a, P1F_GET_DPAD 13 - call .onenibble 14 - swap a ; A3-0 = unpressed directions; A7-4 = 1 15 - xor a, b ; A = pressed buttons + directions 16 - ld b, a ; B = pressed buttons + directions 17 - 18 - ; And release the controller 19 - ld a, P1F_GET_NONE 20 - ldh [rP1], a 21 - 22 - ; Combine with previous wCurKeys to make wNewKeys 23 - ld a, [wCurKeys] 24 - xor a, b ; A = keys that changed state 25 - and a, b ; A = keys that changed to presed 26 - ld [wNewKeys], a 27 - ld a, b 28 - ld [wCurKeys], a 29 - ret 30 - 31 - .onenibble 32 - ldh [rP1], a ; switch the key matrix 33 - call .knownret ; burn 10 cycles calling a known ret 34 - ldh a, [rP1] ; ignore value while waiting for the key matrix to settle 35 - ldh a, [rP1] 36 - ldh a, [rP1] ; this read counts 37 - or a, $f0 ; A7-4 = 1; A3-0 = unpressed keys 38 - .knownret 39 - ret
-10
gb/project.mk
··· 1 - PADVALUE := 0xFF 2 - VERSION := 0 3 - GAMEID := DNGR 4 - TITLE := Dungeoner 5 - LICENSEE := HB 6 - OLDLIC := 0x33 7 - MBC := 0x00 8 - SRAMSIZE := 0x00 9 - ROMNAME := dungeoner 10 - ROMEXT := gb
gb/res/img/cleric_down.png

This is a binary file and will not be displayed.

gb/res/img/cleric_left.png

This is a binary file and will not be displayed.

gb/res/img/cleric_up.png

This is a binary file and will not be displayed.

gb/res/img/dungeon_tiles.gbr

This is a binary file and will not be displayed.

-9
gb/res/img/dungeon_tiles_floor_indices.txt
··· 1 - 0 Blank 2 - 1 NW 3 - 2 N 4 - 3 NE 5 - 4 E 6 - 5 SE 7 - 6 S 8 - 7 SW 9 - 8 W
-48
gb/res/img/dungeon_tiles_walls_indices.txt
··· 1 - 0 Stair Down 0,0 0x00 2 - 1 Stair Down 1,0 0x01 3 - 2 Stair Up 0,0 0x02 4 - 3 Stair Up 1,0 0x03 5 - 4 West Wall 0,0 0x04 6 - 5 West Wall 1,0 0x05 7 - 6 Middle Wall 0,0 0x06 8 - 7 Middle Wall 1,0 0x07 9 - 8 East Wall 0,0 0x08 10 - 9 East Wall 1,0 0x09 11 - 10 Door 0,0 0x0a 12 - 11 Door 1,0 0x0b 13 - 12 Stair Down 0,1 0x0c 14 - 13 Stair Down 1,1 0x0d 15 - 14 Stair Up 0,1 0x0e 16 - 15 Stair Up 1,1 0x0f 17 - 16 West Wall 0,1 0x10 18 - 17 West Wall 1,1 0x11 19 - 18 Middle Wall 0,1 0x12 20 - 19 Middle Wall 1,1 0x13 21 - 20 East Wall 0,1 0x14 22 - 21 East Wall 1,1 0x15 23 - 22 Door 0,1 0x16 24 - 23 Door 1,1 0x17 25 - 24 Stair Down 0,2 0x18 26 - 25 Stair Down 1,2 0x19 27 - 26 Stair Up 0,2 0x1a 28 - 27 Stair Up 1,2 0x1b 29 - 28 West Wall 0,2 0x1c 30 - 29 West Wall 1,2 0x1d 31 - 30 Middle Wall 0,2 0x1e 32 - 31 Middle Wall 1,2 0x1f 33 - 32 East Wall 0,2 0x20 34 - 33 East Wall 1,2 0x21 35 - 34 Door 0,2 0x22 36 - 35 Door 1,2 0x23 37 - 36 Stair Down 0,3 0x24 38 - 37 Stair Down 1,3 0x25 39 - 38 Stair Up 0,3 0x26 40 - 39 Stair Up 1,3 0x27 41 - 40 West Wall 0,3 0x28 42 - 41 West Wall 1,3 0x29 43 - 42 Middle Wall 0,3 0x2a 44 - 43 Middle Wall 1,3 0x2b 45 - 44 East Wall 0,3 0x2c 46 - 45 East Wall 1,3 0x2d 47 - 46 Door 0,3 0x2e 48 - 47 Door 1,3 0x2f
gb/res/img/fighter_down.png

This is a binary file and will not be displayed.

gb/res/img/fighter_left.png

This is a binary file and will not be displayed.

gb/res/img/fighter_up.png

This is a binary file and will not be displayed.

gb/res/img/goblin_down.png

This is a binary file and will not be displayed.

gb/res/img/goblin_left.png

This is a binary file and will not be displayed.

gb/res/img/goblin_up.png

This is a binary file and will not be displayed.

-4
gb/res/img/palette.txt
··· 1 - #c9c4c9 2 - #8e8d95 3 - #7b7382 4 - #000000
gb/res/img/rogue_down.png

This is a binary file and will not be displayed.

gb/res/img/rogue_left.png

This is a binary file and will not be displayed.

gb/res/img/rogue_up.png

This is a binary file and will not be displayed.

gb/res/img/window_tiles.gbr

This is a binary file and will not be displayed.

gb/res/img/window_tiles.png

This is a binary file and will not be displayed.

gb/res/img/wizard_down.png

This is a binary file and will not be displayed.

gb/res/img/wizard_left.png

This is a binary file and will not be displayed.

gb/res/img/wizard_up.png

This is a binary file and will not be displayed.

gb/res/room.tilemap

This is a binary file and will not be displayed.

-1
gb/res/window.tilemap
··· 1 - _``````````````````af^^^^^^^^^^^^^^^^^^bf^^^^^^^^^^^^^^^^^^beddddddddddddddddddc
-5
gb/src/assets/build_date.asm
··· 1 - SECTION "Build date", ROM0 2 - db "Built " 3 - BuildDate:: 4 - db __ISO_8601_UTC__ 5 - db 0
-142
gb/src/generated/graphics/dungeon_tiles.asm
··· 1 - ; DUNGEON_TILES_FLOOR_TILES.Z80 2 - ; 3 - ; Tile Source File. 4 - ; 5 - ; Info: 6 - ; Section : DungeonTileData 7 - ; Bank : 0 8 - ; Form : All tiles as one unit. 9 - ; Format : Gameboy 4 color. 10 - ; Compression : None. 11 - ; Counter : None. 12 - ; Tile size : 8 x 8 13 - ; Tiles : 0 to 56 14 - ; 15 - ; Palette colors : None. 16 - ; SGB Palette : None. 17 - ; CGB Palette : None. 18 - ; 19 - ; Convert to metatiles : No. 20 - ; 21 - ; This file was generated by GBTD v2.2 22 - 23 - SECTION "DungeonTileData", ROM0 24 - 25 - ; Start of tile array. 26 - dungeon_tiles:: 27 - DB $00,$00,$00,$00,$00,$00,$00,$00 28 - DB $00,$00,$00,$00,$00,$00,$00,$00 29 - DB $00,$FF,$4C,$80,$04,$80,$18,$80 30 - DB $08,$80,$50,$80,$30,$80,$00,$80 31 - DB $00,$FF,$66,$00,$10,$00,$00,$00 32 - DB $00,$00,$00,$00,$00,$00,$00,$00 33 - DB $00,$FF,$22,$01,$40,$01,$68,$01 34 - DB $1A,$01,$06,$01,$00,$01,$00,$01 35 - DB $00,$01,$02,$01,$02,$01,$04,$01 36 - DB $00,$01,$02,$01,$02,$01,$00,$01 37 - DB $00,$01,$0C,$01,$0A,$01,$10,$01 38 - DB $18,$01,$20,$01,$32,$01,$00,$FF 39 - DB $00,$00,$00,$00,$00,$00,$00,$00 40 - DB $00,$00,$08,$00,$66,$00,$00,$FF 41 - DB $00,$80,$00,$80,$60,$80,$58,$80 42 - DB $16,$80,$02,$80,$44,$80,$00,$FF 43 - DB $00,$80,$40,$80,$40,$80,$00,$80 44 - DB $20,$80,$40,$80,$40,$80,$00,$80 45 - DB $80,$7F,$00,$FF,$1F,$FF,$3F,$FF 46 - DB $3F,$FF,$3F,$FF,$3F,$FF,$7F,$FF 47 - DB $01,$FE,$00,$FF,$F8,$FF,$FC,$FF 48 - DB $FC,$FF,$FC,$FF,$FE,$FF,$FC,$FF 49 - DB $80,$7F,$00,$FF,$1F,$FF,$3F,$FF 50 - DB $3F,$FF,$3F,$FF,$3F,$FF,$7F,$FF 51 - DB $01,$FE,$00,$FF,$F8,$FF,$F0,$FF 52 - DB $FC,$FF,$C0,$FF,$82,$FF,$F8,$FF 53 - DB $1F,$E0,$1F,$E0,$1F,$E0,$1F,$E0 54 - DB $3F,$C0,$3F,$C0,$3F,$C0,$20,$DF 55 - DB $BF,$40,$BF,$40,$BF,$40,$BF,$40 56 - DB $BF,$40,$BF,$40,$BF,$40,$20,$DF 57 - DB $FE,$01,$FE,$01,$FE,$01,$FE,$01 58 - DB $FE,$01,$FE,$01,$FE,$01,$00,$FF 59 - DB $FF,$00,$FF,$00,$FF,$00,$FF,$00 60 - DB $FF,$00,$FF,$00,$0F,$F0,$00,$FF 61 - DB $FE,$01,$FE,$01,$FE,$01,$FF,$00 62 - DB $FF,$00,$FF,$00,$F0,$0F,$00,$FF 63 - DB $F8,$07,$F8,$07,$F8,$07,$7C,$83 64 - DB $7C,$83,$7C,$83,$7C,$83,$70,$8F 65 - DB $80,$7F,$00,$FF,$1F,$FF,$3F,$FF 66 - DB $3F,$FF,$3F,$FF,$3F,$FF,$7F,$FF 67 - DB $01,$FE,$00,$FF,$F8,$FF,$FC,$FF 68 - DB $FC,$FF,$FC,$FF,$FE,$FF,$FC,$FF 69 - DB $3F,$FF,$3F,$FF,$3F,$FF,$3F,$FF 70 - DB $3F,$FF,$3F,$FF,$3F,$FF,$3F,$FF 71 - DB $FC,$FF,$FC,$FF,$FC,$FF,$FC,$FF 72 - DB $FC,$FF,$FC,$FF,$FC,$FF,$FC,$FF 73 - DB $3E,$FF,$3C,$FF,$3F,$FF,$3F,$FF 74 - DB $38,$FF,$3F,$F0,$10,$FF,$10,$FF 75 - DB $3C,$FF,$00,$FF,$FC,$83,$FC,$FF 76 - DB $FC,$FF,$00,$FF,$FC,$03,$00,$FF 77 - DB $0F,$F0,$3F,$C0,$1F,$E0,$1F,$E0 78 - DB $1F,$E0,$1F,$E0,$1F,$E0,$1F,$E0 79 - DB $80,$7F,$FF,$00,$FF,$00,$FF,$00 80 - DB $FF,$00,$FF,$00,$FF,$00,$FF,$00 81 - DB $FC,$03,$FF,$00,$FF,$00,$FF,$00 82 - DB $FF,$00,$FF,$00,$FF,$00,$FF,$00 83 - DB $7F,$80,$FF,$00,$FF,$00,$FF,$00 84 - DB $FF,$00,$FF,$00,$FF,$00,$FF,$00 85 - DB $FE,$01,$FF,$00,$FF,$00,$FF,$00 86 - DB $FF,$00,$FF,$00,$FF,$00,$FF,$00 87 - DB $00,$FF,$F8,$07,$F8,$07,$FC,$03 88 - DB $FC,$03,$FC,$03,$F8,$07,$F8,$07 89 - DB $3F,$FF,$3F,$FF,$3F,$FF,$3F,$FF 90 - DB $3F,$FF,$3F,$FF,$3F,$FF,$3F,$FF 91 - DB $FC,$FF,$FC,$FF,$FC,$FF,$FC,$FF 92 - DB $FC,$FF,$FC,$FF,$FC,$FF,$FC,$FF 93 - DB $3F,$FF,$3F,$FF,$3F,$FF,$3F,$FF 94 - DB $3F,$FF,$7F,$FF,$3F,$FF,$3F,$FF 95 - DB $FC,$FF,$FC,$FF,$FC,$FF,$FC,$FF 96 - DB $FC,$FF,$FC,$FF,$FE,$FF,$FC,$FF 97 - DB $1F,$E0,$3F,$C0,$0F,$F0,$00,$FF 98 - DB $00,$FF,$7F,$C0,$3F,$C0,$03,$FC 99 - DB $00,$FF,$FC,$03,$FC,$03,$04,$FB 100 - DB $00,$FF,$00,$FF,$FE,$03,$FC,$03 101 - DB $1F,$E0,$3F,$C0,$3F,$C0,$3F,$C0 102 - DB $3F,$C0,$1F,$E0,$00,$FF,$00,$FF 103 - DB $FF,$00,$FF,$00,$FF,$00,$FF,$00 104 - DB $FF,$00,$FF,$00,$00,$FF,$07,$F8 105 - DB $FF,$00,$FF,$00,$FF,$00,$FF,$00 106 - DB $FF,$00,$FF,$00,$00,$FF,$00,$FF 107 - DB $FF,$00,$FF,$00,$FF,$00,$FF,$00 108 - DB $FF,$00,$FF,$00,$00,$FF,$00,$FF 109 - DB $FF,$00,$FF,$00,$FF,$00,$FF,$00 110 - DB $FF,$00,$FF,$00,$00,$FF,$00,$FF 111 - DB $F8,$07,$F8,$07,$F8,$07,$F8,$07 112 - DB $FC,$03,$FC,$03,$00,$FF,$3C,$C3 113 - DB $3F,$FF,$3F,$FF,$3F,$FF,$3F,$FF 114 - DB $3F,$FF,$7F,$FF,$3F,$FF,$3F,$FF 115 - DB $FC,$FF,$FC,$FF,$FC,$FF,$FC,$FF 116 - DB $FC,$FF,$FC,$FF,$FE,$FF,$FC,$FF 117 - DB $01,$FF,$03,$FC,$3F,$C0,$3F,$C0 118 - DB $3F,$C0,$3F,$C0,$7F,$80,$FF,$00 119 - DB $FC,$FF,$FC,$3F,$FC,$0F,$FC,$03 120 - DB $FC,$03,$FC,$03,$FE,$01,$FF,$00 121 - DB $00,$FF,$3E,$C1,$3F,$C0,$1F,$E0 122 - DB $00,$FF,$07,$F8,$7F,$80,$FF,$00 123 - DB $00,$FF,$00,$FF,$FC,$03,$FC,$03 124 - DB $00,$FF,$F4,$0B,$FE,$01,$FF,$00 125 - DB $1F,$E0,$00,$FF,$00,$FF,$00,$FF 126 - DB $00,$FF,$80,$7F,$DE,$21,$FF,$00 127 - DB $78,$87,$00,$FF,$00,$FF,$00,$FF 128 - DB $00,$FF,$08,$F7,$1C,$E3,$FF,$00 129 - DB $FF,$00,$00,$FF,$00,$FF,$00,$FF 130 - DB $00,$FF,$00,$FF,$7C,$83,$FF,$00 131 - DB $7F,$80,$00,$FF,$00,$FF,$00,$FF 132 - DB $00,$FF,$00,$FF,$1C,$E3,$FF,$00 133 - DB $FE,$01,$00,$FF,$00,$FF,$00,$FF 134 - DB $00,$FF,$00,$FF,$38,$C7,$FF,$00 135 - DB $C0,$3F,$00,$FF,$00,$FF,$00,$FF 136 - DB $00,$FF,$09,$F6,$3D,$C2,$FF,$00 137 - DB $3B,$FF,$30,$FF,$00,$FF,$04,$FB 138 - DB $1F,$E0,$36,$C9,$7F,$80,$FF,$00 139 - DB $8C,$FF,$24,$FF,$00,$FF,$30,$CF 140 - DB $D8,$27,$FC,$03,$7E,$81,$FF,$00 141 - dungeon_tiles_end:: 142 - ; End of DUNGEON_TILES_FLOOR_TILES.Z80
-39
gb/src/generated/graphics/room.asm
··· 1 - ; Tilemap: 32 x 32, Plain tiles 2 - ; Exported by Tilemap Studio 3 - 4 - SECTION "RoomTilemap", ROM0 5 - 6 - room_Tilemap:: 7 - db $41, $42, $43, $44, $43, $44, $43, $44, $43, $44, $43, $44, $43, $44, $43, $44, $43, $44, $45, $46, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 8 - db $4d, $4e, $4f, $50, $4f, $50, $4f, $50, $4f, $50, $4f, $50, $4f, $50, $4f, $50, $4f, $50, $51, $52, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 9 - db $59, $5a, $5b, $5c, $5b, $5c, $5b, $5c, $5b, $5c, $5b, $5c, $5b, $5c, $5b, $5c, $5b, $5c, $5d, $5e, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 10 - db $65, $66, $67, $68, $67, $68, $67, $68, $67, $68, $67, $68, $67, $68, $67, $68, $67, $68, $69, $6a, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 11 - db $35, $36, $36, $36, $36, $36, $36, $36, $36, $36, $36, $36, $36, $36, $36, $36, $36, $36, $36, $37, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 12 - db $3c, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $38, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 13 - db $3c, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $38, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 14 - db $3c, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $38, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 15 - db $3c, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $38, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 16 - db $3c, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $38, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 17 - db $3c, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $38, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 18 - db $3c, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $38, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 19 - db $3c, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $38, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 20 - db $3c, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $38, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 21 - db $3c, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $38, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 22 - db $3c, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $38, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 23 - db $3c, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $34, $38, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 24 - db $3b, $3a, $3a, $3a, $3a, $3a, $3a, $3a, $3a, $3a, $3a, $3a, $3a, $3a, $3a, $3a, $3a, $3a, $3a, $39, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 25 - db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 26 - db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 27 - db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 28 - db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 29 - db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 30 - db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 31 - db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 32 - db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 33 - db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 34 - db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 35 - db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 36 - db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 37 - db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 38 - db $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 39 - room_Tilemap_end::
-89
gb/src/main/main.asm
··· 1 - INCLUDE "hardware.inc/hardware.inc" 2 - rev_Check_hardware_inc 4.0 3 - 4 - SECTION "GameVariables", WRAM0 5 - 6 - wLastKeys:: db 7 - wCurKeys:: db 8 - wNewKeys:: db 9 - wGameState:: db 10 - 11 - SECTION "Header", ROM0[$100] 12 - 13 - ; This is your ROM's entry point 14 - ; You have 4 bytes of code to do... something 15 - di 16 - jp EntryPoint 17 - 18 - ; Make sure to allocate some space for the header, so no important 19 - ; code gets put there and later overwritten by RGBFIX. 20 - ; RGBFIX is designed to operate over a zero-filled header, so make 21 - ; sure to put zeros regarless of the padding value. (This feature 22 - ; was introduced in RGBDS 0.4.0, but the -MG etc flags were also 23 - ; introduced in that version.) 24 - ds $150 - @, 0 25 - 26 - SECTION "Entry point", ROM0 27 - 28 - EntryPoint: 29 - ; Shut down audio circuitry 30 - xor a 31 - ld [rNR52], a 32 - ld [wGameState], a 33 - 34 - ; Wait for VBlank phase before initiating the library 35 - call WaitForOneVBlank 36 - 37 - ; Turn the LCD off 38 - xor a 39 - ld [rLCDC], a 40 - 41 - ; Load our common text font into VRAM 42 - call LoadTextFontIntoVRAM 43 - 44 - ; Turn the LCD on 45 - ld a, LCDCF_ON | LCDCF_BGON | LCDCF_OBJON 46 - ld [rLCDC], a 47 - 48 - ; During the first (blank) frame, intialize display registers 49 - ld a, %11100100 50 - ld [rBGP], a 51 - ld [rOBP0], a 52 - 53 - NextGameState:: 54 - ; Do not turn the LCD off outside of VBlank 55 - call WaitForOneVBlank 56 - call ClearBackground 57 - 58 - ; Turn the LCD off 59 - xor a 60 - ld [rLCDC], a 61 - 62 - ld [rSCX], a 63 - ld [rSCY], a 64 - ld [rWX], a 65 - ld [rWY], a 66 - ld [wCurKeys], a 67 - ; disable interrupts 68 - ; call DisableInterrupts 69 - 70 - ; Clear all sprites 71 - ; call ClearAllSprites 72 - 73 - ; Initiate the next state 74 - ld a, [wGameState] 75 - cp 2 ; 2 = Gameplay 76 - call z, InitGameplayState 77 - cp 1 ; 1 = Generate Dungeon 78 - call z, InitDungeonGeneration 79 - ld a, [wGameState] 80 - and a ; 0 = Menu 81 - call z, InitTitleScreenState 82 - 83 - ; Update the next state 84 - ld a, [wGameState] 85 - cp 2 ; 2 = Gameplay 86 - jp z, UpdateGameplayState 87 - cp 1 ; 1 = Generate Dungeon 88 - jp z, UpdateDungeonGeneration 89 - jp UpdateTitleScreenState
-228
gb/src/main/states/gameplay/gameplay-state.asm
··· 1 - INCLUDE "hardware.inc/hardware.inc" 2 - 3 - SECTION "GameplayState", ROM0 4 - 5 - InitGameplayState:: 6 - call DrawRoom 7 - ld a, LCDCF_ON | LCDCF_BGON 8 - ld [rLCDC], a 9 - ret 10 - 11 - DrawRoom:: 12 - ld de, dungeon_tiles 13 - ld hl, $9340 14 - ld bc, dungeon_tiles_end - dungeon_tiles 15 - call CopyDEIntoMemoryAtHL 16 - ld de, room_Tilemap 17 - ld hl, $9800 18 - ld bc, room_Tilemap_end - room_Tilemap 19 - call CopyDEIntoMemoryAtHL 20 - call SetRoomDoors 21 - ret 22 - 23 - SetRoomDoors:: 24 - ld a, [wEntrance] 25 - ld e, a 26 - ld hl, wDungeonGrid 27 - ld a, l 28 - add e 29 - ld l, a 30 - ld a, [hl] 31 - and $04 32 - jp z, .FuncBody2 33 - ; set north door 34 - push hl 35 - ld hl, $9800+$08 36 - ld a, $37+$0f ; Row 1 37 - ld [hli], a 38 - ld a, $38+$0f 39 - ld [hli], a 40 - ld a, $39+$0f 41 - ld [hli], a 42 - ld a, $32+$0f 43 - ld [hli], a 44 - ld de, $001c 45 - add hl, de ; Row 2 46 - ld a, $43+$0f 47 - ld [hli], a 48 - ld a, $44+$0f 49 - ld [hli], a 50 - ld a, $45+$0f 51 - ld [hli], a 52 - ld a, $3e+$0f 53 - ld [hli], a 54 - add hl, de ; Row 3 55 - ld a, $4f+$0f 56 - ld [hli], a 57 - ld a, $50+$0f 58 - ld [hli], a 59 - ld a, $51+$0f 60 - ld [hli], a 61 - ld a, $4a+$0f 62 - ld [hli], a 63 - add hl, de ; Row 4 64 - ld a, $5b+$0f 65 - ld [hli], a 66 - ld a, $5c+$0f 67 - ld [hli], a 68 - ld a, $5d+$0f 69 - ld [hli], a 70 - ld a, $56+$0f 71 - ld [hli], a 72 - add hl, de ; Row 5 73 - ld a, $27+$0f 74 - ld [hli], a 75 - ld a, $25+$0f 76 - ld [hli], a 77 - ld a, $25+$0f 78 - ld [hli], a 79 - ld a, $27+$0f 80 - ld [hli], a 81 - pop hl 82 - .FuncBody2 83 - ld a, [hl] 84 - and $08 85 - jp z, .FuncBody3 86 - ; set east door 87 - push hl 88 - ld hl, $9800+$153 89 - ld a, $25+$0f 90 - ld [hl], a 91 - ld de, $0020 92 - add hl, de 93 - ld [hl], a 94 - pop hl 95 - .FuncBody3 96 - ld a, [hl] 97 - and $10 98 - jp z, .FuncBody4 99 - ; set south door 100 - push hl 101 - ld hl, $9800+$228 102 - ld a, $25+$0f 103 - ld [hli], a 104 - ld [hli], a 105 - pop hl 106 - .FuncBody4 107 - ld a, [hl] 108 - and $20 109 - jp z, .FuncBody5 110 - ; set west door 111 - push hl 112 - ld hl, $9800+$140 113 - ld a, $25+$0f 114 - ld [hl], a 115 - ld de, $0020 116 - add hl, de 117 - ld [hl], a 118 - pop hl 119 - .FuncBody5 120 - ld a, [hl] 121 - and $40 122 - jp z, .FuncBody6 123 - ; set stair down 124 - push hl 125 - ld hl, $9800+$02 ; Row 1 126 - ld a, $37+$0f 127 - ld [hli], a 128 - ld a, $2e+$0f 129 - ld [hli], a 130 - ld a, $2f+$0f 131 - ld [hli], a 132 - ld a, $32+$0f 133 - ld [hli], a 134 - ld de, $001c 135 - add hl, de ; Row 2 136 - ld a, $43+$0f 137 - ld [hli], a 138 - ld a, $3a+$0f 139 - ld [hli], a 140 - ld a, $3b+$0f 141 - ld [hli], a 142 - ld a, $3e+$0f 143 - ld [hli], a 144 - add hl, de ; Row 3 145 - ld a, $4f+$0f 146 - ld [hli], a 147 - ld a, $46+$0f 148 - ld [hli], a 149 - ld a, $47+$0f 150 - ld [hli], a 151 - ld a, $4a+$0f 152 - ld [hli], a 153 - add hl, de ; Row 4 154 - ld a, $5b+$0f 155 - ld [hli], a 156 - ld a, $52+$0f 157 - ld [hli], a 158 - ld a, $53+$0f 159 - ld [hli], a 160 - ld a, $56+$0f 161 - ld [hli], a 162 - add hl, de ; Row 5 163 - ld a, $27+$0f 164 - ld [hli], a 165 - ld a, $25+$0f 166 - ld [hli], a 167 - ld a, $27+$0f 168 - ld [hl], a 169 - pop hl 170 - .FuncBody6 171 - ld a, [hl] 172 - and $80 173 - jp z, .FuncBody7 174 - ; set stair up 175 - push hl 176 - ld hl, $9800+$0e ; Row 1 177 - ld a, $34+$0f 178 - ld [hli], a 179 - ld a, $30+$0f 180 - ld [hli], a 181 - ld a, $31+$0f 182 - ld [hli], a 183 - ld a, $32+$0f 184 - ld [hli], a 185 - ld de, $001c 186 - add hl, de ; Row 2 187 - ld a, $43+$0f 188 - ld [hli], a 189 - ld a, $3c+$0f 190 - ld [hli], a 191 - ld a, $3d+$0f 192 - ld [hli], a 193 - ld a, $3e+$0f 194 - ld [hli], a 195 - add hl, de ; Row 3 196 - ld a, $4f+$0f 197 - ld [hli], a 198 - ld a, $48+$0f 199 - ld [hli], a 200 - ld a, $49+$0f 201 - ld [hli], a 202 - ld a, $4a+$0f 203 - ld [hli], a 204 - add hl, de ; Row 4 205 - ld a, $5b+$0f 206 - ld [hli], a 207 - ld a, $54+$0f 208 - ld [hli], a 209 - ld a, $55+$0f 210 - ld [hli], a 211 - ld a, $56+$0f 212 - ld [hli], a 213 - add hl, de ; Row 5 214 - ld a, $27+$0f 215 - ld [hli], a 216 - ld a, $25+$0f 217 - ld [hli], a 218 - ld a, $25+$0f 219 - ld [hli], a 220 - ld a, $27+$0f 221 - ld [hl], a 222 - pop hl 223 - .FuncBody7 224 - ret 225 - 226 - UpdateGameplayState:: 227 - call WaitForOneVBlank 228 - jp UpdateGameplayState
-9
gb/src/main/states/gameplay/interrupts.asm
··· 1 - INCLUDE "hardware.inc/hardware.inc" 2 - 3 - SECTION "Interrupts", ROM0 4 - 5 - DisableInterrupts:: 6 - xor a 7 - ldh [rSTAT], a 8 - di 9 - ret
-53
gb/src/main/states/generate_dungeon/dungeon-state.asm
··· 1 - INCLUDE "hardware.inc/hardware.inc" 2 - INCLUDE "src/main/utils/macros/text-macros.inc" 3 - 4 - SECTION "DungeonGenerationState", ROM0 5 - 6 - PressGenerateText1:: db "press a to", 255 7 - PressGenerateText2:: db "generate dungeon", 255 8 - 9 - InitDungeonGeneration:: 10 - call BlackBackground 11 - ld de, $98e3 12 - ld hl, PressGenerateText1 13 - call DrawTextTilesLoop 14 - ld de, $9903 15 - ld hl, PressGenerateText2 16 - call DrawTextTilesLoop 17 - 18 - ld a, LCDCF_ON | LCDCF_BGON 19 - ld [rLCDC], a 20 - ld a, 10 21 - ld [wVBlankCount], a 22 - call WaitForVBlankFunction 23 - ret 24 - 25 - BlackBackground:: 26 - ld hl, $9800 27 - ld bc, $400 28 - .Loop 29 - ld a, $37 30 - ld [hli], a 31 - dec bc 32 - ld a, b 33 - or c 34 - jp nz, .Loop 35 - ret 36 - 37 - UpdateDungeonGeneration:: 38 - ld a, PADF_A 39 - ld [mWaitKey], a 40 - 41 - call WaitForKeyFunction 42 - ld a, 2 43 - ld [wGameState], a 44 - ld hl, rDIV 45 - ld b, [hl] 46 - call srand 47 - ld b, 6 48 - ld c, 6 49 - ld d, 36 50 - ld e, 27 51 - call InitDungeon 52 - call GenerateDungeon 53 - jp NextGameState
-418
gb/src/main/states/generate_dungeon/dungeon.asm
··· 1 - SECTION "DungeonVariables", WRAM0 2 - 3 - wDungeonGrid:: ds $ff 4 - wEntrance:: db 5 - wCurrentRoom:: db 6 - wCurrentWidth:: db 7 - wCurrentHeight:: db 8 - wGeneratedCells:: ds $ff 9 - wDungeonArea:: db 10 - wTwoThirdsArea:: db 11 - wPotentialDoors:: db 12 - 13 - SECTION "DungeonCode", ROM0 14 - 15 - ; Params: 16 - ; Starting Width: B 17 - ; Starting Height: C 18 - ; Dungeon Area: D 19 - ; Three Fourths Dungeon Area: E 20 - InitDungeon:: 21 - ld a, b ; wCurrentWidth = REG_B 22 - ld [wCurrentWidth], a 23 - ld a, c ; wCurrentHeight = REG_C 24 - ld [wCurrentHeight], a 25 - ld a, d ; wDungeonArea = REG_D 26 - ld [wDungeonArea], a 27 - ld a, e ; wTwoThirdsArea = REG_E 28 - ld [wTwoThirdsArea], a 29 - ld a, $ff ; initialize memory 30 - ld hl, wDungeonGrid 31 - .Loop 32 - cp 0 33 - jp z, .End 34 - ld [hl], 0 35 - inc l 36 - sub 1 37 - jp .Loop 38 - .End 39 - ld [hl], 0 40 - ret 41 - 42 - GenerateDungeon:: 43 - xor a 44 - ld b, a 45 - ld c, a 46 - push bc 47 - ; SP = generated_cells_number 48 - ; SP + 1 = i 49 - .Loop 50 - ld hl, sp+0 ; generated_cells_number 51 - ld a, [hl] 52 - ld hl, wDungeonArea 53 - cp [hl] 54 - jp nc, .LoopEnd 55 - ld hl, sp+1 ; i 56 - ld a, [hl] 57 - cp 0 58 - jp z, .LoopBody 59 - ld hl, sp+0 60 - cp [hl] 61 - jp c, .LoopBody 62 - jp .LoopEnd 63 - .LoopBody 64 - ld hl, sp+1 ; i 65 - ld a, [hl] 66 - cp 0 67 - jp nz, .LoopBody2 68 - dec hl ; generated_cells_number 69 - ld a, [hl] 70 - cp 0 71 - jp nz, .LoopBody2 72 - call rand 73 - ld a, b 74 - ld hl, wDungeonArea 75 - .SmallLoop 76 - cp [hl] 77 - jp c, .SmallLoopEnd 78 - sub [hl] 79 - jp .SmallLoop 80 - .SmallLoopEnd 81 - ld [wEntrance], a 82 - ld [wGeneratedCells], a 83 - ld e, a 84 - ld hl, wDungeonGrid 85 - ld a, l 86 - add e 87 - ld l, a 88 - ld [hl], $03 89 - ld hl, sp+0 90 - ld a, 1 91 - ld [hl], a 92 - .LoopBody2 93 - call GenerateRoom 94 - ; This program will assume that GenerateRoom will pop all values from the stack after use 95 - ; So that... 96 - ; SP = generated_cells_number 97 - ; SP + 1 = i 98 - ld hl, sp+1 99 - ld a, [hl] 100 - ld e, a 101 - ld hl, wGeneratedCells 102 - ld a, l 103 - add e 104 - ld l, a 105 - ld e, [hl] 106 - ld hl, wDungeonGrid 107 - ld a, l 108 - add e 109 - ld l, a 110 - ld a, [hl] 111 - and $01 112 - jp nz, .LoopBody3 113 - ld a, [hl] 114 - or $01 115 - ld [hl], a 116 - .LoopBody3 117 - ld hl, sp+1 118 - ld a, [hl] 119 - ld hl, sp+0 120 - ld e, [hl] 121 - dec e 122 - cp e 123 - jp nz, .LoopContinue 124 - inc e 125 - ld a, e 126 - ld hl, wTwoThirdsArea 127 - cp [hl] 128 - jp nc, .LoopContinue 129 - ld hl, sp+1 130 - xor a 131 - ld [hl], a 132 - jp .Loop 133 - .LoopContinue 134 - ld hl, sp+1 135 - ld a, [hl] 136 - inc a 137 - ld [hl], a 138 - jp .Loop 139 - .LoopEnd 140 - pop bc ; Get rid of manual value pushed on stack to get old PC back at SP 141 - ret 142 - 143 - GenerateRoom:: 144 - call rand 145 - rlc b 146 - rlc b 147 - rlc b 148 - rlc b 149 - ld a, b 150 - and $0f 151 - ld hl, wPotentialDoors 152 - ld [hl], a 153 - xor a 154 - ld b, a 155 - ld c, a 156 - push bc 157 - push bc 158 - ; SP = door 159 - ; SP + 1 = opposite_door 160 - ; SP + 2 = neighbor_room 161 - ; SP + 3 = cell_index 162 - ; SP + 4 = OLD_PC_LOW 163 - ; SP + 5 = OLD_PC_HIGH 164 - ; SP + 6 = generated_cells_number 165 - ; SP + 7 = i 166 - ld hl, sp+0 167 - ld a, 1 168 - ld [hl], a 169 - ld hl, sp+7 170 - ld e, [hl] 171 - ld hl, wGeneratedCells 172 - ld a, l 173 - add e 174 - ld l, a 175 - ld a, [hl] 176 - ld hl, sp+3 177 - ld [hl], a 178 - .Loop 179 - ld hl, sp+0 180 - ld a, [hl] 181 - cp 16 182 - jp z, .LoopEnd 183 - ld hl, sp+3 184 - ld e, [hl] 185 - ld hl, wDungeonGrid 186 - ld a, l 187 - add e 188 - ld l, a 189 - ld a, [hl] 190 - ld hl, sp+0 191 - ld d, [hl] 192 - sla d 193 - sla d 194 - and d 195 - jp nz, .LoopContinue 196 - call GetNeighborRoomIndex 197 - ; This program will assume that GenerateRoom will pop all values from the stack after use 198 - ; So that... 199 - ; SP = door 200 - ; SP + 1 = opposite_door 201 - ; SP + 2 = neighbor_room 202 - ; SP + 3 = cell_index 203 - ; SP + 4 = OLD_PC_LOW 204 - ; SP + 5 = OLD_PC_HIGH 205 - ; SP + 6 = generated_cells_number 206 - ; SP + 7 = i 207 - ld hl, sp+2 208 - ld a, [hl] 209 - cpl 210 - cp 0 211 - jp z, .LoopContinue 212 - ld e, [hl] 213 - ld hl, wDungeonGrid 214 - ld a, l 215 - add e 216 - ld l, a 217 - ld a, [hl] 218 - and $01 219 - jp nz, .LoopContinue 220 - call GetOppositeDirecitonBit ; This will simply be stored in REG_B 221 - ; This program will assume that GenerateRoom will pop all values from the stack after use 222 - ; So that... 223 - ; SP = door 224 - ; SP + 1 = opposite_door 225 - ; SP + 2 = neighbor_room 226 - ; SP + 3 = cell_index 227 - ; SP + 4 = OLD_PC_LOW 228 - ; SP + 5 = OLD_PC_HIGH 229 - ; SP + 6 = generated_cells_number 230 - ; SP + 7 = i 231 - ld hl, sp+0 232 - ld a, [hl] 233 - ld hl, wPotentialDoors 234 - and [hl] 235 - ld hl, sp+0 236 - cp [hl] 237 - jp nz, .LoopBody2 238 - ld hl, sp+3 239 - ld e, [hl] 240 - ld hl, sp+0 241 - ld d, [hl] 242 - sla d 243 - sla d 244 - ld hl, wDungeonGrid 245 - ld a, l 246 - add e 247 - ld l, a 248 - ld a, [hl] 249 - or d 250 - ld [hl], a 251 - ld hl, sp+2 252 - ld e, [hl] 253 - ld hl, wDungeonGrid 254 - ld a, l 255 - add e 256 - ld l, a 257 - ld a, [hl] 258 - or b 259 - ld [hl], a 260 - .LoopBody2 261 - ld hl, sp+2 262 - ld e, [hl] 263 - ld hl, wDungeonGrid 264 - ld a, l 265 - add e 266 - ld l, a 267 - ld a, [hl] 268 - cp b 269 - jp nz, .LoopContinue 270 - ld hl, sp+6 271 - ld e, [hl] 272 - ld hl, sp+2 273 - ld d, [hl] 274 - ld hl, wGeneratedCells 275 - ld a, l 276 - add e 277 - ld l, a 278 - ld [hl], d 279 - ld hl, sp+6 280 - ld a, [hl] 281 - inc a 282 - ld [hl], a 283 - .LoopContinue 284 - ld hl, sp+0 285 - ld a, [hl] 286 - sla a 287 - ld [hl], a 288 - jp .Loop 289 - .LoopEnd 290 - pop bc ; Get rid of manual value pushed on stack to get old PC back at SP 291 - pop bc ; Get rid of manual value pushed on stack to get old PC back at SP 292 - ret 293 - 294 - GetNeighborRoomIndex:: 295 - ; SP = OLD_PC_LOW 296 - ; SP + 1 = OLD_PC_HIGH 297 - ; SP + 2 = door (needs to be shifted left twice) 298 - ; SP + 3 = opposite_door 299 - ; SP + 4 = neighbor_room 300 - ; SP + 5 = cell_index 301 - ; SP + 6 = OLD_PC_LOW 302 - ; SP + 7 = OLD_PC_HIGH 303 - ; SP + 8 = generated_cells_number 304 - ; SP + 9 = i 305 - ld hl, sp+2 306 - ld a, [hl] 307 - sla a 308 - sla a 309 - cp $04 310 - jp nz, .Case2 311 - ld hl, sp+5 312 - ld a, [hl] 313 - ld hl, wCurrentWidth 314 - sub [hl] 315 - ld hl, sp+4 316 - ld [hl], a 317 - cp 0 318 - ret z 319 - ret nc 320 - jp .Default 321 - .Case2 322 - cp $08 323 - jp nz, .Case3 324 - ld hl, sp+5 325 - ld a, [hl] 326 - inc a 327 - ld hl, sp+4 328 - ld [hl], a 329 - ld hl, wDungeonArea 330 - cp [hl] 331 - ret c 332 - jp .Default 333 - .Case3 334 - cp $10 335 - jp nz, .Case4 336 - ld hl, sp+5 337 - ld a, [hl] 338 - ld hl, wCurrentWidth 339 - add [hl] 340 - ld hl, sp+4 341 - ld [hl], a 342 - ld hl, wCurrentWidth 343 - ld e, [hl] 344 - ld d, a 345 - xor a 346 - ld hl, wDungeonArea 347 - ld c, [hl] 348 - .Case3Loop 349 - cp d 350 - jp z, .Default 351 - cp c 352 - ret z 353 - add e 354 - jp .Case3Loop 355 - .Case4 356 - cp $20 357 - jp nz, .Default 358 - ld hl, sp+5 359 - ld a, [hl] 360 - dec a 361 - ld hl, sp+4 362 - ld [hl], a 363 - ld hl, wCurrentWidth 364 - ld e, [hl] 365 - ld d, a 366 - xor a 367 - dec a 368 - ld hl, wDungeonArea 369 - ld c, [hl] 370 - .Case4Loop 371 - cp c 372 - ret c 373 - cp d 374 - jp z, .Default 375 - add e 376 - jp .Case4Loop 377 - .Default 378 - ld hl, sp+4 379 - ld a, -1 380 - ld [hl], a 381 - ret 382 - 383 - GetOppositeDirecitonBit:: 384 - ; SP = OLD_PC_LOW 385 - ; SP + 1 = OLD_PC_HIGH 386 - ; SP + 2 = door (needs to be shifted left twice) 387 - ; SP + 3 = opposite_door 388 - ; SP + 4 = neighbor_room 389 - ; SP + 5 = cell_index 390 - ; SP + 6 = OLD_PC_LOW 391 - ; SP + 7 = OLD_PC_HIGH 392 - ; SP + 8 = generated_cells_number 393 - ; SP + 9 = i 394 - ld b, -1 395 - ld hl, sp+2 396 - ld a, [hl] 397 - sla a 398 - sla a 399 - cp $04 400 - jp nz, .Case2 401 - ld b, $10 402 - jp .Break 403 - .Case2 404 - cp $08 405 - jp nz, .Case3 406 - ld b, $20 407 - jp .Break 408 - .Case3 409 - cp $10 410 - jp nz, .Case4 411 - ld b, $04 412 - jp .Break 413 - .Case4 414 - cp $20 415 - jp nz, .Break 416 - ld b, $08 417 - .Break 418 - ret
-44
gb/src/main/states/title-screen/title-screen-state.asm
··· 1 - INCLUDE "hardware.inc/hardware.inc" 2 - INCLUDE "src/main/utils/macros/text-macros.inc" 3 - 4 - SECTION "TitleScreenState", ROM0 5 - 6 - PressPlayText:: db "press a to play", 255 7 - 8 - titleScreenTileData: INCBIN "src/generated/backgrounds/title.2bpp" 9 - titleScreenTileDataEnd: 10 - 11 - titleScreenTileMap: INCBIN "src/generated/backgrounds/title.tilemap" 12 - titleScreenTileMapEnd: 13 - 14 - InitTitleScreenState:: 15 - call DrawTitleScreen 16 - ld de, $99C3 17 - ld hl, PressPlayText 18 - call DrawTextTilesLoop 19 - 20 - ld a, LCDCF_ON | LCDCF_BGON 21 - ld [rLCDC], a 22 - ret 23 - 24 - DrawTitleScreen:: 25 - ld de, titleScreenTileData 26 - ld hl, $9340 27 - ld bc, titleScreenTileDataEnd - titleScreenTileData 28 - call CopyDEIntoMemoryAtHL 29 - 30 - ld de, titleScreenTileMap 31 - ld hl, $9800 32 - ld bc, titleScreenTileMapEnd - titleScreenTileMap 33 - jp CopyDEintoMemoryAtHL_With520Offset 34 - 35 - UpdateTitleScreenState:: 36 - ld a, PADF_A 37 - ld [mWaitKey], a 38 - 39 - call WaitForKeyFunction 40 - ld a, 1 41 - ld [wGameState], a 42 - ld hl, rDIV 43 - ld c, [hl] 44 - jp NextGameState
-27
gb/src/main/utils/background-utils.asm
··· 1 - INCLUDE "hardware.inc/hardware.inc" 2 - 3 - SECTION "Background", ROM0 4 - 5 - ClearBackground:: 6 - ; Turn the LCD off 7 - xor a 8 - ld [rLCDC], a 9 - 10 - ld bc, 1024 11 - ld hl, $9800 12 - 13 - ClearBackgroundLoop: 14 - xor a 15 - ld [hli], a 16 - 17 - dec bc 18 - ld a, b 19 - or c 20 - 21 - jp nz, ClearBackgroundLoop 22 - 23 - ; Turn the LCD on 24 - ld a, LCDCF_ON | LCDCF_BGON | LCDCF_OBJON 25 - ld [rLCDC], a 26 - 27 - ret
-35
gb/src/main/utils/input-utils.asm
··· 1 - SECTION "InputUtilsVariables", WRAM0 2 - 3 - mWaitKey:: db 4 - 5 - SECTION "InputUtils", ROM0 6 - 7 - WaitForKeyFunction:: 8 - push bc 9 - 10 - WaitForKeyFunction_Loop: 11 - ld a, [wCurKeys] 12 - ld [wLastKeys], a 13 - 14 - call Input 15 - 16 - ld a, [mWaitKey] 17 - ld b, a 18 - ld a, [wCurKeys] 19 - and b 20 - jp z, WaitForKeyFunction_NotPressed 21 - 22 - ld a, [wLastKeys] 23 - and b 24 - jp nz, WaitForKeyFunction_NotPressed 25 - 26 - pop bc 27 - ret 28 - 29 - WaitForKeyFunction_NotPressed: 30 - ld a, 1 31 - ld [wVBlankCount], a 32 - 33 - call WaitForVBlankFunction 34 - 35 - jp WaitForKeyFunction_Loop
-29
gb/src/main/utils/macros/text-macros.inc
··· 1 - CHARMAP " ", 0 2 - CHARMAP ".", 24 3 - CHARMAP "-", 25 4 - CHARMAP "a", 26 5 - CHARMAP "b", 27 6 - CHARMAP "c", 28 7 - CHARMAP "d", 29 8 - CHARMAP "e", 30 9 - CHARMAP "f", 31 10 - CHARMAP "g", 32 11 - CHARMAP "h", 33 12 - CHARMAP "i", 34 13 - CHARMAP "j", 35 14 - CHARMAP "k", 36 15 - CHARMAP "l", 37 16 - CHARMAP "m", 38 17 - CHARMAP "n", 39 18 - CHARMAP "o", 40 19 - CHARMAP "p", 41 20 - CHARMAP "q", 42 21 - CHARMAP "r", 43 22 - CHARMAP "s", 44 23 - CHARMAP "t", 45 24 - CHARMAP "u", 46 25 - CHARMAP "v", 47 26 - CHARMAP "w", 48 27 - CHARMAP "x", 49 28 - CHARMAP "y", 50 29 - CHARMAP "z", 51
-68
gb/src/main/utils/math.asm
··· 1 - SECTION "MathVariables", WRAM0 2 - 3 - randstate:: ds 4 4 - 5 - SECTION "Math", ROM0 6 - 7 - ;; From: https://github.com/pinobatch/libbet/blob/master/src/rand.z80#L34-L54 8 - ; Generates a pseudorandom 16-bit integer in BC 9 - ; using the LCG formula from cc65 rand(): 10 - ; x[i + 1] = x[i] * 0x01010101 + 0xB3B3B3B3 11 - ; @return A=B=state bits 31-24 (which have the best entropy), 12 - ; C=state bits 23-16, HL trashed 13 - rand:: 14 - ; Add 0xB3 then multiply by 0x01010101 15 - push hl 16 - push af 17 - ld hl, randstate+0 18 - ld a, [hl] 19 - add a, $B3 20 - ld [hl+], a 21 - adc a, [hl] 22 - ld [hl+], a 23 - adc a, [hl] 24 - ld [hl+], a 25 - ld c, a 26 - adc a, [hl] 27 - ld [hl], a 28 - ld b, a 29 - pop af 30 - pop hl 31 - ret 32 - 33 - ; Sets the random seed to BC. 34 - ; C expects startup code to behave as if srand(1) was called. 35 - ; AHL trashed 36 - srand:: 37 - ld hl,randstate+3 38 - xor a 39 - ld [hl-],a 40 - ld [hl-],a 41 - ld a,b 42 - ld [hl-],a 43 - ld [hl],c 44 - ret 45 - 46 - ; HL = D * E 47 - Multiply:: 48 - ld hl, 0 49 - ld a, d 50 - or a 51 - ret z 52 - ld b, d 53 - ld d, h 54 - .Loop 55 - add hl, de 56 - dec b 57 - jp nz, .Loop 58 - ret 59 - 60 - ; A = A % C 61 - Modulo:: 62 - .Loop 63 - cp c 64 - jp c, .Done 65 - sub c 66 - jp .Loop 67 - .Done 68 - ret
-22
gb/src/main/utils/memory-utils.asm
··· 1 - SECTION "MemoryUtilsSection", ROM0 2 - 3 - CopyDEIntoMemoryAtHL:: 4 - ld a, [de] 5 - ld [hli], a 6 - inc de 7 - dec bc 8 - ld a, b 9 - or c 10 - jp nz, CopyDEIntoMemoryAtHL 11 - ret 12 - 13 - CopyDEintoMemoryAtHL_With520Offset:: 14 - ld a, [de] 15 - add a, 52 16 - ld [hli], a 17 - inc de 18 - dec bc 19 - ld a, b 20 - or c 21 - jp nz, CopyDEintoMemoryAtHL_With520Offset 22 - ret
-29
gb/src/main/utils/text-utils.asm
··· 1 - SECTION "Text", ROM0 2 - 3 - textFontTileData: INCBIN "src/generated/backgrounds/text-font.2bpp" 4 - textFontTileDataEnd: 5 - 6 - LoadTextFontIntoVRAM:: 7 - ; Copy the tile data 8 - ld de, textFontTileData 9 - ld hl, $9000 10 - ld bc, textFontTileDataEnd - textFontTileData 11 - jp CopyDEIntoMemoryAtHL 12 - ret 13 - 14 - DrawTextTilesLoop:: 15 - ; Check for the end of string character 255 16 - ld a, [hl] 17 - cp 255 18 - ret z 19 - 20 - ; Write the current character (in hl) to the address 21 - ; on the tilemap (in de) 22 - ld a, [hl] 23 - ld [de], a 24 - 25 - inc hl 26 - inc de 27 - 28 - ; move to the next character and next background tile 29 - jp DrawTextTilesLoop
-28
gb/src/main/utils/vblank-utils.asm
··· 1 - INCLUDE "hardware.inc/hardware.inc" 2 - 3 - SECTION "VBlankVariables", WRAM0 4 - 5 - wVBlankCount:: db 6 - 7 - SECTION "VBlankFunctions", ROM0 8 - 9 - WaitForOneVBlank:: 10 - ld a, 1 11 - ld [wVBlankCount], a 12 - 13 - WaitForVBlankFunction:: 14 - 15 - WaitForVBlankFunction_Loop:: 16 - ld a, [rLY] 17 - cp 144 18 - jp c, WaitForVBlankFunction_Loop 19 - ld a, [wVBlankCount] 20 - sub 1 21 - ld [wVBlankCount], a 22 - ret z 23 - 24 - WaitForKeyFunction_Loop2:: 25 - ld a, [rLY] 26 - cp 144 27 - jp nc, WaitForKeyFunction_Loop2 28 - jp WaitForVBlankFunction_Loop
gb/src/resources/backgrounds/dungeon_tiles_floor.png

This is a binary file and will not be displayed.

gb/src/resources/backgrounds/dungeon_tiles_walls.png

This is a binary file and will not be displayed.

gb/src/resources/backgrounds/text-font.png

This is a binary file and will not be displayed.

gb/src/resources/backgrounds/title.png

This is a binary file and will not be displayed.

-22
gba/.cargo/config.toml
··· 1 - [build] 2 - target = "thumbv4t-none-eabi" 3 - 4 - [unstable] 5 - build-std = ["core", "alloc"] 6 - build-std-features = ["compiler-builtins-mem"] 7 - 8 - [target.thumbv4t-none-eabi] 9 - rustflags = [ 10 - "-Clink-arg=-Tgba.ld", 11 - "-Ctarget-cpu=arm7tdmi", 12 - "-Cforce-frame-pointers=yes" 13 - ] 14 - runner = ["mgba", "-C", "logToStdout=1", "-C", "logLevel.gba.debug=127", "-6"] 15 - 16 - [target.armv4t-none-eabi] 17 - rustflags = [ 18 - "-Clink-arg=-Tgba.ld", 19 - "-Ctarget-cpu=arm7tdmi", 20 - "-Cforce-frame-pointers=yes" 21 - ] 22 - runner = ["mgba", "-C", "logToStdout=1", "-C", "logLevel.gba.debug=127", "-6"]
-1
gba/.gitignore
··· 1 - /target
-457
gba/Cargo.lock
··· 1 - # This file is automatically @generated by Cargo. 2 - # It is not intended for manual editing. 3 - version = 4 4 - 5 - [[package]] 6 - name = "adler2" 7 - version = "2.0.0" 8 - source = "registry+https://github.com/rust-lang/crates.io-index" 9 - checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" 10 - 11 - [[package]] 12 - name = "agb" 13 - version = "0.21.1" 14 - source = "registry+https://github.com/rust-lang/crates.io-index" 15 - checksum = "50903b613aefa05ad1e85c28faa866dd90c9805e3973790f874b77e37134d6f9" 16 - dependencies = [ 17 - "agb_fixnum", 18 - "agb_hashmap", 19 - "agb_image_converter", 20 - "agb_macros", 21 - "agb_sound_converter", 22 - "bilge", 23 - "bitflags 2.6.0", 24 - "critical-section", 25 - "once_cell", 26 - "portable-atomic", 27 - "qrcodegen-no-heap", 28 - ] 29 - 30 - [[package]] 31 - name = "agb_fixnum" 32 - version = "0.21.1" 33 - source = "registry+https://github.com/rust-lang/crates.io-index" 34 - checksum = "85f34b72407c42d911bf88d4934ceadd97741ac851e1edd6105265a8db00e03f" 35 - dependencies = [ 36 - "agb_macros", 37 - "num-traits", 38 - ] 39 - 40 - [[package]] 41 - name = "agb_hashmap" 42 - version = "0.21.1" 43 - source = "registry+https://github.com/rust-lang/crates.io-index" 44 - checksum = "ad1c3218a4abe6e6f16067c87e78902f0e5dbfb6861b59a34be6cdf55363f76d" 45 - dependencies = [ 46 - "rustc-hash", 47 - ] 48 - 49 - [[package]] 50 - name = "agb_image_converter" 51 - version = "0.21.1" 52 - source = "registry+https://github.com/rust-lang/crates.io-index" 53 - checksum = "f7b432932e8a0ec974508f37919c9c530896c1e0c5b1b5614eabf2710cbab9f0" 54 - dependencies = [ 55 - "asefile", 56 - "fontdue", 57 - "image", 58 - "pagination-packing", 59 - "proc-macro2", 60 - "quote", 61 - "syn", 62 - ] 63 - 64 - [[package]] 65 - name = "agb_macros" 66 - version = "0.21.1" 67 - source = "registry+https://github.com/rust-lang/crates.io-index" 68 - checksum = "c99c2a624219134f8265f6da0b0d526fe16dae57710f189e67cb7721cf6a3815" 69 - dependencies = [ 70 - "proc-macro2", 71 - "quote", 72 - "syn", 73 - ] 74 - 75 - [[package]] 76 - name = "agb_sound_converter" 77 - version = "0.21.1" 78 - source = "registry+https://github.com/rust-lang/crates.io-index" 79 - checksum = "a661c5900e8b380f633345efcd4f09094a2b08c595ae7138401c8b50878acfb2" 80 - dependencies = [ 81 - "hound", 82 - "proc-macro2", 83 - "quote", 84 - "syn", 85 - ] 86 - 87 - [[package]] 88 - name = "ahash" 89 - version = "0.8.11" 90 - source = "registry+https://github.com/rust-lang/crates.io-index" 91 - checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" 92 - dependencies = [ 93 - "cfg-if", 94 - "once_cell", 95 - "version_check", 96 - "zerocopy", 97 - ] 98 - 99 - [[package]] 100 - name = "allocator-api2" 101 - version = "0.2.20" 102 - source = "registry+https://github.com/rust-lang/crates.io-index" 103 - checksum = "45862d1c77f2228b9e10bc609d5bc203d86ebc9b87ad8d5d5167a6c9abf739d9" 104 - 105 - [[package]] 106 - name = "arbitrary-int" 107 - version = "1.2.7" 108 - source = "registry+https://github.com/rust-lang/crates.io-index" 109 - checksum = "c84fc003e338a6f69fbd4f7fe9f92b535ff13e9af8997f3b14b6ddff8b1df46d" 110 - 111 - [[package]] 112 - name = "asefile" 113 - version = "0.3.8" 114 - source = "registry+https://github.com/rust-lang/crates.io-index" 115 - checksum = "556cab74f613f2bcf3ab5dc5bbd2220fe2e1a4e7380fbaff96c5333a117066b4" 116 - dependencies = [ 117 - "bitflags 2.6.0", 118 - "byteorder", 119 - "flate2", 120 - "image", 121 - "log", 122 - "nohash", 123 - ] 124 - 125 - [[package]] 126 - name = "autocfg" 127 - version = "1.4.0" 128 - source = "registry+https://github.com/rust-lang/crates.io-index" 129 - checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" 130 - 131 - [[package]] 132 - name = "bilge" 133 - version = "0.2.0" 134 - source = "registry+https://github.com/rust-lang/crates.io-index" 135 - checksum = "dc707ed8ebf81de5cd6c7f48f54b4c8621760926cdf35a57000747c512e67b57" 136 - dependencies = [ 137 - "arbitrary-int", 138 - "bilge-impl", 139 - ] 140 - 141 - [[package]] 142 - name = "bilge-impl" 143 - version = "0.2.0" 144 - source = "registry+https://github.com/rust-lang/crates.io-index" 145 - checksum = "feb11e002038ad243af39c2068c8a72bcf147acf05025dcdb916fcc000adb2d8" 146 - dependencies = [ 147 - "itertools", 148 - "proc-macro-error", 149 - "proc-macro2", 150 - "quote", 151 - "syn", 152 - ] 153 - 154 - [[package]] 155 - name = "bitflags" 156 - version = "1.3.2" 157 - source = "registry+https://github.com/rust-lang/crates.io-index" 158 - checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 159 - 160 - [[package]] 161 - name = "bitflags" 162 - version = "2.6.0" 163 - source = "registry+https://github.com/rust-lang/crates.io-index" 164 - checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" 165 - 166 - [[package]] 167 - name = "bytemuck" 168 - version = "1.19.0" 169 - source = "registry+https://github.com/rust-lang/crates.io-index" 170 - checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" 171 - 172 - [[package]] 173 - name = "byteorder" 174 - version = "1.5.0" 175 - source = "registry+https://github.com/rust-lang/crates.io-index" 176 - checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 177 - 178 - [[package]] 179 - name = "cfg-if" 180 - version = "1.0.0" 181 - source = "registry+https://github.com/rust-lang/crates.io-index" 182 - checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 183 - 184 - [[package]] 185 - name = "color_quant" 186 - version = "1.1.0" 187 - source = "registry+https://github.com/rust-lang/crates.io-index" 188 - checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" 189 - 190 - [[package]] 191 - name = "crc32fast" 192 - version = "1.4.2" 193 - source = "registry+https://github.com/rust-lang/crates.io-index" 194 - checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" 195 - dependencies = [ 196 - "cfg-if", 197 - ] 198 - 199 - [[package]] 200 - name = "critical-section" 201 - version = "1.2.0" 202 - source = "registry+https://github.com/rust-lang/crates.io-index" 203 - checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" 204 - 205 - [[package]] 206 - name = "dungeoner" 207 - version = "0.1.0" 208 - dependencies = [ 209 - "agb", 210 - ] 211 - 212 - [[package]] 213 - name = "either" 214 - version = "1.13.0" 215 - source = "registry+https://github.com/rust-lang/crates.io-index" 216 - checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" 217 - 218 - [[package]] 219 - name = "fdeflate" 220 - version = "0.3.6" 221 - source = "registry+https://github.com/rust-lang/crates.io-index" 222 - checksum = "07c6f4c64c1d33a3111c4466f7365ebdcc37c5bd1ea0d62aae2e3d722aacbedb" 223 - dependencies = [ 224 - "simd-adler32", 225 - ] 226 - 227 - [[package]] 228 - name = "flate2" 229 - version = "1.0.35" 230 - source = "registry+https://github.com/rust-lang/crates.io-index" 231 - checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" 232 - dependencies = [ 233 - "crc32fast", 234 - "miniz_oxide", 235 - ] 236 - 237 - [[package]] 238 - name = "fontdue" 239 - version = "0.9.2" 240 - source = "registry+https://github.com/rust-lang/crates.io-index" 241 - checksum = "efe23d02309319171d00d794c9ff48d4f903c0e481375b1b04b017470838af04" 242 - dependencies = [ 243 - "hashbrown", 244 - "ttf-parser", 245 - ] 246 - 247 - [[package]] 248 - name = "hashbrown" 249 - version = "0.14.5" 250 - source = "registry+https://github.com/rust-lang/crates.io-index" 251 - checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" 252 - dependencies = [ 253 - "ahash", 254 - "allocator-api2", 255 - ] 256 - 257 - [[package]] 258 - name = "hound" 259 - version = "3.5.1" 260 - source = "registry+https://github.com/rust-lang/crates.io-index" 261 - checksum = "62adaabb884c94955b19907d60019f4e145d091c75345379e70d1ee696f7854f" 262 - 263 - [[package]] 264 - name = "image" 265 - version = "0.24.9" 266 - source = "registry+https://github.com/rust-lang/crates.io-index" 267 - checksum = "5690139d2f55868e080017335e4b94cb7414274c74f1669c84fb5feba2c9f69d" 268 - dependencies = [ 269 - "bytemuck", 270 - "byteorder", 271 - "color_quant", 272 - "num-traits", 273 - "png", 274 - ] 275 - 276 - [[package]] 277 - name = "itertools" 278 - version = "0.11.0" 279 - source = "registry+https://github.com/rust-lang/crates.io-index" 280 - checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" 281 - dependencies = [ 282 - "either", 283 - ] 284 - 285 - [[package]] 286 - name = "log" 287 - version = "0.4.22" 288 - source = "registry+https://github.com/rust-lang/crates.io-index" 289 - checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" 290 - 291 - [[package]] 292 - name = "miniz_oxide" 293 - version = "0.8.0" 294 - source = "registry+https://github.com/rust-lang/crates.io-index" 295 - checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" 296 - dependencies = [ 297 - "adler2", 298 - "simd-adler32", 299 - ] 300 - 301 - [[package]] 302 - name = "nohash" 303 - version = "0.2.0" 304 - source = "registry+https://github.com/rust-lang/crates.io-index" 305 - checksum = "a0f889fb66f7acdf83442c35775764b51fed3c606ab9cee51500dbde2cf528ca" 306 - 307 - [[package]] 308 - name = "num-traits" 309 - version = "0.2.19" 310 - source = "registry+https://github.com/rust-lang/crates.io-index" 311 - checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 312 - dependencies = [ 313 - "autocfg", 314 - ] 315 - 316 - [[package]] 317 - name = "once_cell" 318 - version = "1.20.2" 319 - source = "registry+https://github.com/rust-lang/crates.io-index" 320 - checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" 321 - dependencies = [ 322 - "critical-section", 323 - "portable-atomic", 324 - ] 325 - 326 - [[package]] 327 - name = "pagination-packing" 328 - version = "2.1.1" 329 - source = "registry+https://github.com/rust-lang/crates.io-index" 330 - checksum = "39a764a10dc28f833b1effd0f4a9d08e22126328efd889f121419634baab2dcd" 331 - 332 - [[package]] 333 - name = "png" 334 - version = "0.17.14" 335 - source = "registry+https://github.com/rust-lang/crates.io-index" 336 - checksum = "52f9d46a34a05a6a57566bc2bfae066ef07585a6e3fa30fbbdff5936380623f0" 337 - dependencies = [ 338 - "bitflags 1.3.2", 339 - "crc32fast", 340 - "fdeflate", 341 - "flate2", 342 - "miniz_oxide", 343 - ] 344 - 345 - [[package]] 346 - name = "portable-atomic" 347 - version = "1.9.0" 348 - source = "registry+https://github.com/rust-lang/crates.io-index" 349 - checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" 350 - 351 - [[package]] 352 - name = "proc-macro-error" 353 - version = "1.0.4" 354 - source = "registry+https://github.com/rust-lang/crates.io-index" 355 - checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" 356 - dependencies = [ 357 - "proc-macro-error-attr", 358 - "proc-macro2", 359 - "quote", 360 - "version_check", 361 - ] 362 - 363 - [[package]] 364 - name = "proc-macro-error-attr" 365 - version = "1.0.4" 366 - source = "registry+https://github.com/rust-lang/crates.io-index" 367 - checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" 368 - dependencies = [ 369 - "proc-macro2", 370 - "quote", 371 - "version_check", 372 - ] 373 - 374 - [[package]] 375 - name = "proc-macro2" 376 - version = "1.0.89" 377 - source = "registry+https://github.com/rust-lang/crates.io-index" 378 - checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" 379 - dependencies = [ 380 - "unicode-ident", 381 - ] 382 - 383 - [[package]] 384 - name = "qrcodegen-no-heap" 385 - version = "1.8.1" 386 - source = "registry+https://github.com/rust-lang/crates.io-index" 387 - checksum = "d0e2c0bf8be8a1c4a4f48973dabf26943f05da2bfc2d3180aae62409dbba6f0c" 388 - 389 - [[package]] 390 - name = "quote" 391 - version = "1.0.37" 392 - source = "registry+https://github.com/rust-lang/crates.io-index" 393 - checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" 394 - dependencies = [ 395 - "proc-macro2", 396 - ] 397 - 398 - [[package]] 399 - name = "rustc-hash" 400 - version = "1.1.0" 401 - source = "registry+https://github.com/rust-lang/crates.io-index" 402 - checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" 403 - 404 - [[package]] 405 - name = "simd-adler32" 406 - version = "0.3.7" 407 - source = "registry+https://github.com/rust-lang/crates.io-index" 408 - checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" 409 - 410 - [[package]] 411 - name = "syn" 412 - version = "2.0.87" 413 - source = "registry+https://github.com/rust-lang/crates.io-index" 414 - checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" 415 - dependencies = [ 416 - "proc-macro2", 417 - "quote", 418 - "unicode-ident", 419 - ] 420 - 421 - [[package]] 422 - name = "ttf-parser" 423 - version = "0.21.1" 424 - source = "registry+https://github.com/rust-lang/crates.io-index" 425 - checksum = "2c591d83f69777866b9126b24c6dd9a18351f177e49d625920d19f989fd31cf8" 426 - 427 - [[package]] 428 - name = "unicode-ident" 429 - version = "1.0.13" 430 - source = "registry+https://github.com/rust-lang/crates.io-index" 431 - checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" 432 - 433 - [[package]] 434 - name = "version_check" 435 - version = "0.9.5" 436 - source = "registry+https://github.com/rust-lang/crates.io-index" 437 - checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" 438 - 439 - [[package]] 440 - name = "zerocopy" 441 - version = "0.7.35" 442 - source = "registry+https://github.com/rust-lang/crates.io-index" 443 - checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" 444 - dependencies = [ 445 - "zerocopy-derive", 446 - ] 447 - 448 - [[package]] 449 - name = "zerocopy-derive" 450 - version = "0.7.35" 451 - source = "registry+https://github.com/rust-lang/crates.io-index" 452 - checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" 453 - dependencies = [ 454 - "proc-macro2", 455 - "quote", 456 - "syn", 457 - ]
-16
gba/Cargo.toml
··· 1 - [package] 2 - name = "dungeoner" 3 - version = "0.1.0" 4 - edition = "2021" 5 - 6 - [dependencies] 7 - agb = "0.21.1" 8 - 9 - [profile.dev] 10 - opt-level = 3 11 - debug = true 12 - 13 - [profile.release] 14 - opt-level = 3 15 - lto = "fat" 16 - debug = true
-3
gba/rust-toolchain.toml
··· 1 - [toolchain] 2 - channel = "nightly" 3 - components = ["rust-src", "clippy", "rustfmt"]
gba/src/dungeon.rs

This is a binary file and will not be displayed.

-13
gba/src/main.rs
··· 1 - #![no_std] 2 - #![no_main] 3 - #![cfg_attr(test, feature(custom_test_frameworks))] 4 - #![cfg_attr(test, reexport_test_harness_main = "test_main")] 5 - #![cfg_attr(test, test_runner(agb::test_runner::test_runner))] 6 - 7 - #[allow(dead_code)] 8 - mod dungeon; 9 - 10 - #[agb::entry] 11 - fn main(mut _gba: agb::Gba) -> ! { 12 - loop {} 13 - }