Skip to content

Commit

Permalink
Add FEB patch for AnimNumberfx
Browse files Browse the repository at this point in the history
  • Loading branch information
MokhaLeee committed Dec 10, 2024
1 parent 102a283 commit b99ac2c
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 5 deletions.
19 changes: 19 additions & 0 deletions Patches/PATCH_AnimNumberfx.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
NAME=[CSKILL_K] AnimNumberfx
TYPE=IMAGE
TAG=#ENGINE

AUTHOR=Mokha(悠木晓缺)
IF:0xB2A604=0x43 0x53 0x4B 0x49 0x4C 0x4C 0x53 0x59 0x53 0x5F 0x4B 0x2D 0x30 0x39 0x78 0x00

INFO=[CSKILL_K] AnimNumberfx

WIDTH=176
HEIGHT=32

IMAGE_POINTER=0xB2A768

CHECK_IMAGE_ADDRESS_FOR_FELINT=true

PALETTE_POINTER=0xB2A76C
PALETTE=1
KEEPPALETTE=false
3 changes: 3 additions & 0 deletions Preload/Reloc.event
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,7 @@ gpSkillInfos_Desc: POIN gSkillInfos + 6 // This is limited by FEB function: Inpu

gpGaidenChaxConfigs: POIN gGaidenChaxConfigs

gpImg_EfxAnimNumber: POIN Img_EfxAnimNumber
gpPal_EfxAnimNumber: POIN Pal_EfxAnimNumber

KERNEL_RELOC_END:
6 changes: 3 additions & 3 deletions Wizardry/Common/BanimHack/AnimNumber/Source/AnimNumber.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void SetupEfxAnimNumberGfx(int number, int slot)
int lo = simple_mod(abs_num, 10);

VramCopyAnimNumber(
Img_EfxAnimNumber + (base_chr + lo * 2) * CHR_SIZE,
gpImg_EfxAnimNumber + (base_chr + lo * 2) * CHR_SIZE,
vram_base + i * 2 * CHR_SIZE
);

Expand All @@ -53,14 +53,14 @@ void SetupEfxAnimNumberGfx(int number, int slot)
* Prefix image
*/
VramCopyAnimNumber(
Img_EfxAnimNumber + (base_chr + 10 * 2) * CHR_SIZE,
gpImg_EfxAnimNumber + (base_chr + 10 * 2) * CHR_SIZE,
vram_base + i * 2 * CHR_SIZE
);

/**
* Pal
*/
ApplyPalette(Pal_EfxAnimNumber, 0x10 + OBPAL_CHAX_ANIMNUM);
ApplyPalette(gpPal_EfxAnimNumber, 0x10 + OBPAL_CHAX_ANIMNUM);
}

ProcPtr NewEfxAnimNumberExt(int x, int y, int number)
Expand Down
7 changes: 5 additions & 2 deletions include/banim-hack.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ enum chax_banim_video_alloc {
ProcPtr NewEfxAnimNumberExt(int number, int x, int y);
ProcPtr NewEfxAnimNumber(struct Anim *anim, int number);

extern const u8 Img_EfxAnimNumber[];
extern const u16 Pal_EfxAnimNumber[];
// extern const u8 Img_EfxAnimNumber[];
// extern const u16 Pal_EfxAnimNumber[];

extern u8 const *const gpImg_EfxAnimNumber;
extern u16 const *const gpPal_EfxAnimNumber;
extern AnimScr AnimScr_AnimNumber[];

0 comments on commit b99ac2c

Please sign in to comment.