Skip to content

Commit

Permalink
Merge branch 'master' into work9
Browse files Browse the repository at this point in the history
  • Loading branch information
luckytyphlosion authored Sep 30, 2024
2 parents 9ad4c9c + e898671 commit e1eeb88
Show file tree
Hide file tree
Showing 120 changed files with 17,870 additions and 17,140 deletions.
51 changes: 19 additions & 32 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ ifeq (compare,$(MAKECMDGOALS))
COMPARE := 1
endif

# Default make rule
all: rom

# don't use dkP's base_tools anymore
# because the redefinition of $(CC) conflicts
# with when we want to use $(CC) to preprocess files
Expand Down Expand Up @@ -70,6 +73,10 @@ CPP := $(PREFIX)cpp
LD := $(PREFIX)ld
OBJCOPY := $(PREFIX)objcopy

# Variable filled out in other make files
AUTO_GEN_TARGETS :=
include make_tools.mk

SHA1SUM := $(shell { command -v sha1sum || command -v shasum; } 2>/dev/null) -c
GBAGFX := tools/gbagfx/gbagfx$(EXE)
RSFONT := tools/rsfont/rsfont$(EXE)
Expand Down Expand Up @@ -106,6 +113,7 @@ ELF := $(ROM:%.gba=%.elf)
SYM := $(ROM:%.gba=%.sym)

BUILD_DIR := build/$(BUILD_NAME)
DATA_ASM_SUBDIR = data

C_SOURCES := $(wildcard src/*.c src/*/*.c src/*/*/*.c)
ASM_SOURCES := $(wildcard src/*.s src/*/*.s asm/*.s data/*.s sound/*.s sound/*/*.s)
Expand Down Expand Up @@ -151,14 +159,15 @@ ALL_BUILDS := ruby ruby_debug ruby_rev1 ruby_rev2 sapphire sapphire_debug sapphi
MODERN_BUILDS := $(ALL_BUILDS:%=%_modern)

# Available targets
.PHONY: all clean mostlyclean tidy tools syms $(ALL_BUILDS)
.PHONY: all clean tidy syms $(ALL_BUILDS)

infoshell = $(foreach line, $(shell $1 | sed "s/ /__SPACE__/g"), $(info $(subst __SPACE__, ,$(line))))

# Build tools when building the rom
# Disable dependency scanning for clean/tidy/tools
ifeq (,$(filter-out all modern compare syms,$(MAKECMDGOALS)))
$(call infoshell, $(MAKE) tools)
$(call infoshell, $(MAKE) -f make_tools.mk)
$(call infoshell, $(MAKE) generated)
else
NODEP := 1
endif
Expand All @@ -184,18 +193,19 @@ MAKEFLAGS += --no-print-directory
# Create build subdirectories
$(shell mkdir -p $(SUBDIRS))

AUTO_GEN_TARGETS :=
# Pretend rules that are actually flags defer to `make all`
modern: all
compare: all

all: $(ROM)
# Other rules
rom: $(ROM)
ifeq ($(COMPARE),1)
@$(SHA1SUM) $(BUILD_NAME).sha1
endif

compare: ; @$(MAKE) COMPARE=1

syms: $(SYM)

mostlyclean: tidy
clean: tidy
find sound/direct_sound_samples \( -iname '*.bin' \) -exec rm {} +
$(RM) $(ALL_OBJECTS)
find . \( -iname '*.1bpp' -o -iname '*.4bpp' -o -iname '*.8bpp' -o -iname '*.gbapal' -o -iname '*.lz' -o -iname '*.rl' \) -exec rm {} +
Expand All @@ -204,31 +214,6 @@ mostlyclean: tidy
find data/maps \( -iname 'connections.inc' -o -iname 'events.inc' -o -iname 'header.inc' \) -exec rm {} +
rm -f $(AUTO_GEN_TARGETS)

clean: mostlyclean
$(MAKE) clean -C tools/gbagfx
$(MAKE) clean -C tools/scaninc
$(MAKE) clean -C tools/preproc
$(MAKE) clean -C tools/bin2c
$(MAKE) clean -C tools/rsfont
$(MAKE) clean -C tools/aif2pcm
$(MAKE) clean -C tools/ramscrgen
$(MAKE) clean -C tools/gbafix
$(MAKE) clean -C tools/mapjson
$(MAKE) clean -C tools/jsonproc

tools:
@$(MAKE) -C tools/gbagfx
@$(MAKE) -C tools/scaninc
@$(MAKE) -C tools/preproc
@$(MAKE) -C tools/bin2c
@$(MAKE) -C tools/rsfont
@$(MAKE) -C tools/aif2pcm
@$(MAKE) -C tools/ramscrgen
@$(MAKE) -C tools/mid2agb
@$(MAKE) -C tools/gbafix
@$(MAKE) -C tools/mapjson
@$(MAKE) -C tools/jsonproc

tidy:
$(RM) $(ALL_BUILDS:%=poke%{.gba,.elf,.map})
$(RM) $(MODERN_BUILDS:%=poke%{.gba,.elf,.map})
Expand Down Expand Up @@ -323,6 +308,8 @@ include override.mk
include map_data_rules.mk
include json_data_rules.mk

generated: $(AUTO_GEN_TARGETS)

%.1bpp: %.png ; $(GBAGFX) $< $@ $(GFX_OPTS)
%.4bpp: %.png ; $(GBAGFX) $< $@ $(GFX_OPTS)
%.8bpp: %.png ; $(GBAGFX) $< $@ $(GFX_OPTS)
Expand Down
23 changes: 1 addition & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,7 @@ It builds the following roms:

To set up the repository, see [INSTALL.md](INSTALL.md).

## See also
For contacts and other pret projects, see [pret.github.io](https://pret.github.io/).

* Disassembly of [**Pokémon Red/Blue**][pokered]
* Disassembly of [**Pokémon Yellow**][pokeyellow]
* Disassembly of [**Pokémon Gold**][pokegold]
* Disassembly of [**Pokémon Crystal**][pokecrystal]
* Disassembly of [**Pokémon Pinball**][pokepinball]
* Disassembly of [**Pokémon TCG**][poketcg]
* Disassembly of [**Pokémon Fire Red**][pokefirered]
* Disassembly of [**Pokémon Emerald**][pokeemerald]
* Discord: [**pret**][Discord]
* irc: **irc.libera.net** [**#pret**][irc]

[pokered]: https://github.com/pret/pokered
[pokeyellow]: https://github.com/pret/pokeyellow
[pokegold]: https://github.com/pret/pokegold
[pokecrystal]: https://github.com/pret/pokecrystal
[pokepinball]: https://github.com/pret/pokepinball
[poketcg]: https://github.com/pret/poketcg
[pokefirered]: https://github.com/pret/pokefirered
[pokeemerald]: https://github.com/pret/pokeemerald
[Discord]: https://discord.gg/d5dubZ3
[irc]: https://web.libera.chat/?#pret
[travis]: https://travis-ci.org/pret/pokeruby
[travis-badge]: https://travis-ci.org/pret/pokeruby.svg?branch=master
2 changes: 1 addition & 1 deletion data-de/event_scripts.s
Original file line number Diff line number Diff line change
Expand Up @@ -660,11 +660,11 @@ gStdScripts_End::
.include "data/maps/AbandonedShip_Corridors_1F/text.inc"
.include "data/maps/AbandonedShip_Rooms_1F/text.inc"
.include "data/maps/AbandonedShip_Corridors_B1F/text.inc"
.include "data/maps/AbandonedShip_HiddenFloorCorridors/text.inc"
.include "data/maps/AbandonedShip_Rooms_B1F/text.inc"
.include "data/maps/AbandonedShip_Rooms2_B1F/text.inc"
.include "data/maps/AbandonedShip_Rooms2_1F/text.inc"
.include "data/maps/AbandonedShip_CaptainsOffice/text.inc"
.include "data/maps/AbandonedShip_HiddenFloorCorridors/text.inc"
.include "data/maps/AbandonedShip_HiddenFloorRooms/text.inc"
.include "data/maps/SecretBase_RedCave1/text.inc"
.include "data/maps/InsideOfTruck/text.inc"
Expand Down
15 changes: 9 additions & 6 deletions data-de/maps/AbandonedShip_Corridors_B1F/text.inc
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
AbandonedShip_Corridors_B1F_Text_19856F:: @ 819856F
AbandonedShip_Corridors_B1F_Text_DuncanIntro::
.string "Wenn wir zur See fahren, nehmen wir\n"
.string "MATROSEN immer unsere POKéMON mit.\l"
.string "Wie wäre es mit einem schnellen Kampf?$"

AbandonedShip_Corridors_B1F_Text_1985C5:: @ 81985C5
AbandonedShip_Corridors_B1F_Text_DuncanDefeat::
.string "Huups, da bin ich abgesoffen.$"

AbandonedShip_Corridors_B1F_Text_1985D7:: @ 81985D7
AbandonedShip_Corridors_B1F_Text_DuncanPostBattle::
.string "Der Schiffsrumpf liegt tief unter der\n"
.string "Wasserlinie.\p"
.string "Wenn ein POKéMON wissen würde, wie\n"
.string "man taucht, würden wir Fortschritte\l"
.string "machen.$"

AbandonedShip_Corridors_B1F_Text_19864A:: @ 819864A
AbandonedShip_Corridors_B1F_Text_YayItsAShip::
.string "Jahaa!\n"
.string "Ein Schiff!$"

AbandonedShip_Corridors_B1F_Text_19865C:: @ 819865C
AbandonedShip_Corridors_B1F_Text_DoorIsLocked::
.string "Die Tür ist verschlossen.\p"
.string "“LAGER” steht auf dem Schild.$"

AbandonedShip_Corridors_B1F_Text_198692:: @ 8198692
AbandonedShip_Corridors_B1F_Text_InsertedStorageKey::
.string "{PLAYER} steckt den SCHLÜSSEL zum\n"
.string "LAGER ins Schlüsselloch und dreht ihn.\p"
.string "Der SCHLÜSSEL ist schwergängig, aber\n"
.string "das Schloss lässt sich öffnen.$"

AbandonedShip_Text_TheDoorIsOpen::
.string "Die Tür ist offen.$"
24 changes: 21 additions & 3 deletions data-de/maps/AbandonedShip_HiddenFloorCorridors/text.inc
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
AbandonedShip_Corridors_B1F_Text_1986EC:: @ 81986EC
AbandonedShip_HiddenFloorCorridors_Text_1986EC:: @ 81986EC
.string "Die Tür ist offen.$"
AbandonedShip_HiddenFloorCorridors_Text_Rm1DoorIsLocked::
.string "Die Tür ist verschlossen.\p"
.string "“K. 1” steht auf der Tür.$"

AbandonedShip_HiddenFloorCorridors_Text_Rm2DoorIsLocked::
.string "Die Tür ist verschlossen.\p"
.string "“K. 2” steht auf der Tür.$"

AbandonedShip_HiddenFloorCorridors_Text_Rm4DoorIsLocked::
.string "Die Tür ist verschlossen.\p"
.string "“K. 4” steht auf der Tür.$"

AbandonedShip_HiddenFloorCorridors_Text_Rm6DoorIsLocked::
.string "Die Tür ist verschlossen.\p"
.string "“K. 6” steht auf der Tür.$"

AbandonedShip_HiddenFloorCorridors_Text_InsertedKey::
.string "{PLAYER} steckt den SCHLÜSSEL ins\n"
.string "Schloss und dreht ihn um.\p"
.string "Der SCHLÜSSEL ist schwergängig, aber\n"
.string "die Tür öffnet sich.$"
38 changes: 3 additions & 35 deletions data-de/maps/AbandonedShip_HiddenFloorRooms/text.inc
Original file line number Diff line number Diff line change
@@ -1,35 +1,3 @@
AbandonedShip_HiddenFloorCorridors_Text_198DC0:: @ 8198DC0
.string "Die Tür ist verschlossen.\p"
.string "“K. 1” steht auf der Tür.$"

AbandonedShip_HiddenFloorCorridors_Text_198DF4:: @ 8198DF4
.string "Die Tür ist verschlossen.\p"
.string "“K. 2” steht auf der Tür.$"

AbandonedShip_HiddenFloorCorridors_Text_198E28:: @ 8198E28
.string "Die Tür ist verschlossen.\p"
.string "“K. 4” steht auf der Tür.$"

AbandonedShip_HiddenFloorCorridors_Text_198E5C:: @ 8198E5C
.string "Die Tür ist verschlossen.\p"
.string "“K. 6” steht auf der Tür.$"

AbandonedShip_HiddenFloorCorridors_Text_198E90:: @ 8198E90
.string "{PLAYER} steckt den SCHLÜSSEL ins\n"
.string "Schloss und dreht ihn um.\p"
.string "Der SCHLÜSSEL ist schwergängig, aber\n"
.string "die Tür öffnet sich.$"

AbandonedShip_HiddenFloorRooms_Text_198EE2:: @ 8198EE2
.string "Es ist hell und glänzend!\n"
.string "Aber es ist trotzdem nur Müll...$"

UnknownString_8198F10: @ 8198F10
.string "In der Wand ist eine kleine Einkerbung.$"

UnknownString_8198F34: @ 8198F34
.string "In der Wand ist eine kleine Einkerbung.\p"
.string "Möchtest du GEHEIMPOWER einsetzen?$"

UnknownString_8198F6E: @ 8198F6E
.string "Eine kleine Höhle wird sichtbar.$"
AbandonedShip_HiddenFloorRooms_Text_BrightShinyTrash::
.string "Es ist hell und glänzend!\n"
.string "Aber es ist trotzdem nur Müll...$"
12 changes: 11 additions & 1 deletion data-de/maps/SecretBase_RedCave1/text.inc
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
SecretBase_RedCave1_Text_198F89:: @ 8198F89
SecretBase_Text_SmallIndentInWall:
.string "In der Wand ist eine kleine Einkerbung.$"

SecretBase_Text_IndentUseSecretPower:
.string "In der Wand ist eine kleine Einkerbung.\p"
.string "Möchtest du GEHEIMPOWER einsetzen?$"

SecretBase_Text_DiscoveredSmallCavern:
.string "Eine kleine Höhle wird sichtbar.$"

SecretBase_Text_WantToMakeYourSecretBaseHere::
.string "Möchtest du hier deine GEHEIMBASIS\n"
.string "einrichten?$"
2 changes: 1 addition & 1 deletion data/event_scripts.s
Original file line number Diff line number Diff line change
Expand Up @@ -660,11 +660,11 @@ gStdScripts_End::
.include "data/maps/AbandonedShip_Corridors_1F/text.inc"
.include "data/maps/AbandonedShip_Rooms_1F/text.inc"
.include "data/maps/AbandonedShip_Corridors_B1F/text.inc"
.include "data/maps/AbandonedShip_HiddenFloorCorridors/text.inc"
.include "data/maps/AbandonedShip_Rooms_B1F/text.inc"
.include "data/maps/AbandonedShip_Rooms2_B1F/text.inc"
.include "data/maps/AbandonedShip_Rooms2_1F/text.inc"
.include "data/maps/AbandonedShip_CaptainsOffice/text.inc"
.include "data/maps/AbandonedShip_HiddenFloorCorridors/text.inc"
.include "data/maps/AbandonedShip_HiddenFloorRooms/text.inc"
.include "data/maps/SecretBase_RedCave1/text.inc"
.include "data/maps/InsideOfTruck/text.inc"
Expand Down
1 change: 1 addition & 0 deletions data/maps.s
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "constants/global.h"
#include "constants/layouts.h"
#include "constants/map_types.h"
#include "constants/maps.h"
Expand Down
6 changes: 3 additions & 3 deletions data/maps/AbandonedShip_Corridors_B1F/map.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"movement_range_y": 1,
"trainer_type": "TRAINER_TYPE_NONE",
"trainer_sight_or_berry_tree_id": "0",
"script": "AbandonedShip_Corridors_B1F_EventScript_15E9CA",
"script": "AbandonedShip_Corridors_B1F_EventScript_TuberM",
"flag": "0"
},
{
Expand All @@ -34,7 +34,7 @@
"movement_range_y": 0,
"trainer_type": "TRAINER_TYPE_NORMAL",
"trainer_sight_or_berry_tree_id": "4",
"script": "AbandonedShip_Corridors_B1F_EventScript_15EA1E",
"script": "AbandonedShip_Corridors_B1F_EventScript_Duncan",
"flag": "0"
}
],
Expand Down Expand Up @@ -104,7 +104,7 @@
"y": 4,
"elevation": 3,
"player_facing_dir": "BG_EVENT_PLAYER_FACING_ANY",
"script": "AbandonedShip_Corridors_B1F_EventScript_15E9D3"
"script": "AbandonedShip_Corridors_B1F_EventScript_StorageRoomDoor"
}
]
}
50 changes: 25 additions & 25 deletions data/maps/AbandonedShip_Corridors_B1F/scripts.inc
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
AbandonedShip_Corridors_B1F_MapScripts:: @ 815E98F
map_script MAP_SCRIPT_ON_RESUME, AbandonedShip_Corridors_B1F_MapScript1_15E99A
map_script MAP_SCRIPT_ON_LOAD, AbandonedShip_Corridors_B1F_MapScript1_15E9A3
AbandonedShip_Corridors_B1F_MapScripts::
map_script MAP_SCRIPT_ON_RESUME, AbandonedShip_Corridors_B1F_OnResume
map_script MAP_SCRIPT_ON_LOAD, AbandonedShip_Corridors_B1F_OnLoad
.byte 0

AbandonedShip_Corridors_B1F_MapScript1_15E99A:: @ 815E99A
AbandonedShip_Corridors_B1F_OnResume::
setdivewarp MAP_ABANDONED_SHIP_UNDERWATER1, 255, 5, 4
end

AbandonedShip_Corridors_B1F_MapScript1_15E9A3:: @ 815E9A3
call_if_unset FLAG_USED_STORAGE_KEY, AbandonedShip_Corridors_B1F_EventScript_15E9B6
call_if_set FLAG_USED_STORAGE_KEY, AbandonedShip_Corridors_B1F_EventScript_15E9C0
AbandonedShip_Corridors_B1F_OnLoad::
call_if_unset FLAG_USED_STORAGE_KEY, AbandonedShip_Corridors_B1F_EventScript_LockStorageRoom
call_if_set FLAG_USED_STORAGE_KEY, AbandonedShip_Corridors_B1F_EventScript_UnlockStorageRoom
end

AbandonedShip_Corridors_B1F_EventScript_15E9B6:: @ 815E9B6
setmetatile 11, 4, METATILE_InsideShip_InTactDoor0_Bottom, 1
AbandonedShip_Corridors_B1F_EventScript_LockStorageRoom::
setmetatile 11, 4, METATILE_Facility_IntactDoor_Bottom_Locked, TRUE
return

AbandonedShip_Corridors_B1F_EventScript_15E9C0:: @ 815E9C0
setmetatile 11, 4, METATILE_InsideShip_InTactDoor1_Bottom, 1
AbandonedShip_Corridors_B1F_EventScript_UnlockStorageRoom::
setmetatile 11, 4, METATILE_Facility_IntactDoor_Bottom_Unlocked, TRUE
return

AbandonedShip_Corridors_B1F_EventScript_15E9CA:: @ 815E9CA
msgbox AbandonedShip_Corridors_B1F_Text_19864A, MSGBOX_NPC
AbandonedShip_Corridors_B1F_EventScript_TuberM::
msgbox AbandonedShip_Corridors_B1F_Text_YayItsAShip, MSGBOX_NPC
end

AbandonedShip_Corridors_B1F_EventScript_15E9D3:: @ 815E9D3
AbandonedShip_Corridors_B1F_EventScript_StorageRoomDoor::
lockall
goto_if_set FLAG_USED_STORAGE_KEY, AbandonedShip_Corridors_B1F_EventScript_15EA14
goto_if_set FLAG_USED_STORAGE_KEY, AbandonedShip_Corridors_B1F_EventScript_DoorIsUnlocked
checkitem ITEM_STORAGE_KEY, 1
compare VAR_RESULT, 0
goto_if_eq AbandonedShip_Corridors_B1F_EventScript_15EA0A
msgbox AbandonedShip_Corridors_B1F_Text_198692, MSGBOX_DEFAULT
goto_if_eq AbandonedShip_Corridors_B1F_EventScript_DoorIsLocked
msgbox AbandonedShip_Corridors_B1F_Text_InsertedStorageKey, MSGBOX_DEFAULT
playse SE_PIN
removeitem ITEM_STORAGE_KEY, 1
setflag FLAG_USED_STORAGE_KEY
call AbandonedShip_Corridors_B1F_EventScript_15E9C0
call AbandonedShip_Corridors_B1F_EventScript_UnlockStorageRoom
special DrawWholeMapView
releaseall
end

AbandonedShip_Corridors_B1F_EventScript_15EA0A:: @ 815EA0A
msgbox AbandonedShip_Corridors_B1F_Text_19865C, MSGBOX_DEFAULT
AbandonedShip_Corridors_B1F_EventScript_DoorIsLocked::
msgbox AbandonedShip_Corridors_B1F_Text_DoorIsLocked, MSGBOX_DEFAULT
releaseall
end

AbandonedShip_Corridors_B1F_EventScript_15EA14:: @ 815EA14
msgbox AbandonedShip_Corridors_B1F_Text_1986EC, MSGBOX_DEFAULT
AbandonedShip_Corridors_B1F_EventScript_DoorIsUnlocked::
msgbox AbandonedShip_Text_TheDoorIsOpen, MSGBOX_DEFAULT
releaseall
end

AbandonedShip_Corridors_B1F_EventScript_15EA1E:: @ 815EA1E
trainerbattle_single TRAINER_DUNCAN, AbandonedShip_Corridors_B1F_Text_19856F, AbandonedShip_Corridors_B1F_Text_1985C5
msgbox AbandonedShip_Corridors_B1F_Text_1985D7, MSGBOX_AUTOCLOSE
AbandonedShip_Corridors_B1F_EventScript_Duncan::
trainerbattle_single TRAINER_DUNCAN, AbandonedShip_Corridors_B1F_Text_DuncanIntro, AbandonedShip_Corridors_B1F_Text_DuncanDefeat
msgbox AbandonedShip_Corridors_B1F_Text_DuncanPostBattle, MSGBOX_AUTOCLOSE
end
Loading

0 comments on commit e1eeb88

Please sign in to comment.