#Port animated tiles code to NCP

1 messages · Page 1 of 1 (latest)

normal hornet
#

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
}```
#

And if possible at suport to 3 or more animated tilesets

fresh crown
#

This man will never stop😭 🙏

normal hornet
#

Bro its on the list

#

And its not only me that need this here

spare dragon
#

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

normal hornet
#

I need this for animating:
Tank weels
Small munchers (snow tileset)
Small munchers (cliff tileset)
Big munchers (cliff tileset)

muted lintel
#

I dont think you "need" it lol

random plank
fervent vector
#

Tbf I always wanted to have animated tilesets too, lmao

muted lintel
#

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

random plank
#

cuz most of the time tiles that are animated are usually uncollidable or unreachable (decoration basically)

#

not sure if thats doable though

muted lintel
#

already done that

#

though these are not animated

random plank
#

O

muted lintel
#

see these flowers and grass are 3d models

random plank
#

ohhh

#

do they have that effect from the title screen's flowers?

muted lintel
#

thats easy to do, all you would need to do is load those models and animations

spare dragon
#

the titlescreen elements are manually drawn quads which are simply shear'ed

#

same process can be done with models via their matrix

fresh crown
cedar walrus
#

the majority of requests will quite probably not get done

spare dragon
#

^

#

and insisting does not help

muted lintel
#

thats because there is only life five people who can help out with code hacks, and most of these take a lot of effort

normal hornet
scenic mountain
normal hornet
#

Yeah

spare dragon
#

nintendo real fucked up

ripe jolt
#

blud really thought nintendo had the ability to not make something overly complicated ☠️

vocal heron
#

Has nobody tried animating tiles of a tileset?

cedar walrus
vocal heron
#

Ah bruh, it was literally in the thread