mirror of
https://github.com/zeldaret/oot.git
synced 2025-05-10 11:03:46 +00:00
Texture alignment macro and a bit of cleaning (#927)
* Add ALIGNED8 * Add designated initializers for cutscene macros * Fix typo in ovl_Boss_Sst XML * Fix extraction of ovlMagicDark * names suggestions * Remove braces * fix
This commit is contained in:
parent
665283432b
commit
c36decaf50
10 changed files with 31 additions and 17 deletions
|
@ -10,7 +10,7 @@
|
|||
<Texture Name="gLinkHairTex" OutName="link_hair" Format="rgba16" Width="16" Height="16" Offset="0x1A40"/>
|
||||
<Texture Name="gLinkTunic2Tex" OutName="link_tunic_2" Format="i8" Width="16" Height="16" Offset="0x1C40"/>
|
||||
<Texture Name="gLinkTunic3Tex" OutName="link_tunic_3" Format="i8" Width="16" Height="32" Offset="0x1D40"/>
|
||||
<Texture Name="gLinkTunic4Tex" OutName="link_tunic_4" Format="i8" Width="16" Height="16" Offset="0x1F40"/>
|
||||
<Texture Name="gLinkTunic4Tex" OutName="link_tunic_4" Format="i8" Width="16" Height="16" Offset="0x1F40"/>
|
||||
<Array Name="D_04002040" Count="24" Offset="0x2040">
|
||||
<Vector Type="s16" Dimensions="3"/>
|
||||
</Array>
|
||||
|
|
|
@ -4,17 +4,17 @@
|
|||
<Limb Name="gEnHeishiRootLimb" LimbType="Standard" Offset="0xB9C8"/>
|
||||
<Limb Name="gEnHeishiTorsoLimb" LimbType="Standard" Offset="0xB9D4"/>
|
||||
<Limb Name="gEnHeishiLeftThighLimb" LimbType="Standard" Offset="0xB9E0"/>
|
||||
<Limb Name="gEnHeishiLeftShinLimb" LimbType="Standard" Offset="0xB9EC"/>
|
||||
<Limb Name="gEnHeishiLeftShinLimb" LimbType="Standard" Offset="0xB9EC"/>
|
||||
<Limb Name="gEnHeishiLeftFootLimb" LimbType="Standard" Offset="0xB9F8"/>
|
||||
<Limb Name="gEnHeishiRightThighLimb" LimbType="Standard" Offset="0xBA04"/>
|
||||
<Limb Name="gEnHeishiRightShinLimb" LimbType="Standard" Offset="0xBA10"/>
|
||||
<Limb Name="gEnHeishiRightShinLimb" LimbType="Standard" Offset="0xBA10"/>
|
||||
<Limb Name="gEnHeishiRightFootLimb" LimbType="Standard" Offset="0xBA1C"/>
|
||||
<Limb Name="gEnHeishiChestLimb" LimbType="Standard" Offset="0xBA28"/>
|
||||
<Limb Name="gEnHeishiLeftUpperArmLimb" LimbType="Standard" Offset="0xBA34"/>
|
||||
<Limb Name="gEnHeishiLeftArmLimb" LimbType="Standard" Offset="0xBA40"/>
|
||||
<Limb Name="gEnHeishiLeftArmLimb" LimbType="Standard" Offset="0xBA40"/>
|
||||
<Limb Name="gEnHeishiLeftHandLimb" LimbType="Standard" Offset="0xBA4C"/>
|
||||
<Limb Name="gEnHeishiRightUpperArmLimb" LimbType="Standard" Offset="0xBA58"/>
|
||||
<Limb Name="gEnHeishiRightArmLimb" LimbType="Standard" Offset="0xBA64"/>
|
||||
<Limb Name="gEnHeishiRightArmLimb" LimbType="Standard" Offset="0xBA64"/>
|
||||
<Limb Name="gEnHeishiRightHandLimb" LimbType="Standard" Offset="0xBA70"/>
|
||||
<Limb Name="gEnHeishiRightHeadLimb" LimbType="Standard" Offset="0xBA7C"/>
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
<Texture Name="gBrokenDrawbridgeDirtTex" OutName="broken_drawbridge_dirt" Format="rgba16" Width="16" Height="16" Offset="0x1320"/>
|
||||
<Texture Name="gBrokenDrawbridgeChainTex" OutName="broken_drawbridge_chain" Format="rgba16" Width="8" Height="16" Offset="0x1520"/>
|
||||
<Collision Name="gBrokenDrawbridgeCol" Offset="0x908"/>
|
||||
|
||||
<DList Name="gBarbedWireFenceDL" Offset="0x980"/>
|
||||
|
||||
<DList Name="gBarbedWireFenceDL" Offset="0x980"/>
|
||||
<Texture Name="gBarbedWireFenceTex" OutName="barbed_wire_fence" Format="rgba16" Width="32" Height="32" Offset="0x1620"/>
|
||||
<Collision Name="gBarbedWireFenceCol" Offset="0xAF0"/>
|
||||
</File>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<Root>
|
||||
<File Name="ovl_Arrow_Fire" BaseAddress="0x80865d10" RangeStart="0x9D0" RangeEnd="0x1DF0">
|
||||
<File Name="ovl_Arrow_Fire" BaseAddress="0x80865d10" RangeStart="0x9D0" RangeEnd="0x1DF0">
|
||||
<Texture Name="s1Tex" OutName="fire_tex_1" Format="ia8" Width="32" Height="64" Offset="0x9D0" Static="On"/>
|
||||
<Texture Name="s2Tex" OutName="fire_tex_2" Format="ia8" Width="32" Height="64" Offset="0x11D0" Static="On"/>
|
||||
<Array Name="sVtx" Count="43" Offset="0x19D0" Static="On">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<Root>
|
||||
<File Name="ovl_Arrow_Ice" BaseAddress="0x80867cd0" RangeStart="0x9F0" RangeEnd="0x1E10">
|
||||
<File Name="ovl_Arrow_Ice" BaseAddress="0x80867cd0" RangeStart="0x9F0" RangeEnd="0x1E10">
|
||||
<Texture Name="s1Tex" OutName="ice_tex_1" Format="ia8" Width="32" Height="64" Offset="0x9F0" Static="On"/>
|
||||
<Texture Name="s2Tex" OutName="ice_tex_2" Format="ia8" Width="32" Height="64" Offset="0x11F0" Static="On"/>
|
||||
<Array Name="sVtx" Count="43" Offset="0x19F0" Static="On">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<Root>
|
||||
<File Name="ovl_Arrow_Light" BaseAddress="0x80869cb0" RangeStart="0xA00" RangeEnd="0x1E20">
|
||||
<File Name="ovl_Arrow_Light" BaseAddress="0x80869cb0" RangeStart="0xA00" RangeEnd="0x1E20">
|
||||
<Texture Name="s1Tex" OutName="light_tex_1" Format="ia8" Width="32" Height="64" Offset="0xA00" Static="On"/>
|
||||
<Texture Name="s2Tex" OutName="light_tex_2" Format="ia8" Width="32" Height="64" Offset="0x1200" Static="On"/>
|
||||
<Array Name="sVtx" Count="43" Offset="0x1A00" Static="On">
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
<Root>
|
||||
<File Name="ovl_Magic_Dark" BaseAddress="0x80B873D0" RangeStart="0xD10" RangeEnd="0x1740">
|
||||
<Texture Name="sDiamondTex" OutName="diamond_texture" Format="i8" Width="32" Height="64" Offset="0xD10"/>
|
||||
|
||||
<Array Name="sDiamondVtx" Count="20" Offset="0x1510">
|
||||
<Vtx/>
|
||||
</Array>
|
||||
|
||||
<DList Name="sDiamondMaterialDL" Offset="0x1650"/>
|
||||
<DList Name="sDiamondModelDL" Offset="0x1700"/>
|
||||
</File>
|
||||
|
|
|
@ -16,6 +16,12 @@
|
|||
|
||||
#define CMD_W(a) (a)
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define CMD_F(a) {.f = (a)}
|
||||
#else
|
||||
#define CMD_F(a) {(a)}
|
||||
#endif
|
||||
|
||||
#define CMD_PTR(a) (u32)(a)
|
||||
|
||||
#endif
|
||||
|
|
|
@ -164,4 +164,10 @@ extern GraphicsContext* __gfxCtx;
|
|||
((height)-1) << G_TEXTURE_IMAGE_FRAC); \
|
||||
} while (0)
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define ALIGNED8 __attribute__ ((aligned (8)))
|
||||
#else
|
||||
#define ALIGNED8
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
* size = 0x10
|
||||
*/
|
||||
#define CS_CAM_POS(continueFlag, roll, frame, viewAngle, xPos, yPos, zPos, unused) \
|
||||
CMD_BBH(continueFlag, roll, frame), CMD_W(viewAngle), CMD_HH(xPos, yPos), CMD_HH(zPos, unused)
|
||||
CMD_BBH(continueFlag, roll, frame), CMD_F(viewAngle), CMD_HH(xPos, yPos), CMD_HH(zPos, unused)
|
||||
|
||||
/**
|
||||
* ARGS
|
||||
|
@ -55,7 +55,7 @@
|
|||
* size = 0x10
|
||||
*/
|
||||
#define CS_CAM_FOCUS_POINT(continueFlag, roll, frame, viewAngle, xPos, yPos, zPos, unused) \
|
||||
CMD_BBH(continueFlag, roll, frame), CMD_W(viewAngle), CMD_HH(xPos, yPos), CMD_HH(zPos, unused)
|
||||
CMD_BBH(continueFlag, roll, frame), CMD_F(viewAngle), CMD_HH(xPos, yPos), CMD_HH(zPos, unused)
|
||||
|
||||
/**
|
||||
* ARGS
|
||||
|
@ -122,7 +122,7 @@
|
|||
* size = 0x10
|
||||
*/
|
||||
#define CS_CAM_POS_PLAYER(continueFlag, roll, frame, viewAngle, xPos, yPos, zPos, unused) \
|
||||
CMD_BBH(continueFlag, roll, frame), CMD_W(viewAngle), CMD_HH(xPos, yPos), CMD_HH(zPos, unused)
|
||||
CMD_BBH(continueFlag, roll, frame), CMD_F(viewAngle), CMD_HH(xPos, yPos), CMD_HH(zPos, unused)
|
||||
|
||||
/**
|
||||
* ARGS
|
||||
|
@ -144,7 +144,7 @@
|
|||
* size = 0x10
|
||||
*/
|
||||
#define CS_CAM_FOCUS_POINT_PLAYER(continueFlag, roll, frame, viewAngle, xPos, yPos, zPos, unused) \
|
||||
CMD_BBH(continueFlag, roll, frame), CMD_W(viewAngle), CMD_HH(xPos, yPos), CMD_HH(zPos, unused)
|
||||
CMD_BBH(continueFlag, roll, frame), CMD_F(viewAngle), CMD_HH(xPos, yPos), CMD_HH(zPos, unused)
|
||||
|
||||
/**
|
||||
* ARGS
|
||||
|
@ -167,7 +167,7 @@
|
|||
* size = 0x10
|
||||
*/
|
||||
#define CS_CMD_07(continueFlag, roll, frame, viewAngle, xPos, yPos, zPos, unused) \
|
||||
CMD_BBH(continueFlag, roll, frame), CMD_W(viewAngle), CMD_HH(xPos, yPos), CMD_HH(zPos, unused)
|
||||
CMD_BBH(continueFlag, roll, frame), CMD_F(viewAngle), CMD_HH(xPos, yPos), CMD_HH(zPos, unused)
|
||||
|
||||
/**
|
||||
* ARGS
|
||||
|
@ -190,7 +190,7 @@
|
|||
* size = 0x10
|
||||
*/
|
||||
#define CS_CMD_08(continueFlag, roll, frame, viewAngle, xPos, yPos, zPos, unused) \
|
||||
CMD_BBH(continueFlag, roll, frame), CMD_W(viewAngle), CMD_HH(xPos, yPos), CMD_HH(zPos, unused)
|
||||
CMD_BBH(continueFlag, roll, frame), CMD_F(viewAngle), CMD_HH(xPos, yPos), CMD_HH(zPos, unused)
|
||||
|
||||
/**
|
||||
* ARGS
|
||||
|
@ -257,7 +257,7 @@
|
|||
CMD_HH(npcAction, startFrame), CMD_HH(endFrame, rotX), CMD_HH(rotY, rotZ), \
|
||||
CMD_W(startX), CMD_W(startY), CMD_W(startZ), \
|
||||
CMD_W(endX), CMD_W(endY), CMD_W(endZ), \
|
||||
CMD_W(normX), CMD_W(normY), CMD_W(normZ)
|
||||
CMD_F(normX), CMD_F(normY), CMD_F(normZ)
|
||||
|
||||
/**
|
||||
* ARGS
|
||||
|
|
Loading…
Add table
Reference in a new issue