diff --git a/custom_types.h b/custom_types.h index 1641bb1..4fca6c3 100644 --- a/custom_types.h +++ b/custom_types.h @@ -16,67 +16,67 @@ struct NODE; struct QUAD; typedef struct BODY { - VECTOR gForce; - VECTOR position; - SVECTOR velocity; - int mass; - int invMass; - VECTOR min; - VECTOR max; - int restitution; - } BODY; + VECTOR gForce; + VECTOR position; + SVECTOR velocity; + int mass; + int invMass; + VECTOR min; + VECTOR max; + int restitution; + } BODY; typedef struct VANIM { - int nframes; // number of frames e.g 20 - int nvert; // number of vertices e.g 21 - int cursor; // anim cursor - int lerpCursor; // anim cursor - int dir; // playback direction (1 or -1) - int interpolate; // use lerp to interpolate keyframes - SVECTOR data[]; // vertex pos as SVECTORs e.g 20 * 21 SVECTORS - } VANIM; + int nframes; // number of frames e.g 20 + int nvert; // number of vertices e.g 21 + int cursor; // anim cursor + int lerpCursor; // anim cursor + int dir; // playback direction (1 or -1) + int interpolate; // use lerp to interpolate keyframes + SVECTOR data[]; // vertex pos as SVECTORs e.g 20 * 21 SVECTORS + } VANIM; typedef struct PRIM { - VECTOR order; - int code; // Same as POL3/POL4 codes : Code (F3 = 1, FT3 = 2, G3 = 3, + VECTOR order; + int code; // Same as POL3/POL4 codes : Code (F3 = 1, FT3 = 2, G3 = 3, // GT3 = 4) Code (F4 = 5, FT4 = 6, G4 = 7, GT4 = 8) - } PRIM; + } PRIM; -typedef struct MESH { - int totalVerts; - TMESH * tmesh; - PRIM * index; - TIM_IMAGE * tim; - unsigned long * tim_data; - MATRIX mat; - VECTOR pos; - SVECTOR rot; - short isRigidBody; - short isStaticBody; - short isRound; - short isPrism; - short isAnim; - short isActor; - short isLevel; - short isBG; - short isSprite; - long p; - long OTz; - BODY * body; - VANIM * anim; - struct NODE * node; - VECTOR pos2D; - } MESH; +typedef struct MESH { + int totalVerts; + TMESH * tmesh; + PRIM * index; + TIM_IMAGE * tim; + unsigned long * tim_data; + MATRIX mat; + VECTOR pos; + SVECTOR rot; + short isRigidBody; + short isStaticBody; + short isRound; + short isPrism; + short isAnim; + short isActor; + short isLevel; + short isBG; + short isSprite; + long p; + long OTz; + BODY * body; + VANIM * anim; + struct NODE * node; + VECTOR pos2D; + } MESH; typedef struct QUAD { - VECTOR v0, v1; - VECTOR v2, v3; - } QUAD; + VECTOR v0, v1; + VECTOR v2, v3; + } QUAD; typedef struct CAMPOS { - VECTOR pos; - SVECTOR rot; - } CAMPOS; + VECTOR pos; + SVECTOR rot; + } CAMPOS; // Blender cam ~= PSX cam with these settings : @@ -86,49 +86,48 @@ typedef struct CAMPOS { // Lower values mean wider angle typedef struct CAMANGLE { - CAMPOS * campos; - TIM_IMAGE * BGtim; - unsigned long * tim_data; - QUAD bw, fw; - int index; - MESH * objects[]; - } CAMANGLE; + CAMPOS * campos; + TIM_IMAGE * BGtim; + unsigned long * tim_data; + QUAD bw, fw; + int index; + MESH * objects[]; + } CAMANGLE; typedef struct CAMPATH { - short len, cursor, pos; - VECTOR points[]; - } CAMPATH; + short len, cursor, pos; + VECTOR points[]; + } CAMPATH; typedef struct SIBLINGS { - int index; - struct NODE * list[]; - } SIBLINGS ; + int index; + struct NODE * list[]; + } SIBLINGS ; typedef struct CHILDREN { - int index; - MESH * list[]; - } CHILDREN ; + int index; + MESH * list[]; + } CHILDREN ; typedef struct NODE { - MESH * plane; - SIBLINGS * siblings; - CHILDREN * objects; - CHILDREN * rigidbodies; - } NODE; + MESH * plane; + SIBLINGS * siblings; + CHILDREN * objects; + CHILDREN * rigidbodies; + } NODE; typedef struct LEVEL { - CVECTOR * BGc; - VECTOR * BKc; - MATRIX * cmat; - MATRIX * lgtmat; - MESH ** meshes; - int * meshes_length; - MESH * actorPtr; - MESH * levelPtr; - MESH * propPtr; - CAMANGLE * camPtr; - CAMPATH * camPath; - CAMANGLE ** camAngles; - NODE * curNode; - MESH * meshPlan; // This one is temporary - } LEVEL; + CVECTOR * BGc; + VECTOR * BKc; + MATRIX * cmat; + MATRIX * lgtmat; + MESH ** meshes; + int * meshes_length; + MESH * actorPtr; + MESH * levelPtr; + MESH * propPtr; + CAMANGLE * camPtr; + CAMPATH * camPath; + CAMANGLE ** camAngles; + NODE * curNode; + } LEVEL; diff --git a/levels/level0.c b/levels/level0.c index 4c82e43..048ac14 100644 --- a/levels/level0.c +++ b/levels/level0.c @@ -5,1057 +5,977 @@ CVECTOR level0_BGc = { 92, 218, 216, 0 }; VECTOR level0_BKc = { 88, 4, 0, 0 }; CAMPOS level0_camPos_Camera = { - { -770,459,623 }, - { 301,531,0 } + { -770,459,623 }, + { 301,531,0 } }; CAMPATH level0_camPath = { - 0, - 0, - 0 + 0, + 0, + 0 }; MATRIX level0_lgtmat = { - -2486, 3254, -22, - 0,0,0, - 0,0,0, + -2486, 3254, -22, + 0,0,0, + 0,0,0, - }; + }; MATRIX level0_cmat = { - 4096,0,0, - 4096,0,0, - 4096,0,0 - }; + 4096,0,0, + 4096,0,0, + 4096,0,0 + }; SVECTOR level0_modelCube_mesh[] = { - { -32,32,32 }, - { 32,32,32 }, - { 32,32,-33 }, - { -33,32,-32 }, - { -32,-32,33 }, - { 33,-32,32 }, - { 32,-32,-33 }, - { -33,-32,-32 } + { -32,32,32 }, + { 32,32,32 }, + { 32,32,-33 }, + { -33,32,-32 }, + { -32,-32,33 }, + { 33,-32,32 }, + { 32,-32,-33 }, + { -33,-32,-32 } }; SVECTOR level0_modelCube_normal[] = { - 2365,-2365,-2365, 0, - -2365,-2365,-2365, 0, - -2365,-2365,2365, 0, - 2365,-2365,2365, 0, - 2365,2365,-2365, 0, - -2365,2365,-2365, 0, - -2365,2365,2365, 0, - 2365,2365,2365, 0 + 2365,-2365,-2365, 0, + -2365,-2365,-2365, 0, + -2365,-2365,2365, 0, + 2365,-2365,2365, 0, + 2365,2365,-2365, 0, + -2365,2365,-2365, 0, + -2365,2365,2365, 0, + 2365,2365,2365, 0 }; CVECTOR level0_modelCube_color[] = { - 255,236,0, 0, - 255,237,0, 0, - 255,237,0, 0, - 255,235,0, 0, - 255,8,0, 0, - 255,2,0, 0, - 255,6,2, 0, - 254,3,0, 0, - 229,0,255, 0, - 229,0,255, 0, - 232,21,232, 0, - 229,0,255, 0, - 0,12,255, 0, - 5,16,250, 0, - 2,13,253, 0, - 0,12,255, 0, - 0,255,26, 0, - 4,251,25, 0, - 0,255,26, 0, - 0,255,26, 0, - 0,248,255, 0, - 0,248,255, 0, - 0,248,255, 0, - 0,248,255, 0 + 255,236,0, 0, + 255,237,0, 0, + 255,237,0, 0, + 255,235,0, 0, + 255,8,0, 0, + 255,2,0, 0, + 255,6,2, 0, + 254,3,0, 0, + 229,0,255, 0, + 229,0,255, 0, + 232,21,232, 0, + 229,0,255, 0, + 0,12,255, 0, + 5,16,250, 0, + 2,13,253, 0, + 0,12,255, 0, + 0,255,26, 0, + 4,251,25, 0, + 0,255,26, 0, + 0,255,26, 0, + 0,248,255, 0, + 0,248,255, 0, + 0,248,255, 0, + 0,248,255, 0 }; PRIM level0_modelCube_index[] = { - 0,1,2,3,8, - 4,7,6,5,8, - 0,4,5,1,8, - 1,5,6,2,8, - 2,6,7,3,8, - 4,0,3,7,8 + 0,1,2,3,8, + 4,7,6,5,8, + 0,4,5,1,8, + 1,5,6,2,8, + 2,6,7,3,8, + 4,0,3,7,8 }; BODY level0_modelCube_body = { - {0, 0, 0, 0}, - 0,-236,23, 0, - 0,-1024,0, 0, - 1, - ONE/1, - -33,-32,-33, 0, - 33,32,33, 0, - 0, - }; + {0, 0, 0, 0}, + 0,-236,23, 0, + 0,-1024,0, 0, + 1, + ONE/1, + -33,-32,-33, 0, + 33,32,33, 0, + 0, + }; TMESH level0_modelCube = { - level0_modelCube_mesh, - level0_modelCube_normal, - 0, - level0_modelCube_color, - 6 + level0_modelCube_mesh, + level0_modelCube_normal, + 0, + level0_modelCube_color, + 6 }; MESH level0_meshCube = { - 24, - &level0_modelCube, - level0_modelCube_index, - 0, - 0, - {0}, - {0,-236,23, 0}, - {0,-1024,0, 0}, - 1, // isRigidBody - 0, // isStaticBody - 0, // isRound - 0, // isPrism - 0, // isAnim - 1, // isActor - 0, // isLevel - 0, // isBG - 0,// isSprite - 0, - 0, - &level0_modelCube_body, - 0, - 0, - 0 + 24, + &level0_modelCube, + level0_modelCube_index, + 0, + 0, + {0}, + {0,-236,23, 0}, + {0,-1024,0, 0}, + 1, // isRigidBody + 0, // isStaticBody + 0, // isRound + 0, // isPrism + 0, // isAnim + 1, // isActor + 0, // isLevel + 0, // isBG + 0,// isSprite + 0, + 0, + &level0_modelCube_body, + 0, + 0, + 0, }; SVECTOR level0_modelPlane_mesh[] = { - { -520,0,-520 }, - { 520,0,-520 }, - { -520,0,520 }, - { 520,0,520 }, - { -520,0,312 }, - { -520,0,104 }, - { -520,0,-104 }, - { -520,0,-312 }, - { -312,0,-520 }, - { -104,0,-520 }, - { 104,0,-520 }, - { 312,0,-520 }, - { 520,0,-312 }, - { 520,0,-104 }, - { 520,0,104 }, - { 520,0,312 }, - { 312,0,520 }, - { 104,0,520 }, - { -104,0,520 }, - { -312,0,520 }, - { -312,0,-312 }, - { -312,0,-104 }, - { -312,0,104 }, - { -312,0,312 }, - { -104,0,-312 }, - { -104,0,-104 }, - { -104,0,104 }, - { -104,0,312 }, - { 104,0,-312 }, - { 104,0,-104 }, - { 104,0,104 }, - { 104,0,312 }, - { 312,0,-312 }, - { 312,0,-104 }, - { 312,0,104 }, - { 312,0,312 }, - { -520,0,-416 }, - { 416,0,-520 }, - { 520,0,416 }, - { -416,0,520 }, - { -520,0,416 }, - { -520,0,208 }, - { -520,0,0 }, - { -520,0,-208 }, - { -416,0,-520 }, - { -208,0,-520 }, - { 0,0,-520 }, - { 208,0,-520 }, - { 520,0,-416 }, - { 520,0,-208 }, - { 520,0,0 }, - { 520,0,208 }, - { 416,0,520 }, - { 208,0,520 }, - { 0,0,520 }, - { -208,0,520 }, - { -312,0,416 }, - { -312,0,-416 }, - { -312,0,-208 }, - { -312,0,0 }, - { -312,0,208 }, - { -104,0,416 }, - { -104,0,-416 }, - { -104,0,-208 }, - { -104,0,0 }, - { -104,0,208 }, - { 104,0,416 }, - { 104,0,-416 }, - { 104,0,-208 }, - { 104,0,0 }, - { 104,0,208 }, - { 312,0,416 }, - { 312,0,-416 }, - { 312,0,-208 }, - { 312,0,0 }, - { 312,0,208 }, - { -416,0,-312 }, - { -416,0,-104 }, - { -416,0,104 }, - { -416,0,312 }, - { -208,0,-312 }, - { -208,0,-104 }, - { -208,0,104 }, - { -208,0,312 }, - { 0,0,-312 }, - { 0,0,-104 }, - { 0,0,104 }, - { 0,0,312 }, - { 208,0,-312 }, - { 208,0,-104 }, - { 208,0,104 }, - { 208,0,312 }, - { 416,0,-312 }, - { 416,0,-104 }, - { 416,0,104 }, - { 416,0,312 }, - { 416,0,208 }, - { 416,0,0 }, - { 416,0,-208 }, - { 416,0,-416 }, - { 208,0,208 }, - { 208,0,0 }, - { 208,0,-208 }, - { 208,0,-416 }, - { 0,0,208 }, - { 0,0,0 }, - { 0,0,-208 }, - { 0,0,-416 }, - { -208,0,208 }, - { -208,0,0 }, - { -208,0,-208 }, - { -208,0,-416 }, - { -416,0,208 }, - { -416,0,0 }, - { -416,0,-208 }, - { -416,0,-416 }, - { 208,0,416 }, - { 0,0,416 }, - { -208,0,416 }, - { -416,0,416 }, - { 416,0,416 } + { -520,0,-520 }, + { 520,0,-520 }, + { -520,0,520 }, + { 520,0,520 }, + { -520,0,312 }, + { -520,0,104 }, + { -520,0,-104 }, + { -520,0,-312 }, + { -312,0,-520 }, + { -104,0,-520 }, + { 104,0,-520 }, + { 312,0,-520 }, + { 520,0,-312 }, + { 520,0,-104 }, + { 520,0,104 }, + { 520,0,312 }, + { 312,0,520 }, + { 104,0,520 }, + { -104,0,520 }, + { -312,0,520 }, + { -312,0,-312 }, + { -312,0,-104 }, + { -312,0,104 }, + { -312,0,312 }, + { -104,0,-312 }, + { -104,0,-104 }, + { -104,0,104 }, + { -104,0,312 }, + { 104,0,-312 }, + { 104,0,-104 }, + { 104,0,104 }, + { 104,0,312 }, + { 312,0,-312 }, + { 312,0,-104 }, + { 312,0,104 }, + { 312,0,312 }, + { -520,0,-416 }, + { 416,0,-520 }, + { 520,0,416 }, + { -416,0,520 }, + { -520,0,416 }, + { -520,0,208 }, + { -520,0,0 }, + { -520,0,-208 }, + { -416,0,-520 }, + { -208,0,-520 }, + { 0,0,-520 }, + { 208,0,-520 }, + { 520,0,-416 }, + { 520,0,-208 }, + { 520,0,0 }, + { 520,0,208 }, + { 416,0,520 }, + { 208,0,520 }, + { 0,0,520 }, + { -208,0,520 }, + { -312,0,416 }, + { -312,0,-416 }, + { -312,0,-208 }, + { -312,0,0 }, + { -312,0,208 }, + { -104,0,416 }, + { -104,0,-416 }, + { -104,0,-208 }, + { -104,0,0 }, + { -104,0,208 }, + { 104,0,416 }, + { 104,0,-416 }, + { 104,0,-208 }, + { 104,0,0 }, + { 104,0,208 }, + { 312,0,416 }, + { 312,0,-416 }, + { 312,0,-208 }, + { 312,0,0 }, + { 312,0,208 }, + { -416,0,-312 }, + { -416,0,-104 }, + { -416,0,104 }, + { -416,0,312 }, + { -208,0,-312 }, + { -208,0,-104 }, + { -208,0,104 }, + { -208,0,312 }, + { 0,0,-312 }, + { 0,0,-104 }, + { 0,0,104 }, + { 0,0,312 }, + { 208,0,-312 }, + { 208,0,-104 }, + { 208,0,104 }, + { 208,0,312 }, + { 416,0,-312 }, + { 416,0,-104 }, + { 416,0,104 }, + { 416,0,312 }, + { 416,0,208 }, + { 416,0,0 }, + { 416,0,-208 }, + { 416,0,-416 }, + { 208,0,208 }, + { 208,0,0 }, + { 208,0,-208 }, + { 208,0,-416 }, + { 0,0,208 }, + { 0,0,0 }, + { 0,0,-208 }, + { 0,0,-416 }, + { -208,0,208 }, + { -208,0,0 }, + { -208,0,-208 }, + { -208,0,-416 }, + { -416,0,208 }, + { -416,0,0 }, + { -416,0,-208 }, + { -416,0,-416 }, + { 208,0,416 }, + { 0,0,416 }, + { -208,0,416 }, + { -416,0,416 }, + { 416,0,416 } }; SVECTOR level0_modelPlane_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 }; CVECTOR level0_modelPlane_color[] = { - 0,8,255, 0, - 0,8,255, 0, - 243,255,0, 0, - 240,252,3, 0, - 0,8,255, 0, - 0,8,255, 0, - 243,255,0, 0, - 240,252,3, 0, - 0,14,255, 0, - 0,9,255, 0, - 225,236,19, 0, - 243,255,0, 0, - 0,8,255, 0, - 0,8,255, 0, - 226,238,18, 0, - 225,237,19, 0, - 0,10,255, 0, - 0,8,255, 0, - 223,235,20, 0, - 243,255,0, 0, - 0,255,248, 0, - 0,255,248, 0, - 0,8,255, 0, - 0,8,255, 0, - 251,1,14, 0, - 250,0,14, 0, - 76,6,181, 0, - 78,6,181, 0, - 255,0,227, 0, - 255,0,227, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,255,6, 0, - 0,255,6, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,255,248, 0, - 0,255,248, 0, - 0,13,255, 0, - 0,8,255, 0, - 251,1,13, 0, - 251,1,13, 0, - 75,5,182, 0, - 77,5,180, 0, - 255,0,227, 0, - 255,0,227, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,255,6, 0, - 0,255,6, 0, - 0,8,255, 0, - 0,12,255, 0, - 0,255,248, 0, - 0,255,248, 0, - 0,8,255, 0, - 0,16,255, 0, - 254,0,11, 0, - 254,0,11, 0, - 0,8,255, 0, - 4,9,251, 0, - 255,0,227, 0, - 255,0,227, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,255,6, 0, - 0,255,6, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,255,248, 0, - 0,255,248, 0, - 0,8,255, 0, - 0,8,255, 0, - 255,0,10, 0, - 255,0,10, 0, - 0,8,255, 0, - 0,8,255, 0, - 255,0,227, 0, - 255,0,227, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,255,6, 0, - 0,255,6, 0, - 0,8,255, 0, - 0,9,255, 0, - 0,255,248, 0, - 0,255,248, 0, - 0,12,255, 0, - 0,8,255, 0, - 255,0,10, 0, - 255,0,10, 0, - 0,9,255, 0, - 0,8,255, 0, - 255,0,227, 0, - 255,0,227, 0, - 0,9,255, 0, - 0,8,255, 0, - 0,255,6, 0, - 0,255,6, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,255,6, 0, - 0,255,6, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,255,6, 0, - 0,255,6, 0, - 0,8,255, 0, - 0,9,255, 0, - 0,255,6, 0, - 0,255,6, 0, - 255,0,227, 0, - 255,0,227, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 255,0,227, 0, - 255,0,227, 0, - 0,8,255, 0, - 0,9,255, 0, - 255,0,227, 0, - 255,0,227, 0, - 255,0,10, 0, - 255,0,10, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 255,0,10, 0, - 255,0,10, 0, - 0,8,255, 0, - 0,12,255, 0, - 255,0,10, 0, - 255,0,10, 0, - 0,255,248, 0, - 0,255,248, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,255,248, 0, - 0,255,248, 0, - 0,8,255, 0, - 0,27,255, 0, - 0,255,248, 0, - 0,255,248, 0, - 0,255,6, 0, - 0,255,6, 0, - 0,9,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,255,6, 0, - 0,255,6, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,255,6, 0, - 0,255,6, 0, - 255,0,227, 0, - 255,0,227, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 255,0,227, 0, - 255,0,227, 0, - 0,8,255, 0, - 0,8,255, 0, - 255,0,227, 0, - 255,0,227, 0, - 254,0,11, 0, - 255,0,10, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 255,0,10, 0, - 254,0,11, 0, - 0,8,255, 0, - 0,8,255, 0, - 255,0,10, 0, - 255,0,10, 0, - 0,255,248, 0, - 0,255,248, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,10,255, 0, - 0,8,255, 0, - 0,255,248, 0, - 0,255,248, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,255,248, 0, - 0,255,248, 0, - 0,255,6, 0, - 0,255,6, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,255,6, 0, - 0,255,6, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,255,6, 0, - 0,255,6, 0, - 255,0,227, 0, - 255,0,227, 0, - 0,8,255, 0, - 0,8,255, 0, - 75,5,182, 0, - 4,9,251, 0, - 255,0,227, 0, - 255,0,227, 0, - 4,9,251, 0, - 0,8,255, 0, - 255,0,227, 0, - 255,0,227, 0, - 251,1,13, 0, - 254,0,11, 0, - 4,9,251, 0, - 75,5,182, 0, - 0,13,255, 0, - 0,16,255, 0, - 254,0,11, 0, - 251,1,13, 0, - 0,16,255, 0, - 0,8,255, 0, - 254,0,11, 0, - 254,0,11, 0, - 0,255,248, 0, - 0,255,248, 0, - 0,16,255, 0, - 0,13,255, 0, - 0,31,255, 0, - 0,31,255, 0, - 0,255,248, 0, - 0,255,248, 0, - 0,31,255, 0, - 0,10,255, 0, - 0,255,248, 0, - 0,255,248, 0, - 0,255,6, 0, - 0,255,6, 0, - 0,12,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,255,6, 0, - 0,255,6, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,255,6, 0, - 0,255,6, 0, - 255,0,227, 0, - 255,0,227, 0, - 0,8,255, 0, - 0,8,255, 0, - 76,6,181, 0, - 77,5,180, 0, - 255,0,227, 0, - 255,0,227, 0, - 77,5,180, 0, - 75,5,182, 0, - 255,0,227, 0, - 255,0,227, 0, - 250,0,14, 0, - 251,1,13, 0, - 77,5,180, 0, - 76,6,181, 0, - 0,8,255, 0, - 0,8,255, 0, - 251,1,13, 0, - 250,0,14, 0, - 0,8,255, 0, - 0,13,255, 0, - 251,1,13, 0, - 251,1,13, 0, - 0,255,248, 0, - 0,255,248, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,9,255, 0, - 0,12,255, 0, - 0,255,248, 0, - 0,255,248, 0, - 0,12,255, 0, - 0,31,255, 0, - 0,255,248, 0, - 0,255,248, 0, - 0,255,6, 0, - 0,255,6, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,255,6, 0, - 0,255,6, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,255,6, 0, - 0,255,6, 0, - 255,0,227, 0, - 255,0,227, 0, - 0,8,255, 0, - 0,8,255, 0, - 74,5,184, 0, - 78,6,181, 0, - 255,0,227, 0, - 255,0,227, 0, - 78,6,181, 0, - 76,6,181, 0, - 255,0,227, 0, - 255,0,227, 0, - 238,1,26, 0, - 251,1,14, 0, - 78,6,181, 0, - 74,5,184, 0, - 0,8,255, 0, - 0,8,255, 0, - 251,1,14, 0, - 238,1,26, 0, - 0,8,255, 0, - 0,8,255, 0, - 250,0,14, 0, - 251,1,14, 0, - 0,255,248, 0, - 0,255,248, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,25,255, 0, - 0,17,255, 0, - 0,255,248, 0, - 0,255,248, 0, - 0,17,255, 0, - 0,9,255, 0, - 0,255,248, 0, - 0,255,248, 0, - 0,8,255, 0, - 0,10,255, 0, - 243,255,0, 0, - 226,238,18, 0, - 0,8,255, 0, - 0,9,255, 0, - 0,10,255, 0, - 0,8,255, 0, - 0,9,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,10,255, 0, - 0,9,255, 0, - 0,8,255, 0, - 225,237,19, 0, - 225,236,19, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,9,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,14,255, 0, - 243,255,0, 0, - 243,255,0, 0, - 0,8,255, 0, - 0,12,255, 0, - 0,14,255, 0, - 0,8,255, 0, - 0,12,255, 0, - 0,8,255, 0, - 0,9,255, 0, - 0,14,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 240,252,3, 0, - 243,255,0, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 240,252,3, 0, - 223,235,20, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0, - 0,8,255, 0 + 0,8,255, 0, + 0,8,255, 0, + 243,255,0, 0, + 240,252,3, 0, + 0,8,255, 0, + 0,8,255, 0, + 243,255,0, 0, + 240,252,3, 0, + 0,14,255, 0, + 0,9,255, 0, + 225,236,19, 0, + 243,255,0, 0, + 0,8,255, 0, + 0,8,255, 0, + 226,238,18, 0, + 225,237,19, 0, + 0,10,255, 0, + 0,8,255, 0, + 223,235,20, 0, + 243,255,0, 0, + 0,255,248, 0, + 0,255,248, 0, + 0,8,255, 0, + 0,8,255, 0, + 251,1,14, 0, + 250,0,14, 0, + 76,6,181, 0, + 78,6,181, 0, + 255,0,227, 0, + 255,0,227, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,255,6, 0, + 0,255,6, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,255,248, 0, + 0,255,248, 0, + 0,13,255, 0, + 0,8,255, 0, + 251,1,13, 0, + 251,1,13, 0, + 75,5,182, 0, + 77,5,180, 0, + 255,0,227, 0, + 255,0,227, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,255,6, 0, + 0,255,6, 0, + 0,8,255, 0, + 0,12,255, 0, + 0,255,248, 0, + 0,255,248, 0, + 0,8,255, 0, + 0,16,255, 0, + 254,0,11, 0, + 254,0,11, 0, + 0,8,255, 0, + 4,9,251, 0, + 255,0,227, 0, + 255,0,227, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,255,6, 0, + 0,255,6, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,255,248, 0, + 0,255,248, 0, + 0,8,255, 0, + 0,8,255, 0, + 255,0,10, 0, + 255,0,10, 0, + 0,8,255, 0, + 0,8,255, 0, + 255,0,227, 0, + 255,0,227, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,255,6, 0, + 0,255,6, 0, + 0,8,255, 0, + 0,9,255, 0, + 0,255,248, 0, + 0,255,248, 0, + 0,12,255, 0, + 0,8,255, 0, + 255,0,10, 0, + 255,0,10, 0, + 0,9,255, 0, + 0,8,255, 0, + 255,0,227, 0, + 255,0,227, 0, + 0,9,255, 0, + 0,8,255, 0, + 0,255,6, 0, + 0,255,6, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,255,6, 0, + 0,255,6, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,255,6, 0, + 0,255,6, 0, + 0,8,255, 0, + 0,9,255, 0, + 0,255,6, 0, + 0,255,6, 0, + 255,0,227, 0, + 255,0,227, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 255,0,227, 0, + 255,0,227, 0, + 0,8,255, 0, + 0,9,255, 0, + 255,0,227, 0, + 255,0,227, 0, + 255,0,10, 0, + 255,0,10, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 255,0,10, 0, + 255,0,10, 0, + 0,8,255, 0, + 0,12,255, 0, + 255,0,10, 0, + 255,0,10, 0, + 0,255,248, 0, + 0,255,248, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,255,248, 0, + 0,255,248, 0, + 0,8,255, 0, + 0,27,255, 0, + 0,255,248, 0, + 0,255,248, 0, + 0,255,6, 0, + 0,255,6, 0, + 0,9,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,255,6, 0, + 0,255,6, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,255,6, 0, + 0,255,6, 0, + 255,0,227, 0, + 255,0,227, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 255,0,227, 0, + 255,0,227, 0, + 0,8,255, 0, + 0,8,255, 0, + 255,0,227, 0, + 255,0,227, 0, + 254,0,11, 0, + 255,0,10, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 255,0,10, 0, + 254,0,11, 0, + 0,8,255, 0, + 0,8,255, 0, + 255,0,10, 0, + 255,0,10, 0, + 0,255,248, 0, + 0,255,248, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,10,255, 0, + 0,8,255, 0, + 0,255,248, 0, + 0,255,248, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,255,248, 0, + 0,255,248, 0, + 0,255,6, 0, + 0,255,6, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,255,6, 0, + 0,255,6, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,255,6, 0, + 0,255,6, 0, + 255,0,227, 0, + 255,0,227, 0, + 0,8,255, 0, + 0,8,255, 0, + 75,5,182, 0, + 4,9,251, 0, + 255,0,227, 0, + 255,0,227, 0, + 4,9,251, 0, + 0,8,255, 0, + 255,0,227, 0, + 255,0,227, 0, + 251,1,13, 0, + 254,0,11, 0, + 4,9,251, 0, + 75,5,182, 0, + 0,13,255, 0, + 0,16,255, 0, + 254,0,11, 0, + 251,1,13, 0, + 0,16,255, 0, + 0,8,255, 0, + 254,0,11, 0, + 254,0,11, 0, + 0,255,248, 0, + 0,255,248, 0, + 0,16,255, 0, + 0,13,255, 0, + 0,31,255, 0, + 0,31,255, 0, + 0,255,248, 0, + 0,255,248, 0, + 0,31,255, 0, + 0,10,255, 0, + 0,255,248, 0, + 0,255,248, 0, + 0,255,6, 0, + 0,255,6, 0, + 0,12,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,255,6, 0, + 0,255,6, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,255,6, 0, + 0,255,6, 0, + 255,0,227, 0, + 255,0,227, 0, + 0,8,255, 0, + 0,8,255, 0, + 76,6,181, 0, + 77,5,180, 0, + 255,0,227, 0, + 255,0,227, 0, + 77,5,180, 0, + 75,5,182, 0, + 255,0,227, 0, + 255,0,227, 0, + 250,0,14, 0, + 251,1,13, 0, + 77,5,180, 0, + 76,6,181, 0, + 0,8,255, 0, + 0,8,255, 0, + 251,1,13, 0, + 250,0,14, 0, + 0,8,255, 0, + 0,13,255, 0, + 251,1,13, 0, + 251,1,13, 0, + 0,255,248, 0, + 0,255,248, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,9,255, 0, + 0,12,255, 0, + 0,255,248, 0, + 0,255,248, 0, + 0,12,255, 0, + 0,31,255, 0, + 0,255,248, 0, + 0,255,248, 0, + 0,255,6, 0, + 0,255,6, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,255,6, 0, + 0,255,6, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,255,6, 0, + 0,255,6, 0, + 255,0,227, 0, + 255,0,227, 0, + 0,8,255, 0, + 0,8,255, 0, + 74,5,184, 0, + 78,6,181, 0, + 255,0,227, 0, + 255,0,227, 0, + 78,6,181, 0, + 76,6,181, 0, + 255,0,227, 0, + 255,0,227, 0, + 238,1,26, 0, + 251,1,14, 0, + 78,6,181, 0, + 74,5,184, 0, + 0,8,255, 0, + 0,8,255, 0, + 251,1,14, 0, + 238,1,26, 0, + 0,8,255, 0, + 0,8,255, 0, + 250,0,14, 0, + 251,1,14, 0, + 0,255,248, 0, + 0,255,248, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,25,255, 0, + 0,17,255, 0, + 0,255,248, 0, + 0,255,248, 0, + 0,17,255, 0, + 0,9,255, 0, + 0,255,248, 0, + 0,255,248, 0, + 0,8,255, 0, + 0,10,255, 0, + 243,255,0, 0, + 226,238,18, 0, + 0,8,255, 0, + 0,9,255, 0, + 0,10,255, 0, + 0,8,255, 0, + 0,9,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,10,255, 0, + 0,9,255, 0, + 0,8,255, 0, + 225,237,19, 0, + 225,236,19, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,9,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,14,255, 0, + 243,255,0, 0, + 243,255,0, 0, + 0,8,255, 0, + 0,12,255, 0, + 0,14,255, 0, + 0,8,255, 0, + 0,12,255, 0, + 0,8,255, 0, + 0,9,255, 0, + 0,14,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 240,252,3, 0, + 243,255,0, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 240,252,3, 0, + 223,235,20, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0, + 0,8,255, 0 }; PRIM level0_modelPlane_index[] = { - 120,38,3,52,8, - 119,56,19,39,8, - 118,61,18,55,8, - 117,66,17,54,8, - 116,71,16,53,8, - 115,57,20,76,8, - 114,58,21,77,8, - 113,59,22,78,8, - 112,60,23,79,8, - 111,62,24,80,8, - 110,63,25,81,8, - 109,64,26,82,8, - 108,65,27,83,8, - 107,67,28,84,8, - 106,68,29,85,8, - 105,69,30,86,8, - 104,70,31,87,8, - 103,72,32,88,8, - 102,73,33,89,8, - 101,74,34,90,8, - 100,75,35,91,8, - 99,48,12,92,8, - 98,49,13,93,8, - 97,50,14,94,8, - 96,51,15,95,8, - 75,96,95,35,8, - 34,94,96,75,8, - 94,14,51,96,8, - 74,97,94,34,8, - 33,93,97,74,8, - 93,13,50,97,8, - 73,98,93,33,8, - 32,92,98,73,8, - 92,12,49,98,8, - 72,99,92,32,8, - 11,37,99,72,8, - 37,1,48,99,8, - 70,100,91,31,8, - 30,90,100,70,8, - 90,34,75,100,8, - 69,101,90,30,8, - 29,89,101,69,8, - 89,33,74,101,8, - 68,102,89,29,8, - 28,88,102,68,8, - 88,32,73,102,8, - 67,103,88,28,8, - 10,47,103,67,8, - 47,11,72,103,8, - 65,104,87,27,8, - 26,86,104,65,8, - 86,30,70,104,8, - 64,105,86,26,8, - 25,85,105,64,8, - 85,29,69,105,8, - 63,106,85,25,8, - 24,84,106,63,8, - 84,28,68,106,8, - 62,107,84,24,8, - 9,46,107,62,8, - 46,10,67,107,8, - 60,108,83,23,8, - 22,82,108,60,8, - 82,26,65,108,8, - 59,109,82,22,8, - 21,81,109,59,8, - 81,25,64,109,8, - 58,110,81,21,8, - 20,80,110,58,8, - 80,24,63,110,8, - 57,111,80,20,8, - 8,45,111,57,8, - 45,9,62,111,8, - 41,112,79,4,8, - 5,78,112,41,8, - 78,22,60,112,8, - 42,113,78,5,8, - 6,77,113,42,8, - 77,21,59,113,8, - 43,114,77,6,8, - 7,76,114,43,8, - 76,20,58,114,8, - 36,115,76,7,8, - 0,44,115,36,8, - 44,8,57,115,8, - 66,116,53,17,8, - 31,91,116,66,8, - 91,35,71,116,8, - 61,117,54,18,8, - 27,87,117,61,8, - 87,31,66,117,8, - 56,118,55,19,8, - 23,83,118,56,8, - 83,27,61,118,8, - 40,119,39,2,8, - 4,79,119,40,8, - 79,23,56,119,8, - 71,120,52,16,8, - 35,95,120,71,8, - 95,15,38,120,8 + 120,38,3,52,8, + 119,56,19,39,8, + 118,61,18,55,8, + 117,66,17,54,8, + 116,71,16,53,8, + 115,57,20,76,8, + 114,58,21,77,8, + 113,59,22,78,8, + 112,60,23,79,8, + 111,62,24,80,8, + 110,63,25,81,8, + 109,64,26,82,8, + 108,65,27,83,8, + 107,67,28,84,8, + 106,68,29,85,8, + 105,69,30,86,8, + 104,70,31,87,8, + 103,72,32,88,8, + 102,73,33,89,8, + 101,74,34,90,8, + 100,75,35,91,8, + 99,48,12,92,8, + 98,49,13,93,8, + 97,50,14,94,8, + 96,51,15,95,8, + 75,96,95,35,8, + 34,94,96,75,8, + 94,14,51,96,8, + 74,97,94,34,8, + 33,93,97,74,8, + 93,13,50,97,8, + 73,98,93,33,8, + 32,92,98,73,8, + 92,12,49,98,8, + 72,99,92,32,8, + 11,37,99,72,8, + 37,1,48,99,8, + 70,100,91,31,8, + 30,90,100,70,8, + 90,34,75,100,8, + 69,101,90,30,8, + 29,89,101,69,8, + 89,33,74,101,8, + 68,102,89,29,8, + 28,88,102,68,8, + 88,32,73,102,8, + 67,103,88,28,8, + 10,47,103,67,8, + 47,11,72,103,8, + 65,104,87,27,8, + 26,86,104,65,8, + 86,30,70,104,8, + 64,105,86,26,8, + 25,85,105,64,8, + 85,29,69,105,8, + 63,106,85,25,8, + 24,84,106,63,8, + 84,28,68,106,8, + 62,107,84,24,8, + 9,46,107,62,8, + 46,10,67,107,8, + 60,108,83,23,8, + 22,82,108,60,8, + 82,26,65,108,8, + 59,109,82,22,8, + 21,81,109,59,8, + 81,25,64,109,8, + 58,110,81,21,8, + 20,80,110,58,8, + 80,24,63,110,8, + 57,111,80,20,8, + 8,45,111,57,8, + 45,9,62,111,8, + 41,112,79,4,8, + 5,78,112,41,8, + 78,22,60,112,8, + 42,113,78,5,8, + 6,77,113,42,8, + 77,21,59,113,8, + 43,114,77,6,8, + 7,76,114,43,8, + 76,20,58,114,8, + 36,115,76,7,8, + 0,44,115,36,8, + 44,8,57,115,8, + 66,116,53,17,8, + 31,91,116,66,8, + 91,35,71,116,8, + 61,117,54,18,8, + 27,87,117,61,8, + 87,31,66,117,8, + 56,118,55,19,8, + 23,83,118,56,8, + 83,27,61,118,8, + 40,119,39,2,8, + 4,79,119,40,8, + 79,23,56,119,8, + 71,120,52,16,8, + 35,95,120,71,8, + 95,15,38,120,8 }; BODY level0_modelPlane_body = { - {0, 0, 0, 0}, - 0,0,0, 0, - 0,0,0, 0, - 1, - ONE/1, - -520,0,-520, 0, - 520,0,520, 0, - 0, - }; + {0, 0, 0, 0}, + 0,0,0, 0, + 0,0,0, 0, + 1, + ONE/1, + -520,0,-520, 0, + 520,0,520, 0, + 0, + }; TMESH level0_modelPlane = { - level0_modelPlane_mesh, - level0_modelPlane_normal, - 0, - level0_modelPlane_color, - 100 -}; - -SVECTOR level0_modelPlan_mesh[] = { - { -45,36,-3 }, - { 48,36,-3 }, - { -45,2,2 }, - { 48,2,2 } -}; - -SVECTOR level0_modelPlan_normal[] = { - 0,638,4046, 0, - 0,638,4046, 0, - 0,638,4046, 0, - 0,638,4046, 0 -}; - -SVECTOR level0_modelPlan_uv[] = { - 64,155, 0, 0, - 129,155, 0, 0, - 129,130, 0, 0, - 64,130, 0, 0 -}; - -CVECTOR level0_modelPlan_color[] = { - 80, 80, 80, 0, - 128, 128, 128, 0, - 128, 128, 128, 0 -}; - -PRIM level0_modelPlan_index[] = { - 0,1,3,2,8 -}; - -BODY level0_modelPlan_body = { - {0, 0, 0, 0}, - -40,-40,194, 0, - 0,0,0, 0, - 1, - ONE/1, - -45,2,-3, 0, - 48,36,2, 0, - 0, - }; - -TMESH level0_modelPlan = { - level0_modelPlan_mesh, - level0_modelPlan_normal, - level0_modelPlan_uv, - level0_modelPlan_color, - 1 -}; - -extern unsigned long _binary_TIM_home_tim_start[]; - -TIM_IMAGE level0_tim_home; - -MESH level0_meshPlan = { - 4, - &level0_modelPlan, - level0_modelPlan_index, - &level0_tim_home, - _binary_TIM_home_tim_start, - {0}, - {-40,-40,194, 0}, - {0,0,0}, - 0, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 0, - 0, - &level0_modelPlan_body, - 0, - 0, - 0 + level0_modelPlane_mesh, + level0_modelPlane_normal, + 0, + level0_modelPlane_color, + 100 }; MESH level0_meshPlane = { - 400, - &level0_modelPlane, - level0_modelPlane_index, - 0, - 0, - {0}, - {0,0,0, 0}, - {0,0,0, 0}, - 0, // isRigidBody - 0, // isStaticBody - 0, // isRound - 0, // isPrism - 0, // isAnim - 0, // isActor - 1, // isLevel - 0, // isBG - 0,// isSprite - 0, - 0, - &level0_modelPlane_body, - 0, - 0, - 0 + 400, + &level0_modelPlane, + level0_modelPlane_index, + 0, + 0, + {0}, + {0,0,0, 0}, + {0,0,0, 0}, + 0, // isRigidBody + 0, // isStaticBody + 0, // isRound + 0, // isPrism + 0, // isAnim + 0, // isActor + 1, // isLevel + 0, // isBG + 0,// isSprite + 0, + 0, + &level0_modelPlane_body, + 0, + 0, + 0, }; MESH * level0_meshes[2] = { - &level0_meshCube, - &level0_meshPlane + &level0_meshCube, + &level0_meshPlane }; int level0_meshes_length = 2; CAMANGLE level0_camAngle_Camera = { - &level0_camPos_Camera, - 0, - 0, - { 0 }, - { 0 }, - 0, - 0 + &level0_camPos_Camera, + 0, + 0, + { 0 }, + { 0 }, + 0, + 0 }; CAMANGLE * level0_camAngles[0] = { }; SIBLINGS level0_nodePlane_siblings = { - 0, - { - 0 - } + 0, + { + 0 + } }; CHILDREN level0_nodePlane_objects = { - 0, - { - 0 - } + 0, + { + 0 + } }; CHILDREN level0_nodePlane_rigidbodies = { - 1, - { - &level0_meshCube - } + 1, + { + &level0_meshCube + } }; NODE level0_nodePlane = { - &level0_meshPlane, - &level0_nodePlane_siblings, - &level0_nodePlane_objects, - &level0_nodePlane_rigidbodies + &level0_meshPlane, + &level0_nodePlane_siblings, + &level0_nodePlane_objects, + &level0_nodePlane_rigidbodies }; MESH * level0_actorPtr = &level0_meshCube; @@ -1067,18 +987,18 @@ CAMANGLE * level0_camPtr = &level0_camAngle_Camera; NODE * level0_curNode = &level0_nodePlane; LEVEL level0 = { - &level0_BGc, - &level0_BKc, - &level0_cmat, - &level0_lgtmat, - (MESH **)&level0_meshes, - &level0_meshes_length, - &level0_meshCube, - &level0_meshPlane, - &level0_meshCube, - &level0_camAngle_Camera, - &level0_camPath, - (CAMANGLE **)&level0_camAngles, - &level0_nodePlane, - &level0_meshPlan + &level0_BGc, + &level0_BKc, + &level0_cmat, + &level0_lgtmat, + (MESH **)&level0_meshes, + &level0_meshes_length, + &level0_meshCube, + &level0_meshPlane, + &level0_meshCube, + &level0_camAngle_Camera, + &level0_camPath, + (CAMANGLE **)&level0_camAngles, + &level0_nodePlane, }; + diff --git a/levels/level0.h b/levels/level0.h index 3abc1c3..7c545ac 100644 --- a/levels/level0.h +++ b/levels/level0.h @@ -72,16 +72,3 @@ extern NODE * level0_curNode; extern NODE level0_nodePlane; -extern SVECTOR level0_modelPlan_normal[]; - -extern SVECTOR level0_modelPlan_uv[]; - -extern CVECTOR level0_modelPlan_color[]; - -extern PRIM level0_modelPlan_index[]; - -extern BODY level0_modelPlan_body; - -extern TMESH level0_modelPlan; - -extern MESH level0_meshPlan; diff --git a/levels/level1.c b/levels/level1.c index 902bbce..b2747c1 100644 --- a/levels/level1.c +++ b/levels/level1.c @@ -11022,6 +11022,5 @@ LEVEL level1 = { &level1_camAngle_camPath_001, &level1_camPath, (CAMANGLE **)&level1_camAngles, - &level1_nodegnd_002, - &level1_meshPlan + &level1_nodegnd_002 }; diff --git a/src/graphics.c b/src/graphics.c index 5fb6f1b..a95d651 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -311,7 +311,14 @@ long drawQuad(MESH * mesh, long * Flag, int atime, int * camMode, char ** nextpr ); } } else { - // No animation + // Mesh is sprite + if (mesh->isSprite){ + // Find inverse rotation matrix so that sprite always faces camera + MATRIX rot, invRot; + ReadRotMatrix(&rot); + TransposeMatrix(&rot, &invRot); + SetMulRotMatrix(&invRot); + } // Use regular vertex coords nclip = RotAverageNclip4( &mesh->tmesh->v[ mesh->index[t].order.pad ], @@ -334,6 +341,7 @@ long drawQuad(MESH * mesh, long * Flag, int atime, int * camMode, char ** nextpr ); } if (mesh->isSprite){ + // Turn off shading on sprite SetShadeTex( poly4, 1 ); } // Transparency effect @@ -381,6 +389,13 @@ long drawTri(MESH * mesh, long * Flag, int atime, int * camMode, char ** nextpri } } else { // No animation + if (mesh->isSprite){ + // Find inverse rotation matrix so that sprite always faces camera + MATRIX rot, invRot; + ReadRotMatrix(&rot); + TransposeMatrix(&rot, &invRot); + SetMulRotMatrix(&invRot); + } // Use model's regular vertex coordinates nclip = RotAverageNclip3( &mesh->tmesh->v[ mesh->index[t].order.vx ], diff --git a/src/main.c b/src/main.c index 9f10de1..93291c4 100644 --- a/src/main.c +++ b/src/main.c @@ -87,8 +87,6 @@ int meshes_length = 0; NODE curNode = {0}; CAMPATH camPath = {0}; CAMANGLE camPtr = {0}, camAngles[] = {0}; -MESH meshPlan = {0}; -VECTOR modelPlan_pos = {0}; LEVEL curLvl = { &BGc, &BKc, @@ -102,8 +100,7 @@ LEVEL curLvl = { &camPtr, &camPath, (CAMANGLE **)&camAngles, - &curNode, - &meshPlan + &curNode }; LEVEL * loadLvl; // Pad @@ -229,22 +226,7 @@ int main() { // using atantable (faster) camAngleToAct.vy = (patan(-posToActor.vx, -posToActor.vz) / 16) - 3076 ; camAngleToAct.vx = patan(dist, posToActor.vy) >> 4; - // Sprite system WIP - objAngleToCam.vy = patan( posToCam.vx,posToCam.vz ); - objAngleToCam.vx = patan( posToCam.vx,posToCam.vy ); - //~ objAngleToCam.vz = patan( posToCam.vz,posToCam.vy ); - //~ objAngleToCam.vx = patan( psqrt(posToCam.vx * posToCam.vx + posToCam.vy * posToCam.vy), posToCam.vy ); - //~ curLvl.meshPlan.rot->vx = -( (objAngleToCam.vx >> 4) - 3076 ) ; - //~ curLvl.meshPlan.rot->vx = (( (objAngleToCam.vx >> 4) - 3076 ) * ( (objAngleToCam.vz >> 4) - 3076 ) >> 12) * (nsin(posToCam.vz) >> 10 < 0 ? -1 : 1); - //~ curLvl.meshPlan.rot->vx = ( (objAngleToCam.vx >> 4) - 3076 ) * ( (objAngleToCam.vz >> 4) - 3076 ) >> 12 ; - curLvl.meshPlan->rot.vy = -( (objAngleToCam.vy >> 4) + 1024 ) ; - //~ posToCam = getVectorTo(*curLvl.meshPlan.pos, camera.pos); - //~ posToCam = getVectorTo(camera.pos, *curLvl.meshPlan.pos); - posToCam.vx = -camera.pos.vx - curLvl.meshPlan->pos.vx ; - posToCam.vz = -camera.pos.vz - curLvl.meshPlan->pos.vz ; - posToCam.vy = -camera.pos.vy - curLvl.meshPlan->pos.vy ; - //~ psqrt(posToCam.vx * posToCam.vx + posToCam.vy * posToCam.vy); - // Actor Forward vector for 3d relative orientation + // Find Actor's forward vector fVecActor = curLvl.actorPtr->pos; fVecActor.vx = curLvl.actorPtr->pos.vx + (nsin(curLvl.actorPtr->rot.vy/2)); fVecActor.vz = curLvl.actorPtr->pos.vz - (ncos(curLvl.actorPtr->rot.vy/2)); @@ -264,20 +246,10 @@ int main() { camera.pos.vx = -(camera.x/ONE); camera.pos.vy = -(camera.y/ONE); camera.pos.vz = -(camera.z/ONE); - //~ InvCamPos.vx = camera.x/ONE; - //~ InvCamPos.vz = camera.z/ONE; - //~ applyVector(&InvCamPos, -1,-1,-1, *=); angle.vy = -(curLvl.actorPtr->rot.vy / 2) + angleCam.vy; - //~ angle.vx += 10; - //~ FntPrint("cos %d", (ncos(angle.vy) * ncos(angle.vx)) >> 12); - //~ angle = curLvl.actorPtr->rot->vy; // Camera horizontal position getCameraZY(&camera.z, &camera.y, curLvl.actorPtr->pos.vz, curLvl.actorPtr->pos.vy, angle.vx, dist); getCameraXZ(&camera.x, &camera.z, curLvl.actorPtr->pos.vx, curLvl.actorPtr->pos.vz, angle.vy, dist); - //~ getCameraXZY(&camera.x, &camera.z, &camera.y, curLvl.actorPtr->pos.vx, curLvl.actorPtr->pos.vz, curLvl.actorPtr->pos.vy, angle.vy, angle.vx, dist); - //~ void getCameraXZY(int * x, int * z, int * y, int actorX, int actorZ, int actorY, int angle, int angleX, int distance) { - // Camera vertical position - //~ getCameraXZ(&camera.x, &camera.y, curLvl.actorPtr->pos.vx, curLvl.actorPtr->pos.vy, angle, dist); // FIXME! camera lerping to pos //~ angle += lerp(camera.rot.vy, -curLvl.actorPtr->rot->vy, 128); //~ angle = lerpD(camera.rot.vy << 12, curLvl.actorPtr->rot->vy << 12, 1024 << 12) >> 12; @@ -289,9 +261,7 @@ int main() { //~ camera.pos.vy = -(camera.y/ONE); camera.pos.vy = 100; camera.pos.vz = -(camera.z/ONE); - //~ fVecActor = *curLvl.actorPtr->pos; - //~ fVecActor.vx = curLvl.actorPtr->pos->vx + (nsin(curLvl.actorPtr->rot->vy)); - //~ fVecActor.vz = curLvl.actorPtr->pos->vz - (ncos(curLvl.actorPtr->rot->vy)); + getCameraXZ(&camera.x, &camera.z, curLvl.actorPtr->pos.vx, curLvl.actorPtr->pos.vz, angle.vy, dist); angle.vy += 10; } @@ -309,10 +279,6 @@ int main() { if (curLvl.camPtr->tim_data){ checkLineW( &curLvl.camAngles[ curCamAngle ]->fw.v3, &curLvl.camAngles[ curCamAngle ]->fw.v2, curLvl.actorPtr); if ( curLvl.camAngles[ curCamAngle ]->fw.v0.vx ) { - //~ FntPrint("BL x : %d, y : %d\n", camAngles[ curCamAngle ]->fw.v3.vx, camAngles[ curCamAngle ]->fw.v3.vy); - //~ FntPrint("BR x : %d, y : %d\n", camAngles[ curCamAngle ]->fw.v2.vx, camAngles[ curCamAngle ]->fw.v2.vy); - //~ FntPrint("Pos : %d\n", checkLineW( &camAngles[ curCamAngle ]->fw.v3, &camAngles[ curCamAngle ]->fw.v2, curLvl.actorPtr) ); - //~ FntPrint("Pos : %d\n", checkLineW( &camAngles[ curCamAngle ]->bw.v2, &camAngles[ curCamAngle ]->bw.v3, curLvl.actorPtr) ); // If actor in camAngle->fw area of screen if ( checkLineW( &curLvl.camAngles[ curCamAngle ]->fw.v3, &curLvl.camAngles[ curCamAngle ]->fw.v2, curLvl.actorPtr) == -1 && ( checkLineW( &curLvl.camAngles[ curCamAngle ]->bw.v2, &curLvl.camAngles[ curCamAngle ]->bw.v3, curLvl.actorPtr) >= 0 @@ -326,9 +292,6 @@ int main() { } } if ( curLvl.camAngles[ curCamAngle ]->bw.v0.vx ) { - //~ FntPrint("BL x : %d, y : %d\n", camAngles[ curCamAngle ]->bw.v3.vx, camAngles[ curCamAngle ]->bw.v3.vy); - //~ FntPrint("BR x : %d, y : %d\n", camAngles[ curCamAngle ]->bw.v2.vx, camAngles[ curCamAngle ]->bw.v2.vy); - //~ // FntPrint("Pos : %d\n", checkLineW( &camAngles[ curCamAngle ]->bw.v2, &camAngles[ curCamAngle ]->bw.v3, curLvl.actorPtr) ); // If actor in camAngle->bw area of screen if ( checkLineW( &curLvl.camAngles[ curCamAngle ]->fw.v3, &curLvl.camAngles[ curCamAngle ]->fw.v2, curLvl.actorPtr) >= 0 && checkLineW( &curLvl.camAngles[ curCamAngle ]->bw.v2, &curLvl.camAngles[ curCamAngle ]->bw.v3, curLvl.actorPtr) == -1 @@ -365,10 +328,6 @@ int main() { camera.pos.vx = lerpD(curLvl.camPath->points[curLvl.camPath->cursor].vx << precision, curLvl.camPath->points[curLvl.camPath->cursor+1].vx << precision, curLvl.camPath->pos << precision) >> precision; camera.pos.vy = lerpD(curLvl.camPath->points[curLvl.camPath->cursor].vy << precision, curLvl.camPath->points[curLvl.camPath->cursor+1].vy << precision, curLvl.camPath->pos << precision) >> precision; camera.pos.vz = lerpD(curLvl.camPath->points[curLvl.camPath->cursor].vz << precision, curLvl.camPath->points[curLvl.camPath->cursor+1].vz << precision, curLvl.camPath->pos << precision) >> precision; - //~ FntPrint("Cam %d, %d\n", (int32_t)curLvl.camPath->points[curLvl.camPath->cursor].vx, curLvl.camPath->points[curLvl.camPath->cursor+1].vx); - //~ FntPrint("Cam %d, %d, %d\n", camera.pos.vx, camera.pos.vy, camera.pos.vz); - //~ FntPrint("Theta y: %d x: %d\n", theta.vy, theta.vx); - //~ FntPrint("Pos: %d Cur: %d\nTheta y: %d x: %d\n", curLvl.camPath->pos, curLvl.camPath->cursor, theta.vy, theta.vx); // Linearly increment the lerp factor curLvl.camPath->pos += 20; // If camera has reached next key pos, reset pos index, move cursor to next key pos @@ -409,7 +368,6 @@ int main() { camera.pos.vx = lerpD(curLvl.camPath->points[curLvl.camPath->cursor].vx << precision, curLvl.camPath->points[curLvl.camPath->cursor + 1].vx << precision, curLvl.camPath->pos << precision) >> precision; camera.pos.vy = lerpD(curLvl.camPath->points[curLvl.camPath->cursor].vy << precision, curLvl.camPath->points[curLvl.camPath->cursor + 1].vy << precision, curLvl.camPath->pos << precision) >> precision; camera.pos.vz = lerpD(curLvl.camPath->points[curLvl.camPath->cursor].vz << precision, curLvl.camPath->points[curLvl.camPath->cursor + 1].vz << precision, curLvl.camPath->pos << precision) >> precision; - //~ FntPrint("%d %d %d %d\n", camAngleToAct.vy, camera.pos.vx, camera.rot.vy, dist); // Ony move cam if position is between first curLvl.camPath->vx and last curLvl.camPath->vx if ( camAngleToAct.vy < -50 && camera.pos.vx > curLvl.camPath->points[curLvl.camPath->len - 1].vx ) { // Clamp curLvl.camPath position to cameraSpeed @@ -449,14 +407,6 @@ int main() { curLvl.levelPtr = curLvl.curNode->plane; } } - // DONTNEED ? - // Moveable prop - //~ if ( !getIntCollision( *propPtr->body , *curLvl.curNode->siblings->list[msh]->plane->body).vx && - //~ !getIntCollision( *propPtr->body , *curLvl.curNode->siblings->list[msh]->plane->body).vz ) { - //~ if ( propPtr->node != curLvl.curNode->siblings->list[ msh ]){ - //~ propPtr->node = curLvl.curNode->siblings->list[ msh ]; - //~ } - //~ } if ( !getIntCollision( *curLvl.propPtr->body , *curLvl.curNode->plane->body).vx && !getIntCollision( *curLvl.propPtr->body , *curLvl.curNode->plane->body).vz ) { curLvl.propPtr->node = curLvl.curNode; @@ -528,7 +478,6 @@ int main() { enlightMesh(&curLvl, curLvl.camAngles[curCamAngle]->objects[mesh], &lgtang); transformMesh(&camera, curLvl.camAngles[curCamAngle]->objects[mesh]); drawPoly(curLvl.camAngles[curCamAngle]->objects[mesh], &Flag, atime, &camMode, &nextpri, ot[db], &db, &draw[db]); - // int * camMode, char ** nextpri, u_long * ot, char * db, DRAWENV * draw) } } else { @@ -578,14 +527,8 @@ int main() { FntPrint("Time : %d dt :%d", timeS, dt); //~ FntPrint("%d\n", curCamAngle ); //~ FntPrint("%x\n", primbuff[db]); - //~ FntPrint("Actor : %d %d\n", curLvl.actorPtr->pos->vx, curLvl.actorPtr->pos->vy); - //~ FntPrint("%d %d\n", curLvl.actorPtr->pos->vx, curLvl.actorPtr->pos->vz); - //~ FntPrint("%d %d\n", curLvl.actorPtr->pos2D.vx + CENTERX, curLvl.actorPtr->pos2D.vy + CENTERY); - //~ FntPrint(" %d %d %d\n", wp.vx, wp.vy, wp.vz); FntFlush(-1); display( &disp[db], &draw[db], otdisc[db], primbuff[db], &nextpri, &db); - //~ display(disp, draw, otdisc[db], primbuff[db], nextpri, db); - //~ frame = VSync(-1); } return 0; } @@ -594,8 +537,6 @@ void callback() { read_controller( &theControllers[0], &controllers[0].pad[0], 0 ); // Read controllers // Pad 2 read_controller( &theControllers[1], &controllers[1].pad[0], 1 ); - //~ u_short pad = PadRead(0); - //~ u_short pad = 0; u_char PADL = ~theControllers[0].button1; u_char PADR = ~theControllers[0].button2; static u_short lastPad; @@ -604,7 +545,6 @@ void callback() { static int lerpValues[4096 >> 7]; static short cursor = 0; static short angleCamTimer = 0; - //~ static short curCamAngle = 0; if( !lerpValues[0] ) { for ( long long i = 0; i < div ; i++ ){ lerpValues[(div-1)-i] = lerp(-24, -264, easeIn(i)); @@ -738,10 +678,10 @@ void callback() { } if ( PADL & PadSelect && !timer ) { //~ if (!levelHasChanged){ - //~ #ifndef USECD - printf("load:%p:%08x:%s", &load_all_overlays_here, &level, overlayFile); + #ifndef USECD + printf("load:%p:%08x:%s", &load_all_overlays_here, &level, overlayFile); //~ PCload( &load_all_overlays_here, &levelHasChanged, overlayFile ); - //~ #endif + #endif #ifdef USECD level = !level; //~ levelHasChanged = 1; @@ -776,8 +716,7 @@ void callback() { angleCam.vy += lerp( angleCam.vy, 0, 64 ) == 0 ? 1 : lerp( angleCam.vy, 0, 64 ); } } - //~ FntPrint("level :%d", level); - //~ FntPrint("angleCam :%d %d\n", angleCam.vy, lerp( angleCam.vy, 0, 64) ); + // Print controller infos //~ FntPrint( "Pad 1 : %02x\nButtons:%02x %02x, Stick:%02d %02d %02d %02d\n", //~ theControllers[0].type, // Controller type : 0x00 == none, 0x41 == standard, 0x73 == analog/dualshock, 0x12 == mouse, 0x23 == steering wheel, 0x63 == gun, 0x53 == analog joystick //~ theControllers[0].button1, //