Lance Koijer 2.0
Lance Koijer
- 105
- Posts
- 7
- Years
- Criscanto Town
- Seen Jan 31, 2024
Hi Guys, I've been having issues replacing the player's backsprite using CFRU:
Here's what happens in game every time I apply CFRU:
I always get this error when trying to compile CFRU but it's still compiling at the end:
I think that's the error but I don't know how and where to fix it.
Here's the changes that I made in the C File:
const struct CompressedSpritePalette gTrainerBackPicPaletteTable[] =
const union AnimCmd* const* const gTrainerBackAnimsPtrTable[] =
I think this is what's making me get the compilation error but I don't really know what's wrong with it:
const struct SpriteTemplate gSpriteTemplateTable_TrainerBackSprites[] =
If anyone here can point out what I did wrong, that'd much appreciated
Here's what happens in game every time I apply CFRU:
I always get this error when trying to compile CFRU but it's still compiling at the end:
Spoiler:
Code:
PS E:\Pokemon Hacking\Complete-Fire-Red-Upgrade-master> python scripts/make.py
DevKit does not exist in your Path variable.
Checking default location.
Devkit found.
Compiling ./src\Tables\back_pic_tables.c
./src\Tables\back_pic_tables.c:178:55: warning: excess elements in struct initializer
178 | {gTrainerBackPic_WyattTiles, + 0x0800, 0x800, 0},
| ^
./src\Tables\back_pic_tables.c:178:55: note: (near initialization for 'sTrainerBackPicTable_Wyatt[1]')
./src\Tables\back_pic_tables.c:179:55: warning: excess elements in struct initializer
179 | {gTrainerBackPic_WyattTiles, + 0x1000, 0x800, 0},
| ^
./src\Tables\back_pic_tables.c:179:55: note: (near initialization for 'sTrainerBackPicTable_Wyatt[2]')
./src\Tables\back_pic_tables.c:180:55: warning: excess elements in struct initializer
180 | {gTrainerBackPic_WyattTiles, + 0x1800, 0x800, 0},
| ^
./src\Tables\back_pic_tables.c:180:55: note: (near initialization for 'sTrainerBackPicTable_Wyatt[3]')
./src\Tables\back_pic_tables.c:186:56: warning: excess elements in struct initializer
186 | {gTrainerBackPic_CoraTiles, + 0x0800, 0x800, 0},
| ^
./src\Tables\back_pic_tables.c:186:56: note: (near initialization for 'sTrainerBackPicTable_Cora[1]')
./src\Tables\back_pic_tables.c:187:56: warning: excess elements in struct initializer
187 | {gTrainerBackPic_CoraTiles, + 0x1000, 0x800, 0},
| ^
./src\Tables\back_pic_tables.c:187:56: note: (near initialization for 'sTrainerBackPicTable_Cora[2]')
./src\Tables\back_pic_tables.c:188:56: warning: excess elements in struct initializer
188 | {gTrainerBackPic_CoraTiles, + 0x1800, 0x800, 0},
| ^
./src\Tables\back_pic_tables.c:188:56: note: (near initialization for 'sTrainerBackPicTable_Cora[3]')
Built in 0:00:00.962074.
Inserting code.
Inserted in 0:00:01.654124.
PS E:\Pokemon Hacking\Complete-Fire-Red-Upgrade-master>
I think that's the error but I don't know how and where to fix it.
Here's the changes that I made in the C File:
Code:
extern const u8 gTrainerBackPic_WyattPal[];
#define gTrainerPalette_Wyatt gTrainerBackPic_WyattPal
extern const u8 gTrainerBackPic_CoraPal[];
#define gTrainerPalette_Cora gTrainerBackPic_CoraPal
const struct CompressedSpritePalette gTrainerBackPicPaletteTable[] =
Code:
[TRAINER_BACK_PIC_RED] = {gTrainerPalette_Wyatt, TRAINER_BACK_PIC_RED},
[TRAINER_BACK_PIC_LEAF] = {gTrainerPalette_Cora, TRAINER_BACK_PIC_LEAF},
Code:
#define gTrainerBackAnims_Wyatt (const union AnimCmd* const*) 0x8239F54
#define gTrainerBackAnims_Cora (const union AnimCmd* const*) 0x8239F54
const union AnimCmd* const* const gTrainerBackAnimsPtrTable[] =
Code:
[TRAINER_BACK_PIC_RED] = gTrainerBackAnims_Wyatt,
[TRAINER_BACK_PIC_LEAF] = gTrainerBackAnims_Cora,
Code:
extern const u8 gTrainerBackPic_WyattTiles[];
extern const u8 gTrainerBackPic_CoraTiles[];
I think this is what's making me get the compilation error but I don't really know what's wrong with it:
Code:
static const struct SpriteFrameImage sTrainerBackPicTable_Wyatt[] =
{
{gTrainerBackPic_WyattTiles, 0x800, 0},
{gTrainerBackPic_WyattTiles, + 0x0800, 0x800, 0},
{gTrainerBackPic_WyattTiles, + 0x1000, 0x800, 0},
{gTrainerBackPic_WyattTiles, + 0x1800, 0x800, 0},
};
static const struct SpriteFrameImage sTrainerBackPicTable_Cora[] =
{
{gTrainerBackPic_CoraTiles, 0x800, 0},
{gTrainerBackPic_CoraTiles, + 0x0800, 0x800, 0},
{gTrainerBackPic_CoraTiles, + 0x1000, 0x800, 0},
{gTrainerBackPic_CoraTiles, + 0x1800, 0x800, 0},
};
const struct SpriteTemplate gSpriteTemplateTable_TrainerBackSprites[] =
Code:
[TRAINER_BACK_PIC_RED] =
{
.tileTag = 0xFFFF,
.paletteTag = 0,
.oam = gOamData_TrainerBacksprite,
.anims = NULL,
.images = sTrainerBackPicTable_Wyatt,
.affineAnims = gAffineAnims_TrainerBacksprite,
.callback = gSpriteCB_TrainerBacksprite,
},
[TRAINER_BACK_PIC_LEAF] =
{
.tileTag = 0xFFFF,
.paletteTag = 0,
.oam = gOamData_TrainerBacksprite,
.anims = NULL,
.images = sTrainerBackPicTable_Cora,
.affineAnims = gAffineAnims_TrainerBacksprite,
.callback = gSpriteCB_TrainerBacksprite,
},
If anyone here can point out what I did wrong, that'd much appreciated
Last edited: