int frame = 1;
u16* charPtr = NULL;
u16* animationFile = NULL;
int *tileset1ID = (int*)(0x020CACBC);
void copy8Tile(int dn, int sn)
{
u16* destPtr = charPtr + dn * (8 * 8 / 2) + (256 * 48 / 2);
u16* srcPtr = animationFile + sn * (8 * 8 / 2);
for(int i = 0; i < 8*8/2; i++)
destPtr[i] = srcPtr[i];
}
void copyTile(int dx, int dy, int sx, int sy)
{
sy += sx / 4;
sx %= 4;
copy8Tile(dx*2 + dy*64, sx*2+sy*32);
copy8Tile(dx*2+1 + dy*64, sx*2+1+sy*32);
copy8Tile(dx*2 + dy*64+32, sx*2+sy*16+8);
copy8Tile(dx*2+1 + dy*64+32, sx*2+1+sy*16+8);
}
void hook_020b8370()
{
frame++;
if(frame == 4*6) frame = 0;
charPtr = G2_GetBG2CharPtr();
if (*tileset1ID == 67) copyTile(0, 0, frame%4, 0);
}
void hook_020AE318()
{
animationFile = (u16*) allocFromCacheTable(28672);
loadFileByExtId_LZ_Dest(179 - 0x83, animationFile); //ExtID 179 -> wrecking_crew.narc
}```
#Port animated tiles code to NCP
1 messages · Page 1 of 1 (latest)
This man will never stop😭 🙏
please post a link to the thread instead of copy-pasting the code
otherwise we have no information on what's even its purpose
and again, more descriptive titles
Port animated tiles code to NCP
Oh oki
The NSMB hacking forum: everything about hacking and remaking the Nintendo DS game New Super Mario Bros. And more!
I need this for animating:
Tank weels
Small munchers (snow tileset)
Small munchers (cliff tileset)
Big munchers (cliff tileset)
I dont think you "need" it lol
ehhh uneccesary dogpiling ngl
i can see this be more useful than a need, and a lot of people are likely to use it lol
Tbf I always wanted to have animated tilesets too, lmao
I would do it but I dont know how oam works, the best I can do is actors that switch between four textures
like i did with tripple blocks and double blocks, they switch between eight textures though
stupid idea but how about an actor from which you could set an id and this id would be the files?
cuz most of the time tiles that are animated are usually uncollidable or unreachable (decoration basically)
not sure if thats doable though
O
see these flowers and grass are 3d models
thats easy to do, all you would need to do is load those models and animations
the titlescreen elements are manually drawn quads which are simply shear'ed
same process can be done with models via their matrix
https://discord.com/channels/399424476259024897/1290157166858342500 I wonder when my requests will ever get done😔
the majority of requests will quite probably not get done
thats because there is only life five people who can help out with code hacks, and most of these take a lot of effort
Its doable for munchers, but whats about the tank whells
no, they have models and animations
Yeah
zamn didn't know
nintendo real fucked up
blud really thought nintendo had the ability to not make something overly complicated ☠️
Has nobody tried animating tiles of a tileset?
people have thats why dirbaio made a code hack for it a while ago
Ah bruh, it was literally in the thread