build revision 1 and 2

This commit is contained in:
YamaArashi
2016-09-10 22:40:33 -07:00
parent e090eef838
commit 0f2e0c96a7
21 changed files with 358 additions and 20 deletions

View File

@@ -25,6 +25,8 @@ SCANINC := tools/scaninc/scaninc
PREPROC := tools/preproc/preproc
REVISION := 0
# Clear the default suffixes.
.SUFFIXES:
@@ -33,7 +35,9 @@ PREPROC := tools/preproc/preproc
.PRECIOUS: %.1bpp %.4bpp %.8bpp %.gbapal %.lz %.rl %.pcm %.bin
.PHONY: all clean compare ruby sapphire
.PHONY: all clean tidy compare ruby sapphire \
rev1 ruby_rev1 sapphire_rev1 compare_rev1 \
rev2 ruby_rev2 sapphire_rev2 compare_rev2
C_SRCS := $(wildcard src/*.c)
C_OBJS := $(C_SRCS:%.c=%.o)
@@ -64,10 +68,41 @@ ruby: pokeruby.gba
sapphire: pokesapphire.gba
@:
rev1: REVISION := 1
rev1: all
@:
ruby_rev1: REVISION := 1
ruby_rev1: ruby
@:
sapphire_rev1: REVISION := 1
sapphire_rev1: sapphire
@:
rev2: REVISION := 2
rev2: all
@:
ruby_rev2: REVISION := 2
ruby_rev2: ruby
@:
sapphire_rev2: REVISION := 2
sapphire_rev2: sapphire
@:
# For contributors to make sure a change didn't affect the contents of the ROM.
compare: all
@$(SHA1) rom.sha1
compare_rev1: rev1
@$(SHA1) rom_rev1.sha1
compare_rev2: rev2
@$(SHA1) rom_rev2.sha1
clean:
rm -f $(ROM) $(ELF) $(OBJS) $(pokeruby_OBJS) $(pokesapphire_OBJS) $(C_SRCS:%.c=%.i) pokeruby.map pokesapphire.map
rm -f sound/programmable_wave_samples/*.bin sound/direct_sound_samples/*.bin sound/**/*.pcm
@@ -112,12 +147,12 @@ src/text_ruby.o src/text_sapphire.o: src/text.c $(GEN_FONT_HEADERS)
src/link_ruby.o src/link_sapphire.o: src/link.c $(GEN_LINK_HEADERS)
src/%_ruby.o: src/%.c
@$(CPP) $(CPPFLAGS) -D RUBY $< -o src/$*_ruby.i
@$(CPP) $(CPPFLAGS) -D RUBY -D REVISION=$(REVISION) $< -o src/$*_ruby.i
@$(PREPROC) src/$*_ruby.i charmap.txt | $(CC1) $(CFLAGS) -o src/$*_ruby.s
@printf ".text\n\t.align\t2, 0\n" >> src/$*_ruby.s
$(AS) $(ASFLAGS) -o $@ src/$*_ruby.s
src/%_sapphire.o: src/%.c
@$(CPP) $(CPPFLAGS) -D SAPPHIRE $< -o src/$*_sapphire.i
@$(CPP) $(CPPFLAGS) -D SAPPHIRE -D REVISION=$(REVISION) $< -o src/$*_sapphire.i
@$(PREPROC) src/$*_sapphire.i charmap.txt | $(CC1) $(CFLAGS) -o src/$*_sapphire.s
@printf ".text\n\t.align\t2, 0\n" >> src/$*_sapphire.s
$(AS) $(ASFLAGS) -o $@ src/$*_sapphire.s
@@ -126,17 +161,17 @@ asm/%_ruby.o: dep = $(shell $(SCANINC) asm/$*.s)
asm/%_sapphire.o: dep = $(shell $(SCANINC) asm/$*.s)
asm/%_ruby.o: asm/%.s $$(dep)
$(AS) $(ASFLAGS) --defsym RUBY=1 -o $@ $<
$(AS) $(ASFLAGS) --defsym RUBY=1 --defsym REVISION=$(REVISION) -o $@ $<
asm/%_sapphire.o: asm/%.s $$(dep)
$(AS) $(ASFLAGS) --defsym SAPPHIRE=1 -o $@ $<
$(AS) $(ASFLAGS) --defsym SAPPHIRE=1 --defsym REVISION=$(REVISION) -o $@ $<
data/%_ruby.o: dep = $(shell $(SCANINC) data/$*.s)
data/%_sapphire.o: dep = $(shell $(SCANINC) data/$*.s)
data/%_ruby.o: data/%.s $$(dep)
$(PREPROC) $< charmap.txt | $(AS) $(ASFLAGS) --defsym RUBY=1 -o $@
$(PREPROC) $< charmap.txt | $(AS) $(ASFLAGS) --defsym RUBY=1 --defsym REVISION=$(REVISION) -o $@
data/%_sapphire.o: data/%.s $$(dep)
$(PREPROC) $< charmap.txt | $(AS) $(ASFLAGS) --defsym SAPPHIRE=1 -o $@
$(PREPROC) $< charmap.txt | $(AS) $(ASFLAGS) --defsym SAPPHIRE=1 --defsym REVISION=$(REVISION) -o $@
$(SONG_OBJS): %.o: %.s
$(AS) $(ASFLAGS) -I sound -o $@ $<

View File

@@ -198128,15 +198128,15 @@ sub_80DB564: @ 80DB564
strh r1, [r0, 0x3A]
movs r1, 0x40
strh r1, [r0, 0x3C]
ldr r1, sub_80DB574
ldr r1, _080DB574
str r1, [r0, 0x1C]
bx lr
.align 2, 0
_080DB574: .4byte sub_80DB578
thumb_func_end sub_80DB564
thumb_func_start sub_80DB574
sub_80DB574: @ 80DB574
push {r0,r3-r6,lr}
lsrs r5, r1, 32
thumb_func_start sub_80DB578
sub_80DB578: @ 80DB578
push {lr}
adds r3, r0, 0
movs r0, 0x2E
@@ -198192,7 +198192,7 @@ _080DB5D8:
_080DB5DE:
pop {r0}
bx r0
thumb_func_end sub_80DB574
thumb_func_end sub_80DB578
thumb_func_start sub_80DB5E4
sub_80DB5E4: @ 80DB5E4
@@ -418750,19 +418750,38 @@ _08146E6C:
bl SetUpWindowConfig
ldr r0, _08146FF8
bl InitMenuWindow
.if REVISION >= 1
movs r0, 0xD
movs r1, 0x6
movs r2, 0x10
movs r3, 0x9
.else
movs r0, 0xD
movs r1, 0x8
movs r2, 0x10
movs r3, 0xB
.endif
bl MenuDrawTextWindow
.if REVISION >= 1
movs r0, 0x1
movs r1, 0xA
movs r2, 0x1C
movs r3, 0x13
.else
movs r0, 0x1
movs r1, 0xC
movs r2, 0x1C
movs r3, 0x13
.endif
bl MenuDrawTextWindow
ldr r0, _08146FFC
.if REVISION >= 1
movs r1, 0x2
movs r2, 0xB
.else
movs r1, 0x2
movs r2, 0xD
.endif
bl MenuPrint
movs r0, 0x1
negs r0, r0
@@ -418874,14 +418893,26 @@ _0814705C:
lsls r0, 24
cmp r0, 0
bne _0814710C
.if REVISION >= 1
movs r0, 0x1
movs r1, 0xA
movs r2, 0x1C
movs r3, 0x13
.else
movs r0, 0x1
movs r1, 0xC
movs r2, 0x1C
movs r3, 0x13
.endif
bl MenuDrawTextWindow
ldr r0, _081470D0
.if REVISION >= 1
movs r1, 0x2
movs r2, 0xB
.else
movs r1, 0x2
movs r2, 0xD
.endif
bl MenuPrint
ldr r0, _081470D4
ldrb r0, [r0]
@@ -418890,8 +418921,13 @@ _0814705C:
cmp r0, 0
beq _08147096
ldr r0, _081470D8
.if REVISION >= 1
movs r1, 0x2
movs r2, 0xB
.else
movs r1, 0x2
movs r2, 0xD
.endif
bl MenuPrint
_08147096:
adds r0, r4, 0x1
@@ -418905,14 +418941,26 @@ _08147096:
_081470A6:
cmp r4, 0x3
bne _081470E4
.if REVISION >= 1
movs r0, 0x1
movs r1, 0xA
movs r2, 0x1C
movs r3, 0x13
.else
movs r0, 0x1
movs r1, 0xC
movs r2, 0x1C
movs r3, 0x13
.endif
bl MenuDrawTextWindow
ldr r0, _081470DC
.if REVISION >= 1
movs r1, 0x2
movs r2, 0xB
.else
movs r1, 0x2
movs r2, 0xD
.endif
bl MenuPrint
ldr r0, _081470E0
bl SetMainCallback2
@@ -418926,32 +418974,56 @@ _081470D8: .4byte gUnknown_084115F9
_081470DC: .4byte gUnknown_0841164E
_081470E0: .4byte sub_81471A4
_081470E4:
.if REVISION >= 1
movs r0, 0x1
movs r1, 0xA
movs r2, 0x1C
movs r3, 0x13
.else
movs r0, 0x1
movs r1, 0xC
movs r2, 0x1C
movs r3, 0x13
.endif
bl MenuDrawTextWindow
ldr r0, _08147104
ldr r0, [r0]
cmp r0, 0
bne _08147134
ldr r0, _08147108
.if REVISION >= 1
movs r1, 0x2
movs r2, 0xB
.else
movs r1, 0x2
movs r2, 0xD
.endif
bl MenuPrint
b _0814713E
.align 2, 0
_08147104: .4byte 0x03005ebc
_08147108: .4byte gUnknown_08411747
_0814710C:
.if REVISION >= 1
movs r0, 0x1
movs r1, 0xA
movs r2, 0x1C
movs r3, 0x13
.else
movs r0, 0x1
movs r1, 0xC
movs r2, 0x1C
movs r3, 0x13
.endif
bl MenuDrawTextWindow
ldr r0, _0814712C
.if REVISION >= 1
movs r1, 0x2
movs r2, 0xB
.else
movs r1, 0x2
movs r2, 0xD
.endif
bl MenuPrint
ldr r0, _08147130
bl SetMainCallback2
@@ -418961,8 +419033,13 @@ _0814712C: .4byte gUnknown_0841164E
_08147130: .4byte sub_8147154
_08147134:
ldr r0, _0814714C
.if REVISION >= 1
movs r1, 0x2
movs r2, 0xB
.else
movs r1, 0x2
movs r2, 0xD
.endif
bl MenuPrint
_0814713E:
ldr r0, _08147150
@@ -418988,14 +419065,26 @@ sub_8147154: @ 8147154
ands r0, r1
cmp r0, 0
beq _0814718A
.if REVISION >= 1
movs r0, 0x1
movs r1, 0xA
movs r2, 0x1C
movs r3, 0x13
.else
movs r0, 0x1
movs r1, 0xC
movs r2, 0x1C
movs r3, 0x13
.endif
bl MenuDrawTextWindow
ldr r0, _08147198
.if REVISION >= 1
movs r1, 0x2
movs r2, 0xB
.else
movs r1, 0x2
movs r2, 0xD
.endif
bl MenuPrint
ldr r0, _0814719C
bl SetVBlankCallback
@@ -419094,7 +419183,11 @@ sub_8147218: @ 8147218
strh r0, [r2, 0x3E]
mov r1, r12
adds r1, 0x3C
.if REVISION >= 1
movs r0, 0x38
.else
movs r0, 0x48
.endif
strb r0, [r1]
ldr r0, _0814729C
ldrh r0, [r0]

View File

@@ -4411,6 +4411,62 @@ _0803FB56:
bx r0
thumb_func_end DrawSpindaSpots
.if REVISION >= 1
thumb_func_start sub_803FB68
sub_803FB68: @ 803FB68
push {r4-r7,lr}
mov r7, r9
mov r6, r8
push {r6,r7}
sub sp, 0x4
adds r5, r0, 0
lsls r1, 16
lsrs r7, r1, 16
lsls r2, 16
lsrs r2, 16
mov r8, r2
ldr r0, =0x20231CC
mov r9, r0
adds r0, r5, 0
movs r1, 0x2
mov r2, r9
bl GetMonData
mov r4, sp
adds r0, r5, 0
movs r1, 0x3
mov r2, sp
bl GetMonData
strb r0, [r4, 0x0]
lsls r0, 24
lsrs r0, 24
cmp r0, 0x2
bne _0803FBC4
movs r6, 0xB
adds r0, r7, 0
muls r0, r6
ldr r4, =gSpeciesNames
adds r0, r4
mov r1, r9
bl StringCompareWithoutExtCtrlCodes
cmp r0, 0
bne _0803FBC4
mov r2, r8
muls r2, r6
adds r2, r4
adds r0, r5, 0
movs r1, 0x2
bl SetMonData
_0803FBC4:
add sp, 0x4
pop {r3,r4}
mov r8, r3
mov r9, r4
pop {r4-r7}
pop {r0}
bx r0
.pool
thumb_func_end sub_803FB68
.else
thumb_func_start sub_803FB68
sub_803FB68: @ 803FB68
push {r4-r7,lr}
@@ -4452,6 +4508,7 @@ _0803FBA8:
_0803FBB4: .4byte 0x020231cc
_0803FBB8: .4byte gSpeciesNames
thumb_func_end sub_803FB68
.endif
thumb_func_start sub_803FBBC
sub_803FBBC: @ 803FBBC

View File

@@ -51,13 +51,13 @@ RomHeaderReserved1:
.space 7
RomHeaderSoftwareVersion:
.byte 0
.byte REVISION
RomHeaderChecksum:
.ifdef SAPPHIRE
.byte 0x55
.byte 0x55 - REVISION
.else
.byte 0x41
.byte 0x41 - REVISION
.endif
RomHeaderReserved2:

View File

@@ -28796,7 +28796,11 @@ OtherText_WontHaveAnyEffect:
gUnknown_0840EFA1:: @ 840EFA1
OtherText_CantUseItemOnPoke:
.if REVISION >= 1
.string "This cant be used on\nthat POKéMON.{PAUSE_UNTIL_PRESS}$"
.else
.string "This item cant be used on\nthat POKéMON.{PAUSE_UNTIL_PRESS}$"
.endif
gUnknown_0840EFCC:: @ 840EFCC
OtherText_CantBeSwitched:

View File

@@ -363,7 +363,11 @@ DecorDesc_MARILL_DOLL: @ 83EACF2
.string "or a desk.$"
DecorDesc_TOGEPI_DOLL: @ 83EAD1E
.if REVISION >= 1
.string "A TOGEPI doll.\n"
.else
.string "A TOPGEPI doll.\n"
.endif
.string "Place it on a mat\n"
.string "or a desk.$"

View File

@@ -4953,8 +4953,10 @@ Text_1C6C62: @ 81C6C62
.string " \n"
.string "  $"
@ 81C6C83
.string " $"
@ 81C6C84
@ object file boundary?
.align 2
.string "$"
.include "data/text/save.s"
.include "data/text/intro.s"

View File

@@ -4560,11 +4560,19 @@ gDecoration10000_Gfx:: @ 8EA2A44
.align 2
gFont3LatinGlyphs:: @ 8EA2C44
.if REVISION >= 1
.incbin "graphics/fonts/font3_lat_rev1.4bpp"
.else
.incbin "graphics/fonts/font3_lat.4bpp"
.endif
.align 2
gFont4LatinGlyphs:: @ 8EA6BC4
.if REVISION >= 1
.incbin "graphics/fonts/font4_lat_rev1.4bpp"
.else
.incbin "graphics/fonts/font4_lat.4bpp"
.endif
.align 2
gFont3JapaneseGlyphs:: @ 8EA8744

View File

@@ -320,16 +320,34 @@ DexDescription_Vileplume_2:
.endif
.ifdef SAPPHIRE
.if REVISION >= 1
DexDescription_Paras_1:
.string "PARAS has parasitic mushrooms growing\non its back called tochukaso. They grow\nlarge by drawing nutrients from this$"
DexDescription_Paras_2:
.string "BUG/GRASS POKéMON host. They are\nhighly valued as a medicine for\nextending life.$"
.else
DexDescription_Paras_1:
.string "PARAS has parasitic mushrooms growing\non its back called tochukaso. They grow\nlarge by drawing nutrients from this$"
DexDescription_Paras_2:
.string "BUG POKéMON host. They are highly\nvalued as a medicine for extending life.$"
.endif @ REVISION >= 1
.else
.if REVISION >= 1
DexDescription_Paras_1:
.string "PARAS has parasitic mushrooms growing\non its back called tochukaso. They grow\nlarge by drawing nutrients from this$"
DexDescription_Paras_2:
.string "BUG/GRASS POKéMON host. They are\nhighly valued as a medicine for\nextending life.$"
.else
DexDescription_Paras_1:
.string "PARAS has parasitic mushrooms growing\non its back called tochukaso. They grow\nlarge by drawing nutrients from the BUG$"
DexDescription_Paras_2:
.string "POKéMON host. They are highly valued as\na medicine for extending life.$"
.endif
.endif @ REVISION >= 1
.endif @ SAPPHIRE
DexDescription_Parasect_1:
.string "PARASECT is known to infest large trees\nen masse and drain nutrients from the\nlower trunk and roots.$"
@@ -2347,16 +2365,27 @@ DexDescription_Sableye_2:
.endif
.ifdef SAPPHIRE
DexDescription_Mawile_1:
.string "Dont be taken in by this POKéMONs\ncute face - its very dangerous. MAWILE\nfools the foe into letting down its$"
DexDescription_Mawile_2:
.string "guard, then chomps down with its\nmassive jaws. The steel jaws are really\nhorns that have been transformed.$"
.else
.if REVISION >= 1
DexDescription_Mawile_1:
.string "MAWILEs huge jaws are actually steel\nhorns that have been transformed.\nIts docile-looking face serves to lull$"
DexDescription_Mawile_2:
.string "its foe into letting down its guard.\nWhen the foe least expects it, MAWILE\nchomps it with its gaping jaws.$"
.else
DexDescription_Mawile_1:
.string "MAWHILEs huge jaws are actually steel\nhorns that have been transformed.\nIts docile-looking face serves to lull$"
DexDescription_Mawile_2:
.string "its foe into letting down its guard.\nWhen the foe least expects it, MAWHILE\nchomps it with its gaping jaws.$"
.endif
.endif @ REVISION >= 1
.endif @ SAPPHIRE
.ifdef SAPPHIRE
DexDescription_Aron_1:

View File

@@ -13,7 +13,11 @@ OldaleTown_PokemonCenter_2F_Text_1A457E:: @ 81A457E
OldaleTown_PokemonCenter_2F_Text_1A45FE:: @ 81A45FE
.string "Welcome to the POKéMON CABLE CLUB\n"
.if REVISION >= 1
.string "RECORD CORNER.\p"
.else
.string "RECORD CENTER.\p"
.endif
.string "You may mix your records as a TRAINER\n"
.string "with the records of your friends.\p"
.string "Would you like to mix records?$"

View File

@@ -906,7 +906,11 @@ UnknownString_81AB381:: @ 81AB381
.string "Hello!\p"
.string "Its time for TODAYS SMART SHOPPER.\p"
.string "INTERVIEWER: How are you, viewers?\p"
.if REVISION >= 1
.string "Today were visiting a shop\n"
.else
.string "Today were visiting the POKéMON MART\n"
.endif
.string "in {STR_VAR_2}.\p"
.string "Lets check on what the hot sellers\n"
.string "have been recently.$"

View File

@@ -21,8 +21,14 @@ graphics/fonts/font1_lat.1bpp: graphics/fonts/font1_lat.png
graphics/fonts/font3_lat.4bpp: graphics/fonts/font3_lat.png
$(RSFONT) $< $@ 254 1
graphics/fonts/font3_lat_rev1.4bpp: graphics/fonts/font3_lat_rev1.png
$(RSFONT) $< $@ 254 1
graphics/fonts/font4_lat.4bpp: graphics/fonts/font4_lat.png
$(RSFONT) $< $@ 220 0
graphics/fonts/font4_lat_rev1.4bpp: graphics/fonts/font4_lat_rev1.png
$(RSFONT) $< $@ 220 0
graphics/fonts/font6_braille.1bpp: graphics/fonts/font6_braille.png
$(RSFONT) $< $@ 192 0

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -1,3 +1,24 @@
#if REVISION >= 1
static const u8 sFont0Widths[] =
{
3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, 4, 8,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 8,
8, 8, 8, 8, 8, 8, 3, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
7, 6, 4, 8, 8, 8, 7, 8, 8, 4, 6, 6, 4, 4, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 6, 7, 8, 7, 7, 8, 8, 4,
7, 8, 8, 8, 8, 8, 7, 8, 7, 7, 7, 7, 7, 7, 8, 7,
7, 7, 7, 7, 5, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 6, 3, 5, 3,
6, 6, 6, 3, 3, 6, 6, 6, 3, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 5, 6,
3, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7,
3, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 1, 1,
};
#else
static const u8 sFont0Widths[] =
{
3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6,
@@ -17,3 +38,4 @@ static const u8 sFont0Widths[] =
3, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7,
3, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 1, 1,
};
#endif

View File

@@ -1,3 +1,22 @@
#if REVISION >= 1
static const u8 sFont1Widths[] =
{
5, 3, 8, 8, 8, 8, 8, 8, 8, 4, 5, 4, 4, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 5, 8, 8, 8, 8, 8, 4, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 5, 5, 5,
6, 5, 5, 5, 5, 5, 5, 5, 5, 4, 8, 4, 4, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 8, 4, 5, 5, 5, 5, 4, 8,
4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 8, 5, 6, 6,
8, 7, 3, 5, 3, 3, 5, 4, 3, 6, 6, 6, 7, 7, 8, 5,
5, 5, 3, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 4, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5,
5, 5, 4, 4, 5, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 6, 6, 7, 7, 7, 7, 6, 7, 6, 6, 7, 6,
7, 7, 7, 6, 7, 6, 7, 6, 7, 6, 6, 7, 6, 6, 3, 3,
5, 5, 5, 5, 3, 3, 5, 5, 5, 5, 5, 5,
};
#else
static const u8 sFont1Widths[] =
{
5, 3, 8, 8, 8, 8, 8, 8, 8, 4, 5, 4, 4, 8, 8, 8,
@@ -15,3 +34,4 @@ static const u8 sFont1Widths[] =
7, 7, 7, 6, 7, 6, 7, 6, 7, 6, 6, 7, 6, 6, 3, 3,
5, 5, 5, 5, 3, 3, 5, 5, 5, 5, 5, 5,
};
#endif

View File

@@ -1,3 +1,24 @@
#if REVISION >= 1
static const u8 sFont3Widths[] =
{
3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6, 4, 8,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 8,
8, 8, 8, 8, 8, 8, 3, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
7, 6, 4, 8, 8, 8, 7, 8, 8, 4, 6, 6, 4, 4, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 6, 7, 8, 7, 7, 8, 8, 4,
7, 8, 8, 8, 8, 8, 7, 8, 7, 7, 7, 7, 7, 7, 8, 7,
7, 7, 7, 7, 5, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 3, 6, 3, 5, 3,
6, 6, 6, 3, 3, 6, 6, 6, 3, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 5, 6,
3, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7,
3, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 1, 1,
};
#else
static const u8 sFont3Widths[] =
{
3, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 6, 6, 6, 6, 6,
@@ -17,3 +38,4 @@ static const u8 sFont3Widths[] =
3, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7,
3, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 1, 1,
};
#endif

View File

@@ -1,3 +1,22 @@
#if REVISION >= 1
static const u8 sFont4Widths[] =
{
5, 3, 8, 8, 8, 8, 8, 8, 8, 4, 5, 4, 4, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 5, 8, 8, 8, 8, 8, 4, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 5, 5, 5,
6, 5, 5, 5, 5, 5, 5, 5, 5, 4, 8, 4, 4, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 8, 4, 5, 5, 5, 5, 4, 8,
4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 8, 5, 6, 6,
8, 7, 3, 5, 3, 3, 5, 4, 3, 6, 6, 6, 7, 7, 8, 5,
5, 5, 3, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 4, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5,
5, 5, 4, 4, 5, 3, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 6, 6, 7, 7, 7, 7, 6, 7, 6, 6, 7, 6,
7, 7, 7, 6, 7, 6, 7, 6, 7, 6, 6, 7, 6, 6, 3, 3,
5, 5, 5, 5, 3, 3, 5, 5, 5, 5, 5, 5,
};
#else
static const u8 sFont4Widths[] =
{
5, 3, 8, 8, 8, 8, 8, 8, 8, 4, 5, 4, 4, 8, 8, 8,
@@ -15,3 +34,4 @@ static const u8 sFont4Widths[] =
7, 7, 7, 6, 7, 6, 7, 6, 7, 6, 6, 7, 6, 6, 3, 3,
5, 5, 5, 5, 3, 3, 5, 5, 5, 5, 5, 5,
};
#endif

2
rom_rev1.sha1 Normal file
View File

@@ -0,0 +1,2 @@
610b96a9c9a7d03d2bafb655e7560ccff1a6d894 pokeruby.gba
4722efb8cd45772ca32555b98fd3b9719f8e60a9 pokesapphire.gba

2
rom_rev2.sha1 Normal file
View File

@@ -0,0 +1,2 @@
5b64eacf892920518db4ec664e62a086dd5f5bc8 pokeruby.gba
89b45fb172e6b55d51fc0e61989775187f6fe63c pokesapphire.gba

View File

@@ -3352,7 +3352,11 @@ static u8 GetGlyphWidth(struct Window *win, u32 glyph)
{
u8 width = 8;
#if REVISION >= 1
if (win->charset != CHARSET_JAPANESE)
#else
if (win->charset == CHARSET_LATIN)
#endif
{
width = win->spacing;
if (!win->spacing)