Use overlay to load level
This commit is contained in:
parent
b84fab7d45
commit
d722a7ebdb
6
Makefile
6
Makefile
@ -9,6 +9,7 @@ graphics.c \
|
||||
psx.c \
|
||||
space.c \
|
||||
levels/level.c \
|
||||
levels/level1.c \
|
||||
../common/crt0/crt0.s \
|
||||
TIM/home.tim \
|
||||
TIM/cat.tim \
|
||||
@ -20,8 +21,8 @@ TIM/bg_camPath_003.tim \
|
||||
TIM/bg_camPath_004.tim \
|
||||
TIM/bg_camPath_005.tim \
|
||||
|
||||
#~ OVERLAYSCRIPT ?= overlay.ld
|
||||
#~ OVERLAYSECTION ?= .ovly0 .ovly1
|
||||
OVERLAYSCRIPT ?= overlay.ld
|
||||
OVERLAYSECTION ?= .ovly0 .ovly1
|
||||
|
||||
# img2tim -t -bpp 8 -org 320 0 -plt 0 481 -o bg.tim bg.png
|
||||
|
||||
@ -49,6 +50,7 @@ LDFLAGS += -lsio
|
||||
LDFLAGS += -lsnd
|
||||
LDFLAGS += -lspu
|
||||
LDFLAGS += -ltap
|
||||
LDFLAGS += -lcd
|
||||
LDFLAGS += -Wl,--end-group
|
||||
|
||||
include ../common.mk \
|
||||
|
4
config/OverlayExample.cnf
Normal file
4
config/OverlayExample.cnf
Normal file
@ -0,0 +1,4 @@
|
||||
BOOT=cdrom:\SCES_003.90;1
|
||||
TCB=4
|
||||
EVENT=10
|
||||
STACK=801FFFF0
|
22
config/OverlayExample.xml
Normal file
22
config/OverlayExample.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<iso_project image_name="OverlayExample.bin" cue_sheet="OverlayExample.cue" no_xa="0">
|
||||
<track type="data">
|
||||
<identifiers
|
||||
system = "PLAYSTATION"
|
||||
application = "PLAYSTATION"
|
||||
volume = "MYDISC"
|
||||
volume_set = "MYDISC"
|
||||
publisher = "JABY"
|
||||
data_preparer = "MKPSXISO"
|
||||
copyright = "COPYLEFT"
|
||||
/>
|
||||
<license file="LICENSEE.DAT"/>
|
||||
<directory_tree>
|
||||
<file name="system.cnf" type="data" source="config/OverlayExample.cnf"/>
|
||||
<file name="SCES_003.90" type="data" source="main.ps-exe"/>
|
||||
<file name="LEVEL.bin" type="data" source="Overlay.ovly0" />
|
||||
<file name="LEVEL1.bin" type="data" source="Overlay.ovly1" />
|
||||
<dummy sectors="1024"/>
|
||||
</directory_tree>
|
||||
</track>
|
||||
</iso_project>
|
901
levels/level.c
901
levels/level.c
File diff suppressed because it is too large
Load Diff
5548
levels/level1.c
Normal file
5548
levels/level1.c
Normal file
File diff suppressed because it is too large
Load Diff
685
levels/level1.h
Normal file
685
levels/level1.h
Normal file
@ -0,0 +1,685 @@
|
||||
#pragma once
|
||||
|
||||
#include "../custom_types.h"
|
||||
|
||||
extern CAMPOS level1_camPos_camPath;
|
||||
|
||||
extern CAMPOS level1_camPos_camPath_001;
|
||||
|
||||
extern CAMPOS level1_camPos_camPath_002;
|
||||
|
||||
extern CAMPOS level1_camPos_camPath_003;
|
||||
|
||||
extern CAMPOS level1_camPos_camPath_004;
|
||||
|
||||
extern CAMPOS level1_camPos_camPath_005;
|
||||
|
||||
extern CAMPATH level1_camPath;
|
||||
|
||||
extern MATRIX level1_lgtmat;
|
||||
|
||||
extern MATRIX level1_cmat;
|
||||
|
||||
extern SVECTOR modelCube_mesh[];
|
||||
|
||||
extern SVECTOR level1_modelCube_normal[];
|
||||
|
||||
extern SVECTOR level1_modelCube_uv[];
|
||||
|
||||
extern CVECTOR level1_modelCube_color[];
|
||||
|
||||
extern PRIM level1_modelCube_index[];
|
||||
|
||||
extern MATRIX level1_modelCube_matrix;
|
||||
|
||||
extern VECTOR level1_modelCube_pos;
|
||||
|
||||
extern SVECTOR level1_modelCube_rot;
|
||||
|
||||
extern short level1_modelCube_isRigidBody;
|
||||
|
||||
extern short level1_modelCube_isStaticBody;
|
||||
|
||||
extern short level1_modelCube_isPrism;
|
||||
|
||||
extern short level1_modelCube_isAnim;
|
||||
|
||||
extern short level1_modelCube_isActor;
|
||||
|
||||
extern short level1_modelCube_isLevel;
|
||||
|
||||
extern short level1_modelCube_isBG;
|
||||
|
||||
extern short level1_modelCube_isSprite;
|
||||
|
||||
extern long level1_modelCube_p;
|
||||
|
||||
extern long level1_modelCube_OTz;
|
||||
|
||||
extern BODY level1_modelCube_body;
|
||||
|
||||
extern TMESH level1_modelCube;
|
||||
|
||||
extern unsigned long _binary_TIM_cat_tim_start[];
|
||||
|
||||
extern unsigned long _binary_TIM_cat_tim_end[];
|
||||
|
||||
extern unsigned long _binary_TIM_cat_tim_length;
|
||||
|
||||
extern TIM_IMAGE level1_tim_cat;
|
||||
|
||||
extern MESH level1_meshCube;
|
||||
|
||||
extern SVECTOR modelCylindre_mesh[];
|
||||
|
||||
extern SVECTOR level1_modelCylindre_normal[];
|
||||
|
||||
extern SVECTOR level1_modelCylindre_uv[];
|
||||
|
||||
extern CVECTOR level1_modelCylindre_color[];
|
||||
|
||||
extern PRIM level1_modelCylindre_index[];
|
||||
|
||||
extern VANIM level1_modelCylindre_anim;
|
||||
|
||||
extern MATRIX level1_modelCylindre_matrix;
|
||||
|
||||
extern VECTOR level1_modelCylindre_pos;
|
||||
|
||||
extern SVECTOR level1_modelCylindre_rot;
|
||||
|
||||
extern short level1_modelCylindre_isRigidBody;
|
||||
|
||||
extern short level1_modelCylindre_isStaticBody;
|
||||
|
||||
extern short level1_modelCylindre_isPrism;
|
||||
|
||||
extern short level1_modelCylindre_isAnim;
|
||||
|
||||
extern short level1_modelCylindre_isActor;
|
||||
|
||||
extern short level1_modelCylindre_isLevel;
|
||||
|
||||
extern short level1_modelCylindre_isBG;
|
||||
|
||||
extern short level1_modelCylindre_isSprite;
|
||||
|
||||
extern long level1_modelCylindre_p;
|
||||
|
||||
extern long level1_modelCylindre_OTz;
|
||||
|
||||
extern BODY level1_modelCylindre_body;
|
||||
|
||||
extern TMESH level1_modelCylindre;
|
||||
|
||||
extern unsigned long _binary_TIM_home_tim_start[];
|
||||
|
||||
extern unsigned long _binary_TIM_home_tim_end[];
|
||||
|
||||
extern unsigned long _binary_TIM_home_tim_length;
|
||||
|
||||
extern TIM_IMAGE level1_tim_home;
|
||||
|
||||
extern MESH level1_meshCylindre;
|
||||
|
||||
extern SVECTOR modelgnd_mesh[];
|
||||
|
||||
extern SVECTOR level1_modelgnd_normal[];
|
||||
|
||||
extern SVECTOR level1_modelgnd_uv[];
|
||||
|
||||
extern CVECTOR level1_modelgnd_color[];
|
||||
|
||||
extern PRIM level1_modelgnd_index[];
|
||||
|
||||
extern MATRIX level1_modelgnd_matrix;
|
||||
|
||||
extern VECTOR level1_modelgnd_pos;
|
||||
|
||||
extern SVECTOR level1_modelgnd_rot;
|
||||
|
||||
extern short level1_modelgnd_isRigidBody;
|
||||
|
||||
extern short level1_modelgnd_isStaticBody;
|
||||
|
||||
extern short level1_modelgnd_isPrism;
|
||||
|
||||
extern short level1_modelgnd_isAnim;
|
||||
|
||||
extern short level1_modelgnd_isActor;
|
||||
|
||||
extern short level1_modelgnd_isLevel;
|
||||
|
||||
extern short level1_modelgnd_isBG;
|
||||
|
||||
extern short level1_modelgnd_isSprite;
|
||||
|
||||
extern long level1_modelgnd_p;
|
||||
|
||||
extern long level1_modelgnd_OTz;
|
||||
|
||||
extern BODY level1_modelgnd_body;
|
||||
|
||||
extern TMESH level1_modelgnd;
|
||||
|
||||
extern MESH level1_meshgnd;
|
||||
|
||||
extern SVECTOR modelgnd_001_mesh[];
|
||||
|
||||
extern SVECTOR level1_modelgnd_001_normal[];
|
||||
|
||||
extern SVECTOR level1_modelgnd_001_uv[];
|
||||
|
||||
extern CVECTOR level1_modelgnd_001_color[];
|
||||
|
||||
extern PRIM level1_modelgnd_001_index[];
|
||||
|
||||
extern MATRIX level1_modelgnd_001_matrix;
|
||||
|
||||
extern VECTOR level1_modelgnd_001_pos;
|
||||
|
||||
extern SVECTOR level1_modelgnd_001_rot;
|
||||
|
||||
extern short level1_modelgnd_001_isRigidBody;
|
||||
|
||||
extern short level1_modelgnd_001_isStaticBody;
|
||||
|
||||
extern short level1_modelgnd_001_isPrism;
|
||||
|
||||
extern short level1_modelgnd_001_isAnim;
|
||||
|
||||
extern short level1_modelgnd_001_isActor;
|
||||
|
||||
extern short level1_modelgnd_001_isLevel;
|
||||
|
||||
extern short level1_modelgnd_001_isBG;
|
||||
|
||||
extern short level1_modelgnd_001_isSprite;
|
||||
|
||||
extern long level1_modelgnd_001_p;
|
||||
|
||||
extern long level1_modelgnd_001_OTz;
|
||||
|
||||
extern BODY level1_modelgnd_001_body;
|
||||
|
||||
extern TMESH level1_modelgnd_001;
|
||||
|
||||
extern MESH level1_meshgnd_001;
|
||||
|
||||
extern SVECTOR modelgnd_003_mesh[];
|
||||
|
||||
extern SVECTOR level1_modelgnd_003_normal[];
|
||||
|
||||
extern SVECTOR level1_modelgnd_003_uv[];
|
||||
|
||||
extern CVECTOR level1_modelgnd_003_color[];
|
||||
|
||||
extern PRIM level1_modelgnd_003_index[];
|
||||
|
||||
extern MATRIX level1_modelgnd_003_matrix;
|
||||
|
||||
extern VECTOR level1_modelgnd_003_pos;
|
||||
|
||||
extern SVECTOR level1_modelgnd_003_rot;
|
||||
|
||||
extern short level1_modelgnd_003_isRigidBody;
|
||||
|
||||
extern short level1_modelgnd_003_isStaticBody;
|
||||
|
||||
extern short level1_modelgnd_003_isPrism;
|
||||
|
||||
extern short level1_modelgnd_003_isAnim;
|
||||
|
||||
extern short level1_modelgnd_003_isActor;
|
||||
|
||||
extern short level1_modelgnd_003_isLevel;
|
||||
|
||||
extern short level1_modelgnd_003_isBG;
|
||||
|
||||
extern short level1_modelgnd_003_isSprite;
|
||||
|
||||
extern long level1_modelgnd_003_p;
|
||||
|
||||
extern long level1_modelgnd_003_OTz;
|
||||
|
||||
extern BODY level1_modelgnd_003_body;
|
||||
|
||||
extern TMESH level1_modelgnd_003;
|
||||
|
||||
extern MESH level1_meshgnd_003;
|
||||
|
||||
extern SVECTOR modelgnd_002_mesh[];
|
||||
|
||||
extern SVECTOR level1_modelgnd_002_normal[];
|
||||
|
||||
extern SVECTOR level1_modelgnd_002_uv[];
|
||||
|
||||
extern CVECTOR level1_modelgnd_002_color[];
|
||||
|
||||
extern PRIM level1_modelgnd_002_index[];
|
||||
|
||||
extern MATRIX level1_modelgnd_002_matrix;
|
||||
|
||||
extern VECTOR level1_modelgnd_002_pos;
|
||||
|
||||
extern SVECTOR level1_modelgnd_002_rot;
|
||||
|
||||
extern short level1_modelgnd_002_isRigidBody;
|
||||
|
||||
extern short level1_modelgnd_002_isStaticBody;
|
||||
|
||||
extern short level1_modelgnd_002_isPrism;
|
||||
|
||||
extern short level1_modelgnd_002_isAnim;
|
||||
|
||||
extern short level1_modelgnd_002_isActor;
|
||||
|
||||
extern short level1_modelgnd_002_isLevel;
|
||||
|
||||
extern short level1_modelgnd_002_isBG;
|
||||
|
||||
extern short level1_modelgnd_002_isSprite;
|
||||
|
||||
extern long level1_modelgnd_002_p;
|
||||
|
||||
extern long level1_modelgnd_002_OTz;
|
||||
|
||||
extern BODY level1_modelgnd_002_body;
|
||||
|
||||
extern TMESH level1_modelgnd_002;
|
||||
|
||||
extern MESH level1_meshgnd_002;
|
||||
|
||||
extern SVECTOR modelobject_mesh[];
|
||||
|
||||
extern SVECTOR level1_modelobject_normal[];
|
||||
|
||||
extern SVECTOR level1_modelobject_uv[];
|
||||
|
||||
extern CVECTOR level1_modelobject_color[];
|
||||
|
||||
extern PRIM level1_modelobject_index[];
|
||||
|
||||
extern MATRIX level1_modelobject_matrix;
|
||||
|
||||
extern VECTOR level1_modelobject_pos;
|
||||
|
||||
extern SVECTOR level1_modelobject_rot;
|
||||
|
||||
extern short level1_modelobject_isRigidBody;
|
||||
|
||||
extern short level1_modelobject_isStaticBody;
|
||||
|
||||
extern short level1_modelobject_isPrism;
|
||||
|
||||
extern short level1_modelobject_isAnim;
|
||||
|
||||
extern short level1_modelobject_isActor;
|
||||
|
||||
extern short level1_modelobject_isLevel;
|
||||
|
||||
extern short level1_modelobject_isBG;
|
||||
|
||||
extern short level1_modelobject_isSprite;
|
||||
|
||||
extern long level1_modelobject_p;
|
||||
|
||||
extern long level1_modelobject_OTz;
|
||||
|
||||
extern BODY level1_modelobject_body;
|
||||
|
||||
extern TMESH level1_modelobject;
|
||||
|
||||
extern MESH level1_meshobject;
|
||||
|
||||
extern SVECTOR modelPlan_mesh[];
|
||||
|
||||
extern SVECTOR level1_modelPlan_normal[];
|
||||
|
||||
extern SVECTOR level1_modelPlan_uv[];
|
||||
|
||||
extern CVECTOR level1_modelPlan_color[];
|
||||
|
||||
extern PRIM level1_modelPlan_index[];
|
||||
|
||||
extern MATRIX level1_modelPlan_matrix;
|
||||
|
||||
extern VECTOR level1_modelPlan_pos;
|
||||
|
||||
extern SVECTOR level1_modelPlan_rot;
|
||||
|
||||
extern short level1_modelPlan_isRigidBody;
|
||||
|
||||
extern short level1_modelPlan_isStaticBody;
|
||||
|
||||
extern short level1_modelPlan_isPrism;
|
||||
|
||||
extern short level1_modelPlan_isAnim;
|
||||
|
||||
extern short level1_modelPlan_isActor;
|
||||
|
||||
extern short level1_modelPlan_isLevel;
|
||||
|
||||
extern short level1_modelPlan_isBG;
|
||||
|
||||
extern short level1_modelPlan_isSprite;
|
||||
|
||||
extern long level1_modelPlan_p;
|
||||
|
||||
extern long level1_modelPlan_OTz;
|
||||
|
||||
extern BODY level1_modelPlan_body;
|
||||
|
||||
extern TMESH level1_modelPlan;
|
||||
|
||||
extern MESH level1_meshPlan;
|
||||
|
||||
extern SVECTOR modelSphere_mesh[];
|
||||
|
||||
extern SVECTOR level1_modelSphere_normal[];
|
||||
|
||||
extern SVECTOR level1_modelSphere_uv[];
|
||||
|
||||
extern CVECTOR level1_modelSphere_color[];
|
||||
|
||||
extern PRIM level1_modelSphere_index[];
|
||||
|
||||
extern MATRIX level1_modelSphere_matrix;
|
||||
|
||||
extern VECTOR level1_modelSphere_pos;
|
||||
|
||||
extern SVECTOR level1_modelSphere_rot;
|
||||
|
||||
extern short level1_modelSphere_isRigidBody;
|
||||
|
||||
extern short level1_modelSphere_isStaticBody;
|
||||
|
||||
extern short level1_modelSphere_isPrism;
|
||||
|
||||
extern short level1_modelSphere_isAnim;
|
||||
|
||||
extern short level1_modelSphere_isActor;
|
||||
|
||||
extern short level1_modelSphere_isLevel;
|
||||
|
||||
extern short level1_modelSphere_isBG;
|
||||
|
||||
extern short level1_modelSphere_isSprite;
|
||||
|
||||
extern long level1_modelSphere_p;
|
||||
|
||||
extern long level1_modelSphere_OTz;
|
||||
|
||||
extern BODY level1_modelSphere_body;
|
||||
|
||||
extern TMESH level1_modelSphere;
|
||||
|
||||
extern MESH level1_meshSphere;
|
||||
|
||||
extern SVECTOR modelSphere_001_mesh[];
|
||||
|
||||
extern SVECTOR level1_modelSphere_001_normal[];
|
||||
|
||||
extern SVECTOR level1_modelSphere_001_uv[];
|
||||
|
||||
extern CVECTOR level1_modelSphere_001_color[];
|
||||
|
||||
extern PRIM level1_modelSphere_001_index[];
|
||||
|
||||
extern MATRIX level1_modelSphere_001_matrix;
|
||||
|
||||
extern VECTOR level1_modelSphere_001_pos;
|
||||
|
||||
extern SVECTOR level1_modelSphere_001_rot;
|
||||
|
||||
extern short level1_modelSphere_001_isRigidBody;
|
||||
|
||||
extern short level1_modelSphere_001_isStaticBody;
|
||||
|
||||
extern short level1_modelSphere_001_isPrism;
|
||||
|
||||
extern short level1_modelSphere_001_isAnim;
|
||||
|
||||
extern short level1_modelSphere_001_isActor;
|
||||
|
||||
extern short level1_modelSphere_001_isLevel;
|
||||
|
||||
extern short level1_modelSphere_001_isBG;
|
||||
|
||||
extern short level1_modelSphere_001_isSprite;
|
||||
|
||||
extern long level1_modelSphere_001_p;
|
||||
|
||||
extern long level1_modelSphere_001_OTz;
|
||||
|
||||
extern BODY level1_modelSphere_001_body;
|
||||
|
||||
extern TMESH level1_modelSphere_001;
|
||||
|
||||
extern MESH level1_meshSphere_001;
|
||||
|
||||
extern SVECTOR modelwall_mesh[];
|
||||
|
||||
extern SVECTOR level1_modelwall_normal[];
|
||||
|
||||
extern SVECTOR level1_modelwall_uv[];
|
||||
|
||||
extern CVECTOR level1_modelwall_color[];
|
||||
|
||||
extern PRIM level1_modelwall_index[];
|
||||
|
||||
extern MATRIX level1_modelwall_matrix;
|
||||
|
||||
extern VECTOR level1_modelwall_pos;
|
||||
|
||||
extern SVECTOR level1_modelwall_rot;
|
||||
|
||||
extern short level1_modelwall_isRigidBody;
|
||||
|
||||
extern short level1_modelwall_isStaticBody;
|
||||
|
||||
extern short level1_modelwall_isPrism;
|
||||
|
||||
extern short level1_modelwall_isAnim;
|
||||
|
||||
extern short level1_modelwall_isActor;
|
||||
|
||||
extern short level1_modelwall_isLevel;
|
||||
|
||||
extern short level1_modelwall_isBG;
|
||||
|
||||
extern short level1_modelwall_isSprite;
|
||||
|
||||
extern long level1_modelwall_p;
|
||||
|
||||
extern long level1_modelwall_OTz;
|
||||
|
||||
extern BODY level1_modelwall_body;
|
||||
|
||||
extern TMESH level1_modelwall;
|
||||
|
||||
extern MESH level1_meshwall;
|
||||
|
||||
extern SVECTOR modelwall_001_mesh[];
|
||||
|
||||
extern SVECTOR level1_modelwall_001_normal[];
|
||||
|
||||
extern SVECTOR level1_modelwall_001_uv[];
|
||||
|
||||
extern CVECTOR level1_modelwall_001_color[];
|
||||
|
||||
extern PRIM level1_modelwall_001_index[];
|
||||
|
||||
extern MATRIX level1_modelwall_001_matrix;
|
||||
|
||||
extern VECTOR level1_modelwall_001_pos;
|
||||
|
||||
extern SVECTOR level1_modelwall_001_rot;
|
||||
|
||||
extern short level1_modelwall_001_isRigidBody;
|
||||
|
||||
extern short level1_modelwall_001_isStaticBody;
|
||||
|
||||
extern short level1_modelwall_001_isPrism;
|
||||
|
||||
extern short level1_modelwall_001_isAnim;
|
||||
|
||||
extern short level1_modelwall_001_isActor;
|
||||
|
||||
extern short level1_modelwall_001_isLevel;
|
||||
|
||||
extern short level1_modelwall_001_isBG;
|
||||
|
||||
extern short level1_modelwall_001_isSprite;
|
||||
|
||||
extern long level1_modelwall_001_p;
|
||||
|
||||
extern long level1_modelwall_001_OTz;
|
||||
|
||||
extern BODY level1_modelwall_001_body;
|
||||
|
||||
extern TMESH level1_modelwall_001;
|
||||
|
||||
extern MESH level1_meshwall_001;
|
||||
|
||||
extern SVECTOR modelwall_002_mesh[];
|
||||
|
||||
extern SVECTOR level1_modelwall_002_normal[];
|
||||
|
||||
extern SVECTOR level1_modelwall_002_uv[];
|
||||
|
||||
extern CVECTOR level1_modelwall_002_color[];
|
||||
|
||||
extern PRIM level1_modelwall_002_index[];
|
||||
|
||||
extern MATRIX level1_modelwall_002_matrix;
|
||||
|
||||
extern VECTOR level1_modelwall_002_pos;
|
||||
|
||||
extern SVECTOR level1_modelwall_002_rot;
|
||||
|
||||
extern short level1_modelwall_002_isRigidBody;
|
||||
|
||||
extern short level1_modelwall_002_isStaticBody;
|
||||
|
||||
extern short level1_modelwall_002_isPrism;
|
||||
|
||||
extern short level1_modelwall_002_isAnim;
|
||||
|
||||
extern short level1_modelwall_002_isActor;
|
||||
|
||||
extern short level1_modelwall_002_isLevel;
|
||||
|
||||
extern short level1_modelwall_002_isBG;
|
||||
|
||||
extern short level1_modelwall_002_isSprite;
|
||||
|
||||
extern long level1_modelwall_002_p;
|
||||
|
||||
extern long level1_modelwall_002_OTz;
|
||||
|
||||
extern BODY level1_modelwall_002_body;
|
||||
|
||||
extern TMESH level1_modelwall_002;
|
||||
|
||||
extern MESH level1_meshwall_002;
|
||||
|
||||
extern SVECTOR modelwall_003_mesh[];
|
||||
|
||||
extern SVECTOR level1_modelwall_003_normal[];
|
||||
|
||||
extern SVECTOR level1_modelwall_003_uv[];
|
||||
|
||||
extern CVECTOR level1_modelwall_003_color[];
|
||||
|
||||
extern PRIM level1_modelwall_003_index[];
|
||||
|
||||
extern MATRIX level1_modelwall_003_matrix;
|
||||
|
||||
extern VECTOR level1_modelwall_003_pos;
|
||||
|
||||
extern SVECTOR level1_modelwall_003_rot;
|
||||
|
||||
extern short level1_modelwall_003_isRigidBody;
|
||||
|
||||
extern short level1_modelwall_003_isStaticBody;
|
||||
|
||||
extern short level1_modelwall_003_isPrism;
|
||||
|
||||
extern short level1_modelwall_003_isAnim;
|
||||
|
||||
extern short level1_modelwall_003_isActor;
|
||||
|
||||
extern short level1_modelwall_003_isLevel;
|
||||
|
||||
extern short level1_modelwall_003_isBG;
|
||||
|
||||
extern short level1_modelwall_003_isSprite;
|
||||
|
||||
extern long level1_modelwall_003_p;
|
||||
|
||||
extern long level1_modelwall_003_OTz;
|
||||
|
||||
extern BODY level1_modelwall_003_body;
|
||||
|
||||
extern TMESH level1_modelwall_003;
|
||||
|
||||
extern MESH level1_meshwall_003;
|
||||
|
||||
extern MESH * level1_meshes[14];
|
||||
|
||||
extern int level1_meshes_length;
|
||||
|
||||
extern CAMANGLE level1_camAngle_camPath_001;
|
||||
|
||||
extern CAMANGLE * level1_camAngles[0];
|
||||
|
||||
extern SIBLINGS level1_nodegnd_003_siblings;
|
||||
|
||||
extern CHILDREN level1_nodegnd_003_objects;
|
||||
|
||||
extern CHILDREN level1_nodegnd_003_rigidbodies;
|
||||
|
||||
extern NODE level1_nodegnd_003;
|
||||
|
||||
extern SIBLINGS level1_nodegnd_001_siblings;
|
||||
|
||||
extern CHILDREN level1_nodegnd_001_objects;
|
||||
|
||||
extern CHILDREN level1_nodegnd_001_rigidbodies;
|
||||
|
||||
extern NODE level1_nodegnd_001;
|
||||
|
||||
extern SIBLINGS level1_nodegnd_002_siblings;
|
||||
|
||||
extern CHILDREN level1_nodegnd_002_objects;
|
||||
|
||||
extern CHILDREN level1_nodegnd_002_rigidbodies;
|
||||
|
||||
extern NODE level1_nodegnd_002;
|
||||
|
||||
extern SIBLINGS level1_nodegnd_siblings;
|
||||
|
||||
extern CHILDREN level1_nodegnd_objects;
|
||||
|
||||
extern CHILDREN level1_nodegnd_rigidbodies;
|
||||
|
||||
extern NODE level1_nodegnd;
|
||||
|
||||
extern MESH * level1_actorPtr;
|
||||
|
||||
extern MESH * level1_levelPtr;
|
||||
|
||||
extern MESH * level1_propPtr;
|
||||
|
||||
extern CAMANGLE * level1_camPtr;
|
||||
|
||||
extern NODE * level1_curNode;
|
||||
|
||||
extern NODE level1_nodegnd_003;
|
||||
|
||||
extern NODE level1_nodegnd_001;
|
||||
|
||||
extern NODE level1_nodegnd_002;
|
||||
|
||||
extern NODE level1_nodegnd;
|
159
main.c
159
main.c
@ -29,41 +29,47 @@
|
||||
#include "graphics.h"
|
||||
#include "space.h"
|
||||
|
||||
#include "defines.h"
|
||||
#include <libcd.h>
|
||||
|
||||
//~ #include "defines.h"
|
||||
|
||||
// START OVERLAY
|
||||
|
||||
//~ extern u_long __load_start_ovly0;
|
||||
extern u_long __load_start_ovly0;
|
||||
|
||||
//~ #define RUN_OVERLAY1
|
||||
//~ #define USE_POINTER
|
||||
//~ #define LEVEL 0
|
||||
//#define USE_POINTER
|
||||
|
||||
//~ #ifdef RUN_OVERLAY1
|
||||
//~ static const char*const overlayFile = "\\LEVEL.bin;1";
|
||||
//~ #if LEVEL == 0
|
||||
//~ static const char*const overlayFile = "\\level.bin;1";
|
||||
//~ #else
|
||||
//~ static const char*const overlayFile = "\\LEVEL1.bin;1";
|
||||
//~ static const char*const overlayFile = "\\level1.bin;1";
|
||||
//~ #endif
|
||||
|
||||
//~ #ifdef USE_POINTER
|
||||
|
||||
//~ #ifdef RUN_OVERLAY1
|
||||
//~ #if LEVEL == 0
|
||||
//~ #include "levels/level.h"
|
||||
//~ #else
|
||||
//~ #include "levels/level1.h"
|
||||
//~ #endif
|
||||
|
||||
//~ #else
|
||||
//~ #define str (char*)(&__load_start_ovly0)
|
||||
//~ #define str (char*)(&__load_start_ovly0)
|
||||
//~ #endif
|
||||
|
||||
// START OVERLAY
|
||||
// END OVERLAY
|
||||
|
||||
//~ #if LEVEL == 0
|
||||
#include "levels/level.h"
|
||||
//~ #elif LEVEL == 1
|
||||
//~ #include "levels/level1.h"
|
||||
#include "levels/level1.h"
|
||||
//~ #endif
|
||||
|
||||
static char* overlayFile;
|
||||
|
||||
char level = 1;
|
||||
|
||||
// Display and draw environments, double buffered
|
||||
|
||||
DISPENV disp[2];
|
||||
@ -129,31 +135,28 @@ VECTOR fVecActor = {0,0,0,0};
|
||||
|
||||
u_long triCount = 0;
|
||||
|
||||
|
||||
// TODO : Add switch case to get the correct pointers
|
||||
|
||||
// Get needed pointers from level file
|
||||
|
||||
MATRIX * cmat = &level_cmat;
|
||||
|
||||
MATRIX * lgtmat = &level_lgtmat;
|
||||
|
||||
MESH * actorPtr, * levelPtr, * propPtr;
|
||||
|
||||
|
||||
MATRIX * cmat, *lgtmat;
|
||||
|
||||
MESH * actorPtr, * levelPtr, * propPtr, ** meshes;
|
||||
|
||||
int * meshes_length;
|
||||
|
||||
NODE * curNode;
|
||||
|
||||
MESH ** meshes = level_meshes;
|
||||
|
||||
int * meshes_length = &level_meshes_length;
|
||||
|
||||
|
||||
CAMPATH * camPath;
|
||||
|
||||
CAMANGLE * camPtr;
|
||||
|
||||
CAMANGLE ** camAngles = level_camAngles;
|
||||
|
||||
|
||||
CAMANGLE * camPtr, ** camAngles;
|
||||
|
||||
// Get rid of those
|
||||
|
||||
MESH * meshPlan = &level_meshPlan;
|
||||
|
||||
VECTOR * modelPlan_pos = &level_modelPlan_pos;
|
||||
|
||||
MESH * meshPlan;
|
||||
|
||||
VECTOR * modelPlan_pos;
|
||||
|
||||
// Pad
|
||||
|
||||
@ -161,28 +164,86 @@ void callback();
|
||||
|
||||
int main() {
|
||||
|
||||
actorPtr = level_actorPtr;
|
||||
CdInit();
|
||||
|
||||
levelPtr = level_levelPtr;
|
||||
int cdread = 0, cdsync = 1;
|
||||
|
||||
if ( level == 0) {
|
||||
|
||||
overlayFile = "\\level.bin;1";
|
||||
|
||||
} else {
|
||||
|
||||
overlayFile = "\\level1.bin;1";
|
||||
}
|
||||
|
||||
cdread = CdReadFile( (char *)(overlayFile), &__load_start_ovly0, 0);
|
||||
|
||||
cdsync = CdReadSync(0, NULL);
|
||||
|
||||
propPtr = level_propPtr;
|
||||
if ( level == 0) {
|
||||
|
||||
camPtr = level_camPtr;
|
||||
cmat = &level_cmat;
|
||||
|
||||
curNode = level_curNode;
|
||||
lgtmat = &level_lgtmat;
|
||||
|
||||
camPath = &level_camPath;
|
||||
meshes = level_meshes;
|
||||
|
||||
meshes_length = &level_meshes_length;
|
||||
|
||||
actorPtr = level_actorPtr;
|
||||
|
||||
levelPtr = level_levelPtr;
|
||||
|
||||
propPtr = level_propPtr;
|
||||
|
||||
camPtr = level_camPtr;
|
||||
|
||||
camPath = &level_camPath;
|
||||
|
||||
camAngles = level_camAngles;
|
||||
|
||||
curNode = level_curNode;
|
||||
|
||||
// Move these to drawPoly()
|
||||
|
||||
meshPlan = &level_meshPlan;
|
||||
|
||||
modelPlan_pos = &level_modelPlan_pos;
|
||||
|
||||
} else if ( level == 1) {
|
||||
|
||||
cmat = &level1_cmat;
|
||||
|
||||
lgtmat = &level1_lgtmat;
|
||||
|
||||
meshes = level1_meshes;
|
||||
|
||||
meshes_length = &level1_meshes_length;
|
||||
|
||||
actorPtr = level1_actorPtr;
|
||||
|
||||
levelPtr = level1_levelPtr;
|
||||
|
||||
propPtr = level1_propPtr;
|
||||
|
||||
camPtr = level1_camPtr;
|
||||
|
||||
camPath = &level1_camPath;
|
||||
|
||||
camAngles = level1_camAngles;
|
||||
|
||||
curNode = level1_curNode;
|
||||
|
||||
// Move these to drawPoly()
|
||||
|
||||
meshPlan = &level1_meshPlan;
|
||||
|
||||
modelPlan_pos = &level1_modelPlan_pos;
|
||||
|
||||
}
|
||||
// Overlay
|
||||
|
||||
//~ CdInit();
|
||||
|
||||
//~ CdReadFile( (char *)(overlayFile), &__load_start_ovly0, 0);
|
||||
|
||||
//~ CdReadSync(0, NULL);
|
||||
|
||||
//~ cmatP = &cmat;
|
||||
|
||||
VECTOR sp = {CENTERX,CENTERY,0};
|
||||
|
||||
VECTOR wp = {0,0,0};
|
||||
@ -202,7 +263,6 @@ int main() {
|
||||
|
||||
init(disp, draw, db, cmat, &BGc, &BKc);
|
||||
|
||||
|
||||
generateTable();
|
||||
|
||||
VSyncCallback(callback);
|
||||
@ -280,6 +340,8 @@ int main() {
|
||||
|
||||
while ( VSync(1) ) {
|
||||
|
||||
FntPrint("%d %d %x\n", cdread, cdsync, __load_start_ovly0);
|
||||
|
||||
// Clear the main OT
|
||||
|
||||
ClearOTagR(otdisc[db], OT2LEN);
|
||||
@ -930,7 +992,7 @@ int main() {
|
||||
|
||||
//~ FntPrint("CurNode : %x\nIndex: %d", curNode, curNode->siblings->index);
|
||||
|
||||
FntPrint("Time : %d dt :%d\n", VSync(-1) / 60, dt);
|
||||
FntPrint("Time : %d dt :%d level: %d\n", VSync(-1) / 60, dt, level);
|
||||
//~ FntPrint("%d\n", curCamAngle );
|
||||
//~ FntPrint("%x\n", primbuff[db]);
|
||||
|
||||
@ -1049,6 +1111,7 @@ void callback() {
|
||||
if ( pad & PADL1 ) {
|
||||
|
||||
lgtang.vz += 32;
|
||||
level = !level;
|
||||
|
||||
}
|
||||
|
||||
|
40
overlay.ld
Normal file
40
overlay.ld
Normal file
@ -0,0 +1,40 @@
|
||||
__heap_base = MAX(__ovly0_end, __ovly1_end);
|
||||
|
||||
SECTIONS {
|
||||
OVERLAY __bss_end : NOCROSSREFS SUBALIGN(4)
|
||||
{
|
||||
.ovly0
|
||||
{
|
||||
KEEP(levels/level.o(.text))
|
||||
__ovly0_ctor = .;
|
||||
KEEP(levels/level.o(.text.startup._GLOBAL__*))
|
||||
KEEP(levels/level.o(.text.*))
|
||||
KEEP(levels/level.o(.rodata*))
|
||||
KEEP(levels/level.o(.sdata*))
|
||||
KEEP(levels/level.o(.data*))
|
||||
KEEP(levels/level.o(.sbss*))
|
||||
KEEP(levels/level.o(.bss*))
|
||||
KEEP(levels/level.o(.ctors))
|
||||
|
||||
. = ALIGN(4);
|
||||
__ovly0_end = .;
|
||||
}
|
||||
|
||||
.ovly1
|
||||
{
|
||||
KEEP(levels/level1.o(.text))
|
||||
__ovly1_ctor = .;
|
||||
KEEP(levels/level1.o(.text.startup._GLOBAL__*))
|
||||
KEEP(levels/level1.o(.text.*))
|
||||
KEEP(levels/level1.o(.rodata*))
|
||||
KEEP(levels/level1.o(.sdata*))
|
||||
KEEP(levels/level1.o(.data*))
|
||||
KEEP(levels/level1.o(.sbss*))
|
||||
KEEP(levels/level1.o(.bss*))
|
||||
KEEP(levels/level1.o(.ctors))
|
||||
|
||||
. = ALIGN(4);
|
||||
__ovly1_end = .;
|
||||
}
|
||||
}
|
||||
}
|
@ -8,10 +8,7 @@
|
||||
|
||||
#include "macros.h"
|
||||
|
||||
//~ #ifndef TYPES
|
||||
#include "custom_types.h"
|
||||
//~ #define TYPES 1
|
||||
//~ #endif
|
||||
#include "custom_types.h"
|
||||
|
||||
short checkLineW( VECTOR * pointA, VECTOR * pointB, MESH * mesh );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user