mirror of
https://github.com/pret/pokeruby.git
synced 2026-04-26 00:13:40 -05:00
Document image_processing_effects.c
This commit is contained in:
parent
c5dd8f884a
commit
9ab2ab3c80
|
|
@ -18,7 +18,7 @@ gSpriteTemplate_81FAF34:: @ 81FAF34
|
|||
spr_template 55129, 55039, gOamData_81FAF2C, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, sub_8032978
|
||||
|
||||
.align 2
|
||||
gUnknown_081FAF4C:: @ 81FAF4C
|
||||
gMonSpriteGfx_Sprite_ptr:: @ 81FAF4C
|
||||
.4byte gSharedMem + 0x8000
|
||||
.4byte gSharedMem + 0xA000
|
||||
.4byte gSharedMem + 0xC000
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -48,8 +48,8 @@ extern const u8 gUnknown_081F96C8[];
|
|||
extern const struct CompressedSpriteSheet gUnknown_081FAEA4;
|
||||
extern const struct CompressedSpritePalette gUnknown_081FAEAC;
|
||||
extern const struct SpriteTemplate gSpriteTemplate_81FAF0C;
|
||||
extern u8 *const gUnknown_081FAF4C[];
|
||||
//extern u8 (*const gUnknown_081FAF4C[])[0x800];
|
||||
extern u8 *const gMonSpriteGfx_Sprite_ptr[];
|
||||
//extern u8 (*const gMonSpriteGfx_Sprite_ptr[])[0x800];
|
||||
extern const struct BattleMove gBattleMoves[];
|
||||
|
||||
// data/graphics/trainers/front_pic_coords.inc
|
||||
|
|
|
|||
|
|
@ -88,12 +88,17 @@ extern u8 gSharedMem[];
|
|||
#define ewram15000arr(i, data) (gSharedMem[0x15000 + data + i])
|
||||
#define ewram15800 (&gSharedMem[0x15800])
|
||||
|
||||
#define ewram16000_2 (&gSharedMem[0x16000])
|
||||
|
||||
#define eCurContestWinnerSaveIdx (gSharedMem[0x15DDE])
|
||||
#define eCurContestWinnerIsForArtist (gSharedMem[0x15DDF])
|
||||
#define eCurContestWinner ((*(struct ContestWinner*)(gSharedMem + 0x15DE0)))
|
||||
#define ewram15E00 ((*(struct ContestPaintingBuffers*)(gSharedMem + 0x15E00)))
|
||||
#define eContestPaintingBuffers ((*(struct ContestPaintingBuffers*)(gSharedMem + 0x15E00)))
|
||||
|
||||
// Battle Struct
|
||||
// For matching purposes, the struct is placed at 0x02000000 and
|
||||
// there's a ton of filler.
|
||||
#define ewram16000 (gSharedMem[0x16000])
|
||||
#define ewram16000_2 (&gSharedMem[0x16000])
|
||||
#define ewram16003 (gSharedMem[0x16003])
|
||||
#define ewram16004arr(i, battler) (gSharedMem[0x16004 + i + battler * 2])
|
||||
#define ewram16010arr(battler) (gSharedMem[0x16010 + battler])
|
||||
|
|
@ -159,7 +164,11 @@ extern u8 gSharedMem[];
|
|||
#define B_FUNCTION_STACK ((struct BattleCallbacksStack *) (gSharedMem + 0x17140))
|
||||
#define gBattleResources_statsBeforeLvlUp ((struct StatsArray *)(gSharedMem + 0x17180))
|
||||
|
||||
// roulette_gfx.c
|
||||
#define ewram17000 (&gSharedMem[0x17000])
|
||||
#define ewram17E00 ((u16 *)(gSharedMem + 0x17E00))
|
||||
#define ewram18000 ((u16 *)(gSharedMem + 0x18000))
|
||||
|
||||
#define eMoveTutorMenu (struct MoveTutorMenu *)(gSharedMem + 0x17000)
|
||||
#define eCableCar1 ((struct CableCarEwramStruct1 *)(gSharedMem + 0x17000))
|
||||
#define gBattleSpriteInfo ((struct BattleSpriteInfo *) (gSharedMem + 0x17800))
|
||||
|
|
@ -170,10 +179,8 @@ extern u8 gSharedMem[];
|
|||
#define EWRAM_17810 ((struct UnknownStruct3 *)(gSharedMem + 0x17810))
|
||||
#define ewram17840 (*(struct Struct2017840 *) (gSharedMem + 0x17840))
|
||||
#define ewram17850 ((struct UnknownStruct5 *)(gSharedMem + 0x17850))
|
||||
#define ewram17E00 ((u16 *)(gSharedMem + 0x17E00))
|
||||
#define ewram_2018000 (*(struct PlayerRecords *)(gSharedMem + 0x18000))
|
||||
#define EWRAM_18000 ((u16 *)(gSharedMem + 0x18000))
|
||||
#define ewram18000 ((u16 *)(gSharedMem + 0x18000))
|
||||
#define ewram18000_2 (&gSharedMem[0x18000])
|
||||
#define ewram18000_3 *(struct Pokemon **)(gSharedMem + 0x18000)
|
||||
#define eBerryBlenderData (struct BerryBlenderData*)(&gSharedMem[0x18000])
|
||||
|
|
|
|||
|
|
@ -1,28 +1,53 @@
|
|||
#ifndef GUARD_CUTE_SKETCH_H
|
||||
#define GUARD_CUTE_SKETCH_H
|
||||
#ifndef GUARD_IMAGE_PROCESSING_EFFECTS_H
|
||||
#define GUARD_IMAGE_PROCESSING_EFFECTS_H
|
||||
|
||||
enum
|
||||
{
|
||||
IMAGE_EFFECT_POINTILLISM = 2,
|
||||
IMAGE_EFFECT_GRAYSCALE_LIGHT = 6,
|
||||
IMAGE_EFFECT_BLUR = 8,
|
||||
IMAGE_EFFECT_OUTLINE_COLORED = 9,
|
||||
IMAGE_EFFECT_INVERT_BLACK_WHITE = 10,
|
||||
IMAGE_EFFECT_THICK_BLACK_WHITE = 11,
|
||||
IMAGE_EFFECT_SHIMMER = 13,
|
||||
IMAGE_EFFECT_OUTLINE = 30,
|
||||
IMAGE_EFFECT_INVERT = 31,
|
||||
IMAGE_EFFECT_BLUR_RIGHT = 32,
|
||||
IMAGE_EFFECT_BLUR_DOWN = 33,
|
||||
IMAGE_EFFECT_CHARCOAL = 36,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
QUANTIZE_EFFECT_STANDARD,
|
||||
QUANTIZE_EFFECT_STANDARD_LIMITED_COLORS,
|
||||
QUANTIZE_EFFECT_PRIMARY_COLORS,
|
||||
QUANTIZE_EFFECT_GRAYSCALE,
|
||||
QUANTIZE_EFFECT_GRAYSCALE_SMALL,
|
||||
QUANTIZE_EFFECT_BLACK_WHITE,
|
||||
};
|
||||
|
||||
struct ImageProcessingContext
|
||||
{
|
||||
u8 var_0;
|
||||
u8 pad1[3];
|
||||
u16 (*var_4)[][32];
|
||||
u16 *var_8;
|
||||
u8 pad0C[4];
|
||||
u16 (*var_10)[][32];
|
||||
u16 var_14;
|
||||
u16 var_16;
|
||||
u8 var_18;
|
||||
u8 var_19;
|
||||
u8 var_1A;
|
||||
u8 var_1B;
|
||||
u8 var_1C;
|
||||
u8 var_1D;
|
||||
u8 var_1E;
|
||||
u8 var_1F;
|
||||
u8 effect;
|
||||
void *canvasPixels;
|
||||
u16 *canvasPalette;
|
||||
u8 fillerC[0x4];
|
||||
void *dest;
|
||||
u16 quantizeEffect;
|
||||
u16 bgType;
|
||||
u8 paletteStart;
|
||||
u8 columnStart;
|
||||
u8 rowStart;
|
||||
u8 columnEnd;
|
||||
u8 rowEnd;
|
||||
u8 canvasWidth;
|
||||
u8 canvasHeight;
|
||||
u8 personality;
|
||||
};
|
||||
|
||||
void sub_80FC7A0(struct ImageProcessingContext *);
|
||||
void sub_80FD8CC(struct ImageProcessingContext *);
|
||||
void sub_80FDA18(struct ImageProcessingContext *);
|
||||
void ApplyImageProcessingEffects(struct ImageProcessingContext *);
|
||||
void ConvertImageProcessingToGBA(struct ImageProcessingContext *);
|
||||
void ApplyImageProcessingQuantization(struct ImageProcessingContext *);
|
||||
|
||||
#endif // GUARD_CUTE_SKETCH_H
|
||||
#endif // GUARD_IMAGE_PROCESSING_EFFECTS_H
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ extern const struct WindowTemplate gWindowTemplate_81E70F0;
|
|||
extern const struct WindowTemplate gWindowTemplate_81E710C;
|
||||
extern const struct WindowTemplate gWindowTemplate_81E7128;
|
||||
extern const struct WindowTemplate gWindowTemplate_81E7144;
|
||||
extern const struct WindowTemplate gWindowTemplate_81E7160;
|
||||
extern const struct WindowTemplate gWindowTemplate_ContestPainting;
|
||||
extern const struct WindowTemplate gWindowTemplate_81E717C;
|
||||
extern const struct WindowTemplate gWindowTemplate_81E7198;
|
||||
extern const struct WindowTemplate gWindowTemplate_81E71B4;
|
||||
|
|
|
|||
|
|
@ -726,7 +726,6 @@ SECTIONS {
|
|||
src/heal_location.o(.rodata);
|
||||
src/region_map.o(.rodata);
|
||||
src/image_processing_effects.o(.rodata);
|
||||
data/image_processing_effects.o(.rodata);
|
||||
src/decoration.o(.rodata);
|
||||
src/slot_machine.o(.rodata);
|
||||
src/contest_painting.o(.rodata);
|
||||
|
|
|
|||
|
|
@ -463,7 +463,7 @@ void sub_80E4EF8(u8 left, u8 top, u8 c, u8 paletteNum, u16 e, u8 bgMap, u8 g)
|
|||
s32 y;
|
||||
u8 bank = GetBattlerAtPosition(c);
|
||||
|
||||
DmaCopy16(3, gUnknown_081FAF4C[c] + gBattleMonForms[bank] * 0x800, (void *)(VRAM + e), 0x800);
|
||||
DmaCopy16(3, gMonSpriteGfx_Sprite_ptr[c] + gBattleMonForms[bank] * 0x800, (void *)(VRAM + e), 0x800);
|
||||
tileNum = e / 32 - g * 512;
|
||||
for (y = top; y < top + 8; y++)
|
||||
{
|
||||
|
|
@ -481,7 +481,7 @@ void unref_sub_80E4FDC(u8 left, u8 top, u8 c, u8 form, u8 paletteNum, u16 f, u8
|
|||
s32 x;
|
||||
s32 y;
|
||||
|
||||
DmaCopy16(3, gUnknown_081FAF4C[c] + form * 0x800, (void *)(VRAM + f), 0x800);
|
||||
DmaCopy16(3, gMonSpriteGfx_Sprite_ptr[c] + form * 0x800, (void *)(VRAM + f), 0x800);
|
||||
tileNum = f / 32 - h * 512;
|
||||
for (y = top; y < top + 8; y++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2297,7 +2297,7 @@ void sub_812D7E8(u8 taskId)
|
|||
else
|
||||
position = GetBattlerPosition(gBattleAnimAttacker);
|
||||
|
||||
dest = gUnknown_081FAF4C[position] + (gBattleMonForms[gBattleAnimAttacker] << 11);
|
||||
dest = gMonSpriteGfx_Sprite_ptr[position] + (gBattleMonForms[gBattleAnimAttacker] << 11);
|
||||
src = subStruct.field_0;
|
||||
DmaCopy32(3, dest, src, 0x800);
|
||||
|
||||
|
|
|
|||
|
|
@ -313,7 +313,7 @@ void BattleLoadOpponentMonSprite(struct Pokemon *pkmn, u8 b)
|
|||
gMonFrontPicCoords[species].coords,
|
||||
gMonFrontPicCoords[species].y_offset,
|
||||
eVoidSharedArr2,
|
||||
gUnknown_081FAF4C[var],
|
||||
gMonSpriteGfx_Sprite_ptr[var],
|
||||
species,
|
||||
r7);
|
||||
paletteOffset = 0x100 + b * 16;
|
||||
|
|
@ -365,7 +365,7 @@ void BattleLoadPlayerMonSprite(struct Pokemon *pkmn, u8 b)
|
|||
gMonBackPicCoords[species].coords,
|
||||
gMonBackPicCoords[species].y_offset,
|
||||
eVoidSharedArr2,
|
||||
gUnknown_081FAF4C[var],
|
||||
gMonSpriteGfx_Sprite_ptr[var],
|
||||
species,
|
||||
r7);
|
||||
paletteOffset = 0x100 + b * 16;
|
||||
|
|
@ -408,9 +408,9 @@ void sub_8031A6C(u16 a, u8 b)
|
|||
gTrainerFrontPicCoords[a].coords,
|
||||
gTrainerFrontPicCoords[a].y_offset,
|
||||
eVoidSharedArr,
|
||||
gUnknown_081FAF4C[status],
|
||||
gMonSpriteGfx_Sprite_ptr[status],
|
||||
0);
|
||||
spriteSheet.data = gUnknown_081FAF4C[status];
|
||||
spriteSheet.data = gMonSpriteGfx_Sprite_ptr[status];
|
||||
spriteSheet.size = gTrainerFrontPicTable[a].size;
|
||||
spriteSheet.tag = gTrainerFrontPicTable[a].tag;
|
||||
LoadCompressedObjectPic(&spriteSheet);
|
||||
|
|
@ -427,7 +427,7 @@ void LoadPlayerTrainerBankSprite(u16 a, u8 b)
|
|||
gTrainerBackPicCoords[a].coords,
|
||||
gTrainerBackPicCoords[a].y_offset,
|
||||
eVoidSharedArr,
|
||||
gUnknown_081FAF4C[status],
|
||||
gMonSpriteGfx_Sprite_ptr[status],
|
||||
0);
|
||||
LoadCompressedPalette(gTrainerBackPicPaletteTable[a].data, 0x100 + b * 16, 32);
|
||||
}
|
||||
|
|
@ -662,7 +662,7 @@ void sub_8031FC4(u8 a, u8 b, bool8 c)
|
|||
gMonBackPicCoords[species].coords,
|
||||
gMonBackPicCoords[species].y_offset,
|
||||
eVoidSharedArr2,
|
||||
gUnknown_081FAF4C[0],
|
||||
gMonSpriteGfx_Sprite_ptr[0],
|
||||
species,
|
||||
shared19348.unk10);
|
||||
}
|
||||
|
|
@ -682,7 +682,7 @@ void sub_8031FC4(u8 a, u8 b, bool8 c)
|
|||
gMonBackPicCoords[species].coords,
|
||||
gMonBackPicCoords[species].y_offset,
|
||||
eVoidSharedArr2,
|
||||
gUnknown_081FAF4C[r10],
|
||||
gMonSpriteGfx_Sprite_ptr[r10],
|
||||
species,
|
||||
gTransformedPersonalities[a]);
|
||||
}
|
||||
|
|
@ -695,12 +695,12 @@ void sub_8031FC4(u8 a, u8 b, bool8 c)
|
|||
gMonFrontPicCoords[species].coords,
|
||||
gMonFrontPicCoords[species].y_offset,
|
||||
eVoidSharedArr2,
|
||||
gUnknown_081FAF4C[r10],
|
||||
gMonSpriteGfx_Sprite_ptr[r10],
|
||||
species,
|
||||
gTransformedPersonalities[a]);
|
||||
}
|
||||
}
|
||||
DmaCopy32Defvars(3, gUnknown_081FAF4C[r10], (void *)(VRAM + 0x10000 + gSprites[gBattlerSpriteIds[a]].oam.tileNum * 32), 0x800);
|
||||
DmaCopy32Defvars(3, gMonSpriteGfx_Sprite_ptr[r10], (void *)(VRAM + 0x10000 + gSprites[gBattlerSpriteIds[a]].oam.tileNum * 32), 0x800);
|
||||
paletteOffset = 0x100 + a * 16;
|
||||
lzPaletteData = GetMonSpritePalFromOtIdPersonality(species, otId, personalityValue);
|
||||
LZDecompressWram(lzPaletteData, gSharedMem);
|
||||
|
|
@ -739,15 +739,15 @@ void BattleLoadSubstituteSprite(u8 a, u8 b)
|
|||
else
|
||||
r4 = GetBattlerPosition(a);
|
||||
if (IsContest())
|
||||
LZDecompressVram(gSubstituteDollTilemap, gUnknown_081FAF4C[r4]);
|
||||
LZDecompressVram(gSubstituteDollTilemap, gMonSpriteGfx_Sprite_ptr[r4]);
|
||||
else if (GetBattlerSide(a) != 0)
|
||||
LZDecompressVram(gSubstituteDollGfx, gUnknown_081FAF4C[r4]);
|
||||
LZDecompressVram(gSubstituteDollGfx, gMonSpriteGfx_Sprite_ptr[r4]);
|
||||
else
|
||||
LZDecompressVram(gSubstituteDollTilemap, gUnknown_081FAF4C[r4]);
|
||||
LZDecompressVram(gSubstituteDollTilemap, gMonSpriteGfx_Sprite_ptr[r4]);
|
||||
// There is probably a way to do this without all the temp variables, but I couldn't figure it out.
|
||||
foo = a * 16;
|
||||
gSubstituteDollPal_ = gSubstituteDollPal;
|
||||
src = gUnknown_081FAF4C[r4];
|
||||
src = gMonSpriteGfx_Sprite_ptr[r4];
|
||||
for (i = 0; i < 3; i++)
|
||||
DmaCopy32(3, src, src + i * 0x800 + 0x800, 0x800);
|
||||
LoadCompressedPalette(gSubstituteDollPal_, 0x100 + foo, 32);
|
||||
|
|
|
|||
|
|
@ -2623,7 +2623,7 @@ void debug_sub_8012688(void)
|
|||
gMonFrontPicCoords[gCurrentMove].coords,
|
||||
gMonFrontPicCoords[gCurrentMove].y_offset,
|
||||
(void *)EWRAM,
|
||||
gUnknown_081FAF4C[1],
|
||||
gMonSpriteGfx_Sprite_ptr[1],
|
||||
gCurrentMove);
|
||||
LoadCompressedPalette(gMonPaletteTable[gCurrentMove].data, 272, 32);
|
||||
GetMonSpriteTemplate_803C56C(gCurrentMove, 1);
|
||||
|
|
@ -2683,7 +2683,7 @@ void debug_sub_80129F8(u8 taskId)
|
|||
gMonFrontPicCoords[gCurrentMove].coords,
|
||||
gMonFrontPicCoords[gCurrentMove].y_offset,
|
||||
(void *)EWRAM,
|
||||
gUnknown_081FAF4C[1],
|
||||
gMonSpriteGfx_Sprite_ptr[1],
|
||||
gCurrentMove);
|
||||
LoadCompressedPalette(gMonPaletteTable[gCurrentMove].data, 272, 32);
|
||||
gSprites[gTasks[taskId].data[1]].pos1.y = gMonFrontPicCoords[gCurrentMove].y_offset + 40;
|
||||
|
|
@ -3179,7 +3179,7 @@ void sub_8010494(struct Sprite *sprite)
|
|||
else
|
||||
{
|
||||
// this should use a MEMSET_ALT, but *(dst++) wont match with it.
|
||||
dst = (u8 *)gUnknown_081FAF4C[GetBattlerPosition(sprite->data[0])] + (gBattleMonForms[sprite->data[0]] << 11) + (sprite->data[3] << 8);
|
||||
dst = (u8 *)gMonSpriteGfx_Sprite_ptr[GetBattlerPosition(sprite->data[0])] + (gBattleMonForms[sprite->data[0]] << 11) + (sprite->data[3] << 8);
|
||||
for (i = 0; i < 0x100; i++)
|
||||
*(dst++) = 0;
|
||||
StartSpriteAnim(sprite, gBattleMonForms[sprite->data[0]]);
|
||||
|
|
|
|||
|
|
@ -2457,7 +2457,7 @@ u8 unref_sub_80AE908(void)
|
|||
gMonFrontPicCoords[species].coords,
|
||||
gMonFrontPicCoords[species].y_offset,
|
||||
(void *)EWRAM,
|
||||
gUnknown_081FAF4C[1],
|
||||
gMonSpriteGfx_Sprite_ptr[1],
|
||||
species);
|
||||
LoadCompressedPalette(gMonPaletteTable[species].data, 0x110, 32);
|
||||
GetMonSpriteTemplate_803C56C(gContestMons[gContestPlayerMonIndex].species, 1);
|
||||
|
|
@ -2483,7 +2483,7 @@ u8 sub_80AE9FC(u16 species, u32 otId, u32 personality)
|
|||
gMonBackPicCoords[species].coords,
|
||||
gMonBackPicCoords[species].y_offset,
|
||||
EWRAM,
|
||||
gUnknown_081FAF4C[0],
|
||||
gMonSpriteGfx_Sprite_ptr[0],
|
||||
species,
|
||||
personality);
|
||||
lzPaletteData = GetMonSpritePalFromOtIdPersonality(species, otId, personality);
|
||||
|
|
|
|||
|
|
@ -610,7 +610,7 @@ static void sub_80C2A8C(u8 taskId)
|
|||
species = gContestMons[i].species;
|
||||
personality = gContestMons[i].personality;
|
||||
otId = gContestMons[i].otId;
|
||||
HandleLoadSpecialPokePic(gMonFrontPicTable + species, gMonFrontPicCoords[species].coords, gMonFrontPicCoords[species].y_offset, (intptr_t)gSharedMem, gUnknown_081FAF4C[1], species, personality);
|
||||
HandleLoadSpecialPokePic(gMonFrontPicTable + species, gMonFrontPicCoords[species].coords, gMonFrontPicCoords[species].y_offset, (intptr_t)gSharedMem, gMonSpriteGfx_Sprite_ptr[1], species, personality);
|
||||
monPal = GetMonSpritePalStructFromOtIdPersonality(species, otId, personality);
|
||||
LoadCompressedObjectPalette(monPal);
|
||||
GetMonSpriteTemplate_803C56C(species, 1);
|
||||
|
|
|
|||
|
|
@ -105,13 +105,13 @@ const u16 sBgPalette[] = {RGB_BLACK, RGB_BLACK};
|
|||
static void ShowContestPainting();
|
||||
static void CB2_HoldContestPainting(void);
|
||||
static void HoldContestPainting(void);
|
||||
static void ContestPaintingInitWindow(u8 arg0);
|
||||
static void ContestPaintingPrintCaption(u8 arg0, u8 arg1);
|
||||
static void ContestPaintingInitBG(void);
|
||||
static void ContestPaintingInitVars(u8 arg0);
|
||||
static void InitContestPaintingWindow(bool8 isForArtist);
|
||||
static void PrintContestPaintingCaption(u8 contestType, bool8 isForArtist);
|
||||
static void InitContestPaintingBg(void);
|
||||
static void InitContestPaintingVars(bool8 reset);
|
||||
static void VBlankCB_ContestPainting(void);
|
||||
static void sub_8106B90(u8 *a, u16 *b, u16 *c);
|
||||
static void CreateContestPaintingPicture(u8 arg0, u8 arg1);
|
||||
static void _InitContestMonPixels(u8 *spriteGfx, u16 *palette, u16 *destPixels);
|
||||
static void CreateContestPaintingPicture(u8 contestWinnerId, bool8 isForArtist);
|
||||
|
||||
void SetContestWinnerForPainting(u32 contestWinnerId)
|
||||
{
|
||||
|
|
@ -137,8 +137,8 @@ static void ShowContestPainting(void)
|
|||
ScanlineEffect_Stop();
|
||||
SetVBlankCallback(NULL);
|
||||
gContestPaintingWinner = &eCurContestWinner;
|
||||
ContestPaintingInitVars(TRUE);
|
||||
ContestPaintingInitBG();
|
||||
InitContestPaintingVars(TRUE);
|
||||
InitContestPaintingBg();
|
||||
gMain.state++;
|
||||
break;
|
||||
case 1:
|
||||
|
|
@ -152,7 +152,7 @@ static void ShowContestPainting(void)
|
|||
case 2:
|
||||
SeedRng(gMain.vblankCounter1);
|
||||
InitKeys();
|
||||
ContestPaintingInitWindow(eCurContestWinnerIsForArtist);
|
||||
InitContestPaintingWindow(eCurContestWinnerIsForArtist);
|
||||
gMain.state++;
|
||||
break;
|
||||
case 3:
|
||||
|
|
@ -160,7 +160,7 @@ static void ShowContestPainting(void)
|
|||
gMain.state++;
|
||||
break;
|
||||
case 4:
|
||||
ContestPaintingPrintCaption(eCurContestWinnerSaveIdx, eCurContestWinnerIsForArtist);
|
||||
PrintContestPaintingCaption(eCurContestWinnerSaveIdx, eCurContestWinnerIsForArtist);
|
||||
LoadPalette(sBgPalette, 0, 1 * 2);
|
||||
DmaClear32(3, PLTT, 0x400);
|
||||
BeginFastPaletteFade(2);
|
||||
|
|
@ -190,16 +190,14 @@ static void HoldContestPainting(void)
|
|||
case 0:
|
||||
if (!gPaletteFade.active)
|
||||
sHoldState = 1;
|
||||
if (sVarsInitialized != 0 && sFrameCounter != 0)
|
||||
if (sVarsInitialized&& sFrameCounter != 0)
|
||||
sFrameCounter--;
|
||||
break;
|
||||
case 1:
|
||||
if ((gMain.newKeys & 1) || (gMain.newKeys & 2))
|
||||
if ((gMain.newKeys & A_BUTTON) || (gMain.newKeys & B_BUTTON))
|
||||
{
|
||||
u8 two = 2; //needed to make the asm match
|
||||
|
||||
sHoldState = two;
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB(0, 0, 0));
|
||||
sHoldState++;
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
}
|
||||
if (sVarsInitialized != 0)
|
||||
sFrameCounter = 0;
|
||||
|
|
@ -207,25 +205,25 @@ static void HoldContestPainting(void)
|
|||
case 2:
|
||||
if (!gPaletteFade.active)
|
||||
SetMainCallback2(CB2_QuitContestPainting);
|
||||
if (sVarsInitialized != 0 && sFrameCounter <= 0x1D)
|
||||
if (sVarsInitialized && sFrameCounter < 30)
|
||||
sFrameCounter++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void ContestPaintingInitWindow(u8 arg0)
|
||||
static void InitContestPaintingWindow(u8 isForArtist)
|
||||
{
|
||||
InitMenuWindow(&gWindowTemplate_81E7160);
|
||||
Text_LoadWindowTemplate(&gWindowTemplate_81E7160);
|
||||
InitMenuWindow(&gWindowTemplate_ContestPainting);
|
||||
Text_LoadWindowTemplate(&gWindowTemplate_ContestPainting);
|
||||
}
|
||||
|
||||
static void ContestPaintingPrintCaption(u8 contestType, u8 arg1)
|
||||
static void PrintContestPaintingCaption(u8 contestType, u8 isForArtist)
|
||||
{
|
||||
u8 xPos, yPos;
|
||||
u8 *ptr;
|
||||
u8 type;
|
||||
|
||||
if (arg1 == TRUE)
|
||||
if (isForArtist == TRUE)
|
||||
return;
|
||||
ptr = sCaptionBuffer;
|
||||
type = gContestPaintingWinner->contestCategory;
|
||||
|
|
@ -240,7 +238,7 @@ static void ContestPaintingPrintCaption(u8 contestType, u8 arg1)
|
|||
#endif
|
||||
|
||||
// {LATIN}
|
||||
ptr[0] = 0xFC;
|
||||
ptr[0] = EXT_CTRL_CODE_BEGIN;
|
||||
ptr[1] = 0x16;
|
||||
ptr += 2;
|
||||
|
||||
|
|
@ -266,7 +264,7 @@ static void ContestPaintingPrintCaption(u8 contestType, u8 arg1)
|
|||
Menu_PrintTextPixelCoords(sCaptionBuffer, xPos * 8 + 1, yPos * 8, 1);
|
||||
}
|
||||
|
||||
static void ContestPaintingInitBG(void)
|
||||
static void InitContestPaintingBg(void)
|
||||
{
|
||||
REG_DISPCNT = 0;
|
||||
REG_IE |= INTR_FLAG_VBLANK;
|
||||
|
|
@ -277,9 +275,9 @@ static void ContestPaintingInitBG(void)
|
|||
REG_BLDY = 0;
|
||||
}
|
||||
|
||||
static void ContestPaintingInitVars(bool8 arg0)
|
||||
static void InitContestPaintingVars(bool8 reset)
|
||||
{
|
||||
if (arg0 == FALSE)
|
||||
if (reset == FALSE)
|
||||
{
|
||||
sVarsInitialized = FALSE;
|
||||
sMosaicVal = 0;
|
||||
|
|
@ -315,7 +313,7 @@ static void VBlankCB_ContestPainting(void)
|
|||
TransferPlttBuffer();
|
||||
}
|
||||
|
||||
static void sub_8106AC4(u16 species, u8 arg1)
|
||||
static void InitContestMonPixels(u16 species, u8 arg1)
|
||||
{
|
||||
const void *pal;
|
||||
|
||||
|
|
@ -329,11 +327,11 @@ static void sub_8106AC4(u16 species, u8 arg1)
|
|||
gMonFrontPicCoords[species].coords,
|
||||
gMonFrontPicCoords[species].y_offset,
|
||||
EWRAM,
|
||||
gUnknown_081FAF4C[1],
|
||||
gMonSpriteGfx_Sprite_ptr[1],
|
||||
species,
|
||||
(u32)gContestPaintingWinner->personality
|
||||
);
|
||||
sub_8106B90((u8*)gUnknown_081FAF4C[1], (u16*)gContestPaintingMonPalette, (u16*)gContestMonPixels);
|
||||
_InitContestMonPixels((u8*)gMonSpriteGfx_Sprite_ptr[1], (u16*)gContestPaintingMonPalette, (u16*)gContestMonPixels);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -342,17 +340,17 @@ static void sub_8106AC4(u16 species, u8 arg1)
|
|||
gMonBackPicCoords[species].coords,
|
||||
gMonBackPicCoords[species].y_offset,
|
||||
EWRAM,
|
||||
gUnknown_081FAF4C[0],
|
||||
gMonSpriteGfx_Sprite_ptr[0],
|
||||
species,
|
||||
(u32)gContestPaintingWinner->personality
|
||||
);
|
||||
sub_8106B90((u8*)gUnknown_081FAF4C[0], (u16*)gContestPaintingMonPalette, (u16*)gContestMonPixels);
|
||||
_InitContestMonPixels((u8*)gMonSpriteGfx_Sprite_ptr[0], (u16*)gContestPaintingMonPalette, (u16*)gContestMonPixels);
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_8106B90(u8 *a, u16 *b, u16 *c)
|
||||
static void _InitContestMonPixels(u8 *spriteGfx, u16 *palette, u16 *destPixels)
|
||||
{
|
||||
u16 i, j, k, l;
|
||||
u16 tileY, tileX, pixelY, pixelX;
|
||||
|
||||
/*
|
||||
Raw arithmetics are required to match this function.
|
||||
|
|
@ -362,48 +360,49 @@ static void sub_8106B90(u8 *a, u16 *b, u16 *c)
|
|||
calculate dimensions manually (as seen in other functions),
|
||||
tell that it may have been this way in the original code.
|
||||
*/
|
||||
for (i = 0; i < 8; i++)
|
||||
for (tileY = 0; tileY < 8; tileY++)
|
||||
{
|
||||
for (j = 0; j < 8; j++)
|
||||
for (tileX = 0; tileX < 8; tileX++)
|
||||
{
|
||||
for (k = 0; k < 8; k++)
|
||||
for (pixelY = 0; pixelY < 8; pixelY++)
|
||||
{
|
||||
for (l = 0; l < 8; l++)
|
||||
for (pixelX = 0; pixelX < 8; pixelX++)
|
||||
{
|
||||
u8 temp = a[(((i * 8) + j) * 32) + (k << 2) + (l >> 1)];
|
||||
u8 colorIndex = spriteGfx[(((tileY * 8) + tileX) * 32) + (pixelY << 2) + (pixelX >> 1)];
|
||||
/*
|
||||
The shifts have to be there to match r0 and r2's order in one instruction:
|
||||
add r5, r2, r0
|
||||
This also makes agbcc's expression order parsing even more super sensitive
|
||||
and obscene when it comes to parentheses affecting regalloc regardless if
|
||||
unnecessary, requiring j must be placed in the front to match, or else
|
||||
unnecessary, requiring tileX must be placed in the front to match, or else
|
||||
regalloc breaks again and does this a few instructions above:
|
||||
add r0, r3, r7 <- regswap
|
||||
*/
|
||||
|
||||
if (l & 1)
|
||||
temp /= 16;
|
||||
if (pixelX & 1)
|
||||
colorIndex /= 16;
|
||||
else
|
||||
temp %= 16;
|
||||
colorIndex %= 16;
|
||||
|
||||
// Same order as above needs to be written here, or else this happens:
|
||||
// add r0, r7, r1 <- regswap
|
||||
if (temp == 0)
|
||||
*(u16 *)(c + (((i * 8) + k) << 6) + ((j * 8) + l)) = 0x8000;
|
||||
if (colorIndex == 0)
|
||||
*(u16 *)(destPixels + (((tileY * 8) + pixelY) << 6) + ((tileX * 8) + pixelX)) = 0x8000;
|
||||
else
|
||||
*(u16 *)(c + (((i * 8) + k) << 6) + ((j * 8) + l)) = b[temp];
|
||||
*(u16 *)(destPixels + (((tileY * 8) + pixelY) << 6) + ((tileX * 8) + pixelX)) =
|
||||
palette[colorIndex];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_8106C40(u8 arg0, u8 arg1)
|
||||
static void LoadContestPaintingFrame(u8 contestWinnerId, u8 isForArtist)
|
||||
{
|
||||
u8 x, y;
|
||||
|
||||
LoadPalette(gPictureFramePalettes, 0, sizeof(gPictureFramePalettes));
|
||||
if (arg1 == 1)
|
||||
if (isForArtist == TRUE)
|
||||
{
|
||||
switch (gContestPaintingWinner->contestCategory / 3)
|
||||
{
|
||||
|
|
@ -451,7 +450,7 @@ static void sub_8106C40(u8 arg0, u8 arg1)
|
|||
|
||||
#undef VRAM_PICTURE_DATA
|
||||
}
|
||||
else if (arg0 < 8)
|
||||
else if (contestWinnerId < 8)
|
||||
{
|
||||
RLUnCompVram(gPictureFrameTiles_5, (void *)VRAM);
|
||||
RLUnCompVram(gPictureFrameTilemap_5, (void *)(VRAM + 0x6000));
|
||||
|
|
@ -484,29 +483,28 @@ static void sub_8106C40(u8 arg0, u8 arg1)
|
|||
}
|
||||
}
|
||||
|
||||
static void sub_8106E98(u8 arg0)
|
||||
static void InitPaintingMonOamData(u8 contestWinnerId)
|
||||
{
|
||||
//Some hacks just to get the asm to match
|
||||
#ifndef NONMATCHING
|
||||
asm(""::"r"(arg0));
|
||||
#endif
|
||||
|
||||
gMain.oamBuffer[0] = sContestPaintingMonOamData;
|
||||
gMain.oamBuffer[0].tileNum = 0;
|
||||
|
||||
#ifndef NONMATCHING
|
||||
if (arg0) arg0 = gMain.oamBuffer[0].tileNum;
|
||||
#endif
|
||||
|
||||
gMain.oamBuffer[0].x = 88;
|
||||
gMain.oamBuffer[0].y = 24;
|
||||
if (contestWinnerId > 1)
|
||||
{
|
||||
gMain.oamBuffer[0].x = 88;
|
||||
gMain.oamBuffer[0].y = 24;
|
||||
}
|
||||
else // duplicated code branch
|
||||
{
|
||||
gMain.oamBuffer[0].x = 88;
|
||||
gMain.oamBuffer[0].y = 24;
|
||||
}
|
||||
}
|
||||
|
||||
static u8 sub_8106EE0(u8 arg0)
|
||||
static u8 GetImageEffectForContestWinner(u8 contestWinnerId)
|
||||
{
|
||||
u8 contestType;
|
||||
|
||||
if (arg0 < 8)
|
||||
if (contestWinnerId < 8)
|
||||
contestType = gContestPaintingWinner->contestCategory;
|
||||
else
|
||||
contestType = gContestPaintingWinner->contestCategory / 3;
|
||||
|
|
@ -528,55 +526,55 @@ static u8 sub_8106EE0(u8 arg0)
|
|||
return contestType;
|
||||
}
|
||||
|
||||
static void sub_8106F4C(void)
|
||||
static void AllocPaintingResources(void)
|
||||
{
|
||||
gContestPaintingMonPalette = ewram15E00.palette;
|
||||
gContestMonPixels = (void *)&ewram15E00.pixels;
|
||||
gContestPaintingMonPalette = eContestPaintingBuffers.palette;
|
||||
gContestMonPixels = (void *)eContestPaintingBuffers.pixels;
|
||||
}
|
||||
|
||||
static void sub_8106F6C(u8 arg0)
|
||||
static void DoContestPaintingImageProcessing(u8 imageEffect)
|
||||
{
|
||||
gImageProcessingContext.var_4 = gContestMonPixels;
|
||||
gImageProcessingContext.var_8 = gContestPaintingMonPalette;
|
||||
gImageProcessingContext.var_18 = 0;
|
||||
gImageProcessingContext.var_1F = gContestPaintingWinner->personality % 256;
|
||||
gImageProcessingContext.var_19 = 0;
|
||||
gImageProcessingContext.var_1A = 0;
|
||||
gImageProcessingContext.var_1B = 64;
|
||||
gImageProcessingContext.var_1C = 64;
|
||||
gImageProcessingContext.var_1D = 64;
|
||||
gImageProcessingContext.var_1E = 64;
|
||||
gImageProcessingContext.canvasPixels = gContestMonPixels;
|
||||
gImageProcessingContext.canvasPalette = gContestPaintingMonPalette;
|
||||
gImageProcessingContext.paletteStart = 0;
|
||||
gImageProcessingContext.personality = gContestPaintingWinner->personality % 256;
|
||||
gImageProcessingContext.columnStart = 0;
|
||||
gImageProcessingContext.rowStart = 0;
|
||||
gImageProcessingContext.columnEnd = 64;
|
||||
gImageProcessingContext.rowEnd = 64;
|
||||
gImageProcessingContext.canvasWidth = 64;
|
||||
gImageProcessingContext.canvasHeight = 64;
|
||||
|
||||
switch (arg0)
|
||||
switch (imageEffect)
|
||||
{
|
||||
case CONTESTRESULT_SMART:
|
||||
case CONTESTRESULT_TOUGH:
|
||||
gImageProcessingContext.var_14 = 3;
|
||||
gImageProcessingContext.quantizeEffect = QUANTIZE_EFFECT_GRAYSCALE;
|
||||
break;
|
||||
case CONTESTRESULT_COOL:
|
||||
case CONTESTRESULT_BEAUTY:
|
||||
case CONTESTRESULT_CUTE:
|
||||
default:
|
||||
gImageProcessingContext.var_14 = 1;
|
||||
gImageProcessingContext.quantizeEffect = QUANTIZE_EFFECT_STANDARD_LIMITED_COLORS;
|
||||
break;
|
||||
}
|
||||
|
||||
gImageProcessingContext.var_16 = 2;
|
||||
gImageProcessingContext.var_0 = arg0;
|
||||
gImageProcessingContext.var_10 = OBJ_VRAM0;
|
||||
gImageProcessingContext.bgType = 2;
|
||||
gImageProcessingContext.effect = imageEffect;
|
||||
gImageProcessingContext.dest = OBJ_VRAM0;
|
||||
|
||||
sub_80FC7A0(&gImageProcessingContext);
|
||||
sub_80FDA18(&gImageProcessingContext);
|
||||
sub_80FD8CC(&gImageProcessingContext);
|
||||
ApplyImageProcessingEffects(&gImageProcessingContext);
|
||||
ApplyImageProcessingQuantization(&gImageProcessingContext);
|
||||
ConvertImageProcessingToGBA(&gImageProcessingContext);
|
||||
|
||||
LoadPalette(gContestPaintingMonPalette, 256, 256 * 2);
|
||||
}
|
||||
|
||||
static void CreateContestPaintingPicture(u8 arg0, u8 arg1)
|
||||
static void CreateContestPaintingPicture(u8 contestWinnerId, u8 isForArtist)
|
||||
{
|
||||
sub_8106F4C();
|
||||
sub_8106AC4(gContestPaintingWinner->species, 0);
|
||||
sub_8106F6C(sub_8106EE0(arg0));
|
||||
sub_8106E98(arg0);
|
||||
sub_8106C40(arg0, arg1);
|
||||
AllocPaintingResources();
|
||||
InitContestMonPixels(gContestPaintingWinner->species, 0);
|
||||
DoContestPaintingImageProcessing(GetImageEffectForContestWinner(contestWinnerId));
|
||||
InitPaintingMonOamData(contestWinnerId);
|
||||
LoadContestPaintingFrame(contestWinnerId, isForArtist);
|
||||
}
|
||||
|
|
|
|||
3210
src/data/pointillism_points.h
Normal file
3210
src/data/pointillism_points.h
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -2670,14 +2670,14 @@ void debug_80C6B00(u8 taskId)
|
|||
|
||||
void debug_80C6CB8(u8 taskId)
|
||||
{
|
||||
DecompressPicFromTable_2(gMonFrontPicTable + gUnknown_Debug_2038A20->unk0, gMonFrontPicCoords[gUnknown_Debug_2038A20->unk0].coords, gMonFrontPicCoords[gUnknown_Debug_2038A20->unk0].y_offset, gUnknown_081FAF4C[0], gUnknown_081FAF4C[1], gUnknown_Debug_2038A20->unk0);
|
||||
DecompressPicFromTable_2(gMonFrontPicTable + gUnknown_Debug_2038A20->unk0, gMonFrontPicCoords[gUnknown_Debug_2038A20->unk0].coords, gMonFrontPicCoords[gUnknown_Debug_2038A20->unk0].y_offset, gMonSpriteGfx_Sprite_ptr[0], gMonSpriteGfx_Sprite_ptr[1], gUnknown_Debug_2038A20->unk0);
|
||||
LoadCompressedObjectPalette(gMonPaletteTable + gUnknown_Debug_2038A20->unk0);
|
||||
GetMonSpriteTemplate_803C56C(gUnknown_Debug_2038A20->unk0, 1);
|
||||
gUnknown_Debug_2038A20->unk2 = CreateSprite(&gUnknown_02024E8C, 0x28, 0x28, 0);
|
||||
gSprites[gUnknown_Debug_2038A20->unk2].callback = debug_69;
|
||||
gSprites[gUnknown_Debug_2038A20->unk2].oam.priority = 0;
|
||||
|
||||
DecompressPicFromTable_2(gMonBackPicTable + gUnknown_Debug_2038A20->unk0, gMonBackPicCoords[gUnknown_Debug_2038A20->unk0].coords, gMonBackPicCoords[gUnknown_Debug_2038A20->unk0].y_offset, gUnknown_081FAF4C[0], gUnknown_081FAF4C[2], gUnknown_Debug_2038A20->unk0);
|
||||
DecompressPicFromTable_2(gMonBackPicTable + gUnknown_Debug_2038A20->unk0, gMonBackPicCoords[gUnknown_Debug_2038A20->unk0].coords, gMonBackPicCoords[gUnknown_Debug_2038A20->unk0].y_offset, gMonSpriteGfx_Sprite_ptr[0], gMonSpriteGfx_Sprite_ptr[2], gUnknown_Debug_2038A20->unk0);
|
||||
LoadCompressedObjectPalette(gMonPaletteTable + gUnknown_Debug_2038A20->unk0);
|
||||
GetMonSpriteTemplate_803C56C(gUnknown_Debug_2038A20->unk0, 2);
|
||||
gUnknown_Debug_2038A20->unk3 = CreateSprite(&gUnknown_02024E8C, 0x28, 0x78, 0);
|
||||
|
|
@ -3297,7 +3297,7 @@ void debug_80C777C(u8 taskId)
|
|||
|
||||
void debug_80C7934(u8 taskId)
|
||||
{
|
||||
DecompressPicFromTable_2(gTrainerFrontPicTable + gUnknown_Debug_2038A20->unk0, gTrainerFrontPicCoords[gUnknown_Debug_2038A20->unk0].coords, gTrainerFrontPicCoords[gUnknown_Debug_2038A20->unk0].y_offset, gUnknown_081FAF4C[0], gUnknown_081FAF4C[1], gUnknown_Debug_2038A20->unk0);
|
||||
DecompressPicFromTable_2(gTrainerFrontPicTable + gUnknown_Debug_2038A20->unk0, gTrainerFrontPicCoords[gUnknown_Debug_2038A20->unk0].coords, gTrainerFrontPicCoords[gUnknown_Debug_2038A20->unk0].y_offset, gMonSpriteGfx_Sprite_ptr[0], gMonSpriteGfx_Sprite_ptr[1], gUnknown_Debug_2038A20->unk0);
|
||||
LoadCompressedObjectPalette(gTrainerFrontPicPaletteTable + gUnknown_Debug_2038A20->unk0);
|
||||
GetMonSpriteTemplate_803C5A0(gUnknown_Debug_2038A20->unk0, 1);
|
||||
gUnknown_Debug_2038A20->unk2 = CreateSprite(&gUnknown_02024E8C, 0x28, 0x28, 0);
|
||||
|
|
|
|||
|
|
@ -71,8 +71,8 @@ void HandleLoadSpecialPokePic(const struct CompressedSpriteSheet *src, u32 coord
|
|||
{
|
||||
u32 frontOrBack;
|
||||
|
||||
// gUnknown_081FAF4C appears to be a list of pointers to locations to store poke pics for back and front pic here. the first and third pointers are used for back while the others are used for front.
|
||||
if (dest == gUnknown_081FAF4C[0] || dest == gUnknown_081FAF4C[2])
|
||||
// gMonSpriteGfx_Sprite_ptr appears to be a list of pointers to locations to store poke pics for back and front pic here. the first and third pointers are used for back while the others are used for front.
|
||||
if (dest == gMonSpriteGfx_Sprite_ptr[0] || dest == gMonSpriteGfx_Sprite_ptr[2])
|
||||
frontOrBack = 0; // backPic
|
||||
else
|
||||
frontOrBack = 1; // frontPic
|
||||
|
|
|
|||
|
|
@ -356,7 +356,7 @@ static u8 EggHatchCreateMonSprite(u8 a0, u8 switchID, u8 pokeID)
|
|||
{
|
||||
u16 species = GetMonData(mon, MON_DATA_SPECIES);
|
||||
u32 pid = GetMonData(mon, MON_DATA_PERSONALITY);
|
||||
HandleLoadSpecialPokePic(&gMonFrontPicTable[species], gMonFrontPicCoords[species].coords, gMonFrontPicCoords[species].y_offset, ewram0_6, gUnknown_081FAF4C[2 * a0 + 1], species, pid);
|
||||
HandleLoadSpecialPokePic(&gMonFrontPicTable[species], gMonFrontPicCoords[species].coords, gMonFrontPicCoords[species].y_offset, ewram0_6, gMonSpriteGfx_Sprite_ptr[2 * a0 + 1], species, pid);
|
||||
LoadCompressedObjectPalette(GetMonSpritePalStruct(mon));
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ void EvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, bool8 canStopEvo,
|
|||
gMonFrontPicCoords[currSpecies].coords,
|
||||
gMonFrontPicCoords[currSpecies].y_offset,
|
||||
(void*)EWRAM,
|
||||
gUnknown_081FAF4C[1], currSpecies);
|
||||
gMonSpriteGfx_Sprite_ptr[1], currSpecies);
|
||||
pokePal = (void*) GetMonSpritePalStructFromOtIdPersonality(currSpecies, TiD, PiD);
|
||||
LoadCompressedPalette(*pokePal, 0x110, 0x20);
|
||||
|
||||
|
|
@ -245,7 +245,7 @@ void EvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, bool8 canStopEvo,
|
|||
gMonFrontPicCoords[speciesToEvolve].coords,
|
||||
gMonFrontPicCoords[speciesToEvolve].y_offset,
|
||||
(void*)EWRAM,
|
||||
gUnknown_081FAF4C[3], speciesToEvolve);
|
||||
gMonSpriteGfx_Sprite_ptr[3], speciesToEvolve);
|
||||
pokePal = (void*) GetMonSpritePalStructFromOtIdPersonality(speciesToEvolve, TiD, PiD);
|
||||
LoadCompressedPalette(*pokePal, 0x120, 0x20);
|
||||
|
||||
|
|
@ -325,7 +325,7 @@ static void CB2_EvolutionSceneLoadGraphics(void)
|
|||
gMonFrontPicCoords[postEvoSpecies].coords,
|
||||
gMonFrontPicCoords[postEvoSpecies].y_offset,
|
||||
(void*)EWRAM,
|
||||
gUnknown_081FAF4C[3], postEvoSpecies);
|
||||
gMonSpriteGfx_Sprite_ptr[3], postEvoSpecies);
|
||||
pokePal = (void*) GetMonSpritePalStructFromOtIdPersonality(postEvoSpecies, TiD, PiD);
|
||||
LoadCompressedPalette(*pokePal, 0x120, 0x20);
|
||||
|
||||
|
|
@ -395,7 +395,7 @@ static void CB2_TradeEvolutionSceneLoadGraphics(void)
|
|||
gMonFrontPicCoords[postEvoSpecies].coords,
|
||||
gMonFrontPicCoords[postEvoSpecies].y_offset,
|
||||
(void*)EWRAM,
|
||||
gUnknown_081FAF4C[3], postEvoSpecies);
|
||||
gMonSpriteGfx_Sprite_ptr[3], postEvoSpecies);
|
||||
pokePal = (void*) GetMonSpritePalStructFromOtIdPersonality(postEvoSpecies, TiD, PiD);
|
||||
LoadCompressedPalette(*pokePal, 0x120, 0x20);
|
||||
gMain.state++;
|
||||
|
|
@ -445,7 +445,7 @@ void TradeEvolutionScene(struct Pokemon* mon, u16 speciesToEvolve, u8 preEvoSpri
|
|||
gMonFrontPicCoords[speciesToEvolve].coords,
|
||||
gMonFrontPicCoords[speciesToEvolve].y_offset,
|
||||
(void*)EWRAM,
|
||||
gUnknown_081FAF4C[1], speciesToEvolve);
|
||||
gMonSpriteGfx_Sprite_ptr[1], speciesToEvolve);
|
||||
pokePal = (void*) GetMonSpritePalStructFromOtIdPersonality(speciesToEvolve, TiD, PiD);
|
||||
LoadCompressedPalette(*pokePal, 0x120, 0x20);
|
||||
|
||||
|
|
|
|||
|
|
@ -543,7 +543,7 @@ u8 CreateBirchSprite(s16 x, s16 y, u8 subpriority)
|
|||
|
||||
u8 CreateMonSprite_PicBox(u16 species, s16 x, s16 y, u8 subpriority)
|
||||
{
|
||||
DecompressPicFromTable_2(&gMonFrontPicTable[species], gMonFrontPicCoords[species].coords, gMonFrontPicCoords[species].y_offset, gUnknown_081FAF4C[3], gUnknown_081FAF4C[3], species);
|
||||
DecompressPicFromTable_2(&gMonFrontPicTable[species], gMonFrontPicCoords[species].coords, gMonFrontPicCoords[species].y_offset, gMonSpriteGfx_Sprite_ptr[3], gMonSpriteGfx_Sprite_ptr[3], species);
|
||||
LoadCompressedObjectPalette(&gMonPaletteTable[species]);
|
||||
GetMonSpriteTemplate_803C56C(species, 3);
|
||||
gUnknown_02024E8C.paletteTag = gMonPaletteTable[0].tag;
|
||||
|
|
@ -555,7 +555,7 @@ u8 CreateMonSprite_FieldMove(u16 species, u32 d, u32 g, s16 x, s16 y, u8 subprio
|
|||
{
|
||||
const struct CompressedSpritePalette *spritePalette;
|
||||
|
||||
HandleLoadSpecialPokePic(&gMonFrontPicTable[species], gMonFrontPicCoords[species].coords, gMonFrontPicCoords[species].y_offset, (u32)gUnknown_081FAF4C[3] /* this is actually u8* or something, pointing to ewram */, gUnknown_081FAF4C[3], species, g);
|
||||
HandleLoadSpecialPokePic(&gMonFrontPicTable[species], gMonFrontPicCoords[species].coords, gMonFrontPicCoords[species].y_offset, (u32)gMonSpriteGfx_Sprite_ptr[3] /* this is actually u8* or something, pointing to ewram */, gMonSpriteGfx_Sprite_ptr[3], species, g);
|
||||
spritePalette = GetMonSpritePalStructFromOtIdPersonality(species, d, g);
|
||||
LoadCompressedObjectPalette(spritePalette);
|
||||
GetMonSpriteTemplate_803C56C(species, 3);
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1424,8 +1424,8 @@ u8 CreateAzurillSprite(u8 x, u8 y)
|
|||
&gMonFrontPicTable[SPECIES_AZURILL],
|
||||
gMonFrontPicCoords[SPECIES_AZURILL].coords,
|
||||
gMonFrontPicCoords[SPECIES_AZURILL].y_offset,
|
||||
gUnknown_081FAF4C[0],
|
||||
gUnknown_081FAF4C[1],
|
||||
gMonSpriteGfx_Sprite_ptr[0],
|
||||
gMonSpriteGfx_Sprite_ptr[1],
|
||||
SPECIES_AZURILL);
|
||||
LoadCompressedObjectPalette(&gMonPaletteTable[SPECIES_AZURILL]);
|
||||
GetMonSpriteTemplate_803C56C(SPECIES_AZURILL, 1);
|
||||
|
|
|
|||
|
|
@ -616,7 +616,7 @@ static bool8 sub_8147B20(struct Pokemon* mon)
|
|||
case 0:
|
||||
species = GetMonData(mon, MON_DATA_SPECIES2);
|
||||
PiD = GetMonData(mon, MON_DATA_PERSONALITY);
|
||||
HandleLoadSpecialPokePic(&gMonFrontPicTable[species], gMonFrontPicCoords[species].coords, gMonFrontPicCoords[species].y_offset, EWRAM, gUnknown_081FAF4C[1], species, PiD);
|
||||
HandleLoadSpecialPokePic(&gMonFrontPicTable[species], gMonFrontPicCoords[species].coords, gMonFrontPicCoords[species].y_offset, EWRAM, gMonSpriteGfx_Sprite_ptr[1], species, PiD);
|
||||
ewram1FFFF++;
|
||||
break;
|
||||
case 1:
|
||||
|
|
|
|||
|
|
@ -473,7 +473,7 @@ u16 SpeciesToCryId(u16 species)
|
|||
|
||||
void unref_sub_803F938(u16 species, u32 personality, u8 *dest)
|
||||
{
|
||||
if (species == SPECIES_SPINDA && dest != gUnknown_081FAF4C[0] && dest != gUnknown_081FAF4C[2])
|
||||
if (species == SPECIES_SPINDA && dest != gMonSpriteGfx_Sprite_ptr[0] && dest != gMonSpriteGfx_Sprite_ptr[2])
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 4; i++)
|
||||
|
|
|
|||
|
|
@ -1839,7 +1839,7 @@ static u8 SummaryScreen_LoadPokemonSprite(struct Pokemon *mon, u8 *state)
|
|||
gMonFrontPicCoords[species].coords,
|
||||
gMonFrontPicCoords[species].y_offset,
|
||||
ewram_addr,
|
||||
gUnknown_081FAF4C[1],
|
||||
gMonSpriteGfx_Sprite_ptr[1],
|
||||
species,
|
||||
personality);
|
||||
*state += 1;
|
||||
|
|
|
|||
|
|
@ -287,8 +287,8 @@ void ShowContestEntryMonPic(void)
|
|||
&gMonFrontPicTable[species],
|
||||
gMonFrontPicCoords[species].coords,
|
||||
gMonFrontPicCoords[species].y_offset,
|
||||
(u32)gUnknown_081FAF4C[0],
|
||||
gUnknown_081FAF4C[1],
|
||||
(u32)gMonSpriteGfx_Sprite_ptr[0],
|
||||
gMonSpriteGfx_Sprite_ptr[1],
|
||||
species,
|
||||
var1);
|
||||
palette = GetMonSpritePalStructFromOtIdPersonality(species, var2, var1);
|
||||
|
|
|
|||
|
|
@ -714,7 +714,7 @@ static u8 CreatePokemonFrontSprite(u16 species, u8 x, u8 y)
|
|||
DecompressPicFromTable_2(
|
||||
&gMonFrontPicTable[species],
|
||||
gMonFrontPicCoords[species].coords, gMonFrontPicCoords[species].y_offset,
|
||||
gUnknown_081FAF4C[0], gUnknown_081FAF4C[1],
|
||||
gMonSpriteGfx_Sprite_ptr[0], gMonSpriteGfx_Sprite_ptr[1],
|
||||
species);
|
||||
LoadCompressedObjectPalette(&gMonPaletteTable[species]);
|
||||
GetMonSpriteTemplate_803C56C(species, 1);
|
||||
|
|
|
|||
|
|
@ -1480,7 +1480,7 @@ const struct WindowTemplate gWindowTemplate_81E7144 =
|
|||
BG_SCREEN_ADDR(31), // tilemap
|
||||
};
|
||||
|
||||
const struct WindowTemplate gWindowTemplate_81E7160 =
|
||||
const struct WindowTemplate gWindowTemplate_ContestPainting =
|
||||
{
|
||||
1, // BG number
|
||||
1, // BG character base block
|
||||
|
|
|
|||
|
|
@ -3522,7 +3522,7 @@ static void sub_804B2D0(u8 whichParty, u8 a1)
|
|||
case 0:
|
||||
species = GetMonData(pokemon, MON_DATA_SPECIES2);
|
||||
personality = GetMonData(pokemon, MON_DATA_PERSONALITY);
|
||||
HandleLoadSpecialPokePic(&gMonFrontPicTable[species], gMonFrontPicCoords[species].coords, gMonFrontPicCoords[species].y_offset, (u32)gSharedMem, gUnknown_081FAF4C[whichParty * 2 + 1], species, personality);
|
||||
HandleLoadSpecialPokePic(&gMonFrontPicTable[species], gMonFrontPicCoords[species].coords, gMonFrontPicCoords[species].y_offset, (u32)gSharedMem, gMonSpriteGfx_Sprite_ptr[whichParty * 2 + 1], species, personality);
|
||||
LoadCompressedObjectPalette(GetMonSpritePalStruct(pokemon));
|
||||
gUnknown_03004828->tradeSpecies[whichParty] = species;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ const struct TrainerCard sTestTrainerCard =
|
|||
.stars = 4,
|
||||
.hasPokedex = TRUE,
|
||||
.var_3 = TRUE,
|
||||
.var_4 = TRUE,
|
||||
.canvasPixels = TRUE,
|
||||
.firstHallOfFameA = 999,
|
||||
.firstHallOfFameB = 99,
|
||||
.firstHallOfFameC = 99,
|
||||
|
|
|
|||
|
|
@ -292,16 +292,16 @@ SYMBOL(gUnknown_03005D38, 4)
|
|||
SYMBOL(gUnknown_03005DA0, 0x48)
|
||||
|
||||
// contest_painting_effects.c
|
||||
SYMBOL(gUnknown_03005DE8, 4)
|
||||
SYMBOL(gUnknown_03005DEC, 4)
|
||||
SYMBOL(gUnknown_03005DF0, 4)
|
||||
SYMBOL(gUnknown_03005DF4, 4)
|
||||
SYMBOL(gUnknown_03005DF8, 4)
|
||||
SYMBOL(gUnknown_03005DFC, 4)
|
||||
SYMBOL(gUnknown_03005E00, 4)
|
||||
SYMBOL(gUnknown_03005E04, 4)
|
||||
SYMBOL(gUnknown_03005E08, 4)
|
||||
SYMBOL(gUnknown_03005E0C, 4)
|
||||
SYMBOL(gCanvasColumnStart, 4)
|
||||
SYMBOL(gCanvasPixels, 4)
|
||||
SYMBOL(gCanvasRowEnd, 4)
|
||||
SYMBOL(gCanvasHeight, 4)
|
||||
SYMBOL(gCanvasColumnEnd, 4)
|
||||
SYMBOL(gCanvasRowStart, 4)
|
||||
SYMBOL(gCanvasMonPersonality, 4)
|
||||
SYMBOL(gCanvasWidth, 4)
|
||||
SYMBOL(gCanvasPalette, 4)
|
||||
SYMBOL(gCanvasPaletteStart, 4)
|
||||
|
||||
// contest_painting.c
|
||||
SYMBOL(gContestMonPixels, 4)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user