1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-04 06:54:33 +00:00

Update asm_processor and use static variables in En_Torch2 (#740)

* Update asm_processor to current master

* Update variables in En_Torch2 to actually be static

This is now possible because asm_processor was updated to handle static symbols in GLOBAL_ASM

* Update tutorial to reflect changes about static symbol limitations
This commit is contained in:
Roman971 2021-03-27 21:26:59 +01:00 committed by GitHub
parent b863784893
commit 97f80eeb3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 84 additions and 26 deletions

View file

@ -23,8 +23,6 @@ Both approaches have their advantages and disadvantages.
<!-- Fig shows how to do this in his video. -->
This way is good for smaller actors with little data. It is not really suitable for EnJj, for example, because of the enormous section of data labelled as `D_80A88164`.
An important thing to bear in mind is that data cannot be made static if it is used in an undecompiled file (i.e. one that is `#pragma`'d), so it is best to make everything static only after the whole actor is decompiled.
### Example: `EnTg`
We give a simple example of this approach with a small NPC actor, EnTg, that is, the spinning couple.
@ -165,10 +163,10 @@ static ColliderCylinderInit sCylinderInit =
};
```
Copy this in below `D_80B18910`, delete the original words of data, and for now, remove `static` (in case it's used in other files that have not been decompiled), change the name back to `D_80B18910`, and put `sCylinderInit` commented out above it:
Copy this in below `D_80B18910`, delete the original words of data, change the name back to `D_80B18910`, and put `sCylinderInit` commented out above it:
```C
// sCylinderInit
ColliderCylinderInit D_80B18910 =
static ColliderCylinderInit D_80B18910 =
{
{ COLTYPE_UNK10, 0x00, 0x00, 0x39, 0x20, COLSHAPE_CYLINDER },
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x00000000, 0x00, 0x00 }, 0x00, 0x00, 0x01 },