diff options
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | asm/crt0.s | 98 | ||||
-rw-r--r-- | src/intro.c | 36 |
3 files changed, 60 insertions, 78 deletions
@@ -190,7 +190,7 @@ $(ASM_BUILDDIR)/%.o: asm_dep = $(shell $(SCANINC) -I . $(ASM_SUBDIR)/$*.s) endif $(ASM_BUILDDIR)/%.o: $(ASM_SUBDIR)/%.s $$(asm_dep) - $(CPP) $(CPPFLAGS) $< | $(AS) $(ASFLAGS) -o $@ + $(AS) $(ASFLAGS) -o $@ $< ifeq ($(NODEP),1) $(DATA_ASM_BUILDDIR)/%.o: data_dep := @@ -204,7 +204,7 @@ berry_fix: berry_fix/berry_fix.gba: berry_fix $(DATA_ASM_BUILDDIR)/%.o: $(DATA_ASM_SUBDIR)/%.s $$(data_dep) - $(PREPROC) $< charmap.txt | $(CPP) $(CPPFLAGS) -I include -nostdinc -undef -Wno-unicode - | $(AS) $(ASFLAGS) -o $@ + $(PREPROC) $< charmap.txt | $(CPP) -I include -nostdinc -undef -Wno-unicode - | $(AS) $(ASFLAGS) -o $@ $(SONG_BUILDDIR)/%.o: $(SONG_SUBDIR)/%.s $(AS) $(ASFLAGS) -I sound -o $@ $< diff --git a/asm/crt0.s b/asm/crt0.s index 8805ac940..609845337 100644 --- a/asm/crt0.s +++ b/asm/crt0.s @@ -46,82 +46,29 @@ GPIOPortReadEnable: @ 80000C8 .4byte 0xFFFFFFFF .4byte 0xFFFFFFFF .4byte 0xFFFFFFFF -#if defined(FIRERED) + .ifdef FIRERED .4byte 4 .4byte 2 .ascii "pokemon red version" .space 13 - .4byte 0x82350AC @ gMonFrontPicTable - .4byte 0x823654C @ gMonBackPicTable - .4byte 0x823730C @ gMonPaletteTable - .4byte 0x82380CC @ gMonShinyPaletteTable - .4byte 0x83D37A0 @ gMonIconTable - .4byte 0x83D3E80 @ gMonIconPaletteIndices - .4byte 0x83D4038 @ gMonIconPaletteTable - .4byte 0x8245EE0 @ gSpeciesNames - .4byte 0x8247094 @ gMoveNames - .4byte 0x84556F8 @ gDecorations - .4byte 0xEE0 @ offsetof(struct SaveBlock1, flags) - .4byte 0x1000 @ offsetof(struct SaveBlock1, vars) - .4byte 0x18 @ offsetof(struct SaveBlock2, pokedex) - .4byte 0x5F8 @ offsetof(struct SaveBlock1, seen1) - .4byte 0x3A18 @ offsetof(struct SaveBlock1, seen2) - .4byte 0x3C - .4byte 0x838 - .4byte 0x839 - .4byte 0x182 - .4byte 0xA0A0A07 - .4byte 0xC060C0C - .4byte 0xC121006 - .4byte 0x8010B0F - .4byte 0xC - .4byte 0xF24 @ sizeof(struct SaveBlock2) - .4byte 0x3D68 @ sizeof(struct SaveBlock1) - .4byte 0x34 @ offsetof(struct SaveBlock1, playerPartyCount) - .4byte 0x38 @ offsetof(struct SaveBlock1, playerParty) - .4byte 9 @ offsetof(struct SaveBlock2, specialSaveWarp) - .4byte 0xA @ offsetof(struct SaveBlock2, playerTrainerId) - .4byte 0 @ offsetof(struct SaveBlock2, playerName) - .4byte 8 @ offsetof(struct SaveBlock2, playerGender) - - .4byte 0xAD @ offsetof(struct SaveBlock2, ?????? (0xAD)) - .4byte 0xAD @ offsetof(struct SaveBlock2, ?????? (0xAD)) - .4byte 0x30BB - .4byte 0x30A7 - .4byte 0 - .4byte 0x8254784 @ gBaseStats - .4byte 0x824FC40 @ gAbilityNames - .4byte 0x824FB08 @ gAbilityDescriptionPointers - .4byte 0x83DB028 @ gItems - .4byte 0x8250C04 @ gBattleMoves - .4byte 0x826056C @ gBallSpriteSheets - .4byte 0x82605CC @ gBallSpritePalettes - .4byte 0xA8 - .4byte 0x82C - .4byte 0x83B - .4byte 0x3A0D1E2A - .4byte 0x1E2B - .4byte 0x298 @ offsetof(struct SaveBlock1, pcItems) // maybe all items were in a struct together? - .4byte 0x309C @ offsetof(struct SaveBlock1, giftRibbons) - .4byte 0x30EC @ offsetof(struct SaveBlock1, enigmaBerry) - .4byte 0x34 @ size of SaveBlock1 map header reconstruction data? - .4byte 0 - .4byte 0xFFFFFFFF -#elif defined(LEAFGREEN) + .else + .ifdef LEAFGREEN .4byte 5 .4byte 2 .ascii "pokemon green version" .space 11 - .4byte 0x8235088 @ gMonFrontPicTable - .4byte 0x8236528 @ gMonBackPicTable - .4byte 0x82372E8 @ gMonPaletteTable - .4byte 0x82380A8 @ gMonShinyPaletteTable - .4byte 0x83D35DC @ gMonIconTable - .4byte 0x83D3CBC @ gMonIconPaletteIndices - .4byte 0x83D3E74 @ gMonIconPaletteTable - .4byte 0x8245EBC @ gSpeciesNames - .4byte 0x8247070 @ gMoveNames - .4byte 0x8455118 @ gDecorations + .endif + .endif + .4byte gMonFrontPicTable + .4byte gMonBackPicTable + .4byte gMonPaletteTable + .4byte gMonShinyPaletteTable + .4byte gMonIconTable + .4byte gMonIconPaletteIndices + .4byte gMonIconPaletteTable + .4byte gSpeciesNames + .4byte gMoveNames + .4byte gDecorations .4byte 0xEE0 @ offsetof(struct SaveBlock1, flags) .4byte 0x1000 @ offsetof(struct SaveBlock1, vars) .4byte 0x18 @ offsetof(struct SaveBlock2, pokedex) @@ -150,13 +97,13 @@ GPIOPortReadEnable: @ 80000C8 .4byte 0x30BB .4byte 0x30A7 .4byte 0 - .4byte 0x8254760 @ gBaseStats - .4byte 0x824FC1C @ gAbilityNames - .4byte 0x824FAE4 @ gAbilityDescriptionPointers - .4byte 0x83DAE64 @ gItems - .4byte 0x8250BE0 @ gBattleMoves - .4byte 0x826054C @ gBallSpriteSheets - .4byte 0x82605AC @ gBallSpritePalettes + .4byte gBaseStats + .4byte gAbilityNames + .4byte gAbilityDescriptionPointers + .4byte gItems + .4byte gBattleMoves + .4byte gBallSpriteSheets + .4byte gBallSpritePalettes .4byte 0xA8 .4byte 0x82C .4byte 0x83B @@ -168,7 +115,6 @@ GPIOPortReadEnable: @ 80000C8 .4byte 0x34 @ size of SaveBlock1 map header reconstruction data? .4byte 0 .4byte 0xFFFFFFFF -#endif .arm .align 2, 0 diff --git a/src/intro.c b/src/intro.c index 33a03a389..8757db81d 100644 --- a/src/intro.c +++ b/src/intro.c @@ -131,6 +131,11 @@ static void sub_80EE9D4(struct Sprite * sprite); static void sub_80EEA94(struct IntroSequenceData * ptr); static void sub_80EEB08(struct Sprite * sprite); static void sub_80EEBE4(void); +#if REVISION >= 1 +static void sub_rev1_80EDFAC(void); +#else +#define sub_rev1_80EDFAC() +#endif extern const u32 gMultiBootProgram_PokemonColosseum_Start[]; @@ -828,6 +833,7 @@ static void sub_80ECD60(struct IntroSequenceData * this) if (!IsDma3ManagerBusyWithBgCopy()) { DestroySprite(this->field_0014); + sub_rev1_80EDFAC(); this->field_0012 = 0; this->field_0004++; } @@ -1592,6 +1598,36 @@ static struct Sprite * sub_80EDF68(void) return &gSprites[spriteId]; } +#if REVISION >= 1 +static const struct OamData sOamData_840BD64 = { + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_BLEND, + .mosaic = FALSE, + .bpp = ST_OAM_4BPP, + .shape = SPRITE_SHAPE(8x32), + .size = SPRITE_SIZE(8x32), + .priority = 3 +}; + +static const struct SpriteTemplate sSprTemplate_rev1_840BD6C = { + .tileTag = 4, + .paletteTag = 3, + .oam = &sOamData_840BD64, + .anims = gDummySpriteAnimTable, + .affineAnims = gDummySpriteAffineAnimTable, + .callback = SpriteCallbackDummy +}; + +static void sub_rev1_80EDFAC(void) +{ + int i; + for (i = 0; i < 2; i++) + { + gSprites[CreateSprite(&sSprTemplate_rev1_840BD6C, 0x68 + 32 * i, 0x6c, 5)].oam.tileNum += i * 4; + } +} +#endif + static void sub_80EDF94(struct IntroSequenceData * this) { u8 taskId; |