mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-12 10:54:44 +00:00
Merge commit '39de6ce293
' into doc_pause_menu
This commit is contained in:
commit
eca2c3e10d
45 changed files with 334 additions and 145 deletions
|
@ -225,17 +225,17 @@
|
|||
<Texture Name="gLinkAdultEyesOpenTex" OutName="eyes_open" Format="ci8" Width="64" Height="32" Offset="0x0000" TlutOffset="0x5C00"/>
|
||||
<Texture Name="gLinkAdultEyesHalfTex" OutName="eyes_half" Format="ci8" Width="64" Height="32" Offset="0x0800" TlutOffset="0x5C00"/>
|
||||
<Texture Name="gLinkAdultEyesClosedfTex" OutName="eyes_closed" Format="ci8" Width="64" Height="32" Offset="0x1000" TlutOffset="0x5C00"/>
|
||||
<Texture Name="gLinkAdultEyesRollLeftTex" OutName="eyes_roll_left" Format="ci8" Width="64" Height="32" Offset="0x1800" TlutOffset="0x5C00"/><!--Left from links perspective-->
|
||||
<Texture Name="gLinkAdultEyesRollRightTex" OutName="eyes_roll_right" Format="ci8" Width="64" Height="32" Offset="0x2000" TlutOffset="0x5C00"/><!--Right from links perspective-->
|
||||
<Texture Name="gLinkAdultEyesShockTex" OutName="eyes_shock" Format="ci8" Width="64" Height="32" Offset="0x2800" TlutOffset="0x5C00"/>
|
||||
<Texture Name="gLinkAdultEyesUnk1Tex" OutName="eyes_unk_1" Format="ci8" Width="64" Height="32" Offset="0x3000" TlutOffset="0x5C00"/>
|
||||
<Texture Name="gLinkAdultEyesUnk2Tex" OutName="eyes_unk_2" Format="ci8" Width="64" Height="32" Offset="0x3800" TlutOffset="0x5C00"/>
|
||||
<Texture Name="gLinkAdultEyesLeftTex" OutName="eyes_left" Format="ci8" Width="64" Height="32" Offset="0x1800" TlutOffset="0x5C00"/>
|
||||
<Texture Name="gLinkAdultEyesRightTex" OutName="eyes_right" Format="ci8" Width="64" Height="32" Offset="0x2000" TlutOffset="0x5C00"/>
|
||||
<Texture Name="gLinkAdultEyesWideTex" OutName="eyes_wide" Format="ci8" Width="64" Height="32" Offset="0x2800" TlutOffset="0x5C00"/>
|
||||
<Texture Name="gLinkAdultEyesDownTex" OutName="eyes_down" Format="ci8" Width="64" Height="32" Offset="0x3000" TlutOffset="0x5C00"/>
|
||||
<Texture Name="gLinkAdultEyesWincingTex" OutName="eyes_wincing" Format="ci8" Width="64" Height="32" Offset="0x3800" TlutOffset="0x5C00"/>
|
||||
|
||||
<!--Mouth-->
|
||||
<Texture Name="gLinkAdultMouth1Tex" OutName="mouth_1" Format="ci8" Width="32" Height="32" Offset="0x4000" TlutOffset="0x5C00"/>
|
||||
<Texture Name="gLinkAdultMouth2Tex" OutName="mouth_2" Format="ci8" Width="32" Height="32" Offset="0x4400" TlutOffset="0x5C00"/>
|
||||
<Texture Name="gLinkAdultMouth3Tex" OutName="mouth_3" Format="ci8" Width="32" Height="32" Offset="0x4800" TlutOffset="0x5C00"/>
|
||||
<Texture Name="gLinkAdultMouth4Tex" OutName="mouth_4" Format="ci8" Width="32" Height="32" Offset="0x4C00" TlutOffset="0x5C00"/>
|
||||
<Texture Name="gLinkAdultMouthClosedTex" OutName="mouth_closed" Format="ci8" Width="32" Height="32" Offset="0x4000" TlutOffset="0x5C00"/>
|
||||
<Texture Name="gLinkAdultMouthHalfTex" OutName="mouth_half" Format="ci8" Width="32" Height="32" Offset="0x4400" TlutOffset="0x5C00"/>
|
||||
<Texture Name="gLinkAdultMouthOpenTex" OutName="mouth_open" Format="ci8" Width="32" Height="32" Offset="0x4800" TlutOffset="0x5C00"/>
|
||||
<Texture Name="gLinkAdultMouthSmileTex" OutName="mouth_smile" Format="ci8" Width="32" Height="32" Offset="0x4C00" TlutOffset="0x5C00"/>
|
||||
|
||||
<Texture Name="gLinkAdultEarTex" OutName="ear" Format="ci8" Width="16" Height="16" Offset="0x5000" TlutOffset="0x5C00"/>
|
||||
<Texture Name="gLinkAdultNoseTex" OutName="nose" Format="ci8" Width="16" Height="16" Offset="0x5100" TlutOffset="0x5C00"/>
|
||||
|
|
|
@ -186,17 +186,17 @@
|
|||
<Texture Name="gLinkChildEyesOpenTex" OutName="eyes_open" Format="ci8" Width="64" Height="32" Offset="0x0000" TlutOffset="0x5500"/>
|
||||
<Texture Name="gLinkChildEyesHalfTex" OutName="eyes_half" Format="ci8" Width="64" Height="32" Offset="0x0800" TlutOffset="0x5500"/>
|
||||
<Texture Name="gLinkChildEyesClosedfTex" OutName="eyes_closed" Format="ci8" Width="64" Height="32" Offset="0x1000" TlutOffset="0x5500"/>
|
||||
<Texture Name="gLinkChildEyesRollLeftTex" OutName="eyes_roll_left" Format="ci8" Width="64" Height="32" Offset="0x1800" TlutOffset="0x5500"/><!--Left from links perspective-->
|
||||
<Texture Name="gLinkChildEyesRollRightTex" OutName="eyes_roll_right" Format="ci8" Width="64" Height="32" Offset="0x2000" TlutOffset="0x5500"/><!--Right from links perspective-->
|
||||
<Texture Name="gLinkChildEyesShockTex" OutName="eyes_shock" Format="ci8" Width="64" Height="32" Offset="0x2800" TlutOffset="0x5500"/>
|
||||
<Texture Name="gLinkChildEyesUnk1Tex" OutName="eyes_unk_1" Format="ci8" Width="64" Height="32" Offset="0x3000" TlutOffset="0x5500"/>
|
||||
<Texture Name="gLinkChildEyesUnk2Tex" OutName="eyes_unk_2" Format="ci8" Width="64" Height="32" Offset="0x3800" TlutOffset="0x5500"/>
|
||||
<Texture Name="gLinkChildEyesLeftTex" OutName="eyes_left" Format="ci8" Width="64" Height="32" Offset="0x1800" TlutOffset="0x5500"/>
|
||||
<Texture Name="gLinkChildEyesRightTex" OutName="eyes_right" Format="ci8" Width="64" Height="32" Offset="0x2000" TlutOffset="0x5500"/>
|
||||
<Texture Name="gLinkChildEyesWideTex" OutName="eyes_wide" Format="ci8" Width="64" Height="32" Offset="0x2800" TlutOffset="0x5500"/>
|
||||
<Texture Name="gLinkChildEyesDownTex" OutName="eyes_down" Format="ci8" Width="64" Height="32" Offset="0x3000" TlutOffset="0x5500"/>
|
||||
<Texture Name="gLinkChildEyesWincingTex" OutName="eyes_wincing" Format="ci8" Width="64" Height="32" Offset="0x3800" TlutOffset="0x5500"/>
|
||||
|
||||
<!--Mouth-->
|
||||
<Texture Name="gLinkChildMouth1Tex" OutName="mouth_1" Format="ci8" Width="32" Height="32" Offset="0x4000" TlutOffset="0x5500"/>
|
||||
<Texture Name="gLinkChildMouth2Tex" OutName="mouth_2" Format="ci8" Width="32" Height="32" Offset="0x4400" TlutOffset="0x5500"/>
|
||||
<Texture Name="gLinkChildMouth3Tex" OutName="mouth_3" Format="ci8" Width="32" Height="32" Offset="0x4800" TlutOffset="0x5500"/>
|
||||
<Texture Name="gLinkChildMouth4Tex" OutName="mouth_4" Format="ci8" Width="32" Height="32" Offset="0x4C00" TlutOffset="0x5500"/>
|
||||
<Texture Name="gLinkChildMouthClosedTex" OutName="mouth_closed" Format="ci8" Width="32" Height="32" Offset="0x4000" TlutOffset="0x5500"/>
|
||||
<Texture Name="gLinkChildMouthHalfTex" OutName="mouth_half" Format="ci8" Width="32" Height="32" Offset="0x4400" TlutOffset="0x5500"/>
|
||||
<Texture Name="gLinkChildMouthOpenTex" OutName="mouth_open" Format="ci8" Width="32" Height="32" Offset="0x4800" TlutOffset="0x5500"/>
|
||||
<Texture Name="gLinkChildMouthSmileTex" OutName="mouth_smile" Format="ci8" Width="32" Height="32" Offset="0x4C00" TlutOffset="0x5500"/>
|
||||
|
||||
<!--Unused Vtx-->
|
||||
<Array Name="gLinkChildVtx_019E08" Count="35" Offset="0x19E08" Static="On">
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
<Cutscene Name="gRainbowBridgeCs" Offset="0x2640"/>
|
||||
<Cutscene Name="gGanonsCastleIntroCs" Offset="0x4280"/>
|
||||
<Scene Name="ganon_tou_scene" Offset="0x0"/>
|
||||
<Scene Name="ganon_tou_scene_unused" Offset="0x3080"/>
|
||||
</File>
|
||||
<File Name="ganon_tou_room_0" Segment="3">
|
||||
<Room Name="ganon_tou_room_0" Offset="0x0"/>
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
<Texture Name="gSpiritTempleDayEntranceTex" OutName="day_entrance" Format="ia16" Width="8" Height="128" Offset="0x18920"/>
|
||||
<Texture Name="gSpiritTempleNightEntranceTex" OutName="night_entrance" Format="ia16" Width="8" Height="128" Offset="0x18020"/>
|
||||
<Scene Name="jyasinzou_scene" Offset="0x0"/>
|
||||
<Scene Name="jyasinzou_scene_unused1" Offset="0x17200"/>
|
||||
<Scene Name="jyasinzou_scene_unused2" Offset="0x176F0"/>
|
||||
</File>
|
||||
<File Name="jyasinzou_room_0" Segment="3">
|
||||
<Room Name="jyasinzou_room_0" Offset="0x0"/>
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<Cutscene Name="gGreatFairyDoubleMagicCs" Offset="0x13E0"/>
|
||||
<Cutscene Name="gGreatFairyDoubleDefenseCs" Offset="0x25D0"/>
|
||||
<Scene Name="daiyousei_izumi_scene" Offset="0x0"/>
|
||||
<Scene Name="daiyousei_izumi_scene_unused" Offset="0x43D0"/>
|
||||
</File>
|
||||
<File Name="daiyousei_izumi_room_0" Segment="3">
|
||||
<Room Name="daiyousei_izumi_room_0" Offset="0x0"/>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<File Name="hairal_niwa_scene" Segment="2">
|
||||
<Path Name="hairal_niwa_scenePathList_000268" Offset="0x0268" NumPaths="8"/>
|
||||
<Scene Name="hairal_niwa_scene" Offset="0x0"/>
|
||||
<Scene Name="hairal_niwa_scene_unused" Offset="0x30E0"/>
|
||||
</File>
|
||||
<File Name="hairal_niwa_room_0" Segment="3">
|
||||
<Room Name="hairal_niwa_room_0" Offset="0x0"/>
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
<Root>
|
||||
<File Name="hiral_demo_scene" Segment="2">
|
||||
<Scene Name="hiral_demo_scene" Offset="0x0"/>
|
||||
<Scene Name="hiral_demo_scene_unused1" Offset="0x3580"/>
|
||||
<Scene Name="hiral_demo_scene_unused2" Offset="0x3640"/>
|
||||
<Scene Name="hiral_demo_scene_unused3" Offset="0x3700"/>
|
||||
</File>
|
||||
<File Name="hiral_demo_room_0" Segment="3">
|
||||
<Room Name="hiral_demo_room_0" Offset="0x0"/>
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
<Cutscene Name="gHyruleFieldGateEponaJumpCs" Offset="0x10B30"/>
|
||||
<Path Name="spot00_scenePathList_011AB4" Offset="0x11AB4" NumPaths="2"/>
|
||||
<Scene Name="spot00_scene" Offset="0x0"/>
|
||||
<Scene Name="spot00_scene_unused" Offset="0x12340"/>
|
||||
<Texture Name="spot00_scene_Tex_02A198" Format="ia8" Width="8" Height="16" Offset="0x2A198"/>
|
||||
</File>
|
||||
<File Name="spot00_room_0" Segment="3">
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<File Name="spot15_scene" Segment="2">
|
||||
<Cutscene Name="gHyruleCastleIntroCs" Offset="0x3F40"/>
|
||||
<Scene Name="spot15_scene" Offset="0x0"/>
|
||||
<Scene Name="spot15_scene_unused" Offset="0x3D20"/>
|
||||
</File>
|
||||
<File Name="spot15_room_0" Segment="3">
|
||||
<Room Name="spot15_room_0" Offset="0x0"/>
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<Path Name="spot16_scenePathList_000254" Offset="0x254" NumPaths="2"/>
|
||||
<Path Name="spot16_scenePathList_007884" Offset="0x7884" NumPaths="3"/>
|
||||
<Scene Name="spot16_scene" Offset="0x0"/>
|
||||
<Scene Name="spot16_scene_unused" Offset="0x78A0"/>
|
||||
<Texture Name="spot16_scene_Tex_01AE98" Format="i4" Width="64" Height="64" Offset="0x1AE98"/>
|
||||
</File>
|
||||
<File Name="spot16_room_0" Segment="3">
|
||||
|
|
12
include/face_change.h
Normal file
12
include/face_change.h
Normal file
|
@ -0,0 +1,12 @@
|
|||
#ifndef FACE_CHANGE_H
|
||||
#define FACE_CHANGE_H
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s16 face;
|
||||
/* 0x02 */ s16 timer;
|
||||
} FaceChange; // size = 0x4
|
||||
|
||||
s16 FaceChange_UpdateBlinking(FaceChange* faceChange, s16 blinkIntervalBase, s16 blinkIntervalRandRange, s16 blinkDuration);
|
||||
s16 FaceChange_UpdateRandomSet(FaceChange* faceChange, s16 changeTimerBase, s16 changeTimerRandRange, s16 faceSetRange);
|
||||
|
||||
#endif
|
|
@ -443,7 +443,6 @@ Actor* Actor_Delete(ActorContext* actorCtx, Actor* actor, PlayState* play);
|
|||
Actor* func_80032AF0(PlayState* play, ActorContext* actorCtx, Actor** actorPtr, Player* player);
|
||||
Actor* Actor_Find(ActorContext* actorCtx, s32 actorId, s32 actorCategory);
|
||||
void Enemy_StartFinishingBlow(PlayState* play, Actor* actor);
|
||||
s16 func_80032CB4(s16* arg0, s16 arg1, s16 arg2, s16 arg3);
|
||||
void BodyBreak_Alloc(BodyBreak* bodyBreak, s32 count, PlayState* play);
|
||||
void BodyBreak_SetInfo(BodyBreak* bodyBreak, s32 limbIndex, s32 minLimbIndex, s32 maxLimbIndex, u32 count, Gfx** dList,
|
||||
s16 objectSlot);
|
||||
|
|
|
@ -134,7 +134,7 @@ typedef struct {
|
|||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3s rot; // Current actor shape rotation
|
||||
/* 0x06 */ s16 face; // Used to index eyebrow/eye/mouth textures. Only used by player
|
||||
/* 0x06 */ s16 face; // Used to index eyes and mouth textures. Only used by player
|
||||
/* 0x08 */ f32 yOffset; // Model y axis offset. Represents model space units
|
||||
/* 0x0C */ ActorShadowFunc shadowDraw; // Shadow draw function
|
||||
/* 0x10 */ f32 shadowScale; // Changes the size of the shadow
|
||||
|
|
|
@ -121,10 +121,10 @@
|
|||
* The lighting change will take place immediately with no blending.
|
||||
* @note `endFrame` is not used in the implementation of the command, so its value does not matter
|
||||
*/
|
||||
#define CS_LIGHT_SETTING(lightSetting, startFrame, endFrame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7) \
|
||||
#define CS_LIGHT_SETTING(lightSetting, startFrame, endFrame, unused0, unused1, unused2, unused3, unused4, unused5, unused6, unused7, unused8, unused9, unused10) \
|
||||
CMD_BBH(0, (lightSetting + 1), startFrame), CMD_HH(endFrame, unused0), \
|
||||
CMD_W(unused1), CMD_W(unused2), CMD_W(unused3), CMD_W(unused4), CMD_W(unused5), \
|
||||
CMD_W(unused6), CMD_W(unused7), 0x00000000, 0x00000000, 0x00000000
|
||||
CMD_W(unused6), CMD_W(unused7), CMD_W(unused8), CMD_W(unused9), CMD_W(unused10)
|
||||
|
||||
/**
|
||||
* Declares a list of `CS_RUMBLE_CONTROLLER` entries.
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include "z64actor.h"
|
||||
#include "alignment.h"
|
||||
#include "face_change.h"
|
||||
|
||||
struct Player;
|
||||
|
||||
|
@ -228,6 +229,52 @@ typedef enum {
|
|||
/* 3 */ PLAYER_DOORTYPE_FAKE
|
||||
} PlayerDoorType;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ PLAYER_FACEPART_EYES,
|
||||
/* 1 */ PLAYER_FACEPART_MOUTH,
|
||||
/* 2 */ PLAYER_FACEPART_MAX
|
||||
} PlayerFacePart;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ PLAYER_EYES_OPEN,
|
||||
/* 1 */ PLAYER_EYES_HALF,
|
||||
/* 2 */ PLAYER_EYES_CLOSED,
|
||||
/* 3 */ PLAYER_EYES_LEFT,
|
||||
/* 4 */ PLAYER_EYES_RIGHT,
|
||||
/* 5 */ PLAYER_EYES_WIDE,
|
||||
/* 6 */ PLAYER_EYES_DOWN,
|
||||
/* 7 */ PLAYER_EYES_WINCING,
|
||||
/* 8 */ PLAYER_EYES_MAX
|
||||
} PlayerEyes;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ PLAYER_MOUTH_CLOSED,
|
||||
/* 1 */ PLAYER_MOUTH_HALF,
|
||||
/* 2 */ PLAYER_MOUTH_OPEN,
|
||||
/* 3 */ PLAYER_MOUTH_SMILE,
|
||||
/* 4 */ PLAYER_MOUTH_MAX
|
||||
} PlayerMouth;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ PLAYER_FACE_NEUTRAL, // eyes open and mouth closed
|
||||
/* 1 */ PLAYER_FACE_NEUTRAL_BLINKING_HALF, // eyes half open and mouth closed
|
||||
/* 2 */ PLAYER_FACE_NEUTRAL_BLINKING_CLOSED, // eyes and mouth closed
|
||||
/* 3 */ PLAYER_FACE_NEUTRAL_2, // same as `PLAYER_FACE_NEUTRAL`
|
||||
/* 4 */ PLAYER_FACE_NEUTRAL_BLINKING_HALF_2, // same as `PLAYER_FACE_NEUTRAL_BLINKING_HALF`
|
||||
/* 5 */ PLAYER_FACE_NEUTRAL_BLINKING_CLOSED_2, // same as `PLAYER_FACE_NEUTRAL_BLINKING_CLOSED`
|
||||
/* 6 */ PLAYER_FACE_LOOK_RIGHT, // eyes looking right and mouth closed
|
||||
/* 7 */ PLAYER_FACE_SURPRISED, // wide eyes and grimacing mouth
|
||||
/* 8 */ PLAYER_FACE_HURT, // eyes wincing in pain and mouth open
|
||||
/* 9 */ PLAYER_FACE_GASP, // eyes and mouth open
|
||||
/* 10 */ PLAYER_FACE_LOOK_LEFT, // eyes looking left and mouth closed
|
||||
/* 11 */ PLAYER_FACE_LOOK_RIGHT_2, // duplicate of `PLAYER_FACE_LOOK_RIGHT`
|
||||
/* 12 */ PLAYER_FACE_EYES_CLOSED_MOUTH_OPEN, // eyes closed and mouth open
|
||||
/* 13 */ PLAYER_FACE_OPENING, // eyes and mouth both halfway open
|
||||
/* 14 */ PLAYER_FACE_EYES_AND_MOUTH_OPEN, // eyes and mouth open
|
||||
/* 15 */ PLAYER_FACE_NEUTRAL_3, // same as `PLAYER_FACE_NEUTRAL` and `PLAYER_FACE_NEUTRAL_2`
|
||||
/* 16 */ PLAYER_FACE_MAX
|
||||
} PlayerFace;
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ PLAYER_MODELGROUP_0, // unused (except for a bug in `Player_OverrideLimbDrawPause`)
|
||||
/* 0x01 */ PLAYER_MODELGROUP_CHILD_HYLIAN_SHIELD, //hold sword only. used for holding sword only as child link with hylian shield equipped
|
||||
|
@ -705,7 +752,7 @@ typedef struct Player {
|
|||
/* 0x01F8 */ Vec3s jointTable[PLAYER_LIMB_BUF_COUNT];
|
||||
/* 0x0288 */ Vec3s morphTable[PLAYER_LIMB_BUF_COUNT];
|
||||
/* 0x0318 */ Vec3s blendTable[PLAYER_LIMB_BUF_COUNT];
|
||||
/* 0x03A8 */ s16 unk_3A8[2];
|
||||
/* 0x03A8 */ FaceChange faceChange;
|
||||
/* 0x03AC */ Actor* heldActor;
|
||||
/* 0x03B0 */ Vec3f leftHandPos;
|
||||
/* 0x03BC */ Vec3s unk_3BC;
|
||||
|
|
|
@ -100,7 +100,11 @@ f32 D_801305E4[4] = { 1.0f, 1.12246f, 1.33484f, 1.33484f }; // 2**({0, 2, 5, 5}/
|
|||
f32 D_801305F4 = 1.0f;
|
||||
u8 sGanonsTowerLevelsVol[8] = { 127, 80, 75, 73, 70, 68, 65, 60 };
|
||||
u8 sEnterGanonsTowerTimer = 0;
|
||||
#if OOT_DEBUG
|
||||
s8 sSoundMode = SOUNDMODE_SURROUND;
|
||||
#else
|
||||
s8 sSoundMode = SOUNDMODE_STEREO;
|
||||
#endif
|
||||
s8 D_80130608 = 0;
|
||||
s8 sAudioCutsceneFlag = 0;
|
||||
s8 sSpecReverb = 0;
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
const char gBuildTeam[] = "zelda@srd022j";
|
||||
|
||||
// TODO: Use per-version preprocessor defines
|
||||
#if OOT_DEBUG // gc-eu-mq-dbg
|
||||
const char gBuildDate[] = "03-02-21 00:16:31";
|
||||
#else // gc-eu-mq
|
||||
const char gBuildDate[] = "03-02-21 20:37:19";
|
||||
#endif
|
||||
|
||||
const char gBuildMakeOption[] = "";
|
||||
|
|
|
@ -13,7 +13,11 @@ typedef struct InitFunc {
|
|||
// .data
|
||||
void* sInitFuncs = NULL;
|
||||
|
||||
#if OOT_DEBUG
|
||||
char sNew[] = "new";
|
||||
#else
|
||||
char sNew[] = "";
|
||||
#endif
|
||||
|
||||
char D_80134488[0x18] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7F, 0x80, 0x00, 0x00,
|
||||
|
|
|
@ -3189,33 +3189,64 @@ void Enemy_StartFinishingBlow(PlayState* play, Actor* actor) {
|
|||
SfxSource_PlaySfxAtFixedWorldPos(play, &actor->world.pos, 20, NA_SE_EN_LAST_DAMAGE);
|
||||
}
|
||||
|
||||
s16 func_80032CB4(s16* arg0, s16 arg1, s16 arg2, s16 arg3) {
|
||||
if (DECR(arg0[1]) == 0) {
|
||||
arg0[1] = Rand_S16Offset(arg1, arg2);
|
||||
/**
|
||||
* Updates `FaceChange` data for a blinking pattern.
|
||||
* This system expects that the actor using the system has defined 3 faces in this exact order:
|
||||
* "eyes open", "eyes half open", "eyes closed".
|
||||
*
|
||||
* @param faceChange pointer to an actor's faceChange data
|
||||
* @param blinkIntervalBase The base number of frames between blinks
|
||||
* @param blinkIntervalRandRange The range for a random number of frames that can be added to `blinkIntervalBase`
|
||||
* @param blinkDuration The number of frames it takes for a single blink to occur
|
||||
*/
|
||||
s16 FaceChange_UpdateBlinking(FaceChange* faceChange, s16 blinkIntervalBase, s16 blinkIntervalRandRange,
|
||||
s16 blinkDuration) {
|
||||
if (DECR(faceChange->timer) == 0) {
|
||||
faceChange->timer = Rand_S16Offset(blinkIntervalBase, blinkIntervalRandRange);
|
||||
}
|
||||
|
||||
if ((arg0[1] - arg3) > 0) {
|
||||
arg0[0] = 0;
|
||||
} else if (((arg0[1] - arg3) > -2) || (arg0[1] < 2)) {
|
||||
arg0[0] = 1;
|
||||
if ((faceChange->timer - blinkDuration) > 0) {
|
||||
// `timer - duration` is positive so this is the default state: "eyes open" face
|
||||
faceChange->face = 0;
|
||||
} else if (((faceChange->timer - blinkDuration) > -2) || (faceChange->timer < 2)) {
|
||||
// This condition aims to catch both cases where the "eyes half open" face is needed.
|
||||
// Note that the comparison assumes the duration of the "eyes half open" phase is 2 frames, irrespective of the
|
||||
// value of `blinkDuration`. The duration for the "eyes closed" phase is `blinkDuration - 4`.
|
||||
// For Player's use case `blinkDuration` is 6, so the "eyes closed" phase happens to have
|
||||
// the same duration as each "eyes half open" phase.
|
||||
faceChange->face = 1;
|
||||
} else {
|
||||
arg0[0] = 2;
|
||||
// If both conditions above fail, the only possibility left is the "eyes closed" face
|
||||
faceChange->face = 2;
|
||||
}
|
||||
|
||||
return arg0[0];
|
||||
return faceChange->face;
|
||||
}
|
||||
|
||||
s16 func_80032D60(s16* arg0, s16 arg1, s16 arg2, s16 arg3) {
|
||||
if (DECR(arg0[1]) == 0) {
|
||||
arg0[1] = Rand_S16Offset(arg1, arg2);
|
||||
arg0[0]++;
|
||||
/**
|
||||
* Updates `FaceChange` data for randomly selected face sets.
|
||||
* Each set contains 3 faces. After the timer runs out, the next face in the set is used.
|
||||
* After the third face in a set is used, a new face set is randomly chosen.
|
||||
*
|
||||
* @param faceChange pointer to an actor's faceChange data
|
||||
* @param changeTimerBase The base number of frames between each face change
|
||||
* @param changeTimerRandRange The range for a random number of frames that can be added to `changeTimerBase`
|
||||
* @param faceSetRange The max number of face sets that will be chosen from
|
||||
*/
|
||||
s16 FaceChange_UpdateRandomSet(FaceChange* faceChange, s16 changeTimerBase, s16 changeTimerRandRange,
|
||||
s16 faceSetRange) {
|
||||
if (DECR(faceChange->timer) == 0) {
|
||||
faceChange->timer = Rand_S16Offset(changeTimerBase, changeTimerRandRange);
|
||||
faceChange->face++;
|
||||
|
||||
if ((arg0[0] % 3) == 0) {
|
||||
arg0[0] = (s32)(Rand_ZeroOne() * arg3) * 3;
|
||||
if ((faceChange->face % 3) == 0) {
|
||||
// Randomly chose a "set number", then multiply by 3 because each set has 3 faces.
|
||||
// This will use the first face in the newly chosen set.
|
||||
faceChange->face = (s32)(Rand_ZeroOne() * faceSetRange) * 3;
|
||||
}
|
||||
}
|
||||
|
||||
return arg0[0];
|
||||
return faceChange->face;
|
||||
}
|
||||
|
||||
void BodyBreak_Alloc(BodyBreak* bodyBreak, s32 count, PlayState* play) {
|
||||
|
|
|
@ -813,41 +813,94 @@ s32 Player_GetEnvironmentalHazard(PlayState* play) {
|
|||
return envHazard + 1;
|
||||
}
|
||||
|
||||
u8 sEyeMouthIndices[][2] = {
|
||||
{ 0, 0 }, { 1, 0 }, { 2, 0 }, { 0, 0 }, { 1, 0 }, { 2, 0 }, { 4, 0 }, { 5, 1 },
|
||||
{ 7, 2 }, { 0, 2 }, { 3, 0 }, { 4, 0 }, { 2, 2 }, { 1, 1 }, { 0, 2 }, { 0, 0 },
|
||||
u8 sPlayerFaces[PLAYER_FACE_MAX][PLAYER_FACEPART_MAX] = {
|
||||
// The first 6 faces defined must be default blinking faces. See relevant code in `Player_UpdateCommon`.
|
||||
{ PLAYER_EYES_OPEN, PLAYER_MOUTH_CLOSED }, // PLAYER_FACE_NEUTRAL
|
||||
{ PLAYER_EYES_HALF, PLAYER_MOUTH_CLOSED }, // PLAYER_FACE_NEUTRAL_BLINKING_HALF
|
||||
{ PLAYER_EYES_CLOSED, PLAYER_MOUTH_CLOSED }, // PLAYER_FACE_NEUTRAL_BLINKING_CLOSED
|
||||
|
||||
// This duplicate set of blinking faces is defined because Player will choose between the first and second set
|
||||
// based on gameplayFrames. See relevant code in `Player_UpdateCommon`.
|
||||
// This, in theory, allows for psuedo-random variance in the faces used. But in practice, duplicate faces are used.
|
||||
{ PLAYER_EYES_OPEN, PLAYER_MOUTH_CLOSED }, // PLAYER_FACE_NEUTRAL_2
|
||||
{ PLAYER_EYES_HALF, PLAYER_MOUTH_CLOSED }, // PLAYER_FACE_NEUTRAL_BLINKING_HALF_2
|
||||
{ PLAYER_EYES_CLOSED, PLAYER_MOUTH_CLOSED }, // PLAYER_FACE_NEUTRAL_BLINKING_CLOSED_2
|
||||
|
||||
// The rest of these faces go unused. Face data encoded within animations handles all other faces.
|
||||
{ PLAYER_EYES_RIGHT, PLAYER_MOUTH_CLOSED }, // PLAYER_FACE_LOOK_RIGHT
|
||||
{ PLAYER_EYES_WIDE, PLAYER_MOUTH_HALF }, // PLAYER_FACE_SURPRISED
|
||||
{ PLAYER_EYES_WINCING, PLAYER_MOUTH_OPEN }, // PLAYER_FACE_HURT
|
||||
{ PLAYER_EYES_OPEN, PLAYER_MOUTH_OPEN }, // PLAYER_FACE_GASP
|
||||
{ PLAYER_EYES_LEFT, PLAYER_MOUTH_CLOSED }, // PLAYER_FACE_LOOK_LEFT
|
||||
{ PLAYER_EYES_RIGHT, PLAYER_MOUTH_CLOSED }, // PLAYER_FACE_LOOK_RIGHT_2
|
||||
{ PLAYER_EYES_CLOSED, PLAYER_MOUTH_OPEN }, // PLAYER_FACE_EYES_CLOSED_MOUTH_OPEN
|
||||
{ PLAYER_EYES_HALF, PLAYER_MOUTH_HALF }, // PLAYER_FACE_OPENING
|
||||
{ PLAYER_EYES_OPEN, PLAYER_MOUTH_OPEN }, // PLAYER_FACE_EYES_AND_MOUTH_OPEN
|
||||
{ PLAYER_EYES_OPEN, PLAYER_MOUTH_CLOSED }, // PLAYER_FACE_NEUTRAL_3
|
||||
};
|
||||
|
||||
/**
|
||||
* Link's eye and mouth textures are placed at the exact same place in adult and child Link's respective object files.
|
||||
* Link's eyes and mouth textures are placed at the exact same place in adult and child Link's respective object files.
|
||||
* This allows the array to only contain the symbols for one file and have it apply to both. This is a problem for
|
||||
* shiftability, and changes will need to be made in the code to account for this in a modding scenario. The symbols
|
||||
* from adult Link's object are used here.
|
||||
*/
|
||||
#ifndef AVOID_UB
|
||||
void* sEyeTextures[] = {
|
||||
gLinkAdultEyesOpenTex, gLinkAdultEyesHalfTex, gLinkAdultEyesClosedfTex, gLinkAdultEyesRollLeftTex,
|
||||
gLinkAdultEyesRollRightTex, gLinkAdultEyesShockTex, gLinkAdultEyesUnk1Tex, gLinkAdultEyesUnk2Tex,
|
||||
void* sEyeTextures[PLAYER_EYES_MAX] = {
|
||||
gLinkAdultEyesOpenTex, // PLAYER_EYES_OPEN
|
||||
gLinkAdultEyesHalfTex, // PLAYER_EYES_HALF
|
||||
gLinkAdultEyesClosedfTex, // PLAYER_EYES_CLOSED
|
||||
gLinkAdultEyesLeftTex, // PLAYER_EYES_LEFT
|
||||
gLinkAdultEyesRightTex, // PLAYER_EYES_RIGHT
|
||||
gLinkAdultEyesWideTex, // PLAYER_EYES_WIDE
|
||||
gLinkAdultEyesDownTex, // PLAYER_EYES_DOWN
|
||||
gLinkAdultEyesWincingTex, // PLAYER_EYES_WINCING
|
||||
};
|
||||
|
||||
void* sMouthTextures[] = {
|
||||
gLinkAdultMouth1Tex,
|
||||
gLinkAdultMouth2Tex,
|
||||
gLinkAdultMouth3Tex,
|
||||
gLinkAdultMouth4Tex,
|
||||
void* sMouthTextures[PLAYER_MOUTH_MAX] = {
|
||||
gLinkAdultMouthClosedTex, // PLAYER_MOUTH_CLOSED
|
||||
gLinkAdultMouthHalfTex, // PLAYER_MOUTH_HALF
|
||||
gLinkAdultMouthOpenTex, // PLAYER_MOUTH_OPEN
|
||||
gLinkAdultMouthSmileTex, // PLAYER_MOUTH_SMILE
|
||||
};
|
||||
#else
|
||||
// Defining `AVOID_UB` will use a 2D array instead and properly use the child link pointers to allow for shifting.
|
||||
void* sEyeTextures[][8] = {
|
||||
{ gLinkAdultEyesOpenTex, gLinkAdultEyesHalfTex, gLinkAdultEyesClosedfTex, gLinkAdultEyesRollLeftTex,
|
||||
gLinkAdultEyesRollRightTex, gLinkAdultEyesShockTex, gLinkAdultEyesUnk1Tex, gLinkAdultEyesUnk2Tex },
|
||||
{ gLinkChildEyesOpenTex, gLinkChildEyesHalfTex, gLinkChildEyesClosedfTex, gLinkChildEyesRollLeftTex,
|
||||
gLinkChildEyesRollRightTex, gLinkChildEyesShockTex, gLinkChildEyesUnk1Tex, gLinkChildEyesUnk2Tex },
|
||||
void* sEyeTextures[][PLAYER_EYES_MAX] = {
|
||||
{
|
||||
gLinkAdultEyesOpenTex, // PLAYER_EYES_OPEN
|
||||
gLinkAdultEyesHalfTex, // PLAYER_EYES_HALF
|
||||
gLinkAdultEyesClosedfTex, // PLAYER_EYES_CLOSED
|
||||
gLinkAdultEyesLeftTex, // PLAYER_EYES_LEFT
|
||||
gLinkAdultEyesRightTex, // PLAYER_EYES_RIGHT
|
||||
gLinkAdultEyesWideTex, // PLAYER_EYES_WIDE
|
||||
gLinkAdultEyesDownTex, // PLAYER_EYES_DOWN
|
||||
gLinkAdultEyesWincingTex, // PLAYER_EYES_WINCING
|
||||
},
|
||||
{
|
||||
gLinkChildEyesOpenTex, // PLAYER_EYES_OPEN
|
||||
gLinkChildEyesHalfTex, // PLAYER_EYES_HALF
|
||||
gLinkChildEyesClosedfTex, // PLAYER_EYES_CLOSED
|
||||
gLinkChildEyesLeftTex, // PLAYER_EYES_LEFT
|
||||
gLinkChildEyesRightTex, // PLAYER_EYES_RIGHT
|
||||
gLinkChildEyesWideTex, // PLAYER_EYES_WIDE
|
||||
gLinkChildEyesDownTex, // PLAYER_EYES_DOWN
|
||||
gLinkChildEyesWincingTex, // PLAYER_EYES_WINCING
|
||||
},
|
||||
};
|
||||
|
||||
void* sMouthTextures[][4] = {
|
||||
{ gLinkAdultMouth1Tex, gLinkAdultMouth2Tex, gLinkAdultMouth3Tex, gLinkAdultMouth4Tex },
|
||||
{ gLinkChildMouth1Tex, gLinkChildMouth2Tex, gLinkChildMouth3Tex, gLinkChildMouth4Tex },
|
||||
void* sMouthTextures[][PLAYER_MOUTH_MAX] = {
|
||||
{
|
||||
gLinkAdultMouthClosedTex, // PLAYER_MOUTH_CLOSED
|
||||
gLinkAdultMouthHalfTex, // PLAYER_MOUTH_HALF
|
||||
gLinkAdultMouthOpenTex, // PLAYER_MOUTH_OPEN
|
||||
gLinkAdultMouthSmileTex, // PLAYER_MOUTH_SMILE
|
||||
},
|
||||
{
|
||||
gLinkChildMouthClosedTex, // PLAYER_MOUTH_CLOSED
|
||||
gLinkChildMouthHalfTex, // PLAYER_MOUTH_HALF
|
||||
gLinkChildMouthOpenTex, // PLAYER_MOUTH_OPEN
|
||||
gLinkChildMouthSmileTex, // PLAYER_MOUTH_SMILE
|
||||
},
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -870,23 +923,31 @@ Gfx* sBootDListGroups[][2] = {
|
|||
void Player_DrawImpl(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dListCount, s32 lod, s32 tunic, s32 boots,
|
||||
s32 face, OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, void* data) {
|
||||
Color_RGB8* color;
|
||||
s32 eyeIndex = (jointTable[22].x & 0xF) - 1;
|
||||
s32 mouthIndex = (jointTable[22].x >> 4) - 1;
|
||||
s32 eyesIndex;
|
||||
s32 mouthIndex;
|
||||
|
||||
// Player's animation data includes eyes and mouth indices for which texture to use on a given frame.
|
||||
// Despite being accessed as "the x component of the 22nd limb", the eyes and mouth indices are stored in 2
|
||||
// additional bytes tacked onto the end of the limb rotation data for a given animation frame.
|
||||
eyesIndex = (jointTable[22].x & 0xF) - 1;
|
||||
mouthIndex = (jointTable[22].x >> 4) - 1;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_player_lib.c", 1721);
|
||||
|
||||
if (eyeIndex < 0) {
|
||||
eyeIndex = sEyeMouthIndices[face][0];
|
||||
// If the eyes index provided by the animation is negative, use the value provided by the `face` argument instead
|
||||
if (eyesIndex < 0) {
|
||||
eyesIndex = sPlayerFaces[face][PLAYER_FACEPART_EYES];
|
||||
}
|
||||
|
||||
#ifndef AVOID_UB
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[eyeIndex]));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[eyesIndex]));
|
||||
#else
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[gSaveContext.save.linkAge][eyeIndex]));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[gSaveContext.save.linkAge][eyesIndex]));
|
||||
#endif
|
||||
|
||||
// If the mouth index provided by the animation is negative, use the value provided by the `face` argument instead
|
||||
if (mouthIndex < 0) {
|
||||
mouthIndex = sEyeMouthIndices[face][1];
|
||||
mouthIndex = sPlayerFaces[face][PLAYER_FACEPART_MOUTH];
|
||||
}
|
||||
|
||||
#ifndef AVOID_UB
|
||||
|
@ -1810,8 +1871,8 @@ void Player_DrawPauseImpl(PlayState* play, void* gameplayKeep, void* linkObject,
|
|||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0C, gCullBackDList);
|
||||
|
||||
Player_DrawImpl(play, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount, 0, tunic, boots, 0,
|
||||
Player_OverrideLimbDrawPause, NULL, &playerSwordAndShield);
|
||||
Player_DrawImpl(play, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount, 0, tunic, boots,
|
||||
PLAYER_FACE_NEUTRAL, Player_OverrideLimbDrawPause, NULL, &playerSwordAndShield);
|
||||
|
||||
gSPEndDisplayList(POLY_OPA_DISP++);
|
||||
gSPEndDisplayList(POLY_XLU_DISP++);
|
||||
|
|
|
@ -7,7 +7,7 @@ CutsceneData D_808BB2F0[] = {
|
|||
CS_PLAYER_CUE_LIST(1),
|
||||
CS_PLAYER_CUE(PLAYER_CUEID_12, 0, 256, 0x0000, 0x0000, 0x0000, 0, 54, 52, 0, 54, 52, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
|
||||
CS_LIGHT_SETTING_LIST(1),
|
||||
CS_LIGHT_SETTING(0x0001, 110, 111, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFE3, 0xFFFFFFC5, 0x00000000, 0xFFFFFFE3, 0xFFFFFFC5),
|
||||
CS_LIGHT_SETTING(0x0001, 110, 111, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFE3, 0xFFFFFFC5, 0x00000000, 0xFFFFFFE3, 0xFFFFFFC5, 0x00000000, 0x00000000, 0x00000000),
|
||||
CS_MISC_LIST(1),
|
||||
CS_MISC(CS_MISC_SET_CSFLAG_1, 110, 111, 0x0000, 0x00000000, 0x00000000, 0x0000002E, 0xFFFFFFE6, 0x00000000, 0x0000002E, 0xFFFFFFE6, 0x00000000, 0x00000000, 0x00000000),
|
||||
CS_DESTINATION(CS_DEST_TEMPLE_OF_TIME_FROM_MASTER_SWORD, 230, 231),
|
||||
|
|
|
@ -89,7 +89,7 @@ CutsceneData D_808BB7A0[] = {
|
|||
CS_PLAYER_CUE_LIST(1),
|
||||
CS_PLAYER_CUE(PLAYER_CUEID_12, 0, 180, 0x0000, 0x0000, 0x0000, 0, 28, -10, 0, -14, 9, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0xBE6EEEEF, -0.23333333f), CS_FLOAT(0x0, 0.0f)),
|
||||
CS_LIGHT_SETTING_LIST(1),
|
||||
CS_LIGHT_SETTING(0x0001, 90, 91, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFF2, 0x00000024, 0x00000000, 0xFFFFFFF2, 0x00000024),
|
||||
CS_LIGHT_SETTING(0x0001, 90, 91, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFF2, 0x00000024, 0x00000000, 0xFFFFFFF2, 0x00000024, 0x00000000, 0x00000000, 0x00000000),
|
||||
CS_MISC_LIST(1),
|
||||
CS_MISC(CS_MISC_SET_CSFLAG_1, 90, 91, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFF8, 0xFFFFFFDD, 0x00000000, 0xFFFFFFF8, 0xFFFFFFDD, 0x00000000, 0x00000000, 0x00000000),
|
||||
CS_TRANSITION(CS_TRANS_GRAY_FILL_IN, 190, 210),
|
||||
|
|
|
@ -25,8 +25,8 @@ static CutsceneData D_8096C1A4[] = {
|
|||
CS_TRANSITION(CS_TRANS_GRAY_FILL_IN, 530, 539),
|
||||
CS_TRANSITION(CS_TRANS_GRAY_FILL_OUT, 540, 570),
|
||||
CS_LIGHT_SETTING_LIST(2),
|
||||
CS_LIGHT_SETTING(0x0000, 0, 10, 0x0000, 0x00000000, 0xFFFFFFDC, 0x00000000, 0x00000018, 0xFFFFFFDC, 0x00000000, 0x00000018),
|
||||
CS_LIGHT_SETTING(0x0000, 10, 3000, 0x0000, 0x00000000, 0xFFFFFFDC, 0x00000000, 0x00000018, 0xFFFFFFDC, 0x00000000, 0x00000018),
|
||||
CS_LIGHT_SETTING(0x0000, 0, 10, 0x0000, 0x00000000, 0xFFFFFFDC, 0x00000000, 0x00000018, 0xFFFFFFDC, 0x00000000, 0x00000018, 0x00000000, 0x00000000, 0x00000000),
|
||||
CS_LIGHT_SETTING(0x0000, 10, 3000, 0x0000, 0x00000000, 0xFFFFFFDC, 0x00000000, 0x00000018, 0xFFFFFFDC, 0x00000000, 0x00000018, 0x00000000, 0x00000000, 0x00000000),
|
||||
CS_ACTOR_CUE_LIST(39, 1),
|
||||
CS_ACTOR_CUE(0x0001, 0, 3000, 0x0000, 0x0000, 0x0000, 0, 0, -2, 0, 0, -2, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
|
||||
CS_TRANSITION(CS_TRANS_GRAY_FILL_IN, 805, 835),
|
||||
|
|
|
@ -58,7 +58,9 @@ static void* sEyeTextures[] = {
|
|||
gImpaEyeClosedTex,
|
||||
};
|
||||
|
||||
#if OOT_DEBUG
|
||||
static u32 D_8098783C = 0;
|
||||
#endif
|
||||
|
||||
static ColliderCylinderInitType1 sCylinderInit = {
|
||||
{
|
||||
|
|
|
@ -23,8 +23,8 @@ static CutsceneData D_8098786C[] = {
|
|||
CS_ACTOR_CUE_LIST(49, 1),
|
||||
CS_ACTOR_CUE(0x0001, 0, 3000, 0x0000, 0x0000, 0x0000, -22, 0, -55, -22, 0, -55, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
|
||||
CS_LIGHT_SETTING_LIST(2),
|
||||
CS_LIGHT_SETTING(0x0001, 0, 10, 0x0000, 0x00000000, 0xFFFFFFFE, 0x00000000, 0x0000000D, 0xFFFFFFFE, 0x00000000, 0x0000000D),
|
||||
CS_LIGHT_SETTING(0x0001, 10, 3000, 0x0000, 0x00000000, 0xFFFFFFFE, 0x00000000, 0x0000000D, 0xFFFFFFFE, 0x00000000, 0x0000000D),
|
||||
CS_LIGHT_SETTING(0x0001, 0, 10, 0x0000, 0x00000000, 0xFFFFFFFE, 0x00000000, 0x0000000D, 0xFFFFFFFE, 0x00000000, 0x0000000D, 0x00000000, 0x00000000, 0x00000000),
|
||||
CS_LIGHT_SETTING(0x0001, 10, 3000, 0x0000, 0x00000000, 0xFFFFFFFE, 0x00000000, 0x0000000D, 0xFFFFFFFE, 0x00000000, 0x0000000D, 0x00000000, 0x00000000, 0x00000000),
|
||||
CS_TRANSITION(CS_TRANS_GRAY_FILL_OUT, 694, 724),
|
||||
CS_TRANSITION(CS_TRANS_GRAY_FILL_IN, 960, 990),
|
||||
CS_TRANSITION(CS_TRANS_GRAY_FILL_IN, 683, 692),
|
||||
|
|
|
@ -69,7 +69,9 @@ static void* sMouthTextures[] = {
|
|||
gSariaMouthSmilingOpenTex, gSariaMouthFrowningTex,
|
||||
};
|
||||
|
||||
#if OOT_DEBUG
|
||||
static u32 D_80990108 = 0;
|
||||
#endif
|
||||
|
||||
#include "z_demo_sa_cutscene_data.inc.c"
|
||||
|
||||
|
|
|
@ -83,7 +83,9 @@ static void* sEyeTextures[] = {
|
|||
gNabooruEyeClosedTex,
|
||||
};
|
||||
|
||||
#if OOT_DEBUG
|
||||
static s32 D_80AB4318 = 0;
|
||||
#endif
|
||||
|
||||
#include "z_en_nb_cutscene_data.inc.c"
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ static CutsceneData D_80AB431C[] = {
|
|||
CS_ACTOR_CUE_LIST(49, 1),
|
||||
CS_ACTOR_CUE(0x0001, 0, 3000, 0x0000, 0x0000, 0x0000, 0, -16, -121, 0, -16, -121, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
|
||||
CS_LIGHT_SETTING_LIST(1),
|
||||
CS_LIGHT_SETTING(0x0003, 0, 3000, 0x0000, 0x00000000, 0xFFFFFF9E, 0x00000000, 0x0000002F, 0xFFFFFF9E, 0x00000000, 0x0000002F),
|
||||
CS_LIGHT_SETTING(0x0003, 0, 3000, 0x0000, 0x00000000, 0xFFFFFF9E, 0x00000000, 0x0000002F, 0xFFFFFF9E, 0x00000000, 0x0000002F, 0x00000000, 0x00000000, 0x00000000),
|
||||
CS_ACTOR_CUE_LIST(39, 1),
|
||||
CS_ACTOR_CUE(0x0001, 0, 3000, 0x0000, 0x0000, 0x0000, 0, 0, -2, 0, 0, -2, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
|
||||
CS_ACTOR_CUE_LIST(40, 3),
|
||||
|
|
|
@ -61,7 +61,9 @@ static void* sEyeTextures[] = {
|
|||
gAdultRutoEyeClosedTex,
|
||||
};
|
||||
|
||||
#if OOT_DEBUG
|
||||
static UNK_TYPE D_80AF4118 = 0;
|
||||
#endif
|
||||
|
||||
#include "z_en_ru2_cutscene_data.inc.c"
|
||||
|
||||
|
|
|
@ -21,11 +21,11 @@ static CutsceneData D_80AF411C[] = {
|
|||
CS_ACTOR_CUE_LIST(49, 1),
|
||||
CS_ACTOR_CUE(0x0001, 0, 3000, 0x0000, 0x0000, 0x0000, 0, -16, -121, 0, -16, -121, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
|
||||
CS_LIGHT_SETTING_LIST(5),
|
||||
CS_LIGHT_SETTING(0x0004, 0, 384, 0x0000, 0x00000000, 0xFFFFFFA1, 0x00000000, 0x00000058, 0xFFFFFFA1, 0x00000000, 0x00000058),
|
||||
CS_LIGHT_SETTING(0x0005, 384, 454, 0x0000, 0x00000000, 0xFFFFFFA1, 0x00000000, 0x00000058, 0xFFFFFFA1, 0x00000000, 0x00000058),
|
||||
CS_LIGHT_SETTING(0x0004, 454, 554, 0x0000, 0x00000000, 0xFFFFFFA1, 0x00000000, 0x00000058, 0xFFFFFFA1, 0x00000000, 0x00000058),
|
||||
CS_LIGHT_SETTING(0x0005, 554, 624, 0x0000, 0x00000000, 0xFFFFFFA1, 0x00000000, 0x00000058, 0xFFFFFFA1, 0x00000000, 0x00000058),
|
||||
CS_LIGHT_SETTING(0x0004, 624, 3001, 0x0000, 0x00000000, 0xFFFFFFA1, 0x00000000, 0x00000058, 0xFFFFFFA1, 0x00000000, 0x00000058),
|
||||
CS_LIGHT_SETTING(0x0004, 0, 384, 0x0000, 0x00000000, 0xFFFFFFA1, 0x00000000, 0x00000058, 0xFFFFFFA1, 0x00000000, 0x00000058, 0x00000000, 0x00000000, 0x00000000),
|
||||
CS_LIGHT_SETTING(0x0005, 384, 454, 0x0000, 0x00000000, 0xFFFFFFA1, 0x00000000, 0x00000058, 0xFFFFFFA1, 0x00000000, 0x00000058, 0x00000000, 0x00000000, 0x00000000),
|
||||
CS_LIGHT_SETTING(0x0004, 454, 554, 0x0000, 0x00000000, 0xFFFFFFA1, 0x00000000, 0x00000058, 0xFFFFFFA1, 0x00000000, 0x00000058, 0x00000000, 0x00000000, 0x00000000),
|
||||
CS_LIGHT_SETTING(0x0005, 554, 624, 0x0000, 0x00000000, 0xFFFFFFA1, 0x00000000, 0x00000058, 0xFFFFFFA1, 0x00000000, 0x00000058, 0x00000000, 0x00000000, 0x00000000),
|
||||
CS_LIGHT_SETTING(0x0004, 624, 3001, 0x0000, 0x00000000, 0xFFFFFFA1, 0x00000000, 0x00000058, 0xFFFFFFA1, 0x00000000, 0x00000058, 0x00000000, 0x00000000, 0x00000000),
|
||||
CS_ACTOR_CUE_LIST(39, 1),
|
||||
CS_ACTOR_CUE(0x0001, 0, 3000, 0x0000, 0x0000, 0x0000, 0, 0, -2, 0, 0, -2, CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f), CS_FLOAT(0x0, 0.0f)),
|
||||
CS_ACTOR_CUE_LIST(42, 3),
|
||||
|
|
|
@ -472,7 +472,6 @@ void EnXc_SetColossusWindSFX(PlayState* play) {
|
|||
if (gSaveContext.sceneLayer == 4) {
|
||||
static s32 D_80B41D90 = 0;
|
||||
static Vec3f sPos = { 0.0f, 0.0f, 0.0f };
|
||||
static f32 sMaxSpeed = 0.0f;
|
||||
static Vec3f D_80B42DB0;
|
||||
s32 pad;
|
||||
s16 sceneId = play->sceneId;
|
||||
|
@ -487,8 +486,9 @@ void EnXc_SetColossusWindSFX(PlayState* play) {
|
|||
|
||||
if (D_80B41D90 != 0) {
|
||||
f32 speed = Math3D_Vec3f_DistXYZ(&D_80B42DB0, eye) / 7.058922f;
|
||||
|
||||
#if OOT_DEBUG
|
||||
static f32 sMaxSpeed = 0.0f;
|
||||
|
||||
sMaxSpeed = CLAMP_MIN(sMaxSpeed, speed);
|
||||
PRINTF("MAX speed = %f\n", sMaxSpeed);
|
||||
#endif
|
||||
|
|
|
@ -11007,9 +11007,9 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) {
|
|||
}
|
||||
|
||||
Math_ScaledStepToS(&this->unk_6C2, 0, 400);
|
||||
func_80032CB4(this->unk_3A8, 20, 80, 6);
|
||||
|
||||
this->actor.shape.face = this->unk_3A8[0] + ((play->gameplayFrames & 32) ? 0 : 3);
|
||||
FaceChange_UpdateBlinking(&this->faceChange, 20, 80, 6);
|
||||
this->actor.shape.face = this->faceChange.face + ((play->gameplayFrames & 32) ? 0 : 3);
|
||||
|
||||
if (this->currentMask == PLAYER_MASK_BUNNY) {
|
||||
Player_UpdateBunnyEars(this);
|
||||
|
|
31
tools/ZAPD/.github/workflows/main.yml
vendored
31
tools/ZAPD/.github/workflows/main.yml
vendored
|
@ -22,40 +22,51 @@ jobs:
|
|||
|
||||
- name: Checkout oot
|
||||
run: |
|
||||
cd ../
|
||||
rm -rf oot/
|
||||
git clone https://github.com/zeldaret/oot.git
|
||||
cd oot
|
||||
echo $(pwd)
|
||||
git submodule update --init --recursive
|
||||
|
||||
- name: Checkout mm
|
||||
run: |
|
||||
cd ../
|
||||
rm -rf mm/
|
||||
git clone https://github.com/zeldaret/mm.git
|
||||
cd mm
|
||||
echo $(pwd)
|
||||
|
||||
- name: Set up repos
|
||||
run: echo "Set up repos"
|
||||
|
||||
- name: Setup OOT
|
||||
run: |
|
||||
cd ../
|
||||
cd oot
|
||||
echo $(pwd)
|
||||
mkdir -p baseroms/gc-eu-mq-dbg/segments
|
||||
cp ~/baserom_original.z64 ./baseroms/gc-eu-mq-dbg/baserom.z64
|
||||
make venv
|
||||
make -C tools -j
|
||||
cp ../ZAPD.out tools/ZAPD/
|
||||
.venv/bin/python3 tools/decompress_baserom.py gc-eu-mq-dbg
|
||||
.venv/bin/python3 tools/extract_baserom.py baseroms/gc-eu-mq-dbg/baserom-decompressed.z64 -o baseroms/gc-eu-mq-dbg/segments --dmadata-start 0x12f70 --dmadata-names baseroms/gc-eu-mq-dbg/dmadata_names.txt
|
||||
.venv/bin/python3 extract_assets.py -j 4
|
||||
.venv/bin/python3 tools/msgdis.py --text-out assets/text/message_data.h --staff-text-out assets/text/message_data_staff.h
|
||||
cd tools
|
||||
rm -rf ZAPD/
|
||||
ln -s ../../ZAPD
|
||||
cd ../
|
||||
make -j $(nproc) setup
|
||||
|
||||
- name: Setup MM
|
||||
run: |
|
||||
cd ../
|
||||
cd mm
|
||||
echo $(pwd)
|
||||
python3 -m venv .mm-env
|
||||
source .mm-env/bin/activate
|
||||
python3 -m pip install -r requirements.txt
|
||||
cp ~/baserom.mm.us.rev1.z64 ./baserom.mm.us.rev1.z64
|
||||
cd tools
|
||||
rm -rf ZAPD/
|
||||
ln -s ../../ZAPD
|
||||
cd ../
|
||||
make -C tools -j
|
||||
cp ../ZAPD.out tools/ZAPD/
|
||||
python3 tools/fixbaserom.py
|
||||
python3 tools/extract_baserom.py
|
||||
python3 tools/decompress_yars.py
|
||||
|
@ -66,13 +77,17 @@ jobs:
|
|||
|
||||
- name: Build oot
|
||||
run: |
|
||||
cd ../
|
||||
cd oot
|
||||
echo $(pwd)
|
||||
make venv
|
||||
make -j
|
||||
|
||||
- name: Build mm
|
||||
run: |
|
||||
cd ../
|
||||
cd mm
|
||||
echo $(pwd)
|
||||
python3 -m venv .mm-env
|
||||
source .mm-env/bin/activate
|
||||
python3 -m pip install -r requirements.txt
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
[subrepo]
|
||||
remote = https://github.com/zeldaret/ZAPD.git
|
||||
branch = master
|
||||
commit = b3bfa14cf432115a0a675d243f3a1b3197f17cbd
|
||||
parent = 59017f201eae4a1bc9212ea2c7dc51d4a036108b
|
||||
commit = 1300a4f36584627aa784cbc252d1c8ecd7b40e68
|
||||
parent = 4522ee2cae12b2d23b7ef0134f24f7c3e26935f0
|
||||
method = merge
|
||||
cmdver = 0.4.6
|
||||
|
|
|
@ -15,7 +15,7 @@ const std::unordered_map<CutsceneOoT_CommandType, CsCommandListDescriptor> csCom
|
|||
{CutsceneOoT_CommandType::CS_CMD_MISC,
|
||||
{"CS_MISC", "(%s, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"}},
|
||||
{CutsceneOoT_CommandType::CS_CMD_LIGHT_SETTING,
|
||||
{"CS_LIGHT_SETTING", "(0x%02X, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"}},
|
||||
{"CS_LIGHT_SETTING", "(0x%02X, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"}},
|
||||
{CutsceneOoT_CommandType::CS_CMD_START_SEQ,
|
||||
{"CS_START_SEQ", "(%s, %i, %i, %i, %i, %i, %i, %i, %i, %i, %i)"}},
|
||||
{CutsceneOoT_CommandType::CS_CMD_STOP_SEQ,
|
||||
|
|
|
@ -24,7 +24,7 @@ std::string ZCutscene::GetBodySourceCode() const
|
|||
{
|
||||
std::string output = "";
|
||||
|
||||
output += StringHelper::Sprintf(" CS_BEGIN_CUTSCENE(%i, %i),\n", commands.size(), endFrame);
|
||||
output += StringHelper::Sprintf(" CS_BEGIN_CUTSCENE(%i, %i),\n", numCommands, endFrame);
|
||||
|
||||
for (size_t i = 0; i < commands.size(); i++)
|
||||
{
|
||||
|
@ -32,7 +32,7 @@ std::string ZCutscene::GetBodySourceCode() const
|
|||
output += " " + cmd->GenerateSourceCode();
|
||||
}
|
||||
|
||||
output += StringHelper::Sprintf(" CS_END(),", commands.size(), endFrame);
|
||||
output += StringHelper::Sprintf(" CS_END(),");
|
||||
|
||||
return output;
|
||||
}
|
||||
|
|
|
@ -94,10 +94,11 @@ def read_s16(f: BinaryIO, offset: int) -> int:
|
|||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Report BSS reorderings between the baserom and the current build "
|
||||
description="Report data/bss reorderings between the baserom and the current build "
|
||||
"by parsing relocations from the built object files and comparing their final values "
|
||||
"between the baserom and the current build. "
|
||||
"Assumes that the only differences are due to BSS ordering."
|
||||
"Assumes that the only differences are due to ordering and that the text sections of the "
|
||||
"ROMS are not shifted."
|
||||
)
|
||||
parser.add_argument(
|
||||
"--oot-version",
|
||||
|
@ -118,30 +119,34 @@ def main():
|
|||
mapfile = mapfile_parser.mapfile.MapFile()
|
||||
mapfile.readMapFile(f"build/{version}/oot-{version}.map")
|
||||
|
||||
reloc_mapfile_segments = []
|
||||
# Segments built from source code (filtering out assets)
|
||||
source_code_segments = []
|
||||
for mapfile_segment in mapfile:
|
||||
if args.segment and mapfile_segment.name != f"..{args.segment}":
|
||||
continue
|
||||
if not (
|
||||
mapfile_segment.name == "..boot"
|
||||
or mapfile_segment.name == "..code"
|
||||
or (
|
||||
mapfile_segment.name.startswith("..ovl_")
|
||||
and not mapfile_segment.name.endswith(".bss")
|
||||
)
|
||||
if (
|
||||
args.segment
|
||||
and mapfile_segment.name != f"..{args.segment}"
|
||||
and mapfile_segment.name != f"..{args.segment}.bss"
|
||||
):
|
||||
continue
|
||||
reloc_mapfile_segments.append(mapfile_segment)
|
||||
if not (
|
||||
mapfile_segment.name.startswith("..boot")
|
||||
or mapfile_segment.name.startswith("..code")
|
||||
or mapfile_segment.name.startswith("..ovl_")
|
||||
):
|
||||
continue
|
||||
source_code_segments.append(mapfile_segment)
|
||||
|
||||
base = open(f"baseroms/{version}/baserom-decompressed.z64", "rb")
|
||||
build = open(f"build/{version}/oot-{version}.z64", "rb")
|
||||
|
||||
# Find all pointers with different values
|
||||
pointers = []
|
||||
for mapfile_segment in reloc_mapfile_segments:
|
||||
for mapfile_segment in source_code_segments:
|
||||
for file in mapfile_segment:
|
||||
if not str(file.filepath).endswith(".o"):
|
||||
continue
|
||||
if file.sectionType == ".bss":
|
||||
continue
|
||||
for reloc in read_relocs(file.filepath, file.sectionType):
|
||||
if reloc.offset_32 is not None:
|
||||
base_value = read_u32(base, file.vrom + reloc.offset_32)
|
||||
|
@ -153,8 +158,8 @@ def main():
|
|||
build, file.vrom + reloc.offset_hi16
|
||||
):
|
||||
print(
|
||||
f"Error: Relocation for {reloc.name} in {file.filepath} references a shifted portion of the ROM.\n"
|
||||
"Please ensure that the only differences between the baserom and the current build are due to BSS reordering.",
|
||||
f"Error: Reference to {reloc.name} in {file.filepath} is in a shifted portion of the ROM.\n"
|
||||
"Please ensure that the only differences between the baserom and the current build are due to data ordering.",
|
||||
file=sys.stderr,
|
||||
)
|
||||
sys.exit(1)
|
||||
|
@ -177,20 +182,16 @@ def main():
|
|||
pointers = list({p.base_value: p for p in pointers}.values())
|
||||
pointers.sort(key=lambda p: p.base_value)
|
||||
|
||||
# Go through BSS sections and report differences
|
||||
i = 0
|
||||
for mapfile_segment in mapfile:
|
||||
# Go through sections and report differences
|
||||
for mapfile_segment in source_code_segments:
|
||||
for file in mapfile_segment:
|
||||
if not file.sectionType == ".bss":
|
||||
continue
|
||||
|
||||
pointers_in_section = [
|
||||
p for p in pointers if file.vram <= p.build_value < file.vram + file.size
|
||||
]
|
||||
if not pointers_in_section:
|
||||
continue
|
||||
|
||||
print(f"{file.filepath} BSS is reordered:")
|
||||
print(f"{file.filepath} {file.sectionType} is reordered:")
|
||||
for i, p in enumerate(pointers_in_section):
|
||||
if p.addend > 0:
|
||||
addend_str = f"+0x{p.addend:X}"
|
|
@ -491,7 +491,7 @@ cutscene_command_macros = {
|
|||
"CS_MISC(%h2:1:e4, %h1:1:s, %h2:2:s, %h1:2:x, %w1:3:x, %w1:4:x, %w1:5:x, %w1:6:x, %w1:7:x, %w1:8:x, %w1:9:x, %w1:10:x, %w1:11:x, %w1:12:x)", 12),
|
||||
4:
|
||||
("CS_LIGHT_SETTING_LIST(%w1:1:s)", 2, None, 0,
|
||||
"CS_LIGHT_SETTING(%h2:1:x-1, %h1:1:s, %h2:2:s, %h1:2:x, %w1:3:x, %w1:4:x, %w1:5:x, %w1:6:x, %w1:7:x, %w1:8:x, %w1:9:x)", 12),
|
||||
"CS_LIGHT_SETTING(%h2:1:x-1, %h1:1:s, %h2:2:s, %h1:2:x, %w1:3:x, %w1:4:x, %w1:5:x, %w1:6:x, %w1:7:x, %w1:8:x, %w1:9:x, %w1:10:x, %w1:11:x, %w1:12:x)", 12),
|
||||
86:
|
||||
("CS_START_SEQ_LIST(%w1:1:s)", 2, None, 0,
|
||||
"CS_START_SEQ(%h2:1:e3, %h1:1:s, %h2:2:s, %h1:2:x, %w1:3:x, %w1:4:x, %w1:5:x, %w1:6:x, %w1:7:x, %w1:8:x, %w1:9:x)", 12),
|
||||
|
|
|
@ -465,8 +465,8 @@ func_800328D4 = 0x800255F8; // type:func
|
|||
func_80032AF0 = 0x80025814; // type:func
|
||||
Actor_Find = 0x80025964; // type:func
|
||||
Enemy_StartFinishingBlow = 0x800259A4; // type:func
|
||||
func_80032CB4 = 0x800259DC; // type:func
|
||||
func_80032D60 = 0x80025A90; // type:func
|
||||
FaceChange_UpdateBlinking = 0x800259DC; // type:func
|
||||
FaceChange_UpdateRandomSet = 0x80025A90; // type:func
|
||||
BodyBreak_Alloc = 0x80025B5C; // type:func
|
||||
BodyBreak_SetInfo = 0x80025C54; // type:func
|
||||
BodyBreak_SpawnParts = 0x80025D5C; // type:func
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
[subrepo]
|
||||
remote = git@github.com:EllipticEllipsis/fado.git
|
||||
branch = master
|
||||
commit = 8d896ee97d565508755584803c409fc33bb0c953
|
||||
parent = 9f09505d34619883748a7dab05071883281c14fd
|
||||
commit = 7fad57f834a86b6a752292996f99f08771f29df4
|
||||
parent = 17d683780d3878159959a87a9c4a2683d8781ef2
|
||||
method = merge
|
||||
cmdver = 0.4.5
|
||||
cmdver = 0.4.6
|
||||
|
|
|
@ -57,7 +57,7 @@ clean:
|
|||
$(RM) -r build $(ELF)
|
||||
|
||||
format:
|
||||
clang-format-11 -i $(C_FILES) $(H_FILES) lib/fairy/*
|
||||
clang-format-14 -i $(C_FILES) $(H_FILES) lib/fairy/*
|
||||
|
||||
.PHONY: all clean format
|
||||
|
||||
|
|
|
@ -476,9 +476,9 @@ typedef struct {
|
|||
/* Relocation table entry with addend (in section of type SHT_RELA). */
|
||||
|
||||
typedef struct {
|
||||
Elf32_Addr r_offset; /* Address */
|
||||
Elf32_Word r_info; /* Relocation type and symbol index */
|
||||
Elf32_Sword r_addend; /* Addend */
|
||||
Elf32_Addr r_offset; /* Address */
|
||||
Elf32_Word r_info; /* Relocation type and symbol index */
|
||||
Elf32_Sword r_addend; /* Addend */
|
||||
} Elf32_Rela;
|
||||
|
||||
/* How to extract and insert information held in the r_info field. */
|
||||
|
|
|
@ -368,7 +368,7 @@ void Fairy_PrintSectionSizes(FairySecHeader* sectionTable, FILE* inputFile, size
|
|||
}
|
||||
}
|
||||
/* Can use symbols here too */
|
||||
puts(".section .ovl");
|
||||
puts(".section .ovl, \"a\"");
|
||||
printf("# OverlayInfo\n");
|
||||
printf(".word 0x%08X # .text size\n", textSize);
|
||||
printf(".word 0x%08X # .data size\n", dataSize);
|
||||
|
|
|
@ -17,16 +17,6 @@
|
|||
|
||||
/* String-finding-related functions */
|
||||
|
||||
bool Fado_CheckInProgBitsSections(Elf32_Section section, vc_vector* progBitsSections) {
|
||||
Elf32_Section* i;
|
||||
VC_FOREACH(i, progBitsSections) {
|
||||
if (*i == section) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* For each input file, construct a vector of pointers to the starts of the strings defined in that file.
|
||||
*/
|
||||
|
@ -41,8 +31,7 @@ void Fado_ConstructStringVectors(vc_vector** stringVectors, FairyFileInfo* fileI
|
|||
|
||||
/* Build a vector of pointers to defined symbols' names */
|
||||
for (currentSym = 0; currentSym < fileInfo[currentFile].symtabInfo.sectionEntryCount; currentSym++) {
|
||||
if ((symtab[currentSym].st_shndx != STN_UNDEF) &&
|
||||
Fado_CheckInProgBitsSections(symtab[currentSym].st_shndx, fileInfo[currentFile].progBitsSections)) {
|
||||
if (symtab[currentSym].st_shndx != STN_UNDEF) {
|
||||
/* Have to pass a double pointer so it copies the pointer instead of the start of the string */
|
||||
char* stringPtr = &fileInfo[currentFile].strtab[symtab[currentSym].st_name];
|
||||
assert(vc_vector_push_back(stringVectors[currentFile], &stringPtr));
|
||||
|
@ -251,7 +240,7 @@ void Fado_Relocs(FILE* outputFile, int inputFilesCount, FILE** inputFiles, const
|
|||
|
||||
{
|
||||
/* Write header */
|
||||
fprintf(outputFile, ".section .ovl\n");
|
||||
fprintf(outputFile, ".section .ovl, \"a\"\n");
|
||||
fprintf(outputFile, "# %sOverlayInfo\n", ovlName);
|
||||
fprintf(outputFile, ".word _%sSegmentTextSize\n", ovlName);
|
||||
fprintf(outputFile, ".word _%sSegmentDataSize\n", ovlName);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Copyright (C) 2021 Elliptic Ellipsis */
|
||||
/* SPDX-License-Identifier: AGPL-3.0-only */
|
||||
const char versionNumber[] = "1.3.1";
|
||||
const char versionNumber[] = "1.3.2";
|
||||
const char credits[] = "Written by Elliptic Ellipsis\nwith additions from AngheloAlf and Tharo";
|
||||
const char repo[] = "https://github.com/EllipticEllipsis/fado/";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue