Merge remote-tracking branch 'upstream/master' into tilemap-docs

This commit is contained in:
octorock
2023-05-31 23:51:20 +02:00
254 changed files with 4013 additions and 4939 deletions
+163
View File
@@ -0,0 +1,163 @@
.PHONY: default
default:
@echo do not use this directly
include Toolchain.mk
GAME_VERSION ?= USA
BUILD_DIR = build/$(GAME_VERSION)
TITLE := GBAZELDA MC
MAKER_CODE := 01
REVISION := 0
ifeq ($(GAME_VERSION), EU)
GAME_CODE := BZMP
BUILD_NAME := tmc_eu
GAME_LANGUAGE := ENGLISH
TRANSLATIONS := translations/English.bin translations/French.bin translations/German.bin translations/Spanish.bin translations/Italian.bin
else ifeq ($(GAME_VERSION), JP)
GAME_CODE := BZMJ
BUILD_NAME := tmc_jp
GAME_LANGUAGE := JAPANESE
TRANSLATIONS :=
else ifeq ($(GAME_VERSION), USA)
GAME_CODE := BZME
BUILD_NAME := tmc
GAME_LANGUAGE := ENGLISH
TRANSLATIONS := translations/USA.bin
else ifeq ($(GAME_VERSION), DEMO_USA)
GAME_CODE := BZHE
BUILD_NAME := tmc_demo_usa
GAME_LANGUAGE := ENGLISH
TRANSLATIONS := translations/USA.bin
else ifeq ($(GAME_VERSION), DEMO_JP)
GAME_CODE := BZMJ
BUILD_NAME := tmc_demo_jp
GAME_LANGUAGE := JAPANESE
TRANSLATIONS :=
else
$(error unknown version $(GAME_VERSION))
endif
ROM = $(BUILD_NAME).gba
ELF = $(BUILD_NAME).elf
# Clear the default suffixes
.SUFFIXES:
# Don't delete intermediate files
.SECONDARY:
# Delete files that weren't built properly
.DELETE_ON_ERROR:
# Secondary expansion is required for dependency variables in object rules.
.SECONDEXPANSION:
# ==================
# entrypoint targets
# ==================
CUSTOM ?=
COMPARE ?= $(if $(CUSTOM),0,1)
.PHONY: build extract_assets build_assets
build: $(if $(CUSTOM), build_assets, $(BUILD_DIR)/extracted_assets_$(GAME_VERSION))
@$(MAKE) -f GBA.mk $(ROM)
ifeq ($(COMPARE), 1)
@$(SHA1) $(BUILD_NAME).sha1
endif
extract_assets: $(BUILD_DIR)/converted_assets_$(GAME_VERSION)
# TODO this is slow, especially on builds with minor/no changes
build_assets: $(BUILD_DIR)/converted_assets_$(GAME_VERSION)
$(ASSET_PROCESSOR) build $(GAME_VERSION) $(BUILD_DIR)/assets
.PHONY: clean
clean:
rm -rf build
rm -f t*.gba
rm -f t*.elf
# ===============
# build ASM files
# ===============
ASINCLUDE := -I $(BUILD_DIR)/assets -I $(BUILD_DIR)/enum_include
ASFLAGS := -mcpu=arm7tdmi --defsym $(GAME_VERSION)=1 --defsym REVISION=$(REVISION) --defsym $(GAME_LANGUAGE)=1 $(ASINCLUDE)
# TODO try solve this without the glob
ENUM_ASM_SRCS := $(wildcard include/*.h)
ENUM_ASM_HEADERS := $(patsubst include/%.h,$(BUILD_DIR)/enum_include/%.inc,$(ENUM_ASM_SRCS))
# if this is too broad dependency scanning will clash with C file
$(BUILD_DIR)/asm/%.o: deps = $(shell $(SCANINC) -I . $(ASINCLUDE) $*.s)
$(BUILD_DIR)/data/%.o: deps = $(shell $(SCANINC) -I . $(ASINCLUDE) $*.s)
$(BUILD_DIR)/%.o: %.s $$(deps) $(ENUM_ASM_HEADERS)
@mkdir -p $(dir $@)
$(PREPROC) $(BUILD_NAME) $< -- $(ASINCLUDE) | $(AS) $(ASFLAGS) -o $@
$(BUILD_DIR)/enum_include/%.inc: include/%.h
@mkdir -p $(dir $@)
$(ENUM_PROCESSOR) $< $(CC) "-D__attribute__(x)=" "-D$(GAME_VERSION)" "-E" "-nostdinc" "-Itools/agbcc" "-Itools/agbcc/include" "-iquote include" > $@
# =============
# build C files
# =============
# agbcc includes are separate because we don't want dependency scanning on them
CINCLUDE := -I include -I $(BUILD_DIR)
CPPFLAGS := -I tools/agbcc -I tools/agbcc/include $(CINCLUDE) -nostdinc -undef -D$(GAME_VERSION) -DREVISION=$(REVISION) -D$(GAME_LANGUAGE)
CFLAGS := -O2 -Wimplicit -Wparentheses -Werror -Wno-multichar -g3
interwork := $(BUILD_DIR)/src/interrupts.o \
$(BUILD_DIR)/src/collision.o \
$(BUILD_DIR)/src/playerItem.o \
$(BUILD_DIR)/src/object.o \
$(BUILD_DIR)/src/manager.o \
$(BUILD_DIR)/src/npc.o \
$(BUILD_DIR)/src/gba/m4a.o
$(interwork): CFLAGS += -mthumb-interwork
$(BUILD_DIR)/src/eeprom.o: CFLAGS += -O1 -mthumb-interwork
# if this is too broad dependency scanning will clash with ASM file
$(BUILD_DIR)/src/%.o: deps = $(shell $(SCANINC) $(CINCLUDE) $*.c)
$(BUILD_DIR)/%.o : %.c $$(deps)
@mkdir -p $(dir $@)
$(CPP) $(CPPFLAGS) $< -o $(BUILD_DIR)/$*.i
$(CC1) $(CFLAGS) -o $(BUILD_DIR)/$*.s $(BUILD_DIR)/$*.i
@printf "\t.text\n\t.align\t2, 0 @ Don't pad with nop\n" >> $(BUILD_DIR)/$*.s
$(AS) $(ASFLAGS) -o $@ $(BUILD_DIR)/$*.s
# ==============
# build binaries
# ==============
LDFLAGS = -Map ../../$(BUILD_DIR)/$(BUILD_NAME).map
LIB := -L ../../tools/agbcc/lib -lc
$(ROM): $(ELF)
$(OBJCOPY) -O binary --gap-fill 0xFF --pad-to 0x9000000 $< $@
$(ELF): objs = $(shell grep -vE "\*\w+\.a" linker.ld | grep -oE "(\w|/)+\.o")
$(ELF): $(BUILD_DIR)/linker.ld $$(addprefix $(BUILD_DIR)/, $$(objs))
cd $(BUILD_DIR) && $(LD) $(LDFLAGS) -n -T linker.ld -o ../../$@ $(LIB)
$(FIX) $@ -t"$(TITLE)" -c$(GAME_CODE) -m$(MAKER_CODE) -r$(REVISION) --silent
$(BUILD_DIR)/linker.ld: linker.ld
@mkdir -p $(BUILD_DIR)
$(CPP) $(CPPFLAGS) -x c linker.ld | grep -v '^#' >$(BUILD_DIR)/linker.ld
# ======
# assets
# ======
$(BUILD_DIR)/extracted_assets_%: assets/assets.json assets/gfx.json assets/map.json assets/samples.json assets/sounds.json $(TRANSLATIONS)
@mkdir -p $(dir $@)
$(ASSET_PROCESSOR) extract $(GAME_VERSION) $(BUILD_DIR)/assets
touch $@
$(BUILD_DIR)/converted_assets_%: $(BUILD_DIR)/extracted_assets_%
@mkdir -p $(dir $@)
$(ASSET_PROCESSOR) convert $(GAME_VERSION) $(BUILD_DIR)/assets
touch $@
translations/%.bin: translations/%.json
tools/bin/tmc_strings -p --source $< --dest $@
+50 -36
View File
@@ -1,14 +1,22 @@
# Install
First, you must put a The Legend of Zelda: The Minish Cap (U) ROM (with SHA1: `b4bd50e4131b027c334547b4524e2dbbd4227130`) in the root directory of the repository and name it `baserom.gba`.
This repository does not include any of the games assets.
To build the game using the decomp you need an original baserom for each version you want to build.
Put them with the appropriate filename into the repository root directory.
The supported versions are:
## Building other variants
To build other variants, you need to place the corresponding baserom before building, e.g. `baserom_jp.gba` for JP.
| Version | Filename | SHA1 |
|-----------------------|------------------------|--------------------------------------------|
| USA (project default) | `baserom.gba` | `b4bd50e4131b027c334547b4524e2dbbd4227130` |
| EU | `baserom_eu.gba` | `cff199b36ff173fb6faf152653d1bccf87c26fb7` |
| JP | `baserom_jp.gba` | `6c5404a1effb17f481f352181d0f1c61a2765c5d` |
| USA (Demo) | `baserom_demo_usa.gba` | `63fcad218f9047b6a9edbb68c98bd0dec322d7a1` |
| JP (Demo) | `baserom_demo_jp.gba` | `9cdb56fa79bba13158b81925c1f3641251326412` |
## Prerequisites
| Linux | macOS | Windows 10 (build 18917+) | Windows 10 (1709+) | Windows 8, 8.1, and 10 (1507, 1511, 1607, 1703)
| ----- | ----- | ------------------------- | ------------------ | ---------------------------------------------------------
| none | [Xcode Command Line Tools package][xcode] | [Windows Subsystem for Linux 2][wsl2] | [Windows Subsystem for Linux][wsl] | [Cygwin][cygwin]
| Linux | macOS | Windows 10 (build 18917+) | Windows 10 (1709+) | Windows 8, 8.1, and 10 (1507, 1511, 1607, 1703) |
|-------|-------------------------------------------|---------------------------------------|------------------------------------|-------------------------------------------------|
| none | [Xcode Command Line Tools package][xcode] | [Windows Subsystem for Linux 2][wsl2] | [Windows Subsystem for Linux][wsl] | [Cygwin][cygwin] |
[xcode]: https://developer.apple.com/library/archive/technotes/tn2339/_index.html#//apple_ref/doc/uid/DTS40014588-CH1-DOWNLOADING_COMMAND_LINE_TOOLS_IS_NOT_AVAILABLE_IN_XCODE_FOR_MACOS_10_9__HOW_CAN_I_INSTALL_THEM_ON_MY_MACHINE_
[wsl2]: https://docs.microsoft.com/windows/wsl/wsl2-install
@@ -17,53 +25,59 @@ To build other variants, you need to place the corresponding baserom before buil
The [prerelease version of the Linux subsystem](https://docs.microsoft.com/windows/wsl/install-legacy) available in the 1607 and 1703 releases of Windows 10 is obsolete so consider uninstalling it.
Make sure that the `build-essential`, `git`, `python3`, `python3-pip`, `cmake` and `libpng-dev` packages are installed. The `build-essential` package includes the `make`, `gcc-core`, and `g++` packages so they do not have to be obtained separately.
Make sure that the `build-essential`, `git`, `python3`, `python3-pip`, `cmake` and `libpng-dev` packages are installed. The `build-essential` package includes the `make`, `gcc-core`, and `g++` packages, so they do not have to be obtained separately.
In the case of Cygwin, [include](https://cygwin.com/cygwin-ug-net/setup-net.html#setup-packages) the `make`, `git`, `gcc-core`, `gcc-g++`, and `libpng-devel` packages.
Install the **devkitARM** toolchain of [devkitPro](https://devkitpro.org/wiki/Getting_Started) and add its environment variables. For Windows versions without the Linux subsystem, the devkitPro [graphical installer](https://github.com/devkitPro/installer/releases) includes a preconfigured MSYS2 environment, thus the steps below are not required.
To build the games code, the `arm-none-eabi-gcc` compiler is required.
Both a standalone installation and [devkitPro](https://devkitpro.org/wiki/Getting_Started) are supported.
For devkitPro, install the `gba-dev` package.
sudo (dkp-)pacman -S gba-dev
export DEVKITPRO=/opt/devkitpro
echo "export DEVKITPRO=$DEVKITPRO" >> ~/.bashrc
export DEVKITARM=$DEVKITPRO/devkitARM
echo "export DEVKITARM=$DEVKITARM" >> ~/.bashrc
If `arm-none-eabi-gcc` is not available through `PATH` use `TOOLCHAIN_PATH=<path>` to indicate its location.
This is not required for devkitPro, the `DEVKITARM` environment variable is used for auto-detection.
Install the pycparser python package:
pip3 install pycparser
Install `python3` and the `pycparser` python package:
`pip3 install pycparser`
## Installation
To set up the repository:
```shell
git clone https://github.com/zeldaret/tmc
git clone https://github.com/pret/agbcc
git clone https://github.com/zeldaret/tmc
git clone https://github.com/pret/agbcc
cd ./agbcc
sh build.sh
sh install.sh ../tmc
cd ./agbcc
sh build.sh
sh install.sh ../tmc
cd ../tmc
make tools
```
To build `tmc.gba`:
```shell
make -j$(nproc)
```
>**Note:** If the build command is not recognized on Linux, including the Linux environment used within Windows, run `nproc` and replace `$(nproc)` with the returned value (e.g.: `make -j4`). Because `nproc` is not available on macOS, the alternative is `sysctl -n hw.ncpu`.
cd ../tmc
make setup
You can configure the game version built by using the `GAME_VERSION` variable (ie. `make GAME_VERSION=EU`).
Convenience targets for all 5 versions exist (`make usa eu jp demo_usa demo_jp`).
`make all` builds all 5 versions.
To build **tmc.gba**:
If you modify the game you need to do a custom build.
Use `CUSTOM=1` for that (any nonempty value will enable it, so `CUSTOM=0` will NOT disable it).
There is a convenience target `make custom` that does a custom USA build.
make -j$(nproc)
If only `.c` or `.s` files were changed, turn off the dependency scanning temporarily. Changes to any other files will be ignored and the build will either fail or not reflect those changes.
make -j$(nproc) NODEP=1
**Note:** If the build command is not recognized on Linux, including the Linux environment used within Windows, run `nproc` and replace `$(nproc)` with the returned value (e.g.: `make -j4`). Because `nproc` is not available on macOS, the alternative is `sysctl -n hw.ncpu`.
The `COMPARE` variable controls the SHA1 verification check.
It is enabled (`1`) for normal builds and disabled (`0`) for custom builds by default.
### Note for Mac users
The BSD make that comes with Mac XCode can be buggy, so obtain GNU make and sed using [Homebrew](https://brew.sh):
brew install make gnu-sed
```shell
brew install make gnu-sed
```
When compiling agbcc, substitute the `build.sh` line for
gsed 's/^make/gmake/g' build.sh | sh
```shell
gsed 's/^make/gmake/g' build.sh | sh
```
Finally, use `gmake` instead of `make` to compile the ROM(s).
Vendored
+2 -2
View File
@@ -12,12 +12,12 @@ pipeline {
sh 'cp /usr/local/etc/roms/tmc.demo.jp.gba baserom_demo_jp.gba'
sh 'cp /usr/local/etc/roms/tmc.jp.gba baserom_jp.gba'
sh 'cp /usr/local/etc/roms/tmc.eu.gba baserom_eu.gba'
sh 'make -j setup'
sh 'make tools'
}
}
stage('Build') {
steps {
sh 'make usa demo_usa jp demo_jp eu -j'
sh 'make all -j'
}
}
stage('Report Progress') {
+26 -279
View File
@@ -1,294 +1,41 @@
include $(DEVKITARM)/base_tools
COMPARE ?= 0
CPP := $(CC) -E
LD := $(DEVKITARM)/bin/arm-none-eabi-ld
GAME_VERSION ?= USA
REVISION := 0
GAME_LANGUAGE := ENGLISH
TITLE := GBAZELDA MC
MAKER_CODE := 01
ifeq ($(GAME_VERSION), USA)
GAME_CODE := BZME
BUILD_NAME := tmc
else
ifeq ($(GAME_VERSION), DEMO_USA)
GAME_CODE := BZHE
BUILD_NAME := tmc_demo_usa
else
ifeq ($(GAME_VERSION), JP)
GAME_CODE := BZMJ
BUILD_NAME := tmc_jp
GAME_LANGUAGE := JAPANESE
else
ifeq ($(GAME_VERSION), DEMO_JP)
GAME_CODE := BZMJ
BUILD_NAME := tmc_demo_jp
GAME_LANGUAGE := JAPANESE
else
ifeq ($(GAME_VERSION), EU)
GAME_CODE := BZMP
BUILD_NAME := tmc_eu
else
$(error unknown version $(GAME_VERSION))
endif
endif
endif
endif
endif
SHELL := /bin/bash -o pipefail
ROM := $(BUILD_NAME).gba
OBJ_DIR := build/$(BUILD_NAME)
ELF = $(ROM:.gba=.elf)
MAP = $(ROM:.gba=.map)
C_SUBDIR = src
DATA_C_SUBDIR = src/data
ASM_SUBDIR = asm
DATA_ASM_SUBDIR = data
SONG_SUBDIR = sound/songs
MID_SUBDIR = sound/songs/midi
ASSET_SUBDIR = assets
ENUM_INCLUDE_SUBDIR = enum_include
C_BUILDDIR = $(OBJ_DIR)/$(C_SUBDIR)
ASM_BUILDDIR = $(OBJ_DIR)/$(ASM_SUBDIR)
ASM_ENUM_INCLUDE_DIR = $(ASM_BUILDDIR)/$(ENUM_INCLUDE_SUBDIR)
DATA_ASM_BUILDDIR = $(OBJ_DIR)/$(DATA_ASM_SUBDIR)
SONG_BUILDDIR = $(OBJ_DIR)/$(SONG_SUBDIR)
MID_BUILDDIR = $(OBJ_DIR)/$(MID_SUBDIR)
ASSET_BUILDDIR = $(OBJ_DIR)/$(ASSET_SUBDIR)
PREPROC_INC_PATHS = $(ASSET_BUILDDIR) $(ASM_ENUM_INCLUDE_DIR)
ASFLAGS := -mcpu=arm7tdmi --defsym $(GAME_VERSION)=1 --defsym REVISION=$(REVISION) --defsym $(GAME_LANGUAGE)=1 -I $(ASSET_SUBDIR) -I $(ASSET_BUILDDIR) -I $(ASM_ENUM_INCLUDE_DIR)
CC1 := tools/agbcc/bin/agbcc
override CFLAGS += -O2 -Wimplicit -Wparentheses -Werror -Wno-multichar -g3
# -fhex-asm
# ifeq ($(DINFO),1)
# override CFLAGS += -g
# endif
CPPFLAGS := -I tools/agbcc -I tools/agbcc/include -iquote include -nostdinc -undef -D$(GAME_VERSION) -DREVISION=$(REVISION) -D$(GAME_LANGUAGE) -I $(OBJ_DIR)
LDFLAGS = -Map ../../$(MAP)
LIB := -L ../../tools/agbcc/lib -lc
SHA1 := $(shell { command -v sha1sum || command -v shasum; } 2>/dev/null) -c
GFX := tools/bin/gbagfx
AIF := tools/bin/aif2pcm
MID := tools/bin/mid2agb
SCANINC := tools/bin/scaninc
# TODO: use charmap?
PREPROC := tools/bin/preproc
FIX := tools/bin/gbafix
ASSET_PROCESSOR := tools/bin/asset_processor
ENUM_PROCESSOR := tools/extract_include_enum.py
ASSET_CONFIGS = assets/assets.json assets/gfx.json assets/map.json assets/samples.json assets/sounds.json
TRANSLATIONS = translations/USA.bin translations/English.bin translations/French.bin translations/German.bin translations/Spanish.bin translations/Italian.bin
# Clear the default suffixes
.SUFFIXES:
# Don't delete intermediate files
.SECONDARY:
# Delete files that weren't built properly
.DELETE_ON_ERROR:
# Secondary expansion is required for dependency variables in object rules.
.SECONDEXPANSION:
$(shell mkdir -p $(C_BUILDDIR) $(ASM_BUILDDIR) $(DATA_ASM_BUILDDIR) $(SONG_BUILDDIR) $(MID_BUILDDIR))
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 compare target,$(MAKECMDGOALS)))
$(call infoshell, $(MAKE) tools)
else
NODEP := 1
endif
interwork := $(C_BUILDDIR)/interrupts.o \
$(C_BUILDDIR)/collision.o \
$(C_BUILDDIR)/playerItem.o \
$(C_BUILDDIR)/object.o \
$(C_BUILDDIR)/manager.o \
$(C_BUILDDIR)/npc.o
$(interwork): CFLAGS += -mthumb-interwork
$(C_BUILDDIR)/gba/m4a.o: CFLAGS = -O2 -mthumb-interwork -Wimplicit -Wparentheses -Werror -Wno-multichar
$(C_BUILDDIR)/eeprom.o: CFLAGS = -O1 -mthumb-interwork -Wimplicit -Wparentheses -Werror -Wno-multichar
C_SRCS := $(wildcard $(C_SUBDIR)/*.c $(C_SUBDIR)/*/*.c)
C_OBJS := $(patsubst $(C_SUBDIR)/%.c,$(C_BUILDDIR)/%.o,$(C_SRCS))
ASM_SRCS := $(wildcard $(ASM_SUBDIR)/*.s $(ASM_SUBDIR)/*/*.s)
ASM_OBJS := $(patsubst $(ASM_SUBDIR)/%.s,$(ASM_BUILDDIR)/%.o,$(ASM_SRCS)) $(patsubst $(ASM_SUBDIR)/*/%.s,$(ASM_BUILDDIR)/**/%.o,$(ASM_SRCS))
DATA_ASM_SRCS := $(wildcard $(DATA_ASM_SUBDIR)/*.s $(DATA_ASM_SUBDIR)/**/*.s $(DATA_ASM_SUBDIR)/**/**/*.s)
DATA_ASM_OBJS := $(patsubst $(DATA_ASM_SUBDIR)/%.s,$(DATA_ASM_BUILDDIR)/%.o,$(DATA_ASM_SRCS))
SONG_SRCS := $(wildcard $(SONG_SUBDIR)/*.s)
SONG_OBJS := $(patsubst $(SONG_SUBDIR)/%.s,$(SONG_BUILDDIR)/%.o,$(SONG_SRCS))
MID_SRCS := $(wildcard $(MID_SUBDIR)/*.mid)
MID_OBJS := $(patsubst $(MID_SUBDIR)/%.mid,$(MID_BUILDDIR)/%.o,$(MID_SRCS))
ENUM_ASM_SRCS := $(wildcard include/*.h)
ENUM_ASM_HEADERS := $(patsubst include/%.h,$(ASM_ENUM_INCLUDE_DIR)/%.inc,$(ENUM_ASM_SRCS))
OBJS := $(C_OBJS) $(ASM_OBJS) $(DATA_ASM_OBJS) $(SONG_OBJS) $(MID_OBJS)
OBJS_REL := $(patsubst $(OBJ_DIR)/%,%,$(OBJS))
SUBDIRS := $(sort $(dir $(OBJS) $(ENUM_ASM_HEADERS)))
$(shell mkdir -p $(SUBDIRS))
.PHONY: all setup clean-tools mostlyclean clean tidy tools extractassets buildassets custom
.PHONY: default all
default: build
all: eu jp usa demo_jp demo_usa
MAKEFLAGS += --no-print-directory
AUTO_GEN_TARGETS :=
.PHONY: build eu jp usa demo_jp demo_usa custom
build: GAME_VERSION ?=USA
build: tools
@$(MAKE) -f GBA.mk build GAME_VERSION=$(GAME_VERSION)
# TODO do we really need this extra step just so that the assets are always extracted at first?
all: build/extracted_assets_$(GAME_VERSION)
@$(MAKE) target GAME_VERSION=$(GAME_VERSION)
eu: GAME_VERSION=EU
jp: GAME_VERSION=JP
usa: GAME_VERSION=USA
demo_jp: GAME_VERSION=DEMO_JP
demo_usa: GAME_VERSION=DEMO_USA
eu jp usa demo_jp demo_usa: tools
@$(MAKE) GAME_VERSION=$(GAME_VERSION)
target: $(ROM)
@$(SHA1) $(BUILD_NAME).sha1
custom: tools
@$(MAKE) GAME_VERSION=USA CUSTOM=1
custom: buildassets
@$(MAKE) target GAME_VERSION=$(GAME_VERSION)
.PHONY: extract_assets
extract_assets: tools
@$(MAKE) -f GBA.mk extract_assets
# kept for backwards compat
compare: $(ROM)
@$(SHA1) $(BUILD_NAME).sha1
.PHONY: tools
tools: tools/bin
setup: tools
# all tools are build at once
# FIXME figure out why make builds multiple times when specifying all tools here
tools: $(GFX)
$(GFX) $(AIF) $(MID) $(SCANINC) $(PREPROC) $(FIX) $(ASSET_PROCESSOR) tools/bin/agb2mid tools/bin/tmc_strings tools/bin/bin2c &:
tools/bin:
mkdir -p tools/cmake-build
unset CC CXX AS LD LDFLAGS && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=tools -S tools -B tools/cmake-build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=tools -S tools -B tools/cmake-build
cmake --build tools/cmake-build -j --target install
# Automatically extract binary data
build/extracted_assets_%: $(ASSET_CONFIGS) $(TRANSLATIONS)
$(ASSET_PROCESSOR) extract $(GAME_VERSION) $(ASSET_BUILDDIR)
touch $@
# Extract assets to human readable form
extractassets:
$(ASSET_PROCESSOR) convert $(GAME_VERSION) $(ASSET_BUILDDIR)
# Build the assets from the human readable form
buildassets:
$(ASSET_PROCESSOR) build $(GAME_VERSION) $(ASSET_BUILDDIR)
mostlyclean: tidy
rm -f sound/direct_sound_samples/*.bin
rm -f $(SONG_OBJS) $(MID_SUBDIR)/*.s
find . \( -iname '*.1bpp' -o -iname '*.4bpp' -o -iname '*.8bpp' -o -iname '*.gbapal' -o -iname '*.lz' -o -iname '*.latfont' -o -iname '*.hwjpnfont' -o -iname '*.fwjpnfont' \) -exec rm {} +
rm -f $(AUTO_GEN_TARGETS)
.PHONY: clean clean-tools
clean:
@$(MAKE) -f GBA.mk clean
clean-tools:
rm -rf tools/bin
rm -rf tools/cmake-build
clean: mostlyclean clean-tools
tidy:
rm -f tmc.gba tmc.elf tmc.map
rm -f tmc_demo_usa.gba tmc_demo_usa.elf tmc_demo_usa.map
rm -f tmc_jp.gba tmc_jp.elf tmc_jp.map
rm -f tmc_demo_jp.gba tmc_demo_jp.elf tmc_demo_jp.map
rm -f tmc_eu.gba tmc_eu.elf tmc_eu.map
rm -r build/*
%.s: ;
%.png: ;
%.pal: ;
%.aif: ;
%.1bpp: %.png ; $(GFX) $< $@
%.4bpp: %.png ; $(GFX) $< $@
%.8bpp: %.png ; $(GFX) $< $@
%.gbapal: %.pal ; $(GFX) $< $@
%.gbapal: %.png ; $(GFX) $< $@
%.lz: % ; $(GFX) $< $@
%.rl: % ; $(GFX) $< $@
cd $(@D) && ../../$(MID) $(<F)
translations/USA.bin: translations/USA.json ; tools/bin/tmc_strings -p --source $< --dest $@ --size 0x499E0
translations/English.bin: translations/English.json ; tools/bin/tmc_strings -p --source $< --dest $@ --size 0x488C0
translations/French.bin: translations/French.json ; tools/bin/tmc_strings -p --source $< --dest $@ --size 0x47A90
translations/German.bin: translations/German.json ; tools/bin/tmc_strings -p --source $< --dest $@ --size 0x42FC0
translations/Spanish.bin: translations/Spanish.json ; tools/bin/tmc_strings -p --source $< --dest $@ --size 0x41930
translations/Italian.bin: translations/Italian.json ; tools/bin/tmc_strings -p --source $< --dest $@ --size 0x438E0
ifeq ($(NODEP),1)
$(C_BUILDDIR)/%.o: c_dep :=
else
$(C_BUILDDIR)/%.o: c_dep = $(shell $(SCANINC) -I include $(C_SUBDIR)/$*.c)
endif
$(C_BUILDDIR)/%.o : $(C_SUBDIR)/%.c $$(c_dep)
@$(CPP) $(CPPFLAGS) $< -o $(C_BUILDDIR)/$*.i
$(PREPROC) $(BUILD_NAME) $(C_BUILDDIR)/$*.i charmap.txt | $(CC1) $(CFLAGS) -o $(C_BUILDDIR)/$*.s
@echo -e "\t.text\n\t.align\t2, 0 @ Don't pad with nop\n" >> $(C_BUILDDIR)/$*.s
$(AS) $(ASFLAGS) -o $@ $(C_BUILDDIR)/$*.s
ifeq ($(NODEP),1)
$(ASM_BUILDDIR)/%.o: asm_dep :=
else
$(ASM_BUILDDIR)/%.o: asm_dep = $(shell $(SCANINC) -I . $(ASM_SUBDIR)/$*.s)
endif
$(ASM_BUILDDIR)/%.o: $(ASM_SUBDIR)/%.s $$(asm_dep)
$(PREPROC) $(BUILD_NAME) $< -- $(PREPROC_INC_PATHS) | $(AS) $(ASFLAGS) -o $@
$(ASM_ENUM_INCLUDE_DIR)/%.inc: include/%.h
$(ENUM_PROCESSOR) $< $(CC) "-D__attribute__(x)=" "-D$(GAME_VERSION)" "-E" "-nostdinc" "-Itools/agbcc" "-Itools/agbcc/include" "-iquote include" > $@
ifeq ($(NODEP),1)
$(DATA_ASM_BUILDDIR)/%.o: data_dep :=
else
$(DATA_ASM_BUILDDIR)/%.o: data_dep = $(shell $(SCANINC) -I . -I $(ASSET_SUBDIR) -I $(ASSET_BUILDDIR) -I $(ASM_ENUM_INCLUDE_DIR) $(DATA_ASM_SUBDIR)/$*.s)
endif
$(DATA_ASM_BUILDDIR)/%.o: $(DATA_ASM_SUBDIR)/%.s $$(data_dep) $(ENUM_ASM_HEADERS)
$(PREPROC) $(BUILD_NAME) $< charmap.txt -- $(PREPROC_INC_PATHS) | $(CPP) -I include -nostdinc -undef -Wno-unicode - | $(AS) $(ASFLAGS) -o $@
$(SONG_BUILDDIR)/%.o: $(SONG_SUBDIR)/%.s
$(AS) $(ASFLAGS) -I sound -o $@ $<
$(OBJ_DIR)/linker.ld: linker.ld
$(CPP) $(CPPFLAGS) -x c linker.ld | grep -v '^#' >$(OBJ_DIR)/linker.ld
$(ELF): $(OBJS) $(OBJ_DIR)/linker.ld
cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -n -T linker.ld -o ../../$@ $(LIB)
$(FIX) $@ -t"$(TITLE)" -c$(GAME_CODE) -m$(MAKER_CODE) -r$(REVISION) --silent
$(ROM): $(ELF)
$(OBJCOPY) -O binary --gap-fill 0xFF --pad-to 0x9000000 $< $@
usa: ; @$(MAKE) GAME_VERSION=USA
demo_usa: ; @$(MAKE) GAME_VERSION=DEMO_USA
jp: ; @$(MAKE) GAME_VERSION=JP
demo_jp: ; @$(MAKE) GAME_VERSION=DEMO_JP
eu: ; @$(MAKE) GAME_VERSION=EU
+38
View File
@@ -0,0 +1,38 @@
# ========
# compiler
# ========
ifndef TOOLCHAIN_PATH
ifneq (,$(shell which arm-none-eabi-gcc))
TOOLCHAIN_PATH :=
else ifdef DEVKITARM
TOOLCHAIN_PATH := $(DEVKITARM)/bin/
else
$(error arm-none-eabi-gcc not found, please install (devkitPro supported))
endif
endif
# ensure trailing slash
ifneq ($(TOOLCHAIN_PATH),)
override TOOLCHAIN_PATH:=$(TOOLCHAIN_PATH)/
endif
CC := $(TOOLCHAIN_PATH)arm-none-eabi-gcc
CPP := $(CC) -E
CXX := $(TOOLCHAIN_PATH)arm-none-eabi-g++
AS := $(TOOLCHAIN_PATH)arm-none-eabi-as
LD := $(TOOLCHAIN_PATH)arm-none-eabi-ld
OBJCOPY := $(TOOLCHAIN_PATH)arm-none-eabi-objcopy
# ============
# custom tools
# ============
CC1 := tools/agbcc/bin/agbcc
SHA1 := $(shell { command -v sha1sum || command -v shasum; } 2>/dev/null) -c
SCANINC := tools/bin/scaninc
PREPROC := tools/bin/preproc
ASSET_PROCESSOR := tools/bin/asset_processor
ENUM_PROCESSOR := tools/extract_include_enum.py
FIX := tools/bin/gbafix
-221
View File
@@ -1,221 +0,0 @@
.syntax unified
push {r4, r5, r6, r7, lr}
mov r7, sb
mov r6, r8
push {r6, r7}
sub sp, #4
adds r4, r0, #0
adds r5, r1, #0
adds r1, r2, #0
adds r0, r5, #0
bl MemClear
movs r0, #1
strb r0, [r5]
ldr r2, _0801DBE4 @ =gRoomTransition
ldrh r0, [r2, #0x1c]
lsrs r0, r0, #4
movs r1, #0x7f
ands r0, r1
strb r0, [r5, #1]
ldrh r0, [r2, #0x1e]
lsrs r0, r0, #4
ands r0, r1
strb r0, [r5, #2]
adds r5, #3
ldr r1, _0801DBE8 @ =gDungeonLayouts
ldr r0, _0801DBEC @ =gArea
ldrb r0, [r0, #3]
lsls r0, r0, #2
adds r0, r0, r1
ldr r0, [r0]
lsls r4, r4, #2
adds r4, r4, r0
ldr r6, [r4]
b _0801DD3A
.align 2, 0
_0801DBE4: .4byte gRoomTransition
_0801DBE8: .4byte gDungeonLayouts
_0801DBEC: .4byte gArea
_0801DBF0:
ldrb r0, [r6]
ldrb r1, [r6, #1]
movs r2, #3
bl GetRoomProperty
adds r4, r0, #0
cmp r4, #0
bne _0801DC04
adds r6, #8
b _0801DD3A
_0801DC04:
adds r0, r6, #0
bl sub_0801DF10
mov r8, r0
bl HasDungeonBigKey
movs r1, #8
adds r1, r1, r6
mov sb, r1
cmp r0, #0
beq _0801DCAE
ldrb r0, [r4]
cmp r0, #0
beq _0801DCAE
movs r3, #0xfc
lsls r3, r3, #2
ldr r7, _0801DC84 @ =0x000007FF
_0801DC26:
ldrb r0, [r4]
cmp r0, #3
bgt _0801DCA6
cmp r0, #2
blt _0801DCA6
ldrb r1, [r4, #1]
mov r0, r8
str r3, [sp]
bl CheckLocalFlagByBank
ldr r3, [sp]
cmp r0, #0
bne _0801DCA6
ldr r0, _0801DC88 @ =gAreaRoomHeaders
ldrb r2, [r6]
lsls r2, r2, #2
adds r2, r2, r0
ldrb r1, [r6, #1]
lsls r0, r1, #2
adds r0, r0, r1
lsls r0, r0, #1
ldr r1, [r2]
adds r2, r1, r0
movs r0, #2
strb r0, [r5]
ldrb r0, [r4]
cmp r0, #2
bne _0801DC8C
ldrh r0, [r4, #4]
lsls r0, r0, #4
ands r0, r3
movs r1, #8
orrs r0, r1
ldrh r1, [r2]
ands r1, r7
adds r0, r0, r1
asrs r0, r0, #4
strb r0, [r5, #1]
ldrh r0, [r4, #4]
lsrs r0, r0, #2
ands r0, r3
movs r1, #8
orrs r0, r1
ldrh r1, [r2, #2]
ands r1, r7
b _0801DC9E
.align 2, 0
_0801DC84: .4byte 0x000007FF
_0801DC88: .4byte gAreaRoomHeaders
_0801DC8C:
ldrh r0, [r2]
ands r0, r7
ldrh r1, [r4, #4]
adds r0, r0, r1
asrs r0, r0, #4
strb r0, [r5, #1]
ldrh r0, [r2, #2]
ands r0, r7
ldrh r1, [r4, #6]
_0801DC9E:
adds r0, r0, r1
asrs r0, r0, #4
strb r0, [r5, #2]
adds r5, #3
_0801DCA6:
adds r4, #8
ldrb r0, [r4]
cmp r0, #0
bne _0801DC26
_0801DCAE:
bl HasDungeonBigKey
cmp r0, #0
beq _0801DD16
ldrb r1, [r6, #2]
movs r0, #2
ands r0, r1
cmp r0, #0
beq _0801DD16
ldr r0, _0801DD4C @ =gArea
ldrb r0, [r0, #3]
adds r0, #1
bl CheckGlobalFlag
cmp r0, #0
bne _0801DD16
ldr r0, _0801DD50 @ =gAreaRoomHeaders
ldrb r2, [r6]
lsls r2, r2, #2
adds r2, r2, r0
ldrb r1, [r6, #1]
lsls r0, r1, #2
adds r0, r0, r1
lsls r0, r0, #1
ldr r1, [r2]
adds r2, r1, r0
movs r0, #4
strb r0, [r5]
ldrh r0, [r2, #4]
lsrs r0, r0, #1
ldrh r1, [r2]
adds r0, r0, r1
asrs r1, r0, #4
adds r0, r1, #0
cmp r1, #0
bge _0801DCF8
adds r0, #0x7f
_0801DCF8:
asrs r0, r0, #7
lsls r0, r0, #7
subs r0, r1, r0
strb r0, [r5, #1]
ldrh r0, [r2, #6]
lsrs r0, r0, #1
ldrh r2, [r2, #2]
adds r0, r0, r2
asrs r1, r0, #4
adds r0, r1, #0
asrs r0, r0, #7
lsls r0, r0, #7
subs r0, r1, r0
strb r0, [r5, #2]
adds r5, #3
_0801DD16:
ldr r2, _0801DD54 @ =gRoomTransition
ldrh r0, [r6]
ldrh r1, [r2, #0x16]
cmp r0, r1
bne _0801DD38
movs r0, #3
strb r0, [r5]
ldrh r0, [r2, #0x18]
lsrs r0, r0, #4
movs r1, #0x7f
ands r0, r1
strb r0, [r5, #1]
ldrh r0, [r2, #0x1a]
lsrs r0, r0, #4
ands r0, r1
strb r0, [r5, #2]
adds r5, #3
_0801DD38:
mov r6, sb
_0801DD3A:
ldrb r0, [r6]
cmp r0, #0
beq _0801DD42
b _0801DBF0
_0801DD42:
add sp, #4
pop {r3, r4}
mov r8, r3
mov sb, r4
pop {r4, r5, r6, r7, pc}
.align 2, 0
_0801DD4C: .4byte gArea
_0801DD50: .4byte gAreaRoomHeaders
_0801DD54: .4byte gRoomTransition
.syntax divided
-112
View File
@@ -1,112 +0,0 @@
.syntax unified
push {r4, r5, r6, r7, lr}
mov r7, r8
push {r7}
bl sub_08002632
mov r8, r0
ldr r1, _0801E9E4 @ =gUnk_08001DCC
lsls r0, r0, #2
adds r0, r0, r1
ldr r7, [r0]
movs r0, #0x67
bl GetInventoryValue
cmp r0, #0
beq _0801EA56
ldr r1, _0801E9E8 @ =gSave
ldrb r0, [r7]
ldrb r2, [r1, #8]
cmp r0, r2
bhi _0801EA56
ldr r2, _0801E9EC @ =0x000001C1
adds r0, r1, r2
add r0, r8
ldrb r5, [r0]
subs r2, #0x80
adds r0, r1, r2
add r0, r8
ldrb r6, [r0]
adds r4, r6, r7
_0801E9D6:
cmp r5, #0xf1
beq _0801E9F6
cmp r5, #0xf1
bhi _0801E9F0
cmp r5, #0
beq _0801E9F6
b _0801EA10
.align 2, 0
_0801E9E4: .4byte gUnk_08001DCC
_0801E9E8: .4byte gSave
_0801E9EC: .4byte 0x000001C1
_0801E9F0:
cmp r5, #0xf2
beq _0801EA0A
b _0801EA10
_0801E9F6:
ldrb r5, [r4, #5]
cmp r5, #0
beq _0801EA10
cmp r5, #0xff
beq _0801EA14
adds r0, r5, #0
bl CheckKinstoneFused
cmp r0, #0
beq _0801EA10
_0801EA0A:
adds r4, #1
adds r6, #1
ldrb r5, [r4, #5]
_0801EA10:
cmp r5, #0xff
bne _0801EA1C
_0801EA14:
adds r0, r7, #0
bl sub_0801EA74
adds r5, r0, #0
_0801EA1C:
cmp r5, #0
beq _0801EA32
cmp r5, #0xf2
beq _0801E9D6
adds r0, r5, #0
bl CheckKinstoneFused
cmp r0, #0
beq _0801EA34
movs r5, #0xf1
b _0801E9D6
_0801EA32:
movs r5, #0xf3
_0801EA34:
ldr r1, _0801EA5C @ =gSave
ldr r2, _0801EA60 @ =0x000001C1
adds r0, r1, r2
add r0, r8
strb r5, [r0]
subs r2, #0x80
adds r0, r1, r2
add r0, r8
strb r6, [r0]
bl Random
ldrb r4, [r7, #1]
movs r1, #0x64
bl __modsi3
cmp r4, r0
bhi _0801EA64
_0801EA56:
movs r0, #0
b _0801EA6E
.align 2, 0
_0801EA5C: .4byte gSave
_0801EA60: .4byte 0x000001C1
_0801EA64:
subs r0, r5, #1
cmp r0, #0x63
bls _0801EA6C
movs r5, #0
_0801EA6C:
adds r0, r5, #0
_0801EA6E:
pop {r3}
mov r8, r3
pop {r4, r5, r6, r7, pc}
.syntax divided
@@ -1,40 +0,0 @@
.syntax unified
push {r4, lr}
adds r2, r0, #0
adds r3, r2, #0
adds r3, #0x79
ldrb r0, [r2, #0xf]
ldrb r4, [r3]
adds r1, r0, r4
strb r1, [r3]
ldrb r4, [r2, #0xf]
movs r0, #0xf
ldrsb r0, [r2, r0]
cmp r0, #0
bge _0809CC16
ldrb r0, [r2, #0xe]
lsls r1, r1, #0x18
lsls r0, r0, #0x18
cmn r1, r0
bge _0809CC2C
rsbs r0, r4, #0
strb r0, [r2, #0xf]
movs r0, #0xcf
lsls r0, r0, #1
bl SoundReq
b _0809CC2C
_0809CC16:
movs r0, #0
ldrsb r0, [r3, r0]
ldrb r1, [r2, #0xe]
cmp r0, r1
ble _0809CC2C
rsbs r0, r4, #0
strb r0, [r2, #0xf]
movs r0, #0xcf
lsls r0, r0, #1
bl SoundReq
_0809CC2C:
pop {r4, pc}
.align 2, 0
.syntax divided
-134
View File
@@ -1,134 +0,0 @@
.syntax unified
push {r4, r5, r6, r7, lr}
mov r7, sb
mov r6, r8
push {r6, r7}
adds r5, r0, #0
ldrb r4, [r5, #0xa]
cmp r4, #0
bne _080AC668
ldr r0, _080AC664 @ =gEntCount
ldrb r0, [r0]
cmp r0, #0x43
bhi _080AC670
adds r1, r5, #0
adds r1, #0x79
movs r0, #0x11
strb r0, [r1]
movs r0, #0x22
bl CreateProjectile
adds r6, r0, #0
ldrb r0, [r5, #0xa]
strb r0, [r6, #0xa]
movs r0, #1
strb r0, [r6, #0xb]
ldr r0, [r5, #0x50]
str r0, [r6, #0x50]
adds r1, r6, #0
adds r1, #0x79
movs r0, #0x12
strb r0, [r1]
str r6, [r5, #0x54]
movs r0, #0x22
bl CreateProjectile
adds r7, r0, #0
ldrb r0, [r5, #0xa]
strb r0, [r7, #0xa]
movs r0, #2
strb r0, [r7, #0xb]
ldr r0, [r5, #0x50]
str r0, [r7, #0x50]
adds r0, r7, #0
adds r0, #0x79
movs r1, #0x14
mov r8, r1
mov r1, r8
strb r1, [r0]
str r7, [r6, #0x54]
movs r0, #0x22
bl CreateProjectile
ldrb r1, [r5, #0xa]
strb r1, [r0, #0xa]
movs r1, #3
strb r1, [r0, #0xb]
ldr r1, [r5, #0x50]
str r1, [r0, #0x50]
str r4, [r0, #0x54]
adds r1, r0, #0
adds r1, #0x79
strb r4, [r1]
str r0, [r7, #0x54]
b _080AC6C8
.align 2, 0
_080AC664: .4byte gEntCount
_080AC668:
ldr r0, _080AC674 @ =gEntCount
ldrb r0, [r0]
cmp r0, #0x44
bls _080AC678
_080AC670:
movs r0, #0
b _080AC6E8
.align 2, 0
_080AC674: .4byte gEntCount
_080AC678:
adds r1, r5, #0
adds r1, #0x79
movs r0, #0
mov sb, r0
movs r0, #0xf
strb r0, [r1]
movs r0, #0x22
bl CreateProjectile
adds r6, r0, #0
ldrb r0, [r5, #0xa]
strb r0, [r6, #0xa]
movs r0, #1
strb r0, [r6, #0xb]
ldr r0, [r5, #0x50]
str r0, [r6, #0x50]
adds r0, r6, #0
adds r0, #0x79
movs r1, #0x10
mov r8, r1
mov r1, r8
strb r1, [r0]
str r6, [r5, #0x54]
movs r0, #0x22
bl CreateProjectile
adds r7, r0, #0
ldrb r0, [r5, #0xa]
strb r0, [r7, #0xa]
movs r0, #2
strb r0, [r7, #0xb]
ldr r0, [r5, #0x50]
str r0, [r7, #0x50]
mov r0, sb
str r0, [r7, #0x54]
adds r1, r7, #0
adds r1, #0x79
movs r0, #0x20
strb r0, [r1]
str r7, [r6, #0x54]
_080AC6C8:
movs r0, #0x22
bl CreateProjectile
adds r6, r0, #0
ldrb r0, [r5, #0xa]
strb r0, [r6, #0xa]
movs r0, #4
strb r0, [r6, #0xb]
ldr r0, [r5, #0x50]
str r0, [r6, #0x50]
str r5, [r6, #0x54]
adds r0, r6, #0
adds r0, #0x79
mov r1, r8
strb r1, [r0]
movs r0, #1
_080AC6E8:
pop {r3, r4}
mov r8, r3
mov sb, r4
pop {r4, r5, r6, r7, pc}
.syntax divided
@@ -1,85 +0,0 @@
.syntax unified
push {r4, r5, r6, r7, lr}
mov r7, sl
mov r6, sb
mov r5, r8
push {r5, r6, r7}
sub sp, #8
ldr r1, _080465AC @ =gMapTop+0x5004
ldr r2, _080465B0 @ =0xFFFFBCB0
adds r0, r1, r2
ldr r3, _080465B4 @ =0xFFFFECB0
adds r2, r1, r3
ldr r7, _080465B8 @ =0x00006658
adds r7, r1, r7
str r7, [sp, #4]
ldr r3, _080465BC @ =0xFFFFD658
adds r6, r1, r3
movs r1, #0x10
_0804653A:
movs r5, #0x10
movs r7, #0x80
adds r7, r7, r0
mov sl, r7
adds r3, r2, #0
adds r3, #0x80
str r3, [sp]
ldr r7, [sp, #4]
adds r7, #0x40
mov r8, r7
movs r3, #0x40
adds r3, r3, r6
mov sb, r3
subs r1, #1
mov ip, r1
adds r3, r0, #0
adds r3, #0x20
adds r4, r2, #0
adds r4, #0x20
_08046560:
ldrh r0, [r3]
strh r0, [r4]
ldrh r0, [r3]
lsls r0, r0, #1
ldr r7, _080465AC @ =gMapTop+0x5004
adds r0, r0, r7
ldrh r1, [r0]
ldr r0, [sp, #4]
adds r2, r0, r5
ldr r7, _080465C0 @ =gUnk_080B37A0
adds r0, r1, r7
ldrb r0, [r0]
strb r0, [r2]
adds r2, r6, r5
ldr r0, _080465C4 @ =gUnk_080B3E80
adds r1, r1, r0
ldrb r0, [r1]
strb r0, [r2]
subs r3, #2
subs r4, #2
subs r5, #1
cmp r5, #0
bne _08046560
mov r0, sl
ldr r2, [sp]
mov r1, r8
str r1, [sp, #4]
mov r6, sb
mov r1, ip
cmp r1, #0
bne _0804653A
add sp, #8
pop {r3, r4, r5}
mov r8, r3
mov sb, r4
mov sl, r5
pop {r4, r5, r6, r7, pc}
.align 2, 0
_080465AC: .4byte gMapTop+0x5004
_080465B0: .4byte 0xFFFFBCB0
_080465B4: .4byte 0xFFFFECB0
_080465B8: .4byte 0x00006658
_080465BC: .4byte 0xFFFFD658
_080465C0: .4byte gUnk_080B37A0
_080465C4: .4byte gUnk_080B3E80
.syntax divided
-130
View File
@@ -1,130 +0,0 @@
.syntax unified
.text
push {r4, r5, r6, r7, lr}
mov r7, sl
mov r6, sb
mov r5, r8
push {r5, r6, r7}
adds r7, r0, #0
ldr r4, _08062618 @ =gPlayerEntity
ldrh r1, [r4, #0x2e]
ldr r3, _0806261C @ =0xFFFF0000
adds r0, r3, #0
ands r0, r5
orrs r0, r1
ldrh r1, [r4, #0x32]
lsls r1, r1, #0x10
ldr r2, _08062620 @ =0x0000FFFF
ands r0, r2
adds r5, r0, #0
orrs r5, r1
ldrh r0, [r4, #0x36]
ands r3, r6
orrs r3, r0
ldr r0, _08062624 @ =gPlayerState
adds r0, #0xa8
ldrb r0, [r0]
lsls r0, r0, #0x10
ldr r2, _08062628 @ =0xFF00FFFF
ands r2, r3
orrs r2, r0
ldrb r1, [r4, #0x14]
movs r0, #0x3f
ands r1, r0
lsls r1, r1, #0x18
ldr r0, _0806262C @ =0xC0FFFFFF
ands r0, r2
orrs r0, r1
adds r1, r4, #0
adds r1, #0x38
ldrb r1, [r1]
lsls r1, r1, #0x1e
ldr r2, _08062630 @ =0x3FFFFFFF
ands r0, r2
adds r6, r0, #0
orrs r6, r1
movs r0, #0x2e
ldrsh r1, [r4, r0]
movs r2, #0x2e
ldrsh r0, [r7, r2]
subs r1, r1, r0
mov sl, r1
movs r0, #0x32
ldrsh r1, [r4, r0]
movs r2, #0x32
ldrsh r0, [r7, r2]
subs r1, r1, r0
mov r8, r1
mov r1, sl
lsls r0, r1, #0x10
asrs r0, r0, #0x10
movs r1, #0x14
bl FixedDiv
lsls r0, r0, #0x10
asrs r0, r0, #0x10
mov sl, r0
mov r2, r8
lsls r0, r2, #0x10
asrs r0, r0, #0x10
movs r1, #0x14
bl FixedDiv
lsls r0, r0, #0x10
asrs r0, r0, #0x10
mov r8, r0
ldr r3, [r7, #0x64]
movs r0, #0
mov sb, r0
mov ip, r0
movs r4, #0x13
_080625C8:
mov r1, ip
asrs r0, r1, #8
subs r0, r5, r0
strh r0, [r3]
lsrs r0, r5, #0x10
mov r2, sb
asrs r1, r2, #8
subs r0, r0, r1
strh r0, [r3, #2]
strh r6, [r3, #4]
lsrs r0, r6, #0x10
strb r0, [r3, #6]
ldrb r0, [r7, #0x14]
movs r1, #0x3f
ands r1, r0
ldrb r2, [r3, #7]
movs r0, #0x40
rsbs r0, r0, #0
ands r0, r2
orrs r0, r1
strb r0, [r3, #7]
adds r1, r7, #0
adds r1, #0x38
ldrb r1, [r1]
lsls r1, r1, #6
movs r2, #0x3f
ands r0, r2
orrs r0, r1
strb r0, [r3, #7]
adds r3, #8
add sb, r8
add ip, sl
subs r4, #1
cmp r4, #0
bge _080625C8
pop {r3, r4, r5}
mov r8, r3
mov sb, r4
mov sl, r5
pop {r4, r5, r6, r7, pc}
.align 2, 0
_08062618: .4byte gPlayerEntity
_0806261C: .4byte 0xFFFF0000
_08062620: .4byte 0x0000FFFF
_08062624: .4byte gPlayerState
_08062628: .4byte 0xFF00FFFF
_0806262C: .4byte 0xC0FFFFFF
_08062630: .4byte 0x3FFFFFFF
.syntax divided
+18 -18
View File
@@ -4,7 +4,7 @@
mov r6, sb
mov r5, r8
push {r5, r6, r7}
ldr r0, _080784FC @ =gUnk_03003DF0
ldr r0, _080784FC @ =gPossibleInteraction
ldrb r1, [r0]
mov r8, r0
cmp r1, #0
@@ -12,7 +12,7 @@
ldr r0, [r0, #4]
b _0807876A
.align 2, 0
_080784FC: .4byte gUnk_03003DF0
_080784FC: .4byte gPossibleInteraction
_08078500:
ldr r2, _08078528 @ =gPlayerState
adds r0, r2, #0
@@ -74,27 +74,27 @@ _08078598:
movs r0, #0xff
mov r1, r8
strb r0, [r1, #3]
ldr r0, _080785AC @ =gUnk_0811C000
ldr r0, _080785AC @ =gNoInteraction
str r0, [r1, #4]
movs r1, #1
mov r2, r8
strb r1, [r2]
b _0807876A
.align 2, 0
_080785AC: .4byte gUnk_0811C000
_080785AC: .4byte gNoInteraction
_080785B0:
ldr r0, [r2, #0x30]
movs r1, #0x80
ands r0, r1
cmp r0, #0
bne _080785F0
bl HasDungeonMap
bl HasDungeonSmallKey
cmp r0, #0
beq _080785C4
movs r0, #1
_080785C4:
adds r7, r0, #0
bl HasDungeonCompass
bl HasDungeonBigKey
cmp r0, #0
beq _080785D2
movs r0, #2
@@ -104,21 +104,21 @@ _080785D2:
ldrb r0, [r3, #0x14]
movs r1, #6
ands r1, r0
ldr r0, _080785E8 @ =gUnk_0811C00C
ldr r0, _080785E8 @ =gPlayerInteractHitboxOffsetNormal
adds r2, r1, r0
ldr r5, _080785EC @ =gUnk_03003DF0
ldr r5, _080785EC @ =gPossibleInteraction
mov r8, r5
b _080785FE
.align 2, 0
_080785E4: .4byte gPlayerEntity
_080785E8: .4byte gUnk_0811C00C
_080785EC: .4byte gUnk_03003DF0
_080785E8: .4byte gPlayerInteractHitboxOffsetNormal
_080785EC: .4byte gPossibleInteraction
_080785F0:
ldr r3, _08078624 @ =gPlayerEntity
ldrb r0, [r3, #0x14]
movs r1, #6
ands r1, r0
ldr r0, _08078628 @ =gUnk_0811C014
ldr r0, _08078628 @ =gPlayerInteractHitboxOffsetMinish
adds r2, r1, r0
movs r7, #0
_080785FE:
@@ -138,12 +138,12 @@ _080785FE:
adds r1, r1, r0
mov sb, r1
movs r6, #0
ldr r5, _0807862C @ =gUnk_03003DF8
ldr r5, _0807862C @ =gInteractableObjects
b _08078724
.align 2, 0
_08078624: .4byte gPlayerEntity
_08078628: .4byte gUnk_0811C014
_0807862C: .4byte gUnk_03003DF8
_08078628: .4byte gPlayerInteractHitboxOffsetMinish
_0807862C: .4byte gInteractableObjects
_08078630:
ldrb r1, [r5]
movs r3, #1
@@ -264,7 +264,7 @@ _08078714:
lsls r0, r6, #1
adds r0, r0, r6
lsls r0, r0, #2
ldr r3, _08078754 @ =gUnk_03003DF8
ldr r3, _08078754 @ =gInteractableObjects
adds r5, r0, r3
_08078724:
ldr r2, [r5, #8]
@@ -292,12 +292,12 @@ _0807873A:
str r0, [r5, #4]
b _08078762
.align 2, 0
_08078754: .4byte gUnk_03003DF8
_08078754: .4byte gInteractableObjects
_08078758:
movs r0, #0xff
mov r1, r8
strb r0, [r1, #3]
ldr r0, _08078774 @ =gUnk_0811C000
ldr r0, _08078774 @ =gNoInteraction
str r0, [r1, #4]
_08078762:
movs r0, #1
@@ -311,5 +311,5 @@ _0807876A:
mov sl, r5
pop {r4, r5, r6, r7, pc}
.align 2, 0
_08078774: .4byte gUnk_0811C000
_08078774: .4byte gNoInteraction
.syntax divided
@@ -1,218 +0,0 @@
.syntax unified
push {r4, r5, r6, r7, lr}
mov r7, sb
mov r6, r8
push {r6, r7}
ldr r0, _080795A8 @ =gDiggingCaveEntranceTransition
ldrb r0, [r0, #8]
cmp r0, #0
beq _08079562
b _080796FC
_08079562:
ldr r2, _080795AC @ =gPlayerState
ldrb r0, [r2, #0x1e]
cmp r0, #0
beq _08079576
ldr r0, [r2, #0x30]
movs r1, #0x80
lsls r1, r1, #3
ands r0, r1
cmp r0, #0
beq _080795B4
_08079576:
adds r0, r2, #0
adds r0, #0x26
ldrb r0, [r0]
ldr r1, _080795B0 @ =gPlayerEntity
mov r8, r1
cmp r0, #0
bne _080795A0
ldrb r1, [r2, #0x1b]
movs r0, #0x40
ands r0, r1
cmp r0, #0
bne _080795A0
mov r3, r8
ldrb r1, [r3, #0x15]
ldrb r2, [r2, #0xd]
cmp r1, r2
bne _080795A0
movs r0, #0x80
ands r0, r1
cmp r0, #0
beq _080795B4
_080795A0:
movs r0, #0
mov r5, r8
strb r0, [r5, #0xf]
b _080796FE
.align 2, 0
_080795A8: .4byte gDiggingCaveEntranceTransition
_080795AC: .4byte gPlayerState
_080795B0: .4byte gPlayerEntity
_080795B4:
bl sub_08079778
cmp r0, #0
bne _080795BE
b _080796FC
_080795BE:
ldr r3, _08079610 @ =gPlayerEntity
ldrb r2, [r3, #0x14]
movs r0, #6
ands r0, r2
ldr r1, _08079614 @ =gUnk_0811C100
adds r1, r0, r1
movs r0, #2
ands r0, r2
mov r8, r3
cmp r0, #0
beq _0807961C
movs r6, #0x2e
ldrsh r2, [r3, r6]
movs r0, #0
ldrsb r0, [r1, r0]
adds r2, r2, r0
ldr r4, _08079618 @ =gRoomControls
ldrh r0, [r4, #6]
subs r2, r2, r0
asrs r2, r2, #4
movs r3, #0x3f
ands r2, r3
mov r0, r8
movs r5, #0x32
ldrsh r1, [r0, r5]
ldr r0, [r0, #0x48]
ldrb r5, [r0, #3]
adds r0, r1, r5
ldrh r4, [r4, #8]
subs r0, r0, r4
asrs r0, r0, #4
ands r0, r3
lsls r7, r0, #6
orrs r7, r2
subs r1, r1, r5
subs r1, r1, r4
asrs r1, r1, #4
ands r1, r3
lsls r4, r1, #6
orrs r4, r2
b _0807965E
.align 2, 0
_08079610: .4byte gPlayerEntity
_08079614: .4byte gUnk_0811C100
_08079618: .4byte gRoomControls
_0807961C:
mov r6, r8
movs r0, #0x2e
ldrsh r2, [r6, r0]
ldr r0, [r6, #0x48]
ldrb r0, [r0, #4]
mov ip, r0
adds r0, r2, r0
ldr r4, _080796EC @ =gRoomControls
ldrh r3, [r4, #6]
mov sb, r3
subs r0, r0, r3
asrs r7, r0, #4
movs r3, #0x3f
ands r7, r3
movs r5, #0x32
ldrsh r0, [r6, r5]
ldrb r1, [r1, #1]
lsls r1, r1, #0x18
asrs r1, r1, #0x18
adds r0, r0, r1
ldrh r1, [r4, #8]
subs r0, r0, r1
asrs r0, r0, #4
ands r0, r3
lsls r0, r0, #6
orrs r7, r0
mov r6, ip
subs r2, r2, r6
mov r1, sb
subs r2, r2, r1
asrs r4, r2, #4
ands r4, r3
orrs r4, r0
_0807965E:
adds r0, r7, #0
mov r5, r8
adds r5, #0x38
ldrb r1, [r5]
bl sub_080B1AE0
adds r3, r0, #0
ldr r6, _080796F0 @ =gUnk_0811C1E8
mov r1, r8
ldrb r0, [r1, #0x14]
lsrs r0, r0, #1
lsls r0, r0, #2
adds r0, r0, r6
ldr r1, [r0]
adds r0, r3, #0
bl sub_08007DD6
adds r3, r0, #0
cmp r3, #0
beq _080796FC
adds r0, r4, #0
ldrb r1, [r5]
bl sub_080B1AE0
adds r3, r0, #0
mov r5, r8
ldrb r0, [r5, #0x14]
lsrs r0, r0, #1
lsls r0, r0, #2
adds r0, r0, r6
ldr r1, [r0]
adds r0, r3, #0
bl sub_08007DD6
adds r3, r0, #0
cmp r3, #0
beq _080796FC
ldr r1, _080796F4 @ =gPlayerState
ldrb r2, [r1, #6]
movs r0, #0x80
orrs r0, r2
strb r0, [r1, #6]
ldrb r0, [r1, #0x1e]
adds r4, r1, #0
cmp r0, #0
bne _080796C8
ldrb r0, [r5, #0xf]
adds r0, #1
strb r0, [r5, #0xf]
lsls r0, r0, #0x18
lsrs r0, r0, #0x18
cmp r0, #5
bls _080796FC
_080796C8:
ldr r0, _080796F8 @ =gPlayerEntity
subs r1, r3, #1
movs r2, #0
strb r1, [r0, #0x14]
movs r1, #4
strb r1, [r0, #0xc]
strb r2, [r0, #0xd]
ldrb r2, [r0, #0x10]
movs r1, #0x7f
ands r1, r2
strb r1, [r0, #0x10]
movs r1, #0x81
strb r1, [r4, #2]
bl DoPlayerAction
movs r0, #1
b _080796FE
.align 2, 0
_080796EC: .4byte gRoomControls
_080796F0: .4byte gUnk_0811C1E8
_080796F4: .4byte gPlayerState
_080796F8: .4byte gPlayerEntity
_080796FC:
movs r0, #0
_080796FE:
pop {r3, r4}
mov r8, r3
mov sb, r4
pop {r4, r5, r6, r7, pc}
.align 2, 0
.syntax divided
@@ -1,95 +0,0 @@
.syntax unified
.text
push {r4, r5, r6, lr}
adds r4, r0, #0
movs r1, #2
bl UpdateAnimationVariableFrames
adds r0, r4, #0
bl ProcessMovement0
cmp r0, #0
bne _08038334
adds r0, r4, #0
adds r0, #0x78
ldrb r0, [r0]
ldrb r1, [r4, #0x15]
cmp r0, r1
bne _08038330
.ifdef EU
movs r0, #0x1e
.else
movs r0, #0x5a
.endif
strb r0, [r4, #0xf]
adds r0, r4, #0
bl sub_080383AC
b _080383AA
_08038330:
strb r0, [r4, #0x15]
b _080383AA
_08038334:
ldrb r0, [r4, #0xe]
adds r0, #1
strb r0, [r4, #0xe]
lsls r0, r0, #0x18
lsrs r0, r0, #0x18
movs r1, #0xa
bl __modsi3
lsls r0, r0, #0x18
lsrs r0, r0, #0x18
cmp r0, #0
bne _080383AA
strb r0, [r4, #0xe]
adds r0, r4, #0
adds r0, #0x78
ldrb r0, [r0]
ldrb r3, [r4, #0x15]
cmp r0, r3
bne _08038398
bl Random
movs r1, #2
ands r1, r0
subs r1, #1
lsls r1, r1, #0x1b
lsrs r1, r1, #0x18
adds r0, r4, #0
adds r0, #0x79
lsls r5, r1, #0x18
lsrs r3, r5, #0x18
adds r2, r0, #0
movs r6, #0x7a
adds r6, r6, r4
mov ip, r6
ldrb r0, [r2]
cmp r3, r0
bne _08038388
ldrb r6, [r6]
cmp r3, r6
bne _08038388
rsbs r0, r5, #0
lsrs r1, r0, #0x18
_08038388:
ldrb r0, [r2]
mov r3, ip
strb r0, [r3]
strb r1, [r2]
ldrb r0, [r4, #0x15]
adds r0, r0, r1
movs r1, #0x18
ands r0, r1
_08038398:
strb r0, [r4, #0x15]
ldrb r0, [r4, #0x15]
lsrs r0, r0, #3
strb r0, [r4, #0x14]
ldrb r1, [r4, #0x14]
adds r1, #4
adds r0, r4, #0
bl InitializeAnimation
_080383AA:
pop {r4, r5, r6, pc}
.syntax divided
-120
View File
@@ -1,120 +0,0 @@
.syntax unified
push {r4, r5, r6, r7, lr}
mov r7, sl
mov r6, sb
mov r5, r8
push {r5, r6, r7}
sub sp, #8
ldr r0, _08080344 @ =gUnk_02022830
mov ip, r0
ldr r1, _08080348 @ =gRoomControls
ldrh r0, [r1, #0x1e]
lsrs r0, r0, #4
str r0, [sp]
ldrh r0, [r1, #0x20]
lsrs r0, r0, #4
lsls r0, r0, #6
str r0, [sp, #4]
movs r5, #0
mov sl, r5
cmp r5, r0
bhs _08080336
mov sb, r5
_080802A2:
movs r1, #0
mov r8, r1
ldr r0, [sp]
cmp r8, r0
bhs _08080328
ldr r4, _0808034C @ =gMapTop+0x0004
add r4, sb
ldr r7, _08080350 @ =gMapTop+0x3004
add r7, sb
ldr r3, _08080354 @ =gMapBottom+0x0004
add r3, sb
ldr r6, _08080358 @ =gMapBottom+0x3004
add r6, sb
_080802BC:
mov r2, sl
add r2, r8
ldrh r0, [r6]
ldrh r1, [r3]
cmp r0, r1
beq _080802EA
ldr r0, _0808035C @ =0x00003FFF
cmp r1, r0
bhi _080802EA
adds r0, #1
adds r1, r0, #0
adds r0, r2, #0
orrs r0, r1
mov r1, ip
strh r0, [r1]
ldrh r0, [r3]
strh r0, [r1, #2]
movs r0, #4
add ip, r0
adds r5, #1
ldr r0, _08080360 @ =0x000005FF
cmp r5, r0
bhi _08080336
_080802EA:
ldrh r0, [r7]
ldrh r1, [r4]
cmp r0, r1
beq _08080316
ldr r0, _0808035C @ =0x00003FFF
cmp r1, r0
bhi _08080316
movs r1, #0x80
lsls r1, r1, #8
adds r0, r1, #0
orrs r2, r0
mov r0, ip
strh r2, [r0]
ldrh r0, [r4]
mov r1, ip
strh r0, [r1, #2]
movs r0, #4
add ip, r0
adds r5, #1
ldr r0, _08080364 @ =0x000007FF
cmp r5, r0
bhi _08080336
_08080316:
adds r4, #2
adds r7, #2
adds r3, #2
adds r6, #2
movs r1, #1
add r8, r1
ldr r0, [sp]
cmp r8, r0
blo _080802BC
_08080328:
movs r1, #0x80
add sb, r1
movs r0, #0x40
add sl, r0
ldr r1, [sp, #4]
cmp sl, r1
blo _080802A2
_08080336:
adds r0, r5, #0
add sp, #8
pop {r3, r4, r5}
mov r8, r3
mov sb, r4
mov sl, r5
pop {r4, r5, r6, r7, pc}
.align 2, 0
_08080344: .4byte gUnk_02022830
_08080348: .4byte gRoomControls
_0808034C: .4byte gMapTop+0x0004
_08080350: .4byte gMapTop+0x3004
_08080354: .4byte gMapBottom+0x0004
_08080358: .4byte gMapBottom+0x3004
_0808035C: .4byte 0x00003FFF
_08080360: .4byte 0x000005FF
_08080364: .4byte 0x000007FF
.syntax divided
@@ -1,287 +0,0 @@
.syntax unified
push {r4, r5, r6, r7, lr}
mov r7, sb
mov r6, r8
push {r6, r7}
mov r8, r0
ldr r4, _08068414 @ =gPlayerEntity
ldrh r1, [r4, #0x2e]
ldr r3, _08068418 @ =0xFFFF0000
adds r0, r3, #0
ands r0, r6
orrs r0, r1
ldrh r1, [r4, #0x32]
lsls r1, r1, #0x10
ldr r2, _0806841C @ =0x0000FFFF
ands r0, r2
adds r6, r0, #0
orrs r6, r1
ldrh r0, [r4, #0x36]
ands r3, r7
orrs r3, r0
adds r7, r3, #0
ldr r0, _08068420 @ =gPlayerState
adds r0, #0xa8
ldrb r0, [r0]
lsls r0, r0, #0x10
ldr r2, _08068424 @ =0xFF00FFFF
ands r2, r3
orrs r2, r0
adds r7, r2, #0
ldrb r1, [r4, #0x14]
movs r0, #0x3f
ands r1, r0
lsls r1, r1, #0x18
ldr r0, _08068428 @ =0xC0FFFFFF
ands r0, r2
orrs r0, r1
adds r7, r0, #0
adds r1, r4, #0
adds r1, #0x38
ldrb r1, [r1]
lsls r1, r1, #0x1e
ldr r2, _0806842C @ =0x3FFFFFFF
ands r0, r2
adds r7, r0, #0
orrs r7, r1
mov r0, r8
ldr r5, [r0, #0x64]
ldrb r1, [r5, #6]
cmp r1, #0xa
bne _08068386
lsrs r0, r7, #0x10
lsls r0, r0, #0x18
lsrs r0, r0, #0x18
cmp r0, #0xa
bne _08068394
_08068386:
cmp r1, #0x16
bne _080683B4
lsrs r0, r7, #0x10
lsls r0, r0, #0x18
lsrs r0, r0, #0x18
cmp r0, #0x16
beq _080683B4
_08068394:
ldrh r0, [r4, #0x2e]
mov r1, r8
strh r0, [r1, #0x2e]
ldrh r0, [r4, #0x32]
strh r0, [r1, #0x32]
ldrb r1, [r1, #0x18]
movs r0, #4
rsbs r0, r0, #0
ands r0, r1
movs r1, #1
orrs r0, r1
mov r2, r8
strb r0, [r2, #0x18]
mov r0, r8
bl sub_08068578
_080683B4:
movs r3, #0
mov sb, r3
ldr r0, [r5]
cmp r6, r0
bne _080683D0
ldr r0, [r5, #4]
cmp r7, r0
bne _080683D0
lsls r1, r7, #8
lsrs r0, r1, #0x18
cmp r0, #0x16
beq _080683D0
cmp r0, #0xa
bne _08068430
_080683D0:
mov r0, r8
ldr r5, [r0, #0x64]
adds r5, #0x90
mov r4, r8
adds r4, #0x69
mov r3, r8
adds r3, #0x38
movs r1, #0x58
add r1, r8
mov ip, r1
movs r2, #0x12
_080683E6:
ldr r0, [r5]
ldr r1, [r5, #4]
str r0, [r5, #8]
str r1, [r5, #0xc]
subs r5, #8
subs r2, #1
cmp r2, #0
bge _080683E6
mov r2, r8
ldr r5, [r2, #0x64]
str r6, [r5]
str r7, [r5, #4]
movs r0, #4
mov sb, r0
ldrb r1, [r4]
movs r0, #0
ldrsb r0, [r4, r0]
cmp r0, #0
ble _080684A8
subs r0, r1, #1
strb r0, [r4]
b _080684A8
.align 2, 0
_08068414: .4byte gPlayerEntity
_08068418: .4byte 0xFFFF0000
_0806841C: .4byte 0x0000FFFF
_08068420: .4byte gPlayerState
_08068424: .4byte 0xFF00FFFF
_08068428: .4byte 0xC0FFFFFF
_0806842C: .4byte 0x3FFFFFFF
_08068430:
adds r5, #0x98
movs r1, #4
ldrsh r0, [r5, r1]
cmp r0, #0
bge _08068466
mov r2, r8
ldr r5, [r2, #0x64]
adds r5, #0x90
mov r4, r8
adds r4, #0x69
mov r3, r8
adds r3, #0x38
movs r0, #0x58
add r0, r8
mov ip, r0
movs r2, #0x12
_08068450:
ldr r0, [r5]
ldr r1, [r5, #4]
str r0, [r5, #8]
str r1, [r5, #0xc]
subs r5, #8
subs r2, #1
cmp r2, #0
bge _08068450
movs r1, #4
mov sb, r1
b _080684A8
_08068466:
ldr r1, _0806851C @ =gPlayerEntity
movs r2, #0x2e
ldrsh r0, [r1, r2]
movs r3, #0x32
ldrsh r1, [r1, r3]
ldrh r2, [r5]
ldrh r3, [r5, #2]
bl sub_080041E8
lsrs r0, r0, #4
mov r4, r8
adds r4, #0x69
mov r3, r8
adds r3, #0x38
movs r1, #0x58
add r1, r8
mov ip, r1
cmp r0, #0x18
ble _080684A8
mov r2, r8
ldr r5, [r2, #0x64]
adds r5, #0x90
movs r2, #0x12
_08068494:
ldr r0, [r5]
ldr r1, [r5, #4]
str r0, [r5, #8]
str r1, [r5, #0xc]
subs r5, #8
subs r2, #1
cmp r2, #0
bge _08068494
movs r0, #4
mov sb, r0
_080684A8:
mov r1, r8
ldr r5, [r1, #0x64]
adds r5, #0x98
ldrh r0, [r5]
strh r0, [r1, #0x2e]
ldrh r0, [r5, #2]
strh r0, [r1, #0x32]
ldrh r0, [r5, #4]
strh r0, [r1, #0x36]
ldrb r0, [r5, #7]
lsls r0, r0, #0x1a
lsrs r0, r0, #0x1a
strb r0, [r1, #0x14]
ldrb r0, [r5, #7]
lsrs r0, r0, #6
strb r0, [r3]
ldrb r0, [r5, #6]
cmp r0, #0x16
beq _080684D2
cmp r0, #0xa
bne _080684DE
_080684D2:
mov r2, r8
ldrb r1, [r2, #0x18]
movs r0, #4
rsbs r0, r0, #0
ands r0, r1
strb r0, [r2, #0x18]
_080684DE:
adds r1, r4, #0
ldrb r2, [r1]
movs r0, #0
ldrsb r0, [r1, r0]
cmp r0, #0
ble _080684EE
subs r0, r2, #1
strb r0, [r1]
_080684EE:
mov r2, sb
mov r3, r8
ldrb r0, [r3, #0x14]
lsrs r0, r0, #1
add sb, r0
mov r0, ip
ldrb r0, [r0]
cmp sb, r0
beq _08068520
cmp r2, #0
bne _0806850C
movs r0, #0
ldrsb r0, [r1, r0]
cmp r0, #0
bgt _08068520
_0806850C:
mov r0, r8
mov r1, sb
bl InitAnimationForceUpdate
movs r0, #0x1e
strb r0, [r4]
b _08068526
.align 2, 0
_0806851C: .4byte gPlayerEntity
_08068520:
mov r0, r8
bl UpdateAnimationSingleFrame
_08068526:
mov r0, r8
bl sub_0800451C
mov r1, r8
movs r2, #0x36
ldrsh r0, [r1, r2]
cmp r0, #0
bge _08068542
movs r2, #0xc
rsbs r2, r2, #0
mov r0, r8
movs r1, #0
bl sub_0806F854
_08068542:
pop {r3, r4}
mov r8, r3
mov sb, r4
pop {r4, r5, r6, r7, pc}
.align 2, 0
.syntax divided
@@ -1,127 +0,0 @@
.syntax unified
push {r4, r5, r6, r7, lr}
mov r7, sl
mov r6, sb
mov r5, r8
push {r5, r6, r7}
adds r7, r0, #0
ldr r4, _08068664 @ =gPlayerEntity
ldrh r1, [r4, #0x2e]
ldr r3, _08068668 @ =0xFFFF0000
adds r0, r3, #0
ands r0, r5
orrs r0, r1
ldrh r1, [r4, #0x32]
lsls r1, r1, #0x10
ldr r2, _0806866C @ =0x0000FFFF
ands r0, r2
adds r5, r0, #0
orrs r5, r1
ldrh r0, [r4, #0x36]
ands r3, r6
orrs r3, r0
ldr r0, _08068670 @ =gPlayerState
adds r0, #0xa8
ldrb r0, [r0]
lsls r0, r0, #0x10
ldr r2, _08068674 @ =0xFF00FFFF
ands r2, r3
orrs r2, r0
ldrb r1, [r4, #0x14]
movs r0, #0x3f
ands r1, r0
lsls r1, r1, #0x18
ldr r0, _08068678 @ =0xC0FFFFFF
ands r0, r2
orrs r0, r1
adds r1, r4, #0
adds r1, #0x38
ldrb r1, [r1]
lsls r1, r1, #0x1e
ldr r2, _0806867C @ =0x3FFFFFFF
ands r0, r2
adds r6, r0, #0
orrs r6, r1
movs r0, #0x2e
ldrsh r1, [r4, r0]
movs r2, #0x2e
ldrsh r0, [r7, r2]
subs r1, r1, r0
mov sl, r1
movs r0, #0x32
ldrsh r1, [r4, r0]
movs r2, #0x32
ldrsh r0, [r7, r2]
subs r1, r1, r0
mov r8, r1
mov r1, sl
lsls r0, r1, #0x10
asrs r0, r0, #0x10
movs r1, #0x14
bl FixedDiv
lsls r0, r0, #0x10
asrs r0, r0, #0x10
mov sl, r0
mov r2, r8
lsls r0, r2, #0x10
asrs r0, r0, #0x10
movs r1, #0x14
bl FixedDiv
lsls r0, r0, #0x10
asrs r0, r0, #0x10
mov r8, r0
ldr r3, [r7, #0x64]
movs r0, #0
mov sb, r0
mov ip, r0
movs r4, #0x13
_08068614:
mov r1, ip
asrs r0, r1, #8
subs r0, r5, r0
strh r0, [r3]
lsrs r0, r5, #0x10
mov r2, sb
asrs r1, r2, #8
subs r0, r0, r1
strh r0, [r3, #2]
strh r6, [r3, #4]
lsrs r0, r6, #0x10
strb r0, [r3, #6]
ldrb r0, [r7, #0x14]
movs r1, #0x3f
ands r1, r0
ldrb r2, [r3, #7]
movs r0, #0x40
rsbs r0, r0, #0
ands r0, r2
orrs r0, r1
strb r0, [r3, #7]
adds r1, r7, #0
adds r1, #0x38
ldrb r1, [r1]
lsls r1, r1, #6
movs r2, #0x3f
ands r0, r2
orrs r0, r1
strb r0, [r3, #7]
adds r3, #8
add sb, r8
add ip, sl
subs r4, #1
cmp r4, #0
bge _08068614
pop {r3, r4, r5}
mov r8, r3
mov sb, r4
mov sl, r5
pop {r4, r5, r6, r7, pc}
.align 2, 0
_08068664: .4byte gPlayerEntity
_08068668: .4byte 0xFFFF0000
_0806866C: .4byte 0x0000FFFF
_08068670: .4byte gPlayerState
_08068674: .4byte 0xFF00FFFF
_08068678: .4byte 0xC0FFFFFF
_0806867C: .4byte 0x3FFFFFFF
.syntax divided
+31 -21
View File
@@ -786,23 +786,28 @@ gUnk_08002325:: @ 08002325
gUnk_0800232C:: @ 0800232C
.incbin "code_080011C4/gUnk_0800232C.bin"
@ used for business scrub fusers, together with first 4 bytes of next table
@ each entry contains 6 bytes, the first 3 describe which entities are described by this,
@ the last 3 contain fuser id and text id for fuser name
gUnk_0800232E:: @ 0800232E
.incbin "code_080011C4/gUnk_0800232E.bin"
@ same as above, but for other fusers
gUnk_08002342:: @ 08002342
.incbin "code_080011C4/gUnk_08002342.bin"
non_word_aligned_thumb_func_start sub_08002632
sub_08002632: @ 0x08002632
non_word_aligned_thumb_func_start GetFuserId
GetFuserId: @ 0x08002632
push {r4, r5, r6, r7, lr}
ldr r4, _0800269C @ =gUnk_0800232E
ldrb r3, [r0, #8]
cmp r3, #3
beq _08002642
beq enemy
cmp r3, #7
bne _08002684
bne not_found
npc: @ 0x08002640
ldr r4, _080026A0 @ =gUnk_08002342
_08002642:
enemy: @ 0x08002642
ldrb r3, [r0, #9]
lsls r1, r3, #0x10
ldrb r3, [r0, #0xa]
@@ -810,43 +815,48 @@ _08002642:
orrs r1, r3
ldrb r3, [r0, #0xb]
orrs r1, r3
add r6, pc, #0x38
_08002652:
add r6, pc, #(entity_type_bitmasks - next - 2) @ pointer to entity_type_bitmasks
next: @ 0x08002652
adds r4, #6
ldrb r3, [r4]
ldrb r3, [r4] @ entity id
lsls r2, r3, #0x10
beq _08002684
beq not_found @ end of list reached
movs r5, #0
ldrb r3, [r4, #1]
ldrb r3, [r4, #1] @ entity type, or 0xff for any
cmp r3, #0xff
bne _08002664
bne must_match_entity_type
movs r5, #8
_08002664:
must_match_entity_type: @ 0x08002664
lsls r3, r3, #8
orrs r2, r3
ldrb r3, [r4, #2]
ldrb r3, [r4, #2] @ entity type2, or 0xff for any
cmp r3, #0xff
bne _08002670
bne must_match_entity_type2
adds r5, #4
_08002670:
must_match_entity_type2: @ 0x08002670
orrs r2, r3
ldr r5, [r6, r5]
adds r3, r1, #0
ands r3, r5
ands r2, r5
cmp r3, r2
bne _08002652
ldrb r0, [r4, #3]
ldrh r1, [r4, #4]
bne next
match: @ 0x0800267E
ldrb r0, [r4, #3] @ fuser id
ldrh r1, [r4, #4] @ text id for fuser name, used in KinstoneMenu_080A4494
pop {r4, r5, r6, r7, pc}
_08002684:
not_found: @ 0x08002684
movs r0, #0
movs r1, #0
pop {r4, r5, r6, r7, pc}
.align 2, 0
_0800268C:
entity_type_bitmasks: @ 0x0800268C
@ each 0xFF means that entity member must match
@ type2 type id
.byte 0xFF, 0xFF, 0xFF, 0x00
.byte 0x00, 0xFF, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x00, 0xFF, 0x00
.byte 0x00, 0xFF, 0xFF, 0x00
.byte 0xFF, 0x00, 0xFF, 0x00
.byte 0x00, 0x00, 0xFF, 0x00
_0800269C: .4byte gUnk_0800232E
_080026A0: .4byte gUnk_08002342
+4 -4
View File
@@ -19,7 +19,7 @@ UpdateScrollVram: @ 0x08000108
cmp r0, #0
beq _08000126
ldr r0, _080001F0 @ =gMapDataBottomSpecial
ldr r1, _080001F4 @ =gUnk_02021F70
ldr r1, _080001F4 @ =gBG1Buffer+0x40
bl _call_via_r4
_08000126:
ldr r0, _080001F8 @ =gMapTop
@@ -27,7 +27,7 @@ _08000126:
cmp r0, #0
beq _08000136
ldr r0, _080001FC @ =gMapDataTopSpecial
ldr r1, _08000200 @ =gUnk_020344F0
ldr r1, _08000200 @ =gBG2Buffer+0x40
bl _call_via_r4
_08000136:
pop {r4, pc}
@@ -124,10 +124,10 @@ GetTileIndex: @ 0x080001DA
_080001E8: .4byte gUpdateVisibleTiles
_080001EC: .4byte gMapBottom
_080001F0: .4byte gMapDataBottomSpecial
_080001F4: .4byte gUnk_02021F70
_080001F4: .4byte gBG1Buffer+0x40
_080001F8: .4byte gMapTop
_080001FC: .4byte gMapDataTopSpecial
_08000200: .4byte gUnk_020344F0
_08000200: .4byte gBG2Buffer+0x40
_08000204: .4byte gUnk_08000248
_08000208: .4byte gUnk_08000228
_0800020C: .4byte 0x00004000
+1 -1
View File
@@ -45,4 +45,4 @@ gSpriteAnimations_Sturgeon:: @ 0810FBD0
.4byte gSpriteAnimations_Sturgeon_7
.4byte gSpriteAnimations_Sturgeon_8
.4byte gSpriteAnimations_Sturgeon_9
.4byte 00000000
.4byte 00000000
@@ -1,7 +1,7 @@
@ Cloud Tops Gregal healthy
SCRIPT_START script_GregalHealthy
BeginBlock
Call sub_0806CD58
Call Gregal_MakeInteractable
DoPostScriptAction 0x000a
SetAnimationState 0x0004
SetAnimation 0x0006
@@ -5,15 +5,15 @@ SCRIPT_START script_Npc4EFirstCloud
SetAnimationState 0x0004
DoPostScriptAction 0x000b
DoPostScriptAction 0x0008
Call sub_0806DAAC
Call NPC4E_IsKinstoneFused
JumpIf script_0800D6AE
Call sub_0806DAD0
CallWithArg sub_0806DA04, 0x00000002
Call NPC4E_MakeFuserInteractable
CallWithArg NPC4E_ChangeInteractableHitbox, 0x00000002
EndBlock
script_0800D636:
_0807EA4C
_0807E9F0
Call sub_0806DAAC
Call NPC4E_IsKinstoneFused
JumpIf script_0800D650
Call EnablePauseMenu
EnablePlayerControl
@@ -28,9 +28,9 @@ script_0800D650:
CameraTargetEntity
MoveTo 0x01e8, 0x01b8
Wait 0x003c
Call sub_0806DAE8
Call NPC4E_SetPinwheelFlag
Wait 0x0078
Call sub_0806DB44
Call NPC4E_IsEveryPinwheelActivated
JumpIfNot script_Npc4EKinstoneFused
LoadRoomEntityList gUnk_080DD730
DoPostScriptAction 0x0006
+1 -1
View File
@@ -1,7 +1,7 @@
@ Cloud Tops Windtribespeople Leader Siroc
SCRIPT_START script_Siroc
BeginBlock
Call sub_0806C870
Call WindTribespeople_MakeInteractable
DoPostScriptAction 0x000a
EndBlock
script_08014AD2:
@@ -1,7 +1,7 @@
@ Cloud Tops WindTribespeople blocking exit
SCRIPT_START script_WindTribespeople1
BeginBlock
Call sub_0806C870
Call WindTribespeople_MakeInteractable
DoPostScriptAction 0x000a
CheckGlobalFlag WARP_EVENT_END
JumpIf script_08014976
@@ -1,7 +1,7 @@
@ Cloud Top Windtribespeople woman on first floor
SCRIPT_START script_WindTribespeople2
BeginBlock
Call sub_0806C870
Call WindTribespeople_MakeInteractable
DoPostScriptAction 0x000a
CheckGlobalFlag WARP_EVENT_END
JumpIfNot script_080149C6
@@ -2,7 +2,7 @@
SCRIPT_START script_WindTribespeople3
BeginBlock
SetEntitySpeed 0x0080
Call sub_0806C870
Call WindTribespeople_MakeInteractable
DoPostScriptAction 0x000a
EndBlock
script_080149DE:
@@ -1,7 +1,7 @@
@ Cloud Tops Windtribespeople blocking way up
SCRIPT_START script_WindTribespeople4
BeginBlock
Call sub_0806C870
Call WindTribespeople_MakeInteractable
DoPostScriptAction 0x000a
EndBlock
script_08014A36:
@@ -1,7 +1,7 @@
@ Cloud Tops Windtribespeople at the bed
SCRIPT_START script_WindTribespeople5
BeginBlock
Call sub_0806C870
Call WindTribespeople_MakeInteractable
DoPostScriptAction 0x000a
EndBlock
script_08014A62:
@@ -3,7 +3,7 @@ SCRIPT_START script_WindTribespeople7
BeginBlock
CheckGlobalFlag KUMOTATSUMAKI
JumpIf script_08014CD4
Call sub_0806C870
Call WindTribespeople_MakeInteractable
DoPostScriptAction 0x000a
DoPostScriptAction 0x0000
EndBlock
@@ -17,7 +17,7 @@ SCRIPT_START script_HurdyGurdyManFirstKinstone
_0807E8E4_0
SetSyncFlag 0x00000040
WaitForSyncFlagAndClear 0x00000002
Call sub_0806E440
Call HurdyGurdyMan_MakeInteractable
Wait 0x0078
SetSyncFlag 0x00000040
WaitForSyncFlagAndClear 0x00000002
@@ -32,7 +32,7 @@ script_0800E0DE:
WaitUntilTextboxCloses
SetLocalFlag 0x0093
script_0800E12E:
Call sub_080668F0
Call MinisterPotho_MakeInteractable
EnablePlayerControl
EndBlock
script_0800E138:
@@ -3,7 +3,7 @@ SCRIPT_START script_MinisterPothoCell
BeginBlock
SetAnimationState 0x0002
DoPostScriptAction 0x000a
Call sub_080668F0
Call MinisterPotho_MakeInteractable
EndBlock
script_0800E41A:
CheckEntityInteractType
@@ -1,7 +1,7 @@
@ Graveyard Dampe in house 2?
SCRIPT_START script_DampeInside2
BeginBlock
Call sub_0806BE3C
Call Dampe_MakeInteractable
DoPostScriptAction 0x000a
DoPostScriptAction 0x0007
EndBlock
@@ -14,7 +14,7 @@ script_08009646:
Call sub_0806BF44
JumpIf script_08009646
EndBlock
Call sub_0806BE3C
Call Dampe_MakeInteractable
DoPostScriptAction 0x000a
DoPostScriptAction 0x0007
script_08009660:
@@ -1,7 +1,7 @@
@ Graveyard GhostBrothers
SCRIPT_START script_GhostBrothers
BeginBlock
Call sub_08065D00
Call GhostBrothers_MakeInteractable
SetAnimationState 0x0004
DoPostScriptAction 0x0000
DoPostScriptAction 0x000a
@@ -3,7 +3,7 @@ SCRIPT_START script_KingDaltus
BeginBlock
SetAnimationState 0x0004
DoPostScriptAction 0x0000
Call sub_0806672C
Call KingDaltus_MakeInteractable
DoPostScriptAction 0x000a
EndBlock
Jump script_0800917C
@@ -4,7 +4,7 @@ SCRIPT_START script_MinisterPotho
SetAnimationState 0x0004
DoPostScriptAction 0x0000
script_0800927E:
Call sub_080668F0
Call MinisterPotho_MakeInteractable
DoPostScriptAction 0x000a
EndBlock
script_0800928A:
+7 -7
View File
@@ -2,7 +2,7 @@
SCRIPT_START script_Anju
BeginBlock
DoPostScriptAction 0x0001
Call sub_0806C354
Call Anju_MakeInteractable
DoPostScriptAction 0x000a
EndBlock
script_0801015A:
@@ -16,7 +16,7 @@ script_0801015A:
WaitUntilTextboxCloses
CheckTextboxResult
JumpIfNot script_080101A6
Call sub_080A1608
Call CuccoMinigame_TellObjective
WaitUntilTextboxCloses
EnablePlayerControl
CallWithArg CuccoMinigame_Init, script_080101AC
@@ -25,7 +25,7 @@ script_0801015A:
SetRoomFlag 0x0001
Jump script_0801015A
script_0801019E:
Call sub_080A1608
Call CuccoMinigame_TellObjective
WaitUntilTextboxCloses
script_080101A6:
EnablePlayerControl
@@ -60,14 +60,14 @@ script_080101AC:
SetFade4
WaitForFadeFinish
PlayBGM
Call sub_080A13B4
Call CuccoMinigame_Results
WaitUntilTextboxCloses
JumpIfNot script_08010240
Call sub_080A13E8
Call CuccoMinigame_WinItem
WaitPlayerGetItem
Call sub_080A1460
Call CuccoMinigame_WinRupees
WaitUntilTextboxCloses
Call sub_080A14A8
Call CuccoMinigame_AdvanceLevel
script_08010240:
Call EnablePauseMenu
EnablePlayerControl
+3 -3
View File
@@ -19,7 +19,7 @@ script_08010502:
MessageNoOverlap TEXT_PICOLYTE, 0x10
WaitUntilTextboxCloses
script_0801052E:
Call sub_080634E4
Call Beedle_GetObjectType
JumpTable script_08010544, script_08010558, script_08010570, script_08010570, script_0801054C, script_08010564, script_08010570
script_08010544:
MessageNoOverlap TEXT_PICOLYTE, 0x0d
@@ -37,7 +37,7 @@ script_08010564:
JumpIfNot script_080105DC
Jump script_08010570
script_08010570:
Call sub_080634EC
Call Beedle_ConfirmBuyItem
CallWithArg ScriptCommand_SaleItemConfirmMessage, 0x00000000
WaitUntilTextboxCloses
CheckTextboxResult
@@ -46,7 +46,7 @@ script_08010570:
JumpIfNot script_080105C4
CheckBottleContaining ITEM_BOTTLE_EMPTY
JumpIfNot script_080105CC
Call sub_08063504
Call Beedle_IsBottleInInventory
JumpIf script_080105D4
MessageNoOverlap TEXT_PICOLYTE, 0x07
WaitUntilTextboxCloses
+1 -1
View File
@@ -3,7 +3,7 @@ SCRIPT_START script_Brocco
BeginBlock
SetAnimationState 0x0004
SetAnimation 0x0000
Call sub_080636F4
Call Brocco_MakeInteractable
DoPostScriptAction 0x000a
Call SetPriorityMessage
EndBlock
+1 -1
View File
@@ -4,7 +4,7 @@ SCRIPT_START script_Carpenter
SetAnimationState 0x0004
CallWithArg sub_080672B0, 0x00000000
DoPostScriptAction 0x000a
Call sub_08067314
Call Carpenter_MakeInteractable
EndBlock
script_08010AB4:
CheckEntityInteractType
+1 -1
View File
@@ -1,7 +1,7 @@
@ Hyrule Townsperson house with cat
SCRIPT_START script_CatPerson
BeginBlock
Call sub_08061E70
Call Townsperson_MakeInteractable
DoPostScriptAction 0x000a
SetAnimationState 0x0004
Call sub_08061FD8
@@ -1,7 +1,7 @@
@ Hyrule Town Cat person talking to Dog person
SCRIPT_START script_CatPersonTalkingToDogPerson
BeginBlock
Call sub_08061E70
Call Townsperson_MakeInteractable
DoPostScriptAction 0x000a
SetAnimationState 0x0002
Call sub_08061FD8
+1 -1
View File
@@ -1,7 +1,7 @@
@ Hyrule Town Din
SCRIPT_START script_Din
BeginBlock
Call sub_08064828
Call Din_MakeInteractable
SetAnimationState 0x0004
DoPostScriptAction 0x0001
DoPostScriptAction 0x000a
+1 -1
View File
@@ -1,7 +1,7 @@
@ Hyrule Town Din when one of them has moved in
SCRIPT_START script_Din2
BeginBlock
Call sub_08064828
Call Din_MakeInteractable
SetAnimationState 0x0004
DoPostScriptAction 0x0001
DoPostScriptAction 0x000a
+1 -1
View File
@@ -1,7 +1,7 @@
@ Din completely alone
SCRIPT_START script_DinAlone
BeginBlock
Call sub_08064828
Call Din_MakeInteractable
SetAnimationState 0x0004
DoPostScriptAction 0x0001
DoPostScriptAction 0x000a
@@ -1,7 +1,7 @@
@ Hyrule Town Din moved in
SCRIPT_START script_DinMovedIn
BeginBlock
Call sub_08064828
Call Din_MakeInteractable
SetAnimationState 0x0004
DoPostScriptAction 0x0001
DoPostScriptAction 0x000a
@@ -1,7 +1,7 @@
@ Hyrule Town Dog person talking to Cat person
SCRIPT_START script_DogPersonInCatHouse
BeginBlock
Call sub_08061E70
Call Townsperson_MakeInteractable
DoPostScriptAction 0x000a
SetAnimationState 0x0006
Call sub_08061FD8
@@ -19,7 +19,7 @@ script_0800EB7C:
Call sub_08061FD8
Jump script_0800EB7C
BeginBlock
Call sub_08061E70
Call Townsperson_MakeInteractable
DoPostScriptAction 0x000a
SetAnimationState 0x0002
Call sub_08061FD8
+1 -1
View File
@@ -1,7 +1,7 @@
@ Hyrule Town Farore
SCRIPT_START script_Farore
BeginBlock
Call sub_08064A28
Call Farore_MakeInteractable
SetAnimationState 0x0004
DoPostScriptAction 0x0001
DoPostScriptAction 0x000a
+1 -1
View File
@@ -1,7 +1,7 @@
@ Hyrule Town Farore when one of them has moved in
SCRIPT_START script_Farore2
BeginBlock
Call sub_08064A28
Call Farore_MakeInteractable
SetAnimationState 0x0004
DoPostScriptAction 0x0001
DoPostScriptAction 0x000a
@@ -1,7 +1,7 @@
@ Farore completely alone
SCRIPT_START script_FaroreAlone
BeginBlock
Call sub_08064A28
Call Farore_MakeInteractable
SetAnimationState 0x0004
DoPostScriptAction 0x0001
DoPostScriptAction 0x000a
@@ -1,7 +1,7 @@
@ Farore moved in
SCRIPT_START script_FaroreMovedIn
BeginBlock
Call sub_08064A28
Call Farore_MakeInteractable
SetAnimationState 0x0004
DoPostScriptAction 0x0001
DoPostScriptAction 0x000a
@@ -1,7 +1,7 @@
@ Forest Minish above cafe
SCRIPT_START script_ForestMinish11
BeginBlock
Call sub_08060090
Call ForestMinish_MakeInteractable
DoPostScriptAction 0x000a
EndBlock
script_0800E6BE:
@@ -4,7 +4,7 @@ SCRIPT_START script_HurdyGurdyMan
DoPostScriptAction 0x000a
SetAnimationState 0x0004
SetAnimation 0x0008
Call sub_0806E440
Call HurdyGurdyMan_MakeInteractable
EndBlock
script_08010BCA:
CheckEntityInteractType
+1 -1
View File
@@ -2,7 +2,7 @@
SCRIPT_START script_Kid1
BeginBlock
DoPostScriptAction 0x0000
Call sub_08062A48
Call Kid_MakeInteractable
DoPostScriptAction 0x000a
EndBlock
script_080102A6:
+1 -1
View File
@@ -2,7 +2,7 @@
SCRIPT_START script_Kid2
BeginBlock
DoPostScriptAction 0x0000
Call sub_08062A48
Call Kid_MakeInteractable
DoPostScriptAction 0x000a
EndBlock
script_080102F2:
+1 -1
View File
@@ -2,7 +2,7 @@
SCRIPT_START script_Kid4
BeginBlock
DoPostScriptAction 0x0000
Call sub_08062A48
Call Kid_MakeInteractable
DoPostScriptAction 0x000a
EndBlock
script_080103C2:
+1 -1
View File
@@ -3,7 +3,7 @@ SCRIPT_START script_Kid5
BeginBlock
SetAnimation 0x0008
script_08010622:
Call sub_08062A48
Call Kid_MakeInteractable
DoPostScriptAction 0x000a
EndBlock
script_0801062E:
+1 -1
View File
@@ -2,7 +2,7 @@
SCRIPT_START script_KidInn
BeginBlock
DoPostScriptAction 0x000a
Call sub_08062A48
Call Kid_MakeInteractable
DoPostScriptAction 0x0000
script_0800D5AC:
EndBlock
@@ -2,7 +2,7 @@
SCRIPT_START script_LibraryVisitor
BeginBlock
Call sub_08061FD8
Call sub_08061E70
Call Townsperson_MakeInteractable
DoPostScriptAction 0x000a
EndBlock
script_08008DA0:
+1 -1
View File
@@ -1,7 +1,7 @@
@ Hyrule Town Mama
SCRIPT_START script_Mama
BeginBlock
Call sub_0806C4F8
Call Mama_MakeInteractable
DoPostScriptAction 0x000a
SetAnimationState 0x0000
EndBlock
+1 -1
View File
@@ -1,7 +1,7 @@
@ Hyrule Town Mayor Hagen
SCRIPT_START script_Mayor
BeginBlock
Call sub_0806CE5C
Call MayorHagen_MakeInteractable
DoPostScriptAction 0x000a
SetAnimationState 0x0004
SetAnimation 0x0008
@@ -1,7 +1,7 @@
@ Hyrule Town Mutoh
SCRIPT_START script_MutohInMill
BeginBlock
Call sub_08067100
Call Mutoh_MakeInteractable
DoPostScriptAction 0x000a
SetAnimationState 0x0004
DoPostScriptAction 0x0000
+1 -1
View File
@@ -1,7 +1,7 @@
@ Hyrule Town Nayru
SCRIPT_START script_Nayru
BeginBlock
Call sub_08064928
Call Nayru_MakeInteractable
SetAnimationState 0x0004
DoPostScriptAction 0x0001
DoPostScriptAction 0x000a
+1 -1
View File
@@ -1,7 +1,7 @@
@ Hyrule Town Nayru when one of them has moved in
SCRIPT_START script_Nayru2
BeginBlock
Call sub_08064928
Call Nayru_MakeInteractable
SetAnimationState 0x0004
DoPostScriptAction 0x0001
DoPostScriptAction 0x000a
@@ -1,7 +1,7 @@
@ Nayru completely alone
SCRIPT_START script_NayruAlone
BeginBlock
Call sub_08064928
Call Nayru_MakeInteractable
SetAnimationState 0x0004
DoPostScriptAction 0x0001
DoPostScriptAction 0x000a
@@ -1,7 +1,7 @@
@ Nayru moved in
SCRIPT_START script_NayruMovedIn
BeginBlock
Call sub_08064928
Call Nayru_MakeInteractable
SetAnimationState 0x0004
DoPostScriptAction 0x0001
DoPostScriptAction 0x000a
@@ -1,7 +1,7 @@
@ Older lady in cat persons house
SCRIPT_START script_OldLadyCatHouse1
BeginBlock
Call sub_08061E70
Call Townsperson_MakeInteractable
DoPostScriptAction 0x000a
SetAnimationState 0x0004
Call sub_08061FD8
@@ -1,7 +1,7 @@
@ Older lady in cat persons house
SCRIPT_START script_OldLadyCatHouse2
BeginBlock
Call sub_08061E70
Call Townsperson_MakeInteractable
DoPostScriptAction 0x000a
SetAnimationState 0x0006
Call sub_08061FD8
@@ -1,7 +1,7 @@
@ Phonograph
SCRIPT_START script_Phonograph
BeginBlock
Call sub_0807F934
Call MakeCheckableObjectInteractable
EndBlock
script_0800BA46:
CheckEntityInteractType
+1 -1
View File
@@ -3,7 +3,7 @@ SCRIPT_START script_Pina
BeginBlock
SetAnimationState 0x0004
SetAnimation 0x0000
Call sub_08063CAC
Call Pina_MakeInteractable
DoPostScriptAction 0x000a
Call SetPriorityMessage
EndBlock
+1 -1
View File
@@ -10,7 +10,7 @@ SCRIPT_START script_Postman
Call sub_0806075C
EndBlock
WaitUntilTextboxCloses
Call sub_080606C0
Call Postman_MakeInteractable
script_08010B10:
EndBlock
Call sub_0806076C
+1 -1
View File
@@ -1,7 +1,7 @@
@ Hyrule Town Rem
SCRIPT_START script_Rem
BeginBlock
CallWithArg sub_0806A93C, 0x12345678
CallWithArg Rem_MakeInteractable, 0x12345678
SetAnimationState 0x0004
SetAnimation 0x0002
CheckInventory1 ITEM_PEGASUS_BOOTS
@@ -1,7 +1,7 @@
@ Hyrule Town SittingPerson
SCRIPT_START script_SittingPerson
BeginBlock
Call sub_080639D0
Call SittingPerson_MakeInteractable
DoPostScriptAction 0x000a
EndBlock
BeginBlock
@@ -3,7 +3,7 @@ SCRIPT_START script_SmallTownMinish
BeginBlock
CheckPlayerMinish
JumpIfNot script_08010BAC
Call sub_0807F924
Call MakeInteractableAsMinish
SetAnimationState 0x0004
DoPostScriptAction 0x0000
DoPostScriptAction 0x0007
+1 -1
View File
@@ -1,7 +1,7 @@
@ Library Sturgeon
SCRIPT_START script_Sturgeon
BeginBlock
Call sub_08064CC0
Call Sturgeon_MakeInteractable
DoPostScriptAction 0x000a
DoPostScriptAction 0x0007
SetAnimationState 0x0002
+1 -1
View File
@@ -1,7 +1,7 @@
@ Hyrule Town Teachers
SCRIPT_START script_Teachers
BeginBlock
Call sub_0806C674
Call Teachers_MakeInteractable
DoPostScriptAction 0x000a
SetAnimationState 0x0004
EndBlock
@@ -2,7 +2,7 @@
@ also in library, cafe
SCRIPT_START script_TownMinish1
BeginBlock
Call sub_0806ADFC
Call TownMinish_MakeInteractable
DoPostScriptAction 0x000a
script_0800E6F4:
EndBlock
@@ -2,7 +2,7 @@
SCRIPT_START script_Townsperson1
BeginBlock
Call sub_08061FE4
Call sub_08061E70
Call Townsperson_MakeInteractable
DoPostScriptAction 0x000a
EndBlock
script_080100DC:
@@ -2,7 +2,7 @@
SCRIPT_START script_Townsperson2
BeginBlock
Call sub_08061FE4
Call sub_08061E70
Call Townsperson_MakeInteractable
DoPostScriptAction 0x000a
EndBlock
script_08010110:
@@ -1,7 +1,7 @@
@ Hyrule Townsperson house with dog
SCRIPT_START script_TownspersonInDogHouse
BeginBlock
Call sub_08061E70
Call Townsperson_MakeInteractable
DoPostScriptAction 0x000a
SetAnimationState 0x0004
Call sub_08061FD8
@@ -1,7 +1,7 @@
@ Hyrule Town Windstribepeople in house
SCRIPT_START script_WindTribespeopleVisitor
BeginBlock
Call sub_0806C870
Call WindTribespeople_MakeInteractable
DoPostScriptAction 0x000a
SetAnimationState 0x0004
SetAnimation 0x0000
@@ -1,7 +1,7 @@
@ Lake Hylia Forest Minish telling us to go to the library
SCRIPT_START script_ForestMinish3
BeginBlock
Call sub_08060090
Call ForestMinish_MakeInteractable
DoPostScriptAction 0x000a
EndBlock
script_0800C5D6:
@@ -4,7 +4,7 @@ SCRIPT_START script_GoronPunching
_0807E9D4
Call sub_080694EC
DoPostScriptAction 0x000a
Call sub_080694B0
Call Goron_MakeInteractable
EndBlock
script_0800B9CA:
Call CheckInteractType
@@ -2,7 +2,7 @@
SCRIPT_START script_BombMinish
BeginBlock
SetAnimationState 0x0004
Call sub_08060090
Call ForestMinish_MakeInteractable
DoPostScriptAction 0x000a
CheckKinstoneFused KINSTONE_1C
JumpIf script_08009FD2
@@ -1,7 +1,7 @@
@ Syrup CUTSCENE_ORCHESTRATOR Potion
SCRIPT_START script_CutsceneOrchestratorPotionBlue
BeginBlock
Call sub_080787B4
Call AddInteractableCheckableObject
EndBlock
script_08016146:
CheckEntityInteractType
@@ -1,7 +1,7 @@
@ CUTSCENE_ORCHESTRATOR in witch hut?
SCRIPT_START script_CutsceneOrchestratorPotionRed
BeginBlock
Call sub_080787B4
Call AddInteractableCheckableObject
EndBlock
script_0801619A:
CheckEntityInteractType
@@ -3,7 +3,7 @@ SCRIPT_START script_ForestMinish10
BeginBlock
CheckInventory1 ITEM_JABBERNUT
JumpIfNot script_0800C5FE
Call sub_08060090
Call ForestMinish_MakeInteractable
DoPostScriptAction 0x000a
EndBlock
script_0800CD92:
@@ -2,7 +2,7 @@
SCRIPT_START script_ForestMinish4
BeginBlock
script_0800C5FE:
Call sub_08060090
Call ForestMinish_MakeInteractable
DoPostScriptAction 0x000a
EndBlock
script_0800C60A:
@@ -1,7 +1,7 @@
@ Crenel Hermit
SCRIPT_START script_CrenelHermit
BeginBlock
Call sub_08061E70
Call Townsperson_MakeInteractable
DoPostScriptAction 0x000a
SetAnimationState 0x0004
Call sub_08061FD8
@@ -1,7 +1,7 @@
@ Mines Melari in his room
SCRIPT_START script_MelariInRoom
BeginBlock
Call sub_08068884
Call Melari_MakeInteractable
DoPostScriptAction 0x000a
SetAnimationState 0x0004
SetAnimation 0x0000
@@ -1,7 +1,7 @@
@ Mines Mountain Minish before beds
SCRIPT_START script_MountainMinish1
BeginBlock
Call sub_08068104
Call MountainMinish_MakeInteractable
DoPostScriptAction 0x000a
EndBlock
script_0800CF5E:
@@ -1,7 +1,7 @@
@ Mines Mountain Minish
SCRIPT_START script_MountainMinish2
BeginBlock
Call sub_08068104
Call MountainMinish_MakeInteractable
DoPostScriptAction 0x000a
EndBlock
script_0800CF96:
@@ -1,7 +1,7 @@
@ Mines Mountain Minish at exit
SCRIPT_START script_MountainMinish4
BeginBlock
Call sub_08068104
Call MountainMinish_MakeInteractable
DoPostScriptAction 0x000a
EndBlock
script_0800D35E:
@@ -2,7 +2,7 @@
SCRIPT_START script_MountainMinish5
BeginBlock
SetEntitySpeed 0x0100
Call sub_08068104
Call MountainMinish_MakeInteractable
DoPostScriptAction 0x000a
EndBlock
script_0800D426:
@@ -42,7 +42,7 @@ script_0800D426:
.2byte 0x0000
BeginBlock
DoPostScriptAction 0x000a
Call sub_08062A48
Call Kid_MakeInteractable
SetAnimationState 0x0004
DoPostScriptAction 0x0000
script_0800D4E4:
@@ -2,7 +2,7 @@
@ Hyrule Town Carpenter
SCRIPT_START script_CarpenterOutsideTown
BeginBlock
Call sub_08067314
Call Carpenter_MakeInteractable
DoPostScriptAction 0x000a
SetAnimationState 0x0004
SetIntVariable 0x00000000
@@ -1,7 +1,7 @@
@ Outside Castle Mutoh
SCRIPT_START script_MutohOutsideTown
BeginBlock
Call sub_08067100
Call Mutoh_MakeInteractable
DoPostScriptAction 0x000a
SetAnimationState 0x0004
DoPostScriptAction 0x0000
+3 -2
View File
@@ -1,7 +1,7 @@
@ Farmer
SCRIPT_START script_Farmer
BeginBlock
Call sub_0806BCD4
Call Farmers_MakeInteractable
DoPostScriptAction 0x000a
CallWithArg sub_0806BC94, 0x00000000
EndBlock
@@ -30,9 +30,10 @@ script_0800B134:
Call sub_0807F650
_0807E9F0
.ifndef EU
@! @bug: In EU, Eenie is marked as done fusing if kinstone menu is closed without fusing
JumpIfNot script_0800B160
.endif
Call sub_0806BCC0
Call Farmers_MarkEenieFuserDoner
script_0800B160:
Call EnablePauseMenu
EnablePlayerControl
+4 -4
View File
@@ -3,10 +3,10 @@ SCRIPT_START script_MysteriousWall
BeginBlock
DoPostScriptAction 0x000b
DoPostScriptAction 0x0008
Call sub_0806DAAC
Call NPC4E_IsKinstoneFused
JumpIf script_0800B9AC
Call sub_0806DAD0
CallWithArg sub_0806DA04, 0x00000005
Call NPC4E_MakeFuserInteractable
CallWithArg NPC4E_ChangeInteractableHitbox, 0x00000005
EndBlock
script_0800B98A:
_0807EA4C
@@ -16,7 +16,7 @@ script_0800B98A:
EnablePlayerControl
Jump script_0800B98A
script_0800B99E:
Call sub_0806F188
Call MarkFuserDone
Call EnablePauseMenu
EnablePlayerControl
script_0800B9AC:
+1 -1
View File
@@ -1,7 +1,7 @@
@ Tingle Siblings
SCRIPT_START script_TingleSiblings
BeginBlock
Call sub_08064EA4
Call TingleSiblings_MakeInteractable
SetAnimationState 0x0004
DoPostScriptAction 0x0000
DoPostScriptAction 0x000a

Some files were not shown because too many files have changed in this diff Show More