From 0f2e0c96a733bbceb8ea8f0e1d40796695ecf2fa Mon Sep 17 00:00:00 2001 From: YamaArashi Date: Sat, 10 Sep 2016 22:40:33 -0700 Subject: [PATCH] build revision 1 and 2 --- Makefile | 49 ++++++++++++-- asm/rom5.s | 105 ++++++++++++++++++++++++++++-- asm/rom_803D1FC.s | 57 ++++++++++++++++ asm/rom_header.s | 6 +- data/data2.s | 4 ++ data/decorations.s | 4 ++ data/event_scripts.s | 6 +- data/graphics.s | 8 +++ data/pokedex_entries.s | 33 +++++++++- data/text/cable_club.s | 4 ++ data/text/tv.s | 4 ++ fonts.mk | 6 ++ graphics/fonts/font3_lat_rev1.png | Bin 0 -> 3709 bytes graphics/fonts/font4_lat_rev1.png | Bin 0 -> 2195 bytes include/fonts/font0_widths.h | 22 +++++++ include/fonts/font1_widths.h | 20 ++++++ include/fonts/font3_widths.h | 22 +++++++ include/fonts/font4_widths.h | 20 ++++++ rom_rev1.sha1 | 2 + rom_rev2.sha1 | 2 + src/text.c | 4 ++ 21 files changed, 358 insertions(+), 20 deletions(-) create mode 100644 graphics/fonts/font3_lat_rev1.png create mode 100644 graphics/fonts/font4_lat_rev1.png create mode 100644 rom_rev1.sha1 create mode 100644 rom_rev2.sha1 diff --git a/Makefile b/Makefile index 4c56371c7..45ccea20e 100644 --- a/Makefile +++ b/Makefile @@ -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 $@ $< diff --git a/asm/rom5.s b/asm/rom5.s index 3792b1948..7cf87e636 100644 --- a/asm/rom5.s +++ b/asm/rom5.s @@ -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] diff --git a/asm/rom_803D1FC.s b/asm/rom_803D1FC.s index ed89d9d89..49009abf0 100644 --- a/asm/rom_803D1FC.s +++ b/asm/rom_803D1FC.s @@ -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 diff --git a/asm/rom_header.s b/asm/rom_header.s index e49b4fbee..a7348ad1f 100644 --- a/asm/rom_header.s +++ b/asm/rom_header.s @@ -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: diff --git a/data/data2.s b/data/data2.s index ff525aa82..a5258494f 100644 --- a/data/data2.s +++ b/data/data2.s @@ -28796,7 +28796,11 @@ OtherText_WontHaveAnyEffect: gUnknown_0840EFA1:: @ 840EFA1 OtherText_CantUseItemOnPoke: + .if REVISION >= 1 + .string "This can’t be used on\nthat POKéMON.{PAUSE_UNTIL_PRESS}$" + .else .string "This item can’t be used on\nthat POKéMON.{PAUSE_UNTIL_PRESS}$" + .endif gUnknown_0840EFCC:: @ 840EFCC OtherText_CantBeSwitched: diff --git a/data/decorations.s b/data/decorations.s index 37c274389..268ebee9a 100644 --- a/data/decorations.s +++ b/data/decorations.s @@ -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.$" diff --git a/data/event_scripts.s b/data/event_scripts.s index a8c897621..966e32ad2 100644 --- a/data/event_scripts.s +++ b/data/event_scripts.s @@ -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" diff --git a/data/graphics.s b/data/graphics.s index 39cfaf5d9..6dcd10041 100644 --- a/data/graphics.s +++ b/data/graphics.s @@ -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 diff --git a/data/pokedex_entries.s b/data/pokedex_entries.s index e9d9fd0ec..f1c206e3c 100644 --- a/data/pokedex_entries.s +++ b/data/pokedex_entries.s @@ -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 "Don’t be taken in by this POKéMON’s\ncute face - it’s 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 "MAWILE’s 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 "MAWHILE’s 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: diff --git a/data/text/cable_club.s b/data/text/cable_club.s index 54f9bda5a..1d3c7fd92 100644 --- a/data/text/cable_club.s +++ b/data/text/cable_club.s @@ -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?$" diff --git a/data/text/tv.s b/data/text/tv.s index fc26766b1..d2cc1a6fa 100644 --- a/data/text/tv.s +++ b/data/text/tv.s @@ -906,7 +906,11 @@ UnknownString_81AB381:: @ 81AB381 .string "Hello!\p" .string "It’s time for TODAY’S SMART SHOPPER.\p" .string "INTERVIEWER: How are you, viewers?\p" + .if REVISION >= 1 + .string "Today we’re visiting a shop\n" + .else .string "Today we’re visiting the POKéMON MART\n" + .endif .string "in {STR_VAR_2}.\p" .string "Let’s check on what the hot sellers\n" .string "have been recently.$" diff --git a/fonts.mk b/fonts.mk index 2295dce2b..86b7f4591 100644 --- a/fonts.mk +++ b/fonts.mk @@ -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 diff --git a/graphics/fonts/font3_lat_rev1.png b/graphics/fonts/font3_lat_rev1.png new file mode 100644 index 0000000000000000000000000000000000000000..cec24d76b725363f11e67a23a71f9f676e8d4cd5 GIT binary patch literal 3709 zcmV-@4ubKCP)|Bt@gfs#rOY}}9SnZ4nh3^8CRgir~Q z=`oN*G=8(^r}Zd!_C6J$e&u+xumAX`2ehq^{Z|Cue123Tf>^KXlM(FeR8f>z`&iMO|~RSKa3ytzV+n`68Z?@A@YI`w!}`@~}{w*XFn zR89GA0C9;+{&fHw<7K8@d6-%i)z|%j_(lP`9bx0R?B^Bs5$}Sf z&3WU+u5KKcBLr7ToV?;dmR&n8W#7~M z3Rc}wxHgsO+?Tj`Hm|-&^>Tg6UGOG>O8_b>Uk#0<6eMB2tacmEN&~5|1gv}m0G+Fm z0_AwyY5V$9*h`3R`;R6ijWhcA=LH4*+&Zn;OX2{omtb7(k~srFnZT|b7}~aC@81Bx z60{dTHXm=4%G>(miVL%dcv*eaHV$LV-+f_&WFoBeh=*K>Ve?>CZa) z|DpN&B)=?*e2)LBW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T-65W^Q54T(WX;+UH_Dsik zdo~`|eR=+HyVYM?U*ZYx^iEgXiM5{FcYW~VUHede2S7E(0qz0BGg}ylzHI@Fb?2Ck z&JzIblcTC(!~$Rh0Ob_?DFC~7d~pA{#mjEs_SI}>AM@d$59+z$hTWqn4gl=bsZjt2 zF`ub3@cH^XBm$7hCJ}BDz-Txihg>?cDWnru+C`n0AZtK(+ztaJS>FO6B|w2}0F17~ z0>H>+)|9{EyOV(Zu~Cl?Cf8{Xpa%ufMv2ix)?;y$(hIKq<`k#Z5j<+B3$EBwM({E4Lm-|1Mn*Zkb*`7Yv zLH=KUzW~7gj~AYq#z)8hi#1FAshJL>B|u;%QjYju1jp|_=Hs8)pC%X2d`tm?0^sh$ zoaf(m0LIS6ql<@!0Oqi}h)3}+G}hY`z-qSu66@K__Yn`v_?dp%VM@pBc_9I3JqA!{ z8_&zXFsGJ&e9TKoKO^h`(c;svEjSFH^8@EM*z02 zReueSnP2?9fzK-8*~i}8|Gj~y0G@qZeNzV-Ua!0f%*Ke4|VG}mAL-y{Qu_F bZ%+RM@`6H4Sr4O<00000NkvXXu0mjf+$KGq literal 0 HcmV?d00001 diff --git a/graphics/fonts/font4_lat_rev1.png b/graphics/fonts/font4_lat_rev1.png new file mode 100644 index 0000000000000000000000000000000000000000..4e4749a04da50a7137f134922ce4236f8b5ad07a GIT binary patch literal 2195 zcmV;E2yFL>P)MM*?KRA_EkfV-`$AeO!ID9a7bRS-yS zU3}&qMUUlAA9d-e&&A_36?;L@l!~O#1At_C(s=;@Yw1-C3u2%je5meFOILwmg7KpY zP}Q*MkMUa3I;e)>nV?L6=aSha1^;!|7z(!m-)CB-O&n(J3)%6 z+%9owQ?r;*h8CVG%%6veX(l8o#bi~HCTh+E0H}gZi|L?Vk8(;?Dd=LI)e*8QuexscY z*Et(Cc2JV_7l+aguZ9Y8u~4Boz=8mGZe&hbiTRdrfiO`PVnpgP0JvAF%i{i01y0=T z;R}bc003cGfv-*gD#)4+z)n<{MA7)F-X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, 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 diff --git a/include/fonts/font1_widths.h b/include/fonts/font1_widths.h index a5c3dba50..454bbfaca 100644 --- a/include/fonts/font1_widths.h +++ b/include/fonts/font1_widths.h @@ -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 diff --git a/include/fonts/font3_widths.h b/include/fonts/font3_widths.h index 0f79260e4..45dc69c06 100644 --- a/include/fonts/font3_widths.h +++ b/include/fonts/font3_widths.h @@ -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 diff --git a/include/fonts/font4_widths.h b/include/fonts/font4_widths.h index a779eb0eb..63adf4921 100644 --- a/include/fonts/font4_widths.h +++ b/include/fonts/font4_widths.h @@ -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 diff --git a/rom_rev1.sha1 b/rom_rev1.sha1 new file mode 100644 index 000000000..c006e0de5 --- /dev/null +++ b/rom_rev1.sha1 @@ -0,0 +1,2 @@ +610b96a9c9a7d03d2bafb655e7560ccff1a6d894 pokeruby.gba +4722efb8cd45772ca32555b98fd3b9719f8e60a9 pokesapphire.gba diff --git a/rom_rev2.sha1 b/rom_rev2.sha1 new file mode 100644 index 000000000..9e54bee6c --- /dev/null +++ b/rom_rev2.sha1 @@ -0,0 +1,2 @@ +5b64eacf892920518db4ec664e62a086dd5f5bc8 pokeruby.gba +89b45fb172e6b55d51fc0e61989775187f6fe63c pokesapphire.gba diff --git a/src/text.c b/src/text.c index 64a302fed..25c7a9d79 100644 --- a/src/text.c +++ b/src/text.c @@ -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)