Merge branch 'master' of https://github.com/pret/pokeemerald into stair_warps
8
.gitattributes
vendored
@ -10,6 +10,14 @@ Makefile text eol=lf
|
|||||||
*.inc text eol=lf
|
*.inc text eol=lf
|
||||||
*.sha1 text eol=lf
|
*.sha1 text eol=lf
|
||||||
*.json text eol=lf
|
*.json text eol=lf
|
||||||
|
*.sed text eol=lf
|
||||||
|
*.cpp text eol=lf
|
||||||
|
.gitattributes text eol=lf
|
||||||
|
.gitignore text eol=lf
|
||||||
|
*.hpp text eol=lf
|
||||||
|
*.md text eol=lf
|
||||||
|
*.ps1 text eol=crlf
|
||||||
|
*.yml text eol=lf
|
||||||
|
|
||||||
*.png binary
|
*.png binary
|
||||||
*.bin binary
|
*.bin binary
|
||||||
|
|||||||
8
.github/pull_request_template.md
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<!--- Provide a general summary of your changes in the Title above -->
|
||||||
|
|
||||||
|
## Description
|
||||||
|
<!--- Describe your changes in detail -->
|
||||||
|
|
||||||
|
## **Discord contact info**
|
||||||
|
<!--- formatted as name#numbers, e.g. PikalaxALT#5823 -->
|
||||||
|
<!--- Contributors must join https://discord.gg/d5dubZ3 -->
|
||||||
1
.gitignore
vendored
@ -33,3 +33,4 @@ porymap.project.cfg
|
|||||||
.vscode/
|
.vscode/
|
||||||
*.a
|
*.a
|
||||||
.fuse_hidden*
|
.fuse_hidden*
|
||||||
|
*.sna
|
||||||
|
|||||||
40
Makefile
@ -63,13 +63,13 @@ ASFLAGS := -mcpu=arm7tdmi --defsym MODERN=$(MODERN)
|
|||||||
|
|
||||||
ifeq ($(MODERN),0)
|
ifeq ($(MODERN),0)
|
||||||
CC1 := tools/agbcc/bin/agbcc$(EXE)
|
CC1 := tools/agbcc/bin/agbcc$(EXE)
|
||||||
override CFLAGS += -mthumb-interwork -Wimplicit -Wparentheses -Werror -O2 -fhex-asm
|
override CFLAGS += -mthumb-interwork -Wimplicit -Wparentheses -Werror -O2 -fhex-asm -g
|
||||||
ROM := pokeemerald.gba
|
ROM := pokeemerald.gba
|
||||||
OBJ_DIR := build/emerald
|
OBJ_DIR := build/emerald
|
||||||
LIBPATH := -L ../../tools/agbcc/lib
|
LIBPATH := -L ../../tools/agbcc/lib
|
||||||
else
|
else
|
||||||
CC1 = $(shell $(CC) --print-prog-name=cc1) -quiet
|
CC1 = $(shell $(CC) --print-prog-name=cc1) -quiet
|
||||||
override CFLAGS += -mthumb -mthumb-interwork -O2 -mabi=apcs-gnu -mcpu=arm7tdmi -fno-toplevel-reorder -Wno-pointer-to-int-cast
|
override CFLAGS += -mthumb -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -fno-toplevel-reorder -Wno-pointer-to-int-cast -g
|
||||||
ROM := pokeemerald_modern.gba
|
ROM := pokeemerald_modern.gba
|
||||||
OBJ_DIR := build/modern
|
OBJ_DIR := build/modern
|
||||||
LIBPATH := -L "$(dir $(shell $(CC) -mthumb -print-file-name=libgcc.a))" -L "$(dir $(shell $(CC) -mthumb -print-file-name=libc.a))"
|
LIBPATH := -L "$(dir $(shell $(CC) -mthumb -print-file-name=libgcc.a))" -L "$(dir $(shell $(CC) -mthumb -print-file-name=libc.a))"
|
||||||
@ -136,6 +136,9 @@ C_ASM_OBJS := $(patsubst $(C_SUBDIR)/%.s,$(C_BUILDDIR)/%.o,$(C_ASM_SRCS))
|
|||||||
ASM_SRCS := $(wildcard $(ASM_SUBDIR)/*.s)
|
ASM_SRCS := $(wildcard $(ASM_SUBDIR)/*.s)
|
||||||
ASM_OBJS := $(patsubst $(ASM_SUBDIR)/%.s,$(ASM_BUILDDIR)/%.o,$(ASM_SRCS))
|
ASM_OBJS := $(patsubst $(ASM_SUBDIR)/%.s,$(ASM_BUILDDIR)/%.o,$(ASM_SRCS))
|
||||||
|
|
||||||
|
# get all the data/*.s files EXCEPT the ones with specific rules
|
||||||
|
REGULAR_DATA_ASM_SRCS := $(filter-out $(DATA_ASM_SUBDIR)/maps.s $(DATA_ASM_SUBDIR)/map_events.s, $(wildcard $(DATA_ASM_SUBDIR)/*.s))
|
||||||
|
|
||||||
DATA_ASM_SRCS := $(wildcard $(DATA_ASM_SUBDIR)/*.s)
|
DATA_ASM_SRCS := $(wildcard $(DATA_ASM_SUBDIR)/*.s)
|
||||||
DATA_ASM_OBJS := $(patsubst $(DATA_ASM_SUBDIR)/%.s,$(DATA_ASM_BUILDDIR)/%.o,$(DATA_ASM_SRCS))
|
DATA_ASM_OBJS := $(patsubst $(DATA_ASM_SUBDIR)/%.s,$(DATA_ASM_BUILDDIR)/%.o,$(DATA_ASM_SRCS))
|
||||||
|
|
||||||
@ -178,7 +181,7 @@ mostlyclean: tidy
|
|||||||
rm -f $(SAMPLE_SUBDIR)/*.bin
|
rm -f $(SAMPLE_SUBDIR)/*.bin
|
||||||
rm -f $(CRY_SUBDIR)/*.bin
|
rm -f $(CRY_SUBDIR)/*.bin
|
||||||
rm -f $(MID_SUBDIR)/*.s
|
rm -f $(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 {} +
|
find . \( -iname '*.1bpp' -o -iname '*.4bpp' -o -iname '*.8bpp' -o -iname '*.gbapal' -o -iname '*.lz' -o -iname '*.rl' -o -iname '*.latfont' -o -iname '*.hwjpnfont' -o -iname '*.fwjpnfont' \) -exec rm {} +
|
||||||
rm -f $(DATA_ASM_SUBDIR)/layouts/layouts.inc $(DATA_ASM_SUBDIR)/layouts/layouts_table.inc
|
rm -f $(DATA_ASM_SUBDIR)/layouts/layouts.inc $(DATA_ASM_SUBDIR)/layouts/layouts_table.inc
|
||||||
rm -f $(DATA_ASM_SUBDIR)/maps/connections.inc $(DATA_ASM_SUBDIR)/maps/events.inc $(DATA_ASM_SUBDIR)/maps/groups.inc $(DATA_ASM_SUBDIR)/maps/headers.inc
|
rm -f $(DATA_ASM_SUBDIR)/maps/connections.inc $(DATA_ASM_SUBDIR)/maps/events.inc $(DATA_ASM_SUBDIR)/maps/groups.inc $(DATA_ASM_SUBDIR)/maps/headers.inc
|
||||||
find $(DATA_ASM_SUBDIR)/maps \( -iname 'connections.inc' -o -iname 'events.inc' -o -iname 'header.inc' \) -exec rm {} +
|
find $(DATA_ASM_SUBDIR)/maps \( -iname 'connections.inc' -o -iname 'events.inc' -o -iname 'header.inc' \) -exec rm {} +
|
||||||
@ -275,23 +278,32 @@ endif
|
|||||||
$(C_BUILDDIR)/%.o: $(C_SUBDIR)/%.s $$(c_asm_dep)
|
$(C_BUILDDIR)/%.o: $(C_SUBDIR)/%.s $$(c_asm_dep)
|
||||||
$(AS) $(ASFLAGS) -o $@ $<
|
$(AS) $(ASFLAGS) -o $@ $<
|
||||||
|
|
||||||
ifeq ($(NODEP),1)
|
# The dep rules have to be explicit or else missing files won't be reported.
|
||||||
$(ASM_BUILDDIR)/%.o: asm_dep :=
|
# As a side effect, they're evaluated immediately instead of when the rule is invoked.
|
||||||
else
|
# It doesn't look like $(shell) can be deferred so there might not be a better way.
|
||||||
$(ASM_BUILDDIR)/%.o: asm_dep = $(shell $(SCANINC) -I "" $(ASM_SUBDIR)/$*.s)
|
|
||||||
endif
|
|
||||||
|
|
||||||
$(ASM_BUILDDIR)/%.o: $(ASM_SUBDIR)/%.s $$(asm_dep)
|
|
||||||
|
ifeq ($(NODEP),1)
|
||||||
|
$(ASM_BUILDDIR)/%.o: $(ASM_SUBDIR)/%.s
|
||||||
$(AS) $(ASFLAGS) -o $@ $<
|
$(AS) $(ASFLAGS) -o $@ $<
|
||||||
|
|
||||||
ifeq ($(NODEP),1)
|
|
||||||
$(DATA_ASM_BUILDDIR)/%.o: data_dep :=
|
|
||||||
else
|
else
|
||||||
$(DATA_ASM_BUILDDIR)/%.o: data_dep = $(shell $(SCANINC) -I include -I "" $(DATA_ASM_SUBDIR)/$*.s)
|
define ASM_DEP
|
||||||
|
$1: $2 $$(shell $(SCANINC) -I include -I "" $2)
|
||||||
|
$$(AS) $$(ASFLAGS) -o $$@ $$<
|
||||||
|
endef
|
||||||
|
$(foreach src, $(ASM_SRCS), $(eval $(call ASM_DEP,$(patsubst $(ASM_SUBDIR)/%.s,$(ASM_BUILDDIR)/%.o, $(src)),$(src))))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(DATA_ASM_BUILDDIR)/%.o: $(DATA_ASM_SUBDIR)/%.s $$(data_dep)
|
ifeq ($(NODEP),1)
|
||||||
|
$(DATA_ASM_BUILDDIR)/%.o: $(DATA_ASM_SUBDIR)/%.s
|
||||||
$(PREPROC) $< charmap.txt | $(CPP) -I include | $(AS) $(ASFLAGS) -o $@
|
$(PREPROC) $< charmap.txt | $(CPP) -I include | $(AS) $(ASFLAGS) -o $@
|
||||||
|
else
|
||||||
|
define DATA_ASM_DEP
|
||||||
|
$1: $2 $$(shell $(SCANINC) -I include -I "" $2)
|
||||||
|
$$(PREPROC) $$< charmap.txt | $$(CPP) -I include | $$(AS) $$(ASFLAGS) -o $$@
|
||||||
|
endef
|
||||||
|
$(foreach src, $(REGULAR_DATA_ASM_SRCS), $(eval $(call DATA_ASM_DEP,$(patsubst $(DATA_ASM_SUBDIR)/%.s,$(DATA_ASM_BUILDDIR)/%.o, $(src)),$(src))))
|
||||||
|
endif
|
||||||
|
|
||||||
$(SONG_BUILDDIR)/%.o: $(SONG_SUBDIR)/%.s
|
$(SONG_BUILDDIR)/%.o: $(SONG_SUBDIR)/%.s
|
||||||
$(AS) $(ASFLAGS) -I sound -o $@ $<
|
$(AS) $(ASFLAGS) -I sound -o $@ $<
|
||||||
|
|||||||
@ -72,9 +72,9 @@
|
|||||||
special CallBattleTowerFunc
|
special CallBattleTowerFunc
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@ Unknown. Destroys some link task if using wireless link. Wait for link?
|
@ Attempts to close link connection. Used when finishing a link multi challenge.
|
||||||
.macro tower_unklink
|
.macro tower_closelink
|
||||||
setvar VAR_0x8004, BATTLE_TOWER_FUNC_13
|
setvar VAR_0x8004, BATTLE_TOWER_FUNC_TRY_CLOSE_LINK
|
||||||
special CallBattleTowerFunc
|
special CallBattleTowerFunc
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
|||||||
@ -1434,6 +1434,7 @@
|
|||||||
|
|
||||||
@ Sets the color of the text in standard message boxes. 0x00 produces blue (male) text, 0x01 produces red (female) text,
|
@ Sets the color of the text in standard message boxes. 0x00 produces blue (male) text, 0x01 produces red (female) text,
|
||||||
@ 0xFF resets the color to the default for the current OW's gender, and all other values produce black text.
|
@ 0xFF resets the color to the default for the current OW's gender, and all other values produce black text.
|
||||||
|
@ Used only in FireRed/LeafGreen, does nothing in Emerald.
|
||||||
.macro textcolor color:req
|
.macro textcolor color:req
|
||||||
.byte 0xc7
|
.byte 0xc7
|
||||||
.byte \color
|
.byte \color
|
||||||
@ -1441,6 +1442,7 @@
|
|||||||
|
|
||||||
@ The exact purpose of this command is unknown, but it is related to the blue help-text box that appears on the bottom
|
@ The exact purpose of this command is unknown, but it is related to the blue help-text box that appears on the bottom
|
||||||
@ of the screen when the Main Menu is opened.
|
@ of the screen when the Main Menu is opened.
|
||||||
|
@ Used only in FireRed/LeafGreen, does nothing in Emerald.
|
||||||
.macro loadhelp pointer:req
|
.macro loadhelp pointer:req
|
||||||
.byte 0xc8
|
.byte 0xc8
|
||||||
.4byte \pointer
|
.4byte \pointer
|
||||||
@ -1448,21 +1450,25 @@
|
|||||||
|
|
||||||
@ The exact purpose of this command is unknown, but it is related to the blue help-text box that appears on the bottom of
|
@ The exact purpose of this command is unknown, but it is related to the blue help-text box that appears on the bottom of
|
||||||
@ the screen when the Main Menu is opened.
|
@ the screen when the Main Menu is opened.
|
||||||
|
@ Used only in FireRed/LeafGreen, does nothing in Emerald.
|
||||||
.macro unloadhelp
|
.macro unloadhelp
|
||||||
.byte 0xc9
|
.byte 0xc9
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@ After using this command, all standard message boxes will use the signpost frame.
|
@ After using this command, all standard message boxes will use the signpost frame.
|
||||||
|
@ Used only in FireRed/LeafGreen, does nothing in Emerald.
|
||||||
.macro signmsg
|
.macro signmsg
|
||||||
.byte 0xca
|
.byte 0xca
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@ Ends the effects of signmsg, returning message box frames to normal.
|
@ Ends the effects of signmsg, returning message box frames to normal.
|
||||||
|
@ Used only in FireRed/LeafGreen, does nothing in Emerald.
|
||||||
.macro normalmsg
|
.macro normalmsg
|
||||||
.byte 0xcb
|
.byte 0xcb
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
@ Compares the value of a hidden variable to a dword.
|
@ Compares the value of a hidden variable to a dword.
|
||||||
|
@ Used only in FireRed/LeafGreen, does nothing in Emerald.
|
||||||
.macro comparehiddenvar a:req, value:req
|
.macro comparehiddenvar a:req, value:req
|
||||||
.byte 0xcc
|
.byte 0xcc
|
||||||
.byte \a
|
.byte \a
|
||||||
@ -1489,6 +1495,7 @@
|
|||||||
.endm
|
.endm
|
||||||
|
|
||||||
@ Sets worldmapflag to 1. This allows the player to Fly to the corresponding map, if that map has a flightspot.
|
@ Sets worldmapflag to 1. This allows the player to Fly to the corresponding map, if that map has a flightspot.
|
||||||
|
@ Used only in FireRed/LeafGreen, does nothing in Emerald.
|
||||||
.macro setworldmapflag worldmapflag:req
|
.macro setworldmapflag worldmapflag:req
|
||||||
.byte 0xd0
|
.byte 0xd0
|
||||||
.2byte \worldmapflag
|
.2byte \worldmapflag
|
||||||
|
|||||||
@ -1,7 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
OBJDUMP="$DEVKITARM/bin/arm-none-eabi-objdump -D -bbinary -marmv4t -Mforce-thumb"
|
OBJDUMP="$DEVKITARM/bin/arm-none-eabi-objdump -D -bbinary -marmv4t -Mforce-thumb"
|
||||||
OPTIONS="--start-address=$(($1)) --stop-address=$(($1 + $2))"
|
if [ $(($1)) -ge $((0x8000000)) ]; then
|
||||||
|
OPTIONS="--adjust-vma=0x8000000 --start-address=$(($1)) --stop-address=$(($1 + $2))"
|
||||||
|
else
|
||||||
|
OPTIONS="--start-address=$(($1)) --stop-address=$(($1 + $2))"
|
||||||
|
fi
|
||||||
$OBJDUMP $OPTIONS baserom.gba > baserom.dump
|
$OBJDUMP $OPTIONS baserom.gba > baserom.dump
|
||||||
$OBJDUMP $OPTIONS pokeemerald.gba > pokeemerald.dump
|
$OBJDUMP $OPTIONS pokeemerald.gba > pokeemerald.dump
|
||||||
diff -u baserom.dump pokeemerald.dump
|
diff -u baserom.dump pokeemerald.dump
|
||||||
|
|||||||
@ -109,7 +109,7 @@ _1a0:
|
|||||||
strh r1, [r0, 0xa] @ SIOMLT_SEND
|
strh r1, [r0, 0xa] @ SIOMLT_SEND
|
||||||
ldr r0, =_data_2f0
|
ldr r0, =_data_2f0
|
||||||
ldr r1, =gCode
|
ldr r1, =gCode
|
||||||
svc 0x11 << 16
|
swi 0x11 << 16
|
||||||
ldr lr, =gCode
|
ldr lr, =gCode
|
||||||
bx lr
|
bx lr
|
||||||
.pool
|
.pool
|
||||||
|
|||||||
@ -100,12 +100,12 @@ struct CgbChannel
|
|||||||
u8 le;
|
u8 le;
|
||||||
u8 sw;
|
u8 sw;
|
||||||
u32 fr;
|
u32 fr;
|
||||||
u32 *wp;
|
u32 wp;
|
||||||
u32 *cp;
|
u32 cp;
|
||||||
void *tp;
|
u32 tp;
|
||||||
void *pp;
|
u32 pp;
|
||||||
void *np;
|
u32 np;
|
||||||
u32 d4[2];
|
u8 d4[8];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MusicPlayerTrack;
|
struct MusicPlayerTrack;
|
||||||
@ -138,10 +138,10 @@ struct SoundChannel
|
|||||||
u32 fw;
|
u32 fw;
|
||||||
u32 freq;
|
u32 freq;
|
||||||
struct WaveData *wav;
|
struct WaveData *wav;
|
||||||
s8 *cp;
|
u32 cp;
|
||||||
struct MusicPlayerTrack *track;
|
struct MusicPlayerTrack *track;
|
||||||
void *pp;
|
u32 pp;
|
||||||
void *np;
|
u32 np;
|
||||||
u32 d4;
|
u32 d4;
|
||||||
u16 xpi;
|
u16 xpi;
|
||||||
u16 xpc;
|
u16 xpc;
|
||||||
@ -172,11 +172,11 @@ struct SoundInfo
|
|||||||
u8 pcmDmaPeriod; // number of V-blanks per PCM DMA
|
u8 pcmDmaPeriod; // number of V-blanks per PCM DMA
|
||||||
u8 maxLines;
|
u8 maxLines;
|
||||||
u8 gap[3];
|
u8 gap[3];
|
||||||
u32 pcmSamplesPerVBlank;
|
s32 pcmSamplesPerVBlank;
|
||||||
u32 pcmFreq;
|
s32 pcmFreq;
|
||||||
u32 divFreq;
|
s32 divFreq;
|
||||||
struct CgbChannel *cgbChans;
|
struct CgbChannel *cgbChans;
|
||||||
void (*func)();
|
u32 func;
|
||||||
u32 intp;
|
u32 intp;
|
||||||
void (*CgbSound)(void);
|
void (*CgbSound)(void);
|
||||||
void (*CgbOscOff)(u8);
|
void (*CgbOscOff)(u8);
|
||||||
@ -184,7 +184,7 @@ struct SoundInfo
|
|||||||
u32 MPlayJumpTable;
|
u32 MPlayJumpTable;
|
||||||
u32 plynote;
|
u32 plynote;
|
||||||
u32 ExtVolPit;
|
u32 ExtVolPit;
|
||||||
u32 gap2[4];
|
u8 gap2[16];
|
||||||
struct SoundChannel chans[MAX_DIRECTSOUND_CHANNELS];
|
struct SoundChannel chans[MAX_DIRECTSOUND_CHANNELS];
|
||||||
s8 pcmBuffer[PCM_DMA_BUF_SIZE * 2];
|
s8 pcmBuffer[PCM_DMA_BUF_SIZE * 2];
|
||||||
};
|
};
|
||||||
@ -248,7 +248,7 @@ struct MusicPlayerTrack
|
|||||||
u8 key;
|
u8 key;
|
||||||
u8 velocity;
|
u8 velocity;
|
||||||
u8 runningStatus;
|
u8 runningStatus;
|
||||||
s8 keyM;
|
u8 keyM;
|
||||||
u8 pitM;
|
u8 pitM;
|
||||||
s8 keyShift;
|
s8 keyShift;
|
||||||
s8 keyShiftX;
|
s8 keyShiftX;
|
||||||
@ -312,7 +312,7 @@ struct MusicPlayerInfo
|
|||||||
struct MusicPlayerTrack *tracks;
|
struct MusicPlayerTrack *tracks;
|
||||||
struct ToneData *tone;
|
struct ToneData *tone;
|
||||||
u32 ident;
|
u32 ident;
|
||||||
void (*func)();
|
u32 func;
|
||||||
u32 intp;
|
u32 intp;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -447,7 +447,7 @@ void ply_tune(struct MusicPlayerInfo *, struct MusicPlayerTrack *);
|
|||||||
void ply_port(struct MusicPlayerInfo *, struct MusicPlayerTrack *);
|
void ply_port(struct MusicPlayerInfo *, struct MusicPlayerTrack *);
|
||||||
void ply_xcmd(struct MusicPlayerInfo *, struct MusicPlayerTrack *);
|
void ply_xcmd(struct MusicPlayerInfo *, struct MusicPlayerTrack *);
|
||||||
void ply_endtie(struct MusicPlayerInfo *, struct MusicPlayerTrack *);
|
void ply_endtie(struct MusicPlayerInfo *, struct MusicPlayerTrack *);
|
||||||
void ply_note(u8, struct MusicPlayerInfo *, struct MusicPlayerTrack *);
|
void ply_note(struct MusicPlayerInfo *, struct MusicPlayerTrack *);
|
||||||
|
|
||||||
// extended sound command handler functions
|
// extended sound command handler functions
|
||||||
void ply_xxx(struct MusicPlayerInfo *, struct MusicPlayerTrack *);
|
void ply_xxx(struct MusicPlayerInfo *, struct MusicPlayerTrack *);
|
||||||
|
|||||||
@ -79,23 +79,16 @@ struct CoordEvent
|
|||||||
|
|
||||||
struct BgEvent
|
struct BgEvent
|
||||||
{
|
{
|
||||||
/*0x00*/u16 x;
|
u16 x, y;
|
||||||
/*0x02*/u16 y;
|
u8 elevation;
|
||||||
/*0x04*/u8 elevation;
|
u8 kind; // The "kind" field determines how to access bgUnion union below.
|
||||||
/*0x05*/u8 kind;
|
union {
|
||||||
/*0x08*/union { // carried over from diego's FR/LG work, seems to be the same struct
|
|
||||||
// in gen 3, "kind" (0x3 in BgEvent struct) determines the method to read the union.
|
|
||||||
u8 *script;
|
u8 *script;
|
||||||
|
|
||||||
// hidden item type
|
|
||||||
struct {
|
struct {
|
||||||
u16 item;
|
u16 item;
|
||||||
u16 hiddenItemId; // flag offset to determine flag lookup
|
u16 hiddenItemId;
|
||||||
} hiddenItem;
|
} hiddenItem;
|
||||||
|
|
||||||
// secret base type
|
|
||||||
u32 secretBaseId;
|
u32 secretBaseId;
|
||||||
|
|
||||||
} bgUnion;
|
} bgUnion;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -296,7 +296,7 @@ u8 HandleWriteSectorNBytes(u8 sectorNum, u8 *data, u16 size)
|
|||||||
|
|
||||||
u8 TryWriteSector(u8 sectorNum, u8 *data)
|
u8 TryWriteSector(u8 sectorNum, u8 *data)
|
||||||
{
|
{
|
||||||
if (ProgramFlashSectorAndVerify(sectorNum, data)) // is damaged?
|
if (ProgramFlashSectorAndVerify(sectorNum, data) != 0) // is damaged?
|
||||||
{
|
{
|
||||||
SetSectorDamagedStatus(SECTOR_DAMAGED, sectorNum); // set damaged sector bits.
|
SetSectorDamagedStatus(SECTOR_DAMAGED, sectorNum); // set damaged sector bits.
|
||||||
return SAVE_STATUS_ERROR;
|
return SAVE_STATUS_ERROR;
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
gUnknown_030062E8
|
gFactorySelect_CurrentOptionFunc
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
gUnknown_03006298
|
gFrontierTempParty
|
||||||
|
|||||||
@ -26,9 +26,9 @@
|
|||||||
|
|
||||||
.set OAM, 0x7000000
|
.set OAM, 0x7000000
|
||||||
|
|
||||||
.set SOUND_INFO_PTR, IWRAM_END - 0x10
|
.set SOUND_INFO_PTR, 0x3007FF0
|
||||||
.set INTR_CHECK, IWRAM_END - 0x8
|
.set INTR_CHECK, 0x3007FF8
|
||||||
.set INTR_VECTOR, IWRAM_END - 0x4
|
.set INTR_VECTOR, 0x3007FFC
|
||||||
|
|
||||||
.set INTR_FLAG_VBLANK, 1 << 0
|
.set INTR_FLAG_VBLANK, 1 << 0
|
||||||
.set INTR_FLAG_HBLANK, 1 << 1
|
.set INTR_FLAG_HBLANK, 1 << 1
|
||||||
|
|||||||
@ -2,11 +2,41 @@
|
|||||||
|
|
||||||
.equiv PCM_DMA_BUF_SIZE, 1584
|
.equiv PCM_DMA_BUF_SIZE, 1584
|
||||||
|
|
||||||
|
.equiv C_V, 0x40
|
||||||
|
|
||||||
.equiv TONEDATA_TYPE_CGB, 0x07
|
.equiv TONEDATA_TYPE_CGB, 0x07
|
||||||
.equiv TONEDATA_TYPE_FIX, 0x08
|
.equiv TONEDATA_TYPE_FIX, 0x08
|
||||||
|
.equiv TONEDATA_TYPE_REV, 0x10
|
||||||
|
.equiv TONEDATA_TYPE_CMP, 0x20
|
||||||
.equiv TONEDATA_TYPE_SPL, 0x40 @ key split
|
.equiv TONEDATA_TYPE_SPL, 0x40 @ key split
|
||||||
.equiv TONEDATA_TYPE_RHY, 0x80 @ rhythm
|
.equiv TONEDATA_TYPE_RHY, 0x80 @ rhythm
|
||||||
|
|
||||||
|
.equiv TONEDATA_P_S_PAN, 0xc0
|
||||||
|
|
||||||
|
.equiv SOUND_CHANNEL_SF_START, 0x80
|
||||||
|
.equiv SOUND_CHANNEL_SF_STOP, 0x40
|
||||||
|
.equiv SOUND_CHANNEL_SF_SPECIAL, 0x20
|
||||||
|
.equiv SOUND_CHANNEL_SF_LOOP, 0x10
|
||||||
|
.equiv SOUND_CHANNEL_SF_IEC, 0x04
|
||||||
|
.equiv SOUND_CHANNEL_SF_ENV, 0x03
|
||||||
|
.equiv SOUND_CHANNEL_SF_ENV_ATTACK, 0x03
|
||||||
|
.equiv SOUND_CHANNEL_SF_ENV_DECAY, 0x02
|
||||||
|
.equiv SOUND_CHANNEL_SF_ENV_SUSTAIN, 0x01
|
||||||
|
.equiv SOUND_CHANNEL_SF_ENV_RELEASE, 0x00
|
||||||
|
.equiv SOUND_CHANNEL_SF_ON, (SOUND_CHANNEL_SF_START | SOUND_CHANNEL_SF_STOP | SOUND_CHANNEL_SF_IEC | SOUND_CHANNEL_SF_ENV)
|
||||||
|
|
||||||
|
.equiv CGB_CHANNEL_MO_PIT, 0x02
|
||||||
|
.equiv CGB_CHANNEL_MO_VOL, 0x01
|
||||||
|
|
||||||
|
.equiv WAVE_DATA_FLAG_LOOP, 0xC0
|
||||||
|
|
||||||
|
.equiv MPT_FLG_VOLSET, 0x01
|
||||||
|
.equiv MPT_FLG_VOLCHG, 0x03
|
||||||
|
.equiv MPT_FLG_PITSET, 0x04
|
||||||
|
.equiv MPT_FLG_PITCHG, 0x0C
|
||||||
|
.equiv MPT_FLG_START, 0x40
|
||||||
|
.equiv MPT_FLG_EXIST, 0x80
|
||||||
|
|
||||||
.macro struct_begin
|
.macro struct_begin
|
||||||
.struct 0
|
.struct 0
|
||||||
.endm
|
.endm
|
||||||
@ -16,6 +46,28 @@
|
|||||||
.struct \name + \size
|
.struct \name + \size
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
struct_begin
|
||||||
|
struct_field o_WaveData_type, 2
|
||||||
|
struct_field o_WaveData_d1, 1
|
||||||
|
struct_field o_WaveData_flags, 1
|
||||||
|
struct_field o_WaveData_freq, 4
|
||||||
|
struct_field o_WaveData_loopStart, 4
|
||||||
|
struct_field o_WaveData_size, 4
|
||||||
|
struct_field o_WaveData_data, 0
|
||||||
|
struct_field WaveData_size, 0
|
||||||
|
|
||||||
|
struct_begin
|
||||||
|
struct_field o_ToneData_type, 1
|
||||||
|
struct_field o_ToneData_key, 1
|
||||||
|
struct_field o_ToneData_length, 1
|
||||||
|
struct_field o_ToneData_pan_sweep, 1
|
||||||
|
struct_field o_ToneData_wav, 4
|
||||||
|
struct_field o_ToneData_attack, 1
|
||||||
|
struct_field o_ToneData_decay, 1
|
||||||
|
struct_field o_ToneData_sustain, 1
|
||||||
|
struct_field o_ToneData_release, 1
|
||||||
|
struct_field ToneData_size, 0
|
||||||
|
|
||||||
struct_begin
|
struct_begin
|
||||||
struct_field o_SoundInfo_ident, 4
|
struct_field o_SoundInfo_ident, 4
|
||||||
struct_field o_SoundInfo_pcmDmaCounter, 1
|
struct_field o_SoundInfo_pcmDmaCounter, 1
|
||||||
@ -32,8 +84,8 @@
|
|||||||
struct_field o_SoundInfo_pcmFreq, 4
|
struct_field o_SoundInfo_pcmFreq, 4
|
||||||
struct_field o_SoundInfo_divFreq, 4
|
struct_field o_SoundInfo_divFreq, 4
|
||||||
struct_field o_SoundInfo_cgbChans, 4
|
struct_field o_SoundInfo_cgbChans, 4
|
||||||
struct_field o_SoundInfo_func, 4
|
struct_field o_SoundInfo_MPlayMainHead, 4
|
||||||
struct_field o_SoundInfo_intp, 4
|
struct_field o_SoundInfo_musicPlayerHead, 4
|
||||||
struct_field o_SoundInfo_CgbSound, 4
|
struct_field o_SoundInfo_CgbSound, 4
|
||||||
struct_field o_SoundInfo_CgbOscOff, 4
|
struct_field o_SoundInfo_CgbOscOff, 4
|
||||||
struct_field o_SoundInfo_MidiKeyToCgbFreq, 4
|
struct_field o_SoundInfo_MidiKeyToCgbFreq, 4
|
||||||
@ -46,7 +98,7 @@
|
|||||||
struct_field SoundInfo_size, 0
|
struct_field SoundInfo_size, 0
|
||||||
|
|
||||||
struct_begin
|
struct_begin
|
||||||
struct_field o_SoundChannel_status, 1
|
struct_field o_SoundChannel_statusFlags, 1
|
||||||
struct_field o_SoundChannel_type, 1
|
struct_field o_SoundChannel_type, 1
|
||||||
struct_field o_SoundChannel_rightVolume, 1
|
struct_field o_SoundChannel_rightVolume, 1
|
||||||
struct_field o_SoundChannel_leftVolume, 1
|
struct_field o_SoundChannel_leftVolume, 1
|
||||||
@ -54,29 +106,29 @@
|
|||||||
struct_field o_SoundChannel_decay, 1
|
struct_field o_SoundChannel_decay, 1
|
||||||
struct_field o_SoundChannel_sustain, 1
|
struct_field o_SoundChannel_sustain, 1
|
||||||
struct_field o_SoundChannel_release, 1
|
struct_field o_SoundChannel_release, 1
|
||||||
struct_field o_SoundChannel_ky, 1
|
struct_field o_SoundChannel_key, 1
|
||||||
struct_field o_SoundChannel_ev, 1
|
struct_field o_SoundChannel_envelopeVolume, 1
|
||||||
struct_field o_SoundChannel_er, 1
|
struct_field o_SoundChannel_envelopeVolumeRight, 1
|
||||||
struct_field o_SoundChannel_el, 1
|
struct_field o_SoundChannel_envelopeVolumeLeft, 1
|
||||||
struct_field o_SoundChannel_iev, 1
|
struct_field o_SoundChannel_pseudoEchoVolume, 1
|
||||||
struct_field o_SoundChannel_iel, 1
|
struct_field o_SoundChannel_pseudoEchoLength, 1
|
||||||
struct_field o_SoundChannel_d1, 1
|
struct_field o_SoundChannel_dummy1, 1
|
||||||
struct_field o_SoundChannel_d2, 1
|
struct_field o_SoundChannel_dummy2, 1
|
||||||
struct_field o_SoundChannel_gt, 1
|
struct_field o_SoundChannel_gateTime, 1
|
||||||
struct_field o_SoundChannel_mk, 1
|
struct_field o_SoundChannel_midiKey, 1
|
||||||
struct_field o_SoundChannel_ve, 1
|
struct_field o_SoundChannel_velocity, 1
|
||||||
struct_field o_SoundChannel_pr, 1
|
struct_field o_SoundChannel_priority, 1
|
||||||
struct_field o_SoundChannel_rp, 1
|
struct_field o_SoundChannel_rhythmPan, 1
|
||||||
struct_field o_SoundChannel_d3, 3
|
struct_field o_SoundChannel_dummy3, 3
|
||||||
struct_field o_SoundChannel_ct, 4
|
struct_field o_SoundChannel_count, 4
|
||||||
struct_field o_SoundChannel_fw, 4
|
struct_field o_SoundChannel_fw, 4
|
||||||
struct_field o_SoundChannel_freq, 4
|
struct_field o_SoundChannel_frequency, 4
|
||||||
struct_field o_SoundChannel_wav, 4
|
struct_field o_SoundChannel_wav, 4
|
||||||
struct_field o_SoundChannel_cp, 4
|
struct_field o_SoundChannel_currentPointer, 4
|
||||||
struct_field o_SoundChannel_track, 4
|
struct_field o_SoundChannel_track, 4
|
||||||
struct_field o_SoundChannel_pp, 4
|
struct_field o_SoundChannel_prevChannelPointer, 4
|
||||||
struct_field o_SoundChannel_np, 4
|
struct_field o_SoundChannel_nextChannelPointer, 4
|
||||||
struct_field o_SoundChannel_d4, 4
|
struct_field o_SoundChannel_dummy4, 4
|
||||||
struct_field o_SoundChannel_xpi, 2
|
struct_field o_SoundChannel_xpi, 2
|
||||||
struct_field o_SoundChannel_xpc, 2
|
struct_field o_SoundChannel_xpc, 2
|
||||||
struct_field SoundChannel_size, 0
|
struct_field SoundChannel_size, 0
|
||||||
@ -112,8 +164,8 @@
|
|||||||
struct_field o_MusicPlayerTrack_lfoDelay, 1
|
struct_field o_MusicPlayerTrack_lfoDelay, 1
|
||||||
struct_field o_MusicPlayerTrack_lfoDelayC, 1
|
struct_field o_MusicPlayerTrack_lfoDelayC, 1
|
||||||
struct_field o_MusicPlayerTrack_priority, 1
|
struct_field o_MusicPlayerTrack_priority, 1
|
||||||
struct_field o_MusicPlayerTrack_echoVolume, 1
|
struct_field o_MusicPlayerTrack_pseudoEchoVolume, 1
|
||||||
struct_field o_MusicPlayerTrack_echoLength, 1
|
struct_field o_MusicPlayerTrack_pseudoEchoLength, 1
|
||||||
struct_field o_MusicPlayerTrack_chan, 4
|
struct_field o_MusicPlayerTrack_chan, 4
|
||||||
struct_field o_MusicPlayerTrack_ToneData_type, 1
|
struct_field o_MusicPlayerTrack_ToneData_type, 1
|
||||||
struct_field o_MusicPlayerTrack_ToneData_key, 1
|
struct_field o_MusicPlayerTrack_ToneData_key, 1
|
||||||
@ -159,41 +211,41 @@
|
|||||||
struct_field MusicPlayerInfo_size, 0
|
struct_field MusicPlayerInfo_size, 0
|
||||||
|
|
||||||
struct_begin
|
struct_begin
|
||||||
struct_field o_CgbChannel_sf, 1
|
struct_field o_CgbChannel_statusFlags, 1
|
||||||
struct_field o_CgbChannel_ty, 1
|
struct_field o_CgbChannel_type, 1
|
||||||
struct_field o_CgbChannel_rightVolume, 1
|
struct_field o_CgbChannel_rightVolume, 1
|
||||||
struct_field o_CgbChannel_leftVolume, 1
|
struct_field o_CgbChannel_leftVolume, 1
|
||||||
struct_field o_CgbChannel_at, 1
|
struct_field o_CgbChannel_attack, 1
|
||||||
struct_field o_CgbChannel_de, 1
|
struct_field o_CgbChannel_decay, 1
|
||||||
struct_field o_CgbChannel_su, 1
|
struct_field o_CgbChannel_sustain, 1
|
||||||
struct_field o_CgbChannel_re, 1
|
struct_field o_CgbChannel_release, 1
|
||||||
struct_field o_CgbChannel_ky, 1
|
struct_field o_CgbChannel_key, 1
|
||||||
struct_field o_CgbChannel_ev, 1
|
struct_field o_CgbChannel_envelopeVolume, 1
|
||||||
struct_field o_CgbChannel_eg, 1
|
struct_field o_CgbChannel_envelopeGoal, 1
|
||||||
struct_field o_CgbChannel_ec, 1
|
struct_field o_CgbChannel_envelopeCounter, 1
|
||||||
struct_field o_CgbChannel_echoVolume, 1
|
struct_field o_CgbChannel_pseudoEchoVolume, 1
|
||||||
struct_field o_CgbChannel_echoLength, 1
|
struct_field o_CgbChannel_pseudoEchoLength, 1
|
||||||
struct_field o_CgbChannel_d1, 1
|
struct_field o_CgbChannel_dummy1, 1
|
||||||
struct_field o_CgbChannel_d2, 1
|
struct_field o_CgbChannel_dummy2, 1
|
||||||
struct_field o_CgbChannel_gt, 1
|
struct_field o_CgbChannel_gateTime, 1
|
||||||
struct_field o_CgbChannel_mk, 1
|
struct_field o_CgbChannel_midiKey, 1
|
||||||
struct_field o_CgbChannel_ve, 1
|
struct_field o_CgbChannel_velocity, 1
|
||||||
struct_field o_CgbChannel_pr, 1
|
struct_field o_CgbChannel_priority, 1
|
||||||
struct_field o_CgbChannel_rp, 1
|
struct_field o_CgbChannel_rhythmPan, 1
|
||||||
struct_field o_CgbChannel_d3, 3
|
struct_field o_CgbChannel_dummy3, 3
|
||||||
struct_field o_CgbChannel_d5, 1
|
struct_field o_CgbChannel_dummy5, 1
|
||||||
struct_field o_CgbChannel_sg, 1
|
struct_field o_CgbChannel_sustainGoal, 1
|
||||||
struct_field o_CgbChannel_n4, 1
|
struct_field o_CgbChannel_n4, 1
|
||||||
struct_field o_CgbChannel_pan, 1
|
struct_field o_CgbChannel_pan, 1
|
||||||
struct_field o_CgbChannel_panMask, 1
|
struct_field o_CgbChannel_panMask, 1
|
||||||
struct_field o_CgbChannel_mo, 1
|
struct_field o_CgbChannel_modify, 1
|
||||||
struct_field o_CgbChannel_le, 1
|
struct_field o_CgbChannel_length, 1
|
||||||
struct_field o_CgbChannel_sw, 1
|
struct_field o_CgbChannel_sweep, 1
|
||||||
struct_field o_CgbChannel_fr, 4
|
struct_field o_CgbChannel_frequency, 4
|
||||||
struct_field o_CgbChannel_wp, 4
|
struct_field o_CgbChannel_wavePointer, 4
|
||||||
struct_field o_CgbChannel_cp, 4
|
struct_field o_CgbChannel_currentPointer, 4
|
||||||
struct_field o_CgbChannel_tp, 4
|
struct_field o_CgbChannel_track, 4
|
||||||
struct_field o_CgbChannel_pp, 4
|
struct_field o_CgbChannel_prevChannelPointer, 4
|
||||||
struct_field o_CgbChannel_np, 4
|
struct_field o_CgbChannel_nextChannelPointer, 4
|
||||||
struct_field o_CgbChannel_d4, 8
|
struct_field o_CgbChannel_dummy4, 8
|
||||||
struct_field CgbChannel_size, 0
|
struct_field CgbChannel_size, 0
|
||||||
|
|||||||
@ -2324,14 +2324,18 @@ AI_CV_SemiInvulnerable:
|
|||||||
|
|
||||||
@ BUG: The scripts for checking type-resistance to weather for semi-invulnerable moves are swapped
|
@ BUG: The scripts for checking type-resistance to weather for semi-invulnerable moves are swapped
|
||||||
@ The result is that the AI is encouraged to stall while taking damage from weather
|
@ The result is that the AI is encouraged to stall while taking damage from weather
|
||||||
@ To fix, swap _CheckSandstormTypes/_CheckIceType in the below script
|
|
||||||
AI_CV_SemiInvulnerable2:
|
AI_CV_SemiInvulnerable2:
|
||||||
if_status AI_TARGET, STATUS1_TOXIC_POISON, AI_CV_SemiInvulnerable_TryEncourage
|
if_status AI_TARGET, STATUS1_TOXIC_POISON, AI_CV_SemiInvulnerable_TryEncourage
|
||||||
if_status2 AI_TARGET, STATUS2_CURSED, AI_CV_SemiInvulnerable_TryEncourage
|
if_status2 AI_TARGET, STATUS2_CURSED, AI_CV_SemiInvulnerable_TryEncourage
|
||||||
if_status3 AI_TARGET, STATUS3_LEECHSEED, AI_CV_SemiInvulnerable_TryEncourage
|
if_status3 AI_TARGET, STATUS3_LEECHSEED, AI_CV_SemiInvulnerable_TryEncourage
|
||||||
get_weather
|
get_weather
|
||||||
|
.ifdef BUGFIX
|
||||||
|
if_equal AI_WEATHER_HAIL, AI_CV_SemiInvulnerable_CheckIceType
|
||||||
|
if_equal AI_WEATHER_SANDSTORM, AI_CV_SemiInvulnerable_CheckSandstormTypes
|
||||||
|
.else
|
||||||
if_equal AI_WEATHER_HAIL, AI_CV_SemiInvulnerable_CheckSandstormTypes
|
if_equal AI_WEATHER_HAIL, AI_CV_SemiInvulnerable_CheckSandstormTypes
|
||||||
if_equal AI_WEATHER_SANDSTORM, AI_CV_SemiInvulnerable_CheckIceType
|
if_equal AI_WEATHER_SANDSTORM, AI_CV_SemiInvulnerable_CheckIceType
|
||||||
|
.endif
|
||||||
goto AI_CV_SemiInvulnerable5
|
goto AI_CV_SemiInvulnerable5
|
||||||
|
|
||||||
AI_CV_SemiInvulnerable_CheckSandstormTypes:
|
AI_CV_SemiInvulnerable_CheckSandstormTypes:
|
||||||
@ -2398,9 +2402,13 @@ AI_CV_Hail_ScoreDown1:
|
|||||||
AI_CV_Hail_End:
|
AI_CV_Hail_End:
|
||||||
end
|
end
|
||||||
|
|
||||||
@ BUG: Facade score is increased if the target is statused, but should be if the user is. Replace AI_TARGET with AI_USER
|
@ BUG: Facade score is increased if the target is statused, but should be if the user is
|
||||||
AI_CV_Facade:
|
AI_CV_Facade:
|
||||||
|
.ifdef BUGFIX
|
||||||
|
if_not_status AI_USER, STATUS1_POISON | STATUS1_BURN | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON, AI_CV_Facade_End
|
||||||
|
.else
|
||||||
if_not_status AI_TARGET, STATUS1_POISON | STATUS1_BURN | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON, AI_CV_Facade_End
|
if_not_status AI_TARGET, STATUS1_POISON | STATUS1_BURN | STATUS1_PARALYSIS | STATUS1_TOXIC_POISON, AI_CV_Facade_End
|
||||||
|
.endif
|
||||||
score +1
|
score +1
|
||||||
AI_CV_Facade_End:
|
AI_CV_Facade_End:
|
||||||
end
|
end
|
||||||
|
|||||||
@ -374,41 +374,41 @@ gBattleAnims_Moves::
|
|||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
gBattleAnims_StatusConditions::
|
gBattleAnims_StatusConditions::
|
||||||
.4byte Status_Poison
|
.4byte Status_Poison @ B_ANIM_STATUS_PSN
|
||||||
.4byte Status_Confusion
|
.4byte Status_Confusion @ B_ANIM_STATUS_CONFUSION
|
||||||
.4byte Status_Burn
|
.4byte Status_Burn @ B_ANIM_STATUS_BRN
|
||||||
.4byte Status_Infatuation
|
.4byte Status_Infatuation @ B_ANIM_STATUS_INFATUATION
|
||||||
.4byte Status_Sleep
|
.4byte Status_Sleep @ B_ANIM_STATUS_SLP
|
||||||
.4byte Status_Paralysis
|
.4byte Status_Paralysis @ B_ANIM_STATUS_PRZ
|
||||||
.4byte Status_Freeze
|
.4byte Status_Freeze @ B_ANIM_STATUS_FRZ
|
||||||
.4byte Status_Curse
|
.4byte Status_Curse @ B_ANIM_STATUS_CURSED
|
||||||
.4byte Status_Nightmare
|
.4byte Status_Nightmare @ B_ANIM_STATUS_NIGHTMARE
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
gBattleAnims_General::
|
gBattleAnims_General::
|
||||||
.4byte General_CastformChange
|
.4byte General_CastformChange @ B_ANIM_CASTFORM_CHANGE
|
||||||
.4byte General_StatsChange
|
.4byte General_StatsChange @ B_ANIM_STATS_CHANGE
|
||||||
.4byte General_SubstituteFade
|
.4byte General_SubstituteFade @ B_ANIM_SUBSTITUTE_FADE
|
||||||
.4byte General_SubstituteAppear
|
.4byte General_SubstituteAppear @ B_ANIM_SUBSTITUTE_APPEAR
|
||||||
.4byte General_PokeblockThrow
|
.4byte General_PokeblockThrow @ B_ANIM_POKEBLOCK_THROW
|
||||||
.4byte General_ItemKnockoff
|
.4byte General_ItemKnockoff @ B_ANIM_ITEM_KNOCKOFF
|
||||||
.4byte General_TurnTrap
|
.4byte General_TurnTrap @ B_ANIM_TURN_TRAP
|
||||||
.4byte General_HeldItemEffect
|
.4byte General_HeldItemEffect @ B_ANIM_HELD_ITEM_EFFECT
|
||||||
.4byte General_SmokeballEscape
|
.4byte General_SmokeballEscape @ B_ANIM_SMOKEBALL_ESCAPE
|
||||||
.4byte General_FocusBand
|
.4byte General_FocusBand @ B_ANIM_FOCUS_BAND
|
||||||
.4byte General_Rain
|
.4byte General_Rain @ B_ANIM_RAIN_CONTINUES
|
||||||
.4byte General_Sun
|
.4byte General_Sun @ B_ANIM_SUN_CONTINUES
|
||||||
.4byte General_Sandstorm
|
.4byte General_Sandstorm @ B_ANIM_SANDSTORM_CONTINUES
|
||||||
.4byte General_Hail
|
.4byte General_Hail @ B_ANIM_HAIL_CONTINUES
|
||||||
.4byte General_LeechSeedDrain
|
.4byte General_LeechSeedDrain @ B_ANIM_LEECH_SEED_DRAIN
|
||||||
.4byte General_MonHit
|
.4byte General_MonHit @ B_ANIM_MON_HIT
|
||||||
.4byte General_ItemSteal
|
.4byte General_ItemSteal @ B_ANIM_ITEM_STEAL
|
||||||
.4byte General_SnatchMove
|
.4byte General_SnatchMove @ B_ANIM_SNATCH_MOVE
|
||||||
.4byte General_FutureSightHit
|
.4byte General_FutureSightHit @ B_ANIM_FUTURE_SIGHT_HIT
|
||||||
.4byte General_DoomDesireHit
|
.4byte General_DoomDesireHit @ B_ANIM_DOOM_DESIRE_HIT
|
||||||
.4byte General_FocusPunchSetUp
|
.4byte General_FocusPunchSetUp @ B_ANIM_FOCUS_PUNCH_SETUP
|
||||||
.4byte General_IngrainHeal
|
.4byte General_IngrainHeal @ B_ANIM_INGRAIN_HEAL
|
||||||
.4byte General_WishHeal
|
.4byte General_WishHeal @ B_ANIM_WISH_HEAL
|
||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
gBattleAnims_Special::
|
gBattleAnims_Special::
|
||||||
|
|||||||
@ -3834,7 +3834,7 @@ BattleScript_MoveUsedIsConfusedNoMore::
|
|||||||
return
|
return
|
||||||
|
|
||||||
BattleScript_PrintPayDayMoneyString::
|
BattleScript_PrintPayDayMoneyString::
|
||||||
printstring STRINGID_PKMNPICKEDUPITEM
|
printstring STRINGID_PLAYERPICKEDUPMONEY
|
||||||
waitmessage 0x40
|
waitmessage 0x40
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@ -168,7 +168,7 @@ BattleFrontier_BattleFactoryPreBattleRoom_EventScript_SwapMons:: @ 8259DF2
|
|||||||
fadescreen FADE_TO_BLACK
|
fadescreen FADE_TO_BLACK
|
||||||
factory_swapmons
|
factory_swapmons
|
||||||
waitstate
|
waitstate
|
||||||
compare VAR_RESULT, 1
|
compare VAR_RESULT, TRUE @ Did player keep current pokemon
|
||||||
goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_EnterBattleRoom
|
goto_if_eq BattleFrontier_BattleFactoryPreBattleRoom_EventScript_EnterBattleRoom
|
||||||
factory_setswapped
|
factory_setswapped
|
||||||
msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_YourSwapIsComplete, MSGBOX_DEFAULT
|
msgbox BattleFrontier_BattleFactoryPreBattleRoom_Text_YourSwapIsComplete, MSGBOX_DEFAULT
|
||||||
|
|||||||
@ -443,7 +443,7 @@ BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyMultis:: @ 82421F2
|
|||||||
end
|
end
|
||||||
|
|
||||||
BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyLinkMultis:: @ 82421FC
|
BattleFrontier_BattleTowerBattleRoom_EventScript_WarpToLobbyLinkMultis:: @ 82421FC
|
||||||
tower_unklink
|
tower_closelink
|
||||||
warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY, 255, 18, 6
|
warp MAP_BATTLE_FRONTIER_BATTLE_TOWER_LOBBY, 255, 18, 6
|
||||||
waitstate
|
waitstate
|
||||||
end
|
end
|
||||||
|
|||||||
@ -104,7 +104,7 @@
|
|||||||
"flag": "0"
|
"flag": "0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON_1",
|
"graphics_id": "OBJ_EVENT_GFX_KECLEON",
|
||||||
"x": 25,
|
"x": 25,
|
||||||
"y": 8,
|
"y": 8,
|
||||||
"elevation": 3,
|
"elevation": 3,
|
||||||
|
|||||||
@ -28,7 +28,7 @@
|
|||||||
"flag": "0"
|
"flag": "0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON_1",
|
"graphics_id": "OBJ_EVENT_GFX_KECLEON",
|
||||||
"x": 4,
|
"x": 4,
|
||||||
"y": 4,
|
"y": 4,
|
||||||
"elevation": 3,
|
"elevation": 3,
|
||||||
|
|||||||
@ -247,7 +247,11 @@ MossdeepCity_SpaceCenter_1F_EventScript_Grunt2:: @ 822321F
|
|||||||
copyobjectxytoperm LOCALID_STAIR_GRUNT
|
copyobjectxytoperm LOCALID_STAIR_GRUNT
|
||||||
switch VAR_FACING
|
switch VAR_FACING
|
||||||
case DIR_WEST, MossdeepCity_SpaceCenter_1F_EventScript_MoveGruntFromStairsWest
|
case DIR_WEST, MossdeepCity_SpaceCenter_1F_EventScript_MoveGruntFromStairsWest
|
||||||
case DIR_WEST, MossdeepCity_SpaceCenter_1F_EventScript_MoveGruntFromStairsEast @ BUG: This was meant to be case DIR_EAST
|
#ifdef BUGFIX
|
||||||
|
case DIR_EAST, MossdeepCity_SpaceCenter_1F_EventScript_MoveGruntFromStairsEast
|
||||||
|
#else
|
||||||
|
case DIR_WEST, MossdeepCity_SpaceCenter_1F_EventScript_MoveGruntFromStairsEast
|
||||||
|
#endif
|
||||||
applymovement LOCALID_STAIR_GRUNT, MossdeepCity_SpaceCenter_1F_Movement_MoveGruntFromStairs
|
applymovement LOCALID_STAIR_GRUNT, MossdeepCity_SpaceCenter_1F_Movement_MoveGruntFromStairs
|
||||||
waitmovement 0
|
waitmovement 0
|
||||||
setvar VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE, 2
|
setvar VAR_MOSSDEEP_SPACE_CENTER_STAIR_GUARD_STATE, 2
|
||||||
|
|||||||
@ -78,7 +78,7 @@
|
|||||||
"flag": "0"
|
"flag": "0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON_1",
|
"graphics_id": "OBJ_EVENT_GFX_KECLEON",
|
||||||
"x": 39,
|
"x": 39,
|
||||||
"y": 4,
|
"y": 4,
|
||||||
"elevation": 3,
|
"elevation": 3,
|
||||||
|
|||||||
@ -468,7 +468,7 @@
|
|||||||
"flag": "0"
|
"flag": "0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON_1",
|
"graphics_id": "OBJ_EVENT_GFX_KECLEON",
|
||||||
"x": 31,
|
"x": 31,
|
||||||
"y": 6,
|
"y": 6,
|
||||||
"elevation": 3,
|
"elevation": 3,
|
||||||
@ -481,7 +481,7 @@
|
|||||||
"flag": "FLAG_HIDE_ROUTE_119_KECLEON_1"
|
"flag": "FLAG_HIDE_ROUTE_119_KECLEON_1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON_1",
|
"graphics_id": "OBJ_EVENT_GFX_KECLEON",
|
||||||
"x": 25,
|
"x": 25,
|
||||||
"y": 15,
|
"y": 15,
|
||||||
"elevation": 3,
|
"elevation": 3,
|
||||||
|
|||||||
@ -403,7 +403,7 @@
|
|||||||
"flag": "FLAG_ITEM_ROUTE_120_HYPER_POTION"
|
"flag": "FLAG_ITEM_ROUTE_120_HYPER_POTION"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON_1",
|
"graphics_id": "OBJ_EVENT_GFX_KECLEON",
|
||||||
"x": 12,
|
"x": 12,
|
||||||
"y": 16,
|
"y": 16,
|
||||||
"elevation": 4,
|
"elevation": 4,
|
||||||
@ -412,8 +412,8 @@
|
|||||||
"movement_range_y": 1,
|
"movement_range_y": 1,
|
||||||
"trainer_type": "TRAINER_TYPE_NONE",
|
"trainer_type": "TRAINER_TYPE_NONE",
|
||||||
"trainer_sight_or_berry_tree_id": "0",
|
"trainer_sight_or_berry_tree_id": "0",
|
||||||
"script": "Route120_EventScript_InvisibleBridgeKecleon",
|
"script": "Route120_EventScript_BridgeKecleon",
|
||||||
"flag": "FLAG_HIDE_ROUTE_120_KECLEON_BRIDGE_INVISIBLE"
|
"flag": "FLAG_HIDE_ROUTE_120_KECLEON_BRIDGE"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"graphics_id": "OBJ_EVENT_GFX_STEVEN",
|
"graphics_id": "OBJ_EVENT_GFX_STEVEN",
|
||||||
@ -481,7 +481,7 @@
|
|||||||
"flag": "0"
|
"flag": "0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON_2",
|
"graphics_id": "OBJ_EVENT_GFX_KECLEON_BRIDGE_SHADOW",
|
||||||
"x": 12,
|
"x": 12,
|
||||||
"y": 16,
|
"y": 16,
|
||||||
"elevation": 3,
|
"elevation": 3,
|
||||||
@ -491,10 +491,10 @@
|
|||||||
"trainer_type": "TRAINER_TYPE_NONE",
|
"trainer_type": "TRAINER_TYPE_NONE",
|
||||||
"trainer_sight_or_berry_tree_id": "0",
|
"trainer_sight_or_berry_tree_id": "0",
|
||||||
"script": "0x0",
|
"script": "0x0",
|
||||||
"flag": "FLAG_HIDE_ROUTE_120_KECLEON_BRIDGE_VISIBLE"
|
"flag": "FLAG_HIDE_ROUTE_120_KECLEON_BRIDGE_SHADOW"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON_1",
|
"graphics_id": "OBJ_EVENT_GFX_KECLEON",
|
||||||
"x": 20,
|
"x": 20,
|
||||||
"y": 11,
|
"y": 11,
|
||||||
"elevation": 3,
|
"elevation": 3,
|
||||||
@ -507,7 +507,7 @@
|
|||||||
"flag": "FLAG_HIDE_ROUTE_120_KECLEON_1"
|
"flag": "FLAG_HIDE_ROUTE_120_KECLEON_1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON_1",
|
"graphics_id": "OBJ_EVENT_GFX_KECLEON",
|
||||||
"x": 27,
|
"x": 27,
|
||||||
"y": 2,
|
"y": 2,
|
||||||
"elevation": 3,
|
"elevation": 3,
|
||||||
@ -520,7 +520,7 @@
|
|||||||
"flag": "FLAG_HIDE_ROUTE_120_KECLEON_2"
|
"flag": "FLAG_HIDE_ROUTE_120_KECLEON_2"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON_1",
|
"graphics_id": "OBJ_EVENT_GFX_KECLEON",
|
||||||
"x": 4,
|
"x": 4,
|
||||||
"y": 77,
|
"y": 77,
|
||||||
"elevation": 3,
|
"elevation": 3,
|
||||||
@ -533,7 +533,7 @@
|
|||||||
"flag": "FLAG_HIDE_ROUTE_120_KECLEON_3"
|
"flag": "FLAG_HIDE_ROUTE_120_KECLEON_3"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON_1",
|
"graphics_id": "OBJ_EVENT_GFX_KECLEON",
|
||||||
"x": 7,
|
"x": 7,
|
||||||
"y": 51,
|
"y": 51,
|
||||||
"elevation": 3,
|
"elevation": 3,
|
||||||
@ -546,7 +546,7 @@
|
|||||||
"flag": "FLAG_HIDE_ROUTE_120_KECLEON_5"
|
"flag": "FLAG_HIDE_ROUTE_120_KECLEON_5"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON_1",
|
"graphics_id": "OBJ_EVENT_GFX_KECLEON",
|
||||||
"x": 19,
|
"x": 19,
|
||||||
"y": 48,
|
"y": 48,
|
||||||
"elevation": 3,
|
"elevation": 3,
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
.set LOCALID_INVISIBLE_BRIDGE_KECLEON, 30
|
.set LOCALID_BRIDGE_KECLEON, 30
|
||||||
.set LOCALID_STEVEN, 31
|
.set LOCALID_STEVEN, 31
|
||||||
.set LOCALID_VISIBLE_BRIDGE_KECLEON, 36
|
.set LOCALID_BRIDGE_KECLEON_SHADOW, 36 @ They use a second object which is identical to Kecleon but has a reflection palette tag for the bridge shadow
|
||||||
|
|
||||||
Route120_MapScripts:: @ 81F53EC
|
Route120_MapScripts:: @ 81F53EC
|
||||||
map_script MAP_SCRIPT_ON_RESUME, Route120_OnResume
|
map_script MAP_SCRIPT_ON_RESUME, Route120_OnResume
|
||||||
@ -31,8 +31,8 @@ Route120_EventScript_RemoveBridgeKecleon:: @ 81F5449
|
|||||||
specialvar VAR_RESULT, GetBattleOutcome
|
specialvar VAR_RESULT, GetBattleOutcome
|
||||||
compare VAR_RESULT, B_OUTCOME_CAUGHT
|
compare VAR_RESULT, B_OUTCOME_CAUGHT
|
||||||
goto_if_ne Common_EventScript_NopReturn
|
goto_if_ne Common_EventScript_NopReturn
|
||||||
removeobject LOCALID_INVISIBLE_BRIDGE_KECLEON
|
removeobject LOCALID_BRIDGE_KECLEON
|
||||||
removeobject LOCALID_VISIBLE_BRIDGE_KECLEON
|
removeobject LOCALID_BRIDGE_KECLEON_SHADOW
|
||||||
return
|
return
|
||||||
|
|
||||||
Route120_EventScript_RemoveKecleon:: @ 81F5460
|
Route120_EventScript_RemoveKecleon:: @ 81F5460
|
||||||
@ -61,7 +61,7 @@ Route120_EventScript_SetBridgeClearMetatiles:: @ 81F54A3
|
|||||||
return
|
return
|
||||||
|
|
||||||
Route120_EventScript_SetBridgeKecleonMovement:: @ 81F54C8
|
Route120_EventScript_SetBridgeKecleonMovement:: @ 81F54C8
|
||||||
setobjectmovementtype LOCALID_VISIBLE_BRIDGE_KECLEON, MOVEMENT_TYPE_FACE_RIGHT
|
setobjectmovementtype LOCALID_BRIDGE_KECLEON_SHADOW, MOVEMENT_TYPE_FACE_RIGHT
|
||||||
return
|
return
|
||||||
|
|
||||||
Route120_OnTransition: @ 81F54CD
|
Route120_OnTransition: @ 81F54CD
|
||||||
@ -205,9 +205,9 @@ Route120_EventScript_StevenBattleKecleon:: @ 81F568B
|
|||||||
delay 20
|
delay 20
|
||||||
msgbox Route120_Text_StevenUsedDevonScope, MSGBOX_DEFAULT
|
msgbox Route120_Text_StevenUsedDevonScope, MSGBOX_DEFAULT
|
||||||
closemessage
|
closemessage
|
||||||
applymovement LOCALID_INVISIBLE_BRIDGE_KECLEON, Common_Movement_WalkInPlaceFastestRight
|
applymovement LOCALID_BRIDGE_KECLEON, Common_Movement_WalkInPlaceFastestRight
|
||||||
waitmovement 0
|
waitmovement 0
|
||||||
applymovement LOCALID_INVISIBLE_BRIDGE_KECLEON, Movement_KecleonAppears
|
applymovement LOCALID_BRIDGE_KECLEON, Movement_KecleonAppears
|
||||||
waitmovement 0
|
waitmovement 0
|
||||||
waitse
|
waitse
|
||||||
playmoncry SPECIES_KECLEON, 2
|
playmoncry SPECIES_KECLEON, 2
|
||||||
@ -230,8 +230,8 @@ Route120_EventScript_StevenBattleKecleon:: @ 81F568B
|
|||||||
|
|
||||||
Route120_EventScript_RemoveBridgeKecleonPostBattle:: @ 81F571C
|
Route120_EventScript_RemoveBridgeKecleonPostBattle:: @ 81F571C
|
||||||
fadescreenswapbuffers FADE_TO_BLACK
|
fadescreenswapbuffers FADE_TO_BLACK
|
||||||
removeobject LOCALID_INVISIBLE_BRIDGE_KECLEON
|
removeobject LOCALID_BRIDGE_KECLEON
|
||||||
removeobject LOCALID_VISIBLE_BRIDGE_KECLEON
|
removeobject LOCALID_BRIDGE_KECLEON_SHADOW
|
||||||
fadescreenswapbuffers FADE_FROM_BLACK
|
fadescreenswapbuffers FADE_FROM_BLACK
|
||||||
goto Route120_EventScript_StevenGiveDeconScope
|
goto Route120_EventScript_StevenGiveDeconScope
|
||||||
end
|
end
|
||||||
@ -276,7 +276,7 @@ Route120_Movement_ApproachKecleonWest: @ 81F57B9
|
|||||||
walk_left
|
walk_left
|
||||||
step_end
|
step_end
|
||||||
|
|
||||||
Route120_EventScript_InvisibleBridgeKecleon:: @ 81F57BC
|
Route120_EventScript_BridgeKecleon:: @ 81F57BC
|
||||||
msgbox Kecleon_Text_SomethingUnseeable, MSGBOX_NPC
|
msgbox Kecleon_Text_SomethingUnseeable, MSGBOX_NPC
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -28,7 +28,7 @@
|
|||||||
"flag": "0"
|
"flag": "0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"graphics_id": "OBJ_EVENT_GFX_KECLEON_1",
|
"graphics_id": "OBJ_EVENT_GFX_KECLEON",
|
||||||
"x": 2,
|
"x": 2,
|
||||||
"y": 3,
|
"y": 3,
|
||||||
"elevation": 3,
|
"elevation": 3,
|
||||||
|
|||||||
@ -2,21 +2,21 @@
|
|||||||
|
|
||||||
.align 2
|
.align 2
|
||||||
gMysteryEventScriptCmdTable:: @ 82DED2C
|
gMysteryEventScriptCmdTable:: @ 82DED2C
|
||||||
.4byte MEScrCmd_nop
|
.4byte MEScrCmd_nop @ 0x00
|
||||||
.4byte MEScrCmd_checkcompat
|
.4byte MEScrCmd_checkcompat @ 0x01
|
||||||
.4byte MEScrCmd_end
|
.4byte MEScrCmd_end @ 0x02
|
||||||
.4byte MEScrCmd_setmsg
|
.4byte MEScrCmd_setmsg @ 0x03
|
||||||
.4byte MEScrCmd_setstatus
|
.4byte MEScrCmd_setstatus @ 0x04
|
||||||
.4byte MEScrCmd_runscript
|
.4byte MEScrCmd_runscript @ 0x05
|
||||||
.4byte MEScrCmd_initramscript
|
.4byte MEScrCmd_initramscript @ 0x06
|
||||||
.4byte MEScrCmd_setenigmaberry
|
.4byte MEScrCmd_setenigmaberry @ 0x07
|
||||||
.4byte MEScrCmd_giveribbon
|
.4byte MEScrCmd_giveribbon @ 0x08
|
||||||
.4byte MEScrCmd_givenationaldex
|
.4byte MEScrCmd_givenationaldex @ 0x09
|
||||||
.4byte MEScrCmd_addrareword
|
.4byte MEScrCmd_addrareword @ 0x0a
|
||||||
.4byte MEScrCmd_setrecordmixinggift
|
.4byte MEScrCmd_setrecordmixinggift @ 0x0b
|
||||||
.4byte MEScrCmd_givepokemon
|
.4byte MEScrCmd_givepokemon @ 0x0c
|
||||||
.4byte MEScrCmd_addtrainer
|
.4byte MEScrCmd_addtrainer @ 0x0d
|
||||||
.4byte MEScrCmd_enableresetrtc
|
.4byte MEScrCmd_enableresetrtc @ 0x0e
|
||||||
.4byte MEScrCmd_checksum
|
.4byte MEScrCmd_checksum @ 0x0f
|
||||||
.4byte MEScrCmd_crc
|
.4byte MEScrCmd_crc @ 0x10
|
||||||
gMysteryEventScriptCmdTableEnd::
|
gMysteryEventScriptCmdTableEnd::
|
||||||
|
|||||||
@ -1,232 +1,232 @@
|
|||||||
.align 2
|
.align 2
|
||||||
gScriptCmdTable:: @ 81DB67C
|
gScriptCmdTable:: @ 81DB67C
|
||||||
.4byte ScrCmd_nop
|
.4byte ScrCmd_nop @ 0x00
|
||||||
.4byte ScrCmd_nop1
|
.4byte ScrCmd_nop1 @ 0x01
|
||||||
.4byte ScrCmd_end
|
.4byte ScrCmd_end @ 0x02
|
||||||
.4byte ScrCmd_return
|
.4byte ScrCmd_return @ 0x03
|
||||||
.4byte ScrCmd_call
|
.4byte ScrCmd_call @ 0x04
|
||||||
.4byte ScrCmd_goto
|
.4byte ScrCmd_goto @ 0x05
|
||||||
.4byte ScrCmd_goto_if
|
.4byte ScrCmd_goto_if @ 0x06
|
||||||
.4byte ScrCmd_call_if
|
.4byte ScrCmd_call_if @ 0x07
|
||||||
.4byte ScrCmd_gotostd
|
.4byte ScrCmd_gotostd @ 0x08
|
||||||
.4byte ScrCmd_callstd
|
.4byte ScrCmd_callstd @ 0x09
|
||||||
.4byte ScrCmd_gotostd_if
|
.4byte ScrCmd_gotostd_if @ 0x0a
|
||||||
.4byte ScrCmd_callstd_if
|
.4byte ScrCmd_callstd_if @ 0x0b
|
||||||
.4byte ScrCmd_returnram
|
.4byte ScrCmd_returnram @ 0x0c
|
||||||
.4byte ScrCmd_killscript
|
.4byte ScrCmd_killscript @ 0x0d
|
||||||
.4byte ScrCmd_setmysteryeventstatus
|
.4byte ScrCmd_setmysteryeventstatus @ 0x0e
|
||||||
.4byte ScrCmd_loadword
|
.4byte ScrCmd_loadword @ 0x0f
|
||||||
.4byte ScrCmd_loadbyte
|
.4byte ScrCmd_loadbyte @ 0x10
|
||||||
.4byte ScrCmd_writebytetoaddr
|
.4byte ScrCmd_writebytetoaddr @ 0x11
|
||||||
.4byte ScrCmd_loadbytefromaddr
|
.4byte ScrCmd_loadbytefromaddr @ 0x12
|
||||||
.4byte ScrCmd_setptrbyte
|
.4byte ScrCmd_setptrbyte @ 0x13
|
||||||
.4byte ScrCmd_copylocal
|
.4byte ScrCmd_copylocal @ 0x14
|
||||||
.4byte ScrCmd_copybyte
|
.4byte ScrCmd_copybyte @ 0x15
|
||||||
.4byte ScrCmd_setvar
|
.4byte ScrCmd_setvar @ 0x16
|
||||||
.4byte ScrCmd_addvar
|
.4byte ScrCmd_addvar @ 0x17
|
||||||
.4byte ScrCmd_subvar
|
.4byte ScrCmd_subvar @ 0x18
|
||||||
.4byte ScrCmd_copyvar
|
.4byte ScrCmd_copyvar @ 0x19
|
||||||
.4byte ScrCmd_setorcopyvar
|
.4byte ScrCmd_setorcopyvar @ 0x1a
|
||||||
.4byte ScrCmd_compare_local_to_local
|
.4byte ScrCmd_compare_local_to_local @ 0x1b
|
||||||
.4byte ScrCmd_compare_local_to_value
|
.4byte ScrCmd_compare_local_to_value @ 0x1c
|
||||||
.4byte ScrCmd_compare_local_to_addr
|
.4byte ScrCmd_compare_local_to_addr @ 0x1d
|
||||||
.4byte ScrCmd_compare_addr_to_local
|
.4byte ScrCmd_compare_addr_to_local @ 0x1e
|
||||||
.4byte ScrCmd_compare_addr_to_value
|
.4byte ScrCmd_compare_addr_to_value @ 0x1f
|
||||||
.4byte ScrCmd_compare_addr_to_addr
|
.4byte ScrCmd_compare_addr_to_addr @ 0x20
|
||||||
.4byte ScrCmd_compare_var_to_value
|
.4byte ScrCmd_compare_var_to_value @ 0x21
|
||||||
.4byte ScrCmd_compare_var_to_var
|
.4byte ScrCmd_compare_var_to_var @ 0x22
|
||||||
.4byte ScrCmd_callnative
|
.4byte ScrCmd_callnative @ 0x23
|
||||||
.4byte ScrCmd_gotonative
|
.4byte ScrCmd_gotonative @ 0x24
|
||||||
.4byte ScrCmd_special
|
.4byte ScrCmd_special @ 0x25
|
||||||
.4byte ScrCmd_specialvar
|
.4byte ScrCmd_specialvar @ 0x26
|
||||||
.4byte ScrCmd_waitstate
|
.4byte ScrCmd_waitstate @ 0x27
|
||||||
.4byte ScrCmd_delay
|
.4byte ScrCmd_delay @ 0x28
|
||||||
.4byte ScrCmd_setflag
|
.4byte ScrCmd_setflag @ 0x29
|
||||||
.4byte ScrCmd_clearflag
|
.4byte ScrCmd_clearflag @ 0x2a
|
||||||
.4byte ScrCmd_checkflag
|
.4byte ScrCmd_checkflag @ 0x2b
|
||||||
.4byte ScrCmd_initclock
|
.4byte ScrCmd_initclock @ 0x2c
|
||||||
.4byte ScrCmd_dotimebasedevents
|
.4byte ScrCmd_dotimebasedevents @ 0x2d
|
||||||
.4byte ScrCmd_gettime
|
.4byte ScrCmd_gettime @ 0x2e
|
||||||
.4byte ScrCmd_playse
|
.4byte ScrCmd_playse @ 0x2f
|
||||||
.4byte ScrCmd_waitse
|
.4byte ScrCmd_waitse @ 0x30
|
||||||
.4byte ScrCmd_playfanfare
|
.4byte ScrCmd_playfanfare @ 0x31
|
||||||
.4byte ScrCmd_waitfanfare
|
.4byte ScrCmd_waitfanfare @ 0x32
|
||||||
.4byte ScrCmd_playbgm
|
.4byte ScrCmd_playbgm @ 0x33
|
||||||
.4byte ScrCmd_savebgm
|
.4byte ScrCmd_savebgm @ 0x34
|
||||||
.4byte ScrCmd_fadedefaultbgm
|
.4byte ScrCmd_fadedefaultbgm @ 0x35
|
||||||
.4byte ScrCmd_fadenewbgm
|
.4byte ScrCmd_fadenewbgm @ 0x36
|
||||||
.4byte ScrCmd_fadeoutbgm
|
.4byte ScrCmd_fadeoutbgm @ 0x37
|
||||||
.4byte ScrCmd_fadeinbgm
|
.4byte ScrCmd_fadeinbgm @ 0x38
|
||||||
.4byte ScrCmd_warp
|
.4byte ScrCmd_warp @ 0x39
|
||||||
.4byte ScrCmd_warpsilent
|
.4byte ScrCmd_warpsilent @ 0x3a
|
||||||
.4byte ScrCmd_warpdoor
|
.4byte ScrCmd_warpdoor @ 0x3b
|
||||||
.4byte ScrCmd_warphole
|
.4byte ScrCmd_warphole @ 0x3c
|
||||||
.4byte ScrCmd_warpteleport
|
.4byte ScrCmd_warpteleport @ 0x3d
|
||||||
.4byte ScrCmd_setwarp
|
.4byte ScrCmd_setwarp @ 0x3e
|
||||||
.4byte ScrCmd_setdynamicwarp
|
.4byte ScrCmd_setdynamicwarp @ 0x3f
|
||||||
.4byte ScrCmd_setdivewarp
|
.4byte ScrCmd_setdivewarp @ 0x40
|
||||||
.4byte ScrCmd_setholewarp
|
.4byte ScrCmd_setholewarp @ 0x41
|
||||||
.4byte ScrCmd_getplayerxy
|
.4byte ScrCmd_getplayerxy @ 0x42
|
||||||
.4byte ScrCmd_getpartysize
|
.4byte ScrCmd_getpartysize @ 0x43
|
||||||
.4byte ScrCmd_additem
|
.4byte ScrCmd_additem @ 0x44
|
||||||
.4byte ScrCmd_removeitem
|
.4byte ScrCmd_removeitem @ 0x45
|
||||||
.4byte ScrCmd_checkitemspace
|
.4byte ScrCmd_checkitemspace @ 0x46
|
||||||
.4byte ScrCmd_checkitem
|
.4byte ScrCmd_checkitem @ 0x47
|
||||||
.4byte ScrCmd_checkitemtype
|
.4byte ScrCmd_checkitemtype @ 0x48
|
||||||
.4byte ScrCmd_addpcitem
|
.4byte ScrCmd_addpcitem @ 0x49
|
||||||
.4byte ScrCmd_checkpcitem
|
.4byte ScrCmd_checkpcitem @ 0x4a
|
||||||
.4byte ScrCmd_adddecoration
|
.4byte ScrCmd_adddecoration @ 0x4b
|
||||||
.4byte ScrCmd_removedecoration
|
.4byte ScrCmd_removedecoration @ 0x4c
|
||||||
.4byte ScrCmd_checkdecor
|
.4byte ScrCmd_checkdecor @ 0x4d
|
||||||
.4byte ScrCmd_checkdecorspace
|
.4byte ScrCmd_checkdecorspace @ 0x4e
|
||||||
.4byte ScrCmd_applymovement
|
.4byte ScrCmd_applymovement @ 0x4f
|
||||||
.4byte ScrCmd_applymovement_at
|
.4byte ScrCmd_applymovement_at @ 0x50
|
||||||
.4byte ScrCmd_waitmovement
|
.4byte ScrCmd_waitmovement @ 0x51
|
||||||
.4byte ScrCmd_waitmovement_at
|
.4byte ScrCmd_waitmovement_at @ 0x52
|
||||||
.4byte ScrCmd_removeobject
|
.4byte ScrCmd_removeobject @ 0x53
|
||||||
.4byte ScrCmd_removeobject_at
|
.4byte ScrCmd_removeobject_at @ 0x54
|
||||||
.4byte ScrCmd_addobject
|
.4byte ScrCmd_addobject @ 0x55
|
||||||
.4byte ScrCmd_addobject_at
|
.4byte ScrCmd_addobject_at @ 0x56
|
||||||
.4byte ScrCmd_setobjectxy
|
.4byte ScrCmd_setobjectxy @ 0x57
|
||||||
.4byte ScrCmd_showobject_at
|
.4byte ScrCmd_showobject_at @ 0x58
|
||||||
.4byte ScrCmd_hideobject_at
|
.4byte ScrCmd_hideobject_at @ 0x59
|
||||||
.4byte ScrCmd_faceplayer
|
.4byte ScrCmd_faceplayer @ 0x5a
|
||||||
.4byte ScrCmd_turnobject
|
.4byte ScrCmd_turnobject @ 0x5b
|
||||||
.4byte ScrCmd_trainerbattle
|
.4byte ScrCmd_trainerbattle @ 0x5c
|
||||||
.4byte ScrCmd_dotrainerbattle
|
.4byte ScrCmd_dotrainerbattle @ 0x5d
|
||||||
.4byte ScrCmd_gotopostbattlescript
|
.4byte ScrCmd_gotopostbattlescript @ 0x5e
|
||||||
.4byte ScrCmd_gotobeatenscript
|
.4byte ScrCmd_gotobeatenscript @ 0x5f
|
||||||
.4byte ScrCmd_checktrainerflag
|
.4byte ScrCmd_checktrainerflag @ 0x60
|
||||||
.4byte ScrCmd_settrainerflag
|
.4byte ScrCmd_settrainerflag @ 0x61
|
||||||
.4byte ScrCmd_cleartrainerflag
|
.4byte ScrCmd_cleartrainerflag @ 0x62
|
||||||
.4byte ScrCmd_setobjectxyperm
|
.4byte ScrCmd_setobjectxyperm @ 0x63
|
||||||
.4byte ScrCmd_copyobjectxytoperm
|
.4byte ScrCmd_copyobjectxytoperm @ 0x64
|
||||||
.4byte ScrCmd_setobjectmovementtype
|
.4byte ScrCmd_setobjectmovementtype @ 0x65
|
||||||
.4byte ScrCmd_waitmessage
|
.4byte ScrCmd_waitmessage @ 0x66
|
||||||
.4byte ScrCmd_message
|
.4byte ScrCmd_message @ 0x67
|
||||||
.4byte ScrCmd_closemessage
|
.4byte ScrCmd_closemessage @ 0x68
|
||||||
.4byte ScrCmd_lockall
|
.4byte ScrCmd_lockall @ 0x69
|
||||||
.4byte ScrCmd_lock
|
.4byte ScrCmd_lock @ 0x6a
|
||||||
.4byte ScrCmd_releaseall
|
.4byte ScrCmd_releaseall @ 0x6b
|
||||||
.4byte ScrCmd_release
|
.4byte ScrCmd_release @ 0x6c
|
||||||
.4byte ScrCmd_waitbuttonpress
|
.4byte ScrCmd_waitbuttonpress @ 0x6d
|
||||||
.4byte ScrCmd_yesnobox
|
.4byte ScrCmd_yesnobox @ 0x6e
|
||||||
.4byte ScrCmd_multichoice
|
.4byte ScrCmd_multichoice @ 0x6f
|
||||||
.4byte ScrCmd_multichoicedefault
|
.4byte ScrCmd_multichoicedefault @ 0x70
|
||||||
.4byte ScrCmd_multichoicegrid
|
.4byte ScrCmd_multichoicegrid @ 0x71
|
||||||
.4byte ScrCmd_drawbox
|
.4byte ScrCmd_drawbox @ 0x72
|
||||||
.4byte ScrCmd_erasebox
|
.4byte ScrCmd_erasebox @ 0x73
|
||||||
.4byte ScrCmd_drawboxtext
|
.4byte ScrCmd_drawboxtext @ 0x74
|
||||||
.4byte ScrCmd_showmonpic
|
.4byte ScrCmd_showmonpic @ 0x75
|
||||||
.4byte ScrCmd_hidemonpic
|
.4byte ScrCmd_hidemonpic @ 0x76
|
||||||
.4byte ScrCmd_showcontestwinner
|
.4byte ScrCmd_showcontestwinner @ 0x77
|
||||||
.4byte ScrCmd_braillemessage
|
.4byte ScrCmd_braillemessage @ 0x78
|
||||||
.4byte ScrCmd_givemon
|
.4byte ScrCmd_givemon @ 0x79
|
||||||
.4byte ScrCmd_giveegg
|
.4byte ScrCmd_giveegg @ 0x7a
|
||||||
.4byte ScrCmd_setmonmove
|
.4byte ScrCmd_setmonmove @ 0x7b
|
||||||
.4byte ScrCmd_checkpartymove
|
.4byte ScrCmd_checkpartymove @ 0x7c
|
||||||
.4byte ScrCmd_bufferspeciesname
|
.4byte ScrCmd_bufferspeciesname @ 0x7d
|
||||||
.4byte ScrCmd_bufferleadmonspeciesname
|
.4byte ScrCmd_bufferleadmonspeciesname @ 0x7e
|
||||||
.4byte ScrCmd_bufferpartymonnick
|
.4byte ScrCmd_bufferpartymonnick @ 0x7f
|
||||||
.4byte ScrCmd_bufferitemname
|
.4byte ScrCmd_bufferitemname @ 0x80
|
||||||
.4byte ScrCmd_bufferdecorationname
|
.4byte ScrCmd_bufferdecorationname @ 0x81
|
||||||
.4byte ScrCmd_buffermovename
|
.4byte ScrCmd_buffermovename @ 0x82
|
||||||
.4byte ScrCmd_buffernumberstring
|
.4byte ScrCmd_buffernumberstring @ 0x83
|
||||||
.4byte ScrCmd_bufferstdstring
|
.4byte ScrCmd_bufferstdstring @ 0x84
|
||||||
.4byte ScrCmd_bufferstring
|
.4byte ScrCmd_bufferstring @ 0x85
|
||||||
.4byte ScrCmd_pokemart
|
.4byte ScrCmd_pokemart @ 0x86
|
||||||
.4byte ScrCmd_pokemartdecoration
|
.4byte ScrCmd_pokemartdecoration @ 0x87
|
||||||
.4byte ScrCmd_pokemartdecoration2
|
.4byte ScrCmd_pokemartdecoration2 @ 0x88
|
||||||
.4byte ScrCmd_playslotmachine
|
.4byte ScrCmd_playslotmachine @ 0x89
|
||||||
.4byte ScrCmd_setberrytree
|
.4byte ScrCmd_setberrytree @ 0x8a
|
||||||
.4byte ScrCmd_choosecontestmon
|
.4byte ScrCmd_choosecontestmon @ 0x8b
|
||||||
.4byte ScrCmd_startcontest
|
.4byte ScrCmd_startcontest @ 0x8c
|
||||||
.4byte ScrCmd_showcontestresults
|
.4byte ScrCmd_showcontestresults @ 0x8d
|
||||||
.4byte ScrCmd_contestlinktransfer
|
.4byte ScrCmd_contestlinktransfer @ 0x8e
|
||||||
.4byte ScrCmd_random
|
.4byte ScrCmd_random @ 0x8f
|
||||||
.4byte ScrCmd_addmoney
|
.4byte ScrCmd_addmoney @ 0x90
|
||||||
.4byte ScrCmd_removemoney
|
.4byte ScrCmd_removemoney @ 0x91
|
||||||
.4byte ScrCmd_checkmoney
|
.4byte ScrCmd_checkmoney @ 0x92
|
||||||
.4byte ScrCmd_showmoneybox
|
.4byte ScrCmd_showmoneybox @ 0x93
|
||||||
.4byte ScrCmd_hidemoneybox
|
.4byte ScrCmd_hidemoneybox @ 0x94
|
||||||
.4byte ScrCmd_updatemoneybox
|
.4byte ScrCmd_updatemoneybox @ 0x95
|
||||||
.4byte ScrCmd_getpricereduction
|
.4byte ScrCmd_getpricereduction @ 0x96
|
||||||
.4byte ScrCmd_fadescreen
|
.4byte ScrCmd_fadescreen @ 0x97
|
||||||
.4byte ScrCmd_fadescreenspeed
|
.4byte ScrCmd_fadescreenspeed @ 0x98
|
||||||
.4byte ScrCmd_setflashradius
|
.4byte ScrCmd_setflashradius @ 0x99
|
||||||
.4byte ScrCmd_animateflash
|
.4byte ScrCmd_animateflash @ 0x9a
|
||||||
.4byte ScrCmd_messageautoscroll
|
.4byte ScrCmd_messageautoscroll @ 0x9b
|
||||||
.4byte ScrCmd_dofieldeffect
|
.4byte ScrCmd_dofieldeffect @ 0x9c
|
||||||
.4byte ScrCmd_setfieldeffectarg
|
.4byte ScrCmd_setfieldeffectarg @ 0x9d
|
||||||
.4byte ScrCmd_waitfieldeffect
|
.4byte ScrCmd_waitfieldeffect @ 0x9e
|
||||||
.4byte ScrCmd_setrespawn
|
.4byte ScrCmd_setrespawn @ 0x9f
|
||||||
.4byte ScrCmd_checkplayergender
|
.4byte ScrCmd_checkplayergender @ 0xa0
|
||||||
.4byte ScrCmd_playmoncry
|
.4byte ScrCmd_playmoncry @ 0xa1
|
||||||
.4byte ScrCmd_setmetatile
|
.4byte ScrCmd_setmetatile @ 0xa2
|
||||||
.4byte ScrCmd_resetweather
|
.4byte ScrCmd_resetweather @ 0xa3
|
||||||
.4byte ScrCmd_setweather
|
.4byte ScrCmd_setweather @ 0xa4
|
||||||
.4byte ScrCmd_doweather
|
.4byte ScrCmd_doweather @ 0xa5
|
||||||
.4byte ScrCmd_setstepcallback
|
.4byte ScrCmd_setstepcallback @ 0xa6
|
||||||
.4byte ScrCmd_setmaplayoutindex
|
.4byte ScrCmd_setmaplayoutindex @ 0xa7
|
||||||
.4byte ScrCmd_setobjectpriority
|
.4byte ScrCmd_setobjectpriority @ 0xa8
|
||||||
.4byte ScrCmd_resetobjectpriority
|
.4byte ScrCmd_resetobjectpriority @ 0xa9
|
||||||
.4byte ScrCmd_createvobject
|
.4byte ScrCmd_createvobject @ 0xaa
|
||||||
.4byte ScrCmd_turnvobject
|
.4byte ScrCmd_turnvobject @ 0xab
|
||||||
.4byte ScrCmd_opendoor
|
.4byte ScrCmd_opendoor @ 0xac
|
||||||
.4byte ScrCmd_closedoor
|
.4byte ScrCmd_closedoor @ 0xad
|
||||||
.4byte ScrCmd_waitdooranim
|
.4byte ScrCmd_waitdooranim @ 0xae
|
||||||
.4byte ScrCmd_setdooropen
|
.4byte ScrCmd_setdooropen @ 0xaf
|
||||||
.4byte ScrCmd_setdoorclosed
|
.4byte ScrCmd_setdoorclosed @ 0xb0
|
||||||
.4byte ScrCmd_addelevmenuitem
|
.4byte ScrCmd_addelevmenuitem @ 0xb1
|
||||||
.4byte ScrCmd_showelevmenu
|
.4byte ScrCmd_showelevmenu @ 0xb2
|
||||||
.4byte ScrCmd_checkcoins
|
.4byte ScrCmd_checkcoins @ 0xb3
|
||||||
.4byte ScrCmd_addcoins
|
.4byte ScrCmd_addcoins @ 0xb4
|
||||||
.4byte ScrCmd_removecoins
|
.4byte ScrCmd_removecoins @ 0xb5
|
||||||
.4byte ScrCmd_setwildbattle
|
.4byte ScrCmd_setwildbattle @ 0xb6
|
||||||
.4byte ScrCmd_dowildbattle
|
.4byte ScrCmd_dowildbattle @ 0xb7
|
||||||
.4byte ScrCmd_setvaddress
|
.4byte ScrCmd_setvaddress @ 0xb8
|
||||||
.4byte ScrCmd_vgoto
|
.4byte ScrCmd_vgoto @ 0xb9
|
||||||
.4byte ScrCmd_vcall
|
.4byte ScrCmd_vcall @ 0xba
|
||||||
.4byte ScrCmd_vgoto_if
|
.4byte ScrCmd_vgoto_if @ 0xbb
|
||||||
.4byte ScrCmd_vcall_if
|
.4byte ScrCmd_vcall_if @ 0xbc
|
||||||
.4byte ScrCmd_vmessage
|
.4byte ScrCmd_vmessage @ 0xbd
|
||||||
.4byte ScrCmd_vloadword
|
.4byte ScrCmd_vloadword @ 0xbe
|
||||||
.4byte ScrCmd_vbufferstring
|
.4byte ScrCmd_vbufferstring @ 0xbf
|
||||||
.4byte ScrCmd_showcoinsbox
|
.4byte ScrCmd_showcoinsbox @ 0xc0
|
||||||
.4byte ScrCmd_hidecoinsbox
|
.4byte ScrCmd_hidecoinsbox @ 0xc1
|
||||||
.4byte ScrCmd_updatecoinsbox
|
.4byte ScrCmd_updatecoinsbox @ 0xc2
|
||||||
.4byte ScrCmd_incrementgamestat
|
.4byte ScrCmd_incrementgamestat @ 0xc3
|
||||||
.4byte ScrCmd_setescapewarp
|
.4byte ScrCmd_setescapewarp @ 0xc4
|
||||||
.4byte ScrCmd_waitmoncry
|
.4byte ScrCmd_waitmoncry @ 0xc5
|
||||||
.4byte ScrCmd_bufferboxname
|
.4byte ScrCmd_bufferboxname @ 0xc6
|
||||||
.4byte ScrCmd_nop1
|
.4byte ScrCmd_nop1 @ 0xc7
|
||||||
.4byte ScrCmd_nop1
|
.4byte ScrCmd_nop1 @ 0xc8
|
||||||
.4byte ScrCmd_nop1
|
.4byte ScrCmd_nop1 @ 0xc9
|
||||||
.4byte ScrCmd_nop1
|
.4byte ScrCmd_nop1 @ 0xca
|
||||||
.4byte ScrCmd_nop1
|
.4byte ScrCmd_nop1 @ 0xcb
|
||||||
.4byte ScrCmd_nop1
|
.4byte ScrCmd_nop1 @ 0xcc
|
||||||
.4byte ScrCmd_setmonobedient
|
.4byte ScrCmd_setmonobedient @ 0xcd
|
||||||
.4byte ScrCmd_checkmonobedience
|
.4byte ScrCmd_checkmonobedience @ 0xce
|
||||||
.4byte ScrCmd_gotoram
|
.4byte ScrCmd_gotoram @ 0xcf
|
||||||
.4byte ScrCmd_nop1
|
.4byte ScrCmd_nop1 @ 0xd0
|
||||||
.4byte ScrCmd_warpD1
|
.4byte ScrCmd_warpspinenter @ 0xd1
|
||||||
.4byte ScrCmd_setmonmetlocation
|
.4byte ScrCmd_setmonmetlocation @ 0xd2
|
||||||
.4byte ScrCmd_moverotatingtileobjects
|
.4byte ScrCmd_moverotatingtileobjects @ 0xd3
|
||||||
.4byte ScrCmd_turnrotatingtileobjects
|
.4byte ScrCmd_turnrotatingtileobjects @ 0xd4
|
||||||
.4byte ScrCmd_initrotatingtilepuzzle
|
.4byte ScrCmd_initrotatingtilepuzzle @ 0xd5
|
||||||
.4byte ScrCmd_freerotatingtilepuzzle
|
.4byte ScrCmd_freerotatingtilepuzzle @ 0xd6
|
||||||
.4byte ScrCmd_warpmossdeepgym
|
.4byte ScrCmd_warpmossdeepgym @ 0xd7
|
||||||
.4byte ScrCmd_cmdD8
|
.4byte ScrCmd_cmdD8 @ 0xd8
|
||||||
.4byte ScrCmd_cmdD9
|
.4byte ScrCmd_cmdD9 @ 0xd9
|
||||||
.4byte ScrCmd_closebraillemessage
|
.4byte ScrCmd_closebraillemessage @ 0xda
|
||||||
.4byte ScrCmd_cmdDB
|
.4byte ScrCmd_cmdDB @ 0xdb
|
||||||
.4byte ScrCmd_fadescreenswapbuffers
|
.4byte ScrCmd_fadescreenswapbuffers @ 0xdc
|
||||||
.4byte ScrCmd_buffertrainerclassname
|
.4byte ScrCmd_buffertrainerclassname @ 0xdd
|
||||||
.4byte ScrCmd_buffertrainername
|
.4byte ScrCmd_buffertrainername @ 0xde
|
||||||
.4byte ScrCmd_pokenavcall
|
.4byte ScrCmd_pokenavcall @ 0xdf
|
||||||
.4byte ScrCmd_warpsootopolislegend
|
.4byte ScrCmd_warpsootopolislegend @ 0xe0
|
||||||
.4byte ScrCmd_buffercontesttype
|
.4byte ScrCmd_buffercontesttype @ 0xe1
|
||||||
.4byte ScrCmd_bufferitemnameplural
|
.4byte ScrCmd_bufferitemnameplural @ 0xe2
|
||||||
|
|
||||||
gScriptCmdTableEnd:: @ 81DBA08
|
gScriptCmdTableEnd:: @ 81DBA08
|
||||||
.4byte ScrCmd_nop
|
.4byte ScrCmd_nop
|
||||||
|
|||||||
@ -1,43 +1,66 @@
|
|||||||
EventScript_ResetAllBerries:: @ 827149D
|
EventScript_ResetAllBerries:: @ 827149D
|
||||||
|
@ Route 102
|
||||||
setberrytree 2, ITEM_TO_BERRY(ITEM_ORAN_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 2, ITEM_TO_BERRY(ITEM_ORAN_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 1, ITEM_TO_BERRY(ITEM_PECHA_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 1, ITEM_TO_BERRY(ITEM_PECHA_BERRY), BERRY_STAGE_BERRIES
|
||||||
|
|
||||||
|
@ Route 104
|
||||||
setberrytree 11, ITEM_TO_BERRY(ITEM_ORAN_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 11, ITEM_TO_BERRY(ITEM_ORAN_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 13, ITEM_TO_BERRY(ITEM_PECHA_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 13, ITEM_TO_BERRY(ITEM_PECHA_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 4, ITEM_TO_BERRY(ITEM_ORAN_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 4, ITEM_TO_BERRY(ITEM_ORAN_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 76, ITEM_TO_BERRY(ITEM_CHERI_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 76, ITEM_TO_BERRY(ITEM_CHERI_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 8, ITEM_TO_BERRY(ITEM_CHERI_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 8, ITEM_TO_BERRY(ITEM_CHERI_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 10, ITEM_TO_BERRY(ITEM_LEPPA_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 10, ITEM_TO_BERRY(ITEM_LEPPA_BERRY), BERRY_STAGE_BERRIES
|
||||||
|
|
||||||
|
@ Route 116
|
||||||
setberrytree 25, ITEM_TO_BERRY(ITEM_PINAP_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 25, ITEM_TO_BERRY(ITEM_PINAP_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 26, ITEM_TO_BERRY(ITEM_CHESTO_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 26, ITEM_TO_BERRY(ITEM_CHESTO_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 66, ITEM_TO_BERRY(ITEM_CHESTO_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 66, ITEM_TO_BERRY(ITEM_CHESTO_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 67, ITEM_TO_BERRY(ITEM_PINAP_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 67, ITEM_TO_BERRY(ITEM_PINAP_BERRY), BERRY_STAGE_BERRIES
|
||||||
|
|
||||||
|
@ Route 115
|
||||||
setberrytree 69, ITEM_TO_BERRY(ITEM_KELPSY_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 69, ITEM_TO_BERRY(ITEM_KELPSY_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 70, ITEM_TO_BERRY(ITEM_KELPSY_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 70, ITEM_TO_BERRY(ITEM_KELPSY_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 71, ITEM_TO_BERRY(ITEM_KELPSY_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 71, ITEM_TO_BERRY(ITEM_KELPSY_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 55, ITEM_TO_BERRY(ITEM_BLUK_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 55, ITEM_TO_BERRY(ITEM_BLUK_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 56, ITEM_TO_BERRY(ITEM_BLUK_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 56, ITEM_TO_BERRY(ITEM_BLUK_BERRY), BERRY_STAGE_BERRIES
|
||||||
|
|
||||||
|
@ Route 103
|
||||||
setberrytree 5, ITEM_TO_BERRY(ITEM_CHERI_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 5, ITEM_TO_BERRY(ITEM_CHERI_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 6, ITEM_TO_BERRY(ITEM_LEPPA_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 6, ITEM_TO_BERRY(ITEM_LEPPA_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 7, ITEM_TO_BERRY(ITEM_CHERI_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 7, ITEM_TO_BERRY(ITEM_CHERI_BERRY), BERRY_STAGE_BERRIES
|
||||||
|
|
||||||
|
@ Route 110
|
||||||
setberrytree 16, ITEM_TO_BERRY(ITEM_NANAB_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 16, ITEM_TO_BERRY(ITEM_NANAB_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 17, ITEM_TO_BERRY(ITEM_NANAB_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 17, ITEM_TO_BERRY(ITEM_NANAB_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 18, ITEM_TO_BERRY(ITEM_NANAB_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 18, ITEM_TO_BERRY(ITEM_NANAB_BERRY), BERRY_STAGE_BERRIES
|
||||||
|
|
||||||
|
@ Route 117
|
||||||
setberrytree 29, ITEM_TO_BERRY(ITEM_WEPEAR_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 29, ITEM_TO_BERRY(ITEM_WEPEAR_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 28, ITEM_TO_BERRY(ITEM_WEPEAR_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 28, ITEM_TO_BERRY(ITEM_WEPEAR_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 27, ITEM_TO_BERRY(ITEM_WEPEAR_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 27, ITEM_TO_BERRY(ITEM_WEPEAR_BERRY), BERRY_STAGE_BERRIES
|
||||||
|
|
||||||
|
@ Route 112
|
||||||
setberrytree 24, ITEM_TO_BERRY(ITEM_RAWST_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 24, ITEM_TO_BERRY(ITEM_RAWST_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 23, ITEM_TO_BERRY(ITEM_PECHA_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 23, ITEM_TO_BERRY(ITEM_PECHA_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 22, ITEM_TO_BERRY(ITEM_PECHA_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 22, ITEM_TO_BERRY(ITEM_PECHA_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 21, ITEM_TO_BERRY(ITEM_RAWST_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 21, ITEM_TO_BERRY(ITEM_RAWST_BERRY), BERRY_STAGE_BERRIES
|
||||||
|
|
||||||
|
@ Route 111
|
||||||
setberrytree 19, ITEM_TO_BERRY(ITEM_RAZZ_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 19, ITEM_TO_BERRY(ITEM_RAZZ_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 20, ITEM_TO_BERRY(ITEM_RAZZ_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 20, ITEM_TO_BERRY(ITEM_RAZZ_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 80, ITEM_TO_BERRY(ITEM_ORAN_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 80, ITEM_TO_BERRY(ITEM_ORAN_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 81, ITEM_TO_BERRY(ITEM_ORAN_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 81, ITEM_TO_BERRY(ITEM_ORAN_BERRY), BERRY_STAGE_BERRIES
|
||||||
|
|
||||||
|
@ Route 114
|
||||||
setberrytree 77, ITEM_TO_BERRY(ITEM_PERSIM_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 77, ITEM_TO_BERRY(ITEM_PERSIM_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 78, ITEM_TO_BERRY(ITEM_PERSIM_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 78, ITEM_TO_BERRY(ITEM_PERSIM_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 68, ITEM_TO_BERRY(ITEM_PERSIM_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 68, ITEM_TO_BERRY(ITEM_PERSIM_BERRY), BERRY_STAGE_BERRIES
|
||||||
|
|
||||||
|
@ Route 118
|
||||||
setberrytree 31, ITEM_TO_BERRY(ITEM_SITRUS_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 31, ITEM_TO_BERRY(ITEM_SITRUS_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 33, ITEM_TO_BERRY(ITEM_SITRUS_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 33, ITEM_TO_BERRY(ITEM_SITRUS_BERRY), BERRY_STAGE_BERRIES
|
||||||
|
|
||||||
|
@ Route 119
|
||||||
setberrytree 34, ITEM_TO_BERRY(ITEM_POMEG_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 34, ITEM_TO_BERRY(ITEM_POMEG_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 35, ITEM_TO_BERRY(ITEM_POMEG_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 35, ITEM_TO_BERRY(ITEM_POMEG_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 36, ITEM_TO_BERRY(ITEM_POMEG_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 36, ITEM_TO_BERRY(ITEM_POMEG_BERRY), BERRY_STAGE_BERRIES
|
||||||
@ -45,6 +68,8 @@ EventScript_ResetAllBerries:: @ 827149D
|
|||||||
setberrytree 84, ITEM_TO_BERRY(ITEM_HONDEW_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 84, ITEM_TO_BERRY(ITEM_HONDEW_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 85, ITEM_TO_BERRY(ITEM_SITRUS_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 85, ITEM_TO_BERRY(ITEM_SITRUS_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 86, ITEM_TO_BERRY(ITEM_LEPPA_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 86, ITEM_TO_BERRY(ITEM_LEPPA_BERRY), BERRY_STAGE_BERRIES
|
||||||
|
|
||||||
|
@ Route 120
|
||||||
setberrytree 37, ITEM_TO_BERRY(ITEM_ASPEAR_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 37, ITEM_TO_BERRY(ITEM_ASPEAR_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 38, ITEM_TO_BERRY(ITEM_ASPEAR_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 38, ITEM_TO_BERRY(ITEM_ASPEAR_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 39, ITEM_TO_BERRY(ITEM_ASPEAR_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 39, ITEM_TO_BERRY(ITEM_ASPEAR_BERRY), BERRY_STAGE_BERRIES
|
||||||
@ -55,12 +80,16 @@ EventScript_ResetAllBerries:: @ 827149D
|
|||||||
setberrytree 45, ITEM_TO_BERRY(ITEM_PINAP_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 45, ITEM_TO_BERRY(ITEM_PINAP_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 44, ITEM_TO_BERRY(ITEM_NANAB_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 44, ITEM_TO_BERRY(ITEM_NANAB_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 43, ITEM_TO_BERRY(ITEM_RAZZ_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 43, ITEM_TO_BERRY(ITEM_RAZZ_BERRY), BERRY_STAGE_BERRIES
|
||||||
|
|
||||||
|
@ Route 121
|
||||||
setberrytree 47, ITEM_TO_BERRY(ITEM_PERSIM_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 47, ITEM_TO_BERRY(ITEM_PERSIM_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 48, ITEM_TO_BERRY(ITEM_ASPEAR_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 48, ITEM_TO_BERRY(ITEM_ASPEAR_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 49, ITEM_TO_BERRY(ITEM_RAWST_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 49, ITEM_TO_BERRY(ITEM_RAWST_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 50, ITEM_TO_BERRY(ITEM_CHESTO_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 50, ITEM_TO_BERRY(ITEM_CHESTO_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 52, ITEM_TO_BERRY(ITEM_NANAB_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 52, ITEM_TO_BERRY(ITEM_NANAB_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 53, ITEM_TO_BERRY(ITEM_NANAB_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 53, ITEM_TO_BERRY(ITEM_NANAB_BERRY), BERRY_STAGE_BERRIES
|
||||||
|
|
||||||
|
@ Route 123
|
||||||
setberrytree 62, ITEM_TO_BERRY(ITEM_LEPPA_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 62, ITEM_TO_BERRY(ITEM_LEPPA_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 64, ITEM_TO_BERRY(ITEM_LEPPA_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 64, ITEM_TO_BERRY(ITEM_LEPPA_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 58, ITEM_TO_BERRY(ITEM_POMEG_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 58, ITEM_TO_BERRY(ITEM_POMEG_BERRY), BERRY_STAGE_BERRIES
|
||||||
@ -78,6 +107,8 @@ EventScript_ResetAllBerries:: @ 827149D
|
|||||||
setberrytree 87, ITEM_TO_BERRY(ITEM_PECHA_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 87, ITEM_TO_BERRY(ITEM_PECHA_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 88, ITEM_TO_BERRY(ITEM_SITRUS_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 88, ITEM_TO_BERRY(ITEM_SITRUS_BERRY), BERRY_STAGE_BERRIES
|
||||||
setberrytree 89, ITEM_TO_BERRY(ITEM_RAWST_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 89, ITEM_TO_BERRY(ITEM_RAWST_BERRY), BERRY_STAGE_BERRIES
|
||||||
|
|
||||||
|
@ Mirage Island
|
||||||
setberrytree 82, ITEM_TO_BERRY(ITEM_LIECHI_BERRY), BERRY_STAGE_BERRIES
|
setberrytree 82, ITEM_TO_BERRY(ITEM_LIECHI_BERRY), BERRY_STAGE_BERRIES
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@ -308,7 +308,7 @@ SecretBase_EventScript_PutAwayDecorationLoop:: @ 8275D39
|
|||||||
compare VAR_0x8005, 0
|
compare VAR_0x8005, 0
|
||||||
goto_if_eq SecretBase_EventScript_PutAwayDecorationLoop
|
goto_if_eq SecretBase_EventScript_PutAwayDecorationLoop
|
||||||
removeobject VAR_0x8006
|
removeobject VAR_0x8006
|
||||||
setflag VAR_0x8005 @ UB: GF likely meant setvar here; setflag 0x8005 is out of bounds
|
setflag VAR_0x8005 @ UB: VAR_0x8005 is set to a flag by PutAwayDecorationIteration, but ScrCmd_setflag doesn't use VarGet
|
||||||
goto SecretBase_EventScript_PutAwayDecorationLoop
|
goto SecretBase_EventScript_PutAwayDecorationLoop
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
# Bugs and Glitches
|
# Bugs and Glitches
|
||||||
|
|
||||||
These are known bugs and glitches in the original Pokémon Emerald game: code that clearly does not work as intended, or that only works in limited circumstances but has the possibility to fail or crash.
|
These are known bugs and glitches in the original Pokémon Emerald game: code that clearly does not work as intended, or that only works in limited circumstances but has the possibility to fail or crash. Defining the `BUGFIX` and `UBFIX` preprocessor variables will fix some of these automatically. `UBFIX` will already be defined for MODERN builds.
|
||||||
|
|
||||||
Fixes are written in the `diff` format. If you've used Git before, this should look familiar:
|
Fixes are written in the `diff` format. If you've used Git before, this should look familiar:
|
||||||
|
|
||||||
@ -13,55 +13,9 @@ Fixes are written in the `diff` format. If you've used Git before, this should l
|
|||||||
|
|
||||||
## Contents
|
## Contents
|
||||||
|
|
||||||
- [RNG does not get seeded](#rng-does-not-get-seeded)
|
|
||||||
- [Scrolling through items in the bag causes the image to flicker](#scrolling-through-items-in-the-bag-causes-the-image-to-flicker)
|
- [Scrolling through items in the bag causes the image to flicker](#scrolling-through-items-in-the-bag-causes-the-image-to-flicker)
|
||||||
|
|
||||||
|
|
||||||
## RNG does not get seeded
|
|
||||||
|
|
||||||
**Fix:** Add the following function to [src/main.c](https://github.com/pret/pokeemerald/blob/master/src/main.c):
|
|
||||||
```diff
|
|
||||||
+static void SeedRngWithRtc(void)
|
|
||||||
+{
|
|
||||||
+ u32 seed = RtcGetMinuteCount();
|
|
||||||
+ seed = (seed >> 16) ^ (seed & 0xFFFF);
|
|
||||||
+ SeedRng(seed);
|
|
||||||
+}
|
|
||||||
```
|
|
||||||
|
|
||||||
And edit `AgbMain`:
|
|
||||||
|
|
||||||
```diff
|
|
||||||
...
|
|
||||||
RtcInit();
|
|
||||||
CheckForFlashMemory();
|
|
||||||
InitMainCallbacks();
|
|
||||||
InitMapMusic();
|
|
||||||
+ SeedRngWithRtc();
|
|
||||||
ClearDma3Requests();
|
|
||||||
...
|
|
||||||
```
|
|
||||||
|
|
||||||
This restores the code of Ruby/Sapphire.
|
|
||||||
|
|
||||||
**Alternate Fix:** Edit the following function in [src/title_screen.c](https://github.com/pret/pokeemerald/blob/master/src/title_screen.c):
|
|
||||||
|
|
||||||
```diff
|
|
||||||
void CB2_InitTitleScreen(void)
|
|
||||||
{
|
|
||||||
switch (gMain.state)
|
|
||||||
{
|
|
||||||
default:
|
|
||||||
case 0:
|
|
||||||
SetVBlankCallback(NULL);
|
|
||||||
+ StartTimer1();
|
|
||||||
SetGpuReg(REG_OFFSET_BLDCNT, 0);
|
|
||||||
SetGpuReg(REG_OFFSET_BLDALPHA, 0);
|
|
||||||
SetGpuReg(REG_OFFSET_BLDY, 0);
|
|
||||||
...
|
|
||||||
```
|
|
||||||
This matches with the code of FR/LG and does what GF originally wanted to do.
|
|
||||||
|
|
||||||
## Scrolling through items in the bag causes the image to flicker
|
## Scrolling through items in the bag causes the image to flicker
|
||||||
|
|
||||||
**Fix:** Add the following function to [src/item_menu_icons.c](https://github.com/pret/pokeemerald/blob/master/src/item_menu_icons.c):
|
**Fix:** Add the following function to [src/item_menu_icons.c](https://github.com/pret/pokeemerald/blob/master/src/item_menu_icons.c):
|
||||||
@ -89,9 +43,9 @@ Then edit `BagMenu_MoveCursorCallback` in [src/item_menu.c](https://github.com/p
|
|||||||
```diff
|
```diff
|
||||||
...
|
...
|
||||||
{
|
{
|
||||||
- RemoveBagItemIconSprite(1 ^ gBagMenu->unk81B_1);
|
- RemoveBagItemIconSprite(1 ^ gBagMenu->itemIconSlot);
|
||||||
+ HideBagItemIconSprite(gBagMenu->unk81B_1 ^ 1);
|
+ HideBagItemIconSprite(gBagMenu->itemIconSlot ^ 1);
|
||||||
+ RemoveBagItemIconSprite(gBagMenu->unk81B_1);
|
+ RemoveBagItemIconSprite(gBagMenu->itemIconSlot);
|
||||||
if (a != -2)
|
if (itemIndex != LIST_CANCEL)
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|||||||
118
gflib/bg.c
@ -34,8 +34,8 @@ struct BgConfig2
|
|||||||
u32 unk_3:18;
|
u32 unk_3:18;
|
||||||
|
|
||||||
void* tilemap;
|
void* tilemap;
|
||||||
s32 bg_x; // Maybe unsigned, but game treats it as if it is signed a LOT.
|
s32 bg_x;
|
||||||
s32 bg_y; // Same for this variable.
|
s32 bg_y;
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct BgControl sGpuBgConfigs;
|
static struct BgControl sGpuBgConfigs;
|
||||||
@ -621,15 +621,17 @@ s32 GetBgX(u8 bg)
|
|||||||
{
|
{
|
||||||
if (IsInvalidBg32(bg))
|
if (IsInvalidBg32(bg))
|
||||||
return -1;
|
return -1;
|
||||||
if (!GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE))
|
else if (!GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE))
|
||||||
return -1;
|
return -1;
|
||||||
return sGpuBgConfigs2[bg].bg_x;
|
else
|
||||||
|
return sGpuBgConfigs2[bg].bg_x;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 ChangeBgY(u8 bg, s32 value, u8 op)
|
s32 ChangeBgY(u8 bg, s32 value, u8 op)
|
||||||
{
|
{
|
||||||
u8 mode;
|
u8 mode;
|
||||||
u16 temp1, temp2;
|
u16 temp1;
|
||||||
|
u16 temp2;
|
||||||
|
|
||||||
if (IsInvalidBg32(bg) || !GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE))
|
if (IsInvalidBg32(bg) || !GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE))
|
||||||
{
|
{
|
||||||
@ -698,7 +700,8 @@ s32 ChangeBgY(u8 bg, s32 value, u8 op)
|
|||||||
s32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op)
|
s32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op)
|
||||||
{
|
{
|
||||||
u8 mode;
|
u8 mode;
|
||||||
u16 temp1, temp2;
|
u16 temp1;
|
||||||
|
u16 temp2;
|
||||||
|
|
||||||
if (IsInvalidBg32(bg) || !GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE))
|
if (IsInvalidBg32(bg) || !GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE))
|
||||||
{
|
{
|
||||||
@ -769,9 +772,10 @@ s32 GetBgY(u8 bg)
|
|||||||
{
|
{
|
||||||
if (IsInvalidBg32(bg))
|
if (IsInvalidBg32(bg))
|
||||||
return -1;
|
return -1;
|
||||||
if (!GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE))
|
else if (!GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE))
|
||||||
return -1;
|
return -1;
|
||||||
return sGpuBgConfigs2[bg].bg_y;
|
else
|
||||||
|
return sGpuBgConfigs2[bg].bg_y;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetBgAffine(u8 bg, s32 srcCenterX, s32 srcCenterY, s16 dispCenterX, s16 dispCenterY, s16 scaleX, s16 scaleY, u16 rotationAngle)
|
void SetBgAffine(u8 bg, s32 srcCenterX, s32 srcCenterY, s16 dispCenterX, s16 dispCenterY, s16 scaleX, s16 scaleY, u16 rotationAngle)
|
||||||
@ -870,77 +874,81 @@ void* GetBgTilemapBuffer(u8 bg)
|
|||||||
{
|
{
|
||||||
if (IsInvalidBg32(bg))
|
if (IsInvalidBg32(bg))
|
||||||
return NULL;
|
return NULL;
|
||||||
if (!GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE))
|
else if (!GetBgControlAttribute(bg, BG_CTRL_ATTR_VISIBLE))
|
||||||
return NULL;
|
return NULL;
|
||||||
return sGpuBgConfigs2[bg].tilemap;
|
else
|
||||||
|
return sGpuBgConfigs2[bg].tilemap;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CopyToBgTilemapBuffer(u8 bg, const void *src, u16 mode, u16 destOffset)
|
void CopyToBgTilemapBuffer(u8 bg, const void *src, u16 mode, u16 destOffset)
|
||||||
{
|
{
|
||||||
if (IsInvalidBg32(bg) || IsTileMapOutsideWram(bg))
|
if (!IsInvalidBg32(bg) && !IsTileMapOutsideWram(bg))
|
||||||
return;
|
{
|
||||||
if (mode != 0)
|
if (mode != 0)
|
||||||
CpuCopy16(src, (void *)(sGpuBgConfigs2[bg].tilemap + (destOffset * 2)), mode);
|
CpuCopy16(src, (void *)(sGpuBgConfigs2[bg].tilemap + (destOffset * 2)), mode);
|
||||||
else
|
else
|
||||||
LZ77UnCompWram(src, (void *)(sGpuBgConfigs2[bg].tilemap + (destOffset * 2)));
|
LZ77UnCompWram(src, (void *)(sGpuBgConfigs2[bg].tilemap + (destOffset * 2)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CopyBgTilemapBufferToVram(u8 bg)
|
void CopyBgTilemapBufferToVram(u8 bg)
|
||||||
{
|
{
|
||||||
u16 sizeToLoad;
|
u16 sizeToLoad;
|
||||||
|
|
||||||
if (IsInvalidBg32(bg) || IsTileMapOutsideWram(bg))
|
if (!IsInvalidBg32(bg) && !IsTileMapOutsideWram(bg))
|
||||||
return;
|
|
||||||
|
|
||||||
switch (GetBgType(bg))
|
|
||||||
{
|
{
|
||||||
case 0:
|
switch (GetBgType(bg))
|
||||||
sizeToLoad = GetBgMetricTextMode(bg, 0) * 0x800;
|
{
|
||||||
break;
|
case 0:
|
||||||
case 1:
|
sizeToLoad = GetBgMetricTextMode(bg, 0) * 0x800;
|
||||||
sizeToLoad = GetBgMetricAffineMode(bg, 0) * 0x100;
|
break;
|
||||||
break;
|
case 1:
|
||||||
default:
|
sizeToLoad = GetBgMetricAffineMode(bg, 0) * 0x100;
|
||||||
sizeToLoad = 0;
|
break;
|
||||||
break;
|
default:
|
||||||
|
sizeToLoad = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
LoadBgVram(bg, sGpuBgConfigs2[bg].tilemap, sizeToLoad, 0, 2);
|
||||||
}
|
}
|
||||||
LoadBgVram(bg, sGpuBgConfigs2[bg].tilemap, sizeToLoad, 0, 2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CopyToBgTilemapBufferRect(u8 bg, const void *src, u8 destX, u8 destY, u8 width, u8 height)
|
void CopyToBgTilemapBufferRect(u8 bg, const void* src, u8 destX, u8 destY, u8 width, u8 height)
|
||||||
{
|
{
|
||||||
u16 destX16, destY16;
|
u16 destX16;
|
||||||
|
u16 destY16;
|
||||||
u16 mode;
|
u16 mode;
|
||||||
|
|
||||||
if (IsInvalidBg32(bg) || IsTileMapOutsideWram(bg))
|
if (!IsInvalidBg32(bg) && !IsTileMapOutsideWram(bg))
|
||||||
return;
|
|
||||||
switch (GetBgType(bg))
|
|
||||||
{
|
{
|
||||||
case 0:
|
switch (GetBgType(bg))
|
||||||
{
|
|
||||||
const u16 *srcCopy = src;
|
|
||||||
for (destY16 = destY; destY16 < (destY + height); destY16++)
|
|
||||||
{
|
{
|
||||||
for (destX16 = destX; destX16 < (destX + width); destX16++)
|
case 0:
|
||||||
{
|
|
||||||
((u16 *)sGpuBgConfigs2[bg].tilemap)[((destY16 * 0x20) + destX16)] = *srcCopy++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 1:
|
|
||||||
{
|
|
||||||
const u8 *srcCopy = src;
|
|
||||||
mode = GetBgMetricAffineMode(bg, 0x1);
|
|
||||||
for (destY16 = destY; destY16 < (destY + height); destY16++)
|
|
||||||
{
|
{
|
||||||
for (destX16 = destX; destX16 < (destX + width); destX16++)
|
const u16 * srcCopy = src;
|
||||||
|
for (destY16 = destY; destY16 < (destY + height); destY16++)
|
||||||
{
|
{
|
||||||
((u8 *)sGpuBgConfigs2[bg].tilemap)[((destY16 * mode) + destX16)] = *srcCopy++;
|
for (destX16 = destX; destX16 < (destX + width); destX16++)
|
||||||
|
{
|
||||||
|
((u16*)sGpuBgConfigs2[bg].tilemap)[((destY16 * 0x20) + destX16)] = *srcCopy++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 1:
|
||||||
|
{
|
||||||
|
const u8 * srcCopy = src;
|
||||||
|
mode = GetBgMetricAffineMode(bg, 0x1);
|
||||||
|
for (destY16 = destY; destY16 < (destY + height); destY16++)
|
||||||
|
{
|
||||||
|
for (destX16 = destX; destX16 < (destX + width); destX16++)
|
||||||
|
{
|
||||||
|
((u8*)sGpuBgConfigs2[bg].tilemap)[((destY16 * mode) + destX16)] = *srcCopy++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -76,7 +76,7 @@ void FillBitmapRect4Bit(struct Bitmap *surface, u16 x, u16 y, u16 width, u16 hei
|
|||||||
s32 yEnd;
|
s32 yEnd;
|
||||||
s32 multiplierY;
|
s32 multiplierY;
|
||||||
s32 loopX, loopY;
|
s32 loopX, loopY;
|
||||||
s32 toOrr1, toOrr2;
|
u8 toOrr1, toOrr2;
|
||||||
|
|
||||||
xEnd = x + width;
|
xEnd = x + width;
|
||||||
if (xEnd > surface->width)
|
if (xEnd > surface->width)
|
||||||
@ -87,8 +87,8 @@ void FillBitmapRect4Bit(struct Bitmap *surface, u16 x, u16 y, u16 width, u16 hei
|
|||||||
yEnd = surface->height;
|
yEnd = surface->height;
|
||||||
|
|
||||||
multiplierY = (surface->width + (surface->width & 7)) >> 3;
|
multiplierY = (surface->width + (surface->width & 7)) >> 3;
|
||||||
toOrr1 = (u32)(fillValue << 0x1C) >> 0x18;
|
toOrr1 = fillValue << 4;
|
||||||
toOrr2 = (fillValue & 0xF);
|
toOrr2 = fillValue & 0xF;
|
||||||
|
|
||||||
for (loopY = y; loopY < yEnd; loopY++)
|
for (loopY = y; loopY < yEnd; loopY++)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1320,6 +1320,11 @@ void ApplyAffineAnimFrameRelativeAndUpdateMatrix(u8 matrixNum, struct AffineAnim
|
|||||||
s16 ConvertScaleParam(s16 scale)
|
s16 ConvertScaleParam(s16 scale)
|
||||||
{
|
{
|
||||||
s32 val = 0x10000;
|
s32 val = 0x10000;
|
||||||
|
// UB: possible division by zero
|
||||||
|
#ifdef UBFIX
|
||||||
|
if (scale == 0)
|
||||||
|
return 0;
|
||||||
|
#endif //UBFIX
|
||||||
return val / scale;
|
return val / scale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
177
gflib/text.c
@ -21,7 +21,7 @@ static u16 gLastTextFgColor;
|
|||||||
static u16 gLastTextShadowColor;
|
static u16 gLastTextShadowColor;
|
||||||
|
|
||||||
const struct FontInfo *gFonts;
|
const struct FontInfo *gFonts;
|
||||||
bool8 gUnknown_03002F84;
|
u8 gUnknown_03002F84;
|
||||||
struct Struct_03002F90 gUnknown_03002F90;
|
struct Struct_03002F90 gUnknown_03002F90;
|
||||||
TextFlags gTextFlags;
|
TextFlags gTextFlags;
|
||||||
|
|
||||||
@ -154,7 +154,7 @@ u16 AddTextPrinterParameterized(u8 windowId, u8 fontId, const u8 *str, u8 x, u8
|
|||||||
printerTemplate.currentY = y;
|
printerTemplate.currentY = y;
|
||||||
printerTemplate.letterSpacing = gFonts[fontId].letterSpacing;
|
printerTemplate.letterSpacing = gFonts[fontId].letterSpacing;
|
||||||
printerTemplate.lineSpacing = gFonts[fontId].lineSpacing;
|
printerTemplate.lineSpacing = gFonts[fontId].lineSpacing;
|
||||||
printerTemplate.style = gFonts[fontId].style;
|
printerTemplate.unk = gFonts[fontId].unk;
|
||||||
printerTemplate.fgColor = gFonts[fontId].fgColor;
|
printerTemplate.fgColor = gFonts[fontId].fgColor;
|
||||||
printerTemplate.bgColor = gFonts[fontId].bgColor;
|
printerTemplate.bgColor = gFonts[fontId].bgColor;
|
||||||
printerTemplate.shadowColor = gFonts[fontId].shadowColor;
|
printerTemplate.shadowColor = gFonts[fontId].shadowColor;
|
||||||
@ -205,7 +205,7 @@ bool16 AddTextPrinter(struct TextPrinterTemplate *printerTemplate, u8 speed, voi
|
|||||||
CopyWindowToVram(gTempTextPrinter.printerTemplate.windowId, 2);
|
CopyWindowToVram(gTempTextPrinter.printerTemplate.windowId, 2);
|
||||||
gTextPrinters[printerTemplate->windowId].active = 0;
|
gTextPrinters[printerTemplate->windowId].active = 0;
|
||||||
}
|
}
|
||||||
gUnknown_03002F84 = FALSE;
|
gUnknown_03002F84 = 0;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -213,7 +213,7 @@ void RunTextPrinters(void)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!gUnknown_03002F84)
|
if (gUnknown_03002F84 == 0)
|
||||||
{
|
{
|
||||||
for (i = 0; i < NUM_TEXT_PRINTERS; ++i)
|
for (i = 0; i < NUM_TEXT_PRINTERS; ++i)
|
||||||
{
|
{
|
||||||
@ -451,51 +451,46 @@ u8 GetLastTextColor(u8 colorType)
|
|||||||
{
|
{
|
||||||
switch (colorType)
|
switch (colorType)
|
||||||
{
|
{
|
||||||
case COLOR_FOREGROUND:
|
case 0:
|
||||||
return gLastTextFgColor;
|
return gLastTextFgColor;
|
||||||
case COLOR_BACKGROUND:
|
case 2:
|
||||||
return gLastTextBgColor;
|
return gLastTextBgColor;
|
||||||
case COLOR_SHADOW:
|
case 1:
|
||||||
return gLastTextShadowColor;
|
return gLastTextShadowColor;
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define GLYPH_COPY(fromY_, toY_, fromX_, toX_, unk) \
|
inline static void GLYPH_COPY(u8 *windowTiles, u32 widthOffset, u32 j, u32 i, u32 *ptr, s32 width, s32 height)
|
||||||
{ \
|
{
|
||||||
u32 i, j, *ptr, toY, fromX, toX, r5, bits; \
|
u32 xAdd, yAdd, r5, bits, toOrr, dummyX;
|
||||||
u8 *dst; \
|
u8 *dst;
|
||||||
j = fromX_; \
|
|
||||||
i = fromY_; \
|
xAdd = j + width;
|
||||||
ptr = unk; \
|
yAdd = i + height;
|
||||||
toX = toX_; \
|
dummyX = j;
|
||||||
toY = toY_; \
|
for (; i < yAdd; i++)
|
||||||
fromX = fromX_; \
|
{
|
||||||
\
|
r5 = *ptr++;
|
||||||
for (; i < toY; i++) \
|
for (j = dummyX; j < xAdd; j++)
|
||||||
{ \
|
{
|
||||||
asm("":::"sl"); /* NONMATCHING */ \
|
if ((toOrr = r5 & 0xF))
|
||||||
r5 = *(ptr++); \
|
{
|
||||||
for (j = fromX; j < toX; j++) \
|
dst = windowTiles + ((j / 8) * 32) + ((j % 8) / 2) + ((i / 8) * widthOffset) + ((i % 8) * 4);
|
||||||
{ \
|
bits = ((j & 1) * 4);
|
||||||
const u32 toOrr = r5 & 0xF; \
|
*dst = (toOrr << bits) | (*dst & (0xF0 >> bits));
|
||||||
if (toOrr) \
|
}
|
||||||
{ \
|
r5 >>= 4;
|
||||||
dst = windowTiles + ((j / 8) * 32) + ((j % 8) / 2) + ((i / 8) * widthOffset) + ((i % 8) * 4); \
|
}
|
||||||
bits = ((j & 1) * 4); \
|
|
||||||
*dst = (toOrr << bits) | (*dst & (0xF0 >> bits)); \
|
|
||||||
} \
|
|
||||||
r5 >>= 4; \
|
|
||||||
} \
|
|
||||||
} \
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CopyGlyphToWindow(struct TextPrinter *textPrinter)
|
void CopyGlyphToWindow(struct TextPrinter *textPrinter)
|
||||||
{
|
{
|
||||||
struct Window *win;
|
struct Window *win;
|
||||||
struct WindowTemplate *winTempl;
|
struct WindowTemplate *winTempl;
|
||||||
struct Struct_03002F90 *unkStruct;
|
u32 *unkStruct;
|
||||||
u32 currX, currY, widthOffset;
|
u32 currX, currY, widthOffset;
|
||||||
s32 r4, r0;
|
s32 r4, r0;
|
||||||
u8 *windowTiles;
|
u8 *windowTiles;
|
||||||
@ -503,17 +498,15 @@ void CopyGlyphToWindow(struct TextPrinter *textPrinter)
|
|||||||
win = &gWindows[textPrinter->printerTemplate.windowId];
|
win = &gWindows[textPrinter->printerTemplate.windowId];
|
||||||
winTempl = &win->window;
|
winTempl = &win->window;
|
||||||
|
|
||||||
r4 = (winTempl->width * 8) - textPrinter->printerTemplate.currentX;
|
if ((r4 = (winTempl->width * 8) - textPrinter->printerTemplate.currentX) > gUnknown_03002F90.width)
|
||||||
if (r4 > gUnknown_03002F90.width)
|
|
||||||
r4 = gUnknown_03002F90.width;
|
r4 = gUnknown_03002F90.width;
|
||||||
|
|
||||||
r0 = (winTempl->height * 8) - textPrinter->printerTemplate.currentY;
|
if ((r0 = (winTempl->height * 8) - textPrinter->printerTemplate.currentY) > gUnknown_03002F90.height)
|
||||||
if (r0 > gUnknown_03002F90.height)
|
|
||||||
r0 = gUnknown_03002F90.height;
|
r0 = gUnknown_03002F90.height;
|
||||||
|
|
||||||
currX = textPrinter->printerTemplate.currentX;
|
currX = textPrinter->printerTemplate.currentX;
|
||||||
currY = textPrinter->printerTemplate.currentY;
|
currY = textPrinter->printerTemplate.currentY;
|
||||||
unkStruct = &gUnknown_03002F90;
|
unkStruct = (u32 *)&gUnknown_03002F90.unk0;
|
||||||
windowTiles = win->tileData;
|
windowTiles = win->tileData;
|
||||||
widthOffset = winTempl->width * 32;
|
widthOffset = winTempl->width * 32;
|
||||||
|
|
||||||
@ -521,45 +514,31 @@ void CopyGlyphToWindow(struct TextPrinter *textPrinter)
|
|||||||
{
|
{
|
||||||
if (r0 < 9)
|
if (r0 < 9)
|
||||||
{
|
{
|
||||||
GLYPH_COPY(currY, currY + r0, currX, currX + r4, unkStruct->unk0);
|
GLYPH_COPY(windowTiles, widthOffset, currX, currY, unkStruct, r4, r0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
u32 temp;
|
GLYPH_COPY(windowTiles, widthOffset, currX, currY, unkStruct, r4, 8);
|
||||||
GLYPH_COPY(currY, currY + 8, currX, currX + r4, unkStruct->unk0);
|
GLYPH_COPY(windowTiles, widthOffset, currX, currY + 8, unkStruct + 16, r4, r0 - 8);
|
||||||
|
|
||||||
temp = currY + 8;
|
|
||||||
GLYPH_COPY(temp, (temp - 8) + r0, currX, currX + r4, unkStruct->unk40);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
u32 temp;
|
|
||||||
if (r0 < 9)
|
if (r0 < 9)
|
||||||
{
|
{
|
||||||
GLYPH_COPY(currY, currY + r0, currX, currX + 8, unkStruct->unk0);
|
GLYPH_COPY(windowTiles, widthOffset, currX, currY, unkStruct, 8, r0);
|
||||||
|
GLYPH_COPY(windowTiles, widthOffset, currX + 8, currY, unkStruct + 8, r4 - 8, r0);
|
||||||
temp = currX + 8;
|
|
||||||
GLYPH_COPY(currY, currY + r0, temp, (temp - 8) + r4, unkStruct->unk20);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
GLYPH_COPY(currY, currY + 8, currX, currX + 8, unkStruct->unk0);
|
GLYPH_COPY(windowTiles, widthOffset, currX, currY, unkStruct, 8, 8);
|
||||||
|
GLYPH_COPY(windowTiles, widthOffset, currX + 8, currY, unkStruct + 8, r4 - 8, 8);
|
||||||
temp = currX + 8;
|
GLYPH_COPY(windowTiles, widthOffset, currX, currY + 8, unkStruct + 16, 8, r0 - 8);
|
||||||
GLYPH_COPY(currY, currY + 8, temp, temp - 8 + r4, unkStruct->unk20);
|
GLYPH_COPY(windowTiles, widthOffset, currX + 8, currY + 8, unkStruct + 24, r4 - 8, r0 - 8);
|
||||||
|
|
||||||
temp = currY + 8;
|
|
||||||
GLYPH_COPY(temp, temp - 8 + r0, currX, currX + 8, unkStruct->unk40);
|
|
||||||
{
|
|
||||||
u32 tempX, tempY;
|
|
||||||
tempX = currX + 8;
|
|
||||||
tempY = currY + 8;
|
|
||||||
GLYPH_COPY(tempY, tempY - 8 + r0, tempX, tempX - 8 + r4, unkStruct->unk60);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClearTextSpan(struct TextPrinter *textPrinter, u32 width)
|
void ClearTextSpan(struct TextPrinter *textPrinter, u32 width)
|
||||||
{
|
{
|
||||||
struct Window *window;
|
struct Window *window;
|
||||||
@ -591,7 +570,7 @@ u16 Font0Func(struct TextPrinter *textPrinter)
|
|||||||
{
|
{
|
||||||
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
||||||
|
|
||||||
if (!subStruct->hasGlyphIdBeenSet)
|
if (subStruct->hasGlyphIdBeenSet == FALSE)
|
||||||
{
|
{
|
||||||
subStruct->glyphId = 0;
|
subStruct->glyphId = 0;
|
||||||
subStruct->hasGlyphIdBeenSet = TRUE;
|
subStruct->hasGlyphIdBeenSet = TRUE;
|
||||||
@ -603,7 +582,7 @@ u16 Font1Func(struct TextPrinter *textPrinter)
|
|||||||
{
|
{
|
||||||
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
||||||
|
|
||||||
if (!subStruct->hasGlyphIdBeenSet)
|
if (subStruct->hasGlyphIdBeenSet == FALSE)
|
||||||
{
|
{
|
||||||
subStruct->glyphId = 1;
|
subStruct->glyphId = 1;
|
||||||
subStruct->hasGlyphIdBeenSet = TRUE;
|
subStruct->hasGlyphIdBeenSet = TRUE;
|
||||||
@ -615,7 +594,7 @@ u16 Font2Func(struct TextPrinter *textPrinter)
|
|||||||
{
|
{
|
||||||
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
||||||
|
|
||||||
if (!subStruct->hasGlyphIdBeenSet)
|
if (subStruct->hasGlyphIdBeenSet == FALSE)
|
||||||
{
|
{
|
||||||
subStruct->glyphId = 2;
|
subStruct->glyphId = 2;
|
||||||
subStruct->hasGlyphIdBeenSet = TRUE;
|
subStruct->hasGlyphIdBeenSet = TRUE;
|
||||||
@ -627,7 +606,7 @@ u16 Font3Func(struct TextPrinter *textPrinter)
|
|||||||
{
|
{
|
||||||
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
||||||
|
|
||||||
if (!subStruct->hasGlyphIdBeenSet)
|
if (subStruct->hasGlyphIdBeenSet == FALSE)
|
||||||
{
|
{
|
||||||
subStruct->glyphId = 3;
|
subStruct->glyphId = 3;
|
||||||
subStruct->hasGlyphIdBeenSet = TRUE;
|
subStruct->hasGlyphIdBeenSet = TRUE;
|
||||||
@ -639,7 +618,7 @@ u16 Font4Func(struct TextPrinter *textPrinter)
|
|||||||
{
|
{
|
||||||
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
||||||
|
|
||||||
if (!subStruct->hasGlyphIdBeenSet)
|
if (subStruct->hasGlyphIdBeenSet == FALSE)
|
||||||
{
|
{
|
||||||
subStruct->glyphId = 4;
|
subStruct->glyphId = 4;
|
||||||
subStruct->hasGlyphIdBeenSet = TRUE;
|
subStruct->hasGlyphIdBeenSet = TRUE;
|
||||||
@ -651,7 +630,7 @@ u16 Font5Func(struct TextPrinter *textPrinter)
|
|||||||
{
|
{
|
||||||
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
||||||
|
|
||||||
if (!subStruct->hasGlyphIdBeenSet)
|
if (subStruct->hasGlyphIdBeenSet == FALSE)
|
||||||
{
|
{
|
||||||
subStruct->glyphId = 5;
|
subStruct->glyphId = 5;
|
||||||
subStruct->hasGlyphIdBeenSet = TRUE;
|
subStruct->hasGlyphIdBeenSet = TRUE;
|
||||||
@ -663,7 +642,7 @@ u16 Font7Func(struct TextPrinter *textPrinter)
|
|||||||
{
|
{
|
||||||
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
||||||
|
|
||||||
if (!subStruct->hasGlyphIdBeenSet)
|
if (subStruct->hasGlyphIdBeenSet == FALSE)
|
||||||
{
|
{
|
||||||
subStruct->glyphId = 7;
|
subStruct->glyphId = 7;
|
||||||
subStruct->hasGlyphIdBeenSet = TRUE;
|
subStruct->hasGlyphIdBeenSet = TRUE;
|
||||||
@ -675,7 +654,7 @@ u16 Font8Func(struct TextPrinter *textPrinter)
|
|||||||
{
|
{
|
||||||
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
||||||
|
|
||||||
if (!subStruct->hasGlyphIdBeenSet)
|
if (subStruct->hasGlyphIdBeenSet == FALSE)
|
||||||
{
|
{
|
||||||
subStruct->glyphId = 8;
|
subStruct->glyphId = 8;
|
||||||
subStruct->hasGlyphIdBeenSet = TRUE;
|
subStruct->hasGlyphIdBeenSet = TRUE;
|
||||||
@ -687,7 +666,7 @@ void TextPrinterInitDownArrowCounters(struct TextPrinter *textPrinter)
|
|||||||
{
|
{
|
||||||
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
||||||
|
|
||||||
if (gTextFlags.autoScroll == TRUE)
|
if (gTextFlags.autoScroll == 1)
|
||||||
{
|
{
|
||||||
subStruct->autoScrollDelay = 0;
|
subStruct->autoScrollDelay = 0;
|
||||||
}
|
}
|
||||||
@ -703,7 +682,7 @@ void TextPrinterDrawDownArrow(struct TextPrinter *textPrinter)
|
|||||||
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
struct TextPrinterSubStruct *subStruct = (struct TextPrinterSubStruct *)(&textPrinter->subStructFields);
|
||||||
const u8 *arrowTiles;
|
const u8 *arrowTiles;
|
||||||
|
|
||||||
if (!gTextFlags.autoScroll)
|
if (gTextFlags.autoScroll == 0)
|
||||||
{
|
{
|
||||||
if (subStruct->downArrowDelay != 0)
|
if (subStruct->downArrowDelay != 0)
|
||||||
{
|
{
|
||||||
@ -779,7 +758,7 @@ bool8 TextPrinterWaitAutoMode(struct TextPrinter *textPrinter)
|
|||||||
bool16 TextPrinterWaitWithDownArrow(struct TextPrinter *textPrinter)
|
bool16 TextPrinterWaitWithDownArrow(struct TextPrinter *textPrinter)
|
||||||
{
|
{
|
||||||
bool8 result = FALSE;
|
bool8 result = FALSE;
|
||||||
if (gTextFlags.autoScroll)
|
if (gTextFlags.autoScroll != 0)
|
||||||
{
|
{
|
||||||
result = TextPrinterWaitAutoMode(textPrinter);
|
result = TextPrinterWaitAutoMode(textPrinter);
|
||||||
}
|
}
|
||||||
@ -798,14 +777,17 @@ bool16 TextPrinterWaitWithDownArrow(struct TextPrinter *textPrinter)
|
|||||||
bool16 TextPrinterWait(struct TextPrinter *textPrinter)
|
bool16 TextPrinterWait(struct TextPrinter *textPrinter)
|
||||||
{
|
{
|
||||||
bool16 result = FALSE;
|
bool16 result = FALSE;
|
||||||
if (gTextFlags.autoScroll)
|
if (gTextFlags.autoScroll != 0)
|
||||||
{
|
{
|
||||||
result = TextPrinterWaitAutoMode(textPrinter);
|
result = TextPrinterWaitAutoMode(textPrinter);
|
||||||
}
|
}
|
||||||
else if (JOY_NEW(A_BUTTON | B_BUTTON))
|
else
|
||||||
{
|
{
|
||||||
result = TRUE;
|
if (JOY_NEW(A_BUTTON | B_BUTTON))
|
||||||
PlaySE(SE_SELECT);
|
{
|
||||||
|
result = TRUE;
|
||||||
|
PlaySE(SE_SELECT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -821,7 +803,7 @@ void DrawDownArrow(u8 windowId, u16 x, u16 y, u8 bgColor, bool8 drawArrow, u8 *c
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
FillWindowPixelRect(windowId, (bgColor << 4) | bgColor, x, y, 0x8, 0x10);
|
FillWindowPixelRect(windowId, (bgColor << 4) | bgColor, x, y, 0x8, 0x10);
|
||||||
if (!drawArrow)
|
if (drawArrow == 0)
|
||||||
{
|
{
|
||||||
switch (gTextFlags.useAlternateDownArrow)
|
switch (gTextFlags.useAlternateDownArrow)
|
||||||
{
|
{
|
||||||
@ -1013,10 +995,10 @@ u16 RenderText(struct TextPrinter *textPrinter)
|
|||||||
textPrinter->minLetterSpacing = *textPrinter->printerTemplate.currentChar++;
|
textPrinter->minLetterSpacing = *textPrinter->printerTemplate.currentChar++;
|
||||||
return 2;
|
return 2;
|
||||||
case EXT_CTRL_CODE_JPN:
|
case EXT_CTRL_CODE_JPN:
|
||||||
textPrinter->japanese = TRUE;
|
textPrinter->japanese = 1;
|
||||||
return 2;
|
return 2;
|
||||||
case EXT_CTRL_CODE_ENG:
|
case EXT_CTRL_CODE_ENG:
|
||||||
textPrinter->japanese = FALSE;
|
textPrinter->japanese = 0;
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1077,10 +1059,13 @@ u16 RenderText(struct TextPrinter *textPrinter)
|
|||||||
textPrinter->printerTemplate.currentX += width;
|
textPrinter->printerTemplate.currentX += width;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (textPrinter->japanese)
|
|
||||||
textPrinter->printerTemplate.currentX += (gUnknown_03002F90.width + textPrinter->printerTemplate.letterSpacing);
|
|
||||||
else
|
else
|
||||||
textPrinter->printerTemplate.currentX += gUnknown_03002F90.width;
|
{
|
||||||
|
if (textPrinter->japanese)
|
||||||
|
textPrinter->printerTemplate.currentX += (gUnknown_03002F90.width + textPrinter->printerTemplate.letterSpacing);
|
||||||
|
else
|
||||||
|
textPrinter->printerTemplate.currentX += gUnknown_03002F90.width;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
case 1:
|
case 1:
|
||||||
if (TextPrinterWait(textPrinter))
|
if (TextPrinterWait(textPrinter))
|
||||||
@ -1566,7 +1551,7 @@ void SetDefaultFontsPointer(void)
|
|||||||
|
|
||||||
u8 GetFontAttribute(u8 fontId, u8 attributeId)
|
u8 GetFontAttribute(u8 fontId, u8 attributeId)
|
||||||
{
|
{
|
||||||
u8 result = 0;
|
int result = 0;
|
||||||
switch (attributeId)
|
switch (attributeId)
|
||||||
{
|
{
|
||||||
case FONTATTR_MAX_LETTER_WIDTH:
|
case FONTATTR_MAX_LETTER_WIDTH:
|
||||||
@ -1581,8 +1566,8 @@ u8 GetFontAttribute(u8 fontId, u8 attributeId)
|
|||||||
case FONTATTR_LINE_SPACING:
|
case FONTATTR_LINE_SPACING:
|
||||||
result = gFontInfos[fontId].lineSpacing;
|
result = gFontInfos[fontId].lineSpacing;
|
||||||
break;
|
break;
|
||||||
case FONTATTR_STYLE:
|
case FONTATTR_UNKNOWN:
|
||||||
result = gFontInfos[fontId].style;
|
result = gFontInfos[fontId].unk;
|
||||||
break;
|
break;
|
||||||
case FONTATTR_COLOR_FOREGROUND:
|
case FONTATTR_COLOR_FOREGROUND:
|
||||||
result = gFontInfos[fontId].fgColor;
|
result = gFontInfos[fontId].fgColor;
|
||||||
@ -1612,7 +1597,7 @@ void DecompressGlyphFont0(u16 glyphId, bool32 isJapanese)
|
|||||||
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
||||||
DecompressGlyphTile(glyphs + 0x80, gUnknown_03002F90.unk40); // gUnknown_03002F90 + 0x40
|
DecompressGlyphTile(glyphs + 0x80, gUnknown_03002F90.unk40); // gUnknown_03002F90 + 0x40
|
||||||
gUnknown_03002F90.width = 8; // gGlyphWidth
|
gUnknown_03002F90.width = 8; // gGlyphWidth
|
||||||
gUnknown_03002F90.height = 12; // gGlyphHeight
|
gUnknown_03002F90.height = 12; // gGlyphHeight
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1655,7 +1640,7 @@ void DecompressGlyphFont7(u16 glyphId, bool32 isJapanese)
|
|||||||
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
||||||
DecompressGlyphTile(glyphs + 0x80, gUnknown_03002F90.unk40); // gUnknown_03002F90 + 0x40
|
DecompressGlyphTile(glyphs + 0x80, gUnknown_03002F90.unk40); // gUnknown_03002F90 + 0x40
|
||||||
gUnknown_03002F90.width = 8; // gGlyphWidth
|
gUnknown_03002F90.width = 8; // gGlyphWidth
|
||||||
gUnknown_03002F90.height = 15; // gGlyphHeight
|
gUnknown_03002F90.height = 15; // gGlyphHeight
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1697,7 +1682,7 @@ void DecompressGlyphFont8(u16 glyphId, bool32 isJapanese)
|
|||||||
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
||||||
DecompressGlyphTile(glyphs + 0x80, gUnknown_03002F90.unk40); // gUnknown_03002F90 + 0x40
|
DecompressGlyphTile(glyphs + 0x80, gUnknown_03002F90.unk40); // gUnknown_03002F90 + 0x40
|
||||||
gUnknown_03002F90.width = 8; // gGlyphWidth
|
gUnknown_03002F90.width = 8; // gGlyphWidth
|
||||||
gUnknown_03002F90.height = 12; // gGlyphHeight
|
gUnknown_03002F90.height = 12; // gGlyphHeight
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1737,10 +1722,10 @@ void DecompressGlyphFont2(u16 glyphId, bool32 isJapanese)
|
|||||||
{
|
{
|
||||||
glyphs = gFont2JapaneseGlyphs + (0x100 * (glyphId >> 0x3)) + (0x10 * (glyphId & 0x7));
|
glyphs = gFont2JapaneseGlyphs + (0x100 * (glyphId >> 0x3)) + (0x10 * (glyphId & 0x7));
|
||||||
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
||||||
DecompressGlyphTile(glyphs + 0x8, gUnknown_03002F90.unk20);
|
DecompressGlyphTile(glyphs + 0x8, gUnknown_03002F90.unk20); // gUnknown_03002F90 + 0x40
|
||||||
DecompressGlyphTile(glyphs + 0x80, gUnknown_03002F90.unk40);
|
DecompressGlyphTile(glyphs + 0x80, gUnknown_03002F90.unk40); // gUnknown_03002F90 + 0x20
|
||||||
DecompressGlyphTile(glyphs + 0x88, gUnknown_03002F90.unk60);
|
DecompressGlyphTile(glyphs + 0x88, gUnknown_03002F90.unk60); // gUnknown_03002F90 + 0x60
|
||||||
gUnknown_03002F90.width = gFont2JapaneseGlyphWidths[glyphId]; // gGlyphWidth
|
gUnknown_03002F90.width = gFont2JapaneseGlyphWidths[glyphId]; // gGlyphWidth
|
||||||
gUnknown_03002F90.height = 14; // gGlyphHeight
|
gUnknown_03002F90.height = 14; // gGlyphHeight
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1784,7 +1769,7 @@ void DecompressGlyphFont1(u16 glyphId, bool32 isJapanese)
|
|||||||
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
DecompressGlyphTile(glyphs, gUnknown_03002F90.unk0);
|
||||||
DecompressGlyphTile(glyphs + 0x80, gUnknown_03002F90.unk40); // gUnknown_03002F90 + 0x40
|
DecompressGlyphTile(glyphs + 0x80, gUnknown_03002F90.unk40); // gUnknown_03002F90 + 0x40
|
||||||
gUnknown_03002F90.width = 8; // gGlyphWidth
|
gUnknown_03002F90.width = 8; // gGlyphWidth
|
||||||
gUnknown_03002F90.height = 15; // gGlyphHeight
|
gUnknown_03002F90.height = 15; // gGlyphHeight
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
17
gflib/text.h
@ -269,20 +269,13 @@
|
|||||||
|
|
||||||
#define TEXT_SPEED_FF 0xFF
|
#define TEXT_SPEED_FF 0xFF
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
COLOR_FOREGROUND,
|
|
||||||
COLOR_SHADOW,
|
|
||||||
COLOR_BACKGROUND
|
|
||||||
};
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
FONTATTR_MAX_LETTER_WIDTH,
|
FONTATTR_MAX_LETTER_WIDTH,
|
||||||
FONTATTR_MAX_LETTER_HEIGHT,
|
FONTATTR_MAX_LETTER_HEIGHT,
|
||||||
FONTATTR_LETTER_SPACING,
|
FONTATTR_LETTER_SPACING,
|
||||||
FONTATTR_LINE_SPACING,
|
FONTATTR_LINE_SPACING,
|
||||||
FONTATTR_STYLE,
|
FONTATTR_UNKNOWN, // dunno what this is yet
|
||||||
FONTATTR_COLOR_FOREGROUND,
|
FONTATTR_COLOR_FOREGROUND,
|
||||||
FONTATTR_COLOR_BACKGROUND,
|
FONTATTR_COLOR_BACKGROUND,
|
||||||
FONTATTR_COLOR_SHADOW
|
FONTATTR_COLOR_SHADOW
|
||||||
@ -310,7 +303,7 @@ struct TextPrinterTemplate
|
|||||||
u8 currentY;
|
u8 currentY;
|
||||||
u8 letterSpacing;
|
u8 letterSpacing;
|
||||||
u8 lineSpacing;
|
u8 lineSpacing;
|
||||||
u8 style:4; // 0xC
|
u8 unk:4; // 0xC
|
||||||
u8 fgColor:4;
|
u8 fgColor:4;
|
||||||
u8 bgColor:4;
|
u8 bgColor:4;
|
||||||
u8 shadowColor:4;
|
u8 shadowColor:4;
|
||||||
@ -329,7 +322,7 @@ struct TextPrinter
|
|||||||
u8 delayCounter;
|
u8 delayCounter;
|
||||||
u8 scrollDistance;
|
u8 scrollDistance;
|
||||||
u8 minLetterSpacing; // 0x20
|
u8 minLetterSpacing; // 0x20
|
||||||
bool8 japanese;
|
u8 japanese;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct FontInfo
|
struct FontInfo
|
||||||
@ -339,7 +332,7 @@ struct FontInfo
|
|||||||
u8 maxLetterHeight;
|
u8 maxLetterHeight;
|
||||||
u8 letterSpacing;
|
u8 letterSpacing;
|
||||||
u8 lineSpacing;
|
u8 lineSpacing;
|
||||||
u8 style:4; //unused
|
u8 unk:4;
|
||||||
u8 fgColor:4;
|
u8 fgColor:4;
|
||||||
u8 bgColor:4;
|
u8 bgColor:4;
|
||||||
u8 shadowColor:4;
|
u8 shadowColor:4;
|
||||||
@ -379,7 +372,7 @@ struct Struct_03002F90
|
|||||||
|
|
||||||
extern TextFlags gTextFlags;
|
extern TextFlags gTextFlags;
|
||||||
|
|
||||||
extern bool8 gUnknown_03002F84;
|
extern u8 gUnknown_03002F84;
|
||||||
extern struct Struct_03002F90 gUnknown_03002F90;
|
extern struct Struct_03002F90 gUnknown_03002F90;
|
||||||
|
|
||||||
void SetFontsPointer(const struct FontInfo *fonts);
|
void SetFontsPointer(const struct FontInfo *fonts);
|
||||||
|
|||||||
@ -30,18 +30,21 @@ static void nullsub_8(void)
|
|||||||
|
|
||||||
bool16 InitWindows(const struct WindowTemplate *templates)
|
bool16 InitWindows(const struct WindowTemplate *templates)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i;
|
||||||
u8* allocatedTilemapBuffer;
|
void *bgTilemapBuffer;
|
||||||
u16 attrib;
|
int j;
|
||||||
int allocatedBaseBlock;
|
|
||||||
u8 bgLayer;
|
u8 bgLayer;
|
||||||
|
u16 attrib;
|
||||||
|
u8* allocatedTilemapBuffer;
|
||||||
|
int allocatedBaseBlock;
|
||||||
|
|
||||||
for (i = 0; i < 0x4; ++i)
|
for (i = 0; i < 0x4; ++i)
|
||||||
{
|
{
|
||||||
if (GetBgTilemapBuffer(i) != NULL)
|
bgTilemapBuffer = GetBgTilemapBuffer(i);
|
||||||
|
if (bgTilemapBuffer != NULL)
|
||||||
gUnknown_03002F70[i] = nullsub_8;
|
gUnknown_03002F70[i] = nullsub_8;
|
||||||
else
|
else
|
||||||
gUnknown_03002F70[i] = NULL;
|
gUnknown_03002F70[i] = bgTilemapBuffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < 0x20; ++i)
|
for (i = 0; i < 0x20; ++i)
|
||||||
@ -564,19 +567,19 @@ u32 GetWindowAttribute(u8 windowId, u8 attributeId)
|
|||||||
switch (attributeId)
|
switch (attributeId)
|
||||||
{
|
{
|
||||||
case WINDOW_BG:
|
case WINDOW_BG:
|
||||||
return (u32)gWindows[windowId].window.bg;
|
return gWindows[windowId].window.bg;
|
||||||
case WINDOW_TILEMAP_LEFT:
|
case WINDOW_TILEMAP_LEFT:
|
||||||
return (u32)gWindows[windowId].window.tilemapLeft;
|
return gWindows[windowId].window.tilemapLeft;
|
||||||
case WINDOW_TILEMAP_TOP:
|
case WINDOW_TILEMAP_TOP:
|
||||||
return (u32)gWindows[windowId].window.tilemapTop;
|
return gWindows[windowId].window.tilemapTop;
|
||||||
case WINDOW_WIDTH:
|
case WINDOW_WIDTH:
|
||||||
return (u32)gWindows[windowId].window.width;
|
return gWindows[windowId].window.width;
|
||||||
case WINDOW_HEIGHT:
|
case WINDOW_HEIGHT:
|
||||||
return (u32)gWindows[windowId].window.height;
|
return gWindows[windowId].window.height;
|
||||||
case WINDOW_PALETTE_NUM:
|
case WINDOW_PALETTE_NUM:
|
||||||
return (u32)gWindows[windowId].window.paletteNum;
|
return gWindows[windowId].window.paletteNum;
|
||||||
case WINDOW_BASE_BLOCK:
|
case WINDOW_BASE_BLOCK:
|
||||||
return (u32)gWindows[windowId].window.baseBlock;
|
return gWindows[windowId].window.baseBlock;
|
||||||
case WINDOW_TILE_DATA:
|
case WINDOW_TILE_DATA:
|
||||||
return (u32)(gWindows[windowId].tileData);
|
return (u32)(gWindows[windowId].tileData);
|
||||||
default:
|
default:
|
||||||
@ -640,9 +643,12 @@ u16 AddWindow8Bit(const struct WindowTemplate *template)
|
|||||||
}
|
}
|
||||||
return 0xFF;
|
return 0xFF;
|
||||||
}
|
}
|
||||||
gWindows[windowId].tileData = memAddress;
|
else
|
||||||
gWindows[windowId].window = *template;
|
{
|
||||||
return windowId;
|
gWindows[windowId].tileData = memAddress;
|
||||||
|
gWindows[windowId].window = *template;
|
||||||
|
return windowId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FillWindowPixelBuffer8Bit(u8 windowId, u8 fillValue)
|
void FillWindowPixelBuffer8Bit(u8 windowId, u8 fillValue)
|
||||||
|
|||||||
BIN
graphics/battle_anims/sprites/substitute_back.png
Normal file
|
After Width: | Height: | Size: 405 B |
BIN
graphics/battle_frontier/factory_screen/action_box_left.png
Normal file
|
After Width: | Height: | Size: 156 B |
BIN
graphics/battle_frontier/factory_screen/action_box_right.png
Normal file
|
After Width: | Height: | Size: 134 B |
|
After Width: | Height: | Size: 165 B |
|
After Width: | Height: | Size: 139 B |
|
After Width: | Height: | Size: 139 B |
BIN
graphics/battle_frontier/factory_screen/arrow.png
Normal file
|
After Width: | Height: | Size: 167 B |
BIN
graphics/battle_frontier/factory_screen/menu_highlight_left.png
Normal file
|
After Width: | Height: | Size: 135 B |
BIN
graphics/battle_frontier/factory_screen/menu_highlight_right.png
Normal file
|
After Width: | Height: | Size: 132 B |
BIN
graphics/battle_frontier/factory_screen/mon_pic_bg.png
Normal file
|
After Width: | Height: | Size: 138 B |
BIN
graphics/battle_frontier/factory_screen/mon_pic_bg_anim.png
Normal file
|
After Width: | Height: | Size: 158 B |
BIN
graphics/battle_frontier/factory_screen/pokeball.png
Normal file
|
After Width: | Height: | Size: 263 B |
|
Before Width: | Height: | Size: 141 B After Width: | Height: | Size: 141 B |
|
Before Width: | Height: | Size: 596 B After Width: | Height: | Size: 596 B |
|
Before Width: | Height: | Size: 681 B After Width: | Height: | Size: 681 B |
|
Before Width: | Height: | Size: 627 B After Width: | Height: | Size: 627 B |