diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1285b2c --- /dev/null +++ b/Makefile @@ -0,0 +1,42 @@ +TARGET = psx-demo +TYPE = ps-exe + +SRCS = psx-demo.c \ +../common/crt0/crt0.s \ +TIM/home.tim \ +TIM/cat.tim \ +TIM/lara.tim \ +TIM/bg_camPath.tim \ +TIM/bg_camPath_001.tim \ +TIM/bg_camPath_002.tim \ +TIM/bg_camPath_003.tim \ +TIM/bg_camPath_004.tim \ +TIM/bg_camPath_005.tim \ + +CPPFLAGS += -I../psyq/include +LDFLAGS += -L../psyq/lib +LDFLAGS += -Wl,--start-group +LDFLAGS += -lapi +LDFLAGS += -lc +LDFLAGS += -lc2 +LDFLAGS += -lcard +LDFLAGS += -lcomb +LDFLAGS += -lds +LDFLAGS += -letc +LDFLAGS += -lgpu +LDFLAGS += -lgs +LDFLAGS += -lgte +LDFLAGS += -lgun +LDFLAGS += -lhmd +LDFLAGS += -lmath +LDFLAGS += -lmcrd +LDFLAGS += -lmcx +LDFLAGS += -lpad +LDFLAGS += -lpress +LDFLAGS += -lsio +LDFLAGS += -lsnd +LDFLAGS += -lspu +LDFLAGS += -ltap +LDFLAGS += -Wl,--end-group + +include ../common.mk \ diff --git a/README.md b/README.md index 40d5017..9a55fe1 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,40 @@ ![Pic or it didn't happen](blender-psx.jpg) -# blender_io_export_psx_tmesh +# Blender PSX Level export Blender <= 2.79c plugin to export gouraud shaded, UV textured PSX meshes in a scene to a C file. -![3d scene](scene.gif) +![3d scene](gif/3d.gif) +![3d scene](gif/precalc.gif) +![3d scene](gif/push.gif) +![3d scene](gif/sprite.gif) +![3d scene](gif/vertexanim.gif) + +## Features + +**Be warned this is WIP** ! + +### Plugin + + * Export UV textured models + * Export vertex painted models + * Export camera positions for in game use + * Export vertex animations + * Export up to 3 light sources + * Export pre-rendered backgrounds for in-game use (8bpp and 4bpp) + +### "Engine" + + * Very basic physics / collision detection + * Constrained camera trajectory + * Orbital camera mode + * Basic Spatial partitioning + * Portal based camera angle switch + +## Planned + + * Fix and improve all the things ! + * Wall collisions Specifically, it generates a C file containing for each mesh in the scene: @@ -28,16 +58,28 @@ A few usefull stuff for manipulating the mesh : For easy access to those, a MESH struct is defined as : ```c -typedef struct { +typedef struct MESH { TMESH * tmesh; - int * index; + PRIM * index; TIM_IMAGE * tim; - u_long * tim_data; + unsigned long * tim_data; MATRIX * mat; VECTOR * pos; SVECTOR * rot; + short * isRigidBody; + short * isStaticBody; 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; ``` @@ -58,7 +100,7 @@ typedef struct { # Install the plugin -Put the `io_export_psx_tmesh.py` file in the addons folder of blender 2.79 : +Just `git clone` this repo in the addons folder of blender 2.79 : On Linux, that's : @@ -100,3 +142,7 @@ You can use [img2tim](https://github.com/Lameguy64/img2tim) to convert your blen Based on the [code](https://pastebin.com/suU9DigB) provided by TheDukeOfZill, 04-2014, on http://www.psxdev.net/forum/viewtopic.php?f=64&t=537#p4088 PSX code based on [example](http://psx.arthus.net/code/primdraw.7z) by [Lameguy64](https://github.com/Lameguy64) + +pngquant : [https://github.com/kornelski/pngquant](https://github.com/kornelski/pngquant) + +img2tim : [https://github.com/Lameguy64/img2tim](https://github.com/Lameguy64/img2tim) diff --git a/TIM/bg_camPath.png b/TIM/bg_camPath.png new file mode 100644 index 0000000..9d6e868 Binary files /dev/null and b/TIM/bg_camPath.png differ diff --git a/TIM/bg_camPath.tim b/TIM/bg_camPath.tim new file mode 100644 index 0000000..138c49b Binary files /dev/null and b/TIM/bg_camPath.tim differ diff --git a/TIM/bg_camPath_001.png b/TIM/bg_camPath_001.png new file mode 100644 index 0000000..45ea08f Binary files /dev/null and b/TIM/bg_camPath_001.png differ diff --git a/TIM/bg_camPath_001.tim b/TIM/bg_camPath_001.tim new file mode 100644 index 0000000..32eb8e6 Binary files /dev/null and b/TIM/bg_camPath_001.tim differ diff --git a/TIM/bg_camPath_002.png b/TIM/bg_camPath_002.png new file mode 100644 index 0000000..d0f07ba Binary files /dev/null and b/TIM/bg_camPath_002.png differ diff --git a/TIM/bg_camPath_002.tim b/TIM/bg_camPath_002.tim new file mode 100644 index 0000000..34e0e2a Binary files /dev/null and b/TIM/bg_camPath_002.tim differ diff --git a/TIM/bg_camPath_003.png b/TIM/bg_camPath_003.png new file mode 100644 index 0000000..fb0843f Binary files /dev/null and b/TIM/bg_camPath_003.png differ diff --git a/TIM/bg_camPath_003.tim b/TIM/bg_camPath_003.tim new file mode 100644 index 0000000..d5625ee Binary files /dev/null and b/TIM/bg_camPath_003.tim differ diff --git a/TIM/bg_camPath_004.png b/TIM/bg_camPath_004.png new file mode 100644 index 0000000..bb8e44f Binary files /dev/null and b/TIM/bg_camPath_004.png differ diff --git a/TIM/bg_camPath_004.tim b/TIM/bg_camPath_004.tim new file mode 100644 index 0000000..c2f309c Binary files /dev/null and b/TIM/bg_camPath_004.tim differ diff --git a/TIM/bg_camPath_005.png b/TIM/bg_camPath_005.png new file mode 100644 index 0000000..cc9894f Binary files /dev/null and b/TIM/bg_camPath_005.png differ diff --git a/TIM/bg_camPath_005.tim b/TIM/bg_camPath_005.tim new file mode 100644 index 0000000..51b563e Binary files /dev/null and b/TIM/bg_camPath_005.tim differ diff --git a/TIM/cat.png b/TIM/cat.png new file mode 100644 index 0000000..fb799d1 Binary files /dev/null and b/TIM/cat.png differ diff --git a/TIM/cat.tim b/TIM/cat.tim new file mode 100644 index 0000000..105ac81 Binary files /dev/null and b/TIM/cat.tim differ diff --git a/TIM/home.png b/TIM/home.png new file mode 100644 index 0000000..2b126ea Binary files /dev/null and b/TIM/home.png differ diff --git a/TIM/home.tim b/TIM/home.tim new file mode 100644 index 0000000..476542c Binary files /dev/null and b/TIM/home.tim differ diff --git a/TIM/lara.png b/TIM/lara.png new file mode 100644 index 0000000..d875295 Binary files /dev/null and b/TIM/lara.png differ diff --git a/TIM/lara.tim b/TIM/lara.tim new file mode 100644 index 0000000..69e8ab5 Binary files /dev/null and b/TIM/lara.tim differ diff --git a/atan.c b/atan.c new file mode 100644 index 0000000..014c2b2 --- /dev/null +++ b/atan.c @@ -0,0 +1,272 @@ +// Arctan base table +static int AtanBaseTable[8] = { + 0x0000, + -0x4000, + -0xFFFF, + 0xC000, + -0x8000, + 0x4000, + 0x8000, + -0xC000, +}; + +// Arctan angle table +static short AtanAngleTable[0x802] = { + 0x0000, 0x0005, 0x000A, 0x000F, 0x0014, 0x0019, 0x001F, 0x0024, + 0x0029, 0x002E, 0x0033, 0x0038, 0x003D, 0x0042, 0x0047, 0x004C, + 0x0051, 0x0057, 0x005C, 0x0061, 0x0066, 0x006B, 0x0070, 0x0075, + 0x007A, 0x007F, 0x0084, 0x008A, 0x008F, 0x0094, 0x0099, 0x009E, + 0x00A3, 0x00A8, 0x00AD, 0x00B2, 0x00B7, 0x00BC, 0x00C2, 0x00C7, + 0x00CC, 0x00D1, 0x00D6, 0x00DB, 0x00E0, 0x00E5, 0x00EA, 0x00EF, + 0x00F4, 0x00FA, 0x00FF, 0x0104, 0x0109, 0x010E, 0x0113, 0x0118, + 0x011D, 0x0122, 0x0127, 0x012C, 0x0131, 0x0137, 0x013C, 0x0141, + 0x0146, 0x014B, 0x0150, 0x0155, 0x015A, 0x015F, 0x0164, 0x0169, + 0x016F, 0x0174, 0x0179, 0x017E, 0x0183, 0x0188, 0x018D, 0x0192, + 0x0197, 0x019C, 0x01A1, 0x01A6, 0x01AC, 0x01B1, 0x01B6, 0x01BB, + 0x01C0, 0x01C5, 0x01CA, 0x01CF, 0x01D4, 0x01D9, 0x01DE, 0x01E3, + 0x01E9, 0x01EE, 0x01F3, 0x01F8, 0x01FD, 0x0202, 0x0207, 0x020C, + 0x0211, 0x0216, 0x021B, 0x0220, 0x0226, 0x022B, 0x0230, 0x0235, + 0x023A, 0x023F, 0x0244, 0x0249, 0x024E, 0x0253, 0x0258, 0x025D, + 0x0262, 0x0268, 0x026D, 0x0272, 0x0277, 0x027C, 0x0281, 0x0286, + 0x028B, 0x0290, 0x0295, 0x029A, 0x029F, 0x02A4, 0x02A9, 0x02AF, + 0x02B4, 0x02B9, 0x02BE, 0x02C3, 0x02C8, 0x02CD, 0x02D2, 0x02D7, + 0x02DC, 0x02E1, 0x02E6, 0x02EB, 0x02F0, 0x02F6, 0x02FB, 0x0300, + 0x0305, 0x030A, 0x030F, 0x0314, 0x0319, 0x031E, 0x0323, 0x0328, + 0x032D, 0x0332, 0x0337, 0x033C, 0x0341, 0x0347, 0x034C, 0x0351, + 0x0356, 0x035B, 0x0360, 0x0365, 0x036A, 0x036F, 0x0374, 0x0379, + 0x037E, 0x0383, 0x0388, 0x038D, 0x0392, 0x0397, 0x039C, 0x03A2, + 0x03A7, 0x03AC, 0x03B1, 0x03B6, 0x03BB, 0x03C0, 0x03C5, 0x03CA, + 0x03CF, 0x03D4, 0x03D9, 0x03DE, 0x03E3, 0x03E8, 0x03ED, 0x03F2, + 0x03F7, 0x03FC, 0x0401, 0x0407, 0x040C, 0x0411, 0x0416, 0x041B, + 0x0420, 0x0425, 0x042A, 0x042F, 0x0434, 0x0439, 0x043E, 0x0443, + 0x0448, 0x044D, 0x0452, 0x0457, 0x045C, 0x0461, 0x0466, 0x046B, + 0x0470, 0x0475, 0x047A, 0x047F, 0x0484, 0x0489, 0x048E, 0x0494, + 0x0499, 0x049E, 0x04A3, 0x04A8, 0x04AD, 0x04B2, 0x04B7, 0x04BC, + 0x04C1, 0x04C6, 0x04CB, 0x04D0, 0x04D5, 0x04DA, 0x04DF, 0x04E4, + 0x04E9, 0x04EE, 0x04F3, 0x04F8, 0x04FD, 0x0502, 0x0507, 0x050C, + 0x0511, 0x0516, 0x051B, 0x0520, 0x0525, 0x052A, 0x052F, 0x0534, + 0x0539, 0x053E, 0x0543, 0x0548, 0x054D, 0x0552, 0x0557, 0x055C, + 0x0561, 0x0566, 0x056B, 0x0570, 0x0575, 0x057A, 0x057F, 0x0584, + 0x0589, 0x058E, 0x0593, 0x0598, 0x059D, 0x05A2, 0x05A7, 0x05AC, + 0x05B1, 0x05B6, 0x05BB, 0x05C0, 0x05C5, 0x05CA, 0x05CF, 0x05D4, + 0x05D9, 0x05DE, 0x05E3, 0x05E8, 0x05ED, 0x05F2, 0x05F7, 0x05FC, + 0x0601, 0x0606, 0x060B, 0x0610, 0x0615, 0x061A, 0x061F, 0x0624, + 0x0629, 0x062E, 0x0633, 0x0638, 0x063D, 0x0642, 0x0647, 0x064C, + 0x0651, 0x0656, 0x065B, 0x0660, 0x0665, 0x066A, 0x066E, 0x0673, + 0x0678, 0x067D, 0x0682, 0x0687, 0x068C, 0x0691, 0x0696, 0x069B, + 0x06A0, 0x06A5, 0x06AA, 0x06AF, 0x06B4, 0x06B9, 0x06BE, 0x06C3, + 0x06C8, 0x06CD, 0x06D2, 0x06D7, 0x06DC, 0x06E1, 0x06E5, 0x06EA, + 0x06EF, 0x06F4, 0x06F9, 0x06FE, 0x0703, 0x0708, 0x070D, 0x0712, + 0x0717, 0x071C, 0x0721, 0x0726, 0x072B, 0x0730, 0x0735, 0x0739, + 0x073E, 0x0743, 0x0748, 0x074D, 0x0752, 0x0757, 0x075C, 0x0761, + 0x0766, 0x076B, 0x0770, 0x0775, 0x077A, 0x077E, 0x0783, 0x0788, + 0x078D, 0x0792, 0x0797, 0x079C, 0x07A1, 0x07A6, 0x07AB, 0x07B0, + 0x07B5, 0x07B9, 0x07BE, 0x07C3, 0x07C8, 0x07CD, 0x07D2, 0x07D7, + 0x07DC, 0x07E1, 0x07E6, 0x07EB, 0x07EF, 0x07F4, 0x07F9, 0x07FE, + 0x0803, 0x0808, 0x080D, 0x0812, 0x0817, 0x081C, 0x0820, 0x0825, + 0x082A, 0x082F, 0x0834, 0x0839, 0x083E, 0x0843, 0x0848, 0x084C, + 0x0851, 0x0856, 0x085B, 0x0860, 0x0865, 0x086A, 0x086F, 0x0873, + 0x0878, 0x087D, 0x0882, 0x0887, 0x088C, 0x0891, 0x0896, 0x089A, + 0x089F, 0x08A4, 0x08A9, 0x08AE, 0x08B3, 0x08B8, 0x08BD, 0x08C1, + 0x08C6, 0x08CB, 0x08D0, 0x08D5, 0x08DA, 0x08DF, 0x08E3, 0x08E8, + 0x08ED, 0x08F2, 0x08F7, 0x08FC, 0x0901, 0x0905, 0x090A, 0x090F, + 0x0914, 0x0919, 0x091E, 0x0922, 0x0927, 0x092C, 0x0931, 0x0936, + 0x093B, 0x093F, 0x0944, 0x0949, 0x094E, 0x0953, 0x0958, 0x095C, + 0x0961, 0x0966, 0x096B, 0x0970, 0x0975, 0x0979, 0x097E, 0x0983, + 0x0988, 0x098D, 0x0992, 0x0996, 0x099B, 0x09A0, 0x09A5, 0x09AA, + 0x09AE, 0x09B3, 0x09B8, 0x09BD, 0x09C2, 0x09C6, 0x09CB, 0x09D0, + 0x09D5, 0x09DA, 0x09DE, 0x09E3, 0x09E8, 0x09ED, 0x09F2, 0x09F6, + 0x09FB, 0x0A00, 0x0A05, 0x0A0A, 0x0A0E, 0x0A13, 0x0A18, 0x0A1D, + 0x0A22, 0x0A26, 0x0A2B, 0x0A30, 0x0A35, 0x0A39, 0x0A3E, 0x0A43, + 0x0A48, 0x0A4D, 0x0A51, 0x0A56, 0x0A5B, 0x0A60, 0x0A64, 0x0A69, + 0x0A6E, 0x0A73, 0x0A77, 0x0A7C, 0x0A81, 0x0A86, 0x0A8B, 0x0A8F, + 0x0A94, 0x0A99, 0x0A9E, 0x0AA2, 0x0AA7, 0x0AAC, 0x0AB1, 0x0AB5, + 0x0ABA, 0x0ABF, 0x0AC4, 0x0AC8, 0x0ACD, 0x0AD2, 0x0AD7, 0x0ADB, + 0x0AE0, 0x0AE5, 0x0AE9, 0x0AEE, 0x0AF3, 0x0AF8, 0x0AFC, 0x0B01, + 0x0B06, 0x0B0B, 0x0B0F, 0x0B14, 0x0B19, 0x0B1E, 0x0B22, 0x0B27, + 0x0B2C, 0x0B30, 0x0B35, 0x0B3A, 0x0B3F, 0x0B43, 0x0B48, 0x0B4D, + 0x0B51, 0x0B56, 0x0B5B, 0x0B60, 0x0B64, 0x0B69, 0x0B6E, 0x0B72, + 0x0B77, 0x0B7C, 0x0B80, 0x0B85, 0x0B8A, 0x0B8F, 0x0B93, 0x0B98, + 0x0B9D, 0x0BA1, 0x0BA6, 0x0BAB, 0x0BAF, 0x0BB4, 0x0BB9, 0x0BBD, + 0x0BC2, 0x0BC7, 0x0BCB, 0x0BD0, 0x0BD5, 0x0BD9, 0x0BDE, 0x0BE3, + 0x0BE7, 0x0BEC, 0x0BF1, 0x0BF5, 0x0BFA, 0x0BFF, 0x0C03, 0x0C08, + 0x0C0D, 0x0C11, 0x0C16, 0x0C1B, 0x0C1F, 0x0C24, 0x0C29, 0x0C2D, + 0x0C32, 0x0C37, 0x0C3B, 0x0C40, 0x0C45, 0x0C49, 0x0C4E, 0x0C53, + 0x0C57, 0x0C5C, 0x0C60, 0x0C65, 0x0C6A, 0x0C6E, 0x0C73, 0x0C78, + 0x0C7C, 0x0C81, 0x0C86, 0x0C8A, 0x0C8F, 0x0C93, 0x0C98, 0x0C9D, + 0x0CA1, 0x0CA6, 0x0CAB, 0x0CAF, 0x0CB4, 0x0CB8, 0x0CBD, 0x0CC2, + 0x0CC6, 0x0CCB, 0x0CCF, 0x0CD4, 0x0CD9, 0x0CDD, 0x0CE2, 0x0CE6, + 0x0CEB, 0x0CF0, 0x0CF4, 0x0CF9, 0x0CFD, 0x0D02, 0x0D07, 0x0D0B, + 0x0D10, 0x0D14, 0x0D19, 0x0D1E, 0x0D22, 0x0D27, 0x0D2B, 0x0D30, + 0x0D34, 0x0D39, 0x0D3E, 0x0D42, 0x0D47, 0x0D4B, 0x0D50, 0x0D54, + 0x0D59, 0x0D5E, 0x0D62, 0x0D67, 0x0D6B, 0x0D70, 0x0D74, 0x0D79, + 0x0D7D, 0x0D82, 0x0D87, 0x0D8B, 0x0D90, 0x0D94, 0x0D99, 0x0D9D, + 0x0DA2, 0x0DA6, 0x0DAB, 0x0DAF, 0x0DB4, 0x0DB9, 0x0DBD, 0x0DC2, + 0x0DC6, 0x0DCB, 0x0DCF, 0x0DD4, 0x0DD8, 0x0DDD, 0x0DE1, 0x0DE6, + 0x0DEA, 0x0DEF, 0x0DF3, 0x0DF8, 0x0DFC, 0x0E01, 0x0E05, 0x0E0A, + 0x0E0F, 0x0E13, 0x0E18, 0x0E1C, 0x0E21, 0x0E25, 0x0E2A, 0x0E2E, + 0x0E33, 0x0E37, 0x0E3C, 0x0E40, 0x0E45, 0x0E49, 0x0E4E, 0x0E52, + 0x0E56, 0x0E5B, 0x0E5F, 0x0E64, 0x0E68, 0x0E6D, 0x0E71, 0x0E76, + 0x0E7A, 0x0E7F, 0x0E83, 0x0E88, 0x0E8C, 0x0E91, 0x0E95, 0x0E9A, + 0x0E9E, 0x0EA3, 0x0EA7, 0x0EAC, 0x0EB0, 0x0EB4, 0x0EB9, 0x0EBD, + 0x0EC2, 0x0EC6, 0x0ECB, 0x0ECF, 0x0ED4, 0x0ED8, 0x0EDC, 0x0EE1, + 0x0EE5, 0x0EEA, 0x0EEE, 0x0EF3, 0x0EF7, 0x0EFC, 0x0F00, 0x0F04, + 0x0F09, 0x0F0D, 0x0F12, 0x0F16, 0x0F1B, 0x0F1F, 0x0F23, 0x0F28, + 0x0F2C, 0x0F31, 0x0F35, 0x0F3A, 0x0F3E, 0x0F42, 0x0F47, 0x0F4B, + 0x0F50, 0x0F54, 0x0F58, 0x0F5D, 0x0F61, 0x0F66, 0x0F6A, 0x0F6E, + 0x0F73, 0x0F77, 0x0F7C, 0x0F80, 0x0F84, 0x0F89, 0x0F8D, 0x0F91, + 0x0F96, 0x0F9A, 0x0F9F, 0x0FA3, 0x0FA7, 0x0FAC, 0x0FB0, 0x0FB5, + 0x0FB9, 0x0FBD, 0x0FC2, 0x0FC6, 0x0FCA, 0x0FCF, 0x0FD3, 0x0FD7, + 0x0FDC, 0x0FE0, 0x0FE5, 0x0FE9, 0x0FED, 0x0FF2, 0x0FF6, 0x0FFA, + 0x0FFF, 0x1003, 0x1007, 0x100C, 0x1010, 0x1014, 0x1019, 0x101D, + 0x1021, 0x1026, 0x102A, 0x102E, 0x1033, 0x1037, 0x103B, 0x1040, + 0x1044, 0x1048, 0x104D, 0x1051, 0x1055, 0x105A, 0x105E, 0x1062, + 0x1067, 0x106B, 0x106F, 0x1073, 0x1078, 0x107C, 0x1080, 0x1085, + 0x1089, 0x108D, 0x1092, 0x1096, 0x109A, 0x109E, 0x10A3, 0x10A7, + 0x10AB, 0x10B0, 0x10B4, 0x10B8, 0x10BC, 0x10C1, 0x10C5, 0x10C9, + 0x10CE, 0x10D2, 0x10D6, 0x10DA, 0x10DF, 0x10E3, 0x10E7, 0x10EB, + 0x10F0, 0x10F4, 0x10F8, 0x10FD, 0x1101, 0x1105, 0x1109, 0x110E, + 0x1112, 0x1116, 0x111A, 0x111F, 0x1123, 0x1127, 0x112B, 0x1130, + 0x1134, 0x1138, 0x113C, 0x1140, 0x1145, 0x1149, 0x114D, 0x1151, + 0x1156, 0x115A, 0x115E, 0x1162, 0x1166, 0x116B, 0x116F, 0x1173, + 0x1177, 0x117C, 0x1180, 0x1184, 0x1188, 0x118C, 0x1191, 0x1195, + 0x1199, 0x119D, 0x11A1, 0x11A6, 0x11AA, 0x11AE, 0x11B2, 0x11B6, + 0x11BB, 0x11BF, 0x11C3, 0x11C7, 0x11CB, 0x11CF, 0x11D4, 0x11D8, + 0x11DC, 0x11E0, 0x11E4, 0x11E9, 0x11ED, 0x11F1, 0x11F5, 0x11F9, + 0x11FD, 0x1202, 0x1206, 0x120A, 0x120E, 0x1212, 0x1216, 0x121A, + 0x121F, 0x1223, 0x1227, 0x122B, 0x122F, 0x1233, 0x1237, 0x123C, + 0x1240, 0x1244, 0x1248, 0x124C, 0x1250, 0x1254, 0x1259, 0x125D, + 0x1261, 0x1265, 0x1269, 0x126D, 0x1271, 0x1275, 0x127A, 0x127E, + 0x1282, 0x1286, 0x128A, 0x128E, 0x1292, 0x1296, 0x129A, 0x129F, + 0x12A3, 0x12A7, 0x12AB, 0x12AF, 0x12B3, 0x12B7, 0x12BB, 0x12BF, + 0x12C3, 0x12C7, 0x12CC, 0x12D0, 0x12D4, 0x12D8, 0x12DC, 0x12E0, + 0x12E4, 0x12E8, 0x12EC, 0x12F0, 0x12F4, 0x12F8, 0x12FC, 0x1301, + 0x1305, 0x1309, 0x130D, 0x1311, 0x1315, 0x1319, 0x131D, 0x1321, + 0x1325, 0x1329, 0x132D, 0x1331, 0x1335, 0x1339, 0x133D, 0x1341, + 0x1345, 0x1349, 0x134D, 0x1351, 0x1355, 0x135A, 0x135E, 0x1362, + 0x1366, 0x136A, 0x136E, 0x1372, 0x1376, 0x137A, 0x137E, 0x1382, + 0x1386, 0x138A, 0x138E, 0x1392, 0x1396, 0x139A, 0x139E, 0x13A2, + 0x13A6, 0x13AA, 0x13AE, 0x13B2, 0x13B6, 0x13BA, 0x13BE, 0x13C2, + 0x13C6, 0x13CA, 0x13CE, 0x13D2, 0x13D6, 0x13DA, 0x13DE, 0x13E2, + 0x13E6, 0x13E9, 0x13ED, 0x13F1, 0x13F5, 0x13F9, 0x13FD, 0x1401, + 0x1405, 0x1409, 0x140D, 0x1411, 0x1415, 0x1419, 0x141D, 0x1421, + 0x1425, 0x1429, 0x142D, 0x1431, 0x1435, 0x1439, 0x143D, 0x1440, + 0x1444, 0x1448, 0x144C, 0x1450, 0x1454, 0x1458, 0x145C, 0x1460, + 0x1464, 0x1468, 0x146C, 0x1470, 0x1473, 0x1477, 0x147B, 0x147F, + 0x1483, 0x1487, 0x148B, 0x148F, 0x1493, 0x1497, 0x149B, 0x149E, + 0x14A2, 0x14A6, 0x14AA, 0x14AE, 0x14B2, 0x14B6, 0x14BA, 0x14BE, + 0x14C1, 0x14C5, 0x14C9, 0x14CD, 0x14D1, 0x14D5, 0x14D9, 0x14DD, + 0x14E0, 0x14E4, 0x14E8, 0x14EC, 0x14F0, 0x14F4, 0x14F8, 0x14FB, + 0x14FF, 0x1503, 0x1507, 0x150B, 0x150F, 0x1513, 0x1516, 0x151A, + 0x151E, 0x1522, 0x1526, 0x152A, 0x152D, 0x1531, 0x1535, 0x1539, + 0x153D, 0x1541, 0x1544, 0x1548, 0x154C, 0x1550, 0x1554, 0x1558, + 0x155B, 0x155F, 0x1563, 0x1567, 0x156B, 0x156E, 0x1572, 0x1576, + 0x157A, 0x157E, 0x1581, 0x1585, 0x1589, 0x158D, 0x1591, 0x1594, + 0x1598, 0x159C, 0x15A0, 0x15A4, 0x15A7, 0x15AB, 0x15AF, 0x15B3, + 0x15B7, 0x15BA, 0x15BE, 0x15C2, 0x15C6, 0x15C9, 0x15CD, 0x15D1, + 0x15D5, 0x15D8, 0x15DC, 0x15E0, 0x15E4, 0x15E8, 0x15EB, 0x15EF, + 0x15F3, 0x15F7, 0x15FA, 0x15FE, 0x1602, 0x1606, 0x1609, 0x160D, + 0x1611, 0x1614, 0x1618, 0x161C, 0x1620, 0x1623, 0x1627, 0x162B, + 0x162F, 0x1632, 0x1636, 0x163A, 0x163E, 0x1641, 0x1645, 0x1649, + 0x164C, 0x1650, 0x1654, 0x1658, 0x165B, 0x165F, 0x1663, 0x1666, + 0x166A, 0x166E, 0x1671, 0x1675, 0x1679, 0x167D, 0x1680, 0x1684, + 0x1688, 0x168B, 0x168F, 0x1693, 0x1696, 0x169A, 0x169E, 0x16A1, + 0x16A5, 0x16A9, 0x16AC, 0x16B0, 0x16B4, 0x16B7, 0x16BB, 0x16BF, + 0x16C2, 0x16C6, 0x16CA, 0x16CD, 0x16D1, 0x16D5, 0x16D8, 0x16DC, + 0x16E0, 0x16E3, 0x16E7, 0x16EB, 0x16EE, 0x16F2, 0x16F6, 0x16F9, + 0x16FD, 0x1700, 0x1704, 0x1708, 0x170B, 0x170F, 0x1713, 0x1716, + 0x171A, 0x171D, 0x1721, 0x1725, 0x1728, 0x172C, 0x1730, 0x1733, + 0x1737, 0x173A, 0x173E, 0x1742, 0x1745, 0x1749, 0x174C, 0x1750, + 0x1754, 0x1757, 0x175B, 0x175E, 0x1762, 0x1766, 0x1769, 0x176D, + 0x1770, 0x1774, 0x1778, 0x177B, 0x177F, 0x1782, 0x1786, 0x1789, + 0x178D, 0x1791, 0x1794, 0x1798, 0x179B, 0x179F, 0x17A2, 0x17A6, + 0x17AA, 0x17AD, 0x17B1, 0x17B4, 0x17B8, 0x17BB, 0x17BF, 0x17C2, + 0x17C6, 0x17C9, 0x17CD, 0x17D1, 0x17D4, 0x17D8, 0x17DB, 0x17DF, + 0x17E2, 0x17E6, 0x17E9, 0x17ED, 0x17F0, 0x17F4, 0x17F7, 0x17FB, + 0x17FE, 0x1802, 0x1806, 0x1809, 0x180D, 0x1810, 0x1814, 0x1817, + 0x181B, 0x181E, 0x1822, 0x1825, 0x1829, 0x182C, 0x1830, 0x1833, + 0x1837, 0x183A, 0x183E, 0x1841, 0x1845, 0x1848, 0x184C, 0x184F, + 0x1853, 0x1856, 0x185A, 0x185D, 0x1860, 0x1864, 0x1867, 0x186B, + 0x186E, 0x1872, 0x1875, 0x1879, 0x187C, 0x1880, 0x1883, 0x1887, + 0x188A, 0x188E, 0x1891, 0x1894, 0x1898, 0x189B, 0x189F, 0x18A2, + 0x18A6, 0x18A9, 0x18AD, 0x18B0, 0x18B3, 0x18B7, 0x18BA, 0x18BE, + 0x18C1, 0x18C5, 0x18C8, 0x18CC, 0x18CF, 0x18D2, 0x18D6, 0x18D9, + 0x18DD, 0x18E0, 0x18E3, 0x18E7, 0x18EA, 0x18EE, 0x18F1, 0x18F5, + 0x18F8, 0x18FB, 0x18FF, 0x1902, 0x1906, 0x1909, 0x190C, 0x1910, + 0x1913, 0x1917, 0x191A, 0x191D, 0x1921, 0x1924, 0x1928, 0x192B, + 0x192E, 0x1932, 0x1935, 0x1938, 0x193C, 0x193F, 0x1943, 0x1946, + 0x1949, 0x194D, 0x1950, 0x1953, 0x1957, 0x195A, 0x195D, 0x1961, + 0x1964, 0x1968, 0x196B, 0x196E, 0x1972, 0x1975, 0x1978, 0x197C, + 0x197F, 0x1982, 0x1986, 0x1989, 0x198C, 0x1990, 0x1993, 0x1996, + 0x199A, 0x199D, 0x19A0, 0x19A4, 0x19A7, 0x19AA, 0x19AE, 0x19B1, + 0x19B4, 0x19B8, 0x19BB, 0x19BE, 0x19C2, 0x19C5, 0x19C8, 0x19CC, + 0x19CF, 0x19D2, 0x19D5, 0x19D9, 0x19DC, 0x19DF, 0x19E3, 0x19E6, + 0x19E9, 0x19ED, 0x19F0, 0x19F3, 0x19F6, 0x19FA, 0x19FD, 0x1A00, + 0x1A04, 0x1A07, 0x1A0A, 0x1A0D, 0x1A11, 0x1A14, 0x1A17, 0x1A1B, + 0x1A1E, 0x1A21, 0x1A24, 0x1A28, 0x1A2B, 0x1A2E, 0x1A31, 0x1A35, + 0x1A38, 0x1A3B, 0x1A3E, 0x1A42, 0x1A45, 0x1A48, 0x1A4B, 0x1A4F, + 0x1A52, 0x1A55, 0x1A58, 0x1A5C, 0x1A5F, 0x1A62, 0x1A65, 0x1A69, + 0x1A6C, 0x1A6F, 0x1A72, 0x1A76, 0x1A79, 0x1A7C, 0x1A7F, 0x1A83, + 0x1A86, 0x1A89, 0x1A8C, 0x1A8F, 0x1A93, 0x1A96, 0x1A99, 0x1A9C, + 0x1A9F, 0x1AA3, 0x1AA6, 0x1AA9, 0x1AAC, 0x1AB0, 0x1AB3, 0x1AB6, + 0x1AB9, 0x1ABC, 0x1AC0, 0x1AC3, 0x1AC6, 0x1AC9, 0x1ACC, 0x1ACF, + 0x1AD3, 0x1AD6, 0x1AD9, 0x1ADC, 0x1ADF, 0x1AE3, 0x1AE6, 0x1AE9, + 0x1AEC, 0x1AEF, 0x1AF2, 0x1AF6, 0x1AF9, 0x1AFC, 0x1AFF, 0x1B02, + 0x1B05, 0x1B09, 0x1B0C, 0x1B0F, 0x1B12, 0x1B15, 0x1B18, 0x1B1C, + 0x1B1F, 0x1B22, 0x1B25, 0x1B28, 0x1B2B, 0x1B2E, 0x1B32, 0x1B35, + 0x1B38, 0x1B3B, 0x1B3E, 0x1B41, 0x1B44, 0x1B48, 0x1B4B, 0x1B4E, + 0x1B51, 0x1B54, 0x1B57, 0x1B5A, 0x1B5D, 0x1B61, 0x1B64, 0x1B67, + 0x1B6A, 0x1B6D, 0x1B70, 0x1B73, 0x1B76, 0x1B79, 0x1B7D, 0x1B80, + 0x1B83, 0x1B86, 0x1B89, 0x1B8C, 0x1B8F, 0x1B92, 0x1B95, 0x1B98, + 0x1B9C, 0x1B9F, 0x1BA2, 0x1BA5, 0x1BA8, 0x1BAB, 0x1BAE, 0x1BB1, + 0x1BB4, 0x1BB7, 0x1BBA, 0x1BBD, 0x1BC1, 0x1BC4, 0x1BC7, 0x1BCA, + 0x1BCD, 0x1BD0, 0x1BD3, 0x1BD6, 0x1BD9, 0x1BDC, 0x1BDF, 0x1BE2, + 0x1BE5, 0x1BE8, 0x1BEB, 0x1BEE, 0x1BF2, 0x1BF5, 0x1BF8, 0x1BFB, + 0x1BFE, 0x1C01, 0x1C04, 0x1C07, 0x1C0A, 0x1C0D, 0x1C10, 0x1C13, + 0x1C16, 0x1C19, 0x1C1C, 0x1C1F, 0x1C22, 0x1C25, 0x1C28, 0x1C2B, + 0x1C2E, 0x1C31, 0x1C34, 0x1C37, 0x1C3A, 0x1C3D, 0x1C40, 0x1C43, + 0x1C46, 0x1C49, 0x1C4C, 0x1C4F, 0x1C52, 0x1C55, 0x1C58, 0x1C5B, + 0x1C5E, 0x1C61, 0x1C64, 0x1C67, 0x1C6A, 0x1C6D, 0x1C70, 0x1C73, + 0x1C76, 0x1C79, 0x1C7C, 0x1C7F, 0x1C82, 0x1C85, 0x1C88, 0x1C8B, + 0x1C8E, 0x1C91, 0x1C94, 0x1C97, 0x1C9A, 0x1C9D, 0x1CA0, 0x1CA3, + 0x1CA6, 0x1CA9, 0x1CAC, 0x1CAF, 0x1CB2, 0x1CB5, 0x1CB8, 0x1CBB, + 0x1CBE, 0x1CC1, 0x1CC3, 0x1CC6, 0x1CC9, 0x1CCC, 0x1CCF, 0x1CD2, + 0x1CD5, 0x1CD8, 0x1CDB, 0x1CDE, 0x1CE1, 0x1CE4, 0x1CE7, 0x1CEA, + 0x1CED, 0x1CF0, 0x1CF3, 0x1CF5, 0x1CF8, 0x1CFB, 0x1CFE, 0x1D01, + 0x1D04, 0x1D07, 0x1D0A, 0x1D0D, 0x1D10, 0x1D13, 0x1D16, 0x1D18, + 0x1D1B, 0x1D1E, 0x1D21, 0x1D24, 0x1D27, 0x1D2A, 0x1D2D, 0x1D30, + 0x1D33, 0x1D35, 0x1D38, 0x1D3B, 0x1D3E, 0x1D41, 0x1D44, 0x1D47, + 0x1D4A, 0x1D4D, 0x1D4F, 0x1D52, 0x1D55, 0x1D58, 0x1D5B, 0x1D5E, + 0x1D61, 0x1D64, 0x1D66, 0x1D69, 0x1D6C, 0x1D6F, 0x1D72, 0x1D75, + 0x1D78, 0x1D7B, 0x1D7D, 0x1D80, 0x1D83, 0x1D86, 0x1D89, 0x1D8C, + 0x1D8E, 0x1D91, 0x1D94, 0x1D97, 0x1D9A, 0x1D9D, 0x1DA0, 0x1DA2, + 0x1DA5, 0x1DA8, 0x1DAB, 0x1DAE, 0x1DB1, 0x1DB3, 0x1DB6, 0x1DB9, + 0x1DBC, 0x1DBF, 0x1DC2, 0x1DC4, 0x1DC7, 0x1DCA, 0x1DCD, 0x1DD0, + 0x1DD3, 0x1DD5, 0x1DD8, 0x1DDB, 0x1DDE, 0x1DE1, 0x1DE3, 0x1DE6, + 0x1DE9, 0x1DEC, 0x1DEF, 0x1DF1, 0x1DF4, 0x1DF7, 0x1DFA, 0x1DFD, + 0x1DFF, 0x1E02, 0x1E05, 0x1E08, 0x1E0B, 0x1E0D, 0x1E10, 0x1E13, + 0x1E16, 0x1E19, 0x1E1B, 0x1E1E, 0x1E21, 0x1E24, 0x1E26, 0x1E29, + 0x1E2C, 0x1E2F, 0x1E32, 0x1E34, 0x1E37, 0x1E3A, 0x1E3D, 0x1E3F, + 0x1E42, 0x1E45, 0x1E48, 0x1E4A, 0x1E4D, 0x1E50, 0x1E53, 0x1E55, + 0x1E58, 0x1E5B, 0x1E5E, 0x1E60, 0x1E63, 0x1E66, 0x1E69, 0x1E6B, + 0x1E6E, 0x1E71, 0x1E74, 0x1E76, 0x1E79, 0x1E7C, 0x1E7F, 0x1E81, + 0x1E84, 0x1E87, 0x1E8A, 0x1E8C, 0x1E8F, 0x1E92, 0x1E94, 0x1E97, + 0x1E9A, 0x1E9D, 0x1E9F, 0x1EA2, 0x1EA5, 0x1EA8, 0x1EAA, 0x1EAD, + 0x1EB0, 0x1EB2, 0x1EB5, 0x1EB8, 0x1EBA, 0x1EBD, 0x1EC0, 0x1EC3, + 0x1EC5, 0x1EC8, 0x1ECB, 0x1ECD, 0x1ED0, 0x1ED3, 0x1ED5, 0x1ED8, + 0x1EDB, 0x1EDE, 0x1EE0, 0x1EE3, 0x1EE6, 0x1EE8, 0x1EEB, 0x1EEE, + 0x1EF0, 0x1EF3, 0x1EF6, 0x1EF8, 0x1EFB, 0x1EFE, 0x1F00, 0x1F03, + 0x1F06, 0x1F08, 0x1F0B, 0x1F0E, 0x1F10, 0x1F13, 0x1F16, 0x1F18, + 0x1F1B, 0x1F1E, 0x1F20, 0x1F23, 0x1F26, 0x1F28, 0x1F2B, 0x1F2E, + 0x1F30, 0x1F33, 0x1F36, 0x1F38, 0x1F3B, 0x1F3D, 0x1F40, 0x1F43, + 0x1F45, 0x1F48, 0x1F4B, 0x1F4D, 0x1F50, 0x1F53, 0x1F55, 0x1F58, + 0x1F5A, 0x1F5D, 0x1F60, 0x1F62, 0x1F65, 0x1F68, 0x1F6A, 0x1F6D, + 0x1F6F, 0x1F72, 0x1F75, 0x1F77, 0x1F7A, 0x1F7C, 0x1F7F, 0x1F82, + 0x1F84, 0x1F87, 0x1F8A, 0x1F8C, 0x1F8F, 0x1F91, 0x1F94, 0x1F97, + 0x1F99, 0x1F9C, 0x1F9E, 0x1FA1, 0x1FA4, 0x1FA6, 0x1FA9, 0x1FAB, + 0x1FAE, 0x1FB0, 0x1FB3, 0x1FB6, 0x1FB8, 0x1FBB, 0x1FBD, 0x1FC0, + 0x1FC3, 0x1FC5, 0x1FC8, 0x1FCA, 0x1FCD, 0x1FCF, 0x1FD2, 0x1FD5, + 0x1FD7, 0x1FDA, 0x1FDC, 0x1FDF, 0x1FE1, 0x1FE4, 0x1FE6, 0x1FE9, + 0x1FEC, 0x1FEE, 0x1FF1, 0x1FF3, 0x1FF6, 0x1FF8, 0x1FFB, 0x1FFD, + 0x2000, 0x2000, +}; diff --git a/blender-psx.jpg b/blender-psx.jpg new file mode 100644 index 0000000..813f8ae Binary files /dev/null and b/blender-psx.jpg differ diff --git a/gif/3d.gif b/gif/3d.gif new file mode 100644 index 0000000..678ec8c Binary files /dev/null and b/gif/3d.gif differ diff --git a/gif/precalc.gif b/gif/precalc.gif new file mode 100644 index 0000000..ba0e20c Binary files /dev/null and b/gif/precalc.gif differ diff --git a/gif/push.gif b/gif/push.gif new file mode 100644 index 0000000..e808de5 Binary files /dev/null and b/gif/push.gif differ diff --git a/gif/rt-8b-4b.gif b/gif/rt-8b-4b.gif new file mode 100644 index 0000000..36270a5 Binary files /dev/null and b/gif/rt-8b-4b.gif differ diff --git a/gif/sprite.gif b/gif/sprite.gif new file mode 100644 index 0000000..9af9dc8 Binary files /dev/null and b/gif/sprite.gif differ diff --git a/gif/vertexanim.gif b/gif/vertexanim.gif new file mode 100644 index 0000000..b962ae9 Binary files /dev/null and b/gif/vertexanim.gif differ diff --git a/level.blend b/level.blend new file mode 100644 index 0000000..4c9c289 Binary files /dev/null and b/level.blend differ diff --git a/level.c b/level.c new file mode 100644 index 0000000..861164e --- /dev/null +++ b/level.c @@ -0,0 +1,11460 @@ +struct BODY; +struct VANIM; +struct PRIM; +struct MESH; +struct CAMPOS; +struct CAMPATH; +struct CAMANGLE; +struct SIBLINGS; +struct CHILDREN; +struct NODE; +struct QUAD; + +typedef struct 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; + +typedef struct PRIM { + 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; + +typedef struct MESH { + TMESH * tmesh; + PRIM * index; + TIM_IMAGE * tim; + unsigned long * tim_data; + MATRIX * mat; + VECTOR * pos; + SVECTOR * rot; + short * isRigidBody; + short * isStaticBody; + 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; + +typedef struct CAMPOS { + VECTOR pos; + SVECTOR rot; + } CAMPOS; + + +// Blender cam ~= PSX cam with these settings : +// NTSC - 320x240, PAL 320x256, pixel ratio 1:1, +// cam focal length : perspective 90° ( 16 mm )) +// With a FOV of 1/2, camera focal length is ~= 16 mm / 90° +// 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; + +typedef struct CAMPATH { + short len, cursor, pos; + VECTOR points[]; + } CAMPATH; + +typedef struct SIBLINGS { + int index; + struct NODE * list[]; + } SIBLINGS ; + +typedef struct CHILDREN { + int index; + MESH * list[]; + } CHILDREN ; + +typedef struct NODE { + MESH * plane; + SIBLINGS * siblings; + CHILDREN * objects; + CHILDREN * rigidbodies; + } NODE; + +CAMPOS camPos_camPath = { + {-205,156,-17}, + {371,707,0} +}; + +CAMPOS camPos_camPath_001 = { + {490,101,113}, + {282,-192,0} +}; + +CAMPOS camPos_camPath_002 = { + {221,309,-48}, + {866,0,0} +}; + +CAMPOS camPos_camPath_003 = { + {-159,57,61}, + {210,542,0} +}; + +CAMPOS camPos_camPath_004 = { + {-208,216,-86}, + {447,800,0} +}; + +CAMPOS camPos_camPath_005 = { + {-167,160,-624}, + {391,1419,0} +}; + +CAMPATH camPath = { + 5, + 0, + 0, + { + {-205,156,-17}, + {221,309,-48}, + {-159,57,61}, + {-208,216,-86}, + {-167,160,-624} + } +}; + +static MATRIX lgtmat = { + 784, 1558, 2188, + -1742, 1368, 1710, + -1554, 1368, -1882 + }; + +static MATRIX cmat = { + 13,4096,0, + 4096,0,36, + 0,5,4096 + }; + +SVECTOR modelCube_mesh[] = { + {-32,21,-24}, + {-32,-8,-26}, + {-32,18,26}, + {-32,-11,24}, + {33,21,-23}, + {33,-8,-26}, + {33,18,26}, + {33,-12,24}, + {0,-20,23}, + {0,-17,-27}, + {0,9,25}, + {0,13,-25}, + {33,-10,3}, + {0,-19,2}, + {33,19,5}, + {-32,19,5}, + {0,11,4}, + {-32,-10,3}, + {33,-10,-4}, + {-32,-10,-4}, + {0,11,-3}, + {-32,20,-2}, + {0,-18,-5}, + {33,20,-2}, + {-45,-14,3}, + {-45,-13,-4}, + {-45,-11,3}, + {-45,-10,-4}, + {-32,-6,3}, + {-32,-6,-4}, + {33,18,16}, + {33,-11,14}, + {24,-12,24}, + {24,18,26}, + {24,21,-24}, + {24,-8,-26}, + {33,21,-16}, + {33,-9,-18}, + {42,31,-22}, + {38,31,-22}, + {42,30,-18}, + {19,28,24}, + {19,28,21}, + {16,28,24}, + {33,-19,-24}, + {31,-23,21}, + {-32,20,-12}, + {-20,21,-24}, + {-18,17,26}, + {-32,19,14}, + {-42,31,-21}, + {-15,28,24}, + {-42,31,-16}, + {-38,31,-21}, + {-10,28,24}, + {-15,28,20} +}; + +SVECTOR modelCube_normal[] = { + 2258,624,3360,0, + 2625,2223,2224,0, + 2760,-1911,-2347,0, + 2628,1741,-2615,0, + -2487,1091,3066,0, + -2774,730,2924,0, + -2828,-1736,-2401,0, + -2865,179,-2922,0, + -111,2857,-2933,0, + -128,3370,2325,0, + -122,-2741,-3041,0, + -61,-2132,3497,0, + -3205,2526,-350,0, + -26,4072,-443,0, + -2553,-3173,439,0, + 2559,-3163,472,0, + -57,-4061,533,0, + 1520,3360,-1782,0, + -3205,2546,-141,0, + 1522,3641,1098,0, + -36,-4087,275,0, + 2545,-3205,166,0, + -29,4081,-344,0, + -2554,-3198,178,0, + 2024,2475,-2560,0, + 2024,2921,2036,0, + 2682,-2124,-2252,0, + 2682,-1652,2618,0, + 3844,-1171,-792,0, + 3844,-997,1003,0, + -3086,-2613,650,0, + -3086,2666,376,0, + 180,2003,-3568,0, + 1530,-1708,-3394,0, + 773,-2622,3051,0, + 14,2746,3039,0, + -3016,-2673,-734,0, + -3138,2426,-1023,0, + -3191,-1129,2306,0, + 1491,-3182,2104,0, + -2729,-1785,-2479,0, + -957,-3438,-2010,0, + 823,-1766,3603,0, + 3764,-1368,-859,0, + -952,3959,-445,0, + -381,4016,-707,0, + 2934,-2811,-518,0, + -1032,-2614,2979,0, + -1662,-2009,-3159,0, + 3044,-2664,642,0, + 3242,-1261,2162,0, + 705,-3525,-1963,0, + 2772,-1889,-2350,0, + -1317,-3366,1927,0, + -3845,-1288,-578,0, + -800,-1875,3553,0 +}; + +SVECTOR modelCube_uv[] = { + 19,123, 0, 0, + 27,102, 0, 0, + 19,112, 0, 0, + 58,2, 0, 0, + 45,2, 0, 0, + 58,8, 0, 0, + 46,53, 0, 0, + 44,66, 0, 0, + 46,59, 0, 0, + 17,40, 0, 0, + 5,38, 0, 0, + 5,40, 0, 0, + 38,102, 0, 0, + 48,96, 0, 0, + 44,95, 0, 0, + 44,38, 0, 0, + 39,42, 0, 0, + 46,42, 0, 0, + 30,24, 0, 0, + 30,2, 0, 0, + 20,24, 0, 0, + 45,24, 0, 0, + 58,38, 0, 0, + 58,24, 0, 0, + 20,24, 0, 0, + 5,8, 0, 0, + 5,24, 0, 0, + 34,2, 0, 0, + 30,1, 0, 0, + 30,2, 0, 0, + 34,100, 0, 0, + 33,123, 0, 0, + 38,102, 0, 0, + 34,126, 0, 0, + 31,125, 0, 0, + 30,127, 0, 0, + 21,2, 0, 0, + 20,24, 0, 0, + 30,2, 0, 0, + 45,2, 0, 0, + 34,2, 0, 0, + 45,24, 0, 0, + 34,2, 0, 0, + 30,24, 0, 0, + 34,24, 0, 0, + 33,125, 0, 0, + 31,123, 0, 0, + 31,125, 0, 0, + 31,100, 0, 0, + 33,123, 0, 0, + 34,100, 0, 0, + 6,83, 0, 0, + 7,74, 0, 0, + 2,78, 0, 0, + 44,38, 0, 0, + 58,40, 0, 0, + 58,38, 0, 0, + 44,73, 0, 0, + 53,70, 0, 0, + 44,66, 0, 0, + 20,38, 0, 0, + 5,24, 0, 0, + 5,38, 0, 0, + 24,42, 0, 0, + 18,62, 0, 0, + 19,66, 0, 0, + 24,42, 0, 0, + 20,38, 0, 0, + 19,41, 0, 0, + 19,66, 0, 0, + 6,83, 0, 0, + 19,73, 0, 0, + 18,62, 0, 0, + 7,74, 0, 0, + 19,66, 0, 0, + 5,40, 0, 0, + 1,38, 0, 0, + 1,41, 0, 0, + 53,70, 0, 0, + 59,78, 0, 0, + 58,69, 0, 0, + 58,40, 0, 0, + 62,37, 0, 0, + 58,38, 0, 0, + 46,59, 0, 0, + 53,70, 0, 0, + 58,69, 0, 0, + 29,1, 0, 0, + 30,2, 0, 0, + 30,1, 0, 0, + 34,2, 0, 0, + 36,1, 0, 0, + 34,1, 0, 0, + 20,38, 0, 0, + 17,40, 0, 0, + 19,41, 0, 0, + 19,52, 0, 0, + 24,42, 0, 0, + 19,41, 0, 0, + 39,42, 0, 0, + 46,53, 0, 0, + 46,42, 0, 0, + 46,40, 0, 0, + 44,38, 0, 0, + 46,42, 0, 0, + 27,102, 0, 0, + 14,102, 0, 0, + 19,102, 0, 0, + 51,98, 0, 0, + 48,96, 0, 0, + 49,102, 0, 0, + 19,102, 0, 0, + 14,102, 0, 0, + 14,105, 0, 0, + 58,2, 0, 0, + 61,6, 0, 0, + 61,3, 0, 0, + 5,2, 0, 0, + 1,6, 0, 0, + 5,8, 0, 0, + 19,112, 0, 0, + 19,102, 0, 0, + 19,113, 0, 0, + 47,113, 0, 0, + 49,102, 0, 0, + 38,102, 0, 0, + 45,24, 0, 0, + 34,2, 0, 0, + 34,24, 0, 0, + 39,42, 0, 0, + 44,38, 0, 0, + 34,42, 0, 0, + 45,24, 0, 0, + 34,24, 0, 0, + 44,38, 0, 0, + 44,38, 0, 0, + 34,24, 0, 0, + 34,42, 0, 0, + 30,42, 0, 0, + 34,24, 0, 0, + 30,24, 0, 0, + 24,42, 0, 0, + 30,42, 0, 0, + 20,38, 0, 0, + 20,38, 0, 0, + 30,42, 0, 0, + 30,24, 0, 0, + 34,66, 0, 0, + 30,42, 0, 0, + 30,66, 0, 0, + 30,66, 0, 0, + 24,42, 0, 0, + 19,66, 0, 0, + 39,42, 0, 0, + 34,66, 0, 0, + 44,66, 0, 0, + 34,100, 0, 0, + 38,102, 0, 0, + 44,95, 0, 0, + 27,102, 0, 0, + 31,100, 0, 0, + 19,96, 0, 0, + 30,66, 0, 0, + 19,66, 0, 0, + 19,73, 0, 0, + 44,66, 0, 0, + 34,66, 0, 0, + 44,73, 0, 0, + 30,66, 0, 0, + 33,84, 0, 0, + 34,66, 0, 0, + 31,100, 0, 0, + 33,84, 0, 0, + 31,84, 0, 0, + 19,96, 0, 0, + 31,84, 0, 0, + 19,84, 0, 0, + 33,84, 0, 0, + 44,95, 0, 0, + 44,84, 0, 0, + 44,73, 0, 0, + 33,84, 0, 0, + 44,84, 0, 0, + 31,84, 0, 0, + 19,73, 0, 0, + 19,84, 0, 0, + 5,8, 0, 0, + 21,2, 0, 0, + 5,2, 0, 0, + 58,8, 0, 0, + 45,24, 0, 0, + 58,24, 0, 0, + 47,123, 0, 0, + 33,123, 0, 0, + 39,125, 0, 0, + 31,123, 0, 0, + 19,123, 0, 0, + 27,126, 0, 0, + 38,102, 0, 0, + 47,123, 0, 0, + 47,113, 0, 0, + 27,102, 0, 0, + 31,123, 0, 0, + 31,100, 0, 0, + 30,24, 0, 0, + 20,24, 0, 0, + 20,38, 0, 0, + 19,123, 0, 0, + 31,123, 0, 0, + 27,102, 0, 0, + 46,53, 0, 0, + 39,42, 0, 0, + 44,66, 0, 0, + 17,40, 0, 0, + 20,38, 0, 0, + 5,38, 0, 0, + 38,102, 0, 0, + 49,102, 0, 0, + 48,96, 0, 0, + 45,24, 0, 0, + 44,38, 0, 0, + 58,38, 0, 0, + 20,24, 0, 0, + 21,2, 0, 0, + 5,8, 0, 0, + 34,2, 0, 0, + 34,1, 0, 0, + 30,1, 0, 0, + 34,126, 0, 0, + 33,125, 0, 0, + 31,125, 0, 0, + 34,2, 0, 0, + 30,2, 0, 0, + 30,24, 0, 0, + 33,125, 0, 0, + 33,123, 0, 0, + 31,123, 0, 0, + 31,100, 0, 0, + 31,123, 0, 0, + 33,123, 0, 0, + 44,38, 0, 0, + 46,40, 0, 0, + 58,40, 0, 0, + 44,73, 0, 0, + 59,78, 0, 0, + 53,70, 0, 0, + 20,38, 0, 0, + 20,24, 0, 0, + 5,24, 0, 0, + 24,42, 0, 0, + 19,52, 0, 0, + 18,62, 0, 0, + 19,66, 0, 0, + 7,74, 0, 0, + 6,83, 0, 0, + 18,62, 0, 0, + 2,74, 0, 0, + 7,74, 0, 0, + 5,40, 0, 0, + 5,38, 0, 0, + 1,38, 0, 0, + 58,40, 0, 0, + 62,40, 0, 0, + 62,37, 0, 0, + 46,59, 0, 0, + 44,66, 0, 0, + 53,70, 0, 0, + 29,1, 0, 0, + 29,1, 0, 0, + 30,2, 0, 0, + 34,2, 0, 0, + 36,2, 0, 0, + 36,1, 0, 0, + 27,102, 0, 0, + 19,96, 0, 0, + 14,102, 0, 0, + 58,2, 0, 0, + 58,8, 0, 0, + 61,6, 0, 0, + 5,2, 0, 0, + 1,2, 0, 0, + 1,6, 0, 0, + 19,112, 0, 0, + 27,102, 0, 0, + 19,102, 0, 0, + 47,113, 0, 0, + 51,107, 0, 0, + 49,102, 0, 0, + 30,42, 0, 0, + 34,42, 0, 0, + 34,24, 0, 0, + 34,66, 0, 0, + 34,42, 0, 0, + 30,42, 0, 0, + 30,66, 0, 0, + 30,42, 0, 0, + 24,42, 0, 0, + 39,42, 0, 0, + 34,42, 0, 0, + 34,66, 0, 0, + 30,66, 0, 0, + 31,84, 0, 0, + 33,84, 0, 0, + 31,100, 0, 0, + 34,100, 0, 0, + 33,84, 0, 0, + 19,96, 0, 0, + 31,100, 0, 0, + 31,84, 0, 0, + 33,84, 0, 0, + 34,100, 0, 0, + 44,95, 0, 0, + 44,73, 0, 0, + 34,66, 0, 0, + 33,84, 0, 0, + 31,84, 0, 0, + 30,66, 0, 0, + 19,73, 0, 0, + 58,8, 0, 0, + 45,2, 0, 0, + 45,24, 0, 0, + 38,102, 0, 0, + 33,123, 0, 0, + 47,123, 0, 0 +}; + +CVECTOR modelCube_color[] = { + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0 +}; + +PRIM modelCube_index[] = { + 1,46,0,0,4, + 2,3,48,0,4, + 7,30,6,0,4, + 5,34,4,0,4, + 49,54,48,0,4, + 32,31,45,0,4, + 22,19,9,0,4, + 8,33,10,0,4, + 9,47,11,0,4, + 17,25,19,0,4, + 15,28,49,0,4, + 24,27,25,0,4, + 1,9,19,0,4, + 3,17,8,0,4, + 17,22,13,0,4, + 26,29,27,0,4, + 21,28,15,0,4, + 39,40,38,0,4, + 32,6,33,0,4, + 33,42,30,0,4, + 35,11,34,0,4, + 37,4,36,0,4, + 37,35,44,0,4, + 36,39,34,0,4, + 4,40,36,0,4, + 4,39,38,0,4, + 42,43,41,0,4, + 6,43,33,0,4, + 6,42,41,0,4, + 27,19,25,0,4, + 17,26,24,0,4, + 35,5,44,0,4, + 5,37,44,0,4, + 31,7,45,0,4, + 7,32,45,0,4, + 46,53,52,0,4, + 51,54,55,0,4, + 52,53,50,0,4, + 2,54,51,0,4, + 0,53,47,0,4, + 0,52,50,0,4, + 2,55,49,0,4, + 8,17,13,0,4, + 31,32,12,0,4, + 8,13,32,0,4, + 32,13,12,0,4, + 18,13,22,0,4, + 37,18,35,0,4, + 35,18,22,0,4, + 14,18,23,0,4, + 23,37,36,0,4, + 31,14,30,0,4, + 15,49,48,0,4, + 46,21,47,0,4, + 23,36,34,0,4, + 30,14,33,0,4, + 23,16,14,0,4, + 21,16,20,0,4, + 47,20,11,0,4, + 16,48,10,0,4, + 33,16,10,0,4, + 20,34,11,0,4, + 47,1,0,0,4, + 48,8,10,0,4, + 3,28,17,0,4, + 29,1,19,0,4, + 49,3,2,0,4, + 46,29,21,0,4, + 22,9,35,0,4, + 1,29,46,0,4, + 7,31,30,0,4, + 5,35,34,0,4, + 49,55,54,0,4, + 8,32,33,0,4, + 9,1,47,0,4, + 17,24,25,0,4, + 24,26,27,0,4, + 17,19,22,0,4, + 26,28,29,0,4, + 21,29,28,0,4, + 32,7,6,0,4, + 33,43,42,0,4, + 35,9,11,0,4, + 37,5,4,0,4, + 36,40,39,0,4, + 4,38,40,0,4, + 4,34,39,0,4, + 6,41,43,0,4, + 6,30,42,0,4, + 27,29,19,0,4, + 17,28,26,0,4, + 46,47,53,0,4, + 2,48,54,0,4, + 0,50,53,0,4, + 0,46,52,0,4, + 2,51,55,0,4, + 18,12,13,0,4, + 14,12,18,0,4, + 23,18,37,0,4, + 31,12,14,0,4, + 23,20,16,0,4, + 21,15,16,0,4, + 47,21,20,0,4, + 16,15,48,0,4, + 33,14,16,0,4, + 20,23,34,0,4, + 48,3,8,0,4, + 49,28,3,0,4 +}; + +MATRIX modelCube_matrix = {0}; +VECTOR modelCube_pos = {-282,-45,128, 0}; +SVECTOR modelCube_rot = {0,899,0}; +short modelCube_isRigidBody = 0; +short modelCube_isStaticBody = 1; +short modelCube_isPrism = 0; +short modelCube_isAnim = 0; +short modelCube_isActor = 0; +short modelCube_isLevel = 0; +short modelCube_isBG = 0; +short modelCube_isSprite = 0; +long modelCube_p = 0; +long modelCube_OTz = 0; +BODY modelCube_body = { + {0, 0, 0, 0}, + -282,-45,128, 0, + 0,899,0, 0, + 5, + ONE/5, + -45,-23,-27, 0, + 42,31,26, 0, + 1024, + }; + +TMESH modelCube = { + modelCube_mesh, + modelCube_normal, + modelCube_uv, + modelCube_color, + 108 +}; + +extern unsigned long _binary_TIM_cat_tim_start[]; +extern unsigned long _binary_TIM_cat_tim_end[]; +extern unsigned long _binary_TIM_cat_tim_length; + +TIM_IMAGE tim_cat; + +MESH meshCube = { + &modelCube, + modelCube_index, + &tim_cat, + _binary_TIM_cat_tim_start, + &modelCube_matrix, + &modelCube_pos, + &modelCube_rot, + &modelCube_isRigidBody, + &modelCube_isStaticBody, + &modelCube_isPrism, + &modelCube_isAnim, + &modelCube_isActor, + &modelCube_isLevel, + &modelCube_isBG, + &modelCube_isSprite, + &modelCube_p, + &modelCube_OTz, + &modelCube_body, + 0, + 0 +}; + +SVECTOR modelCylindre_mesh[] = { + {-2,35,10}, + {5,-30,41}, + {4,35,7}, + {31,-30,26}, + {6,35,2}, + {39,-30,1}, + {4,35,-4}, + {29,-30,-23}, + {0,35,-7}, + {-4,35,-8}, + {6,-30,-36}, + {-8,35,-6}, + {-16,-30,-33}, + {-11,35,-2}, + {-35,-30,-15}, + {-12,35,2}, + {-38,-30,7}, + {-10,35,6}, + {-32,-30,25}, + {-7,35,9}, + {-18,-30,37} +}; + +SVECTOR modelCylindre_normal[] = { + -397,-1844,-3636,0, + -369,3301,-2396,0, + -2743,-1808,-2446,0, + -1875,3311,-1515,0, + -3654,-1848,-107,0, + -2388,3327,73,0, + -2928,-1857,2180,0, + -1825,3298,1604,0, + -1193,-1970,3387,0, + 605,-1985,3531,0, + -444,3298,2389,0, + 2193,-2031,2801,0, + 1051,3278,2220,0, + 3272,-2004,1434,0, + 2218,3246,1147,0, + 3551,-2022,-282,0, + 2426,3291,-240,0, + 3017,-1975,-1943,0, + 1993,3302,-1378,0, + 1697,-1963,-3169,0, + 1056,3329,-2140,0 +}; + +SVECTOR modelCylindre_uv[] = { + 32,134, 0, 0, + 25,153, 0, 0, + 33,153, 0, 0, + 22,153, 0, 0, + 16,171, 0, 0, + 22,171, 0, 0, + 16,153, 0, 0, + 9,171, 0, 0, + 16,171, 0, 0, + 9,153, 0, 0, + 4,171, 0, 0, + 9,171, 0, 0, + 30,171, 0, 0, + 33,153, 0, 0, + 29,153, 0, 0, + 36,171, 0, 0, + 38,153, 0, 0, + 33,153, 0, 0, + 45,171, 0, 0, + 46,153, 0, 0, + 42,153, 0, 0, + 45,171, 0, 0, + 51,153, 0, 0, + 46,153, 0, 0, + 51,171, 0, 0, + 56,153, 0, 0, + 51,153, 0, 0, + 56,171, 0, 0, + 59,153, 0, 0, + 56,153, 0, 0, + 4,178, 0, 0, + 14,189, 0, 0, + 24,183, 0, 0, + 37,134, 0, 0, + 33,153, 0, 0, + 37,153, 0, 0, + 42,186, 0, 0, + 42,174, 0, 0, + 24,177, 0, 0, + 32,134, 0, 0, + 24,134, 0, 0, + 25,153, 0, 0, + 22,153, 0, 0, + 16,153, 0, 0, + 16,171, 0, 0, + 16,153, 0, 0, + 9,153, 0, 0, + 9,171, 0, 0, + 24,171, 0, 0, + 30,171, 0, 0, + 29,153, 0, 0, + 30,171, 0, 0, + 36,171, 0, 0, + 33,153, 0, 0, + 36,171, 0, 0, + 42,171, 0, 0, + 38,153, 0, 0, + 45,171, 0, 0, + 51,171, 0, 0, + 51,153, 0, 0, + 51,171, 0, 0, + 56,171, 0, 0, + 56,153, 0, 0, + 56,171, 0, 0, + 59,171, 0, 0, + 59,153, 0, 0, + 4,178, 0, 0, + 4,182, 0, 0, + 14,189, 0, 0, + 4,182, 0, 0, + 7,187, 0, 0, + 14,189, 0, 0, + 20,188, 0, 0, + 24,183, 0, 0, + 14,189, 0, 0, + 24,183, 0, 0, + 24,177, 0, 0, + 12,171, 0, 0, + 24,177, 0, 0, + 20,172, 0, 0, + 12,171, 0, 0, + 12,171, 0, 0, + 7,174, 0, 0, + 4,178, 0, 0, + 12,171, 0, 0, + 4,178, 0, 0, + 24,183, 0, 0, + 37,134, 0, 0, + 32,134, 0, 0, + 33,153, 0, 0, + 44,182, 0, 0, + 44,178, 0, 0, + 42,186, 0, 0, + 42,174, 0, 0, + 38,171, 0, 0, + 33,171, 0, 0, + 28,173, 0, 0, + 24,177, 0, 0, + 33,171, 0, 0, + 24,177, 0, 0, + 25,184, 0, 0, + 42,186, 0, 0, + 25,184, 0, 0, + 30,188, 0, 0, + 42,186, 0, 0, + 30,188, 0, 0, + 37,189, 0, 0, + 42,186, 0, 0, + 42,186, 0, 0, + 44,178, 0, 0, + 42,174, 0, 0, + 42,174, 0, 0, + 33,171, 0, 0, + 24,177, 0, 0 +}; + +CVECTOR modelCylindre_color[] = { + 153,137,141, 0, + 255,255,255, 0, + 255,255,255, 0, + 159,144,147, 0, + 255,255,255, 0, + 255,255,255, 0, + 153,137,141, 0, + 255,255,255, 0, + 255,255,255, 0, + 154,139,143, 0, + 255,255,255, 0, + 255,255,255, 0, + 154,138,142, 0, + 255,255,255, 0, + 255,255,255, 0, + 153,137,141, 0, + 255,255,255, 0, + 255,255,255, 0, + 153,137,141, 0, + 255,255,255, 0, + 255,255,255, 0, + 153,137,141, 0, + 255,255,255, 0, + 255,255,255, 0, + 153,137,141, 0, + 255,255,255, 0, + 255,255,255, 0, + 153,137,141, 0, + 255,255,255, 0, + 255,255,255, 0, + 153,137,141, 0, + 153,137,141, 0, + 154,139,143, 0, + 153,137,141, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 153,137,141, 0, + 159,144,147, 0, + 255,255,255, 0, + 159,144,147, 0, + 153,137,141, 0, + 255,255,255, 0, + 153,137,141, 0, + 154,139,143, 0, + 255,255,255, 0, + 154,139,143, 0, + 154,138,142, 0, + 255,255,255, 0, + 154,138,142, 0, + 153,137,141, 0, + 255,255,255, 0, + 153,137,141, 0, + 153,137,141, 0, + 255,255,255, 0, + 153,137,141, 0, + 153,137,141, 0, + 255,255,255, 0, + 153,137,141, 0, + 153,137,141, 0, + 255,255,255, 0, + 153,137,141, 0, + 158,143,147, 0, + 255,255,255, 0, + 153,137,141, 0, + 153,137,141, 0, + 153,137,141, 0, + 153,137,141, 0, + 153,137,141, 0, + 153,137,141, 0, + 154,138,142, 0, + 154,139,143, 0, + 153,137,141, 0, + 154,139,143, 0, + 153,137,141, 0, + 153,137,141, 0, + 153,137,141, 0, + 154,138,142, 0, + 153,137,141, 0, + 153,137,141, 0, + 153,137,141, 0, + 153,137,141, 0, + 153,137,141, 0, + 153,137,141, 0, + 154,139,143, 0, + 153,137,141, 0, + 153,137,141, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0 +}; + +PRIM modelCylindre_index[] = { + 1,2,0,0,4, + 3,4,2,0,4, + 5,6,4,0,4, + 7,8,6,0,4, + 10,9,8,0,4, + 12,11,9,0,4, + 14,13,11,0,4, + 14,15,13,0,4, + 16,17,15,0,4, + 18,19,17,0,4, + 18,12,7,0,4, + 20,0,19,0,4, + 8,13,0,0,4, + 1,3,2,0,4, + 3,5,4,0,4, + 5,7,6,0,4, + 7,10,8,0,4, + 10,12,9,0,4, + 12,14,11,0,4, + 14,16,15,0,4, + 16,18,17,0,4, + 18,20,19,0,4, + 18,16,12,0,4, + 16,14,12,0,4, + 10,7,12,0,4, + 7,5,1,0,4, + 5,3,1,0,4, + 1,20,18,0,4, + 1,18,7,0,4, + 20,1,0,0,4, + 9,11,8,0,4, + 13,15,17,0,4, + 19,0,17,0,4, + 0,2,8,0,4, + 2,4,8,0,4, + 4,6,8,0,4, + 8,11,13,0,4, + 13,17,0,0,4 +}; + +VANIM modelCylindre_anim = { + 20, + 21, + 0, + 0, + 1, + 0, + { + //Frame 0 + { 3,35,47 }, + { -1,-30,14 }, + { 33,35,32 }, + { 7,-30,9 }, + { 43,35,5 }, + { 9,-30,2 }, + { 35,35,-23 }, + { 6,-30,-4 }, + { 13,35,-36 }, + { -7,35,-38 }, + { 0,-30,-8 }, + { -26,35,-29 }, + { -6,-30,-7 }, + { -39,35,-13 }, + { -12,-30,-2 }, + { -42,35,7 }, + { -13,-30,4 }, + { -36,35,27 }, + { -11,-30,9 }, + { -20,35,41 }, + { -7,-30,12 }, + + //Frame 1 + { 3,35,45 }, + { 0,-30,15 }, + { 31,35,31 }, + { 8,-30,11 }, + { 41,35,5 }, + { 11,-30,2 }, + { 33,35,-21 }, + { 8,-30,-6 }, + { 13,35,-35 }, + { -7,35,-36 }, + { 0,-30,-10 }, + { -25,35,-28 }, + { -7,-30,-9 }, + { -37,35,-13 }, + { -13,-30,-3 }, + { -40,35,7 }, + { -14,-30,4 }, + { -34,35,26 }, + { -12,-30,10 }, + { -19,35,39 }, + { -8,-30,14 }, + + //Frame 2 + { 2,35,38 }, + { 1,-30,20 }, + { 26,35,26 }, + { 12,-30,14 }, + { 34,35,4 }, + { 16,-30,2 }, + { 27,35,-18 }, + { 12,-30,-9 }, + { 10,35,-29 }, + { -6,35,-31 }, + { 1,-30,-15 }, + { -22,35,-24 }, + { -9,-30,-13 }, + { -32,35,-11 }, + { -18,-30,-5 }, + { -35,35,6 }, + { -19,-30,5 }, + { -30,35,22 }, + { -16,-30,13 }, + { -17,35,33 }, + { -10,-30,18 }, + + //Frame 3 + { 1,35,29 }, + { 2,-30,27 }, + { 19,35,20 }, + { 19,-30,18 }, + { 25,35,3 }, + { 24,-30,2 }, + { 19,35,-13 }, + { 18,-30,-14 }, + { 7,35,-22 }, + { -6,35,-23 }, + { 3,-30,-22 }, + { -17,35,-18 }, + { -11,-30,-20 }, + { -25,35,-8 }, + { -24,-30,-9 }, + { -27,35,5 }, + { -26,-30,5 }, + { -23,35,16 }, + { -21,-30,17 }, + { -14,35,25 }, + { -12,-30,24 }, + + //Frame 4 + { -1,35,19 }, + { 3,-30,35 }, + { 11,35,13 }, + { 25,-30,22 }, + { 15,35,2 }, + { 31,-30,2 }, + { 12,35,-9 }, + { 24,-30,-19 }, + { 3,35,-14 }, + { -5,35,-15 }, + { 5,-30,-29 }, + { -13,35,-11 }, + { -14,-30,-27 }, + { -18,35,-5 }, + { -30,-30,-12 }, + { -19,35,3 }, + { -32,-30,6 }, + { -17,35,11 }, + { -27,-30,21 }, + { -10,35,17 }, + { -15,-30,31 }, + + //Frame 5 + { -2,35,13 }, + { 4,-30,40 }, + { 6,35,9 }, + { 29,-30,25 }, + { 8,35,2 }, + { 37,-30,1 }, + { 6,35,-5 }, + { 28,-30,-22 }, + { 1,35,-9 }, + { -5,35,-9 }, + { 6,-30,-34 }, + { -9,35,-7 }, + { -15,-30,-31 }, + { -13,35,-3 }, + { -34,-30,-14 }, + { -14,35,2 }, + { -37,-30,7 }, + { -12,35,7 }, + { -30,-30,24 }, + { -8,35,11 }, + { -17,-30,35 }, + + //Frame 6 + { -2,35,10 }, + { 5,-30,41 }, + { 4,35,7 }, + { 31,-30,26 }, + { 6,35,2 }, + { 39,-30,1 }, + { 4,35,-4 }, + { 29,-30,-23 }, + { 0,35,-7 }, + { -4,35,-8 }, + { 6,-30,-36 }, + { -8,35,-6 }, + { -16,-30,-33 }, + { -11,35,-2 }, + { -35,-30,-15 }, + { -12,35,2 }, + { -38,-30,7 }, + { -10,35,6 }, + { -32,-30,25 }, + { -7,35,9 }, + { -18,-30,37 }, + + //Frame 7 + { -2,35,11 }, + { 5,-30,41 }, + { 4,35,8 }, + { 31,-30,26 }, + { 7,35,2 }, + { 38,-30,1 }, + { 5,35,-4 }, + { 29,-30,-23 }, + { 0,35,-8 }, + { -4,35,-8 }, + { 6,-30,-35 }, + { -9,35,-6 }, + { -16,-30,-33 }, + { -11,35,-2 }, + { -35,-30,-15 }, + { -12,35,2 }, + { -38,-30,7 }, + { -11,35,6 }, + { -32,-30,25 }, + { -7,35,9 }, + { -17,-30,36 }, + + //Frame 8 + { -2,35,12 }, + { 5,-30,40 }, + { 5,35,8 }, + { 30,-30,26 }, + { 8,35,2 }, + { 37,-30,1 }, + { 6,35,-5 }, + { 28,-30,-22 }, + { 0,35,-9 }, + { -5,35,-9 }, + { 6,-30,-34 }, + { -9,35,-7 }, + { -15,-30,-32 }, + { -12,35,-3 }, + { -34,-30,-14 }, + { -13,35,2 }, + { -37,-30,7 }, + { -12,35,7 }, + { -31,-30,24 }, + { -8,35,11 }, + { -17,-30,35 }, + + //Frame 9 + { -2,35,14 }, + { 4,-30,38 }, + { 7,35,10 }, + { 28,-30,25 }, + { 10,35,2 }, + { 36,-30,2 }, + { 7,35,-6 }, + { 27,-30,-21 }, + { 1,35,-10 }, + { -5,35,-11 }, + { 6,-30,-33 }, + { -10,35,-8 }, + { -15,-30,-30 }, + { -14,35,-3 }, + { -33,-30,-14 }, + { -15,35,3 }, + { -36,-30,7 }, + { -13,35,8 }, + { -30,-30,23 }, + { -9,35,12 }, + { -17,-30,34 }, + + //Frame 10 + { -1,35,17 }, + { 4,-30,36 }, + { 9,35,12 }, + { 26,-30,23 }, + { 13,35,2 }, + { 33,-30,2 }, + { 10,35,-8 }, + { 25,-30,-20 }, + { 2,35,-12 }, + { -5,35,-13 }, + { 5,-30,-31 }, + { -12,35,-10 }, + { -14,-30,-28 }, + { -16,35,-4 }, + { -31,-30,-13 }, + { -17,35,3 }, + { -34,-30,6 }, + { -15,35,10 }, + { -28,-30,22 }, + { -10,35,15 }, + { -16,-30,32 }, + + //Frame 11 + { -1,35,20 }, + { 3,-30,34 }, + { 12,35,14 }, + { 24,-30,22 }, + { 16,35,2 }, + { 30,-30,2 }, + { 13,35,-9 }, + { 23,-30,-18 }, + { 4,35,-15 }, + { -5,35,-16 }, + { 5,-30,-28 }, + { -13,35,-12 }, + { -13,-30,-26 }, + { -19,35,-5 }, + { -29,-30,-12 }, + { -20,35,3 }, + { -31,-30,6 }, + { -17,35,12 }, + { -26,-30,20 }, + { -11,35,18 }, + { -15,-30,30 }, + + //Frame 12 + { 0,35,25 }, + { 3,-30,31 }, + { 15,35,17 }, + { 22,-30,20 }, + { 20,35,3 }, + { 27,-30,2 }, + { 16,35,-11 }, + { 21,-30,-16 }, + { 5,35,-18 }, + { -5,35,-19 }, + { 4,-30,-25 }, + { -15,35,-15 }, + { -12,-30,-23 }, + { -22,35,-7 }, + { -26,-30,-10 }, + { -23,35,4 }, + { -28,-30,6 }, + { -20,35,14 }, + { -24,-30,19 }, + { -12,35,21 }, + { -14,-30,27 }, + + //Frame 13 + { 1,35,29 }, + { 2,-30,27 }, + { 19,35,20 }, + { 19,-30,18 }, + { 25,35,3 }, + { 24,-30,2 }, + { 19,35,-13 }, + { 18,-30,-14 }, + { 7,35,-22 }, + { -6,35,-23 }, + { 3,-30,-22 }, + { -17,35,-18 }, + { -11,-30,-20 }, + { -25,35,-8 }, + { -24,-30,-9 }, + { -27,35,5 }, + { -26,-30,5 }, + { -23,35,16 }, + { -21,-30,17 }, + { -14,35,25 }, + { -12,-30,24 }, + + //Frame 14 + { 1,35,33 }, + { 1,-30,24 }, + { 22,35,23 }, + { 16,-30,16 }, + { 29,35,4 }, + { 20,-30,2 }, + { 23,35,-16 }, + { 15,-30,-12 }, + { 8,35,-25 }, + { -6,35,-26 }, + { 2,-30,-19 }, + { -19,35,-20 }, + { -10,-30,-17 }, + { -28,35,-9 }, + { -21,-30,-7 }, + { -30,35,5 }, + { -23,-30,5 }, + { -26,35,19 }, + { -19,-30,15 }, + { -15,35,29 }, + { -11,-30,22 }, + + //Frame 15 + { 2,35,37 }, + { 1,-30,21 }, + { 25,35,25 }, + { 13,-30,14 }, + { 33,35,4 }, + { 17,-30,2 }, + { 26,35,-17 }, + { 13,-30,-10 }, + { 10,35,-28 }, + { -6,35,-30 }, + { 2,-30,-16 }, + { -21,35,-23 }, + { -9,-30,-14 }, + { -31,35,-10 }, + { -18,-30,-6 }, + { -34,35,6 }, + { -20,-30,5 }, + { -29,35,21 }, + { -17,-30,13 }, + { -17,35,32 }, + { -10,-30,19 }, + + //Frame 16 + { 2,35,41 }, + { 0,-30,19 }, + { 28,35,28 }, + { 11,-30,12 }, + { 37,35,4 }, + { 14,-30,2 }, + { 29,35,-19 }, + { 10,-30,-8 }, + { 11,35,-31 }, + { -6,35,-33 }, + { 1,-30,-13 }, + { -23,35,-25 }, + { -8,-30,-12 }, + { -34,35,-11 }, + { -16,-30,-4 }, + { -36,35,6 }, + { -17,-30,4 }, + { -31,35,23 }, + { -15,-30,12 }, + { -18,35,35 }, + { -9,-30,17 }, + + //Frame 17 + { 3,35,43 }, + { 0,-30,16 }, + { 30,35,30 }, + { 9,-30,11 }, + { 39,35,5 }, + { 12,-30,2 }, + { 32,35,-21 }, + { 9,-30,-6 }, + { 12,35,-33 }, + { -7,35,-35 }, + { 0,-30,-11 }, + { -24,35,-27 }, + { -7,-30,-10 }, + { -36,35,-12 }, + { -14,-30,-3 }, + { -39,35,7 }, + { -15,-30,4 }, + { -33,35,25 }, + { -13,-30,11 }, + { -19,35,38 }, + { -8,-30,15 }, + + //Frame 18 + { 3,35,45 }, + { 0,-30,15 }, + { 32,35,31 }, + { 8,-30,10 }, + { 42,35,5 }, + { 10,-30,2 }, + { 33,35,-22 }, + { 7,-30,-5 }, + { 13,35,-35 }, + { -7,35,-37 }, + { 0,-30,-9 }, + { -25,35,-28 }, + { -7,-30,-8 }, + { -37,35,-13 }, + { -13,-30,-3 }, + { -41,35,7 }, + { -14,-30,4 }, + { -35,35,26 }, + { -12,-30,10 }, + { -20,35,40 }, + { -7,-30,13 }, + + //Frame 19 + { 3,35,47 }, + { -1,-30,14 }, + { 33,35,32 }, + { 7,-30,10 }, + { 43,35,5 }, + { 9,-30,2 }, + { 34,35,-22 }, + { 6,-30,-5 }, + { 13,35,-36 }, + { -7,35,-38 }, + { 0,-30,-8 }, + { -26,35,-29 }, + { -7,-30,-7 }, + { -38,35,-13 }, + { -12,-30,-2 }, + { -42,35,7 }, + { -13,-30,4 }, + { -35,35,27 }, + { -11,-30,9 }, + { -20,35,41 }, + { -7,-30,13 } + + } +}; +MATRIX modelCylindre_matrix = {0}; +VECTOR modelCylindre_pos = {-1,-57,523, 0}; +SVECTOR modelCylindre_rot = {0,0,0}; +short modelCylindre_isRigidBody = 0; +short modelCylindre_isStaticBody = 1; +short modelCylindre_isPrism = 0; +short modelCylindre_isAnim = 1; +short modelCylindre_isActor = 0; +short modelCylindre_isLevel = 0; +short modelCylindre_isBG = 0; +short modelCylindre_isSprite = 0; +long modelCylindre_p = 0; +long modelCylindre_OTz = 0; +BODY modelCylindre_body = { + {0, 0, 0, 0}, + -1,-57,523, 0, + 0,0,0, 0, + 20, + ONE/20, + -38,-30,-36, 0, + 39,35,41, 0, + 0, + }; + +TMESH modelCylindre = { + modelCylindre_mesh, + modelCylindre_normal, + modelCylindre_uv, + modelCylindre_color, + 38 +}; + +extern unsigned long _binary_TIM_home_tim_start[]; +extern unsigned long _binary_TIM_home_tim_end[]; +extern unsigned long _binary_TIM_home_tim_length; + +TIM_IMAGE tim_home; + +MESH meshCylindre = { + &modelCylindre, + modelCylindre_index, + &tim_home, + _binary_TIM_home_tim_start, + &modelCylindre_matrix, + &modelCylindre_pos, + &modelCylindre_rot, + &modelCylindre_isRigidBody, + &modelCylindre_isStaticBody, + &modelCylindre_isPrism, + &modelCylindre_isAnim, + &modelCylindre_isActor, + &modelCylindre_isLevel, + &modelCylindre_isBG, + &modelCylindre_isSprite, + &modelCylindre_p, + &modelCylindre_OTz, + &modelCylindre_body, + &modelCylindre_anim, + 0 +}; + +SVECTOR modelgnd_mesh[] = { + {200,0,-98}, + {103,0,-98}, + {200,0,-1}, + {103,0,-1}, + {5,0,-98}, + {5,0,-1}, + {200,0,97}, + {103,0,97}, + {-92,0,-98}, + {5,0,97}, + {-92,0,-1}, + {200,0,194}, + {103,0,194}, + {-92,0,97}, + {-190,0,-98}, + {5,0,194}, + {-190,0,-1}, + {-92,0,194}, + {-190,0,97}, + {-287,0,-98}, + {-287,0,-1}, + {-190,0,194}, + {-287,0,97}, + {-385,0,-98}, + {-287,0,194}, + {-385,0,-1}, + {-385,0,97}, + {-385,0,194}, + {-482,0,-98}, + {-482,0,-1}, + {-482,0,97}, + {-482,0,194}, + {-580,0,-98}, + {-580,0,-1}, + {-580,0,97}, + {-580,0,194} +}; + +SVECTOR modelgnd_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 +}; + +SVECTOR modelgnd_uv[] = { + 191,64, 0, 0, + 191,0, 0, 0, + 127,0, 0, 0, + 191,127, 0, 0, + 127,64, 0, 0, + 127,127, 0, 0, + 191,64, 0, 0, + 127,0, 0, 0, + 127,64, 0, 0, + 127,127, 0, 0, + 191,127, 0, 0, + 191,64, 0, 0, + 191,127, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 191,127, 0, 0, + 127,64, 0, 0, + 127,127, 0, 0, + 191,64, 0, 0, + 127,0, 0, 0, + 127,64, 0, 0, + 255,127, 0, 0, + 255,64, 0, 0, + 191,64, 0, 0, + 255,127, 0, 0, + 191,64, 0, 0, + 191,127, 0, 0, + 127,127, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 191,64, 0, 0, + 191,0, 0, 0, + 127,0, 0, 0, + 191,64, 0, 0, + 191,0, 0, 0, + 127,0, 0, 0, + 127,127, 0, 0, + 191,127, 0, 0, + 191,64, 0, 0, + 191,127, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 191,64, 0, 0, + 127,0, 0, 0, + 127,64, 0, 0, + 0,64, 0, 0, + 0,128, 0, 0, + 64,128, 0, 0, + 0,64, 0, 0, + 64,128, 0, 0, + 64,64, 0, 0, + 127,127, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 191,127, 0, 0, + 127,64, 0, 0, + 127,127, 0, 0, + 191,64, 0, 0, + 127,0, 0, 0, + 127,64, 0, 0, + 191,64, 0, 0, + 191,0, 0, 0, + 127,0, 0, 0, + 191,127, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 127,64, 0, 0, + 191,127, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 127,127, 0, 0, + 191,127, 0, 0, + 191,127, 0, 0, + 127,64, 0, 0, + 127,127, 0, 0, + 191,64, 0, 0, + 127,0, 0, 0, + 127,64, 0, 0, + 191,64, 0, 0, + 191,0, 0, 0, + 127,0, 0, 0, + 127,64, 0, 0, + 191,127, 0, 0, + 191,64, 0, 0, + 191,127, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 127,64, 0, 0, + 127,127, 0, 0, + 191,127, 0, 0, + 191,127, 0, 0, + 127,64, 0, 0, + 127,127, 0, 0, + 191,64, 0, 0, + 127,0, 0, 0, + 127,64, 0, 0, + 127,64, 0, 0, + 191,127, 0, 0, + 191,64, 0, 0, + 191,64, 0, 0, + 191,0, 0, 0, + 127,0, 0, 0, + 191,127, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 127,64, 0, 0, + 127,127, 0, 0, + 191,127, 0, 0, + 191,127, 0, 0, + 127,64, 0, 0, + 127,127, 0, 0, + 191,64, 0, 0, + 127,0, 0, 0, + 127,64, 0, 0, + 127,64, 0, 0, + 191,127, 0, 0, + 191,64, 0, 0, + 191,64, 0, 0, + 191,0, 0, 0, + 127,0, 0, 0, + 191,127, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 127,64, 0, 0, + 127,127, 0, 0, + 191,127, 0, 0, + 255,64, 0, 0, + 191,127, 0, 0, + 255,127, 0, 0, + 191,64, 0, 0, + 127,0, 0, 0, + 127,64, 0, 0, + 191,64, 0, 0, + 255,127, 0, 0, + 255,64, 0, 0, + 191,64, 0, 0, + 191,0, 0, 0, + 127,0, 0, 0, + 255,64, 0, 0, + 191,64, 0, 0, + 191,127, 0, 0, + 191,64, 0, 0, + 191,127, 0, 0, + 255,127, 0, 0 +}; + +CVECTOR modelgnd_color[] = { + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0 +}; + +PRIM modelgnd_index[] = { + 9,5,3,0,4, + 5,1,3,0,4, + 9,3,7,0,4, + 7,3,2,0,4, + 5,4,1,0,4, + 10,4,5,0,4, + 13,5,9,0,4, + 3,1,0,0,4, + 3,0,2,0,4, + 7,2,6,0,4, + 15,9,7,0,4, + 13,10,5,0,4, + 12,7,6,0,4, + 10,8,4,0,4, + 15,7,12,0,4, + 17,13,9,0,4, + 17,9,15,0,4, + 12,6,11,0,4, + 16,8,10,0,4, + 18,10,13,0,4, + 18,16,10,0,4, + 16,14,8,0,4, + 21,13,17,0,4, + 21,18,13,0,4, + 20,14,16,0,4, + 22,16,18,0,4, + 22,20,16,0,4, + 24,18,21,0,4, + 20,19,14,0,4, + 24,22,18,0,4, + 25,19,20,0,4, + 26,20,22,0,4, + 27,22,24,0,4, + 26,25,20,0,4, + 25,23,19,0,4, + 27,26,22,0,4, + 29,23,25,0,4, + 30,25,26,0,4, + 31,26,27,0,4, + 30,29,25,0,4, + 29,28,23,0,4, + 31,30,26,0,4, + 33,28,29,0,4, + 34,29,30,0,4, + 35,30,31,0,4, + 34,33,29,0,4, + 33,32,28,0,4, + 35,34,30,0,4 +}; + +MATRIX modelgnd_matrix = {0}; +VECTOR modelgnd_pos = {0,0,0, 0}; +SVECTOR modelgnd_rot = {0,0,0}; +short modelgnd_isRigidBody = 0; +short modelgnd_isStaticBody = 0; +short modelgnd_isPrism = 0; +short modelgnd_isAnim = 0; +short modelgnd_isActor = 0; +short modelgnd_isLevel = 1; +short modelgnd_isBG = 1; +short modelgnd_isSprite = 0; +long modelgnd_p = 0; +long modelgnd_OTz = 0; +BODY modelgnd_body = { + {0, 0, 0, 0}, + 0,0,0, 0, + 0,0,0, 0, + 64, + ONE/64, + -580,0,-98, 0, + 200,0,194, 0, + 4096, + }; + +TMESH modelgnd = { + modelgnd_mesh, + modelgnd_normal, + modelgnd_uv, + modelgnd_color, + 48 +}; + +MESH meshgnd = { + &modelgnd, + modelgnd_index, + &tim_home, + _binary_TIM_home_tim_start, + &modelgnd_matrix, + &modelgnd_pos, + &modelgnd_rot, + &modelgnd_isRigidBody, + &modelgnd_isStaticBody, + &modelgnd_isPrism, + &modelgnd_isAnim, + &modelgnd_isActor, + &modelgnd_isLevel, + &modelgnd_isBG, + &modelgnd_isSprite, + &modelgnd_p, + &modelgnd_OTz, + &modelgnd_body, + 0, + 0 +}; + +SVECTOR modelgnd_001_mesh[] = { + {200,0,194}, + {103,0,194}, + {5,0,194}, + {-92,0,194}, + {200,0,292}, + {103,0,292}, + {5,0,292}, + {-92,0,292}, + {200,0,389}, + {103,0,389}, + {5,0,389}, + {-92,0,389}, + {200,0,487}, + {103,0,487}, + {5,0,487}, + {-92,0,487}, + {200,0,584}, + {103,0,584}, + {5,0,584}, + {-92,0,584}, + {200,0,682}, + {103,0,682}, + {5,0,682}, + {-92,0,682} +}; + +SVECTOR modelgnd_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 +}; + +SVECTOR modelgnd_001_uv[] = { + 191,64, 0, 0, + 191,0, 0, 0, + 127,0, 0, 0, + 127,127, 0, 0, + 191,127, 0, 0, + 191,64, 0, 0, + 191,64, 0, 0, + 127,0, 0, 0, + 127,64, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 127,127, 0, 0, + 191,64, 0, 0, + 127,127, 0, 0, + 191,127, 0, 0, + 127,127, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 191,64, 0, 0, + 191,0, 0, 0, + 127,0, 0, 0, + 127,127, 0, 0, + 191,127, 0, 0, + 191,64, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 127,127, 0, 0, + 191,64, 0, 0, + 127,0, 0, 0, + 127,64, 0, 0, + 191,64, 0, 0, + 127,127, 0, 0, + 191,127, 0, 0, + 127,127, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 191,64, 0, 0, + 191,0, 0, 0, + 127,0, 0, 0, + 127,127, 0, 0, + 191,127, 0, 0, + 191,64, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 127,127, 0, 0, + 191,64, 0, 0, + 127,0, 0, 0, + 127,64, 0, 0, + 191,64, 0, 0, + 127,127, 0, 0, + 191,127, 0, 0, + 127,127, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 191,64, 0, 0, + 191,0, 0, 0, + 127,0, 0, 0, + 127,127, 0, 0, + 191,127, 0, 0, + 191,64, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 127,127, 0, 0, + 191,64, 0, 0, + 127,0, 0, 0, + 127,64, 0, 0, + 191,64, 0, 0, + 127,127, 0, 0, + 191,127, 0, 0, + 127,127, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 191,64, 0, 0, + 191,0, 0, 0, + 127,0, 0, 0, + 191,127, 0, 0, + 255,127, 0, 0, + 255,64, 0, 0, + 191,64, 0, 0, + 191,127, 0, 0, + 255,127, 0, 0, + 191,64, 0, 0, + 127,0, 0, 0, + 127,64, 0, 0, + 191,64, 0, 0, + 255,127, 0, 0, + 255,64, 0, 0, + 191,127, 0, 0, + 255,64, 0, 0, + 191,64, 0, 0 +}; + +CVECTOR modelgnd_001_color[] = { + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0 +}; + +PRIM modelgnd_001_index[] = { + 6,2,1,0,4, + 5,1,0,0,4, + 6,1,5,0,4, + 7,3,2,0,4, + 7,2,6,0,4, + 5,0,4,0,4, + 10,6,5,0,4, + 9,5,4,0,4, + 11,7,6,0,4, + 10,5,9,0,4, + 11,6,10,0,4, + 9,4,8,0,4, + 14,10,9,0,4, + 13,9,8,0,4, + 15,11,10,0,4, + 14,9,13,0,4, + 15,10,14,0,4, + 13,8,12,0,4, + 18,14,13,0,4, + 17,13,12,0,4, + 19,15,14,0,4, + 18,13,17,0,4, + 19,14,18,0,4, + 17,12,16,0,4, + 22,18,17,0,4, + 21,17,16,0,4, + 23,19,18,0,4, + 22,17,21,0,4, + 23,18,22,0,4, + 21,16,20,0,4 +}; + +MATRIX modelgnd_001_matrix = {0}; +VECTOR modelgnd_001_pos = {0,0,0, 0}; +SVECTOR modelgnd_001_rot = {0,0,0}; +short modelgnd_001_isRigidBody = 0; +short modelgnd_001_isStaticBody = 0; +short modelgnd_001_isPrism = 0; +short modelgnd_001_isAnim = 0; +short modelgnd_001_isActor = 0; +short modelgnd_001_isLevel = 1; +short modelgnd_001_isBG = 1; +short modelgnd_001_isSprite = 0; +long modelgnd_001_p = 0; +long modelgnd_001_OTz = 0; +BODY modelgnd_001_body = { + {0, 0, 0, 0}, + 0,0,0, 0, + 0,0,0, 0, + 64, + ONE/64, + -92,0,194, 0, + 200,0,682, 0, + 4096, + }; + +TMESH modelgnd_001 = { + modelgnd_001_mesh, + modelgnd_001_normal, + modelgnd_001_uv, + modelgnd_001_color, + 30 +}; + +MESH meshgnd_001 = { + &modelgnd_001, + modelgnd_001_index, + &tim_home, + _binary_TIM_home_tim_start, + &modelgnd_001_matrix, + &modelgnd_001_pos, + &modelgnd_001_rot, + &modelgnd_001_isRigidBody, + &modelgnd_001_isStaticBody, + &modelgnd_001_isPrism, + &modelgnd_001_isAnim, + &modelgnd_001_isActor, + &modelgnd_001_isLevel, + &modelgnd_001_isBG, + &modelgnd_001_isSprite, + &modelgnd_001_p, + &modelgnd_001_OTz, + &modelgnd_001_body, + 0, + 0 +}; + +SVECTOR modelgnd_003_mesh[] = { + {-224,0,-586}, + {-321,0,-586}, + {-419,0,-586}, + {-516,0,-586}, + {-224,0,-488}, + {-321,0,-488}, + {-419,0,-488}, + {-516,0,-488}, + {-224,0,-391}, + {-321,0,-391}, + {-419,0,-391}, + {-516,0,-391}, + {-224,0,-293}, + {-321,0,-293}, + {-419,0,-293}, + {-516,0,-293}, + {-224,0,-196}, + {-321,0,-196}, + {-419,0,-196}, + {-516,0,-196}, + {-224,0,-98}, + {-321,0,-98}, + {-419,0,-98}, + {-516,0,-98} +}; + +SVECTOR modelgnd_003_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 +}; + +SVECTOR modelgnd_003_uv[] = { + 191,64, 0, 0, + 191,0, 0, 0, + 127,0, 0, 0, + 127,127, 0, 0, + 191,127, 0, 0, + 191,64, 0, 0, + 191,64, 0, 0, + 127,0, 0, 0, + 127,64, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 127,127, 0, 0, + 191,64, 0, 0, + 127,127, 0, 0, + 191,127, 0, 0, + 127,127, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 191,64, 0, 0, + 191,0, 0, 0, + 127,0, 0, 0, + 127,127, 0, 0, + 191,127, 0, 0, + 191,64, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 127,127, 0, 0, + 191,64, 0, 0, + 127,0, 0, 0, + 127,64, 0, 0, + 191,64, 0, 0, + 127,127, 0, 0, + 191,127, 0, 0, + 127,127, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 191,64, 0, 0, + 191,0, 0, 0, + 127,0, 0, 0, + 127,127, 0, 0, + 191,127, 0, 0, + 191,64, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 127,127, 0, 0, + 191,64, 0, 0, + 127,0, 0, 0, + 127,64, 0, 0, + 191,64, 0, 0, + 127,127, 0, 0, + 191,127, 0, 0, + 127,127, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 191,64, 0, 0, + 191,0, 0, 0, + 127,0, 0, 0, + 127,127, 0, 0, + 191,127, 0, 0, + 191,64, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 127,127, 0, 0, + 191,64, 0, 0, + 127,0, 0, 0, + 127,64, 0, 0, + 191,64, 0, 0, + 127,127, 0, 0, + 191,127, 0, 0, + 127,127, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 191,64, 0, 0, + 191,0, 0, 0, + 127,0, 0, 0, + 191,127, 0, 0, + 255,127, 0, 0, + 255,64, 0, 0, + 191,64, 0, 0, + 191,127, 0, 0, + 255,127, 0, 0, + 191,64, 0, 0, + 127,0, 0, 0, + 127,64, 0, 0, + 191,64, 0, 0, + 255,127, 0, 0, + 255,64, 0, 0, + 191,127, 0, 0, + 255,64, 0, 0, + 191,64, 0, 0 +}; + +CVECTOR modelgnd_003_color[] = { + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0 +}; + +PRIM modelgnd_003_index[] = { + 6,2,1,0,4, + 5,1,0,0,4, + 6,1,5,0,4, + 7,3,2,0,4, + 7,2,6,0,4, + 5,0,4,0,4, + 10,6,5,0,4, + 9,5,4,0,4, + 11,7,6,0,4, + 10,5,9,0,4, + 11,6,10,0,4, + 9,4,8,0,4, + 14,10,9,0,4, + 13,9,8,0,4, + 15,11,10,0,4, + 14,9,13,0,4, + 15,10,14,0,4, + 13,8,12,0,4, + 18,14,13,0,4, + 17,13,12,0,4, + 19,15,14,0,4, + 18,13,17,0,4, + 19,14,18,0,4, + 17,12,16,0,4, + 22,18,17,0,4, + 21,17,16,0,4, + 23,19,18,0,4, + 22,17,21,0,4, + 23,18,22,0,4, + 21,16,20,0,4 +}; + +MATRIX modelgnd_003_matrix = {0}; +VECTOR modelgnd_003_pos = {0,0,0, 0}; +SVECTOR modelgnd_003_rot = {0,0,0}; +short modelgnd_003_isRigidBody = 0; +short modelgnd_003_isStaticBody = 0; +short modelgnd_003_isPrism = 0; +short modelgnd_003_isAnim = 0; +short modelgnd_003_isActor = 0; +short modelgnd_003_isLevel = 1; +short modelgnd_003_isBG = 1; +short modelgnd_003_isSprite = 0; +long modelgnd_003_p = 0; +long modelgnd_003_OTz = 0; +BODY modelgnd_003_body = { + {0, 0, 0, 0}, + 0,0,0, 0, + 0,0,0, 0, + 64, + ONE/64, + -516,0,-586, 0, + -224,0,-98, 0, + 4096, + }; + +TMESH modelgnd_003 = { + modelgnd_003_mesh, + modelgnd_003_normal, + modelgnd_003_uv, + modelgnd_003_color, + 30 +}; + +MESH meshgnd_003 = { + &modelgnd_003, + modelgnd_003_index, + &tim_home, + _binary_TIM_home_tim_start, + &modelgnd_003_matrix, + &modelgnd_003_pos, + &modelgnd_003_rot, + &modelgnd_003_isRigidBody, + &modelgnd_003_isStaticBody, + &modelgnd_003_isPrism, + &modelgnd_003_isAnim, + &modelgnd_003_isActor, + &modelgnd_003_isLevel, + &modelgnd_003_isBG, + &modelgnd_003_isSprite, + &modelgnd_003_p, + &modelgnd_003_OTz, + &modelgnd_003_body, + 0, + 0 +}; + +SVECTOR modelgnd_002_mesh[] = { + {459,0,-586}, + {361,0,-586}, + {264,0,-586}, + {166,0,-586}, + {459,0,-488}, + {361,0,-488}, + {264,0,-488}, + {166,0,-488}, + {459,0,-391}, + {361,0,-391}, + {264,0,-391}, + {166,0,-391}, + {459,0,-293}, + {361,0,-293}, + {264,0,-293}, + {166,0,-293}, + {459,0,-196}, + {361,0,-196}, + {264,0,-196}, + {166,0,-196}, + {459,0,-98}, + {361,0,-98}, + {264,0,-98}, + {166,0,-98} +}; + +SVECTOR modelgnd_002_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 +}; + +SVECTOR modelgnd_002_uv[] = { + 191,64, 0, 0, + 191,0, 0, 0, + 127,0, 0, 0, + 127,127, 0, 0, + 191,127, 0, 0, + 191,64, 0, 0, + 191,64, 0, 0, + 127,0, 0, 0, + 127,64, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 127,127, 0, 0, + 191,64, 0, 0, + 127,127, 0, 0, + 191,127, 0, 0, + 127,127, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 191,64, 0, 0, + 191,0, 0, 0, + 127,0, 0, 0, + 127,127, 0, 0, + 191,127, 0, 0, + 191,64, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 127,127, 0, 0, + 191,64, 0, 0, + 127,0, 0, 0, + 127,64, 0, 0, + 191,64, 0, 0, + 127,127, 0, 0, + 191,127, 0, 0, + 127,127, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 191,64, 0, 0, + 191,0, 0, 0, + 127,0, 0, 0, + 127,127, 0, 0, + 191,127, 0, 0, + 191,64, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 127,127, 0, 0, + 191,64, 0, 0, + 127,0, 0, 0, + 127,64, 0, 0, + 191,64, 0, 0, + 127,127, 0, 0, + 191,127, 0, 0, + 127,127, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 191,64, 0, 0, + 191,0, 0, 0, + 127,0, 0, 0, + 127,127, 0, 0, + 191,127, 0, 0, + 191,64, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 127,127, 0, 0, + 191,64, 0, 0, + 127,0, 0, 0, + 127,64, 0, 0, + 191,64, 0, 0, + 127,127, 0, 0, + 191,127, 0, 0, + 127,127, 0, 0, + 191,64, 0, 0, + 127,64, 0, 0, + 191,64, 0, 0, + 191,0, 0, 0, + 127,0, 0, 0, + 191,127, 0, 0, + 255,127, 0, 0, + 255,64, 0, 0, + 191,64, 0, 0, + 191,127, 0, 0, + 255,127, 0, 0, + 191,64, 0, 0, + 127,0, 0, 0, + 127,64, 0, 0, + 191,64, 0, 0, + 255,127, 0, 0, + 255,64, 0, 0, + 191,127, 0, 0, + 255,64, 0, 0, + 191,64, 0, 0 +}; + +CVECTOR modelgnd_002_color[] = { + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0 +}; + +PRIM modelgnd_002_index[] = { + 6,2,1,0,4, + 5,1,0,0,4, + 6,1,5,0,4, + 7,3,2,0,4, + 7,2,6,0,4, + 5,0,4,0,4, + 10,6,5,0,4, + 9,5,4,0,4, + 11,7,6,0,4, + 10,5,9,0,4, + 11,6,10,0,4, + 9,4,8,0,4, + 14,10,9,0,4, + 13,9,8,0,4, + 15,11,10,0,4, + 14,9,13,0,4, + 15,10,14,0,4, + 13,8,12,0,4, + 18,14,13,0,4, + 17,13,12,0,4, + 19,15,14,0,4, + 18,13,17,0,4, + 19,14,18,0,4, + 17,12,16,0,4, + 22,18,17,0,4, + 21,17,16,0,4, + 23,19,18,0,4, + 22,17,21,0,4, + 23,18,22,0,4, + 21,16,20,0,4 +}; + +MATRIX modelgnd_002_matrix = {0}; +VECTOR modelgnd_002_pos = {0,0,0, 0}; +SVECTOR modelgnd_002_rot = {0,0,0}; +short modelgnd_002_isRigidBody = 0; +short modelgnd_002_isStaticBody = 0; +short modelgnd_002_isPrism = 0; +short modelgnd_002_isAnim = 0; +short modelgnd_002_isActor = 0; +short modelgnd_002_isLevel = 1; +short modelgnd_002_isBG = 1; +short modelgnd_002_isSprite = 0; +long modelgnd_002_p = 0; +long modelgnd_002_OTz = 0; +BODY modelgnd_002_body = { + {0, 0, 0, 0}, + 0,0,0, 0, + 0,0,0, 0, + 64, + ONE/64, + 166,0,-586, 0, + 459,0,-98, 0, + 4096, + }; + +TMESH modelgnd_002 = { + modelgnd_002_mesh, + modelgnd_002_normal, + modelgnd_002_uv, + modelgnd_002_color, + 30 +}; + +MESH meshgnd_002 = { + &modelgnd_002, + modelgnd_002_index, + &tim_home, + _binary_TIM_home_tim_start, + &modelgnd_002_matrix, + &modelgnd_002_pos, + &modelgnd_002_rot, + &modelgnd_002_isRigidBody, + &modelgnd_002_isStaticBody, + &modelgnd_002_isPrism, + &modelgnd_002_isAnim, + &modelgnd_002_isActor, + &modelgnd_002_isLevel, + &modelgnd_002_isBG, + &modelgnd_002_isSprite, + &modelgnd_002_p, + &modelgnd_002_OTz, + &modelgnd_002_body, + 0, + 0 +}; + +SVECTOR modelLara_mesh[] = { + {5,-78,12}, + {9,-75,11}, + {8,-69,11}, + {6,-74,9}, + {0,-75,12}, + {10,-70,8}, + {0,-75,12}, + {8,-66,10}, + {0,-68,14}, + {-4,-78,11}, + {8,-64,10}, + {0,-66,14}, + {7,-63,11}, + {0,-64,13}, + {0,-61,16}, + {3,-61,13}, + {0,-60,14}, + {0,-79,2}, + {-5,-74,9}, + {-8,-75,10}, + {7,-76,-2}, + {8,-66,3}, + {-3,-60,13}, + {-7,-68,11}, + {-7,-66,10}, + {8,-66,-1}, + {3,-54,10}, + {-7,-63,11}, + {-7,-64,10}, + {-9,-70,8}, + {0,-53,12}, + {2,-78,-4}, + {9,-67,-4}, + {-2,-54,10}, + {8,-38,16}, + {11,-37,14}, + {10,-40,12}, + {-2,-78,-4}, + {13,-48,4}, + {11,-40,10}, + {6,-57,1}, + {10,-35,15}, + {6,-41,12}, + {13,-46,4}, + {-7,-76,-2}, + {12,-42,7}, + {14,-42,5}, + {-7,-66,3}, + {13,-36,11}, + {6,-42,9}, + {2,-57,1}, + {18,-44,1}, + {6,-34,16}, + {4,-73,-9}, + {5,-44,8}, + {13,-47,0}, + {11,-32,12}, + {10,-45,2}, + {12,-35,8}, + {3,-49,3}, + {10,-42,3}, + {-3,-57,1}, + {-7,-66,-1}, + {3,-55,-1}, + {15,-45,-2}, + {13,-48,-4}, + {-4,-73,-9}, + {6,-31,13}, + {4,-67,-11}, + {-6,-57,1}, + {2,-57,-5}, + {11,-31,9}, + {10,-44,-1}, + {4,-57,-6}, + {-3,-55,-1}, + {4,-59,-8}, + {-8,-67,-4}, + {-9,-38,16}, + {-4,-49,3}, + {-8,-41,12}, + {-6,-44,8}, + {9,-48,-6}, + {-8,-42,9}, + {-3,-57,-5}, + {5,-61,-12}, + {4,-50,-6}, + {-8,-34,16}, + {7,-29,9}, + {9,-48,-8}, + {4,-58,-11}, + {-11,-40,12}, + {-4,-67,-11}, + {2,-66,-15}, + {-4,-57,-6}, + {-11,-35,15}, + {-12,-37,14}, + {-4,-59,-8}, + {-12,-40,10}, + {-2,-66,-15}, + {8,-24,8}, + {-13,-48,4}, + {-8,-31,13}, + {2,-62,-16}, + {24,-23,-1}, + {-13,-42,7}, + {26,-25,-4}, + {-4,-58,-11}, + {-4,-61,-12}, + {2,-57,-14}, + {-5,-50,-6}, + {-13,-45,4}, + {9,-46,-12}, + {-11,-45,2}, + {-10,-42,3}, + {-14,-36,11}, + {-12,-32,12}, + {-2,-62,-16}, + {24,-22,-3}, + {-2,-57,-14}, + {-13,-46,0}, + {-15,-42,5}, + {-8,-29,9}, + {20,-22,-3}, + {11,-37,-10}, + {24,-25,-8}, + {-13,-35,8}, + {-9,-48,-6}, + {-11,-43,-1}, + {24,-23,-7}, + {-12,-31,9}, + {23,-22,-5}, + {-9,-48,-8}, + {-13,-48,-4}, + {10,-30,-7}, + {7,-18,6}, + {20,-23,-7}, + {-18,-43,1}, + {-15,-44,-2}, + {-8,-24,8}, + {9,-12,7}, + {9,-30,-10}, + {8,-23,-3}, + {9,-34,-13}, + {-9,-46,-12}, + {34,-3,-1}, + {7,-17,-2}, + {35,-4,-4}, + {-7,-18,6}, + {30,-3,-1}, + {9,-14,-2}, + {7,-4,8}, + {-11,-37,-10}, + {16,-5,2}, + {33,-3,-6}, + {-10,-30,-7}, + {39,6,1}, + {-8,-12,7}, + {-8,-23,-3}, + {30,-2,-6}, + {-9,-30,-10}, + {-9,-34,-13}, + {22,2,1}, + {17,1,2}, + {-7,-17,-2}, + {32,9,1}, + {-6,-4,8}, + {18,4,1}, + {-8,-14,-2}, + {38,6,-7}, + {9,6,7}, + {21,1,-7}, + {13,-7,-10}, + {-26,-24,-1}, + {-22,-22,-3}, + {16,0,-8}, + {32,9,-7}, + {-22,-23,-7}, + {-26,-22,-3}, + {-24,-21,-5}, + {-29,-25,-5}, + {-26,-25,-8}, + {-15,-5,2}, + {-26,-23,-7}, + {-8,6,7}, + {2,11,1}, + {-12,-7,-10}, + {-18,1,2}, + {21,20,-1}, + {13,5,-15}, + {-1,11,0}, + {18,22,1}, + {20,20,-7}, + {5,12,-8}, + {11,12,-12}, + {-23,2,1}, + {-3,11,-6}, + {-18,6,0}, + {-17,0,-8}, + {11,28,5}, + {17,21,-8}, + {18,27,-1}, + {-1,7,-14}, + {-22,1,-7}, + {-33,-2,-2}, + {-35,-3,0}, + {-35,-3,-3}, + {-33,-1,-4}, + {-11,12,-10}, + {-35,-2,-5}, + {-15,5,-15}, + {4,29,-1}, + {16,27,-11}, + {-34,9,3}, + {-10,29,5}, + {-2,29,-1}, + {-40,6,3}, + {-18,22,1}, + {7,27,-11}, + {-21,20,-1}, + {-34,9,-6}, + {-20,20,-6}, + {-17,21,-8}, + {-40,6,-5}, + {-18,27,-1}, + {-6,28,-11}, + {-15,27,-11}, + {12,49,0}, + {12,47,-3}, + {16,49,-4}, + {15,48,-9}, + {8,49,-5}, + {10,49,-9}, + {13,57,-1}, + {15,56,-3}, + {19,56,-5}, + {17,54,-9}, + {11,57,-3}, + {17,54,-11}, + {-11,49,0}, + {-7,49,-4}, + {14,54,-11}, + {-9,47,-7}, + {-15,47,-3}, + {8,57,-6}, + {9,55,-9}, + {10,55,-11}, + {-14,47,-7}, + {14,65,-2}, + {18,65,-5}, + {22,64,-7}, + {-12,52,-7}, + {20,63,-11}, + {19,61,-15}, + {11,65,-5}, + {15,69,-2}, + {18,69,-5}, + {21,68,-8}, + {14,61,-15}, + {20,68,-11}, + {12,69,-5}, + {7,66,-8}, + {8,64,-11}, + {10,62,-15}, + {19,66,-14}, + {15,73,-3}, + {18,73,-5}, + {21,72,-8}, + {14,67,-14}, + {8,69,-8}, + {20,72,-11}, + {12,73,-5}, + {9,69,-11}, + {11,67,-14}, + {-13,65,-2}, + {-6,66,-8}, + {19,72,-14}, + {10,73,-8}, + {15,72,-14}, + {-9,62,-15}, + {11,73,-11}, + {12,72,-14}, + {-21,64,-7}, + {-18,61,-15}, + {16,83,-3}, + {18,82,-5}, + {20,82,-8}, + {14,83,-5}, + {19,81,-10}, + {-14,73,-3}, + {-9,73,-8}, + {19,81,-13}, + {11,83,-8}, + {12,82,-10}, + {15,82,-13}, + {13,82,-13}, + {-11,72,-14}, + {-20,72,-8}, + {-18,72,-14}, + {20,91,-7}, + {17,92,-5}, + {19,102,11}, + {19,92,-7}, + {20,93,-6}, + {14,92,-6}, + {21,97,-1}, + {19,91,-10}, + {14,92,-5}, + {18,93,-6}, + {15,93,-6}, + {14,102,11}, + {19,92,-9}, + {19,91,-12}, + {13,93,-7}, + {13,92,-10}, + {16,91,-12}, + {18,92,-12}, + {12,97,-1}, + {14,93,-10}, + {15,93,-12}, + {20,106,11}, + {13,106,11}, + {21,96,-15}, + {22,106,1}, + {-12,92,-7}, + {-15,92,-5}, + {12,96,-15}, + {-13,102,10}, + {-10,97,-1}, + {11,106,-2}, + {-19,91,-7}, + {-13,91,-12}, + {-18,102,10}, + {-20,97,-1}, + {-12,106,10}, + {-19,91,-14}, + {20,104,-17}, + {-19,106,10}, + {-11,96,-16}, + {13,104,-17}, + {-9,105,-2}, + {-20,96,-16}, + {-21,106,0}, + {-12,104,-18}, + {-19,104,-18} +}; + +SVECTOR modelLara_normal[] = { + -912,2168,-3353,0, + -2370,170,-3336,0, + -3339,442,-2330,0, + -524,-1329,-3839,0, + 120,1738,-3707,0, + -2382,-1939,-2709,0, + 71,1588,-3775,0, + -3623,-348,-1878,0, + 61,451,-4070,0, + 814,2562,-3090,0, + -3620,-48,-1915,0, + 50,-695,-4036,0, + -3193,-485,-2519,0, + 0,345,-4081,0, + -68,-914,-3992,0, + -1999,-653,-3515,0, + -173,-3077,-2697,0, + -6,4095,92,0, + 722,-995,-3907,0, + 2378,336,-3318,0, + -2921,2644,1118,0, + -3893,-1272,-19,0, + 1884,-732,-3562,0, + 3399,449,-2240,0, + 3681,-271,-1776,0, + -3196,-2512,-500,0, + -2297,-3117,-1335,0, + 3152,-284,-2600,0, + 3615,174,-1918,0, + 2627,-1651,-2674,0, + -102,-3183,-2575,0, + -719,3619,1777,0, + -3917,-857,834,0, + 2328,-3040,-1454,0, + -800,1795,-3594,0, + -3055,1197,-2452,0, + -1818,3118,-1936,0, + 787,3607,1774,0, + -2788,2567,-1553,0, + -2915,2375,-1623,0, + -3538,-1970,613,0, + -2044,-1073,-3383,0, + -451,3423,-2203,0, + 190,2907,-2880,0, + 2988,2605,1031,0, + -2742,1649,-2557,0, + -792,265,-4010,0, + 3948,-1086,-94,0, + -4036,254,-650,0, + -721,3251,-2385,0, + -2273,2620,-2178,0, + -3287,2324,-757,0, + -472,-1740,-3678,0, + -1591,2107,3132,0, + -331,2815,-2957,0, + 220,4002,841,0, + -2701,-2366,-1971,0, + 3027,2649,-775,0, + -4066,-398,292,0, + -1185,2829,-2714,0, + 3380,-480,-2262,0, + 2273,2620,-2178,0, + 3493,-2098,-419,0, + -1169,-3810,946,0, + -883,2464,3151,0, + -3026,2083,1812,0, + 1774,2060,3063,0, + -582,-3198,-2492,0, + -2564,1370,2885,0, + 3588,-1918,471,0, + -2135,2712,2205,0, + -3446,-2036,-870,0, + 3373,819,2175,0, + -2090,-2894,2007,0, + 1177,-3828,858,0, + -3122,-2578,619,0, + 3954,-653,848,0, + 800,1791,-3595,0, + 1108,2831,-2745,0, + 481,3420,-2201,0, + 322,2831,-2943,0, + -2057,2455,2553,0, + 742,3262,-2363,0, + 2156,2691,2210,0, + -3999,-109,877,0, + -1727,1921,3178,0, + 472,-1740,-3678,0, + -639,-2133,-3438,0, + -2417,3238,671,0, + -2644,-3077,-564,0, + 1841,3098,-1948,0, + 2628,1341,2841,0, + -1460,2442,2946,0, + 2137,-2846,2028,0, + 2044,-1073,-3383,0, + 3055,1197,-2452,0, + 3178,-2446,833,0, + 2892,2328,-1731,0, + 1424,2434,2971,0, + -2402,-1496,-2961,0, + 2746,2597,-1578,0, + 582,-3198,-2492,0, + -1904,63,3626,0, + -766,-26,-4024,0, + 3145,1580,-2094,0, + -3697,1719,-390,0, + 2583,-3142,-482,0, + 3963,-170,1020,0, + -1585,-3301,1835,0, + 1633,1851,3269,0, + -370,2911,-2857,0, + -2251,1912,2838,0, + -3093,2590,-711,0, + -3422,-622,-2163,0, + 4050,137,-597,0, + 2802,-2428,-1740,0, + 1904,63,3626,0, + -2071,-3375,-1048,0, + 1585,-3301,1835,0, + -388,3987,855,0, + 822,328,-3999,0, + 777,-2169,-3387,0, + 3242,-1705,-1832,0, + -4057,26,563,0, + -1224,1537,3594,0, + 4018,-699,380,0, + 2003,2286,2746,0, + -3345,721,2252,0, + -2078,-2322,2658,0, + 3328,-2331,-515,0, + 187,-3937,1114,0, + 2417,3238,671,0, + 3014,1955,1967,0, + -3264,-2111,1291,0, + -2847,59,-2944,0, + 2848,-685,2863,0, + 3175,2478,-744,0, + 793,2485,3158,0, + 2473,-1534,-2882,0, + -1977,2255,-2790,0, + -2081,-3110,1665,0, + -2710,-1707,2553,0, + -1928,-1079,3449,0, + 2251,1912,2838,0, + -1586,2414,-2904,0, + -2582,134,3177,0, + -2854,2833,779,0, + 2981,-200,-2801,0, + 2895,818,-2780,0, + -2099,3264,1312,0, + -1094,-14,-3947,0, + 4067,1,489,0, + -3694,1227,-1273,0, + -1814,476,3641,0, + 3195,-2215,1288,0, + -2994,-1038,-2595,0, + 1959,2204,-2843,0, + 2843,-1606,2473,0, + 2771,421,2986,0, + 2161,-3098,1584,0, + 1928,-1079,3449,0, + -3108,1787,-1980,0, + 1726,2384,-2849,0, + 2748,-335,3019,0, + 1516,-2853,-2517,0, + 1069,-24,-3954,0, + -3786,-844,-1314,0, + 2214,3138,1423,0, + -3020,-957,2596,0, + -1117,-1666,-3571,0, + -2904,2110,1972,0, + -2366,2098,2603,0, + 1174,566,-3883,0, + -3175,-1739,-1916,0, + 1871,2614,2539,0, + 1581,-2876,2450,0, + -2693,-775,2987,0, + 2075,-3156,-1583,0, + 27,-3930,1154,0, + 3746,1656,60,0, + 1055,1525,3652,0, + 3618,1316,-1398,0, + 1982,-2372,2687,0, + 410,294,-4065,0, + 1494,-3158,-2138,0, + 2119,2288,2655,0, + -1731,2394,-2836,0, + -3438,-1974,-1031,0, + -2314,-394,3356,0, + -1420,-3486,-1616,0, + 1085,-3024,-2540,0, + -3013,-1787,2123,0, + 3019,-257,2756,0, + -1733,-2511,2733,0, + 3103,1802,-1976,0, + -3252,260,2476,0, + 3830,-701,-1271,0, + -1960,2609,2476,0, + -100,-688,-4036,0, + 1693,-2609,2665,0, + -3935,-90,-1135,0, + 100,-613,4049,0, + 2805,2113,2109,0, + -2700,-1973,-2365,0, + 2504,355,-3222,0, + 4058,-375,-412,0, + -2530,-2167,2383,0, + 1586,-2994,2301,0, + 2846,-3,2946,0, + 2436,-520,3252,0, + 3865,-746,-1131,0, + -2509,289,3225,0, + -1713,-2643,-2619,0, + 77,-658,-4042,0, + -3882,-676,-1116,0, + 2858,-714,-2845,0, + -1214,-2977,-2537,0, + 2347,-136,3354,0, + 3357,-2063,-1119,0, + -1557,-2897,2441,0, + 2870,-1869,2246,0, + -1802,-2566,2635,0, + 3243,-940,2318,0, + 3889,-359,-1234,0, + -2303,-300,3374,0, + 2403,-143,3314,0, + -111,-1981,-3583,0, + -21,-3753,1641,0, + -3800,-1162,-993,0, + -2325,4,3372,0, + 3812,-1338,-673,0, + 2310,-913,3256,0, + 1,-324,-4083,0, + -2758,221,-3020,0, + -3694,1049,-1424,0, + -3613,1649,1001,0, + 2790,-505,-2956,0, + -2135,2116,2782,0, + 345,-1978,-3570,0, + -3714,-1701,-304,0, + 62,1851,3653,0, + -1759,-1206,3496,0, + 3849,-1141,-811,0, + 3884,94,-1298,0, + 3881,632,1147,0, + 2415,1527,2935,0, + 2839,-639,2882,0, + -48,-550,-4059,0, + -2574,-213,-3178,0, + -3979,166,-958,0, + -36,90,-4095,0, + -3834,648,1288,0, + -2260,906,3294,0, + 2541,-772,-3118,0, + -22,-580,-4055,0, + -2714,-351,-3047,0, + -3902,-612,-1086,0, + 31,680,4039,0, + -3803,-342,1482,0, + 2659,-830,-3002,0, + 3953,-717,-795,0, + 3817,-237,1467,0, + 2286,393,3376,0, + -2279,-451,3373,0, + -34,-396,-4077,0, + -2826,-70,-2964,0, + -3969,-313,-963,0, + -80,-548,4058,0, + 3737,-1381,-949,0, + -3859,-331,1333,0, + 2821,-492,-2929,0, + 3562,-1154,1659,0, + 2034,-933,3430,0, + -13,-525,-4062,0, + -3936,-746,-854,0, + -2402,-415,3292,0, + 3890,-943,-870,0, + -68,-407,4075,0, + -2262,388,3392,0, + 3678,-958,1527,0, + 2134,-797,3404,0, + 3980,156,-953,0, + 2272,901,3287,0, + 104,-291,-4084,0, + -2719,38,-3063,0, + -3976,-99,-980,0, + 2720,-243,-3053,0, + -3913,-148,1203,0, + 18,-423,-4074,0, + -3896,-934,-849,0, + -2486,-285,3242,0, + 3969,-724,-708,0, + 3875,-655,1154,0, + -85,-298,4084,0, + 2488,-506,3214,0, + -2149,-776,3399,0, + 3961,-329,-988,0, + 2352,-408,3329,0, + -4059,-476,-270,0, + -311,-465,-4057,0, + -2018,2012,-2942,0, + 1929,-3373,1295,0, + -3349,1760,-1570,0, + -25,-1324,-3876,0, + -2941,2568,-1239,0, + -3873,-685,1143,0, + 2796,1451,-2618,0, + -483,-2518,-3194,0, + 907,-928,-3885,0, + 2125,1922,-2927,0, + -3640,-1483,1154,0, + -2568,1081,3002,0, + 3739,-1373,-955,0, + 3691,-1226,1285,0, + 188,-840,4004,0, + -1733,-1711,3293,0, + 3068,2417,-1233,0, + 3089,-2206,1539,0, + 2367,2019,2664,0, + -2244,-2328,-2514,0, + 2184,-2422,-2478,0, + -2673,1512,2710,0, + -3233,-2514,-61,0, + -3835,-723,-1244,0, + 135,-2833,-2955,0, + 2743,1679,2536,0, + -2047,1890,-3003,0, + -3044,2405,-1313,0, + 3110,-2662,132,0, + 3691,-320,-1747,0, + -3219,-368,2505,0, + 2028,1903,-3007,0, + 3068,2348,-1362,0, + -2202,-2442,-2442,0, + 2677,122,3098,0, + -2236,-2016,2777,0, + 2199,-2429,-2458,0, + -2852,1285,2644,0, + 2134,-2104,2792,0, + -3168,-2593,116,0, + 2853,952,2780,0, + 3151,-2616,-43,0, + -2133,-2049,2833,0, + 2157,-2043,2820,0 +}; + +SVECTOR modelLara_uv[] = { + 22,62, 0, 0, + 22,1, 0, 0, + 1,1, 0, 0, + 22,62, 0, 0, + 1,1, 0, 0, + 1,62, 0, 0, + 138,127, 0, 0, + 138,122, 0, 0, + 143,122, 0, 0, + 138,127, 0, 0, + 143,122, 0, 0, + 143,127, 0, 0, + 1,159, 0, 0, + 1,146, 0, 0, + 38,146, 0, 0, + 1,159, 0, 0, + 38,146, 0, 0, + 38,159, 0, 0, + 78,62, 0, 0, + 78,41, 0, 0, + 25,41, 0, 0, + 78,62, 0, 0, + 25,41, 0, 0, + 25,62, 0, 0, + 81,62, 0, 0, + 81,41, 0, 0, + 118,41, 0, 0, + 81,62, 0, 0, + 118,41, 0, 0, + 118,62, 0, 0, + 1,62, 0, 0, + 1,1, 0, 0, + 22,1, 0, 0, + 1,62, 0, 0, + 22,1, 0, 0, + 22,62, 0, 0, + 202,30, 0, 0, + 202,1, 0, 0, + 247,1, 0, 0, + 247,1, 0, 0, + 224,30, 0, 0, + 202,30, 0, 0, + 239,175, 0, 0, + 239,162, 0, 0, + 226,162, 0, 0, + 239,175, 0, 0, + 226,162, 0, 0, + 226,175, 0, 0, + 210,111, 0, 0, + 232,98, 0, 0, + 255,98, 0, 0, + 210,111, 0, 0, + 255,98, 0, 0, + 255,111, 0, 0, + 121,62, 0, 0, + 151,41, 0, 0, + 121,41, 0, 0, + 151,41, 0, 0, + 121,62, 0, 0, + 151,62, 0, 0, + 199,62, 0, 0, + 178,41, 0, 0, + 178,62, 0, 0, + 226,41, 0, 0, + 247,62, 0, 0, + 247,41, 0, 0, + 247,62, 0, 0, + 226,41, 0, 0, + 226,62, 0, 0, + 151,127, 0, 0, + 146,127, 0, 0, + 146,122, 0, 0, + 135,122, 0, 0, + 130,127, 0, 0, + 130,122, 0, 0, + 151,41, 0, 0, + 121,62, 0, 0, + 121,41, 0, 0, + 121,62, 0, 0, + 151,41, 0, 0, + 151,62, 0, 0, + 178,41, 0, 0, + 199,62, 0, 0, + 178,62, 0, 0, + 247,62, 0, 0, + 226,41, 0, 0, + 247,41, 0, 0, + 226,41, 0, 0, + 247,62, 0, 0, + 226,62, 0, 0, + 146,127, 0, 0, + 151,122, 0, 0, + 146,122, 0, 0, + 191,162, 0, 0, + 178,175, 0, 0, + 178,162, 0, 0, + 186,122, 0, 0, + 186,122, 0, 0, + 186,122, 0, 0, + 118,38, 0, 0, + 118,1, 0, 0, + 105,1, 0, 0, + 186,122, 0, 0, + 186,122, 0, 0, + 186,122, 0, 0, + 17,119, 0, 0, + 17,98, 0, 0, + 30,98, 0, 0, + 17,119, 0, 0, + 30,98, 0, 0, + 30,119, 0, 0, + 30,119, 0, 0, + 30,98, 0, 0, + 17,98, 0, 0, + 30,119, 0, 0, + 17,98, 0, 0, + 17,119, 0, 0, + 89,1, 0, 0, + 102,38, 0, 0, + 102,1, 0, 0, + 151,127, 0, 0, + 146,122, 0, 0, + 151,122, 0, 0, + 121,1, 0, 0, + 135,38, 0, 0, + 135,1, 0, 0, + 146,127, 0, 0, + 146,122, 0, 0, + 151,122, 0, 0, + 118,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 118,127, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 70,38, 0, 0, + 57,1, 0, 0, + 57,38, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 30,98, 0, 0, + 17,119, 0, 0, + 30,119, 0, 0, + 17,119, 0, 0, + 30,98, 0, 0, + 17,98, 0, 0, + 17,119, 0, 0, + 30,98, 0, 0, + 17,98, 0, 0, + 30,98, 0, 0, + 17,119, 0, 0, + 30,119, 0, 0, + 17,98, 0, 0, + 30,119, 0, 0, + 30,98, 0, 0, + 30,119, 0, 0, + 17,98, 0, 0, + 17,119, 0, 0, + 118,38, 0, 0, + 105,1, 0, 0, + 105,38, 0, 0, + 135,38, 0, 0, + 121,1, 0, 0, + 121,38, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 86,38, 0, 0, + 73,1, 0, 0, + 73,38, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 113,122, 0, 0, + 118,122, 0, 0, + 226,94, 0, 0, + 226,65, 0, 0, + 239,65, 0, 0, + 14,98, 0, 0, + 1,127, 0, 0, + 14,127, 0, 0, + 226,94, 0, 0, + 239,65, 0, 0, + 239,94, 0, 0, + 118,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 118,127, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 1,127, 0, 0, + 14,98, 0, 0, + 1,98, 0, 0, + 14,98, 0, 0, + 1,127, 0, 0, + 1,98, 0, 0, + 1,127, 0, 0, + 14,98, 0, 0, + 14,127, 0, 0, + 242,65, 0, 0, + 255,94, 0, 0, + 242,94, 0, 0, + 255,94, 0, 0, + 242,65, 0, 0, + 255,65, 0, 0, + 242,65, 0, 0, + 255,94, 0, 0, + 255,65, 0, 0, + 255,94, 0, 0, + 242,65, 0, 0, + 242,94, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 118,127, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 226,146, 0, 0, + 255,159, 0, 0, + 255,146, 0, 0, + 175,175, 0, 0, + 175,162, 0, 0, + 162,162, 0, 0, + 175,175, 0, 0, + 162,162, 0, 0, + 162,175, 0, 0, + 255,159, 0, 0, + 226,146, 0, 0, + 226,159, 0, 0, + 49,191, 0, 0, + 49,178, 0, 0, + 62,178, 0, 0, + 49,191, 0, 0, + 62,178, 0, 0, + 62,191, 0, 0, + 255,146, 0, 0, + 226,159, 0, 0, + 226,146, 0, 0, + 81,119, 0, 0, + 81,98, 0, 0, + 94,98, 0, 0, + 81,119, 0, 0, + 94,98, 0, 0, + 94,119, 0, 0, + 46,191, 0, 0, + 46,178, 0, 0, + 33,178, 0, 0, + 46,191, 0, 0, + 33,178, 0, 0, + 33,191, 0, 0, + 194,162, 0, 0, + 207,175, 0, 0, + 194,175, 0, 0, + 207,175, 0, 0, + 194,162, 0, 0, + 207,162, 0, 0, + 194,175, 0, 0, + 207,162, 0, 0, + 194,162, 0, 0, + 207,162, 0, 0, + 194,175, 0, 0, + 207,175, 0, 0, + 223,162, 0, 0, + 210,175, 0, 0, + 210,162, 0, 0, + 210,175, 0, 0, + 223,162, 0, 0, + 223,175, 0, 0, + 159,175, 0, 0, + 146,162, 0, 0, + 146,175, 0, 0, + 194,146, 0, 0, + 223,159, 0, 0, + 194,159, 0, 0, + 223,159, 0, 0, + 194,146, 0, 0, + 223,146, 0, 0, + 223,159, 0, 0, + 194,146, 0, 0, + 194,159, 0, 0, + 194,146, 0, 0, + 223,159, 0, 0, + 223,146, 0, 0, + 186,122, 0, 0, + 186,122, 0, 0, + 186,122, 0, 0, + 186,122, 0, 0, + 186,122, 0, 0, + 186,122, 0, 0, + 17,119, 0, 0, + 17,98, 0, 0, + 30,98, 0, 0, + 17,119, 0, 0, + 30,98, 0, 0, + 30,119, 0, 0, + 17,119, 0, 0, + 17,98, 0, 0, + 30,98, 0, 0, + 17,119, 0, 0, + 30,98, 0, 0, + 30,119, 0, 0, + 73,38, 0, 0, + 86,1, 0, 0, + 86,38, 0, 0, + 118,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 57,38, 0, 0, + 70,1, 0, 0, + 70,38, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 17,119, 0, 0, + 30,98, 0, 0, + 30,119, 0, 0, + 30,98, 0, 0, + 17,119, 0, 0, + 17,98, 0, 0, + 30,98, 0, 0, + 17,119, 0, 0, + 17,98, 0, 0, + 17,119, 0, 0, + 30,98, 0, 0, + 30,119, 0, 0, + 17,119, 0, 0, + 30,98, 0, 0, + 30,119, 0, 0, + 30,98, 0, 0, + 17,119, 0, 0, + 17,98, 0, 0, + 57,38, 0, 0, + 57,1, 0, 0, + 70,1, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,124, 0, 0, + 116,124, 0, 0, + 116,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 1,127, 0, 0, + 8,112, 0, 0, + 8,127, 0, 0, + 113,124, 0, 0, + 116,124, 0, 0, + 116,122, 0, 0, + 113,124, 0, 0, + 116,122, 0, 0, + 113,122, 0, 0, + 113,124, 0, 0, + 116,124, 0, 0, + 116,122, 0, 0, + 1,112, 0, 0, + 8,98, 0, 0, + 1,98, 0, 0, + 8,112, 0, 0, + 1,127, 0, 0, + 8,127, 0, 0, + 8,127, 0, 0, + 14,112, 0, 0, + 14,127, 0, 0, + 8,127, 0, 0, + 8,112, 0, 0, + 14,112, 0, 0, + 8,112, 0, 0, + 14,98, 0, 0, + 14,112, 0, 0, + 116,127, 0, 0, + 116,124, 0, 0, + 113,124, 0, 0, + 118,124, 0, 0, + 116,122, 0, 0, + 118,122, 0, 0, + 116,127, 0, 0, + 116,124, 0, 0, + 113,124, 0, 0, + 226,94, 0, 0, + 226,80, 0, 0, + 232,80, 0, 0, + 226,94, 0, 0, + 232,80, 0, 0, + 232,94, 0, 0, + 118,127, 0, 0, + 118,124, 0, 0, + 116,124, 0, 0, + 118,127, 0, 0, + 116,124, 0, 0, + 116,127, 0, 0, + 118,127, 0, 0, + 118,124, 0, 0, + 116,124, 0, 0, + 118,127, 0, 0, + 116,124, 0, 0, + 116,127, 0, 0, + 14,98, 0, 0, + 8,112, 0, 0, + 8,98, 0, 0, + 14,98, 0, 0, + 8,112, 0, 0, + 14,112, 0, 0, + 1,127, 0, 0, + 8,112, 0, 0, + 1,112, 0, 0, + 255,94, 0, 0, + 248,80, 0, 0, + 248,94, 0, 0, + 242,65, 0, 0, + 248,80, 0, 0, + 248,65, 0, 0, + 242,65, 0, 0, + 248,80, 0, 0, + 242,80, 0, 0, + 255,94, 0, 0, + 248,80, 0, 0, + 255,80, 0, 0, + 113,127, 0, 0, + 116,124, 0, 0, + 113,124, 0, 0, + 113,127, 0, 0, + 116,124, 0, 0, + 113,124, 0, 0, + 113,127, 0, 0, + 116,124, 0, 0, + 113,124, 0, 0, + 113,127, 0, 0, + 116,124, 0, 0, + 113,124, 0, 0, + 113,127, 0, 0, + 116,124, 0, 0, + 113,124, 0, 0, + 113,127, 0, 0, + 116,124, 0, 0, + 113,124, 0, 0, + 113,127, 0, 0, + 116,124, 0, 0, + 113,124, 0, 0, + 113,127, 0, 0, + 116,124, 0, 0, + 113,124, 0, 0, + 113,127, 0, 0, + 116,124, 0, 0, + 113,124, 0, 0, + 113,127, 0, 0, + 116,124, 0, 0, + 113,124, 0, 0, + 113,124, 0, 0, + 116,124, 0, 0, + 116,122, 0, 0, + 113,127, 0, 0, + 116,124, 0, 0, + 113,124, 0, 0, + 113,127, 0, 0, + 116,124, 0, 0, + 113,124, 0, 0, + 121,122, 0, 0, + 124,124, 0, 0, + 121,124, 0, 0, + 121,122, 0, 0, + 124,124, 0, 0, + 121,124, 0, 0, + 121,124, 0, 0, + 124,127, 0, 0, + 121,127, 0, 0, + 121,124, 0, 0, + 124,124, 0, 0, + 124,127, 0, 0, + 124,124, 0, 0, + 126,127, 0, 0, + 124,127, 0, 0, + 124,124, 0, 0, + 126,127, 0, 0, + 124,127, 0, 0, + 121,124, 0, 0, + 124,127, 0, 0, + 121,127, 0, 0, + 121,127, 0, 0, + 126,122, 0, 0, + 126,127, 0, 0, + 226,146, 0, 0, + 255,159, 0, 0, + 226,159, 0, 0, + 121,124, 0, 0, + 124,127, 0, 0, + 121,127, 0, 0, + 121,122, 0, 0, + 124,124, 0, 0, + 121,124, 0, 0, + 124,124, 0, 0, + 126,127, 0, 0, + 124,127, 0, 0, + 121,124, 0, 0, + 124,127, 0, 0, + 121,127, 0, 0, + 121,124, 0, 0, + 124,124, 0, 0, + 124,127, 0, 0, + 124,124, 0, 0, + 126,127, 0, 0, + 124,127, 0, 0, + 118,127, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 116,124, 0, 0, + 118,122, 0, 0, + 116,122, 0, 0, + 113,124, 0, 0, + 116,122, 0, 0, + 113,122, 0, 0, + 113,124, 0, 0, + 116,124, 0, 0, + 116,122, 0, 0, + 113,124, 0, 0, + 116,122, 0, 0, + 113,122, 0, 0, + 113,124, 0, 0, + 116,124, 0, 0, + 116,122, 0, 0, + 116,124, 0, 0, + 118,122, 0, 0, + 116,122, 0, 0, + 116,124, 0, 0, + 118,122, 0, 0, + 116,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,124, 0, 0, + 116,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 116,124, 0, 0, + 118,122, 0, 0, + 116,122, 0, 0, + 113,124, 0, 0, + 116,122, 0, 0, + 113,122, 0, 0, + 113,124, 0, 0, + 116,124, 0, 0, + 116,122, 0, 0, + 113,124, 0, 0, + 116,122, 0, 0, + 113,122, 0, 0, + 113,124, 0, 0, + 116,124, 0, 0, + 116,122, 0, 0, + 116,124, 0, 0, + 118,122, 0, 0, + 116,122, 0, 0, + 146,175, 0, 0, + 159,162, 0, 0, + 159,175, 0, 0, + 255,159, 0, 0, + 226,146, 0, 0, + 255,146, 0, 0, + 113,124, 0, 0, + 116,122, 0, 0, + 113,122, 0, 0, + 113,124, 0, 0, + 116,124, 0, 0, + 116,122, 0, 0, + 116,124, 0, 0, + 118,122, 0, 0, + 116,122, 0, 0, + 113,124, 0, 0, + 116,122, 0, 0, + 113,122, 0, 0, + 113,124, 0, 0, + 116,124, 0, 0, + 116,122, 0, 0, + 116,124, 0, 0, + 118,122, 0, 0, + 116,122, 0, 0, + 113,124, 0, 0, + 116,122, 0, 0, + 113,122, 0, 0, + 116,124, 0, 0, + 118,122, 0, 0, + 116,122, 0, 0, + 113,124, 0, 0, + 116,122, 0, 0, + 113,122, 0, 0, + 113,124, 0, 0, + 116,124, 0, 0, + 116,122, 0, 0, + 116,124, 0, 0, + 118,122, 0, 0, + 116,122, 0, 0, + 113,124, 0, 0, + 116,122, 0, 0, + 113,122, 0, 0, + 113,124, 0, 0, + 116,124, 0, 0, + 116,122, 0, 0, + 116,124, 0, 0, + 118,122, 0, 0, + 116,122, 0, 0, + 113,124, 0, 0, + 116,122, 0, 0, + 113,122, 0, 0, + 113,124, 0, 0, + 116,124, 0, 0, + 116,122, 0, 0, + 116,124, 0, 0, + 118,122, 0, 0, + 116,122, 0, 0, + 116,124, 0, 0, + 118,122, 0, 0, + 116,122, 0, 0, + 113,124, 0, 0, + 116,122, 0, 0, + 113,122, 0, 0, + 113,124, 0, 0, + 116,124, 0, 0, + 116,122, 0, 0, + 116,124, 0, 0, + 118,122, 0, 0, + 116,122, 0, 0, + 255,80, 0, 0, + 248,65, 0, 0, + 255,65, 0, 0, + 255,80, 0, 0, + 248,80, 0, 0, + 248,65, 0, 0, + 248,80, 0, 0, + 242,65, 0, 0, + 248,65, 0, 0, + 242,80, 0, 0, + 248,94, 0, 0, + 242,94, 0, 0, + 242,80, 0, 0, + 248,80, 0, 0, + 248,94, 0, 0, + 248,80, 0, 0, + 255,94, 0, 0, + 248,94, 0, 0, + 248,65, 0, 0, + 255,80, 0, 0, + 255,65, 0, 0, + 248,65, 0, 0, + 248,80, 0, 0, + 255,80, 0, 0, + 248,80, 0, 0, + 255,94, 0, 0, + 255,80, 0, 0, + 248,94, 0, 0, + 242,80, 0, 0, + 242,94, 0, 0, + 248,94, 0, 0, + 248,80, 0, 0, + 242,80, 0, 0, + 248,80, 0, 0, + 242,65, 0, 0, + 242,80, 0, 0, + 1,112, 0, 0, + 8,112, 0, 0, + 8,98, 0, 0, + 8,112, 0, 0, + 14,98, 0, 0, + 8,98, 0, 0, + 14,112, 0, 0, + 8,127, 0, 0, + 14,127, 0, 0, + 14,112, 0, 0, + 8,112, 0, 0, + 8,127, 0, 0, + 8,98, 0, 0, + 1,112, 0, 0, + 1,98, 0, 0, + 8,98, 0, 0, + 8,112, 0, 0, + 1,112, 0, 0, + 8,112, 0, 0, + 1,127, 0, 0, + 1,112, 0, 0, + 116,127, 0, 0, + 113,124, 0, 0, + 113,127, 0, 0, + 116,127, 0, 0, + 113,124, 0, 0, + 113,127, 0, 0, + 116,124, 0, 0, + 113,122, 0, 0, + 113,124, 0, 0, + 116,124, 0, 0, + 116,122, 0, 0, + 113,122, 0, 0, + 116,124, 0, 0, + 118,124, 0, 0, + 116,122, 0, 0, + 118,124, 0, 0, + 118,122, 0, 0, + 116,122, 0, 0, + 232,94, 0, 0, + 239,80, 0, 0, + 239,94, 0, 0, + 232,94, 0, 0, + 232,80, 0, 0, + 239,80, 0, 0, + 232,80, 0, 0, + 239,65, 0, 0, + 239,80, 0, 0, + 232,80, 0, 0, + 232,65, 0, 0, + 239,65, 0, 0, + 232,80, 0, 0, + 226,80, 0, 0, + 232,65, 0, 0, + 226,80, 0, 0, + 226,65, 0, 0, + 232,65, 0, 0, + 162,175, 0, 0, + 162,162, 0, 0, + 175,162, 0, 0, + 234,119, 0, 0, + 247,114, 0, 0, + 247,119, 0, 0, + 162,175, 0, 0, + 175,162, 0, 0, + 175,175, 0, 0, + 49,191, 0, 0, + 49,178, 0, 0, + 62,178, 0, 0, + 49,191, 0, 0, + 62,178, 0, 0, + 62,191, 0, 0, + 234,119, 0, 0, + 234,114, 0, 0, + 247,114, 0, 0, + 234,119, 0, 0, + 234,114, 0, 0, + 247,114, 0, 0, + 94,119, 0, 0, + 94,98, 0, 0, + 81,98, 0, 0, + 94,119, 0, 0, + 81,98, 0, 0, + 81,119, 0, 0, + 33,191, 0, 0, + 33,178, 0, 0, + 46,178, 0, 0, + 33,191, 0, 0, + 46,178, 0, 0, + 46,191, 0, 0, + 207,175, 0, 0, + 194,162, 0, 0, + 194,175, 0, 0, + 194,162, 0, 0, + 207,175, 0, 0, + 207,162, 0, 0, + 207,162, 0, 0, + 194,175, 0, 0, + 194,162, 0, 0, + 194,175, 0, 0, + 207,162, 0, 0, + 207,175, 0, 0, + 210,175, 0, 0, + 223,162, 0, 0, + 210,162, 0, 0, + 223,162, 0, 0, + 210,175, 0, 0, + 223,175, 0, 0, + 121,127, 0, 0, + 121,122, 0, 0, + 126,122, 0, 0, + 146,162, 0, 0, + 159,162, 0, 0, + 146,175, 0, 0, + 226,159, 0, 0, + 255,146, 0, 0, + 226,146, 0, 0, + 223,159, 0, 0, + 194,146, 0, 0, + 194,159, 0, 0, + 194,146, 0, 0, + 223,159, 0, 0, + 223,146, 0, 0, + 194,146, 0, 0, + 223,159, 0, 0, + 194,159, 0, 0, + 223,159, 0, 0, + 194,146, 0, 0, + 223,146, 0, 0, + 17,127, 0, 0, + 17,122, 0, 0, + 46,122, 0, 0, + 199,38, 0, 0, + 199,33, 0, 0, + 146,33, 0, 0, + 191,119, 0, 0, + 191,114, 0, 0, + 154,114, 0, 0, + 118,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 118,127, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 17,127, 0, 0, + 46,122, 0, 0, + 46,127, 0, 0, + 199,38, 0, 0, + 146,33, 0, 0, + 146,38, 0, 0, + 154,111, 0, 0, + 154,98, 0, 0, + 207,98, 0, 0, + 154,111, 0, 0, + 207,98, 0, 0, + 207,111, 0, 0, + 146,30, 0, 0, + 146,1, 0, 0, + 199,1, 0, 0, + 146,30, 0, 0, + 199,1, 0, 0, + 199,30, 0, 0, + 97,119, 0, 0, + 97,114, 0, 0, + 151,114, 0, 0, + 97,119, 0, 0, + 151,114, 0, 0, + 151,119, 0, 0, + 255,38, 0, 0, + 255,33, 0, 0, + 202,33, 0, 0, + 255,38, 0, 0, + 202,33, 0, 0, + 202,38, 0, 0, + 191,119, 0, 0, + 154,114, 0, 0, + 154,119, 0, 0, + 118,127, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 231,119, 0, 0, + 231,114, 0, 0, + 194,114, 0, 0, + 231,119, 0, 0, + 194,114, 0, 0, + 194,119, 0, 0, + 49,127, 0, 0, + 49,122, 0, 0, + 78,122, 0, 0, + 49,127, 0, 0, + 78,122, 0, 0, + 78,127, 0, 0, + 159,159, 0, 0, + 159,146, 0, 0, + 121,146, 0, 0, + 159,159, 0, 0, + 121,146, 0, 0, + 121,159, 0, 0, + 118,159, 0, 0, + 118,146, 0, 0, + 81,146, 0, 0, + 118,159, 0, 0, + 81,146, 0, 0, + 81,159, 0, 0, + 247,143, 0, 0, + 247,130, 0, 0, + 210,130, 0, 0, + 247,143, 0, 0, + 210,130, 0, 0, + 210,143, 0, 0, + 118,175, 0, 0, + 118,162, 0, 0, + 97,162, 0, 0, + 118,175, 0, 0, + 97,162, 0, 0, + 97,175, 0, 0, + 89,1, 0, 0, + 102,38, 0, 0, + 89,38, 0, 0, + 78,159, 0, 0, + 78,146, 0, 0, + 41,146, 0, 0, + 78,159, 0, 0, + 41,146, 0, 0, + 41,159, 0, 0, + 49,162, 0, 0, + 70,175, 0, 0, + 49,175, 0, 0, + 81,127, 0, 0, + 81,122, 0, 0, + 110,122, 0, 0, + 81,127, 0, 0, + 110,122, 0, 0, + 110,127, 0, 0, + 118,127, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 118,127, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 118,127, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 162,159, 0, 0, + 191,146, 0, 0, + 191,159, 0, 0, + 70,162, 0, 0, + 49,175, 0, 0, + 70,175, 0, 0, + 113,143, 0, 0, + 167,130, 0, 0, + 113,130, 0, 0, + 167,130, 0, 0, + 113,143, 0, 0, + 167,143, 0, 0, + 138,38, 0, 0, + 143,1, 0, 0, + 138,1, 0, 0, + 94,162, 0, 0, + 73,175, 0, 0, + 73,162, 0, 0, + 65,119, 0, 0, + 78,98, 0, 0, + 65,98, 0, 0, + 65,119, 0, 0, + 78,98, 0, 0, + 65,98, 0, 0, + 65,119, 0, 0, + 78,98, 0, 0, + 65,98, 0, 0, + 65,119, 0, 0, + 78,98, 0, 0, + 65,98, 0, 0, + 65,119, 0, 0, + 78,98, 0, 0, + 65,98, 0, 0, + 65,119, 0, 0, + 78,98, 0, 0, + 65,98, 0, 0, + 65,119, 0, 0, + 78,98, 0, 0, + 65,98, 0, 0, + 65,119, 0, 0, + 78,98, 0, 0, + 65,98, 0, 0, + 65,119, 0, 0, + 78,98, 0, 0, + 65,98, 0, 0, + 65,119, 0, 0, + 78,98, 0, 0, + 65,98, 0, 0, + 65,119, 0, 0, + 78,98, 0, 0, + 65,98, 0, 0, + 65,119, 0, 0, + 78,98, 0, 0, + 65,98, 0, 0, + 121,175, 0, 0, + 143,162, 0, 0, + 143,175, 0, 0, + 207,143, 0, 0, + 170,130, 0, 0, + 170,143, 0, 0, + 143,175, 0, 0, + 121,162, 0, 0, + 121,175, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 49,98, 0, 0, + 62,117, 0, 0, + 49,119, 0, 0, + 62,117, 0, 0, + 49,98, 0, 0, + 49,119, 0, 0, + 250,119, 0, 0, + 255,114, 0, 0, + 250,114, 0, 0, + 255,114, 0, 0, + 250,119, 0, 0, + 255,119, 0, 0, + 154,127, 0, 0, + 159,122, 0, 0, + 154,122, 0, 0, + 159,122, 0, 0, + 154,127, 0, 0, + 158,125, 0, 0, + 138,127, 0, 0, + 142,120, 0, 0, + 138,122, 0, 0, + 137,125, 0, 0, + 143,122, 0, 0, + 138,122, 0, 0, + 138,127, 0, 0, + 143,122, 0, 0, + 138,122, 0, 0, + 162,127, 0, 0, + 167,122, 0, 0, + 167,127, 0, 0, + 138,127, 0, 0, + 143,122, 0, 0, + 138,122, 0, 0, + 143,122, 0, 0, + 138,127, 0, 0, + 143,127, 0, 0, + 138,127, 0, 0, + 143,122, 0, 0, + 138,122, 0, 0, + 143,122, 0, 0, + 138,127, 0, 0, + 143,127, 0, 0, + 143,127, 0, 0, + 138,122, 0, 0, + 143,122, 0, 0, + 138,122, 0, 0, + 143,127, 0, 0, + 138,127, 0, 0, + 143,127, 0, 0, + 138,122, 0, 0, + 143,122, 0, 0, + 138,122, 0, 0, + 143,127, 0, 0, + 138,127, 0, 0, + 138,127, 0, 0, + 143,122, 0, 0, + 138,122, 0, 0, + 138,127, 0, 0, + 143,122, 0, 0, + 138,122, 0, 0, + 138,127, 0, 0, + 143,122, 0, 0, + 138,122, 0, 0, + 138,127, 0, 0, + 143,122, 0, 0, + 138,122, 0, 0, + 255,114, 0, 0, + 250,119, 0, 0, + 250,114, 0, 0, + 250,119, 0, 0, + 255,114, 0, 0, + 255,119, 0, 0, + 159,122, 0, 0, + 154,127, 0, 0, + 154,122, 0, 0, + 154,127, 0, 0, + 159,122, 0, 0, + 158,125, 0, 0, + 138,127, 0, 0, + 142,120, 0, 0, + 138,122, 0, 0, + 138,127, 0, 0, + 143,122, 0, 0, + 137,120, 0, 0, + 138,127, 0, 0, + 143,122, 0, 0, + 138,122, 0, 0, + 167,122, 0, 0, + 162,127, 0, 0, + 167,127, 0, 0, + 143,122, 0, 0, + 138,127, 0, 0, + 138,122, 0, 0, + 138,127, 0, 0, + 143,122, 0, 0, + 143,127, 0, 0, + 143,122, 0, 0, + 138,127, 0, 0, + 138,122, 0, 0, + 138,127, 0, 0, + 143,122, 0, 0, + 143,127, 0, 0, + 143,122, 0, 0, + 138,127, 0, 0, + 138,122, 0, 0, + 138,127, 0, 0, + 143,122, 0, 0, + 143,127, 0, 0, + 143,127, 0, 0, + 138,122, 0, 0, + 143,122, 0, 0, + 138,122, 0, 0, + 143,127, 0, 0, + 138,127, 0, 0, + 138,127, 0, 0, + 143,122, 0, 0, + 138,122, 0, 0, + 138,127, 0, 0, + 143,122, 0, 0, + 138,122, 0, 0, + 138,127, 0, 0, + 143,122, 0, 0, + 138,122, 0, 0, + 138,127, 0, 0, + 143,122, 0, 0, + 138,122, 0, 0, + 250,141, 0, 0, + 255,130, 0, 0, + 250,130, 0, 0, + 1,191, 0, 0, + 14,178, 0, 0, + 14,191, 0, 0, + 1,191, 0, 0, + 14,178, 0, 0, + 1,178, 0, 0, + 30,178, 0, 0, + 17,191, 0, 0, + 17,178, 0, 0, + 30,191, 0, 0, + 17,178, 0, 0, + 17,191, 0, 0, + 143,1, 0, 0, + 138,38, 0, 0, + 138,1, 0, 0, + 17,191, 0, 0, + 30,178, 0, 0, + 30,191, 0, 0, + 17,178, 0, 0, + 30,191, 0, 0, + 30,178, 0, 0, + 73,175, 0, 0, + 94,162, 0, 0, + 73,162, 0, 0, + 14,178, 0, 0, + 1,191, 0, 0, + 14,191, 0, 0, + 70,175, 0, 0, + 49,162, 0, 0, + 70,162, 0, 0, + 143,162, 0, 0, + 121,175, 0, 0, + 121,162, 0, 0, + 121,162, 0, 0, + 143,175, 0, 0, + 143,162, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 255,130, 0, 0, + 250,141, 0, 0, + 250,130, 0, 0, + 14,178, 0, 0, + 1,191, 0, 0, + 1,178, 0, 0, + 49,98, 0, 0, + 62,117, 0, 0, + 62,98, 0, 0, + 46,160, 0, 0, + 25,175, 0, 0, + 46,175, 0, 0, + 62,117, 0, 0, + 49,98, 0, 0, + 62,98, 0, 0, + 25,175, 0, 0, + 46,160, 0, 0, + 46,175, 0, 0, + 22,162, 0, 0, + 1,175, 0, 0, + 22,175, 0, 0, + 1,175, 0, 0, + 22,162, 0, 0, + 1,162, 0, 0, + 1,162, 0, 0, + 22,175, 0, 0, + 1,175, 0, 0, + 22,175, 0, 0, + 1,162, 0, 0, + 22,162, 0, 0, + 170,122, 0, 0, + 175,127, 0, 0, + 175,122, 0, 0, + 175,127, 0, 0, + 170,122, 0, 0, + 175,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 118,127, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 118,127, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 118,127, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 118,127, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 118,127, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 118,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 118,127, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 118,127, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 49,175, 0, 0, + 70,162, 0, 0, + 49,162, 0, 0, + 118,127, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 118,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 118,127, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 118,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 207,143, 0, 0, + 207,130, 0, 0, + 170,130, 0, 0, + 118,127, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 162,159, 0, 0, + 162,146, 0, 0, + 191,146, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 118,127, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,127, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 105,94, 0, 0, + 126,65, 0, 0, + 126,94, 0, 0, + 189,122, 0, 0, + 189,122, 0, 0, + 189,122, 0, 0, + 154,94, 0, 0, + 175,65, 0, 0, + 175,94, 0, 0, + 199,94, 0, 0, + 178,65, 0, 0, + 178,94, 0, 0, + 151,94, 0, 0, + 130,65, 0, 0, + 130,94, 0, 0, + 202,94, 0, 0, + 202,65, 0, 0, + 223,65, 0, 0, + 202,94, 0, 0, + 223,65, 0, 0, + 223,94, 0, 0, + 199,94, 0, 0, + 199,65, 0, 0, + 178,65, 0, 0, + 118,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 118,127, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 118,127, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 118,127, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 118,127, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 118,127, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 102,38, 0, 0, + 89,1, 0, 0, + 102,1, 0, 0, + 116,124, 0, 0, + 118,122, 0, 0, + 116,122, 0, 0, + 118,127, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 118,127, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,127, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,127, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 118,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 118,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 121,1, 0, 0, + 135,38, 0, 0, + 121,38, 0, 0, + 118,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 116,124, 0, 0, + 113,124, 0, 0, + 118,127, 0, 0, + 113,127, 0, 0, + 113,122, 0, 0, + 178,94, 0, 0, + 199,65, 0, 0, + 199,94, 0, 0, + 105,94, 0, 0, + 126,65, 0, 0, + 126,94, 0, 0, + 175,94, 0, 0, + 154,65, 0, 0, + 175,65, 0, 0, + 130,94, 0, 0, + 151,65, 0, 0, + 151,94, 0, 0, + 202,94, 0, 0, + 202,65, 0, 0, + 223,65, 0, 0, + 202,94, 0, 0, + 223,65, 0, 0, + 223,94, 0, 0, + 130,94, 0, 0, + 130,65, 0, 0, + 151,65, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 54,1, 0, 0, + 25,38, 0, 0, + 54,38, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 97,111, 0, 0, + 151,98, 0, 0, + 151,111, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 54,38, 0, 0, + 25,1, 0, 0, + 25,38, 0, 0, + 54,38, 0, 0, + 25,1, 0, 0, + 25,38, 0, 0, + 25,1, 0, 0, + 54,38, 0, 0, + 25,38, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 41,94, 0, 0, + 70,65, 0, 0, + 41,65, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 242,175, 0, 0, + 255,162, 0, 0, + 255,175, 0, 0, + 242,175, 0, 0, + 255,162, 0, 0, + 255,175, 0, 0, + 242,175, 0, 0, + 255,162, 0, 0, + 255,175, 0, 0, + 255,162, 0, 0, + 242,175, 0, 0, + 242,162, 0, 0, + 242,162, 0, 0, + 255,175, 0, 0, + 242,175, 0, 0, + 255,162, 0, 0, + 242,175, 0, 0, + 242,162, 0, 0, + 242,175, 0, 0, + 255,162, 0, 0, + 255,175, 0, 0, + 255,162, 0, 0, + 242,175, 0, 0, + 242,162, 0, 0, + 255,175, 0, 0, + 242,162, 0, 0, + 255,162, 0, 0, + 255,162, 0, 0, + 242,175, 0, 0, + 242,162, 0, 0, + 54,38, 0, 0, + 25,1, 0, 0, + 54,1, 0, 0, + 54,38, 0, 0, + 25,1, 0, 0, + 25,38, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 54,38, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 54,38, 0, 0, + 54,1, 0, 0, + 25,38, 0, 0, + 25,1, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 54,38, 0, 0, + 54,1, 0, 0, + 25,38, 0, 0, + 25,1, 0, 0, + 54,38, 0, 0, + 25,1, 0, 0, + 25,38, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 97,111, 0, 0, + 151,98, 0, 0, + 97,98, 0, 0, + 54,38, 0, 0, + 25,1, 0, 0, + 54,1, 0, 0, + 54,1, 0, 0, + 25,38, 0, 0, + 54,38, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 94,178, 0, 0, + 81,191, 0, 0, + 94,191, 0, 0, + 183,122, 0, 0, + 178,127, 0, 0, + 183,127, 0, 0, + 81,191, 0, 0, + 94,178, 0, 0, + 81,178, 0, 0, + 183,122, 0, 0, + 178,127, 0, 0, + 183,127, 0, 0, + 183,122, 0, 0, + 178,127, 0, 0, + 183,127, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 54,1, 0, 0, + 25,38, 0, 0, + 54,38, 0, 0, + 154,62, 0, 0, + 175,41, 0, 0, + 175,62, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 65,178, 0, 0, + 78,191, 0, 0, + 65,191, 0, 0, + 54,130, 0, 0, + 1,143, 0, 0, + 54,143, 0, 0, + 78,191, 0, 0, + 65,178, 0, 0, + 65,191, 0, 0, + 54,130, 0, 0, + 1,143, 0, 0, + 1,130, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 110,143, 0, 0, + 57,130, 0, 0, + 110,130, 0, 0, + 70,65, 0, 0, + 41,94, 0, 0, + 41,65, 0, 0, + 54,1, 0, 0, + 25,38, 0, 0, + 54,38, 0, 0, + 25,1, 0, 0, + 54,38, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,38, 0, 0, + 54,38, 0, 0, + 54,38, 0, 0, + 25,1, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,38, 0, 0, + 54,38, 0, 0, + 78,191, 0, 0, + 65,178, 0, 0, + 65,191, 0, 0, + 70,65, 0, 0, + 41,94, 0, 0, + 70,94, 0, 0, + 175,41, 0, 0, + 154,62, 0, 0, + 154,41, 0, 0, + 41,94, 0, 0, + 70,65, 0, 0, + 70,94, 0, 0, + 73,94, 0, 0, + 102,65, 0, 0, + 102,94, 0, 0, + 25,1, 0, 0, + 54,38, 0, 0, + 25,38, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 154,62, 0, 0, + 175,41, 0, 0, + 154,41, 0, 0, + 223,62, 0, 0, + 202,41, 0, 0, + 202,62, 0, 0, + 202,41, 0, 0, + 223,62, 0, 0, + 202,62, 0, 0, + 151,98, 0, 0, + 97,111, 0, 0, + 97,98, 0, 0, + 54,1, 0, 0, + 25,38, 0, 0, + 54,38, 0, 0, + 65,178, 0, 0, + 78,191, 0, 0, + 65,191, 0, 0, + 151,98, 0, 0, + 97,111, 0, 0, + 151,111, 0, 0, + 33,119, 0, 0, + 46,98, 0, 0, + 33,98, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 1,94, 0, 0, + 38,65, 0, 0, + 1,65, 0, 0, + 46,98, 0, 0, + 33,119, 0, 0, + 33,98, 0, 0, + 183,122, 0, 0, + 178,127, 0, 0, + 183,127, 0, 0, + 183,122, 0, 0, + 178,127, 0, 0, + 183,127, 0, 0, + 175,41, 0, 0, + 154,62, 0, 0, + 175,62, 0, 0, + 250,62, 0, 0, + 255,41, 0, 0, + 250,41, 0, 0, + 57,130, 0, 0, + 110,143, 0, 0, + 110,130, 0, 0, + 1,143, 0, 0, + 54,130, 0, 0, + 1,130, 0, 0, + 1,143, 0, 0, + 54,130, 0, 0, + 54,143, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 250,62, 0, 0, + 255,41, 0, 0, + 250,41, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 102,65, 0, 0, + 73,94, 0, 0, + 102,94, 0, 0, + 38,65, 0, 0, + 1,94, 0, 0, + 1,65, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 25,38, 0, 0, + 54,1, 0, 0, + 25,1, 0, 0, + 183,122, 0, 0, + 178,127, 0, 0, + 183,127, 0, 0, + 183,122, 0, 0, + 178,127, 0, 0, + 183,127, 0, 0, + 46,98, 0, 0, + 33,119, 0, 0, + 46,119, 0, 0, + 223,62, 0, 0, + 202,41, 0, 0, + 223,41, 0, 0, + 54,1, 0, 0, + 25,38, 0, 0, + 54,38, 0, 0, + 54,1, 0, 0, + 25,38, 0, 0, + 25,1, 0, 0, + 33,119, 0, 0, + 46,98, 0, 0, + 46,119, 0, 0, + 202,41, 0, 0, + 223,62, 0, 0, + 223,41, 0, 0, + 189,122, 0, 0, + 189,122, 0, 0, + 189,122, 0, 0, + 151,94, 0, 0, + 151,65, 0, 0, + 130,65, 0, 0, + 105,94, 0, 0, + 105,65, 0, 0, + 126,65, 0, 0, + 154,94, 0, 0, + 175,65, 0, 0, + 154,65, 0, 0, + 86,38, 0, 0, + 86,1, 0, 0, + 73,1, 0, 0, + 70,38, 0, 0, + 70,1, 0, 0, + 57,1, 0, 0, + 102,38, 0, 0, + 89,1, 0, 0, + 89,38, 0, 0, + 135,38, 0, 0, + 121,1, 0, 0, + 135,1, 0, 0, + 105,38, 0, 0, + 118,1, 0, 0, + 118,38, 0, 0, + 73,38, 0, 0, + 73,1, 0, 0, + 86,1, 0, 0, + 105,38, 0, 0, + 105,1, 0, 0, + 118,1, 0, 0, + 130,122, 0, 0, + 135,122, 0, 0, + 130,127, 0, 0, + 178,175, 0, 0, + 191,175, 0, 0, + 191,162, 0, 0, + 135,122, 0, 0, + 132,127, 0, 0, + 130,127, 0, 0, + 151,127, 0, 0, + 146,122, 0, 0, + 148,124, 0, 0, + 175,65, 0, 0, + 154,94, 0, 0, + 175,94, 0, 0, + 189,122, 0, 0, + 189,122, 0, 0, + 189,122, 0, 0, + 178,94, 0, 0, + 178,65, 0, 0, + 199,65, 0, 0, + 105,65, 0, 0, + 126,65, 0, 0, + 105,94, 0, 0, + 189,122, 0, 0, + 189,122, 0, 0, + 189,122, 0, 0, + 113,127, 0, 0, + 116,124, 0, 0, + 113,124, 0, 0, + 116,124, 0, 0, + 116,122, 0, 0, + 113,122, 0, 0, + 116,124, 0, 0, + 118,122, 0, 0, + 116,122, 0, 0, + 113,124, 0, 0, + 116,124, 0, 0, + 116,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 116,127, 0, 0, + 113,127, 0, 0, + 113,124, 0, 0, + 116,124, 0, 0, + 118,124, 0, 0, + 116,122, 0, 0, + 116,124, 0, 0, + 113,122, 0, 0, + 113,124, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 113,122, 0, 0, + 118,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 113,127, 0, 0, + 118,122, 0, 0, + 113,122, 0, 0, + 116,124, 0, 0, + 118,122, 0, 0, + 116,122, 0, 0, + 113,124, 0, 0, + 113,122, 0, 0, + 116,122, 0, 0, + 113,127, 0, 0, + 116,124, 0, 0, + 113,124, 0, 0, + 113,124, 0, 0, + 116,124, 0, 0, + 116,122, 0, 0, + 113,127, 0, 0, + 113,124, 0, 0, + 116,124, 0, 0, + 118,127, 0, 0, + 113,122, 0, 0, + 118,122, 0, 0, + 234,119, 0, 0, + 247,114, 0, 0, + 247,119, 0, 0, + 121,127, 0, 0, + 126,127, 0, 0, + 126,122, 0, 0, + 226,159, 0, 0, + 255,146, 0, 0, + 255,159, 0, 0, + 255,146, 0, 0, + 226,159, 0, 0, + 255,159, 0, 0, + 159,162, 0, 0, + 146,162, 0, 0, + 159,175, 0, 0, + 126,122, 0, 0, + 121,122, 0, 0, + 121,127, 0, 0, + 124,124, 0, 0, + 126,127, 0, 0, + 124,127, 0, 0, + 121,124, 0, 0, + 124,124, 0, 0, + 124,127, 0, 0, + 121,124, 0, 0, + 124,124, 0, 0, + 124,127, 0, 0, + 247,1, 0, 0, + 247,30, 0, 0, + 224,30, 0, 0, + 210,111, 0, 0, + 210,98, 0, 0, + 232,98, 0, 0, + 121,127, 0, 0, + 121,124, 0, 0, + 121,122, 0, 0, + 130,122, 0, 0, + 132,122, 0, 0, + 135,122, 0, 0, + 135,122, 0, 0, + 135,127, 0, 0, + 132,127, 0, 0, + 151,127, 0, 0, + 151,122, 0, 0, + 146,122, 0, 0, + 105,65, 0, 0, + 116,65, 0, 0, + 126,65, 0, 0, + 189,122, 0, 0, + 189,122, 0, 0, + 189,122, 0, 0, + 159,162, 0, 0, + 152,162, 0, 0, + 146,162, 0, 0 +}; + +CVECTOR modelLara_color[] = { + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,18,0, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,235,234, 0, + 255,221,218, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,255,255, 0, + 255,18,0, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,221,218, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,235,234, 0, + 255,142,132, 0, + 255,50,35, 0, + 255,235,234, 0, + 255,50,35, 0, + 255,221,218, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,18,0, 0, + 255,50,35, 0, + 255,142,132, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,235,234, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,242,241, 0, + 255,255,255, 0, + 255,221,218, 0, + 255,242,241, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,221,218, 0, + 255,47,31, 0, + 255,242,241, 0, + 255,235,234, 0, + 255,255,255, 0, + 255,142,132, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,199,195, 0, + 255,142,132, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,50,35, 0, + 255,18,0, 0, + 255,47,31, 0, + 255,199,195, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,235,234, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,142,132, 0, + 255,23,5, 0, + 255,18,0, 0, + 255,142,132, 0, + 255,199,195, 0, + 255,23,5, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,47,31, 0, + 255,221,218, 0, + 255,50,35, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,59,45, 0, + 255,20,2, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,26,9, 0, + 255,59,45, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,31,13, 0, + 255,26,9, 0, + 255,18,0, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,59,45, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,59,45, 0, + 255,26,9, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,105,94, 0, + 255,63,48, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,26,9, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,19,1, 0, + 255,18,0, 0, + 255,20,2, 0, + 255,26,9, 0, + 255,31,13, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,251,251, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,251,251, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,251,251, 0, + 255,255,255, 0, + 255,229,227, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,19,2, 0, + 255,19,1, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,18,0, 0, + 255,49,34, 0, + 255,22,5, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,35,18, 0, + 255,26,8, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,18,0, 0, + 255,22,5, 0, + 255,35,18, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,22,5, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,22,5, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,19,2, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,19,1, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,32,15, 0, + 255,18,0, 0, + 255,90,78, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,88,76, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,49,34, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,18,0, 0, + 255,32,15, 0, + 255,18,0, 0, + 255,49,34, 0, + 255,18,0, 0, + 255,32,15, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,88,76, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,1, 0, + 255,90,78, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,18,0, 0, + 255,90,78, 0, + 255,18,0, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,32,15, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,1, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,19,2, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,18,0, 0, + 255,88,76, 0, + 255,163,155, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,90,78, 0, + 255,18,0, 0, + 255,163,155, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,18,0, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0, + 255,255,255, 0 +}; + +PRIM modelLara_index[] = { + 181,156,165,0,4, + 181,165,196,0,4, + 139,156,167,0,4, + 139,167,149,0,4, + 165,156,139,0,4, + 165,139,150,0,4, + 171,149,167,0,4, + 171,167,185,0,4, + 183,165,150,0,4, + 183,150,169,0,4, + 166,150,139,0,4, + 166,139,152,0,4, + 188,171,185,0,4, + 185,201,188,0,4, + 189,183,169,0,4, + 189,169,184,0,4, + 193,201,209,0,4, + 193,209,207,0,4, + 181,167,156,0,4, + 167,181,185,0,4, + 196,165,183,0,4, + 181,209,185,0,4, + 209,181,196,0,4, + 189,183,196,0,4, + 196,207,209,0,4, + 149,152,139,0,4, + 152,149,171,0,4, + 150,166,169,0,4, + 188,152,171,0,4, + 152,188,166,0,4, + 166,184,169,0,4, + 188,193,166,0,4, + 197,221,216,0,4, + 225,207,196,0,4, + 197,216,186,0,4, + 202,197,186,0,4, + 202,186,194,0,4, + 220,202,194,0,4, + 220,194,218,0,4, + 189,213,183,0,4, + 196,189,195,0,4, + 183,223,196,0,4, + 196,195,207,0,4, + 241,224,225,0,4, + 241,225,246,0,4, + 214,195,224,0,4, + 223,246,225,0,4, + 224,239,214,0,4, + 214,238,213,0,4, + 213,242,223,0,4, + 194,216,218,0,4, + 216,194,186,0,4, + 220,197,202,0,4, + 197,220,221,0,4, + 218,221,220,0,4, + 221,218,216,0,4, + 225,196,223,0,4, + 223,183,213,0,4, + 238,214,239,0,4, + 224,207,225,0,4, + 242,213,238,0,4, + 223,242,246,0,4, + 224,241,239,0,4, + 241,250,246,0,4, + 330,295,297,0,4, + 288,323,324,0,4, + 330,297,334,0,4, + 295,278,282,0,4, + 295,282,297,0,4, + 278,241,246,0,4, + 323,288,289,0,4, + 288,329,296,0,4, + 329,288,324,0,4, + 297,329,334,0,4, + 329,297,296,0,4, + 295,323,289,0,4, + 323,295,330,0,4, + 273,289,288,0,4, + 289,273,274,0,4, + 273,296,281,0,4, + 296,273,288,0,4, + 281,297,282,0,4, + 297,281,296,0,4, + 274,295,289,0,4, + 295,274,278,0,4, + 242,282,246,0,4, + 278,246,282,0,4, + 329,340,334,0,4, + 331,332,327,0,4, + 331,327,326,0,4, + 340,329,332,0,4, + 342,337,340,0,4, + 342,340,343,0,4, + 330,327,323,0,4, + 343,341,339,0,4, + 343,339,342,0,4, + 336,331,326,0,4, + 336,326,333,0,4, + 326,339,333,0,4, + 339,326,327,0,4, + 336,332,331,0,4, + 332,336,341,0,4, + 333,341,336,0,4, + 341,333,339,0,4, + 332,323,327,0,4, + 327,342,339,0,4, + 342,327,337,0,4, + 343,332,341,0,4, + 332,343,340,0,4, + 162,190,199,0,4, + 162,199,174,0,4, + 162,174,170,0,4, + 162,170,161,0,4, + 187,161,170,0,4, + 187,170,191,0,4, + 211,192,217,0,4, + 211,217,231,0,4, + 217,184,210,0,4, + 211,229,200,0,4, + 210,230,217,0,4, + 226,210,198,0,4, + 228,198,200,0,4, + 190,161,187,0,4, + 161,190,162,0,4, + 174,191,170,0,4, + 191,174,199,0,4, + 199,187,191,0,4, + 187,199,190,0,4, + 217,192,184,0,4, + 210,226,230,0,4, + 198,228,226,0,4, + 229,228,200,0,4, + 230,231,217,0,4, + 232,236,226,0,4, + 278,239,241,0,4, + 306,286,303,0,4, + 263,258,251,0,4, + 253,268,260,0,4, + 253,259,268,0,4, + 285,265,266,0,4, + 284,298,302,0,4, + 303,283,299,0,4, + 303,286,283,0,4, + 286,264,283,0,4, + 257,240,245,0,4, + 229,227,228,0,4, + 277,267,272,0,4, + 311,290,293,0,4, + 311,293,314,0,4, + 275,263,267,0,4, + 275,267,277,0,4, + 252,237,240,0,4, + 252,240,257,0,4, + 264,286,270,0,4, + 264,284,283,0,4, + 298,284,285,0,4, + 298,287,305,0,4, + 275,287,269,0,4, + 280,292,294,0,4, + 306,292,291,0,4, + 276,259,270,0,4, + 247,259,253,0,4, + 247,255,254,0,4, + 266,255,256,0,4, + 249,258,256,0,4, + 275,258,263,0,4, + 280,271,279,0,4, + 260,271,261,0,4, + 247,236,232,0,4, + 247,233,248,0,4, + 237,235,229,0,4, + 252,235,237,0,4, + 262,244,261,0,4, + 301,302,310,0,4, + 311,315,310,0,4, + 312,313,306,0,4, + 312,317,313,0,4, + 317,318,313,0,4, + 315,311,314,0,4, + 310,305,311,0,4, + 302,318,311,0,4, + 302,321,304,0,4, + 307,308,299,0,4, + 301,307,302,0,4, + 307,299,302,0,4, + 308,303,299,0,4, + 308,312,303,0,4, + 312,306,303,0,4, + 211,231,229,0,4, + 244,262,245,0,4, + 261,243,260,0,4, + 261,244,243,0,4, + 234,251,249,0,4, + 234,235,251,0,4, + 235,252,251,0,4, + 235,228,229,0,4, + 239,278,274,0,4, + 230,245,231,0,4, + 239,273,238,0,4, + 233,247,232,0,4, + 248,234,249,0,4, + 248,233,234,0,4, + 243,253,260,0,4, + 243,236,253,0,4, + 236,247,253,0,4, + 316,302,304,0,4, + 321,302,311,0,4, + 261,272,262,0,4, + 261,271,272,0,4, + 271,280,272,0,4, + 279,268,276,0,4, + 279,271,268,0,4, + 271,260,268,0,4, + 263,251,252,0,4, + 258,249,251,0,4, + 256,269,266,0,4, + 256,258,269,0,4, + 258,275,269,0,4, + 256,248,249,0,4, + 256,255,248,0,4, + 255,247,248,0,4, + 254,265,264,0,4, + 254,255,265,0,4, + 255,266,265,0,4, + 259,276,268,0,4, + 270,254,264,0,4, + 270,259,254,0,4, + 259,247,254,0,4, + 291,279,276,0,4, + 291,292,279,0,4, + 292,280,279,0,4, + 294,313,318,0,4, + 294,292,313,0,4, + 292,306,313,0,4, + 269,285,266,0,4, + 269,287,285,0,4, + 287,298,285,0,4, + 305,290,311,0,4, + 305,287,290,0,4, + 287,275,290,0,4, + 285,284,265,0,4, + 284,264,265,0,4, + 283,302,299,0,4, + 283,284,302,0,4, + 270,291,276,0,4, + 270,286,291,0,4, + 286,306,291,0,4, + 257,245,262,0,4, + 277,272,280,0,4, + 267,262,272,0,4, + 267,257,262,0,4, + 267,263,257,0,4, + 263,252,257,0,4, + 314,294,318,0,4, + 314,293,294,0,4, + 293,280,294,0,4, + 293,277,280,0,4, + 293,290,277,0,4, + 290,275,277,0,4, + 309,316,304,0,4, + 337,334,340,0,4, + 309,304,300,0,4, + 335,321,325,0,4, + 335,325,338,0,4, + 337,330,334,0,4, + 321,311,318,0,4, + 338,328,322,0,4, + 338,322,335,0,4, + 320,309,300,0,4, + 320,300,319,0,4, + 328,309,320,0,4, + 309,328,316,0,4, + 304,319,300,0,4, + 319,304,322,0,4, + 322,320,319,0,4, + 320,322,328,0,4, + 302,306,318,0,4, + 306,302,316,0,4, + 316,318,306,0,4, + 338,316,328,0,4, + 316,338,325,0,4, + 304,335,322,0,4, + 335,304,321,0,4, + 141,133,154,0,4, + 126,131,88,0,4, + 121,101,67,0,4, + 82,80,54,0,4, + 206,180,208,0,4, + 83,109,85,0,4, + 141,154,157,0,4, + 126,88,81,0,4, + 111,88,131,0,4, + 111,131,143,0,4, + 142,111,143,0,4, + 142,143,160,0,4, + 140,142,160,0,4, + 140,160,159,0,4, + 133,140,159,0,4, + 133,159,154,0,4, + 121,67,87,0,4, + 82,54,49,0,4, + 101,86,52,0,4, + 101,52,67,0,4, + 79,82,49,0,4, + 79,49,42,0,4, + 86,77,34,0,4, + 86,34,52,0,4, + 77,79,42,0,4, + 77,42,34,0,4, + 138,121,87,0,4, + 138,87,99,0,4, + 80,78,59,0,4, + 80,59,54,0,4, + 184,198,210,0,4, + 147,138,99,0,4, + 147,99,134,0,4, + 163,156,167,0,4, + 145,141,157,0,4, + 145,157,163,0,4, + 83,85,70,0,4, + 70,50,61,0,4, + 70,61,83,0,4, + 61,50,59,0,4, + 61,59,78,0,4, + 149,163,167,0,4, + 134,149,139,0,4, + 126,85,109,0,4, + 85,126,81,0,4, + 154,126,132,0,4, + 85,81,65,0,4, + 123,133,81,0,4, + 123,81,88,0,4, + 123,88,111,0,4, + 123,111,142,0,4, + 123,142,140,0,4, + 123,140,133,0,4, + 151,126,154,0,4, + 151,131,126,0,4, + 151,143,131,0,4, + 151,160,143,0,4, + 151,159,160,0,4, + 151,154,159,0,4, + 163,138,147,0,4, + 156,134,139,0,4, + 134,141,145,0,4, + 180,172,179,0,4, + 132,125,154,0,4, + 58,65,133,0,4, + 121,115,101,0,4, + 115,121,129,0,4, + 129,114,115,0,4, + 114,129,125,0,4, + 114,125,97,0,4, + 125,104,97,0,4, + 97,104,82,0,4, + 104,80,82,0,4, + 101,94,86,0,4, + 94,101,115,0,4, + 115,95,94,0,4, + 95,115,114,0,4, + 114,90,95,0,4, + 90,114,97,0,4, + 97,79,90,0,4, + 79,97,82,0,4, + 86,94,77,0,4, + 94,95,77,0,4, + 95,90,77,0,4, + 90,79,77,0,4, + 56,87,67,0,4, + 87,56,71,0,4, + 48,71,56,0,4, + 71,48,58,0,4, + 39,58,48,0,4, + 39,45,58,0,4, + 49,45,39,0,4, + 54,45,49,0,4, + 41,67,52,0,4, + 67,41,56,0,4, + 35,56,41,0,4, + 56,35,48,0,4, + 36,48,35,0,4, + 48,36,39,0,4, + 39,36,42,0,4, + 42,49,39,0,4, + 34,41,52,0,4, + 34,35,41,0,4, + 34,36,35,0,4, + 34,42,36,0,4, + 125,100,104,0,4, + 54,38,45,0,4, + 80,100,78,0,4, + 65,59,85,0,4, + 100,109,78,0,4, + 81,133,65,0,4, + 59,65,38,0,4, + 109,100,132,0,4, + 126,109,132,0,4, + 100,80,104,0,4, + 156,163,147,0,4, + 138,163,157,0,4, + 141,134,99,0,4, + 59,50,70,0,4, + 70,85,59,0,4, + 78,83,61,0,4, + 78,109,83,0,4, + 38,58,45,0,4, + 38,54,59,0,4, + 65,58,38,0,4, + 58,133,71,0,4, + 125,132,100,0,4, + 154,125,129,0,4, + 71,141,99,0,4, + 141,71,133,0,4, + 154,138,157,0,4, + 138,154,129,0,4, + 71,99,87,0,4, + 138,129,121,0,4, + 128,124,135,0,4, + 135,130,128,0,4, + 128,117,105,0,4, + 128,105,124,0,4, + 117,103,105,0,4, + 60,57,43,0,4, + 43,46,60,0,4, + 60,72,57,0,4, + 72,64,55,0,4, + 72,55,57,0,4, + 55,64,51,0,4, + 51,46,43,0,4, + 51,43,55,0,4, + 60,103,122,0,4, + 60,46,103,0,4, + 72,122,135,0,4, + 72,60,122,0,4, + 64,135,124,0,4, + 64,72,135,0,4, + 51,124,105,0,4, + 51,64,124,0,4, + 46,105,103,0,4, + 117,128,130,0,4, + 55,43,57,0,4, + 46,51,105,0,4, + 130,135,122,0,4, + 117,122,103,0,4, + 117,130,122,0,4, + 180,173,172,0,4, + 135,122,148,0,4, + 124,158,153,0,4, + 149,134,145,0,4, + 103,146,144,0,4, + 180,176,173,0,4, + 124,135,158,0,4, + 122,144,148,0,4, + 122,135,124,0,4, + 122,103,144,0,4, + 156,147,134,0,4, + 135,148,158,0,4, + 103,105,146,0,4, + 149,145,163,0,4, + 105,103,124,0,4, + 105,153,146,0,4, + 122,124,103,0,4, + 105,124,153,0,4, + 146,155,144,0,4, + 146,144,148,0,4, + 155,148,144,0,4, + 158,168,146,0,4, + 148,175,158,0,4, + 155,168,175,0,4, + 155,175,164,0,4, + 158,175,168,0,4, + 179,136,120,0,4, + 112,110,119,0,4, + 178,182,177,0,4, + 179,120,172,0,4, + 180,137,136,0,4, + 180,136,179,0,4, + 176,127,137,0,4, + 176,137,180,0,4, + 173,113,127,0,4, + 173,127,176,0,4, + 172,120,113,0,4, + 172,113,173,0,4, + 119,110,136,0,4, + 110,120,136,0,4, + 136,137,119,0,4, + 112,119,127,0,4, + 119,137,127,0,4, + 112,127,113,0,4, + 113,120,110,0,4, + 110,112,113,0,4, + 179,172,177,0,4, + 180,179,182,0,4, + 179,177,182,0,4, + 182,178,176,0,4, + 176,180,182,0,4, + 173,176,178,0,4, + 172,173,177,0,4, + 173,178,177,0,4, + 198,184,169,0,4, + 233,228,234,0,4, + 204,173,203,0,4, + 205,179,172,0,4, + 208,179,205,0,4, + 203,176,206,0,4, + 205,172,204,0,4, + 203,173,176,0,4, + 208,180,179,0,4, + 204,172,173,0,4, + 169,200,198,0,4, + 206,176,180,0,4, + 228,235,234,0,4, + 242,238,239,0,4, + 208,219,206,0,4, + 222,204,215,0,4, + 203,212,215,0,4, + 206,212,203,0,4, + 222,215,212,0,4, + 222,212,219,0,4, + 206,219,212,0,4, + 29,47,62,0,4, + 32,25,5,0,4, + 0,1,3,0,4, + 107,118,116,0,4, + 11,2,7,0,4, + 37,31,17,0,4, + 18,29,19,0,4, + 1,5,3,0,4, + 4,18,9,0,4, + 76,29,62,0,4, + 29,76,19,0,4, + 5,1,32,0,4, + 21,5,25,0,4, + 62,93,96,0,4, + 73,21,25,0,4, + 107,116,98,0,4, + 107,106,118,0,4, + 108,102,116,0,4, + 108,116,118,0,4, + 89,108,118,0,4, + 89,118,106,0,4, + 102,92,98,0,4, + 102,98,116,0,4, + 84,102,108,0,4, + 84,108,89,0,4, + 84,92,102,0,4, + 107,96,106,0,4, + 84,68,92,0,4, + 92,91,98,0,4, + 91,92,68,0,4, + 75,84,89,0,4, + 68,84,75,0,4, + 106,75,89,0,4, + 75,106,96,0,4, + 91,107,98,0,4, + 96,107,91,0,4, + 44,76,91,0,4, + 91,76,96,0,4, + 68,75,32,0,4, + 32,20,68,0,4, + 66,68,53,0,4, + 68,66,91,0,4, + 20,53,68,0,4, + 76,62,96,0,4, + 96,73,75,0,4, + 11,23,8,0,4, + 37,44,66,0,4, + 31,20,17,0,4, + 31,66,53,0,4, + 96,93,73,0,4, + 73,74,63,0,4, + 26,40,63,0,4, + 74,73,93,0,4, + 63,40,73,0,4, + 69,74,93,0,4, + 3,5,21,0,4, + 0,3,4,0,4, + 18,19,9,0,4, + 4,3,6,0,4, + 17,0,4,0,4, + 69,27,33,0,4, + 22,27,13,0,4, + 24,47,23,0,4, + 24,13,28,0,4, + 21,10,7,0,4, + 7,13,11,0,4, + 15,12,26,0,4, + 12,13,10,0,4, + 47,93,62,0,4, + 76,44,19,0,4, + 20,1,0,0,4, + 4,9,17,0,4, + 19,44,9,0,4, + 0,17,20,0,4, + 21,7,2,0,4, + 21,73,40,0,4, + 28,69,47,0,4, + 93,47,69,0,4, + 47,18,23,0,4, + 44,17,9,0,4, + 75,73,25,0,4, + 53,20,31,0,4, + 40,10,21,0,4, + 23,6,8,0,4, + 6,2,8,0,4, + 2,11,8,0,4, + 20,32,1,0,4, + 28,47,24,0,4, + 23,11,24,0,4, + 26,16,15,0,4, + 13,15,14,0,4, + 33,27,22,0,4, + 16,22,14,0,4, + 16,33,22,0,4, + 69,33,74,0,4, + 30,26,74,0,4, + 12,40,26,0,4, + 40,12,10,0,4, + 13,27,28,0,4, + 13,24,11,0,4, + 13,7,10,0,4, + 47,29,18,0,4, + 69,28,27,0,4, + 13,12,15,0,4, + 3,21,2,0,4, + 15,16,14,0,4, + 22,13,14,0,4, + 37,66,31,0,4, + 17,44,37,0,4, + 6,18,4,0,4, + 26,63,74,0,4, + 33,30,74,0,4, + 16,26,30,0,4, + 2,6,3,0,4, + 25,32,75,0,4, + 66,44,91,0,4, + 33,16,30,0,4, + 6,23,18,0,4, + 146,148,158,0,4, + 148,164,175,0,4, + 146,168,155,0,4, + 148,155,164,0,4, + 224,195,207,0,4, + 214,189,195,0,4, + 213,189,214,0,4, + 200,169,166,0,4, + 200,193,211,0,4, + 211,193,192,0,4, + 200,166,193,0,4, + 207,189,193,0,4, + 189,207,196,0,4, + 189,192,193,0,4, + 184,193,192,0,4, + 215,204,203,0,4, + 203,206,208,0,4, + 208,222,219,0,4, + 208,204,222,0,4, + 203,205,204,0,4, + 230,236,243,0,4, + 240,229,231,0,4, + 244,230,243,0,4, + 230,244,245,0,4, + 273,239,274,0,4, + 229,231,230,0,4, + 240,237,229,0,4, + 240,231,245,0,4, + 273,242,238,0,4, + 242,241,246,0,4, + 242,273,281,0,4, + 282,242,281,0,4, + 236,230,226,0,4, + 227,230,226,0,4, + 228,233,226,0,4, + 226,233,232,0,4, + 228,227,226,0,4, + 242,239,241,0,4, + 321,318,325,0,4, + 330,334,329,0,4, + 327,330,337,0,4, + 318,316,325,0,4, + 329,323,332,0,4, + 329,323,330,0,4, + 302,298,305,0,4, + 310,302,305,0,4, + 318,315,314,0,4, + 185,209,201,0,4, + 193,188,201,0,4, + 302,299,306,0,4, + 207,195,189,0,4, + 189,184,192,0,4, + 184,166,193,0,4, + 208,205,204,0,4, + 203,208,205,0,4, + 329,324,323,0,4 +}; + +MATRIX modelLara_matrix = {0}; +VECTOR modelLara_pos = {59,-78,106, 0}; +SVECTOR modelLara_rot = {0,-3141,0}; +short modelLara_isRigidBody = 0; +short modelLara_isStaticBody = 1; +short modelLara_isPrism = 0; +short modelLara_isAnim = 0; +short modelLara_isActor = 0; +short modelLara_isLevel = 0; +short modelLara_isBG = 0; +short modelLara_isSprite = 0; +long modelLara_p = 0; +long modelLara_OTz = 0; +BODY modelLara_body = { + {0, 0, 0, 0}, + 59,-78,106, 0, + 0,-3141,0, 0, + 48, + ONE/48, + -40,-79,-18, 0, + 39,106,16, 0, + 0, + }; + +TMESH modelLara = { + modelLara_mesh, + modelLara_normal, + modelLara_uv, + modelLara_color, + 694 +}; + +extern unsigned long _binary_TIM_lara_tim_start[]; +extern unsigned long _binary_TIM_lara_tim_end[]; +extern unsigned long _binary_TIM_lara_tim_length; + +TIM_IMAGE tim_lara; + +MESH meshLara = { + &modelLara, + modelLara_index, + &tim_lara, + _binary_TIM_lara_tim_start, + &modelLara_matrix, + &modelLara_pos, + &modelLara_rot, + &modelLara_isRigidBody, + &modelLara_isStaticBody, + &modelLara_isPrism, + &modelLara_isAnim, + &modelLara_isActor, + &modelLara_isLevel, + &modelLara_isBG, + &modelLara_isSprite, + &modelLara_p, + &modelLara_OTz, + &modelLara_body, + 0, + 0 +}; + +SVECTOR modelobject_mesh[] = { + {9,17,-20}, + {9,0,-20}, + {-9,17,-22}, + {-9,0,-22}, + {19,20,18}, + {19,-32,18}, + {-20,20,18}, + {-20,-32,18} +}; + +SVECTOR modelobject_normal[] = { + -2161,-2336,2579,0, + -2321,1316,3108,0, + 1891,-2286,2824,0, + 1986,1356,3316,0, + -2654,-2399,-1995,0, + -2472,2971,-1355,0, + 2641,-2401,-2009,0, + 2458,2976,-1370,0 +}; + +SVECTOR modelobject_uv[] = { + 103,62, 0, 0, + 124,33, 0, 0, + 124,62, 0, 0, + 103,62, 0, 0, + 103,33, 0, 0, + 124,33, 0, 0, + 67,62, 0, 0, + 62,31, 0, 0, + 83,31, 0, 0, + 98,2, 0, 0, + 103,31, 0, 0, + 83,31, 0, 0, + 68,1, 0, 0, + 83,31, 0, 0, + 62,31, 0, 0, + 98,62, 0, 0, + 83,31, 0, 0, + 103,31, 0, 0, + 67,62, 0, 0, + 83,31, 0, 0, + 77,61, 0, 0, + 98,2, 0, 0, + 83,31, 0, 0, + 88,2, 0, 0, + 68,1, 0, 0, + 77,1, 0, 0, + 83,31, 0, 0, + 98,62, 0, 0, + 88,61, 0, 0, + 83,31, 0, 0, + 112,17, 0, 0, + 112,31, 0, 0, + 103,31, 0, 0, + 103,31, 0, 0, + 103,17, 0, 0, + 112,17, 0, 0 +}; + +CVECTOR modelobject_color[] = { + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0 +}; + +PRIM modelobject_index[] = { + 7,4,6,0,4, + 7,5,4,0,4, + 2,6,4,0,4, + 0,4,5,0,4, + 2,7,6,0,4, + 3,5,7,0,4, + 2,4,0,0,4, + 0,5,1,0,4, + 2,3,7,0,4, + 3,1,5,0,4, + 2,0,1,0,4, + 1,3,2,0,4 +}; + +MATRIX modelobject_matrix = {0}; +VECTOR modelobject_pos = {400,-22,-147, 0}; +SVECTOR modelobject_rot = {0,2565,0}; +short modelobject_isRigidBody = 0; +short modelobject_isStaticBody = 1; +short modelobject_isPrism = 0; +short modelobject_isAnim = 0; +short modelobject_isActor = 0; +short modelobject_isLevel = 0; +short modelobject_isBG = 0; +short modelobject_isSprite = 0; +long modelobject_p = 0; +long modelobject_OTz = 0; +BODY modelobject_body = { + {0, 0, 0, 0}, + 400,-22,-147, 0, + 0,2565,0, 0, + 10, + ONE/10, + -20,-32,-22, 0, + 19,20,18, 0, + 1024, + }; + +TMESH modelobject = { + modelobject_mesh, + modelobject_normal, + modelobject_uv, + modelobject_color, + 12 +}; + +MESH meshobject = { + &modelobject, + modelobject_index, + &tim_home, + _binary_TIM_home_tim_start, + &modelobject_matrix, + &modelobject_pos, + &modelobject_rot, + &modelobject_isRigidBody, + &modelobject_isStaticBody, + &modelobject_isPrism, + &modelobject_isAnim, + &modelobject_isActor, + &modelobject_isLevel, + &modelobject_isBG, + &modelobject_isSprite, + &modelobject_p, + &modelobject_OTz, + &modelobject_body, + 0, + 0 +}; + +SVECTOR modelPlan_mesh[] = { + {-45,36,-3}, + {48,36,-3}, + {-45,2,2}, + {48,2,2} +}; + +SVECTOR modelPlan_normal[] = { + 0,638,4046,0, + 0,638,4046,0, + 0,638,4046,0, + 0,638,4046,0 +}; + +SVECTOR modelPlan_uv[] = { + 64,155, 0, 0, + 129,155, 0, 0, + 129,130, 0, 0, + 64,130, 0, 0 +}; + +CVECTOR modelPlan_color[] = { + 80,80,80,0, + 128,128,128,0, + 128,128,128,0 +}; + +PRIM modelPlan_index[] = { + 0,1,3,2,8 +}; + +MATRIX modelPlan_matrix = {0}; +VECTOR modelPlan_pos = {-40,-40,132, 0}; +SVECTOR modelPlan_rot = {0,0,0}; +short modelPlan_isRigidBody = 0; +short modelPlan_isStaticBody = 1; +short modelPlan_isPrism = 0; +short modelPlan_isAnim = 0; +short modelPlan_isActor = 0; +short modelPlan_isLevel = 0; +short modelPlan_isBG = 0; +short modelPlan_isSprite = 1; +long modelPlan_p = 0; +long modelPlan_OTz = 0; +BODY modelPlan_body = { + {0, 0, 0, 0}, + -40,-40,132, 0, + 0,0,0, 0, + 1, + ONE/1, + -45,2,-3, 0, + 48,36,2, 0, + 0, + }; + +TMESH modelPlan = { + modelPlan_mesh, + modelPlan_normal, + modelPlan_uv, + modelPlan_color, + 1 +}; + +MESH meshPlan = { + &modelPlan, + modelPlan_index, + &tim_home, + _binary_TIM_home_tim_start, + &modelPlan_matrix, + &modelPlan_pos, + &modelPlan_rot, + &modelPlan_isRigidBody, + &modelPlan_isStaticBody, + &modelPlan_isPrism, + &modelPlan_isAnim, + &modelPlan_isActor, + &modelPlan_isLevel, + &modelPlan_isBG, + &modelPlan_isSprite, + &modelPlan_p, + &modelPlan_OTz, + &modelPlan_body, + 0, + 0 +}; + +SVECTOR modelSphere_mesh[] = { + {0,-8,24}, + {4,5,25}, + {9,-18,15}, + {22,-2,12}, + {19,12,11}, + {11,21,10}, + {24,-9,-1}, + {8,-23,-5}, + {17,-12,-14}, + {20,11,-11}, + {5,-15,-19}, + {7,3,-24}, + {7,21,-11}, + {-8,-8,-23}, + {-9,11,-20}, + {0,-24,4}, + {-18,-10,-14}, + {-7,23,-7}, + {-6,-23,-5}, + {-19,12,-11}, + {-21,-14,1}, + {-25,-2,1}, + {-12,-17,14}, + {-18,12,13}, + {-17,-2,18}, + {-8,24,4}, + {-6,18,16} +}; + +SVECTOR modelSphere_normal[] = { + -68,1388,-3853,0, + -642,-810,-3963,0, + -1690,2835,-2425,0, + -3528,249,-2065,0, + -3229,-1803,-1761,0, + -1740,-3388,-1506,0, + -3872,1330,120,0, + -1565,3706,769,0, + -2821,1782,2375,0, + -3335,-1674,1688,0, + -670,2463,3203,0, + -1211,-620,3863,0, + -1172,-3464,1844,0, + 1367,1189,3673,0, + 1371,-1771,3430,0, + 57,3991,-921,0, + 2956,1572,2359,0, + 1109,-3702,1357,0, + 1215,3760,1078,0, + 3232,-1852,1704,0, + 3289,2429,-249,0, + 4089,114,-209,0, + 1896,2874,-2219,0, + 2984,-1919,-2047,0, + 2744,288,-3027,0, + 1332,-3836,-533,0, + 895,-2816,-2837,0 +}; + +SVECTOR modelSphere_uv[] = { + 136,31, 0, 0, + 122,32, 0, 0, + 126,40, 0, 0, + 133,26, 0, 0, + 127,28, 0, 0, + 125,40, 0, 0, + 136,31, 0, 0, + 121,32, 0, 0, + 122,32, 0, 0, + 125,40, 0, 0, + 124,43, 0, 0, + 133,33, 0, 0, + 127,28, 0, 0, + 117,39, 0, 0, + 125,40, 0, 0, + 125,42, 0, 0, + 122,32, 0, 0, + 111,40, 0, 0, + 127,28, 0, 0, + 115,25, 0, 0, + 117,39, 0, 0, + 125,40, 0, 0, + 110,44, 0, 0, + 124,43, 0, 0, + 108,38, 0, 0, + 111,40, 0, 0, + 122,32, 0, 0, + 115,25, 0, 0, + 109,34, 0, 0, + 117,39, 0, 0, + 109,34, 0, 0, + 115,25, 0, 0, + 105,26, 0, 0, + 108,38, 0, 0, + 106,50, 0, 0, + 111,40, 0, 0, + 102,33, 0, 0, + 105,26, 0, 0, + 103,21, 0, 0, + 115,25, 0, 0, + 121,20, 0, 0, + 115,17, 0, 0, + 115,25, 0, 0, + 115,17, 0, 0, + 105,26, 0, 0, + 111,40, 0, 0, + 106,50, 0, 0, + 113,54, 0, 0, + 105,26, 0, 0, + 115,17, 0, 0, + 103,21, 0, 0, + 125,42, 0, 0, + 111,40, 0, 0, + 118,45, 0, 0, + 113,60, 0, 0, + 113,54, 0, 0, + 106,50, 0, 0, + 113,60, 0, 0, + 121,55, 0, 0, + 113,54, 0, 0, + 103,21, 0, 0, + 115,17, 0, 0, + 109,15, 0, 0, + 110,18, 0, 0, + 116,29, 0, 0, + 118,18, 0, 0, + 121,55, 0, 0, + 125,42, 0, 0, + 118,45, 0, 0, + 118,18, 0, 0, + 118,10, 0, 0, + 110,18, 0, 0, + 127,58, 0, 0, + 126,48, 0, 0, + 121,55, 0, 0, + 118,10, 0, 0, + 130,12, 0, 0, + 128,4, 0, 0, + 126,48, 0, 0, + 126,40, 0, 0, + 125,42, 0, 0, + 136,21, 0, 0, + 139,15, 0, 0, + 130,12, 0, 0, + 126,40, 0, 0, + 122,32, 0, 0, + 125,42, 0, 0, + 126,16, 0, 0, + 121,20, 0, 0, + 127,28, 0, 0, + 133,26, 0, 0, + 125,40, 0, 0, + 133,33, 0, 0, + 121,20, 0, 0, + 115,25, 0, 0, + 127,28, 0, 0, + 121,32, 0, 0, + 108,38, 0, 0, + 122,32, 0, 0, + 125,40, 0, 0, + 117,39, 0, 0, + 110,44, 0, 0, + 110,44, 0, 0, + 117,39, 0, 0, + 109,34, 0, 0, + 110,44, 0, 0, + 109,34, 0, 0, + 102,33, 0, 0, + 102,33, 0, 0, + 109,34, 0, 0, + 105,26, 0, 0, + 111,40, 0, 0, + 113,54, 0, 0, + 118,45, 0, 0, + 113,60, 0, 0, + 121,63, 0, 0, + 121,55, 0, 0, + 113,54, 0, 0, + 121,55, 0, 0, + 118,45, 0, 0, + 110,18, 0, 0, + 118,10, 0, 0, + 113,5, 0, 0, + 121,55, 0, 0, + 126,48, 0, 0, + 125,42, 0, 0, + 118,18, 0, 0, + 116,29, 0, 0, + 127,23, 0, 0, + 118,18, 0, 0, + 127,23, 0, 0, + 130,12, 0, 0, + 118,10, 0, 0, + 118,18, 0, 0, + 130,12, 0, 0, + 116,29, 0, 0, + 123,31, 0, 0, + 127,23, 0, 0, + 130,12, 0, 0, + 127,23, 0, 0, + 136,21, 0, 0, + 130,12, 0, 0, + 139,15, 0, 0, + 128,4, 0, 0, + 133,5, 0, 0, + 128,4, 0, 0, + 139,15, 0, 0, + 136,21, 0, 0, + 127,23, 0, 0, + 132,31, 0, 0 +}; + +CVECTOR modelSphere_color[] = { + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0 +}; + +PRIM modelSphere_index[] = { + 1,5,26,0,4, + 0,2,3,0,4, + 1,4,5,0,4, + 3,4,1,0,4, + 2,6,3,0,4, + 25,5,12,0,4, + 2,7,6,0,4, + 3,9,4,0,4, + 9,12,5,0,4, + 7,8,6,0,4, + 8,7,10,0,4, + 9,11,12,0,4, + 11,10,13,0,4, + 7,15,18,0,4, + 7,18,10,0,4, + 12,11,14,0,4, + 10,18,13,0,4, + 25,12,17,0,4, + 13,14,11,0,4, + 13,19,14,0,4, + 13,18,16,0,4, + 16,18,20,0,4, + 19,25,17,0,4, + 20,21,16,0,4, + 21,23,19,0,4, + 21,24,23,0,4, + 23,26,25,0,4, + 0,1,24,0,4, + 26,5,25,0,4, + 22,15,2,0,4, + 0,3,1,0,4, + 15,7,2,0,4, + 4,9,5,0,4, + 3,6,9,0,4, + 9,6,8,0,4, + 9,8,11,0,4, + 11,8,10,0,4, + 12,14,17,0,4, + 13,16,19,0,4, + 14,19,17,0,4, + 16,21,19,0,4, + 19,23,25,0,4, + 20,18,22,0,4, + 20,22,24,0,4, + 21,20,24,0,4, + 18,15,22,0,4, + 24,22,0,0,4, + 24,1,23,0,4, + 26,23,1,0,4, + 0,22,2,0,4 +}; + +MATRIX modelSphere_matrix = {0}; +VECTOR modelSphere_pos = {-513,-129,15, 0}; +SVECTOR modelSphere_rot = {0,1033,0}; +short modelSphere_isRigidBody = 1; +short modelSphere_isStaticBody = 0; +short modelSphere_isPrism = 0; +short modelSphere_isAnim = 0; +short modelSphere_isActor = 1; +short modelSphere_isLevel = 0; +short modelSphere_isBG = 0; +short modelSphere_isSprite = 0; +long modelSphere_p = 0; +long modelSphere_OTz = 0; +BODY modelSphere_body = { + {0, 0, 0, 0}, + -513,-129,15, 0, + 0,1033,0, 0, + 2, + ONE/2, + -25,-24,-24, 0, + 24,24,25, 0, + 2048, + }; + +TMESH modelSphere = { + modelSphere_mesh, + modelSphere_normal, + modelSphere_uv, + modelSphere_color, + 50 +}; + +MESH meshSphere = { + &modelSphere, + modelSphere_index, + &tim_home, + _binary_TIM_home_tim_start, + &modelSphere_matrix, + &modelSphere_pos, + &modelSphere_rot, + &modelSphere_isRigidBody, + &modelSphere_isStaticBody, + &modelSphere_isPrism, + &modelSphere_isAnim, + &modelSphere_isActor, + &modelSphere_isLevel, + &modelSphere_isBG, + &modelSphere_isSprite, + &modelSphere_p, + &modelSphere_OTz, + &modelSphere_body, + 0, + 0 +}; + +SVECTOR modelSphere_001_mesh[] = { + {0,-8,24}, + {4,5,25}, + {9,-18,15}, + {22,-2,12}, + {19,12,11}, + {11,21,10}, + {24,-9,-1}, + {8,-23,-5}, + {17,-12,-14}, + {20,11,-11}, + {5,-15,-19}, + {7,3,-24}, + {7,21,-11}, + {-8,-8,-23}, + {-9,11,-20}, + {0,-24,4}, + {-18,-10,-14}, + {-7,23,-7}, + {-6,-23,-5}, + {-19,12,-11}, + {-21,-14,1}, + {-25,-2,1}, + {-12,-17,14}, + {-18,12,13}, + {-17,-2,18}, + {-8,24,4}, + {-6,18,16} +}; + +SVECTOR modelSphere_001_normal[] = { + -68,1388,-3853,0, + -642,-810,-3963,0, + -1690,2835,-2425,0, + -3528,249,-2065,0, + -3229,-1803,-1761,0, + -1740,-3388,-1506,0, + -3872,1330,120,0, + -1565,3706,769,0, + -2821,1782,2375,0, + -3335,-1674,1688,0, + -670,2463,3203,0, + -1211,-620,3863,0, + -1172,-3464,1844,0, + 1367,1189,3673,0, + 1371,-1771,3430,0, + 57,3991,-921,0, + 2956,1572,2359,0, + 1109,-3702,1357,0, + 1215,3760,1078,0, + 3232,-1852,1704,0, + 3289,2429,-249,0, + 4089,114,-209,0, + 1896,2874,-2219,0, + 2984,-1919,-2047,0, + 2744,288,-3027,0, + 1332,-3836,-533,0, + 895,-2816,-2837,0 +}; + +SVECTOR modelSphere_001_uv[] = { + 182,100, 0, 0, + 169,98, 0, 0, + 179,103, 0, 0, + 147,128, 0, 0, + 144,123, 0, 0, + 131,121, 0, 0, + 182,100, 0, 0, + 168,98, 0, 0, + 169,98, 0, 0, + 131,121, 0, 0, + 128,121, 0, 0, + 140,129, 0, 0, + 144,123, 0, 0, + 132,113, 0, 0, + 131,121, 0, 0, + 173,107, 0, 0, + 169,98, 0, 0, + 160,109, 0, 0, + 144,123, 0, 0, + 146,110, 0, 0, + 132,113, 0, 0, + 131,121, 0, 0, + 127,107, 0, 0, + 128,121, 0, 0, + 156,107, 0, 0, + 160,109, 0, 0, + 169,98, 0, 0, + 146,110, 0, 0, + 137,104, 0, 0, + 132,113, 0, 0, + 137,104, 0, 0, + 146,110, 0, 0, + 145,100, 0, 0, + 156,107, 0, 0, + 157,120, 0, 0, + 160,109, 0, 0, + 137,98, 0, 0, + 145,100, 0, 0, + 149,98, 0, 0, + 146,110, 0, 0, + 152,115, 0, 0, + 155,109, 0, 0, + 146,110, 0, 0, + 155,109, 0, 0, + 145,100, 0, 0, + 160,109, 0, 0, + 157,120, 0, 0, + 164,122, 0, 0, + 145,100, 0, 0, + 155,109, 0, 0, + 149,98, 0, 0, + 173,107, 0, 0, + 160,109, 0, 0, + 168,112, 0, 0, + 166,128, 0, 0, + 164,122, 0, 0, + 157,120, 0, 0, + 166,128, 0, 0, + 173,121, 0, 0, + 164,122, 0, 0, + 149,98, 0, 0, + 155,109, 0, 0, + 156,103, 0, 0, + 165,70, 0, 0, + 156,80, 0, 0, + 167,79, 0, 0, + 173,121, 0, 0, + 173,107, 0, 0, + 168,112, 0, 0, + 167,79, 0, 0, + 176,77, 0, 0, + 165,70, 0, 0, + 185,122, 0, 0, + 185,110, 0, 0, + 173,121, 0, 0, + 176,77, 0, 0, + 177,88, 0, 0, + 184,84, 0, 0, + 185,110, 0, 0, + 179,103, 0, 0, + 173,107, 0, 0, + 170,97, 0, 0, + 177,98, 0, 0, + 177,88, 0, 0, + 179,103, 0, 0, + 169,98, 0, 0, + 173,107, 0, 0, + 156,121, 0, 0, + 152,115, 0, 0, + 144,123, 0, 0, + 147,128, 0, 0, + 131,121, 0, 0, + 140,129, 0, 0, + 152,115, 0, 0, + 146,110, 0, 0, + 144,123, 0, 0, + 168,98, 0, 0, + 156,107, 0, 0, + 169,98, 0, 0, + 131,121, 0, 0, + 132,113, 0, 0, + 127,107, 0, 0, + 127,107, 0, 0, + 132,113, 0, 0, + 137,104, 0, 0, + 127,107, 0, 0, + 137,104, 0, 0, + 137,98, 0, 0, + 137,98, 0, 0, + 137,104, 0, 0, + 145,100, 0, 0, + 160,109, 0, 0, + 164,122, 0, 0, + 168,112, 0, 0, + 166,128, 0, 0, + 175,129, 0, 0, + 173,121, 0, 0, + 164,122, 0, 0, + 173,121, 0, 0, + 168,112, 0, 0, + 165,70, 0, 0, + 176,77, 0, 0, + 179,70, 0, 0, + 173,121, 0, 0, + 185,110, 0, 0, + 173,107, 0, 0, + 167,79, 0, 0, + 156,80, 0, 0, + 166,89, 0, 0, + 167,79, 0, 0, + 166,89, 0, 0, + 177,88, 0, 0, + 176,77, 0, 0, + 167,79, 0, 0, + 177,88, 0, 0, + 156,80, 0, 0, + 156,87, 0, 0, + 166,89, 0, 0, + 177,88, 0, 0, + 166,89, 0, 0, + 170,97, 0, 0, + 177,88, 0, 0, + 177,98, 0, 0, + 184,84, 0, 0, + 185,89, 0, 0, + 184,84, 0, 0, + 177,98, 0, 0, + 170,97, 0, 0, + 166,89, 0, 0, + 160,96, 0, 0 +}; + +CVECTOR modelSphere_001_color[] = { + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0 +}; + +PRIM modelSphere_001_index[] = { + 1,5,26,0,4, + 0,2,3,0,4, + 1,4,5,0,4, + 3,4,1,0,4, + 2,6,3,0,4, + 25,5,12,0,4, + 2,7,6,0,4, + 3,9,4,0,4, + 9,12,5,0,4, + 7,8,6,0,4, + 8,7,10,0,4, + 9,11,12,0,4, + 11,10,13,0,4, + 7,15,18,0,4, + 7,18,10,0,4, + 12,11,14,0,4, + 10,18,13,0,4, + 25,12,17,0,4, + 13,14,11,0,4, + 13,19,14,0,4, + 13,18,16,0,4, + 16,18,20,0,4, + 19,25,17,0,4, + 20,21,16,0,4, + 21,23,19,0,4, + 21,24,23,0,4, + 23,26,25,0,4, + 0,1,24,0,4, + 26,5,25,0,4, + 22,15,2,0,4, + 0,3,1,0,4, + 15,7,2,0,4, + 4,9,5,0,4, + 3,6,9,0,4, + 9,6,8,0,4, + 9,8,11,0,4, + 11,8,10,0,4, + 12,14,17,0,4, + 13,16,19,0,4, + 14,19,17,0,4, + 16,21,19,0,4, + 19,23,25,0,4, + 20,18,22,0,4, + 20,22,24,0,4, + 21,20,24,0,4, + 18,15,22,0,4, + 24,22,0,0,4, + 24,1,23,0,4, + 26,23,1,0,4, + 0,22,2,0,4 +}; + +MATRIX modelSphere_001_matrix = {0}; +VECTOR modelSphere_001_pos = {44,-73,92, 0}; +SVECTOR modelSphere_001_rot = {0,0,0}; +short modelSphere_001_isRigidBody = 1; +short modelSphere_001_isStaticBody = 0; +short modelSphere_001_isPrism = 0; +short modelSphere_001_isAnim = 0; +short modelSphere_001_isActor = 0; +short modelSphere_001_isLevel = 0; +short modelSphere_001_isBG = 0; +short modelSphere_001_isSprite = 0; +long modelSphere_001_p = 0; +long modelSphere_001_OTz = 0; +BODY modelSphere_001_body = { + {0, 0, 0, 0}, + 44,-73,92, 0, + 0,0,0, 0, + 5, + ONE/5, + -25,-24,-24, 0, + 24,24,25, 0, + 1024, + }; + +TMESH modelSphere_001 = { + modelSphere_001_mesh, + modelSphere_001_normal, + modelSphere_001_uv, + modelSphere_001_color, + 50 +}; + +MESH meshSphere_001 = { + &modelSphere_001, + modelSphere_001_index, + &tim_home, + _binary_TIM_home_tim_start, + &modelSphere_001_matrix, + &modelSphere_001_pos, + &modelSphere_001_rot, + &modelSphere_001_isRigidBody, + &modelSphere_001_isStaticBody, + &modelSphere_001_isPrism, + &modelSphere_001_isAnim, + &modelSphere_001_isActor, + &modelSphere_001_isLevel, + &modelSphere_001_isBG, + &modelSphere_001_isSprite, + &modelSphere_001_p, + &modelSphere_001_OTz, + &modelSphere_001_body, + 0, + 0 +}; + +SVECTOR modelwall_mesh[] = { + {-580,-97,-98}, + {-580,0,-98}, + {-580,-195,-98}, + {-580,-97,-1}, + {-580,0,-1}, + {-580,-195,-1}, + {-580,-97,97}, + {-580,0,97}, + {-580,-195,97}, + {-580,-97,194}, + {-580,0,194}, + {-580,-195,194} +}; + +SVECTOR modelwall_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 +}; + +SVECTOR modelwall_uv[] = { + 64,191, 0, 0, + 0,128, 0, 0, + 0,191, 0, 0, + 64,191, 0, 0, + 64,128, 0, 0, + 0,128, 0, 0, + 64,191, 0, 0, + 64,128, 0, 0, + 0,128, 0, 0, + 64,191, 0, 0, + 0,128, 0, 0, + 0,191, 0, 0, + 255,64, 0, 0, + 255,0, 0, 0, + 191,0, 0, 0, + 255,64, 0, 0, + 255,0, 0, 0, + 191,0, 0, 0, + 64,191, 0, 0, + 0,128, 0, 0, + 0,191, 0, 0, + 255,64, 0, 0, + 191,0, 0, 0, + 191,64, 0, 0, + 64,191, 0, 0, + 64,128, 0, 0, + 0,128, 0, 0, + 255,64, 0, 0, + 191,0, 0, 0, + 191,64, 0, 0, + 255,64, 0, 0, + 191,0, 0, 0, + 191,64, 0, 0, + 255,64, 0, 0, + 255,0, 0, 0, + 191,0, 0, 0 +}; + +CVECTOR modelwall_color[] = { + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0 +}; + +PRIM modelwall_index[] = { + 6,5,3,0,4, + 3,5,2,0,4, + 6,8,5,0,4, + 3,2,0,0,4, + 4,3,0,0,4, + 7,6,3,0,4, + 9,8,6,0,4, + 7,3,4,0,4, + 9,11,8,0,4, + 4,0,1,0,4, + 10,6,7,0,4, + 10,9,6,0,4 +}; + +MATRIX modelwall_matrix = {0}; +VECTOR modelwall_pos = {1,-1,0, 0}; +SVECTOR modelwall_rot = {0,0,0}; +short modelwall_isRigidBody = 0; +short modelwall_isStaticBody = 0; +short modelwall_isPrism = 0; +short modelwall_isAnim = 0; +short modelwall_isActor = 0; +short modelwall_isLevel = 0; +short modelwall_isBG = 1; +short modelwall_isSprite = 0; +long modelwall_p = 0; +long modelwall_OTz = 0; +BODY modelwall_body = { + {0, 0, 0, 0}, + 1,-1,0, 0, + 0,0,0, 0, + 1, + ONE/1, + -580,-195,-98, 0, + -580,0,194, 0, + 0, + }; + +TMESH modelwall = { + modelwall_mesh, + modelwall_normal, + modelwall_uv, + modelwall_color, + 12 +}; + +MESH meshwall = { + &modelwall, + modelwall_index, + &tim_home, + _binary_TIM_home_tim_start, + &modelwall_matrix, + &modelwall_pos, + &modelwall_rot, + &modelwall_isRigidBody, + &modelwall_isStaticBody, + &modelwall_isPrism, + &modelwall_isAnim, + &modelwall_isActor, + &modelwall_isLevel, + &modelwall_isBG, + &modelwall_isSprite, + &modelwall_p, + &modelwall_OTz, + &modelwall_body, + 0, + 0 +}; + +SVECTOR modelwall_001_mesh[] = { + {-92,-97,194}, + {-92,0,194}, + {-92,-195,194}, + {-190,-97,194}, + {-190,0,194}, + {-190,-195,194}, + {-287,-97,194}, + {-287,0,194}, + {-287,-195,194}, + {-385,-97,194}, + {-385,0,194}, + {-385,-195,194}, + {-482,-97,194}, + {-482,0,194}, + {-482,-195,194}, + {-580,-97,194}, + {-580,0,194}, + {-580,-195,194} +}; + +SVECTOR modelwall_001_normal[] = { + 0,0,4096,0, + 0,0,4096,0, + 0,0,4096,0, + 0,0,4096,0, + 0,0,4096,0, + 0,0,4096,0, + 0,0,4096,0, + 0,0,4096,0, + 0,0,4096,0, + 0,0,4096,0, + 0,0,4096,0, + 0,0,4096,0, + 0,0,4096,0, + 0,0,4096,0, + 0,0,4096,0, + 0,0,4096,0, + 0,0,4096,0, + 0,0,4096,0 +}; + +SVECTOR modelwall_001_uv[] = { + 64,191, 0, 0, + 0,191, 0, 0, + 0,128, 0, 0, + 64,191, 0, 0, + 0,128, 0, 0, + 64,128, 0, 0, + 255,64, 0, 0, + 191,64, 0, 0, + 191,0, 0, 0, + 255,64, 0, 0, + 191,0, 0, 0, + 255,0, 0, 0, + 64,191, 0, 0, + 0,191, 0, 0, + 0,128, 0, 0, + 64,191, 0, 0, + 0,128, 0, 0, + 64,128, 0, 0, + 255,64, 0, 0, + 191,64, 0, 0, + 191,0, 0, 0, + 255,64, 0, 0, + 191,0, 0, 0, + 255,0, 0, 0, + 64,191, 0, 0, + 0,191, 0, 0, + 0,128, 0, 0, + 255,64, 0, 0, + 191,64, 0, 0, + 191,0, 0, 0, + 64,191, 0, 0, + 0,128, 0, 0, + 64,128, 0, 0, + 255,64, 0, 0, + 191,0, 0, 0, + 255,0, 0, 0, + 64,191, 0, 0, + 0,191, 0, 0, + 0,128, 0, 0, + 255,64, 0, 0, + 191,64, 0, 0, + 191,0, 0, 0, + 64,191, 0, 0, + 0,128, 0, 0, + 64,128, 0, 0, + 255,64, 0, 0, + 191,0, 0, 0, + 255,0, 0, 0, + 64,191, 0, 0, + 0,191, 0, 0, + 0,128, 0, 0, + 255,64, 0, 0, + 191,64, 0, 0, + 191,0, 0, 0, + 64,191, 0, 0, + 0,128, 0, 0, + 64,128, 0, 0, + 255,64, 0, 0, + 191,0, 0, 0, + 255,0, 0, 0 +}; + +CVECTOR modelwall_001_color[] = { + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0 +}; + +PRIM modelwall_001_index[] = { + 3,0,2,0,4, + 3,2,5,0,4, + 4,1,0,0,4, + 4,0,3,0,4, + 6,3,5,0,4, + 6,5,8,0,4, + 7,4,3,0,4, + 7,3,6,0,4, + 9,6,8,0,4, + 10,7,6,0,4, + 9,8,11,0,4, + 10,6,9,0,4, + 12,9,11,0,4, + 13,10,9,0,4, + 12,11,14,0,4, + 13,9,12,0,4, + 15,12,14,0,4, + 16,13,12,0,4, + 15,14,17,0,4, + 16,12,15,0,4 +}; + +MATRIX modelwall_001_matrix = {0}; +VECTOR modelwall_001_pos = {0,-1,0, 0}; +SVECTOR modelwall_001_rot = {0,0,0}; +short modelwall_001_isRigidBody = 0; +short modelwall_001_isStaticBody = 0; +short modelwall_001_isPrism = 0; +short modelwall_001_isAnim = 0; +short modelwall_001_isActor = 0; +short modelwall_001_isLevel = 0; +short modelwall_001_isBG = 1; +short modelwall_001_isSprite = 0; +long modelwall_001_p = 0; +long modelwall_001_OTz = 0; +BODY modelwall_001_body = { + {0, 0, 0, 0}, + 0,-1,0, 0, + 0,0,0, 0, + 1, + ONE/1, + -580,-195,194, 0, + -92,0,194, 0, + 0, + }; + +TMESH modelwall_001 = { + modelwall_001_mesh, + modelwall_001_normal, + modelwall_001_uv, + modelwall_001_color, + 20 +}; + +MESH meshwall_001 = { + &modelwall_001, + modelwall_001_index, + &tim_home, + _binary_TIM_home_tim_start, + &modelwall_001_matrix, + &modelwall_001_pos, + &modelwall_001_rot, + &modelwall_001_isRigidBody, + &modelwall_001_isStaticBody, + &modelwall_001_isPrism, + &modelwall_001_isAnim, + &modelwall_001_isActor, + &modelwall_001_isLevel, + &modelwall_001_isBG, + &modelwall_001_isSprite, + &modelwall_001_p, + &modelwall_001_OTz, + &modelwall_001_body, + 0, + 0 +}; + +SVECTOR modelwall_002_mesh[] = { + {-92,-97,194}, + {-92,0,194}, + {-92,-195,194}, + {-92,-97,292}, + {-92,0,292}, + {-92,-195,292}, + {-92,-97,389}, + {-92,0,389}, + {-92,-195,389}, + {-92,-97,487}, + {-92,0,487}, + {-92,-195,487}, + {-92,-97,584}, + {-92,0,584}, + {-92,-195,584}, + {-92,-97,682}, + {-92,0,682}, + {-92,-195,682} +}; + +SVECTOR modelwall_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 +}; + +SVECTOR modelwall_002_uv[] = { + 64,191, 0, 0, + 0,128, 0, 0, + 0,191, 0, 0, + 64,191, 0, 0, + 64,128, 0, 0, + 0,128, 0, 0, + 255,64, 0, 0, + 191,0, 0, 0, + 191,64, 0, 0, + 255,64, 0, 0, + 255,0, 0, 0, + 191,0, 0, 0, + 64,191, 0, 0, + 0,128, 0, 0, + 0,191, 0, 0, + 191,64, 0, 0, + 255,0, 0, 0, + 191,0, 0, 0, + 64,191, 0, 0, + 64,128, 0, 0, + 0,128, 0, 0, + 191,64, 0, 0, + 255,64, 0, 0, + 255,0, 0, 0, + 64,191, 0, 0, + 0,128, 0, 0, + 0,191, 0, 0, + 255,64, 0, 0, + 191,0, 0, 0, + 191,64, 0, 0, + 64,191, 0, 0, + 64,128, 0, 0, + 0,128, 0, 0, + 255,64, 0, 0, + 255,0, 0, 0, + 191,0, 0, 0, + 64,191, 0, 0, + 0,128, 0, 0, + 0,191, 0, 0, + 255,64, 0, 0, + 191,0, 0, 0, + 191,64, 0, 0, + 64,191, 0, 0, + 64,128, 0, 0, + 0,128, 0, 0, + 255,64, 0, 0, + 255,0, 0, 0, + 191,0, 0, 0, + 64,191, 0, 0, + 0,128, 0, 0, + 0,191, 0, 0, + 255,64, 0, 0, + 191,0, 0, 0, + 191,64, 0, 0, + 64,191, 0, 0, + 64,128, 0, 0, + 0,128, 0, 0, + 255,64, 0, 0, + 255,0, 0, 0, + 191,0, 0, 0 +}; + +CVECTOR modelwall_002_color[] = { + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0 +}; + +PRIM modelwall_002_index[] = { + 3,2,0,0,4, + 3,5,2,0,4, + 4,0,1,0,4, + 4,3,0,0,4, + 6,5,3,0,4, + 4,6,3,0,4, + 6,8,5,0,4, + 4,7,6,0,4, + 9,8,6,0,4, + 10,6,7,0,4, + 9,11,8,0,4, + 10,9,6,0,4, + 12,11,9,0,4, + 13,9,10,0,4, + 12,14,11,0,4, + 13,12,9,0,4, + 15,14,12,0,4, + 16,12,13,0,4, + 15,17,14,0,4, + 16,15,12,0,4 +}; + +MATRIX modelwall_002_matrix = {0}; +VECTOR modelwall_002_pos = {0,0,0, 0}; +SVECTOR modelwall_002_rot = {0,0,0}; +short modelwall_002_isRigidBody = 0; +short modelwall_002_isStaticBody = 0; +short modelwall_002_isPrism = 0; +short modelwall_002_isAnim = 0; +short modelwall_002_isActor = 0; +short modelwall_002_isLevel = 0; +short modelwall_002_isBG = 1; +short modelwall_002_isSprite = 0; +long modelwall_002_p = 0; +long modelwall_002_OTz = 0; +BODY modelwall_002_body = { + {0, 0, 0, 0}, + 0,0,0, 0, + 0,0,0, 0, + 1, + ONE/1, + -92,-195,194, 0, + -92,0,682, 0, + 0, + }; + +TMESH modelwall_002 = { + modelwall_002_mesh, + modelwall_002_normal, + modelwall_002_uv, + modelwall_002_color, + 20 +}; + +MESH meshwall_002 = { + &modelwall_002, + modelwall_002_index, + &tim_home, + _binary_TIM_home_tim_start, + &modelwall_002_matrix, + &modelwall_002_pos, + &modelwall_002_rot, + &modelwall_002_isRigidBody, + &modelwall_002_isStaticBody, + &modelwall_002_isPrism, + &modelwall_002_isAnim, + &modelwall_002_isActor, + &modelwall_002_isLevel, + &modelwall_002_isBG, + &modelwall_002_isSprite, + &modelwall_002_p, + &modelwall_002_OTz, + &modelwall_002_body, + 0, + 0 +}; + +SVECTOR modelwall_003_mesh[] = { + {200,-97,682}, + {103,-97,682}, + {200,0,682}, + {200,-195,682}, + {103,0,682}, + {103,-195,682}, + {5,-97,682}, + {5,0,682}, + {5,-195,682}, + {-92,-97,682}, + {-92,0,682}, + {-92,-195,682} +}; + +SVECTOR modelwall_003_normal[] = { + 0,0,4096,0, + 0,0,4096,0, + 0,0,4096,0, + 0,0,4096,0, + 0,0,4096,0, + 0,0,4096,0, + 0,0,4096,0, + 0,0,4096,0, + 0,0,4096,0, + 0,0,4096,0, + 0,0,4096,0, + 0,0,4096,0 +}; + +SVECTOR modelwall_003_uv[] = { + 64,191, 0, 0, + 0,128, 0, 0, + 64,128, 0, 0, + 64,191, 0, 0, + 0,191, 0, 0, + 0,128, 0, 0, + 64,191, 0, 0, + 0,128, 0, 0, + 64,128, 0, 0, + 64,191, 0, 0, + 0,191, 0, 0, + 0,128, 0, 0, + 255,64, 0, 0, + 191,0, 0, 0, + 255,0, 0, 0, + 64,191, 0, 0, + 0,191, 0, 0, + 0,128, 0, 0, + 64,191, 0, 0, + 0,128, 0, 0, + 64,128, 0, 0, + 255,64, 0, 0, + 191,0, 0, 0, + 255,0, 0, 0, + 255,64, 0, 0, + 191,64, 0, 0, + 191,0, 0, 0, + 255,64, 0, 0, + 191,0, 0, 0, + 255,0, 0, 0, + 255,64, 0, 0, + 191,64, 0, 0, + 191,0, 0, 0, + 255,64, 0, 0, + 191,64, 0, 0, + 191,0, 0, 0 +}; + +CVECTOR modelwall_003_color[] = { + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0, + 80,80,80,0, + 128,128,128,0, + 128,128,128,0 +}; + +PRIM modelwall_003_index[] = { + 6,5,8,0,4, + 6,1,5,0,4, + 1,3,5,0,4, + 9,6,8,0,4, + 7,1,6,0,4, + 1,0,3,0,4, + 9,8,11,0,4, + 4,0,1,0,4, + 7,4,1,0,4, + 10,6,9,0,4, + 10,7,6,0,4, + 4,2,0,0,4 +}; + +MATRIX modelwall_003_matrix = {0}; +VECTOR modelwall_003_pos = {0,0,-1, 0}; +SVECTOR modelwall_003_rot = {0,0,0}; +short modelwall_003_isRigidBody = 0; +short modelwall_003_isStaticBody = 0; +short modelwall_003_isPrism = 0; +short modelwall_003_isAnim = 0; +short modelwall_003_isActor = 0; +short modelwall_003_isLevel = 0; +short modelwall_003_isBG = 1; +short modelwall_003_isSprite = 0; +long modelwall_003_p = 0; +long modelwall_003_OTz = 0; +BODY modelwall_003_body = { + {0, 0, 0, 0}, + 0,0,-1, 0, + 0,0,0, 0, + 1, + ONE/1, + -92,-195,682, 0, + 200,0,682, 0, + 0, + }; + +TMESH modelwall_003 = { + modelwall_003_mesh, + modelwall_003_normal, + modelwall_003_uv, + modelwall_003_color, + 12 +}; + +MESH meshwall_003 = { + &modelwall_003, + modelwall_003_index, + &tim_home, + _binary_TIM_home_tim_start, + &modelwall_003_matrix, + &modelwall_003_pos, + &modelwall_003_rot, + &modelwall_003_isRigidBody, + &modelwall_003_isStaticBody, + &modelwall_003_isPrism, + &modelwall_003_isAnim, + &modelwall_003_isActor, + &modelwall_003_isLevel, + &modelwall_003_isBG, + &modelwall_003_isSprite, + &modelwall_003_p, + &modelwall_003_OTz, + &modelwall_003_body, + 0, + 0 +}; + +MESH * meshes[15] = { + &meshCube, + &meshCylindre, + &meshgnd, + &meshgnd_001, + &meshgnd_003, + &meshgnd_002, + &meshLara, + &meshobject, + &meshPlan, + &meshSphere, + &meshSphere_001, + &meshwall, + &meshwall_001, + &meshwall_002, + &meshwall_003 +}; +extern unsigned long _binary_TIM_bg_camPath_tim_start[]; +extern unsigned long _binary_TIM_bg_camPath_tim_end[]; +extern unsigned long _binary_TIM_bg_camPath_tim_length; + +TIM_IMAGE tim_bg_camPath; + +CAMANGLE camAngle_camPath = { + &camPos_camPath, + &tim_bg_camPath, + _binary_TIM_bg_camPath_tim_start, + // Write quad NW, NE, SE, SW + { + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 } + }, + { + { -45, 206, 142, 0 }, + { 186, 198, 142, 0 }, + { 186, 198, 19, 0 }, + { -45, 206, 19, 0 } + }, + 6, + { + &meshCube, + &meshCylindre, + &meshLara, + &meshPlan, + &meshSphere, + &meshSphere_001 + } +}; + +extern unsigned long _binary_TIM_bg_camPath_001_tim_start[]; +extern unsigned long _binary_TIM_bg_camPath_001_tim_end[]; +extern unsigned long _binary_TIM_bg_camPath_001_tim_length; + +TIM_IMAGE tim_bg_camPath_001; + +CAMANGLE camAngle_camPath_001 = { + &camPos_camPath_001, + &tim_bg_camPath_001, + _binary_TIM_bg_camPath_001_tim_start, + // Write quad NW, NE, SE, SW + { + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 } + }, + { + { -368, 176, 118, 0 }, + { -368, -50, 118, 0 }, + { -368, -49, 15, 0 }, + { -368, 176, 15, 0 } + }, + 2, + { + &meshCube, + &meshSphere + } +}; + +extern unsigned long _binary_TIM_bg_camPath_002_tim_start[]; +extern unsigned long _binary_TIM_bg_camPath_002_tim_end[]; +extern unsigned long _binary_TIM_bg_camPath_002_tim_length; + +TIM_IMAGE tim_bg_camPath_002; + +CAMANGLE camAngle_camPath_002 = { + &camPos_camPath_002, + &tim_bg_camPath_002, + _binary_TIM_bg_camPath_002_tim_start, + // Write quad NW, NE, SE, SW + { + { -368, 176, 118, 0 }, + { -368, -50, 118, 0 }, + { -368, -49, 15, 0 }, + { -368, 176, 15, 0 } + }, + { + { -112, 185, 166, 0 }, + { -112, -41, 166, 0 }, + { -113, -40, 15, 0 }, + { -113, 185, 15, 0 } + }, + 3, + { + &meshCube, + &meshPlan, + &meshSphere + } +}; + +extern unsigned long _binary_TIM_bg_camPath_003_tim_start[]; +extern unsigned long _binary_TIM_bg_camPath_003_tim_end[]; +extern unsigned long _binary_TIM_bg_camPath_003_tim_length; + +TIM_IMAGE tim_bg_camPath_003; + +CAMANGLE camAngle_camPath_003 = { + &camPos_camPath_003, + &tim_bg_camPath_003, + _binary_TIM_bg_camPath_003_tim_start, + // Write quad NW, NE, SE, SW + { + { -112, 185, 166, 0 }, + { -112, -41, 166, 0 }, + { -113, -40, 15, 0 }, + { -113, 185, 15, 0 } + }, + { + { -45, 206, 142, 0 }, + { 186, 198, 142, 0 }, + { 186, 198, 19, 0 }, + { -45, 206, 19, 0 } + }, + 5, + { + &meshCube, + &meshCylindre, + &meshLara, + &meshSphere_001, + &meshSphere + } +}; + +extern unsigned long _binary_TIM_bg_camPath_004_tim_start[]; +extern unsigned long _binary_TIM_bg_camPath_004_tim_end[]; +extern unsigned long _binary_TIM_bg_camPath_004_tim_length; + +TIM_IMAGE tim_bg_camPath_004; + +CAMANGLE camAngle_camPath_004 = { + &camPos_camPath_004, + &tim_bg_camPath_004, + _binary_TIM_bg_camPath_004_tim_start, + // Write quad NW, NE, SE, SW + { + { -112, 185, 166, 0 }, + { -112, -41, 166, 0 }, + { -113, -40, 15, 0 }, + { -113, 185, 15, 0 } + }, + { + { -45, 206, 142, 0 }, + { 186, 198, 142, 0 }, + { 186, 198, 19, 0 }, + { -45, 206, 19, 0 } + }, + 6, + { + &meshCube, + &meshCylindre, + &meshLara, + &meshPlan, + &meshSphere, + &meshSphere_001 + } +}; + +extern unsigned long _binary_TIM_bg_camPath_005_tim_start[]; +extern unsigned long _binary_TIM_bg_camPath_005_tim_end[]; +extern unsigned long _binary_TIM_bg_camPath_005_tim_length; + +TIM_IMAGE tim_bg_camPath_005; + +CAMANGLE camAngle_camPath_005 = { + &camPos_camPath_005, + &tim_bg_camPath_005, + _binary_TIM_bg_camPath_005_tim_start, + // Write quad NW, NE, SE, SW + { + { -45, 206, 142, 0 }, + { 186, 198, 142, 0 }, + { 186, 198, 19, 0 }, + { -45, 206, 19, 0 } + }, + { + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 }, + { 0, 0, 0, 0 } + }, + 3, + { + &meshCylindre, + &meshSphere_001, + &meshSphere + } +}; + +CAMANGLE * camAngles[6] = { + &camAngle_camPath, + &camAngle_camPath_001, + &camAngle_camPath_002, + &camAngle_camPath_003, + &camAngle_camPath_004, + &camAngle_camPath_005, +}; + +NODE nodegnd_003; + +NODE nodegnd_001; + +NODE nodegnd_002; + +NODE nodegnd; + +SIBLINGS nodegnd_003_siblings = { + 1, + { + &nodegnd + } +}; + +CHILDREN nodegnd_003_objects = { + 0, + { + 0 + } +}; + +CHILDREN nodegnd_003_rigidbodies = { + 2, + { + &meshSphere, + &meshSphere_001 + } +}; + +NODE nodegnd_003 = { + &meshgnd_003, + &nodegnd_003_siblings, + &nodegnd_003_objects, + &nodegnd_003_rigidbodies +}; + +SIBLINGS nodegnd_001_siblings = { + 1, + { + &nodegnd + } +}; + +CHILDREN nodegnd_001_objects = { + 3, + { + &meshwall_002, + &meshwall_003, + &meshCylindre + } +}; + +CHILDREN nodegnd_001_rigidbodies = { + 2, + { + &meshSphere, + &meshSphere_001 + } +}; + +NODE nodegnd_001 = { + &meshgnd_001, + &nodegnd_001_siblings, + &nodegnd_001_objects, + &nodegnd_001_rigidbodies +}; + +SIBLINGS nodegnd_002_siblings = { + 1, + { + &nodegnd + } +}; + +CHILDREN nodegnd_002_objects = { + 1, + { + &meshobject + } +}; + +CHILDREN nodegnd_002_rigidbodies = { + 2, + { + &meshSphere, + &meshSphere_001 + } +}; + +NODE nodegnd_002 = { + &meshgnd_002, + &nodegnd_002_siblings, + &nodegnd_002_objects, + &nodegnd_002_rigidbodies +}; + +SIBLINGS nodegnd_siblings = { + 3, + { + &nodegnd_003, + &nodegnd_002, + &nodegnd_001 + } +}; + +CHILDREN nodegnd_objects = { + 6, + { + &meshPlan, + &meshwall_001, + &meshwall, + &meshSphere_001, + &meshLara, + &meshCube + } +}; + +CHILDREN nodegnd_rigidbodies = { + 2, + { + &meshSphere, + &meshSphere_001 + } +}; + +NODE nodegnd = { + &meshgnd, + &nodegnd_siblings, + &nodegnd_objects, + &nodegnd_rigidbodies +}; + +MESH * actorPtr = &meshSphere; +MESH * levelPtr = &meshgnd; +MESH * propPtr = &meshSphere_001; + +CAMANGLE * camPtr = &camAngle_camPath_001; + +NODE * curNode = &nodegnd; + diff --git a/pngquant.exe b/pngquant.exe index bfc28ce..aefa5af 100644 Binary files a/pngquant.exe and b/pngquant.exe differ diff --git a/psx-demo.c b/psx-demo.c new file mode 100644 index 0000000..5096ad6 --- /dev/null +++ b/psx-demo.c @@ -0,0 +1,2861 @@ +// 3dcam +// With huge help from : +// @NicolasNoble : https://discord.com/channels/642647820683444236/646765703143227394/796876392670429204 +// @Lameguy64 +// @Impiaa +// @paul + + + /* PSX screen coordinate system + * + * Z+ + * / + * / + * +------X+ + * /| + * / | + * / Y+ + * eye */ + +// Blender debug mode +// bpy. app. debug = True + +#include +#include +#include +#include +#include +#include +#include + +// Precalculated arctan values + +#include "atan.c" + +// Sample level + +#include "level.c" + +// + +#define VMODE 0 + +#define SCREENXRES 320 + +#define SCREENYRES 240 + +#define CENTERX SCREENXRES/2 + +#define CENTERY SCREENYRES/2 + +#define FOV CENTERX // With a FOV of 1/2, camera focal length is ~= 16 mm / 90° + // Lower values mean wider angle +// pixel > cm : used in physics calculations + +#define SCALE 4 + +#define FNT_POS_X 960 + +#define FNT_POS_Y 0 + + +#define OT2LEN 8 + +#define OTLEN 256 // Maximum number of OT entries + +#define PRIMBUFFLEN 4096 * sizeof(POLY_GT4) // Maximum number of POLY_GT3 primitives + +// MACROS + +// swap(x, y, buffer) + +#define SWAP(a,b,c) {(c)=(a); (a)=(b); (b)=(c);} + +// dotproduct of two vectors + +#define dotProduct(v0, v1) \ + (v0).vx * (v1).vx + \ + (v0).vy * (v1).vy + \ + (v0).vz * (v1).vz + +// min value + +#define min(a,b) \ + (a)-(b)>0?(b):(a) +// max + +#define max(a,b) \ + (a)-(b)>0?(a):(b) + +// substract vector + +#define subVector(v0, v1) \ + (v0).vx - (v1).vx, \ + (v0).vy - (v1).vy, \ + (v0).vz - (v1).vz + + +#define normalizeVector(v) \ + ((v)->vx << 12) >> 8, \ + ((v)->vy << 12) >> 8, \ + ((v)->vz << 12) >> 8 + +// Display and draw environments, double buffered + +DISPENV disp[2]; + +DRAWENV draw[2]; + +// OT for BG/FG discrimination + +u_long otdisc[2][OT2LEN] = {0}; + +// Main OT + +u_long ot[2][OTLEN] = {0}; // Ordering table (contains addresses to primitives) + +char primbuff[2][PRIMBUFFLEN] = {0}; // Primitive list // That's our prim buffer + +//~ int primcnt=0; // Primitive counter + +char * nextpri = primbuff[0]; // Primitive counter + +char db = 0; // Current buffer counter + + +CVECTOR BGc = {50, 50, 75, 0}; // Far color + +VECTOR BKc = {128, 128, 128, 0}; // Back color + +// Local color matrix + +//~ static MATRIX cmat = { +//~ /* light source #0, #1, #2, */ + //~ ONE, 0, 0, /* R */ + //~ 0, ONE, 0, /* G */ + //~ 0, 0, ONE, /* B */ +//~ }; + +//~ // local light matrix : Direction and reach of each light source. +//~ // Each light is aligned with the axis, hence direction is in the same coordinate system as the PSX (Y-axis down) +//~ // One == 4096 is reach/intensity of light source + +//~ static MATRIX lgtmat = { +//~ // X Y Z + //~ ONE, 0, 0, // Light 0 + //~ 0,0,0, // Light 1 + //~ 0,0,0 // Light 2 +//~ }; + +// Light + +//~ MATRIX rottrans; + +MATRIX rotlgt; + +SVECTOR lgtang = {0, 0, 0}; + +MATRIX light; + +static int m_cosTable[512]; // precalc costable + +static const unsigned int DC_2PI = 2048; // this is from here : https://github.com/grumpycoders/Balau/blob/master/tests/test-Handles.cc#L20-L102 + +static const unsigned int DC_PI = 1024; + +static const unsigned int DC_PI2 = 512; + +short vs; + +typedef struct{ + + int x, xv; // x: current value += xv : new value + + int y, yv; // x,y,z, vx, vy, vz are in PSX units (ONE == 4096) + + int z, zv; + + int pan, panv; + + int tilt, tiltv; + + int rol; + + VECTOR pos; + + SVECTOR rot; + + SVECTOR dvs; + + MATRIX mat; + +} CAMERA; + +CAMERA camera = { + + 0,0, + + 0,0, + + 0,0, + + 0,0, + + 0,0, + + 0, + + {0,0,0}, + + {0,0,0}, + + {0,0,0} +}; + + +// physics + +long time = 0; + +const int gravity = 10; + +//Pad + +int pressed = 0; + +u_short timer = 0; + +// Cam stuff + +int camMode = 2; + +long timeB = 0; + +int lerping = 0; + +short curCamAngle = 0; + +// Inverted Cam coordinates for Forward Vector calc + +VECTOR InvCamPos = {0,0,0,0}; + +VECTOR fVecActor = {0,0,0,0}; + +u_long triCount = 0; + +// Prototypes + +// Stolen from grumpycoder + +// Sin/Cos Table + +void generateTable(void); + +int ncos(u_int t); + +int nsin(u_int t); + +// Atan table + +long long patan(long x, long y); + +// Sqrt + +u_int psqrt(u_int n); + +// fixed point math + +static inline int32_t dMul(int32_t a, int32_t b); + +static inline uint32_t lerpU(uint32_t start, uint32_t dest, unsigned pos); + +static inline int32_t lerpS(int32_t start, int32_t dest, unsigned pos); + +static inline int32_t lerpD(int32_t start, int32_t dest, int32_t pos); + +static inline long long lerpL(long long start, long long dest, long long pos); + +// PSX setup + +void init(void); + +void display(void); + +// Utils + +void LoadTexture(u_long * tim, TIM_IMAGE * tparam); + +int cliptest3(short * v1); + +int lerp(int start, int end, int factor); // FIXME : not working as it should + +SVECTOR SVlerp(SVECTOR start, SVECTOR end, int factor); // FIXME + +VECTOR getVectorTo(VECTOR actor, VECTOR target); + +//~ int alignAxisToVect(VECTOR target, short axis, int factor); + +void worldToScreen( VECTOR * worldPos, VECTOR * screenPos ); + +void screenToWorld( VECTOR * screenPos, VECTOR * worldPos ); + +short checkLineW( VECTOR * pointA, VECTOR * pointB, MESH * mesh ); + +short checkLineS( VECTOR * pointA, VECTOR * pointB, MESH * mesh ); + +// Drawing + +void transformMesh(MESH * meshes); + +void drawBG(void); + +void drawPoly(MESH * meshes, long * Flag, int atime); + +// Camera + +void getCameraXZ(int * x, int * z, int actorX, int actorZ, int angle, int distance); + +void applyCamera(CAMERA * cam); + +void setCameraPos(VECTOR pos, SVECTOR rot); + +// Physics + +VECTOR getIntCollision(BODY one, BODY two); + +VECTOR getExtCollision(BODY one, BODY two); + +void ResolveCollision( BODY * one, BODY * two ); + +VECTOR angularMom(BODY body); // Not this kind of mom ;) + +void applyAcceleration(BODY * actor); + +// Pad + +void callback(); + +int main() { + + VECTOR sp = {CENTERX,CENTERY,0}; + VECTOR wp = {0,0,0}; + + // FIXME : Poly subdiv + + //~ DIVPOLYGON4 div4 = { 0 }; + //~ div4.pih = SCREENXRES; + //~ div4.piv = SCREENYRES; + //~ div4.ndiv = 2; + //~ long OTc = 0; + + //~ DIVPOLYGON3 div3 = { 0 }; + //~ div3.pih = SCREENXRES; + //~ div3.piv = SCREENYRES; + //~ div3.ndiv = 1; + + init(); + + generateTable(); + + VSyncCallback(callback); + + // Load textures + + for (int k = 0; k < sizeof(meshes)/sizeof(TMESH *); k++){ + + LoadTexture(meshes[k]->tim_data, meshes[k]->tim); + + } + + // Load current BG + + if (camPtr->tim_data){ + + LoadTexture(camPtr->tim_data, camPtr->BGtim); + + } + + // Physics + + short physics = 1; + + long dt; + + VECTOR col_lvl, col_sphere, col_sphere_act = {0}; + + // Cam stuff + + VECTOR posToActor = {0, 0, 0, 0}; // position of camera relative to actor + + VECTOR camAngleToAct = {0, 0, 0, 0}; // rotation angles for the camera to point at actor + + // Sprite system + + VECTOR posToCam = {0, 0, 0, 0}; + + VECTOR objAngleToCam = {0, 0, 0, 0}; + + //~ long objAngleToCam = 0; + + + + int angle = 0; //PSX units = 4096 == 360° = 2Pi + + int dist = 0; //PSX units + + short timediv = 1; + + int atime = 0; + + // Polycount + + for (int k = 0; k < sizeof(meshes)/sizeof(meshes[0]); k++){ + + triCount += meshes[k]->tmesh->len; + + } + + // Set camera starting pos + + setCameraPos(camPtr->campos->pos, camPtr->campos->rot); + + // Find curCamAngle if using pre-calculated BGs + + if (camMode == 2) { + + if (camPtr->tim_data){ + + curCamAngle = 1; + + } + } + + // Main loop + + //~ while (1) { + + while ( VSync(1) ) { + + // Clear the main OT + + ClearOTagR(otdisc[db], OT2LEN); + + // Clear Secondary OT + + ClearOTagR(ot[db], OTLEN); + + // timeB = time; + + time ++; + + // atime is used for animations timing + + timediv = 1; + + if (time % timediv == 0){ + + atime ++; + + } + + // Angle between camera and actor + + // 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 ); + + //~ meshPlan.rot->vx = -( (objAngleToCam.vx >> 4) - 3076 ) ; + //~ meshPlan.rot->vx = (( (objAngleToCam.vx >> 4) - 3076 ) * ( (objAngleToCam.vz >> 4) - 3076 ) >> 12) * (nsin(posToCam.vz) >> 10 < 0 ? -1 : 1); + //~ meshPlan.rot->vx = ( (objAngleToCam.vx >> 4) - 3076 ) * ( (objAngleToCam.vz >> 4) - 3076 ) >> 12 ; + + meshPlan.rot->vy = -( (objAngleToCam.vy >> 4) + 1024 ) ; + + //~ posToCam = getVectorTo(*meshPlan.pos, camera.pos); + + //~ posToCam = getVectorTo(camera.pos, *meshPlan.pos); + + posToCam.vx = -camera.pos.vx - modelPlan_pos.vx ; + posToCam.vz = -camera.pos.vz - modelPlan_pos.vz ; + posToCam.vy = -camera.pos.vy - modelPlan_pos.vy ; + + //~ psqrt(posToCam.vx * posToCam.vx + posToCam.vy * posToCam.vy); + + // Actor Forward vector for 3d relative orientation + + fVecActor = *actorPtr->pos; + + fVecActor.vx = actorPtr->pos->vx + (nsin(actorPtr->rot->vy/2)); + + fVecActor.vz = actorPtr->pos->vz - (ncos(actorPtr->rot->vy/2)); + + // Camera modes + + if(camMode != 2) { + + camera.rot.vy = camAngleToAct.vy; + + // using csin/ccos, no need for theta + + //~ camera.rot.vy = angle; + + camera.rot.vx = camAngleToAct.vx; + + } + + if(camMode < 4 ) { + + lerping = 0; + + } + + // Camera follows actor with lerp for rotations + if(camMode == 0) { + + dist = 150; + + 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 = -actorPtr->rot->vy / 2; + + //~ angle = actorPtr->rot->vy; + + getCameraXZ(&camera.x, &camera.z, actorPtr->pos->vx, actorPtr->pos->vz, angle, dist); + + // FIXME! camera lerping to pos + //~ angle += lerp(camera.rot.vy, -actorPtr->rot->vy, 128); + //~ angle = lerpD(camera.rot.vy << 12, actorPtr->rot->vy << 12, 1024 << 12) >> 12; + + } + + // Camera rotates continuously around actor + if (camMode == 1) { + + dist = 150; + + camera.pos.vx = -(camera.x/ONE); + + //~ camera.pos.vy = -(camera.y/ONE); + + camera.pos.vz = -(camera.z/ONE); + + //~ fVecActor = *actorPtr->pos; + + //~ fVecActor.vx = actorPtr->pos->vx + (nsin(actorPtr->rot->vy)); + //~ fVecActor.vz = actorPtr->pos->vz - (ncos(actorPtr->rot->vy)); + + + getCameraXZ(&camera.x, &camera.z, actorPtr->pos->vx, actorPtr->pos->vz, angle, dist); + + angle += 10; + } + + // Fixed Camera with actor tracking + if (camMode == 3) { + + // Using precalc sqrt + + dist = psqrt( (posToActor.vx * posToActor.vx ) + (posToActor.vz * posToActor.vz) ); + + camera.pos.vx = 190; + + camera.pos.vz = 100; + + camera.pos.vy = 180; + } + + // Fixed Camera angle + if (camMode == 2) { + + + // If BG images exist + + if (camPtr->tim_data){ + + checkLineW( &camAngles[ curCamAngle ]->fw.v3, &camAngles[ curCamAngle ]->fw.v2, actorPtr); + + if ( 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, actorPtr) ); + + //~ FntPrint("Pos : %d\n", checkLineW( &camAngles[ curCamAngle ]->bw.v2, &camAngles[ curCamAngle ]->bw.v3, actorPtr) ); + // If actor in camAngle->fw area of screen + + if ( checkLineW( &camAngles[ curCamAngle ]->fw.v3, &camAngles[ curCamAngle ]->fw.v2, actorPtr) == -1 && + + ( checkLineW( &camAngles[ curCamAngle ]->bw.v2, &camAngles[ curCamAngle ]->bw.v3, actorPtr) >= 0 + + ) + + ) { + + if (curCamAngle < 5) { + + curCamAngle++; + + camPtr = camAngles[ curCamAngle ]; + + LoadTexture(camPtr->tim_data, camPtr->BGtim); + + } + + } + + } + + if ( 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, actorPtr) ); + + // If actor in camAngle->bw area of screen + + if ( checkLineW( &camAngles[ curCamAngle ]->fw.v3, &camAngles[ curCamAngle ]->fw.v2, actorPtr) >= 0 && + + checkLineW( &camAngles[ curCamAngle ]->bw.v2, &camAngles[ curCamAngle ]->bw.v3, actorPtr) == -1 + + ) { + + if (curCamAngle > 0) { + + curCamAngle--; + + camPtr = camAngles[ curCamAngle ]; + + LoadTexture(camPtr->tim_data, camPtr->BGtim); + + } + + } + + } + + } + + setCameraPos(camPtr->campos->pos, camPtr->campos->rot); + + } + + // Flyby mode with LERP from camStart to camEnd + + if (camMode == 4) { + + // If key pos exist for camera + + if (camPath.len) { + + // Lerping sequence has not begun + + if (!lerping){ + + // Set cam start position ( first key pos ) + + camera.pos.vx = camPath.points[camPath.cursor].vx; + + camera.pos.vy = camPath.points[camPath.cursor].vy; + + camera.pos.vz = camPath.points[camPath.cursor].vz; + + // Lerping sequence is starting + lerping = 1; + + // Set cam pos index to 0 + camPath.pos = 0; + + } + + // Pre calculated sqrt ( see psqrt() ) + dist = psqrt( (posToActor.vx * posToActor.vx ) + (posToActor.vz * posToActor.vz)); + + // Fixed point precision 2^12 == 4096 + + int precision = 12; + + camera.pos.vx = lerpD(camPath.points[camPath.cursor].vx << precision, camPath.points[camPath.cursor+1].vx << precision, camPath.pos << precision) >> precision; + + camera.pos.vy = lerpD(camPath.points[camPath.cursor].vy << precision, camPath.points[camPath.cursor+1].vy << precision, camPath.pos << precision) >> precision; + + camera.pos.vz = lerpD(camPath.points[camPath.cursor].vz << precision, camPath.points[camPath.cursor+1].vz << precision, camPath.pos << precision) >> precision; + + //~ FntPrint("Cam %d, %d\n", (int32_t)camPath.points[camPath.cursor].vx, camPath.points[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", camPath.pos, camPath.cursor, theta.vy, theta.vx); + + // Linearly increment the lerp factor + + camPath.pos += 20; + + // If camera has reached next key pos, reset pos index, move cursor to next key pos + if (camPath.pos > (1 << precision) ){ + + camPath.pos = 0; + + camPath.cursor ++; + + } + + // Last key pos is reached, reset cursor to first key pos, lerping sequence is over + if ( camPath.cursor == camPath.len - 1 ){ + + lerping = 0; + + camPath.cursor = 0; + } + + } else { + + // if no key pos exists, switch to next camMode + + camMode ++; } + } + + // Camera "on a rail" - cam is tracking actor, and moving with constraints on all axis + + if (camMode == 5) { + + // track actor. If theta (actor/cam rotation angle) is above or below an arbitrary angle, + // move cam so that the angle doesn't increase/decrease anymore. + + if (camPath.len) { + + // Lerping sequence has not begun + + if (!lerping){ + + // Set cam start position ( first key pos ) + + camera.pos.vx = camPath.points[camPath.cursor].vx; + + camera.pos.vy = camPath.points[camPath.cursor].vy; + + camera.pos.vz = camPath.points[camPath.cursor].vz; + + // Lerping sequence is starting + + lerping = 1; + + // Set cam pos index to 0 + + camPath.pos = 0; + + } + + // Pre calculated sqrt ( see psqrt() ) + + dist = psqrt( (posToActor.vx * posToActor.vx ) + (posToActor.vz * posToActor.vz)); + + // Fixed point precision 2^12 == 4096 + + short precision = 12; + + camera.pos.vx = lerpD(camPath.points[camPath.cursor].vx << precision, camPath.points[camPath.cursor + 1].vx << precision, camPath.pos << precision) >> precision; + + camera.pos.vy = lerpD(camPath.points[camPath.cursor].vy << precision, camPath.points[camPath.cursor + 1].vy << precision, camPath.pos << precision) >> precision; + + camera.pos.vz = lerpD(camPath.points[camPath.cursor].vz << precision, camPath.points[camPath.cursor + 1].vz << precision, camPath.pos << precision) >> precision; + + //~ FntPrint("Cam %d, %d\n", (int32_t)camPath.points[camPath.cursor].vx, camPath.points[camPath.cursor+1].vx); + //~ FntPrint("Cam %d, %d, %d\n", camera.pos.vx, camera.pos.vy, camera.pos.vz); + //~ FntPrint("Pos: %d Cur: %d\nTheta y: %d x: %d\n", camPath.pos, camPath.cursor, theta.vy, theta.vx); + + //~ FntPrint("%d", camAngleToAct.vy); + + if ( camAngleToAct.vy < -50 ) { + + camPath.pos += 40; + + } + + if ( camAngleToAct.vy > 50 ) { + + camPath.pos -= 40; + + } + + // If camera has reached next key pos, reset pos index, move cursor to next key pos + + if (camPath.pos > (1 << precision) ){ + + camPath.pos = 0; + + camPath.cursor ++; + + //~ camPath.dir = 1; + } + + if (camPath.pos < -100 ){ + + camPath.pos = 1 << precision; + + camPath.cursor --; + + //~ camPath.dir *= -1; + } + + // Last key pos is reached, reset cursor to first key pos, lerping sequence is over + + if ( camPath.cursor == camPath.len - 1 || camPath.cursor < 0 ){ + + lerping = 0; + + camPath.cursor = 0; + } + + } else { + // if no key pos exists, switch to next camMode + + camMode ++; + + } + + } + + //~ dt = time/180+1 - time/180; + + // Spatial partitioning + + for ( int msh = 0; msh < curNode->siblings->index; msh ++ ) { + + // Actor + + if ( !getIntCollision( *actorPtr->body , *curNode->siblings->list[msh]->plane->body).vx && + + !getIntCollision( *actorPtr->body , *curNode->siblings->list[msh]->plane->body).vz ) + { + + if ( curNode != curNode->siblings->list[msh] ) { + + curNode = curNode->siblings->list[msh]; + + levelPtr = curNode->plane; + } + + } + +// FIXME ! //~ // Moveable prop + + //~ if ( !getIntCollision( *propPtr->body , *curNode->siblings->list[msh]->plane->body).vx && + //~ !getIntCollision( *propPtr->body , *curNode->siblings->list[msh]->plane->body).vz ) { + + //~ if ( propPtr->node != curNode->siblings->list[ msh ]){ + + //~ propPtr->node = curNode->siblings->list[ msh ]; + //~ } + + //~ } else + if ( !getIntCollision( *propPtr->body , *curNode->plane->body).vx && + !getIntCollision( *propPtr->body , *curNode->plane->body).vz ) { + + propPtr->node = curNode; + + } + + } + + // Physics + + if ( physics ) { + + // if(time%1 == 0){ + + for ( int k = 0; k < sizeof(meshes)/sizeof(meshes[0]);k ++ ) { + //~ for ( int k = 0; k < curNode->objects->index ; k ++){ + + if ( ( *meshes[k]->isRigidBody == 1 ) ) { + //~ if ( ( *curNode->rigidbodies->list[k]->isRigidBody == 1 ) ) { + + //~ applyAcceleration(curNode->rigidbodies->list[k]->body); + + applyAcceleration(meshes[k]->body); + + // Get col with level ( modelgnd_body ) + + col_lvl = getIntCollision( *meshes[k]->body , *levelPtr->body ); + + + //~ col_sphere = getIntCollision( *propPtr->body, *propPtr->node->plane->body ); + + // col_sphere = getIntCollision( *propPtr->body, *levelPtr->body ); + + col_sphere_act = getExtCollision( *actorPtr->body, *propPtr->body ); + + //~ // If no col with ground, fall off + + if ( col_lvl.vy ) { + + if (!col_lvl.vx && !col_lvl.vz){actorPtr->body->position.vy = actorPtr->body->min.vy;} + + } + if (col_sphere.vy){ + if (!col_sphere.vx && !col_sphere.vz){propPtr->body->position.vy = propPtr->body->min.vy; } + } + + if (col_sphere_act.vx && col_sphere_act.vz ){ + + propPtr->body->velocity.vx += actorPtr->body->velocity.vx;// * ONE / propPtr->body->restitution ; + propPtr->body->velocity.vz += actorPtr->body->velocity.vz;// * ONE / propPtr->body->restitution ; + + if (propPtr->body->velocity.vx){ + + VECTOR L = angularMom(*propPtr->body); + propPtr->rot->vz -= L.vx; + } + + if (propPtr->body->velocity.vz){ + + VECTOR L = angularMom(*propPtr->body); + propPtr->rot->vx -= L.vz; + } + } + + meshes[k]->pos->vx = meshes[k]->body->position.vx; + + meshes[k]->pos->vy = meshes[k]->body->position.vy ; + + meshes[k]->pos->vz = meshes[k]->body->position.vz; + + + } + + meshes[k]->body->velocity.vy = 0; + + meshes[k]->body->velocity.vx = 0; + + meshes[k]->body->velocity.vz = 0; + + } + + // } + } + + if ( (camMode == 2) && (camPtr->tim_data ) ) { + + worldToScreen(actorPtr->pos, &actorPtr->pos2D); + + } + + + // Camera setup + + // position of cam relative to actor + + posToActor.vx = actorPtr->pos->vx + camera.pos.vx; + + posToActor.vz = actorPtr->pos->vz + camera.pos.vz; + + posToActor.vy = actorPtr->pos->vy + camera.pos.vy; + + // Polygon drawing + + static long Flag; + + if ( (camMode == 2) && (camPtr->tim_data ) ) { + + //~ if (camPtr->tim_data){ + + drawBG(); + + // Loop on camAngles + + for ( int mesh = 0 ; mesh < camAngles[ curCamAngle ]->index; mesh ++ ) { + + transformMesh(camAngles[curCamAngle]->objects[mesh]); + + drawPoly(camAngles[curCamAngle]->objects[mesh], &Flag, atime); + + } + + // Get screen coordinates of actor + + //~ } + } + + else { + //~ long t = 0; + + // Draw current node's plane + + drawPoly( curNode->plane, &Flag, atime); + + // Draw surrounding planes + + for ( int sibling = 0; sibling < curNode->siblings->index; sibling++ ) { + + drawPoly( curNode->siblings->list[ sibling ]->plane, &Flag, atime); + + } + + // Draw adjacent planes's children + + for ( int sibling = 0; sibling < curNode->siblings->index; sibling++ ) { + + for ( int object = 0; object < curNode->siblings->list[ sibling ]->objects->index; object++ ) { + + long t = 0; + + transformMesh(curNode->siblings->list[ sibling ]->objects->list[ object ]); + + drawPoly( curNode->siblings->list[ sibling ]->objects->list[ object ], &Flag, atime); + + } + } + + // Draw current plane children + + for ( int object = 0; object < curNode->objects->index; object++ ) { + + transformMesh(curNode->objects->list[ object ]); + + drawPoly( curNode->objects->list[ object ], &Flag, atime); + + } + + // Draw rigidbodies + + for ( int object = 0; object < curNode->rigidbodies->index; object++ ) { + + transformMesh(curNode->rigidbodies->list[ object ]); + + drawPoly( curNode->rigidbodies->list[ object ], &Flag, atime); + + } + + } + + // Find and apply light rotation matrix + + RotMatrix(&lgtang, &rotlgt); + + MulMatrix0(&lgtmat, &rotlgt, &light); + + SetLightMatrix(&light); + + // Set camera + + applyCamera(&camera); + + // Add secondary OT to main OT + + AddPrims(otdisc[db], ot[db] + OTLEN - 1, ot[db]); + + //~ FntPrint("CurNode : %x\nIndex: %d", curNode, curNode->siblings->index); + + //~ FntPrint("Time : %d dt :%d\n", VSync(-1) / 60, dt); + //~ FntPrint("%d\n", curCamAngle ); + //~ FntPrint("Actor : %d %d\n", actorPtr->pos->vx, actorPtr->pos->vy); + + //~ FntPrint("%d %d\n", actorPtr->pos->vx, actorPtr->pos->vz); + //~ FntPrint("%d %d\n", actorPtr->pos2D.vx + CENTERX, actorPtr->pos2D.vy + CENTERY); + + //~ FntPrint(" %d %d %d\n", wp.vx, wp.vy, wp.vz); + + FntFlush(-1); + + display(); + + //~ frame = VSync(-1); + + } + return 0; +} + +void init() { + + ResetCallback(); + + // Reset the GPU before doing anything and the controller + + ResetGraph(0); + + PadInit(0); + + // Initialize and setup the GTE + + InitGeom(); + + SetGeomOffset( CENTERX, CENTERY ); // x, y offset + + SetGeomScreen( FOV ); // Distance between eye and screen - Camera FOV + + // Set the display and draw environments + + SetDefDispEnv(&disp[0], 0, 0 , SCREENXRES, SCREENYRES); + + SetDefDispEnv(&disp[1], 0, SCREENYRES, SCREENXRES, SCREENYRES); + + + SetDefDrawEnv(&draw[0], 0, SCREENYRES, SCREENXRES, SCREENYRES); + + SetDefDrawEnv(&draw[1], 0, 0, SCREENXRES, SCREENYRES); + + + // If PAL + + if ( VMODE ) { + + SetVideoMode(MODE_PAL); + + disp[0].screen.y += 8; + + disp[1].screen.y += 8; + } + + // Set Draw area color + + setRGB0(&draw[0], BGc.r, BGc.g, BGc.b); + + setRGB0(&draw[1], BGc.r, BGc.g, BGc.b); + + // Set Draw area clear flag + + draw[0].isbg = 1; + + draw[1].isbg = 1; + + // Set the disp and draw env + + PutDispEnv(&disp[db]); + + PutDrawEnv(&draw[db]); + + // Init font system + + FntLoad(FNT_POS_X, FNT_POS_Y); + + FntOpen(16, 90, 240, 180, 0, 512); + + // Lighting setup + + SetColorMatrix(&cmat); + + SetBackColor(BKc.vx,BKc.vy,BKc.vz); + + SetFarColor(BGc.r, BGc.g, BGc.b); + + SetFogNearFar(1200, 1600, SCREENXRES); + +}; + +void display(void){ + + //~ DrawSync(0); + + vs = VSync(2); // Using VSync 2 insures constant framerate. 0 makes the fr polycount dependant. + + ResetGraph(1); + + PutDispEnv(&disp[db]); + + PutDrawEnv(&draw[db]); + + SetDispMask(1); + + // Main OT + DrawOTag(otdisc[db] + OT2LEN - 1); + + db = !db; + + nextpri = primbuff[db]; + + +}; + +void LoadTexture(u_long * tim, TIM_IMAGE * tparam){ // This part is from Lameguy64's tutorial series : lameguy64.net/svn/pstutorials/chapter1/3-textures.html login/pw: annoyingmous + OpenTIM(tim); // Open the tim binary data, feed it the address of the data in memory + ReadTIM(tparam); // This read the header of the TIM data and sets the corresponding members of the TIM_IMAGE structure + + LoadImage(tparam->prect, tparam->paddr); // Transfer the data from memory to VRAM at position prect.x, prect.y + DrawSync(0); // Wait for the drawing to end + + if (tparam->mode & 0x8){ // check 4th bit // If 4th bit == 1, TIM has a CLUT + LoadImage(tparam->crect, tparam->caddr); // Load it to VRAM at position crect.x, crect.y + DrawSync(0); // Wait for drawing to end + } + +}; + +void transformMesh(MESH * mesh){ + + MATRIX mat; + + // Apply rotation matrix + + RotMatrix_gte(mesh->rot, &mat); + + // Apply translation matrix + + TransMatrix(&mat, mesh->pos); + + // Compose matrix with cam + + CompMatrix(&camera.mat, &mat, &mat); + + // Set default rotation and translation matrices + + SetRotMatrix(&mat); + + SetTransMatrix(&mat); + + //~ } +}; + +// Drawing + +void drawPoly(MESH * mesh, long * Flag, int atime){ + + long nclip, t = 0; + + // mesh is POLY_GT3 ( triangle ) + + if (mesh->index[t].code == 4) { + + POLY_GT3 * poly; + + // len member == # vertices, but here it's # of triangle... So, for each tri * 3 vertices ... + + for ( int i = 0; i < (mesh->tmesh->len * 3); i += 3 ) { + + // If mesh is not part of precalculated background, draw them, else, discard + + if ( !( *mesh->isBG ) || camMode != 2) { + + poly = (POLY_GT3 *)nextpri; + + // If Vertex Anim flag is set, use it + + if (*mesh->isAnim){ + + // If interpolation flag is set, use it + + if(mesh->anim->interpolate){ + + // Ping pong + + //~ //if (mesh->anim->cursor > 4096 || mesh->anim->cursor < 0){ + + //~ // mesh->anim->dir *= -1; + + //~ //} + + + // Fixed point math precision + + short precision = 12; + + // Find next keyframe + + if (mesh->anim->cursor > (1 << precision)) { + + // There are still keyframes to interpolate between + + if ( mesh->anim->lerpCursor < mesh->anim->nframes - 1 ) { + + mesh->anim->lerpCursor ++; + + mesh->anim->cursor = 0; + + } + + // We've reached last frame, go back to first frame + + if ( mesh->anim->lerpCursor == mesh->anim->nframes - 1 ) { + + mesh->anim->lerpCursor = 0; + + mesh->anim->cursor = 0; + + } + + } + + // Let's lerp between keyframes + + // TODO : Finish lerped animation implementation + + // Vertex 1 + + mesh->tmesh->v[ mesh->index[ t ].order.vx ].vx = lerpD( mesh->anim->data[mesh->anim->lerpCursor * mesh->anim->nvert + mesh->index[t].order.vx].vx << precision , mesh->anim->data[(mesh->anim->lerpCursor + 1) * mesh->anim->nvert + mesh->index[t].order.vx].vx << precision, mesh->anim->cursor << precision) >> precision; + + mesh->tmesh->v[ mesh->index[ t ].order.vx ].vz = lerpD( mesh->anim->data[mesh->anim->lerpCursor * mesh->anim->nvert + mesh->index[t].order.vx].vz << precision , mesh->anim->data[(mesh->anim->lerpCursor + 1) * mesh->anim->nvert + mesh->index[t].order.vx].vz << precision, mesh->anim->cursor << precision) >> precision; + + mesh->tmesh->v[ mesh->index[ t ].order.vx ].vy = lerpD( mesh->anim->data[mesh->anim->lerpCursor * mesh->anim->nvert + mesh->index[t].order.vx].vy << precision , mesh->anim->data[(mesh->anim->lerpCursor + 1) * mesh->anim->nvert + mesh->index[t].order.vx].vy << precision, mesh->anim->cursor << precision) >> precision; + + // Vertex 2 + + mesh->tmesh->v[ mesh->index[ t ].order.vz ].vx = lerpD( mesh->anim->data[mesh->anim->lerpCursor * mesh->anim->nvert + mesh->index[t].order.vz].vx << precision , mesh->anim->data[(mesh->anim->lerpCursor + 1) * mesh->anim->nvert + mesh->index[t].order.vz].vx << precision, mesh->anim->cursor << precision) >> precision; + + mesh->tmesh->v[ mesh->index[ t ].order.vz ].vz = lerpD( mesh->anim->data[mesh->anim->lerpCursor * mesh->anim->nvert + mesh->index[t].order.vz].vz << precision , mesh->anim->data[(mesh->anim->lerpCursor + 1) * mesh->anim->nvert + mesh->index[t].order.vz].vz << precision, mesh->anim->cursor << precision) >> precision; + + mesh->tmesh->v[ mesh->index[ t ].order.vz ].vy = lerpD( mesh->anim->data[mesh->anim->lerpCursor * mesh->anim->nvert + mesh->index[t].order.vz].vy << precision , mesh->anim->data[(mesh->anim->lerpCursor + 1) * mesh->anim->nvert + mesh->index[t].order.vz].vy << precision, mesh->anim->cursor << precision) >> precision; + + // Vertex 3 + + mesh->tmesh->v[ mesh->index[ t ].order.vy ].vx = lerpD( mesh->anim->data[mesh->anim->lerpCursor * mesh->anim->nvert + mesh->index[t].order.vy].vx << precision , mesh->anim->data[(mesh->anim->lerpCursor + 1) * mesh->anim->nvert + mesh->index[t].order.vy].vx << precision, mesh->anim->cursor << precision) >> precision; + + mesh->tmesh->v[ mesh->index[ t ].order.vy ].vz = lerpD( mesh->anim->data[mesh->anim->lerpCursor * mesh->anim->nvert + mesh->index[t].order.vy].vz << precision , mesh->anim->data[(mesh->anim->lerpCursor + 1) * mesh->anim->nvert + mesh->index[t].order.vy].vz << precision, mesh->anim->cursor << precision) >> precision; + + mesh->tmesh->v[ mesh->index[ t ].order.vy ].vy = lerpD( mesh->anim->data[mesh->anim->lerpCursor * mesh->anim->nvert + mesh->index[t].order.vy].vy << precision , mesh->anim->data[(mesh->anim->lerpCursor + 1) * mesh->anim->nvert + mesh->index[t].order.vy].vy << precision, mesh->anim->cursor << precision) >> precision; + + mesh->anim->cursor += 24 * mesh->anim->dir; + + // Coord transformation from world space to screen space + + nclip = RotAverageNclip3( + + &mesh->tmesh->v[ mesh->index[t].order.vx ], + + &mesh->tmesh->v[ mesh->index[t].order.vz ], + + &mesh->tmesh->v[ mesh->index[t].order.vy ], + + ( long* ) &poly->x0, ( long* ) &poly->x1, ( long* ) &poly->x2, + + mesh->p, + + mesh->OTz, + + Flag + ); + + } else { + + // No interpolation + + // Use the pre-calculated vertices coordinates from the animation data + + nclip = RotAverageNclip3( + + &mesh->anim->data[ atime % mesh->anim->nframes * mesh->anim->nvert + mesh->index[t].order.vx ], + + &mesh->anim->data[ atime % mesh->anim->nframes * mesh->anim->nvert + mesh->index[t].order.vz ], + + &mesh->anim->data[ atime % mesh->anim->nframes * mesh->anim->nvert + mesh->index[t].order.vy ], + + ( long* ) &poly->x0, ( long* ) &poly->x1, ( long* ) &poly->x2, + + mesh->p, + + mesh->OTz, + + Flag + ); + } + + } else { + + // No animation + + // Use model's regular vertex coordinates + + nclip = RotAverageNclip3( + + &mesh->tmesh->v[ mesh->index[t].order.vx ], + + &mesh->tmesh->v[ mesh->index[t].order.vz ], + + &mesh->tmesh->v[ mesh->index[t].order.vy ], + + ( long * ) &poly->x0, ( long * ) &poly->x1, ( long * ) &poly->x2, + + mesh->p, + + mesh->OTz, + + Flag + ); + + } + + // Do not draw invisible meshes + + if ( nclip > 0 && *mesh->OTz > 0 && (*mesh->p < 4096) ) { + + + SetPolyGT3( poly ); + + // If isPrism flag is set, use it + + // FIXME : Doesn't work in 8bpp/4bpp + + if ( *mesh->isPrism ) { + + // Transparency effect : + + // Use current DRAWENV clip as TPAGE instead of regular textures + + ( (POLY_GT3 *) poly )->tpage = getTPage( mesh->tim->mode&0x3, 0, + + draw[db].clip.x, + + draw[db].clip.y + ); + + // Use projected coordinates (results from RotAverage...) as UV coords and clamp them to 0-255,0-224 + + setUV3(poly, (poly->x0 < 0? 0 : poly->x0 > 255? 255 : poly->x0), + + (poly->y0 < 0? 0 : poly->y0 > 224? 224 : poly->y0), + + (poly->x1 < 0? 0 : poly->x1 > 255? 255 : poly->x1), + + (poly->y1 < 0? 0 : poly->y1 > 224? 224 : poly->y1), + + (poly->x2 < 0? 0 : poly->x2 > 255? 255 : poly->x2), + + (poly->y2 < 0? 0 : poly->y2 > 224? 224 : poly->y2) + + ); + + + } else { + + // No transparency effect + + // Use regular TPAGE + + ( (POLY_GT3 *) poly )->tpage = getTPage(mesh->tim->mode&0x3, 0, + + mesh->tim->prect->x, + + mesh->tim->prect->y + ); + + setUV3(poly, mesh->tmesh->u[i].vx , mesh->tmesh->u[i].vy + mesh->tim->prect->y, + + mesh->tmesh->u[i+2].vx, mesh->tmesh->u[i+2].vy + mesh->tim->prect->y, + + mesh->tmesh->u[i+1].vx, mesh->tmesh->u[i+1].vy + mesh->tim->prect->y); + } + + // CLUT setup + // If tim mode == 0 | 1 (4bits/8bits image), set CLUT coordinates + + if ( (mesh->tim->mode & 0x3 ) < 2){ + + setClut(poly, + + mesh->tim->crect->x, + + mesh->tim->crect->y); + } + + if (*mesh->isSprite){ + + SetShadeTex( poly, 1 ); + + } + // Defaults depth color to neutral grey + + CVECTOR outCol = { 128,128,128,0 }; + + CVECTOR outCol1 = { 128,128,128,0 }; + + CVECTOR outCol2 = { 128,128,128,0 }; + + NormalColorDpq(&mesh->tmesh->n[ mesh->index[t].order.vx ], &mesh->tmesh->c[ mesh->index[t].order.vx ], *mesh->p, &outCol); + + NormalColorDpq(&mesh->tmesh->n[ mesh->index[t].order.vz ], &mesh->tmesh->c[ mesh->index[t].order.vz ], *mesh->p, &outCol1); + + NormalColorDpq(&mesh->tmesh->n[ mesh->index[t].order.vy ], &mesh->tmesh->c[ mesh->index[t].order.vy ], *mesh->p, &outCol2); + + // If transparent effect is in use, inhibate shadows + + if (*mesh->isPrism){ + + // Use un-interpolated (i.e: no light, no fog) colors + + setRGB0(poly, mesh->tmesh->c[i].r, mesh->tmesh->c[i].g, mesh->tmesh->c[i].b); + + setRGB1(poly, mesh->tmesh->c[i+1].r, mesh->tmesh->c[i+1].g, mesh->tmesh->c[i+1].b); + + setRGB2(poly, mesh->tmesh->c[i+2].r, mesh->tmesh->c[i+2].g, mesh->tmesh->c[i+2].b); + + } else { + + setRGB0(poly, outCol.r, outCol.g , outCol.b); + + setRGB1(poly, outCol1.r, outCol1.g, outCol1.b); + + setRGB2(poly, outCol2.r, outCol2.g, outCol2.b); + } + + if ( (*mesh->OTz > 0) && (*mesh->OTz < OTLEN) && (*mesh->p < 4096) ) { + + AddPrim(&ot[db][*mesh->OTz-2], poly); + } + + //~ mesh->pos2D.vx = *(&poly->x0); + //~ mesh->pos2D.vy = *(&poly->x0 + 1); + // mesh->pos2D.vy = poly->x0; + // FntPrint("%d %d\n", *(&poly->x0), *(&poly->x0 + 1)); + + nextpri += sizeof(POLY_GT3); + } + + t+=1; + + } + } + + } + + // If mesh is quad + + if (mesh->index[t].code == 8) { + + POLY_GT4 * poly4; + + for (int i = 0; i < (mesh->tmesh->len * 4); i += 4) { + + // if mesh is not part of BG, draw them, else, discard + + if ( !(*mesh->isBG) || camMode != 2 ) { + + poly4 = (POLY_GT4 *)nextpri; + + // Vertex Anim + + if (*mesh->isAnim){ + + // with interpolation + + if ( mesh->anim->interpolate ){ + + // ping pong + //~ if (mesh->anim->cursor > 4096 || mesh->anim->cursor < 0){ + //~ mesh->anim->dir *= -1; + //~ } + + short precision = 12; + + if ( mesh->anim->cursor > 1<anim->lerpCursor < mesh->anim->nframes - 1 ) { + + mesh->anim->lerpCursor ++; + + mesh->anim->cursor = 0; + + } + + if ( mesh->anim->lerpCursor == mesh->anim->nframes - 1 ) { + + mesh->anim->lerpCursor = 0; + + mesh->anim->cursor = 0; + } + } + + // Vertex 1 + + mesh->tmesh->v[ mesh->index[ t ].order.vx ].vx = lerpD( mesh->anim->data[ mesh->anim->lerpCursor * mesh->anim->nvert + mesh->index[ t ].order.vx ].vx << 12 , mesh->anim->data[ (mesh->anim->lerpCursor + 1) * mesh->anim->nvert + mesh->index[ t ].order.vx ].vx << 12, mesh->anim->cursor << 12) >> 12; + + mesh->tmesh->v[ mesh->index[ t ].order.vx ].vz = lerpD( mesh->anim->data[ mesh->anim->lerpCursor * mesh->anim->nvert + mesh->index[ t ].order.vx ].vz << 12 , mesh->anim->data[ (mesh->anim->lerpCursor + 1) * mesh->anim->nvert + mesh->index[ t ].order.vx ].vz << 12, mesh->anim->cursor << 12) >> 12; + + mesh->tmesh->v[ mesh->index[ t ].order.vx ].vy = lerpD( mesh->anim->data[ mesh->anim->lerpCursor * mesh->anim->nvert + mesh->index[ t ].order.vx ].vy << 12 , mesh->anim->data[ (mesh->anim->lerpCursor + 1) * mesh->anim->nvert + mesh->index[ t ].order.vx ].vy << 12, mesh->anim->cursor << 12) >> 12; + + // Vertex 2 + + mesh->tmesh->v[ mesh->index[ t ].order.vz ].vx = lerpD( mesh->anim->data[ mesh->anim->lerpCursor * mesh->anim->nvert + mesh->index[ t ].order.vz ].vx << 12 , mesh->anim->data[ (mesh->anim->lerpCursor + 1) * mesh->anim->nvert + mesh->index[ t ].order.vz ].vx << 12, mesh->anim->cursor << 12) >> 12; + + mesh->tmesh->v[ mesh->index[ t ].order.vz ].vz = lerpD( mesh->anim->data[ mesh->anim->lerpCursor * mesh->anim->nvert + mesh->index[ t ].order.vz ].vz << 12 , mesh->anim->data[ (mesh->anim->lerpCursor + 1) * mesh->anim->nvert + mesh->index[ t ].order.vz ].vz << 12, mesh->anim->cursor << 12) >> 12; + + mesh->tmesh->v[ mesh->index[ t ].order.vz ].vy = lerpD( mesh->anim->data[ mesh->anim->lerpCursor * mesh->anim->nvert + mesh->index[ t ].order.vz ].vy << 12 , mesh->anim->data[ (mesh->anim->lerpCursor + 1) * mesh->anim->nvert + mesh->index[ t ].order.vz ].vy << 12, mesh->anim->cursor << 12) >> 12; + + // Vertex 3 + + mesh->tmesh->v[ mesh->index[ t ].order.vy ].vx = lerpD( mesh->anim->data[ mesh->anim->lerpCursor * mesh->anim->nvert + mesh->index[ t ].order.vy ].vx << 12 , mesh->anim->data[ (mesh->anim->lerpCursor + 1) * mesh->anim->nvert + mesh->index[ t ].order.vy ].vx << 12, mesh->anim->cursor << 12) >> 12; + + mesh->tmesh->v[ mesh->index[ t ].order.vy ].vz = lerpD( mesh->anim->data[ mesh->anim->lerpCursor * mesh->anim->nvert + mesh->index[ t ].order.vy ].vz << 12 , mesh->anim->data[ (mesh->anim->lerpCursor + 1) * mesh->anim->nvert + mesh->index[ t ].order.vy ].vz << 12, mesh->anim->cursor << 12) >> 12; + + mesh->tmesh->v[ mesh->index[ t ].order.vy ].vy = lerpD( mesh->anim->data[ mesh->anim->lerpCursor * mesh->anim->nvert + mesh->index[ t ].order.vy ].vy << 12 , mesh->anim->data[ (mesh->anim->lerpCursor + 1) * mesh->anim->nvert + mesh->index[ t ].order.vy ].vy << 12, mesh->anim->cursor << 12) >> 12; + + // Vertex 4 + + mesh->tmesh->v[ mesh->index[ t ].order.pad ].vx = lerpD( mesh->anim->data[ mesh->anim->lerpCursor * mesh->anim->nvert + mesh->index[ t ].order.pad ].vx << 12 , mesh->anim->data[ (mesh->anim->lerpCursor + 1) * mesh->anim->nvert + mesh->index[ t ].order.pad ].vx << 12, mesh->anim->cursor << 12) >> 12; + + mesh->tmesh->v[ mesh->index[ t ].order.pad ].vz = lerpD( mesh->anim->data[ mesh->anim->lerpCursor * mesh->anim->nvert + mesh->index[ t ].order.pad ].vz << 12 , mesh->anim->data[ (mesh->anim->lerpCursor + 1) * mesh->anim->nvert + mesh->index[ t ].order.pad ].vz << 12, mesh->anim->cursor << 12) >> 12; + + mesh->tmesh->v[ mesh->index[ t ].order.pad ].vy = lerpD( mesh->anim->data[ mesh->anim->lerpCursor * mesh->anim->nvert + mesh->index[ t ].order.pad ].vy << 12 , mesh->anim->data[ (mesh->anim->lerpCursor + 1) * mesh->anim->nvert + mesh->index[ t ].order.pad ].vy << 12, mesh->anim->cursor << 12) >> 12; + + mesh->anim->cursor += 2 * mesh->anim->dir; + + // Coord transformations + nclip = RotAverageNclip4( + + &mesh->tmesh->v[ mesh->index[t].order.pad ], + + &mesh->tmesh->v[ mesh->index[t].order.vz], + + &mesh->tmesh->v[ mesh->index[t].order.vx ], + + &mesh->tmesh->v[ mesh->index[t].order.vy ], + + ( long* )&poly4->x0, ( long* )&poly4->x1, ( long* )&poly4->x2, ( long* )&poly4->x3, + + mesh->p, + + mesh->OTz, + + Flag + + ); + + } else { + + // No interpolation, use all vertices coordinates in anim data + + nclip = RotAverageNclip4( + + &mesh->anim->data[ atime % mesh->anim->nframes * mesh->anim->nvert + mesh->index[t].order.pad ], + + &mesh->anim->data[ atime % mesh->anim->nframes * mesh->anim->nvert + mesh->index[t].order.vz ], + + &mesh->anim->data[ atime % mesh->anim->nframes * mesh->anim->nvert + mesh->index[t].order.vx ], + + &mesh->anim->data[ atime % mesh->anim->nframes * mesh->anim->nvert + mesh->index[t].order.vy ], + + ( long* )&poly4->x0, ( long* )&poly4->x1, ( long* )&poly4->x2, ( long* )&poly4->x3, + + mesh->p, + + mesh->OTz, + + Flag + ); + } + + } else { + + // No animation + // Use regulare vertex coords + + nclip = RotAverageNclip4( + + &mesh->tmesh->v[ mesh->index[t].order.pad ], + + &mesh->tmesh->v[ mesh->index[t].order.vz], + + &mesh->tmesh->v[ mesh->index[t].order.vx ], + + &mesh->tmesh->v[ mesh->index[t].order.vy ], + + (long*)&poly4->x0, (long*)&poly4->x1, (long*)&poly4->x2, (long*)&poly4->x3, + + mesh->p, + + mesh->OTz, + + Flag + ); + } + + if (nclip > 0 && *mesh->OTz > 0 && (*mesh->p < 4096)) { + + SetPolyGT4(poly4); + + // FIXME : Polygon subdiv - is it working ? + + //~ OTc = *mesh->OTz >> 4; + //~ FntPrint("OTC:%d", OTc); + + //~ if (OTc < 4) { + + //~ if (OTc > 1) div4.ndiv = 1; else div4.ndiv = 2; + + //~ DivideGT4( + //~ // Vertex coord + //~ &mesh->tmesh->v[ mesh->index[t].order.pad ], + //~ &mesh->tmesh->v[ mesh->index[t].order.vz ], + //~ &mesh->tmesh->v[ mesh->index[t].order.vx ], + //~ &mesh->tmesh->v[ mesh->index[t].order.vy ], + //~ // UV coord + //~ mesh->tmesh->u[i+3], + //~ mesh->tmesh->u[i+2], + //~ mesh->tmesh->u[i+0], + //~ mesh->tmesh->u[i+1], + + //~ // Color + //~ mesh->tmesh->c[i], + //~ mesh->tmesh->c[i+1], + //~ mesh->tmesh->c[i+2], + //~ mesh->tmesh->c[i+3], + + //~ // Gpu packet + //~ poly4, + //~ &ot[db][*mesh->OTz], + //~ &div4); + + //~ // Increment primitive list pointer + //~ nextpri += ( (sizeof(POLY_GT4) + 3) / 4 ) * (( 1 << ( div4.ndiv )) << ( div4.ndiv )); + //~ triCount = ((1<<(div4.ndiv))<<(div4.ndiv)); + + //~ } else if (OTc < 48) { + + // Transparency effect + + if (*mesh->isPrism){ + + // Use current DRAWENV clip as TPAGE + + ( (POLY_GT4 *) poly4)->tpage = getTPage(mesh->tim->mode&0x3, 0, + draw[db].clip.x, + draw[db].clip.y + ); + + // Use projected coordinates + + setUV4( poly4, + + (poly4->x0 < 0? 0 : poly4->x0 > 255? 255 : poly4->x0), + + (poly4->y0 < 0? 0 : poly4->y0 > 224? 224 : poly4->y0), + + (poly4->x1 < 0? 0 : poly4->x1 > 255? 255 : poly4->x1), + + (poly4->y1 < 0? 0 : poly4->y1 > 224? 224 : poly4->y1), + + (poly4->x2 < 0? 0 : poly4->x2 > 255? 255 : poly4->x2), + + (poly4->y2 < 0? 0 : poly4->y2 > 224? 224 : poly4->y2), + + (poly4->x3 < 0? 0 : poly4->x3 > 255? 255 : poly4->x3), + + (poly4->y3 < 0? 0 : poly4->y3 > 224? 224 : poly4->y3) + ); + + + } else { + + // Use regular TPAGE + ( (POLY_GT4 *) poly4)->tpage = getTPage( + + mesh->tim->mode&0x3, 0, + + mesh->tim->prect->x, + + mesh->tim->prect->y + ); + + // Use model UV coordinates + + setUV4( poly4, + mesh->tmesh->u[i+3].vx, mesh->tmesh->u[i+3].vy + mesh->tim->prect->y, + + mesh->tmesh->u[i+2].vx, mesh->tmesh->u[i+2].vy + mesh->tim->prect->y, + + mesh->tmesh->u[i+0].vx, mesh->tmesh->u[i+0].vy + mesh->tim->prect->y, + + mesh->tmesh->u[i+1].vx, mesh->tmesh->u[i+1].vy + mesh->tim->prect->y + ); + + } + + if (*mesh->isSprite){ + + SetShadeTex( poly4, 1 ); + + } + + // If tim mode == 0 | 1, set CLUT coordinates + if ( (mesh->tim->mode & 0x3) < 2 ) { + + setClut(poly4, + + mesh->tim->crect->x, + + mesh->tim->crect->y + ); + + } + + CVECTOR outCol = {128,128,128,0}; + + CVECTOR outCol1 = {128,128,128,0}; + + CVECTOR outCol2 = {128,128,128,0}; + + CVECTOR outCol3 = {128,128,128,0}; + + NormalColorDpq(&mesh->tmesh->n[ mesh->index[t].order.pad ] , &mesh->tmesh->c[ mesh->index[t].order.pad ], *mesh->p, &outCol); + + NormalColorDpq(&mesh->tmesh->n[ mesh->index[t].order.vz ], &mesh->tmesh->c[ mesh->index[t].order.vz ], *mesh->p, &outCol1); + + NormalColorDpq(&mesh->tmesh->n[ mesh->index[t].order.vx ], &mesh->tmesh->c[ mesh->index[t].order.vx ], *mesh->p, &outCol2); + + NormalColorDpq(&mesh->tmesh->n[ mesh->index[t].order.vy ], &mesh->tmesh->c[ mesh->index[t].order.vy ], *mesh->p, &outCol3); + + if (*mesh->isPrism){ + + setRGB0(poly4, mesh->tmesh->c[i].r, mesh->tmesh->c[i].g, mesh->tmesh->c[i].b); + + setRGB1(poly4, mesh->tmesh->c[i+1].r, mesh->tmesh->c[i+1].g, mesh->tmesh->c[i+1].b); + + setRGB2(poly4, mesh->tmesh->c[i+2].r, mesh->tmesh->c[i+2].g, mesh->tmesh->c[i+2].b); + + setRGB3(poly4, mesh->tmesh->c[i+3].r, mesh->tmesh->c[i+3].g, mesh->tmesh->c[i+3].b); + + } else { + + setRGB0(poly4, outCol.r, outCol.g , outCol.b); + + setRGB1(poly4, outCol1.r, outCol1.g, outCol1.b); + + setRGB2(poly4, outCol2.r, outCol2.g, outCol2.b); + + setRGB3(poly4, outCol3.r, outCol3.g, outCol3.b); + } + + if ( (*mesh->OTz > 0) && (*mesh->OTz < OTLEN) && (*mesh->p < 4096) ) { + + AddPrim( &ot[ db ][ *mesh->OTz-3 ], poly4 ); + } + + nextpri += sizeof( POLY_GT4 ); + + } + + t += 1; + + } + } + } + +}; + +void drawBG(void){ + + // Draw BG image in two SPRT since max width == 256 px + + SPRT * sprt; + + DR_TPAGE * tpage; + + // Left part + + sprt = ( SPRT * ) nextpri; + + setSprt( sprt ); + + setRGB0( sprt, 128, 128, 128 ); + + setXY0( sprt, 0, 0 ); + + setWH( sprt, 256, SCREENYRES ); + + setUV0( sprt, 0, 0 ); + + setClut( sprt, + + camPtr->BGtim->crect->x, + + camPtr->BGtim->crect->y + + ); + + addPrim( &otdisc[ db ][ OT2LEN-1 ], sprt ); + + nextpri += sizeof( SPRT ); + + + // Change TPAGE + + tpage = (DR_TPAGE *) nextpri; + + setDrawTPage( + + tpage, 0, 1, + + getTPage( + + camPtr->BGtim->mode & 0x3, 0, + + camPtr->BGtim->prect->x, + + camPtr->BGtim->prect->y + + ) + + ); + + addPrim(&otdisc[db][OT2LEN-1], tpage); + + nextpri += sizeof(DR_TPAGE); + + + // Right part + + sprt = ( SPRT * ) nextpri; + + setSprt( sprt ); + + setRGB0( sprt, 128, 128, 128 ); + + setXY0( sprt, SCREENXRES - ( SCREENXRES - 256 ), 0 ); + + setWH( sprt, SCREENXRES - 256, SCREENYRES ); + + setUV0( sprt, 0, 0 ); + + setClut( sprt, + + camPtr->BGtim->crect->x, + + camPtr->BGtim->crect->y + ); + + addPrim( &otdisc[ db ][ OT2LEN-1 ], sprt ); + + nextpri += sizeof( SPRT ); + + tpage = ( DR_TPAGE * ) nextpri; + + // Change TPAGE + + setDrawTPage( + + tpage, 0, 1, + + getTPage( + + camPtr->BGtim->mode & 0x3, 0, + + // X offset width depends on TIM's mode + + camPtr->BGtim->prect->x + ( 64 << ( camPtr->BGtim->mode & 0x3 ) ), + + camPtr->BGtim->prect->y + + ) + + ); + + addPrim( &otdisc[ db ][ OT2LEN-1 ], tpage ); + + nextpri += sizeof( DR_TPAGE ); + +}; + +// Maths + +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 + // https://godbolt.org/z/q6cMcj + + *x = (actorX << 12) + (distance * nsin(angle)); + + *z = (actorZ << 12) - (distance * ncos(angle)); + +}; + +// @Will : you might want to use sin/cos to move the camera in a circle but you could do that by moving it along it’s tangent and then clamping the distance + +void applyCamera( CAMERA * cam ) { + + VECTOR vec; // Vector that holds the output values of the following instructions + + RotMatrix_gte(&cam->rot, &cam->mat); // Convert rotation angle in psx units (360° == 4096) to rotation matrix) + + ApplyMatrixLV(&cam->mat, &cam->pos, &vec); // Multiply matrix by vector pos and output to vec + + TransMatrix(&cam->mat, &vec); // Apply transform vector + + SetRotMatrix(&cam->mat); // Set Rotation matrix + + SetTransMatrix(&cam->mat); // Set Transform matrix + + +}; + +void setCameraPos( VECTOR pos, SVECTOR rot ) { + + camera.pos = pos; + + camera.rot = rot; + +}; + +VECTOR getVectorTo( VECTOR actor, VECTOR target ) { + + VECTOR direction = { subVector(target, actor) }; + + VECTOR Ndirection = {0,0,0,0}; + + u_int distSq = (direction.vx * direction.vx) + (direction.vz * direction.vz); + + direction.pad = psqrt(distSq); + + VectorNormal(&direction, &Ndirection); + + return Ndirection ; + +}; + +// From 'psyq/addons/graphics/ZIMEN/CLIP.C' + +void worldToScreen( VECTOR * worldPos, VECTOR * screenPos ) { + + int distToScreen; // corresponds to FOV + + MATRIX curRot; // current rotation matrix + + // Get current matrix and projection */ + + distToScreen = ReadGeomScreen(); + + ReadRotMatrix(&curRot); + + // Get Rotation, Translation coordinates, apply perspective correction + + // Muliply world coordinates vector by current rotation matrix, store in screenPos + + ApplyMatrixLV(&curRot, worldPos, screenPos); + + // Get world translation vectors from rot and add to screenPos vx, vy, vz + + applyVector(screenPos, curRot.t[0], curRot.t[1], curRot.t[2], +=); + + // Correct perspective + + screenPos -> vx = screenPos -> vx * distToScreen / ( screenPos -> vz + 1 ) ; // Add 1 to avoid division by 0 + + screenPos -> vy = screenPos -> vy * distToScreen / ( screenPos -> vz + 1 ) ; + + screenPos -> vz = distToScreen ; + +}; + +void screenToWorld( VECTOR * screenPos, VECTOR * worldPos ) { + + int distToScreen; // corresponds to FOV + + MATRIX curRot, invRot; // current rotation matrix, transpose matrix + + VECTOR Trans; // working translation vector + + // Get current matrix and projection + + distToScreen = ReadGeomScreen(); + + ReadRotMatrix( &curRot ); + + PushMatrix(); // Store matrix on the stack (slow!) + + //// worldTrans = invRot * (screenPos - Rot.t) + + // Get world translation + + Trans.vx = screenPos->vx - curRot.t[0]; // Substract world translation from screenpos + + Trans.vy = screenPos->vy - curRot.t[1]; + + Trans.vz = screenPos->vz - curRot.t[2]; + + + // We want the inverse of the current rotation matrix. + // + // Inverse matrix : M^-1 = 1 / detM * T(M) + // We know that the determinant of a rotation matrix is 1, thus: + // M^-1 = T(M) + // + // Get transpose of current rotation matrix + // > The transpose of a matrix is a new matrix whose rows are the columns of the original. + // https://www.quora.com/What-is-the-geometric-interpretation-of-the-transpose-of-a-matrix + + TransposeMatrix( &curRot, &invRot ); + + // Multiply the transpose of current rotation matrix by the current translation vector + + ApplyMatrixLV( &invRot, &Trans, worldPos ); + + // Get original rotation matrix back + + PopMatrix(); + +}; + +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 ) ; + + long val2 = ( ( mesh->body->position.vx + mesh->body->max.vx ) - pointA->vx ) * ( pointB->vy - pointA->vy ) - ( ( mesh->body->position.vz + mesh->body->max.vy ) - pointA->vy ) * ( pointB->vx - pointA->vx ) ; + + if ( val1 > 0 && val2 > 0 ) { + + // right + return 1; + } + + else if ( val1 < 0 && val2 < 0 ) { + + // left + return -1; + } + + else if ( val1 == 0 && val2 == 0 ) { + + // identical + return 0; + } + + else if ( + + ( val1 > 0 && val2 == 0 ) || + + ( val1 == 0 && val2 > 0 ) + + ) { + + // right + return 1; + } + + else if ( + + ( val1 < 0 && val2 == 0 ) || + + ( val1 == 0 && val2 < 0 ) + + ) { + + // left + return -1; + } + + else if ( + + ( val1 < 0 && val2 > 0 ) || + + ( val1 > 0 && val2 < 0 ) + + ) { + + // intersect + return 3; + } + +}; + +// Screen space variant +short checkLineS( VECTOR * pointA, VECTOR * pointB, MESH * mesh ) { + + // FIXME : mesh->body->min.vx is not in screen space + + int val1 = ( ( mesh->pos2D.vx + mesh->body->min.vx ) - pointA->vx ) * ( pointB->vy - pointA->vy ) - ( ( mesh->pos2D.vy + mesh->body->min.vy ) - pointA->vy ) * ( pointB->vx - pointA->vx ) ; + + int val2 = ( ( mesh->pos2D.vx + mesh->body->max.vx ) - pointA->vx ) * ( pointB->vy - pointA->vy ) - ( ( mesh->pos2D.vy + mesh->body->max.vy ) - pointA->vy ) * ( pointB->vx - pointA->vx ) ; + + if ( val1 > 0 && val2 > 0 ) { + + // right + return 1; + } + + else if ( val1 < 0 && val2 < 0 ) { + + // left + return -1; + } + + else if ( val1 == 0 && val2 == 0 ) { + + // identical + return 2; + } + + else if ( + + ( val1 > 0 && val2 == 0 ) || + + ( val1 == 0 && val2 > 0 ) + + ) { + + // right + return 1; + } + + else if ( + + ( val1 < 0 && val2 == 0 ) || + + ( val1 == 0 && val2 < 0 ) + + ) { + + // left + return -1; + } + + else if ( + + ( val1 < 0 && val2 > 0 ) || + + ( val1 > 0 && val2 < 0 ) + + ) { + + // intersect + return 3; + } + +}; + + +//~ int alignAxisToVect(VECTOR target, short axis, int factor){ + //~ } + +// Lerp + +int lerp(int start, int end, int factor){ + + // lerp interpolated cam movement + // InBetween = Value 1 + ( ( Value2 - Value1 ) * lerpValue ) ; + // lerpValue should be a float between 0 and 1. + + + return ( start ) + (( end - start ) * factor ) >> 12; + +}; + +long long easeIn(long long i, int div){ + + return ((i << 7) * (i << 7) * (i << 7) / div ) >> 19; + +}; + +int easeOut(int i){ + + return (4096 >> 7) - ((4096 - (i << 7)) * (4096 - (i << 7))) >> 12; + +}; + +int easeInOut(int i, int div){ + + return lerp(easeIn(i, div), easeOut(i) , i); + +}; + +SVECTOR SVlerp(SVECTOR start, SVECTOR end, int factor){ + + SVECTOR output = {0,0,0,0}; + + output.vx = lerp(start.vx, end.vx, factor); + + output.vy = lerp(start.vy, end.vy, factor); + + output.vz = lerp(start.vz, end.vz, factor); + + return output; + +}; + + +// Physics + +VECTOR getIntCollision(BODY one, BODY two){ + + VECTOR d1, d2, col; + + short correction = 50; + + d1.vx = (one.position.vx + one.max.vx) - (two.position.vx + two.min.vx); + + d1.vy = (one.position.vy + one.max.vy) - (two.position.vy + two.min.vy); + + d1.vz = (one.position.vz + one.max.vz) - (two.position.vz + two.min.vz); + + + d2.vx = (two.position.vx + two.max.vx) - (one.position.vx - one.max.vx); + + 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.vz = !(d1.vz > 0 && d2.vz > 0); + + return col; + +}; + +VECTOR getExtCollision(BODY one, BODY two){ + + VECTOR d1, d2, col; + + d1.vx = (one.position.vx + one.max.vx) - (two.position.vx + two.min.vx); + + d1.vy = (one.position.vy + one.max.vy) - (two.position.vy + two.min.vy); + + d1.vz = (one.position.vz + one.max.vz) - (two.position.vz + two.min.vz); + + + d2.vx = (two.position.vx + two.max.vx) - (one.position.vx + one.min.vx); + + 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.min.vz); + + + col.vx = d1.vx > 0 && d2.vx > 0; + + col.vy = d1.vy > 0 && d2.vy > 0; + + col.vz = d1.vz > 0 && d2.vz > 0; + + + return col; + +}; + +void applyAcceleration(BODY * actor){ + + short dt = 1; + + VECTOR acceleration = {actor->invMass * actor->gForce.vx , (actor->invMass * actor->gForce.vy) + (gravity * ONE), actor->invMass * actor->gForce.vz}; + + //~ FntPrint("acc: %d %d %d\n", acceleration.vx, acceleration.vy, acceleration.vz ); + + actor->velocity.vx += (acceleration.vx * dt) >> 12; + + actor->velocity.vy += (acceleration.vy * dt) >> 12; + + actor->velocity.vz += (acceleration.vz * dt) >> 12; + + //~ FntPrint("acc: %d %d %d\n", acceleration.vx / ONE, acceleration.vy / ONE, acceleration.vz / ONE ); + + actor->position.vx += (actor->velocity.vx * dt); + + actor->position.vy += (actor->velocity.vy * dt); + + actor->position.vz += (actor->velocity.vz * dt); + + //~ FntPrint("vel: %d %d %d\n", actor->velocity.vx, actor->velocity.vy, actor->velocity.vz ); + +}; + +//~ // https://gamedevelopment.tutsplus.com/tutorials/how-to-create-a-custom-2d-physics-engine-the-basics-and-impulse-resolution--gamedev-6331 + +void ResolveCollision( BODY * one, BODY * two ){ + + //~ FntPrint("rv: %d, %d, %d\n", one->velocity.vx, one->velocity.vy, one->velocity.vz); + + // Calculate relative velocity + + VECTOR rv = { subVector( one->velocity, two->velocity) }; + + //~ FntPrint("rv: %d, %d, %d\n", rv.vx,rv.vy,rv.vz); + + // Collision normal + + VECTOR normal = { subVector( two->position, one->position ) }; + + // Normalize collision normal + + normal.vx = normal.vx > 0 ? 1 : normal.vx < 0 ? -1 : 0 ; + + normal.vy = normal.vy > 256 ? 1 : normal.vy < -256 ? -1 : 0 ; + + normal.vz = normal.vz > 0 ? 1 : normal.vz < 0 ? -1 : 0 ; + + //~ FntPrint("norm: %d, %d, %d\n", normal.vx,normal.vy,normal.vz); + + // Calculate relative velocity in terms of the normal direction + + long velAlongNormal = dotProduct( rv, normal ); + + //~ FntPrint("velN: %d\n", velAlongNormal); + + // Do not resolve if velocities are separating + + if(velAlongNormal > 0) + + return; + + // Calculate restitution + long e = min( one->restitution, two->restitution ); + + //~ FntPrint("e: %d\n", e); + + //~ // Calculate impulse scalar + long j = -(1 + e) * velAlongNormal * ONE; + + j /= one->invMass + two->invMass; + //~ j /= ONE; + + //~ FntPrint("j: %d\n", j); + + // Apply impulse + applyVector(&normal, j, j, j, *=); + + //~ FntPrint("Cnormal %d %d %d\n",normal.vx,normal.vy,normal.vz); + + VECTOR velOne = normal; + + VECTOR velTwo = normal; + + applyVector(&velOne,one->invMass,one->invMass,one->invMass, *=); + + applyVector(&velTwo,two->invMass,two->invMass,two->invMass, *=); + + //~ FntPrint("V1 %d %d %d\n", velOne.vx/4096,velOne.vy/4096,velOne.vz/4096); + //~ FntPrint("V2 %d %d %d\n", velTwo.vx/4096,velTwo.vy/4096,velTwo.vz/4096); + + applyVector(&one->velocity, velOne.vx/4096/4096, velOne.vy/4096/4096, velOne.vz/4096/4096, +=); + + applyVector(&two->velocity, velTwo.vx/4096/4096, velTwo.vy/4096/4096, velTwo.vz/4096/4096, -=); + + //~ FntPrint("V1 %d %d %d\n", velOne.vx/4096/4096,velOne.vy/4096/4096,velOne.vz/4096/4096); + //~ FntPrint("V2 %d %d %d\n", velTwo.vx/4096/4096,velTwo.vy/4096/4096,velTwo.vz/4096/4096); + +}; + +VECTOR angularMom(BODY body){ + + // L = r * p + + // p = m * v + + VECTOR w = {0,0,0,0}; + + int r = (body.max.vx - body.min.vx) >> 1; + + w.vx = (r * body.mass * body.velocity.vx) >> 2; + + w.vy = (r * body.mass * body.velocity.vy) >> 2; + + w.vz = (r * body.mass * body.velocity.vz) >> 2; + + //~ FntPrint("v: %d, r:%d, w:%d\n", body.velocity.vz * r, r * r, w.vz); + + return w; + +}; + +// From : https://github.com/grumpycoders/pcsx-redux/blob/7438e9995833db5bc1e14da735bbf9dc78300f0b/src/mips/shell/math.h +static inline int32_t dMul(int32_t a, int32_t b) { + + long long r = a; + + r *= b; + + return r >> 24; + +}; + + +// standard lerp function +// s = source, an arbitrary number up to 2^24 +// d = destination, an arbitrary number up to 2^24 +// p = position, a number between 0 and 256, inclusive +// p = 0 means output = s +// p = 256 means output = d +static inline uint32_t lerpU(uint32_t start, uint32_t dest, unsigned pos) { return (start * (256 - pos) + dest * pos) >> 8; }; + +static inline int32_t lerpS(int32_t start, int32_t dest, unsigned pos) { return (start * (256 - pos) + dest * pos) >> 8; }; + +// start, dest and pos have to be << x, then the result has to be >> x where x defines precision: +// precision = 2^24 - 2^x +// << x : 0 < pos < precision +// https://discord.com/channels/642647820683444236/646765703143227394/811318550978494505 +// my angles are between 0 and 2048 (full circle), so 2^11 for the range of angles; with numbers on a 8.24 representation, a 1.0 angle (or 2pi) means it's 2^24, so to "convert" my angles from 8.24 to my internal discrete cos, I only have to shift by 13 + +static inline int32_t lerpD(int32_t start, int32_t dest, int32_t pos) { return dMul(start, 16777216 - pos) + dMul(dest, pos); }; + +static inline long long lerpL(long long start, long long dest, long long pos){ return dMul( (start << 12), 16777216 - (pos << 12) ) + dMul((dest << 12), (pos << 12) ) >> 12; }; + +// A few notes on the following code : + +int ncos(unsigned int t) { + + t %= DC_2PI; + + int r; + + if (t < DC_PI2) { + + r = m_cosTable[t]; + + } else if (t < DC_PI) { + + r = -m_cosTable[DC_PI - 1 - t]; + + } else if (t < (DC_PI + DC_PI2)) { + + r = -m_cosTable[t - DC_PI]; + + } else { + + r = m_cosTable[DC_2PI - 1 - t]; + + }; + + return r >> 12; +}; + +// sin(x) = cos(x - pi / 2) +int nsin(unsigned int t) { + + t %= DC_2PI; + + if (t < DC_PI2){ + + return ncos(t + DC_2PI - DC_PI2); + + }; + + return ncos(t - DC_PI2); +}; + +// f(n) = cos(n * 2pi / 2048) <- 2048 is == DC_2PI value +// f(n) = 2 * f(1) * f(n - 1) - f(n - 2) +void generateTable(void){ + + m_cosTable[0] = 16777216; // 2^24 * cos(0 * 2pi / 2048) => 2^24 * 1 = 2^24 : here, 2^24 defines the precision we want after the decimal point + + static const long long C = 16777137; // 2^24 * cos(1 * 2pi / 2048) = C = f(1); + + m_cosTable[1] = C; + + for (int i = 2; i < 512; i++){ + + m_cosTable[i] = ((C * m_cosTable[i - 1]) >> 23) - m_cosTable[i - 2]; + + m_cosTable[511] = 0; + } +}; + +// https://github.com/Arsunt/TR2Main/blob/411cacb35914c616cb7960c0e677e00c71c7ee88/3dsystem/phd_math.cpp#L432 +long long patan(long x, long y){ + + long long result; + + int swapBuf; + + int flags = 0; + + // if either x or y are 0, return 0 + + if( x == 0 && y == 0){ + + return 0; + + } + + if( x < 0 ) { + + flags |= 4; + + x = -x; + + } + + if ( y < 0 ) { + + flags |= 2; + + y = -y; + + } + + if ( y > x ) { + + flags |= 1; + + SWAP(x, y ,swapBuf); + + } + + result = AtanBaseTable[flags] + AtanAngleTable[0x800 * y / x]; + + if ( result < 0 ){ + + result = -result; + + return result; + + } + +}; + +u_int psqrt(u_int n){ + + u_int result = 0; + + u_int base = 0x40000000; + + u_int basedResult; + + for( ; base != 0; base >>= 2 ) { + + for( ; base != 0; base >>= 2 ) { + + basedResult = base + result; + + result >>= 1; + + if( basedResult > n ) { + + break; + + } + + n -= basedResult; + + result |= base; + + } + + } + + return result; +}; + +int cliptest3( short *v1 ) { + + if( v1[0]<0 && v1[2]<0 && v1[4]<0 ) return 0; + + if( v1[1]<0 && v1[3]<0 && v1[5]<0 ) return 0; + + if( v1[0] > SCREENXRES && v1[2] > SCREENXRES && v1[4] > SCREENXRES) return 0; + + if( v1[1] > SCREENYRES && v1[3] > SCREENYRES && v1[5] > SCREENYRES) return 0; + + return 1; +}; + +void callback() { + + u_short pad = PadRead(0); + + static u_short lastPad; + + static short forceApplied = 0; + + int div = 4096 >> 7; + + static int lerpValues[4096 >> 7]; + + static short cursor = 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, div)); + + } + } + + if( timer ) { + + timer--; + + } + + if( cursor>0 ) { + + cursor--; + + } + + if ( pad & PADR1 && !timer ) { + + if (!camPtr->tim_data){ + + if(camMode < 6){ + + camMode ++; + + lerping = 0; + + } else { + + setCameraPos(camPtr->campos->pos, camPtr->campos->rot); + + camPath.cursor = 0; + + camMode = 0; + + lerping = 0; + } + + } else { + + if (curCamAngle > 4) { + + curCamAngle = 0; + + } + + if (curCamAngle < 5) { + + curCamAngle++; + + camPtr = camAngles[ curCamAngle ]; + + LoadTexture(camPtr->tim_data, camPtr->BGtim); + + } + } + + lastPad = pad; + + timer = 10; + } + + if ( !(pad & PADR1) && lastPad & PADR1 ) { + + //~ pressed = 0; + + } + + if ( pad & PADL2 ) { + + lgtang.vy += 32; + + } + + if ( pad & PADL1 ) { + + lgtang.vz += 32; + + } + + if ( pad & PADRup && !timer ){ + + if (*actorPtr->isPrism){ + + *actorPtr->isPrism = 0; + + } else { + + *actorPtr->isPrism = 1; + + } + + timer = 10; + + lastPad = pad; + } + + if ( pad & PADRdown && !timer ){ + //~ if (actorPtr->body->gForce.vy >= 0 && actorPtr->body->position.vy >= actorPtr->body->min.vy ){ + //~ forceApplied -= 150; + //~ } + cursor = div - 15; + + timer = 30; + + lastPad = pad; + } + + if ( !(pad & PADRdown) && lastPad & PADRdown ) { + //~ lastPad = pad; + } + + if ( pad & PADRleft && !timer ) { + + if (actorPtr->anim->interpolate){ + + actorPtr->anim->interpolate = 0; + + } else { + + actorPtr->anim->interpolate = 1; + + } + + timer = 10; + + lastPad = pad; + } + + if ( pad & PADLup ) { + + actorPtr->body->gForce.vz = getVectorTo(fVecActor, *actorPtr->pos).vz >> 8 ; + + actorPtr->body->gForce.vx = -getVectorTo(fVecActor, *actorPtr->pos).vx >> 8 ; + + lastPad = pad; + } + + if ( !(pad & PADLup) && lastPad & PADLup) { + + actorPtr->body->gForce.vz = 0; + + actorPtr->body->gForce.vx = 0; + } + + if ( pad & PADLdown ) { + + actorPtr->body->gForce.vz = -getVectorTo(fVecActor, *actorPtr->pos).vz >> 8 ; + + actorPtr->body->gForce.vx = getVectorTo(fVecActor, *actorPtr->pos).vx >> 8 ; + + lastPad = pad; + } + + if ( !(pad & PADLdown) && lastPad & PADLdown) { + + actorPtr->body->gForce.vz = 0; + + actorPtr->body->gForce.vx = 0; + + lastPad = pad; + + } + + if ( pad & PADLleft ) { + + actorPtr->rot->vy -= 32; + + lastPad = pad; + + } + + if ( pad & PADLright ) { + + actorPtr->rot->vy += 32; + + lastPad = pad; + } + + if ( cursor ) { + + actorPtr->body->position.vy = lerpValues[cursor];} + +};