diff --git a/3dcam.bin b/3dcam.bin deleted file mode 100644 index 33875f0..0000000 Binary files a/3dcam.bin and /dev/null differ diff --git a/3dcam.cue b/3dcam.cue deleted file mode 100644 index a96ca52..0000000 --- a/3dcam.cue +++ /dev/null @@ -1,3 +0,0 @@ -FILE "3dcam.bin" BINARY - TRACK 01 MODE2/2352 - INDEX 01 00:00:00 diff --git a/Makefile b/Makefile index ee5623f..48aa8f8 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,15 @@ -TARGET = main -TYPE = ps-exe +TARGET = 3dcam +.PHONY: all cleansub + +all: + mkpsxiso -y ./config/3dcam.xml + +cleansub: + $(MAKE) clean + rm -f $(TARGET).cue $(TARGET).bin + rm -f *.mcd *.frag *.lua *.vert + SRCS = src/main.c \ src/pad.c \ src/math.c \ diff --git a/XA/inter8.xa b/XA/inter8.xa new file mode 100644 index 0000000..1c00570 Binary files /dev/null and b/XA/inter8.xa differ diff --git a/common.mk b/common.mk index d8e0eb5..6a0b110 100644 --- a/common.mk +++ b/common.mk @@ -4,6 +4,9 @@ TYPE = ps-exe THISDIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) SRCS += $(THISDIR)thirdparty/nugget/common/crt0/crt0.s +SRCS += $(THISDIR)thirdparty/nugget/common/syscalls/printf.s + +CPPFLAGS += -I$(THISDIR)include CPPFLAGS += -I$(THISDIR)thirdparty/nugget/psyq/include -I$(THISDIR)psyq-4_7-converted/include -I$(THISDIR)psyq-4.7-converted-full/include -I$(THISDIR)psyq/include -I$(THISDIR)../psyq/include LDFLAGS += -L$(THISDIR)thirdparty/nugget/psyq/lib -L$(THISDIR)psyq-4_7-converted/lib -L$(THISDIR)psyq-4.7-converted-full/lib -L$(THISDIR)psyq/lib -L$(THISDIR)../psyq/lib diff --git a/config/3dcam.xml b/config/3dcam.xml index f060d24..3cda56c 100644 --- a/config/3dcam.xml +++ b/config/3dcam.xml @@ -13,7 +13,7 @@ - + diff --git a/src/atan.c b/include/atan.h similarity index 100% rename from src/atan.c rename to include/atan.h diff --git a/custom_types.h b/include/custom_types.h similarity index 94% rename from custom_types.h rename to include/custom_types.h index 074331c..9750b13 100644 --- a/custom_types.h +++ b/include/custom_types.h @@ -1,9 +1,11 @@ #pragma once #include #include +#include #include struct BODY; +struct BVECTOR; struct VANIM; struct MESH_ANIMS_TRACKS; struct PRIM; @@ -33,8 +35,15 @@ typedef struct BODY { VECTOR min; VECTOR max; int restitution; + SVECTOR normal; } BODY; +typedef struct BVECTOR { + int8_t vx, vy; + int8_t vz; + // int8_t factor; // could be useful for anims where delta is > 256 +} BVECTOR; + typedef struct VANIM { int nframes; // number of frames e.g 20 int nvert; // number of vertices e.g 21 @@ -44,7 +53,7 @@ typedef struct VANIM { int dir; // playback direction (1 or -1) int pingpong; // ping pong animation (A>B>A) int interpolate; // use lerp to interpolate keyframes - SVECTOR data[]; // vertex pos as SVECTORs e.g 20 * 21 SVECTORS + BVECTOR data[]; // vertex pos as SVECTORs e.g 20 * 21 SVECTORS } VANIM; typedef struct MESH_ANIMS_TRACKS { diff --git a/include/defines.h b/include/defines.h index 50a941a..a02914b 100644 --- a/include/defines.h +++ b/include/defines.h @@ -61,7 +61,7 @@ #define FNT_VRAM_X 960 #define FNT_VRAM_Y 256 #define FNT_SCR_X 16 -#define FNT_SCR_Y 128 +#define FNT_SCR_Y 150 #define FNT_SCR_W 240 #define FNT_SCR_H 88 #define FNT_SCR_BG 0 diff --git a/include/graphics.h b/include/graphics.h index 67d482d..ea905fe 100644 --- a/include/graphics.h +++ b/include/graphics.h @@ -1,7 +1,7 @@ #pragma once -#include "../include/camera.h" -#include "../include/physics.h" -#include "../include/defines.h" +#include +#include +#include // Drawing void updateLight(void); diff --git a/include/math.h b/include/math.h index d7ec8e5..6f05f3a 100644 --- a/include/math.h +++ b/include/math.h @@ -3,10 +3,9 @@ #include #include #include -#include "../include/macros.h" - +#include // Precalculated arctan values -#include "../src/atan.c" +#include // fixed point math int32_t dMul(int32_t a, int32_t b); diff --git a/include/physics.h b/include/physics.h index feef068..b424a52 100644 --- a/include/physics.h +++ b/include/physics.h @@ -3,16 +3,18 @@ #include #include #include -#include "../include/defines.h" -#include "../include/math.h" -#include "../include/macros.h" -#include "../custom_types.h" +#include +#include +#include +#include +#include "../thirdparty/nugget/common/syscalls/syscalls.h" +#define printf ramsyscall_printf short checkLineW( VECTOR * pointA, VECTOR * pointB, MESH * mesh ); short checkLineS( VECTOR * pointA, VECTOR * pointB, MESH * mesh ); VECTOR getIntCollision(BODY one, BODY two); VECTOR getExtCollision(BODY one, BODY two); -void checkBodyCol(BODY * one, BODY * two); +VECTOR checkBodyCol(BODY * one, BODY * two); void applyAngMom(LEVEL curLvl ); void ResolveCollision( BODY * one, BODY * two ); VECTOR angularMom(BODY body); diff --git a/include/psx.h b/include/psx.h index ae89465..5fdcc3e 100644 --- a/include/psx.h +++ b/include/psx.h @@ -10,9 +10,11 @@ #include #include #include -#include "../include/defines.h" +#include #include -#include "../custom_types.h" +#include +#include "../thirdparty/nugget/common/syscalls/syscalls.h" +#define printf ramsyscall_printf // PSX setup void setDCLightEnv(MATRIX * curLevelCMat, MATRIX * curLevelLgtMat, SVECTOR * curLevelLgtAng); diff --git a/include/sound.h b/include/sound.h index e323550..2386837 100644 --- a/include/sound.h +++ b/include/sound.h @@ -1,8 +1,8 @@ #pragma once -#include "../include/psx.h" -#include "../include/camera.h" -#include "../include/math.h" -#include "../include/macros.h" +#include +#include +#include +#include // XA // Sector offset for XA data 4: simple speed, 8: double speed #define XA_CHANNELS 8 diff --git a/include/space.h b/include/space.h index f209d72..35b81b9 100644 --- a/include/space.h +++ b/include/space.h @@ -2,7 +2,7 @@ #include #include #include -#include "../include/defines.h" +#include int cliptest3(short * v1); void worldToScreen( VECTOR * worldPos, VECTOR * screenPos ); diff --git a/isotest.sh b/isotest.sh index 4a33b4e..f06ec42 100755 --- a/isotest.sh +++ b/isotest.sh @@ -1,2 +1,2 @@ #!/bin/bash -make && ~/bin/mkpsxiso -y config/3dcam.xml && pcsx-redux -run -iso 3dcam.cue +make && ~/bin/mkpsxiso -y config/3dcam.xml && prime-run pcsx-redux -run -iso 3dcam.cue diff --git a/levels/level0.c b/levels/level0.c index 1467d52..17af46d 100644 --- a/levels/level0.c +++ b/levels/level0.c @@ -7,285 +7,11 @@ VECTOR level0_BKc = { 173, 173, 173, 0 }; MESH_ANIMS_TRACKS level0_modelCube_001_anims = { 5, { - &level0_modelCube_001_anim_KeyAction, - &level0_modelCube_001_anim_KeyAction_004, &level0_modelCube_001_anim_KeyAction_003, &level0_modelCube_001_anim_KeyAction_001, - &level0_modelCube_001_anim_KeyAction_002 - } -}; - -VANIM level0_modelCube_001_anim_KeyAction = { - 14, // number of frames e.g 20 - 8, // number of vertices e.g 21 - -1, // anim cursor : -1 means not playing back - 0, // lerp cursor - 0, // loop : if -1 , infinite loop, if n > 0, loop n times - 1, // playback direction (1 or -1) - 0, // ping pong animation (A>B>A) - 0, // use lerp to interpolate keyframes - { // vertex pos as BVECTORs e.g 20 * 21 BVECTORS - //Frame 0 - { -6,33,-6 }, - { -27,-19,-27 }, - { -6,33,6 }, - { -27,-19,27 }, - { 6,33,-6 }, - { 27,-19,-27 }, - { 6,33,6 }, - { 27,-19,27 }, - - //Frame 1 - { -7,33,-7 }, - { -26,-19,-26 }, - { -7,33,7 }, - { -26,-19,26 }, - { 7,33,-7 }, - { 26,-19,-26 }, - { 7,33,7 }, - { 26,-19,26 }, - - //Frame 2 - { -10,33,-10 }, - { -24,-19,-24 }, - { -10,33,10 }, - { -24,-19,24 }, - { 10,33,-10 }, - { 24,-19,-24 }, - { 10,33,10 }, - { 24,-19,24 }, - - //Frame 3 - { -14,33,-14 }, - { -20,-19,-20 }, - { -14,33,14 }, - { -20,-19,20 }, - { 14,33,-14 }, - { 20,-19,-20 }, - { 14,33,14 }, - { 20,-19,20 }, - - //Frame 4 - { -20,33,-20 }, - { -15,-19,-15 }, - { -20,33,20 }, - { -15,-19,15 }, - { 20,33,-20 }, - { 15,-19,-15 }, - { 20,33,20 }, - { 15,-19,15 }, - - //Frame 5 - { -25,33,-25 }, - { -11,-19,-11 }, - { -25,33,25 }, - { -11,-19,11 }, - { 25,33,-25 }, - { 11,-19,-11 }, - { 25,33,25 }, - { 11,-19,11 }, - - //Frame 6 - { -29,33,-29 }, - { -7,-19,-7 }, - { -29,33,29 }, - { -7,-19,7 }, - { 29,33,-29 }, - { 7,-19,-7 }, - { 29,33,29 }, - { 7,-19,7 }, - - //Frame 7 - { -31,33,-31 }, - { -6,-19,-6 }, - { -31,33,31 }, - { -6,-19,6 }, - { 31,33,-31 }, - { 6,-19,-6 }, - { 31,33,31 }, - { 6,-19,6 }, - - //Frame 8 - { -30,33,-30 }, - { -6,-19,-6 }, - { -30,33,30 }, - { -6,-19,6 }, - { 30,33,-30 }, - { 6,-19,-6 }, - { 30,33,30 }, - { 6,-19,6 }, - - //Frame 9 - { -28,33,-28 }, - { -8,-19,-8 }, - { -28,33,28 }, - { -8,-19,8 }, - { 28,33,-28 }, - { 8,-19,-8 }, - { 28,33,28 }, - { 8,-19,8 }, - - //Frame 10 - { -23,33,-23 }, - { -13,-19,-13 }, - { -23,33,23 }, - { -13,-19,13 }, - { 23,33,-23 }, - { 13,-19,-13 }, - { 23,33,23 }, - { 13,-19,13 }, - - //Frame 11 - { -16,33,-16 }, - { -18,-19,-18 }, - { -16,33,16 }, - { -18,-19,18 }, - { 16,33,-16 }, - { 18,-19,-18 }, - { 16,33,16 }, - { 18,-19,18 }, - - //Frame 12 - { -11,33,-11 }, - { -23,-19,-23 }, - { -11,33,11 }, - { -23,-19,23 }, - { 11,33,-11 }, - { 23,-19,-23 }, - { 11,33,11 }, - { 23,-19,23 }, - - //Frame 13 - { -7,33,-7 }, - { -26,-19,-26 }, - { -7,33,7 }, - { -26,-19,26 }, - { 7,33,-7 }, - { 26,-19,-26 }, - { 7,33,7 }, - { 26,-19,26 } - } -}; - -VANIM level0_modelCube_001_anim_KeyAction_004 = { - 11, // number of frames e.g 20 - 8, // number of vertices e.g 21 - -1, // anim cursor : -1 means not playing back - 0, // lerp cursor - 0, // loop : if -1 , infinite loop, if n > 0, loop n times - 1, // playback direction (1 or -1) - 0, // ping pong animation (A>B>A) - 0, // use lerp to interpolate keyframes - { // vertex pos as BVECTORs e.g 20 * 21 BVECTORS - //Frame 0 - { -6,33,-6 }, - { -27,-19,-27 }, - { -6,33,6 }, - { -27,-19,27 }, - { 6,33,-6 }, - { 27,-19,-27 }, - { 6,33,6 }, - { 27,-19,27 }, - - //Frame 1 - { -7,33,-7 }, - { -26,-19,-26 }, - { -7,33,7 }, - { -26,-19,26 }, - { 7,33,-7 }, - { 26,-19,-26 }, - { 7,33,7 }, - { 26,-19,26 }, - - //Frame 2 - { -12,33,-12 }, - { -22,-19,-22 }, - { -12,33,12 }, - { -22,-19,22 }, - { 12,33,-12 }, - { 22,-19,-22 }, - { 12,33,12 }, - { 22,-19,22 }, - - //Frame 3 - { -19,33,-19 }, - { -16,-19,-16 }, - { -19,33,19 }, - { -16,-19,16 }, - { 19,33,-19 }, - { 16,-19,-16 }, - { 19,33,19 }, - { 16,-19,16 }, - - //Frame 4 - { -26,33,-26 }, - { -10,-19,-10 }, - { -26,33,26 }, - { -10,-19,10 }, - { 26,33,-26 }, - { 10,-19,-10 }, - { 26,33,26 }, - { 10,-19,10 }, - - //Frame 5 - { -30,33,-30 }, - { -7,-19,-7 }, - { -30,33,30 }, - { -7,-19,7 }, - { 30,33,-30 }, - { 7,-19,-7 }, - { 30,33,30 }, - { 7,-19,7 }, - - //Frame 6 - { -31,33,-31 }, - { -6,-19,-6 }, - { -31,33,31 }, - { -6,-19,6 }, - { 31,33,-31 }, - { 6,-19,-6 }, - { 31,33,31 }, - { 6,-19,6 }, - - //Frame 7 - { -28,33,-28 }, - { -8,-19,-8 }, - { -28,33,28 }, - { -8,-19,8 }, - { 28,33,-28 }, - { 8,-19,-8 }, - { 28,33,28 }, - { 8,-19,8 }, - - //Frame 8 - { -22,33,-22 }, - { -14,-19,-14 }, - { -22,33,22 }, - { -14,-19,14 }, - { 22,33,-22 }, - { 14,-19,-14 }, - { 22,33,22 }, - { 14,-19,14 }, - - //Frame 9 - { -14,33,-14 }, - { -20,-19,-20 }, - { -14,33,14 }, - { -20,-19,20 }, - { 14,33,-14 }, - { 20,-19,-20 }, - { 14,33,14 }, - { 20,-19,20 }, - - //Frame 10 - { -8,33,-8 }, - { -26,-19,-26 }, - { -8,33,8 }, - { -26,-19,26 }, - { 8,33,-8 }, - { 26,-19,-26 }, - { 8,33,8 }, - { 26,-19,26 } + &level0_modelCube_001_anim_KeyAction_002, + &level0_modelCube_001_anim_KeyAction, + &level0_modelCube_001_anim_KeyAction_004 } }; @@ -300,94 +26,94 @@ VANIM level0_modelCube_001_anim_KeyAction_003 = { 0, // use lerp to interpolate keyframes { // vertex pos as BVECTORs e.g 20 * 21 BVECTORS //Frame 0 - { -6,33,-6 }, - { -27,-19,-27 }, - { -6,33,6 }, - { -27,-19,27 }, - { 6,33,-6 }, - { 27,-19,-27 }, - { 6,33,6 }, - { 27,-19,27 }, + { -6,38,-6 }, + { -27,-24,-27 }, + { -6,38,6 }, + { -27,-24,27 }, + { 6,38,-6 }, + { 27,-24,-27 }, + { 6,38,6 }, + { 27,-24,27 }, //Frame 1 - { -8,33,-8 }, - { -25,-19,-25 }, - { -8,33,8 }, - { -25,-19,25 }, - { 8,33,-8 }, - { 25,-19,-25 }, - { 8,33,8 }, - { 25,-19,25 }, + { -8,38,-8 }, + { -25,-24,-25 }, + { -8,38,8 }, + { -25,-24,25 }, + { 8,38,-8 }, + { 25,-24,-25 }, + { 8,38,8 }, + { 25,-24,25 }, //Frame 2 - { -15,33,-15 }, - { -19,-19,-19 }, - { -15,33,15 }, - { -19,-19,19 }, - { 15,33,-15 }, - { 19,-19,-19 }, - { 15,33,15 }, - { 19,-19,19 }, + { -15,38,-15 }, + { -19,-24,-19 }, + { -15,38,15 }, + { -19,-24,19 }, + { 15,38,-15 }, + { 19,-24,-19 }, + { 15,38,15 }, + { 19,-24,19 }, //Frame 3 - { -23,33,-23 }, - { -12,-19,-12 }, - { -23,33,23 }, - { -12,-19,12 }, - { 23,33,-23 }, - { 12,-19,-12 }, - { 23,33,23 }, - { 12,-19,12 }, + { -23,38,-23 }, + { -12,-24,-12 }, + { -23,38,23 }, + { -12,-24,12 }, + { 23,38,-23 }, + { 12,-24,-12 }, + { 23,38,23 }, + { 12,-24,12 }, //Frame 4 - { -29,33,-29 }, - { -7,-19,-7 }, - { -29,33,29 }, - { -7,-19,7 }, - { 29,33,-29 }, - { 7,-19,-7 }, - { 29,33,29 }, - { 7,-19,7 }, + { -29,38,-29 }, + { -7,-24,-7 }, + { -29,38,29 }, + { -7,-24,7 }, + { 29,38,-29 }, + { 7,-24,-7 }, + { 29,38,29 }, + { 7,-24,7 }, //Frame 5 - { -31,33,-31 }, - { -6,-19,-6 }, - { -31,33,31 }, - { -6,-19,6 }, - { 31,33,-31 }, - { 6,-19,-6 }, - { 31,33,31 }, - { 6,-19,6 }, + { -31,38,-31 }, + { -6,-24,-6 }, + { -31,38,31 }, + { -6,-24,6 }, + { 31,38,-31 }, + { 6,-24,-6 }, + { 31,38,31 }, + { 6,-24,6 }, //Frame 6 - { -26,33,-26 }, - { -10,-19,-10 }, - { -26,33,26 }, - { -10,-19,10 }, - { 26,33,-26 }, - { 10,-19,-10 }, - { 26,33,26 }, - { 10,-19,10 }, + { -26,38,-26 }, + { -10,-24,-10 }, + { -26,38,26 }, + { -10,-24,10 }, + { 26,38,-26 }, + { 10,-24,-10 }, + { 26,38,26 }, + { 10,-24,10 }, //Frame 7 - { -17,33,-17 }, - { -17,-19,-17 }, - { -17,33,17 }, - { -17,-19,17 }, - { 17,33,-17 }, - { 17,-19,-17 }, - { 17,33,17 }, - { 17,-19,17 }, + { -17,38,-17 }, + { -17,-24,-17 }, + { -17,38,17 }, + { -17,-24,17 }, + { 17,38,-17 }, + { 17,-24,-17 }, + { 17,38,17 }, + { 17,-24,17 }, //Frame 8 - { -9,33,-9 }, - { -25,-19,-25 }, - { -9,33,9 }, - { -25,-19,25 }, - { 9,33,-9 }, - { 25,-19,-25 }, - { 9,33,9 }, - { 25,-19,25 } + { -9,38,-9 }, + { -25,-24,-25 }, + { -9,38,9 }, + { -25,-24,25 }, + { 9,38,-9 }, + { 25,-24,-25 }, + { 9,38,9 }, + { 25,-24,25 } } }; @@ -715,6 +441,280 @@ VANIM level0_modelCube_001_anim_KeyAction_002 = { } }; +VANIM level0_modelCube_001_anim_KeyAction = { + 14, // number of frames e.g 20 + 8, // number of vertices e.g 21 + -1, // anim cursor : -1 means not playing back + 0, // lerp cursor + 0, // loop : if -1 , infinite loop, if n > 0, loop n times + 1, // playback direction (1 or -1) + 0, // ping pong animation (A>B>A) + 0, // use lerp to interpolate keyframes + { // vertex pos as BVECTORs e.g 20 * 21 BVECTORS + //Frame 0 + { -6,38,-6 }, + { -27,-24,-27 }, + { -6,38,6 }, + { -27,-24,27 }, + { 6,38,-6 }, + { 27,-24,-27 }, + { 6,38,6 }, + { 27,-24,27 }, + + //Frame 1 + { -7,38,-7 }, + { -26,-24,-26 }, + { -7,38,7 }, + { -26,-24,26 }, + { 7,38,-7 }, + { 26,-24,-26 }, + { 7,38,7 }, + { 26,-24,26 }, + + //Frame 2 + { -10,38,-10 }, + { -24,-24,-24 }, + { -10,38,10 }, + { -24,-24,24 }, + { 10,38,-10 }, + { 24,-24,-24 }, + { 10,38,10 }, + { 24,-24,24 }, + + //Frame 3 + { -14,38,-14 }, + { -20,-24,-20 }, + { -14,38,14 }, + { -20,-24,20 }, + { 14,38,-14 }, + { 20,-24,-20 }, + { 14,38,14 }, + { 20,-24,20 }, + + //Frame 4 + { -20,38,-20 }, + { -15,-24,-15 }, + { -20,38,20 }, + { -15,-24,15 }, + { 20,38,-20 }, + { 15,-24,-15 }, + { 20,38,20 }, + { 15,-24,15 }, + + //Frame 5 + { -25,38,-25 }, + { -11,-24,-11 }, + { -25,38,25 }, + { -11,-24,11 }, + { 25,38,-25 }, + { 11,-24,-11 }, + { 25,38,25 }, + { 11,-24,11 }, + + //Frame 6 + { -29,38,-29 }, + { -7,-24,-7 }, + { -29,38,29 }, + { -7,-24,7 }, + { 29,38,-29 }, + { 7,-24,-7 }, + { 29,38,29 }, + { 7,-24,7 }, + + //Frame 7 + { -31,38,-31 }, + { -6,-24,-6 }, + { -31,38,31 }, + { -6,-24,6 }, + { 31,38,-31 }, + { 6,-24,-6 }, + { 31,38,31 }, + { 6,-24,6 }, + + //Frame 8 + { -30,38,-30 }, + { -6,-24,-6 }, + { -30,38,30 }, + { -6,-24,6 }, + { 30,38,-30 }, + { 6,-24,-6 }, + { 30,38,30 }, + { 6,-24,6 }, + + //Frame 9 + { -28,38,-28 }, + { -8,-24,-8 }, + { -28,38,28 }, + { -8,-24,8 }, + { 28,38,-28 }, + { 8,-24,-8 }, + { 28,38,28 }, + { 8,-24,8 }, + + //Frame 10 + { -23,38,-23 }, + { -13,-24,-13 }, + { -23,38,23 }, + { -13,-24,13 }, + { 23,38,-23 }, + { 13,-24,-13 }, + { 23,38,23 }, + { 13,-24,13 }, + + //Frame 11 + { -16,38,-16 }, + { -18,-24,-18 }, + { -16,38,16 }, + { -18,-24,18 }, + { 16,38,-16 }, + { 18,-24,-18 }, + { 16,38,16 }, + { 18,-24,18 }, + + //Frame 12 + { -11,38,-11 }, + { -23,-24,-23 }, + { -11,38,11 }, + { -23,-24,23 }, + { 11,38,-11 }, + { 23,-24,-23 }, + { 11,38,11 }, + { 23,-24,23 }, + + //Frame 13 + { -7,38,-7 }, + { -26,-24,-26 }, + { -7,38,7 }, + { -26,-24,26 }, + { 7,38,-7 }, + { 26,-24,-26 }, + { 7,38,7 }, + { 26,-24,26 } + } +}; + +VANIM level0_modelCube_001_anim_KeyAction_004 = { + 11, // number of frames e.g 20 + 8, // number of vertices e.g 21 + -1, // anim cursor : -1 means not playing back + 0, // lerp cursor + 0, // loop : if -1 , infinite loop, if n > 0, loop n times + 1, // playback direction (1 or -1) + 0, // ping pong animation (A>B>A) + 0, // use lerp to interpolate keyframes + { // vertex pos as BVECTORs e.g 20 * 21 BVECTORS + //Frame 0 + { -6,38,-6 }, + { -27,-24,-27 }, + { -6,38,6 }, + { -27,-24,27 }, + { 6,38,-6 }, + { 27,-24,-27 }, + { 6,38,6 }, + { 27,-24,27 }, + + //Frame 1 + { -7,38,-7 }, + { -26,-24,-26 }, + { -7,38,7 }, + { -26,-24,26 }, + { 7,38,-7 }, + { 26,-24,-26 }, + { 7,38,7 }, + { 26,-24,26 }, + + //Frame 2 + { -12,38,-12 }, + { -22,-24,-22 }, + { -12,38,12 }, + { -22,-24,22 }, + { 12,38,-12 }, + { 22,-24,-22 }, + { 12,38,12 }, + { 22,-24,22 }, + + //Frame 3 + { -19,38,-19 }, + { -16,-24,-16 }, + { -19,38,19 }, + { -16,-24,16 }, + { 19,38,-19 }, + { 16,-24,-16 }, + { 19,38,19 }, + { 16,-24,16 }, + + //Frame 4 + { -26,38,-26 }, + { -10,-24,-10 }, + { -26,38,26 }, + { -10,-24,10 }, + { 26,38,-26 }, + { 10,-24,-10 }, + { 26,38,26 }, + { 10,-24,10 }, + + //Frame 5 + { -30,38,-30 }, + { -7,-24,-7 }, + { -30,38,30 }, + { -7,-24,7 }, + { 30,38,-30 }, + { 7,-24,-7 }, + { 30,38,30 }, + { 7,-24,7 }, + + //Frame 6 + { -31,38,-31 }, + { -6,-24,-6 }, + { -31,38,31 }, + { -6,-24,6 }, + { 31,38,-31 }, + { 6,-24,-6 }, + { 31,38,31 }, + { 6,-24,6 }, + + //Frame 7 + { -28,38,-28 }, + { -8,-24,-8 }, + { -28,38,28 }, + { -8,-24,8 }, + { 28,38,-28 }, + { 8,-24,-8 }, + { 28,38,28 }, + { 8,-24,8 }, + + //Frame 8 + { -22,38,-22 }, + { -14,-24,-14 }, + { -22,38,22 }, + { -14,-24,14 }, + { 22,38,-22 }, + { 14,-24,-14 }, + { 22,38,22 }, + { 14,-24,14 }, + + //Frame 9 + { -14,38,-14 }, + { -20,-24,-20 }, + { -14,38,14 }, + { -20,-24,20 }, + { 14,38,-14 }, + { 20,-24,-20 }, + { 14,38,14 }, + { 20,-24,20 }, + + //Frame 10 + { -8,38,-8 }, + { -26,-24,-26 }, + { -8,38,8 }, + { -26,-24,26 }, + { 8,38,-8 }, + { 26,-24,-26 }, + { 8,38,8 }, + { 26,-24,26 } + } +}; + CAMPOS level0_camPos_Camera = { { -770,459,623 }, { 301,531,0 } @@ -800,13 +800,14 @@ PRIM level0_modelCube_index[] = { BODY level0_modelCube_body = { {0, 0, 0, 0}, - 0,-236,23, 0, + 0,-181,23, 0, 0,-1024,0, 0, 8, ONE/8, -33,-32,-33, 0, 33,32,33, 0, 1024, + 0 }; TMESH level0_modelCube = { @@ -824,7 +825,7 @@ MESH level0_meshCube = { 0, 0, {0}, // Matrix - {0,-236,23, 0}, // position + {0,-181,23, 0}, // position {0,-1024,0, 0}, // rotation 0, // isProp 1, // isRigidBody @@ -907,6 +908,7 @@ BODY level0_modelCube_001_body = { -27,-19,-27, 0, 27,33,27, 0, 0, + 0 }; TMESH level0_modelCube_001 = { @@ -947,40 +949,40 @@ MESH level0_meshCube_001 = { }; SVECTOR level0_modelPlane_000_mesh[] = { - { 325,-218,0,0 }, - { -520,5,0,0 }, - { -195,5,0,0 }, - { 455,5,0,0 }, - { 325,5,0,0 }, - { -585,-218,0,0 }, - { -325,-218,0,0 }, - { -325,5,0,0 }, - { -585,5,0,0 }, - { -520,-218,0,0 }, - { -390,5,0,0 }, - { -130,-218,0,0 }, - { -65,-218,0,0 }, - { 130,-218,0,0 }, - { 65,5,0,0 }, - { 130,5,0,0 }, - { 260,-218,0,0 }, - { -260,-218,0,0 }, - { -455,5,0,0 }, - { -260,5,0,0 }, - { -455,-218,0,0 }, - { -390,-218,0,0 }, - { -130,5,0,0 }, - { -65,5,0,0 }, - { -195,-218,0,0 }, - { 260,5,0,0 }, - { 0,5,0,0 }, - { 195,5,0,0 }, - { 0,-218,0,0 }, - { 65,-218,0,0 }, - { 390,-218,0,0 }, - { 195,-218,0,0 }, - { 390,5,0,0 }, - { 455,-218,0,0 } + { 307,-244,481,0 }, + { -370,39,481,0 }, + { -105,16,481,0 }, + { 425,-31,481,0 }, + { 319,-21,481,0 }, + { -435,-179,481,0 }, + { -223,-197,481,0 }, + { -211,25,481,0 }, + { -423,43,481,0 }, + { -382,-184,481,0 }, + { -264,29,481,0 }, + { -64,-211,481,0 }, + { -11,-216,481,0 }, + { 148,-230,481,0 }, + { 107,-3,481,0 }, + { 160,-8,481,0 }, + { 254,-239,481,0 }, + { -170,-202,481,0 }, + { -317,34,481,0 }, + { -158,20,481,0 }, + { -329,-188,481,0 }, + { -276,-193,481,0 }, + { -52,11,481,0 }, + { 1,6,481,0 }, + { -117,-207,481,0 }, + { 266,-17,481,0 }, + { 54,2,481,0 }, + { 213,-12,481,0 }, + { 42,-221,481,0 }, + { 95,-225,481,0 }, + { 360,-248,481,0 }, + { 201,-234,481,0 }, + { 372,-26,481,0 }, + { 413,-253,481,0 } }; SVECTOR level0_modelPlane_000_normal[] = { @@ -1175,13 +1177,14 @@ PRIM level0_modelPlane_000_index[] = { BODY level0_modelPlane_000_body = { {0, 0, 0, 0}, - 65,0,520, 0, + 0,-7,0, 0, 0,0,0, 0, 8, ONE/8, - -585,-218,0, 0, - 455,4,0, 0, + -435,-254,481, 0, + 424,43,481, 0, 0, + 0 }; TMESH level0_modelPlane_000 = { @@ -1205,7 +1208,7 @@ MESH level0_meshPlane_000 = { &level0_tim_woods, _binary_TIM_woods_tim_start, {0}, // Matrix - {65,0,520, 0}, // position + {0,-7,0, 0}, // position {0,0,0, 0}, // rotation 0, // isProp 0, // isRigidBody @@ -1228,587 +1231,587 @@ MESH level0_meshPlane_000 = { }; SVECTOR level0_modelPlane_001_mesh[] = { - { -195,0,195,0 }, - { 455,0,260,0 }, - { 520,0,195,0 }, - { -325,0,260,0 }, - { 455,0,195,0 }, - { 65,0,455,0 }, - { -390,0,325,0 }, - { -325,0,325,0 }, - { 65,0,195,0 }, - { 65,0,390,0 }, - { 130,0,130,0 }, - { -195,0,390,0 }, - { -130,0,260,0 }, - { -65,0,260,0 }, - { -195,0,325,0 }, - { 520,0,260,0 }, - { 130,0,455,0 }, - { 65,0,260,0 }, - { 0,0,325,0 }, - { 130,0,260,0 }, - { 520,0,65,0 }, - { 65,0,325,0 }, - { 390,0,195,0 }, - { 130,0,325,0 }, - { 325,0,195,0 }, - { 195,0,325,0 }, - { -455,0,520,0 }, - { 260,0,325,0 }, - { -130,0,130,0 }, - { -455,0,130,0 }, - { -455,0,455,0 }, - { 520,0,325,0 }, - { -455,0,325,0 }, - { -260,0,325,0 }, - { -130,0,520,0 }, - { -65,0,325,0 }, - { -455,0,390,0 }, - { -390,0,390,0 }, - { 520,0,520,0 }, - { -130,0,325,0 }, - { 390,0,520,0 }, - { 260,0,390,0 }, - { -65,0,390,0 }, - { 325,0,390,0 }, - { 520,0,455,0 }, - { 325,0,455,0 }, - { 455,0,325,0 }, - { 325,0,325,0 }, - { 390,0,325,0 }, - { -390,0,455,0 }, - { -260,0,520,0 }, - { 520,0,390,0 }, - { -325,0,390,0 }, - { -260,0,390,0 }, - { -130,0,390,0 }, - { -195,0,455,0 }, - { 0,0,390,0 }, - { -195,0,130,0 }, - { 130,0,390,0 }, - { 195,0,390,0 }, - { 455,0,390,0 }, - { 260,0,455,0 }, - { 390,0,390,0 }, - { -520,0,520,0 }, - { 455,0,455,0 }, - { -325,0,520,0 }, - { -260,0,455,0 }, - { -325,0,455,0 }, - { 195,0,455,0 }, - { 0,0,455,0 }, - { -130,0,455,0 }, - { -65,0,455,0 }, - { 130,0,520,0 }, - { 195,0,520,0 }, - { 390,0,455,0 }, - { 0,0,130,0 }, - { -65,0,65,0 }, - { -65,0,0,0 }, - { -455,0,260,0 }, - { -390,0,260,0 }, - { -260,0,195,0 }, - { -260,0,260,0 }, - { -195,0,260,0 }, - { 195,0,130,0 }, - { 0,0,195,0 }, - { 0,0,260,0 }, - { -130,0,-65,0 }, - { 520,0,130,0 }, - { 195,0,260,0 }, - { 260,0,260,0 }, - { 325,0,260,0 }, - { 390,0,260,0 }, - { 520,0,0,0 }, - { -195,0,65,0 }, - { -455,0,195,0 }, - { -390,0,195,0 }, - { -325,0,195,0 }, - { -65,0,130,0 }, - { -195,0,-195,0 }, - { -130,0,195,0 }, - { -65,0,195,0 }, - { 390,0,0,0 }, - { 325,0,130,0 }, - { 130,0,195,0 }, - { 195,0,195,0 }, - { 260,0,195,0 }, - { -65,0,-130,0 }, - { 455,0,130,0 }, - { 390,0,-130,0 }, - { -520,0,130,0 }, - { -260,0,65,0 }, - { 0,0,-195,0 }, - { -390,0,130,0 }, - { -325,0,130,0 }, - { -260,0,130,0 }, - { 0,0,65,0 }, - { 130,0,0,0 }, - { 0,0,-260,0 }, - { -195,0,-260,0 }, - { 65,0,130,0 }, - { -65,0,-260,0 }, - { 325,0,0,0 }, - { 260,0,130,0 }, - { 455,0,65,0 }, - { 390,0,130,0 }, - { 260,0,-130,0 }, - { 0,0,-130,0 }, - { -455,0,65,0 }, - { -390,0,65,0 }, - { -325,0,65,0 }, - { 520,0,-130,0 }, - { 65,0,0,0 }, - { -130,0,65,0 }, - { -520,0,-130,0 }, - { -260,0,-260,0 }, - { 65,0,65,0 }, - { 130,0,65,0 }, - { 195,0,65,0 }, - { 260,0,65,0 }, - { 325,0,65,0 }, - { 390,0,65,0 }, - { -520,0,195,0 }, - { -260,0,-65,0 }, - { -455,0,0,0 }, - { -390,0,0,0 }, - { -325,0,0,0 }, - { -260,0,0,0 }, - { -195,0,0,0 }, - { -130,0,0,0 }, - { 65,0,-130,0 }, - { 0,0,0,0 }, - { 325,0,-130,0 }, - { 195,0,-130,0 }, - { 195,0,0,0 }, - { 260,0,0,0 }, - { 520,0,-65,0 }, - { 520,0,-195,0 }, - { 455,0,0,0 }, - { 65,0,-195,0 }, - { -260,0,-195,0 }, - { -455,0,-65,0 }, - { -390,0,-65,0 }, - { -325,0,-65,0 }, - { -130,0,-130,0 }, - { -195,0,-65,0 }, - { -520,0,325,0 }, - { -65,0,-65,0 }, - { 0,0,-65,0 }, - { 65,0,-65,0 }, - { 130,0,-65,0 }, - { 195,0,-65,0 }, - { 260,0,-65,0 }, - { 325,0,-65,0 }, - { 390,0,-65,0 }, - { 455,0,-65,0 }, - { 260,0,-195,0 }, - { -130,0,-260,0 }, - { -455,0,-130,0 }, - { -390,0,-130,0 }, - { -325,0,-130,0 }, - { -260,0,-130,0 }, - { -195,0,-130,0 }, - { 0,0,-325,0 }, - { 130,0,-195,0 }, - { 130,0,-260,0 }, - { 325,0,-195,0 }, - { 130,0,-130,0 }, - { -195,0,-325,0 }, - { 390,0,-195,0 }, - { 455,0,-260,0 }, - { 0,0,-390,0 }, - { 455,0,-130,0 }, - { 195,0,-390,0 }, - { -455,0,-195,0 }, - { -390,0,-195,0 }, - { -325,0,-195,0 }, - { -65,0,-325,0 }, - { -390,0,-455,0 }, - { -130,0,-195,0 }, - { -65,0,-195,0 }, - { 520,0,-325,0 }, - { 260,0,-260,0 }, - { 520,0,-260,0 }, - { 195,0,-195,0 }, - { 390,0,-325,0 }, - { -325,0,-455,0 }, - { -65,0,-455,0 }, - { 455,0,-195,0 }, - { -455,0,-390,0 }, - { 520,0,-390,0 }, - { -455,0,-260,0 }, - { -390,0,-260,0 }, - { -325,0,-260,0 }, - { -195,0,-390,0 }, - { 325,0,-455,0 }, - { 325,0,-390,0 }, - { 325,0,-520,0 }, - { 260,0,-325,0 }, - { 65,0,-260,0 }, - { 390,0,-390,0 }, - { 195,0,-260,0 }, - { 325,0,-325,0 }, - { 325,0,-260,0 }, - { 390,0,-260,0 }, - { -520,0,0,0 }, - { -520,0,65,0 }, - { -260,0,-390,0 }, - { -455,0,-325,0 }, - { -390,0,-325,0 }, - { -325,0,-325,0 }, - { -260,0,-325,0 }, - { 65,0,-455,0 }, - { -130,0,-325,0 }, - { 390,0,-455,0 }, - { 260,0,-455,0 }, - { 65,0,-325,0 }, - { 130,0,-325,0 }, - { 195,0,-325,0 }, - { -390,0,-520,0 }, - { -325,0,-520,0 }, - { -455,0,-520,0 }, - { 455,0,-325,0 }, - { 0,0,-455,0 }, - { 390,0,-520,0 }, - { -390,0,-390,0 }, - { -325,0,-390,0 }, - { -195,0,-455,0 }, - { -65,0,-520,0 }, - { -130,0,-390,0 }, - { -65,0,-390,0 }, - { 195,0,-520,0 }, - { 65,0,-390,0 }, - { 130,0,-390,0 }, - { 260,0,-390,0 }, - { 520,0,-455,0 }, - { 455,0,-390,0 }, - { -520,0,-455,0 }, - { -260,0,-520,0 }, - { -455,0,-455,0 }, - { -195,0,-520,0 }, - { 260,0,-520,0 }, - { -260,0,-455,0 }, - { -130,0,-520,0 }, - { -130,0,-455,0 }, - { 0,0,-520,0 }, - { 65,0,-520,0 }, - { 130,0,-520,0 }, - { 130,0,-455,0 }, - { 195,0,-455,0 }, - { 520,0,-520,0 }, - { 455,0,-520,0 }, - { 455,0,-455,0 }, - { -520,0,-520,0 }, - { -520,0,-260,0 }, - { -520,0,-325,0 }, - { -520,0,-390,0 }, - { -520,0,-195,0 }, - { -520,0,-65,0 }, - { -520,0,455,0 }, - { -520,0,260,0 }, - { -520,0,390,0 }, - { -390,0,520,0 }, - { -195,0,520,0 }, - { -65,0,520,0 }, - { 0,0,520,0 }, - { 325,0,520,0 }, - { 65,0,520,0 }, - { 260,0,520,0 }, - { 455,0,520,0 } + { -194,19,195,0 }, + { 454,-38,260,0 }, + { 519,-43,195,0 }, + { -323,30,260,0 }, + { 454,-38,195,0 }, + { 65,-4,455,0 }, + { -388,36,325,0 }, + { -323,30,325,0 }, + { 65,-4,195,0 }, + { 65,-4,390,0 }, + { 130,-9,130,0 }, + { -194,19,390,0 }, + { -129,13,260,0 }, + { -64,8,260,0 }, + { -194,19,325,0 }, + { 519,-43,260,0 }, + { 130,-9,455,0 }, + { 65,-4,260,0 }, + { 1,2,325,0 }, + { 130,-9,260,0 }, + { 519,-43,65,0 }, + { 65,-4,325,0 }, + { 389,-32,195,0 }, + { 130,-9,325,0 }, + { 324,-26,195,0 }, + { 195,-15,325,0 }, + { -453,41,520,0 }, + { 260,-21,325,0 }, + { -129,13,130,0 }, + { -453,41,130,0 }, + { -453,41,455,0 }, + { 519,-43,325,0 }, + { -453,41,325,0 }, + { -258,25,325,0 }, + { -129,13,520,0 }, + { -64,8,325,0 }, + { -453,41,390,0 }, + { -388,36,390,0 }, + { 519,-43,520,0 }, + { -129,13,325,0 }, + { 389,-32,520,0 }, + { 260,-21,390,0 }, + { -64,8,390,0 }, + { 324,-26,390,0 }, + { 519,-43,455,0 }, + { 324,-26,455,0 }, + { 454,-38,325,0 }, + { 324,-26,325,0 }, + { 389,-32,325,0 }, + { -388,36,455,0 }, + { -258,25,520,0 }, + { 519,-43,390,0 }, + { -323,30,390,0 }, + { -258,25,390,0 }, + { -129,13,390,0 }, + { -194,19,455,0 }, + { 1,2,390,0 }, + { -194,19,130,0 }, + { 130,-9,390,0 }, + { 195,-15,390,0 }, + { 454,-38,390,0 }, + { 260,-21,455,0 }, + { 389,-32,390,0 }, + { -517,47,520,0 }, + { 454,-38,455,0 }, + { -323,30,520,0 }, + { -258,25,455,0 }, + { -323,30,455,0 }, + { 195,-15,455,0 }, + { 1,2,455,0 }, + { -129,13,455,0 }, + { -64,8,455,0 }, + { 130,-9,520,0 }, + { 195,-15,520,0 }, + { 389,-32,455,0 }, + { 1,2,130,0 }, + { -64,8,65,0 }, + { -64,8,0,0 }, + { -453,41,260,0 }, + { -388,36,260,0 }, + { -258,25,195,0 }, + { -258,25,260,0 }, + { -194,19,260,0 }, + { 195,-15,130,0 }, + { 1,2,195,0 }, + { 1,2,260,0 }, + { -129,13,-65,0 }, + { 519,-43,130,0 }, + { 195,-15,260,0 }, + { 260,-21,260,0 }, + { 324,-26,260,0 }, + { 389,-32,260,0 }, + { 519,-43,0,0 }, + { -194,19,65,0 }, + { -453,41,195,0 }, + { -388,36,195,0 }, + { -323,30,195,0 }, + { -64,8,130,0 }, + { -194,19,-195,0 }, + { -129,13,195,0 }, + { -64,8,195,0 }, + { 389,-32,0,0 }, + { 324,-26,130,0 }, + { 130,-9,195,0 }, + { 195,-15,195,0 }, + { 260,-21,195,0 }, + { -64,8,-130,0 }, + { 454,-38,130,0 }, + { 389,-32,-130,0 }, + { -517,47,130,0 }, + { -258,25,65,0 }, + { 1,2,-195,0 }, + { -388,36,130,0 }, + { -323,30,130,0 }, + { -258,25,130,0 }, + { 1,2,65,0 }, + { 130,-9,0,0 }, + { 1,2,-260,0 }, + { -194,19,-260,0 }, + { 65,-4,130,0 }, + { -64,8,-260,0 }, + { 324,-26,0,0 }, + { 260,-21,130,0 }, + { 454,-38,65,0 }, + { 389,-32,130,0 }, + { 260,-21,-130,0 }, + { 1,2,-130,0 }, + { -453,41,65,0 }, + { -388,36,65,0 }, + { -323,30,65,0 }, + { 519,-43,-130,0 }, + { 65,-4,0,0 }, + { -129,13,65,0 }, + { -517,47,-130,0 }, + { -258,25,-260,0 }, + { 65,-4,65,0 }, + { 130,-9,65,0 }, + { 195,-15,65,0 }, + { 260,-21,65,0 }, + { 324,-26,65,0 }, + { 389,-32,65,0 }, + { -517,47,195,0 }, + { -258,25,-65,0 }, + { -453,41,0,0 }, + { -388,36,0,0 }, + { -323,30,0,0 }, + { -258,25,0,0 }, + { -194,19,0,0 }, + { -129,13,0,0 }, + { 65,-4,-130,0 }, + { 1,2,0,0 }, + { 324,-26,-130,0 }, + { 195,-15,-130,0 }, + { 195,-15,0,0 }, + { 260,-21,0,0 }, + { 519,-43,-65,0 }, + { 519,-43,-195,0 }, + { 454,-38,0,0 }, + { 65,-4,-195,0 }, + { -258,25,-195,0 }, + { -453,41,-65,0 }, + { -388,36,-65,0 }, + { -323,30,-65,0 }, + { -129,13,-130,0 }, + { -194,19,-65,0 }, + { -517,47,325,0 }, + { -64,8,-65,0 }, + { 1,2,-65,0 }, + { 65,-4,-65,0 }, + { 130,-9,-65,0 }, + { 195,-15,-65,0 }, + { 260,-21,-65,0 }, + { 324,-26,-65,0 }, + { 389,-32,-65,0 }, + { 454,-38,-65,0 }, + { 260,-21,-195,0 }, + { -129,13,-260,0 }, + { -453,41,-130,0 }, + { -388,36,-130,0 }, + { -323,30,-130,0 }, + { -258,25,-130,0 }, + { -194,19,-130,0 }, + { 1,2,-325,0 }, + { 130,-9,-195,0 }, + { 130,-9,-260,0 }, + { 324,-26,-195,0 }, + { 130,-9,-130,0 }, + { -194,19,-325,0 }, + { 389,-32,-195,0 }, + { 454,-38,-260,0 }, + { 1,2,-390,0 }, + { 454,-38,-130,0 }, + { 195,-15,-390,0 }, + { -453,41,-195,0 }, + { -388,36,-195,0 }, + { -323,30,-195,0 }, + { -64,8,-325,0 }, + { -388,36,-455,0 }, + { -129,13,-195,0 }, + { -64,8,-195,0 }, + { 519,-43,-325,0 }, + { 260,-21,-260,0 }, + { 519,-43,-260,0 }, + { 195,-15,-195,0 }, + { 389,-32,-325,0 }, + { -323,30,-455,0 }, + { -64,8,-455,0 }, + { 454,-38,-195,0 }, + { -453,41,-390,0 }, + { 519,-43,-390,0 }, + { -453,41,-260,0 }, + { -388,36,-260,0 }, + { -323,30,-260,0 }, + { -194,19,-390,0 }, + { 324,-26,-455,0 }, + { 324,-26,-390,0 }, + { 324,-26,-520,0 }, + { 260,-21,-325,0 }, + { 65,-4,-260,0 }, + { 389,-32,-390,0 }, + { 195,-15,-260,0 }, + { 324,-26,-325,0 }, + { 324,-26,-260,0 }, + { 389,-32,-260,0 }, + { -517,47,0,0 }, + { -517,47,65,0 }, + { -258,25,-390,0 }, + { -453,41,-325,0 }, + { -388,36,-325,0 }, + { -323,30,-325,0 }, + { -258,25,-325,0 }, + { 65,-4,-455,0 }, + { -129,13,-325,0 }, + { 389,-32,-455,0 }, + { 260,-21,-455,0 }, + { 65,-4,-325,0 }, + { 130,-9,-325,0 }, + { 195,-15,-325,0 }, + { -388,36,-520,0 }, + { -323,30,-520,0 }, + { -453,41,-520,0 }, + { 454,-38,-325,0 }, + { 1,2,-455,0 }, + { 389,-32,-520,0 }, + { -388,36,-390,0 }, + { -323,30,-390,0 }, + { -194,19,-455,0 }, + { -64,8,-520,0 }, + { -129,13,-390,0 }, + { -64,8,-390,0 }, + { 195,-15,-520,0 }, + { 65,-4,-390,0 }, + { 130,-9,-390,0 }, + { 260,-21,-390,0 }, + { 519,-43,-455,0 }, + { 454,-38,-390,0 }, + { -517,47,-455,0 }, + { -258,25,-520,0 }, + { -453,41,-455,0 }, + { -194,19,-520,0 }, + { 260,-21,-520,0 }, + { -258,25,-455,0 }, + { -129,13,-520,0 }, + { -129,13,-455,0 }, + { 1,2,-520,0 }, + { 65,-4,-520,0 }, + { 130,-9,-520,0 }, + { 130,-9,-455,0 }, + { 195,-15,-455,0 }, + { 519,-43,-520,0 }, + { 454,-38,-520,0 }, + { 454,-38,-455,0 }, + { -517,47,-520,0 }, + { -517,47,-260,0 }, + { -517,47,-325,0 }, + { -517,47,-390,0 }, + { -517,47,-195,0 }, + { -517,47,-65,0 }, + { -517,47,455,0 }, + { -517,47,260,0 }, + { -517,47,390,0 }, + { -388,36,520,0 }, + { -194,19,520,0 }, + { -64,8,520,0 }, + { 1,2,520,0 }, + { 324,-26,520,0 }, + { 65,-4,520,0 }, + { 260,-21,520,0 }, + { 454,-38,520,0 } }; SVECTOR level0_modelPlane_001_normal[] = { - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0, - 0,4096,0, 0 + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0, + 356,4080,0, 0 }; SVECTOR level0_modelPlane_001_uv[] = { @@ -4130,9 +4133,10 @@ BODY level0_modelPlane_001_body = { 0,0,0, 0, 1, ONE/1, - -520,0,-520, 0, - 520,0,520, 0, + -518,-44,-520, 0, + 518,47,520, 0, 0, + 0 }; TMESH level0_modelPlane_001 = { @@ -4173,77 +4177,77 @@ MESH level0_meshPlane_001 = { }; SVECTOR level0_modelPlane_002_mesh[] = { - { 0,-221,390,0 }, - { 0,-221,520,0 }, - { 0,1,520,0 }, - { 0,-221,325,0 }, - { 0,-221,455,0 }, - { 0,1,130,0 }, - { 0,-221,130,0 }, - { 0,1,-130,0 }, - { 0,-221,195,0 }, - { 0,1,195,0 }, - { 0,1,325,0 }, - { 0,-221,-130,0 }, - { 0,1,0,0 }, - { 0,1,65,0 }, - { 0,-221,-260,0 }, - { 0,1,-455,0 }, - { 0,1,-520,0 }, - { 0,1,-260,0 }, - { 0,-221,-455,0 }, - { 0,-221,-520,0 }, - { 0,1,-325,0 }, - { 0,1,-390,0 }, - { 0,-221,-390,0 }, - { 0,-221,-325,0 }, - { 0,1,-195,0 }, - { 0,-221,-195,0 }, - { 0,1,-65,0 }, - { 0,-221,-65,0 }, - { 0,-221,0,0 }, - { 0,-221,65,0 }, - { 0,1,455,0 }, - { 0,1,260,0 }, - { 0,-221,260,0 }, - { 0,1,390,0 } + { -500,-176,348,0 }, + { -500,-176,464,0 }, + { -481,44,464,0 }, + { -500,-176,290,0 }, + { -500,-176,406,0 }, + { -481,44,116,0 }, + { -500,-176,116,0 }, + { -481,44,-115,0 }, + { -500,-176,174,0 }, + { -481,44,174,0 }, + { -481,44,290,0 }, + { -500,-176,-115,0 }, + { -481,44,0,0 }, + { -481,44,58,0 }, + { -500,-176,-231,0 }, + { -481,44,-405,0 }, + { -481,44,-463,0 }, + { -481,44,-231,0 }, + { -500,-176,-405,0 }, + { -500,-176,-463,0 }, + { -481,44,-289,0 }, + { -481,44,-347,0 }, + { -500,-176,-347,0 }, + { -500,-176,-289,0 }, + { -481,44,-173,0 }, + { -500,-176,-173,0 }, + { -481,44,-57,0 }, + { -500,-176,-57,0 }, + { -500,-176,0,0 }, + { -500,-176,58,0 }, + { -481,44,406,0 }, + { -481,44,232,0 }, + { -500,-176,232,0 }, + { -481,44,348,0 } }; SVECTOR level0_modelPlane_002_normal[] = { - -4096,0,0, 0, - -4096,0,0, 0, - -4096,0,0, 0, - -4096,0,0, 0, - -4096,0,0, 0, - -4096,0,0, 0, - -4096,0,0, 0, - -4096,0,0, 0, - -4096,0,0, 0, - -4096,0,0, 0, - -4096,0,0, 0, - -4096,0,0, 0, - -4096,0,0, 0, - -4096,0,0, 0, - -4096,0,0, 0, - -4096,0,0, 0, - -4096,0,0, 0, - -4096,0,0, 0, - -4096,0,0, 0, - -4096,0,0, 0, - -4096,0,0, 0, - -4096,0,0, 0, - -4096,0,0, 0, - -4096,0,0, 0, - -4096,0,0, 0, - -4096,0,0, 0, - -4096,0,0, 0, - -4096,0,0, 0, - -4096,0,0, 0, - -4096,0,0, 0, - -4096,0,0, 0, - -4096,0,0, 0, - -4096,0,0, 0, - -4096,0,0, 0 + -4080,357,0, 0, + -4080,357,0, 0, + -4080,357,0, 0, + -4080,357,0, 0, + -4080,357,0, 0, + -4080,357,0, 0, + -4080,357,0, 0, + -4080,357,0, 0, + -4080,357,0, 0, + -4080,357,0, 0, + -4080,357,0, 0, + -4080,357,0, 0, + -4080,357,0, 0, + -4080,357,0, 0, + -4080,357,0, 0, + -4080,357,0, 0, + -4080,357,0, 0, + -4080,357,0, 0, + -4080,357,0, 0, + -4080,357,0, 0, + -4080,357,0, 0, + -4080,357,0, 0, + -4080,357,0, 0, + -4080,357,0, 0, + -4080,357,0, 0, + -4080,357,0, 0, + -4080,357,0, 0, + -4080,357,0, 0, + -4080,357,0, 0, + -4080,357,0, 0, + -4080,357,0, 0, + -4080,357,0, 0, + -4080,357,0, 0, + -4080,357,0, 0 }; SVECTOR level0_modelPlane_002_uv[] = { @@ -4401,13 +4405,14 @@ PRIM level0_modelPlane_002_index[] = { BODY level0_modelPlane_002_body = { {0, 0, 0, 0}, - -520,0,0, 0, + 0,0,0, 0, 0,0,0, 0, 8, ONE/8, - 0,-221,-520, 0, - 0,0,520, 0, + -501,-177,-463, 0, + -482,44,463, 0, 0, + 0 }; TMESH level0_modelPlane_002 = { @@ -4425,7 +4430,7 @@ MESH level0_meshPlane_002 = { &level0_tim_woods, _binary_TIM_woods_tim_start, {0}, // Matrix - {-520,0,0, 0}, // position + {0,0,0, 0}, // position {0,0,0, 0}, // rotation 0, // isProp 0, // isRigidBody @@ -4448,40 +4453,40 @@ MESH level0_meshPlane_002 = { }; SVECTOR level0_modelPlane_005_mesh[] = { - { 325,-218,0,0 }, - { -520,5,0,0 }, - { -195,5,0,0 }, - { 455,5,0,0 }, - { 325,5,0,0 }, - { -585,-218,0,0 }, - { -325,-218,0,0 }, - { -325,5,0,0 }, - { -585,5,0,0 }, - { -520,-218,0,0 }, - { -390,5,0,0 }, - { -130,-218,0,0 }, - { -65,-218,0,0 }, - { 130,-218,0,0 }, - { 65,5,0,0 }, - { 130,5,0,0 }, - { 260,-218,0,0 }, - { -260,-218,0,0 }, - { -455,5,0,0 }, - { -260,5,0,0 }, - { -455,-218,0,0 }, - { -390,-218,0,0 }, - { -130,5,0,0 }, - { -65,5,0,0 }, - { -195,-218,0,0 }, - { 260,5,0,0 }, - { 0,5,0,0 }, - { 195,5,0,0 }, - { 0,-218,0,0 }, - { 65,-218,0,0 }, - { 390,-218,0,0 }, - { 195,-218,0,0 }, - { 390,5,0,0 }, - { 455,-218,0,0 } + { 307,-244,-475,0 }, + { -370,39,-475,0 }, + { -105,16,-475,0 }, + { 425,-31,-475,0 }, + { 319,-21,-475,0 }, + { -435,-179,-475,0 }, + { -223,-197,-475,0 }, + { -211,25,-475,0 }, + { -423,43,-475,0 }, + { -382,-184,-475,0 }, + { -264,29,-475,0 }, + { -64,-211,-475,0 }, + { -11,-216,-475,0 }, + { 148,-230,-475,0 }, + { 107,-3,-475,0 }, + { 160,-8,-475,0 }, + { 254,-239,-475,0 }, + { -170,-202,-475,0 }, + { -317,34,-475,0 }, + { -158,20,-475,0 }, + { -329,-188,-475,0 }, + { -276,-193,-475,0 }, + { -52,11,-475,0 }, + { 1,6,-475,0 }, + { -117,-207,-475,0 }, + { 266,-17,-475,0 }, + { 54,2,-475,0 }, + { 213,-12,-475,0 }, + { 42,-221,-475,0 }, + { 95,-225,-475,0 }, + { 360,-248,-475,0 }, + { 201,-234,-475,0 }, + { 372,-26,-475,0 }, + { 413,-253,-475,0 } }; SVECTOR level0_modelPlane_005_normal[] = { @@ -4676,13 +4681,14 @@ PRIM level0_modelPlane_005_index[] = { BODY level0_modelPlane_005_body = { {0, 0, 0, 0}, - 65,0,-520, 0, + 0,-7,0, 0, 0,0,0, 0, 8, ONE/8, - -585,-218,0, 0, - 455,4,0, 0, + -435,-254,-476, 0, + 424,43,-476, 0, 0, + 0 }; TMESH level0_modelPlane_005 = { @@ -4700,7 +4706,7 @@ MESH level0_meshPlane_005 = { &level0_tim_woods, _binary_TIM_woods_tim_start, {0}, // Matrix - {65,0,-520, 0}, // position + {0,-7,0, 0}, // position {0,0,0, 0}, // rotation 0, // isProp 0, // isRigidBody @@ -4723,77 +4729,77 @@ MESH level0_meshPlane_005 = { }; SVECTOR level0_modelPlane_006_mesh[] = { - { 0,-221,390,0 }, - { 0,-221,520,0 }, - { 0,1,520,0 }, - { 0,-221,325,0 }, - { 0,-221,455,0 }, - { 0,1,130,0 }, - { 0,-221,130,0 }, - { 0,1,-130,0 }, - { 0,-221,195,0 }, - { 0,1,195,0 }, - { 0,1,325,0 }, - { 0,-221,-130,0 }, - { 0,1,0,0 }, - { 0,1,65,0 }, - { 0,-221,-260,0 }, - { 0,1,-455,0 }, - { 0,1,-520,0 }, - { 0,1,-260,0 }, - { 0,-221,-455,0 }, - { 0,-221,-520,0 }, - { 0,1,-325,0 }, - { 0,1,-390,0 }, - { 0,-221,-390,0 }, - { 0,-221,-325,0 }, - { 0,1,-195,0 }, - { 0,-221,-195,0 }, - { 0,1,-65,0 }, - { 0,-221,-65,0 }, - { 0,-221,0,0 }, - { 0,-221,65,0 }, - { 0,1,455,0 }, - { 0,1,260,0 }, - { 0,-221,260,0 }, - { 0,1,390,0 } + { 413,-256,348,0 }, + { 413,-256,464,0 }, + { 432,-36,464,0 }, + { 413,-256,290,0 }, + { 413,-256,406,0 }, + { 432,-36,116,0 }, + { 413,-256,116,0 }, + { 432,-36,-115,0 }, + { 413,-256,174,0 }, + { 432,-36,174,0 }, + { 432,-36,290,0 }, + { 413,-256,-115,0 }, + { 432,-36,0,0 }, + { 432,-36,58,0 }, + { 413,-256,-231,0 }, + { 432,-36,-405,0 }, + { 432,-36,-463,0 }, + { 432,-36,-231,0 }, + { 413,-256,-405,0 }, + { 413,-256,-463,0 }, + { 432,-36,-289,0 }, + { 432,-36,-347,0 }, + { 413,-256,-347,0 }, + { 413,-256,-289,0 }, + { 432,-36,-173,0 }, + { 413,-256,-173,0 }, + { 432,-36,-57,0 }, + { 413,-256,-57,0 }, + { 413,-256,0,0 }, + { 413,-256,58,0 }, + { 432,-36,406,0 }, + { 432,-36,232,0 }, + { 413,-256,232,0 }, + { 432,-36,348,0 } }; SVECTOR level0_modelPlane_006_normal[] = { - 4096,0,0, 0, - 4096,0,0, 0, - 4096,0,0, 0, - 4096,0,0, 0, - 4096,0,0, 0, - 4096,0,0, 0, - 4096,0,0, 0, - 4096,0,0, 0, - 4096,0,0, 0, - 4096,0,0, 0, - 4096,0,0, 0, - 4096,0,0, 0, - 4096,0,0, 0, - 4096,0,0, 0, - 4096,0,0, 0, - 4096,0,0, 0, - 4096,0,0, 0, - 4096,0,0, 0, - 4096,0,0, 0, - 4096,0,0, 0, - 4096,0,0, 0, - 4096,0,0, 0, - 4096,0,0, 0, - 4096,0,0, 0, - 4096,0,0, 0, - 4096,0,0, 0, - 4096,0,0, 0, - 4096,0,0, 0, - 4096,0,0, 0, - 4096,0,0, 0, - 4096,0,0, 0, - 4096,0,0, 0, - 4096,0,0, 0, - 4096,0,0, 0 + 4080,-357,0, 0, + 4080,-357,0, 0, + 4080,-357,0, 0, + 4080,-357,0, 0, + 4080,-357,0, 0, + 4080,-357,0, 0, + 4080,-357,0, 0, + 4080,-357,0, 0, + 4080,-357,0, 0, + 4080,-357,0, 0, + 4080,-357,0, 0, + 4080,-357,0, 0, + 4080,-357,0, 0, + 4080,-357,0, 0, + 4080,-357,0, 0, + 4080,-357,0, 0, + 4080,-357,0, 0, + 4080,-357,0, 0, + 4080,-357,0, 0, + 4080,-357,0, 0, + 4080,-357,0, 0, + 4080,-357,0, 0, + 4080,-357,0, 0, + 4080,-357,0, 0, + 4080,-357,0, 0, + 4080,-357,0, 0, + 4080,-357,0, 0, + 4080,-357,0, 0, + 4080,-357,0, 0, + 4080,-357,0, 0, + 4080,-357,0, 0, + 4080,-357,0, 0, + 4080,-357,0, 0, + 4080,-357,0, 0 }; SVECTOR level0_modelPlane_006_uv[] = { @@ -4951,13 +4957,14 @@ PRIM level0_modelPlane_006_index[] = { BODY level0_modelPlane_006_body = { {0, 0, 0, 0}, - 520,0,0, 0, + 0,0,0, 0, 0,0,0, 0, 8, ONE/8, - 0,-221,-520, 0, - 0,0,520, 0, + 412,-257,-463, 0, + 431,-36,463, 0, 0, + 0 }; TMESH level0_modelPlane_006 = { @@ -4975,7 +4982,7 @@ MESH level0_meshPlane_006 = { &level0_tim_woods, _binary_TIM_woods_tim_start, {0}, // Matrix - {520,0,0, 0}, // position + {0,0,0, 0}, // position {0,0,0, 0}, // rotation 0, // isProp 0, // isRigidBody diff --git a/levels/level0.h b/levels/level0.h index db1334c..9f67e54 100644 --- a/levels/level0.h +++ b/levels/level0.h @@ -1,16 +1,16 @@ #pragma once -#include "../custom_types.h" -#include "../include/defines.h" +#include +#include extern LEVEL level0; extern CVECTOR level0_BGc; extern VECTOR level0_BKc; extern MESH_ANIMS_TRACKS level0_modelCube_001_anims; -extern VANIM level0_modelCube_001_anim_KeyAction; -extern VANIM level0_modelCube_001_anim_KeyAction_004; extern VANIM level0_modelCube_001_anim_KeyAction_003; extern VANIM level0_modelCube_001_anim_KeyAction_001; extern VANIM level0_modelCube_001_anim_KeyAction_002; +extern VANIM level0_modelCube_001_anim_KeyAction; +extern VANIM level0_modelCube_001_anim_KeyAction_004; extern CAMPOS level0_camPos_Camera; extern CAMPATH level0_camPath; extern MATRIX level0_lgtmat; diff --git a/levels/level1.c b/levels/level1.c index f3f58b5..dc96d55 100644 --- a/levels/level1.c +++ b/levels/level1.c @@ -2607,8 +2607,8 @@ BODY level1_modelCube_body = { 0,899,0, 0, 5, ONE/5, - -45,-23,-27, 0, - 42,31,26, 0, + -35,-13,-17, 0, + 32,21,16, 0, 1024, }; @@ -2984,8 +2984,8 @@ BODY level1_modelCylindre_body = { 0,0,0, 0, 20, ONE/20, - -38,-30,-36, 0, - 39,35,41, 0, + -28,-20,-26, 0, + 29,35,31, 0, 0, }; @@ -10744,7 +10744,7 @@ PRIM level1_modelSphere_index[] = { BODY level1_modelSphere_body = { {0, 0, 0, 0}, - -495,-129,16, 0, + -405,-109,16, 0, 0,0,0, 0, 10, ONE/10, @@ -10768,7 +10768,7 @@ MESH level1_meshSphere = { &level1_tim_home, _binary_TIM_home_tim_start, {0}, // Matrix - {-495,-129,16, 0}, // position + {-405,-109,16, 0}, // position {0,0,0, 0}, // rotation 0, // isProp 1, // isRigidBody @@ -11211,7 +11211,7 @@ PRIM level1_modelSphere_001_index[] = { BODY level1_modelSphere_001_body = { {0, 0, 0, 0}, - 44,-73,92, 0, + 144,-73,92, 0, 0,0,0, 0, 5, ONE/5, @@ -11235,7 +11235,7 @@ MESH level1_meshSphere_001 = { &level1_tim_home, _binary_TIM_home_tim_start, {0}, // Matrix - {44,-73,92, 0}, // position + {144,-73,92, 0}, // position {0,0,0, 0}, // rotation 1, // isProp 1, // isRigidBody diff --git a/levels/level1.h b/levels/level1.h index b96ed4b..51ddf53 100644 --- a/levels/level1.h +++ b/levels/level1.h @@ -1,6 +1,6 @@ #pragma once -#include "../custom_types.h" -#include "../include/defines.h" +#include +#include extern LEVEL level1; extern CVECTOR level1_BGc; diff --git a/overlay.ld b/overlay.ld index d95f491..a56dcf2 100644 --- a/overlay.ld +++ b/overlay.ld @@ -14,20 +14,20 @@ SECTIONS { KEEP(levels/level0.o(.text.startup._GLOBAL__*)) KEEP(levels/level0.o(.text.*)) KEEP(levels/level0.o(.rodata*)) - KEEP(levels/level0.o(.sdata*)) + KEEP(levels/level0.o(.sdata*)) KEEP(levels/level0.o(.data*)) - KEEP(levels/level0.o(.sbss*)) + KEEP(levels/level0.o(.sbss*)) KEEP(levels/level0.o(.bss*)) KEEP(levels/level0.o(.ctors)) - /*KEEP(TIM/bg_camPath_*.o(.text)) + /*KEEP(TIM/bg_camPath_*.o(.text)) __lvl0_ctor = .; KEEP(TIM/bg_camPath_*.o(.text.startup._GLOBAL__*)) KEEP(TIM/bg_camPath_*.o(.text.*)) KEEP(TIM/bg_camPath_*.o(.rodata*)) - KEEP(TIM/bg_camPath_*.o(.sdata*)) + KEEP(TIM/bg_camPath_*.o(.sdata*)) KEEP(TIM/bg_camPath_*.o(.data*)) - KEEP(TIM/bg_camPath_*.o(.sbss*)) + KEEP(TIM/bg_camPath_*.o(.sbss*)) KEEP(TIM/bg_camPath_*.o(.bss*)) KEEP(TIM/bg_camPath_*.o(.ctors)) */ @@ -42,9 +42,9 @@ SECTIONS { 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(.sdata*)) KEEP(levels/level1.o(.data*)) - KEEP(levels/level1.o(.sbss*)) + KEEP(levels/level1.o(.sbss*)) KEEP(levels/level1.o(.bss*)) KEEP(levels/level1.o(.ctors)) diff --git a/ovly-upload-helper.sh b/ovly-upload-helper.sh deleted file mode 100755 index 30d161d..0000000 --- a/ovly-upload-helper.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -# Path to nops executable -NOPS="nops" - -if [ $# -eq 0 ] - then - echo "PSX Overlay Upload helper script - -Upload a binary and the corresponding executable to a real PSX memory, via unirom + serial cable. - -This script is dependant on NOTpsxserial being available on your system : https://github.com/JonathanDotCel/NOTPSXSerial -Edit the $NOPS value to reflect the executable path on your system, e.g : - \$NOPS = '/blah/nops' -Usage : ./ovly_upload_helper.sh bin_filename psx_exe_name com_port - - - bin_filename , eg : Overlay.lvl0 - - psx_exe_name, e.g : main.ps-exe - - com_port, e.g : /dev/ttyUSB0, COM1 -" -else -# Find map file corresponding to ps-exe -MAP_FILE="`echo $2 | awk -F. '{print $1}'`.map" -# Find loading address -LOAD_ADDR="0x`cat $MAP_FILE | grep load_all_overlays_here | awk '{print $1}' | cut -c 11-`" - -$NOPS /debug $3 -$NOPS /fast /bin $LOAD_ADDR $1 $3 -$NOPS /fast /exe $2 $3 -$NOPS /slow $3 -fi diff --git a/src/camera.c b/src/camera.c index 730b047..12c73c8 100644 --- a/src/camera.c +++ b/src/camera.c @@ -1,8 +1,8 @@ -#include "../include/psx.h" -#include "../include/camera.h" -#include "../include/math.h" -#include "../include/physics.h" -#include "../include/space.h" +#include +#include +#include +#include +#include void getCameraXZ(int * x, int * z, int actorX, int actorZ, int angle, int distance) { // Using Nic's Costable : https://github.com/grumpycoders/Balau/blob/master/tests/test-Handles.cc#L20-L102 diff --git a/src/graphics.c b/src/graphics.c index e7bee44..425edfb 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1,7 +1,7 @@ -#include "../include/psx.h" -#include "../include/graphics.h" -#include "../include/math.h" -#include "../include/CPUMAC.H" +#include +#include +#include +#include void updateLight(void){ RotMatrix_gte(dc_lgtangp, dc_lgtmatp); @@ -79,9 +79,18 @@ void set3VertexLerPos(MESH * mesh, long t){ }; void set3VertexPos(MESH * mesh, long t, int atime){ // Set vertices according to anim - mesh->tmesh->v[ mesh->index[ t ].order.vx ] = mesh->currentAnim->data[ atime % mesh->currentAnim->nframes * mesh->currentAnim->nvert + mesh->index[t].order.vx ]; - mesh->tmesh->v[ mesh->index[ t ].order.vz ] = mesh->currentAnim->data[ atime % mesh->currentAnim->nframes * mesh->currentAnim->nvert + mesh->index[t].order.vz ]; - mesh->tmesh->v[ mesh->index[ t ].order.vy ] = mesh->currentAnim->data[ atime % mesh->currentAnim->nframes * mesh->currentAnim->nvert + mesh->index[t].order.vy ]; + mesh->tmesh->v[ mesh->index[ t ].order.vx ].vx = mesh->currentAnim->data[ atime % mesh->currentAnim->nframes * mesh->currentAnim->nvert + mesh->index[t].order.vx ].vx; + mesh->tmesh->v[ mesh->index[ t ].order.vx ].vy = mesh->currentAnim->data[ atime % mesh->currentAnim->nframes * mesh->currentAnim->nvert + mesh->index[t].order.vx ].vy; + mesh->tmesh->v[ mesh->index[ t ].order.vx ].vz = mesh->currentAnim->data[ atime % mesh->currentAnim->nframes * mesh->currentAnim->nvert + mesh->index[t].order.vx ].vz; + + mesh->tmesh->v[ mesh->index[ t ].order.vz ].vx = mesh->currentAnim->data[ atime % mesh->currentAnim->nframes * mesh->currentAnim->nvert + mesh->index[t].order.vz ].vx; + mesh->tmesh->v[ mesh->index[ t ].order.vz ].vy = mesh->currentAnim->data[ atime % mesh->currentAnim->nframes * mesh->currentAnim->nvert + mesh->index[t].order.vz ].vy; + mesh->tmesh->v[ mesh->index[ t ].order.vz ].vz = mesh->currentAnim->data[ atime % mesh->currentAnim->nframes * mesh->currentAnim->nvert + mesh->index[t].order.vz ].vz; + + mesh->tmesh->v[ mesh->index[ t ].order.vy ].vx = mesh->currentAnim->data[ atime % mesh->currentAnim->nframes * mesh->currentAnim->nvert + mesh->index[t].order.vy ].vx; + mesh->tmesh->v[ mesh->index[ t ].order.vy ].vy = mesh->currentAnim->data[ atime % mesh->currentAnim->nframes * mesh->currentAnim->nvert + mesh->index[t].order.vy ].vy; + mesh->tmesh->v[ mesh->index[ t ].order.vy ].vz = mesh->currentAnim->data[ atime % mesh->currentAnim->nframes * mesh->currentAnim->nvert + mesh->index[t].order.vy ].vz; + } void set4VertexLerPos(MESH * mesh, long t){ // Find and set 4 interpolated vertex value @@ -108,10 +117,31 @@ void set4VertexLerPos(MESH * mesh, long t){ } void set4VertexPos(MESH * mesh, long t, int atime){ // Set vertices according to anim - mesh->tmesh->v[ mesh->index[ t ].order.vx ] = mesh->currentAnim->data[ atime % mesh->currentAnim->nframes * mesh->currentAnim->nvert + mesh->index[t].order.vx ]; - mesh->tmesh->v[ mesh->index[ t ].order.vz ] = mesh->currentAnim->data[ atime % mesh->currentAnim->nframes * mesh->currentAnim->nvert + mesh->index[t].order.vz ]; - mesh->tmesh->v[ mesh->index[ t ].order.vy ] = mesh->currentAnim->data[ atime % mesh->currentAnim->nframes * mesh->currentAnim->nvert + mesh->index[t].order.vy ]; - mesh->tmesh->v[ mesh->index[ t ].order.pad ] = mesh->currentAnim->data[ atime % mesh->currentAnim->nframes * mesh->currentAnim->nvert + mesh->index[t].order.pad ]; + // TODO : fix using delta animation + //~ SVECTOR x, y, z, pad; + //~ addVector2(&mesh->tmesh->v[ mesh->index[ t ].order.vx ], &mesh->currentAnim->data[ atime % mesh->currentAnim->nframes * mesh->currentAnim->nvert + mesh->index[t].order.vx ], &x ); + //~ addVector2(&mesh->tmesh->v[ mesh->index[ t ].order.vz ], &mesh->currentAnim->data[ atime % mesh->currentAnim->nframes * mesh->currentAnim->nvert + mesh->index[t].order.vz ], &z ); + //~ addVector2(&mesh->tmesh->v[ mesh->index[ t ].order.vy ], &mesh->currentAnim->data[ atime % mesh->currentAnim->nframes * mesh->currentAnim->nvert + mesh->index[t].order.vy ], &y ); + //~ addVector2(&mesh->tmesh->v[ mesh->index[ t ].order.pad ], &mesh->currentAnim->data[ atime % mesh->currentAnim->nframes * mesh->currentAnim->nvert + mesh->index[t].order.pad ], &pad ); + //~ mesh->tmesh->v[ mesh->index[ t ].order.vx ] = x; + //~ mesh->tmesh->v[ mesh->index[ t ].order.vz ] = z; + //~ mesh->tmesh->v[ mesh->index[ t ].order.vy ] = y; + //~ mesh->tmesh->v[ mesh->index[ t ].order.pad ] = pad; + mesh->tmesh->v[ mesh->index[ t ].order.vx ].vx = mesh->currentAnim->data[ atime % mesh->currentAnim->nframes * mesh->currentAnim->nvert + mesh->index[t].order.vx ].vx; + mesh->tmesh->v[ mesh->index[ t ].order.vx ].vy = mesh->currentAnim->data[ atime % mesh->currentAnim->nframes * mesh->currentAnim->nvert + mesh->index[t].order.vx ].vy; + mesh->tmesh->v[ mesh->index[ t ].order.vx ].vz = mesh->currentAnim->data[ atime % mesh->currentAnim->nframes * mesh->currentAnim->nvert + mesh->index[t].order.vx ].vz; + + mesh->tmesh->v[ mesh->index[ t ].order.vz ].vx = mesh->currentAnim->data[ atime % mesh->currentAnim->nframes * mesh->currentAnim->nvert + mesh->index[t].order.vz ].vx; + mesh->tmesh->v[ mesh->index[ t ].order.vz ].vy = mesh->currentAnim->data[ atime % mesh->currentAnim->nframes * mesh->currentAnim->nvert + mesh->index[t].order.vz ].vy; + mesh->tmesh->v[ mesh->index[ t ].order.vz ].vz = mesh->currentAnim->data[ atime % mesh->currentAnim->nframes * mesh->currentAnim->nvert + mesh->index[t].order.vz ].vz; + + mesh->tmesh->v[ mesh->index[ t ].order.vy ].vx = mesh->currentAnim->data[ atime % mesh->currentAnim->nframes * mesh->currentAnim->nvert + mesh->index[t].order.vy ].vx; + mesh->tmesh->v[ mesh->index[ t ].order.vy ].vy = mesh->currentAnim->data[ atime % mesh->currentAnim->nframes * mesh->currentAnim->nvert + mesh->index[t].order.vy ].vy; + mesh->tmesh->v[ mesh->index[ t ].order.vy ].vz = mesh->currentAnim->data[ atime % mesh->currentAnim->nframes * mesh->currentAnim->nvert + mesh->index[t].order.vy ].vz; + + mesh->tmesh->v[ mesh->index[ t ].order.pad ].vx = mesh->currentAnim->data[ atime % mesh->currentAnim->nframes * mesh->currentAnim->nvert + mesh->index[t].order.pad ].vx; + mesh->tmesh->v[ mesh->index[ t ].order.pad ].vy = mesh->currentAnim->data[ atime % mesh->currentAnim->nframes * mesh->currentAnim->nvert + mesh->index[t].order.pad ].vy; + mesh->tmesh->v[ mesh->index[ t ].order.pad ].vz = mesh->currentAnim->data[ atime % mesh->currentAnim->nframes * mesh->currentAnim->nvert + mesh->index[t].order.pad ].vz; } void interpolateTri(POLY_GT3 * poly, MESH * mesh, long t){ long Flag, nclip = 0; diff --git a/src/main.c b/src/main.c index ac7d695..d5fb84d 100644 --- a/src/main.c +++ b/src/main.c @@ -16,15 +16,16 @@ * eye */ // Blender debug mode // bpy. app. debug = True -#include "../include/psx.h" -#include "../include/pad.h" -#include "../include/math.h" -#include "../include/camera.h" -#include "../include/physics.h" -#include "../include/graphics.h" -#include "../include/space.h" -#include "../include/sound.h" - +#include +#include +#include +#include +#include +#include +#include +#include +//~ #include "../thirdparty/nugget/common/syscalls/syscalls.h" +//~ #define printf ramsyscall_printf #define USECD // START OVERLAY @@ -196,6 +197,7 @@ int main() { // Main loop //~ while ( VSync(VSYNC) ) { while ( 1 ) { + printf("Let's go!"); dt = GetRCnt(RCntCNT1) - oldTime; oldTime = GetRCnt(RCntCNT1); // XA playback (keep track of playback and loop XA) @@ -251,11 +253,11 @@ int main() { atime ++; } // Reset player/prop pos - if(curLvl.actorPtr->pos.vy >= 200){ + if(curLvl.actorPtr->pos.vy >= curLvl.levelPtr->body->max.vy + 200){ playSFX(&voiceAttributes, curLvl.levelSounds->sounds[6]->VAGsample, curLvl.levelSounds->sounds[6]->volumeL, curLvl.levelSounds->sounds[6]->volumeR); respawnMesh(&curLvl, curLvl.actorPtr, &actorStartRot, &actorStartPos, actorStartNode ); } - if(curLvl.propPtr->pos.vy >= 200){ + if(curLvl.propPtr->pos.vy >= curLvl.levelPtr->body->max.vy + 200){ playSFX(&voiceAttributes, curLvl.levelSounds->sounds[3]->VAGsample, curLvl.levelSounds->sounds[3]->volumeL, curLvl.levelSounds->sounds[3]->volumeR); respawnMesh(&curLvl, curLvl.propPtr, &propStartRot, &propStartPos, propStartNode ); } @@ -308,26 +310,37 @@ int main() { // Get col between actor and level if ( curLvl.meshes[k]->isActor ){ // Check col - checkBodyCol( curLvl.meshes[k]->body , curLvl.levelPtr->body ); + VECTOR colLvl = checkBodyCol( curLvl.meshes[k]->body , curLvl.levelPtr->body ); + FntPrint("ColLvl: %d %d %d\n", colLvl.vz, colLvl.vx, colLvl.vy); // Get col between actor and current node's walls // Loop on current node's objects for (short obj=0; obj < curLvl.curNode->objects->index; obj++){ + VECTOR col = getExtCollision( *curLvl.meshes[k]->body, *curLvl.curNode->objects->list[obj]->body ); // If isWall, check collision - if ( curLvl.curNode->objects->list[obj]->isWall ){ - if( getExtCollision( *curLvl.meshes[k]->body, *curLvl.curNode->objects->list[obj]->body ).vz && - getExtCollision( *curLvl.meshes[k]->body, *curLvl.curNode->objects->list[obj]->body ).vx) { - curLvl.meshes[k]->body->position.vz = curLvl.meshes[k]->body->position.vz - curLvl.meshes[k]->body->velocity.vz ; - curLvl.meshes[k]->body->position.vx = curLvl.meshes[k]->body->position.vx - curLvl.meshes[k]->body->velocity.vx ; + //~ if ( curLvl.curNode->objects->list[obj]->isWall){ + //~ if( col.vz && col.vx) { + //~ curLvl.meshes[k]->body->position.vz = curLvl.meshes[k]->body->position.vz - curLvl.meshes[k]->body->velocity.vz ; + //~ curLvl.meshes[k]->body->position.vx = curLvl.meshes[k]->body->position.vx - curLvl.meshes[k]->body->velocity.vx ; + //~ } + //~ } + if ( curLvl.curNode->objects->list[obj]->isStaticBody ){ + FntPrint("Col : %d %d %d\n", col.vz, col.vx, col.vy); + if( col.vz && col.vx && col.vy ) { + if (!colLvl.vy) { + curLvl.meshes[k]->body->position.vz = curLvl.meshes[k]->body->position.vz - curLvl.meshes[k]->body->velocity.vz ; + curLvl.meshes[k]->body->position.vx = curLvl.meshes[k]->body->position.vx - curLvl.meshes[k]->body->velocity.vx ; + } + curLvl.meshes[k]->body->position.vy = curLvl.meshes[k]->body->position.vy - curLvl.meshes[k]->body->velocity.vy ; } - } + } } } // Only evaluate collision if actor is on same plane as prop if ( curLvl.curNode == curLvl.propPtr->node ){ // Get col between actor and props - col = getExtCollision( *curLvl.meshes[k]->body, *curLvl.propPtr->body ); - if (col.vx && col.vz && canMove == 1 ) { + VECTOR col = getExtCollision( *curLvl.meshes[k]->body, *curLvl.propPtr->body ); + if (col.vx && col.vz && col.vy && canMove == 1 ) { setVector( &curLvl.propPtr->body->velocity, curLvl.meshes[k]->body->velocity.vx, 0, @@ -374,7 +387,8 @@ int main() { curLvl.actorPtr->pos.vy, curLvl.actorPtr->pos.vz - (ncos(curLvl.actorPtr->rot.vy/2)) ); - + curLvl.levelPtr->body->normal = curLvl.levelPtr->tmesh->n[0]; + // Add secondary OT to main OT AddPrims(otdisc[db], ot[db] + OTLEN - 1, ot[db]); @@ -383,11 +397,13 @@ int main() { //~ FntPrint("Dt : %d %d %d\n", 400/(dt+1), (XA_CDSPEED)/((400/(dt+1))+1), (curLvl.XA->samples[sample].end - curLvl.XA->samples[sample].start)<<12); //~ FntPrint("XA : %d\n", (XA_CDSPEED)/((400/(dt+1))+1) ); //~ FntPrint("XA : %d\n", curLvl.XA->samples[sample].cursor ); - FntPrint("CamAngle : %d\n", curCamAngle); + FntPrint("CamAngle : %d\n", curCamAngle ); + FntPrint("fVector : %d %d %d\n", fVecActor.vx, fVecActor.vy, fVecActor.vz ); //~ FntPrint("XA: %x\n", curLvl.XA); //~ FntPrint("Ofst: %d\n", curLvl.XA->banks[0]->offset); //~ FntPrint("Vol: %d %d\n", curLvl.levelSounds->sounds[0]->volumeL, curLvl.levelSounds->sounds[0]->volumeR ); FntPrint("Curanim : %x\n", curLvl.meshes[1]->currentAnim); + FntPrint("Gforce: %d", curLvl.actorPtr->body->gForce.vy); //~ FntPrint("Anims : %x %x", curLvl.meshes[1]->anim_tracks->strips[3], curLvl.meshes[1]->anim_tracks->strips[4]); FntFlush(-1); display( &disp[db], &draw[db], otdisc[db], primbuff[db], &nextpri, &db); @@ -493,9 +509,10 @@ void callback() { lastPad = PAD; } if ( PAD & Cross && !(lastPad & Cross) ){ - if (curLvl.actorPtr->body->gForce.vy == 0 && (curLvl.actorPtr->body->position.vy - curLvl.actorPtr->body->min.vy) == curLvl.levelPtr->body->min.vy ){ + //~ if (curLvl.actorPtr->body->gForce.vy == 0 && (curLvl.actorPtr->body->position.vy - curLvl.actorPtr->body->min.vy) == curLvl.levelPtr->body->min.vy ){ + if (curLvl.actorPtr->body->gForce.vy == 0){ // Use delta to find jump force - curLvl.actorPtr->body->gForce.vy = -200; + curLvl.actorPtr->body->gForce.vy = -300; } timer = 10; playSFX(&voiceAttributes, curLvl.levelSounds->sounds[4]->VAGsample, curLvl.levelSounds->sounds[4]->volumeL, curLvl.levelSounds->sounds[4]->volumeR ); diff --git a/src/math.c b/src/math.c index 40a7ed7..4b72dac 100644 --- a/src/math.c +++ b/src/math.c @@ -1,4 +1,4 @@ -#include "../include/math.h" +#include // Stolen from grumpycoder // this is from here : https://github.com/grumpycoders/Balau/blob/master/tests/test-Handles.cc#L20-L102 diff --git a/src/pad.c b/src/pad.c index deb2cbe..21cf7df 100644 --- a/src/pad.c +++ b/src/pad.c @@ -1,4 +1,4 @@ -#include "../include/pad.h" +#include void get_digital_direction( Controller_Data *c, int buttondata ) // get analog stick values { diff --git a/src/pcdrv.c b/src/pcdrv.c index 9a6933b..5e51aab 100644 --- a/src/pcdrv.c +++ b/src/pcdrv.c @@ -1,4 +1,4 @@ -#include "../include/pcdrv.h" +#include int waitForSIODone( int * flag ){ // This should wait for a signal from the SIO to tell when it's done diff --git a/src/physics.c b/src/physics.c index 988861f..77ca79e 100644 --- a/src/physics.c +++ b/src/physics.c @@ -1,4 +1,4 @@ -#include "../include/physics.h" +#include short checkLineW( VECTOR * pointA, VECTOR * pointB, MESH * mesh ) { long val1 = ( ( mesh->body->position.vx + mesh->body->min.vx ) - pointA->vx ) * ( pointB->vy - pointA->vy ) - ( ( mesh->body->position.vz + mesh->body->min.vy ) - pointA->vy ) * ( pointB->vx - pointA->vx ) ; @@ -87,7 +87,7 @@ VECTOR getIntCollision(BODY one, BODY two){ d2.vy = (two.position.vy + two.max.vy) - (one.position.vy + one.min.vy); d2.vz = (two.position.vz + two.max.vz) - (one.position.vz - one.max.vz); col.vx = !(d1.vx > 0 && d2.vx > 0); - col.vy = d1.vy > 0 && d2.vy > 0; + col.vy = !(d1.vy > 0 && d2.vy > 0); col.vz = !(d1.vz > 0 && d2.vz > 0); return col; }; @@ -104,20 +104,39 @@ VECTOR getExtCollision(BODY one, BODY two){ col.vz = d1.vz > 0 && d2.vz > 0; return col; }; -void checkBodyCol(BODY * one, BODY * two){ - VECTOR colInt, colExt; +VECTOR checkBodyCol(BODY * one, BODY * two){ + VECTOR colInt; colInt = getIntCollision( *one , *two ); - //~ colExt = getExtCollision( *one , *two ); // If collisiton on Y axis, - if ( colInt.vy ) { + if ( !(colInt.vy) ) { // and above plane if ( !colInt.vx && !colInt.vz ) { // collide - one->position.vy = two->max.vy - one->max.vy ; + short slopeX = two->normal.vx > 0 ? 1 : -1; + //~ short slopeZ = two->normal.vz > 0 ? 1 : -1; + long o = two->max.vy - two->min.vy ; + long a = two->max.vx - two->min.vx; + long aa = (two->position.vx + two->min.vx) - (one->position.vx + one->min.vx) ; + //~ long b = two->max.vz - two->min.vz; + //~ long ab = (two->position.vz + two->min.vz) - (one->position.vz + one->min.vz) ; + // Avoid div/0 + if (a){ + long y = (( (slopeX * o) * ONE) / a) * aa; + // long y = (( (slopeZ * o) * ONE) / b) * ab; + // FntPrint("sly: %d", y >> 12); + if (y) { + one->position.vy = (y >> 12) - ( slopeX < 0 ? 128 : 0 ); + // one->position.vy = (y >> 12) - ( slopeZ < 0 ? 64 : 0 ) ; + } else { + one->position.vy = two->max.vy - one->max.vy; + } + } one->velocity.vy = 0; two->velocity.vy = 0; + //~ FntPrint("col: %d %d %d %d\nY: %d, Z: %d, X: %d\nSlope: %d", o, a, aa, ab, one->position.vy, one->position.vz, one->position.vx, slopeX); } } + return colInt; }; void applyAngMom(LEVEL curLvl ){ if (curLvl.propPtr->isRound){ diff --git a/src/psx.c b/src/psx.c index 52139b2..dbf086e 100644 --- a/src/psx.c +++ b/src/psx.c @@ -1,5 +1,5 @@ -#include "../include/psx.h" -#include "../include/sound.h" +#include +#include void setDCLightEnv(MATRIX * curLevelCMat, MATRIX * curLevelLgtMat, SVECTOR * curLevelLgtAng){ diff --git a/src/sound.c b/src/sound.c index 9348367..916bee6 100644 --- a/src/sound.c +++ b/src/sound.c @@ -1,5 +1,5 @@ -#include "../include/sound.h" -#include "../include/space.h" +#include +#include // VAG playback void initSnd(SpuCommonAttr * spuSettings, char * spu_malloc_rec, u_int mallocMax){ diff --git a/src/space.c b/src/space.c index cc98881..bcf1b9c 100644 --- a/src/space.c +++ b/src/space.c @@ -1,4 +1,4 @@ -#include "../include/space.h" +#include // From 'psyq/addons/graphics/ZIMEN/CLIP.C' void worldToScreen( VECTOR * worldPos, VECTOR * screenPos ) { diff --git a/thirdparty/nugget b/thirdparty/nugget index 6483f1e..a6e3be1 160000 --- a/thirdparty/nugget +++ b/thirdparty/nugget @@ -1 +1 @@ -Subproject commit 6483f1e13b5c89932500129548e8aa8f2a026f25 +Subproject commit a6e3be17bac082d789dfcc9e3b767128f560c28f