1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-13 04:39:36 +00:00

Skip compiling C-included files during the build (#1386)

* Update the makefile to skip .inc.c files when building

* Rename all C-included source files to .inc.c
This commit is contained in:
Roman971 2022-10-04 12:36:25 +02:00 committed by GitHub
parent 2f4c25da53
commit 1cb00350d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
41 changed files with 22 additions and 21 deletions

View file

@ -168,7 +168,7 @@ ASSET_FILES_OUT := $(foreach f,$(ASSET_FILES_XML:.xml=.c),$f) \
UNDECOMPILED_DATA_DIRS := $(shell find data -type d)
# source files
C_FILES := $(foreach dir,$(SRC_DIRS) $(ASSET_BIN_DIRS),$(wildcard $(dir)/*.c))
C_FILES := $(filter-out %.inc.c,$(foreach dir,$(SRC_DIRS) $(ASSET_BIN_DIRS),$(wildcard $(dir)/*.c)))
S_FILES := $(foreach dir,$(SRC_DIRS) $(UNDECOMPILED_DATA_DIRS),$(wildcard $(dir)/*.s))
O_FILES := $(foreach f,$(S_FILES:.s=.o),build/$f) \
$(foreach f,$(C_FILES:.c=.o),build/$f) \

View file

@ -3963,7 +3963,7 @@ s32 func_80035124(Actor* actor, PlayState* play) {
return ret;
}
#include "z_cheap_proc.c"
#include "z_cheap_proc.inc.c"
u8 func_800353E8(PlayState* play) {
Player* player = GET_PLAYER(play);

View file

@ -33,7 +33,7 @@ s32 Camera_UpdateWater(Camera* camera);
#define DISTORTION_UNDERWATER_STRONG (1 << 3)
#define DISTORTION_UNDERWATER_FISHING (1 << 4)
#include "z_camera_data.c"
#include "z_camera_data.inc.c"
/*===============================================================*/

View file

@ -6,7 +6,7 @@ static s16 sDisableAttention = false;
static s16 sUnused = -1;
static s32 sPrevFrameCs1100 = -4096;
#include "z_onepointdemo_data.c"
#include "z_onepointdemo_data.inc.c"
void OnePointCutscene_AddVecSphToVec3f(Vec3f* dst, Vec3f* src, VecSph* vecSph) {
Vec3f out;

View file

@ -1,5 +1,6 @@
#include "ultra64.h"
#include "sintable.c"
#include "sintable.inc.c"
s16 sins(u16 x) {
s16 value;

View file

@ -45,7 +45,7 @@ const ActorInit Boss_Dodongo_InitVars = {
(ActorFunc)BossDodongo_Draw,
};
#include "z_boss_dodongo_data.c"
#include "z_boss_dodongo_data.inc.c"
static InitChainEntry sInitChain[] = {
ICHAIN_U8(targetMode, 5, ICHAIN_CONTINUE),

View file

@ -56,7 +56,7 @@ const ActorInit Boss_Fd_InitVars = {
(ActorFunc)BossFd_Draw,
};
#include "z_boss_fd_colchk.c"
#include "z_boss_fd_colchk.inc.c"
static InitChainEntry sInitChain[] = {
ICHAIN_U8(targetMode, 5, ICHAIN_CONTINUE),

View file

@ -58,7 +58,7 @@ const ActorInit Boss_Fd2_InitVars = {
(ActorFunc)BossFd2_Draw,
};
#include "z_boss_fd2_colchk.c"
#include "z_boss_fd2_colchk.inc.c"
static Vec3f sHoleLocations[] = {
{ 0.0f, 90.0f, -243.0f }, { 0.0f, 90.0f, 0.0f }, { 0.0f, 90.0f, 243.0f },

View file

@ -44,7 +44,7 @@ const ActorInit Boss_Ganon2_InitVars = {
(ActorFunc)BossGanon2_Draw,
};
#include "z_boss_ganon2_data.c"
#include "z_boss_ganon2_data.inc.c"
void BossGanon2_InitRand(s32 seedInit0, s32 seedInit1, s32 seedInit2) {
sSeed1 = seedInit0;

View file

@ -140,7 +140,7 @@ static f32 sFlatWidth[41] = {
8.6f, 8.3f, 8.2f, 8.1f, 7.2f, 6.7f, 5.9f, 4.9f, 2.7f, 0.0f, 0.0f, 0.0f, 0.0f,
};
#include "z_boss_mo_colchk.c"
#include "z_boss_mo_colchk.inc.c"
static BossMoEffect sEffects[BOSS_MO_EFFECT_COUNT];
static s32 sSeed1;

View file

@ -246,7 +246,7 @@ const ActorInit Boss_Sst_InitVars = {
(ActorFunc)BossSst_DrawHand,
};
#include "z_boss_sst_colchk.c"
#include "z_boss_sst_colchk.inc.c"
static AnimationHeader* sHandIdleAnims[] = { &gBongoLeftHandIdleAnim, &gBongoRightHandIdleAnim };
static AnimationHeader* sHandFlatPoses[] = { &gBongoLeftHandFlatPoseAnim, &gBongoRightHandFlatPoseAnim };

View file

@ -17,7 +17,7 @@ void DemoDu_Draw(Actor* thisx, PlayState* play);
static s32 sUnused = 0;
#pragma asmproc recurse
#include "z_demo_du_cutscene_data.c"
#include "z_demo_du_cutscene_data.inc.c"
static void* sEyeTextures[] = { gDaruniaEyeOpenTex, gDaruniaEyeOpeningTex, gDaruniaEyeShutTex, gDaruniaEyeClosingTex };
static void* sMouthTextures[] = { gDaruniaMouthSeriousTex, gDaruniaMouthGrinningTex, gDaruniaMouthOpenTex,

View file

@ -73,7 +73,7 @@ static ColliderCylinderInitType1 sCylinderInit = {
};
#pragma asmproc recurse
#include "z_demo_im_cutscene_data.c"
#include "z_demo_im_cutscene_data.inc.c"
static DemoImActionFunc sActionFuncs[] = {
func_809856F8, func_80985718, func_80985738, func_80985770, func_809857B0, func_809857F0, func_80985830,

View file

@ -72,7 +72,7 @@ static void* sMouthTextures[] = {
static u32 D_80990108 = 0;
#pragma asmproc recurse
#include "z_demo_sa_cutscene_data.c"
#include "z_demo_sa_cutscene_data.inc.c"
static DemoSaActionFunc sActionFuncs[] = {
func_8098EBB8, func_8098EBD8, func_8098EBF8, func_8098EC28, func_8098EC60, func_8098EC94, func_8098ECCC,

View file

@ -43,7 +43,7 @@ const ActorInit En_Jj_InitVars = {
static s32 sUnused = 0;
#pragma asmproc recurse
#include "z_en_jj_cutscene_data.c"
#include "z_en_jj_cutscene_data.inc.c"
static s32 sUnused2[] = { 0, 0 };

View file

@ -784,7 +784,7 @@ static Gfx* sDisplayLists[] = {
object_kanban_DL_0013D0, object_kanban_DL_001488, object_kanban_DL_001540,
};
#include "z_en_kanban_gfx.c"
#include "z_en_kanban_gfx.inc.c"
static f32 sCutAngles[] = {
/* CUT_POST */ 0.50f * M_PI,

View file

@ -86,7 +86,7 @@ static void* sEyeTextures[] = {
static s32 D_80AB4318 = 0;
#pragma asmproc recurse
#include "z_en_nb_cutscene_data.c"
#include "z_en_nb_cutscene_data.inc.c"
s32 EnNb_GetPath(EnNb* this) {
s32 path = this->actor.params >> 8;

View file

@ -106,7 +106,7 @@ static void* sMouthTextures[] = {
static s32 sUnused = 0;
#pragma asmproc recurse
#include "z_en_ru1_cutscene_data.c"
#include "z_en_ru1_cutscene_data.inc.c"
static u32 D_80AF1938 = 0;

View file

@ -64,7 +64,7 @@ static void* sEyeTextures[] = {
static UNK_TYPE D_80AF4118 = 0;
#pragma asmproc recurse
#include "z_en_ru2_cutscene_data.c"
#include "z_en_ru2_cutscene_data.inc.c"
static EnRu2ActionFunc sActionFuncs[] = {
func_80AF2CB4, func_80AF2CD4, func_80AF2CF4, func_80AF2D2C, func_80AF2D6C, func_80AF2DAC, func_80AF2DEC,

View file

@ -25,7 +25,7 @@ void func_80B4BF2C(EnZl1* this, PlayState* play);
extern CutsceneData D_80B4C5D0[];
#include "z_en_zl1_camera_data.c"
#include "z_en_zl1_camera_data.inc.c"
const ActorInit En_Zl1_InitVars = {
ACTOR_EN_ZL1,

View file

@ -176,7 +176,7 @@ static AnimationInfo sAnimationInfo[] = {
/* 33 */ /* transition to standing */ { &gChildZeldaAnim_000654, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -8.0f },
};
#include "z_en_zl4_cutscene_data.c"
#include "z_en_zl4_cutscene_data.inc.c"
void EnZl4_SetActiveCamDir(PlayState* play, s16 index) {
Camera* activeCam = GET_ACTIVE_CAM(play);