diff --git a/HISTORY.md b/HISTORY.md new file mode 100644 index 000000000..c5fd1c992 --- /dev/null +++ b/HISTORY.md @@ -0,0 +1,165 @@ + + +history +------- + +I've developed videogames for some years and 4 years ago I started teaching videogames development +to young people with artistic profile, most of them had never written a single line of code. + +I started with C language basis and, after searching for the most simple and easy-to-use library to teach +videogames programming, I found WinBGI; it was great and it worked very well with students, in just a +couple of weeks that people that had never written a single line of code were able to program (and understand) +a simple PONG and some of them even a BREAKOUT! + +But WinBGI was not the clearer and most organized lib. There were a lot of things I found useless and +confusing and some function names were not clear enough for most of the students; not to mention points +like no transparencies support or no hardware acceleration. + +So, I decided to create my own lib, hardware accelerated, clear function names, quite organized, well structured, +plain C coding and, the most important, primarily intended to LEARN videogames programming. + +I've coded quite a lot in C# and XNA and I really love it (in fact, my students learn C# after C), +so, I decided to use C# language notation and XNA naming conventions. That way, students can jump from +raylib to XNA, MonoGame or similar libs extremely easily. + +raylib started as a weekend project and after three months of hard work, raylib 1.0 was published on November 2013. + +Enjoy it. + +notes on raylib 1.1 +------------------- + +On April 2014, after 6 month of first raylib release, raylib 1.1 has been released. This new version presents a +complete internal redesign of the library to support OpenGL 1.1, OpenGL 3.3+ and OpenGL ES 2.0. + +A new module named [rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.h) has been added to the library. This new module translates raylib-OpenGL-style +immediate mode functions (i.e. rlVertex3f(), rlBegin(), ...) to different versions of OpenGL (1.1, 3.3+, ES2), selectable by one define. + +[rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.h) also comes with a second new module named [raymath](https://github.com/raysan5/raylib/blob/master/src/raymath.h), which includes +a bunch of useful functions for 3d-math with vectors, matrices and quaternions. + +Some other big changes of this new version have been the support for OGG files loading and stream playing, and the +support of DDS texture files (compressed and uncompressed) along with mipmaps support. + +Lots of code changes and lot of testing have concluded in this amazing new raylib 1.1. + +notes on raylib 1.2 +------------------- + +On September 2014, after 5 month of raylib 1.1 release, it comes raylib 1.2. Again, this version presents a +complete internal redesign of [core](https://github.com/raysan5/raylib/blob/master/src/core.c) module to support two new platforms: [Android](http://www.android.com/) and [Raspberry Pi](http://www.raspberrypi.org/). + +It's been some month of really hard work to accomodate raylib to those new platforms while keeping it easy for the user. +On Android, raylib manages internally the activity cicle, as well as the inputs; on Raspberry Pi, a complete raw input +system has been written from scratch. + +A new display initialization system has been created to support multiple resolutions, adding black bars if required; +user only defines desired screen size and it gets properly displayed. + +Now raylib can easily deploy games to Android devices and Raspberry Pi (console mode). + +Lots of code changes and lot of testing have concluded in this amazing new raylib 1.2. + +In December 2014, new raylib 1.2.2 was published with support to compile directly for web (html5) using [emscripten](http://kripken.github.io/emscripten-site/) and [asm.js](http://asmjs.org/). + +notes on raylib 1.3 +------------------- + +On September 2015, after 1 year of raylib 1.2 release, arrives raylib 1.3. This version adds shaders functionality, +improves tremendously textures module and also provides some new modules (camera system, gestures system, IMGUI). + +Shaders support is the biggest addition to raylib 1.3, with support for easy shaders loading and use. Loaded shaders can be +attached to 3d models or used as fullscreen postrocessing effects. A bunch of postprocessing shaders are also included +in this release, check raylib/shaders folder. + +Textures module has grown to support most of the internal texture formats available in OpenGL (RGB565, RGB888, RGBA5551, RGBA4444, etc.), including compressed texture formats (DXT, ETC1, ETC2, ASTC, PVRT); raylib 1.3 can load .dds, .pkm, .ktx, .astc and .pvr files. +A brand new [camera](https://github.com/raysan5/raylib/blob/develop/src/camera.c) module offers to the user multiple preconfigured ready-to-use camera systems (free camera, 1st person, 3rd person). +Camera modes are very easy to use, just check examples: [core_3d_camera_free.c](https://github.com/raysan5/raylib/blob/develop/examples/core_3d_camera_free.c) and [core_3d_camera_first_person.c](https://github.com/raysan5/raylib/blob/develop/examples/core_3d_camera_first_person.c). + +New [gestures](https://github.com/raysan5/raylib/blob/develop/src/gestures.h) module simplifies gestures detection on Android and HTML5 programs. + +[raygui](https://github.com/raysan5/raylib/blob/develop/src/raygui.h), the new IMGUI (Immediate Mode GUI) module offers a set of functions to create simple user interfaces, +primary intended for tools development. It's still in experimental state but already fully functional. + +Most of the examples have been completely rewritten and +10 new examples have been added to show the new raylib features. + +Lots of code changes and lot of testing have concluded in this amazing new raylib 1.3. + +notes on raylib 1.4 +------------------- + +On February 2016, after 4 months of raylib 1.3 release, it comes raylib 1.4. For this new version, +lots of parts of the library have been reviewed, lots of bugs have been solved and some interesting features have been added. + +First big addition is a set of [Image manipulation functions](https://github.com/raysan5/raylib/blob/develop/src/raylib.h#L673) have been added to crop, resize, colorize, flip, dither and even draw image-to-image or text-to-image. +Now a basic image processing can be done before converting the image to texture for usage. + +SpriteFonts system has been improved, adding support for AngelCode fonts (.fnt) and TrueType Fonts (using [stb_truetype](https://github.com/nothings/stb/blob/master/stb_truetype.h) helper library). +Now raylib can read standard .fnt font data and also generate at loading a SpriteFont from a TTF file. + +New [physac](https://github.com/raysan5/raylib/blob/develop/src/physac.h) physics module for basic 2D physics support. Still in development but already functional. +Module comes with some usage examples for basic jump and level interaction and also force-based physic movements. + +[raymath](https://github.com/raysan5/raylib/blob/develop/src/raymath.h) module has been reviewed; some bugs have been solved and the module has been converted to a header-only file for easier portability, optionally, functions can also be used as inline. + +[gestures](https://github.com/raysan5/raylib/blob/develop/src/gestures.c) module has redesigned and simplified, now it can process touch events from any source, including mouse. +This way, gestures system can be used on any platform providing an unified way to work with inputs and allowing the user to create multiplatform games with only one source code. + +Raspberry Pi input system has been redesigned to better read raw inputs using generic Linux event handlers (keyboard:`stdin`, mouse:`/dev/input/mouse0`, gamepad:`/dev/input/js0`). +Gamepad support has also been added (experimental). + +Other important improvements are the functional raycast system for 3D picking, including some ray collision-detection functions, +and the addition of two simple functions for persistent data storage. Now raylib user can save and load game data in a file (only some platforms supported). +A simple [easings](https://github.com/raysan5/raylib/blob/develop/src/easings.h) module has also been added for values animation. + +Up to 8 new code examples have been added to show the new raylib features and +10 complete game samples have been provided to learn +how to create some classic games like Arkanoid, Asteroids, Missile Commander, Snake or Tetris. + +Lots of code changes and lots of hours of hard work have concluded in this amazing new raylib 1.4. + +notes on raylib 1.5 +------------------- + +On July 2016, after 5 months of raylib 1.4 release, arrives raylib 1.5. This new version is the biggest boost of the library until now, lots of parts of the library have been redesigned, lots of bugs have been solved and some **AMAZING** new features have been added. + +VR support: raylib supports **Oculus Rift CV1**, one of the most anticipated VR devices in the market. Additionally, raylib supports simulated VR stereo rendering, independent of the VR device; it means, raylib can generate stereo renders with custom head-mounted-display device parameteres, that way, any VR device in the market can be **simulated in any platform** just configuring device parameters (and consequently, lens distortion). To enable VR is [extremely easy](https://github.com/raysan5/raylib/blob/develop/examples/core_oculus_rift.c). + +New materials system: now raylib supports standard material properties for 3D models, including diffuse-ambient-specular colors and diffuse-normal-specular textures. Just assign values to standard material and everything is processed internally. + +New lighting system: added support for up to 8 configurable lights and 3 light types: **point**, **directional** and **spot** lights. Just create a light, configure its parameters and raylib manages render internally for every 3d object using standard material. + +Complete gamepad support on Raspberry Pi: Gamepad system has been completely redesigned. Now multiple gamepads can be easily configured and used; gamepad data is read and processed in raw mode in a second thread. + +Redesigned physics module: [physac](https://github.com/raysan5/raylib/blob/develop/src/physac.h) module has been converted to header only and usage [has been simplified](https://github.com/raysan5/raylib/blob/develop/examples/physics_basic_rigidbody.c). Performance has also been singnificantly improved, now physic objects are managed internally in a second thread. + +Audio chiptunese support and mixing channels: Added support for module audio music (.xm, .mod) loading and playing. Multiple mixing channels are now also supported. All this features thanks to the amazing work of @kd7tck. + +Other additions include a [2D camera system](https://github.com/raysan5/raylib/blob/develop/examples/core_2d_camera.c), render textures for offline render (and most comprehensive [postprocessing](https://github.com/raysan5/raylib/blob/develop/examples/shaders_postprocessing.c)) or support for legacy OpenGL 2.1 on desktop platforms. + +This new version is so massive that is difficult to list all the improvements, most of raylib modules have been reviewed and [rlgl](https://github.com/raysan5/raylib/blob/develop/src/rlgl.c) module has been completely redesigned to accomodate to new material-lighting systems and stereo rendering. You can check [CHANGELOG](https://github.com/raysan5/raylib/blob/develop/CHANGELOG) file for a more detailed list of changes. + +Up to 8 new code examples have been added to show the new raylib features and also some samples to show the usage of [rlgl](https://github.com/raysan5/raylib/blob/develop/examples/rlgl_standalone.c) and [audio](https://github.com/raysan5/raylib/blob/develop/examples/audio_standalone.c) raylib modules as standalone libraries. + +Lots of code changes (+400 commits) and lots of hours of hard work have concluded in this amazing new raylib 1.5. + +notes on raylib 1.6 +------------------- + +On November 2016, only 4 months after raylib 1.5, arrives raylib 1.6. This new version represents another big review of the library and includes some interesting additions. This version conmmemorates raylib 3rd anniversary (raylib 1.0 was published on November 2013) and it is a stepping stone for raylib future. raylib roadmap has been reviewed and redefined to focus on its primary objective: create a simple and easy-to-use library to learn videogames programming. Some of the new features: + +Complete raylib Lua binding. All raylib functions plus the +60 code examples have been ported to Lua, now Lua users can enjoy coding videogames in Lua while using all the internal power of raylib. This addition also open the doors to Lua scripting support for a future raylib-based engine, being able to move game logic (Init, Update, Draw, De-Init) to Lua scripts while keep using raylib functionality. + +Completely redesigned audio module. Based on the new direction taken in raylib 1.5, it has been further improved and more functionality added (+20 new functions) to allow raw audio processing and streaming. FLAC file format support has also been added. In the same line, OpenAL Soft backend is now provided as a static library in Windows to allow static linking and get ride of OpenAL32.dll. Now raylib Windows games are completey self-contained, no external libraries required any more! + +Physac module has been moved to its own repository and it has been improved A LOT, actually, library has been completely rewritten from scratch by @victorfisac, multiple samples have been added together with countless new features to match current standard 2D physic libraries. Results are amazing! + +Camera and gestures modules have been reviewed, highly simplified and ported to single-file header-only libraries for easier portability and usage flexibility. Consequently, camera system usage has been simplified in all examples. + +Improved Gamepad support on Windows and Raspberry Pi with the addition of new functions for custom gamepad configurations but supporting by default PS3 and Xbox-based gamepads. + +Improved textures and text functionality, adding new functions for texture filtering control and better TTF/AngelCode fonts loading and generation support. + +Build system improvement. Added support for raylib dynamic library generation (raylib.dll) for users that prefer dynamic library linking. Also thinking on advance users, it has been added pre-configured Visual Studio C++ 2015 solution with raylib project and C/C++ examples for users that prefer that professional IDE and compiler. + +New examples, new functions, complete code-base review, multiple bugs corrected... this is raylib 1.6. Enjoy making games. + diff --git a/README.md b/README.md index b868172e5..fde1e279f 100644 --- a/README.md +++ b/README.md @@ -11,170 +11,6 @@ NOTE for ADVENTURERS: raylib is a programming library to learn videogames progra no fancy interface, no visual helpers, no auto-debugging... just coding in the most pure spartan-programmers way. Are you ready to learn? Jump to [code examples!](http://www.raylib.com/examples.html) -history -------- - -I've developed videogames for some years and 4 years ago I started teaching videogames development -to young people with artistic profile, most of them had never written a single line of code. - -I started with C language basis and, after searching for the most simple and easy-to-use library to teach -videogames programming, I found WinBGI; it was great and it worked very well with students, in just a -couple of weeks that people that had never written a single line of code were able to program (and understand) -a simple PONG and some of them even a BREAKOUT! - -But WinBGI was not the clearer and most organized lib. There were a lot of things I found useless and -confusing and some function names were not clear enough for most of the students; not to mention points -like no transparencies support or no hardware acceleration. - -So, I decided to create my own lib, hardware accelerated, clear function names, quite organized, well structured, -plain C coding and, the most important, primarily intended to LEARN videogames programming. - -I've coded quite a lot in C# and XNA and I really love it (in fact, my students learn C# after C), -so, I decided to use C# language notation and XNA naming conventions. That way, students can jump from -raylib to XNA, MonoGame or similar libs extremely easily. - -raylib started as a weekend project and after three months of hard work, raylib 1.0 was published on November 2013. - -Enjoy it. - -notes on raylib 1.1 -------------------- - -On April 2014, after 6 month of first raylib release, raylib 1.1 has been released. This new version presents a -complete internal redesign of the library to support OpenGL 1.1, OpenGL 3.3+ and OpenGL ES 2.0. - -A new module named [rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.h) has been added to the library. This new module translates raylib-OpenGL-style -immediate mode functions (i.e. rlVertex3f(), rlBegin(), ...) to different versions of OpenGL (1.1, 3.3+, ES2), selectable by one define. - -[rlgl](https://github.com/raysan5/raylib/blob/master/src/rlgl.h) also comes with a second new module named [raymath](https://github.com/raysan5/raylib/blob/master/src/raymath.h), which includes -a bunch of useful functions for 3d-math with vectors, matrices and quaternions. - -Some other big changes of this new version have been the support for OGG files loading and stream playing, and the -support of DDS texture files (compressed and uncompressed) along with mipmaps support. - -Lots of code changes and lot of testing have concluded in this amazing new raylib 1.1. - -notes on raylib 1.2 -------------------- - -On September 2014, after 5 month of raylib 1.1 release, it comes raylib 1.2. Again, this version presents a -complete internal redesign of [core](https://github.com/raysan5/raylib/blob/master/src/core.c) module to support two new platforms: [Android](http://www.android.com/) and [Raspberry Pi](http://www.raspberrypi.org/). - -It's been some month of really hard work to accomodate raylib to those new platforms while keeping it easy for the user. -On Android, raylib manages internally the activity cicle, as well as the inputs; on Raspberry Pi, a complete raw input -system has been written from scratch. - -A new display initialization system has been created to support multiple resolutions, adding black bars if required; -user only defines desired screen size and it gets properly displayed. - -Now raylib can easily deploy games to Android devices and Raspberry Pi (console mode). - -Lots of code changes and lot of testing have concluded in this amazing new raylib 1.2. - -In December 2014, new raylib 1.2.2 was published with support to compile directly for web (html5) using [emscripten](http://kripken.github.io/emscripten-site/) and [asm.js](http://asmjs.org/). - -notes on raylib 1.3 -------------------- - -On September 2015, after 1 year of raylib 1.2 release, arrives raylib 1.3. This version adds shaders functionality, -improves tremendously textures module and also provides some new modules (camera system, gestures system, IMGUI). - -Shaders support is the biggest addition to raylib 1.3, with support for easy shaders loading and use. Loaded shaders can be -attached to 3d models or used as fullscreen postrocessing effects. A bunch of postprocessing shaders are also included -in this release, check raylib/shaders folder. - -Textures module has grown to support most of the internal texture formats available in OpenGL (RGB565, RGB888, RGBA5551, RGBA4444, etc.), including compressed texture formats (DXT, ETC1, ETC2, ASTC, PVRT); raylib 1.3 can load .dds, .pkm, .ktx, .astc and .pvr files. -A brand new [camera](https://github.com/raysan5/raylib/blob/develop/src/camera.c) module offers to the user multiple preconfigured ready-to-use camera systems (free camera, 1st person, 3rd person). -Camera modes are very easy to use, just check examples: [core_3d_camera_free.c](https://github.com/raysan5/raylib/blob/develop/examples/core_3d_camera_free.c) and [core_3d_camera_first_person.c](https://github.com/raysan5/raylib/blob/develop/examples/core_3d_camera_first_person.c). - -New [gestures](https://github.com/raysan5/raylib/blob/develop/src/gestures.h) module simplifies gestures detection on Android and HTML5 programs. - -[raygui](https://github.com/raysan5/raylib/blob/develop/src/raygui.h), the new IMGUI (Immediate Mode GUI) module offers a set of functions to create simple user interfaces, -primary intended for tools development. It's still in experimental state but already fully functional. - -Most of the examples have been completely rewritten and +10 new examples have been added to show the new raylib features. - -Lots of code changes and lot of testing have concluded in this amazing new raylib 1.3. - -notes on raylib 1.4 -------------------- - -On February 2016, after 4 months of raylib 1.3 release, it comes raylib 1.4. For this new version, -lots of parts of the library have been reviewed, lots of bugs have been solved and some interesting features have been added. - -First big addition is a set of [Image manipulation functions](https://github.com/raysan5/raylib/blob/develop/src/raylib.h#L673) have been added to crop, resize, colorize, flip, dither and even draw image-to-image or text-to-image. -Now a basic image processing can be done before converting the image to texture for usage. - -SpriteFonts system has been improved, adding support for AngelCode fonts (.fnt) and TrueType Fonts (using [stb_truetype](https://github.com/nothings/stb/blob/master/stb_truetype.h) helper library). -Now raylib can read standard .fnt font data and also generate at loading a SpriteFont from a TTF file. - -New [physac](https://github.com/raysan5/raylib/blob/develop/src/physac.h) physics module for basic 2D physics support. Still in development but already functional. -Module comes with some usage examples for basic jump and level interaction and also force-based physic movements. - -[raymath](https://github.com/raysan5/raylib/blob/develop/src/raymath.h) module has been reviewed; some bugs have been solved and the module has been converted to a header-only file for easier portability, optionally, functions can also be used as inline. - -[gestures](https://github.com/raysan5/raylib/blob/develop/src/gestures.c) module has redesigned and simplified, now it can process touch events from any source, including mouse. -This way, gestures system can be used on any platform providing an unified way to work with inputs and allowing the user to create multiplatform games with only one source code. - -Raspberry Pi input system has been redesigned to better read raw inputs using generic Linux event handlers (keyboard:`stdin`, mouse:`/dev/input/mouse0`, gamepad:`/dev/input/js0`). -Gamepad support has also been added (experimental). - -Other important improvements are the functional raycast system for 3D picking, including some ray collision-detection functions, -and the addition of two simple functions for persistent data storage. Now raylib user can save and load game data in a file (only some platforms supported). -A simple [easings](https://github.com/raysan5/raylib/blob/develop/src/easings.h) module has also been added for values animation. - -Up to 8 new code examples have been added to show the new raylib features and +10 complete game samples have been provided to learn -how to create some classic games like Arkanoid, Asteroids, Missile Commander, Snake or Tetris. - -Lots of code changes and lots of hours of hard work have concluded in this amazing new raylib 1.4. - -notes on raylib 1.5 -------------------- - -On July 2016, after 5 months of raylib 1.4 release, arrives raylib 1.5. This new version is the biggest boost of the library until now, lots of parts of the library have been redesigned, lots of bugs have been solved and some **AMAZING** new features have been added. - -VR support: raylib supports **Oculus Rift CV1**, one of the most anticipated VR devices in the market. Additionally, raylib supports simulated VR stereo rendering, independent of the VR device; it means, raylib can generate stereo renders with custom head-mounted-display device parameteres, that way, any VR device in the market can be **simulated in any platform** just configuring device parameters (and consequently, lens distortion). To enable VR is [extremely easy](https://github.com/raysan5/raylib/blob/develop/examples/core_oculus_rift.c). - -New materials system: now raylib supports standard material properties for 3D models, including diffuse-ambient-specular colors and diffuse-normal-specular textures. Just assign values to standard material and everything is processed internally. - -New lighting system: added support for up to 8 configurable lights and 3 light types: **point**, **directional** and **spot** lights. Just create a light, configure its parameters and raylib manages render internally for every 3d object using standard material. - -Complete gamepad support on Raspberry Pi: Gamepad system has been completely redesigned. Now multiple gamepads can be easily configured and used; gamepad data is read and processed in raw mode in a second thread. - -Redesigned physics module: [physac](https://github.com/raysan5/raylib/blob/develop/src/physac.h) module has been converted to header only and usage [has been simplified](https://github.com/raysan5/raylib/blob/develop/examples/physics_basic_rigidbody.c). Performance has also been singnificantly improved, now physic objects are managed internally in a second thread. - -Audio chiptunese support and mixing channels: Added support for module audio music (.xm, .mod) loading and playing. Multiple mixing channels are now also supported. All this features thanks to the amazing work of @kd7tck. - -Other additions include a [2D camera system](https://github.com/raysan5/raylib/blob/develop/examples/core_2d_camera.c), render textures for offline render (and most comprehensive [postprocessing](https://github.com/raysan5/raylib/blob/develop/examples/shaders_postprocessing.c)) or support for legacy OpenGL 2.1 on desktop platforms. - -This new version is so massive that is difficult to list all the improvements, most of raylib modules have been reviewed and [rlgl](https://github.com/raysan5/raylib/blob/develop/src/rlgl.c) module has been completely redesigned to accomodate to new material-lighting systems and stereo rendering. You can check [CHANGELOG](https://github.com/raysan5/raylib/blob/develop/CHANGELOG) file for a more detailed list of changes. - -Up to 8 new code examples have been added to show the new raylib features and also some samples to show the usage of [rlgl](https://github.com/raysan5/raylib/blob/develop/examples/rlgl_standalone.c) and [audio](https://github.com/raysan5/raylib/blob/develop/examples/audio_standalone.c) raylib modules as standalone libraries. - -Lots of code changes (+400 commits) and lots of hours of hard work have concluded in this amazing new raylib 1.5. - -notes on raylib 1.6 -------------------- - -On November 2016, only 4 months after raylib 1.5, arrives raylib 1.6. This new version represents another big review of the library and includes some interesting additions. This version conmmemorates raylib 3rd anniversary (raylib 1.0 was published on November 2013) and it is a stepping stone for raylib future. raylib roadmap has been reviewed and redefined to focus on its primary objective: create a simple and easy-to-use library to learn videogames programming. Some of the new features: - -Complete raylib Lua binding. All raylib functions plus the +60 code examples have been ported to Lua, now Lua users can enjoy coding videogames in Lua while using all the internal power of raylib. This addition also open the doors to Lua scripting support for a future raylib-based engine, being able to move game logic (Init, Update, Draw, De-Init) to Lua scripts while keep using raylib functionality. - -Completely redesigned audio module. Based on the new direction taken in raylib 1.5, it has been further improved and more functionality added (+20 new functions) to allow raw audio processing and streaming. FLAC file format support has also been added. In the same line, OpenAL Soft backend is now provided as a static library in Windows to allow static linking and get ride of OpenAL32.dll. Now raylib Windows games are completey self-contained, no external libraries required any more! - -Physac module has been moved to its own repository and it has been improved A LOT, actually, library has been completely rewritten from scratch by @victorfisac, multiple samples have been added together with countless new features to match current standard 2D physic libraries. Results are amazing! - -Camera and gestures modules have been reviewed, highly simplified and ported to single-file header-only libraries for easier portability and usage flexibility. Consequently, camera system usage has been simplified in all examples. - -Improved Gamepad support on Windows and Raspberry Pi with the addition of new functions for custom gamepad configurations but supporting by default PS3 and Xbox-based gamepads. - -Improved textures and text functionality, adding new functions for texture filtering control and better TTF/AngelCode fonts loading and generation support. - -Build system improvement. Added support for raylib dynamic library generation (raylib.dll) for users that prefer dynamic library linking. Also thinking on advance users, it has been added pre-configured Visual Studio C++ 2015 solution with raylib project and C/C++ examples for users that prefer that professional IDE and compiler. - -New examples, new functions, complete code-base review, multiple bugs corrected... this is raylib 1.6. Enjoy making games. - - features -------- @@ -189,24 +25,22 @@ features * Shaders support, including Model shaders and Postprocessing shaders * Powerful math module for Vector and Matrix operations: [raymath](https://github.com/raysan5/raylib/blob/master/src/raymath.c) * Audio loading and playing with streaming support and mixing channels (WAV, OGG, FLAC, XM, MOD) + * Multiple platforms support: Windows, Linux, Mac, **Android**, **Raspberry Pi** and **HTML5** * VR stereo rendering support with configurable HMD device parameters - * Multiple platforms support: Windows, Linux, Mac, **Android**, **Raspberry Pi**, **HTML5** and **Oculus Rift CV1** * Custom color palette for fancy visuals on raywhite background * Minimal external dependencies (GLFW3, OpenGL, OpenAL) - * Complete binding to LUA + * Complete binding to LUA: [raylib-lua](https://github.com/raysan5/raylib-lua) -raylib uses on its core module the outstanding [GLFW3](http://www.glfw.org/) library. The best option by far I found for -multiplatform (Windows, Linux, Mac) window/context and input management (clean, focused, great license, well documented, modern, ...). +raylib uses on its core module the outstanding [GLFW3](http://www.glfw.org/) library. The best option I found for +multiplatform (Windows, Linux, Mac) window/context and input management (clean, focused, great license, well documented, modern, maintained, ...). raylib uses on its [audio](https://github.com/raysan5/raylib/blob/master/src/audio.c) module, [OpenAL Soft](http://kcat.strangesoft.net/openal.html) audio library, in multiple flavours, to accomodate to Android, Raspberry Pi and HTML5. -On Android, raylib uses `native_app_glue module` (provided by Android NDK) and native Android libraries to manage window/context, inputs and activity cycle. +On Android, raylib uses `native_app_glue module` (provided by Android NDK) and native Android libraries to manage window/context, inputs and activity life cycle. On Raspberry Pi, raylib uses Videocore API and EGL for window/context management and raw inputs reading. -On Oculus Rift CV1, raylib uses Oculus PC SDK libraries but only the core C library ([LibOVR](https://github.com/raysan5/raylib/tree/develop/src/external/OculusSDK/LibOVR)); runtime library (LibOVRRT32_1.dll) must be linked at compilation time. - raylib is licensed under a zlib/libpng license. View [LICENSE](https://github.com/raysan5/raylib/blob/master/LICENSE.md). tools requirements @@ -279,3 +113,8 @@ contributing (in some way or another) to make raylib project better. Huge thanks Please, if I forget someone in this list, excuse me and write me an email to remind me to add you! [raysan5]: mailto:ray@raylib.com "Ramon Santamaria - Ray San" + +license +------- + +raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified, BSD-like license that allows static linking with closed source software. Check [LICENSE](LICENSE.md) for further details. diff --git a/docs/examples/web/core/core_3d_camera_first_person.c b/docs/examples/web/core/core_3d_camera_first_person.c index 495f278cf..2b489bcfd 100644 --- a/docs/examples/web/core/core_3d_camera_first_person.c +++ b/docs/examples/web/core/core_3d_camera_first_person.c @@ -34,7 +34,6 @@ Color colors[MAX_COLUMNS]; //Vector3 playerPosition; Vector3 playerPosition = { 4.0f, 2.0f, 4.0f }; // Define player position - //---------------------------------------------------------------------------------- // Module Functions Declaration //---------------------------------------------------------------------------------- diff --git a/docs/examples/web/core/core_vr_simulator.c b/docs/examples/web/core/core_vr_simulator.c index 6bd0e591f..3a3b8dd27 100644 --- a/docs/examples/web/core/core_vr_simulator.c +++ b/docs/examples/web/core/core_vr_simulator.c @@ -85,6 +85,9 @@ void UpdateDrawFrame(void) UpdateCamera(&camera); // Update camera (simulator mode) if (IsKeyPressed(KEY_SPACE)) ToggleVrMode(); // Toggle VR mode + + // Lock mouse cursor if mouse click on canvas + if (IsMouseButtonPressed(MOUSE_LEFT_BUTTON)) DisableCursor(); //---------------------------------------------------------------------------------- // Draw diff --git a/docs/examples/web/core/core_vr_simulator.js b/docs/examples/web/core/core_vr_simulator.js index 0997fdc21..f27d33bbc 100644 --- a/docs/examples/web/core/core_vr_simulator.js +++ b/docs/examples/web/core/core_vr_simulator.js @@ -1605,12 +1605,12 @@ function _emscripten_asm_const_iii(code, a0, a1) { STATIC_BASE = 8; -STATICTOP = STATIC_BASE + 21984; +STATICTOP = STATIC_BASE + 22064; /* global initializers */ __ATINIT__.push(); -/* memory initializer */ allocate([32,3,0,0,194,1,0,0,255,255,255,255,205,204,236,63,2,0,0,0,86,1,0,0,85,1,0,0,87,0,0,0,83,0,0,0,68,0,0,0,65,0,0,0,69,0,0,0,81,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,0,32,0,0,176,1,0,0,0,0,0,0,0,0,0,32,37,249,142,0,10,2,0,0,128,190,125,95,244,125,31,160,242,43,74,30,9,82,8,0,64,34,65,80,20,4,16,32,32,41,46,18,8,34,8,0,32,34,65,80,20,4,16,32,32,249,16,76,8,250,62,60,16,34,125,222,247,125,16,32,32,161,232,50,8,34,8,0,8,34,5,16,4,69,16,0,240,163,164,50,8,82,8,0,4,34,5,16,4,69,16,32,32,249,226,94,8,2,0,129,2,62,125,31,244,125,16,0,0,32,0,0,176,1,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,190,15,0,192,15,224,247,251,125,126,191,95,232,190,80,0,162,8,8,68,232,47,20,10,133,2,129,80,72,160,80,0,162,40,228,73,40,40,20,10,132,2,129,64,72,160,72,0,190,15,2,16,175,235,247,9,132,62,159,216,79,160,71,0,34,136,228,9,161,42,20,10,132,2,129,80,72,160,72,0,34,40,8,4,160,47,20,10,133,2,129,80,72,162,80,0,190,143,0,0,33,32,244,251,125,126,129,95,232,156,208,7,0,128,0,0,224,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,1,12,0,130,66,191,223,239,247,251,11,5,5,133,66,191,4,72,0,198,66,161,80,40,20,64,8,5,37,133,66,160,8,168,0,170,70,161,80,40,20,64,8,5,37,133,66,144,16,8,0,146,74,161,95,232,247,67,8,5,37,121,126,136,32,8,0,130,82,161,64,40,1,66,8,137,36,133,64,132,64,8,0,130,98,161,64,42,2,66,8,81,36,133,64,130,128,8,0,130,66,191,192,47,244,67,248,33,252,133,126,191,0,9,62,0,0,0,0,4,0,0,0,0,0,0,0,128,1,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,0,4,0,32,72,65,0,0,0,0,0,8,0,0,4,4,0,4,60,32,0,65,0,0,0,0,0,8,0,0,240,125,223,247,133,239,75,81,190,239,251,190,239,59,81,4,0,69,65,20,133,40,74,73,170,40,138,162,32,8,81,4,240,69,65,244,157,40,74,71,170,40,138,162,224,11,81,4,16,69,65,20,132,40,74,73,170,40,138,162,0,10,145,2,240,125,223,247,133,47,74,209,170,232,251,190,224,123,31,1,0,0,0,0,4,8,64,0,0,0,8,32,0,0,0,0,0,0,0,0,132,15,96,0,0,0,8,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,1,15,0,0,0,0,0,0,0,0,0,0,0,0,0,36,1,9,0,0,0,0,0,0,0,0,0,6,0,0,0,36,1,9,0,0,0,0,0,0,0,128,16,9,162,40,250,36,1,9,0,0,0,0,0,0,0,0,62,1,42,37,66,34,82,9,0,0,0,0,0,0,0,128,138,3,42,34,34,36,41,9,0,0,0,0,0,0,0,128,10,1,42,37,18,36,1,9,0,0,0,0,0,0,0,128,10,1,190,232,251,36,1,9,0,0,0,0,0,0,0,128,190,14,0,0,2,172,1,15,0,0,0,0,0,0,0,128,4,0,0,224,3,0,0,0,0,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,0,0,0,14,184,67,132,3,58,32,0,128,160,190,2,32,0,0,240,138,32,82,196,2,43,32,4,34,145,2,248,59,0,240,7,142,56,75,228,2,58,32,2,28,138,30,8,42,233,17,4,224,11,66,244,2,130,36,1,20,4,20,232,186,4,209,5,128,184,195,231,10,58,137,0,28,14,60,40,2,9,80,4,128,0,64,196,2,128,68,0,34,132,32,232,2,0,80,4,0,0,64,128,2,0,32,5,0,142,62,8,2,0,16,4,224,3,64,128,66,0,0,7,0,132,0,248,3,0,240,7,0,0,64,128,34,0,0,4,0,0,0,0,0,0,0,0,0,0,64,128,2,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,7,128,0,194,160,72,24,0,0,1,132,33,9,146,2,66,38,4,1,33,81,0,0,127,63,2,66,2,16,41,0,34,20,192,239,247,251,253,126,9,161,223,239,247,187,187,3,18,15,68,40,20,10,133,66,9,129,64,32,16,16,17,1,8,4,68,40,20,10,133,66,127,129,64,32,16,16,17,1,4,130,199,239,247,251,253,126,9,129,207,231,243,17,17,1,50,169,80,40,20,10,133,66,9,161,64,32,16,16,17,1,64,184,80,40,20,10,133,66,121,191,223,239,247,187,187,3,32,160,31,0,0,0,0,0,0,16,0,0,0,0,0,0,112,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,2,8,131,34,1,0,2,8,67,2,1,0,1,1,124,20,4,132,68,1,0,32,4,132,4,128,8,63,130,0,132,66,191,223,239,247,3,126,161,80,40,20,10,33,0,0,132,70,161,80,40,20,138,82,161,80,40,20,122,161,239,3,158,74,161,80,40,20,82,82,161,80,40,20,74,31,8,2,132,82,161,80,40,20,34,74,161,80,40,244,75,161,239,3,132,98,161,80,40,20,82,74,161,80,40,4,122,161,40,2,124,66,191,223,239,247,139,126,191,223,239,247,11,189,239,3,0,0,0,0,0,0,0,4,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,5,32,0,0,4,132,0,34,129,69,17,16,66,1,0,148,66,81,0,0,8,66,81,148,42,162,32,8,165,80,0,0,0,32,0,0,0,0,0,0,0,5,0,0,0,0,8,190,239,251,254,251,190,239,251,20,145,235,251,190,239,251,0,32,8,130,32,10,162,40,138,20,145,40,138,162,40,138,62,190,239,251,254,11,190,239,251,20,145,40,138,162,40,138,0,162,40,138,34,8,130,32,8,20,145,40,138,162,40,138,8,190,239,251,254,251,190,239,251,20,145,47,250,190,239,251,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,33,0,4,0,0,0,0,0,0,0,0,0,0,0,0,130,80,20,2,20,0,0,0,0,0,0,0,0,0,0,16,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0,190,40,138,162,40,34,0,0,0,0,0,0,0,0,0,0,170,40,138,162,232,34,0,0,0,0,0,0,0,0,0,0,170,40,138,162,168,34,0,0,0,0,0,0,0,0,0,0,170,40,138,162,232,34,0,0,0,0,0,0,0,0,0,0,190,239,251,190,47,62,0,0,0,0,0,0,0,0,0,0,4,0,0,0,40,32,0,0,0,0,0,0,0,0,0,0,0,0,0,128,15,62,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,1,0,0,0,4,0,0,0,6,0,0,0,5,0,0,0,7,0,0,0,6,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,5,0,0,0,5,0,0,0,2,0,0,0,4,0,0,0,1,0,0,0,7,0,0,0,5,0,0,0,2,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,1,0,0,0,1,0,0,0,3,0,0,0,4,0,0,0,3,0,0,0,6,0,0,0,7,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,3,0,0,0,5,0,0,0,6,0,0,0,5,0,0,0,7,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,7,0,0,0,6,0,0,0,7,0,0,0,7,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,2,0,0,0,7,0,0,0,2,0,0,0,3,0,0,0,5,0,0,0,2,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,4,0,0,0,5,0,0,0,5,0,0,0,1,0,0,0,2,0,0,0,5,0,0,0,2,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,4,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,3,0,0,0,1,0,0,0,3,0,0,0,4,0,0,0,4,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,7,0,0,0,1,0,0,0,5,0,0,0,3,0,0,0,7,0,0,0,3,0,0,0,5,0,0,0,4,0,0,0,1,0,0,0,7,0,0,0,4,0,0,0,3,0,0,0,5,0,0,0,3,0,0,0,3,0,0,0,2,0,0,0,5,0,0,0,6,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,5,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,7,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,7,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,5,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,4,0,0,0,6,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,9,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,3,0,0,0,5,0,0,0,255,255,255,255,0,1,0,0,255,255,255,255,0,0,128,191,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,108,74,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,12,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,211,81,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,114,97,121,108,105,98,32,91,99,111,114,101,93,32,101,120,97,109,112,108,101,32,45,32,111,99,117,108,117,115,32,114,105,102,116,0,73,110,105,116,105,97,108,105,122,105,110,103,32,114,97,121,108,105,98,32,40,118,49,46,55,46,48,41,0,35,99,97,110,118,97,115,0,84,97,114,103,101,116,32,116,105,109,101,32,112,101,114,32,102,114,97,109,101,58,32,37,48,50,46,48,51,102,32,109,105,108,108,105,115,101,99,111,110,100,115,0,69,115,99,97,112,101,0,67,97,110,118,97,115,32,115,99,97,108,101,100,32,116,111,32,102,117,108,108,115,99,114,101,101,110,46,32,69,108,101,109,101,110,116,83,105,122,101,58,32,40,37,105,120,37,105,41,44,32,83,99,114,101,101,110,83,105,122,101,40,37,105,120,37,105,41,0,67,97,110,118,97,115,32,115,99,97,108,101,100,32,116,111,32,119,105,110,100,111,119,101,100,46,32,69,108,101,109,101,110,116,83,105,122,101,58,32,40,37,105,120,37,105,41,44,32,83,99,114,101,101,110,83,105,122,101,40,37,105,120,37,105,41,0,91,84,69,88,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,102,111,110,116,32,108,111,97,100,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,68,88,84,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,32,102,111,114,109,97,116,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,69,84,67,49,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,32,102,111,114,109,97,116,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,69,84,67,50,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,32,102,111,114,109,97,116,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,80,86,82,84,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,32,102,111,114,109,97,116,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,83,84,67,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,32,102,111,114,109,97,116,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,84,101,120,116,117,114,101,32,102,111,114,109,97,116,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,91,84,69,88,32,73,68,32,37,105,93,32,84,101,120,116,117,114,101,32,99,114,101,97,116,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,37,105,120,37,105,41,0,84,101,120,116,117,114,101,32,99,111,117,108,100,32,110,111,116,32,98,101,32,99,114,101,97,116,101,100,0,73,109,97,103,101,32,100,97,116,97,32,102,111,114,109,97,116,32,105,115,32,99,111,109,112,114,101,115,115,101,100,44,32,99,97,110,32,110,111,116,32,98,101,32,99,111,110,118,101,114,116,101,100,0,70,111,114,109,97,116,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,102,111,114,32,112,105,120,101,108,32,100,97,116,97,32,114,101,116,114,105,101,118,97,108,0,70,97,105,108,101,100,32,116,111,32,105,110,105,116,105,97,108,105,122,101,32,71,76,70,87,0,84,114,121,105,110,103,32,116,111,32,101,110,97,98,108,101,32,77,83,65,65,32,120,52,0,67,108,111,115,101,115,116,32,102,117,108,108,115,99,114,101,101,110,32,118,105,100,101,111,109,111,100,101,58,32,37,105,32,120,32,37,105,0,71,76,70,87,32,70,97,105,108,101,100,32,116,111,32,105,110,105,116,105,97,108,105,122,101,32,87,105,110,100,111,119,0,68,105,115,112,108,97,121,32,100,101,118,105,99,101,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,82,101,110,100,101,114,32,115,105,122,101,58,32,37,105,32,120,32,37,105,0,83,99,114,101,101,110,32,115,105,122,101,58,32,37,105,32,120,32,37,105,0,86,105,101,119,112,111,114,116,32,111,102,102,115,101,116,115,58,32,37,105,44,32,37,105,0,84,114,121,105,110,103,32,116,111,32,101,110,97,98,108,101,32,86,83,89,78,67,0,71,80,85,58,32,86,101,110,100,111,114,58,32,32,32,37,115,0,71,80,85,58,32,82,101,110,100,101,114,101,114,58,32,37,115,0,71,80,85,58,32,86,101,114,115,105,111,110,58,32,32,37,115,0,71,80,85,58,32,71,76,83,76,58,32,32,32,32,32,37,115,0,32,0,78,117,109,98,101,114,32,111,102,32,115,117,112,112,111,114,116,101,100,32,101,120,116,101,110,115,105,111,110,115,58,32,37,105,0,71,76,95,79,69,83,95,118,101,114,116,101,120,95,97,114,114,97,121,95,111,98,106,101,99,116,0,103,108,71,101,110,86,101,114,116,101,120,65,114,114,97,121,115,79,69,83,0,103,108,66,105,110,100,86,101,114,116,101,120,65,114,114,97,121,79,69,83,0,103,108,68,101,108,101,116,101,86,101,114,116,101,120,65,114,114,97,121,115,79,69,83,0,71,76,95,79,69,83,95,116,101,120,116,117,114,101,95,110,112,111,116,0,71,76,95,69,88,84,95,116,101,120,116,117,114,101,95,99,111,109,112,114,101,115,115,105,111,110,95,115,51,116,99,0,71,76,95,87,69,66,71,76,95,99,111,109,112,114,101,115,115,101,100,95,116,101,120,116,117,114,101,95,115,51,116,99,0,71,76,95,87,69,66,75,73,84,95,87,69,66,71,76,95,99,111,109,112,114,101,115,115,101,100,95,116,101,120,116,117,114,101,95,115,51,116,99,0,71,76,95,79,69,83,95,99,111,109,112,114,101,115,115,101,100,95,69,84,67,49,95,82,71,66,56,95,116,101,120,116,117,114,101,0,71,76,95,87,69,66,71,76,95,99,111,109,112,114,101,115,115,101,100,95,116,101,120,116,117,114,101,95,101,116,99,49,0,71,76,95,65,82,66,95,69,83,51,95,99,111,109,112,97,116,105,98,105,108,105,116,121,0,71,76,95,73,77,71,95,116,101,120,116,117,114,101,95,99,111,109,112,114,101,115,115,105,111,110,95,112,118,114,116,99,0,71,76,95,75,72,82,95,116,101,120,116,117,114,101,95,99,111,109,112,114,101,115,115,105,111,110,95,97,115,116,99,95,104,100,114,0,71,76,95,69,88,84,95,116,101,120,116,117,114,101,95,102,105,108,116,101,114,95,97,110,105,115,111,116,114,111,112,105,99,0,71,76,95,69,88,84,95,116,101,120,116,117,114,101,95,109,105,114,114,111,114,95,99,108,97,109,112,0,91,69,88,84,69,78,83,73,79,78,93,32,86,65,79,32,101,120,116,101,110,115,105,111,110,32,100,101,116,101,99,116,101,100,44,32,86,65,79,32,102,117,110,99,116,105,111,110,115,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,91,69,88,84,69,78,83,73,79,78,93,32,86,65,79,32,101,120,116,101,110,115,105,111,110,32,110,111,116,32,102,111,117,110,100,44,32,86,65,79,32,117,115,97,103,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,91,69,88,84,69,78,83,73,79,78,93,32,78,80,79,84,32,116,101,120,116,117,114,101,115,32,101,120,116,101,110,115,105,111,110,32,100,101,116,101,99,116,101,100,44,32,102,117,108,108,32,78,80,79,84,32,116,101,120,116,117,114,101,115,32,115,117,112,112,111,114,116,101,100,0,91,69,88,84,69,78,83,73,79,78,93,32,78,80,79,84,32,116,101,120,116,117,114,101,115,32,101,120,116,101,110,115,105,111,110,32,110,111,116,32,102,111,117,110,100,44,32,108,105,109,105,116,101,100,32,78,80,79,84,32,115,117,112,112,111,114,116,32,40,110,111,45,109,105,112,109,97,112,115,44,32,110,111,45,114,101,112,101,97,116,41,0,91,69,88,84,69,78,83,73,79,78,93,32,68,88,84,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,115,32,115,117,112,112,111,114,116,101,100,0,91,69,88,84,69,78,83,73,79,78,93,32,69,84,67,49,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,115,32,115,117,112,112,111,114,116,101,100,0,91,69,88,84,69,78,83,73,79,78,93,32,69,84,67,50,47,69,65,67,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,115,32,115,117,112,112,111,114,116,101,100,0,91,69,88,84,69,78,83,73,79,78,93,32,80,86,82,84,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,115,32,115,117,112,112,111,114,116,101,100,0,91,69,88,84,69,78,83,73,79,78,93,32,65,83,84,67,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,115,32,115,117,112,112,111,114,116,101,100,0,91,69,88,84,69,78,83,73,79,78,93,32,65,110,105,115,111,116,114,111,112,105,99,32,116,101,120,116,117,114,101,115,32,102,105,108,116,101,114,105,110,103,32,115,117,112,112,111,114,116,101,100,32,40,109,97,120,58,32,37,46,48,102,88,41,0,91,69,88,84,69,78,83,73,79,78,93,32,67,108,97,109,112,32,109,105,114,114,111,114,32,119,114,97,112,32,116,101,120,116,117,114,101,32,109,111,100,101,32,115,117,112,112,111,114,116,101,100,0,91,84,69,88,32,73,68,32,37,105,93,32,66,97,115,101,32,119,104,105,116,101,32,116,101,120,116,117,114,101,32,108,111,97,100,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,66,97,115,101,32,119,104,105,116,101,32,116,101,120,116,117,114,101,32,99,111,117,108,100,32,110,111,116,32,98,101,32,108,111,97,100,101,100,0,79,112,101,110,71,76,32,100,101,102,97,117,108,116,32,115,116,97,116,101,115,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,91,67,80,85,93,32,68,101,102,97,117,108,116,32,98,117,102,102,101,114,115,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,108,105,110,101,115,44,32,116,114,105,97,110,103,108,101,115,44,32,113,117,97,100,115,41,0,91,86,65,79,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,98,117,102,102,101,114,115,32,86,65,79,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,108,105,110,101,115,41,0,91,86,66,79,32,73,68,32,37,105,93,91,86,66,79,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,98,117,102,102,101,114,115,32,86,66,79,115,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,108,105,110,101,115,41,0,91,86,65,79,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,98,117,102,102,101,114,115,32,86,65,79,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,116,114,105,97,110,103,108,101,115,41,0,91,86,66,79,32,73,68,32,37,105,93,91,86,66,79,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,98,117,102,102,101,114,115,32,86,66,79,115,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,116,114,105,97,110,103,108,101,115,41,0,91,86,65,79,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,98,117,102,102,101,114,115,32,86,65,79,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,113,117,97,100,115,41,0,91,86,66,79,32,73,68,32,37,105,93,91,86,66,79,32,73,68,32,37,105,93,91,86,66,79,32,73,68,32,37,105,93,91,86,66,79,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,98,117,102,102,101,114,115,32,86,66,79,115,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,113,117,97,100,115,41,0,35,118,101,114,115,105,111,110,32,49,48,48,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,97,116,116,114,105,98,117,116,101,32,118,101,99,51,32,118,101,114,116,101,120,80,111,115,105,116,105,111,110,59,32,32,32,32,32,10,97,116,116,114,105,98,117,116,101,32,118,101,99,50,32,118,101,114,116,101,120,84,101,120,67,111,111,114,100,59,32,32,32,32,32,10,97,116,116,114,105,98,117,116,101,32,118,101,99,52,32,118,101,114,116,101,120,67,111,108,111,114,59,32,32,32,32,32,32,32,32,10,118,97,114,121,105,110,103,32,118,101,99,50,32,102,114,97,103,84,101,120,67,111,111,114,100,59,32,32,32,32,32,32,32,32,32,10,118,97,114,121,105,110,103,32,118,101,99,52,32,102,114,97,103,67,111,108,111,114,59,32,32,32,32,32,32,32,32,32,32,32,32,10,117,110,105,102,111,114,109,32,109,97,116,52,32,109,118,112,77,97,116,114,105,120,59,32,32,32,32,32,32,32,32,32,32,32,32,10,118,111,105,100,32,109,97,105,110,40,41,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,123,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,32,32,32,32,102,114,97,103,84,101,120,67,111,111,114,100,32,61,32,118,101,114,116,101,120,84,101,120,67,111,111,114,100,59,32,10,32,32,32,32,102,114,97,103,67,111,108,111,114,32,61,32,118,101,114,116,101,120,67,111,108,111,114,59,32,32,32,32,32,32,32,10,32,32,32,32,103,108,95,80,111,115,105,116,105,111,110,32,61,32,109,118,112,77,97,116,114,105,120,42,118,101,99,52,40,118,101,114,116,101,120,80,111,115,105,116,105,111,110,44,32,49,46,48,41,59,32,10,125,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,0,35,118,101,114,115,105,111,110,32,49,48,48,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,112,114,101,99,105,115,105,111,110,32,109,101,100,105,117,109,112,32,102,108,111,97,116,59,32,32,32,32,32,32,32,32,32,32,32,10,118,97,114,121,105,110,103,32,118,101,99,50,32,102,114,97,103,84,101,120,67,111,111,114,100,59,32,32,32,32,32,32,32,32,32,10,118,97,114,121,105,110,103,32,118,101,99,52,32,102,114,97,103,67,111,108,111,114,59,32,32,32,32,32,32,32,32,32,32,32,32,10,117,110,105,102,111,114,109,32,115,97,109,112,108,101,114,50,68,32,116,101,120,116,117,114,101,48,59,32,32,32,32,32,32,32,32,10,117,110,105,102,111,114,109,32,118,101,99,52,32,99,111,108,68,105,102,102,117,115,101,59,32,32,32,32,32,32,32,32,32,32,32,10,118,111,105,100,32,109,97,105,110,40,41,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,123,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,32,32,32,32,118,101,99,52,32,116,101,120,101,108,67,111,108,111,114,32,61,32,116,101,120,116,117,114,101,50,68,40,116,101,120,116,117,114,101,48,44,32,102,114,97,103,84,101,120,67,111,111,114,100,41,59,32,10,32,32,32,32,103,108,95,70,114,97,103,67,111,108,111,114,32,61,32,116,101,120,101,108,67,111,108,111,114,42,99,111,108,68,105,102,102,117,115,101,42,102,114,97,103,67,111,108,111,114,59,32,32,32,32,32,32,10,125,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,0,91,83,72,68,82,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,115,104,97,100,101,114,32,108,111,97,100,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,91,83,72,68,82,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,115,104,97,100,101,114,32,99,111,117,108,100,32,110,111,116,32,98,101,32,108,111,97,100,101,100,0,118,101,114,116,101,120,80,111,115,105,116,105,111,110,0,118,101,114,116,101,120,84,101,120,67,111,111,114,100,0,118,101,114,116,101,120,84,101,120,67,111,111,114,100,50,0,118,101,114,116,101,120,78,111,114,109,97,108,0,118,101,114,116,101,120,84,97,110,103,101,110,116,0,118,101,114,116,101,120,67,111,108,111,114,0,109,118,112,77,97,116,114,105,120,0,99,111,108,68,105,102,102,117,115,101,0,99,111,108,65,109,98,105,101,110,116,0,99,111,108,83,112,101,99,117,108,97,114,0,116,101,120,116,117,114,101,48,0,116,101,120,116,117,114,101,49,0,116,101,120,116,117,114,101,50,0,91,86,83,72,68,82,32,73,68,32,37,105,93,32,70,97,105,108,101,100,32,116,111,32,99,111,109,112,105,108,101,32,118,101,114,116,101,120,32,115,104,97,100,101,114,46,46,46,0,37,115,0,91,86,83,72,68,82,32,73,68,32,37,105,93,32,86,101,114,116,101,120,32,115,104,97,100,101,114,32,99,111,109,112,105,108,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,91,70,83,72,68,82,32,73,68,32,37,105,93,32,70,97,105,108,101,100,32,116,111,32,99,111,109,112,105,108,101,32,102,114,97,103,109,101,110,116,32,115,104,97,100,101,114,46,46,46,0,91,70,83,72,68,82,32,73,68,32,37,105,93,32,70,114,97,103,109,101,110,116,32,115,104,97,100,101,114,32,99,111,109,112,105,108,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,91,83,72,68,82,32,73,68,32,37,105,93,32,70,97,105,108,101,100,32,116,111,32,108,105,110,107,32,115,104,97,100,101,114,32,112,114,111,103,114,97,109,46,46,46,0,91,83,72,68,82,32,73,68,32,37,105,93,32,83,104,97,100,101,114,32,112,114,111,103,114,97,109,32,108,111,97,100,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,68,79,87,78,83,67,65,76,73,78,71,58,32,82,101,113,117,105,114,101,100,32,115,99,114,101,101,110,32,115,105,122,101,32,40,37,105,120,37,105,41,32,105,115,32,98,105,103,103,101,114,32,116,104,97,110,32,100,105,115,112,108,97,121,32,115,105,122,101,32,40,37,105,120,37,105,41,0,68,111,119,110,115,99,97,108,101,32,109,97,116,114,105,120,32,103,101,110,101,114,97,116,101,100,44,32,99,111,110,116,101,110,116,32,119,105,108,108,32,98,101,32,114,101,110,100,101,114,101,100,32,97,116,58,32,37,105,32,120,32,37,105,0,85,80,83,67,65,76,73,78,71,58,32,82,101,113,117,105,114,101,100,32,115,99,114,101,101,110,32,115,105,122,101,58,32,37,105,32,120,32,37,105,32,45,62,32,68,105,115,112,108,97,121,32,115,105,122,101,58,32,37,105,32,120,32,37,105,0,91,71,76,70,87,51,32,69,114,114,111,114,93,32,67,111,100,101,58,32,37,105,32,68,101,99,114,105,112,116,105,111,110,58,32,37,115,0,73,78,70,79,58,32,0,87,65,82,78,73,78,71,58,32,0,87,105,110,100,111,119,32,99,108,111,115,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,91,84,69,88,32,73,68,32,37,105,93,32,85,110,108,111,97,100,101,100,32,116,101,120,116,117,114,101,32,100,97,116,97,32,40,98,97,115,101,32,119,104,105,116,101,32,116,101,120,116,117,114,101,41,32,102,114,111,109,32,86,82,65,77,0,91,84,69,88,32,73,68,32,37,105,93,32,85,110,108,111,97,100,101,100,32,116,101,120,116,117,114,101,32,100,97,116,97,32,102,114,111,109,32,86,82,65,77,32,40,71,80,85,41,0,83,116,97,99,107,32,66,117,102,102,101,114,32,79,118,101,114,102,108,111,119,32,40,77,65,88,32,37,105,32,77,97,116,114,105,120,41,0,77,65,88,95,76,73,78,69,83,95,66,65,84,67,72,32,111,118,101,114,102,108,111,119,0,77,65,88,95,84,82,73,65,78,71,76,69,83,95,66,65,84,67,72,32,111,118,101,114,102,108,111,119,0,77,65,88,95,81,85,65,68,83,95,66,65,84,67,72,32,111,118,101,114,102,108,111,119,0,91,70,66,79,32,73,68,32,37,105,93,32,85,110,108,111,97,100,101,100,32,114,101,110,100,101,114,32,116,101,120,116,117,114,101,32,100,97,116,97,32,102,114,111,109,32,86,82,65,77,32,40,71,80,85,41,0,70,114,97,109,101,98,117,102,102,101,114,32,111,98,106,101,99,116,32,99,111,117,108,100,32,110,111,116,32,98,101,32,99,114,101,97,116,101,100,46,46,46,0,70,114,97,109,101,98,117,102,102,101,114,32,105,115,32,117,110,115,117,112,112,111,114,116,101,100,0,70,114,97,109,101,98,117,102,102,101,114,32,105,110,99,111,109,112,108,101,116,101,32,97,116,116,97,99,104,109,101,110,116,0,70,114,97,109,101,98,117,102,102,101,114,32,105,110,99,111,109,112,108,101,116,101,32,100,105,109,101,110,115,105,111,110,115,0,70,114,97,109,101,98,117,102,102,101,114,32,105,110,99,111,109,112,108,101,116,101,32,109,105,115,115,105,110,103,32,97,116,116,97,99,104,109,101,110,116,0,91,70,66,79,32,73,68,32,37,105,93,32,70,114,97,109,101,98,117,102,102,101,114,32,111,98,106,101,99,116,32,99,114,101,97,116,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,91,83,72,68,82,32,73,68,32,37,105,93,32,85,110,108,111,97,100,101,100,32,115,104,97,100,101,114,32,112,114,111,103,114,97,109,32,100,97,116,97,0,91,83,72,68,82,32,73,68,32,37,105,93,32,83,104,97,100,101,114,32,108,111,99,97,116,105,111,110,32,102,111,114,32,37,115,32,99,111,117,108,100,32,110,111,116,32,98,101,32,102,111,117,110,100,0,83,104,97,100,101,114,32,118,97,108,117,101,32,102,108,111,97,116,32,97,114,114,97,121,32,115,105,122,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,73,110,105,116,105,97,108,105,122,105,110,103,32,86,82,32,83,105,109,117,108,97,116,111,114,32,40,79,99,117,108,117,115,32,82,105,102,116,32,68,75,50,41,0,73,110,105,116,105,97,108,105,122,105,110,103,32,86,82,32,83,105,109,117,108,97,116,111,114,32,40,79,99,117,108,117,115,32,82,105,102,116,32,67,86,49,41,0,86,82,32,83,105,109,117,108,97,116,111,114,32,100,111,101,115,110,39,116,32,115,117,112,112,111,114,116,32,115,101,108,101,99,116,101,100,32,100,101,118,105,99,101,32,112,97,114,97,109,101,116,101,114,115,44,0,117,115,105,110,103,32,100,101,102,97,117,108,116,32,86,82,32,83,105,109,117,108,97,116,111,114,32,112,97,114,97,109,101,116,101,114,115,0,35,118,101,114,115,105,111,110,32,49,48,48,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,112,114,101,99,105,115,105,111,110,32,109,101,100,105,117,109,112,32,102,108,111,97,116,59,32,32,32,32,32,32,32,32,32,32,32,10,118,97,114,121,105,110,103,32,118,101,99,50,32,102,114,97,103,84,101,120,67,111,111,114,100,59,32,32,32,32,32,32,32,32,32,10,118,97,114,121,105,110,103,32,118,101,99,52,32,102,114,97,103,67,111,108,111,114,59,32,32,32,32,32,32,32,32,32,32,32,32,10,117,110,105,102,111,114,109,32,115,97,109,112,108,101,114,50,68,32,116,101,120,116,117,114,101,48,59,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,117,110,105,102,111,114,109,32,118,101,99,50,32,108,101,102,116,76,101,110,115,67,101,110,116,101,114,59,32,32,32,32,32,32,32,10,117,110,105,102,111,114,109,32,118,101,99,50,32,114,105,103,104,116,76,101,110,115,67,101,110,116,101,114,59,32,32,32,32,32,32,10,117,110,105,102,111,114,109,32,118,101,99,50,32,108,101,102,116,83,99,114,101,101,110,67,101,110,116,101,114,59,32,32,32,32,32,10,117,110,105,102,111,114,109,32,118,101,99,50,32,114,105,103,104,116,83,99,114,101,101,110,67,101,110,116,101,114,59,32,32,32,32,10,117,110,105,102,111,114,109,32,118,101,99,50,32,115,99,97,108,101,59,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,117,110,105,102,111,114,109,32,118,101,99,50,32,115,99,97,108,101,73,110,59,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,117,110,105,102,111,114,109,32,118,101,99,52,32,104,109,100,87,97,114,112,80,97,114,97,109,59,32,32,32,32,32,32,32,32,32,10,117,110,105,102,111,114,109,32,118,101,99,52,32,99,104,114,111,109,97,65,98,80,97,114,97,109,59,32,32,32,32,32,32,32,32,10,118,111,105,100,32,109,97,105,110,40,41,32,10,123,32,10,32,32,32,118,101,99,50,32,108,101,110,115,67,101,110,116,101,114,32,61,32,102,114,97,103,84,101,120,67,111,111,114,100,46,120,32,60,32,48,46,53,32,63,32,108,101,102,116,76,101,110,115,67,101,110,116,101,114,32,58,32,114,105,103,104,116,76,101,110,115,67,101,110,116,101,114,59,32,10,32,32,32,118,101,99,50,32,115,99,114,101,101,110,67,101,110,116,101,114,32,61,32,102,114,97,103,84,101,120,67,111,111,114,100,46,120,32,60,32,48,46,53,32,63,32,108,101,102,116,83,99,114,101,101,110,67,101,110,116,101,114,32,58,32,114,105,103,104,116,83,99,114,101,101,110,67,101,110,116,101,114,59,32,10,32,32,32,118,101,99,50,32,116,104,101,116,97,32,61,32,40,102,114,97,103,84,101,120,67,111,111,114,100,32,45,32,108,101,110,115,67,101,110,116,101,114,41,42,115,99,97,108,101,73,110,59,32,10,32,32,32,102,108,111,97,116,32,114,83,113,32,61,32,116,104,101,116,97,46,120,42,116,104,101,116,97,46,120,32,43,32,116,104,101,116,97,46,121,42,116,104,101,116,97,46,121,59,32,10,32,32,32,118,101,99,50,32,116,104,101,116,97,49,32,61,32,116,104,101,116,97,42,40,104,109,100,87,97,114,112,80,97,114,97,109,46,120,32,43,32,104,109,100,87,97,114,112,80,97,114,97,109,46,121,42,114,83,113,32,43,32,104,109,100,87,97,114,112,80,97,114,97,109,46,122,42,114,83,113,42,114,83,113,32,43,32,104,109,100,87,97,114,112,80,97,114,97,109,46,119,42,114,83,113,42,114,83,113,42,114,83,113,41,59,32,10,32,32,32,118,101,99,50,32,116,104,101,116,97,66,108,117,101,32,61,32,116,104,101,116,97,49,42,40,99,104,114,111,109,97,65,98,80,97,114,97,109,46,122,32,43,32,99,104,114,111,109,97,65,98,80,97,114,97,109,46,119,42,114,83,113,41,59,32,10,32,32,32,118,101,99,50,32,116,99,66,108,117,101,32,61,32,108,101,110,115,67,101,110,116,101,114,32,43,32,115,99,97,108,101,42,116,104,101,116,97,66,108,117,101,59,32,10,32,32,32,105,102,32,40,97,110,121,40,98,118,101,99,50,40,99,108,97,109,112,40,116,99,66,108,117,101,44,32,115,99,114,101,101,110,67,101,110,116,101,114,32,45,32,118,101,99,50,40,48,46,50,53,44,32,48,46,53,41,44,32,115,99,114,101,101,110,67,101,110,116,101,114,32,43,32,118,101,99,50,40,48,46,50,53,44,32,48,46,53,41,41,32,45,32,116,99,66,108,117,101,41,41,41,32,10,32,32,32,123,32,10,32,32,32,32,32,32,32,103,108,95,70,114,97,103,67,111,108,111,114,32,61,32,118,101,99,52,40,48,46,48,44,32,48,46,48,44,32,48,46,48,44,32,49,46,48,41,59,32,10,32,32,32,125,32,10,32,32,32,101,108,115,101,32,10,32,32,32,123,32,10,32,32,32,32,32,32,32,102,108,111,97,116,32,98,108,117,101,32,61,32,116,101,120,116,117,114,101,50,68,40,116,101,120,116,117,114,101,48,44,32,116], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE); -/* memory initializer */ allocate([99,66,108,117,101,41,46,98,59,32,10,32,32,32,32,32,32,32,118,101,99,50,32,116,99,71,114,101,101,110,32,61,32,108,101,110,115,67,101,110,116,101,114,32,43,32,115,99,97,108,101,42,116,104,101,116,97,49,59,32,10,32,32,32,32,32,32,32,102,108,111,97,116,32,103,114,101,101,110,32,61,32,116,101,120,116,117,114,101,50,68,40,116,101,120,116,117,114,101,48,44,32,116,99,71,114,101,101,110,41,46,103,59,32,10,32,32,32,32,32,32,32,118,101,99,50,32,116,104,101,116,97,82,101,100,32,61,32,116,104,101,116,97,49,42,40,99,104,114,111,109,97,65,98,80,97,114,97,109,46,120,32,43,32,99,104,114,111,109,97,65,98,80,97,114,97,109,46,121,42,114,83,113,41,59,32,10,32,32,32,32,32,32,32,118,101,99,50,32,116,99,82,101,100,32,61,32,108,101,110,115,67,101,110,116,101,114,32,43,32,115,99,97,108,101,42,116,104,101,116,97,82,101,100,59,32,10,32,32,32,32,32,32,32,102,108,111,97,116,32,114,101,100,32,61,32,116,101,120,116,117,114,101,50,68,40,116,101,120,116,117,114,101,48,44,32,116,99,82,101,100,41,46,114,59,32,10,32,32,32,32,32,32,32,103,108,95,70,114,97,103,67,111,108,111,114,32,61,32,118,101,99,52,40,114,101,100,44,32,103,114,101,101,110,44,32,98,108,117,101,44,32,49,46,48,41,59,32,10,32,32,32,32,125,32,10,125,32,10,0,86,82,58,32,68,105,115,116,111,114,116,105,111,110,32,83,99,97,108,101,58,32,37,102,0,86,82,58,32,68,105,115,116,111,114,116,105,111,110,32,83,104,97,100,101,114,58,32,76,101,102,116,76,101,110,115,67,101,110,116,101,114,32,61,32,123,32,37,102,44,32,37,102,32,125,0,86,82,58,32,68,105,115,116,111,114,116,105,111,110,32,83,104,97,100,101,114,58,32,82,105,103,104,116,76,101,110,115,67,101,110,116,101,114,32,61,32,123,32,37,102,44,32,37,102,32,125,0,86,82,58,32,68,105,115,116,111,114,116,105,111,110,32,83,104,97,100,101,114,58,32,83,99,97,108,101,32,61,32,123,32,37,102,44,32,37,102,32,125,0,86,82,58,32,68,105,115,116,111,114,116,105,111,110,32,83,104,97,100,101,114,58,32,83,99,97,108,101,73,110,32,61,32,123,32,37,102,44,32,37,102,32,125,0,108,101,102,116,76,101,110,115,67,101,110,116,101,114,0,114,105,103,104,116,76,101,110,115,67,101,110,116,101,114,0,108,101,102,116,83,99,114,101,101,110,67,101,110,116,101,114,0,114,105,103,104,116,83,99,114,101,101,110,67,101,110,116,101,114,0,115,99,97,108,101,0,115,99,97,108,101,73,110,0,104,109,100,87,97,114,112,80,97,114,97,109,0,99,104,114,111,109,97,65,98,80,97,114,97,109,0,37,50,105,32,70,80,83,0,69,88,84,0,65,82,66,0,79,69,83,0,65,78,71,76,69,0,103,108,67,114,101,97,116,101,80,114,111,103,114,97,109,79,98,106,101,99,116,0,103,108,67,114,101,97,116,101,80,114,111,103,114,97,109,0,103,108,85,115,101,80,114,111,103,114,97,109,79,98,106,101,99,116,0,103,108,85,115,101,80,114,111,103,114,97,109,0,103,108,67,114,101,97,116,101,83,104,97,100,101,114,79,98,106,101,99,116,0,103,108,67,114,101,97,116,101,83,104,97,100,101,114,0,103,108,65,116,116,97,99,104,79,98,106,101,99,116,0,103,108,65,116,116,97,99,104,83,104,97,100,101,114,0,103,108,68,101,116,97,99,104,79,98,106,101,99,116,0,103,108,68,101,116,97,99,104,83,104,97,100,101,114,0,103,108,80,105,120,101,108,83,116,111,114,101,105,0,103,108,71,101,116,83,116,114,105,110,103,0,103,108,71,101,116,73,110,116,101,103,101,114,118,0,103,108,71,101,116,70,108,111,97,116,118,0,103,108,71,101,116,66,111,111,108,101,97,110,118,0,103,108,71,101,110,84,101,120,116,117,114,101,115,0,103,108,68,101,108,101,116,101,84,101,120,116,117,114,101,115,0,103,108,67,111,109,112,114,101,115,115,101,100,84,101,120,73,109,97,103,101,50,68,0,103,108,67,111,109,112,114,101,115,115,101,100,84,101,120,83,117,98,73,109,97,103,101,50,68,0,103,108,84,101,120,73,109,97,103,101,50,68,0,103,108,84,101,120,83,117,98,73,109,97,103,101,50,68,0,103,108,82,101,97,100,80,105,120,101,108,115,0,103,108,66,105,110,100,84,101,120,116,117,114,101,0,103,108,71,101,116,84,101,120,80,97,114,97,109,101,116,101,114,102,118,0,103,108,71,101,116,84,101,120,80,97,114,97,109,101,116,101,114,105,118,0,103,108,84,101,120,80,97,114,97,109,101,116,101,114,102,118,0,103,108,84,101,120,80,97,114,97,109,101,116,101,114,105,118,0,103,108,73,115,84,101,120,116,117,114,101,0,103,108,71,101,110,66,117,102,102,101,114,115,0,103,108,68,101,108,101,116,101,66,117,102,102,101,114,115,0,103,108,71,101,116,66,117,102,102,101,114,80,97,114,97,109,101,116,101,114,105,118,0,103,108,66,117,102,102,101,114,68,97,116,97,0,103,108,66,117,102,102,101,114,83,117,98,68,97,116,97,0,103,108,73,115,66,117,102,102,101,114,0,103,108,71,101,110,82,101,110,100,101,114,98,117,102,102,101,114,115,0,103,108,68,101,108,101,116,101,82,101,110,100,101,114,98,117,102,102,101,114,115,0,103,108,66,105,110,100,82,101,110,100,101,114,98,117,102,102,101,114,0,103,108,71,101,116,82,101,110,100,101,114,98,117,102,102,101,114,80,97,114,97,109,101,116,101,114,105,118,0,103,108,73,115,82,101,110,100,101,114,98,117,102,102,101,114,0,103,108,71,101,116,85,110,105,102,111,114,109,102,118,0,103,108,71,101,116,85,110,105,102,111,114,109,105,118,0,103,108,71,101,116,85,110,105,102,111,114,109,76,111,99,97,116,105,111,110,0,103,108,71,101,116,86,101,114,116,101,120,65,116,116,114,105,98,102,118,0,103,108,71,101,116,86,101,114,116,101,120,65,116,116,114,105,98,105,118,0,103,108,71,101,116,86,101,114,116,101,120,65,116,116,114,105,98,80,111,105,110,116,101,114,118,0,103,108,71,101,116,65,99,116,105,118,101,85,110,105,102,111,114,109,0,103,108,85,110,105,102,111,114,109,49,102,0,103,108,85,110,105,102,111,114,109,50,102,0,103,108,85,110,105,102,111,114,109,51,102,0,103,108,85,110,105,102,111,114,109,52,102,0,103,108,85,110,105,102,111,114,109,49,105,0,103,108,85,110,105,102,111,114,109,50,105,0,103,108,85,110,105,102,111,114,109,51,105,0,103,108,85,110,105,102,111,114,109,52,105,0,103,108,85,110,105,102,111,114,109,49,105,118,0,103,108,85,110,105,102,111,114,109,50,105,118,0,103,108,85,110,105,102,111,114,109,51,105,118,0,103,108,85,110,105,102,111,114,109,52,105,118,0,103,108,85,110,105,102,111,114,109,49,102,118,0,103,108,85,110,105,102,111,114,109,50,102,118,0,103,108,85,110,105,102,111,114,109,51,102,118,0,103,108,85,110,105,102,111,114,109,52,102,118,0,103,108,85,110,105,102,111,114,109,77,97,116,114,105,120,50,102,118,0,103,108,85,110,105,102,111,114,109,77,97,116,114,105,120,51,102,118,0,103,108,85,110,105,102,111,114,109,77,97,116,114,105,120,52,102,118,0,103,108,66,105,110,100,66,117,102,102,101,114,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,49,102,118,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,50,102,118,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,51,102,118,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,52,102,118,0,103,108,71,101,116,65,116,116,114,105,98,76,111,99,97,116,105,111,110,0,103,108,71,101,116,65,99,116,105,118,101,65,116,116,114,105,98,0,103,108,68,101,108,101,116,101,83,104,97,100,101,114,0,103,108,71,101,116,65,116,116,97,99,104,101,100,83,104,97,100,101,114,115,0,103,108,83,104,97,100,101,114,83,111,117,114,99,101,0,103,108,71,101,116,83,104,97,100,101,114,83,111,117,114,99,101,0,103,108,67,111,109,112,105,108,101,83,104,97,100,101,114,0,103,108,71,101,116,83,104,97,100,101,114,73,110,102,111,76,111,103,0,103,108,71,101,116,83,104,97,100,101,114,105,118,0,103,108,71,101,116,80,114,111,103,114,97,109,105,118,0,103,108,73,115,83,104,97,100,101,114,0,103,108,68,101,108,101,116,101,80,114,111,103,114,97,109,0,103,108,71,101,116,83,104,97,100,101,114,80,114,101,99,105,115,105,111,110,70,111,114,109,97,116,0,103,108,76,105,110,107,80,114,111,103,114,97,109,0,103,108,71,101,116,80,114,111,103,114,97,109,73,110,102,111,76,111,103,0,103,108,86,97,108,105,100,97,116,101,80,114,111,103,114,97,109,0,103,108,73,115,80,114,111,103,114,97,109,0,103,108,66,105,110,100,65,116,116,114,105,98,76,111,99,97,116,105,111,110,0,103,108,66,105,110,100,70,114,97,109,101,98,117,102,102,101,114,0,103,108,71,101,110,70,114,97,109,101,98,117,102,102,101,114,115,0,103,108,68,101,108,101,116,101,70,114,97,109,101,98,117,102,102,101,114,115,0,103,108,70,114,97,109,101,98,117,102,102,101,114,82,101,110,100,101,114,98,117,102,102,101,114,0,103,108,70,114,97,109,101,98,117,102,102,101,114,84,101,120,116,117,114,101,50,68,0,103,108,71,101,116,70,114,97,109,101,98,117,102,102,101,114,65,116,116,97,99,104,109,101,110,116,80,97,114,97,109,101,116,101,114,105,118,0,103,108,73,115,70,114,97,109,101,98,117,102,102,101,114,0,103,108,68,101,108,101,116,101,79,98,106,101,99,116,0,103,108,71,101,116,79,98,106,101,99,116,80,97,114,97,109,101,116,101,114,105,118,0,103,108,71,101,116,73,110,102,111,76,111,103,0,103,108,66,105,110,100,80,114,111,103,114,97,109,0,103,108,71,101,116,80,111,105,110,116,101,114,118,0,103,108,68,114,97,119,82,97,110,103,101,69,108,101,109,101,110,116,115,0,103,108,69,110,97,98,108,101,67,108,105,101,110,116,83,116,97,116,101,0,103,108,86,101,114,116,101,120,80,111,105,110,116,101,114,0,103,108,84,101,120,67,111,111,114,100,80,111,105,110,116,101,114,0,103,108,78,111,114,109,97,108,80,111,105,110,116,101,114,0,103,108,67,111,108,111,114,80,111,105,110,116,101,114,0,103,108,67,108,105,101,110,116,65,99,116,105,118,101,84,101,120,116,117,114,101,0,103,108,71,101,110,86,101,114,116,101,120,65,114,114,97,121,115,0,103,108,68,101,108,101,116,101,86,101,114,116,101,120,65,114,114,97,121,115,0,103,108,66,105,110,100,86,101,114,116,101,120,65,114,114,97,121,0,103,108,77,97,116,114,105,120,77,111,100,101,0,103,108,76,111,97,100,73,100,101,110,116,105,116,121,0,103,108,76,111,97,100,77,97,116,114,105,120,102,0,103,108,70,114,117,115,116,117,109,0,103,108,82,111,116,97,116,101,102,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,80,111,105,110,116,101,114,0,103,108,69,110,97,98,108,101,86,101,114,116,101,120,65,116,116,114,105,98,65,114,114,97,121,0,103,108,68,105,115,97,98,108,101,86,101,114,116,101,120,65,116,116,114,105,98,65,114,114,97,121,0,103,108,68,114,97,119,65,114,114,97,121,115,0,103,108,68,114,97,119,69,108,101,109,101,110,116,115,0,103,108,83,104,97,100,101,114,66,105,110,97,114,121,0,103,108,82,101,108,101,97,115,101,83,104,97,100,101,114,67,111,109,112,105,108,101,114,0,103,108,71,101,116,69,114,114,111,114,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,68,105,118,105,115,111,114,0,103,108,68,114,97,119,65,114,114,97,121,115,73,110,115,116,97,110,99,101,100,0,103,108,68,114,97,119,69,108,101,109,101,110,116,115,73,110,115,116,97,110,99,101,100,0,103,108,70,105,110,105,115,104,0,103,108,70,108,117,115,104,0,103,108,67,108,101,97,114,68,101,112,116,104,0,103,108,67,108,101,97,114,68,101,112,116,104,102,0,103,108,68,101,112,116,104,70,117,110,99,0,103,108,69,110,97,98,108,101,0,103,108,68,105,115,97,98,108,101,0,103,108,70,114,111,110,116,70,97,99,101,0,103,108,67,117,108,108,70,97,99,101,0,103,108,67,108,101,97,114,0,103,108,76,105,110,101,87,105,100,116,104,0,103,108,67,108,101,97,114,83,116,101,110,99,105,108,0,103,108,68,101,112,116,104,77,97,115,107,0,103,108,83,116,101,110,99,105,108,77,97,115,107,0,103,108,67,104,101,99,107,70,114,97,109,101,98,117,102,102,101,114,83,116,97,116,117,115,0,103,108,71,101,110,101,114,97,116,101,77,105,112,109,97,112,0,103,108,65,99,116,105,118,101,84,101,120,116,117,114,101,0,103,108,66,108,101,110,100,69,113,117,97,116,105,111,110,0,103,108,73,115,69,110,97,98,108,101,100,0,103,108,66,108,101,110,100,70,117,110,99,0,103,108,66,108,101,110,100,69,113,117,97,116,105,111,110,83,101,112,97,114,97,116,101,0,103,108,68,101,112,116,104,82,97,110,103,101,0,103,108,68,101,112,116,104,82,97,110,103,101,102,0,103,108,83,116,101,110,99,105,108,77,97,115,107,83,101,112,97,114,97,116,101,0,103,108,72,105,110,116,0,103,108,80,111,108,121,103,111,110,79,102,102,115,101,116,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,49,102,0,103,108,83,97,109,112,108,101,67,111,118,101,114,97,103,101,0,103,108,84,101,120,80,97,114,97,109,101,116,101,114,105,0,103,108,84,101,120,80,97,114,97,109,101,116,101,114,102,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,50,102,0,103,108,83,116,101,110,99,105,108,70,117,110,99,0,103,108,83,116,101,110,99,105,108,79,112,0,103,108,86,105,101,119,112,111,114,116,0,103,108,67,108,101,97,114,67,111,108,111,114,0,103,108,83,99,105,115,115,111,114,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,51,102,0,103,108,67,111,108,111,114,77,97,115,107,0,103,108,82,101,110,100,101,114,98,117,102,102,101,114,83,116,111,114,97,103,101,0,103,108,66,108,101,110,100,70,117,110,99,83,101,112,97,114,97,116,101,0,103,108,66,108,101,110,100,67,111,108,111,114,0,103,108,83,116,101,110,99,105,108,70,117,110,99,83,101,112,97,114,97,116,101,0,103,108,83,116,101,110,99,105,108,79,112,83,101,112,97,114,97,116,101,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,52,102,0,103,108,67,111,112,121,84,101,120,73,109,97,103,101,50,68,0,103,108,67,111,112,121,84,101,120,83,117,98,73,109,97,103,101,50,68,0,103,108,68,114,97,119,66,117,102,102,101,114,115,0,123,32,77,111,100,117,108,101,46,112,114,105,110,116,69,114,114,40,39,98,97,100,32,110,97,109,101,32,105,110,32,103,101,116,80,114,111,99,65,100,100,114,101,115,115,58,32,39,32,43,32,91,80,111,105,110,116,101,114,95,115,116,114,105,110,103,105,102,121,40,36,48,41,44,32,80,111,105,110,116,101,114,95,115,116,114,105,110,103,105,102,121,40,36,49,41,93,41,59,32,125,0,17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,110,97,110,0,78,65,78,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,46,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116,32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+10240); +/* memory initializer */ allocate([32,3,0,0,194,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,0,32,0,0,176,1,0,0,0,0,0,0,0,0,0,32,37,249,142,0,10,2,0,0,128,190,125,95,244,125,31,160,242,43,74,30,9,82,8,0,64,34,65,80,20,4,16,32,32,41,46,18,8,34,8,0,32,34,65,80,20,4,16,32,32,249,16,76,8,250,62,60,16,34,125,222,247,125,16,32,32,161,232,50,8,34,8,0,8,34,5,16,4,69,16,0,240,163,164,50,8,82,8,0,4,34,5,16,4,69,16,32,32,249,226,94,8,2,0,129,2,62,125,31,244,125,16,0,0,32,0,0,176,1,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,190,15,0,192,15,224,247,251,125,126,191,95,232,190,80,0,162,8,8,68,232,47,20,10,133,2,129,80,72,160,80,0,162,40,228,73,40,40,20,10,132,2,129,64,72,160,72,0,190,15,2,16,175,235,247,9,132,62,159,216,79,160,71,0,34,136,228,9,161,42,20,10,132,2,129,80,72,160,72,0,34,40,8,4,160,47,20,10,133,2,129,80,72,162,80,0,190,143,0,0,33,32,244,251,125,126,129,95,232,156,208,7,0,128,0,0,224,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,1,12,0,130,66,191,223,239,247,251,11,5,5,133,66,191,4,72,0,198,66,161,80,40,20,64,8,5,37,133,66,160,8,168,0,170,70,161,80,40,20,64,8,5,37,133,66,144,16,8,0,146,74,161,95,232,247,67,8,5,37,121,126,136,32,8,0,130,82,161,64,40,1,66,8,137,36,133,64,132,64,8,0,130,98,161,64,42,2,66,8,81,36,133,64,130,128,8,0,130,66,191,192,47,244,67,248,33,252,133,126,191,0,9,62,0,0,0,0,4,0,0,0,0,0,0,0,128,1,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,0,4,0,32,72,65,0,0,0,0,0,8,0,0,4,4,0,4,60,32,0,65,0,0,0,0,0,8,0,0,240,125,223,247,133,239,75,81,190,239,251,190,239,59,81,4,0,69,65,20,133,40,74,73,170,40,138,162,32,8,81,4,240,69,65,244,157,40,74,71,170,40,138,162,224,11,81,4,16,69,65,20,132,40,74,73,170,40,138,162,0,10,145,2,240,125,223,247,133,47,74,209,170,232,251,190,224,123,31,1,0,0,0,0,4,8,64,0,0,0,8,32,0,0,0,0,0,0,0,0,132,15,96,0,0,0,8,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,1,15,0,0,0,0,0,0,0,0,0,0,0,0,0,36,1,9,0,0,0,0,0,0,0,0,0,6,0,0,0,36,1,9,0,0,0,0,0,0,0,128,16,9,162,40,250,36,1,9,0,0,0,0,0,0,0,0,62,1,42,37,66,34,82,9,0,0,0,0,0,0,0,128,138,3,42,34,34,36,41,9,0,0,0,0,0,0,0,128,10,1,42,37,18,36,1,9,0,0,0,0,0,0,0,128,10,1,190,232,251,36,1,9,0,0,0,0,0,0,0,128,190,14,0,0,2,172,1,15,0,0,0,0,0,0,0,128,4,0,0,224,3,0,0,0,0,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,0,0,0,14,184,67,132,3,58,32,0,128,160,190,2,32,0,0,240,138,32,82,196,2,43,32,4,34,145,2,248,59,0,240,7,142,56,75,228,2,58,32,2,28,138,30,8,42,233,17,4,224,11,66,244,2,130,36,1,20,4,20,232,186,4,209,5,128,184,195,231,10,58,137,0,28,14,60,40,2,9,80,4,128,0,64,196,2,128,68,0,34,132,32,232,2,0,80,4,0,0,64,128,2,0,32,5,0,142,62,8,2,0,16,4,224,3,64,128,66,0,0,7,0,132,0,248,3,0,240,7,0,0,64,128,34,0,0,4,0,0,0,0,0,0,0,0,0,0,64,128,2,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,7,128,0,194,160,72,24,0,0,1,132,33,9,146,2,66,38,4,1,33,81,0,0,127,63,2,66,2,16,41,0,34,20,192,239,247,251,253,126,9,161,223,239,247,187,187,3,18,15,68,40,20,10,133,66,9,129,64,32,16,16,17,1,8,4,68,40,20,10,133,66,127,129,64,32,16,16,17,1,4,130,199,239,247,251,253,126,9,129,207,231,243,17,17,1,50,169,80,40,20,10,133,66,9,161,64,32,16,16,17,1,64,184,80,40,20,10,133,66,121,191,223,239,247,187,187,3,32,160,31,0,0,0,0,0,0,16,0,0,0,0,0,0,112,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,2,8,131,34,1,0,2,8,67,2,1,0,1,1,124,20,4,132,68,1,0,32,4,132,4,128,8,63,130,0,132,66,191,223,239,247,3,126,161,80,40,20,10,33,0,0,132,70,161,80,40,20,138,82,161,80,40,20,122,161,239,3,158,74,161,80,40,20,82,82,161,80,40,20,74,31,8,2,132,82,161,80,40,20,34,74,161,80,40,244,75,161,239,3,132,98,161,80,40,20,82,74,161,80,40,4,122,161,40,2,124,66,191,223,239,247,139,126,191,223,239,247,11,189,239,3,0,0,0,0,0,0,0,4,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,5,32,0,0,4,132,0,34,129,69,17,16,66,1,0,148,66,81,0,0,8,66,81,148,42,162,32,8,165,80,0,0,0,32,0,0,0,0,0,0,0,5,0,0,0,0,8,190,239,251,254,251,190,239,251,20,145,235,251,190,239,251,0,32,8,130,32,10,162,40,138,20,145,40,138,162,40,138,62,190,239,251,254,11,190,239,251,20,145,40,138,162,40,138,0,162,40,138,34,8,130,32,8,20,145,40,138,162,40,138,8,190,239,251,254,251,190,239,251,20,145,47,250,190,239,251,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,33,0,4,0,0,0,0,0,0,0,0,0,0,0,0,130,80,20,2,20,0,0,0,0,0,0,0,0,0,0,16,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0,190,40,138,162,40,34,0,0,0,0,0,0,0,0,0,0,170,40,138,162,232,34,0,0,0,0,0,0,0,0,0,0,170,40,138,162,168,34,0,0,0,0,0,0,0,0,0,0,170,40,138,162,232,34,0,0,0,0,0,0,0,0,0,0,190,239,251,190,47,62,0,0,0,0,0,0,0,0,0,0,4,0,0,0,40,32,0,0,0,0,0,0,0,0,0,0,0,0,0,128,15,62,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,1,0,0,0,4,0,0,0,6,0,0,0,5,0,0,0,7,0,0,0,6,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,5,0,0,0,5,0,0,0,2,0,0,0,4,0,0,0,1,0,0,0,7,0,0,0,5,0,0,0,2,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,1,0,0,0,1,0,0,0,3,0,0,0,4,0,0,0,3,0,0,0,6,0,0,0,7,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,3,0,0,0,5,0,0,0,6,0,0,0,5,0,0,0,7,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,7,0,0,0,6,0,0,0,7,0,0,0,7,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,2,0,0,0,7,0,0,0,2,0,0,0,3,0,0,0,5,0,0,0,2,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,4,0,0,0,5,0,0,0,5,0,0,0,1,0,0,0,2,0,0,0,5,0,0,0,2,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,4,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,3,0,0,0,1,0,0,0,3,0,0,0,4,0,0,0,4,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,7,0,0,0,1,0,0,0,5,0,0,0,3,0,0,0,7,0,0,0,3,0,0,0,5,0,0,0,4,0,0,0,1,0,0,0,7,0,0,0,4,0,0,0,3,0,0,0,5,0,0,0,3,0,0,0,3,0,0,0,2,0,0,0,5,0,0,0,6,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,5,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,7,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,7,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,5,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,4,0,0,0,6,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,9,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,3,0,0,0,5,0,0,0,0,0,128,191,20,0,0,0,255,255,255,255,205,204,236,63,2,0,0,0,86,1,0,0,85,1,0,0,87,0,0,0,83,0,0,0,68,0,0,0,65,0,0,0,69,0,0,0,81,0,0,0,255,255,255,255,0,1,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,188,74,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,12,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,35,82,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,114,97,121,108,105,98,32,91,99,111,114,101,93,32,101,120,97,109,112,108,101,32,45,32,111,99,117,108,117,115,32,114,105,102,116,0,73,78,70,79,58,32,0,87,65,82,78,73,78,71,58,32,0,91,84,69,88,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,102,111,110,116,32,108,111,97,100,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,91,84,69,88,32,73,68,32,37,105,93,32,80,97,114,97,109,101,116,101,114,115,58,32,37,105,120,37,105,44,32,37,105,32,109,105,112,115,44,32,102,111,114,109,97,116,32,37,105,0,68,88,84,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,32,102,111,114,109,97,116,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,69,84,67,49,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,32,102,111,114,109,97,116,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,69,84,67,50,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,32,102,111,114,109,97,116,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,80,86,82,84,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,32,102,111,114,109,97,116,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,83,84,67,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,32,102,111,114,109,97,116,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,84,101,120,116,117,114,101,32,102,111,114,109,97,116,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,91,84,69,88,32,73,68,32,37,105,93,32,84,101,120,116,117,114,101,32,99,114,101,97,116,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,37,105,120,37,105,41,0,84,101,120,116,117,114,101,32,99,111,117,108,100,32,110,111,116,32,98,101,32,99,114,101,97,116,101,100,0,73,109,97,103,101,32,100,97,116,97,32,102,111,114,109,97,116,32,105,115,32,99,111,109,112,114,101,115,115,101,100,44,32,99,97,110,32,110,111,116,32,98,101,32,99,111,110,118,101,114,116,101,100,0,70,111,114,109,97,116,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,102,111,114,32,112,105,120,101,108,32,100,97,116,97,32,114,101,116,114,105,101,118,97,108,0,91,84,69,88,32,73,68,32,37,105,93,32,85,110,108,111,97,100,101,100,32,116,101,120,116,117,114,101,32,100,97,116,97,32,102,114,111,109,32,86,82,65,77,32,40,71,80,85,41,0,77,65,88,95,76,73,78,69,83,95,66,65,84,67,72,32,111,118,101,114,102,108,111,119,0,77,65,88,95,84,82,73,65,78,71,76,69,83,95,66,65,84,67,72,32,111,118,101,114,102,108,111,119,0,77,65,88,95,81,85,65,68,83,95,66,65,84,67,72,32,111,118,101,114,102,108,111,119,0,83,116,97,99,107,32,66,117,102,102,101,114,32,79,118,101,114,102,108,111,119,32,40,77,65,88,32,37,105,32,77,97,116,114,105,120,41,0,37,50,105,32,70,80,83,0,70,114,97,109,101,98,117,102,102,101,114,32,111,98,106,101,99,116,32,99,111,117,108,100,32,110,111,116,32,98,101,32,99,114,101,97,116,101,100,46,46,46,0,70,114,97,109,101,98,117,102,102,101,114,32,105,115,32,117,110,115,117,112,112,111,114,116,101,100,0,70,114,97,109,101,98,117,102,102,101,114,32,105,110,99,111,109,112,108,101,116,101,32,97,116,116,97,99,104,109,101,110,116,0,70,114,97,109,101,98,117,102,102,101,114,32,105,110,99,111,109,112,108,101,116,101,32,100,105,109,101,110,115,105,111,110,115,0,70,114,97,109,101,98,117,102,102,101,114,32,105,110,99,111,109,112,108,101,116,101,32,109,105,115,115,105,110,103,32,97,116,116,97,99,104,109,101,110,116,0,91,70,66,79,32,73,68,32,37,105,93,32,70,114,97,109,101,98,117,102,102,101,114,32,111,98,106,101,99,116,32,99,114,101,97,116,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,91,70,66,79,32,73,68,32,37,105,93,32,85,110,108,111,97,100,101,100,32,114,101,110,100,101,114,32,116,101,120,116,117,114,101,32,100,97,116,97,32,102,114,111,109,32,86,82,65,77,32,40,71,80,85,41,0,73,110,105,116,105,97,108,105,122,105,110,103,32,114,97,121,108,105,98,32,40,118,49,46,55,46,48,41,0,35,99,97,110,118,97,115,0,84,97,114,103,101,116,32,116,105,109,101,32,112,101,114,32,102,114,97,109,101,58,32,37,48,50,46,48,51,102,32,109,105,108,108,105,115,101,99,111,110,100,115,0,69,115,99,97,112,101,0,67,97,110,118,97,115,32,115,99,97,108,101,100,32,116,111,32,102,117,108,108,115,99,114,101,101,110,46,32,69,108,101,109,101,110,116,83,105,122,101,58,32,40,37,105,120,37,105,41,44,32,83,99,114,101,101,110,83,105,122,101,40,37,105,120,37,105,41,0,67,97,110,118,97,115,32,115,99,97,108,101,100,32,116,111,32,119,105,110,100,111,119,101,100,46,32,69,108,101,109,101,110,116,83,105,122,101,58,32,40,37,105,120,37,105,41,44,32,83,99,114,101,101,110,83,105,122,101,40,37,105,120,37,105,41,0,70,97,105,108,101,100,32,116,111,32,105,110,105,116,105,97,108,105,122,101,32,71,76,70,87,0,84,114,121,105,110,103,32,116,111,32,101,110,97,98,108,101,32,77,83,65,65,32,120,52,0,67,108,111,115,101,115,116,32,102,117,108,108,115,99,114,101,101,110,32,118,105,100,101,111,109,111,100,101,58,32,37,105,32,120,32,37,105,0,71,76,70,87,32,70,97,105,108,101,100,32,116,111,32,105,110,105,116,105,97,108,105,122,101,32,87,105,110,100,111,119,0,68,105,115,112,108,97,121,32,100,101,118,105,99,101,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,82,101,110,100,101,114,32,115,105,122,101,58,32,37,105,32,120,32,37,105,0,83,99,114,101,101,110,32,115,105,122,101,58,32,37,105,32,120,32,37,105,0,86,105,101,119,112,111,114,116,32,111,102,102,115,101,116,115,58,32,37,105,44,32,37,105,0,84,114,121,105,110,103,32,116,111,32,101,110,97,98,108,101,32,86,83,89,78,67,0,71,80,85,58,32,86,101,110,100,111,114,58,32,32,32,37,115,0,71,80,85,58,32,82,101,110,100,101,114,101,114,58,32,37,115,0,71,80,85,58,32,86,101,114,115,105,111,110,58,32,32,37,115,0,71,80,85,58,32,71,76,83,76,58,32,32,32,32,32,37,115,0,32,0,78,117,109,98,101,114,32,111,102,32,115,117,112,112,111,114,116,101,100,32,101,120,116,101,110,115,105,111,110,115,58,32,37,105,0,71,76,95,79,69,83,95,118,101,114,116,101,120,95,97,114,114,97,121,95,111,98,106,101,99,116,0,103,108,71,101,110,86,101,114,116,101,120,65,114,114,97,121,115,79,69,83,0,103,108,66,105,110,100,86,101,114,116,101,120,65,114,114,97,121,79,69,83,0,103,108,68,101,108,101,116,101,86,101,114,116,101,120,65,114,114,97,121,115,79,69,83,0,71,76,95,79,69,83,95,116,101,120,116,117,114,101,95,110,112,111,116,0,79,69,83,95,116,101,120,116,117,114,101,95,102,108,111,97,116,0,71,76,95,69,88,84,95,116,101,120,116,117,114,101,95,99,111,109,112,114,101,115,115,105,111,110,95,115,51,116,99,0,71,76,95,87,69,66,71,76,95,99,111,109,112,114,101,115,115,101,100,95,116,101,120,116,117,114,101,95,115,51,116,99,0,71,76,95,87,69,66,75,73,84,95,87,69,66,71,76,95,99,111,109,112,114,101,115,115,101,100,95,116,101,120,116,117,114,101,95,115,51,116,99,0,71,76,95,79,69,83,95,99,111,109,112,114,101,115,115,101,100,95,69,84,67,49,95,82,71,66,56,95,116,101,120,116,117,114,101,0,71,76,95,87,69,66,71,76,95,99,111,109,112,114,101,115,115,101,100,95,116,101,120,116,117,114,101,95,101,116,99,49,0,71,76,95,65,82,66,95,69,83,51,95,99,111,109,112,97,116,105,98,105,108,105,116,121,0,71,76,95,73,77,71,95,116,101,120,116,117,114,101,95,99,111,109,112,114,101,115,115,105,111,110,95,112,118,114,116,99,0,71,76,95,75,72,82,95,116,101,120,116,117,114,101,95,99,111,109,112,114,101,115,115,105,111,110,95,97,115,116,99,95,104,100,114,0,71,76,95,69,88,84,95,116,101,120,116,117,114,101,95,102,105,108,116,101,114,95,97,110,105,115,111,116,114,111,112,105,99,0,71,76,95,69,88,84,95,116,101,120,116,117,114,101,95,109,105,114,114,111,114,95,99,108,97,109,112,0,91,69,88,84,69,78,83,73,79,78,93,32,86,65,79,32,101,120,116,101,110,115,105,111,110,32,100,101,116,101,99,116,101,100,44,32,86,65,79,32,102,117,110,99,116,105,111,110,115,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,91,69,88,84,69,78,83,73,79,78,93,32,86,65,79,32,101,120,116,101,110,115,105,111,110,32,110,111,116,32,102,111,117,110,100,44,32,86,65,79,32,117,115,97,103,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,91,69,88,84,69,78,83,73,79,78,93,32,78,80,79,84,32,116,101,120,116,117,114,101,115,32,101,120,116,101,110,115,105,111,110,32,100,101,116,101,99,116,101,100,44,32,102,117,108,108,32,78,80,79,84,32,116,101,120,116,117,114,101,115,32,115,117,112,112,111,114,116,101,100,0,91,69,88,84,69,78,83,73,79,78,93,32,78,80,79,84,32,116,101,120,116,117,114,101,115,32,101,120,116,101,110,115,105,111,110,32,110,111,116,32,102,111,117,110,100,44,32,108,105,109,105,116,101,100,32,78,80,79,84,32,115,117,112,112,111,114,116,32,40,110,111,45,109,105,112,109,97,112,115,44,32,110,111,45,114,101,112,101,97,116,41,0,91,69,88,84,69,78,83,73,79,78,93,32,68,88,84,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,115,32,115,117,112,112,111,114,116,101,100,0,91,69,88,84,69,78,83,73,79,78,93,32,69,84,67,49,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,115,32,115,117,112,112,111,114,116,101,100,0,91,69,88,84,69,78,83,73,79,78,93,32,69,84,67,50,47,69,65,67,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,115,32,115,117,112,112,111,114,116,101,100,0,91,69,88,84,69,78,83,73,79,78,93,32,80,86,82,84,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,115,32,115,117,112,112,111,114,116,101,100,0,91,69,88,84,69,78,83,73,79,78,93,32,65,83,84,67,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,115,32,115,117,112,112,111,114,116,101,100,0,91,69,88,84,69,78,83,73,79,78,93,32,65,110,105,115,111,116,114,111,112,105,99,32,116,101,120,116,117,114,101,115,32,102,105,108,116,101,114,105,110,103,32,115,117,112,112,111,114,116,101,100,32,40,109,97,120,58,32,37,46,48,102,88,41,0,91,69,88,84,69,78,83,73,79,78,93,32,67,108,97,109,112,32,109,105,114,114,111,114,32,119,114,97,112,32,116,101,120,116,117,114,101,32,109,111,100,101,32,115,117,112,112,111,114,116,101,100,0,91,84,69,88,32,73,68,32,37,105,93,32,66,97,115,101,32,119,104,105,116,101,32,116,101,120,116,117,114,101,32,108,111,97,100,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,66,97,115,101,32,119,104,105,116,101,32,116,101,120,116,117,114,101,32,99,111,117,108,100,32,110,111,116,32,98,101,32,108,111,97,100,101,100,0,79,112,101,110,71,76,32,100,101,102,97,117,108,116,32,115,116,97,116,101,115,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,91,67,80,85,93,32,68,101,102,97,117,108,116,32,98,117,102,102,101,114,115,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,108,105,110,101,115,44,32,116,114,105,97,110,103,108,101,115,44,32,113,117,97,100,115,41,0,91,86,65,79,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,98,117,102,102,101,114,115,32,86,65,79,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,108,105,110,101,115,41,0,91,86,66,79,32,73,68,32,37,105,93,91,86,66,79,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,98,117,102,102,101,114,115,32,86,66,79,115,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,108,105,110,101,115,41,0,91,86,65,79,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,98,117,102,102,101,114,115,32,86,65,79,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,116,114,105,97,110,103,108,101,115,41,0,91,86,66,79,32,73,68,32,37,105,93,91,86,66,79,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,98,117,102,102,101,114,115,32,86,66,79,115,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,116,114,105,97,110,103,108,101,115,41,0,91,86,65,79,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,98,117,102,102,101,114,115,32,86,65,79,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,113,117,97,100,115,41,0,91,86,66,79,32,73,68,32,37,105,93,91,86,66,79,32,73,68,32,37,105,93,91,86,66,79,32,73,68,32,37,105,93,91,86,66,79,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,98,117,102,102,101,114,115,32,86,66,79,115,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,113,117,97,100,115,41,0,35,118,101,114,115,105,111,110,32,49,48,48,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,97,116,116,114,105,98,117,116,101,32,118,101,99,51,32,118,101,114,116,101,120,80,111,115,105,116,105,111,110,59,32,32,32,32,32,10,97,116,116,114,105,98,117,116,101,32,118,101,99,50,32,118,101,114,116,101,120,84,101,120,67,111,111,114,100,59,32,32,32,32,32,10,97,116,116,114,105,98,117,116,101,32,118,101,99,52,32,118,101,114,116,101,120,67,111,108,111,114,59,32,32,32,32,32,32,32,32,10,118,97,114,121,105,110,103,32,118,101,99,50,32,102,114,97,103,84,101,120,67,111,111,114,100,59,32,32,32,32,32,32,32,32,32,10,118,97,114,121,105,110,103,32,118,101,99,52,32,102,114,97,103,67,111,108,111,114,59,32,32,32,32,32,32,32,32,32,32,32,32,10,117,110,105,102,111,114,109,32,109,97,116,52,32,109,118,112,77,97,116,114,105,120,59,32,32,32,32,32,32,32,32,32,32,32,32,10,118,111,105,100,32,109,97,105,110,40,41,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,123,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,32,32,32,32,102,114,97,103,84,101,120,67,111,111,114,100,32,61,32,118,101,114,116,101,120,84,101,120,67,111,111,114,100,59,32,10,32,32,32,32,102,114,97,103,67,111,108,111,114,32,61,32,118,101,114,116,101,120,67,111,108,111,114,59,32,32,32,32,32,32,32,10,32,32,32,32,103,108,95,80,111,115,105,116,105,111,110,32,61,32,109,118,112,77,97,116,114,105,120,42,118,101,99,52,40,118,101,114,116,101,120,80,111,115,105,116,105,111,110,44,32,49,46,48,41,59,32,10,125,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,0,35,118,101,114,115,105,111,110,32,49,48,48,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,112,114,101,99,105,115,105,111,110,32,109,101,100,105,117,109,112,32,102,108,111,97,116,59,32,32,32,32,32,32,32,32,32,32,32,10,118,97,114,121,105,110,103,32,118,101,99,50,32,102,114,97,103,84,101,120,67,111,111,114,100,59,32,32,32,32,32,32,32,32,32,10,118,97,114,121,105,110,103,32,118,101,99,52,32,102,114,97,103,67,111,108,111,114,59,32,32,32,32,32,32,32,32,32,32,32,32,10,117,110,105,102,111,114,109,32,115,97,109,112,108,101,114,50,68,32,116,101,120,116,117,114,101,48,59,32,32,32,32,32,32,32,32,10,117,110,105,102,111,114,109,32,118,101,99,52,32,99,111,108,68,105,102,102,117,115,101,59,32,32,32,32,32,32,32,32,32,32,32,10,118,111,105,100,32,109,97,105,110,40,41,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,123,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,32,32,32,32,118,101,99,52,32,116,101,120,101,108,67,111,108,111,114,32,61,32,116,101,120,116,117,114,101,50,68,40,116,101,120,116,117,114,101,48,44,32,102,114,97,103,84,101,120,67,111,111,114,100,41,59,32,10,32,32,32,32,103,108,95,70,114,97,103,67,111,108,111,114,32,61,32,116,101,120,101,108,67,111,108,111,114,42,99,111,108,68,105,102,102,117,115,101,42,102,114,97,103,67,111,108,111,114,59,32,32,32,32,32,32,10,125,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,0,91,83,72,68,82,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,115,104,97,100,101,114,32,108,111,97,100,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,91,83,72,68,82,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,115,104,97,100,101,114,32,99,111,117,108,100,32,110,111,116,32,98,101,32,108,111,97,100,101,100,0,118,101,114,116,101,120,80,111,115,105,116,105,111,110,0,118,101,114,116,101,120,84,101,120,67,111,111,114,100,0,118,101,114,116,101,120,84,101,120,67,111,111,114,100,50,0,118,101,114,116,101,120,78,111,114,109,97,108,0,118,101,114,116,101,120,84,97,110,103,101,110,116,0,118,101,114,116,101,120,67,111,108,111,114,0,109,118,112,77,97,116,114,105,120,0,99,111,108,68,105,102,102,117,115,101,0,99,111,108,65,109,98,105,101,110,116,0,99,111,108,83,112,101,99,117,108,97,114,0,116,101,120,116,117,114,101,48,0,116,101,120,116,117,114,101,49,0,116,101,120,116,117,114,101,50,0,91,86,83,72,68,82,32,73,68,32,37,105,93,32,70,97,105,108,101,100,32,116,111,32,99,111,109,112,105,108,101,32,118,101,114,116,101,120,32,115,104,97,100,101,114,46,46,46,0,37,115,0,91,86,83,72,68,82,32,73,68,32,37,105,93,32,86,101,114,116,101,120,32,115,104,97,100,101,114,32,99,111,109,112,105,108,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,91,70,83,72,68,82,32,73,68,32,37,105,93,32,70,97,105,108,101,100,32,116,111,32,99,111,109,112,105,108,101,32,102,114,97,103,109,101,110,116,32,115,104,97,100,101,114,46,46,46,0,91,70,83,72,68,82,32,73,68,32,37,105,93,32,70,114,97,103,109,101,110,116,32,115,104,97,100,101,114,32,99,111,109,112,105,108,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,91,83,72,68,82,32,73,68,32,37,105,93,32,70,97,105,108,101,100,32,116,111,32,108,105,110,107,32,115,104,97,100,101,114,32,112,114,111,103,114,97,109,46,46,46,0,91,83,72,68,82,32,73,68,32,37,105,93,32,83,104,97,100,101,114,32,112,114,111,103,114,97,109,32,108,111,97,100,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,68,79,87,78,83,67,65,76,73,78,71,58,32,82,101,113,117,105,114,101,100,32,115,99,114,101,101,110,32,115,105,122,101,32,40,37,105,120,37,105,41,32,105,115,32,98,105,103,103,101,114,32,116,104,97,110,32,100,105,115,112,108,97,121,32,115,105,122,101,32,40,37,105,120,37,105,41,0,68,111,119,110,115,99,97,108,101,32,109,97,116,114,105,120,32,103,101,110,101,114,97,116,101,100,44,32,99,111,110,116,101,110,116,32,119,105,108,108,32,98,101,32,114,101,110,100,101,114,101,100,32,97,116,58,32,37,105,32,120,32,37,105,0,85,80,83,67,65,76,73,78,71,58,32,82,101,113,117,105,114,101,100,32,115,99,114,101,101,110,32,115,105,122,101,58,32,37,105,32,120,32,37,105,32,45,62,32,68,105,115,112,108,97,121,32,115,105,122,101,58,32,37,105,32,120,32,37,105,0,91,71,76,70,87,51,32,69,114,114,111,114,93,32,67,111,100,101,58,32,37,105,32,68,101,99,114,105,112,116,105,111,110,58,32,37,115,0,87,105,110,100,111,119,32,99,108,111,115,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,91,84,69,88,32,73,68,32,37,105,93,32,85,110,108,111,97,100,101,100,32,116,101,120,116,117,114,101,32,100,97,116,97,32,40,98,97,115,101,32,119,104,105,116,101,32,116,101,120,116,117,114,101,41,32,102,114,111,109,32,86,82,65,77,0,91,83,72,68,82,32,73,68,32,37,105,93,32,85,110,108,111,97,100,101,100,32,115,104,97,100,101,114,32,112,114,111,103,114,97,109,32,100,97,116,97,0,91,83,72,68,82,32,73,68,32,37,105,93,32,83,104,97,100,101,114,32,108,111,99,97,116,105,111,110,32,102,111,114,32,37,115,32,99,111,117,108,100,32,110,111,116,32,98,101,32,102,111,117,110,100,0,83,104,97,100,101,114,32,118,97,108,117,101,32,102,108,111,97,116,32,97,114,114,97,121,32,115,105,122,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,73,110,105,116,105,97,108,105,122,105,110,103,32,86,82,32,83,105,109,117,108,97,116,111,114,32,40,79,99,117,108,117,115,32,82,105,102,116,32,68,75,50,41,0,73,110,105,116,105,97,108,105,122,105,110,103,32,86,82,32,83,105,109,117,108,97,116,111,114,32,40,79,99,117,108,117,115,32,82,105,102,116,32,67,86,49,41,0,86,82,32,83,105,109,117,108,97,116,111,114,32,100,111,101,115,110,39,116,32,115,117,112,112,111,114,116,32,115,101,108,101,99,116,101,100,32,100,101,118,105,99,101,32,112,97,114,97,109,101,116,101,114,115,44,0,117,115,105,110,103,32,100,101,102,97,117,108,116,32,86,82,32,83,105,109,117,108,97,116,111,114,32,112,97,114,97,109,101,116,101,114,115,0,35,118,101,114,115,105,111,110,32,49,48,48,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,112,114,101,99,105,115,105,111,110,32,109,101,100,105,117,109,112,32,102,108,111,97,116,59,32,32,32,32,32,32,32,32,32,32,32,10,118,97,114,121,105,110,103,32,118,101,99,50,32,102,114,97,103,84,101,120,67,111,111,114,100,59,32,32,32,32,32,32,32,32,32,10,118,97,114,121,105,110,103,32,118,101,99,52,32,102,114,97,103,67,111,108,111,114,59,32,32,32,32,32,32,32,32,32,32,32,32,10,117,110,105,102,111,114,109,32,115,97,109,112,108,101,114,50,68,32,116,101,120,116,117,114,101,48,59,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,117,110,105,102,111,114,109,32,118,101,99,50,32,108,101,102,116,76,101,110,115,67,101,110,116,101,114,59,32,32,32,32,32,32,32,10,117,110,105,102,111,114,109,32,118,101,99,50,32,114,105,103,104,116,76,101,110,115,67,101,110,116,101,114,59,32,32,32,32,32,32,10,117,110,105,102,111,114,109,32,118,101,99,50,32,108,101,102,116,83,99,114,101,101,110,67,101,110,116,101,114,59,32,32,32,32,32,10,117,110,105,102,111,114,109,32,118,101,99,50,32,114,105,103,104,116,83,99,114,101,101,110,67,101,110,116,101,114,59,32,32,32,32,10,117,110,105,102,111,114,109,32,118,101,99,50,32,115,99,97,108,101,59,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,117,110,105,102,111,114,109,32,118,101,99,50,32,115,99,97,108,101,73,110,59,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,117,110,105,102,111,114,109,32,118,101,99,52,32,104,109,100,87,97,114,112,80,97,114,97,109,59,32,32,32,32,32,32,32,32,32,10,117,110,105,102,111,114,109,32,118,101,99,52,32,99,104,114,111,109,97,65,98,80,97,114,97,109,59,32,32,32,32,32,32,32,32,10,118,111,105,100,32,109,97,105,110,40,41,32,10,123,32,10,32,32,32,118,101,99,50,32,108,101,110,115,67,101,110,116,101,114,32,61,32,102,114,97,103,84,101,120,67,111,111,114,100,46,120,32,60,32,48,46,53,32,63,32,108,101,102,116,76,101,110,115,67,101,110,116,101,114,32,58,32,114,105,103,104,116,76,101,110,115,67,101,110,116,101,114,59,32,10,32,32,32,118,101,99,50,32,115,99,114,101,101,110,67,101,110,116,101,114,32,61,32,102,114,97,103,84,101,120,67,111,111,114,100,46,120,32,60,32,48,46,53,32,63,32,108,101,102,116,83,99,114,101,101,110,67,101,110,116,101,114,32,58,32,114,105,103,104,116,83,99,114,101,101,110,67,101,110,116,101,114,59,32,10,32,32,32,118,101,99,50,32,116,104,101,116,97,32,61,32,40,102,114,97,103,84,101,120,67,111,111,114,100,32,45,32,108,101,110,115,67,101,110,116,101,114,41,42,115,99,97,108,101,73,110,59,32,10,32,32,32,102,108,111,97,116,32,114,83,113,32,61,32,116,104,101,116,97,46,120,42,116,104,101,116,97,46,120,32,43,32,116,104,101,116,97,46,121,42,116,104,101,116,97,46,121,59,32,10,32,32,32,118,101,99,50,32,116,104,101,116,97,49,32,61,32,116,104,101,116,97,42,40,104,109,100,87,97,114,112,80,97,114,97,109,46,120,32,43,32,104,109,100,87,97,114,112,80,97,114,97,109,46,121,42,114,83,113,32,43,32,104,109,100,87,97,114,112,80,97,114,97,109,46,122,42,114,83,113,42,114,83,113,32,43,32,104,109,100,87,97,114,112,80,97,114,97,109,46,119,42,114,83,113,42,114,83,113,42,114,83,113,41,59,32,10,32,32,32,118,101,99,50,32,116,104,101,116,97,66,108,117,101,32,61,32,116,104,101,116,97,49,42,40,99,104,114,111,109,97,65,98,80,97,114,97,109,46,122,32,43,32,99,104,114,111,109,97,65,98,80,97,114,97,109,46,119,42,114,83,113,41,59,32,10,32,32,32,118,101,99,50,32,116,99,66,108,117,101,32,61,32,108,101,110,115,67,101,110,116,101,114,32,43,32,115,99,97,108,101,42,116,104,101,116,97,66,108,117,101,59,32,10,32,32,32,105,102,32,40,97,110,121,40,98,118,101,99,50,40,99,108,97,109,112,40,116,99,66,108,117,101,44,32,115,99,114,101,101,110,67,101,110,116,101,114,32,45,32,118,101,99,50,40,48,46,50,53,44,32,48,46,53,41,44,32,115,99,114,101,101,110,67,101,110,116,101,114,32,43,32,118,101,99,50,40,48,46,50,53,44,32,48,46,53,41,41,32,45,32,116,99,66,108,117,101,41,41,41,32,10,32,32,32,123,32,10,32,32,32,32,32,32,32,103,108,95,70,114,97,103,67,111,108,111,114,32,61,32,118,101,99,52,40,48,46,48,44,32,48,46,48], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE); +/* memory initializer */ allocate([44,32,48,46,48,44,32,49,46,48,41,59,32,10,32,32,32,125,32,10,32,32,32,101,108,115,101,32,10,32,32,32,123,32,10,32,32,32,32,32,32,32,102,108,111,97,116,32,98,108,117,101,32,61,32,116,101,120,116,117,114,101,50,68,40,116,101,120,116,117,114,101,48,44,32,116,99,66,108,117,101,41,46,98,59,32,10,32,32,32,32,32,32,32,118,101,99,50,32,116,99,71,114,101,101,110,32,61,32,108,101,110,115,67,101,110,116,101,114,32,43,32,115,99,97,108,101,42,116,104,101,116,97,49,59,32,10,32,32,32,32,32,32,32,102,108,111,97,116,32,103,114,101,101,110,32,61,32,116,101,120,116,117,114,101,50,68,40,116,101,120,116,117,114,101,48,44,32,116,99,71,114,101,101,110,41,46,103,59,32,10,32,32,32,32,32,32,32,118,101,99,50,32,116,104,101,116,97,82,101,100,32,61,32,116,104,101,116,97,49,42,40,99,104,114,111,109,97,65,98,80,97,114,97,109,46,120,32,43,32,99,104,114,111,109,97,65,98,80,97,114,97,109,46,121,42,114,83,113,41,59,32,10,32,32,32,32,32,32,32,118,101,99,50,32,116,99,82,101,100,32,61,32,108,101,110,115,67,101,110,116,101,114,32,43,32,115,99,97,108,101,42,116,104,101,116,97,82,101,100,59,32,10,32,32,32,32,32,32,32,102,108,111,97,116,32,114,101,100,32,61,32,116,101,120,116,117,114,101,50,68,40,116,101,120,116,117,114,101,48,44,32,116,99,82,101,100,41,46,114,59,32,10,32,32,32,32,32,32,32,103,108,95,70,114,97,103,67,111,108,111,114,32,61,32,118,101,99,52,40,114,101,100,44,32,103,114,101,101,110,44,32,98,108,117,101,44,32,49,46,48,41,59,32,10,32,32,32,32,125,32,10,125,32,10,0,86,82,58,32,68,105,115,116,111,114,116,105,111,110,32,83,99,97,108,101,58,32,37,102,0,86,82,58,32,68,105,115,116,111,114,116,105,111,110,32,83,104,97,100,101,114,58,32,76,101,102,116,76,101,110,115,67,101,110,116,101,114,32,61,32,123,32,37,102,44,32,37,102,32,125,0,86,82,58,32,68,105,115,116,111,114,116,105,111,110,32,83,104,97,100,101,114,58,32,82,105,103,104,116,76,101,110,115,67,101,110,116,101,114,32,61,32,123,32,37,102,44,32,37,102,32,125,0,86,82,58,32,68,105,115,116,111,114,116,105,111,110,32,83,104,97,100,101,114,58,32,83,99,97,108,101,32,61,32,123,32,37,102,44,32,37,102,32,125,0,86,82,58,32,68,105,115,116,111,114,116,105,111,110,32,83,104,97,100,101,114,58,32,83,99,97,108,101,73,110,32,61,32,123,32,37,102,44,32,37,102,32,125,0,108,101,102,116,76,101,110,115,67,101,110,116,101,114,0,114,105,103,104,116,76,101,110,115,67,101,110,116,101,114,0,108,101,102,116,83,99,114,101,101,110,67,101,110,116,101,114,0,114,105,103,104,116,83,99,114,101,101,110,67,101,110,116,101,114,0,115,99,97,108,101,0,115,99,97,108,101,73,110,0,104,109,100,87,97,114,112,80,97,114,97,109,0,99,104,114,111,109,97,65,98,80,97,114,97,109,0,69,88,84,0,65,82,66,0,79,69,83,0,65,78,71,76,69,0,103,108,67,114,101,97,116,101,80,114,111,103,114,97,109,79,98,106,101,99,116,0,103,108,67,114,101,97,116,101,80,114,111,103,114,97,109,0,103,108,85,115,101,80,114,111,103,114,97,109,79,98,106,101,99,116,0,103,108,85,115,101,80,114,111,103,114,97,109,0,103,108,67,114,101,97,116,101,83,104,97,100,101,114,79,98,106,101,99,116,0,103,108,67,114,101,97,116,101,83,104,97,100,101,114,0,103,108,65,116,116,97,99,104,79,98,106,101,99,116,0,103,108,65,116,116,97,99,104,83,104,97,100,101,114,0,103,108,68,101,116,97,99,104,79,98,106,101,99,116,0,103,108,68,101,116,97,99,104,83,104,97,100,101,114,0,103,108,80,105,120,101,108,83,116,111,114,101,105,0,103,108,71,101,116,83,116,114,105,110,103,0,103,108,71,101,116,73,110,116,101,103,101,114,118,0,103,108,71,101,116,70,108,111,97,116,118,0,103,108,71,101,116,66,111,111,108,101,97,110,118,0,103,108,71,101,110,84,101,120,116,117,114,101,115,0,103,108,68,101,108,101,116,101,84,101,120,116,117,114,101,115,0,103,108,67,111,109,112,114,101,115,115,101,100,84,101,120,73,109,97,103,101,50,68,0,103,108,67,111,109,112,114,101,115,115,101,100,84,101,120,83,117,98,73,109,97,103,101,50,68,0,103,108,84,101,120,73,109,97,103,101,50,68,0,103,108,84,101,120,83,117,98,73,109,97,103,101,50,68,0,103,108,82,101,97,100,80,105,120,101,108,115,0,103,108,66,105,110,100,84,101,120,116,117,114,101,0,103,108,71,101,116,84,101,120,80,97,114,97,109,101,116,101,114,102,118,0,103,108,71,101,116,84,101,120,80,97,114,97,109,101,116,101,114,105,118,0,103,108,84,101,120,80,97,114,97,109,101,116,101,114,102,118,0,103,108,84,101,120,80,97,114,97,109,101,116,101,114,105,118,0,103,108,73,115,84,101,120,116,117,114,101,0,103,108,71,101,110,66,117,102,102,101,114,115,0,103,108,68,101,108,101,116,101,66,117,102,102,101,114,115,0,103,108,71,101,116,66,117,102,102,101,114,80,97,114,97,109,101,116,101,114,105,118,0,103,108,66,117,102,102,101,114,68,97,116,97,0,103,108,66,117,102,102,101,114,83,117,98,68,97,116,97,0,103,108,73,115,66,117,102,102,101,114,0,103,108,71,101,110,82,101,110,100,101,114,98,117,102,102,101,114,115,0,103,108,68,101,108,101,116,101,82,101,110,100,101,114,98,117,102,102,101,114,115,0,103,108,66,105,110,100,82,101,110,100,101,114,98,117,102,102,101,114,0,103,108,71,101,116,82,101,110,100,101,114,98,117,102,102,101,114,80,97,114,97,109,101,116,101,114,105,118,0,103,108,73,115,82,101,110,100,101,114,98,117,102,102,101,114,0,103,108,71,101,116,85,110,105,102,111,114,109,102,118,0,103,108,71,101,116,85,110,105,102,111,114,109,105,118,0,103,108,71,101,116,85,110,105,102,111,114,109,76,111,99,97,116,105,111,110,0,103,108,71,101,116,86,101,114,116,101,120,65,116,116,114,105,98,102,118,0,103,108,71,101,116,86,101,114,116,101,120,65,116,116,114,105,98,105,118,0,103,108,71,101,116,86,101,114,116,101,120,65,116,116,114,105,98,80,111,105,110,116,101,114,118,0,103,108,71,101,116,65,99,116,105,118,101,85,110,105,102,111,114,109,0,103,108,85,110,105,102,111,114,109,49,102,0,103,108,85,110,105,102,111,114,109,50,102,0,103,108,85,110,105,102,111,114,109,51,102,0,103,108,85,110,105,102,111,114,109,52,102,0,103,108,85,110,105,102,111,114,109,49,105,0,103,108,85,110,105,102,111,114,109,50,105,0,103,108,85,110,105,102,111,114,109,51,105,0,103,108,85,110,105,102,111,114,109,52,105,0,103,108,85,110,105,102,111,114,109,49,105,118,0,103,108,85,110,105,102,111,114,109,50,105,118,0,103,108,85,110,105,102,111,114,109,51,105,118,0,103,108,85,110,105,102,111,114,109,52,105,118,0,103,108,85,110,105,102,111,114,109,49,102,118,0,103,108,85,110,105,102,111,114,109,50,102,118,0,103,108,85,110,105,102,111,114,109,51,102,118,0,103,108,85,110,105,102,111,114,109,52,102,118,0,103,108,85,110,105,102,111,114,109,77,97,116,114,105,120,50,102,118,0,103,108,85,110,105,102,111,114,109,77,97,116,114,105,120,51,102,118,0,103,108,85,110,105,102,111,114,109,77,97,116,114,105,120,52,102,118,0,103,108,66,105,110,100,66,117,102,102,101,114,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,49,102,118,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,50,102,118,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,51,102,118,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,52,102,118,0,103,108,71,101,116,65,116,116,114,105,98,76,111,99,97,116,105,111,110,0,103,108,71,101,116,65,99,116,105,118,101,65,116,116,114,105,98,0,103,108,68,101,108,101,116,101,83,104,97,100,101,114,0,103,108,71,101,116,65,116,116,97,99,104,101,100,83,104,97,100,101,114,115,0,103,108,83,104,97,100,101,114,83,111,117,114,99,101,0,103,108,71,101,116,83,104,97,100,101,114,83,111,117,114,99,101,0,103,108,67,111,109,112,105,108,101,83,104,97,100,101,114,0,103,108,71,101,116,83,104,97,100,101,114,73,110,102,111,76,111,103,0,103,108,71,101,116,83,104,97,100,101,114,105,118,0,103,108,71,101,116,80,114,111,103,114,97,109,105,118,0,103,108,73,115,83,104,97,100,101,114,0,103,108,68,101,108,101,116,101,80,114,111,103,114,97,109,0,103,108,71,101,116,83,104,97,100,101,114,80,114,101,99,105,115,105,111,110,70,111,114,109,97,116,0,103,108,76,105,110,107,80,114,111,103,114,97,109,0,103,108,71,101,116,80,114,111,103,114,97,109,73,110,102,111,76,111,103,0,103,108,86,97,108,105,100,97,116,101,80,114,111,103,114,97,109,0,103,108,73,115,80,114,111,103,114,97,109,0,103,108,66,105,110,100,65,116,116,114,105,98,76,111,99,97,116,105,111,110,0,103,108,66,105,110,100,70,114,97,109,101,98,117,102,102,101,114,0,103,108,71,101,110,70,114,97,109,101,98,117,102,102,101,114,115,0,103,108,68,101,108,101,116,101,70,114,97,109,101,98,117,102,102,101,114,115,0,103,108,70,114,97,109,101,98,117,102,102,101,114,82,101,110,100,101,114,98,117,102,102,101,114,0,103,108,70,114,97,109,101,98,117,102,102,101,114,84,101,120,116,117,114,101,50,68,0,103,108,71,101,116,70,114,97,109,101,98,117,102,102,101,114,65,116,116,97,99,104,109,101,110,116,80,97,114,97,109,101,116,101,114,105,118,0,103,108,73,115,70,114,97,109,101,98,117,102,102,101,114,0,103,108,68,101,108,101,116,101,79,98,106,101,99,116,0,103,108,71,101,116,79,98,106,101,99,116,80,97,114,97,109,101,116,101,114,105,118,0,103,108,71,101,116,73,110,102,111,76,111,103,0,103,108,66,105,110,100,80,114,111,103,114,97,109,0,103,108,71,101,116,80,111,105,110,116,101,114,118,0,103,108,68,114,97,119,82,97,110,103,101,69,108,101,109,101,110,116,115,0,103,108,69,110,97,98,108,101,67,108,105,101,110,116,83,116,97,116,101,0,103,108,86,101,114,116,101,120,80,111,105,110,116,101,114,0,103,108,84,101,120,67,111,111,114,100,80,111,105,110,116,101,114,0,103,108,78,111,114,109,97,108,80,111,105,110,116,101,114,0,103,108,67,111,108,111,114,80,111,105,110,116,101,114,0,103,108,67,108,105,101,110,116,65,99,116,105,118,101,84,101,120,116,117,114,101,0,103,108,71,101,110,86,101,114,116,101,120,65,114,114,97,121,115,0,103,108,68,101,108,101,116,101,86,101,114,116,101,120,65,114,114,97,121,115,0,103,108,66,105,110,100,86,101,114,116,101,120,65,114,114,97,121,0,103,108,77,97,116,114,105,120,77,111,100,101,0,103,108,76,111,97,100,73,100,101,110,116,105,116,121,0,103,108,76,111,97,100,77,97,116,114,105,120,102,0,103,108,70,114,117,115,116,117,109,0,103,108,82,111,116,97,116,101,102,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,80,111,105,110,116,101,114,0,103,108,69,110,97,98,108,101,86,101,114,116,101,120,65,116,116,114,105,98,65,114,114,97,121,0,103,108,68,105,115,97,98,108,101,86,101,114,116,101,120,65,116,116,114,105,98,65,114,114,97,121,0,103,108,68,114,97,119,65,114,114,97,121,115,0,103,108,68,114,97,119,69,108,101,109,101,110,116,115,0,103,108,83,104,97,100,101,114,66,105,110,97,114,121,0,103,108,82,101,108,101,97,115,101,83,104,97,100,101,114,67,111,109,112,105,108,101,114,0,103,108,71,101,116,69,114,114,111,114,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,68,105,118,105,115,111,114,0,103,108,68,114,97,119,65,114,114,97,121,115,73,110,115,116,97,110,99,101,100,0,103,108,68,114,97,119,69,108,101,109,101,110,116,115,73,110,115,116,97,110,99,101,100,0,103,108,70,105,110,105,115,104,0,103,108,70,108,117,115,104,0,103,108,67,108,101,97,114,68,101,112,116,104,0,103,108,67,108,101,97,114,68,101,112,116,104,102,0,103,108,68,101,112,116,104,70,117,110,99,0,103,108,69,110,97,98,108,101,0,103,108,68,105,115,97,98,108,101,0,103,108,70,114,111,110,116,70,97,99,101,0,103,108,67,117,108,108,70,97,99,101,0,103,108,67,108,101,97,114,0,103,108,76,105,110,101,87,105,100,116,104,0,103,108,67,108,101,97,114,83,116,101,110,99,105,108,0,103,108,68,101,112,116,104,77,97,115,107,0,103,108,83,116,101,110,99,105,108,77,97,115,107,0,103,108,67,104,101,99,107,70,114,97,109,101,98,117,102,102,101,114,83,116,97,116,117,115,0,103,108,71,101,110,101,114,97,116,101,77,105,112,109,97,112,0,103,108,65,99,116,105,118,101,84,101,120,116,117,114,101,0,103,108,66,108,101,110,100,69,113,117,97,116,105,111,110,0,103,108,73,115,69,110,97,98,108,101,100,0,103,108,66,108,101,110,100,70,117,110,99,0,103,108,66,108,101,110,100,69,113,117,97,116,105,111,110,83,101,112,97,114,97,116,101,0,103,108,68,101,112,116,104,82,97,110,103,101,0,103,108,68,101,112,116,104,82,97,110,103,101,102,0,103,108,83,116,101,110,99,105,108,77,97,115,107,83,101,112,97,114,97,116,101,0,103,108,72,105,110,116,0,103,108,80,111,108,121,103,111,110,79,102,102,115,101,116,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,49,102,0,103,108,83,97,109,112,108,101,67,111,118,101,114,97,103,101,0,103,108,84,101,120,80,97,114,97,109,101,116,101,114,105,0,103,108,84,101,120,80,97,114,97,109,101,116,101,114,102,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,50,102,0,103,108,83,116,101,110,99,105,108,70,117,110,99,0,103,108,83,116,101,110,99,105,108,79,112,0,103,108,86,105,101,119,112,111,114,116,0,103,108,67,108,101,97,114,67,111,108,111,114,0,103,108,83,99,105,115,115,111,114,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,51,102,0,103,108,67,111,108,111,114,77,97,115,107,0,103,108,82,101,110,100,101,114,98,117,102,102,101,114,83,116,111,114,97,103,101,0,103,108,66,108,101,110,100,70,117,110,99,83,101,112,97,114,97,116,101,0,103,108,66,108,101,110,100,67,111,108,111,114,0,103,108,83,116,101,110,99,105,108,70,117,110,99,83,101,112,97,114,97,116,101,0,103,108,83,116,101,110,99,105,108,79,112,83,101,112,97,114,97,116,101,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,52,102,0,103,108,67,111,112,121,84,101,120,73,109,97,103,101,50,68,0,103,108,67,111,112,121,84,101,120,83,117,98,73,109,97,103,101,50,68,0,103,108,68,114,97,119,66,117,102,102,101,114,115,0,123,32,77,111,100,117,108,101,46,112,114,105,110,116,69,114,114,40,39,98,97,100,32,110,97,109,101,32,105,110,32,103,101,116,80,114,111,99,65,100,100,114,101,115,115,58,32,39,32,43,32,91,80,111,105,110,116,101,114,95,115,116,114,105,110,103,105,102,121,40,36,48,41,44,32,80,111,105,110,116,101,114,95,115,116,114,105,110,103,105,102,121,40,36,49,41,93,41,59,32,125,0,17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,110,97,110,0,78,65,78,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,46,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116,32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+10240); @@ -5294,22 +5294,8 @@ function copyTempDouble(ptr) { GLctx.uniform1fv(GL.uniforms[location], view); } - function _glDeleteBuffers(n, buffers) { - for (var i = 0; i < n; i++) { - var id = HEAP32[(((buffers)+(i*4))>>2)]; - var buffer = GL.buffers[id]; - - // From spec: "glDeleteBuffers silently ignores 0's and names that do not - // correspond to existing buffer objects." - if (!buffer) continue; - - GLctx.deleteBuffer(buffer); - buffer.name = 0; - GL.buffers[id] = null; - - if (id == GL.currArrayBuffer) GL.currArrayBuffer = 0; - if (id == GL.currElementArrayBuffer) GL.currElementArrayBuffer = 0; - } + function _glfwSetMouseButtonCallback(winid, cbfun) { + GLFW.setMouseButtonCallback(winid, cbfun); } function _emscripten_set_gamepaddisconnected_callback(userData, useCapture, callbackfunc) { @@ -6319,8 +6305,22 @@ function copyTempDouble(ptr) { GLctx.uniform1fv(GL.uniforms[location], view); } - function _glfwSetMouseButtonCallback(winid, cbfun) { - GLFW.setMouseButtonCallback(winid, cbfun); + function _glDeleteBuffers(n, buffers) { + for (var i = 0; i < n; i++) { + var id = HEAP32[(((buffers)+(i*4))>>2)]; + var buffer = GL.buffers[id]; + + // From spec: "glDeleteBuffers silently ignores 0's and names that do not + // correspond to existing buffer objects." + if (!buffer) continue; + + GLctx.deleteBuffer(buffer); + buffer.name = 0; + GL.buffers[id] = null; + + if (id == GL.currArrayBuffer) GL.currArrayBuffer = 0; + if (id == GL.currElementArrayBuffer) GL.currElementArrayBuffer = 0; + } } function _emscripten_glCreateProgram() { @@ -6452,10 +6452,6 @@ function copyTempDouble(ptr) { GLFW.errorFunc = cbfun; } - function _glfwSetCursorPos(winid, x, y) { - GLFW.setCursorPos(winid, x, y); - } - function _emscripten_glCreateShader(shaderType) { var id = GL.getNewId(GL.shaders); GL.shaders[id] = GLctx.createShader(shaderType); @@ -6870,7 +6866,7 @@ function invoke_viiii(index,a1,a2,a3,a4) { Module.asmGlobalArg = { "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array, "NaN": NaN, "Infinity": Infinity }; -Module.asmLibraryArg = { "abort": abort, "assert": assert, "enlargeMemory": enlargeMemory, "getTotalMemory": getTotalMemory, "abortOnCannotGrowMemory": abortOnCannotGrowMemory, "abortStackOverflow": abortStackOverflow, "nullFunc_viiiii": nullFunc_viiiii, "nullFunc_vd": nullFunc_vd, "nullFunc_vid": nullFunc_vid, "nullFunc_vi": nullFunc_vi, "nullFunc_vii": nullFunc_vii, "nullFunc_ii": nullFunc_ii, "nullFunc_viddd": nullFunc_viddd, "nullFunc_vidd": nullFunc_vidd, "nullFunc_iiii": nullFunc_iiii, "nullFunc_viiiiiiii": nullFunc_viiiiiiii, "nullFunc_viiiiii": nullFunc_viiiiii, "nullFunc_viii": nullFunc_viii, "nullFunc_vidddd": nullFunc_vidddd, "nullFunc_vdi": nullFunc_vdi, "nullFunc_viiiiiii": nullFunc_viiiiiii, "nullFunc_viiiiiiiii": nullFunc_viiiiiiiii, "nullFunc_iii": nullFunc_iii, "nullFunc_i": nullFunc_i, "nullFunc_vdddddd": nullFunc_vdddddd, "nullFunc_vdddd": nullFunc_vdddd, "nullFunc_vdd": nullFunc_vdd, "nullFunc_v": nullFunc_v, "nullFunc_viid": nullFunc_viid, "nullFunc_viiii": nullFunc_viiii, "invoke_viiiii": invoke_viiiii, "invoke_vd": invoke_vd, "invoke_vid": invoke_vid, "invoke_vi": invoke_vi, "invoke_vii": invoke_vii, "invoke_ii": invoke_ii, "invoke_viddd": invoke_viddd, "invoke_vidd": invoke_vidd, "invoke_iiii": invoke_iiii, "invoke_viiiiiiii": invoke_viiiiiiii, "invoke_viiiiii": invoke_viiiiii, "invoke_viii": invoke_viii, "invoke_vidddd": invoke_vidddd, "invoke_vdi": invoke_vdi, "invoke_viiiiiii": invoke_viiiiiii, "invoke_viiiiiiiii": invoke_viiiiiiiii, "invoke_iii": invoke_iii, "invoke_i": invoke_i, "invoke_vdddddd": invoke_vdddddd, "invoke_vdddd": invoke_vdddd, "invoke_vdd": invoke_vdd, "invoke_v": invoke_v, "invoke_viid": invoke_viid, "invoke_viiii": invoke_viiii, "_emscripten_glGetTexParameterfv": _emscripten_glGetTexParameterfv, "_glUseProgram": _glUseProgram, "_emscripten_glShaderSource": _emscripten_glShaderSource, "_glfwCreateWindow": _glfwCreateWindow, "_emscripten_glReleaseShaderCompiler": _emscripten_glReleaseShaderCompiler, "_emscripten_glBlendFuncSeparate": _emscripten_glBlendFuncSeparate, "_emscripten_glVertexAttribPointer": _emscripten_glVertexAttribPointer, "_emscripten_glGetIntegerv": _emscripten_glGetIntegerv, "_emscripten_glCullFace": _emscripten_glCullFace, "_emscripten_glIsProgram": _emscripten_glIsProgram, "_emscripten_glStencilMaskSeparate": _emscripten_glStencilMaskSeparate, "_emscripten_glViewport": _emscripten_glViewport, "_glUniform2fv": _glUniform2fv, "_emscripten_glFrontFace": _emscripten_glFrontFace, "_glDeleteProgram": _glDeleteProgram, "_emscripten_glUniform3fv": _emscripten_glUniform3fv, "_emscripten_glPolygonOffset": _emscripten_glPolygonOffset, "_emscripten_glUseProgram": _emscripten_glUseProgram, "_emscripten_glBlendColor": _emscripten_glBlendColor, "_glBindBuffer": _glBindBuffer, "_emscripten_glDepthFunc": _emscripten_glDepthFunc, "_glGetShaderInfoLog": _glGetShaderInfoLog, "_emscripten_set_fullscreenchange_callback": _emscripten_set_fullscreenchange_callback, "_emscripten_set_touchmove_callback": _emscripten_set_touchmove_callback, "_emscripten_set_main_loop_timing": _emscripten_set_main_loop_timing, "_glDisable": _glDisable, "_glBlendFunc": _glBlendFunc, "_emscripten_glDisableVertexAttribArray": _emscripten_glDisableVertexAttribArray, "_glGetAttribLocation": _glGetAttribLocation, "_glDisableVertexAttribArray": _glDisableVertexAttribArray, "_glCreateShader": _glCreateShader, "_emscripten_glReadPixels": _emscripten_glReadPixels, "_glCompileShader": _glCompileShader, "_emscripten_glSampleCoverage": _emscripten_glSampleCoverage, "_emscripten_glVertexPointer": _emscripten_glVertexPointer, "_emscripten_set_touchstart_callback": _emscripten_set_touchstart_callback, "emscriptenWebGLComputeImageSize": emscriptenWebGLComputeImageSize, "_emscripten_glGetBooleanv": _emscripten_glGetBooleanv, "_emscripten_glGetShaderSource": _emscripten_glGetShaderSource, "_glUniform4f": _glUniform4f, "_llvm_stacksave": _llvm_stacksave, "_emscripten_glUniform1i": _emscripten_glUniform1i, "_emscripten_glLoadMatrixf": _emscripten_glLoadMatrixf, "_emscripten_glGenBuffers": _emscripten_glGenBuffers, "_emscripten_glDeleteObjectARB": _emscripten_glDeleteObjectARB, "_glfwSetWindowSizeCallback": _glfwSetWindowSizeCallback, "_emscripten_glGetShaderPrecisionFormat": _emscripten_glGetShaderPrecisionFormat, "_glfwInit": _glfwInit, "_glGenBuffers": _glGenBuffers, "_glShaderSource": _glShaderSource, "_emscripten_glGetString": _emscripten_glGetString, "_emscripten_glIsFramebuffer": _emscripten_glIsFramebuffer, "_emscripten_glIsEnabled": _emscripten_glIsEnabled, "_emscripten_glScissor": _emscripten_glScissor, "_emscripten_glVertexAttrib4fv": _emscripten_glVertexAttrib4fv, "_emscripten_glFramebufferTexture2D": _emscripten_glFramebufferTexture2D, "_emscripten_glTexParameteriv": _emscripten_glTexParameteriv, "_emscripten_glBindProgramARB": _emscripten_glBindProgramARB, "_emscripten_glStencilOpSeparate": _emscripten_glStencilOpSeparate, "_emscripten_glFramebufferRenderbuffer": _emscripten_glFramebufferRenderbuffer, "___syscall140": ___syscall140, "_glfwSetErrorCallback": _glfwSetErrorCallback, "_glfwDefaultWindowHints": _glfwDefaultWindowHints, "_glfwDestroyWindow": _glfwDestroyWindow, "___syscall146": ___syscall146, "_emscripten_glGetActiveAttrib": _emscripten_glGetActiveAttrib, "_emscripten_glAttachShader": _emscripten_glAttachShader, "_glVertexAttribPointer": _glVertexAttribPointer, "_emscripten_glUniform2i": _emscripten_glUniform2i, "_emscripten_glUniform2f": _emscripten_glUniform2f, "_emscripten_glTexParameterfv": _emscripten_glTexParameterfv, "_emscripten_glUniformMatrix2fv": _emscripten_glUniformMatrix2fv, "_glGetProgramInfoLog": _glGetProgramInfoLog, "_glfwSetScrollCallback": _glfwSetScrollCallback, "_emscripten_glTexParameterf": _emscripten_glTexParameterf, "_emscripten_glGetAttachedShaders": _emscripten_glGetAttachedShaders, "_emscripten_glGenTextures": _emscripten_glGenTextures, "_emscripten_glTexParameteri": _emscripten_glTexParameteri, "_llvm_stackrestore": _llvm_stackrestore, "_glBindRenderbuffer": _glBindRenderbuffer, "_emscripten_glClear": _emscripten_glClear, "_glDrawElements": _glDrawElements, "_glBufferSubData": _glBufferSubData, "_emscripten_glValidateProgram": _emscripten_glValidateProgram, "_emscripten_glVertexAttrib2fv": _emscripten_glVertexAttrib2fv, "_glViewport": _glViewport, "_emscripten_glUniform4iv": _emscripten_glUniform4iv, "_emscripten_glGetTexParameteriv": _emscripten_glGetTexParameteriv, "___setErrNo": ___setErrNo, "_eglGetProcAddress": _eglGetProcAddress, "_emscripten_glBindAttribLocation": _emscripten_glBindAttribLocation, "_glDeleteTextures": _glDeleteTextures, "_glDepthFunc": _glDepthFunc, "_emscripten_glClientActiveTexture": _emscripten_glClientActiveTexture, "_emscripten_glVertexAttrib2f": _emscripten_glVertexAttrib2f, "_emscripten_glFlush": _emscripten_glFlush, "_emscripten_glCheckFramebufferStatus": _emscripten_glCheckFramebufferStatus, "_emscripten_glGenerateMipmap": _emscripten_glGenerateMipmap, "_emscripten_glGetError": _emscripten_glGetError, "_emscripten_glClearDepthf": _emscripten_glClearDepthf, "_emscripten_glUniform3f": _emscripten_glUniform3f, "_emscripten_glUniform3i": _emscripten_glUniform3i, "_emscripten_glRotatef": _emscripten_glRotatef, "_emscripten_glDeleteShader": _emscripten_glDeleteShader, "_glEnable": _glEnable, "_emscripten_glVertexAttrib1fv": _emscripten_glVertexAttrib1fv, "_glGenTextures": _glGenTextures, "_emscripten_glMatrixMode": _emscripten_glMatrixMode, "_glGetString": _glGetString, "_emscripten_glClearStencil": _emscripten_glClearStencil, "_emscripten_glGetUniformLocation": _emscripten_glGetUniformLocation, "emscriptenWebGLGet": emscriptenWebGLGet, "_emscripten_glEnableVertexAttribArray": _emscripten_glEnableVertexAttribArray, "_emscripten_glGetAttribLocation": _emscripten_glGetAttribLocation, "_emscripten_get_now": _emscripten_get_now, "_emscripten_glDisable": _emscripten_glDisable, "_emscripten_glNormalPointer": _emscripten_glNormalPointer, "_emscripten_glBindTexture": _emscripten_glBindTexture, "_glFramebufferRenderbuffer": _glFramebufferRenderbuffer, "_emscripten_glEnable": _emscripten_glEnable, "_glCreateProgram": _glCreateProgram, "_glUniformMatrix4fv": _glUniformMatrix4fv, "_emscripten_glClearDepth": _emscripten_glClearDepth, "___lock": ___lock, "emscriptenWebGLGetTexPixelData": emscriptenWebGLGetTexPixelData, "___syscall6": ___syscall6, "_emscripten_glIsBuffer": _emscripten_glIsBuffer, "_emscripten_glVertexAttrib3f": _emscripten_glVertexAttrib3f, "_time": _time, "_glBindFramebuffer": _glBindFramebuffer, "_emscripten_glVertexAttrib1f": _emscripten_glVertexAttrib1f, "_glGenFramebuffers": _glGenFramebuffers, "_emscripten_glGetFramebufferAttachmentParameteriv": _emscripten_glGetFramebufferAttachmentParameteriv, "_emscripten_glBlendEquationSeparate": _emscripten_glBlendEquationSeparate, "_exit": _exit, "_emscripten_glEnableClientState": _emscripten_glEnableClientState, "_emscripten_glUniform4i": _emscripten_glUniform4i, "_emscripten_glDrawRangeElements": _emscripten_glDrawRangeElements, "_glCullFace": _glCullFace, "_emscripten_glGetPointerv": _emscripten_glGetPointerv, "_emscripten_set_keypress_callback": _emscripten_set_keypress_callback, "__emscripten_sample_gamepad_data": __emscripten_sample_gamepad_data, "_glDeleteFramebuffers": _glDeleteFramebuffers, "_emscripten_get_gamepad_status": _emscripten_get_gamepad_status, "_emscripten_glUniform4f": _emscripten_glUniform4f, "_emscripten_glUniform2fv": _emscripten_glUniform2fv, "_glfwGetVideoModes": _glfwGetVideoModes, "_glUniform1fv": _glUniform1fv, "_emscripten_set_click_callback": _emscripten_set_click_callback, "_glCheckFramebufferStatus": _glCheckFramebufferStatus, "_glFramebufferTexture2D": _glFramebufferTexture2D, "_emscripten_glShaderBinary": _emscripten_glShaderBinary, "_emscripten_glDrawElements": _emscripten_glDrawElements, "_emscripten_glBlendFunc": _emscripten_glBlendFunc, "_emscripten_get_num_gamepads": _emscripten_get_num_gamepads, "_emscripten_glStencilMask": _emscripten_glStencilMask, "_glUniform3fv": _glUniform3fv, "_emscripten_glUniform1iv": _emscripten_glUniform1iv, "_emscripten_glGetVertexAttribPointerv": _emscripten_glGetVertexAttribPointerv, "_glClearDepthf": _glClearDepthf, "_emscripten_glCompressedTexSubImage2D": _emscripten_glCompressedTexSubImage2D, "emscriptenWebGLGetUniform": emscriptenWebGLGetUniform, "_emscripten_glGenRenderbuffers": _emscripten_glGenRenderbuffers, "_emscripten_glDeleteVertexArrays": _emscripten_glDeleteVertexArrays, "_glfwSetWindowShouldClose": _glfwSetWindowShouldClose, "_emscripten_glUniform1fv": _emscripten_glUniform1fv, "_emscripten_glGetActiveUniform": _emscripten_glGetActiveUniform, "_glBindTexture": _glBindTexture, "_emscripten_glUniform3iv": _emscripten_glUniform3iv, "_emscripten_glUniform2iv": _emscripten_glUniform2iv, "_glfwSetCursorPos": _glfwSetCursorPos, "_glfwSetCharCallback": _glfwSetCharCallback, "emscriptenWebGLGetVertexAttrib": emscriptenWebGLGetVertexAttrib, "_glGetFloatv": _glGetFloatv, "_emscripten_glDeleteProgram": _emscripten_glDeleteProgram, "_emscripten_glDeleteRenderbuffers": _emscripten_glDeleteRenderbuffers, "_emscripten_glDrawElementsInstanced": _emscripten_glDrawElementsInstanced, "_emscripten_glVertexAttrib4f": _emscripten_glVertexAttrib4f, "_glDrawArrays": _glDrawArrays, "_emscripten_glTexSubImage2D": _emscripten_glTexSubImage2D, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_emscripten_glPixelStorei": _emscripten_glPixelStorei, "_glAttachShader": _glAttachShader, "_emscripten_get_pointerlock_status": _emscripten_get_pointerlock_status, "_glfwGetMouseButton": _glfwGetMouseButton, "_emscripten_glColorPointer": _emscripten_glColorPointer, "_emscripten_glTexCoordPointer": _emscripten_glTexCoordPointer, "_emscripten_glGetBufferParameteriv": _emscripten_glGetBufferParameteriv, "_emscripten_glFinish": _emscripten_glFinish, "_emscripten_request_pointerlock": _emscripten_request_pointerlock, "_emscripten_set_gamepaddisconnected_callback": _emscripten_set_gamepaddisconnected_callback, "_emscripten_asm_const_iii": _emscripten_asm_const_iii, "_emscripten_glDepthMask": _emscripten_glDepthMask, "_glfwSetWindowIconifyCallback": _glfwSetWindowIconifyCallback, "_emscripten_glDrawBuffers": _emscripten_glDrawBuffers, "_glfwTerminate": _glfwTerminate, "_glFrontFace": _glFrontFace, "_emscripten_glGetObjectParameterivARB": _emscripten_glGetObjectParameterivARB, "_emscripten_exit_pointerlock": _emscripten_exit_pointerlock, "_glfwSwapInterval": _glfwSwapInterval, "_glUniform1i": _glUniform1i, "_glEnableVertexAttribArray": _glEnableVertexAttribArray, "_emscripten_glStencilFunc": _emscripten_glStencilFunc, "_abort": _abort, "_emscripten_glGetUniformiv": _emscripten_glGetUniformiv, "_glDeleteBuffers": _glDeleteBuffers, "_glBufferData": _glBufferData, "_glTexImage2D": _glTexImage2D, "_emscripten_glGetShaderiv": _emscripten_glGetShaderiv, "_glfwSetKeyCallback": _glfwSetKeyCallback, "_emscripten_glGenFramebuffers": _emscripten_glGenFramebuffers, "_emscripten_glUniformMatrix4fv": _emscripten_glUniformMatrix4fv, "_emscripten_glLoadIdentity": _emscripten_glLoadIdentity, "_glDeleteShader": _glDeleteShader, "_emscripten_glUniform1f": _emscripten_glUniform1f, "_glGetProgramiv": _glGetProgramiv, "_emscripten_glBindFramebuffer": _emscripten_glBindFramebuffer, "_emscripten_glIsRenderbuffer": _emscripten_glIsRenderbuffer, "_glfwGetTime": _glfwGetTime, "_emscripten_glRenderbufferStorage": _emscripten_glRenderbufferStorage, "_emscripten_set_gamepadconnected_callback": _emscripten_set_gamepadconnected_callback, "_emscripten_glGetVertexAttribiv": _emscripten_glGetVertexAttribiv, "_emscripten_glBindVertexArray": _emscripten_glBindVertexArray, "_emscripten_glDrawArraysInstanced": _emscripten_glDrawArraysInstanced, "_emscripten_set_touchcancel_callback": _emscripten_set_touchcancel_callback, "_emscripten_glCreateShader": _emscripten_glCreateShader, "_emscripten_glStencilFuncSeparate": _emscripten_glStencilFuncSeparate, "_emscripten_glDeleteTextures": _emscripten_glDeleteTextures, "_glfwGetKey": _glfwGetKey, "_glfwGetPrimaryMonitor": _glfwGetPrimaryMonitor, "_glLinkProgram": _glLinkProgram, "_emscripten_glVertexAttribDivisor": _emscripten_glVertexAttribDivisor, "_emscripten_set_touchend_callback": _emscripten_set_touchend_callback, "_emscripten_glGetUniformfv": _emscripten_glGetUniformfv, "_emscripten_glGetVertexAttribfv": _emscripten_glGetVertexAttribfv, "_emscripten_glGetRenderbufferParameteriv": _emscripten_glGetRenderbufferParameteriv, "_emscripten_glDeleteFramebuffers": _emscripten_glDeleteFramebuffers, "_glGetShaderiv": _glGetShaderiv, "_emscripten_glVertexAttrib3fv": _emscripten_glVertexAttrib3fv, "_glGetUniformLocation": _glGetUniformLocation, "_emscripten_glGetInfoLogARB": _emscripten_glGetInfoLogARB, "_emscripten_glCompileShader": _emscripten_glCompileShader, "_glClear": _glClear, "_glUniform4fv": _glUniform4fv, "_emscripten_glFrustum": _emscripten_glFrustum, "_glRenderbufferStorage": _glRenderbufferStorage, "_emscripten_glDepthRangef": _emscripten_glDepthRangef, "__exit": __exit, "_emscripten_glLineWidth": _emscripten_glLineWidth, "_emscripten_glGetShaderInfoLog": _emscripten_glGetShaderInfoLog, "_emscripten_glStencilOp": _emscripten_glStencilOp, "_glBindAttribLocation": _glBindAttribLocation, "_glPixelStorei": _glPixelStorei, "_emscripten_glColorMask": _emscripten_glColorMask, "_emscripten_glLinkProgram": _emscripten_glLinkProgram, "_emscripten_glBlendEquation": _emscripten_glBlendEquation, "_emscripten_glIsTexture": _emscripten_glIsTexture, "_emscripten_glGetProgramiv": _emscripten_glGetProgramiv, "_glfwMakeContextCurrent": _glfwMakeContextCurrent, "_emscripten_glUniformMatrix3fv": _emscripten_glUniformMatrix3fv, "_emscripten_glHint": _emscripten_glHint, "_glfwSetMouseButtonCallback": _glfwSetMouseButtonCallback, "_glfwGetCursorPos": _glfwGetCursorPos, "_emscripten_glActiveTexture": _emscripten_glActiveTexture, "_emscripten_glDeleteBuffers": _emscripten_glDeleteBuffers, "___syscall54": ___syscall54, "___unlock": ___unlock, "_emscripten_glBufferSubData": _emscripten_glBufferSubData, "_glfwSwapBuffers": _glfwSwapBuffers, "_emscripten_glDepthRange": _emscripten_glDepthRange, "_emscripten_set_main_loop": _emscripten_set_main_loop, "_emscripten_glBindRenderbuffer": _emscripten_glBindRenderbuffer, "_emscripten_glGetProgramInfoLog": _emscripten_glGetProgramInfoLog, "_glfwWindowHint": _glfwWindowHint, "_emscripten_glIsShader": _emscripten_glIsShader, "_emscripten_glUniform4fv": _emscripten_glUniform4fv, "_emscripten_glGenVertexArrays": _emscripten_glGenVertexArrays, "_glCompressedTexImage2D": _glCompressedTexImage2D, "_emscripten_glDrawArrays": _emscripten_glDrawArrays, "_glGenRenderbuffers": _glGenRenderbuffers, "_emscripten_glCompressedTexImage2D": _emscripten_glCompressedTexImage2D, "_emscripten_glClearColor": _emscripten_glClearColor, "_emscripten_glBufferData": _emscripten_glBufferData, "_emscripten_glCreateProgram": _emscripten_glCreateProgram, "_emscripten_glCopyTexSubImage2D": _emscripten_glCopyTexSubImage2D, "_glTexParameteri": _glTexParameteri, "_emscripten_glBindBuffer": _emscripten_glBindBuffer, "_emscripten_glGetFloatv": _emscripten_glGetFloatv, "_emscripten_glDetachShader": _emscripten_glDetachShader, "_glClearColor": _glClearColor, "_glfwSetCursorPosCallback": _glfwSetCursorPosCallback, "_glfwSetCursorEnterCallback": _glfwSetCursorEnterCallback, "_emscripten_glCopyTexImage2D": _emscripten_glCopyTexImage2D, "_emscripten_glTexImage2D": _emscripten_glTexImage2D, "DYNAMICTOP_PTR": DYNAMICTOP_PTR, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "cttz_i8": cttz_i8 }; +Module.asmLibraryArg = { "abort": abort, "assert": assert, "enlargeMemory": enlargeMemory, "getTotalMemory": getTotalMemory, "abortOnCannotGrowMemory": abortOnCannotGrowMemory, "abortStackOverflow": abortStackOverflow, "nullFunc_viiiii": nullFunc_viiiii, "nullFunc_vd": nullFunc_vd, "nullFunc_vid": nullFunc_vid, "nullFunc_vi": nullFunc_vi, "nullFunc_vii": nullFunc_vii, "nullFunc_ii": nullFunc_ii, "nullFunc_viddd": nullFunc_viddd, "nullFunc_vidd": nullFunc_vidd, "nullFunc_iiii": nullFunc_iiii, "nullFunc_viiiiiiii": nullFunc_viiiiiiii, "nullFunc_viiiiii": nullFunc_viiiiii, "nullFunc_viii": nullFunc_viii, "nullFunc_vidddd": nullFunc_vidddd, "nullFunc_vdi": nullFunc_vdi, "nullFunc_viiiiiii": nullFunc_viiiiiii, "nullFunc_viiiiiiiii": nullFunc_viiiiiiiii, "nullFunc_iii": nullFunc_iii, "nullFunc_i": nullFunc_i, "nullFunc_vdddddd": nullFunc_vdddddd, "nullFunc_vdddd": nullFunc_vdddd, "nullFunc_vdd": nullFunc_vdd, "nullFunc_v": nullFunc_v, "nullFunc_viid": nullFunc_viid, "nullFunc_viiii": nullFunc_viiii, "invoke_viiiii": invoke_viiiii, "invoke_vd": invoke_vd, "invoke_vid": invoke_vid, "invoke_vi": invoke_vi, "invoke_vii": invoke_vii, "invoke_ii": invoke_ii, "invoke_viddd": invoke_viddd, "invoke_vidd": invoke_vidd, "invoke_iiii": invoke_iiii, "invoke_viiiiiiii": invoke_viiiiiiii, "invoke_viiiiii": invoke_viiiiii, "invoke_viii": invoke_viii, "invoke_vidddd": invoke_vidddd, "invoke_vdi": invoke_vdi, "invoke_viiiiiii": invoke_viiiiiii, "invoke_viiiiiiiii": invoke_viiiiiiiii, "invoke_iii": invoke_iii, "invoke_i": invoke_i, "invoke_vdddddd": invoke_vdddddd, "invoke_vdddd": invoke_vdddd, "invoke_vdd": invoke_vdd, "invoke_v": invoke_v, "invoke_viid": invoke_viid, "invoke_viiii": invoke_viiii, "_emscripten_glGetTexParameterfv": _emscripten_glGetTexParameterfv, "_glUseProgram": _glUseProgram, "_emscripten_glShaderSource": _emscripten_glShaderSource, "_glfwCreateWindow": _glfwCreateWindow, "_emscripten_glReleaseShaderCompiler": _emscripten_glReleaseShaderCompiler, "_emscripten_glBlendFuncSeparate": _emscripten_glBlendFuncSeparate, "_emscripten_glVertexAttribPointer": _emscripten_glVertexAttribPointer, "_emscripten_glGetIntegerv": _emscripten_glGetIntegerv, "_emscripten_glCullFace": _emscripten_glCullFace, "_emscripten_glIsProgram": _emscripten_glIsProgram, "_emscripten_glStencilMaskSeparate": _emscripten_glStencilMaskSeparate, "_emscripten_glViewport": _emscripten_glViewport, "_glUniform2fv": _glUniform2fv, "_emscripten_glFrontFace": _emscripten_glFrontFace, "_glDeleteProgram": _glDeleteProgram, "_emscripten_glUniform3fv": _emscripten_glUniform3fv, "_emscripten_glPolygonOffset": _emscripten_glPolygonOffset, "_emscripten_glUseProgram": _emscripten_glUseProgram, "_emscripten_glBlendColor": _emscripten_glBlendColor, "_glBindBuffer": _glBindBuffer, "_emscripten_glDepthFunc": _emscripten_glDepthFunc, "_glGetShaderInfoLog": _glGetShaderInfoLog, "_emscripten_set_fullscreenchange_callback": _emscripten_set_fullscreenchange_callback, "_emscripten_set_touchmove_callback": _emscripten_set_touchmove_callback, "_emscripten_set_main_loop_timing": _emscripten_set_main_loop_timing, "_glDisable": _glDisable, "_glBlendFunc": _glBlendFunc, "_emscripten_glDisableVertexAttribArray": _emscripten_glDisableVertexAttribArray, "_glGetAttribLocation": _glGetAttribLocation, "_glDisableVertexAttribArray": _glDisableVertexAttribArray, "_glCreateShader": _glCreateShader, "_emscripten_glReadPixels": _emscripten_glReadPixels, "_emscripten_glSampleCoverage": _emscripten_glSampleCoverage, "_emscripten_glVertexPointer": _emscripten_glVertexPointer, "_emscripten_set_touchstart_callback": _emscripten_set_touchstart_callback, "emscriptenWebGLComputeImageSize": emscriptenWebGLComputeImageSize, "_emscripten_glGetBooleanv": _emscripten_glGetBooleanv, "_emscripten_glGetShaderSource": _emscripten_glGetShaderSource, "_glUniform4f": _glUniform4f, "_llvm_stacksave": _llvm_stacksave, "_emscripten_glUniform1i": _emscripten_glUniform1i, "_emscripten_glLoadMatrixf": _emscripten_glLoadMatrixf, "_emscripten_glGenBuffers": _emscripten_glGenBuffers, "_emscripten_glDeleteObjectARB": _emscripten_glDeleteObjectARB, "_glfwSetWindowSizeCallback": _glfwSetWindowSizeCallback, "_emscripten_glGetShaderPrecisionFormat": _emscripten_glGetShaderPrecisionFormat, "_glfwInit": _glfwInit, "_glGenBuffers": _glGenBuffers, "_glShaderSource": _glShaderSource, "_emscripten_glGetString": _emscripten_glGetString, "_emscripten_glIsFramebuffer": _emscripten_glIsFramebuffer, "_emscripten_glIsEnabled": _emscripten_glIsEnabled, "_emscripten_glScissor": _emscripten_glScissor, "_emscripten_glVertexAttrib4fv": _emscripten_glVertexAttrib4fv, "_emscripten_glFramebufferTexture2D": _emscripten_glFramebufferTexture2D, "_emscripten_glTexParameteriv": _emscripten_glTexParameteriv, "_emscripten_glBindProgramARB": _emscripten_glBindProgramARB, "_emscripten_glStencilOpSeparate": _emscripten_glStencilOpSeparate, "_emscripten_glFramebufferRenderbuffer": _emscripten_glFramebufferRenderbuffer, "___syscall140": ___syscall140, "_glfwSetErrorCallback": _glfwSetErrorCallback, "_glfwDefaultWindowHints": _glfwDefaultWindowHints, "_glfwDestroyWindow": _glfwDestroyWindow, "___syscall146": ___syscall146, "_emscripten_glGetActiveAttrib": _emscripten_glGetActiveAttrib, "_emscripten_glAttachShader": _emscripten_glAttachShader, "_glVertexAttribPointer": _glVertexAttribPointer, "_emscripten_glUniform2i": _emscripten_glUniform2i, "_emscripten_glUniform2f": _emscripten_glUniform2f, "_emscripten_glTexParameterfv": _emscripten_glTexParameterfv, "_emscripten_glUniformMatrix2fv": _emscripten_glUniformMatrix2fv, "_glGetProgramInfoLog": _glGetProgramInfoLog, "_glfwSetScrollCallback": _glfwSetScrollCallback, "_emscripten_glTexParameterf": _emscripten_glTexParameterf, "_emscripten_glGetAttachedShaders": _emscripten_glGetAttachedShaders, "_emscripten_glGenTextures": _emscripten_glGenTextures, "_emscripten_glTexParameteri": _emscripten_glTexParameteri, "_llvm_stackrestore": _llvm_stackrestore, "_glBindRenderbuffer": _glBindRenderbuffer, "_emscripten_glClear": _emscripten_glClear, "_glDrawElements": _glDrawElements, "_glBufferSubData": _glBufferSubData, "_emscripten_glValidateProgram": _emscripten_glValidateProgram, "_emscripten_glVertexAttrib2fv": _emscripten_glVertexAttrib2fv, "_glViewport": _glViewport, "_emscripten_glUniform4iv": _emscripten_glUniform4iv, "_emscripten_glGetTexParameteriv": _emscripten_glGetTexParameteriv, "___setErrNo": ___setErrNo, "_eglGetProcAddress": _eglGetProcAddress, "_emscripten_glBindAttribLocation": _emscripten_glBindAttribLocation, "_glDeleteTextures": _glDeleteTextures, "_glDepthFunc": _glDepthFunc, "_emscripten_glClientActiveTexture": _emscripten_glClientActiveTexture, "_emscripten_glVertexAttrib2f": _emscripten_glVertexAttrib2f, "_emscripten_glFlush": _emscripten_glFlush, "_emscripten_glCheckFramebufferStatus": _emscripten_glCheckFramebufferStatus, "_emscripten_glGenerateMipmap": _emscripten_glGenerateMipmap, "_emscripten_glGetError": _emscripten_glGetError, "_emscripten_glClearDepthf": _emscripten_glClearDepthf, "_emscripten_glUniform3f": _emscripten_glUniform3f, "_emscripten_glUniform3i": _emscripten_glUniform3i, "_emscripten_glRotatef": _emscripten_glRotatef, "_emscripten_glDeleteShader": _emscripten_glDeleteShader, "_glEnable": _glEnable, "_emscripten_glVertexAttrib1fv": _emscripten_glVertexAttrib1fv, "_glGenTextures": _glGenTextures, "_emscripten_glMatrixMode": _emscripten_glMatrixMode, "_glGetString": _glGetString, "_emscripten_glClearStencil": _emscripten_glClearStencil, "_emscripten_glGetUniformLocation": _emscripten_glGetUniformLocation, "emscriptenWebGLGet": emscriptenWebGLGet, "_emscripten_glEnableVertexAttribArray": _emscripten_glEnableVertexAttribArray, "_emscripten_glGetAttribLocation": _emscripten_glGetAttribLocation, "_emscripten_get_now": _emscripten_get_now, "_emscripten_glDisable": _emscripten_glDisable, "_emscripten_glNormalPointer": _emscripten_glNormalPointer, "_glAttachShader": _glAttachShader, "_glFramebufferRenderbuffer": _glFramebufferRenderbuffer, "_emscripten_glEnable": _emscripten_glEnable, "_glCreateProgram": _glCreateProgram, "_glUniformMatrix4fv": _glUniformMatrix4fv, "_emscripten_glClearDepth": _emscripten_glClearDepth, "___lock": ___lock, "emscriptenWebGLGetTexPixelData": emscriptenWebGLGetTexPixelData, "___syscall6": ___syscall6, "_emscripten_glIsBuffer": _emscripten_glIsBuffer, "_emscripten_glVertexAttrib3f": _emscripten_glVertexAttrib3f, "_time": _time, "_glBindFramebuffer": _glBindFramebuffer, "_emscripten_glVertexAttrib1f": _emscripten_glVertexAttrib1f, "_glGenFramebuffers": _glGenFramebuffers, "_glfwSetMouseButtonCallback": _glfwSetMouseButtonCallback, "_emscripten_glBlendEquationSeparate": _emscripten_glBlendEquationSeparate, "_exit": _exit, "_emscripten_glEnableClientState": _emscripten_glEnableClientState, "_emscripten_glUniform4i": _emscripten_glUniform4i, "_emscripten_glDrawRangeElements": _emscripten_glDrawRangeElements, "_glCullFace": _glCullFace, "_emscripten_glGetPointerv": _emscripten_glGetPointerv, "_emscripten_set_keypress_callback": _emscripten_set_keypress_callback, "__emscripten_sample_gamepad_data": __emscripten_sample_gamepad_data, "_glDeleteFramebuffers": _glDeleteFramebuffers, "_emscripten_get_gamepad_status": _emscripten_get_gamepad_status, "_emscripten_glUniform4f": _emscripten_glUniform4f, "_emscripten_glUniform2fv": _emscripten_glUniform2fv, "_glfwGetVideoModes": _glfwGetVideoModes, "_glUniform1fv": _glUniform1fv, "_emscripten_set_click_callback": _emscripten_set_click_callback, "_glCheckFramebufferStatus": _glCheckFramebufferStatus, "_glFramebufferTexture2D": _glFramebufferTexture2D, "_emscripten_glShaderBinary": _emscripten_glShaderBinary, "_emscripten_glDrawElements": _emscripten_glDrawElements, "_emscripten_glBlendFunc": _emscripten_glBlendFunc, "_emscripten_get_num_gamepads": _emscripten_get_num_gamepads, "_emscripten_glStencilMask": _emscripten_glStencilMask, "_glUniform3fv": _glUniform3fv, "_emscripten_glUniform1iv": _emscripten_glUniform1iv, "_emscripten_glGetVertexAttribPointerv": _emscripten_glGetVertexAttribPointerv, "_glClearDepthf": _glClearDepthf, "_emscripten_glCompressedTexSubImage2D": _emscripten_glCompressedTexSubImage2D, "emscriptenWebGLGetUniform": emscriptenWebGLGetUniform, "_emscripten_glGenRenderbuffers": _emscripten_glGenRenderbuffers, "_emscripten_glDeleteVertexArrays": _emscripten_glDeleteVertexArrays, "_glfwSetWindowShouldClose": _glfwSetWindowShouldClose, "_emscripten_glUniform1fv": _emscripten_glUniform1fv, "_emscripten_glGetActiveUniform": _emscripten_glGetActiveUniform, "_glBindTexture": _glBindTexture, "_emscripten_glUniform3iv": _emscripten_glUniform3iv, "_emscripten_glUniform2iv": _emscripten_glUniform2iv, "_emscripten_glHint": _emscripten_glHint, "_glfwSetCharCallback": _glfwSetCharCallback, "emscriptenWebGLGetVertexAttrib": emscriptenWebGLGetVertexAttrib, "_glGetFloatv": _glGetFloatv, "_emscripten_glDeleteProgram": _emscripten_glDeleteProgram, "_emscripten_glDeleteRenderbuffers": _emscripten_glDeleteRenderbuffers, "_emscripten_glDrawElementsInstanced": _emscripten_glDrawElementsInstanced, "_emscripten_glVertexAttrib4f": _emscripten_glVertexAttrib4f, "_glDrawArrays": _glDrawArrays, "_emscripten_glTexSubImage2D": _emscripten_glTexSubImage2D, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_emscripten_glPixelStorei": _emscripten_glPixelStorei, "_glCompileShader": _glCompileShader, "_emscripten_get_pointerlock_status": _emscripten_get_pointerlock_status, "_glfwGetMouseButton": _glfwGetMouseButton, "_emscripten_glColorPointer": _emscripten_glColorPointer, "_emscripten_glTexCoordPointer": _emscripten_glTexCoordPointer, "_emscripten_glGetBufferParameteriv": _emscripten_glGetBufferParameteriv, "_emscripten_glFinish": _emscripten_glFinish, "_emscripten_request_pointerlock": _emscripten_request_pointerlock, "_emscripten_set_gamepaddisconnected_callback": _emscripten_set_gamepaddisconnected_callback, "_emscripten_asm_const_iii": _emscripten_asm_const_iii, "_emscripten_glDepthMask": _emscripten_glDepthMask, "_glfwSetWindowIconifyCallback": _glfwSetWindowIconifyCallback, "_emscripten_glDrawBuffers": _emscripten_glDrawBuffers, "_glfwTerminate": _glfwTerminate, "_glFrontFace": _glFrontFace, "_emscripten_glGetObjectParameterivARB": _emscripten_glGetObjectParameterivARB, "_emscripten_exit_pointerlock": _emscripten_exit_pointerlock, "_glfwSwapInterval": _glfwSwapInterval, "_glUniform1i": _glUniform1i, "_glEnableVertexAttribArray": _glEnableVertexAttribArray, "_emscripten_glStencilFunc": _emscripten_glStencilFunc, "_abort": _abort, "_emscripten_glGetUniformiv": _emscripten_glGetUniformiv, "_glDeleteBuffers": _glDeleteBuffers, "_glBufferData": _glBufferData, "_glTexImage2D": _glTexImage2D, "_emscripten_glGetShaderiv": _emscripten_glGetShaderiv, "_glfwSetKeyCallback": _glfwSetKeyCallback, "_emscripten_glGenFramebuffers": _emscripten_glGenFramebuffers, "_emscripten_glUniformMatrix4fv": _emscripten_glUniformMatrix4fv, "_emscripten_glLoadIdentity": _emscripten_glLoadIdentity, "_glDeleteShader": _glDeleteShader, "_emscripten_glUniform1f": _emscripten_glUniform1f, "_glGetProgramiv": _glGetProgramiv, "_emscripten_glBindFramebuffer": _emscripten_glBindFramebuffer, "_emscripten_glIsRenderbuffer": _emscripten_glIsRenderbuffer, "_glfwGetTime": _glfwGetTime, "_emscripten_glRenderbufferStorage": _emscripten_glRenderbufferStorage, "_emscripten_set_gamepadconnected_callback": _emscripten_set_gamepadconnected_callback, "_emscripten_glGetVertexAttribiv": _emscripten_glGetVertexAttribiv, "_emscripten_glBindVertexArray": _emscripten_glBindVertexArray, "_emscripten_glDrawArraysInstanced": _emscripten_glDrawArraysInstanced, "_emscripten_set_touchcancel_callback": _emscripten_set_touchcancel_callback, "_emscripten_glCreateShader": _emscripten_glCreateShader, "_emscripten_glStencilFuncSeparate": _emscripten_glStencilFuncSeparate, "_emscripten_glDeleteTextures": _emscripten_glDeleteTextures, "_glfwGetKey": _glfwGetKey, "_glfwGetPrimaryMonitor": _glfwGetPrimaryMonitor, "_glLinkProgram": _glLinkProgram, "_emscripten_glVertexAttribDivisor": _emscripten_glVertexAttribDivisor, "_emscripten_set_touchend_callback": _emscripten_set_touchend_callback, "_emscripten_glGetUniformfv": _emscripten_glGetUniformfv, "_emscripten_glGetVertexAttribfv": _emscripten_glGetVertexAttribfv, "_emscripten_glGetRenderbufferParameteriv": _emscripten_glGetRenderbufferParameteriv, "_emscripten_glDeleteFramebuffers": _emscripten_glDeleteFramebuffers, "_glGetShaderiv": _glGetShaderiv, "_emscripten_glVertexAttrib3fv": _emscripten_glVertexAttrib3fv, "_glGetUniformLocation": _glGetUniformLocation, "_emscripten_glGetInfoLogARB": _emscripten_glGetInfoLogARB, "_emscripten_glCompileShader": _emscripten_glCompileShader, "_glClear": _glClear, "_glUniform4fv": _glUniform4fv, "_emscripten_glFrustum": _emscripten_glFrustum, "_glRenderbufferStorage": _glRenderbufferStorage, "_emscripten_glDepthRangef": _emscripten_glDepthRangef, "__exit": __exit, "_emscripten_glLineWidth": _emscripten_glLineWidth, "_emscripten_glGetShaderInfoLog": _emscripten_glGetShaderInfoLog, "_emscripten_glStencilOp": _emscripten_glStencilOp, "_glBindAttribLocation": _glBindAttribLocation, "_glPixelStorei": _glPixelStorei, "_emscripten_glColorMask": _emscripten_glColorMask, "_emscripten_glLinkProgram": _emscripten_glLinkProgram, "_emscripten_glBlendEquation": _emscripten_glBlendEquation, "_emscripten_glIsTexture": _emscripten_glIsTexture, "_emscripten_glGetProgramiv": _emscripten_glGetProgramiv, "_glfwMakeContextCurrent": _glfwMakeContextCurrent, "_emscripten_glUniformMatrix3fv": _emscripten_glUniformMatrix3fv, "_emscripten_glBindTexture": _emscripten_glBindTexture, "_emscripten_glGetFramebufferAttachmentParameteriv": _emscripten_glGetFramebufferAttachmentParameteriv, "_glfwGetCursorPos": _glfwGetCursorPos, "_emscripten_glActiveTexture": _emscripten_glActiveTexture, "_emscripten_glDeleteBuffers": _emscripten_glDeleteBuffers, "___syscall54": ___syscall54, "___unlock": ___unlock, "_emscripten_glBufferSubData": _emscripten_glBufferSubData, "_glfwSwapBuffers": _glfwSwapBuffers, "_emscripten_glDepthRange": _emscripten_glDepthRange, "_emscripten_set_main_loop": _emscripten_set_main_loop, "_emscripten_glBindRenderbuffer": _emscripten_glBindRenderbuffer, "_emscripten_glGetProgramInfoLog": _emscripten_glGetProgramInfoLog, "_glfwWindowHint": _glfwWindowHint, "_emscripten_glIsShader": _emscripten_glIsShader, "_emscripten_glUniform4fv": _emscripten_glUniform4fv, "_emscripten_glGenVertexArrays": _emscripten_glGenVertexArrays, "_glCompressedTexImage2D": _glCompressedTexImage2D, "_emscripten_glDrawArrays": _emscripten_glDrawArrays, "_glGenRenderbuffers": _glGenRenderbuffers, "_emscripten_glCompressedTexImage2D": _emscripten_glCompressedTexImage2D, "_emscripten_glClearColor": _emscripten_glClearColor, "_emscripten_glBufferData": _emscripten_glBufferData, "_emscripten_glCreateProgram": _emscripten_glCreateProgram, "_emscripten_glCopyTexSubImage2D": _emscripten_glCopyTexSubImage2D, "_glTexParameteri": _glTexParameteri, "_emscripten_glBindBuffer": _emscripten_glBindBuffer, "_emscripten_glGetFloatv": _emscripten_glGetFloatv, "_emscripten_glDetachShader": _emscripten_glDetachShader, "_glClearColor": _glClearColor, "_glfwSetCursorPosCallback": _glfwSetCursorPosCallback, "_glfwSetCursorEnterCallback": _glfwSetCursorEnterCallback, "_emscripten_glCopyTexImage2D": _emscripten_glCopyTexImage2D, "_emscripten_glTexImage2D": _emscripten_glTexImage2D, "DYNAMICTOP_PTR": DYNAMICTOP_PTR, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "cttz_i8": cttz_i8 }; // EMSCRIPTEN_START_ASM var asm = (function(global, env, buffer) { 'use asm'; @@ -7005,7 +7001,6 @@ var asm = (function(global, env, buffer) { var _glDisableVertexAttribArray=env._glDisableVertexAttribArray; var _glCreateShader=env._glCreateShader; var _emscripten_glReadPixels=env._emscripten_glReadPixels; - var _glCompileShader=env._glCompileShader; var _emscripten_glSampleCoverage=env._emscripten_glSampleCoverage; var _emscripten_glVertexPointer=env._emscripten_glVertexPointer; var _emscripten_set_touchstart_callback=env._emscripten_set_touchstart_callback; @@ -7090,7 +7085,7 @@ var asm = (function(global, env, buffer) { var _emscripten_get_now=env._emscripten_get_now; var _emscripten_glDisable=env._emscripten_glDisable; var _emscripten_glNormalPointer=env._emscripten_glNormalPointer; - var _emscripten_glBindTexture=env._emscripten_glBindTexture; + var _glAttachShader=env._glAttachShader; var _glFramebufferRenderbuffer=env._glFramebufferRenderbuffer; var _emscripten_glEnable=env._emscripten_glEnable; var _glCreateProgram=env._glCreateProgram; @@ -7105,7 +7100,7 @@ var asm = (function(global, env, buffer) { var _glBindFramebuffer=env._glBindFramebuffer; var _emscripten_glVertexAttrib1f=env._emscripten_glVertexAttrib1f; var _glGenFramebuffers=env._glGenFramebuffers; - var _emscripten_glGetFramebufferAttachmentParameteriv=env._emscripten_glGetFramebufferAttachmentParameteriv; + var _glfwSetMouseButtonCallback=env._glfwSetMouseButtonCallback; var _emscripten_glBlendEquationSeparate=env._emscripten_glBlendEquationSeparate; var _exit=env._exit; var _emscripten_glEnableClientState=env._emscripten_glEnableClientState; @@ -7143,7 +7138,7 @@ var asm = (function(global, env, buffer) { var _glBindTexture=env._glBindTexture; var _emscripten_glUniform3iv=env._emscripten_glUniform3iv; var _emscripten_glUniform2iv=env._emscripten_glUniform2iv; - var _glfwSetCursorPos=env._glfwSetCursorPos; + var _emscripten_glHint=env._emscripten_glHint; var _glfwSetCharCallback=env._glfwSetCharCallback; var emscriptenWebGLGetVertexAttrib=env.emscriptenWebGLGetVertexAttrib; var _glGetFloatv=env._glGetFloatv; @@ -7155,7 +7150,7 @@ var asm = (function(global, env, buffer) { var _emscripten_glTexSubImage2D=env._emscripten_glTexSubImage2D; var _emscripten_memcpy_big=env._emscripten_memcpy_big; var _emscripten_glPixelStorei=env._emscripten_glPixelStorei; - var _glAttachShader=env._glAttachShader; + var _glCompileShader=env._glCompileShader; var _emscripten_get_pointerlock_status=env._emscripten_get_pointerlock_status; var _glfwGetMouseButton=env._glfwGetMouseButton; var _emscripten_glColorPointer=env._emscripten_glColorPointer; @@ -7233,8 +7228,8 @@ var asm = (function(global, env, buffer) { var _emscripten_glGetProgramiv=env._emscripten_glGetProgramiv; var _glfwMakeContextCurrent=env._glfwMakeContextCurrent; var _emscripten_glUniformMatrix3fv=env._emscripten_glUniformMatrix3fv; - var _emscripten_glHint=env._emscripten_glHint; - var _glfwSetMouseButtonCallback=env._glfwSetMouseButtonCallback; + var _emscripten_glBindTexture=env._emscripten_glBindTexture; + var _emscripten_glGetFramebufferAttachmentParameteriv=env._emscripten_glGetFramebufferAttachmentParameteriv; var _glfwGetCursorPos=env._glfwGetCursorPos; var _emscripten_glActiveTexture=env._emscripten_glActiveTexture; var _emscripten_glDeleteBuffers=env._emscripten_glDeleteBuffers; @@ -7321,14 +7316,14 @@ function _main() { $1 = HEAP32[3]|0; _InitWindow($0,$1,3524); _InitVrSimulator(2); - HEAPF32[4151] = 5.0; - HEAPF32[(16608)>>2] = 5.0; - HEAPF32[(16612)>>2] = 5.0; - ;HEAP32[(16616)>>2]=0|0;HEAP32[(16616)+4>>2]=0|0;HEAP32[(16616)+8>>2]=0|0;HEAP32[(16616)+12>>2]=0|0; - HEAPF32[(16632)>>2] = 1.0; - HEAPF32[(16636)>>2] = 0.0; - HEAPF32[(16640)>>2] = 60.0; - dest=$camera$byval_copy; src=16604; stop=dest+40|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + HEAPF32[4169] = 5.0; + HEAPF32[(16680)>>2] = 5.0; + HEAPF32[(16684)>>2] = 5.0; + ;HEAP32[(16688)>>2]=0|0;HEAP32[(16688)+4>>2]=0|0;HEAP32[(16688)+8>>2]=0|0;HEAP32[(16688)+12>>2]=0|0; + HEAPF32[(16704)>>2] = 1.0; + HEAPF32[(16708)>>2] = 0.0; + HEAPF32[(16712)>>2] = 60.0; + dest=$camera$byval_copy; src=16676; stop=dest+40|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); _SetCameraMode($camera$byval_copy,3); _emscripten_set_main_loop((1|0),0,1); _CloseVrSimulator(); @@ -7336,8 +7331,8 @@ function _main() { STACKTOP = sp;return 0; } function _UpdateDrawFrame() { - var $$byval_copy3 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $cubePosition$byval_copy2 = 0, dest = 0, label = 0, sp = 0, src = 0; - var stop = 0; + var $$byval_copy3 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $cubePosition$byval_copy2 = 0, dest = 0, label = 0; + var sp = 0, src = 0, stop = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(80|0); $$byval_copy3 = sp + 16|0; @@ -7345,43 +7340,48 @@ function _UpdateDrawFrame() { $0 = sp + 64|0; $1 = sp + 60|0; $2 = sp + 56|0; - _UpdateCamera(16604); + _UpdateCamera(16676); $3 = (_IsKeyPressed(32)|0); $4 = ($3|0)==(0); if (!($4)) { _ToggleVrMode(); } + $5 = (_IsMouseButtonPressed(0)|0); + $6 = ($5|0)==(0); + if (!($6)) { + _DisableCursor(); + } _BeginDrawing(); HEAP8[$0>>0] = -11; - $5 = ((($0)) + 1|0); - HEAP8[$5>>0] = -11; - $6 = ((($0)) + 2|0); - HEAP8[$6>>0] = -11; - $7 = ((($0)) + 3|0); - HEAP8[$7>>0] = -1; + $7 = ((($0)) + 1|0); + HEAP8[$7>>0] = -11; + $8 = ((($0)) + 2|0); + HEAP8[$8>>0] = -11; + $9 = ((($0)) + 3|0); + HEAP8[$9>>0] = -1; ;HEAP8[$$byval_copy3>>0]=HEAP8[$0>>0]|0;HEAP8[$$byval_copy3+1>>0]=HEAP8[$0+1>>0]|0;HEAP8[$$byval_copy3+2>>0]=HEAP8[$0+2>>0]|0;HEAP8[$$byval_copy3+3>>0]=HEAP8[$0+3>>0]|0; _ClearBackground($$byval_copy3); _BeginVrDrawing(); - dest=$$byval_copy3; src=16604; stop=dest+40|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$$byval_copy3; src=16676; stop=dest+40|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); _Begin3dMode($$byval_copy3); HEAP8[$1>>0] = -26; - $8 = ((($1)) + 1|0); - HEAP8[$8>>0] = 41; - $9 = ((($1)) + 2|0); - HEAP8[$9>>0] = 55; - $10 = ((($1)) + 3|0); - HEAP8[$10>>0] = -1; - ;HEAP32[$cubePosition$byval_copy2>>2]=HEAP32[16592>>2]|0;HEAP32[$cubePosition$byval_copy2+4>>2]=HEAP32[16592+4>>2]|0;HEAP32[$cubePosition$byval_copy2+8>>2]=HEAP32[16592+8>>2]|0; + $10 = ((($1)) + 1|0); + HEAP8[$10>>0] = 41; + $11 = ((($1)) + 2|0); + HEAP8[$11>>0] = 55; + $12 = ((($1)) + 3|0); + HEAP8[$12>>0] = -1; + ;HEAP32[$cubePosition$byval_copy2>>2]=HEAP32[16664>>2]|0;HEAP32[$cubePosition$byval_copy2+4>>2]=HEAP32[16664+4>>2]|0;HEAP32[$cubePosition$byval_copy2+8>>2]=HEAP32[16664+8>>2]|0; ;HEAP8[$$byval_copy3>>0]=HEAP8[$1>>0]|0;HEAP8[$$byval_copy3+1>>0]=HEAP8[$1+1>>0]|0;HEAP8[$$byval_copy3+2>>0]=HEAP8[$1+2>>0]|0;HEAP8[$$byval_copy3+3>>0]=HEAP8[$1+3>>0]|0; _DrawCube($cubePosition$byval_copy2,2.0,2.0,2.0,$$byval_copy3); HEAP8[$2>>0] = -66; - $11 = ((($2)) + 1|0); - HEAP8[$11>>0] = 33; - $12 = ((($2)) + 2|0); - HEAP8[$12>>0] = 55; - $13 = ((($2)) + 3|0); - HEAP8[$13>>0] = -1; - ;HEAP32[$cubePosition$byval_copy2>>2]=HEAP32[16592>>2]|0;HEAP32[$cubePosition$byval_copy2+4>>2]=HEAP32[16592+4>>2]|0;HEAP32[$cubePosition$byval_copy2+8>>2]=HEAP32[16592+8>>2]|0; + $13 = ((($2)) + 1|0); + HEAP8[$13>>0] = 33; + $14 = ((($2)) + 2|0); + HEAP8[$14>>0] = 55; + $15 = ((($2)) + 3|0); + HEAP8[$15>>0] = -1; + ;HEAP32[$cubePosition$byval_copy2>>2]=HEAP32[16664>>2]|0;HEAP32[$cubePosition$byval_copy2+4>>2]=HEAP32[16664+4>>2]|0;HEAP32[$cubePosition$byval_copy2+8>>2]=HEAP32[16664+8>>2]|0; ;HEAP8[$$byval_copy3>>0]=HEAP8[$2>>0]|0;HEAP8[$$byval_copy3+1>>0]=HEAP8[$2+1>>0]|0;HEAP8[$$byval_copy3+2>>0]=HEAP8[$2+2>>0]|0;HEAP8[$$byval_copy3+3>>0]=HEAP8[$2+3>>0]|0; _DrawCubeWires($cubePosition$byval_copy2,2.0,2.0,2.0,$$byval_copy3); _DrawGrid(40,1.0); @@ -7391,2285 +7391,6 @@ function _UpdateDrawFrame() { _EndDrawing(); STACKTOP = sp;return; } -function _Vector2Distance($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $2 = +HEAPF32[$0>>2]; - $3 = +HEAPF32[$1>>2]; - $4 = $2 - $3; - $5 = $4 * $4; - $6 = ((($0)) + 4|0); - $7 = +HEAPF32[$6>>2]; - $8 = ((($1)) + 4|0); - $9 = +HEAPF32[$8>>2]; - $10 = $7 - $9; - $11 = $10 * $10; - $12 = $5 + $11; - $13 = (+Math_sqrt((+$12))); - return (+$13); -} -function _Vector2Angle($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $2 = ((($1)) + 4|0); - $3 = +HEAPF32[$2>>2]; - $4 = ((($0)) + 4|0); - $5 = +HEAPF32[$4>>2]; - $6 = $3 - $5; - $7 = +HEAPF32[$1>>2]; - $8 = +HEAPF32[$0>>2]; - $9 = $7 - $8; - $10 = (+Math_atan2((+$6),(+$9))); - $11 = $10 * 57.2957763671875; - $12 = $11 < 0.0; - $13 = $11 + 360.0; - $$0 = $12 ? $13 : $11; - return (+$$0); -} -function _VectorZero($0) { - $0 = $0|0; - var $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - HEAPF32[$0>>2] = 0.0; - $1 = ((($0)) + 4|0); - HEAPF32[$1>>2] = 0.0; - $2 = ((($0)) + 8|0); - HEAPF32[$2>>2] = 0.0; - return; -} -function _VectorSubtract($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $3 = +HEAPF32[$1>>2]; - $4 = +HEAPF32[$2>>2]; - $5 = $3 - $4; - HEAPF32[$0>>2] = $5; - $6 = ((($0)) + 4|0); - $7 = ((($1)) + 4|0); - $8 = +HEAPF32[$7>>2]; - $9 = ((($2)) + 4|0); - $10 = +HEAPF32[$9>>2]; - $11 = $8 - $10; - HEAPF32[$6>>2] = $11; - $12 = ((($0)) + 8|0); - $13 = ((($1)) + 8|0); - $14 = +HEAPF32[$13>>2]; - $15 = ((($2)) + 8|0); - $16 = +HEAPF32[$15>>2]; - $17 = $14 - $16; - HEAPF32[$12>>2] = $17; - return; -} -function _VectorCrossProduct($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $3 = 0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0; - var $9 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $3 = ((($1)) + 4|0); - $4 = +HEAPF32[$3>>2]; - $5 = ((($2)) + 8|0); - $6 = +HEAPF32[$5>>2]; - $7 = $4 * $6; - $8 = ((($1)) + 8|0); - $9 = +HEAPF32[$8>>2]; - $10 = ((($2)) + 4|0); - $11 = +HEAPF32[$10>>2]; - $12 = $9 * $11; - $13 = $7 - $12; - $14 = +HEAPF32[$2>>2]; - $15 = $9 * $14; - $16 = +HEAPF32[$1>>2]; - $17 = $6 * $16; - $18 = $15 - $17; - $19 = $11 * $16; - $20 = $4 * $14; - $21 = $19 - $20; - HEAPF32[$0>>2] = $13; - $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); - HEAPF32[$$sroa$4$0$$sroa_idx2>>2] = $18; - $$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0); - HEAPF32[$$sroa$5$0$$sroa_idx4>>2] = $21; - return; -} -function _VectorLength($0) { - $0 = $0|0; - var $1 = 0.0, $10 = 0.0, $11 = 0.0, $2 = 0.0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $1 = +HEAPF32[$0>>2]; - $2 = $1 * $1; - $3 = ((($0)) + 4|0); - $4 = +HEAPF32[$3>>2]; - $5 = $4 * $4; - $6 = $2 + $5; - $7 = ((($0)) + 8|0); - $8 = +HEAPF32[$7>>2]; - $9 = $8 * $8; - $10 = $6 + $9; - $11 = (+Math_sqrt((+$10))); - return (+$11); -} -function _VectorNormalize($0) { - $0 = $0|0; - var $$byval_copy = 0, $$op = 0.0, $1 = 0.0, $10 = 0.0, $11 = 0.0, $2 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $$byval_copy = sp; - ;HEAP32[$$byval_copy>>2]=HEAP32[$0>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$0+8>>2]|0; - $1 = (+_VectorLength($$byval_copy)); - $2 = $1 == 0.0; - $$op = 1.0 / $1; - $3 = $2 ? 1.0 : $$op; - $4 = +HEAPF32[$0>>2]; - $5 = $4 * $3; - HEAPF32[$0>>2] = $5; - $6 = ((($0)) + 4|0); - $7 = +HEAPF32[$6>>2]; - $8 = $3 * $7; - HEAPF32[$6>>2] = $8; - $9 = ((($0)) + 8|0); - $10 = +HEAPF32[$9>>2]; - $11 = $3 * $10; - HEAPF32[$9>>2] = $11; - STACKTOP = sp;return; -} -function _VectorTransform($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0.0, $19 = 0.0, $2 = 0.0, $20 = 0, $21 = 0.0, $22 = 0.0, $23 = 0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $27 = 0, $28 = 0.0; - var $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0, $35 = 0.0, $36 = 0.0, $37 = 0, $38 = 0.0, $39 = 0.0, $4 = 0.0, $40 = 0.0, $41 = 0, $42 = 0.0, $43 = 0.0, $44 = 0.0, $45 = 0, $46 = 0.0; - var $47 = 0.0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $2 = +HEAPF32[$0>>2]; - $3 = ((($0)) + 4|0); - $4 = +HEAPF32[$3>>2]; - $5 = ((($0)) + 8|0); - $6 = +HEAPF32[$5>>2]; - $7 = +HEAPF32[$1>>2]; - $8 = $2 * $7; - $9 = ((($1)) + 4|0); - $10 = +HEAPF32[$9>>2]; - $11 = $4 * $10; - $12 = $8 + $11; - $13 = ((($1)) + 8|0); - $14 = +HEAPF32[$13>>2]; - $15 = $6 * $14; - $16 = $12 + $15; - $17 = ((($1)) + 12|0); - $18 = +HEAPF32[$17>>2]; - $19 = $18 + $16; - HEAPF32[$0>>2] = $19; - $20 = ((($1)) + 16|0); - $21 = +HEAPF32[$20>>2]; - $22 = $2 * $21; - $23 = ((($1)) + 20|0); - $24 = +HEAPF32[$23>>2]; - $25 = $4 * $24; - $26 = $22 + $25; - $27 = ((($1)) + 24|0); - $28 = +HEAPF32[$27>>2]; - $29 = $6 * $28; - $30 = $26 + $29; - $31 = ((($1)) + 28|0); - $32 = +HEAPF32[$31>>2]; - $33 = $32 + $30; - HEAPF32[$3>>2] = $33; - $34 = ((($1)) + 32|0); - $35 = +HEAPF32[$34>>2]; - $36 = $2 * $35; - $37 = ((($1)) + 36|0); - $38 = +HEAPF32[$37>>2]; - $39 = $4 * $38; - $40 = $36 + $39; - $41 = ((($1)) + 40|0); - $42 = +HEAPF32[$41>>2]; - $43 = $6 * $42; - $44 = $40 + $43; - $45 = ((($1)) + 44|0); - $46 = +HEAPF32[$45>>2]; - $47 = $46 + $44; - HEAPF32[$5>>2] = $47; - return; -} -function _MatrixTranspose($0) { - $0 = $0|0; - var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0, $5 = 0; - var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = ((($0)) + 4|0); - $2 = HEAP32[$1>>2]|0; - $3 = ((($0)) + 8|0); - $4 = HEAP32[$3>>2]|0; - $5 = ((($0)) + 12|0); - $6 = HEAP32[$5>>2]|0; - $7 = ((($0)) + 16|0); - $8 = HEAP32[$7>>2]|0; - $9 = ((($0)) + 24|0); - $10 = HEAP32[$9>>2]|0; - $11 = ((($0)) + 28|0); - $12 = HEAP32[$11>>2]|0; - $13 = ((($0)) + 32|0); - $14 = HEAP32[$13>>2]|0; - $15 = ((($0)) + 36|0); - $16 = HEAP32[$15>>2]|0; - $17 = ((($0)) + 44|0); - $18 = HEAP32[$17>>2]|0; - $19 = ((($0)) + 48|0); - $20 = HEAP32[$19>>2]|0; - $21 = ((($0)) + 52|0); - $22 = HEAP32[$21>>2]|0; - $23 = ((($0)) + 56|0); - $24 = HEAP32[$23>>2]|0; - HEAP32[$1>>2] = $8; - HEAP32[$3>>2] = $14; - HEAP32[$5>>2] = $20; - HEAP32[$7>>2] = $2; - HEAP32[$9>>2] = $16; - HEAP32[$11>>2] = $22; - HEAP32[$13>>2] = $4; - HEAP32[$15>>2] = $10; - HEAP32[$17>>2] = $24; - HEAP32[$19>>2] = $6; - HEAP32[$21>>2] = $12; - HEAP32[$23>>2] = $18; - return; -} -function _MatrixIdentity($0) { - $0 = $0|0; - var $$sroa$5$0$$sroa_idx = 0, $$sroa$55$0$$sroa_idx6 = 0, $$sroa$6$0$$sroa_idx = 0, $$sroa$611$0$$sroa_idx12 = 0, $$sroa$7$0$$sroa_idx = 0, $$sroa$717$0$$sroa_idx18 = 0, label = 0, sp = 0; - sp = STACKTOP; - HEAPF32[$0>>2] = 1.0; - $$sroa$5$0$$sroa_idx = ((($0)) + 4|0); - ;HEAP32[$$sroa$5$0$$sroa_idx>>2]=0|0;HEAP32[$$sroa$5$0$$sroa_idx+4>>2]=0|0;HEAP32[$$sroa$5$0$$sroa_idx+8>>2]=0|0;HEAP32[$$sroa$5$0$$sroa_idx+12>>2]=0|0; - $$sroa$55$0$$sroa_idx6 = ((($0)) + 20|0); - HEAPF32[$$sroa$55$0$$sroa_idx6>>2] = 1.0; - $$sroa$6$0$$sroa_idx = ((($0)) + 24|0); - ;HEAP32[$$sroa$6$0$$sroa_idx>>2]=0|0;HEAP32[$$sroa$6$0$$sroa_idx+4>>2]=0|0;HEAP32[$$sroa$6$0$$sroa_idx+8>>2]=0|0;HEAP32[$$sroa$6$0$$sroa_idx+12>>2]=0|0; - $$sroa$611$0$$sroa_idx12 = ((($0)) + 40|0); - HEAPF32[$$sroa$611$0$$sroa_idx12>>2] = 1.0; - $$sroa$7$0$$sroa_idx = ((($0)) + 44|0); - ;HEAP32[$$sroa$7$0$$sroa_idx>>2]=0|0;HEAP32[$$sroa$7$0$$sroa_idx+4>>2]=0|0;HEAP32[$$sroa$7$0$$sroa_idx+8>>2]=0|0;HEAP32[$$sroa$7$0$$sroa_idx+12>>2]=0|0; - $$sroa$717$0$$sroa_idx18 = ((($0)) + 60|0); - HEAPF32[$$sroa$717$0$$sroa_idx18>>2] = 1.0; - return; -} -function _MatrixTranslate($0,$1,$2,$3) { - $0 = $0|0; - $1 = +$1; - $2 = +$2; - $3 = +$3; - var $$sroa$13$0$$sroa_idx20 = 0, $$sroa$14$0$$sroa_idx22 = 0, $$sroa$15$0$$sroa_idx24 = 0, $$sroa$16$0$$sroa_idx26 = 0, $$sroa$17$0$$sroa_idx28 = 0, $$sroa$18$0$$sroa_idx30 = 0, $$sroa$4$0$$sroa_idx2 = 0, $$sroa$8$0$$sroa_idx10 = 0, $$sroa$9$0$$sroa_idx12 = 0, label = 0, sp = 0; - sp = STACKTOP; - HEAPF32[$0>>2] = 1.0; - $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); - $$sroa$8$0$$sroa_idx10 = ((($0)) + 20|0); - ;HEAP32[$$sroa$4$0$$sroa_idx2>>2]=0|0;HEAP32[$$sroa$4$0$$sroa_idx2+4>>2]=0|0;HEAP32[$$sroa$4$0$$sroa_idx2+8>>2]=0|0;HEAP32[$$sroa$4$0$$sroa_idx2+12>>2]=0|0; - HEAPF32[$$sroa$8$0$$sroa_idx10>>2] = 1.0; - $$sroa$9$0$$sroa_idx12 = ((($0)) + 24|0); - $$sroa$13$0$$sroa_idx20 = ((($0)) + 40|0); - ;HEAP32[$$sroa$9$0$$sroa_idx12>>2]=0|0;HEAP32[$$sroa$9$0$$sroa_idx12+4>>2]=0|0;HEAP32[$$sroa$9$0$$sroa_idx12+8>>2]=0|0;HEAP32[$$sroa$9$0$$sroa_idx12+12>>2]=0|0; - HEAPF32[$$sroa$13$0$$sroa_idx20>>2] = 1.0; - $$sroa$14$0$$sroa_idx22 = ((($0)) + 44|0); - HEAPF32[$$sroa$14$0$$sroa_idx22>>2] = 0.0; - $$sroa$15$0$$sroa_idx24 = ((($0)) + 48|0); - HEAPF32[$$sroa$15$0$$sroa_idx24>>2] = $1; - $$sroa$16$0$$sroa_idx26 = ((($0)) + 52|0); - HEAPF32[$$sroa$16$0$$sroa_idx26>>2] = $2; - $$sroa$17$0$$sroa_idx28 = ((($0)) + 56|0); - HEAPF32[$$sroa$17$0$$sroa_idx28>>2] = $3; - $$sroa$18$0$$sroa_idx30 = ((($0)) + 60|0); - HEAPF32[$$sroa$18$0$$sroa_idx30>>2] = 1.0; - return; -} -function _MatrixRotate($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = +$2; - var $$ = 0.0, $$221 = 0.0, $$222 = 0.0, $$sroa$10$0$$sroa_idx199 = 0, $$sroa$11$0$$sroa_idx201 = 0, $$sroa$12$0$$sroa_idx203 = 0, $$sroa$13$0$$sroa_idx205 = 0, $$sroa$14$0$$sroa_idx207 = 0, $$sroa$15$0$$sroa_idx209 = 0, $$sroa$16$0$$sroa_idx211 = 0, $$sroa$17$0$$sroa_idx213 = 0, $$sroa$18$0$$sroa_idx215 = 0, $$sroa$4$0$$sroa_idx187 = 0, $$sroa$5$0$$sroa_idx189 = 0, $$sroa$6$0$$sroa_idx191 = 0, $$sroa$7$0$$sroa_idx193 = 0, $$sroa$8$0$$sroa_idx195 = 0, $$sroa$9$0$$sroa_idx197 = 0, $10 = 0.0, $100 = 0.0; - var $101 = 0.0, $102 = 0.0, $103 = 0.0, $104 = 0.0, $105 = 0.0, $106 = 0.0, $107 = 0.0, $108 = 0.0, $109 = 0.0, $11 = 0.0, $110 = 0.0, $111 = 0.0, $112 = 0.0, $113 = 0.0, $114 = 0.0, $115 = 0.0, $116 = 0.0, $117 = 0.0, $118 = 0.0, $119 = 0.0; - var $12 = 0.0, $120 = 0.0, $121 = 0.0, $122 = 0.0, $123 = 0.0, $124 = 0.0, $125 = 0.0, $126 = 0.0, $127 = 0.0, $128 = 0.0, $129 = 0.0, $13 = 0.0, $130 = 0.0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0; - var $138 = 0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0, $26 = 0.0, $27 = 0, $28 = 0.0, $29 = 0, $3 = 0, $30 = 0.0, $31 = 0; - var $32 = 0.0, $33 = 0, $34 = 0.0, $35 = 0, $36 = 0.0, $37 = 0, $38 = 0.0, $39 = 0, $4 = 0.0, $40 = 0.0, $41 = 0, $42 = 0.0, $43 = 0, $44 = 0.0, $45 = 0, $46 = 0.0, $47 = 0.0, $48 = 0.0, $49 = 0.0, $5 = 0; - var $50 = 0.0, $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0.0, $55 = 0.0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0.0, $6 = 0.0, $60 = 0.0, $61 = 0.0, $62 = 0.0, $63 = 0.0, $64 = 0.0, $65 = 0.0, $66 = 0.0, $67 = 0.0, $68 = 0.0; - var $69 = 0.0, $7 = 0, $70 = 0.0, $71 = 0.0, $72 = 0.0, $73 = 0.0, $74 = 0.0, $75 = 0.0, $76 = 0.0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0.0, $80 = 0.0, $81 = 0.0, $82 = 0.0, $83 = 0.0, $84 = 0.0, $85 = 0.0, $86 = 0.0; - var $87 = 0.0, $88 = 0.0, $89 = 0.0, $9 = 0.0, $90 = 0.0, $91 = 0.0, $92 = 0.0, $93 = 0.0, $94 = 0.0, $95 = 0.0, $96 = 0.0, $97 = 0.0, $98 = 0.0, $99 = 0.0, $or$cond = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); - $3 = sp; - _MatrixIdentity($3); - $4 = +HEAPF32[$1>>2]; - $5 = ((($1)) + 4|0); - $6 = +HEAPF32[$5>>2]; - $7 = ((($1)) + 8|0); - $8 = +HEAPF32[$7>>2]; - $9 = $4 * $4; - $10 = $6 * $6; - $11 = $9 + $10; - $12 = $8 * $8; - $13 = $11 + $12; - $14 = (+Math_sqrt((+$13))); - $15 = $14 != 1.0; - $16 = $14 != 0.0; - $or$cond = $15 & $16; - $17 = 1.0 / $14; - $18 = $4 * $17; - $19 = $6 * $17; - $20 = $8 * $17; - $$ = $or$cond ? $20 : $8; - $$221 = $or$cond ? $19 : $6; - $$222 = $or$cond ? $18 : $4; - $21 = (+Math_sin((+$2))); - $22 = (+Math_cos((+$2))); - $23 = 1.0 - $22; - $24 = +HEAPF32[$3>>2]; - $25 = ((($3)) + 16|0); - $26 = +HEAPF32[$25>>2]; - $27 = ((($3)) + 32|0); - $28 = +HEAPF32[$27>>2]; - $29 = ((($3)) + 48|0); - $30 = +HEAPF32[$29>>2]; - $31 = ((($3)) + 4|0); - $32 = +HEAPF32[$31>>2]; - $33 = ((($3)) + 20|0); - $34 = +HEAPF32[$33>>2]; - $35 = ((($3)) + 36|0); - $36 = +HEAPF32[$35>>2]; - $37 = ((($3)) + 52|0); - $38 = +HEAPF32[$37>>2]; - $39 = ((($3)) + 8|0); - $40 = +HEAPF32[$39>>2]; - $41 = ((($3)) + 24|0); - $42 = +HEAPF32[$41>>2]; - $43 = ((($3)) + 40|0); - $44 = +HEAPF32[$43>>2]; - $45 = ((($3)) + 56|0); - $46 = +HEAPF32[$45>>2]; - $47 = $$222 * $$222; - $48 = $23 * $47; - $49 = $22 + $48; - $50 = $$221 * $$222; - $51 = $23 * $50; - $52 = $21 * $$; - $53 = $52 + $51; - $54 = $$ * $$222; - $55 = $23 * $54; - $56 = $21 * $$221; - $57 = $55 - $56; - $58 = $51 - $52; - $59 = $$221 * $$221; - $60 = $23 * $59; - $61 = $22 + $60; - $62 = $$ * $$221; - $63 = $23 * $62; - $64 = $21 * $$222; - $65 = $64 + $63; - $66 = $56 + $55; - $67 = $63 - $64; - $68 = $$ * $$; - $69 = $23 * $68; - $70 = $22 + $69; - $71 = $24 * $49; - $72 = $53 * $32; - $73 = $71 + $72; - $74 = $57 * $40; - $75 = $73 + $74; - $76 = $26 * $49; - $77 = $53 * $34; - $78 = $76 + $77; - $79 = $57 * $42; - $80 = $78 + $79; - $81 = $28 * $49; - $82 = $53 * $36; - $83 = $81 + $82; - $84 = $57 * $44; - $85 = $83 + $84; - $86 = $30 * $49; - $87 = $53 * $38; - $88 = $86 + $87; - $89 = $57 * $46; - $90 = $88 + $89; - $91 = $24 * $58; - $92 = $61 * $32; - $93 = $91 + $92; - $94 = $65 * $40; - $95 = $93 + $94; - $96 = $26 * $58; - $97 = $61 * $34; - $98 = $96 + $97; - $99 = $65 * $42; - $100 = $98 + $99; - $101 = $28 * $58; - $102 = $61 * $36; - $103 = $101 + $102; - $104 = $65 * $44; - $105 = $103 + $104; - $106 = $30 * $58; - $107 = $61 * $38; - $108 = $106 + $107; - $109 = $65 * $46; - $110 = $108 + $109; - $111 = $24 * $66; - $112 = $67 * $32; - $113 = $111 + $112; - $114 = $70 * $40; - $115 = $113 + $114; - $116 = $26 * $66; - $117 = $67 * $34; - $118 = $116 + $117; - $119 = $70 * $42; - $120 = $118 + $119; - $121 = $28 * $66; - $122 = $67 * $36; - $123 = $121 + $122; - $124 = $70 * $44; - $125 = $123 + $124; - $126 = $30 * $66; - $127 = $67 * $38; - $128 = $126 + $127; - $129 = $70 * $46; - $130 = $128 + $129; - $131 = ((($3)) + 12|0); - $132 = HEAP32[$131>>2]|0; - $133 = ((($3)) + 28|0); - $134 = HEAP32[$133>>2]|0; - $135 = ((($3)) + 44|0); - $136 = HEAP32[$135>>2]|0; - $137 = ((($3)) + 60|0); - $138 = HEAP32[$137>>2]|0; - HEAPF32[$0>>2] = $75; - $$sroa$4$0$$sroa_idx187 = ((($0)) + 4|0); - HEAPF32[$$sroa$4$0$$sroa_idx187>>2] = $95; - $$sroa$5$0$$sroa_idx189 = ((($0)) + 8|0); - HEAPF32[$$sroa$5$0$$sroa_idx189>>2] = $115; - $$sroa$6$0$$sroa_idx191 = ((($0)) + 12|0); - HEAP32[$$sroa$6$0$$sroa_idx191>>2] = $132; - $$sroa$7$0$$sroa_idx193 = ((($0)) + 16|0); - HEAPF32[$$sroa$7$0$$sroa_idx193>>2] = $80; - $$sroa$8$0$$sroa_idx195 = ((($0)) + 20|0); - HEAPF32[$$sroa$8$0$$sroa_idx195>>2] = $100; - $$sroa$9$0$$sroa_idx197 = ((($0)) + 24|0); - HEAPF32[$$sroa$9$0$$sroa_idx197>>2] = $120; - $$sroa$10$0$$sroa_idx199 = ((($0)) + 28|0); - HEAP32[$$sroa$10$0$$sroa_idx199>>2] = $134; - $$sroa$11$0$$sroa_idx201 = ((($0)) + 32|0); - HEAPF32[$$sroa$11$0$$sroa_idx201>>2] = $85; - $$sroa$12$0$$sroa_idx203 = ((($0)) + 36|0); - HEAPF32[$$sroa$12$0$$sroa_idx203>>2] = $105; - $$sroa$13$0$$sroa_idx205 = ((($0)) + 40|0); - HEAPF32[$$sroa$13$0$$sroa_idx205>>2] = $125; - $$sroa$14$0$$sroa_idx207 = ((($0)) + 44|0); - HEAP32[$$sroa$14$0$$sroa_idx207>>2] = $136; - $$sroa$15$0$$sroa_idx209 = ((($0)) + 48|0); - HEAPF32[$$sroa$15$0$$sroa_idx209>>2] = $90; - $$sroa$16$0$$sroa_idx211 = ((($0)) + 52|0); - HEAPF32[$$sroa$16$0$$sroa_idx211>>2] = $110; - $$sroa$17$0$$sroa_idx213 = ((($0)) + 56|0); - HEAPF32[$$sroa$17$0$$sroa_idx213>>2] = $130; - $$sroa$18$0$$sroa_idx215 = ((($0)) + 60|0); - HEAP32[$$sroa$18$0$$sroa_idx215>>2] = $138; - STACKTOP = sp;return; -} -function _MatrixScale($0,$1,$2,$3) { - $0 = $0|0; - $1 = +$1; - $2 = +$2; - $3 = +$3; - var $$sroa$5$0$$sroa_idx = 0, $$sroa$55$0$$sroa_idx6 = 0, $$sroa$6$0$$sroa_idx = 0, $$sroa$611$0$$sroa_idx12 = 0, $$sroa$7$0$$sroa_idx = 0, $$sroa$717$0$$sroa_idx18 = 0, label = 0, sp = 0; - sp = STACKTOP; - HEAPF32[$0>>2] = $1; - $$sroa$5$0$$sroa_idx = ((($0)) + 4|0); - ;HEAP32[$$sroa$5$0$$sroa_idx>>2]=0|0;HEAP32[$$sroa$5$0$$sroa_idx+4>>2]=0|0;HEAP32[$$sroa$5$0$$sroa_idx+8>>2]=0|0;HEAP32[$$sroa$5$0$$sroa_idx+12>>2]=0|0; - $$sroa$55$0$$sroa_idx6 = ((($0)) + 20|0); - HEAPF32[$$sroa$55$0$$sroa_idx6>>2] = $2; - $$sroa$6$0$$sroa_idx = ((($0)) + 24|0); - ;HEAP32[$$sroa$6$0$$sroa_idx>>2]=0|0;HEAP32[$$sroa$6$0$$sroa_idx+4>>2]=0|0;HEAP32[$$sroa$6$0$$sroa_idx+8>>2]=0|0;HEAP32[$$sroa$6$0$$sroa_idx+12>>2]=0|0; - $$sroa$611$0$$sroa_idx12 = ((($0)) + 40|0); - HEAPF32[$$sroa$611$0$$sroa_idx12>>2] = $3; - $$sroa$7$0$$sroa_idx = ((($0)) + 44|0); - ;HEAP32[$$sroa$7$0$$sroa_idx>>2]=0|0;HEAP32[$$sroa$7$0$$sroa_idx+4>>2]=0|0;HEAP32[$$sroa$7$0$$sroa_idx+8>>2]=0|0;HEAP32[$$sroa$7$0$$sroa_idx+12>>2]=0|0; - $$sroa$717$0$$sroa_idx18 = ((($0)) + 60|0); - HEAPF32[$$sroa$717$0$$sroa_idx18>>2] = 1.0; - return; -} -function _MatrixMultiply($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $$sroa$10$0$$sroa_idx14 = 0, $$sroa$11$0$$sroa_idx16 = 0, $$sroa$12$0$$sroa_idx18 = 0, $$sroa$13$0$$sroa_idx20 = 0, $$sroa$14$0$$sroa_idx22 = 0, $$sroa$15$0$$sroa_idx24 = 0, $$sroa$16$0$$sroa_idx26 = 0, $$sroa$17$0$$sroa_idx28 = 0, $$sroa$18$0$$sroa_idx30 = 0, $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $$sroa$6$0$$sroa_idx6 = 0, $$sroa$7$0$$sroa_idx8 = 0, $$sroa$8$0$$sroa_idx10 = 0, $$sroa$9$0$$sroa_idx12 = 0, $10 = 0.0, $100 = 0.0, $101 = 0.0, $102 = 0.0, $103 = 0.0; - var $104 = 0.0, $105 = 0, $106 = 0.0, $107 = 0.0, $108 = 0, $109 = 0.0, $11 = 0.0, $110 = 0.0, $111 = 0.0, $112 = 0, $113 = 0.0, $114 = 0.0, $115 = 0.0, $116 = 0, $117 = 0.0, $118 = 0.0, $119 = 0.0, $12 = 0, $120 = 0.0, $121 = 0.0; - var $122 = 0.0, $123 = 0.0, $124 = 0.0, $125 = 0.0, $126 = 0.0, $127 = 0.0, $128 = 0.0, $129 = 0.0, $13 = 0.0, $130 = 0.0, $131 = 0.0, $132 = 0.0, $133 = 0.0, $134 = 0.0, $135 = 0.0, $136 = 0.0, $137 = 0.0, $138 = 0.0, $139 = 0.0, $14 = 0; - var $140 = 0.0, $141 = 0, $142 = 0.0, $143 = 0.0, $144 = 0, $145 = 0.0, $146 = 0.0, $147 = 0.0, $148 = 0, $149 = 0.0, $15 = 0.0, $150 = 0.0, $151 = 0.0, $152 = 0, $153 = 0.0, $154 = 0.0, $155 = 0.0, $156 = 0.0, $157 = 0.0, $158 = 0.0; - var $159 = 0.0, $16 = 0.0, $160 = 0.0, $161 = 0.0, $162 = 0.0, $163 = 0.0, $164 = 0.0, $165 = 0.0, $166 = 0.0, $167 = 0.0, $168 = 0.0, $169 = 0.0, $17 = 0.0, $170 = 0.0, $171 = 0.0, $172 = 0.0, $173 = 0.0, $174 = 0.0, $175 = 0.0, $176 = 0.0; - var $18 = 0, $19 = 0.0, $20 = 0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0, $25 = 0.0, $26 = 0.0, $27 = 0, $28 = 0.0, $29 = 0.0, $3 = 0.0, $30 = 0.0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0.0; - var $37 = 0.0, $38 = 0.0, $39 = 0, $4 = 0.0, $40 = 0.0, $41 = 0.0, $42 = 0, $43 = 0.0, $44 = 0.0, $45 = 0.0, $46 = 0, $47 = 0.0, $48 = 0.0, $49 = 0.0, $5 = 0.0, $50 = 0, $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0; - var $55 = 0.0, $56 = 0.0, $57 = 0, $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0.0, $61 = 0, $62 = 0.0, $63 = 0.0, $64 = 0.0, $65 = 0, $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0, $7 = 0.0, $70 = 0.0, $71 = 0.0, $72 = 0; - var $73 = 0.0, $74 = 0.0, $75 = 0.0, $76 = 0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0, $81 = 0.0, $82 = 0.0, $83 = 0.0, $84 = 0.0, $85 = 0.0, $86 = 0.0, $87 = 0.0, $88 = 0.0, $89 = 0.0, $9 = 0.0, $90 = 0.0; - var $91 = 0.0, $92 = 0.0, $93 = 0.0, $94 = 0.0, $95 = 0.0, $96 = 0.0, $97 = 0.0, $98 = 0.0, $99 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $3 = +HEAPF32[$2>>2]; - $4 = +HEAPF32[$1>>2]; - $5 = $3 * $4; - $6 = ((($2)) + 16|0); - $7 = +HEAPF32[$6>>2]; - $8 = ((($1)) + 4|0); - $9 = +HEAPF32[$8>>2]; - $10 = $7 * $9; - $11 = $5 + $10; - $12 = ((($2)) + 32|0); - $13 = +HEAPF32[$12>>2]; - $14 = ((($1)) + 8|0); - $15 = +HEAPF32[$14>>2]; - $16 = $13 * $15; - $17 = $11 + $16; - $18 = ((($2)) + 48|0); - $19 = +HEAPF32[$18>>2]; - $20 = ((($1)) + 12|0); - $21 = +HEAPF32[$20>>2]; - $22 = $19 * $21; - $23 = $17 + $22; - $24 = ((($1)) + 16|0); - $25 = +HEAPF32[$24>>2]; - $26 = $3 * $25; - $27 = ((($1)) + 20|0); - $28 = +HEAPF32[$27>>2]; - $29 = $7 * $28; - $30 = $26 + $29; - $31 = ((($1)) + 24|0); - $32 = +HEAPF32[$31>>2]; - $33 = $13 * $32; - $34 = $30 + $33; - $35 = ((($1)) + 28|0); - $36 = +HEAPF32[$35>>2]; - $37 = $19 * $36; - $38 = $34 + $37; - $39 = ((($1)) + 32|0); - $40 = +HEAPF32[$39>>2]; - $41 = $3 * $40; - $42 = ((($1)) + 36|0); - $43 = +HEAPF32[$42>>2]; - $44 = $7 * $43; - $45 = $41 + $44; - $46 = ((($1)) + 40|0); - $47 = +HEAPF32[$46>>2]; - $48 = $13 * $47; - $49 = $45 + $48; - $50 = ((($1)) + 44|0); - $51 = +HEAPF32[$50>>2]; - $52 = $19 * $51; - $53 = $49 + $52; - $54 = ((($1)) + 48|0); - $55 = +HEAPF32[$54>>2]; - $56 = $3 * $55; - $57 = ((($1)) + 52|0); - $58 = +HEAPF32[$57>>2]; - $59 = $7 * $58; - $60 = $56 + $59; - $61 = ((($1)) + 56|0); - $62 = +HEAPF32[$61>>2]; - $63 = $13 * $62; - $64 = $60 + $63; - $65 = ((($1)) + 60|0); - $66 = +HEAPF32[$65>>2]; - $67 = $19 * $66; - $68 = $64 + $67; - $69 = ((($2)) + 4|0); - $70 = +HEAPF32[$69>>2]; - $71 = $4 * $70; - $72 = ((($2)) + 20|0); - $73 = +HEAPF32[$72>>2]; - $74 = $9 * $73; - $75 = $71 + $74; - $76 = ((($2)) + 36|0); - $77 = +HEAPF32[$76>>2]; - $78 = $15 * $77; - $79 = $75 + $78; - $80 = ((($2)) + 52|0); - $81 = +HEAPF32[$80>>2]; - $82 = $21 * $81; - $83 = $79 + $82; - $84 = $25 * $70; - $85 = $28 * $73; - $86 = $84 + $85; - $87 = $32 * $77; - $88 = $86 + $87; - $89 = $36 * $81; - $90 = $88 + $89; - $91 = $40 * $70; - $92 = $43 * $73; - $93 = $91 + $92; - $94 = $47 * $77; - $95 = $93 + $94; - $96 = $51 * $81; - $97 = $95 + $96; - $98 = $55 * $70; - $99 = $58 * $73; - $100 = $98 + $99; - $101 = $62 * $77; - $102 = $100 + $101; - $103 = $66 * $81; - $104 = $102 + $103; - $105 = ((($2)) + 8|0); - $106 = +HEAPF32[$105>>2]; - $107 = $4 * $106; - $108 = ((($2)) + 24|0); - $109 = +HEAPF32[$108>>2]; - $110 = $9 * $109; - $111 = $107 + $110; - $112 = ((($2)) + 40|0); - $113 = +HEAPF32[$112>>2]; - $114 = $15 * $113; - $115 = $111 + $114; - $116 = ((($2)) + 56|0); - $117 = +HEAPF32[$116>>2]; - $118 = $21 * $117; - $119 = $115 + $118; - $120 = $25 * $106; - $121 = $28 * $109; - $122 = $120 + $121; - $123 = $32 * $113; - $124 = $122 + $123; - $125 = $36 * $117; - $126 = $124 + $125; - $127 = $40 * $106; - $128 = $43 * $109; - $129 = $127 + $128; - $130 = $47 * $113; - $131 = $129 + $130; - $132 = $51 * $117; - $133 = $131 + $132; - $134 = $55 * $106; - $135 = $58 * $109; - $136 = $134 + $135; - $137 = $62 * $113; - $138 = $136 + $137; - $139 = $66 * $117; - $140 = $138 + $139; - $141 = ((($2)) + 12|0); - $142 = +HEAPF32[$141>>2]; - $143 = $4 * $142; - $144 = ((($2)) + 28|0); - $145 = +HEAPF32[$144>>2]; - $146 = $9 * $145; - $147 = $143 + $146; - $148 = ((($2)) + 44|0); - $149 = +HEAPF32[$148>>2]; - $150 = $15 * $149; - $151 = $147 + $150; - $152 = ((($2)) + 60|0); - $153 = +HEAPF32[$152>>2]; - $154 = $21 * $153; - $155 = $151 + $154; - $156 = $25 * $142; - $157 = $28 * $145; - $158 = $156 + $157; - $159 = $32 * $149; - $160 = $158 + $159; - $161 = $36 * $153; - $162 = $160 + $161; - $163 = $40 * $142; - $164 = $43 * $145; - $165 = $163 + $164; - $166 = $47 * $149; - $167 = $165 + $166; - $168 = $51 * $153; - $169 = $167 + $168; - $170 = $55 * $142; - $171 = $58 * $145; - $172 = $170 + $171; - $173 = $62 * $149; - $174 = $172 + $173; - $175 = $66 * $153; - $176 = $174 + $175; - HEAPF32[$0>>2] = $23; - $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); - HEAPF32[$$sroa$4$0$$sroa_idx2>>2] = $83; - $$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0); - HEAPF32[$$sroa$5$0$$sroa_idx4>>2] = $119; - $$sroa$6$0$$sroa_idx6 = ((($0)) + 12|0); - HEAPF32[$$sroa$6$0$$sroa_idx6>>2] = $155; - $$sroa$7$0$$sroa_idx8 = ((($0)) + 16|0); - HEAPF32[$$sroa$7$0$$sroa_idx8>>2] = $38; - $$sroa$8$0$$sroa_idx10 = ((($0)) + 20|0); - HEAPF32[$$sroa$8$0$$sroa_idx10>>2] = $90; - $$sroa$9$0$$sroa_idx12 = ((($0)) + 24|0); - HEAPF32[$$sroa$9$0$$sroa_idx12>>2] = $126; - $$sroa$10$0$$sroa_idx14 = ((($0)) + 28|0); - HEAPF32[$$sroa$10$0$$sroa_idx14>>2] = $162; - $$sroa$11$0$$sroa_idx16 = ((($0)) + 32|0); - HEAPF32[$$sroa$11$0$$sroa_idx16>>2] = $53; - $$sroa$12$0$$sroa_idx18 = ((($0)) + 36|0); - HEAPF32[$$sroa$12$0$$sroa_idx18>>2] = $97; - $$sroa$13$0$$sroa_idx20 = ((($0)) + 40|0); - HEAPF32[$$sroa$13$0$$sroa_idx20>>2] = $133; - $$sroa$14$0$$sroa_idx22 = ((($0)) + 44|0); - HEAPF32[$$sroa$14$0$$sroa_idx22>>2] = $169; - $$sroa$15$0$$sroa_idx24 = ((($0)) + 48|0); - HEAPF32[$$sroa$15$0$$sroa_idx24>>2] = $68; - $$sroa$16$0$$sroa_idx26 = ((($0)) + 52|0); - HEAPF32[$$sroa$16$0$$sroa_idx26>>2] = $104; - $$sroa$17$0$$sroa_idx28 = ((($0)) + 56|0); - HEAPF32[$$sroa$17$0$$sroa_idx28>>2] = $140; - $$sroa$18$0$$sroa_idx30 = ((($0)) + 60|0); - HEAPF32[$$sroa$18$0$$sroa_idx30>>2] = $176; - return; -} -function _MatrixFrustum($0,$1,$2,$3,$4,$5,$6) { - $0 = $0|0; - $1 = +$1; - $2 = +$2; - $3 = +$3; - $4 = +$4; - $5 = +$5; - $6 = +$6; - var $$sroa$10$0$$sroa_idx24 = 0, $$sroa$11$0$$sroa_idx26 = 0, $$sroa$12$0$$sroa_idx28 = 0, $$sroa$13$0$$sroa_idx30 = 0, $$sroa$14$0$$sroa_idx32 = 0, $$sroa$15$0$$sroa_idx34 = 0, $$sroa$16$0$$sroa_idx36 = 0, $$sroa$17$0$$sroa_idx38 = 0, $$sroa$18$0$$sroa_idx40 = 0, $$sroa$4$0$$sroa_idx12 = 0, $$sroa$5$0$$sroa_idx14 = 0, $$sroa$6$0$$sroa_idx16 = 0, $$sroa$7$0$$sroa_idx18 = 0, $$sroa$8$0$$sroa_idx20 = 0, $$sroa$9$0$$sroa_idx22 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0; - var $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $27 = 0.0, $28 = 0.0, $29 = 0.0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0.0; - var $35 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $7 = $2 - $1; - $8 = $7; - $9 = $4 - $3; - $10 = $9; - $11 = $6 - $5; - $12 = $11; - $13 = $5 * 2.0; - $14 = $8; - $15 = $13 / $14; - $16 = $15; - $17 = $10; - $18 = $13 / $17; - $19 = $18; - $20 = $1 + $2; - $21 = $20 / $14; - $22 = $21; - $23 = $3 + $4; - $24 = $23 / $17; - $25 = $24; - $26 = $5 + $6; - $27 = -$26; - $28 = $12; - $29 = $27 / $28; - $30 = $29; - $31 = $5 * $6; - $32 = $31 * 2.0; - $33 = -$32; - $34 = $33 / $28; - $35 = $34; - HEAPF32[$0>>2] = $16; - $$sroa$4$0$$sroa_idx12 = ((($0)) + 4|0); - HEAPF32[$$sroa$4$0$$sroa_idx12>>2] = 0.0; - $$sroa$5$0$$sroa_idx14 = ((($0)) + 8|0); - HEAPF32[$$sroa$5$0$$sroa_idx14>>2] = $22; - $$sroa$6$0$$sroa_idx16 = ((($0)) + 12|0); - HEAPF32[$$sroa$6$0$$sroa_idx16>>2] = 0.0; - $$sroa$7$0$$sroa_idx18 = ((($0)) + 16|0); - HEAPF32[$$sroa$7$0$$sroa_idx18>>2] = 0.0; - $$sroa$8$0$$sroa_idx20 = ((($0)) + 20|0); - HEAPF32[$$sroa$8$0$$sroa_idx20>>2] = $19; - $$sroa$9$0$$sroa_idx22 = ((($0)) + 24|0); - HEAPF32[$$sroa$9$0$$sroa_idx22>>2] = $25; - $$sroa$10$0$$sroa_idx24 = ((($0)) + 28|0); - HEAPF32[$$sroa$10$0$$sroa_idx24>>2] = 0.0; - $$sroa$11$0$$sroa_idx26 = ((($0)) + 32|0); - HEAPF32[$$sroa$11$0$$sroa_idx26>>2] = 0.0; - $$sroa$12$0$$sroa_idx28 = ((($0)) + 36|0); - HEAPF32[$$sroa$12$0$$sroa_idx28>>2] = 0.0; - $$sroa$13$0$$sroa_idx30 = ((($0)) + 40|0); - HEAPF32[$$sroa$13$0$$sroa_idx30>>2] = $30; - $$sroa$14$0$$sroa_idx32 = ((($0)) + 44|0); - HEAPF32[$$sroa$14$0$$sroa_idx32>>2] = $35; - $$sroa$15$0$$sroa_idx34 = ((($0)) + 48|0); - HEAPF32[$$sroa$15$0$$sroa_idx34>>2] = 0.0; - $$sroa$16$0$$sroa_idx36 = ((($0)) + 52|0); - HEAPF32[$$sroa$16$0$$sroa_idx36>>2] = 0.0; - $$sroa$17$0$$sroa_idx38 = ((($0)) + 56|0); - HEAPF32[$$sroa$17$0$$sroa_idx38>>2] = -1.0; - $$sroa$18$0$$sroa_idx40 = ((($0)) + 60|0); - HEAPF32[$$sroa$18$0$$sroa_idx40>>2] = 0.0; - return; -} -function _MatrixPerspective($0,$1,$2,$3,$4) { - $0 = $0|0; - $1 = +$1; - $2 = +$2; - $3 = +$3; - $4 = +$4; - var $10 = 0.0, $11 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $5 = $1 * 3.1415927410125732; - $6 = $5 / 360.0; - $7 = (+Math_tan((+$6))); - $8 = $7 * $3; - $9 = $8 * $2; - $10 = -$9; - $11 = -$8; - _MatrixFrustum($0,$10,$9,$11,$8,$3,$4); - return; -} -function _MatrixOrtho($0,$1,$2,$3,$4,$5,$6) { - $0 = $0|0; - $1 = +$1; - $2 = +$2; - $3 = +$3; - $4 = +$4; - $5 = +$5; - $6 = +$6; - var $$sroa$10$0$$sroa_idx24 = 0, $$sroa$11$0$$sroa_idx26 = 0, $$sroa$12$0$$sroa_idx28 = 0, $$sroa$13$0$$sroa_idx30 = 0, $$sroa$14$0$$sroa_idx32 = 0, $$sroa$15$0$$sroa_idx34 = 0, $$sroa$16$0$$sroa_idx36 = 0, $$sroa$17$0$$sroa_idx38 = 0, $$sroa$18$0$$sroa_idx40 = 0, $$sroa$4$0$$sroa_idx12 = 0, $$sroa$5$0$$sroa_idx14 = 0, $$sroa$6$0$$sroa_idx16 = 0, $$sroa$7$0$$sroa_idx18 = 0, $$sroa$8$0$$sroa_idx20 = 0, $$sroa$9$0$$sroa_idx22 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0; - var $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $27 = 0.0, $28 = 0.0, $29 = 0.0, $30 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0; - var sp = 0; - sp = STACKTOP; - $7 = $2 - $1; - $8 = $7; - $9 = $4 - $3; - $10 = $9; - $11 = $6 - $5; - $12 = $11; - $13 = 2.0 / $8; - $14 = 2.0 / $10; - $15 = -2.0 / $12; - $16 = $1 + $2; - $17 = -$16; - $18 = $8; - $19 = $17 / $18; - $20 = $19; - $21 = $3 + $4; - $22 = -$21; - $23 = $10; - $24 = $22 / $23; - $25 = $24; - $26 = $5 + $6; - $27 = -$26; - $28 = $12; - $29 = $27 / $28; - $30 = $29; - HEAPF32[$0>>2] = $13; - $$sroa$4$0$$sroa_idx12 = ((($0)) + 4|0); - HEAPF32[$$sroa$4$0$$sroa_idx12>>2] = 0.0; - $$sroa$5$0$$sroa_idx14 = ((($0)) + 8|0); - HEAPF32[$$sroa$5$0$$sroa_idx14>>2] = 0.0; - $$sroa$6$0$$sroa_idx16 = ((($0)) + 12|0); - HEAPF32[$$sroa$6$0$$sroa_idx16>>2] = $20; - $$sroa$7$0$$sroa_idx18 = ((($0)) + 16|0); - HEAPF32[$$sroa$7$0$$sroa_idx18>>2] = 0.0; - $$sroa$8$0$$sroa_idx20 = ((($0)) + 20|0); - HEAPF32[$$sroa$8$0$$sroa_idx20>>2] = $14; - $$sroa$9$0$$sroa_idx22 = ((($0)) + 24|0); - HEAPF32[$$sroa$9$0$$sroa_idx22>>2] = 0.0; - $$sroa$10$0$$sroa_idx24 = ((($0)) + 28|0); - HEAPF32[$$sroa$10$0$$sroa_idx24>>2] = $25; - $$sroa$11$0$$sroa_idx26 = ((($0)) + 32|0); - HEAPF32[$$sroa$11$0$$sroa_idx26>>2] = 0.0; - $$sroa$12$0$$sroa_idx28 = ((($0)) + 36|0); - HEAPF32[$$sroa$12$0$$sroa_idx28>>2] = 0.0; - $$sroa$13$0$$sroa_idx30 = ((($0)) + 40|0); - HEAPF32[$$sroa$13$0$$sroa_idx30>>2] = $15; - $$sroa$14$0$$sroa_idx32 = ((($0)) + 44|0); - HEAPF32[$$sroa$14$0$$sroa_idx32>>2] = $30; - $$sroa$15$0$$sroa_idx34 = ((($0)) + 48|0); - HEAPF32[$$sroa$15$0$$sroa_idx34>>2] = 0.0; - $$sroa$16$0$$sroa_idx36 = ((($0)) + 52|0); - HEAPF32[$$sroa$16$0$$sroa_idx36>>2] = 0.0; - $$sroa$17$0$$sroa_idx38 = ((($0)) + 56|0); - HEAPF32[$$sroa$17$0$$sroa_idx38>>2] = 0.0; - $$sroa$18$0$$sroa_idx40 = ((($0)) + 60|0); - HEAPF32[$$sroa$18$0$$sroa_idx40>>2] = 1.0; - return; -} -function _MatrixLookAt($0,$1,$2,$3) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - $3 = $3|0; - var $$byval_copy4 = 0, $$byval_copy5 = 0, $$sroa$10$0$$sroa_idx14 = 0, $$sroa$11$0$$sroa_idx16 = 0, $$sroa$12$0$$sroa_idx18 = 0, $$sroa$13$0$$sroa_idx20 = 0, $$sroa$14$0$$sroa_idx22 = 0, $$sroa$15$0$$sroa_idx24 = 0, $$sroa$16$0$$sroa_idx26 = 0, $$sroa$17$0$$sroa_idx28 = 0, $$sroa$18$0$$sroa_idx30 = 0, $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $$sroa$6$0$$sroa_idx6 = 0, $$sroa$7$0$$sroa_idx8 = 0, $$sroa$8$0$$sroa_idx10 = 0, $$sroa$9$0$$sroa_idx12 = 0, $10 = 0, $11 = 0.0, $12 = 0.0; - var $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0, $25 = 0.0, $26 = 0, $27 = 0.0, $28 = 0.0, $29 = 0.0, $30 = 0.0, $31 = 0.0, $32 = 0.0; - var $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0.0, $37 = 0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0.0, $44 = 0.0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); - $$byval_copy5 = sp + 48|0; - $$byval_copy4 = sp + 36|0; - $4 = sp + 24|0; - $5 = sp + 12|0; - $6 = sp; - ;HEAP32[$$byval_copy4>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$$byval_copy4+8>>2]=HEAP32[$1+8>>2]|0; - ;HEAP32[$$byval_copy5>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$2+4>>2]|0;HEAP32[$$byval_copy5+8>>2]=HEAP32[$2+8>>2]|0; - _VectorSubtract($4,$$byval_copy4,$$byval_copy5); - _VectorNormalize($4); - ;HEAP32[$$byval_copy4>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$3+4>>2]|0;HEAP32[$$byval_copy4+8>>2]=HEAP32[$3+8>>2]|0; - ;HEAP32[$$byval_copy5>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$4+4>>2]|0;HEAP32[$$byval_copy5+8>>2]=HEAP32[$4+8>>2]|0; - _VectorCrossProduct($5,$$byval_copy4,$$byval_copy5); - _VectorNormalize($5); - ;HEAP32[$$byval_copy4>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$4+4>>2]|0;HEAP32[$$byval_copy4+8>>2]=HEAP32[$4+8>>2]|0; - ;HEAP32[$$byval_copy5>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$5+4>>2]|0;HEAP32[$$byval_copy5+8>>2]=HEAP32[$5+8>>2]|0; - _VectorCrossProduct($6,$$byval_copy4,$$byval_copy5); - _VectorNormalize($6); - $7 = +HEAPF32[$5>>2]; - $8 = ((($5)) + 4|0); - $9 = +HEAPF32[$8>>2]; - $10 = ((($5)) + 8|0); - $11 = +HEAPF32[$10>>2]; - $12 = +HEAPF32[$1>>2]; - $13 = $7 * $12; - $14 = ((($1)) + 4|0); - $15 = +HEAPF32[$14>>2]; - $16 = $9 * $15; - $17 = $13 + $16; - $18 = ((($1)) + 8|0); - $19 = +HEAPF32[$18>>2]; - $20 = $11 * $19; - $21 = $17 + $20; - $22 = -$21; - $23 = +HEAPF32[$6>>2]; - $24 = ((($6)) + 4|0); - $25 = +HEAPF32[$24>>2]; - $26 = ((($6)) + 8|0); - $27 = +HEAPF32[$26>>2]; - $28 = $12 * $23; - $29 = $15 * $25; - $30 = $28 + $29; - $31 = $19 * $27; - $32 = $30 + $31; - $33 = -$32; - $34 = +HEAPF32[$4>>2]; - $35 = ((($4)) + 4|0); - $36 = +HEAPF32[$35>>2]; - $37 = ((($4)) + 8|0); - $38 = +HEAPF32[$37>>2]; - $39 = $12 * $34; - $40 = $15 * $36; - $41 = $39 + $40; - $42 = $19 * $38; - $43 = $41 + $42; - $44 = -$43; - HEAPF32[$0>>2] = $7; - $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); - HEAPF32[$$sroa$4$0$$sroa_idx2>>2] = $23; - $$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0); - HEAPF32[$$sroa$5$0$$sroa_idx4>>2] = $34; - $$sroa$6$0$$sroa_idx6 = ((($0)) + 12|0); - HEAPF32[$$sroa$6$0$$sroa_idx6>>2] = 0.0; - $$sroa$7$0$$sroa_idx8 = ((($0)) + 16|0); - HEAPF32[$$sroa$7$0$$sroa_idx8>>2] = $9; - $$sroa$8$0$$sroa_idx10 = ((($0)) + 20|0); - HEAPF32[$$sroa$8$0$$sroa_idx10>>2] = $25; - $$sroa$9$0$$sroa_idx12 = ((($0)) + 24|0); - HEAPF32[$$sroa$9$0$$sroa_idx12>>2] = $36; - $$sroa$10$0$$sroa_idx14 = ((($0)) + 28|0); - HEAPF32[$$sroa$10$0$$sroa_idx14>>2] = 0.0; - $$sroa$11$0$$sroa_idx16 = ((($0)) + 32|0); - HEAPF32[$$sroa$11$0$$sroa_idx16>>2] = $11; - $$sroa$12$0$$sroa_idx18 = ((($0)) + 36|0); - HEAPF32[$$sroa$12$0$$sroa_idx18>>2] = $27; - $$sroa$13$0$$sroa_idx20 = ((($0)) + 40|0); - HEAPF32[$$sroa$13$0$$sroa_idx20>>2] = $38; - $$sroa$14$0$$sroa_idx22 = ((($0)) + 44|0); - HEAPF32[$$sroa$14$0$$sroa_idx22>>2] = 0.0; - $$sroa$15$0$$sroa_idx24 = ((($0)) + 48|0); - HEAPF32[$$sroa$15$0$$sroa_idx24>>2] = $22; - $$sroa$16$0$$sroa_idx26 = ((($0)) + 52|0); - HEAPF32[$$sroa$16$0$$sroa_idx26>>2] = $33; - $$sroa$17$0$$sroa_idx28 = ((($0)) + 56|0); - HEAPF32[$$sroa$17$0$$sroa_idx28>>2] = $44; - $$sroa$18$0$$sroa_idx30 = ((($0)) + 60|0); - HEAPF32[$$sroa$18$0$$sroa_idx30>>2] = 1.0; - STACKTOP = sp;return; -} -function _ProcessGestureEvent($0) { - $0 = $0|0; - var $$$sink = 0, $$sink = 0, $$sink10 = 0, $$sink11 = 0, $$sink16 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0.0, $111 = 0.0; - var $112 = 0.0, $113 = 0.0, $114 = 0.0, $115 = 0.0, $116 = 0.0, $117 = 0, $118 = 0, $119 = 0, $12 = 0.0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0; - var $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0; - var $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0.0, $16 = 0, $160 = 0.0, $161 = 0.0, $162 = 0.0, $163 = 0.0, $164 = 0.0, $165 = 0.0, $166 = 0; - var $167 = 0.0, $168 = 0, $169 = 0.0, $17 = 0, $170 = 0.0, $171 = 0.0, $172 = 0, $173 = 0.0, $174 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; - var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; - var $46 = 0, $47 = 0, $48 = 0.0, $49 = 0.0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0.0, $56 = 0.0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0; - var $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0.0, $81 = 0; - var $82 = 0.0, $83 = 0.0, $84 = 0.0, $85 = 0.0, $86 = 0.0, $87 = 0.0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $moveDownPosition$byval_copy11 = 0; - var $moveDownPosition2$byval_copy12 = 0, $or$cond = 0, $or$cond3 = 0, $or$cond5 = 0, $or$cond7 = 0, $or$cond9 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $moveDownPosition2$byval_copy12 = sp + 8|0; - $moveDownPosition$byval_copy11 = sp; - $1 = ((($0)) + 4|0); - $2 = HEAP32[$1>>2]|0; - HEAP32[4162] = $2; - $3 = ($2|0)<(2); - $4 = HEAP32[$0>>2]|0; - $5 = ($4|0)==(1); - if (!($3)) { - if ($5) { - $88 = ((($0)) + 24|0); - $89 = $88; - $90 = $89; - $91 = HEAP32[$90>>2]|0; - $92 = (($89) + 4)|0; - $93 = $92; - $94 = HEAP32[$93>>2]|0; - $95 = 16312; - $96 = $95; - HEAP32[$96>>2] = $91; - $97 = (($95) + 4)|0; - $98 = $97; - HEAP32[$98>>2] = $94; - $99 = ((($0)) + 32|0); - $100 = $99; - $101 = $100; - $102 = HEAP32[$101>>2]|0; - $103 = (($100) + 4)|0; - $104 = $103; - $105 = HEAP32[$104>>2]|0; - $106 = 16352; - $107 = $106; - HEAP32[$107>>2] = $102; - $108 = (($106) + 4)|0; - $109 = $108; - HEAP32[$109>>2] = $105; - $110 = +HEAPF32[4088]; - $111 = +HEAPF32[4078]; - $112 = $110 - $111; - HEAPF32[4090] = $112; - $113 = +HEAPF32[(16356)>>2]; - $114 = +HEAPF32[(16316)>>2]; - $115 = $113 - $114; - HEAPF32[(16364)>>2] = $115; - HEAP32[4161] = 4; - STACKTOP = sp;return; - } - switch ($4|0) { - case 2: { - ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[16344>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[16344+4>>2]|0; - ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[16368>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[16368+4>>2]|0; - $116 = (+_Vector2Distance($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); - HEAPF32[4167] = $116; - $117 = 16344; - $118 = $117; - $119 = HEAP32[$118>>2]|0; - $120 = (($117) + 4)|0; - $121 = $120; - $122 = HEAP32[$121>>2]|0; - $123 = 16312; - $124 = $123; - HEAP32[$124>>2] = $119; - $125 = (($123) + 4)|0; - $126 = $125; - HEAP32[$126>>2] = $122; - $127 = 16368; - $128 = $127; - $129 = HEAP32[$128>>2]|0; - $130 = (($127) + 4)|0; - $131 = $130; - $132 = HEAP32[$131>>2]|0; - $133 = 16352; - $134 = $133; - HEAP32[$134>>2] = $129; - $135 = (($133) + 4)|0; - $136 = $135; - HEAP32[$136>>2] = $132; - $137 = ((($0)) + 24|0); - $138 = $137; - $139 = $138; - $140 = HEAP32[$139>>2]|0; - $141 = (($138) + 4)|0; - $142 = $141; - $143 = HEAP32[$142>>2]|0; - $144 = 16344; - $145 = $144; - HEAP32[$145>>2] = $140; - $146 = (($144) + 4)|0; - $147 = $146; - HEAP32[$147>>2] = $143; - $148 = ((($0)) + 32|0); - $149 = $148; - $150 = $149; - $151 = HEAP32[$150>>2]|0; - $152 = (($149) + 4)|0; - $153 = $152; - $154 = HEAP32[$153>>2]|0; - $155 = 16368; - $156 = $155; - HEAP32[$156>>2] = $151; - $157 = (($155) + 4)|0; - $158 = $157; - HEAP32[$158>>2] = $154; - $159 = +HEAPF32[4092]; - $160 = +HEAPF32[4086]; - $161 = $159 - $160; - HEAPF32[4090] = $161; - $162 = +HEAPF32[(16372)>>2]; - $163 = +HEAPF32[(16348)>>2]; - $164 = $162 - $163; - HEAPF32[(16364)>>2] = $164; - ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[16312>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[16312+4>>2]|0; - ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[16344>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[16344+4>>2]|0; - $165 = (+_Vector2Distance($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); - $166 = !($165 >= 0.004999999888241291); - if ($166) { - ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[16352>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[16352+4>>2]|0; - ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[16368>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[16368+4>>2]|0; - $167 = (+_Vector2Distance($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); - $168 = !($167 >= 0.004999999888241291); - if ($168) { - $$sink16 = 4; - } else { - label = 29; - } - } else { - label = 29; - } - if ((label|0) == 29) { - ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[16344>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[16344+4>>2]|0; - ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[16368>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[16368+4>>2]|0; - $169 = (+_Vector2Distance($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); - $170 = +HEAPF32[4167]; - $171 = $169 - $170; - $172 = $171 < 0.0; - $$sink11 = $172 ? 256 : 512; - $$sink16 = $$sink11; - } - HEAP32[4161] = $$sink16; - ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[16344>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[16344+4>>2]|0; - ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[16368>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[16368+4>>2]|0; - $173 = (+_Vector2Angle($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); - $174 = 360.0 - $173; - HEAPF32[4168] = $174; - STACKTOP = sp;return; - break; - } - case 0: { - HEAPF32[4167] = 0.0; - HEAPF32[4168] = 0.0; - HEAPF32[4090] = 0.0; - HEAPF32[(16364)>>2] = 0.0; - HEAP32[4162] = 0; - HEAP32[4161] = 0; - STACKTOP = sp;return; - break; - } - default: { - STACKTOP = sp;return; - } - } - } - if ($5) { - $6 = HEAP32[4163]|0; - $7 = (($6) + 1)|0; - HEAP32[4163] = $7; - $8 = HEAP32[4161]|0; - $9 = ($8|0)==(0); - $10 = ($6|0)>(0); - $or$cond = $10 & $9; - if ($or$cond) { - $11 = ((($0)) + 24|0); - ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[16312>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[16312+4>>2]|0; - ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[$11>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[$11+4>>2]|0; - $12 = (+_Vector2Distance($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); - $13 = $12 < 0.029999999329447746; - if ($13) { - HEAP32[4161] = 2; - HEAP32[4163] = 0; - } else { - label = 6; - } - } else { - label = 6; - } - if ((label|0) == 6) { - HEAP32[4163] = 1; - HEAP32[4161] = 1; - } - $14 = ((($0)) + 24|0); - $15 = $14; - $16 = $15; - $17 = HEAP32[$16>>2]|0; - $18 = (($15) + 4)|0; - $19 = $18; - $20 = HEAP32[$19>>2]|0; - $21 = 16312; - $22 = $21; - HEAP32[$22>>2] = $17; - $23 = (($21) + 4)|0; - $24 = $23; - HEAP32[$24>>2] = $20; - $25 = 16320; - $26 = $25; - HEAP32[$26>>2] = $17; - $27 = (($25) + 4)|0; - $28 = $27; - HEAP32[$28>>2] = $20; - $29 = 16328; - $30 = $29; - HEAP32[$30>>2] = $17; - $31 = (($29) + 4)|0; - $32 = $31; - HEAP32[$32>>2] = $20; - $33 = ((($0)) + 8|0); - $34 = HEAP32[$33>>2]|0; - HEAP32[4] = $34; - HEAPF32[4084] = 0.0; - HEAPF32[(16340)>>2] = 0.0; - STACKTOP = sp;return; - } - switch ($4|0) { - case 0: { - $35 = HEAP32[4161]|0; - $36 = ($35|0)==(8); - if ($36) { - $37 = ((($0)) + 24|0); - $38 = $37; - $39 = $38; - $40 = HEAP32[$39>>2]|0; - $41 = (($38) + 4)|0; - $42 = $41; - $43 = HEAP32[$42>>2]|0; - $44 = 16328; - $45 = $44; - HEAP32[$45>>2] = $40; - $46 = (($44) + 4)|0; - $47 = $46; - HEAP32[$47>>2] = $43; - } - ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[16312>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[16312+4>>2]|0; - ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[16328>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[16328+4>>2]|0; - $48 = (+_Vector2Distance($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); - $49 = $48 / 0.0; - HEAPF32[4164] = $49; - HEAP32[4165] = 0; - $50 = $49 > 5.0000002374872565E-4; - if ($50) { - $51 = HEAP32[4]|0; - $52 = ((($0)) + 8|0); - $53 = HEAP32[$52>>2]|0; - $54 = ($51|0)==($53|0); - if ($54) { - ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[16312>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[16312+4>>2]|0; - ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[16328>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[16328+4>>2]|0; - $55 = (+_Vector2Angle($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); - $56 = 360.0 - $55; - HEAPF32[4166] = $56; - $57 = $56 < 30.0; - $58 = $56 > 330.0; - $or$cond3 = $57 | $58; - if ($or$cond3) { - $$sink10 = 16; - } else { - $59 = $56 > 30.0; - $60 = $56 < 120.0; - $or$cond5 = $59 & $60; - if ($or$cond5) { - $$sink10 = 64; - } else { - $61 = $56 > 120.0; - $62 = $56 < 210.0; - $or$cond7 = $61 & $62; - $63 = $56 > 210.0; - $64 = $56 < 300.0; - $or$cond9 = $63 & $64; - $$sink = $or$cond9 ? 128 : 0; - $$$sink = $or$cond7 ? 32 : $$sink; - $$sink10 = $$$sink; - } - } - } else { - label = 16; - } - } else { - label = 16; - } - if ((label|0) == 16) { - HEAPF32[4164] = 0.0; - HEAPF32[4166] = 0.0; - $$sink10 = 0; - } - HEAP32[4161] = $$sink10; - HEAPF32[4080] = 0.0; - HEAPF32[(16324)>>2] = 0.0; - HEAP32[4162] = 0; - STACKTOP = sp;return; - break; - } - case 2: { - $65 = HEAP32[4165]|0; - $66 = ($65|0)==(0); - if ($66) { - HEAP32[4165] = 1; - } - $67 = ((($0)) + 24|0); - $68 = $67; - $69 = $68; - $70 = HEAP32[$69>>2]|0; - $71 = (($68) + 4)|0; - $72 = $71; - $73 = HEAP32[$72>>2]|0; - $74 = 16344; - $75 = $74; - HEAP32[$75>>2] = $70; - $76 = (($74) + 4)|0; - $77 = $76; - HEAP32[$77>>2] = $73; - $78 = HEAP32[4161]|0; - $79 = ($78|0)==(4); - if ($79) { - ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[16312>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[16312+4>>2]|0; - ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[16344>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[16344+4>>2]|0; - $80 = (+_Vector2Distance($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); - $81 = !($80 >= 0.014999999664723873); - if (!($81)) { - HEAP32[4161] = 8; - } - } - $82 = +HEAPF32[4086]; - $83 = +HEAPF32[4080]; - $84 = $82 - $83; - HEAPF32[4084] = $84; - $85 = +HEAPF32[(16348)>>2]; - $86 = +HEAPF32[(16324)>>2]; - $87 = $85 - $86; - HEAPF32[(16340)>>2] = $87; - STACKTOP = sp;return; - break; - } - default: { - STACKTOP = sp;return; - } - } -} -function _UpdateGestures() { - var $$off = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $or$cond3 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[4161]|0; - $$off = (($0) + -1)|0; - $1 = ($$off>>>0)<(2); - $2 = HEAP32[4162]|0; - $3 = ($2|0)<(2); - $or$cond3 = $1 & $3; - if ($or$cond3) { - HEAP32[4161] = 4; - } - $4 = HEAP32[4161]|0; - $5 = (($4) + -16)|0; - $6 = $5 >>> 4; - $7 = $5 << 28; - $8 = $6 | $7; - switch ($8|0) { - case 0: case 1: case 3: case 7: { - break; - } - default: { - return; - } - } - HEAP32[4161] = 0; - return; -} -function _SetCameraMode($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $$sroa$023$0$$sroa_idx = 0, $$sroa$023$0$copyload = 0.0, $$sroa$030$0$copyload = 0.0, $$sroa$4$0$$sroa_idx25 = 0, $$sroa$4$0$copyload = 0.0, $$sroa$432$0$$sroa_idx33 = 0, $$sroa$432$0$copyload = 0.0, $$sroa$527$0$$sroa_idx28 = 0, $$sroa$527$0$copyload = 0.0, $$sroa$535$0$$sroa_idx36 = 0, $$sroa$535$0$copyload = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0; - var $19 = 0.0, $2 = 0.0, $20 = 0.0, $21 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $$sroa$030$0$copyload = +HEAPF32[$0>>2]; - $$sroa$432$0$$sroa_idx33 = ((($0)) + 4|0); - $$sroa$432$0$copyload = +HEAPF32[$$sroa$432$0$$sroa_idx33>>2]; - $$sroa$535$0$$sroa_idx36 = ((($0)) + 8|0); - $$sroa$535$0$copyload = +HEAPF32[$$sroa$535$0$$sroa_idx36>>2]; - $$sroa$023$0$$sroa_idx = ((($0)) + 12|0); - $$sroa$023$0$copyload = +HEAPF32[$$sroa$023$0$$sroa_idx>>2]; - $$sroa$4$0$$sroa_idx25 = ((($0)) + 16|0); - $$sroa$4$0$copyload = +HEAPF32[$$sroa$4$0$$sroa_idx25>>2]; - $$sroa$527$0$$sroa_idx28 = ((($0)) + 20|0); - $$sroa$527$0$copyload = +HEAPF32[$$sroa$527$0$$sroa_idx28>>2]; - $2 = $$sroa$023$0$copyload - $$sroa$030$0$copyload; - $3 = $$sroa$4$0$copyload - $$sroa$432$0$copyload; - $4 = $$sroa$527$0$copyload - $$sroa$535$0$copyload; - $5 = $2 * $2; - $6 = $3 * $3; - $7 = $5 + $6; - $8 = $4 * $4; - $9 = $7 + $8; - $10 = (+Math_sqrt((+$9))); - HEAPF32[4169] = $10; - $11 = $5 + $8; - $12 = (+Math_sqrt((+$11))); - $13 = (+Math_sqrt((+$7))); - $14 = (+Math_abs((+$2))); - $15 = $14 / $12; - $16 = (+Math_asin((+$15))); - HEAPF32[4170] = $16; - $17 = (+Math_abs((+$3))); - $18 = $17 / $13; - $19 = (+Math_asin((+$18))); - $20 = -$19; - HEAPF32[4171] = $20; - $21 = HEAP32[$$sroa$432$0$$sroa_idx33>>2]|0; - HEAP32[5] = $21; - HEAP32[4172] = $1; - return; -} -function _UpdateCamera($0) { - $0 = $0|0; - var $$ = 0, $$0 = 0, $$byval_copy3 = 0, $$not = 0, $$not188 = 0, $$off187 = 0, $$pr = 0, $$pr190 = 0, $$sink = 0.0, $$sink17 = 0, $$sink22 = 0.0, $$sink22$p = 0.0, $$sink26 = 0.0, $$sink28 = 0.0, $$sroa$095$0 = 0.0, $$sroa$9$0 = 0.0, $1 = 0, $10 = 0, $100 = 0.0, $101 = 0.0; - var $102 = 0.0, $103 = 0.0, $104 = 0.0, $105 = 0.0, $106 = 0.0, $107 = 0.0, $108 = 0.0, $109 = 0.0, $11 = 0, $110 = 0.0, $111 = 0.0, $112 = 0, $113 = 0.0, $114 = 0, $115 = 0.0, $116 = 0.0, $117 = 0.0, $118 = 0.0, $119 = 0.0, $12 = 0; - var $120 = 0.0, $121 = 0, $122 = 0.0, $123 = 0.0, $124 = 0.0, $125 = 0.0, $126 = 0.0, $127 = 0.0, $128 = 0.0, $129 = 0.0, $13 = 0, $130 = 0.0, $131 = 0.0, $132 = 0.0, $133 = 0.0, $134 = 0.0, $135 = 0, $136 = 0.0, $137 = 0, $138 = 0.0; - var $139 = 0.0, $14 = 0, $140 = 0.0, $141 = 0.0, $142 = 0.0, $143 = 0.0, $144 = 0, $145 = 0, $146 = 0.0, $147 = 0.0, $148 = 0.0, $149 = 0, $15 = 0, $150 = 0, $151 = 0.0, $152 = 0.0, $153 = 0.0, $154 = 0.0, $155 = 0.0, $156 = 0.0; - var $157 = 0.0, $158 = 0.0, $159 = 0.0, $16 = 0, $160 = 0.0, $161 = 0.0, $162 = 0.0, $163 = 0.0, $164 = 0.0, $165 = 0.0, $166 = 0.0, $167 = 0, $168 = 0.0, $169 = 0, $17 = 0, $170 = 0.0, $171 = 0.0, $172 = 0.0, $173 = 0.0, $174 = 0.0; - var $175 = 0.0, $176 = 0, $177 = 0.0, $178 = 0.0, $179 = 0.0, $18 = 0, $180 = 0.0, $181 = 0.0, $182 = 0.0, $183 = 0.0, $184 = 0.0, $185 = 0.0, $186 = 0.0, $187 = 0.0, $188 = 0.0, $189 = 0.0, $19 = 0, $190 = 0.0, $191 = 0, $192 = 0.0; - var $193 = 0, $194 = 0.0, $195 = 0.0, $196 = 0.0, $197 = 0.0, $198 = 0.0, $199 = 0.0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0.0, $204 = 0.0, $205 = 0.0, $206 = 0.0, $207 = 0, $208 = 0, $209 = 0, $21 = 0; - var $210 = 0, $211 = 0.0, $212 = 0.0, $213 = 0.0, $214 = 0.0, $215 = 0.0, $216 = 0.0, $217 = 0.0, $218 = 0.0, $219 = 0.0, $22 = 0, $220 = 0, $221 = 0, $222 = 0.0, $223 = 0.0, $224 = 0.0, $225 = 0.0, $226 = 0.0, $227 = 0.0, $228 = 0.0; - var $229 = 0.0, $23 = 0, $230 = 0.0, $231 = 0.0, $232 = 0.0, $233 = 0.0, $234 = 0.0, $235 = 0.0, $236 = 0, $237 = 0.0, $238 = 0.0, $239 = 0.0, $24 = 0, $240 = 0.0, $241 = 0.0, $242 = 0, $243 = 0.0, $244 = 0.0, $245 = 0.0, $246 = 0.0; - var $247 = 0.0, $248 = 0.0, $249 = 0.0, $25 = 0, $250 = 0.0, $251 = 0, $252 = 0.0, $253 = 0.0, $254 = 0.0, $255 = 0.0, $256 = 0.0, $257 = 0.0, $258 = 0.0, $259 = 0.0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0.0; - var $265 = 0.0, $266 = 0, $267 = 0.0, $268 = 0.0, $269 = 0, $27 = 0, $270 = 0.0, $271 = 0.0, $272 = 0.0, $273 = 0.0, $274 = 0, $275 = 0.0, $276 = 0.0, $277 = 0.0, $278 = 0, $279 = 0.0, $28 = 0, $280 = 0.0, $281 = 0.0, $282 = 0.0; - var $283 = 0.0, $284 = 0.0, $285 = 0.0, $286 = 0.0, $287 = 0.0, $288 = 0.0, $289 = 0.0, $29 = 0, $290 = 0, $291 = 0.0, $292 = 0.0, $293 = 0, $294 = 0.0, $295 = 0.0, $296 = 0.0, $297 = 0, $298 = 0.0, $299 = 0.0, $3 = 0, $30 = 0; - var $300 = 0.0, $301 = 0.0, $302 = 0.0, $303 = 0.0, $304 = 0.0, $305 = 0.0, $306 = 0.0, $307 = 0.0, $308 = 0, $309 = 0.0, $31 = 0, $310 = 0.0, $311 = 0, $312 = 0, $313 = 0.0, $314 = 0.0, $315 = 0.0, $316 = 0.0, $317 = 0.0, $318 = 0.0; - var $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0.0, $324 = 0.0, $325 = 0.0, $326 = 0.0, $327 = 0, $328 = 0.0, $329 = 0.0, $33 = 0, $330 = 0.0, $331 = 0.0, $332 = 0.0, $333 = 0.0, $334 = 0.0, $335 = 0.0, $336 = 0; - var $337 = 0.0, $338 = 0.0, $339 = 0, $34 = 0, $340 = 0.0, $341 = 0.0, $342 = 0.0, $343 = 0.0, $344 = 0, $345 = 0, $346 = 0.0, $347 = 0.0, $348 = 0.0, $349 = 0.0, $35 = 0, $350 = 0.0, $351 = 0, $352 = 0.0, $353 = 0.0, $354 = 0.0; - var $355 = 0.0, $356 = 0.0, $357 = 0, $358 = 0.0, $359 = 0.0, $36 = 0, $360 = 0.0, $361 = 0.0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0.0, $367 = 0, $368 = 0.0, $369 = 0.0, $37 = 0.0, $370 = 0.0, $371 = 0.0, $372 = 0.0; - var $373 = 0.0, $374 = 0.0, $375 = 0.0, $376 = 0, $377 = 0.0, $378 = 0.0, $379 = 0, $38 = 0.0, $380 = 0, $381 = 0.0, $382 = 0.0, $383 = 0.0, $384 = 0.0, $385 = 0.0, $386 = 0.0, $387 = 0.0, $388 = 0, $389 = 0.0, $39 = 0.0, $390 = 0.0; - var $391 = 0, $392 = 0.0, $393 = 0.0, $394 = 0, $395 = 0.0, $396 = 0.0, $397 = 0.0, $398 = 0.0, $399 = 0, $4 = 0, $40 = 0, $400 = 0.0, $401 = 0.0, $402 = 0.0, $403 = 0, $404 = 0.0, $405 = 0.0, $406 = 0, $407 = 0, $408 = 0; - var $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $42 = 0.0, $43 = 0, $44 = 0, $45 = 0.0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0; - var $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0, $55 = 0, $56 = 0.0, $57 = 0, $58 = 0, $59 = 0.0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0.0, $64 = 0.0, $65 = 0.0, $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0.0; - var $7 = 0, $70 = 0.0, $71 = 0, $72 = 0.0, $73 = 0.0, $74 = 0.0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0.0, $86 = 0, $87 = 0; - var $88 = 0.0, $89 = 0.0, $9 = 0, $90 = 0.0, $91 = 0, $92 = 0, $93 = 0.0, $94 = 0, $95 = 0, $96 = 0.0, $97 = 0, $98 = 0, $99 = 0.0, $not$ = 0, $or$cond = 0, $or$cond11 = 0, $or$cond13 = 0, $or$cond15 = 0, $or$cond189 = 0, $or$cond3 = 0; - var $or$cond5 = 0, $or$cond7 = 0, $or$cond9 = 0, $storemerge = 0.0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(80|0); - $$byval_copy3 = sp + 72|0; - $1 = sp + 56|0; - $2 = sp + 16|0; - $3 = sp + 64|0; - $4 = sp + 48|0; - $5 = sp + 40|0; - $6 = sp + 8|0; - $7 = sp; - _GetMousePosition($1); - $8 = (_GetMouseWheelMove()|0); - $9 = HEAP32[6]|0; - $10 = (_IsMouseButtonDown($9)|0); - $11 = HEAP32[7]|0; - $12 = (_IsKeyDown($11)|0); - $13 = HEAP32[8]|0; - $14 = (_IsKeyDown($13)|0); - $15 = HEAP32[9]|0; - $16 = (_IsKeyDown($15)|0); - HEAP32[$2>>2] = $16; - $17 = ((($2)) + 4|0); - $18 = HEAP32[10]|0; - $19 = (_IsKeyDown($18)|0); - HEAP32[$17>>2] = $19; - $20 = ((($2)) + 8|0); - $21 = HEAP32[11]|0; - $22 = (_IsKeyDown($21)|0); - HEAP32[$20>>2] = $22; - $23 = ((($2)) + 12|0); - $24 = HEAP32[12]|0; - $25 = (_IsKeyDown($24)|0); - HEAP32[$23>>2] = $25; - $26 = ((($2)) + 16|0); - $27 = HEAP32[13]|0; - $28 = (_IsKeyDown($27)|0); - HEAP32[$26>>2] = $28; - $29 = ((($2)) + 20|0); - $30 = HEAP32[14]|0; - $31 = (_IsKeyDown($30)|0); - HEAP32[$29>>2] = $31; - $32 = HEAP32[4172]|0; - $33 = ($32|0)==(0); - L1: do { - if ($33) { - label = 58; - } else { - $34 = (_GetScreenWidth()|0); - $35 = (_GetScreenHeight()|0); - $$off187 = (($32) + -3)|0; - $36 = ($$off187>>>0)<(2); - do { - if ($36) { - _HideCursor(); - $37 = +HEAPF32[$1>>2]; - $38 = (+($35|0)); - $39 = $38 / 3.0; - $40 = $37 < $39; - $41 = ((($1)) + 4|0); - $42 = +HEAPF32[$41>>2]; - if ($40) { - $43 = (($35|0) / 3)&-1; - $44 = (($34) - ($43))|0; - $45 = (+($44|0)); - HEAPF32[$3>>2] = $45; - $46 = ((($3)) + 4|0); - HEAPF32[$46>>2] = $42; - ;HEAP32[$$byval_copy3>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$3+4>>2]|0; - _SetMousePosition($$byval_copy3); - $$sroa$095$0 = 0.0;$$sroa$9$0 = 0.0; - break; - } - $47 = $42 < $39; - if ($47) { - HEAPF32[$4>>2] = $37; - $48 = ((($4)) + 4|0); - $49 = (($35|0) / 3)&-1; - $50 = (($35) - ($49))|0; - $51 = (+($50|0)); - HEAPF32[$48>>2] = $51; - ;HEAP32[$$byval_copy3>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$4+4>>2]|0; - _SetMousePosition($$byval_copy3); - $$sroa$095$0 = 0.0;$$sroa$9$0 = 0.0; - break; - } - $52 = (+($34|0)); - $53 = $52 - $39; - $54 = $37 > $53; - if ($54) { - $55 = (($35|0) / 3)&-1; - $56 = (+($55|0)); - HEAPF32[$5>>2] = $56; - $57 = ((($5)) + 4|0); - $58 = HEAP32[$41>>2]|0; - HEAP32[$57>>2] = $58; - ;HEAP32[$$byval_copy3>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$5+4>>2]|0; - _SetMousePosition($$byval_copy3); - $$sroa$095$0 = 0.0;$$sroa$9$0 = 0.0; - break; - } - $59 = $38 - $39; - $60 = $42 > $59; - if ($60) { - HEAPF32[$6>>2] = $37; - $61 = ((($6)) + 4|0); - $62 = (($35|0) / 3)&-1; - $63 = (+($62|0)); - HEAPF32[$61>>2] = $63; - ;HEAP32[$$byval_copy3>>2]=HEAP32[$6>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$6+4>>2]|0; - _SetMousePosition($$byval_copy3); - $$sroa$095$0 = 0.0;$$sroa$9$0 = 0.0; - break; - } else { - $64 = +HEAPF32[4094]; - $65 = $37 - $64; - $66 = +HEAPF32[(16380)>>2]; - $67 = $42 - $66; - $$sroa$095$0 = $65;$$sroa$9$0 = $67; - break; - } - } else { - _ShowCursor(); - $68 = +HEAPF32[$1>>2]; - $69 = +HEAPF32[4094]; - $70 = $68 - $69; - $71 = ((($1)) + 4|0); - $72 = +HEAPF32[$71>>2]; - $73 = +HEAPF32[(16380)>>2]; - $74 = $72 - $73; - $$sroa$095$0 = $70;$$sroa$9$0 = $74; - } - } while(0); - _GetMousePosition($7); - $75 = $7; - $76 = $75; - $77 = HEAP32[$76>>2]|0; - $78 = (($75) + 4)|0; - $79 = $78; - $80 = HEAP32[$79>>2]|0; - $81 = 16376; - $82 = $81; - HEAP32[$82>>2] = $77; - $83 = (($81) + 4)|0; - $84 = $83; - HEAP32[$84>>2] = $80; - $$pr = HEAP32[4172]|0; - switch ($$pr|0) { - case 1: { - $85 = +HEAPF32[4169]; - $86 = $85 < 120.0; - $87 = ($8|0)<(0); - $or$cond3 = $87 & $86; - do { - if ($or$cond3) { - $88 = (+($8|0)); - $89 = $88 * 1.5; - $90 = $85 - $89; - HEAPF32[4169] = $90; - $91 = $90 > 120.0; - if ($91) { - HEAPF32[4169] = 120.0; - } - } else { - $92 = ((($0)) + 4|0); - $93 = +HEAPF32[$92>>2]; - $94 = ((($0)) + 12|0); - $95 = ((($0)) + 16|0); - $96 = +HEAPF32[$95>>2]; - $97 = $93 > $96; - $98 = $85 == 120.0; - $or$cond5 = $98 & $97; - $or$cond7 = $87 & $or$cond5; - if ($or$cond7) { - $99 = (+($8|0)); - $100 = +HEAPF32[$94>>2]; - $101 = +HEAPF32[$0>>2]; - $102 = $100 - $101; - $103 = $99 * $102; - $104 = $103 * 1.5; - $105 = $104 / $85; - $106 = $100 + $105; - HEAPF32[$94>>2] = $106; - $107 = $96 - $93; - $108 = $99 * $107; - $109 = $108 * 1.5; - $110 = $109 / $85; - $111 = $96 + $110; - HEAPF32[$95>>2] = $111; - $112 = ((($0)) + 20|0); - $113 = +HEAPF32[$112>>2]; - $114 = ((($0)) + 8|0); - $115 = +HEAPF32[$114>>2]; - $116 = $113 - $115; - $117 = $99 * $116; - $118 = $117 * 1.5; - $119 = $118 / $85; - $120 = $113 + $119; - HEAPF32[$112>>2] = $120; - break; - } - $$not = $97 ^ 1; - $121 = !($96 >= 0.0); - $or$cond = $121 | $$not; - if (!($or$cond)) { - $122 = (+($8|0)); - $123 = +HEAPF32[$94>>2]; - $124 = +HEAPF32[$0>>2]; - $125 = $123 - $124; - $126 = $122 * $125; - $127 = $126 * 1.5; - $128 = $127 / $85; - $129 = $123 + $128; - HEAPF32[$94>>2] = $129; - $130 = $96 - $93; - $131 = $122 * $130; - $132 = $131 * 1.5; - $133 = $132 / $85; - $134 = $96 + $133; - HEAPF32[$95>>2] = $134; - $135 = ((($0)) + 20|0); - $136 = +HEAPF32[$135>>2]; - $137 = ((($0)) + 8|0); - $138 = +HEAPF32[$137>>2]; - $139 = $136 - $138; - $140 = $122 * $139; - $141 = $140 * 1.5; - $142 = $141 / $85; - $143 = $136 + $142; - HEAPF32[$135>>2] = $143; - break; - } - if ($97) { - $144 = $96 < 0.0; - $145 = ($8|0)>(0); - $or$cond9 = $145 & $144; - if ($or$cond9) { - $146 = (+($8|0)); - $147 = $146 * 1.5; - $148 = $85 - $147; - HEAPF32[4169] = $148; - $149 = $148 < 0.30000001192092896; - if (!($149)) { - break; - } - HEAPF32[4169] = 0.30000001192092896; - break; - } - } - $150 = $93 < $96; - $or$cond11 = $98 & $150; - $or$cond13 = $87 & $or$cond11; - $151 = +HEAPF32[$95>>2]; - $152 = +HEAPF32[$92>>2]; - if ($or$cond13) { - $153 = (+($8|0)); - $154 = +HEAPF32[$94>>2]; - $155 = +HEAPF32[$0>>2]; - $156 = $154 - $155; - $157 = $153 * $156; - $158 = $157 * 1.5; - $159 = $158 / $85; - $160 = $154 + $159; - HEAPF32[$94>>2] = $160; - $161 = $151 - $152; - $162 = $153 * $161; - $163 = $162 * 1.5; - $164 = +HEAPF32[4169]; - $165 = $163 / $164; - $166 = $151 + $165; - HEAPF32[$95>>2] = $166; - $167 = ((($0)) + 20|0); - $168 = +HEAPF32[$167>>2]; - $169 = ((($0)) + 8|0); - $170 = +HEAPF32[$169>>2]; - $171 = $168 - $170; - $172 = $153 * $171; - $173 = $172 * 1.5; - $174 = $173 / $164; - $175 = $168 + $174; - HEAPF32[$167>>2] = $175; - break; - } - $$not188 = $150 ^ 1; - $176 = !($96 <= 0.0); - $or$cond189 = $176 | $$not188; - if (!($or$cond189)) { - $177 = (+($8|0)); - $178 = +HEAPF32[$94>>2]; - $179 = +HEAPF32[$0>>2]; - $180 = $178 - $179; - $181 = $177 * $180; - $182 = $181 * 1.5; - $183 = $182 / $85; - $184 = $178 + $183; - HEAPF32[$94>>2] = $184; - $185 = $151 - $152; - $186 = $177 * $185; - $187 = $186 * 1.5; - $188 = +HEAPF32[4169]; - $189 = $187 / $188; - $190 = $151 + $189; - HEAPF32[$95>>2] = $190; - $191 = ((($0)) + 20|0); - $192 = +HEAPF32[$191>>2]; - $193 = ((($0)) + 8|0); - $194 = +HEAPF32[$193>>2]; - $195 = $192 - $194; - $196 = $177 * $195; - $197 = $196 * 1.5; - $198 = $197 / $188; - $199 = $192 + $198; - HEAPF32[$191>>2] = $199; - break; - } - $200 = $152 < $151; - if ($200) { - $201 = $151 > 0.0; - $202 = ($8|0)>(0); - $or$cond15 = $202 & $201; - if ($or$cond15) { - $203 = (+($8|0)); - $204 = $203 * 1.5; - $205 = +HEAPF32[4169]; - $206 = $205 - $204; - HEAPF32[4169] = $206; - $207 = $206 < 0.30000001192092896; - if ($207) { - HEAPF32[4169] = 0.30000001192092896; - } - } - } - } - } while(0); - $208 = ($10|0)==(0); - if ($208) { - label = 58; - break L1; - } - $209 = ($12|0)==(0); - if ($209) { - $222 = $$sroa$095$0 * -0.0099999997764825821; - $223 = +HEAPF32[4170]; - $224 = (+Math_cos((+$223))); - $225 = $222 * $224; - $226 = $$sroa$9$0 * 0.0099999997764825821; - $227 = (+Math_sin((+$223))); - $228 = $226 * $227; - $229 = +HEAPF32[4171]; - $230 = (+Math_sin((+$229))); - $231 = $228 * $230; - $232 = $225 + $231; - $233 = +HEAPF32[4169]; - $234 = $233 / 5.0999999046325684; - $235 = $232 * $234; - $236 = ((($0)) + 12|0); - $237 = +HEAPF32[$236>>2]; - $238 = $237 + $235; - HEAPF32[$236>>2] = $238; - $239 = (+Math_cos((+$229))); - $240 = $226 * $239; - $241 = $234 * $240; - $242 = ((($0)) + 16|0); - $243 = +HEAPF32[$242>>2]; - $244 = $243 + $241; - HEAPF32[$242>>2] = $244; - $245 = $$sroa$095$0 * 0.0099999997764825821; - $246 = $245 * $227; - $247 = $226 * $224; - $248 = $247 * $230; - $249 = $246 + $248; - $250 = $249 * $234; - $251 = ((($0)) + 20|0); - $252 = +HEAPF32[$251>>2]; - $253 = $250 + $252; - HEAPF32[$251>>2] = $253; - label = 58; - break L1; - } - $210 = ($14|0)==(0); - if (!($210)) { - $211 = $$sroa$9$0 * 0.05000000074505806; - $212 = +HEAPF32[4169]; - $213 = $211 + $212; - HEAPF32[4169] = $213; - label = 58; - break L1; - } - $214 = $$sroa$095$0 * 0.0099999997764825821; - $215 = +HEAPF32[4170]; - $216 = $215 - $214; - HEAPF32[4170] = $216; - $217 = $$sroa$9$0 * 0.0099999997764825821; - $218 = +HEAPF32[4171]; - $219 = $218 - $217; - HEAPF32[4171] = $219; - $220 = $219 > 1.483529806137085; - if ($220) { - HEAPF32[4171] = 1.483529806137085; - label = 58; - break L1; - } - $221 = $219 < -1.483529806137085; - if (!($221)) { - label = 58; - break L1; - } - HEAPF32[4171] = -1.483529806137085; - label = 58; - break L1; - break; - } - case 2: { - $254 = +HEAPF32[4170]; - $255 = $254 + 0.0099999997764825821; - HEAPF32[4170] = $255; - $256 = (+($8|0)); - $257 = $256 * 1.5; - $258 = +HEAPF32[4169]; - $259 = $258 - $257; - HEAPF32[4169] = $259; - $260 = $259 < 1.2000000476837158; - if (!($260)) { - label = 58; - break L1; - } - HEAPF32[4169] = 1.2000000476837158; - label = 58; - break L1; - break; - } - case 4: case 3: { - $264 = +HEAPF32[4170]; - $265 = (+Math_sin((+$264))); - $266 = HEAP32[$17>>2]|0; - $267 = (+($266>>>0)); - $268 = $265 * $267; - $269 = HEAP32[$2>>2]|0; - $270 = (+($269>>>0)); - $271 = $265 * $270; - $272 = $268 - $271; - $273 = (+Math_cos((+$264))); - $274 = HEAP32[$23>>2]|0; - $275 = (+($274>>>0)); - $276 = $273 * $275; - $277 = $272 - $276; - $278 = HEAP32[$20>>2]|0; - $279 = (+($278>>>0)); - $280 = $273 * $279; - $281 = $277 + $280; - $282 = $281 / 20.0; - $283 = +HEAPF32[$0>>2]; - $284 = $283 + $282; - HEAPF32[$0>>2] = $284; - $285 = +HEAPF32[4171]; - $286 = (+Math_sin((+$285))); - $287 = $270 * $286; - $288 = $267 * $286; - $289 = $287 - $288; - $290 = HEAP32[$26>>2]|0; - $291 = (+($290>>>0)); - $292 = $289 + $291; - $293 = HEAP32[$29>>2]|0; - $294 = (+($293>>>0)); - $295 = $292 - $294; - $296 = $295 / 20.0; - $297 = ((($0)) + 4|0); - $298 = +HEAPF32[$297>>2]; - $299 = $298 + $296; - HEAPF32[$297>>2] = $299; - $300 = $267 * $273; - $301 = $273 * $270; - $302 = $300 - $301; - $303 = $265 * $275; - $304 = $302 + $303; - $305 = $265 * $279; - $306 = $304 - $305; - $307 = $306 / 20.0; - $308 = ((($0)) + 8|0); - $309 = +HEAPF32[$308>>2]; - $310 = $307 + $309; - HEAPF32[$308>>2] = $310; - $311 = HEAP32[$2>>2]|0; - $312 = ($311|0)==(0); - if ($312) { - $261 = ((($2)) + 4|0); - $262 = HEAP32[$261>>2]|0; - $263 = ($262|0)==(0); - if ($263) { - $407 = ((($2)) + 8|0); - $408 = HEAP32[$407>>2]|0; - $409 = ($408|0)==(0); - if ($409) { - $410 = ((($2)) + 12|0); - $411 = HEAP32[$410>>2]|0; - $412 = ($411|0)==(0); - if ($412) { - $413 = ((($2)) + 16|0); - $414 = HEAP32[$413>>2]|0; - $415 = ($414|0)==(0); - if ($415) { - $416 = ((($2)) + 20|0); - $417 = HEAP32[$416>>2]|0; - $not$ = ($417|0)!=(0); - $$ = $not$&1; - $$0 = $$; - } else { - $$0 = 1; - } - } else { - $$0 = 1; - } - } else { - $$0 = 1; - } - } else { - $$0 = 1; - } - } else { - $$0 = 1; - } - $313 = $$sroa$095$0 * 0.0030000000260770321; - $314 = +HEAPF32[4170]; - $315 = $314 - $313; - HEAPF32[4170] = $315; - $316 = $$sroa$9$0 * 0.0030000000260770321; - $317 = +HEAPF32[4171]; - $318 = $317 - $316; - HEAPF32[4171] = $318; - $319 = HEAP32[4172]|0; - $320 = ($319|0)==(4); - if ($320) { - $321 = $318 > 0.087266460061073303; - if ($321) { - $$sink26 = 0.087266460061073303; - label = 49; - } else { - $322 = $318 < -1.483529806137085; - if ($322) { - $$sink26 = -1.483529806137085; - label = 49; - } - } - if ((label|0) == 49) { - HEAPF32[4171] = $$sink26; - } - $323 = (+($8|0)); - $324 = $323 * 1.5; - $325 = +HEAPF32[4169]; - $326 = $325 - $324; - $327 = $326 < 1.2000000476837158; - $storemerge = $327 ? 1.2000000476837158 : $326; - HEAPF32[4169] = $storemerge; - $328 = +HEAPF32[$0>>2]; - $329 = +HEAPF32[4170]; - $330 = (+Math_cos((+$329))); - $331 = $330 * 0.40000000596046448; - $332 = $328 + $331; - $333 = (+Math_sin((+$329))); - $334 = $333 * 0.0; - $335 = $332 + $334; - $336 = ((($0)) + 12|0); - HEAPF32[$336>>2] = $335; - $337 = +HEAPF32[$297>>2]; - $338 = $337 + 0.0; - $339 = ((($0)) + 16|0); - HEAPF32[$339>>2] = $338; - $340 = +HEAPF32[$308>>2]; - $341 = $334 + $340; - $342 = $333 * 0.40000000596046448; - $343 = $341 - $342; - $$sink = $343;$$sink17 = $336; - } else { - $344 = $318 > 1.483529806137085; - if ($344) { - $$sink28 = 1.483529806137085; - label = 53; - } else { - $345 = $318 < -1.483529806137085; - if ($345) { - $$sink28 = -1.483529806137085; - label = 53; - } - } - if ((label|0) == 53) { - HEAPF32[4171] = $$sink28; - } - $346 = +HEAPF32[$0>>2]; - $347 = +HEAPF32[4170]; - $348 = (+Math_sin((+$347))); - $349 = $348 * 25.0; - $350 = $346 - $349; - $351 = ((($0)) + 12|0); - HEAPF32[$351>>2] = $350; - $352 = +HEAPF32[$297>>2]; - $353 = +HEAPF32[4171]; - $354 = (+Math_sin((+$353))); - $355 = $354 * 25.0; - $356 = $352 + $355; - $357 = ((($0)) + 16|0); - HEAPF32[$357>>2] = $356; - $358 = +HEAPF32[$308>>2]; - $359 = (+Math_cos((+$347))); - $360 = $359 * 25.0; - $361 = $358 - $360; - $362 = ((($0)) + 20|0); - HEAPF32[$362>>2] = $361; - $363 = ($$0|0)==(0); - if (!($363)) { - $364 = HEAP32[4173]|0; - $365 = (($364) + 1)|0; - HEAP32[4173] = $365; - } - $366 = +HEAPF32[5]; - $367 = HEAP32[4173]|0; - $368 = (+($367|0)); - $369 = $368 / 5.0; - $370 = (+Math_sin((+$369))); - $371 = $370 / 30.0; - $372 = $366 - $371; - HEAPF32[$297>>2] = $372; - $373 = $368 / 10.0; - $374 = (+Math_sin((+$373))); - $375 = $374 / 200.0; - $376 = ((($0)) + 24|0); - HEAPF32[$376>>2] = $375; - $377 = -$374; - $378 = $377 / 200.0; - $$sink = $378;$$sink17 = $376; - } - $379 = ((($$sink17)) + 8|0); - HEAPF32[$379>>2] = $$sink; - label = 58; - break L1; - break; - } - default: { - $380 = $$pr; - break L1; - } - } - } - } while(0); - if ((label|0) == 58) { - $$pr190 = HEAP32[4172]|0; - $380 = $$pr190; - } - switch ($380|0) { - case 1: case 2: case 4: { - break; - } - default: { - STACKTOP = sp;return; - } - } - $381 = +HEAPF32[4170]; - $382 = (+Math_sin((+$381))); - $383 = +HEAPF32[4169]; - $384 = $382 * $383; - $385 = +HEAPF32[4171]; - $386 = (+Math_cos((+$385))); - $387 = $384 * $386; - $388 = ((($0)) + 12|0); - $389 = +HEAPF32[$388>>2]; - $390 = $387 + $389; - HEAPF32[$0>>2] = $390; - $391 = !($385 <= 0.0); - $392 = (+Math_sin((+$385))); - $393 = +HEAPF32[4169]; - $394 = ((($0)) + 16|0); - $395 = +HEAPF32[$394>>2]; - $396 = $392 * $393; - $397 = $392 * $396; - $398 = -$397; - $$sink22$p = $391 ? $398 : $397; - $$sink22 = $395 + $$sink22$p; - $399 = ((($0)) + 4|0); - HEAPF32[$399>>2] = $$sink22; - $400 = (+Math_cos((+$381))); - $401 = $393 * $400; - $402 = $386 * $401; - $403 = ((($0)) + 20|0); - $404 = +HEAPF32[$403>>2]; - $405 = $404 + $402; - $406 = ((($0)) + 8|0); - HEAPF32[$406>>2] = $405; - STACKTOP = sp;return; -} -function _GetMousePosition($0) { - $0 = $0|0; - var $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = 16384; - $2 = $1; - $3 = HEAP32[$2>>2]|0; - $4 = (($1) + 4)|0; - $5 = $4; - $6 = HEAP32[$5>>2]|0; - $7 = $0; - $8 = $7; - HEAP32[$8>>2] = $3; - $9 = (($7) + 4)|0; - $10 = $9; - HEAP32[$10>>2] = $6; - return; -} -function _GetMouseWheelMove() { - var $0 = 0, $1 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[4178]|0; - $1 = (($0|0) / 100)&-1; - return ($1|0); -} -function _IsMouseButtonDown($0) { - $0 = $0|0; - var $$ = 0, $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = (_GetMouseButtonStatus($0)|0); - $2 = ($1|0)==(1); - $$ = $2&1; - return ($$|0); -} -function _IsKeyDown($0) { - $0 = $0|0; - var $$ = 0, $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = (_GetKeyStatus($0)|0); - $2 = ($1|0)==(1); - $$ = $2&1; - return ($$|0); -} -function _GetScreenWidth() { - var $0 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[4177]|0; - return ($0|0); -} -function _GetScreenHeight() { - var $0 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[4176]|0; - return ($0|0); -} -function _HideCursor() { - var label = 0, sp = 0; - sp = STACKTOP; - HEAP32[4174] = 1; - return; -} -function _SetMousePosition($0) { - $0 = $0|0; - var $1 = 0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = $0; - $2 = $1; - $3 = HEAP32[$2>>2]|0; - $4 = (($1) + 4)|0; - $5 = $4; - $6 = HEAP32[$5>>2]|0; - $7 = 16384; - $8 = $7; - HEAP32[$8>>2] = $3; - $9 = (($7) + 4)|0; - $10 = $9; - HEAP32[$10>>2] = $6; - $11 = HEAP32[4175]|0; - $12 = +HEAPF32[$0>>2]; - $13 = $12; - $14 = ((($0)) + 4|0); - $15 = +HEAPF32[$14>>2]; - $16 = $15; - _glfwSetCursorPos(($11|0),(+$13),(+$16)); - return; -} -function _ShowCursor() { - var label = 0, sp = 0; - sp = STACKTOP; - HEAP32[4174] = 0; - return; -} -function _GetKeyStatus($0) { - $0 = $0|0; - var $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = HEAP32[4175]|0; - $2 = (_glfwGetKey(($1|0),($0|0))|0); - return ($2|0); -} -function _GetMouseButtonStatus($0) { - $0 = $0|0; - var $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = HEAP32[4175]|0; - $2 = (_glfwGetMouseButton(($1|0),($0|0))|0); - return ($2|0); -} -function _InitWindow($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $10 = 0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0, $vararg_buffer = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $vararg_buffer = sp; - _TraceLog(0,3560,$vararg_buffer); - HEAP32[4179] = $2; - _InitGraphicsDevice($0,$1); - _LoadDefaultFont(); - _InitTimer(); - (_emscripten_set_fullscreenchange_callback((0|0),(0|0),1,(4|0))|0); - (_emscripten_set_keypress_callback((3589|0),(0|0),1,(5|0))|0); - (_emscripten_set_click_callback((3589|0),(0|0),1,(6|0))|0); - (_emscripten_set_touchstart_callback((3589|0),(0|0),1,(7|0))|0); - (_emscripten_set_touchend_callback((3589|0),(0|0),1,(7|0))|0); - (_emscripten_set_touchmove_callback((3589|0),(0|0),1,(7|0))|0); - (_emscripten_set_touchcancel_callback((3589|0),(0|0),1,(7|0))|0); - (_emscripten_set_gamepadconnected_callback((0|0),1,(8|0))|0); - (_emscripten_set_gamepaddisconnected_callback((0|0),1,(8|0))|0); - $3 = HEAP32[4177]|0; - $4 = (+($3|0)); - $5 = $4 * 0.5; - HEAPF32[4096] = $5; - $6 = HEAP32[4176]|0; - $7 = (+($6|0)); - $8 = $7 * 0.5; - HEAPF32[(16388)>>2] = $8; - $9 = HEAP32[4180]|0; - $10 = ($9|0)==(0); - if ($10) { - STACKTOP = sp;return; - } - _SetTargetFPS(60); - _LogoAnimation(); - STACKTOP = sp;return; -} function _TraceLog($0,$1,$varargs) { $0 = $0|0; $1 = $1|0; @@ -9680,11 +7401,11 @@ function _TraceLog($0,$1,$varargs) { $2 = sp; switch ($0|0) { case 0: { - ;HEAP8[16424>>0]=HEAP8[8118>>0]|0;HEAP8[16424+1>>0]=HEAP8[8118+1>>0]|0;HEAP8[16424+2>>0]=HEAP8[8118+2>>0]|0;HEAP8[16424+3>>0]=HEAP8[8118+3>>0]|0;HEAP8[16424+4>>0]=HEAP8[8118+4>>0]|0;HEAP8[16424+5>>0]=HEAP8[8118+5>>0]|0;HEAP8[16424+6>>0]=HEAP8[8118+6>>0]|0; + ;HEAP8[16384>>0]=HEAP8[3560>>0]|0;HEAP8[16384+1>>0]=HEAP8[3560+1>>0]|0;HEAP8[16384+2>>0]=HEAP8[3560+2>>0]|0;HEAP8[16384+3>>0]=HEAP8[3560+3>>0]|0;HEAP8[16384+4>>0]=HEAP8[3560+4>>0]|0;HEAP8[16384+5>>0]=HEAP8[3560+5>>0]|0;HEAP8[16384+6>>0]=HEAP8[3560+6>>0]|0; break; } - case 1: { - $3 = 16424; + case 2: { + $3 = 16384; $4 = $3; HEAP32[$4>>2] = 1330795077; $5 = (($3) + 4)|0; @@ -9692,12 +7413,12 @@ function _TraceLog($0,$1,$varargs) { HEAP32[$6>>2] = 2112082; break; } - case 2: { - dest=16424; src=8125; stop=dest+10|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + case 1: { + dest=16384; src=3567; stop=dest+10|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); break; } case 3: { - $7 = 16424; + $7 = 16384; $8 = $7; HEAP32[$8>>2] = 1430406468; $9 = (($7) + 4)|0; @@ -9708,17 +7429,17 @@ function _TraceLog($0,$1,$varargs) { default: { } } - (_strcat(16424,$1)|0); - $strlen = (_strlen(16424)|0); - $endptr = (16424 + ($strlen)|0); + (_strcat(16384,$1)|0); + $strlen = (_strlen(16384)|0); + $endptr = (16384 + ($strlen)|0); HEAP8[$endptr>>0]=10&255;HEAP8[$endptr+1>>0]=10>>8; HEAP32[$2>>2] = $varargs; $11 = ($0|0)==(3); if ($11) { STACKTOP = sp;return; } - (_vprintf(16424,$2)|0); - $12 = ($0|0)==(1); + (_vprintf(16384,$2)|0); + $12 = ($0|0)==(2); if ($12) { _exit(1); // unreachable; @@ -9726,251 +7447,6 @@ function _TraceLog($0,$1,$varargs) { STACKTOP = sp;return; } } -function _InitGraphicsDevice($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $$015 = 0, $$byval_copy = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; - var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0; - var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0.0, $79 = 0, $8 = 0, $80 = 0; - var $81 = 0, $82 = 0.0, $83 = 0, $84 = 0, $85 = 0, $9 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer10 = 0, $vararg_buffer14 = 0, $vararg_buffer18 = 0, $vararg_buffer22 = 0, $vararg_buffer3 = 0, $vararg_buffer6 = 0, $vararg_buffer8 = 0, $vararg_ptr13 = 0, $vararg_ptr17 = 0, $vararg_ptr21 = 0, $vararg_ptr5 = 0, dest = 0; - var label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 144|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(144|0); - $$byval_copy = sp + 136|0; - $vararg_buffer22 = sp + 64|0; - $vararg_buffer18 = sp + 56|0; - $vararg_buffer14 = sp + 48|0; - $vararg_buffer10 = sp + 40|0; - $vararg_buffer8 = sp + 32|0; - $vararg_buffer6 = sp + 24|0; - $vararg_buffer3 = sp + 16|0; - $vararg_buffer1 = sp + 8|0; - $vararg_buffer = sp; - $2 = sp + 72|0; - $3 = sp + 140|0; - HEAP32[4177] = $0; - HEAP32[4176] = $1; - _MatrixIdentity($2); - dest=16796; src=$2; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - (_glfwSetErrorCallback((1|0))|0); - $4 = (_glfwInit()|0); - $5 = ($4|0)==(0); - if ($5) { - _TraceLog(1,4260,$vararg_buffer); - } - $6 = HEAP32[4177]|0; - HEAP32[4215] = $6; - $7 = HEAP32[4176]|0; - HEAP32[4216] = $7; - _glfwDefaultWindowHints(); - $8 = HEAP8[19588]|0; - $9 = $8 & 4; - $10 = ($9<<24>>24)==(0); - if ($10) { - _glfwWindowHint(131075,0); - } else { - _glfwWindowHint(131075,1); - } - $11 = HEAP8[19588]|0; - $12 = $11 & 8; - $13 = ($12<<24>>24)==(0); - if (!($13)) { - _glfwWindowHint(131077,1); - } - $14 = HEAP8[19588]|0; - $15 = $14 & 32; - $16 = ($15<<24>>24)==(0); - if (!($16)) { - _glfwWindowHint(135181,4); - _TraceLog(0,4286,$vararg_buffer1); - } - $17 = (_rlGetVersion()|0); - $18 = ($17|0)==(2); - if ($18) { - _glfwWindowHint(139266,2); - _glfwWindowHint(139267,1); - } else { - $19 = (_rlGetVersion()|0); - $20 = ($19|0)==(3); - if ($20) { - _glfwWindowHint(139266,3); - _glfwWindowHint(139267,3); - _glfwWindowHint(139272,204801); - _glfwWindowHint(139270,0); - } - } - $21 = HEAP32[4217]|0; - $22 = ($21|0)==(0); - if ($22) { - $47 = HEAP32[4177]|0; - $48 = HEAP32[4176]|0; - $49 = HEAP32[4179]|0; - $50 = (_glfwCreateWindow(($47|0),($48|0),($49|0),(0|0),(0|0))|0); - HEAP32[4175] = $50; - $51 = HEAP32[4177]|0; - HEAP32[4218] = $51; - $52 = HEAP32[4176]|0; - HEAP32[4219] = $52; - $54 = $50; - } else { - $23 = (_glfwGetPrimaryMonitor()|0); - $24 = (_glfwGetVideoModes(($23|0),($$byval_copy|0))|0); - $25 = HEAP32[$$byval_copy>>2]|0; - $26 = ($25|0)>(0); - L22: do { - if ($26) { - $27 = HEAP32[4177]|0; - $28 = HEAP32[$$byval_copy>>2]|0; - $29 = HEAP32[4176]|0; - $$015 = 0; - while(1) { - $30 = (($24) + (($$015*24)|0)|0); - $31 = HEAP32[$30>>2]|0; - $32 = ($31|0)<($27|0); - if (!($32)) { - $33 = (((($24) + (($$015*24)|0)|0)) + 4|0); - $34 = HEAP32[$33>>2]|0; - $35 = ($34|0)<($29|0); - if (!($35)) { - break; - } - } - $36 = (($$015) + 1)|0; - $37 = ($36|0)<($28|0); - if ($37) { - $$015 = $36; - } else { - break L22; - } - } - HEAP32[4215] = $31; - HEAP32[4216] = $34; - } - } while(0); - $38 = HEAP32[4215]|0; - $39 = HEAP32[4216]|0; - HEAP32[$vararg_buffer3>>2] = $38; - $vararg_ptr5 = ((($vararg_buffer3)) + 4|0); - HEAP32[$vararg_ptr5>>2] = $39; - _TraceLog(2,4311,$vararg_buffer3); - $40 = HEAP32[4215]|0; - $41 = HEAP32[4216]|0; - _SetupFramebufferSize($40,$41); - $42 = HEAP32[4215]|0; - $43 = HEAP32[4216]|0; - $44 = HEAP32[4179]|0; - $45 = (_glfwGetPrimaryMonitor()|0); - $46 = (_glfwCreateWindow(($42|0),($43|0),($44|0),($45|0),(0|0))|0); - HEAP32[4175] = $46; - $54 = $46; - } - $53 = ($54|0)==(0|0); - if ($53) { - _glfwTerminate(); - _TraceLog(1,4349,$vararg_buffer6); - } else { - _TraceLog(0,4382,$vararg_buffer8); - $55 = HEAP32[4218]|0; - $56 = HEAP32[4219]|0; - HEAP32[$vararg_buffer10>>2] = $55; - $vararg_ptr13 = ((($vararg_buffer10)) + 4|0); - HEAP32[$vararg_ptr13>>2] = $56; - _TraceLog(0,4422,$vararg_buffer10); - $57 = HEAP32[4177]|0; - $58 = HEAP32[4176]|0; - HEAP32[$vararg_buffer14>>2] = $57; - $vararg_ptr17 = ((($vararg_buffer14)) + 4|0); - HEAP32[$vararg_ptr17>>2] = $58; - _TraceLog(0,4443,$vararg_buffer14); - $59 = HEAP32[4220]|0; - $60 = HEAP32[4221]|0; - HEAP32[$vararg_buffer18>>2] = $59; - $vararg_ptr21 = ((($vararg_buffer18)) + 4|0); - HEAP32[$vararg_ptr21>>2] = $60; - _TraceLog(0,4464,$vararg_buffer18); - } - $61 = HEAP32[4175]|0; - (_glfwSetWindowSizeCallback(($61|0),(1|0))|0); - $62 = HEAP32[4175]|0; - (_glfwSetCursorEnterCallback(($62|0),(2|0))|0); - $63 = HEAP32[4175]|0; - (_glfwSetKeyCallback(($63|0),(1|0))|0); - $64 = HEAP32[4175]|0; - (_glfwSetMouseButtonCallback(($64|0),(1|0))|0); - $65 = HEAP32[4175]|0; - (_glfwSetCursorPosCallback(($65|0),(1|0))|0); - $66 = HEAP32[4175]|0; - (_glfwSetCharCallback(($66|0),(3|0))|0); - $67 = HEAP32[4175]|0; - (_glfwSetScrollCallback(($67|0),(2|0))|0); - $68 = HEAP32[4175]|0; - (_glfwSetWindowIconifyCallback(($68|0),(4|0))|0); - $69 = HEAP32[4175]|0; - _glfwMakeContextCurrent(($69|0)); - _glfwSwapInterval(0); - $70 = HEAP8[19588]|0; - $71 = $70 & 64; - $72 = ($71<<24>>24)==(0); - if ($72) { - $73 = HEAP32[4177]|0; - $74 = HEAP32[4176]|0; - _rlglInit($73,$74); - _SetupViewport(); - _rlMatrixMode(5889); - _rlLoadIdentity(); - $75 = HEAP32[4218]|0; - $76 = HEAP32[4220]|0; - $77 = (($75) - ($76))|0; - $78 = (+($77|0)); - $79 = HEAP32[4219]|0; - $80 = HEAP32[4221]|0; - $81 = (($79) - ($80))|0; - $82 = (+($81|0)); - _rlOrtho(0.0,$78,$82,0.0,0.0,1.0); - _rlMatrixMode(5888); - _rlLoadIdentity(); - HEAP8[$3>>0] = -11; - $83 = ((($3)) + 1|0); - HEAP8[$83>>0] = -11; - $84 = ((($3)) + 2|0); - HEAP8[$84>>0] = -11; - $85 = ((($3)) + 3|0); - HEAP8[$85>>0] = -1; - ;HEAP8[$$byval_copy>>0]=HEAP8[$3>>0]|0;HEAP8[$$byval_copy+1>>0]=HEAP8[$3+1>>0]|0;HEAP8[$$byval_copy+2>>0]=HEAP8[$3+2>>0]|0;HEAP8[$$byval_copy+3>>0]=HEAP8[$3+3>>0]|0; - _ClearBackground($$byval_copy); - STACKTOP = sp;return; - } - _glfwSwapInterval(1); - _TraceLog(0,4489,$vararg_buffer22); - $73 = HEAP32[4177]|0; - $74 = HEAP32[4176]|0; - _rlglInit($73,$74); - _SetupViewport(); - _rlMatrixMode(5889); - _rlLoadIdentity(); - $75 = HEAP32[4218]|0; - $76 = HEAP32[4220]|0; - $77 = (($75) - ($76))|0; - $78 = (+($77|0)); - $79 = HEAP32[4219]|0; - $80 = HEAP32[4221]|0; - $81 = (($79) - ($80))|0; - $82 = (+($81|0)); - _rlOrtho(0.0,$78,$82,0.0,0.0,1.0); - _rlMatrixMode(5888); - _rlLoadIdentity(); - HEAP8[$3>>0] = -11; - $83 = ((($3)) + 1|0); - HEAP8[$83>>0] = -11; - $84 = ((($3)) + 2|0); - HEAP8[$84>>0] = -11; - $85 = ((($3)) + 3|0); - HEAP8[$85>>0] = -1; - ;HEAP8[$$byval_copy>>0]=HEAP8[$3>>0]|0;HEAP8[$$byval_copy+1>>0]=HEAP8[$3+1>>0]|0;HEAP8[$$byval_copy+2>>0]=HEAP8[$3+2>>0]|0;HEAP8[$$byval_copy+3>>0]=HEAP8[$3+3>>0]|0; - _ClearBackground($$byval_copy); - STACKTOP = sp;return; -} function _LoadDefaultFont() { var $$ = 0, $$0101 = 0, $$090100 = 0, $$09299 = 0, $$095104 = 0, $$096103 = 0, $$097102 = 0, $$191 = 0, $$193 = 0, $$byval_copy1 = 0, $$lcssa = 0, $$sroa$0$0$$sroa_idx = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0; var $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0; @@ -9982,12 +7458,12 @@ function _LoadDefaultFont() { $vararg_buffer = sp; $0 = sp + 4|0; $1 = sp + 24|0; - HEAP32[(16764)>>2] = 224; + HEAP32[(16740)>>2] = 224; $2 = (_malloc(65536)|0); _memset(($2|0),0,65536)|0; $$095104 = 0;$$096103 = 0; while(1) { - $3 = (60 + ($$095104<<2)|0); + $3 = (16 + ($$095104<<2)|0); $4 = HEAP32[$3>>2]|0; $$097102 = 31; while(1) { @@ -10023,27 +7499,27 @@ function _LoadDefaultFont() { _free($2); ;HEAP32[$$byval_copy1>>2]=HEAP32[$0>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$0+8>>2]|0;HEAP32[$$byval_copy1+12>>2]=HEAP32[$0+12>>2]|0;HEAP32[$$byval_copy1+16>>2]=HEAP32[$0+16>>2]|0; _LoadTextureFromImage($1,$$byval_copy1); - ;HEAP32[16740>>2]=HEAP32[$1>>2]|0;HEAP32[16740+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[16740+8>>2]=HEAP32[$1+8>>2]|0;HEAP32[16740+12>>2]=HEAP32[$1+12>>2]|0;HEAP32[16740+16>>2]=HEAP32[$1+16>>2]|0; + ;HEAP32[16716>>2]=HEAP32[$1>>2]|0;HEAP32[16716+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[16716+8>>2]=HEAP32[$1+8>>2]|0;HEAP32[16716+12>>2]=HEAP32[$1+12>>2]|0;HEAP32[16716+16>>2]=HEAP32[$1+16>>2]|0; ;HEAP32[$$byval_copy1>>2]=HEAP32[$0>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$0+8>>2]|0;HEAP32[$$byval_copy1+12>>2]=HEAP32[$0+12>>2]|0;HEAP32[$$byval_copy1+16>>2]=HEAP32[$0+16>>2]|0; _UnloadImage($$byval_copy1); - $5 = HEAP32[(16764)>>2]|0; + $5 = HEAP32[(16740)>>2]|0; $6 = $5 << 5; $7 = (_malloc($6)|0); - HEAP32[(16768)>>2] = $7; + HEAP32[(16744)>>2] = $7; $8 = ($5|0)>(0); if (!($8)) { $$lcssa = $7; $22 = ((($$lcssa)) + 16|0); $23 = HEAP32[$22>>2]|0; - HEAP32[(16760)>>2] = $23; - $24 = HEAP32[4185]|0; + HEAP32[(16736)>>2] = $23; + $24 = HEAP32[4179]|0; HEAP32[$vararg_buffer>>2] = $24; - _TraceLog(0,3784,$vararg_buffer); + _TraceLog(0,3577,$vararg_buffer); STACKTOP = sp;return; } - $9 = HEAP32[(16744)>>2]|0; - $10 = HEAP32[(16764)>>2]|0; - $11 = HEAP32[(16768)>>2]|0; + $9 = HEAP32[(16720)>>2]|0; + $10 = HEAP32[(16740)>>2]|0; + $11 = HEAP32[(16744)>>2]|0; $$0101 = 0;$$090100 = 1;$$09299 = 0;$27 = $7; while(1) { $25 = (($$0101) + 32)|0; @@ -10055,7 +7531,7 @@ function _LoadDefaultFont() { $30 = (($29) + 1)|0; $31 = (((($27) + ($$0101<<5)|0)) + 8|0); HEAP32[$31>>2] = $30; - $32 = (2108 + ($$0101<<2)|0); + $32 = (2064 + ($$0101<<2)|0); $33 = HEAP32[$32>>2]|0; $34 = (((($27) + ($$0101<<5)|0)) + 12|0); HEAP32[$34>>2] = $33; @@ -10092,281 +7568,12 @@ function _LoadDefaultFont() { } $22 = ((($$lcssa)) + 16|0); $23 = HEAP32[$22>>2]|0; - HEAP32[(16760)>>2] = $23; - $24 = HEAP32[4185]|0; + HEAP32[(16736)>>2] = $23; + $24 = HEAP32[4179]|0; HEAP32[$vararg_buffer>>2] = $24; - _TraceLog(0,3784,$vararg_buffer); + _TraceLog(0,3577,$vararg_buffer); STACKTOP = sp;return; } -function _InitTimer() { - var $0 = 0, $1 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_time((0|0))|0); - _srand($0); - $1 = (+_GetTime()); - HEAPF64[2052] = $1; - return; -} -function _EmscriptenFullscreenChangeCallback($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $10 = 0, $11 = 0, $12 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0, $vararg_buffer4 = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, $vararg_ptr3 = 0, $vararg_ptr7 = 0, $vararg_ptr8 = 0, $vararg_ptr9 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); - $vararg_buffer4 = sp + 16|0; - $vararg_buffer = sp; - $3 = HEAP32[$1>>2]|0; - $4 = ($3|0)==(0); - $5 = ((($1)) + 264|0); - $6 = HEAP32[$5>>2]|0; - $7 = ((($1)) + 268|0); - $8 = HEAP32[$7>>2]|0; - $9 = ((($1)) + 272|0); - $10 = HEAP32[$9>>2]|0; - $11 = ((($1)) + 276|0); - $12 = HEAP32[$11>>2]|0; - if ($4) { - HEAP32[$vararg_buffer4>>2] = $6; - $vararg_ptr7 = ((($vararg_buffer4)) + 4|0); - HEAP32[$vararg_ptr7>>2] = $8; - $vararg_ptr8 = ((($vararg_buffer4)) + 8|0); - HEAP32[$vararg_ptr8>>2] = $10; - $vararg_ptr9 = ((($vararg_buffer4)) + 12|0); - HEAP32[$vararg_ptr9>>2] = $12; - _TraceLog(0,3717,$vararg_buffer4); - STACKTOP = sp;return 0; - } else { - HEAP32[$vararg_buffer>>2] = $6; - $vararg_ptr1 = ((($vararg_buffer)) + 4|0); - HEAP32[$vararg_ptr1>>2] = $8; - $vararg_ptr2 = ((($vararg_buffer)) + 8|0); - HEAP32[$vararg_ptr2>>2] = $10; - $vararg_ptr3 = ((($vararg_buffer)) + 12|0); - HEAP32[$vararg_ptr3>>2] = $12; - _TraceLog(0,3648,$vararg_buffer); - STACKTOP = sp;return 0; - } - return (0)|0; -} -function _EmscriptenKeyboardCallback($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; - sp = STACKTOP; - $3 = ($0|0)==(1); - if (!($3)) { - return 0; - } - $4 = ((($1)) + 32|0); - $5 = (_strcmp($4,3641)|0); - $6 = ($5|0)==(0); - if (!($6)) { - return 0; - } - (_emscripten_exit_pointerlock()|0); - return 0; -} -function _EmscriptenMouseCallback($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 272|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(272|0); - $3 = sp; - $4 = ($0|0)==(4); - if (!($4)) { - STACKTOP = sp;return 0; - } - (_emscripten_get_pointerlock_status(($3|0))|0); - $5 = HEAP32[$3>>2]|0; - $6 = ($5|0)==(0); - if ($6) { - (_emscripten_request_pointerlock((0|0),1)|0); - } else { - (_emscripten_exit_pointerlock()|0); - (_emscripten_get_pointerlock_status(($3|0))|0); - } - STACKTOP = sp;return 0; -} -function _EmscriptenTouchCallback($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $$byval_copy = 0, $$sink = 0, $$sroa$0$0$$sroa_idx = 0, $$sroa$03$0$$sroa_idx = 0, $$sroa$2$0$$sroa_idx2 = 0, $$sroa$24$0$$sroa_idx5 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0.0; - var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0; - var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0.0, $48 = 0.0, $49 = 0.0, $5 = 0, $50 = 0, $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0, $55 = 0.0, $56 = 0.0, $57 = 0.0, $58 = 0, $59 = 0.0, $6 = 0; - var $60 = 0.0, $61 = 0.0, $7 = 0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(112|0); - $$byval_copy = sp + 56|0; - $3 = sp; - switch ($0|0) { - case 22: { - $$sink = 1; - label = 4; - break; - } - case 23: { - $$sink = 0; - label = 4; - break; - } - case 24: { - $$sink = 2; - label = 4; - break; - } - default: { - } - } - if ((label|0) == 4) { - HEAP32[$3>>2] = $$sink; - } - $4 = HEAP32[$1>>2]|0; - $5 = ((($3)) + 4|0); - HEAP32[$5>>2] = $4; - $6 = ((($1)) + 20|0); - $7 = HEAP32[$6>>2]|0; - $8 = ((($3)) + 8|0); - HEAP32[$8>>2] = $7; - $9 = ((($1)) + 72|0); - $10 = HEAP32[$9>>2]|0; - $11 = ((($3)) + 12|0); - HEAP32[$11>>2] = $10; - $12 = ((($1)) + 56|0); - $13 = HEAP32[$12>>2]|0; - $14 = (+($13|0)); - $15 = ((($1)) + 60|0); - $16 = HEAP32[$15>>2]|0; - $17 = (+($16|0)); - $$sroa$03$0$$sroa_idx = ((($3)) + 24|0); - HEAPF32[$$sroa$03$0$$sroa_idx>>2] = $14; - $$sroa$24$0$$sroa_idx5 = ((($3)) + 28|0); - HEAPF32[$$sroa$24$0$$sroa_idx5>>2] = $17; - $18 = ((($1)) + 108|0); - $19 = HEAP32[$18>>2]|0; - $20 = (+($19|0)); - $21 = ((($1)) + 112|0); - $22 = HEAP32[$21>>2]|0; - $23 = (+($22|0)); - $$sroa$0$0$$sroa_idx = ((($3)) + 32|0); - HEAPF32[$$sroa$0$0$$sroa_idx>>2] = $20; - $$sroa$2$0$$sroa_idx2 = ((($3)) + 36|0); - HEAPF32[$$sroa$2$0$$sroa_idx2>>2] = $23; - $24 = ((($3)) + 24|0); - $25 = $24; - $26 = $25; - $27 = HEAP32[$26>>2]|0; - $28 = (($25) + 4)|0; - $29 = $28; - $30 = HEAP32[$29>>2]|0; - $31 = 16400; - $32 = $31; - HEAP32[$32>>2] = $27; - $33 = (($31) + 4)|0; - $34 = $33; - HEAP32[$34>>2] = $30; - $35 = ((($3)) + 32|0); - $36 = $35; - $37 = $36; - $38 = HEAP32[$37>>2]|0; - $39 = (($36) + 4)|0; - $40 = $39; - $41 = HEAP32[$40>>2]|0; - $42 = (16408); - $43 = $42; - HEAP32[$43>>2] = $38; - $44 = (($42) + 4)|0; - $45 = $44; - HEAP32[$45>>2] = $41; - $46 = (_GetScreenWidth()|0); - $47 = (+($46|0)); - $48 = +HEAPF32[$24>>2]; - $49 = $48 / $47; - HEAPF32[$24>>2] = $49; - $50 = (_GetScreenHeight()|0); - $51 = (+($50|0)); - $52 = +HEAPF32[$$sroa$24$0$$sroa_idx5>>2]; - $53 = $52 / $51; - HEAPF32[$$sroa$24$0$$sroa_idx5>>2] = $53; - $54 = (_GetScreenWidth()|0); - $55 = (+($54|0)); - $56 = +HEAPF32[$35>>2]; - $57 = $56 / $55; - HEAPF32[$35>>2] = $57; - $58 = (_GetScreenHeight()|0); - $59 = (+($58|0)); - $60 = +HEAPF32[$$sroa$2$0$$sroa_idx2>>2]; - $61 = $60 / $59; - HEAPF32[$$sroa$2$0$$sroa_idx2>>2] = $61; - dest=$$byval_copy; src=$3; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _ProcessGestureEvent($$byval_copy); - STACKTOP = sp;return 1; -} -function _EmscriptenGamepadCallback($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $$sink = 0, $10 = 0, $11 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $3 = ((($1)) + 1296|0); - $4 = HEAP32[$3>>2]|0; - $5 = ($4|0)==(0); - if ($5) { - label = 3; - } else { - $6 = ((($1)) + 1300|0); - $7 = HEAP32[$6>>2]|0; - $8 = ($7|0)<(4); - if ($8) { - $$sink = 1; - } else { - label = 3; - } - } - if ((label|0) == 3) { - $$sink = 0; - } - $9 = ((($1)) + 1300|0); - $10 = HEAP32[$9>>2]|0; - $11 = (16724 + ($10<<2)|0); - HEAP32[$11>>2] = $$sink; - return 0; -} -function _SetTargetFPS($0) { - $0 = $0|0; - var $$ = 0.0, $$op = 0.0, $1 = 0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $vararg_buffer = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $vararg_buffer = sp; - $1 = ($0|0)<(1); - $2 = (+($0|0)); - $3 = 1.0 / $2; - $$ = $1 ? 0.0 : $3; - HEAPF64[2049] = $$; - $4 = $3; - $$op = $4 * 1000.0; - $5 = $$op; - $6 = $1 ? 0.0 : $5; - HEAPF64[$vararg_buffer>>3] = $6; - _TraceLog(0,3597,$vararg_buffer); - STACKTOP = sp;return; -} -function _LogoAnimation() { - var label = 0, sp = 0; - sp = STACKTOP; - HEAP32[4180] = 0; - return; -} -function _GetTime() { - var $0 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (+_glfwGetTime()); - return (+$0); -} function _LoadImageEx($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; @@ -10453,11 +7660,11 @@ function _ImageFormat($0,$1) { if ($4) { STACKTOP = sp;return; } - $5 = ($3|0)<(8); - $6 = ($1|0)<(8); + $5 = ($3|0)<(9); + $6 = ($1|0)<(9); $or$cond = $6 & $5; if (!($or$cond)) { - _TraceLog(2,4160,$vararg_buffer); + _TraceLog(1,4003,$vararg_buffer); STACKTOP = sp;return; } ;HEAP32[$$byval_copy>>2]=HEAP32[$0>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$0+8>>2]|0;HEAP32[$$byval_copy+12>>2]=HEAP32[$0+12>>2]|0;HEAP32[$$byval_copy+16>>2]=HEAP32[$0+16>>2]|0; @@ -10878,8 +8085,11 @@ function _ImageFormat($0,$1) { function _LoadTextureFromImage($0,$1) { $0 = $0|0; $1 = $1|0; - var $$sroa$11$0$$sroa_idx8 = 0, $$sroa$5$0$$sroa_idx2 = 0, $$sroa$7$0$$sroa_idx4 = 0, $$sroa$9$0$$sroa_idx6 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + var $$sroa$10$0$$sroa_idx6 = 0, $$sroa$12$0$$sroa_idx8 = 0, $$sroa$6$0$$sroa_idx2 = 0, $$sroa$8$0$$sroa_idx4 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, $vararg_ptr3 = 0; + var $vararg_ptr4 = 0, label = 0, sp = 0; sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $vararg_buffer = sp; $2 = HEAP32[$1>>2]|0; $3 = ((($1)) + 4|0); $4 = HEAP32[$3>>2]|0; @@ -10892,16 +8102,26 @@ function _LoadTextureFromImage($0,$1) { $11 = (_rlglLoadTexture($2,$4,$6,$8,$10)|0); $12 = HEAP32[$3>>2]|0; $13 = HEAP32[$5>>2]|0; + HEAP32[$vararg_buffer>>2] = $11; + $vararg_ptr1 = ((($vararg_buffer)) + 4|0); + HEAP32[$vararg_ptr1>>2] = $12; + $vararg_ptr2 = ((($vararg_buffer)) + 8|0); + HEAP32[$vararg_ptr2>>2] = $13; + $vararg_ptr3 = ((($vararg_buffer)) + 12|0); + HEAP32[$vararg_ptr3>>2] = $10; + $vararg_ptr4 = ((($vararg_buffer)) + 16|0); + HEAP32[$vararg_ptr4>>2] = $8; + _TraceLog(3,3622,$vararg_buffer); HEAP32[$0>>2] = $11; - $$sroa$5$0$$sroa_idx2 = ((($0)) + 4|0); - HEAP32[$$sroa$5$0$$sroa_idx2>>2] = $12; - $$sroa$7$0$$sroa_idx4 = ((($0)) + 8|0); - HEAP32[$$sroa$7$0$$sroa_idx4>>2] = $13; - $$sroa$9$0$$sroa_idx6 = ((($0)) + 12|0); - HEAP32[$$sroa$9$0$$sroa_idx6>>2] = $10; - $$sroa$11$0$$sroa_idx8 = ((($0)) + 16|0); - HEAP32[$$sroa$11$0$$sroa_idx8>>2] = $8; - return; + $$sroa$6$0$$sroa_idx2 = ((($0)) + 4|0); + HEAP32[$$sroa$6$0$$sroa_idx2>>2] = $12; + $$sroa$8$0$$sroa_idx4 = ((($0)) + 8|0); + HEAP32[$$sroa$8$0$$sroa_idx4>>2] = $13; + $$sroa$10$0$$sroa_idx6 = ((($0)) + 12|0); + HEAP32[$$sroa$10$0$$sroa_idx6>>2] = $10; + $$sroa$12$0$$sroa_idx8 = ((($0)) + 16|0); + HEAP32[$$sroa$12$0$$sroa_idx8>>2] = $8; + STACKTOP = sp;return; } function _UnloadImage($0) { $0 = $0|0; @@ -10917,9 +8137,9 @@ function _rlglLoadTexture($0,$1,$2,$3,$4) { $2 = $2|0; $3 = $3|0; $4 = $4|0; - var $$0 = 0, $$off = 0, $$off92 = 0, $$off93 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; - var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; - var $46 = 0, $47 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond100 = 0, $or$cond7 = 0, $or$cond96 = 0, $or$cond98 = 0, $switch = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer11 = 0, $vararg_buffer15 = 0, $vararg_buffer3 = 0, $vararg_buffer5 = 0, $vararg_buffer7 = 0; + var $$0 = 0, $$off = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; + var $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0; + var $48 = 0, $49 = 0, $5 = 0, $50 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond101 = 0, $or$cond7 = 0, $or$cond97 = 0, $or$cond99 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer11 = 0, $vararg_buffer15 = 0, $vararg_buffer3 = 0, $vararg_buffer5 = 0, $vararg_buffer7 = 0; var $vararg_buffer9 = 0, $vararg_ptr13 = 0, $vararg_ptr14 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(80|0); @@ -10934,58 +8154,56 @@ function _rlglLoadTexture($0,$1,$2,$3,$4) { $5 = sp + 68|0; _glBindTexture(3553,0); HEAP32[$5>>2] = 0; - $6 = HEAP32[4193]|0; + $6 = HEAP32[4187]|0; $7 = ($6|0)==(0); - $8 = $3 & -4; - $switch = ($8|0)==(8); - $or$cond100 = $switch & $7; - if ($or$cond100) { - _TraceLog(2,3829,$vararg_buffer); + $$off = (($3) + -9)|0; + $8 = ($$off>>>0)<(4); + $or$cond = $8 & $7; + if ($or$cond) { + _TraceLog(1,3672,$vararg_buffer); $$0 = HEAP32[$5>>2]|0; STACKTOP = sp;return ($$0|0); } - $9 = HEAP32[4194]|0; + $9 = HEAP32[4188]|0; $10 = ($9|0)==(0); - $11 = ($3|0)==(12); + $11 = ($3|0)==(13); $or$cond7 = $11 & $10; if ($or$cond7) { - _TraceLog(2,3873,$vararg_buffer1); + _TraceLog(1,3716,$vararg_buffer1); $$0 = HEAP32[$5>>2]|0; STACKTOP = sp;return ($$0|0); } - $12 = HEAP32[4195]|0; + $12 = HEAP32[4189]|0; $13 = ($12|0)==(0); - $$off = (($3) + -13)|0; - $14 = ($$off>>>0)<(2); - $or$cond = $14 & $13; - if ($or$cond) { - _TraceLog(2,3918,$vararg_buffer3); + $14 = $3 | 1; + $15 = ($14|0)==(15); + $or$cond97 = $15 & $13; + if ($or$cond97) { + _TraceLog(1,3761,$vararg_buffer3); $$0 = HEAP32[$5>>2]|0; STACKTOP = sp;return ($$0|0); } - $15 = HEAP32[4196]|0; - $16 = ($15|0)==(0); - $$off92 = (($3) + -15)|0; - $17 = ($$off92>>>0)<(2); - $or$cond96 = $17 & $16; - if ($or$cond96) { - _TraceLog(2,3963,$vararg_buffer5); + $16 = HEAP32[4190]|0; + $17 = ($16|0)==(0); + $18 = ($14|0)==(17); + $or$cond99 = $18 & $17; + if ($or$cond99) { + _TraceLog(1,3806,$vararg_buffer5); $$0 = HEAP32[$5>>2]|0; STACKTOP = sp;return ($$0|0); } - $18 = HEAP32[4197]|0; - $19 = ($18|0)==(0); - $$off93 = (($3) + -17)|0; - $20 = ($$off93>>>0)<(2); - $or$cond98 = $20 & $19; - if ($or$cond98) { - _TraceLog(2,4008,$vararg_buffer7); + $19 = HEAP32[4191]|0; + $20 = ($19|0)==(0); + $21 = ($14|0)==(19); + $or$cond101 = $21 & $20; + if ($or$cond101) { + _TraceLog(1,3851,$vararg_buffer7); $$0 = HEAP32[$5>>2]|0; STACKTOP = sp;return ($$0|0); } _glGenTextures(1,($5|0)); - $21 = HEAP32[$5>>2]|0; - _glBindTexture(3553,($21|0)); + $22 = HEAP32[$5>>2]|0; + _glBindTexture(3553,($22|0)); do { switch ($3|0) { case 1: { @@ -11017,101 +8235,109 @@ function _rlglLoadTexture($0,$1,$2,$3,$4) { break; } case 8: { - $22 = HEAP32[4193]|0; - $23 = ($22|0)==(0); - if (!($23)) { - _LoadCompressedTexture($0,$1,$2,$4,33776); + $23 = HEAP32[4192]|0; + $24 = ($23|0)==(0); + if (!($24)) { + _glTexImage2D(3553,0,6407,($1|0),($2|0),0,6407,5126,($0|0)); } break; } case 9: { - $24 = HEAP32[4193]|0; - $25 = ($24|0)==(0); - if (!($25)) { - _LoadCompressedTexture($0,$1,$2,$4,33777); + $25 = HEAP32[4187]|0; + $26 = ($25|0)==(0); + if (!($26)) { + _LoadCompressedTexture($0,$1,$2,$4,33776); } break; } case 10: { - $26 = HEAP32[4193]|0; - $27 = ($26|0)==(0); - if (!($27)) { - _LoadCompressedTexture($0,$1,$2,$4,33778); + $27 = HEAP32[4187]|0; + $28 = ($27|0)==(0); + if (!($28)) { + _LoadCompressedTexture($0,$1,$2,$4,33777); } break; } case 11: { - $28 = HEAP32[4193]|0; - $29 = ($28|0)==(0); - if (!($29)) { - _LoadCompressedTexture($0,$1,$2,$4,33779); + $29 = HEAP32[4187]|0; + $30 = ($29|0)==(0); + if (!($30)) { + _LoadCompressedTexture($0,$1,$2,$4,33778); } break; } case 12: { - $30 = HEAP32[4194]|0; - $31 = ($30|0)==(0); - if (!($31)) { - _LoadCompressedTexture($0,$1,$2,$4,36196); + $31 = HEAP32[4187]|0; + $32 = ($31|0)==(0); + if (!($32)) { + _LoadCompressedTexture($0,$1,$2,$4,33779); } break; } case 13: { - $32 = HEAP32[4195]|0; - $33 = ($32|0)==(0); - if (!($33)) { - _LoadCompressedTexture($0,$1,$2,$4,37492); + $33 = HEAP32[4188]|0; + $34 = ($33|0)==(0); + if (!($34)) { + _LoadCompressedTexture($0,$1,$2,$4,36196); } break; } case 14: { - $34 = HEAP32[4195]|0; - $35 = ($34|0)==(0); - if (!($35)) { - _LoadCompressedTexture($0,$1,$2,$4,37496); + $35 = HEAP32[4189]|0; + $36 = ($35|0)==(0); + if (!($36)) { + _LoadCompressedTexture($0,$1,$2,$4,37492); } break; } case 15: { - $36 = HEAP32[4196]|0; - $37 = ($36|0)==(0); - if (!($37)) { - _LoadCompressedTexture($0,$1,$2,$4,35840); + $37 = HEAP32[4189]|0; + $38 = ($37|0)==(0); + if (!($38)) { + _LoadCompressedTexture($0,$1,$2,$4,37496); } break; } case 16: { - $38 = HEAP32[4196]|0; - $39 = ($38|0)==(0); - if (!($39)) { - _LoadCompressedTexture($0,$1,$2,$4,35842); + $39 = HEAP32[4190]|0; + $40 = ($39|0)==(0); + if (!($40)) { + _LoadCompressedTexture($0,$1,$2,$4,35840); } break; } case 17: { - $40 = HEAP32[4197]|0; - $41 = ($40|0)==(0); - if (!($41)) { - _LoadCompressedTexture($0,$1,$2,$4,37808); + $41 = HEAP32[4190]|0; + $42 = ($41|0)==(0); + if (!($42)) { + _LoadCompressedTexture($0,$1,$2,$4,35842); } break; } case 18: { - $42 = HEAP32[4197]|0; - $43 = ($42|0)==(0); - if (!($43)) { + $43 = HEAP32[4191]|0; + $44 = ($43|0)==(0); + if (!($44)) { + _LoadCompressedTexture($0,$1,$2,$4,37808); + } + break; + } + case 19: { + $45 = HEAP32[4191]|0; + $46 = ($45|0)==(0); + if (!($46)) { _LoadCompressedTexture($0,$1,$2,$4,37815); } break; } default: { - _TraceLog(2,4053,$vararg_buffer9); + _TraceLog(1,3896,$vararg_buffer9); } } } while(0); - $44 = HEAP32[4198]|0; - $45 = ($44|0)==(0); - if ($45) { + $47 = HEAP32[4193]|0; + $48 = ($47|0)==(0); + if ($48) { _glTexParameteri(3553,10242,33071); _glTexParameteri(3553,10243,33071); } else { @@ -11121,19 +8347,19 @@ function _rlglLoadTexture($0,$1,$2,$3,$4) { _glTexParameteri(3553,10240,9728); _glTexParameteri(3553,10241,9728); _glBindTexture(3553,0); - $46 = HEAP32[$5>>2]|0; - $47 = ($46|0)==(0); - if ($47) { - _TraceLog(2,4131,$vararg_buffer15); + $49 = HEAP32[$5>>2]|0; + $50 = ($49|0)==(0); + if ($50) { + _TraceLog(1,3974,$vararg_buffer15); $$0 = HEAP32[$5>>2]|0; STACKTOP = sp;return ($$0|0); } else { - HEAP32[$vararg_buffer11>>2] = $46; + HEAP32[$vararg_buffer11>>2] = $49; $vararg_ptr13 = ((($vararg_buffer11)) + 4|0); HEAP32[$vararg_ptr13>>2] = $1; $vararg_ptr14 = ((($vararg_buffer11)) + 8|0); HEAP32[$vararg_ptr14>>2] = $2; - _TraceLog(0,4082,$vararg_buffer11); + _TraceLog(0,3925,$vararg_buffer11); $$0 = HEAP32[$5>>2]|0; STACKTOP = sp;return ($$0|0); } @@ -11407,7 +8633,7 @@ function _GetImageData($0) { break; } default: { - _TraceLog(2,4214,$vararg_buffer); + _TraceLog(1,4057,$vararg_buffer); $$1 = $$0106; } } @@ -11424,1391 +8650,17 @@ function _GetImageData($0) { } STACKTOP = sp;return ($7|0); } -function _ErrorCallback($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $vararg_buffer = sp; - HEAP32[$vararg_buffer>>2] = $0; - $vararg_ptr1 = ((($vararg_buffer)) + 4|0); - HEAP32[$vararg_ptr1>>2] = $1; - _TraceLog(2,8080,$vararg_buffer); - STACKTOP = sp;return; -} -function _rlGetVersion() { - var label = 0, sp = 0; - sp = STACKTOP; - return 4; -} -function _SetupFramebufferSize($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $$sink = 0, $$sink1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0, $21 = 0, $22 = 0.0, $23 = 0, $24 = 0, $25 = 0, $26 = 0.0; - var $27 = 0, $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0.0, $37 = 0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0, $41 = 0.0, $42 = 0, $43 = 0, $44 = 0.0; - var $45 = 0, $46 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0, $or$cond = 0, $roundf = 0.0, $roundf38 = 0.0, $roundf39 = 0.0, $roundf40 = 0.0, $vararg_buffer = 0, $vararg_buffer4 = 0, $vararg_buffer8 = 0, $vararg_ptr1 = 0, $vararg_ptr11 = 0, $vararg_ptr12 = 0, $vararg_ptr13 = 0, $vararg_ptr2 = 0; - var $vararg_ptr3 = 0, $vararg_ptr7 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(112|0); - $vararg_buffer8 = sp + 24|0; - $vararg_buffer4 = sp + 16|0; - $vararg_buffer = sp; - $2 = sp + 40|0; - $3 = HEAP32[4177]|0; - $4 = ($3|0)>($0|0); - if (!($4)) { - $5 = HEAP32[4176]|0; - $6 = ($5|0)>($1|0); - if (!($6)) { - $30 = ($3|0)<($0|0); - $31 = ($5|0)<($1|0); - $or$cond = $30 | $31; - if (!($or$cond)) { - HEAP32[4218] = $3; - HEAP32[4219] = $5; - HEAP32[4220] = 0; - HEAP32[4221] = 0; - STACKTOP = sp;return; - } - HEAP32[$vararg_buffer8>>2] = $3; - $vararg_ptr11 = ((($vararg_buffer8)) + 4|0); - HEAP32[$vararg_ptr11>>2] = $5; - $vararg_ptr12 = ((($vararg_buffer8)) + 8|0); - HEAP32[$vararg_ptr12>>2] = $0; - $vararg_ptr13 = ((($vararg_buffer8)) + 12|0); - HEAP32[$vararg_ptr13>>2] = $1; - _TraceLog(0,8014,$vararg_buffer8); - $32 = (+($0|0)); - $33 = (+($1|0)); - $34 = $32 / $33; - $35 = HEAP32[4177]|0; - $36 = (+($35|0)); - $37 = HEAP32[4176]|0; - $38 = (+($37|0)); - $39 = $36 / $38; - $40 = !($34 <= $39); - if ($40) { - $44 = $34 * $38; - $roundf = (+_roundf((+$44))); - $45 = (~~(($roundf))); - HEAP32[4218] = $45; - HEAP32[4219] = $37; - $46 = (($45) - ($35))|0; - HEAP32[4220] = $46; - $$sink1 = 0; - } else { - HEAP32[4218] = $35; - $41 = $36 / $34; - $roundf38 = (+_roundf((+$41))); - $42 = (~~(($roundf38))); - HEAP32[4219] = $42; - HEAP32[4220] = 0; - $43 = (($42) - ($37))|0; - $$sink1 = $43; - } - HEAP32[4221] = $$sink1; - STACKTOP = sp;return; - } - } - $7 = HEAP32[4176]|0; - HEAP32[$vararg_buffer>>2] = $3; - $vararg_ptr1 = ((($vararg_buffer)) + 4|0); - HEAP32[$vararg_ptr1>>2] = $7; - $vararg_ptr2 = ((($vararg_buffer)) + 8|0); - HEAP32[$vararg_ptr2>>2] = $0; - $vararg_ptr3 = ((($vararg_buffer)) + 12|0); - HEAP32[$vararg_ptr3>>2] = $1; - _TraceLog(2,7871,$vararg_buffer); - $8 = (+($0|0)); - $9 = HEAP32[4177]|0; - $10 = (+($9|0)); - $11 = $8 / $10; - $12 = (+($1|0)); - $13 = HEAP32[4176]|0; - $14 = (+($13|0)); - $15 = $12 / $14; - $16 = !($11 <= $15); - if ($16) { - $22 = $10 * $15; - $roundf39 = (+_roundf((+$22))); - $23 = (~~(($roundf39))); - HEAP32[4218] = $23; - HEAP32[4219] = $1; - $24 = (($0) - ($23))|0; - HEAP32[4220] = $24; - $$sink = 0; - } else { - HEAP32[4218] = $0; - $17 = HEAP32[4176]|0; - $18 = (+($17|0)); - $19 = $11 * $18; - $roundf40 = (+_roundf((+$19))); - $20 = (~~(($roundf40))); - HEAP32[4219] = $20; - HEAP32[4220] = 0; - $21 = (($1) - ($20))|0; - $$sink = $21; - } - HEAP32[4221] = $$sink; - $25 = HEAP32[4218]|0; - $26 = (+($25|0)); - $27 = HEAP32[4177]|0; - $28 = (+($27|0)); - $29 = $26 / $28; - _MatrixScale($2,$29,$29,$29); - dest=16796; src=$2; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - HEAP32[4218] = $0; - HEAP32[4219] = $1; - HEAP32[$vararg_buffer4>>2] = $0; - $vararg_ptr7 = ((($vararg_buffer4)) + 4|0); - HEAP32[$vararg_ptr7>>2] = $1; - _TraceLog(2,7949,$vararg_buffer4); - STACKTOP = sp;return; -} -function _WindowSizeCallback($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $3 = 0.0, $4 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - _rlViewport(0,0,$1,$2); - _rlMatrixMode(5889); - _rlLoadIdentity(); - $3 = (+($1|0)); - $4 = (+($2|0)); - _rlOrtho(0.0,$3,$4,0.0,0.0,1.0); - _rlMatrixMode(5888); - _rlLoadIdentity(); - _rlClearScreenBuffers(); - HEAP32[4177] = $1; - HEAP32[4176] = $2; - HEAP32[4218] = $1; - HEAP32[4219] = $2; - return; -} -function _CursorEnterCallback($0,$1) { - $0 = $0|0; - $1 = $1|0; - var label = 0, sp = 0; - sp = STACKTOP; - return; -} -function _KeyCallback($0,$1,$2,$3,$4) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - $3 = $3|0; - $4 = $4|0; - var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; - sp = STACKTOP; - $5 = HEAP32[752]|0; - $6 = ($5|0)==($1|0); - $7 = ($3|0)==(1); - $or$cond = $7 & $6; - if ($or$cond) { - _glfwSetWindowShouldClose(($0|0),1); - return; - } - $8 = $3&255; - $9 = (19595 + ($1)|0); - HEAP8[$9>>0] = $8; - if (!($7)) { - return; - } - HEAP32[751] = $1; - return; -} -function _MouseButtonCallback($0,$1,$2,$3) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - $3 = $3|0; - var $$byval_copy = 0, $$sink = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0.0, $27 = 0.0; - var $28 = 0.0, $29 = 0, $30 = 0.0, $31 = 0, $32 = 0.0, $33 = 0.0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(128|0); - $$byval_copy = sp + 64|0; - $4 = sp + 8|0; - $5 = sp; - $6 = $2&255; - $7 = (19589 + ($1)|0); - HEAP8[$7>>0] = $6; - $8 = (_IsMouseButtonPressed(0)|0); - $9 = ($8|0)==(0); - if ($9) { - $10 = (_IsMouseButtonReleased(0)|0); - $11 = ($10|0)==(0); - if (!($11)) { - $$sink = 0; - label = 3; - } - } else { - $$sink = 1; - label = 3; - } - if ((label|0) == 3) { - HEAP32[$4>>2] = $$sink; - } - $12 = ((($4)) + 8|0); - HEAP32[$12>>2] = 0; - $13 = ((($4)) + 4|0); - HEAP32[$13>>2] = 1; - $14 = ((($4)) + 24|0); - _GetMousePosition($5); - $15 = $5; - $16 = $15; - $17 = HEAP32[$16>>2]|0; - $18 = (($15) + 4)|0; - $19 = $18; - $20 = HEAP32[$19>>2]|0; - $21 = $14; - $22 = $21; - HEAP32[$22>>2] = $17; - $23 = (($21) + 4)|0; - $24 = $23; - HEAP32[$24>>2] = $20; - $25 = (_GetScreenWidth()|0); - $26 = (+($25|0)); - $27 = +HEAPF32[$14>>2]; - $28 = $27 / $26; - HEAPF32[$14>>2] = $28; - $29 = (_GetScreenHeight()|0); - $30 = (+($29|0)); - $31 = ((($4)) + 28|0); - $32 = +HEAPF32[$31>>2]; - $33 = $32 / $30; - HEAPF32[$31>>2] = $33; - dest=$$byval_copy; src=$4; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _ProcessGestureEvent($$byval_copy); - STACKTOP = sp;return; -} -function _MouseCursorPosCallback($0,$1,$2) { - $0 = $0|0; - $1 = +$1; - $2 = +$2; - var $$byval_copy = 0, $$sroa$0$0$$sroa_idx = 0, $$sroa$2$0$$sroa_idx1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0, $24 = 0.0, $25 = 0.0, $26 = 0.0; - var $3 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(112|0); - $$byval_copy = sp + 56|0; - $3 = sp; - HEAP32[$3>>2] = 2; - $4 = ((($3)) + 8|0); - HEAP32[$4>>2] = 0; - $5 = ((($3)) + 4|0); - HEAP32[$5>>2] = 1; - $6 = $1; - $7 = $2; - $$sroa$0$0$$sroa_idx = ((($3)) + 24|0); - HEAPF32[$$sroa$0$0$$sroa_idx>>2] = $6; - $$sroa$2$0$$sroa_idx1 = ((($3)) + 28|0); - HEAPF32[$$sroa$2$0$$sroa_idx1>>2] = $7; - $8 = ((($3)) + 24|0); - $9 = $8; - $10 = $9; - $11 = HEAP32[$10>>2]|0; - $12 = (($9) + 4)|0; - $13 = $12; - $14 = HEAP32[$13>>2]|0; - $15 = 16400; - $16 = $15; - HEAP32[$16>>2] = $11; - $17 = (($15) + 4)|0; - $18 = $17; - HEAP32[$18>>2] = $14; - $19 = (_GetScreenWidth()|0); - $20 = (+($19|0)); - $21 = +HEAPF32[$8>>2]; - $22 = $21 / $20; - HEAPF32[$8>>2] = $22; - $23 = (_GetScreenHeight()|0); - $24 = (+($23|0)); - $25 = +HEAPF32[$$sroa$2$0$$sroa_idx1>>2]; - $26 = $25 / $24; - HEAPF32[$$sroa$2$0$$sroa_idx1>>2] = $26; - dest=$$byval_copy; src=$3; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _ProcessGestureEvent($$byval_copy); - STACKTOP = sp;return; -} -function _CharCallback($0,$1) { - $0 = $0|0; - $1 = $1|0; - var label = 0, sp = 0; - sp = STACKTOP; - HEAP32[751] = $1; - return; -} -function _ScrollCallback($0,$1,$2) { - $0 = $0|0; - $1 = +$1; - $2 = +$2; - var $3 = 0, label = 0, sp = 0; - sp = STACKTOP; - $3 = (~~(($2))); - HEAP32[4591] = $3; - return; -} -function _WindowIconifyCallback($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $$sink = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $2 = ($1|0)!=(0); - $$sink = $2&1; - HEAP32[4590] = $$sink; - return; -} -function _rlglInit($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $$05965 = 0, $$06066 = 0, $$06167 = 0, $$062 = 0, $$sink63 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; - var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0; - var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0; - var $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0.0, $72 = 0.0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0; - var $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $9 = 0, $exitcond = 0, $exitcond69 = 0, $exitcond70 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer10 = 0, $vararg_buffer13 = 0, $vararg_buffer15 = 0, $vararg_buffer17 = 0, $vararg_buffer19 = 0; - var $vararg_buffer21 = 0, $vararg_buffer23 = 0, $vararg_buffer25 = 0, $vararg_buffer27 = 0, $vararg_buffer29 = 0, $vararg_buffer31 = 0, $vararg_buffer34 = 0, $vararg_buffer36 = 0, $vararg_buffer39 = 0, $vararg_buffer4 = 0, $vararg_buffer41 = 0, $vararg_buffer7 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 2464|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(2464|0); - $vararg_buffer41 = sp + 2184|0; - $vararg_buffer39 = sp + 2176|0; - $vararg_buffer36 = sp + 2168|0; - $vararg_buffer34 = sp + 2160|0; - $vararg_buffer31 = sp + 2152|0; - $vararg_buffer29 = sp + 2144|0; - $vararg_buffer27 = sp + 2136|0; - $vararg_buffer25 = sp + 2128|0; - $vararg_buffer23 = sp + 2120|0; - $vararg_buffer21 = sp + 2112|0; - $vararg_buffer19 = sp + 2104|0; - $vararg_buffer17 = sp + 2096|0; - $vararg_buffer15 = sp + 2088|0; - $vararg_buffer13 = sp + 2080|0; - $vararg_buffer10 = sp + 2072|0; - $vararg_buffer7 = sp + 24|0; - $vararg_buffer4 = sp + 16|0; - $vararg_buffer1 = sp + 8|0; - $vararg_buffer = sp; - $2 = sp + 2400|0; - $3 = sp + 2384|0; - $4 = sp + 2320|0; - $5 = sp + 2256|0; - $6 = sp + 2192|0; - $7 = (_glGetString(7936)|0); - HEAP32[$vararg_buffer>>2] = $7; - _TraceLog(0,4512,$vararg_buffer); - $8 = (_glGetString(7937)|0); - HEAP32[$vararg_buffer1>>2] = $8; - _TraceLog(0,4530,$vararg_buffer1); - $9 = (_glGetString(7938)|0); - HEAP32[$vararg_buffer4>>2] = $9; - _TraceLog(0,4548,$vararg_buffer4); - $10 = (_glGetString(35724)|0); - HEAP32[$vararg_buffer7>>2] = $10; - _TraceLog(0,4566,$vararg_buffer7); - $11 = (_glGetString(7939)|0); - $12 = (_strlen($11)|0); - $13 = (($12) + 1)|0; - $14 = (_malloc($13)|0); - _memcpy(($14|0),($11|0),($13|0))|0; - $$062 = 0;$$sink63 = $14; - while(1) { - $15 = (_strtok($$sink63,4584)|0); - $16 = (($vararg_buffer7) + ($$062<<2)|0); - HEAP32[$16>>2] = $15; - $17 = ($15|0)==(0|0); - $18 = (($$062) + 1)|0; - if ($17) { - break; - } else { - $$062 = $18;$$sink63 = 0; - } - } - _free($14); - $19 = (($$062) + -1)|0; - HEAP32[$vararg_buffer10>>2] = $19; - _TraceLog(0,4586,$vararg_buffer10); - $20 = ($$062|0)>(1); - if ($20) { - $$06167 = 0; - while(1) { - $23 = (($vararg_buffer7) + ($$06167<<2)|0); - $24 = HEAP32[$23>>2]|0; - $25 = (_strcmp($24,4621)|0); - $26 = ($25|0)==(0); - if ($26) { - HEAP32[4256] = 1; - $27 = (_eglGetProcAddress((4648|0))|0); - HEAP32[4257] = $27; - $28 = (_eglGetProcAddress((4669|0))|0); - HEAP32[4258] = $28; - $29 = (_eglGetProcAddress((4690|0))|0); - HEAP32[4259] = $29; - } - $30 = (_strcmp($24,4714)|0); - $31 = ($30|0)==(0); - if ($31) { - HEAP32[4198] = 1; - } - $32 = (_strcmp($24,4734)|0); - $33 = ($32|0)==(0); - if ($33) { - label = 12; - } else { - $34 = HEAP32[$23>>2]|0; - $35 = (_strcmp($34,4766)|0); - $36 = ($35|0)==(0); - if ($36) { - label = 12; - } else { - $37 = (_strcmp($34,4799)|0); - $38 = ($37|0)==(0); - if ($38) { - label = 12; - } - } - } - if ((label|0) == 12) { - label = 0; - HEAP32[4193] = 1; - } - $39 = (_strcmp($24,4839)|0); - $40 = ($39|0)==(0); - if ($40) { - label = 15; - } else { - $41 = HEAP32[$23>>2]|0; - $42 = (_strcmp($41,4875)|0); - $43 = ($42|0)==(0); - if ($43) { - label = 15; - } - } - if ((label|0) == 15) { - label = 0; - HEAP32[4194] = 1; - } - $44 = HEAP32[$23>>2]|0; - $45 = (_strcmp($44,4908)|0); - $46 = ($45|0)==(0); - if ($46) { - HEAP32[4195] = 1; - } - $47 = (_strcmp($44,4933)|0); - $48 = ($47|0)==(0); - if ($48) { - HEAP32[4196] = 1; - } - $49 = (_strcmp($44,4966)|0); - $50 = ($49|0)==(0); - if ($50) { - HEAP32[4197] = 1; - } - $51 = (_strcmp($44,5002)|0); - $52 = ($51|0)==(0); - if ($52) { - HEAP32[4260] = 1; - _glGetFloatv(34047,(17044|0)); - } - $53 = HEAP32[$23>>2]|0; - $54 = (_strcmp($53,5036)|0); - $55 = ($54|0)==(0); - if ($55) { - HEAP32[4262] = 1; - } - $56 = (($$06167) + 1)|0; - $exitcond70 = ($56|0)==($19|0); - if ($exitcond70) { - break; - } else { - $$06167 = $56; - } - } - } - $21 = HEAP32[4256]|0; - $22 = ($21|0)==(0); - if ($22) { - _TraceLog(2,5139,$vararg_buffer15); - } else { - _TraceLog(0,5064,$vararg_buffer13); - } - $57 = HEAP32[4198]|0; - $58 = ($57|0)==(0); - if ($58) { - _TraceLog(2,5275,$vararg_buffer19); - } else { - _TraceLog(0,5200,$vararg_buffer17); - } - $59 = HEAP32[4193]|0; - $60 = ($59|0)==(0); - if (!($60)) { - _TraceLog(0,5367,$vararg_buffer21); - } - $61 = HEAP32[4194]|0; - $62 = ($61|0)==(0); - if (!($62)) { - _TraceLog(0,5413,$vararg_buffer23); - } - $63 = HEAP32[4195]|0; - $64 = ($63|0)==(0); - if (!($64)) { - _TraceLog(0,5460,$vararg_buffer25); - } - $65 = HEAP32[4196]|0; - $66 = ($65|0)==(0); - if (!($66)) { - _TraceLog(0,5511,$vararg_buffer27); - } - $67 = HEAP32[4197]|0; - $68 = ($67|0)==(0); - if (!($68)) { - _TraceLog(0,5558,$vararg_buffer29); - } - $69 = HEAP32[4260]|0; - $70 = ($69|0)==(0); - if (!($70)) { - $71 = +HEAPF32[4261]; - $72 = $71; - HEAPF64[$vararg_buffer31>>3] = $72; - _TraceLog(0,5605,$vararg_buffer31); - } - $73 = HEAP32[4262]|0; - $74 = ($73|0)==(0); - if (!($74)) { - _TraceLog(0,5671,$vararg_buffer34); - } - HEAP32[$vararg_buffer10>>2] = -1; - $75 = (_rlglLoadTexture($vararg_buffer10,1,1,7,1)|0); - HEAP32[4263] = $75; - $76 = ($75|0)==(0); - if ($76) { - _TraceLog(2,5775,$vararg_buffer39); - } else { - HEAP32[$vararg_buffer36>>2] = $75; - _TraceLog(0,5724,$vararg_buffer36); - } - _LoadDefaultShader($2); - dest=17056; src=$2; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=17112; src=$2; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _LoadDefaultBuffers(); - $77 = (_malloc(49152)|0); - HEAP32[4292] = $77; - $$06066 = 0; - while(1) { - $79 = HEAP32[4292]|0; - $80 = (($79) + (($$06066*12)|0)|0); - _VectorZero($3); - ;HEAP32[$80>>2]=HEAP32[$3>>2]|0;HEAP32[$80+4>>2]=HEAP32[$3+4>>2]|0;HEAP32[$80+8>>2]=HEAP32[$3+8>>2]|0; - $81 = (($$06066) + 1)|0; - $exitcond69 = ($81|0)==(4096); - if ($exitcond69) { - break; - } else { - $$06066 = $81; - } - } - $78 = (_malloc(36864)|0); - HEAP32[4293] = $78; - $$05965 = 0; - while(1) { - $82 = (((($78) + (($$05965*144)|0)|0)) + 8|0); - HEAP32[$82>>2] = 0; - $83 = (($78) + (($$05965*144)|0)|0); - HEAP32[$83>>2] = 0; - $84 = (($$05965) + 1)|0; - $exitcond = ($84|0)==(256); - if ($exitcond) { - break; - } else { - $$05965 = $84; - } - } - HEAP32[4294] = 1; - $85 = HEAP32[4263]|0; - $86 = ((($78)) + 8|0); - HEAP32[$86>>2] = $85; - HEAP32[4295] = 4; - _MatrixIdentity($4); - dest=17184; src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($4); - dest=(17248); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($4); - dest=(17312); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($4); - dest=(17376); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($4); - dest=(17440); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($4); - dest=(17504); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($4); - dest=(17568); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($4); - dest=(17632); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($4); - dest=(17696); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($4); - dest=(17760); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($4); - dest=(17824); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($4); - dest=(17888); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($4); - dest=(17952); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($4); - dest=(18016); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($4); - dest=(18080); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($4); - dest=(18144); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($5); - dest=16892; src=$5; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($6); - dest=16956; src=$6; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - HEAP32[4222] = 16956; - _glDepthFunc(515); - _glDisable(2929); - _glBlendFunc(770,771); - _glEnable(3042); - _glCullFace(1029); - _glFrontFace(2305); - _glEnable(2884); - _glClearColor(0.0,0.0,0.0,1.0); - _glClearDepthf(1.0); - _glClear(16640); - HEAP32[4552] = $0; - HEAP32[4553] = $1; - _TraceLog(0,5814,$vararg_buffer41); - STACKTOP = sp;return; -} -function _SetupViewport() { - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[4220]|0; - $1 = (($0|0) / 2)&-1; - $2 = HEAP32[4221]|0; - $3 = (($2|0) / 2)&-1; - $4 = HEAP32[4218]|0; - $5 = (($4) - ($0))|0; - $6 = HEAP32[4219]|0; - $7 = (($6) - ($2))|0; - _rlViewport($1,$3,$5,$7); - return; -} -function _rlMatrixMode($0) { - $0 = $0|0; - var $modelview$sink = 0, label = 0, sp = 0; - sp = STACKTOP; - switch ($0|0) { - case 5889: { - $modelview$sink = 16892; - label = 3; - break; - } - case 5888: { - $modelview$sink = 16956; - label = 3; - break; - } - default: { - } - } - if ((label|0) == 3) { - HEAP32[4222] = $modelview$sink; - } - HEAP32[4255] = $0; - return; -} -function _rlLoadIdentity() { - var $0 = 0, $1 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); - $0 = sp; - $1 = HEAP32[4222]|0; - _MatrixIdentity($0); - dest=$1; src=$0; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; -} -function _rlOrtho($0,$1,$2,$3,$4,$5) { - $0 = +$0; - $1 = +$1; - $2 = +$2; - $3 = +$3; - $4 = +$4; - $5 = +$5; - var $$byval_copy = 0, $$byval_copy1 = 0, $6 = 0, $7 = 0, $8 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 256|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(256|0); - $$byval_copy1 = sp + 192|0; - $$byval_copy = sp + 128|0; - $6 = sp + 64|0; - $7 = sp; - _MatrixOrtho($6,$0,$1,$2,$3,$4,$5); - _MatrixTranspose($6); - $8 = HEAP32[4222]|0; - dest=$$byval_copy; src=$8; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$$byval_copy1; src=$6; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixMultiply($7,$$byval_copy,$$byval_copy1); - dest=$8; src=$7; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; -} -function _ClearBackground($0) { - $0 = $0|0; - var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = HEAP8[$0>>0]|0; - $2 = ((($0)) + 1|0); - $3 = HEAP8[$2>>0]|0; - $4 = ((($0)) + 2|0); - $5 = HEAP8[$4>>0]|0; - $6 = ((($0)) + 3|0); - $7 = HEAP8[$6>>0]|0; - _rlClearColor($1,$3,$5,$7); - return; -} -function _rlClearColor($0,$1,$2,$3) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - $3 = $3|0; - var $10 = 0.0, $11 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $4 = (+($0&255)); - $5 = $4 / 255.0; - $6 = (+($1&255)); - $7 = $6 / 255.0; - $8 = (+($2&255)); - $9 = $8 / 255.0; - $10 = (+($3&255)); - $11 = $10 / 255.0; - _glClearColor((+$5),(+$7),(+$9),(+$11)); - return; -} -function _rlViewport($0,$1,$2,$3) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - $3 = $3|0; - var label = 0, sp = 0; - sp = STACKTOP; - _glViewport(($0|0),($1|0),($2|0),($3|0)); - return; -} -function _LoadDefaultShader($0) { - $0 = $0|0; - var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 1008|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(1008|0); - $vararg_buffer1 = sp + 8|0; - $vararg_buffer = sp; - $1 = sp + 16|0; - $2 = sp + 513|0; - $3 = sp + 72|0; - _memcpy(($2|0),(6390|0),489)|0; - _memcpy(($3|0),(6879|0),441)|0; - $4 = (_LoadShaderProgram($2,$3)|0); - HEAP32[$1>>2] = $4; - $5 = ($4|0)==(0); - if ($5) { - HEAP32[$vararg_buffer1>>2] = $4; - _TraceLog(2,7368,$vararg_buffer1); - } else { - HEAP32[$vararg_buffer>>2] = $4; - _TraceLog(0,7320,$vararg_buffer); - } - $6 = HEAP32[$1>>2]|0; - $7 = ($6|0)==(0); - if (!($7)) { - _LoadDefaultShaderLocations($1); - } - dest=$0; src=$1; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; -} -function _LoadDefaultBuffers() { - var $$05365 = 0, $$05467 = 0, $$05770 = 0, $$05972 = 0, $$066 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0; - var $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0; - var $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0; - var $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0; - var $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0; - var $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $exitcond = 0, $exitcond75 = 0, $exitcond78 = 0, $exitcond80 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer10 = 0, $vararg_buffer14 = 0, $vararg_buffer17 = 0; - var $vararg_buffer3 = 0, $vararg_buffer7 = 0, $vararg_ptr13 = 0, $vararg_ptr20 = 0, $vararg_ptr21 = 0, $vararg_ptr22 = 0, $vararg_ptr6 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); - $vararg_buffer17 = sp + 48|0; - $vararg_buffer14 = sp + 40|0; - $vararg_buffer10 = sp + 32|0; - $vararg_buffer7 = sp + 24|0; - $vararg_buffer3 = sp + 16|0; - $vararg_buffer1 = sp + 8|0; - $vararg_buffer = sp; - $0 = (_malloc(24576)|0); - HEAP32[(18228)>>2] = $0; - $1 = (_malloc(8192)|0); - HEAP32[(18236)>>2] = $1; - HEAP32[(18232)>>2] = 0; - HEAP32[(18240)>>2] = 0; - _memset(($0|0),0,24576)|0; - $$05972 = 0; - while(1) { - $2 = HEAP32[(18236)>>2]|0; - $3 = (($2) + ($$05972)|0); - HEAP8[$3>>0] = 0; - $4 = (($$05972) + 1)|0; - $exitcond80 = ($4|0)==(8192); - if ($exitcond80) { - break; - } else { - $$05972 = $4; - } - } - HEAP32[4554] = 0; - HEAP32[(18224)>>2] = 0; - HEAP32[(18220)>>2] = 0; - $5 = (_malloc(73728)|0); - HEAP32[(18276)>>2] = $5; - $6 = (_malloc(24576)|0); - HEAP32[(18284)>>2] = $6; - HEAP32[(18280)>>2] = 0; - HEAP32[(18288)>>2] = 0; - _memset(($5|0),0,73728)|0; - $$05770 = 0; - while(1) { - $7 = HEAP32[(18284)>>2]|0; - $8 = (($7) + ($$05770)|0); - HEAP8[$8>>0] = 0; - $9 = (($$05770) + 1)|0; - $exitcond78 = ($9|0)==(24576); - if ($exitcond78) { - break; - } else { - $$05770 = $9; - } - } - HEAP32[4566] = 0; - HEAP32[(18272)>>2] = 0; - HEAP32[(18268)>>2] = 0; - $10 = (_malloc(49152)|0); - HEAP32[(18324)>>2] = $10; - $11 = (_malloc(32768)|0); - HEAP32[(18328)>>2] = $11; - $12 = (_malloc(16384)|0); - HEAP32[(18332)>>2] = $12; - $13 = (_malloc(12288)|0); - HEAP32[(18336)>>2] = $13; - $14 = HEAP32[(18324)>>2]|0; - _memset(($14|0),0,49152)|0; - $15 = HEAP32[(18328)>>2]|0; - _memset(($15|0),0,32768)|0; - $$05467 = 0; - while(1) { - $17 = HEAP32[(18332)>>2]|0; - $18 = (($17) + ($$05467)|0); - HEAP8[$18>>0] = 0; - $19 = (($$05467) + 1)|0; - $exitcond75 = ($19|0)==(16384); - if ($exitcond75) { - break; - } else { - $$05467 = $19; - } - } - $16 = HEAP32[(18336)>>2]|0; - $$05365 = 0;$$066 = 0; - while(1) { - $22 = $$05365 << 2; - $23 = $22&65535; - $24 = (($16) + ($$066<<1)|0); - HEAP16[$24>>1] = $23; - $25 = $22 | 1; - $26 = $25&65535; - $27 = $$066 | 1; - $28 = (($16) + ($27<<1)|0); - HEAP16[$28>>1] = $26; - $29 = $22 | 2; - $30 = $29&65535; - $31 = (($$066) + 2)|0; - $32 = (($16) + ($31<<1)|0); - HEAP16[$32>>1] = $30; - $33 = (($$066) + 3)|0; - $34 = (($16) + ($33<<1)|0); - HEAP16[$34>>1] = $23; - $35 = (($$066) + 4)|0; - $36 = (($16) + ($35<<1)|0); - HEAP16[$36>>1] = $30; - $37 = $22 | 3; - $38 = $37&65535; - $39 = (($$066) + 5)|0; - $40 = (($16) + ($39<<1)|0); - HEAP16[$40>>1] = $38; - $41 = (($$05365) + 1)|0; - $42 = (($$066) + 6)|0; - $exitcond = ($41|0)==(1024); - if ($exitcond) { - break; - } else { - $$05365 = $41;$$066 = $42; - } - } - HEAP32[4578] = 0; - HEAP32[(18316)>>2] = 0; - HEAP32[(18320)>>2] = 0; - _TraceLog(0,5861,$vararg_buffer); - $20 = HEAP32[4256]|0; - $21 = ($20|0)==(0); - if (!($21)) { - $43 = HEAP32[4257]|0; - FUNCTION_TABLE_vii[$43 & 63](1,(18244)); - $44 = HEAP32[4258]|0; - $45 = HEAP32[(18244)>>2]|0; - FUNCTION_TABLE_vi[$44 & 31]($45); - } - _glGenBuffers(2,((18248)|0)); - $46 = HEAP32[(18248)>>2]|0; - _glBindBuffer(34962,($46|0)); - $47 = HEAP32[(18228)>>2]|0; - _glBufferData(34962,24576,($47|0),35048); - $48 = HEAP32[(17116)>>2]|0; - _glEnableVertexAttribArray(($48|0)); - $49 = HEAP32[(17116)>>2]|0; - _glVertexAttribPointer(($49|0),3,5126,0,0,(0|0)); - _glGenBuffers(2,((18252)|0)); - $50 = HEAP32[(18252)>>2]|0; - _glBindBuffer(34962,($50|0)); - $51 = HEAP32[(18236)>>2]|0; - _glBufferData(34962,8192,($51|0),35048); - $52 = HEAP32[(17136)>>2]|0; - _glEnableVertexAttribArray(($52|0)); - $53 = HEAP32[(17136)>>2]|0; - _glVertexAttribPointer(($53|0),4,5121,1,0,(0|0)); - $54 = HEAP32[4256]|0; - $55 = ($54|0)==(0); - if ($55) { - $57 = HEAP32[(18248)>>2]|0; - $58 = HEAP32[(18252)>>2]|0; - HEAP32[$vararg_buffer3>>2] = $57; - $vararg_ptr6 = ((($vararg_buffer3)) + 4|0); - HEAP32[$vararg_ptr6>>2] = $58; - _TraceLog(0,5999,$vararg_buffer3); - } else { - $56 = HEAP32[(18244)>>2]|0; - HEAP32[$vararg_buffer1>>2] = $56; - _TraceLog(0,5934,$vararg_buffer1); - } - $59 = HEAP32[4256]|0; - $60 = ($59|0)==(0); - if (!($60)) { - $61 = HEAP32[4257]|0; - FUNCTION_TABLE_vii[$61 & 63](1,(18292)); - $62 = HEAP32[4258]|0; - $63 = HEAP32[(18292)>>2]|0; - FUNCTION_TABLE_vi[$62 & 31]($63); - } - _glGenBuffers(1,((18296)|0)); - $64 = HEAP32[(18296)>>2]|0; - _glBindBuffer(34962,($64|0)); - $65 = HEAP32[(18276)>>2]|0; - _glBufferData(34962,73728,($65|0),35048); - $66 = HEAP32[(17116)>>2]|0; - _glEnableVertexAttribArray(($66|0)); - $67 = HEAP32[(17116)>>2]|0; - _glVertexAttribPointer(($67|0),3,5126,0,0,(0|0)); - _glGenBuffers(1,((18300)|0)); - $68 = HEAP32[(18300)>>2]|0; - _glBindBuffer(34962,($68|0)); - $69 = HEAP32[(18284)>>2]|0; - _glBufferData(34962,24576,($69|0),35048); - $70 = HEAP32[(17136)>>2]|0; - _glEnableVertexAttribArray(($70|0)); - $71 = HEAP32[(17136)>>2]|0; - _glVertexAttribPointer(($71|0),4,5121,1,0,(0|0)); - $72 = HEAP32[4256]|0; - $73 = ($72|0)==(0); - if ($73) { - $75 = HEAP32[(18296)>>2]|0; - $76 = HEAP32[(18300)>>2]|0; - HEAP32[$vararg_buffer10>>2] = $75; - $vararg_ptr13 = ((($vararg_buffer10)) + 4|0); - HEAP32[$vararg_ptr13>>2] = $76; - _TraceLog(0,6145,$vararg_buffer10); - } else { - $74 = HEAP32[(18292)>>2]|0; - HEAP32[$vararg_buffer7>>2] = $74; - _TraceLog(0,6076,$vararg_buffer7); - } - $77 = HEAP32[4256]|0; - $78 = ($77|0)==(0); - if (!($78)) { - $79 = HEAP32[4257]|0; - FUNCTION_TABLE_vii[$79 & 63](1,(18340)); - $80 = HEAP32[4258]|0; - $81 = HEAP32[(18340)>>2]|0; - FUNCTION_TABLE_vi[$80 & 31]($81); - } - _glGenBuffers(1,((18344)|0)); - $82 = HEAP32[(18344)>>2]|0; - _glBindBuffer(34962,($82|0)); - $83 = HEAP32[(18324)>>2]|0; - _glBufferData(34962,49152,($83|0),35048); - $84 = HEAP32[(17116)>>2]|0; - _glEnableVertexAttribArray(($84|0)); - $85 = HEAP32[(17116)>>2]|0; - _glVertexAttribPointer(($85|0),3,5126,0,0,(0|0)); - _glGenBuffers(1,((18348)|0)); - $86 = HEAP32[(18348)>>2]|0; - _glBindBuffer(34962,($86|0)); - $87 = HEAP32[(18328)>>2]|0; - _glBufferData(34962,32768,($87|0),35048); - $88 = HEAP32[(17120)>>2]|0; - _glEnableVertexAttribArray(($88|0)); - $89 = HEAP32[(17120)>>2]|0; - _glVertexAttribPointer(($89|0),2,5126,0,0,(0|0)); - _glGenBuffers(1,((18352)|0)); - $90 = HEAP32[(18352)>>2]|0; - _glBindBuffer(34962,($90|0)); - $91 = HEAP32[(18332)>>2]|0; - _glBufferData(34962,16384,($91|0),35048); - $92 = HEAP32[(17136)>>2]|0; - _glEnableVertexAttribArray(($92|0)); - $93 = HEAP32[(17136)>>2]|0; - _glVertexAttribPointer(($93|0),4,5121,1,0,(0|0)); - _glGenBuffers(1,((18356)|0)); - $94 = HEAP32[(18356)>>2]|0; - _glBindBuffer(34963,($94|0)); - $95 = HEAP32[(18336)>>2]|0; - _glBufferData(34963,12288,($95|0),35044); - $96 = HEAP32[4256]|0; - $97 = ($96|0)==(0); - if ($97) { - $99 = HEAP32[(18344)>>2]|0; - $100 = HEAP32[(18348)>>2]|0; - $101 = HEAP32[(18352)>>2]|0; - $102 = HEAP32[(18356)>>2]|0; - HEAP32[$vararg_buffer17>>2] = $99; - $vararg_ptr20 = ((($vararg_buffer17)) + 4|0); - HEAP32[$vararg_ptr20>>2] = $100; - $vararg_ptr21 = ((($vararg_buffer17)) + 8|0); - HEAP32[$vararg_ptr21>>2] = $101; - $vararg_ptr22 = ((($vararg_buffer17)) + 12|0); - HEAP32[$vararg_ptr22>>2] = $102; - _TraceLog(0,6291,$vararg_buffer17); - } else { - $98 = HEAP32[(18340)>>2]|0; - HEAP32[$vararg_buffer14>>2] = $98; - _TraceLog(0,6226,$vararg_buffer14); - } - $103 = HEAP32[4256]|0; - $104 = ($103|0)==(0); - if ($104) { - STACKTOP = sp;return; - } - $105 = HEAP32[4258]|0; - FUNCTION_TABLE_vi[$105 & 31](0); - STACKTOP = sp;return; -} -function _LoadShaderProgram($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $$0 = 0, $$alloca_mul = 0, $$alloca_mul34 = 0, $$alloca_mul36 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; - var $25 = 0, $26 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer10 = 0, $vararg_buffer13 = 0, $vararg_buffer16 = 0, $vararg_buffer19 = 0, $vararg_buffer22 = 0, $vararg_buffer4 = 0, $vararg_buffer7 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(96|0); - $vararg_buffer22 = sp + 64|0; - $vararg_buffer19 = sp + 56|0; - $vararg_buffer16 = sp + 48|0; - $vararg_buffer13 = sp + 40|0; - $vararg_buffer10 = sp + 32|0; - $vararg_buffer7 = sp + 24|0; - $vararg_buffer4 = sp + 16|0; - $vararg_buffer1 = sp + 8|0; - $vararg_buffer = sp; - $2 = sp + 80|0; - $3 = sp + 76|0; - $4 = sp + 72|0; - $5 = sp + 68|0; - $6 = (_glCreateShader(35633)|0); - $7 = (_glCreateShader(35632)|0); - HEAP32[$2>>2] = $0; - HEAP32[$3>>2] = $1; - _glShaderSource(($6|0),1,($2|0),(0|0)); - _glShaderSource(($7|0),1,($3|0),(0|0)); - HEAP32[$4>>2] = 0; - _glCompileShader(($6|0)); - _glGetShaderiv(($6|0),35713,($4|0)); - $8 = HEAP32[$4>>2]|0; - $9 = ($8|0)==(1); - if ($9) { - HEAP32[$vararg_buffer4>>2] = $6; - _TraceLog(0,7624,$vararg_buffer4); - } else { - HEAP32[$vararg_buffer>>2] = $6; - _TraceLog(2,7572,$vararg_buffer); - HEAP32[$vararg_buffer>>2] = 0; - _glGetShaderiv(($6|0),35716,($vararg_buffer|0)); - $10 = HEAP32[$vararg_buffer>>2]|0; - $11 = (_llvm_stacksave()|0); - $$alloca_mul = $10; - $12 = STACKTOP; STACKTOP = STACKTOP + ((((1*$$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$$alloca_mul)|0)+15)&-16)|0);; - $13 = HEAP32[$vararg_buffer>>2]|0; - _glGetShaderInfoLog(($6|0),($13|0),($5|0),($12|0)); - HEAP32[$vararg_buffer1>>2] = $12; - _TraceLog(0,7621,$vararg_buffer1); - _llvm_stackrestore(($11|0)); - } - _glCompileShader(($7|0)); - _glGetShaderiv(($7|0),35713,($4|0)); - $14 = HEAP32[$4>>2]|0; - $15 = ($14|0)==(1); - if ($15) { - HEAP32[$vararg_buffer13>>2] = $7; - _TraceLog(0,7725,$vararg_buffer13); - } else { - HEAP32[$vararg_buffer7>>2] = $7; - _TraceLog(2,7674,$vararg_buffer7); - HEAP32[$vararg_buffer7>>2] = 0; - _glGetShaderiv(($7|0),35716,($vararg_buffer7|0)); - $16 = HEAP32[$vararg_buffer7>>2]|0; - $17 = (_llvm_stacksave()|0); - $$alloca_mul34 = $16; - $18 = STACKTOP; STACKTOP = STACKTOP + ((((1*$$alloca_mul34)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$$alloca_mul34)|0)+15)&-16)|0);; - $19 = HEAP32[$vararg_buffer7>>2]|0; - _glGetShaderInfoLog(($7|0),($19|0),($5|0),($18|0)); - HEAP32[$vararg_buffer10>>2] = $18; - _TraceLog(0,7621,$vararg_buffer10); - _llvm_stackrestore(($17|0)); - } - $20 = (_glCreateProgram()|0); - _glAttachShader(($20|0),($6|0)); - _glAttachShader(($20|0),($7|0)); - _glBindAttribLocation(($20|0),0,(7416|0)); - _glBindAttribLocation(($20|0),1,(7431|0)); - _glBindAttribLocation(($20|0),2,(7462|0)); - _glBindAttribLocation(($20|0),3,(7489|0)); - _glBindAttribLocation(($20|0),4,(7475|0)); - _glBindAttribLocation(($20|0),5,(7446|0)); - _glLinkProgram(($20|0)); - _glGetProgramiv(($20|0),35714,($4|0)); - $21 = HEAP32[$4>>2]|0; - $22 = ($21|0)==(0); - if ($22) { - HEAP32[$vararg_buffer16>>2] = $20; - _TraceLog(2,7777,$vararg_buffer16); - HEAP32[$vararg_buffer16>>2] = 0; - _glGetProgramiv(($20|0),35716,($vararg_buffer16|0)); - $23 = HEAP32[$vararg_buffer16>>2]|0; - $24 = (_llvm_stacksave()|0); - $$alloca_mul36 = $23; - $25 = STACKTOP; STACKTOP = STACKTOP + ((((1*$$alloca_mul36)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$$alloca_mul36)|0)+15)&-16)|0);; - $26 = HEAP32[$vararg_buffer16>>2]|0; - _glGetProgramInfoLog(($20|0),($26|0),($5|0),($25|0)); - HEAP32[$vararg_buffer19>>2] = $25; - _TraceLog(0,7621,$vararg_buffer19); - _glDeleteProgram(($20|0)); - _llvm_stackrestore(($24|0)); - $$0 = 0; - _glDeleteShader(($6|0)); - _glDeleteShader(($7|0)); - STACKTOP = sp;return ($$0|0); - } else { - HEAP32[$vararg_buffer22>>2] = $20; - _TraceLog(0,7823,$vararg_buffer22); - $$0 = $20; - _glDeleteShader(($6|0)); - _glDeleteShader(($7|0)); - STACKTOP = sp;return ($$0|0); - } - return (0)|0; -} -function _LoadDefaultShaderLocations($0) { - $0 = $0|0; - var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; - var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; - var sp = 0; - sp = STACKTOP; - $1 = HEAP32[$0>>2]|0; - $2 = (_glGetAttribLocation(($1|0),(7416|0))|0); - $3 = ((($0)) + 4|0); - HEAP32[$3>>2] = $2; - $4 = HEAP32[$0>>2]|0; - $5 = (_glGetAttribLocation(($4|0),(7431|0))|0); - $6 = ((($0)) + 8|0); - HEAP32[$6>>2] = $5; - $7 = HEAP32[$0>>2]|0; - $8 = (_glGetAttribLocation(($7|0),(7446|0))|0); - $9 = ((($0)) + 12|0); - HEAP32[$9>>2] = $8; - $10 = HEAP32[$0>>2]|0; - $11 = (_glGetAttribLocation(($10|0),(7462|0))|0); - $12 = ((($0)) + 16|0); - HEAP32[$12>>2] = $11; - $13 = HEAP32[$0>>2]|0; - $14 = (_glGetAttribLocation(($13|0),(7475|0))|0); - $15 = ((($0)) + 20|0); - HEAP32[$15>>2] = $14; - $16 = HEAP32[$0>>2]|0; - $17 = (_glGetAttribLocation(($16|0),(7489|0))|0); - $18 = ((($0)) + 24|0); - HEAP32[$18>>2] = $17; - $19 = HEAP32[$0>>2]|0; - $20 = (_glGetUniformLocation(($19|0),(7501|0))|0); - $21 = ((($0)) + 28|0); - HEAP32[$21>>2] = $20; - $22 = HEAP32[$0>>2]|0; - $23 = (_glGetUniformLocation(($22|0),(7511|0))|0); - $24 = ((($0)) + 32|0); - HEAP32[$24>>2] = $23; - $25 = HEAP32[$0>>2]|0; - $26 = (_glGetUniformLocation(($25|0),(7522|0))|0); - $27 = ((($0)) + 36|0); - HEAP32[$27>>2] = $26; - $28 = HEAP32[$0>>2]|0; - $29 = (_glGetUniformLocation(($28|0),(7533|0))|0); - $30 = ((($0)) + 40|0); - HEAP32[$30>>2] = $29; - $31 = HEAP32[$0>>2]|0; - $32 = (_glGetUniformLocation(($31|0),(7545|0))|0); - $33 = ((($0)) + 44|0); - HEAP32[$33>>2] = $32; - $34 = HEAP32[$0>>2]|0; - $35 = (_glGetUniformLocation(($34|0),(7554|0))|0); - $36 = ((($0)) + 48|0); - HEAP32[$36>>2] = $35; - $37 = HEAP32[$0>>2]|0; - $38 = (_glGetUniformLocation(($37|0),(7563|0))|0); - $39 = ((($0)) + 52|0); - HEAP32[$39>>2] = $38; - return; -} -function _IsMouseButtonPressed($0) { - $0 = $0|0; - var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $or$cond = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = (19589 + ($0)|0); - $2 = HEAP8[$1>>0]|0; - $3 = (19592 + ($0)|0); - $4 = HEAP8[$3>>0]|0; - $5 = ($2<<24>>24)!=($4<<24>>24); - $6 = ($2<<24>>24)==(1); - $or$cond = $6 & $5; - $$0 = $or$cond&1; - return ($$0|0); -} -function _IsMouseButtonReleased($0) { - $0 = $0|0; - var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $or$cond = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = (19589 + ($0)|0); - $2 = HEAP8[$1>>0]|0; - $3 = (19592 + ($0)|0); - $4 = HEAP8[$3>>0]|0; - $5 = ($2<<24>>24)!=($4<<24>>24); - $6 = ($2<<24>>24)==(0); - $or$cond = $6 & $5; - $$0 = $or$cond&1; - return ($$0|0); -} -function _rlClearScreenBuffers() { - var label = 0, sp = 0; - sp = STACKTOP; - _glClear(16640); - return; -} -function _CloseWindow() { - var $0 = 0, $vararg_buffer = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $vararg_buffer = sp; - _UnloadDefaultFont(); - _rlglClose(); - $0 = HEAP32[4175]|0; - _glfwDestroyWindow(($0|0)); - _glfwTerminate(); - _TraceLog(0,8135,$vararg_buffer); - STACKTOP = sp;return; -} function _UnloadDefaultFont() { var $$byval_copy = 0, $0 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); $$byval_copy = sp; - ;HEAP32[$$byval_copy>>2]=HEAP32[16740>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[16740+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[16740+8>>2]|0;HEAP32[$$byval_copy+12>>2]=HEAP32[16740+12>>2]|0;HEAP32[$$byval_copy+16>>2]=HEAP32[16740+16>>2]|0; + ;HEAP32[$$byval_copy>>2]=HEAP32[16716>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[16716+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[16716+8>>2]|0;HEAP32[$$byval_copy+12>>2]=HEAP32[16716+12>>2]|0;HEAP32[$$byval_copy+16>>2]=HEAP32[16716+16>>2]|0; _UnloadTexture($$byval_copy); - $0 = HEAP32[(16768)>>2]|0; + $0 = HEAP32[(16744)>>2]|0; _free($0); STACKTOP = sp;return; } -function _rlglClose() { - var $0 = 0, $1 = 0, $vararg_buffer = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $vararg_buffer = sp; - _UnloadDefaultShader(); - _UnloadDefaultBuffers(); - _glDeleteTextures(1,(17052|0)); - $0 = HEAP32[4263]|0; - HEAP32[$vararg_buffer>>2] = $0; - _TraceLog(0,8162,$vararg_buffer); - $1 = HEAP32[4293]|0; - _free($1); - STACKTOP = sp;return; -} -function _UnloadDefaultShader() { - var $0 = 0, label = 0, sp = 0; - sp = STACKTOP; - _glUseProgram(0); - $0 = HEAP32[4264]|0; - _glDeleteProgram(($0|0)); - return; -} -function _UnloadDefaultBuffers() { - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[4256]|0; - $1 = ($0|0)==(0); - if (!($1)) { - $2 = HEAP32[4258]|0; - FUNCTION_TABLE_vi[$2 & 31](0); - } - _glDisableVertexAttribArray(0); - _glDisableVertexAttribArray(1); - _glDisableVertexAttribArray(2); - _glDisableVertexAttribArray(3); - _glBindBuffer(34962,0); - _glBindBuffer(34963,0); - _glDeleteBuffers(1,((18248)|0)); - _glDeleteBuffers(1,((18252)|0)); - _glDeleteBuffers(1,((18296)|0)); - _glDeleteBuffers(1,((18300)|0)); - _glDeleteBuffers(1,((18344)|0)); - _glDeleteBuffers(1,((18348)|0)); - _glDeleteBuffers(1,((18352)|0)); - _glDeleteBuffers(1,((18356)|0)); - $3 = HEAP32[4256]|0; - $4 = ($3|0)==(0); - if (!($4)) { - $5 = HEAP32[4259]|0; - FUNCTION_TABLE_vii[$5 & 63](1,(18244)); - $6 = HEAP32[4259]|0; - FUNCTION_TABLE_vii[$6 & 63](1,(18292)); - $7 = HEAP32[4259]|0; - FUNCTION_TABLE_vii[$7 & 63](1,(18340)); - } - $8 = HEAP32[(18228)>>2]|0; - _free($8); - $9 = HEAP32[(18236)>>2]|0; - _free($9); - $10 = HEAP32[(18276)>>2]|0; - _free($10); - $11 = HEAP32[(18284)>>2]|0; - _free($11); - $12 = HEAP32[(18324)>>2]|0; - _free($12); - $13 = HEAP32[(18328)>>2]|0; - _free($13); - $14 = HEAP32[(18332)>>2]|0; - _free($14); - $15 = HEAP32[(18336)>>2]|0; - _free($15); - return; -} function _UnloadTexture($0) { $0 = $0|0; var $1 = 0, $2 = 0, $3 = 0, $vararg_buffer = 0, label = 0, sp = 0; @@ -12823,7 +8675,7 @@ function _UnloadTexture($0) { _rlDeleteTextures($1); $3 = HEAP32[$0>>2]|0; HEAP32[$vararg_buffer>>2] = $3; - _TraceLog(0,8227,$vararg_buffer); + _TraceLog(0,4103,$vararg_buffer); STACKTOP = sp;return; } function _rlDeleteTextures($0) { @@ -12839,2103 +8691,210 @@ function _rlDeleteTextures($0) { } STACKTOP = sp;return; } -function _BeginDrawing() { - var $0 = 0.0, $1 = 0.0, $2 = 0.0, $downscaleView$byval_copy = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); - $downscaleView$byval_copy = sp; - $0 = (+_GetTime()); - HEAPF64[2069] = $0; - $1 = +HEAPF64[2052]; - $2 = $0 - $1; - HEAPF64[2070] = $2; - HEAPF64[2052] = $0; - _rlClearScreenBuffers(); - _rlLoadIdentity(); - dest=$downscaleView$byval_copy; src=16796; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - (_MatrixToFloat($downscaleView$byval_copy)|0); - _rlMultMatrixf(18368); - STACKTOP = sp;return; -} -function _MatrixToFloat($0) { - $0 = $0|0; - var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; - var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = HEAP32[$0>>2]|0; - HEAP32[4592] = $1; - $2 = ((($0)) + 4|0); - $3 = HEAP32[$2>>2]|0; - HEAP32[(18372)>>2] = $3; - $4 = ((($0)) + 8|0); - $5 = HEAP32[$4>>2]|0; - HEAP32[(18376)>>2] = $5; - $6 = ((($0)) + 12|0); - $7 = HEAP32[$6>>2]|0; - HEAP32[(18380)>>2] = $7; - $8 = ((($0)) + 16|0); - $9 = HEAP32[$8>>2]|0; - HEAP32[(18384)>>2] = $9; - $10 = ((($0)) + 20|0); - $11 = HEAP32[$10>>2]|0; - HEAP32[(18388)>>2] = $11; - $12 = ((($0)) + 24|0); - $13 = HEAP32[$12>>2]|0; - HEAP32[(18392)>>2] = $13; - $14 = ((($0)) + 28|0); - $15 = HEAP32[$14>>2]|0; - HEAP32[(18396)>>2] = $15; - $16 = ((($0)) + 32|0); - $17 = HEAP32[$16>>2]|0; - HEAP32[(18400)>>2] = $17; - $18 = ((($0)) + 36|0); - $19 = HEAP32[$18>>2]|0; - HEAP32[(18404)>>2] = $19; - $20 = ((($0)) + 40|0); - $21 = HEAP32[$20>>2]|0; - HEAP32[(18408)>>2] = $21; - $22 = ((($0)) + 44|0); - $23 = HEAP32[$22>>2]|0; - HEAP32[(18412)>>2] = $23; - $24 = ((($0)) + 48|0); - $25 = HEAP32[$24>>2]|0; - HEAP32[(18416)>>2] = $25; - $26 = ((($0)) + 52|0); - $27 = HEAP32[$26>>2]|0; - HEAP32[(18420)>>2] = $27; - $28 = ((($0)) + 56|0); - $29 = HEAP32[$28>>2]|0; - HEAP32[(18424)>>2] = $29; - $30 = ((($0)) + 60|0); - $31 = HEAP32[$30>>2]|0; - HEAP32[(18428)>>2] = $31; - return (18368|0); -} -function _rlMultMatrixf($0) { - $0 = $0|0; - var $$byval_copy = 0, $$byval_copy1 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; - var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0; - var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 256|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(256|0); - $$byval_copy1 = sp + 192|0; - $$byval_copy = sp + 128|0; - $1 = sp + 64|0; - $2 = sp; - $3 = HEAP32[$0>>2]|0; - HEAP32[$1>>2] = $3; - $4 = ((($1)) + 4|0); - $5 = ((($0)) + 4|0); - $6 = HEAP32[$5>>2]|0; - HEAP32[$4>>2] = $6; - $7 = ((($1)) + 8|0); - $8 = ((($0)) + 8|0); - $9 = HEAP32[$8>>2]|0; - HEAP32[$7>>2] = $9; - $10 = ((($1)) + 12|0); - $11 = ((($0)) + 12|0); - $12 = HEAP32[$11>>2]|0; - HEAP32[$10>>2] = $12; - $13 = ((($1)) + 16|0); - $14 = ((($0)) + 16|0); - $15 = HEAP32[$14>>2]|0; - HEAP32[$13>>2] = $15; - $16 = ((($1)) + 20|0); - $17 = ((($0)) + 20|0); - $18 = HEAP32[$17>>2]|0; - HEAP32[$16>>2] = $18; - $19 = ((($1)) + 24|0); - $20 = ((($0)) + 24|0); - $21 = HEAP32[$20>>2]|0; - HEAP32[$19>>2] = $21; - $22 = ((($1)) + 28|0); - $23 = ((($0)) + 28|0); - $24 = HEAP32[$23>>2]|0; - HEAP32[$22>>2] = $24; - $25 = ((($1)) + 32|0); - $26 = ((($0)) + 32|0); - $27 = HEAP32[$26>>2]|0; - HEAP32[$25>>2] = $27; - $28 = ((($1)) + 36|0); - $29 = ((($0)) + 36|0); - $30 = HEAP32[$29>>2]|0; - HEAP32[$28>>2] = $30; - $31 = ((($1)) + 40|0); - $32 = ((($0)) + 40|0); - $33 = HEAP32[$32>>2]|0; - HEAP32[$31>>2] = $33; - $34 = ((($1)) + 44|0); - $35 = ((($0)) + 44|0); - $36 = HEAP32[$35>>2]|0; - HEAP32[$34>>2] = $36; - $37 = ((($1)) + 48|0); - $38 = ((($0)) + 48|0); - $39 = HEAP32[$38>>2]|0; - HEAP32[$37>>2] = $39; - $40 = ((($1)) + 52|0); - $41 = ((($0)) + 52|0); - $42 = HEAP32[$41>>2]|0; - HEAP32[$40>>2] = $42; - $43 = ((($1)) + 56|0); - $44 = ((($0)) + 56|0); - $45 = HEAP32[$44>>2]|0; - HEAP32[$43>>2] = $45; - $46 = ((($1)) + 60|0); - $47 = ((($0)) + 60|0); - $48 = HEAP32[$47>>2]|0; - HEAP32[$46>>2] = $48; - $49 = HEAP32[4222]|0; - dest=$$byval_copy; src=$49; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$$byval_copy1; src=$1; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixMultiply($2,$$byval_copy,$$byval_copy1); - dest=$49; src=$2; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; -} -function _EndDrawing() { - var $0 = 0.0, $1 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - _rlglDraw(); - _SwapBuffers(); - _PollInputEvents(); - $0 = (+_GetTime()); - HEAPF64[2069] = $0; - $1 = +HEAPF64[2052]; - $2 = $0 - $1; - HEAPF64[2071] = $2; - HEAPF64[2052] = $0; - $3 = +HEAPF64[2070]; - $4 = $2 + $3; - HEAPF64[2072] = $4; - $5 = +HEAPF64[2049]; - $6 = $4 < $5; - if (!($6)) { - return; - } - $7 = $5 - $4; - $8 = $7 * 1000.0; - $9 = $8; - _Wait($9); - $10 = (+_GetTime()); - HEAPF64[2069] = $10; - $11 = +HEAPF64[2052]; - $12 = $10 - $11; - HEAPF64[2052] = $10; - $13 = +HEAPF64[2072]; - $14 = $12 + $13; - HEAPF64[2072] = $14; - return; -} -function _rlglDraw() { - var label = 0, sp = 0; - sp = STACKTOP; - _UpdateDefaultBuffers(); - _DrawDefaultBuffers(); - return; -} -function _SwapBuffers() { - var $0 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[4175]|0; - _glfwSwapBuffers(($0|0)); - return; -} -function _PollInputEvents() { - var $$04857 = 0, $$05160 = 0, $$058 = 0, $$lcssa = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0; - var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0.0, $40 = 0; - var $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, $scevgep = 0, $scevgep67 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 1456|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(1456|0); - $0 = sp + 1440|0; - $1 = sp + 1432|0; - $2 = sp; - _UpdateGestures(); - HEAP32[751] = -1; - HEAP32[753] = -1; - HEAP32[4608] = 0; - $3 = HEAP32[4175]|0; - _glfwGetCursorPos(($3|0),($0|0),($1|0)); - $4 = +HEAPF64[$0>>3]; - $5 = $4; - HEAPF32[4096] = $5; - $6 = +HEAPF64[$1>>3]; - $7 = $6; - HEAPF32[(16388)>>2] = $7; - _memcpy((20107|0),(19595|0),512)|0; - ;HEAP8[19592>>0]=HEAP8[19589>>0]|0;HEAP8[19592+1>>0]=HEAP8[19589+1>>0]|0;HEAP8[19592+2>>0]=HEAP8[19589+2>>0]|0; - $8 = HEAP32[4591]|0; - HEAP32[4178] = $8; - HEAP32[4591] = 0; - $9 = (_emscripten_get_num_gamepads()|0); - $10 = ($9|0)>(0); - if (!($10)) { - STACKTOP = sp;return; - } - $11 = ((($2)) + 12|0); - $12 = ((($2)) + 8|0); - $$05160 = 0; - while(1) { - $scevgep = (20619 + ($$05160<<5)|0); - $scevgep67 = (20747 + ($$05160<<5)|0); - dest=$scevgep; src=$scevgep67; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); - $13 = (_emscripten_get_gamepad_status(($$05160|0),($2|0))|0); - $14 = ($13|0)==(0); - if ($14) { - $15 = HEAP32[$11>>2]|0; - $16 = ($15|0)>(0); - if ($16) { - $17 = HEAP32[$11>>2]|0; - $$04857 = 0; - while(1) { - $21 = (((($2)) + 1040|0) + ($$04857<<2)|0); - $22 = HEAP32[$21>>2]|0; - $23 = ($22|0)==(1); - $24 = ((20747 + ($$05160<<5)|0) + ($$04857)|0); - if ($23) { - HEAP8[$24>>0] = 1; - HEAP32[753] = $$04857; - } else { - HEAP8[$24>>0] = 0; - } - $25 = (($$04857) + 1)|0; - $26 = ($25|0)<($17|0); - $27 = ($25|0)<(32); - $28 = $27 & $26; - if ($28) { - $$04857 = $25; - } else { - break; - } - } - } - $18 = HEAP32[$12>>2]|0; - $19 = ($18|0)>(0); - if ($19) { - $20 = HEAP32[$12>>2]|0; - $$058 = 0; - while(1) { - $29 = (((($2)) + 16|0) + ($$058<<3)|0); - $30 = +HEAPF64[$29>>3]; - $31 = $30; - $32 = ((18436 + ($$05160<<5)|0) + ($$058<<2)|0); - HEAPF32[$32>>2] = $31; - $33 = (($$058) + 1)|0; - $34 = ($33|0)<($20|0); - $35 = ($33|0)<(8); - $36 = $35 & $34; - if ($36) { - $$058 = $33; - } else { - $$lcssa = $20; - break; - } - } - } else { - $$lcssa = $18; - } - HEAP32[4608] = $$lcssa; - } - $37 = (($$05160) + 1)|0; - $38 = ($37|0)<($9|0); - $39 = ($37|0)<(4); - $40 = $38 & $39; - if ($40) { - $$05160 = $37; - } else { - break; - } - } - STACKTOP = sp;return; -} -function _Wait($0) { - $0 = +$0; - var $1 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = (+_GetTime()); - $2 = 0.0 - $1; - $3 = $0 / 1000.0; - $4 = $3; - $5 = $2 < $4; - if (!($5)) { - return; - } - while(1) { - $6 = (+_GetTime()); - $7 = $6 - $1; - $8 = $7 < $4; - if (!($8)) { - break; - } - } - return; -} -function _UpdateDefaultBuffers() { - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; - var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[4554]|0; - $1 = ($0|0)>(0); - if ($1) { - $2 = HEAP32[4256]|0; - $3 = ($2|0)==(0); - if (!($3)) { - $4 = HEAP32[4258]|0; - $5 = HEAP32[(18244)>>2]|0; - FUNCTION_TABLE_vi[$4 & 31]($5); - } - $6 = HEAP32[(18248)>>2]|0; - _glBindBuffer(34962,($6|0)); - $7 = HEAP32[4554]|0; - $8 = ($7*12)|0; - $9 = HEAP32[(18228)>>2]|0; - _glBufferSubData(34962,0,($8|0),($9|0)); - $10 = HEAP32[(18252)>>2]|0; - _glBindBuffer(34962,($10|0)); - $11 = HEAP32[(18224)>>2]|0; - $12 = $11 << 2; - $13 = HEAP32[(18236)>>2]|0; - _glBufferSubData(34962,0,($12|0),($13|0)); - } - $14 = HEAP32[4566]|0; - $15 = ($14|0)>(0); - if ($15) { - $16 = HEAP32[4256]|0; - $17 = ($16|0)==(0); - if (!($17)) { - $18 = HEAP32[4258]|0; - $19 = HEAP32[(18292)>>2]|0; - FUNCTION_TABLE_vi[$18 & 31]($19); - } - $20 = HEAP32[(18296)>>2]|0; - _glBindBuffer(34962,($20|0)); - $21 = HEAP32[4566]|0; - $22 = ($21*12)|0; - $23 = HEAP32[(18276)>>2]|0; - _glBufferSubData(34962,0,($22|0),($23|0)); - $24 = HEAP32[(18300)>>2]|0; - _glBindBuffer(34962,($24|0)); - $25 = HEAP32[(18272)>>2]|0; - $26 = $25 << 2; - $27 = HEAP32[(18284)>>2]|0; - _glBufferSubData(34962,0,($26|0),($27|0)); - } - $28 = HEAP32[4578]|0; - $29 = ($28|0)>(0); - if ($29) { - $30 = HEAP32[4256]|0; - $31 = ($30|0)==(0); - if (!($31)) { - $32 = HEAP32[4258]|0; - $33 = HEAP32[(18340)>>2]|0; - FUNCTION_TABLE_vi[$32 & 31]($33); - } - $34 = HEAP32[(18344)>>2]|0; - _glBindBuffer(34962,($34|0)); - $35 = HEAP32[4578]|0; - $36 = ($35*12)|0; - $37 = HEAP32[(18324)>>2]|0; - _glBufferSubData(34962,0,($36|0),($37|0)); - $38 = HEAP32[(18348)>>2]|0; - _glBindBuffer(34962,($38|0)); - $39 = HEAP32[4578]|0; - $40 = $39 << 3; - $41 = HEAP32[(18328)>>2]|0; - _glBufferSubData(34962,0,($40|0),($41|0)); - $42 = HEAP32[(18352)>>2]|0; - _glBindBuffer(34962,($42|0)); - $43 = HEAP32[4578]|0; - $44 = $43 << 2; - $45 = HEAP32[(18332)>>2]|0; - _glBufferSubData(34962,0,($44|0),($45|0)); - } - $46 = HEAP32[4256]|0; - $47 = ($46|0)==(0); - if ($47) { - return; - } - $48 = HEAP32[4258]|0; - FUNCTION_TABLE_vi[$48 & 31](0); - return; -} -function _DrawDefaultBuffers() { - var $$ = 0, $$02830 = 0, $$02932 = 0, $$031 = 0, $$byval_copy2 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0; - var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0; - var $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0; - var $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0; - var $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $modelview$byval_copy = 0; - var $or$cond = 0, $or$cond3 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 320|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(320|0); - $$byval_copy2 = sp + 256|0; - $modelview$byval_copy = sp + 192|0; - $0 = sp + 128|0; - $1 = sp + 64|0; - $2 = sp; - dest=$0; src=16892; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$1; src=16956; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - $3 = HEAP32[4641]|0; - $4 = ($3|0)!=(0); - $$ = $4 ? 2 : 1; - $$02932 = 0; - while(1) { - if ($4) { - dest=$modelview$byval_copy; src=$0; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$$byval_copy2; src=$1; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _SetStereoView($$02932,$modelview$byval_copy,$$byval_copy2); - } - $8 = HEAP32[4554]|0; - $9 = ($8|0)>(0); - $10 = HEAP32[4566]|0; - $11 = ($10|0)>(0); - $or$cond = $9 | $11; - $12 = HEAP32[4578]|0; - $13 = ($12|0)>(0); - $or$cond3 = $or$cond | $13; - if ($or$cond3) { - $14 = HEAP32[4278]|0; - _glUseProgram(($14|0)); - dest=$modelview$byval_copy; src=16956; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$$byval_copy2; src=16892; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixMultiply($2,$modelview$byval_copy,$$byval_copy2); - $15 = HEAP32[(17140)>>2]|0; - dest=$$byval_copy2; src=$2; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - $16 = (_MatrixToFloat($$byval_copy2)|0); - _glUniformMatrix4fv(($15|0),1,0,($16|0)); - $17 = HEAP32[(17144)>>2]|0; - _glUniform4f(($17|0),1.0,1.0,1.0,1.0); - $18 = HEAP32[(17156)>>2]|0; - _glUniform1i(($18|0),0); - } - $19 = HEAP32[4554]|0; - $20 = ($19|0)>(0); - if ($20) { - $21 = HEAP32[4263]|0; - _glBindTexture(3553,($21|0)); - $22 = HEAP32[4256]|0; - $23 = ($22|0)==(0); - if ($23) { - $26 = HEAP32[(18248)>>2]|0; - _glBindBuffer(34962,($26|0)); - $27 = HEAP32[(17116)>>2]|0; - _glVertexAttribPointer(($27|0),3,5126,0,0,(0|0)); - $28 = HEAP32[(17116)>>2]|0; - _glEnableVertexAttribArray(($28|0)); - $29 = HEAP32[(18252)>>2]|0; - _glBindBuffer(34962,($29|0)); - $30 = HEAP32[(17136)>>2]|0; - _glVertexAttribPointer(($30|0),4,5121,1,0,(0|0)); - $31 = HEAP32[(17136)>>2]|0; - _glEnableVertexAttribArray(($31|0)); - } else { - $24 = HEAP32[4258]|0; - $25 = HEAP32[(18244)>>2]|0; - FUNCTION_TABLE_vi[$24 & 31]($25); - } - $32 = HEAP32[4554]|0; - _glDrawArrays(1,0,($32|0)); - $33 = HEAP32[4256]|0; - $34 = ($33|0)==(0); - if ($34) { - _glBindBuffer(34962,0); - } - _glBindTexture(3553,0); - } - $35 = HEAP32[4566]|0; - $36 = ($35|0)>(0); - if ($36) { - $37 = HEAP32[4263]|0; - _glBindTexture(3553,($37|0)); - $38 = HEAP32[4256]|0; - $39 = ($38|0)==(0); - if ($39) { - $42 = HEAP32[(18296)>>2]|0; - _glBindBuffer(34962,($42|0)); - $43 = HEAP32[(17116)>>2]|0; - _glVertexAttribPointer(($43|0),3,5126,0,0,(0|0)); - $44 = HEAP32[(17116)>>2]|0; - _glEnableVertexAttribArray(($44|0)); - $45 = HEAP32[(18300)>>2]|0; - _glBindBuffer(34962,($45|0)); - $46 = HEAP32[(17136)>>2]|0; - _glVertexAttribPointer(($46|0),4,5121,1,0,(0|0)); - $47 = HEAP32[(17136)>>2]|0; - _glEnableVertexAttribArray(($47|0)); - } else { - $40 = HEAP32[4258]|0; - $41 = HEAP32[(18292)>>2]|0; - FUNCTION_TABLE_vi[$40 & 31]($41); - } - $48 = HEAP32[4566]|0; - _glDrawArrays(4,0,($48|0)); - $49 = HEAP32[4256]|0; - $50 = ($49|0)==(0); - if ($50) { - _glBindBuffer(34962,0); - } - _glBindTexture(3553,0); - } - $51 = HEAP32[4578]|0; - $52 = ($51|0)>(0); - if ($52) { - $53 = HEAP32[4256]|0; - $54 = ($53|0)==(0); - if ($54) { - $57 = HEAP32[(18344)>>2]|0; - _glBindBuffer(34962,($57|0)); - $58 = HEAP32[(17116)>>2]|0; - _glVertexAttribPointer(($58|0),3,5126,0,0,(0|0)); - $59 = HEAP32[(17116)>>2]|0; - _glEnableVertexAttribArray(($59|0)); - $60 = HEAP32[(18348)>>2]|0; - _glBindBuffer(34962,($60|0)); - $61 = HEAP32[(17120)>>2]|0; - _glVertexAttribPointer(($61|0),2,5126,0,0,(0|0)); - $62 = HEAP32[(17120)>>2]|0; - _glEnableVertexAttribArray(($62|0)); - $63 = HEAP32[(18352)>>2]|0; - _glBindBuffer(34962,($63|0)); - $64 = HEAP32[(17136)>>2]|0; - _glVertexAttribPointer(($64|0),4,5121,1,0,(0|0)); - $65 = HEAP32[(17136)>>2]|0; - _glEnableVertexAttribArray(($65|0)); - $66 = HEAP32[(18356)>>2]|0; - _glBindBuffer(34963,($66|0)); - } else { - $55 = HEAP32[4258]|0; - $56 = HEAP32[(18340)>>2]|0; - FUNCTION_TABLE_vi[$55 & 31]($56); - } - $67 = HEAP32[4294]|0; - $68 = ($67|0)>(0); - if ($68) { - $$02830 = 0;$$031 = 0; - while(1) { - $71 = HEAP32[4293]|0; - $72 = (($71) + (($$031*144)|0)|0); - $73 = HEAP32[$72>>2]|0; - $74 = (($73|0) / 4)&-1; - $75 = ($74*6)|0; - $76 = (((($71) + (($$031*144)|0)|0)) + 8|0); - $77 = HEAP32[$76>>2]|0; - _glBindTexture(3553,($77|0)); - $78 = $$02830 << 1; - $79 = $78; - _glDrawElements(4,($75|0),5123,($79|0)); - $80 = HEAP32[4293]|0; - $81 = (($80) + (($$031*144)|0)|0); - $82 = HEAP32[$81>>2]|0; - $83 = (($82|0) / 4)&-1; - $84 = ($83*6)|0; - $85 = (($84) + ($$02830))|0; - $86 = (($$031) + 1)|0; - $87 = HEAP32[4294]|0; - $88 = ($86|0)<($87|0); - if ($88) { - $$02830 = $85;$$031 = $86; - } else { - break; - } - } - } - $69 = HEAP32[4256]|0; - $70 = ($69|0)==(0); - if ($70) { - _glBindBuffer(34962,0); - _glBindBuffer(34963,0); - } - _glBindTexture(3553,0); - } - $89 = HEAP32[4256]|0; - $90 = ($89|0)==(0); - if (!($90)) { - $91 = HEAP32[4258]|0; - FUNCTION_TABLE_vi[$91 & 31](0); - } - _glUseProgram(0); - $92 = (($$02932) + 1)|0; - $93 = ($92|0)<($$|0); - if ($93) { - $$02932 = $92; - } else { - break; - } - } - HEAP32[4294] = 1; - $5 = HEAP32[4263]|0; - $6 = HEAP32[4293]|0; - $7 = ((($6)) + 8|0); - HEAP32[$7>>2] = $5; - HEAP32[$6>>2] = 0; - HEAP32[4554] = 0; - HEAP32[(18224)>>2] = 0; - HEAP32[4566] = 0; - HEAP32[(18272)>>2] = 0; - HEAP32[4578] = 0; - HEAP32[(18316)>>2] = 0; - HEAP32[(18320)>>2] = 0; - HEAPF32[754] = -1.0; - dest=16892; src=$0; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=16956; src=$1; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; -} -function _SetStereoView($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $$byval_copy = 0, $$byval_copy3 = 0, $10 = 0, $11 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 256|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(256|0); - $$byval_copy3 = sp + 192|0; - $$byval_copy = sp + 64|0; - $3 = sp; - $4 = sp + 128|0; - dest=$3; src=$1; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - $5 = HEAP32[4552]|0; - $6 = Math_imul($5, $0)|0; - $7 = (($6|0) / 2)&-1; - $8 = (($5|0) / 2)&-1; - $9 = HEAP32[4553]|0; - _rlViewport($7,0,$8,$9); - $10 = (18796 + ($0<<6)|0); - dest=$$byval_copy; src=$2; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$$byval_copy3; src=$10; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixMultiply($4,$$byval_copy,$$byval_copy3); - $11 = (18668 + ($0<<6)|0); - dest=$3; src=$11; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$$byval_copy3; src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _SetMatrixModelview($$byval_copy3); - dest=$$byval_copy3; src=$3; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _SetMatrixProjection($$byval_copy3); - STACKTOP = sp;return; -} -function _SetMatrixModelview($0) { - $0 = $0|0; - var dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - dest=16956; src=$0; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - return; -} -function _SetMatrixProjection($0) { - $0 = $0|0; - var dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - dest=16892; src=$0; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - return; -} -function _Begin3dMode($0) { - $0 = $0|0; - var $$byval_copy = 0, $$byval_copy1 = 0, $$byval_copy3 = 0, $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0; - var $8 = 0.0, $9 = 0.0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 160|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(160|0); - $$byval_copy3 = sp + 88|0; - $$byval_copy1 = sp + 76|0; - $$byval_copy = sp + 64|0; - $1 = sp; - _rlglDraw(); - _rlMatrixMode(5889); - _rlPushMatrix(); - _rlLoadIdentity(); - $2 = HEAP32[4177]|0; - $3 = (+($2|0)); - $4 = HEAP32[4176]|0; - $5 = (+($4|0)); - $6 = $3 / $5; - $7 = ((($0)) + 36|0); - $8 = +HEAPF32[$7>>2]; - $9 = $8 * 3.1415927410125732; - $10 = $9; - $11 = $10 / 360.0; - $12 = (+Math_tan((+$11))); - $13 = $12 * 0.01; - $14 = $6; - $15 = $13 * $14; - $16 = -$15; - $17 = -$13; - _rlFrustum($16,$15,$17,$13,0.01,1000.0); - _rlMatrixMode(5888); - _rlLoadIdentity(); - $18 = ((($0)) + 12|0); - $19 = ((($0)) + 24|0); - ;HEAP32[$$byval_copy>>2]=HEAP32[$0>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$0+8>>2]|0; - ;HEAP32[$$byval_copy1>>2]=HEAP32[$18>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$18+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$18+8>>2]|0; - ;HEAP32[$$byval_copy3>>2]=HEAP32[$19>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$19+4>>2]|0;HEAP32[$$byval_copy3+8>>2]=HEAP32[$19+8>>2]|0; - _MatrixLookAt($1,$$byval_copy,$$byval_copy1,$$byval_copy3); - dest=$$byval_copy3; src=$1; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - (_MatrixToFloat($$byval_copy3)|0); - _rlMultMatrixf(18368); - _rlEnableDepthTest(); - STACKTOP = sp;return; -} -function _rlPushMatrix() { - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $vararg_buffer = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $vararg_buffer = sp; - $0 = HEAP32[4731]|0; - $1 = ($0|0)==(15); - if ($1) { - HEAP32[$vararg_buffer>>2] = 16; - _TraceLog(1,8277,$vararg_buffer); - } - $2 = HEAP32[4731]|0; - $3 = (17184 + ($2<<6)|0); - $4 = HEAP32[4222]|0; - dest=$3; src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _rlLoadIdentity(); - $5 = HEAP32[4731]|0; - $6 = (($5) + 1)|0; - HEAP32[4731] = $6; - $7 = HEAP32[4255]|0; - $8 = ($7|0)==(5888); - if (!($8)) { - STACKTOP = sp;return; - } - HEAP32[4732] = 1; - STACKTOP = sp;return; -} -function _rlFrustum($0,$1,$2,$3,$4,$5) { - $0 = +$0; - $1 = +$1; - $2 = +$2; - $3 = +$3; - $4 = +$4; - $5 = +$5; - var $$byval_copy = 0, $$byval_copy1 = 0, $6 = 0, $7 = 0, $8 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 256|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(256|0); - $$byval_copy1 = sp + 192|0; - $$byval_copy = sp + 128|0; - $6 = sp + 64|0; - $7 = sp; - _MatrixFrustum($6,$0,$1,$2,$3,$4,$5); - _MatrixTranspose($6); - $8 = HEAP32[4222]|0; - dest=$$byval_copy; src=$8; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$$byval_copy1; src=$6; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixMultiply($7,$$byval_copy,$$byval_copy1); - dest=$8; src=$7; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; -} -function _rlEnableDepthTest() { - var label = 0, sp = 0; - sp = STACKTOP; - _glEnable(2929); - return; -} -function _End3dMode() { - var label = 0, sp = 0; - sp = STACKTOP; - _rlglDraw(); - _rlMatrixMode(5889); - _rlPopMatrix(); - _rlMatrixMode(5888); - _rlLoadIdentity(); - _rlDisableDepthTest(); - return; -} -function _rlPopMatrix() { - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[4731]|0; - $1 = ($0|0)>(0); - if (!($1)) { - return; - } - $2 = HEAP32[4731]|0; - $3 = (($2) + -1)|0; - $4 = (17184 + ($3<<6)|0); - $5 = HEAP32[4222]|0; - _memmove(($5|0),($4|0),64)|0; - $6 = (($2) + -1)|0; - HEAP32[4731] = $6; - return; -} -function _rlDisableDepthTest() { - var label = 0, sp = 0; - sp = STACKTOP; - _glDisable(2929); - return; -} -function _rlEnableRenderTexture($0) { - $0 = $0|0; - var label = 0, sp = 0; - sp = STACKTOP; - _glBindFramebuffer(36160,($0|0)); - return; -} -function _rlDisableRenderTexture() { - var label = 0, sp = 0; - sp = STACKTOP; - _glBindFramebuffer(36160,0); - return; -} -function _GetFPS() { - var $0 = 0.0, $1 = 0.0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (+_GetFrameTime()); - $1 = 1.0 / $0; - $2 = (~~(($1))); - return ($2|0); -} -function _GetFrameTime() { - var $0 = 0.0, $1 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $0 = +HEAPF64[2072]; - $1 = $0; - return (+$1); -} -function _IsKeyPressed($0) { - $0 = $0|0; - var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $or$cond = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = (19595 + ($0)|0); - $2 = HEAP8[$1>>0]|0; - $3 = (20107 + ($0)|0); - $4 = HEAP8[$3>>0]|0; - $5 = ($2<<24>>24)!=($4<<24>>24); - $6 = ($2<<24>>24)==(1); - $or$cond = $6 & $5; - $$0 = $or$cond&1; - return ($$0|0); -} -function _rlTranslatef($0,$1,$2) { - $0 = +$0; - $1 = +$1; - $2 = +$2; - var $$byval_copy = 0, $$byval_copy1 = 0, $3 = 0, $4 = 0, $5 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 256|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(256|0); - $$byval_copy1 = sp + 192|0; - $$byval_copy = sp + 128|0; - $3 = sp + 64|0; - $4 = sp; - _MatrixTranslate($3,$0,$1,$2); - _MatrixTranspose($3); - $5 = HEAP32[4222]|0; - dest=$$byval_copy; src=$5; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$$byval_copy1; src=$3; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixMultiply($4,$$byval_copy,$$byval_copy1); - dest=$5; src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; -} -function _rlRotatef($0,$1,$2,$3) { - $0 = +$0; - $1 = +$1; - $2 = +$2; - $3 = +$3; - var $$byval_copy1 = 0, $$byval_copy2 = 0, $10 = 0.0, $11 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 336|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(336|0); - $$byval_copy2 = sp + 272|0; - $$byval_copy1 = sp + 208|0; - $4 = sp + 144|0; - $5 = sp + 64|0; - $6 = sp + 80|0; - $7 = sp; - _MatrixIdentity($4); - HEAPF32[$5>>2] = $1; - $8 = ((($5)) + 4|0); - HEAPF32[$8>>2] = $2; - $9 = ((($5)) + 8|0); - HEAPF32[$9>>2] = $3; - _VectorNormalize($5); - $10 = $0 * 0.01745329238474369; - ;HEAP32[$$byval_copy2>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$5+4>>2]|0;HEAP32[$$byval_copy2+8>>2]=HEAP32[$5+8>>2]|0; - _MatrixRotate($6,$$byval_copy2,$10); - dest=$4; src=$6; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixTranspose($4); - $11 = HEAP32[4222]|0; - dest=$$byval_copy1; src=$11; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$$byval_copy2; src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixMultiply($7,$$byval_copy1,$$byval_copy2); - dest=$11; src=$7; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; -} -function _rlBegin($0) { - $0 = $0|0; - var label = 0, sp = 0; - sp = STACKTOP; - HEAP32[4295] = $0; - return; -} -function _rlEnd() { - var $$03956 = 0, $$04052 = 0, $$04154 = 0, $$04248 = 0, $$04347 = 0, $$byval_copy = 0, $$promoted = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0; - var $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0; - var $128 = 0, $129 = 0, $13 = 0.0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0; - var $146 = 0, $147 = 0, $148 = 0.0, $149 = 0.0, $15 = 0.0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0; - var $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0; - var $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0; - var $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0; - var $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $exitcond = 0, $exitcond60 = 0, $exitcond63 = 0; - var $scevgep = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); - $$byval_copy = sp; - $0 = HEAP32[4732]|0; - $1 = ($0|0)==(0); - if (!($1)) { - $2 = HEAP32[4733]|0; - $3 = ($2|0)>(0); - if ($3) { - $$03956 = 0; - while(1) { - $6 = HEAP32[4292]|0; - $7 = (($6) + (($$03956*12)|0)|0); - $8 = HEAP32[4222]|0; - dest=$$byval_copy; src=$8; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _VectorTransform($7,$$byval_copy); - $9 = (($$03956) + 1)|0; - $5 = HEAP32[4733]|0; - $10 = ($9|0)<($5|0); - if ($10) { - $$03956 = $9; - } else { - break; - } - } - HEAP32[4732] = 0; - $4 = ($5|0)>(0); - if ($4) { - $$04154 = 0; - while(1) { - $11 = HEAP32[4292]|0; - $12 = (($11) + (($$04154*12)|0)|0); - $13 = +HEAPF32[$12>>2]; - $14 = (((($11) + (($$04154*12)|0)|0)) + 4|0); - $15 = +HEAPF32[$14>>2]; - $16 = (((($11) + (($$04154*12)|0)|0)) + 8|0); - $17 = +HEAPF32[$16>>2]; - _rlVertex3f($13,$15,$17); - $18 = (($$04154) + 1)|0; - $19 = HEAP32[4733]|0; - $20 = ($18|0)<($19|0); - if ($20) { - $$04154 = $18; - } else { - break; - } - } - } - } else { - HEAP32[4732] = 0; - } - HEAP32[4733] = 0; - } - $21 = HEAP32[4295]|0; - switch ($21|0) { - case 1: { - $22 = HEAP32[4554]|0; - $23 = HEAP32[(18224)>>2]|0; - $24 = ($22|0)==($23|0); - if ($24) { - $148 = +HEAPF32[754]; - $149 = $148 + 4.9999998736893758E-5; - HEAPF32[754] = $149; - STACKTOP = sp;return; - } - $25 = (($22) - ($23))|0; - $26 = ($25|0)>(0); - if ($26) { - $$04347 = 0; - } else { - $148 = +HEAPF32[754]; - $149 = $148 + 4.9999998736893758E-5; - HEAPF32[754] = $149; - STACKTOP = sp;return; - } - while(1) { - $27 = HEAP32[(18236)>>2]|0; - $28 = HEAP32[(18224)>>2]|0; - $29 = $28 << 2; - $30 = (($29) + -4)|0; - $31 = (($27) + ($30)|0); - $32 = HEAP8[$31>>0]|0; - $33 = (($27) + ($29)|0); - HEAP8[$33>>0] = $32; - $34 = HEAP32[(18236)>>2]|0; - $35 = HEAP32[(18224)>>2]|0; - $36 = $35 << 2; - $37 = (($36) + -3)|0; - $38 = (($34) + ($37)|0); - $39 = HEAP8[$38>>0]|0; - $40 = $36 | 1; - $41 = (($34) + ($40)|0); - HEAP8[$41>>0] = $39; - $42 = HEAP32[(18236)>>2]|0; - $43 = HEAP32[(18224)>>2]|0; - $44 = $43 << 2; - $45 = (($44) + -2)|0; - $46 = (($42) + ($45)|0); - $47 = HEAP8[$46>>0]|0; - $48 = $44 | 2; - $49 = (($42) + ($48)|0); - HEAP8[$49>>0] = $47; - $50 = HEAP32[(18236)>>2]|0; - $51 = HEAP32[(18224)>>2]|0; - $52 = $51 << 2; - $53 = (($52) + -1)|0; - $54 = (($50) + ($53)|0); - $55 = HEAP8[$54>>0]|0; - $56 = $52 | 3; - $57 = (($50) + ($56)|0); - HEAP8[$57>>0] = $55; - $58 = HEAP32[(18224)>>2]|0; - $59 = (($58) + 1)|0; - HEAP32[(18224)>>2] = $59; - $60 = (($$04347) + 1)|0; - $exitcond = ($60|0)==($25|0); - if ($exitcond) { - break; - } else { - $$04347 = $60; - } - } - $148 = +HEAPF32[754]; - $149 = $148 + 4.9999998736893758E-5; - HEAPF32[754] = $149; - STACKTOP = sp;return; - break; - } - case 4: { - $61 = HEAP32[4566]|0; - $62 = HEAP32[(18272)>>2]|0; - $63 = ($61|0)==($62|0); - if ($63) { - $148 = +HEAPF32[754]; - $149 = $148 + 4.9999998736893758E-5; - HEAPF32[754] = $149; - STACKTOP = sp;return; - } - $64 = (($61) - ($62))|0; - $65 = ($64|0)>(0); - if ($65) { - $$04248 = 0; - } else { - $148 = +HEAPF32[754]; - $149 = $148 + 4.9999998736893758E-5; - HEAPF32[754] = $149; - STACKTOP = sp;return; - } - while(1) { - $66 = HEAP32[(18284)>>2]|0; - $67 = HEAP32[(18272)>>2]|0; - $68 = $67 << 2; - $69 = (($68) + -4)|0; - $70 = (($66) + ($69)|0); - $71 = HEAP8[$70>>0]|0; - $72 = (($66) + ($68)|0); - HEAP8[$72>>0] = $71; - $73 = HEAP32[(18284)>>2]|0; - $74 = HEAP32[(18272)>>2]|0; - $75 = $74 << 2; - $76 = (($75) + -3)|0; - $77 = (($73) + ($76)|0); - $78 = HEAP8[$77>>0]|0; - $79 = $75 | 1; - $80 = (($73) + ($79)|0); - HEAP8[$80>>0] = $78; - $81 = HEAP32[(18284)>>2]|0; - $82 = HEAP32[(18272)>>2]|0; - $83 = $82 << 2; - $84 = (($83) + -2)|0; - $85 = (($81) + ($84)|0); - $86 = HEAP8[$85>>0]|0; - $87 = $83 | 2; - $88 = (($81) + ($87)|0); - HEAP8[$88>>0] = $86; - $89 = HEAP32[(18284)>>2]|0; - $90 = HEAP32[(18272)>>2]|0; - $91 = $90 << 2; - $92 = (($91) + -1)|0; - $93 = (($89) + ($92)|0); - $94 = HEAP8[$93>>0]|0; - $95 = $91 | 3; - $96 = (($89) + ($95)|0); - HEAP8[$96>>0] = $94; - $97 = HEAP32[(18272)>>2]|0; - $98 = (($97) + 1)|0; - HEAP32[(18272)>>2] = $98; - $99 = (($$04248) + 1)|0; - $exitcond60 = ($99|0)==($64|0); - if ($exitcond60) { - break; - } else { - $$04248 = $99; - } - } - $148 = +HEAPF32[754]; - $149 = $148 + 4.9999998736893758E-5; - HEAPF32[754] = $149; - STACKTOP = sp;return; - break; - } - case 7: { - $100 = HEAP32[4578]|0; - $101 = HEAP32[(18320)>>2]|0; - $102 = ($100|0)==($101|0); - if (!($102)) { - $103 = (($100) - ($101))|0; - $104 = ($103|0)>(0); - if ($104) { - $$04052 = 0; - while(1) { - $105 = HEAP32[(18332)>>2]|0; - $106 = HEAP32[(18320)>>2]|0; - $107 = $106 << 2; - $108 = (($107) + -4)|0; - $109 = (($105) + ($108)|0); - $110 = HEAP8[$109>>0]|0; - $111 = (($105) + ($107)|0); - HEAP8[$111>>0] = $110; - $112 = HEAP32[(18332)>>2]|0; - $113 = HEAP32[(18320)>>2]|0; - $114 = $113 << 2; - $115 = (($114) + -3)|0; - $116 = (($112) + ($115)|0); - $117 = HEAP8[$116>>0]|0; - $118 = $114 | 1; - $119 = (($112) + ($118)|0); - HEAP8[$119>>0] = $117; - $120 = HEAP32[(18332)>>2]|0; - $121 = HEAP32[(18320)>>2]|0; - $122 = $121 << 2; - $123 = (($122) + -2)|0; - $124 = (($120) + ($123)|0); - $125 = HEAP8[$124>>0]|0; - $126 = $122 | 2; - $127 = (($120) + ($126)|0); - HEAP8[$127>>0] = $125; - $128 = HEAP32[(18332)>>2]|0; - $129 = HEAP32[(18320)>>2]|0; - $130 = $129 << 2; - $131 = (($130) + -1)|0; - $132 = (($128) + ($131)|0); - $133 = HEAP8[$132>>0]|0; - $134 = $130 | 3; - $135 = (($128) + ($134)|0); - HEAP8[$135>>0] = $133; - $136 = HEAP32[(18320)>>2]|0; - $137 = (($136) + 1)|0; - HEAP32[(18320)>>2] = $137; - $138 = (($$04052) + 1)|0; - $exitcond63 = ($138|0)==($103|0); - if ($exitcond63) { - break; - } else { - $$04052 = $138; - } - } - } - } - $139 = HEAP32[4578]|0; - $140 = HEAP32[(18316)>>2]|0; - $141 = ($139|0)>($140|0); - if (!($141)) { - $148 = +HEAPF32[754]; - $149 = $148 + 4.9999998736893758E-5; - HEAPF32[754] = $149; - STACKTOP = sp;return; - } - $142 = HEAP32[(18328)>>2]|0; - $$promoted = HEAP32[(18316)>>2]|0; - $143 = $$promoted << 1; - $scevgep = (($142) + ($143<<2)|0); - $144 = (($139) - ($140))|0; - $145 = $144 << 3; - _memset(($scevgep|0),0,($145|0))|0; - $146 = (($139) + ($$promoted))|0; - $147 = (($146) - ($140))|0; - HEAP32[(18316)>>2] = $147; - $148 = +HEAPF32[754]; - $149 = $148 + 4.9999998736893758E-5; - HEAPF32[754] = $149; - STACKTOP = sp;return; - break; - } - default: { - $148 = +HEAPF32[754]; - $149 = $148 + 4.9999998736893758E-5; - HEAPF32[754] = $149; - STACKTOP = sp;return; - } - } -} -function _rlVertex3f($0,$1,$2) { - $0 = +$0; - $1 = +$1; - $2 = +$2; - var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0; - var $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0; - var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer3 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); - $vararg_buffer3 = sp + 16|0; - $vararg_buffer1 = sp + 8|0; - $vararg_buffer = sp; - $3 = HEAP32[4732]|0; - $4 = ($3|0)==(0); - if (!($4)) { - $5 = HEAP32[4292]|0; - $6 = HEAP32[4733]|0; - $7 = (($5) + (($6*12)|0)|0); - HEAPF32[$7>>2] = $0; - $8 = (((($5) + (($6*12)|0)|0)) + 4|0); - HEAPF32[$8>>2] = $1; - $9 = (((($5) + (($6*12)|0)|0)) + 8|0); - HEAPF32[$9>>2] = $2; - $10 = (($6) + 1)|0; - HEAP32[4733] = $10; - STACKTOP = sp;return; - } - $11 = HEAP32[4295]|0; - switch ($11|0) { - case 1: { - $12 = HEAP32[4554]|0; - $13 = ($12|0)<(2048); - if ($13) { - $14 = HEAP32[(18228)>>2]|0; - $15 = ($12*3)|0; - $16 = (($14) + ($15<<2)|0); - HEAPF32[$16>>2] = $0; - $17 = (($15) + 1)|0; - $18 = (($14) + ($17<<2)|0); - HEAPF32[$18>>2] = $1; - $19 = (($15) + 2)|0; - $20 = (($14) + ($19<<2)|0); - HEAPF32[$20>>2] = $2; - $21 = (($12) + 1)|0; - HEAP32[4554] = $21; - STACKTOP = sp;return; - } else { - _TraceLog(1,8315,$vararg_buffer); - STACKTOP = sp;return; - } - break; - } - case 4: { - $22 = HEAP32[4566]|0; - $23 = ($22|0)<(6144); - if ($23) { - $24 = HEAP32[(18276)>>2]|0; - $25 = ($22*3)|0; - $26 = (($24) + ($25<<2)|0); - HEAPF32[$26>>2] = $0; - $27 = (($25) + 1)|0; - $28 = (($24) + ($27<<2)|0); - HEAPF32[$28>>2] = $1; - $29 = (($25) + 2)|0; - $30 = (($24) + ($29<<2)|0); - HEAPF32[$30>>2] = $2; - $31 = (($22) + 1)|0; - HEAP32[4566] = $31; - STACKTOP = sp;return; - } else { - _TraceLog(1,8340,$vararg_buffer1); - STACKTOP = sp;return; - } - break; - } - case 7: { - $32 = HEAP32[4578]|0; - $33 = ($32|0)<(4096); - if ($33) { - $34 = HEAP32[(18324)>>2]|0; - $35 = ($32*3)|0; - $36 = (($34) + ($35<<2)|0); - HEAPF32[$36>>2] = $0; - $37 = (($35) + 1)|0; - $38 = (($34) + ($37<<2)|0); - HEAPF32[$38>>2] = $1; - $39 = (($35) + 2)|0; - $40 = (($34) + ($39<<2)|0); - HEAPF32[$40>>2] = $2; - $41 = (($32) + 1)|0; - HEAP32[4578] = $41; - $42 = HEAP32[4293]|0; - $43 = HEAP32[4294]|0; - $44 = (($43) + -1)|0; - $45 = (($42) + (($44*144)|0)|0); - $46 = HEAP32[$45>>2]|0; - $47 = (($46) + 1)|0; - HEAP32[$45>>2] = $47; - STACKTOP = sp;return; - } else { - _TraceLog(1,8369,$vararg_buffer3); - STACKTOP = sp;return; - } - break; - } - default: { - STACKTOP = sp;return; - } - } -} -function _rlVertex2f($0,$1) { - $0 = +$0; - $1 = +$1; - var $2 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $2 = +HEAPF32[754]; - _rlVertex3f($0,$1,$2); - return; -} -function _rlTexCoord2f($0,$1) { - $0 = +$0; - $1 = +$1; - var $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $2 = HEAP32[4295]|0; - $3 = ($2|0)==(7); - if (!($3)) { - return; - } - $4 = HEAP32[(18328)>>2]|0; - $5 = HEAP32[(18316)>>2]|0; - $6 = $5 << 1; - $7 = (($4) + ($6<<2)|0); - HEAPF32[$7>>2] = $0; - $8 = $6 | 1; - $9 = (($4) + ($8<<2)|0); - HEAPF32[$9>>2] = $1; - $10 = (($5) + 1)|0; - HEAP32[(18316)>>2] = $10; - return; -} -function _rlNormal3f($0,$1,$2) { - $0 = +$0; - $1 = +$1; - $2 = +$2; - var label = 0, sp = 0; - sp = STACKTOP; - return; -} -function _rlColor4ub($0,$1,$2,$3) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - $3 = $3|0; - var $$sink37 = 0, $$sink38 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $4 = 0, $5 = 0; - var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $4 = HEAP32[4295]|0; - switch ($4|0) { - case 1: { - $$sink37 = (18224);$$sink38 = (18236); - break; - } - case 4: { - $$sink37 = (18272);$$sink38 = (18284); - break; - } - case 7: { - $$sink37 = (18320);$$sink38 = (18332); - break; - } - default: { - return; - } - } - $5 = HEAP32[$$sink38>>2]|0; - $6 = HEAP32[$$sink37>>2]|0; - $7 = $6 << 2; - $8 = (($5) + ($7)|0); - HEAP8[$8>>0] = $0; - $9 = HEAP32[$$sink38>>2]|0; - $10 = HEAP32[$$sink37>>2]|0; - $11 = $10 << 2; - $12 = $11 | 1; - $13 = (($9) + ($12)|0); - HEAP8[$13>>0] = $1; - $14 = HEAP32[$$sink38>>2]|0; - $15 = HEAP32[$$sink37>>2]|0; - $16 = $15 << 2; - $17 = $16 | 2; - $18 = (($14) + ($17)|0); - HEAP8[$18>>0] = $2; - $19 = HEAP32[$$sink38>>2]|0; - $20 = HEAP32[$$sink37>>2]|0; - $21 = $20 << 2; - $22 = $21 | 3; - $23 = (($19) + ($22)|0); - HEAP8[$23>>0] = $3; - $24 = HEAP32[$$sink37>>2]|0; - $25 = (($24) + 1)|0; - HEAP32[$$sink37>>2] = $25; - return; -} -function _rlColor3f($0,$1,$2) { - $0 = +$0; - $1 = +$1; - $2 = +$2; - var $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, label = 0, sp = 0; - sp = STACKTOP; - $3 = $0 * 255.0; - $4 = (~~(($3))&255); - $5 = $1 * 255.0; - $6 = (~~(($5))&255); - $7 = $2 * 255.0; - $8 = (~~(($7))&255); - _rlColor4ub($4,$6,$8,-1); - return; -} -function _rlEnableTexture($0) { - $0 = $0|0; - var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = HEAP32[4293]|0; - $2 = HEAP32[4294]|0; - $3 = (($2) + -1)|0; - $4 = (((($1) + (($3*144)|0)|0)) + 8|0); - $5 = HEAP32[$4>>2]|0; - $6 = ($5|0)==($0|0); - if ($6) { - return; - } - $7 = (($1) + (($3*144)|0)|0); - $8 = HEAP32[$7>>2]|0; - $9 = ($8|0)>(0); - if ($9) { - $10 = (($2) + 1)|0; - HEAP32[4294] = $10; - } - $11 = HEAP32[4294]|0; - $12 = (($11) + -1)|0; - $13 = (((($1) + (($12*144)|0)|0)) + 8|0); - HEAP32[$13>>2] = $0; - $14 = (($1) + (($12*144)|0)|0); - HEAP32[$14>>2] = 0; - return; -} -function _rlDisableTexture() { - var $0 = 0, $1 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[4578]|0; - $1 = ($0|0)>(4095); - if (!($1)) { - return; - } - _rlglDraw(); - return; -} -function _rlDeleteRenderTextures($0) { - $0 = $0|0; - var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $vararg_buffer = sp; - $1 = HEAP32[$0>>2]|0; - $2 = ($1|0)==(0); - if (!($2)) { - _glDeleteFramebuffers(1,($0|0)); - } - $3 = ((($0)) + 4|0); - $4 = HEAP32[$3>>2]|0; - $5 = ($4|0)==(0); - if (!($5)) { - _glDeleteTextures(1,($3|0)); - } - $6 = ((($0)) + 24|0); - $7 = HEAP32[$6>>2]|0; - $8 = ($7|0)==(0); - if (!($8)) { - _glDeleteTextures(1,($6|0)); - } - $9 = HEAP32[$0>>2]|0; - HEAP32[$vararg_buffer>>2] = $9; - _TraceLog(0,8394,$vararg_buffer); - STACKTOP = sp;return; -} -function _rlDeleteShader($0) { - $0 = $0|0; - var $1 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = ($0|0)==(0); - if ($1) { - return; - } - _glDeleteProgram(($0|0)); - return; -} -function _rlglLoadRenderTexture($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0; - var $vararg_buffer1 = 0, $vararg_buffer3 = 0, $vararg_buffer5 = 0, $vararg_buffer7 = 0, $vararg_buffer9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(96|0); - $vararg_buffer9 = sp + 40|0; - $vararg_buffer7 = sp + 32|0; - $vararg_buffer5 = sp + 24|0; - $vararg_buffer3 = sp + 16|0; - $vararg_buffer1 = sp + 8|0; - $vararg_buffer = sp; - $3 = sp + 44|0; - HEAP32[$3>>2] = 0; - $4 = ((($3)) + 4|0); - HEAP32[$4>>2] = 0; - $5 = ((($3)) + 8|0); - HEAP32[$5>>2] = $1; - $6 = ((($3)) + 12|0); - HEAP32[$6>>2] = $2; - $7 = ((($3)) + 20|0); - HEAP32[$7>>2] = 7; - $8 = ((($3)) + 16|0); - HEAP32[$8>>2] = 1; - $9 = ((($3)) + 24|0); - HEAP32[$9>>2] = 0; - $10 = ((($3)) + 28|0); - HEAP32[$10>>2] = $1; - $11 = ((($3)) + 32|0); - HEAP32[$11>>2] = $2; - $12 = ((($3)) + 40|0); - HEAP32[$12>>2] = 19; - $13 = ((($3)) + 36|0); - HEAP32[$13>>2] = 1; - _glGenTextures(1,($4|0)); - $14 = HEAP32[$4>>2]|0; - _glBindTexture(3553,($14|0)); - _glTexParameteri(3553,10242,33071); - _glTexParameteri(3553,10243,33071); - _glTexParameteri(3553,10241,9729); - _glTexParameteri(3553,10240,9729); - _glTexImage2D(3553,0,6408,($1|0),($2|0),0,6408,5121,(0|0)); - _glBindTexture(3553,0); - _glGenRenderbuffers(1,($9|0)); - $15 = HEAP32[$9>>2]|0; - _glBindRenderbuffer(36161,($15|0)); - _glRenderbufferStorage(36161,33189,($1|0),($2|0)); - _glGenFramebuffers(1,($3|0)); - $16 = HEAP32[$3>>2]|0; - _glBindFramebuffer(36160,($16|0)); - $17 = HEAP32[$4>>2]|0; - _glFramebufferTexture2D(36160,36064,3553,($17|0),0); - $18 = HEAP32[$9>>2]|0; - _glFramebufferRenderbuffer(36160,36096,36161,($18|0)); - $19 = (_glCheckFramebufferStatus(36160)|0); - $20 = ($19|0)==(36053); - if ($20) { - $21 = HEAP32[$3>>2]|0; - HEAP32[$vararg_buffer9>>2] = $21; - _TraceLog(0,8631,$vararg_buffer9); - _glBindFramebuffer(36160,0); - dest=$0; src=$3; stop=dest+44|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; - } - _TraceLog(2,8451,$vararg_buffer); - switch ($19|0) { - case 36061: { - _TraceLog(2,8494,$vararg_buffer1); - break; - } - case 36054: { - _TraceLog(2,8521,$vararg_buffer3); - break; - } - case 36057: { - _TraceLog(2,8555,$vararg_buffer5); - break; - } - case 36055: { - _TraceLog(2,8589,$vararg_buffer7); - break; - } - default: { - } - } - _glDeleteTextures(1,($4|0)); - _glDeleteTextures(1,($9|0)); - _glDeleteFramebuffers(1,($3|0)); - _glBindFramebuffer(36160,0); - dest=$0; src=$3; stop=dest+44|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; -} -function _UnloadShader($0) { - $0 = $0|0; - var $1 = 0, $2 = 0, $3 = 0, $vararg_buffer = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $vararg_buffer = sp; - $1 = HEAP32[$0>>2]|0; - $2 = ($1|0)==(0); - if ($2) { - STACKTOP = sp;return; - } - _rlDeleteShader($1); - $3 = HEAP32[$0>>2]|0; - HEAP32[$vararg_buffer>>2] = $3; - _TraceLog(0,8683,$vararg_buffer); - STACKTOP = sp;return; -} -function _GetShaderLocation($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $2 = 0, $3 = 0, $4 = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $vararg_buffer = sp; - $2 = HEAP32[$0>>2]|0; - $3 = (_glGetUniformLocation(($2|0),($1|0))|0); - $4 = ($3|0)==(-1); - if (!($4)) { - STACKTOP = sp;return ($3|0); - } - HEAP32[$vararg_buffer>>2] = $2; - $vararg_ptr1 = ((($vararg_buffer)) + 4|0); - HEAP32[$vararg_ptr1>>2] = $1; - _TraceLog(3,8725,$vararg_buffer); - STACKTOP = sp;return ($3|0); -} -function _SetShaderValue($0,$1,$2,$3) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - $3 = $3|0; - var $4 = 0, $vararg_buffer = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $vararg_buffer = sp; - $4 = HEAP32[$0>>2]|0; - _glUseProgram(($4|0)); - switch ($3|0) { - case 1: { - _glUniform1fv(($1|0),1,($2|0)); - break; - } - case 2: { - _glUniform2fv(($1|0),1,($2|0)); - break; - } - case 3: { - _glUniform3fv(($1|0),1,($2|0)); - break; - } - case 4: { - _glUniform4fv(($1|0),1,($2|0)); - break; - } - default: { - _TraceLog(2,8780,$vararg_buffer); - } - } - STACKTOP = sp;return; -} -function _InitVrSimulator($0) { - $0 = $0|0; - var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $hmd$byval_copy = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer3 = 0, $vararg_buffer5 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 144|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(144|0); - $hmd$byval_copy = sp + 72|0; - $vararg_buffer5 = sp + 24|0; - $vararg_buffer3 = sp + 16|0; - $vararg_buffer1 = sp + 8|0; - $vararg_buffer = sp; - $1 = sp + 28|0; - $2 = ($0|0)==(1); - do { - if ($2) { - HEAP32[4734] = 1280; - HEAP32[(18940)>>2] = 800; - HEAPF32[(18944)>>2] = 0.14975999295711517; - HEAPF32[(18948)>>2] = 0.093560002744197845; - HEAPF32[(18952)>>2] = 0.046780001372098923; - HEAPF32[(18956)>>2] = 0.041000001132488251; - HEAPF32[(18960)>>2] = 0.063500002026557922; - HEAPF32[(18964)>>2] = 0.064000003039836884; - HEAPF32[(18968)>>2] = 1.0; - HEAPF32[(18972)>>2] = 0.2199999988079071; - HEAPF32[(18976)>>2] = 0.23999999463558197; - HEAPF32[(18980)>>2] = 0.0; - HEAPF32[(18984)>>2] = 0.99599999189376831; - HEAPF32[(18988)>>2] = -0.0040000001899898052; - HEAPF32[(18992)>>2] = 1.0140000581741333; - HEAPF32[(18996)>>2] = 0.0; - _TraceLog(0,8824,$vararg_buffer); - } else { - $3 = $0 | 2; - $4 = ($3|0)==(2); - if ($4) { - HEAP32[4734] = 2160; - HEAP32[(18940)>>2] = 1200; - HEAPF32[(18944)>>2] = 0.13379299640655518; - HEAPF32[(18948)>>2] = 0.066899999976158142; - HEAPF32[(18952)>>2] = 0.046780001372098923; - HEAPF32[(18956)>>2] = 0.041000001132488251; - HEAPF32[(18960)>>2] = 0.070000000298023224; - HEAPF32[(18964)>>2] = 0.070000000298023224; - HEAPF32[(18968)>>2] = 1.0; - HEAPF32[(18972)>>2] = 0.2199999988079071; - HEAPF32[(18976)>>2] = 0.23999999463558197; - HEAPF32[(18980)>>2] = 0.0; - HEAPF32[(18984)>>2] = 0.99599999189376831; - HEAPF32[(18988)>>2] = -0.0040000001899898052; - HEAPF32[(18992)>>2] = 1.0140000581741333; - HEAPF32[(18996)>>2] = 0.0; - _TraceLog(0,8868,$vararg_buffer1); - break; - } else { - _TraceLog(2,8912,$vararg_buffer3); - _TraceLog(2,8969,$vararg_buffer5); - break; - } - } - } while(0); - $5 = HEAP32[4552]|0; - $6 = HEAP32[4553]|0; - _rlglLoadRenderTexture($1,$5,$6); - dest=18568; src=$1; stop=dest+44|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - $7 = (_LoadShaderProgram(6390,9007)|0); - HEAP32[(18612)>>2] = $7; - $8 = ($7|0)==(0); - if ($8) { - dest=$hmd$byval_copy; src=18936; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _SetStereoConfig($hmd$byval_copy); - HEAP32[4750] = 1; - STACKTOP = sp;return; - } - _LoadDefaultShaderLocations((18612)); - dest=$hmd$byval_copy; src=18936; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _SetStereoConfig($hmd$byval_copy); - HEAP32[4750] = 1; - STACKTOP = sp;return; -} -function _SetStereoConfig($0) { - $0 = $0|0; - var $$byval_copy34 = 0, $$byval_copy35 = 0, $1 = 0, $10 = 0, $100 = 0.0, $101 = 0.0, $102 = 0.0, $103 = 0.0, $104 = 0.0, $105 = 0.0, $106 = 0, $107 = 0.0, $108 = 0.0, $109 = 0.0, $11 = 0, $110 = 0.0, $12 = 0, $13 = 0.0, $14 = 0.0, $15 = 0; - var $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $27 = 0.0, $28 = 0, $29 = 0.0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0; - var $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0, $44 = 0.0, $45 = 0, $46 = 0.0, $47 = 0.0, $48 = 0.0, $49 = 0, $5 = 0, $50 = 0.0, $51 = 0.0; - var $52 = 0.0, $53 = 0.0, $54 = 0, $55 = 0.0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0.0, $61 = 0, $62 = 0.0, $63 = 0.0, $64 = 0, $65 = 0.0, $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0.0, $7 = 0; - var $70 = 0.0, $71 = 0.0, $72 = 0.0, $73 = 0.0, $74 = 0.0, $75 = 0.0, $76 = 0.0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0.0, $81 = 0.0, $82 = 0.0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0; - var $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0.0, $94 = 0.0, $95 = 0.0, $96 = 0, $97 = 0.0, $98 = 0.0, $99 = 0.0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer5 = 0, $vararg_ptr12 = 0, $vararg_ptr16 = 0, $vararg_ptr4 = 0, $vararg_ptr8 = 0, dest = 0; - var label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 640|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(640|0); - $$byval_copy35 = sp + 168|0; - $$byval_copy34 = sp + 104|0; - $vararg_buffer5 = sp + 40|0; - $vararg_buffer1 = sp + 24|0; - $vararg_buffer = sp + 16|0; - $1 = sp + 248|0; - $2 = sp + 240|0; - $3 = sp + 8|0; - $4 = sp; - $5 = sp + 232|0; - $6 = sp + 576|0; - $7 = sp + 512|0; - $8 = sp + 448|0; - $9 = sp + 384|0; - $10 = sp + 320|0; - $11 = sp + 256|0; - $12 = HEAP32[$0>>2]|0; - $13 = (+($12|0)); - $14 = $13 * 0.5; - $15 = ((($0)) + 4|0); - $16 = HEAP32[$15>>2]|0; - $17 = (+($16|0)); - $18 = $14 / $17; - $19 = ((($0)) + 8|0); - $20 = +HEAPF32[$19>>2]; - $21 = $20 * 0.25; - $22 = ((($0)) + 24|0); - $23 = +HEAPF32[$22>>2]; - $24 = $23 * 0.5; - $25 = $21 - $24; - $26 = $25 / $20; - $27 = $26 + 0.25; - HEAPF32[$1>>2] = $27; - $28 = ((($1)) + 4|0); - HEAPF32[$28>>2] = 0.5; - $29 = 0.75 - $26; - HEAPF32[$2>>2] = $29; - $30 = ((($2)) + 4|0); - HEAPF32[$30>>2] = 0.5; - $31 = $3; - $32 = $31; - HEAP32[$32>>2] = 1048576000; - $33 = (($31) + 4)|0; - $34 = $33; - HEAP32[$34>>2] = 1056964608; - $35 = $4; - $36 = $35; - HEAP32[$36>>2] = 1061158912; - $37 = (($35) + 4)|0; - $38 = $37; - HEAP32[$38>>2] = 1056964608; - $39 = $26 * 4.0; - $40 = -1.0 - $39; - $41 = (+Math_abs((+$40))); - $42 = $41 * $41; - $43 = ((($0)) + 32|0); - $44 = +HEAPF32[$43>>2]; - $45 = ((($0)) + 36|0); - $46 = +HEAPF32[$45>>2]; - $47 = $42 * $46; - $48 = $44 + $47; - $49 = ((($0)) + 40|0); - $50 = +HEAPF32[$49>>2]; - $51 = $42 * $50; - $52 = $42 * $51; - $53 = $48 + $52; - $54 = ((($0)) + 44|0); - $55 = +HEAPF32[$54>>2]; - $56 = $42 * $55; - $57 = $42 * $56; - $58 = $42 * $57; - $59 = $53 + $58; - $60 = $59; - HEAPF64[$vararg_buffer>>3] = $60; - _TraceLog(3,10598,$vararg_buffer); - HEAPF32[$vararg_buffer>>2] = 4.0; - $61 = ((($vararg_buffer)) + 4|0); - $62 = 2.0 / $18; - HEAPF32[$61>>2] = $62; - $63 = 0.25 / $59; - HEAPF32[$5>>2] = $63; - $64 = ((($5)) + 4|0); - $65 = $18 * 0.5; - $66 = $65 / $59; - HEAPF32[$64>>2] = $66; - $67 = +HEAPF32[$1>>2]; - $68 = $67; - $69 = +HEAPF32[$28>>2]; - $70 = $69; - HEAPF64[$vararg_buffer1>>3] = $68; - $vararg_ptr4 = ((($vararg_buffer1)) + 8|0); - HEAPF64[$vararg_ptr4>>3] = $70; - _TraceLog(3,10623,$vararg_buffer1); - $71 = +HEAPF32[$2>>2]; - $72 = $71; - $73 = +HEAPF32[$30>>2]; - $74 = $73; - HEAPF64[$vararg_buffer5>>3] = $72; - $vararg_ptr8 = ((($vararg_buffer5)) + 8|0); - HEAPF64[$vararg_ptr8>>3] = $74; - _TraceLog(3,10674,$vararg_buffer5); - $75 = +HEAPF32[$5>>2]; - $76 = $75; - $77 = +HEAPF32[$64>>2]; - $78 = $77; - HEAPF64[$$byval_copy34>>3] = $76; - $vararg_ptr12 = ((($$byval_copy34)) + 8|0); - HEAPF64[$vararg_ptr12>>3] = $78; - _TraceLog(3,10726,$$byval_copy34); - $79 = +HEAPF32[$vararg_buffer>>2]; - $80 = $79; - $81 = +HEAPF32[$61>>2]; - $82 = $81; - HEAPF64[$$byval_copy35>>3] = $80; - $vararg_ptr16 = ((($$byval_copy35)) + 8|0); - HEAPF64[$vararg_ptr16>>3] = $82; - _TraceLog(3,10768,$$byval_copy35); - dest=$$byval_copy35; src=(18612); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - $83 = (_GetShaderLocation($$byval_copy35,10812)|0); - dest=$$byval_copy35; src=(18612); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _SetShaderValue($$byval_copy35,$83,$1,2); - dest=$$byval_copy35; src=(18612); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - $84 = (_GetShaderLocation($$byval_copy35,10827)|0); - dest=$$byval_copy35; src=(18612); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _SetShaderValue($$byval_copy35,$84,$2,2); - dest=$$byval_copy35; src=(18612); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - $85 = (_GetShaderLocation($$byval_copy35,10843)|0); - dest=$$byval_copy35; src=(18612); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _SetShaderValue($$byval_copy35,$85,$3,2); - dest=$$byval_copy35; src=(18612); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - $86 = (_GetShaderLocation($$byval_copy35,10860)|0); - dest=$$byval_copy35; src=(18612); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _SetShaderValue($$byval_copy35,$86,$4,2); - dest=$$byval_copy35; src=(18612); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - $87 = (_GetShaderLocation($$byval_copy35,10878)|0); - dest=$$byval_copy35; src=(18612); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _SetShaderValue($$byval_copy35,$87,$5,2); - dest=$$byval_copy35; src=(18612); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - $88 = (_GetShaderLocation($$byval_copy35,10884)|0); - dest=$$byval_copy35; src=(18612); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _SetShaderValue($$byval_copy35,$88,$vararg_buffer,2); - dest=$$byval_copy35; src=(18612); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - $89 = (_GetShaderLocation($$byval_copy35,10892)|0); - dest=$$byval_copy35; src=(18612); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _SetShaderValue($$byval_copy35,$89,$43,4); - dest=$$byval_copy35; src=(18612); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - $90 = (_GetShaderLocation($$byval_copy35,10905)|0); - $91 = ((($0)) + 48|0); - dest=$$byval_copy35; src=(18612); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _SetShaderValue($$byval_copy35,$90,$91,4); - $92 = ((($0)) + 12|0); - $93 = +HEAPF32[$92>>2]; - $94 = $93 * 0.5; - $95 = $94; - $96 = ((($0)) + 20|0); - $97 = +HEAPF32[$96>>2]; - $98 = $97; - $99 = (+Math_atan2((+$95),(+$98))); - $100 = $99; - $101 = $100 * 2.0; - $102 = $101 * 57.2957763671875; - $103 = $102; - $104 = $18; - _MatrixPerspective($vararg_buffer5,$103,$104,0.01,1000.0); - _MatrixTranslate($6,$39,0.0,0.0); - dest=$$byval_copy34; src=$vararg_buffer5; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$$byval_copy35; src=$6; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixMultiply($7,$$byval_copy34,$$byval_copy35); - dest=(18668); src=$7; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - $105 = -$39; - _MatrixTranslate($8,$105,0.0,0.0); - dest=$$byval_copy34; src=$vararg_buffer5; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$$byval_copy35; src=$8; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixMultiply($9,$$byval_copy34,$$byval_copy35); - dest=(18732); src=$9; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixTranspose((18668)); - _MatrixTranspose((18732)); - $106 = ((($0)) + 28|0); - $107 = +HEAPF32[$106>>2]; - $108 = $107 * -0.5; - _MatrixTranslate($10,$108,0.075000002980232239,0.045000001788139343); - dest=(18796); src=$10; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - $109 = +HEAPF32[$106>>2]; - $110 = $109 * 0.5; - _MatrixTranslate($11,$110,0.075000002980232239,0.045000001788139343); - dest=(18860); src=$11; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; -} -function _CloseVrSimulator() { - var $$byval_copy1 = 0, $0 = 0, $1 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); - $$byval_copy1 = sp; - $0 = HEAP32[4750]|0; - $1 = ($0|0)==(0); - if ($1) { - STACKTOP = sp;return; - } - dest=$$byval_copy1; src=18568; stop=dest+44|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _rlDeleteRenderTextures($$byval_copy1); - dest=$$byval_copy1; src=(18612); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _UnloadShader($$byval_copy1); - STACKTOP = sp;return; -} -function _ToggleVrMode() { - var $0 = 0, $1 = 0, $10 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(128|0); - $0 = sp + 64|0; - $1 = sp; - $2 = HEAP32[4750]|0; - $3 = ($2|0)==(0); - $4 = $3&1; - HEAP32[4750] = $4; - if ($3) { - HEAP32[4641] = 1; - STACKTOP = sp;return; - } else { - HEAP32[4641] = 0; - $5 = HEAP32[4552]|0; - $6 = HEAP32[4553]|0; - _rlViewport(0,0,$5,$6); - $7 = HEAP32[4552]|0; - $8 = (+($7|0)); - $9 = HEAP32[4553]|0; - $10 = (+($9|0)); - _MatrixOrtho($0,0.0,$8,$10,0.0,0.0,1.0); - dest=16892; src=$0; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixTranspose(16892); - _MatrixIdentity($1); - dest=16956; src=$1; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; - } -} -function _BeginVrDrawing() { - var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[4750]|0; - $1 = ($0|0)==(0); - if ($1) { - return; - } - $2 = HEAP32[4642]|0; - _rlEnableRenderTexture($2); - _rlClearScreenBuffers(); - HEAP32[4641] = 1; - return; -} -function _EndVrDrawing() { - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0.0, $23 = 0, $24 = 0.0, $3 = 0, $4 = 0; - var $5 = 0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(128|0); - $0 = sp + 64|0; - $1 = sp; - $2 = HEAP32[4750]|0; - $3 = ($2|0)==(0); - if ($3) { - STACKTOP = sp;return; - } - HEAP32[4641] = 0; - _rlDisableRenderTexture(); - _rlClearScreenBuffers(); - $4 = HEAP32[4552]|0; - $5 = HEAP32[4553]|0; - _rlViewport(0,0,$4,$5); - _rlMatrixMode(5889); - _rlLoadIdentity(); - $6 = HEAP32[4552]|0; - $7 = (+($6|0)); - $8 = HEAP32[4553]|0; - $9 = (+($8|0)); - _rlOrtho(0.0,$7,$9,0.0,0.0,1.0); - _rlMatrixMode(5888); - _rlLoadIdentity(); - dest=17112; src=(18612); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - $10 = HEAP32[(18572)>>2]|0; - _rlEnableTexture($10); - _rlPushMatrix(); - _rlBegin(7); - _rlColor4ub(-1,-1,-1,-1); - _rlTexCoord2f(0.0,1.0); - _rlVertex2f(0.0,0.0); - _rlTexCoord2f(0.0,0.0); - $11 = HEAP32[(18580)>>2]|0; - $12 = (+($11|0)); - _rlVertex2f(0.0,$12); - _rlTexCoord2f(1.0,0.0); - $13 = HEAP32[(18576)>>2]|0; - $14 = (+($13|0)); - $15 = HEAP32[(18580)>>2]|0; - $16 = (+($15|0)); - _rlVertex2f($14,$16); - _rlTexCoord2f(1.0,1.0); - $17 = HEAP32[(18576)>>2]|0; - $18 = (+($17|0)); - _rlVertex2f($18,0.0); - _rlEnd(); - _rlPopMatrix(); - _rlDisableTexture(); - _UpdateDefaultBuffers(); - _DrawDefaultBuffers(); - dest=17112; src=17056; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - $19 = HEAP32[4552]|0; - $20 = HEAP32[4553]|0; - _rlViewport(0,0,$19,$20); - $21 = HEAP32[4552]|0; - $22 = (+($21|0)); - $23 = HEAP32[4553]|0; - $24 = (+($23|0)); - _MatrixOrtho($0,0.0,$22,$24,0.0,0.0,1.0); - dest=16892; src=$0; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixTranspose(16892); - _MatrixIdentity($1); - dest=16956; src=$1; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _rlDisableDepthTest(); - STACKTOP = sp;return; -} function _GetDefaultFont($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; - ;HEAP32[$0>>2]=HEAP32[16740>>2]|0;HEAP32[$0+4>>2]=HEAP32[16740+4>>2]|0;HEAP32[$0+8>>2]=HEAP32[16740+8>>2]|0;HEAP32[$0+12>>2]=HEAP32[16740+12>>2]|0;HEAP32[$0+16>>2]=HEAP32[16740+16>>2]|0;HEAP32[$0+20>>2]=HEAP32[16740+20>>2]|0;HEAP32[$0+24>>2]=HEAP32[16740+24>>2]|0;HEAP32[$0+28>>2]=HEAP32[16740+28>>2]|0; + ;HEAP32[$0>>2]=HEAP32[16716>>2]|0;HEAP32[$0+4>>2]=HEAP32[16716+4>>2]|0;HEAP32[$0+8>>2]=HEAP32[16716+8>>2]|0;HEAP32[$0+12>>2]=HEAP32[16716+12>>2]|0;HEAP32[$0+16>>2]=HEAP32[16716+16>>2]|0;HEAP32[$0+20>>2]=HEAP32[16716+20>>2]|0;HEAP32[$0+24>>2]=HEAP32[16716+24>>2]|0;HEAP32[$0+28>>2]=HEAP32[16716+28>>2]|0; return; } +function _DrawText($0,$1,$2,$3,$4) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + $4 = $4|0; + var $$ = 0, $$byval_copy = 0, $$byval_copy1 = 0, $$byval_copy2 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0.0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(128|0); + $$byval_copy2 = sp + 112|0; + $$byval_copy1 = sp + 104|0; + $$byval_copy = sp + 72|0; + $5 = sp + 32|0; + $6 = sp + 64|0; + $7 = sp; + _GetDefaultFont($5); + $8 = HEAP32[$5>>2]|0; + $9 = ($8|0)==(0); + if ($9) { + STACKTOP = sp;return; + } + $10 = (+($1|0)); + HEAPF32[$6>>2] = $10; + $11 = ((($6)) + 4|0); + $12 = (+($2|0)); + HEAPF32[$11>>2] = $12; + $13 = ($3|0)>(10); + $$ = $13 ? $3 : 10; + $14 = (($$>>>0) / 10)&-1; + _GetDefaultFont($7); + $15 = (+($$|0)); + ;HEAP32[$$byval_copy>>2]=HEAP32[$7>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$7+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$7+8>>2]|0;HEAP32[$$byval_copy+12>>2]=HEAP32[$7+12>>2]|0;HEAP32[$$byval_copy+16>>2]=HEAP32[$7+16>>2]|0;HEAP32[$$byval_copy+20>>2]=HEAP32[$7+20>>2]|0;HEAP32[$$byval_copy+24>>2]=HEAP32[$7+24>>2]|0;HEAP32[$$byval_copy+28>>2]=HEAP32[$7+28>>2]|0; + ;HEAP32[$$byval_copy1>>2]=HEAP32[$6>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$6+4>>2]|0; + ;HEAP8[$$byval_copy2>>0]=HEAP8[$4>>0]|0;HEAP8[$$byval_copy2+1>>0]=HEAP8[$4+1>>0]|0;HEAP8[$$byval_copy2+2>>0]=HEAP8[$4+2>>0]|0;HEAP8[$$byval_copy2+3>>0]=HEAP8[$4+3>>0]|0; + _DrawTextEx($$byval_copy,$0,$$byval_copy1,$15,$14,$$byval_copy2); + STACKTOP = sp;return; +} +function _DrawTextEx($0,$1,$2,$3,$4,$5) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = +$3; + $4 = $4|0; + $5 = $5|0; + var $$04954 = 0, $$05153 = 0, $$055 = 0, $$1 = 0, $$150 = 0, $$152 = 0, $$2 = 0, $$byval_copy1 = 0, $$byval_copy2 = 0, $$byval_copy3 = 0, $$byval_copy4 = 0, $$byval_copy5 = 0, $$sink = 0, $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0; + var $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0.0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0.0, $29 = 0.0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0; + var $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0.0, $45 = 0.0, $46 = 0, $47 = 0, $48 = 0.0, $49 = 0.0, $50 = 0.0, $51 = 0, $52 = 0.0, $53 = 0.0, $54 = 0.0, $55 = 0, $56 = 0; + var $57 = 0.0, $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0.0, $64 = 0.0, $65 = 0, $66 = 0, $67 = 0, $68 = 0.0, $69 = 0.0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0; + var $75 = 0, $76 = 0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0, $81 = 0, $82 = 0.0, $83 = 0.0, $84 = 0.0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(128|0); + $$byval_copy5 = sp + 88|0; + $$byval_copy4 = sp + 80|0; + $$byval_copy3 = sp + 64|0; + $$byval_copy2 = sp + 48|0; + $$byval_copy1 = sp + 24|0; + $6 = sp + 8|0; + $7 = sp; + $8 = (_strlen($1)|0); + $9 = ((($0)) + 20|0); + $10 = HEAP32[$9>>2]|0; + $11 = (+($10|0)); + $12 = $3 / $11; + $13 = ($8|0)>(0); + if (!($13)) { + STACKTOP = sp;return; + } + $14 = ((($0)) + 28|0); + $15 = +HEAPF32[$2>>2]; + $16 = ((($6)) + 4|0); + $17 = ((($2)) + 4|0); + $18 = ((($6)) + 8|0); + $19 = ((($6)) + 12|0); + $20 = ((($7)) + 4|0); + $21 = (+($4|0)); + $$04954 = 0;$$05153 = 0;$$055 = 0; + while(1) { + $22 = (($1) + ($$055)|0); + $23 = HEAP8[$22>>0]|0; + $24 = $23&255; + switch ($23<<24>>24) { + case 10: { + $25 = HEAP32[$9>>2]|0; + $26 = (($25|0) / 2)&-1; + $27 = (($26) + ($25))|0; + $28 = (+($27|0)); + $29 = $12 * $28; + $30 = (~~(($29))); + $31 = (($30) + ($$05153))|0; + $$150 = 0;$$152 = $31;$$2 = $$055; + break; + } + case -62: { + $32 = (($$055) + 1)|0; + $33 = (($1) + ($32)|0); + $34 = HEAP8[$33>>0]|0; + $35 = $34&255; + $$1 = $32;$$sink = $35; + label = 8; + break; + } + case -61: { + $36 = (($$055) + 1)|0; + $37 = (($1) + ($36)|0); + $38 = HEAP8[$37>>0]|0; + $39 = $38&255; + $40 = (($39) + 64)|0; + $$1 = $36;$$sink = $40; + label = 8; + break; + } + default: { + $$1 = $$055;$$sink = $24; + label = 8; + } + } + do { + if ((label|0) == 8) { + label = 0; + ;HEAP32[$$byval_copy5>>2]=HEAP32[$0>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$$byval_copy5+8>>2]=HEAP32[$0+8>>2]|0;HEAP32[$$byval_copy5+12>>2]=HEAP32[$0+12>>2]|0;HEAP32[$$byval_copy5+16>>2]=HEAP32[$0+16>>2]|0;HEAP32[$$byval_copy5+20>>2]=HEAP32[$0+20>>2]|0;HEAP32[$$byval_copy5+24>>2]=HEAP32[$0+24>>2]|0;HEAP32[$$byval_copy5+28>>2]=HEAP32[$0+28>>2]|0; + $41 = (_GetCharIndex($$byval_copy5,$$sink)|0); + $42 = HEAP32[$14>>2]|0; + $43 = (((($42) + ($41<<5)|0)) + 4|0); + $44 = (+($$04954|0)); + $45 = $44 + $15; + $46 = (((($42) + ($41<<5)|0)) + 20|0); + $47 = HEAP32[$46>>2]|0; + $48 = (+($47|0)); + $49 = $12 * $48; + $50 = $45 + $49; + $51 = (~~(($50))); + HEAP32[$6>>2] = $51; + $52 = +HEAPF32[$17>>2]; + $53 = (+($$05153|0)); + $54 = $53 + $52; + $55 = (((($42) + ($41<<5)|0)) + 24|0); + $56 = HEAP32[$55>>2]|0; + $57 = (+($56|0)); + $58 = $12 * $57; + $59 = $54 + $58; + $60 = (~~(($59))); + HEAP32[$16>>2] = $60; + $61 = (((($42) + ($41<<5)|0)) + 12|0); + $62 = HEAP32[$61>>2]|0; + $63 = (+($62|0)); + $64 = $12 * $63; + $65 = (~~(($64))); + HEAP32[$18>>2] = $65; + $66 = (((($42) + ($41<<5)|0)) + 16|0); + $67 = HEAP32[$66>>2]|0; + $68 = (+($67|0)); + $69 = $12 * $68; + $70 = (~~(($69))); + HEAP32[$19>>2] = $70; + HEAPF32[$7>>2] = 0.0; + HEAPF32[$20>>2] = 0.0; + ;HEAP32[$$byval_copy1>>2]=HEAP32[$0>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$0+8>>2]|0;HEAP32[$$byval_copy1+12>>2]=HEAP32[$0+12>>2]|0;HEAP32[$$byval_copy1+16>>2]=HEAP32[$0+16>>2]|0; + ;HEAP32[$$byval_copy2>>2]=HEAP32[$43>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$43+4>>2]|0;HEAP32[$$byval_copy2+8>>2]=HEAP32[$43+8>>2]|0;HEAP32[$$byval_copy2+12>>2]=HEAP32[$43+12>>2]|0; + ;HEAP32[$$byval_copy3>>2]=HEAP32[$6>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$6+4>>2]|0;HEAP32[$$byval_copy3+8>>2]=HEAP32[$6+8>>2]|0;HEAP32[$$byval_copy3+12>>2]=HEAP32[$6+12>>2]|0; + ;HEAP32[$$byval_copy4>>2]=HEAP32[$7>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$7+4>>2]|0; + ;HEAP8[$$byval_copy5>>0]=HEAP8[$5>>0]|0;HEAP8[$$byval_copy5+1>>0]=HEAP8[$5+1>>0]|0;HEAP8[$$byval_copy5+2>>0]=HEAP8[$5+2>>0]|0;HEAP8[$$byval_copy5+3>>0]=HEAP8[$5+3>>0]|0; + _DrawTexturePro($$byval_copy1,$$byval_copy2,$$byval_copy3,$$byval_copy4,0.0,$$byval_copy5); + $71 = HEAP32[$14>>2]|0; + $72 = (((($71) + ($41<<5)|0)) + 28|0); + $73 = HEAP32[$72>>2]|0; + $74 = ($73|0)==(0); + if ($74) { + $75 = (((($71) + ($41<<5)|0)) + 12|0); + $76 = HEAP32[$75>>2]|0; + $77 = (+($76|0)); + $78 = $12 * $77; + $79 = $21 + $78; + $80 = (~~(($79))); + $81 = (($80) + ($$04954))|0; + $$150 = $81;$$152 = $$05153;$$2 = $$1; + break; + } else { + $82 = (+($73|0)); + $83 = $12 * $82; + $84 = $21 + $83; + $85 = (~~(($84))); + $86 = (($85) + ($$04954))|0; + $$150 = $86;$$152 = $$05153;$$2 = $$1; + break; + } + } + } while(0); + $87 = (($$2) + 1)|0; + $88 = ($87|0)<($8|0); + if ($88) { + $$04954 = $$150;$$05153 = $$152;$$055 = $87; + } else { + break; + } + } + STACKTOP = sp;return; +} function _GetCharIndex($0,$1) { $0 = $0|0; $1 = $1|0; @@ -15110,201 +9069,1686 @@ function _DrawTexturePro($0,$1,$2,$3,$4,$5) { _rlDisableTexture(); return; } -function _DrawText($0,$1,$2,$3,$4) { +function _rlEnableTexture($0) { + $0 = $0|0; + var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = HEAP32[4243]|0; + $2 = HEAP32[4241]|0; + $3 = (($2) + -1)|0; + $4 = (((($1) + (($3*144)|0)|0)) + 8|0); + $5 = HEAP32[$4>>2]|0; + $6 = ($5|0)==($0|0); + if ($6) { + return; + } + $7 = (($1) + (($3*144)|0)|0); + $8 = HEAP32[$7>>2]|0; + $9 = ($8|0)>(0); + if ($9) { + $10 = (($2) + 1)|0; + HEAP32[4241] = $10; + } + $11 = HEAP32[4241]|0; + $12 = (($11) + -1)|0; + $13 = (((($1) + (($12*144)|0)|0)) + 8|0); + HEAP32[$13>>2] = $0; + $14 = (($1) + (($12*144)|0)|0); + HEAP32[$14>>2] = 0; + return; +} +function _rlPushMatrix() { + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $vararg_buffer = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $vararg_buffer = sp; + $0 = HEAP32[4391]|0; + $1 = ($0|0)==(15); + if ($1) { + HEAP32[$vararg_buffer>>2] = 16; + _TraceLog(2,4232,$vararg_buffer); + } + $2 = HEAP32[4391]|0; + $3 = (17568 + ($2<<6)|0); + $4 = HEAP32[4648]|0; + dest=$3; src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _rlLoadIdentity(); + $5 = HEAP32[4391]|0; + $6 = (($5) + 1)|0; + HEAP32[4391] = $6; + $7 = HEAP32[4653]|0; + $8 = ($7|0)==(5888); + if (!($8)) { + STACKTOP = sp;return; + } + HEAP32[4649] = 1; + STACKTOP = sp;return; +} +function _rlTranslatef($0,$1,$2) { + $0 = +$0; + $1 = +$1; + $2 = +$2; + var $$byval_copy = 0, $$byval_copy1 = 0, $3 = 0, $4 = 0, $5 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 256|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(256|0); + $$byval_copy1 = sp + 192|0; + $$byval_copy = sp + 128|0; + $3 = sp + 64|0; + $4 = sp; + _MatrixTranslate($3,$0,$1,$2); + _MatrixTranspose($3); + $5 = HEAP32[4648]|0; + dest=$$byval_copy; src=$5; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$$byval_copy1; src=$3; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixMultiply($4,$$byval_copy,$$byval_copy1); + dest=$5; src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + STACKTOP = sp;return; +} +function _rlRotatef($0,$1,$2,$3) { + $0 = +$0; + $1 = +$1; + $2 = +$2; + $3 = +$3; + var $$byval_copy1 = 0, $$byval_copy2 = 0, $10 = 0.0, $11 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 336|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(336|0); + $$byval_copy2 = sp + 272|0; + $$byval_copy1 = sp + 208|0; + $4 = sp + 144|0; + $5 = sp + 64|0; + $6 = sp + 80|0; + $7 = sp; + _MatrixIdentity($4); + HEAPF32[$5>>2] = $1; + $8 = ((($5)) + 4|0); + HEAPF32[$8>>2] = $2; + $9 = ((($5)) + 8|0); + HEAPF32[$9>>2] = $3; + _VectorNormalize($5); + $10 = $0 * 0.01745329238474369; + ;HEAP32[$$byval_copy2>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$5+4>>2]|0;HEAP32[$$byval_copy2+8>>2]=HEAP32[$5+8>>2]|0; + _MatrixRotate($6,$$byval_copy2,$10); + dest=$4; src=$6; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixTranspose($4); + $11 = HEAP32[4648]|0; + dest=$$byval_copy1; src=$11; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$$byval_copy2; src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixMultiply($7,$$byval_copy1,$$byval_copy2); + dest=$11; src=$7; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + STACKTOP = sp;return; +} +function _rlBegin($0) { + $0 = $0|0; + var label = 0, sp = 0; + sp = STACKTOP; + HEAP32[4652] = $0; + return; +} +function _rlColor4ub($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; $2 = $2|0; $3 = $3|0; - $4 = $4|0; - var $$ = 0, $$byval_copy = 0, $$byval_copy1 = 0, $$byval_copy2 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0.0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + var $$sink37 = 0, $$sink38 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $4 = 0, $5 = 0; + var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; sp = STACKTOP; - STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(128|0); - $$byval_copy2 = sp + 112|0; - $$byval_copy1 = sp + 104|0; - $$byval_copy = sp + 72|0; - $5 = sp + 32|0; - $6 = sp + 64|0; - $7 = sp; - _GetDefaultFont($5); - $8 = HEAP32[$5>>2]|0; - $9 = ($8|0)==(0); - if ($9) { - STACKTOP = sp;return; + $4 = HEAP32[4652]|0; + switch ($4|0) { + case 1: { + $$sink37 = (16984);$$sink38 = (16996); + break; } - $10 = (+($1|0)); - HEAPF32[$6>>2] = $10; - $11 = ((($6)) + 4|0); - $12 = (+($2|0)); - HEAPF32[$11>>2] = $12; - $13 = ($3|0)>(10); - $$ = $13 ? $3 : 10; - $14 = (($$>>>0) / 10)&-1; - _GetDefaultFont($7); - $15 = (+($$|0)); - ;HEAP32[$$byval_copy>>2]=HEAP32[$7>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$7+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$7+8>>2]|0;HEAP32[$$byval_copy+12>>2]=HEAP32[$7+12>>2]|0;HEAP32[$$byval_copy+16>>2]=HEAP32[$7+16>>2]|0;HEAP32[$$byval_copy+20>>2]=HEAP32[$7+20>>2]|0;HEAP32[$$byval_copy+24>>2]=HEAP32[$7+24>>2]|0;HEAP32[$$byval_copy+28>>2]=HEAP32[$7+28>>2]|0; - ;HEAP32[$$byval_copy1>>2]=HEAP32[$6>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$6+4>>2]|0; - ;HEAP8[$$byval_copy2>>0]=HEAP8[$4>>0]|0;HEAP8[$$byval_copy2+1>>0]=HEAP8[$4+1>>0]|0;HEAP8[$$byval_copy2+2>>0]=HEAP8[$4+2>>0]|0;HEAP8[$$byval_copy2+3>>0]=HEAP8[$4+3>>0]|0; - _DrawTextEx($$byval_copy,$0,$$byval_copy1,$15,$14,$$byval_copy2); - STACKTOP = sp;return; + case 4: { + $$sink37 = (17032);$$sink38 = (17044); + break; + } + case 7: { + $$sink37 = (16792);$$sink38 = (16804); + break; + } + default: { + return; + } + } + $5 = HEAP32[$$sink38>>2]|0; + $6 = HEAP32[$$sink37>>2]|0; + $7 = $6 << 2; + $8 = (($5) + ($7)|0); + HEAP8[$8>>0] = $0; + $9 = HEAP32[$$sink38>>2]|0; + $10 = HEAP32[$$sink37>>2]|0; + $11 = $10 << 2; + $12 = $11 | 1; + $13 = (($9) + ($12)|0); + HEAP8[$13>>0] = $1; + $14 = HEAP32[$$sink38>>2]|0; + $15 = HEAP32[$$sink37>>2]|0; + $16 = $15 << 2; + $17 = $16 | 2; + $18 = (($14) + ($17)|0); + HEAP8[$18>>0] = $2; + $19 = HEAP32[$$sink38>>2]|0; + $20 = HEAP32[$$sink37>>2]|0; + $21 = $20 << 2; + $22 = $21 | 3; + $23 = (($19) + ($22)|0); + HEAP8[$23>>0] = $3; + $24 = HEAP32[$$sink37>>2]|0; + $25 = (($24) + 1)|0; + HEAP32[$$sink37>>2] = $25; + return; } -function _DrawTextEx($0,$1,$2,$3,$4,$5) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - $3 = +$3; - $4 = $4|0; - $5 = $5|0; - var $$04954 = 0, $$05153 = 0, $$055 = 0, $$1 = 0, $$150 = 0, $$152 = 0, $$2 = 0, $$byval_copy1 = 0, $$byval_copy2 = 0, $$byval_copy3 = 0, $$byval_copy4 = 0, $$byval_copy5 = 0, $$sink = 0, $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0; - var $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0.0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0.0, $28 = 0.0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0; - var $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0.0, $45 = 0.0, $46 = 0, $47 = 0, $48 = 0.0, $49 = 0.0, $50 = 0.0, $51 = 0, $52 = 0.0, $53 = 0.0, $54 = 0.0, $55 = 0, $56 = 0; - var $57 = 0.0, $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0.0, $64 = 0.0, $65 = 0, $66 = 0, $67 = 0, $68 = 0.0, $69 = 0.0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0; - var $75 = 0, $76 = 0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0, $81 = 0, $82 = 0.0, $83 = 0.0, $84 = 0.0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $9 = 0, label = 0, sp = 0; +function _rlNormal3f($0,$1,$2) { + $0 = +$0; + $1 = +$1; + $2 = +$2; + var label = 0, sp = 0; sp = STACKTOP; - STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(128|0); - $$byval_copy5 = sp + 88|0; - $$byval_copy4 = sp + 80|0; - $$byval_copy3 = sp + 64|0; - $$byval_copy2 = sp + 48|0; - $$byval_copy1 = sp + 24|0; - $6 = sp + 8|0; - $7 = sp; - $8 = (_strlen($1)|0); - $9 = ((($0)) + 20|0); - $10 = HEAP32[$9>>2]|0; - $11 = (+($10|0)); - $12 = $3 / $11; - $13 = ($8|0)>(0); - if (!($13)) { - STACKTOP = sp;return; + return; +} +function _rlTexCoord2f($0,$1) { + $0 = +$0; + $1 = +$1; + var $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $2 = HEAP32[4652]|0; + $3 = ($2|0)==(7); + if (!($3)) { + return; } - $14 = ((($0)) + 28|0); - $15 = +HEAPF32[$2>>2]; - $16 = ((($6)) + 4|0); - $17 = ((($2)) + 4|0); - $18 = ((($6)) + 8|0); - $19 = ((($6)) + 12|0); - $20 = ((($7)) + 4|0); - $21 = (+($4|0)); - $$04954 = 0;$$05153 = 0;$$055 = 0; - while(1) { - $22 = (($1) + ($$055)|0); - $23 = HEAP8[$22>>0]|0; - switch ($23<<24>>24) { - case 10: { - $24 = HEAP32[$9>>2]|0; - $25 = (($24|0) / 2)&-1; - $26 = (($25) + ($24))|0; - $27 = (+($26|0)); - $28 = $12 * $27; - $29 = (~~(($28))); - $30 = (($29) + ($$05153))|0; - $$150 = 0;$$152 = $30;$$2 = $$055; - break; - } - case -62: { - $31 = (($$055) + 1)|0; - $32 = (($1) + ($31)|0); - $33 = HEAP8[$32>>0]|0; - $34 = $33&255; - $$1 = $31;$$sink = $34; - label = 9; - break; - } - case -61: { - $35 = (($$055) + 1)|0; - $36 = (($1) + ($35)|0); - $37 = HEAP8[$36>>0]|0; - $38 = $37&255; - $39 = (($38) + 64)|0; - $$1 = $35;$$sink = $39; - label = 9; - break; - } - default: { - $40 = $23 << 24 >> 24; - $$1 = $$055;$$sink = $40; - label = 9; - } - } - do { - if ((label|0) == 9) { - label = 0; - ;HEAP32[$$byval_copy5>>2]=HEAP32[$0>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$$byval_copy5+8>>2]=HEAP32[$0+8>>2]|0;HEAP32[$$byval_copy5+12>>2]=HEAP32[$0+12>>2]|0;HEAP32[$$byval_copy5+16>>2]=HEAP32[$0+16>>2]|0;HEAP32[$$byval_copy5+20>>2]=HEAP32[$0+20>>2]|0;HEAP32[$$byval_copy5+24>>2]=HEAP32[$0+24>>2]|0;HEAP32[$$byval_copy5+28>>2]=HEAP32[$0+28>>2]|0; - $41 = (_GetCharIndex($$byval_copy5,$$sink)|0); - $42 = HEAP32[$14>>2]|0; - $43 = (((($42) + ($41<<5)|0)) + 4|0); - $44 = (+($$04954|0)); - $45 = $44 + $15; - $46 = (((($42) + ($41<<5)|0)) + 20|0); - $47 = HEAP32[$46>>2]|0; - $48 = (+($47|0)); - $49 = $12 * $48; - $50 = $45 + $49; - $51 = (~~(($50))); - HEAP32[$6>>2] = $51; - $52 = +HEAPF32[$17>>2]; - $53 = (+($$05153|0)); - $54 = $53 + $52; - $55 = (((($42) + ($41<<5)|0)) + 24|0); - $56 = HEAP32[$55>>2]|0; - $57 = (+($56|0)); - $58 = $12 * $57; - $59 = $54 + $58; - $60 = (~~(($59))); - HEAP32[$16>>2] = $60; - $61 = (((($42) + ($41<<5)|0)) + 12|0); - $62 = HEAP32[$61>>2]|0; - $63 = (+($62|0)); - $64 = $12 * $63; - $65 = (~~(($64))); - HEAP32[$18>>2] = $65; - $66 = (((($42) + ($41<<5)|0)) + 16|0); - $67 = HEAP32[$66>>2]|0; - $68 = (+($67|0)); - $69 = $12 * $68; - $70 = (~~(($69))); - HEAP32[$19>>2] = $70; - HEAPF32[$7>>2] = 0.0; - HEAPF32[$20>>2] = 0.0; - ;HEAP32[$$byval_copy1>>2]=HEAP32[$0>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$0+8>>2]|0;HEAP32[$$byval_copy1+12>>2]=HEAP32[$0+12>>2]|0;HEAP32[$$byval_copy1+16>>2]=HEAP32[$0+16>>2]|0; - ;HEAP32[$$byval_copy2>>2]=HEAP32[$43>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$43+4>>2]|0;HEAP32[$$byval_copy2+8>>2]=HEAP32[$43+8>>2]|0;HEAP32[$$byval_copy2+12>>2]=HEAP32[$43+12>>2]|0; - ;HEAP32[$$byval_copy3>>2]=HEAP32[$6>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$6+4>>2]|0;HEAP32[$$byval_copy3+8>>2]=HEAP32[$6+8>>2]|0;HEAP32[$$byval_copy3+12>>2]=HEAP32[$6+12>>2]|0; - ;HEAP32[$$byval_copy4>>2]=HEAP32[$7>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$7+4>>2]|0; - ;HEAP8[$$byval_copy5>>0]=HEAP8[$5>>0]|0;HEAP8[$$byval_copy5+1>>0]=HEAP8[$5+1>>0]|0;HEAP8[$$byval_copy5+2>>0]=HEAP8[$5+2>>0]|0;HEAP8[$$byval_copy5+3>>0]=HEAP8[$5+3>>0]|0; - _DrawTexturePro($$byval_copy1,$$byval_copy2,$$byval_copy3,$$byval_copy4,0.0,$$byval_copy5); - $71 = HEAP32[$14>>2]|0; - $72 = (((($71) + ($41<<5)|0)) + 28|0); - $73 = HEAP32[$72>>2]|0; - $74 = ($73|0)==(0); - if ($74) { - $75 = (((($71) + ($41<<5)|0)) + 12|0); - $76 = HEAP32[$75>>2]|0; - $77 = (+($76|0)); - $78 = $12 * $77; - $79 = $21 + $78; - $80 = (~~(($79))); - $81 = (($80) + ($$04954))|0; - $$150 = $81;$$152 = $$05153;$$2 = $$1; - break; + $4 = HEAP32[(16800)>>2]|0; + $5 = HEAP32[(16788)>>2]|0; + $6 = $5 << 1; + $7 = (($4) + ($6<<2)|0); + HEAPF32[$7>>2] = $0; + $8 = $6 | 1; + $9 = (($4) + ($8<<2)|0); + HEAPF32[$9>>2] = $1; + $10 = (($5) + 1)|0; + HEAP32[(16788)>>2] = $10; + return; +} +function _rlVertex2f($0,$1) { + $0 = +$0; + $1 = +$1; + var $2 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + $2 = +HEAPF32[740]; + _rlVertex3f($0,$1,$2); + return; +} +function _rlEnd() { + var $$03956 = 0, $$04052 = 0, $$04154 = 0, $$04248 = 0, $$04347 = 0, $$byval_copy = 0, $$promoted = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0; + var $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0; + var $128 = 0, $129 = 0, $13 = 0.0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0; + var $146 = 0, $147 = 0, $148 = 0.0, $149 = 0.0, $15 = 0.0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0; + var $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0; + var $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0; + var $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0; + var $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $exitcond = 0, $exitcond60 = 0, $exitcond63 = 0; + var $scevgep = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $$byval_copy = sp; + $0 = HEAP32[4649]|0; + $1 = ($0|0)==(0); + if (!($1)) { + $2 = HEAP32[4650]|0; + $3 = ($2|0)>(0); + if ($3) { + $$03956 = 0; + while(1) { + $6 = HEAP32[4651]|0; + $7 = (($6) + (($$03956*12)|0)|0); + $8 = HEAP32[4648]|0; + dest=$$byval_copy; src=$8; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _VectorTransform($7,$$byval_copy); + $9 = (($$03956) + 1)|0; + $5 = HEAP32[4650]|0; + $10 = ($9|0)<($5|0); + if ($10) { + $$03956 = $9; } else { - $82 = (+($73|0)); - $83 = $12 * $82; - $84 = $21 + $83; - $85 = (~~(($84))); - $86 = (($85) + ($$04954))|0; - $$150 = $86;$$152 = $$05153;$$2 = $$1; break; } } - } while(0); - $87 = (($$2) + 1)|0; - $88 = ($87|0)<($8|0); - if ($88) { - $$04954 = $$150;$$05153 = $$152;$$055 = $87; + HEAP32[4649] = 0; + $4 = ($5|0)>(0); + if ($4) { + $$04154 = 0; + while(1) { + $11 = HEAP32[4651]|0; + $12 = (($11) + (($$04154*12)|0)|0); + $13 = +HEAPF32[$12>>2]; + $14 = (((($11) + (($$04154*12)|0)|0)) + 4|0); + $15 = +HEAPF32[$14>>2]; + $16 = (((($11) + (($$04154*12)|0)|0)) + 8|0); + $17 = +HEAPF32[$16>>2]; + _rlVertex3f($13,$15,$17); + $18 = (($$04154) + 1)|0; + $19 = HEAP32[4650]|0; + $20 = ($18|0)<($19|0); + if ($20) { + $$04154 = $18; + } else { + break; + } + } + } + } else { + HEAP32[4649] = 0; + } + HEAP32[4650] = 0; + } + $21 = HEAP32[4652]|0; + switch ($21|0) { + case 1: { + $22 = HEAP32[4244]|0; + $23 = HEAP32[(16984)>>2]|0; + $24 = ($22|0)==($23|0); + if ($24) { + $148 = +HEAPF32[740]; + $149 = $148 + 4.9999998736893758E-5; + HEAPF32[740] = $149; + STACKTOP = sp;return; + } + $25 = (($22) - ($23))|0; + $26 = ($25|0)>(0); + if ($26) { + $$04347 = 0; + } else { + $148 = +HEAPF32[740]; + $149 = $148 + 4.9999998736893758E-5; + HEAPF32[740] = $149; + STACKTOP = sp;return; + } + while(1) { + $27 = HEAP32[(16996)>>2]|0; + $28 = HEAP32[(16984)>>2]|0; + $29 = $28 << 2; + $30 = (($29) + -4)|0; + $31 = (($27) + ($30)|0); + $32 = HEAP8[$31>>0]|0; + $33 = (($27) + ($29)|0); + HEAP8[$33>>0] = $32; + $34 = HEAP32[(16996)>>2]|0; + $35 = HEAP32[(16984)>>2]|0; + $36 = $35 << 2; + $37 = (($36) + -3)|0; + $38 = (($34) + ($37)|0); + $39 = HEAP8[$38>>0]|0; + $40 = $36 | 1; + $41 = (($34) + ($40)|0); + HEAP8[$41>>0] = $39; + $42 = HEAP32[(16996)>>2]|0; + $43 = HEAP32[(16984)>>2]|0; + $44 = $43 << 2; + $45 = (($44) + -2)|0; + $46 = (($42) + ($45)|0); + $47 = HEAP8[$46>>0]|0; + $48 = $44 | 2; + $49 = (($42) + ($48)|0); + HEAP8[$49>>0] = $47; + $50 = HEAP32[(16996)>>2]|0; + $51 = HEAP32[(16984)>>2]|0; + $52 = $51 << 2; + $53 = (($52) + -1)|0; + $54 = (($50) + ($53)|0); + $55 = HEAP8[$54>>0]|0; + $56 = $52 | 3; + $57 = (($50) + ($56)|0); + HEAP8[$57>>0] = $55; + $58 = HEAP32[(16984)>>2]|0; + $59 = (($58) + 1)|0; + HEAP32[(16984)>>2] = $59; + $60 = (($$04347) + 1)|0; + $exitcond = ($60|0)==($25|0); + if ($exitcond) { + break; + } else { + $$04347 = $60; + } + } + $148 = +HEAPF32[740]; + $149 = $148 + 4.9999998736893758E-5; + HEAPF32[740] = $149; + STACKTOP = sp;return; + break; + } + case 4: { + $61 = HEAP32[4256]|0; + $62 = HEAP32[(17032)>>2]|0; + $63 = ($61|0)==($62|0); + if ($63) { + $148 = +HEAPF32[740]; + $149 = $148 + 4.9999998736893758E-5; + HEAPF32[740] = $149; + STACKTOP = sp;return; + } + $64 = (($61) - ($62))|0; + $65 = ($64|0)>(0); + if ($65) { + $$04248 = 0; + } else { + $148 = +HEAPF32[740]; + $149 = $148 + 4.9999998736893758E-5; + HEAPF32[740] = $149; + STACKTOP = sp;return; + } + while(1) { + $66 = HEAP32[(17044)>>2]|0; + $67 = HEAP32[(17032)>>2]|0; + $68 = $67 << 2; + $69 = (($68) + -4)|0; + $70 = (($66) + ($69)|0); + $71 = HEAP8[$70>>0]|0; + $72 = (($66) + ($68)|0); + HEAP8[$72>>0] = $71; + $73 = HEAP32[(17044)>>2]|0; + $74 = HEAP32[(17032)>>2]|0; + $75 = $74 << 2; + $76 = (($75) + -3)|0; + $77 = (($73) + ($76)|0); + $78 = HEAP8[$77>>0]|0; + $79 = $75 | 1; + $80 = (($73) + ($79)|0); + HEAP8[$80>>0] = $78; + $81 = HEAP32[(17044)>>2]|0; + $82 = HEAP32[(17032)>>2]|0; + $83 = $82 << 2; + $84 = (($83) + -2)|0; + $85 = (($81) + ($84)|0); + $86 = HEAP8[$85>>0]|0; + $87 = $83 | 2; + $88 = (($81) + ($87)|0); + HEAP8[$88>>0] = $86; + $89 = HEAP32[(17044)>>2]|0; + $90 = HEAP32[(17032)>>2]|0; + $91 = $90 << 2; + $92 = (($91) + -1)|0; + $93 = (($89) + ($92)|0); + $94 = HEAP8[$93>>0]|0; + $95 = $91 | 3; + $96 = (($89) + ($95)|0); + HEAP8[$96>>0] = $94; + $97 = HEAP32[(17032)>>2]|0; + $98 = (($97) + 1)|0; + HEAP32[(17032)>>2] = $98; + $99 = (($$04248) + 1)|0; + $exitcond60 = ($99|0)==($64|0); + if ($exitcond60) { + break; + } else { + $$04248 = $99; + } + } + $148 = +HEAPF32[740]; + $149 = $148 + 4.9999998736893758E-5; + HEAPF32[740] = $149; + STACKTOP = sp;return; + break; + } + case 7: { + $100 = HEAP32[4196]|0; + $101 = HEAP32[(16792)>>2]|0; + $102 = ($100|0)==($101|0); + if (!($102)) { + $103 = (($100) - ($101))|0; + $104 = ($103|0)>(0); + if ($104) { + $$04052 = 0; + while(1) { + $105 = HEAP32[(16804)>>2]|0; + $106 = HEAP32[(16792)>>2]|0; + $107 = $106 << 2; + $108 = (($107) + -4)|0; + $109 = (($105) + ($108)|0); + $110 = HEAP8[$109>>0]|0; + $111 = (($105) + ($107)|0); + HEAP8[$111>>0] = $110; + $112 = HEAP32[(16804)>>2]|0; + $113 = HEAP32[(16792)>>2]|0; + $114 = $113 << 2; + $115 = (($114) + -3)|0; + $116 = (($112) + ($115)|0); + $117 = HEAP8[$116>>0]|0; + $118 = $114 | 1; + $119 = (($112) + ($118)|0); + HEAP8[$119>>0] = $117; + $120 = HEAP32[(16804)>>2]|0; + $121 = HEAP32[(16792)>>2]|0; + $122 = $121 << 2; + $123 = (($122) + -2)|0; + $124 = (($120) + ($123)|0); + $125 = HEAP8[$124>>0]|0; + $126 = $122 | 2; + $127 = (($120) + ($126)|0); + HEAP8[$127>>0] = $125; + $128 = HEAP32[(16804)>>2]|0; + $129 = HEAP32[(16792)>>2]|0; + $130 = $129 << 2; + $131 = (($130) + -1)|0; + $132 = (($128) + ($131)|0); + $133 = HEAP8[$132>>0]|0; + $134 = $130 | 3; + $135 = (($128) + ($134)|0); + HEAP8[$135>>0] = $133; + $136 = HEAP32[(16792)>>2]|0; + $137 = (($136) + 1)|0; + HEAP32[(16792)>>2] = $137; + $138 = (($$04052) + 1)|0; + $exitcond63 = ($138|0)==($103|0); + if ($exitcond63) { + break; + } else { + $$04052 = $138; + } + } + } + } + $139 = HEAP32[4196]|0; + $140 = HEAP32[(16788)>>2]|0; + $141 = ($139|0)>($140|0); + if (!($141)) { + $148 = +HEAPF32[740]; + $149 = $148 + 4.9999998736893758E-5; + HEAPF32[740] = $149; + STACKTOP = sp;return; + } + $142 = HEAP32[(16800)>>2]|0; + $$promoted = HEAP32[(16788)>>2]|0; + $143 = $$promoted << 1; + $scevgep = (($142) + ($143<<2)|0); + $144 = (($139) - ($140))|0; + $145 = $144 << 3; + _memset(($scevgep|0),0,($145|0))|0; + $146 = (($139) + ($$promoted))|0; + $147 = (($146) - ($140))|0; + HEAP32[(16788)>>2] = $147; + $148 = +HEAPF32[740]; + $149 = $148 + 4.9999998736893758E-5; + HEAPF32[740] = $149; + STACKTOP = sp;return; + break; + } + default: { + $148 = +HEAPF32[740]; + $149 = $148 + 4.9999998736893758E-5; + HEAPF32[740] = $149; + STACKTOP = sp;return; + } + } +} +function _rlPopMatrix() { + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[4391]|0; + $1 = ($0|0)>(0); + if (!($1)) { + return; + } + $2 = HEAP32[4391]|0; + $3 = (($2) + -1)|0; + $4 = (17568 + ($3<<6)|0); + $5 = HEAP32[4648]|0; + _memmove(($5|0),($4|0),64)|0; + $6 = (($2) + -1)|0; + HEAP32[4391] = $6; + return; +} +function _rlDisableTexture() { + var $0 = 0, $1 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[4196]|0; + $1 = ($0|0)>(4095); + if (!($1)) { + return; + } + _rlglDraw(); + return; +} +function _rlglDraw() { + var label = 0, sp = 0; + sp = STACKTOP; + _UpdateDefaultBuffers(); + _DrawDefaultBuffers(); + return; +} +function _UpdateDefaultBuffers() { + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[4244]|0; + $1 = ($0|0)>(0); + if ($1) { + $2 = HEAP32[4282]|0; + $3 = ($2|0)==(0); + if (!($3)) { + $4 = HEAP32[4283]|0; + $5 = HEAP32[(17004)>>2]|0; + FUNCTION_TABLE_vi[$4 & 31]($5); + } + $6 = HEAP32[(17008)>>2]|0; + _glBindBuffer(34962,($6|0)); + $7 = HEAP32[4244]|0; + $8 = ($7*12)|0; + $9 = HEAP32[(16988)>>2]|0; + _glBufferSubData(34962,0,($8|0),($9|0)); + $10 = HEAP32[(17012)>>2]|0; + _glBindBuffer(34962,($10|0)); + $11 = HEAP32[(16984)>>2]|0; + $12 = $11 << 2; + $13 = HEAP32[(16996)>>2]|0; + _glBufferSubData(34962,0,($12|0),($13|0)); + } + $14 = HEAP32[4256]|0; + $15 = ($14|0)>(0); + if ($15) { + $16 = HEAP32[4282]|0; + $17 = ($16|0)==(0); + if (!($17)) { + $18 = HEAP32[4283]|0; + $19 = HEAP32[(17052)>>2]|0; + FUNCTION_TABLE_vi[$18 & 31]($19); + } + $20 = HEAP32[(17056)>>2]|0; + _glBindBuffer(34962,($20|0)); + $21 = HEAP32[4256]|0; + $22 = ($21*12)|0; + $23 = HEAP32[(17036)>>2]|0; + _glBufferSubData(34962,0,($22|0),($23|0)); + $24 = HEAP32[(17060)>>2]|0; + _glBindBuffer(34962,($24|0)); + $25 = HEAP32[(17032)>>2]|0; + $26 = $25 << 2; + $27 = HEAP32[(17044)>>2]|0; + _glBufferSubData(34962,0,($26|0),($27|0)); + } + $28 = HEAP32[4196]|0; + $29 = ($28|0)>(0); + if ($29) { + $30 = HEAP32[4282]|0; + $31 = ($30|0)==(0); + if (!($31)) { + $32 = HEAP32[4283]|0; + $33 = HEAP32[(16812)>>2]|0; + FUNCTION_TABLE_vi[$32 & 31]($33); + } + $34 = HEAP32[(16816)>>2]|0; + _glBindBuffer(34962,($34|0)); + $35 = HEAP32[4196]|0; + $36 = ($35*12)|0; + $37 = HEAP32[(16796)>>2]|0; + _glBufferSubData(34962,0,($36|0),($37|0)); + $38 = HEAP32[(16820)>>2]|0; + _glBindBuffer(34962,($38|0)); + $39 = HEAP32[4196]|0; + $40 = $39 << 3; + $41 = HEAP32[(16800)>>2]|0; + _glBufferSubData(34962,0,($40|0),($41|0)); + $42 = HEAP32[(16824)>>2]|0; + _glBindBuffer(34962,($42|0)); + $43 = HEAP32[4196]|0; + $44 = $43 << 2; + $45 = HEAP32[(16804)>>2]|0; + _glBufferSubData(34962,0,($44|0),($45|0)); + } + $46 = HEAP32[4282]|0; + $47 = ($46|0)==(0); + if ($47) { + return; + } + $48 = HEAP32[4283]|0; + FUNCTION_TABLE_vi[$48 & 31](0); + return; +} +function _DrawDefaultBuffers() { + var $$ = 0, $$02830 = 0, $$02932 = 0, $$031 = 0, $$byval_copy2 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0; + var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0; + var $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0; + var $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0; + var $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $modelview$byval_copy = 0; + var $or$cond = 0, $or$cond3 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 320|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(320|0); + $$byval_copy2 = sp + 256|0; + $modelview$byval_copy = sp + 192|0; + $0 = sp + 128|0; + $1 = sp + 64|0; + $2 = sp; + dest=$0; src=16832; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$1; src=16896; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $3 = HEAP32[4240]|0; + $4 = ($3|0)!=(0); + $$ = $4 ? 2 : 1; + $$02932 = 0; + while(1) { + if ($4) { + dest=$modelview$byval_copy; src=$0; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$$byval_copy2; src=$1; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _SetStereoView($$02932,$modelview$byval_copy,$$byval_copy2); + } + $8 = HEAP32[4244]|0; + $9 = ($8|0)>(0); + $10 = HEAP32[4256]|0; + $11 = ($10|0)>(0); + $or$cond = $9 | $11; + $12 = HEAP32[4196]|0; + $13 = ($12|0)>(0); + $or$cond3 = $or$cond | $13; + if ($or$cond3) { + $14 = HEAP32[4268]|0; + _glUseProgram(($14|0)); + dest=$modelview$byval_copy; src=16896; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$$byval_copy2; src=16832; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixMultiply($2,$modelview$byval_copy,$$byval_copy2); + $15 = HEAP32[(17100)>>2]|0; + dest=$$byval_copy2; src=$2; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $16 = (_MatrixToFloat($$byval_copy2)|0); + _glUniformMatrix4fv(($15|0),1,0,($16|0)); + $17 = HEAP32[(17104)>>2]|0; + _glUniform4f(($17|0),1.0,1.0,1.0,1.0); + $18 = HEAP32[(17116)>>2]|0; + _glUniform1i(($18|0),0); + } + $19 = HEAP32[4244]|0; + $20 = ($19|0)>(0); + if ($20) { + $21 = HEAP32[4242]|0; + _glBindTexture(3553,($21|0)); + $22 = HEAP32[4282]|0; + $23 = ($22|0)==(0); + if ($23) { + $26 = HEAP32[(17008)>>2]|0; + _glBindBuffer(34962,($26|0)); + $27 = HEAP32[(17076)>>2]|0; + _glVertexAttribPointer(($27|0),3,5126,0,0,(0|0)); + $28 = HEAP32[(17076)>>2]|0; + _glEnableVertexAttribArray(($28|0)); + $29 = HEAP32[(17012)>>2]|0; + _glBindBuffer(34962,($29|0)); + $30 = HEAP32[(17096)>>2]|0; + _glVertexAttribPointer(($30|0),4,5121,1,0,(0|0)); + $31 = HEAP32[(17096)>>2]|0; + _glEnableVertexAttribArray(($31|0)); + } else { + $24 = HEAP32[4283]|0; + $25 = HEAP32[(17004)>>2]|0; + FUNCTION_TABLE_vi[$24 & 31]($25); + } + $32 = HEAP32[4244]|0; + _glDrawArrays(1,0,($32|0)); + $33 = HEAP32[4282]|0; + $34 = ($33|0)==(0); + if ($34) { + _glBindBuffer(34962,0); + } + _glBindTexture(3553,0); + } + $35 = HEAP32[4256]|0; + $36 = ($35|0)>(0); + if ($36) { + $37 = HEAP32[4242]|0; + _glBindTexture(3553,($37|0)); + $38 = HEAP32[4282]|0; + $39 = ($38|0)==(0); + if ($39) { + $42 = HEAP32[(17056)>>2]|0; + _glBindBuffer(34962,($42|0)); + $43 = HEAP32[(17076)>>2]|0; + _glVertexAttribPointer(($43|0),3,5126,0,0,(0|0)); + $44 = HEAP32[(17076)>>2]|0; + _glEnableVertexAttribArray(($44|0)); + $45 = HEAP32[(17060)>>2]|0; + _glBindBuffer(34962,($45|0)); + $46 = HEAP32[(17096)>>2]|0; + _glVertexAttribPointer(($46|0),4,5121,1,0,(0|0)); + $47 = HEAP32[(17096)>>2]|0; + _glEnableVertexAttribArray(($47|0)); + } else { + $40 = HEAP32[4283]|0; + $41 = HEAP32[(17052)>>2]|0; + FUNCTION_TABLE_vi[$40 & 31]($41); + } + $48 = HEAP32[4256]|0; + _glDrawArrays(4,0,($48|0)); + $49 = HEAP32[4282]|0; + $50 = ($49|0)==(0); + if ($50) { + _glBindBuffer(34962,0); + } + _glBindTexture(3553,0); + } + $51 = HEAP32[4196]|0; + $52 = ($51|0)>(0); + if ($52) { + $53 = HEAP32[4282]|0; + $54 = ($53|0)==(0); + if ($54) { + $57 = HEAP32[(16816)>>2]|0; + _glBindBuffer(34962,($57|0)); + $58 = HEAP32[(17076)>>2]|0; + _glVertexAttribPointer(($58|0),3,5126,0,0,(0|0)); + $59 = HEAP32[(17076)>>2]|0; + _glEnableVertexAttribArray(($59|0)); + $60 = HEAP32[(16820)>>2]|0; + _glBindBuffer(34962,($60|0)); + $61 = HEAP32[(17080)>>2]|0; + _glVertexAttribPointer(($61|0),2,5126,0,0,(0|0)); + $62 = HEAP32[(17080)>>2]|0; + _glEnableVertexAttribArray(($62|0)); + $63 = HEAP32[(16824)>>2]|0; + _glBindBuffer(34962,($63|0)); + $64 = HEAP32[(17096)>>2]|0; + _glVertexAttribPointer(($64|0),4,5121,1,0,(0|0)); + $65 = HEAP32[(17096)>>2]|0; + _glEnableVertexAttribArray(($65|0)); + $66 = HEAP32[(16828)>>2]|0; + _glBindBuffer(34963,($66|0)); + } else { + $55 = HEAP32[4283]|0; + $56 = HEAP32[(16812)>>2]|0; + FUNCTION_TABLE_vi[$55 & 31]($56); + } + $67 = HEAP32[4241]|0; + $68 = ($67|0)>(0); + if ($68) { + $$02830 = 0;$$031 = 0; + while(1) { + $71 = HEAP32[4243]|0; + $72 = (($71) + (($$031*144)|0)|0); + $73 = HEAP32[$72>>2]|0; + $74 = (($73|0) / 4)&-1; + $75 = ($74*6)|0; + $76 = (((($71) + (($$031*144)|0)|0)) + 8|0); + $77 = HEAP32[$76>>2]|0; + _glBindTexture(3553,($77|0)); + $78 = $$02830 << 1; + $79 = $78; + _glDrawElements(4,($75|0),5123,($79|0)); + $80 = HEAP32[4243]|0; + $81 = (($80) + (($$031*144)|0)|0); + $82 = HEAP32[$81>>2]|0; + $83 = (($82|0) / 4)&-1; + $84 = ($83*6)|0; + $85 = (($84) + ($$02830))|0; + $86 = (($$031) + 1)|0; + $87 = HEAP32[4241]|0; + $88 = ($86|0)<($87|0); + if ($88) { + $$02830 = $85;$$031 = $86; + } else { + break; + } + } + } + $69 = HEAP32[4282]|0; + $70 = ($69|0)==(0); + if ($70) { + _glBindBuffer(34962,0); + _glBindBuffer(34963,0); + } + _glBindTexture(3553,0); + } + $89 = HEAP32[4282]|0; + $90 = ($89|0)==(0); + if (!($90)) { + $91 = HEAP32[4283]|0; + FUNCTION_TABLE_vi[$91 & 31](0); + } + _glUseProgram(0); + $92 = (($$02932) + 1)|0; + $93 = ($92|0)<($$|0); + if ($93) { + $$02932 = $92; } else { break; } } + HEAP32[4241] = 1; + $5 = HEAP32[4242]|0; + $6 = HEAP32[4243]|0; + $7 = ((($6)) + 8|0); + HEAP32[$7>>2] = $5; + HEAP32[$6>>2] = 0; + HEAP32[4244] = 0; + HEAP32[(16984)>>2] = 0; + HEAP32[4256] = 0; + HEAP32[(17032)>>2] = 0; + HEAP32[4196] = 0; + HEAP32[(16788)>>2] = 0; + HEAP32[(16792)>>2] = 0; + HEAPF32[740] = -1.0; + dest=16832; src=$0; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=16896; src=$1; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + STACKTOP = sp;return; +} +function _SetStereoView($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $$byval_copy = 0, $$byval_copy3 = 0, $10 = 0, $11 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 256|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(256|0); + $$byval_copy3 = sp + 192|0; + $$byval_copy = sp + 64|0; + $3 = sp; + $4 = sp + 128|0; + dest=$3; src=$1; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $5 = HEAP32[4300]|0; + $6 = Math_imul($5, $0)|0; + $7 = (($6|0) / 2)&-1; + $8 = (($5|0) / 2)&-1; + $9 = HEAP32[4301]|0; + _rlViewport($7,0,$8,$9); + $10 = (17436 + ($0<<6)|0); + dest=$$byval_copy; src=$2; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$$byval_copy3; src=$10; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixMultiply($4,$$byval_copy,$$byval_copy3); + $11 = (17308 + ($0<<6)|0); + dest=$3; src=$11; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$$byval_copy3; src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _SetMatrixModelview($$byval_copy3); + dest=$$byval_copy3; src=$3; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _SetMatrixProjection($$byval_copy3); + STACKTOP = sp;return; +} +function _MatrixMultiply($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $$sroa$10$0$$sroa_idx14 = 0, $$sroa$11$0$$sroa_idx16 = 0, $$sroa$12$0$$sroa_idx18 = 0, $$sroa$13$0$$sroa_idx20 = 0, $$sroa$14$0$$sroa_idx22 = 0, $$sroa$15$0$$sroa_idx24 = 0, $$sroa$16$0$$sroa_idx26 = 0, $$sroa$17$0$$sroa_idx28 = 0, $$sroa$18$0$$sroa_idx30 = 0, $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $$sroa$6$0$$sroa_idx6 = 0, $$sroa$7$0$$sroa_idx8 = 0, $$sroa$8$0$$sroa_idx10 = 0, $$sroa$9$0$$sroa_idx12 = 0, $10 = 0.0, $100 = 0.0, $101 = 0.0, $102 = 0.0, $103 = 0.0; + var $104 = 0.0, $105 = 0, $106 = 0.0, $107 = 0.0, $108 = 0, $109 = 0.0, $11 = 0.0, $110 = 0.0, $111 = 0.0, $112 = 0, $113 = 0.0, $114 = 0.0, $115 = 0.0, $116 = 0, $117 = 0.0, $118 = 0.0, $119 = 0.0, $12 = 0, $120 = 0.0, $121 = 0.0; + var $122 = 0.0, $123 = 0.0, $124 = 0.0, $125 = 0.0, $126 = 0.0, $127 = 0.0, $128 = 0.0, $129 = 0.0, $13 = 0.0, $130 = 0.0, $131 = 0.0, $132 = 0.0, $133 = 0.0, $134 = 0.0, $135 = 0.0, $136 = 0.0, $137 = 0.0, $138 = 0.0, $139 = 0.0, $14 = 0; + var $140 = 0.0, $141 = 0, $142 = 0.0, $143 = 0.0, $144 = 0, $145 = 0.0, $146 = 0.0, $147 = 0.0, $148 = 0, $149 = 0.0, $15 = 0.0, $150 = 0.0, $151 = 0.0, $152 = 0, $153 = 0.0, $154 = 0.0, $155 = 0.0, $156 = 0.0, $157 = 0.0, $158 = 0.0; + var $159 = 0.0, $16 = 0.0, $160 = 0.0, $161 = 0.0, $162 = 0.0, $163 = 0.0, $164 = 0.0, $165 = 0.0, $166 = 0.0, $167 = 0.0, $168 = 0.0, $169 = 0.0, $17 = 0.0, $170 = 0.0, $171 = 0.0, $172 = 0.0, $173 = 0.0, $174 = 0.0, $175 = 0.0, $176 = 0.0; + var $18 = 0, $19 = 0.0, $20 = 0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0, $25 = 0.0, $26 = 0.0, $27 = 0, $28 = 0.0, $29 = 0.0, $3 = 0.0, $30 = 0.0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0.0; + var $37 = 0.0, $38 = 0.0, $39 = 0, $4 = 0.0, $40 = 0.0, $41 = 0.0, $42 = 0, $43 = 0.0, $44 = 0.0, $45 = 0.0, $46 = 0, $47 = 0.0, $48 = 0.0, $49 = 0.0, $5 = 0.0, $50 = 0, $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0; + var $55 = 0.0, $56 = 0.0, $57 = 0, $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0.0, $61 = 0, $62 = 0.0, $63 = 0.0, $64 = 0.0, $65 = 0, $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0, $7 = 0.0, $70 = 0.0, $71 = 0.0, $72 = 0; + var $73 = 0.0, $74 = 0.0, $75 = 0.0, $76 = 0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0, $81 = 0.0, $82 = 0.0, $83 = 0.0, $84 = 0.0, $85 = 0.0, $86 = 0.0, $87 = 0.0, $88 = 0.0, $89 = 0.0, $9 = 0.0, $90 = 0.0; + var $91 = 0.0, $92 = 0.0, $93 = 0.0, $94 = 0.0, $95 = 0.0, $96 = 0.0, $97 = 0.0, $98 = 0.0, $99 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + $3 = +HEAPF32[$2>>2]; + $4 = +HEAPF32[$1>>2]; + $5 = $3 * $4; + $6 = ((($2)) + 16|0); + $7 = +HEAPF32[$6>>2]; + $8 = ((($1)) + 4|0); + $9 = +HEAPF32[$8>>2]; + $10 = $7 * $9; + $11 = $5 + $10; + $12 = ((($2)) + 32|0); + $13 = +HEAPF32[$12>>2]; + $14 = ((($1)) + 8|0); + $15 = +HEAPF32[$14>>2]; + $16 = $13 * $15; + $17 = $11 + $16; + $18 = ((($2)) + 48|0); + $19 = +HEAPF32[$18>>2]; + $20 = ((($1)) + 12|0); + $21 = +HEAPF32[$20>>2]; + $22 = $19 * $21; + $23 = $17 + $22; + $24 = ((($1)) + 16|0); + $25 = +HEAPF32[$24>>2]; + $26 = $3 * $25; + $27 = ((($1)) + 20|0); + $28 = +HEAPF32[$27>>2]; + $29 = $7 * $28; + $30 = $26 + $29; + $31 = ((($1)) + 24|0); + $32 = +HEAPF32[$31>>2]; + $33 = $13 * $32; + $34 = $30 + $33; + $35 = ((($1)) + 28|0); + $36 = +HEAPF32[$35>>2]; + $37 = $19 * $36; + $38 = $34 + $37; + $39 = ((($1)) + 32|0); + $40 = +HEAPF32[$39>>2]; + $41 = $3 * $40; + $42 = ((($1)) + 36|0); + $43 = +HEAPF32[$42>>2]; + $44 = $7 * $43; + $45 = $41 + $44; + $46 = ((($1)) + 40|0); + $47 = +HEAPF32[$46>>2]; + $48 = $13 * $47; + $49 = $45 + $48; + $50 = ((($1)) + 44|0); + $51 = +HEAPF32[$50>>2]; + $52 = $19 * $51; + $53 = $49 + $52; + $54 = ((($1)) + 48|0); + $55 = +HEAPF32[$54>>2]; + $56 = $3 * $55; + $57 = ((($1)) + 52|0); + $58 = +HEAPF32[$57>>2]; + $59 = $7 * $58; + $60 = $56 + $59; + $61 = ((($1)) + 56|0); + $62 = +HEAPF32[$61>>2]; + $63 = $13 * $62; + $64 = $60 + $63; + $65 = ((($1)) + 60|0); + $66 = +HEAPF32[$65>>2]; + $67 = $19 * $66; + $68 = $64 + $67; + $69 = ((($2)) + 4|0); + $70 = +HEAPF32[$69>>2]; + $71 = $4 * $70; + $72 = ((($2)) + 20|0); + $73 = +HEAPF32[$72>>2]; + $74 = $9 * $73; + $75 = $71 + $74; + $76 = ((($2)) + 36|0); + $77 = +HEAPF32[$76>>2]; + $78 = $15 * $77; + $79 = $75 + $78; + $80 = ((($2)) + 52|0); + $81 = +HEAPF32[$80>>2]; + $82 = $21 * $81; + $83 = $79 + $82; + $84 = $25 * $70; + $85 = $28 * $73; + $86 = $84 + $85; + $87 = $32 * $77; + $88 = $86 + $87; + $89 = $36 * $81; + $90 = $88 + $89; + $91 = $40 * $70; + $92 = $43 * $73; + $93 = $91 + $92; + $94 = $47 * $77; + $95 = $93 + $94; + $96 = $51 * $81; + $97 = $95 + $96; + $98 = $55 * $70; + $99 = $58 * $73; + $100 = $98 + $99; + $101 = $62 * $77; + $102 = $100 + $101; + $103 = $66 * $81; + $104 = $102 + $103; + $105 = ((($2)) + 8|0); + $106 = +HEAPF32[$105>>2]; + $107 = $4 * $106; + $108 = ((($2)) + 24|0); + $109 = +HEAPF32[$108>>2]; + $110 = $9 * $109; + $111 = $107 + $110; + $112 = ((($2)) + 40|0); + $113 = +HEAPF32[$112>>2]; + $114 = $15 * $113; + $115 = $111 + $114; + $116 = ((($2)) + 56|0); + $117 = +HEAPF32[$116>>2]; + $118 = $21 * $117; + $119 = $115 + $118; + $120 = $25 * $106; + $121 = $28 * $109; + $122 = $120 + $121; + $123 = $32 * $113; + $124 = $122 + $123; + $125 = $36 * $117; + $126 = $124 + $125; + $127 = $40 * $106; + $128 = $43 * $109; + $129 = $127 + $128; + $130 = $47 * $113; + $131 = $129 + $130; + $132 = $51 * $117; + $133 = $131 + $132; + $134 = $55 * $106; + $135 = $58 * $109; + $136 = $134 + $135; + $137 = $62 * $113; + $138 = $136 + $137; + $139 = $66 * $117; + $140 = $138 + $139; + $141 = ((($2)) + 12|0); + $142 = +HEAPF32[$141>>2]; + $143 = $4 * $142; + $144 = ((($2)) + 28|0); + $145 = +HEAPF32[$144>>2]; + $146 = $9 * $145; + $147 = $143 + $146; + $148 = ((($2)) + 44|0); + $149 = +HEAPF32[$148>>2]; + $150 = $15 * $149; + $151 = $147 + $150; + $152 = ((($2)) + 60|0); + $153 = +HEAPF32[$152>>2]; + $154 = $21 * $153; + $155 = $151 + $154; + $156 = $25 * $142; + $157 = $28 * $145; + $158 = $156 + $157; + $159 = $32 * $149; + $160 = $158 + $159; + $161 = $36 * $153; + $162 = $160 + $161; + $163 = $40 * $142; + $164 = $43 * $145; + $165 = $163 + $164; + $166 = $47 * $149; + $167 = $165 + $166; + $168 = $51 * $153; + $169 = $167 + $168; + $170 = $55 * $142; + $171 = $58 * $145; + $172 = $170 + $171; + $173 = $62 * $149; + $174 = $172 + $173; + $175 = $66 * $153; + $176 = $174 + $175; + HEAPF32[$0>>2] = $23; + $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); + HEAPF32[$$sroa$4$0$$sroa_idx2>>2] = $83; + $$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0); + HEAPF32[$$sroa$5$0$$sroa_idx4>>2] = $119; + $$sroa$6$0$$sroa_idx6 = ((($0)) + 12|0); + HEAPF32[$$sroa$6$0$$sroa_idx6>>2] = $155; + $$sroa$7$0$$sroa_idx8 = ((($0)) + 16|0); + HEAPF32[$$sroa$7$0$$sroa_idx8>>2] = $38; + $$sroa$8$0$$sroa_idx10 = ((($0)) + 20|0); + HEAPF32[$$sroa$8$0$$sroa_idx10>>2] = $90; + $$sroa$9$0$$sroa_idx12 = ((($0)) + 24|0); + HEAPF32[$$sroa$9$0$$sroa_idx12>>2] = $126; + $$sroa$10$0$$sroa_idx14 = ((($0)) + 28|0); + HEAPF32[$$sroa$10$0$$sroa_idx14>>2] = $162; + $$sroa$11$0$$sroa_idx16 = ((($0)) + 32|0); + HEAPF32[$$sroa$11$0$$sroa_idx16>>2] = $53; + $$sroa$12$0$$sroa_idx18 = ((($0)) + 36|0); + HEAPF32[$$sroa$12$0$$sroa_idx18>>2] = $97; + $$sroa$13$0$$sroa_idx20 = ((($0)) + 40|0); + HEAPF32[$$sroa$13$0$$sroa_idx20>>2] = $133; + $$sroa$14$0$$sroa_idx22 = ((($0)) + 44|0); + HEAPF32[$$sroa$14$0$$sroa_idx22>>2] = $169; + $$sroa$15$0$$sroa_idx24 = ((($0)) + 48|0); + HEAPF32[$$sroa$15$0$$sroa_idx24>>2] = $68; + $$sroa$16$0$$sroa_idx26 = ((($0)) + 52|0); + HEAPF32[$$sroa$16$0$$sroa_idx26>>2] = $104; + $$sroa$17$0$$sroa_idx28 = ((($0)) + 56|0); + HEAPF32[$$sroa$17$0$$sroa_idx28>>2] = $140; + $$sroa$18$0$$sroa_idx30 = ((($0)) + 60|0); + HEAPF32[$$sroa$18$0$$sroa_idx30>>2] = $176; + return; +} +function _MatrixToFloat($0) { + $0 = $0|0; + var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; + var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = HEAP32[$0>>2]|0; + HEAP32[4284] = $1; + $2 = ((($0)) + 4|0); + $3 = HEAP32[$2>>2]|0; + HEAP32[(17140)>>2] = $3; + $4 = ((($0)) + 8|0); + $5 = HEAP32[$4>>2]|0; + HEAP32[(17144)>>2] = $5; + $6 = ((($0)) + 12|0); + $7 = HEAP32[$6>>2]|0; + HEAP32[(17148)>>2] = $7; + $8 = ((($0)) + 16|0); + $9 = HEAP32[$8>>2]|0; + HEAP32[(17152)>>2] = $9; + $10 = ((($0)) + 20|0); + $11 = HEAP32[$10>>2]|0; + HEAP32[(17156)>>2] = $11; + $12 = ((($0)) + 24|0); + $13 = HEAP32[$12>>2]|0; + HEAP32[(17160)>>2] = $13; + $14 = ((($0)) + 28|0); + $15 = HEAP32[$14>>2]|0; + HEAP32[(17164)>>2] = $15; + $16 = ((($0)) + 32|0); + $17 = HEAP32[$16>>2]|0; + HEAP32[(17168)>>2] = $17; + $18 = ((($0)) + 36|0); + $19 = HEAP32[$18>>2]|0; + HEAP32[(17172)>>2] = $19; + $20 = ((($0)) + 40|0); + $21 = HEAP32[$20>>2]|0; + HEAP32[(17176)>>2] = $21; + $22 = ((($0)) + 44|0); + $23 = HEAP32[$22>>2]|0; + HEAP32[(17180)>>2] = $23; + $24 = ((($0)) + 48|0); + $25 = HEAP32[$24>>2]|0; + HEAP32[(17184)>>2] = $25; + $26 = ((($0)) + 52|0); + $27 = HEAP32[$26>>2]|0; + HEAP32[(17188)>>2] = $27; + $28 = ((($0)) + 56|0); + $29 = HEAP32[$28>>2]|0; + HEAP32[(17192)>>2] = $29; + $30 = ((($0)) + 60|0); + $31 = HEAP32[$30>>2]|0; + HEAP32[(17196)>>2] = $31; + return (17136|0); +} +function _rlViewport($0,$1,$2,$3) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + var label = 0, sp = 0; + sp = STACKTOP; + _glViewport(($0|0),($1|0),($2|0),($3|0)); + return; +} +function _SetMatrixModelview($0) { + $0 = $0|0; + var dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + dest=16896; src=$0; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + return; +} +function _SetMatrixProjection($0) { + $0 = $0|0; + var dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + dest=16832; src=$0; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + return; +} +function _VectorTransform($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0.0, $19 = 0.0, $2 = 0.0, $20 = 0, $21 = 0.0, $22 = 0.0, $23 = 0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $27 = 0, $28 = 0.0; + var $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0, $35 = 0.0, $36 = 0.0, $37 = 0, $38 = 0.0, $39 = 0.0, $4 = 0.0, $40 = 0.0, $41 = 0, $42 = 0.0, $43 = 0.0, $44 = 0.0, $45 = 0, $46 = 0.0; + var $47 = 0.0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $2 = +HEAPF32[$0>>2]; + $3 = ((($0)) + 4|0); + $4 = +HEAPF32[$3>>2]; + $5 = ((($0)) + 8|0); + $6 = +HEAPF32[$5>>2]; + $7 = +HEAPF32[$1>>2]; + $8 = $2 * $7; + $9 = ((($1)) + 4|0); + $10 = +HEAPF32[$9>>2]; + $11 = $4 * $10; + $12 = $8 + $11; + $13 = ((($1)) + 8|0); + $14 = +HEAPF32[$13>>2]; + $15 = $6 * $14; + $16 = $12 + $15; + $17 = ((($1)) + 12|0); + $18 = +HEAPF32[$17>>2]; + $19 = $18 + $16; + HEAPF32[$0>>2] = $19; + $20 = ((($1)) + 16|0); + $21 = +HEAPF32[$20>>2]; + $22 = $2 * $21; + $23 = ((($1)) + 20|0); + $24 = +HEAPF32[$23>>2]; + $25 = $4 * $24; + $26 = $22 + $25; + $27 = ((($1)) + 24|0); + $28 = +HEAPF32[$27>>2]; + $29 = $6 * $28; + $30 = $26 + $29; + $31 = ((($1)) + 28|0); + $32 = +HEAPF32[$31>>2]; + $33 = $32 + $30; + HEAPF32[$3>>2] = $33; + $34 = ((($1)) + 32|0); + $35 = +HEAPF32[$34>>2]; + $36 = $2 * $35; + $37 = ((($1)) + 36|0); + $38 = +HEAPF32[$37>>2]; + $39 = $4 * $38; + $40 = $36 + $39; + $41 = ((($1)) + 40|0); + $42 = +HEAPF32[$41>>2]; + $43 = $6 * $42; + $44 = $40 + $43; + $45 = ((($1)) + 44|0); + $46 = +HEAPF32[$45>>2]; + $47 = $46 + $44; + HEAPF32[$5>>2] = $47; + return; +} +function _rlVertex3f($0,$1,$2) { + $0 = +$0; + $1 = +$1; + $2 = +$2; + var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0; + var $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0; + var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer3 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $vararg_buffer3 = sp + 16|0; + $vararg_buffer1 = sp + 8|0; + $vararg_buffer = sp; + $3 = HEAP32[4649]|0; + $4 = ($3|0)==(0); + if (!($4)) { + $5 = HEAP32[4651]|0; + $6 = HEAP32[4650]|0; + $7 = (($5) + (($6*12)|0)|0); + HEAPF32[$7>>2] = $0; + $8 = (((($5) + (($6*12)|0)|0)) + 4|0); + HEAPF32[$8>>2] = $1; + $9 = (((($5) + (($6*12)|0)|0)) + 8|0); + HEAPF32[$9>>2] = $2; + $10 = (($6) + 1)|0; + HEAP32[4650] = $10; + STACKTOP = sp;return; + } + $11 = HEAP32[4652]|0; + switch ($11|0) { + case 1: { + $12 = HEAP32[4244]|0; + $13 = ($12|0)<(2048); + if ($13) { + $14 = HEAP32[(16988)>>2]|0; + $15 = ($12*3)|0; + $16 = (($14) + ($15<<2)|0); + HEAPF32[$16>>2] = $0; + $17 = (($15) + 1)|0; + $18 = (($14) + ($17<<2)|0); + HEAPF32[$18>>2] = $1; + $19 = (($15) + 2)|0; + $20 = (($14) + ($19<<2)|0); + HEAPF32[$20>>2] = $2; + $21 = (($12) + 1)|0; + HEAP32[4244] = $21; + STACKTOP = sp;return; + } else { + _TraceLog(2,4153,$vararg_buffer); + STACKTOP = sp;return; + } + break; + } + case 4: { + $22 = HEAP32[4256]|0; + $23 = ($22|0)<(6144); + if ($23) { + $24 = HEAP32[(17036)>>2]|0; + $25 = ($22*3)|0; + $26 = (($24) + ($25<<2)|0); + HEAPF32[$26>>2] = $0; + $27 = (($25) + 1)|0; + $28 = (($24) + ($27<<2)|0); + HEAPF32[$28>>2] = $1; + $29 = (($25) + 2)|0; + $30 = (($24) + ($29<<2)|0); + HEAPF32[$30>>2] = $2; + $31 = (($22) + 1)|0; + HEAP32[4256] = $31; + STACKTOP = sp;return; + } else { + _TraceLog(2,4178,$vararg_buffer1); + STACKTOP = sp;return; + } + break; + } + case 7: { + $32 = HEAP32[4196]|0; + $33 = ($32|0)<(4096); + if ($33) { + $34 = HEAP32[(16796)>>2]|0; + $35 = ($32*3)|0; + $36 = (($34) + ($35<<2)|0); + HEAPF32[$36>>2] = $0; + $37 = (($35) + 1)|0; + $38 = (($34) + ($37<<2)|0); + HEAPF32[$38>>2] = $1; + $39 = (($35) + 2)|0; + $40 = (($34) + ($39<<2)|0); + HEAPF32[$40>>2] = $2; + $41 = (($32) + 1)|0; + HEAP32[4196] = $41; + $42 = HEAP32[4243]|0; + $43 = HEAP32[4241]|0; + $44 = (($43) + -1)|0; + $45 = (($42) + (($44*144)|0)|0); + $46 = HEAP32[$45>>2]|0; + $47 = (($46) + 1)|0; + HEAP32[$45>>2] = $47; + STACKTOP = sp;return; + } else { + _TraceLog(2,4207,$vararg_buffer3); + STACKTOP = sp;return; + } + break; + } + default: { + STACKTOP = sp;return; + } + } +} +function _MatrixIdentity($0) { + $0 = $0|0; + var $$sroa$5$0$$sroa_idx = 0, $$sroa$55$0$$sroa_idx6 = 0, $$sroa$6$0$$sroa_idx = 0, $$sroa$611$0$$sroa_idx12 = 0, $$sroa$7$0$$sroa_idx = 0, $$sroa$717$0$$sroa_idx18 = 0, label = 0, sp = 0; + sp = STACKTOP; + HEAPF32[$0>>2] = 1.0; + $$sroa$5$0$$sroa_idx = ((($0)) + 4|0); + ;HEAP32[$$sroa$5$0$$sroa_idx>>2]=0|0;HEAP32[$$sroa$5$0$$sroa_idx+4>>2]=0|0;HEAP32[$$sroa$5$0$$sroa_idx+8>>2]=0|0;HEAP32[$$sroa$5$0$$sroa_idx+12>>2]=0|0; + $$sroa$55$0$$sroa_idx6 = ((($0)) + 20|0); + HEAPF32[$$sroa$55$0$$sroa_idx6>>2] = 1.0; + $$sroa$6$0$$sroa_idx = ((($0)) + 24|0); + ;HEAP32[$$sroa$6$0$$sroa_idx>>2]=0|0;HEAP32[$$sroa$6$0$$sroa_idx+4>>2]=0|0;HEAP32[$$sroa$6$0$$sroa_idx+8>>2]=0|0;HEAP32[$$sroa$6$0$$sroa_idx+12>>2]=0|0; + $$sroa$611$0$$sroa_idx12 = ((($0)) + 40|0); + HEAPF32[$$sroa$611$0$$sroa_idx12>>2] = 1.0; + $$sroa$7$0$$sroa_idx = ((($0)) + 44|0); + ;HEAP32[$$sroa$7$0$$sroa_idx>>2]=0|0;HEAP32[$$sroa$7$0$$sroa_idx+4>>2]=0|0;HEAP32[$$sroa$7$0$$sroa_idx+8>>2]=0|0;HEAP32[$$sroa$7$0$$sroa_idx+12>>2]=0|0; + $$sroa$717$0$$sroa_idx18 = ((($0)) + 60|0); + HEAPF32[$$sroa$717$0$$sroa_idx18>>2] = 1.0; + return; +} +function _VectorNormalize($0) { + $0 = $0|0; + var $$byval_copy = 0, $$op = 0.0, $1 = 0.0, $10 = 0.0, $11 = 0.0, $2 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $$byval_copy = sp; + ;HEAP32[$$byval_copy>>2]=HEAP32[$0>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$0+8>>2]|0; + $1 = (+_VectorLength($$byval_copy)); + $2 = $1 == 0.0; + $$op = 1.0 / $1; + $3 = $2 ? 1.0 : $$op; + $4 = +HEAPF32[$0>>2]; + $5 = $4 * $3; + HEAPF32[$0>>2] = $5; + $6 = ((($0)) + 4|0); + $7 = +HEAPF32[$6>>2]; + $8 = $3 * $7; + HEAPF32[$6>>2] = $8; + $9 = ((($0)) + 8|0); + $10 = +HEAPF32[$9>>2]; + $11 = $3 * $10; + HEAPF32[$9>>2] = $11; + STACKTOP = sp;return; +} +function _MatrixRotate($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = +$2; + var $$ = 0.0, $$221 = 0.0, $$222 = 0.0, $$sroa$10$0$$sroa_idx199 = 0, $$sroa$11$0$$sroa_idx201 = 0, $$sroa$12$0$$sroa_idx203 = 0, $$sroa$13$0$$sroa_idx205 = 0, $$sroa$14$0$$sroa_idx207 = 0, $$sroa$15$0$$sroa_idx209 = 0, $$sroa$16$0$$sroa_idx211 = 0, $$sroa$17$0$$sroa_idx213 = 0, $$sroa$18$0$$sroa_idx215 = 0, $$sroa$4$0$$sroa_idx187 = 0, $$sroa$5$0$$sroa_idx189 = 0, $$sroa$6$0$$sroa_idx191 = 0, $$sroa$7$0$$sroa_idx193 = 0, $$sroa$8$0$$sroa_idx195 = 0, $$sroa$9$0$$sroa_idx197 = 0, $10 = 0.0, $100 = 0.0; + var $101 = 0.0, $102 = 0.0, $103 = 0.0, $104 = 0.0, $105 = 0.0, $106 = 0.0, $107 = 0.0, $108 = 0.0, $109 = 0.0, $11 = 0.0, $110 = 0.0, $111 = 0.0, $112 = 0.0, $113 = 0.0, $114 = 0.0, $115 = 0.0, $116 = 0.0, $117 = 0.0, $118 = 0.0, $119 = 0.0; + var $12 = 0.0, $120 = 0.0, $121 = 0.0, $122 = 0.0, $123 = 0.0, $124 = 0.0, $125 = 0.0, $126 = 0.0, $127 = 0.0, $128 = 0.0, $129 = 0.0, $13 = 0.0, $130 = 0.0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0; + var $138 = 0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0, $26 = 0.0, $27 = 0, $28 = 0.0, $29 = 0, $3 = 0, $30 = 0.0, $31 = 0; + var $32 = 0.0, $33 = 0, $34 = 0.0, $35 = 0, $36 = 0.0, $37 = 0, $38 = 0.0, $39 = 0, $4 = 0.0, $40 = 0.0, $41 = 0, $42 = 0.0, $43 = 0, $44 = 0.0, $45 = 0, $46 = 0.0, $47 = 0.0, $48 = 0.0, $49 = 0.0, $5 = 0; + var $50 = 0.0, $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0.0, $55 = 0.0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0.0, $6 = 0.0, $60 = 0.0, $61 = 0.0, $62 = 0.0, $63 = 0.0, $64 = 0.0, $65 = 0.0, $66 = 0.0, $67 = 0.0, $68 = 0.0; + var $69 = 0.0, $7 = 0, $70 = 0.0, $71 = 0.0, $72 = 0.0, $73 = 0.0, $74 = 0.0, $75 = 0.0, $76 = 0.0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0.0, $80 = 0.0, $81 = 0.0, $82 = 0.0, $83 = 0.0, $84 = 0.0, $85 = 0.0, $86 = 0.0; + var $87 = 0.0, $88 = 0.0, $89 = 0.0, $9 = 0.0, $90 = 0.0, $91 = 0.0, $92 = 0.0, $93 = 0.0, $94 = 0.0, $95 = 0.0, $96 = 0.0, $97 = 0.0, $98 = 0.0, $99 = 0.0, $or$cond = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $3 = sp; + _MatrixIdentity($3); + $4 = +HEAPF32[$1>>2]; + $5 = ((($1)) + 4|0); + $6 = +HEAPF32[$5>>2]; + $7 = ((($1)) + 8|0); + $8 = +HEAPF32[$7>>2]; + $9 = $4 * $4; + $10 = $6 * $6; + $11 = $9 + $10; + $12 = $8 * $8; + $13 = $11 + $12; + $14 = (+Math_sqrt((+$13))); + $15 = $14 != 1.0; + $16 = $14 != 0.0; + $or$cond = $15 & $16; + $17 = 1.0 / $14; + $18 = $4 * $17; + $19 = $6 * $17; + $20 = $8 * $17; + $$ = $or$cond ? $20 : $8; + $$221 = $or$cond ? $19 : $6; + $$222 = $or$cond ? $18 : $4; + $21 = (+Math_sin((+$2))); + $22 = (+Math_cos((+$2))); + $23 = 1.0 - $22; + $24 = +HEAPF32[$3>>2]; + $25 = ((($3)) + 16|0); + $26 = +HEAPF32[$25>>2]; + $27 = ((($3)) + 32|0); + $28 = +HEAPF32[$27>>2]; + $29 = ((($3)) + 48|0); + $30 = +HEAPF32[$29>>2]; + $31 = ((($3)) + 4|0); + $32 = +HEAPF32[$31>>2]; + $33 = ((($3)) + 20|0); + $34 = +HEAPF32[$33>>2]; + $35 = ((($3)) + 36|0); + $36 = +HEAPF32[$35>>2]; + $37 = ((($3)) + 52|0); + $38 = +HEAPF32[$37>>2]; + $39 = ((($3)) + 8|0); + $40 = +HEAPF32[$39>>2]; + $41 = ((($3)) + 24|0); + $42 = +HEAPF32[$41>>2]; + $43 = ((($3)) + 40|0); + $44 = +HEAPF32[$43>>2]; + $45 = ((($3)) + 56|0); + $46 = +HEAPF32[$45>>2]; + $47 = $$222 * $$222; + $48 = $23 * $47; + $49 = $22 + $48; + $50 = $$221 * $$222; + $51 = $23 * $50; + $52 = $21 * $$; + $53 = $52 + $51; + $54 = $$ * $$222; + $55 = $23 * $54; + $56 = $21 * $$221; + $57 = $55 - $56; + $58 = $51 - $52; + $59 = $$221 * $$221; + $60 = $23 * $59; + $61 = $22 + $60; + $62 = $$ * $$221; + $63 = $23 * $62; + $64 = $21 * $$222; + $65 = $64 + $63; + $66 = $56 + $55; + $67 = $63 - $64; + $68 = $$ * $$; + $69 = $23 * $68; + $70 = $22 + $69; + $71 = $24 * $49; + $72 = $53 * $32; + $73 = $71 + $72; + $74 = $57 * $40; + $75 = $73 + $74; + $76 = $26 * $49; + $77 = $53 * $34; + $78 = $76 + $77; + $79 = $57 * $42; + $80 = $78 + $79; + $81 = $28 * $49; + $82 = $53 * $36; + $83 = $81 + $82; + $84 = $57 * $44; + $85 = $83 + $84; + $86 = $30 * $49; + $87 = $53 * $38; + $88 = $86 + $87; + $89 = $57 * $46; + $90 = $88 + $89; + $91 = $24 * $58; + $92 = $61 * $32; + $93 = $91 + $92; + $94 = $65 * $40; + $95 = $93 + $94; + $96 = $26 * $58; + $97 = $61 * $34; + $98 = $96 + $97; + $99 = $65 * $42; + $100 = $98 + $99; + $101 = $28 * $58; + $102 = $61 * $36; + $103 = $101 + $102; + $104 = $65 * $44; + $105 = $103 + $104; + $106 = $30 * $58; + $107 = $61 * $38; + $108 = $106 + $107; + $109 = $65 * $46; + $110 = $108 + $109; + $111 = $24 * $66; + $112 = $67 * $32; + $113 = $111 + $112; + $114 = $70 * $40; + $115 = $113 + $114; + $116 = $26 * $66; + $117 = $67 * $34; + $118 = $116 + $117; + $119 = $70 * $42; + $120 = $118 + $119; + $121 = $28 * $66; + $122 = $67 * $36; + $123 = $121 + $122; + $124 = $70 * $44; + $125 = $123 + $124; + $126 = $30 * $66; + $127 = $67 * $38; + $128 = $126 + $127; + $129 = $70 * $46; + $130 = $128 + $129; + $131 = ((($3)) + 12|0); + $132 = HEAP32[$131>>2]|0; + $133 = ((($3)) + 28|0); + $134 = HEAP32[$133>>2]|0; + $135 = ((($3)) + 44|0); + $136 = HEAP32[$135>>2]|0; + $137 = ((($3)) + 60|0); + $138 = HEAP32[$137>>2]|0; + HEAPF32[$0>>2] = $75; + $$sroa$4$0$$sroa_idx187 = ((($0)) + 4|0); + HEAPF32[$$sroa$4$0$$sroa_idx187>>2] = $95; + $$sroa$5$0$$sroa_idx189 = ((($0)) + 8|0); + HEAPF32[$$sroa$5$0$$sroa_idx189>>2] = $115; + $$sroa$6$0$$sroa_idx191 = ((($0)) + 12|0); + HEAP32[$$sroa$6$0$$sroa_idx191>>2] = $132; + $$sroa$7$0$$sroa_idx193 = ((($0)) + 16|0); + HEAPF32[$$sroa$7$0$$sroa_idx193>>2] = $80; + $$sroa$8$0$$sroa_idx195 = ((($0)) + 20|0); + HEAPF32[$$sroa$8$0$$sroa_idx195>>2] = $100; + $$sroa$9$0$$sroa_idx197 = ((($0)) + 24|0); + HEAPF32[$$sroa$9$0$$sroa_idx197>>2] = $120; + $$sroa$10$0$$sroa_idx199 = ((($0)) + 28|0); + HEAP32[$$sroa$10$0$$sroa_idx199>>2] = $134; + $$sroa$11$0$$sroa_idx201 = ((($0)) + 32|0); + HEAPF32[$$sroa$11$0$$sroa_idx201>>2] = $85; + $$sroa$12$0$$sroa_idx203 = ((($0)) + 36|0); + HEAPF32[$$sroa$12$0$$sroa_idx203>>2] = $105; + $$sroa$13$0$$sroa_idx205 = ((($0)) + 40|0); + HEAPF32[$$sroa$13$0$$sroa_idx205>>2] = $125; + $$sroa$14$0$$sroa_idx207 = ((($0)) + 44|0); + HEAP32[$$sroa$14$0$$sroa_idx207>>2] = $136; + $$sroa$15$0$$sroa_idx209 = ((($0)) + 48|0); + HEAPF32[$$sroa$15$0$$sroa_idx209>>2] = $90; + $$sroa$16$0$$sroa_idx211 = ((($0)) + 52|0); + HEAPF32[$$sroa$16$0$$sroa_idx211>>2] = $110; + $$sroa$17$0$$sroa_idx213 = ((($0)) + 56|0); + HEAPF32[$$sroa$17$0$$sroa_idx213>>2] = $130; + $$sroa$18$0$$sroa_idx215 = ((($0)) + 60|0); + HEAP32[$$sroa$18$0$$sroa_idx215>>2] = $138; + STACKTOP = sp;return; +} +function _MatrixTranspose($0) { + $0 = $0|0; + var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0, $5 = 0; + var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = ((($0)) + 4|0); + $2 = HEAP32[$1>>2]|0; + $3 = ((($0)) + 8|0); + $4 = HEAP32[$3>>2]|0; + $5 = ((($0)) + 12|0); + $6 = HEAP32[$5>>2]|0; + $7 = ((($0)) + 16|0); + $8 = HEAP32[$7>>2]|0; + $9 = ((($0)) + 24|0); + $10 = HEAP32[$9>>2]|0; + $11 = ((($0)) + 28|0); + $12 = HEAP32[$11>>2]|0; + $13 = ((($0)) + 32|0); + $14 = HEAP32[$13>>2]|0; + $15 = ((($0)) + 36|0); + $16 = HEAP32[$15>>2]|0; + $17 = ((($0)) + 44|0); + $18 = HEAP32[$17>>2]|0; + $19 = ((($0)) + 48|0); + $20 = HEAP32[$19>>2]|0; + $21 = ((($0)) + 52|0); + $22 = HEAP32[$21>>2]|0; + $23 = ((($0)) + 56|0); + $24 = HEAP32[$23>>2]|0; + HEAP32[$1>>2] = $8; + HEAP32[$3>>2] = $14; + HEAP32[$5>>2] = $20; + HEAP32[$7>>2] = $2; + HEAP32[$9>>2] = $16; + HEAP32[$11>>2] = $22; + HEAP32[$13>>2] = $4; + HEAP32[$15>>2] = $10; + HEAP32[$17>>2] = $24; + HEAP32[$19>>2] = $6; + HEAP32[$21>>2] = $12; + HEAP32[$23>>2] = $18; + return; +} +function _VectorLength($0) { + $0 = $0|0; + var $1 = 0.0, $10 = 0.0, $11 = 0.0, $2 = 0.0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + $1 = +HEAPF32[$0>>2]; + $2 = $1 * $1; + $3 = ((($0)) + 4|0); + $4 = +HEAPF32[$3>>2]; + $5 = $4 * $4; + $6 = $2 + $5; + $7 = ((($0)) + 8|0); + $8 = +HEAPF32[$7>>2]; + $9 = $8 * $8; + $10 = $6 + $9; + $11 = (+Math_sqrt((+$10))); + return (+$11); +} +function _MatrixTranslate($0,$1,$2,$3) { + $0 = $0|0; + $1 = +$1; + $2 = +$2; + $3 = +$3; + var $$sroa$13$0$$sroa_idx20 = 0, $$sroa$14$0$$sroa_idx22 = 0, $$sroa$15$0$$sroa_idx24 = 0, $$sroa$16$0$$sroa_idx26 = 0, $$sroa$17$0$$sroa_idx28 = 0, $$sroa$18$0$$sroa_idx30 = 0, $$sroa$4$0$$sroa_idx2 = 0, $$sroa$8$0$$sroa_idx10 = 0, $$sroa$9$0$$sroa_idx12 = 0, label = 0, sp = 0; + sp = STACKTOP; + HEAPF32[$0>>2] = 1.0; + $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); + $$sroa$8$0$$sroa_idx10 = ((($0)) + 20|0); + ;HEAP32[$$sroa$4$0$$sroa_idx2>>2]=0|0;HEAP32[$$sroa$4$0$$sroa_idx2+4>>2]=0|0;HEAP32[$$sroa$4$0$$sroa_idx2+8>>2]=0|0;HEAP32[$$sroa$4$0$$sroa_idx2+12>>2]=0|0; + HEAPF32[$$sroa$8$0$$sroa_idx10>>2] = 1.0; + $$sroa$9$0$$sroa_idx12 = ((($0)) + 24|0); + $$sroa$13$0$$sroa_idx20 = ((($0)) + 40|0); + ;HEAP32[$$sroa$9$0$$sroa_idx12>>2]=0|0;HEAP32[$$sroa$9$0$$sroa_idx12+4>>2]=0|0;HEAP32[$$sroa$9$0$$sroa_idx12+8>>2]=0|0;HEAP32[$$sroa$9$0$$sroa_idx12+12>>2]=0|0; + HEAPF32[$$sroa$13$0$$sroa_idx20>>2] = 1.0; + $$sroa$14$0$$sroa_idx22 = ((($0)) + 44|0); + HEAPF32[$$sroa$14$0$$sroa_idx22>>2] = 0.0; + $$sroa$15$0$$sroa_idx24 = ((($0)) + 48|0); + HEAPF32[$$sroa$15$0$$sroa_idx24>>2] = $1; + $$sroa$16$0$$sroa_idx26 = ((($0)) + 52|0); + HEAPF32[$$sroa$16$0$$sroa_idx26>>2] = $2; + $$sroa$17$0$$sroa_idx28 = ((($0)) + 56|0); + HEAPF32[$$sroa$17$0$$sroa_idx28>>2] = $3; + $$sroa$18$0$$sroa_idx30 = ((($0)) + 60|0); + HEAPF32[$$sroa$18$0$$sroa_idx30>>2] = 1.0; + return; +} +function _rlLoadIdentity() { + var $0 = 0, $1 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $0 = sp; + $1 = HEAP32[4648]|0; + _MatrixIdentity($0); + dest=$1; src=$0; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); STACKTOP = sp;return; } function _FormatText($0,$varargs) { @@ -15315,8 +10759,8 @@ function _FormatText($0,$varargs) { STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); $1 = sp; HEAP32[$1>>2] = $varargs; - (_vsprintf(20875,$0,$1)|0); - STACKTOP = sp;return (20875|0); + (_vsprintf(19668,$0,$1)|0); + STACKTOP = sp;return (19668|0); } function _DrawFPS($0,$1) { $0 = $0|0; @@ -15326,22 +10770,22 @@ function _DrawFPS($0,$1) { STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); $$byval_copy = sp; $2 = sp + 4|0; - $3 = HEAP32[4751]|0; - $4 = HEAP32[755]|0; + $3 = HEAP32[4654]|0; + $4 = HEAP32[741]|0; $5 = ($3|0)<($4|0); if ($5) { $6 = (($3) + 1)|0; $$sink = $6; } else { $7 = (_GetFPS()|0); - HEAP32[4752] = $7; - HEAP32[755] = $7; + HEAP32[4655] = $7; + HEAP32[741] = $7; $$sink = 0; } - HEAP32[4751] = $$sink; - $8 = HEAP32[4752]|0; + HEAP32[4654] = $$sink; + $8 = HEAP32[4655]|0; HEAP32[$$byval_copy>>2] = $8; - (_FormatText(10919,$$byval_copy)|0); + (_FormatText(4270,$$byval_copy)|0); HEAP8[$2>>0] = 0; $9 = ((($2)) + 1|0); HEAP8[$9>>0] = -98; @@ -15350,9 +10794,151 @@ function _DrawFPS($0,$1) { $11 = ((($2)) + 3|0); HEAP8[$11>>0] = -1; ;HEAP8[$$byval_copy>>0]=HEAP8[$2>>0]|0;HEAP8[$$byval_copy+1>>0]=HEAP8[$2+1>>0]|0;HEAP8[$$byval_copy+2>>0]=HEAP8[$2+2>>0]|0;HEAP8[$$byval_copy+3>>0]=HEAP8[$2+3>>0]|0; - _DrawText(20875,$0,$1,20,$$byval_copy); + _DrawText(19668,$0,$1,20,$$byval_copy); STACKTOP = sp;return; } +function _GetFPS() { + var $0 = 0.0, $1 = 0.0, $2 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = (+_GetFrameTime()); + $1 = 1.0 / $0; + $2 = (~~(($1))); + return ($2|0); +} +function _GetFrameTime() { + var $0 = 0.0, $1 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + $0 = +HEAPF64[2064]; + $1 = $0; + return (+$1); +} +function _rlglLoadRenderTexture($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0; + var $vararg_buffer1 = 0, $vararg_buffer3 = 0, $vararg_buffer5 = 0, $vararg_buffer7 = 0, $vararg_buffer9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(96|0); + $vararg_buffer9 = sp + 40|0; + $vararg_buffer7 = sp + 32|0; + $vararg_buffer5 = sp + 24|0; + $vararg_buffer3 = sp + 16|0; + $vararg_buffer1 = sp + 8|0; + $vararg_buffer = sp; + $3 = sp + 44|0; + HEAP32[$3>>2] = 0; + $4 = ((($3)) + 4|0); + HEAP32[$4>>2] = 0; + $5 = ((($3)) + 8|0); + HEAP32[$5>>2] = $1; + $6 = ((($3)) + 12|0); + HEAP32[$6>>2] = $2; + $7 = ((($3)) + 20|0); + HEAP32[$7>>2] = 7; + $8 = ((($3)) + 16|0); + HEAP32[$8>>2] = 1; + $9 = ((($3)) + 24|0); + HEAP32[$9>>2] = 0; + $10 = ((($3)) + 28|0); + HEAP32[$10>>2] = $1; + $11 = ((($3)) + 32|0); + HEAP32[$11>>2] = $2; + $12 = ((($3)) + 40|0); + HEAP32[$12>>2] = 19; + $13 = ((($3)) + 36|0); + HEAP32[$13>>2] = 1; + _glGenTextures(1,($4|0)); + $14 = HEAP32[$4>>2]|0; + _glBindTexture(3553,($14|0)); + _glTexParameteri(3553,10242,33071); + _glTexParameteri(3553,10243,33071); + _glTexParameteri(3553,10241,9729); + _glTexParameteri(3553,10240,9729); + _glTexImage2D(3553,0,6408,($1|0),($2|0),0,6408,5121,(0|0)); + _glBindTexture(3553,0); + _glGenRenderbuffers(1,($9|0)); + $15 = HEAP32[$9>>2]|0; + _glBindRenderbuffer(36161,($15|0)); + _glRenderbufferStorage(36161,33189,($1|0),($2|0)); + _glGenFramebuffers(1,($3|0)); + $16 = HEAP32[$3>>2]|0; + _glBindFramebuffer(36160,($16|0)); + $17 = HEAP32[$4>>2]|0; + _glFramebufferTexture2D(36160,36064,3553,($17|0),0); + $18 = HEAP32[$9>>2]|0; + _glFramebufferRenderbuffer(36160,36096,36161,($18|0)); + $19 = (_glCheckFramebufferStatus(36160)|0); + $20 = ($19|0)==(36053); + if ($20) { + $21 = HEAP32[$3>>2]|0; + HEAP32[$vararg_buffer9>>2] = $21; + _TraceLog(0,4458,$vararg_buffer9); + _glBindFramebuffer(36160,0); + dest=$0; src=$3; stop=dest+44|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + STACKTOP = sp;return; + } + _TraceLog(1,4278,$vararg_buffer); + switch ($19|0) { + case 36061: { + _TraceLog(1,4321,$vararg_buffer1); + break; + } + case 36054: { + _TraceLog(1,4348,$vararg_buffer3); + break; + } + case 36057: { + _TraceLog(1,4382,$vararg_buffer5); + break; + } + case 36055: { + _TraceLog(1,4416,$vararg_buffer7); + break; + } + default: { + } + } + _glDeleteTextures(1,($4|0)); + _glDeleteTextures(1,($9|0)); + _glDeleteFramebuffers(1,($3|0)); + _glBindFramebuffer(36160,0); + dest=$0; src=$3; stop=dest+44|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + STACKTOP = sp;return; +} +function _rlDeleteRenderTextures($0) { + $0 = $0|0; + var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $vararg_buffer = sp; + $1 = HEAP32[$0>>2]|0; + $2 = ($1|0)==(0); + if (!($2)) { + _glDeleteFramebuffers(1,($0|0)); + } + $3 = ((($0)) + 4|0); + $4 = HEAP32[$3>>2]|0; + $5 = ($4|0)==(0); + if (!($5)) { + _glDeleteTextures(1,($3|0)); + } + $6 = ((($0)) + 24|0); + $7 = HEAP32[$6>>2]|0; + $8 = ($7|0)==(0); + if (!($8)) { + _glDeleteTextures(1,($6|0)); + } + $9 = HEAP32[$0>>2]|0; + HEAP32[$vararg_buffer>>2] = $9; + _TraceLog(0,4510,$vararg_buffer); + STACKTOP = sp;return; +} +function _rlGetVersion() { + var label = 0, sp = 0; + sp = STACKTOP; + return 4; +} function _DrawCube($0,$1,$2,$3,$4) { $0 = $0|0; $1 = +$1; @@ -15489,6 +11075,28 @@ function _DrawCubeWires($0,$1,$2,$3,$4) { _rlPopMatrix(); return; } +function _MatrixScale($0,$1,$2,$3) { + $0 = $0|0; + $1 = +$1; + $2 = +$2; + $3 = +$3; + var $$sroa$5$0$$sroa_idx = 0, $$sroa$55$0$$sroa_idx6 = 0, $$sroa$6$0$$sroa_idx = 0, $$sroa$611$0$$sroa_idx12 = 0, $$sroa$7$0$$sroa_idx = 0, $$sroa$717$0$$sroa_idx18 = 0, label = 0, sp = 0; + sp = STACKTOP; + HEAPF32[$0>>2] = $1; + $$sroa$5$0$$sroa_idx = ((($0)) + 4|0); + ;HEAP32[$$sroa$5$0$$sroa_idx>>2]=0|0;HEAP32[$$sroa$5$0$$sroa_idx+4>>2]=0|0;HEAP32[$$sroa$5$0$$sroa_idx+8>>2]=0|0;HEAP32[$$sroa$5$0$$sroa_idx+12>>2]=0|0; + $$sroa$55$0$$sroa_idx6 = ((($0)) + 20|0); + HEAPF32[$$sroa$55$0$$sroa_idx6>>2] = $2; + $$sroa$6$0$$sroa_idx = ((($0)) + 24|0); + ;HEAP32[$$sroa$6$0$$sroa_idx>>2]=0|0;HEAP32[$$sroa$6$0$$sroa_idx+4>>2]=0|0;HEAP32[$$sroa$6$0$$sroa_idx+8>>2]=0|0;HEAP32[$$sroa$6$0$$sroa_idx+12>>2]=0|0; + $$sroa$611$0$$sroa_idx12 = ((($0)) + 40|0); + HEAPF32[$$sroa$611$0$$sroa_idx12>>2] = $3; + $$sroa$7$0$$sroa_idx = ((($0)) + 44|0); + ;HEAP32[$$sroa$7$0$$sroa_idx>>2]=0|0;HEAP32[$$sroa$7$0$$sroa_idx+4>>2]=0|0;HEAP32[$$sroa$7$0$$sroa_idx+8>>2]=0|0;HEAP32[$$sroa$7$0$$sroa_idx+12>>2]=0|0; + $$sroa$717$0$$sroa_idx18 = ((($0)) + 60|0); + HEAPF32[$$sroa$717$0$$sroa_idx18>>2] = 1.0; + return; +} function _DrawGrid($0,$1) { $0 = $0|0; $1 = +$1; @@ -15537,6 +11145,4324 @@ function _DrawGrid($0,$1) { _rlEnd(); return; } +function _rlColor3f($0,$1,$2) { + $0 = +$0; + $1 = +$1; + $2 = +$2; + var $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, label = 0, sp = 0; + sp = STACKTOP; + $3 = $0 * 255.0; + $4 = (~~(($3))&255); + $5 = $1 * 255.0; + $6 = (~~(($5))&255); + $7 = $2 * 255.0; + $8 = (~~(($7))&255); + _rlColor4ub($4,$6,$8,-1); + return; +} +function _VectorSubtract($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $3 = +HEAPF32[$1>>2]; + $4 = +HEAPF32[$2>>2]; + $5 = $3 - $4; + HEAPF32[$0>>2] = $5; + $6 = ((($0)) + 4|0); + $7 = ((($1)) + 4|0); + $8 = +HEAPF32[$7>>2]; + $9 = ((($2)) + 4|0); + $10 = +HEAPF32[$9>>2]; + $11 = $8 - $10; + HEAPF32[$6>>2] = $11; + $12 = ((($0)) + 8|0); + $13 = ((($1)) + 8|0); + $14 = +HEAPF32[$13>>2]; + $15 = ((($2)) + 8|0); + $16 = +HEAPF32[$15>>2]; + $17 = $14 - $16; + HEAPF32[$12>>2] = $17; + return; +} +function _VectorCrossProduct($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $3 = 0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0; + var $9 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + $3 = ((($1)) + 4|0); + $4 = +HEAPF32[$3>>2]; + $5 = ((($2)) + 8|0); + $6 = +HEAPF32[$5>>2]; + $7 = $4 * $6; + $8 = ((($1)) + 8|0); + $9 = +HEAPF32[$8>>2]; + $10 = ((($2)) + 4|0); + $11 = +HEAPF32[$10>>2]; + $12 = $9 * $11; + $13 = $7 - $12; + $14 = +HEAPF32[$2>>2]; + $15 = $9 * $14; + $16 = +HEAPF32[$1>>2]; + $17 = $6 * $16; + $18 = $15 - $17; + $19 = $11 * $16; + $20 = $4 * $14; + $21 = $19 - $20; + HEAPF32[$0>>2] = $13; + $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); + HEAPF32[$$sroa$4$0$$sroa_idx2>>2] = $18; + $$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0); + HEAPF32[$$sroa$5$0$$sroa_idx4>>2] = $21; + return; +} +function _MatrixLookAt($0,$1,$2,$3) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + var $$byval_copy4 = 0, $$byval_copy5 = 0, $$sroa$10$0$$sroa_idx14 = 0, $$sroa$11$0$$sroa_idx16 = 0, $$sroa$12$0$$sroa_idx18 = 0, $$sroa$13$0$$sroa_idx20 = 0, $$sroa$14$0$$sroa_idx22 = 0, $$sroa$15$0$$sroa_idx24 = 0, $$sroa$16$0$$sroa_idx26 = 0, $$sroa$17$0$$sroa_idx28 = 0, $$sroa$18$0$$sroa_idx30 = 0, $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $$sroa$6$0$$sroa_idx6 = 0, $$sroa$7$0$$sroa_idx8 = 0, $$sroa$8$0$$sroa_idx10 = 0, $$sroa$9$0$$sroa_idx12 = 0, $10 = 0, $11 = 0.0, $12 = 0.0; + var $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0, $25 = 0.0, $26 = 0, $27 = 0.0, $28 = 0.0, $29 = 0.0, $30 = 0.0, $31 = 0.0, $32 = 0.0; + var $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0.0, $37 = 0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0.0, $44 = 0.0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $$byval_copy5 = sp + 48|0; + $$byval_copy4 = sp + 36|0; + $4 = sp + 24|0; + $5 = sp + 12|0; + $6 = sp; + ;HEAP32[$$byval_copy4>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$$byval_copy4+8>>2]=HEAP32[$1+8>>2]|0; + ;HEAP32[$$byval_copy5>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$2+4>>2]|0;HEAP32[$$byval_copy5+8>>2]=HEAP32[$2+8>>2]|0; + _VectorSubtract($4,$$byval_copy4,$$byval_copy5); + _VectorNormalize($4); + ;HEAP32[$$byval_copy4>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$3+4>>2]|0;HEAP32[$$byval_copy4+8>>2]=HEAP32[$3+8>>2]|0; + ;HEAP32[$$byval_copy5>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$4+4>>2]|0;HEAP32[$$byval_copy5+8>>2]=HEAP32[$4+8>>2]|0; + _VectorCrossProduct($5,$$byval_copy4,$$byval_copy5); + _VectorNormalize($5); + ;HEAP32[$$byval_copy4>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$4+4>>2]|0;HEAP32[$$byval_copy4+8>>2]=HEAP32[$4+8>>2]|0; + ;HEAP32[$$byval_copy5>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$5+4>>2]|0;HEAP32[$$byval_copy5+8>>2]=HEAP32[$5+8>>2]|0; + _VectorCrossProduct($6,$$byval_copy4,$$byval_copy5); + _VectorNormalize($6); + $7 = +HEAPF32[$5>>2]; + $8 = ((($5)) + 4|0); + $9 = +HEAPF32[$8>>2]; + $10 = ((($5)) + 8|0); + $11 = +HEAPF32[$10>>2]; + $12 = +HEAPF32[$1>>2]; + $13 = $7 * $12; + $14 = ((($1)) + 4|0); + $15 = +HEAPF32[$14>>2]; + $16 = $9 * $15; + $17 = $13 + $16; + $18 = ((($1)) + 8|0); + $19 = +HEAPF32[$18>>2]; + $20 = $11 * $19; + $21 = $17 + $20; + $22 = -$21; + $23 = +HEAPF32[$6>>2]; + $24 = ((($6)) + 4|0); + $25 = +HEAPF32[$24>>2]; + $26 = ((($6)) + 8|0); + $27 = +HEAPF32[$26>>2]; + $28 = $12 * $23; + $29 = $15 * $25; + $30 = $28 + $29; + $31 = $19 * $27; + $32 = $30 + $31; + $33 = -$32; + $34 = +HEAPF32[$4>>2]; + $35 = ((($4)) + 4|0); + $36 = +HEAPF32[$35>>2]; + $37 = ((($4)) + 8|0); + $38 = +HEAPF32[$37>>2]; + $39 = $12 * $34; + $40 = $15 * $36; + $41 = $39 + $40; + $42 = $19 * $38; + $43 = $41 + $42; + $44 = -$43; + HEAPF32[$0>>2] = $7; + $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); + HEAPF32[$$sroa$4$0$$sroa_idx2>>2] = $23; + $$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0); + HEAPF32[$$sroa$5$0$$sroa_idx4>>2] = $34; + $$sroa$6$0$$sroa_idx6 = ((($0)) + 12|0); + HEAPF32[$$sroa$6$0$$sroa_idx6>>2] = 0.0; + $$sroa$7$0$$sroa_idx8 = ((($0)) + 16|0); + HEAPF32[$$sroa$7$0$$sroa_idx8>>2] = $9; + $$sroa$8$0$$sroa_idx10 = ((($0)) + 20|0); + HEAPF32[$$sroa$8$0$$sroa_idx10>>2] = $25; + $$sroa$9$0$$sroa_idx12 = ((($0)) + 24|0); + HEAPF32[$$sroa$9$0$$sroa_idx12>>2] = $36; + $$sroa$10$0$$sroa_idx14 = ((($0)) + 28|0); + HEAPF32[$$sroa$10$0$$sroa_idx14>>2] = 0.0; + $$sroa$11$0$$sroa_idx16 = ((($0)) + 32|0); + HEAPF32[$$sroa$11$0$$sroa_idx16>>2] = $11; + $$sroa$12$0$$sroa_idx18 = ((($0)) + 36|0); + HEAPF32[$$sroa$12$0$$sroa_idx18>>2] = $27; + $$sroa$13$0$$sroa_idx20 = ((($0)) + 40|0); + HEAPF32[$$sroa$13$0$$sroa_idx20>>2] = $38; + $$sroa$14$0$$sroa_idx22 = ((($0)) + 44|0); + HEAPF32[$$sroa$14$0$$sroa_idx22>>2] = 0.0; + $$sroa$15$0$$sroa_idx24 = ((($0)) + 48|0); + HEAPF32[$$sroa$15$0$$sroa_idx24>>2] = $22; + $$sroa$16$0$$sroa_idx26 = ((($0)) + 52|0); + HEAPF32[$$sroa$16$0$$sroa_idx26>>2] = $33; + $$sroa$17$0$$sroa_idx28 = ((($0)) + 56|0); + HEAPF32[$$sroa$17$0$$sroa_idx28>>2] = $44; + $$sroa$18$0$$sroa_idx30 = ((($0)) + 60|0); + HEAPF32[$$sroa$18$0$$sroa_idx30>>2] = 1.0; + STACKTOP = sp;return; +} +function _Vector2Distance($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + $2 = +HEAPF32[$0>>2]; + $3 = +HEAPF32[$1>>2]; + $4 = $2 - $3; + $5 = $4 * $4; + $6 = ((($0)) + 4|0); + $7 = +HEAPF32[$6>>2]; + $8 = ((($1)) + 4|0); + $9 = +HEAPF32[$8>>2]; + $10 = $7 - $9; + $11 = $10 * $10; + $12 = $5 + $11; + $13 = (+Math_sqrt((+$12))); + return (+$13); +} +function _Vector2Angle($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + $2 = ((($1)) + 4|0); + $3 = +HEAPF32[$2>>2]; + $4 = ((($0)) + 4|0); + $5 = +HEAPF32[$4>>2]; + $6 = $3 - $5; + $7 = +HEAPF32[$1>>2]; + $8 = +HEAPF32[$0>>2]; + $9 = $7 - $8; + $10 = (+Math_atan2((+$6),(+$9))); + $11 = $10 * 57.2957763671875; + $12 = $11 < 0.0; + $13 = $11 + 360.0; + $$0 = $12 ? $13 : $11; + return (+$$0); +} +function _VectorZero($0) { + $0 = $0|0; + var $1 = 0, $2 = 0, label = 0, sp = 0; + sp = STACKTOP; + HEAPF32[$0>>2] = 0.0; + $1 = ((($0)) + 4|0); + HEAPF32[$1>>2] = 0.0; + $2 = ((($0)) + 8|0); + HEAPF32[$2>>2] = 0.0; + return; +} +function _MatrixFrustum($0,$1,$2,$3,$4,$5,$6) { + $0 = $0|0; + $1 = +$1; + $2 = +$2; + $3 = +$3; + $4 = +$4; + $5 = +$5; + $6 = +$6; + var $$sroa$10$0$$sroa_idx24 = 0, $$sroa$11$0$$sroa_idx26 = 0, $$sroa$12$0$$sroa_idx28 = 0, $$sroa$13$0$$sroa_idx30 = 0, $$sroa$14$0$$sroa_idx32 = 0, $$sroa$15$0$$sroa_idx34 = 0, $$sroa$16$0$$sroa_idx36 = 0, $$sroa$17$0$$sroa_idx38 = 0, $$sroa$18$0$$sroa_idx40 = 0, $$sroa$4$0$$sroa_idx12 = 0, $$sroa$5$0$$sroa_idx14 = 0, $$sroa$6$0$$sroa_idx16 = 0, $$sroa$7$0$$sroa_idx18 = 0, $$sroa$8$0$$sroa_idx20 = 0, $$sroa$9$0$$sroa_idx22 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0; + var $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $27 = 0.0, $28 = 0.0, $29 = 0.0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0.0; + var $35 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + $7 = $2 - $1; + $8 = $7; + $9 = $4 - $3; + $10 = $9; + $11 = $6 - $5; + $12 = $11; + $13 = $5 * 2.0; + $14 = $8; + $15 = $13 / $14; + $16 = $15; + $17 = $10; + $18 = $13 / $17; + $19 = $18; + $20 = $1 + $2; + $21 = $20 / $14; + $22 = $21; + $23 = $3 + $4; + $24 = $23 / $17; + $25 = $24; + $26 = $5 + $6; + $27 = -$26; + $28 = $12; + $29 = $27 / $28; + $30 = $29; + $31 = $5 * $6; + $32 = $31 * 2.0; + $33 = -$32; + $34 = $33 / $28; + $35 = $34; + HEAPF32[$0>>2] = $16; + $$sroa$4$0$$sroa_idx12 = ((($0)) + 4|0); + HEAPF32[$$sroa$4$0$$sroa_idx12>>2] = 0.0; + $$sroa$5$0$$sroa_idx14 = ((($0)) + 8|0); + HEAPF32[$$sroa$5$0$$sroa_idx14>>2] = $22; + $$sroa$6$0$$sroa_idx16 = ((($0)) + 12|0); + HEAPF32[$$sroa$6$0$$sroa_idx16>>2] = 0.0; + $$sroa$7$0$$sroa_idx18 = ((($0)) + 16|0); + HEAPF32[$$sroa$7$0$$sroa_idx18>>2] = 0.0; + $$sroa$8$0$$sroa_idx20 = ((($0)) + 20|0); + HEAPF32[$$sroa$8$0$$sroa_idx20>>2] = $19; + $$sroa$9$0$$sroa_idx22 = ((($0)) + 24|0); + HEAPF32[$$sroa$9$0$$sroa_idx22>>2] = $25; + $$sroa$10$0$$sroa_idx24 = ((($0)) + 28|0); + HEAPF32[$$sroa$10$0$$sroa_idx24>>2] = 0.0; + $$sroa$11$0$$sroa_idx26 = ((($0)) + 32|0); + HEAPF32[$$sroa$11$0$$sroa_idx26>>2] = 0.0; + $$sroa$12$0$$sroa_idx28 = ((($0)) + 36|0); + HEAPF32[$$sroa$12$0$$sroa_idx28>>2] = 0.0; + $$sroa$13$0$$sroa_idx30 = ((($0)) + 40|0); + HEAPF32[$$sroa$13$0$$sroa_idx30>>2] = $30; + $$sroa$14$0$$sroa_idx32 = ((($0)) + 44|0); + HEAPF32[$$sroa$14$0$$sroa_idx32>>2] = $35; + $$sroa$15$0$$sroa_idx34 = ((($0)) + 48|0); + HEAPF32[$$sroa$15$0$$sroa_idx34>>2] = 0.0; + $$sroa$16$0$$sroa_idx36 = ((($0)) + 52|0); + HEAPF32[$$sroa$16$0$$sroa_idx36>>2] = 0.0; + $$sroa$17$0$$sroa_idx38 = ((($0)) + 56|0); + HEAPF32[$$sroa$17$0$$sroa_idx38>>2] = -1.0; + $$sroa$18$0$$sroa_idx40 = ((($0)) + 60|0); + HEAPF32[$$sroa$18$0$$sroa_idx40>>2] = 0.0; + return; +} +function _MatrixPerspective($0,$1,$2,$3,$4) { + $0 = $0|0; + $1 = +$1; + $2 = +$2; + $3 = +$3; + $4 = +$4; + var $10 = 0.0, $11 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + $5 = $1 * 3.1415927410125732; + $6 = $5 / 360.0; + $7 = (+Math_tan((+$6))); + $8 = $7 * $3; + $9 = $8 * $2; + $10 = -$9; + $11 = -$8; + _MatrixFrustum($0,$10,$9,$11,$8,$3,$4); + return; +} +function _MatrixOrtho($0,$1,$2,$3,$4,$5,$6) { + $0 = $0|0; + $1 = +$1; + $2 = +$2; + $3 = +$3; + $4 = +$4; + $5 = +$5; + $6 = +$6; + var $$sroa$10$0$$sroa_idx24 = 0, $$sroa$11$0$$sroa_idx26 = 0, $$sroa$12$0$$sroa_idx28 = 0, $$sroa$13$0$$sroa_idx30 = 0, $$sroa$14$0$$sroa_idx32 = 0, $$sroa$15$0$$sroa_idx34 = 0, $$sroa$16$0$$sroa_idx36 = 0, $$sroa$17$0$$sroa_idx38 = 0, $$sroa$18$0$$sroa_idx40 = 0, $$sroa$4$0$$sroa_idx12 = 0, $$sroa$5$0$$sroa_idx14 = 0, $$sroa$6$0$$sroa_idx16 = 0, $$sroa$7$0$$sroa_idx18 = 0, $$sroa$8$0$$sroa_idx20 = 0, $$sroa$9$0$$sroa_idx22 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0; + var $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $27 = 0.0, $28 = 0.0, $29 = 0.0, $30 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0; + var sp = 0; + sp = STACKTOP; + $7 = $2 - $1; + $8 = $7; + $9 = $4 - $3; + $10 = $9; + $11 = $6 - $5; + $12 = $11; + $13 = 2.0 / $8; + $14 = 2.0 / $10; + $15 = -2.0 / $12; + $16 = $1 + $2; + $17 = -$16; + $18 = $8; + $19 = $17 / $18; + $20 = $19; + $21 = $3 + $4; + $22 = -$21; + $23 = $10; + $24 = $22 / $23; + $25 = $24; + $26 = $5 + $6; + $27 = -$26; + $28 = $12; + $29 = $27 / $28; + $30 = $29; + HEAPF32[$0>>2] = $13; + $$sroa$4$0$$sroa_idx12 = ((($0)) + 4|0); + HEAPF32[$$sroa$4$0$$sroa_idx12>>2] = 0.0; + $$sroa$5$0$$sroa_idx14 = ((($0)) + 8|0); + HEAPF32[$$sroa$5$0$$sroa_idx14>>2] = 0.0; + $$sroa$6$0$$sroa_idx16 = ((($0)) + 12|0); + HEAPF32[$$sroa$6$0$$sroa_idx16>>2] = $20; + $$sroa$7$0$$sroa_idx18 = ((($0)) + 16|0); + HEAPF32[$$sroa$7$0$$sroa_idx18>>2] = 0.0; + $$sroa$8$0$$sroa_idx20 = ((($0)) + 20|0); + HEAPF32[$$sroa$8$0$$sroa_idx20>>2] = $14; + $$sroa$9$0$$sroa_idx22 = ((($0)) + 24|0); + HEAPF32[$$sroa$9$0$$sroa_idx22>>2] = 0.0; + $$sroa$10$0$$sroa_idx24 = ((($0)) + 28|0); + HEAPF32[$$sroa$10$0$$sroa_idx24>>2] = $25; + $$sroa$11$0$$sroa_idx26 = ((($0)) + 32|0); + HEAPF32[$$sroa$11$0$$sroa_idx26>>2] = 0.0; + $$sroa$12$0$$sroa_idx28 = ((($0)) + 36|0); + HEAPF32[$$sroa$12$0$$sroa_idx28>>2] = 0.0; + $$sroa$13$0$$sroa_idx30 = ((($0)) + 40|0); + HEAPF32[$$sroa$13$0$$sroa_idx30>>2] = $15; + $$sroa$14$0$$sroa_idx32 = ((($0)) + 44|0); + HEAPF32[$$sroa$14$0$$sroa_idx32>>2] = $30; + $$sroa$15$0$$sroa_idx34 = ((($0)) + 48|0); + HEAPF32[$$sroa$15$0$$sroa_idx34>>2] = 0.0; + $$sroa$16$0$$sroa_idx36 = ((($0)) + 52|0); + HEAPF32[$$sroa$16$0$$sroa_idx36>>2] = 0.0; + $$sroa$17$0$$sroa_idx38 = ((($0)) + 56|0); + HEAPF32[$$sroa$17$0$$sroa_idx38>>2] = 0.0; + $$sroa$18$0$$sroa_idx40 = ((($0)) + 60|0); + HEAPF32[$$sroa$18$0$$sroa_idx40>>2] = 1.0; + return; +} +function _ProcessGestureEvent($0) { + $0 = $0|0; + var $$$sink = 0, $$sink = 0, $$sink10 = 0, $$sink11 = 0, $$sink16 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0.0, $111 = 0.0; + var $112 = 0.0, $113 = 0.0, $114 = 0.0, $115 = 0.0, $116 = 0.0, $117 = 0, $118 = 0, $119 = 0, $12 = 0.0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0; + var $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0; + var $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0.0, $16 = 0, $160 = 0.0, $161 = 0.0, $162 = 0.0, $163 = 0.0, $164 = 0.0, $165 = 0.0, $166 = 0; + var $167 = 0.0, $168 = 0, $169 = 0.0, $17 = 0, $170 = 0.0, $171 = 0.0, $172 = 0, $173 = 0.0, $174 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; + var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; + var $46 = 0, $47 = 0, $48 = 0.0, $49 = 0.0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0.0, $56 = 0.0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0; + var $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0.0, $81 = 0; + var $82 = 0.0, $83 = 0.0, $84 = 0.0, $85 = 0.0, $86 = 0.0, $87 = 0.0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $moveDownPosition$byval_copy11 = 0; + var $moveDownPosition2$byval_copy12 = 0, $or$cond = 0, $or$cond3 = 0, $or$cond5 = 0, $or$cond7 = 0, $or$cond9 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $moveDownPosition2$byval_copy12 = sp + 8|0; + $moveDownPosition$byval_copy11 = sp; + $1 = ((($0)) + 4|0); + $2 = HEAP32[$1>>2]|0; + HEAP32[4673] = $2; + $3 = ($2|0)<(2); + $4 = HEAP32[$0>>2]|0; + $5 = ($4|0)==(1); + if (!($3)) { + if ($5) { + $88 = ((($0)) + 24|0); + $89 = $88; + $90 = $89; + $91 = HEAP32[$90>>2]|0; + $92 = (($89) + 4)|0; + $93 = $92; + $94 = HEAP32[$93>>2]|0; + $95 = 16520; + $96 = $95; + HEAP32[$96>>2] = $91; + $97 = (($95) + 4)|0; + $98 = $97; + HEAP32[$98>>2] = $94; + $99 = ((($0)) + 32|0); + $100 = $99; + $101 = $100; + $102 = HEAP32[$101>>2]|0; + $103 = (($100) + 4)|0; + $104 = $103; + $105 = HEAP32[$104>>2]|0; + $106 = 16560; + $107 = $106; + HEAP32[$107>>2] = $102; + $108 = (($106) + 4)|0; + $109 = $108; + HEAP32[$109>>2] = $105; + $110 = +HEAPF32[4140]; + $111 = +HEAPF32[4130]; + $112 = $110 - $111; + HEAPF32[4142] = $112; + $113 = +HEAPF32[(16564)>>2]; + $114 = +HEAPF32[(16524)>>2]; + $115 = $113 - $114; + HEAPF32[(16572)>>2] = $115; + HEAP32[4672] = 4; + STACKTOP = sp;return; + } + switch ($4|0) { + case 2: { + ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[16552>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[16552+4>>2]|0; + ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[16576>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[16576+4>>2]|0; + $116 = (+_Vector2Distance($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); + HEAPF32[4678] = $116; + $117 = 16552; + $118 = $117; + $119 = HEAP32[$118>>2]|0; + $120 = (($117) + 4)|0; + $121 = $120; + $122 = HEAP32[$121>>2]|0; + $123 = 16520; + $124 = $123; + HEAP32[$124>>2] = $119; + $125 = (($123) + 4)|0; + $126 = $125; + HEAP32[$126>>2] = $122; + $127 = 16576; + $128 = $127; + $129 = HEAP32[$128>>2]|0; + $130 = (($127) + 4)|0; + $131 = $130; + $132 = HEAP32[$131>>2]|0; + $133 = 16560; + $134 = $133; + HEAP32[$134>>2] = $129; + $135 = (($133) + 4)|0; + $136 = $135; + HEAP32[$136>>2] = $132; + $137 = ((($0)) + 24|0); + $138 = $137; + $139 = $138; + $140 = HEAP32[$139>>2]|0; + $141 = (($138) + 4)|0; + $142 = $141; + $143 = HEAP32[$142>>2]|0; + $144 = 16552; + $145 = $144; + HEAP32[$145>>2] = $140; + $146 = (($144) + 4)|0; + $147 = $146; + HEAP32[$147>>2] = $143; + $148 = ((($0)) + 32|0); + $149 = $148; + $150 = $149; + $151 = HEAP32[$150>>2]|0; + $152 = (($149) + 4)|0; + $153 = $152; + $154 = HEAP32[$153>>2]|0; + $155 = 16576; + $156 = $155; + HEAP32[$156>>2] = $151; + $157 = (($155) + 4)|0; + $158 = $157; + HEAP32[$158>>2] = $154; + $159 = +HEAPF32[4144]; + $160 = +HEAPF32[4138]; + $161 = $159 - $160; + HEAPF32[4142] = $161; + $162 = +HEAPF32[(16580)>>2]; + $163 = +HEAPF32[(16556)>>2]; + $164 = $162 - $163; + HEAPF32[(16572)>>2] = $164; + ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[16520>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[16520+4>>2]|0; + ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[16552>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[16552+4>>2]|0; + $165 = (+_Vector2Distance($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); + $166 = !($165 >= 0.004999999888241291); + if ($166) { + ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[16560>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[16560+4>>2]|0; + ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[16576>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[16576+4>>2]|0; + $167 = (+_Vector2Distance($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); + $168 = !($167 >= 0.004999999888241291); + if ($168) { + $$sink16 = 4; + } else { + label = 29; + } + } else { + label = 29; + } + if ((label|0) == 29) { + ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[16552>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[16552+4>>2]|0; + ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[16576>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[16576+4>>2]|0; + $169 = (+_Vector2Distance($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); + $170 = +HEAPF32[4678]; + $171 = $169 - $170; + $172 = $171 < 0.0; + $$sink11 = $172 ? 256 : 512; + $$sink16 = $$sink11; + } + HEAP32[4672] = $$sink16; + ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[16552>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[16552+4>>2]|0; + ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[16576>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[16576+4>>2]|0; + $173 = (+_Vector2Angle($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); + $174 = 360.0 - $173; + HEAPF32[4679] = $174; + STACKTOP = sp;return; + break; + } + case 0: { + HEAPF32[4678] = 0.0; + HEAPF32[4679] = 0.0; + HEAPF32[4142] = 0.0; + HEAPF32[(16572)>>2] = 0.0; + HEAP32[4673] = 0; + HEAP32[4672] = 0; + STACKTOP = sp;return; + break; + } + default: { + STACKTOP = sp;return; + } + } + } + if ($5) { + $6 = HEAP32[4674]|0; + $7 = (($6) + 1)|0; + HEAP32[4674] = $7; + $8 = HEAP32[4672]|0; + $9 = ($8|0)==(0); + $10 = ($6|0)>(0); + $or$cond = $10 & $9; + if ($or$cond) { + $11 = ((($0)) + 24|0); + ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[16520>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[16520+4>>2]|0; + ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[$11>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[$11+4>>2]|0; + $12 = (+_Vector2Distance($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); + $13 = $12 < 0.029999999329447746; + if ($13) { + HEAP32[4672] = 2; + HEAP32[4674] = 0; + } else { + label = 6; + } + } else { + label = 6; + } + if ((label|0) == 6) { + HEAP32[4674] = 1; + HEAP32[4672] = 1; + } + $14 = ((($0)) + 24|0); + $15 = $14; + $16 = $15; + $17 = HEAP32[$16>>2]|0; + $18 = (($15) + 4)|0; + $19 = $18; + $20 = HEAP32[$19>>2]|0; + $21 = 16520; + $22 = $21; + HEAP32[$22>>2] = $17; + $23 = (($21) + 4)|0; + $24 = $23; + HEAP32[$24>>2] = $20; + $25 = 16528; + $26 = $25; + HEAP32[$26>>2] = $17; + $27 = (($25) + 4)|0; + $28 = $27; + HEAP32[$28>>2] = $20; + $29 = 16536; + $30 = $29; + HEAP32[$30>>2] = $17; + $31 = (($29) + 4)|0; + $32 = $31; + HEAP32[$32>>2] = $20; + $33 = ((($0)) + 8|0); + $34 = HEAP32[$33>>2]|0; + HEAP32[742] = $34; + HEAPF32[4136] = 0.0; + HEAPF32[(16548)>>2] = 0.0; + STACKTOP = sp;return; + } + switch ($4|0) { + case 0: { + $35 = HEAP32[4672]|0; + $36 = ($35|0)==(8); + if ($36) { + $37 = ((($0)) + 24|0); + $38 = $37; + $39 = $38; + $40 = HEAP32[$39>>2]|0; + $41 = (($38) + 4)|0; + $42 = $41; + $43 = HEAP32[$42>>2]|0; + $44 = 16536; + $45 = $44; + HEAP32[$45>>2] = $40; + $46 = (($44) + 4)|0; + $47 = $46; + HEAP32[$47>>2] = $43; + } + ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[16520>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[16520+4>>2]|0; + ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[16536>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[16536+4>>2]|0; + $48 = (+_Vector2Distance($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); + $49 = $48 / 0.0; + HEAPF32[4675] = $49; + HEAP32[4676] = 0; + $50 = $49 > 5.0000002374872565E-4; + if ($50) { + $51 = HEAP32[742]|0; + $52 = ((($0)) + 8|0); + $53 = HEAP32[$52>>2]|0; + $54 = ($51|0)==($53|0); + if ($54) { + ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[16520>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[16520+4>>2]|0; + ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[16536>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[16536+4>>2]|0; + $55 = (+_Vector2Angle($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); + $56 = 360.0 - $55; + HEAPF32[4677] = $56; + $57 = $56 < 30.0; + $58 = $56 > 330.0; + $or$cond3 = $57 | $58; + if ($or$cond3) { + $$sink10 = 16; + } else { + $59 = $56 > 30.0; + $60 = $56 < 120.0; + $or$cond5 = $59 & $60; + if ($or$cond5) { + $$sink10 = 64; + } else { + $61 = $56 > 120.0; + $62 = $56 < 210.0; + $or$cond7 = $61 & $62; + $63 = $56 > 210.0; + $64 = $56 < 300.0; + $or$cond9 = $63 & $64; + $$sink = $or$cond9 ? 128 : 0; + $$$sink = $or$cond7 ? 32 : $$sink; + $$sink10 = $$$sink; + } + } + } else { + label = 16; + } + } else { + label = 16; + } + if ((label|0) == 16) { + HEAPF32[4675] = 0.0; + HEAPF32[4677] = 0.0; + $$sink10 = 0; + } + HEAP32[4672] = $$sink10; + HEAPF32[4132] = 0.0; + HEAPF32[(16532)>>2] = 0.0; + HEAP32[4673] = 0; + STACKTOP = sp;return; + break; + } + case 2: { + $65 = HEAP32[4676]|0; + $66 = ($65|0)==(0); + if ($66) { + HEAP32[4676] = 1; + } + $67 = ((($0)) + 24|0); + $68 = $67; + $69 = $68; + $70 = HEAP32[$69>>2]|0; + $71 = (($68) + 4)|0; + $72 = $71; + $73 = HEAP32[$72>>2]|0; + $74 = 16552; + $75 = $74; + HEAP32[$75>>2] = $70; + $76 = (($74) + 4)|0; + $77 = $76; + HEAP32[$77>>2] = $73; + $78 = HEAP32[4672]|0; + $79 = ($78|0)==(4); + if ($79) { + ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[16520>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[16520+4>>2]|0; + ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[16552>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[16552+4>>2]|0; + $80 = (+_Vector2Distance($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); + $81 = !($80 >= 0.014999999664723873); + if (!($81)) { + HEAP32[4672] = 8; + } + } + $82 = +HEAPF32[4138]; + $83 = +HEAPF32[4132]; + $84 = $82 - $83; + HEAPF32[4136] = $84; + $85 = +HEAPF32[(16556)>>2]; + $86 = +HEAPF32[(16532)>>2]; + $87 = $85 - $86; + HEAPF32[(16548)>>2] = $87; + STACKTOP = sp;return; + break; + } + default: { + STACKTOP = sp;return; + } + } +} +function _UpdateGestures() { + var $$off = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $or$cond3 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[4672]|0; + $$off = (($0) + -1)|0; + $1 = ($$off>>>0)<(2); + $2 = HEAP32[4673]|0; + $3 = ($2|0)<(2); + $or$cond3 = $1 & $3; + if ($or$cond3) { + HEAP32[4672] = 4; + } + $4 = HEAP32[4672]|0; + $5 = (($4) + -16)|0; + $6 = $5 >>> 4; + $7 = $5 << 28; + $8 = $6 | $7; + switch ($8|0) { + case 0: case 1: case 3: case 7: { + break; + } + default: { + return; + } + } + HEAP32[4672] = 0; + return; +} +function _SetCameraMode($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $$off = 0, $$sroa$024$0$$sroa_idx = 0, $$sroa$024$0$copyload = 0.0, $$sroa$031$0$copyload = 0.0, $$sroa$4$0$$sroa_idx26 = 0, $$sroa$4$0$copyload = 0.0, $$sroa$433$0$$sroa_idx34 = 0, $$sroa$433$0$copyload = 0.0, $$sroa$528$0$$sroa_idx29 = 0, $$sroa$528$0$copyload = 0.0, $$sroa$536$0$$sroa_idx37 = 0, $$sroa$536$0$copyload = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0; + var $18 = 0.0, $19 = 0.0, $2 = 0.0, $20 = 0.0, $21 = 0, $22 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + $$sroa$031$0$copyload = +HEAPF32[$0>>2]; + $$sroa$433$0$$sroa_idx34 = ((($0)) + 4|0); + $$sroa$433$0$copyload = +HEAPF32[$$sroa$433$0$$sroa_idx34>>2]; + $$sroa$536$0$$sroa_idx37 = ((($0)) + 8|0); + $$sroa$536$0$copyload = +HEAPF32[$$sroa$536$0$$sroa_idx37>>2]; + $$sroa$024$0$$sroa_idx = ((($0)) + 12|0); + $$sroa$024$0$copyload = +HEAPF32[$$sroa$024$0$$sroa_idx>>2]; + $$sroa$4$0$$sroa_idx26 = ((($0)) + 16|0); + $$sroa$4$0$copyload = +HEAPF32[$$sroa$4$0$$sroa_idx26>>2]; + $$sroa$528$0$$sroa_idx29 = ((($0)) + 20|0); + $$sroa$528$0$copyload = +HEAPF32[$$sroa$528$0$$sroa_idx29>>2]; + $2 = $$sroa$024$0$copyload - $$sroa$031$0$copyload; + $3 = $$sroa$4$0$copyload - $$sroa$433$0$copyload; + $4 = $$sroa$528$0$copyload - $$sroa$536$0$copyload; + $5 = $2 * $2; + $6 = $3 * $3; + $7 = $5 + $6; + $8 = $4 * $4; + $9 = $7 + $8; + $10 = (+Math_sqrt((+$9))); + HEAPF32[4680] = $10; + $11 = $5 + $8; + $12 = (+Math_sqrt((+$11))); + $13 = (+Math_sqrt((+$7))); + $14 = (+Math_abs((+$2))); + $15 = $14 / $12; + $16 = (+Math_asin((+$15))); + HEAPF32[4681] = $16; + $17 = (+Math_abs((+$3))); + $18 = $17 / $13; + $19 = (+Math_asin((+$18))); + $20 = -$19; + HEAPF32[4682] = $20; + $21 = HEAP32[$$sroa$433$0$$sroa_idx34>>2]|0; + HEAP32[743] = $21; + $$off = (($1) + -3)|0; + $22 = ($$off>>>0)<(2); + if ($22) { + _DisableCursor(); + HEAP32[4683] = $1; + return; + } else { + _EnableCursor(); + HEAP32[4683] = $1; + return; + } +} +function _DisableCursor() { + var label = 0, sp = 0; + sp = STACKTOP; + HEAP32[4684] = 1; + HEAP32[4685] = 1; + return; +} +function _EnableCursor() { + var label = 0, sp = 0; + sp = STACKTOP; + HEAP32[4684] = 1; + HEAP32[4685] = 0; + return; +} +function _UpdateCamera($0) { + $0 = $0|0; + var $$ = 0, $$0 = 0, $$not = 0, $$not170 = 0, $$pr = 0, $$pr172 = 0, $$sink = 0.0, $$sink15 = 0, $$sink20 = 0.0, $$sink20$p = 0.0, $$sink24 = 0.0, $$sink26 = 0.0, $1 = 0, $10 = 0, $100 = 0.0, $101 = 0.0, $102 = 0.0, $103 = 0.0, $104 = 0.0, $105 = 0; + var $106 = 0, $107 = 0.0, $108 = 0.0, $109 = 0.0, $11 = 0, $110 = 0, $111 = 0, $112 = 0.0, $113 = 0.0, $114 = 0.0, $115 = 0.0, $116 = 0.0, $117 = 0.0, $118 = 0.0, $119 = 0.0, $12 = 0, $120 = 0.0, $121 = 0.0, $122 = 0.0, $123 = 0.0; + var $124 = 0.0, $125 = 0.0, $126 = 0.0, $127 = 0.0, $128 = 0, $129 = 0.0, $13 = 0, $130 = 0, $131 = 0.0, $132 = 0.0, $133 = 0.0, $134 = 0.0, $135 = 0.0, $136 = 0.0, $137 = 0, $138 = 0.0, $139 = 0.0, $14 = 0, $140 = 0.0, $141 = 0.0; + var $142 = 0.0, $143 = 0.0, $144 = 0.0, $145 = 0.0, $146 = 0.0, $147 = 0.0, $148 = 0.0, $149 = 0.0, $15 = 0, $150 = 0.0, $151 = 0.0, $152 = 0, $153 = 0.0, $154 = 0, $155 = 0.0, $156 = 0.0, $157 = 0.0, $158 = 0.0, $159 = 0.0, $16 = 0; + var $160 = 0.0, $161 = 0, $162 = 0, $163 = 0, $164 = 0.0, $165 = 0.0, $166 = 0.0, $167 = 0.0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0.0, $173 = 0.0, $174 = 0.0, $175 = 0.0, $176 = 0.0, $177 = 0.0, $178 = 0.0; + var $179 = 0.0, $18 = 0, $180 = 0.0, $181 = 0, $182 = 0, $183 = 0.0, $184 = 0.0, $185 = 0.0, $186 = 0.0, $187 = 0.0, $188 = 0.0, $189 = 0.0, $19 = 0, $190 = 0.0, $191 = 0.0, $192 = 0.0, $193 = 0.0, $194 = 0.0, $195 = 0.0, $196 = 0.0; + var $197 = 0, $198 = 0.0, $199 = 0.0, $2 = 0, $20 = 0, $200 = 0.0, $201 = 0.0, $202 = 0.0, $203 = 0, $204 = 0.0, $205 = 0.0, $206 = 0.0, $207 = 0.0, $208 = 0.0, $209 = 0.0, $21 = 0, $210 = 0.0, $211 = 0.0, $212 = 0, $213 = 0.0; + var $214 = 0.0, $215 = 0.0, $216 = 0.0, $217 = 0.0, $218 = 0.0, $219 = 0.0, $22 = 0, $220 = 0.0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0.0, $226 = 0.0, $227 = 0, $228 = 0.0, $229 = 0.0, $23 = 0, $230 = 0, $231 = 0.0; + var $232 = 0.0, $233 = 0.0, $234 = 0.0, $235 = 0, $236 = 0.0, $237 = 0.0, $238 = 0.0, $239 = 0, $24 = 0, $240 = 0.0, $241 = 0.0, $242 = 0.0, $243 = 0.0, $244 = 0.0, $245 = 0.0, $246 = 0.0, $247 = 0.0, $248 = 0.0, $249 = 0.0, $25 = 0; + var $250 = 0.0, $251 = 0, $252 = 0.0, $253 = 0.0, $254 = 0, $255 = 0.0, $256 = 0.0, $257 = 0.0, $258 = 0, $259 = 0.0, $26 = 0, $260 = 0.0, $261 = 0.0, $262 = 0.0, $263 = 0.0, $264 = 0.0, $265 = 0.0, $266 = 0.0, $267 = 0.0, $268 = 0.0; + var $269 = 0, $27 = 0, $270 = 0.0, $271 = 0.0, $272 = 0, $273 = 0, $274 = 0.0, $275 = 0.0, $276 = 0.0, $277 = 0.0, $278 = 0.0, $279 = 0.0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0.0, $285 = 0.0, $286 = 0.0; + var $287 = 0.0, $288 = 0, $289 = 0.0, $29 = 0.0, $290 = 0.0, $291 = 0.0, $292 = 0.0, $293 = 0.0, $294 = 0.0, $295 = 0.0, $296 = 0.0, $297 = 0, $298 = 0.0, $299 = 0.0, $3 = 0, $30 = 0.0, $300 = 0, $301 = 0.0, $302 = 0.0, $303 = 0.0; + var $304 = 0.0, $305 = 0, $306 = 0, $307 = 0.0, $308 = 0.0, $309 = 0.0, $31 = 0.0, $310 = 0.0, $311 = 0.0, $312 = 0, $313 = 0.0, $314 = 0.0, $315 = 0.0, $316 = 0.0, $317 = 0.0, $318 = 0, $319 = 0.0, $32 = 0, $320 = 0.0, $321 = 0.0; + var $322 = 0.0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0.0, $328 = 0, $329 = 0.0, $33 = 0.0, $330 = 0.0, $331 = 0.0, $332 = 0.0, $333 = 0.0, $334 = 0.0, $335 = 0.0, $336 = 0.0, $337 = 0, $338 = 0.0, $339 = 0.0, $34 = 0.0; + var $340 = 0, $341 = 0, $342 = 0.0, $343 = 0.0, $344 = 0.0, $345 = 0.0, $346 = 0.0, $347 = 0.0, $348 = 0.0, $349 = 0, $35 = 0.0, $350 = 0.0, $351 = 0.0, $352 = 0, $353 = 0.0, $354 = 0.0, $355 = 0, $356 = 0.0, $357 = 0.0, $358 = 0.0; + var $359 = 0.0, $36 = 0, $360 = 0, $361 = 0.0, $362 = 0.0, $363 = 0.0, $364 = 0, $365 = 0.0, $366 = 0.0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0; + var $377 = 0, $378 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0.0, $47 = 0, $48 = 0, $49 = 0.0, $5 = 0, $50 = 0.0, $51 = 0.0, $52 = 0, $53 = 0; + var $54 = 0.0, $55 = 0, $56 = 0, $57 = 0.0, $58 = 0, $59 = 0, $6 = 0, $60 = 0.0, $61 = 0.0, $62 = 0.0, $63 = 0.0, $64 = 0.0, $65 = 0.0, $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0.0, $7 = 0, $70 = 0.0, $71 = 0.0; + var $72 = 0.0, $73 = 0, $74 = 0.0, $75 = 0, $76 = 0.0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0.0, $81 = 0.0, $82 = 0, $83 = 0.0, $84 = 0.0, $85 = 0.0, $86 = 0.0, $87 = 0.0, $88 = 0.0, $89 = 0.0, $9 = 0; + var $90 = 0.0, $91 = 0.0, $92 = 0.0, $93 = 0.0, $94 = 0.0, $95 = 0.0, $96 = 0, $97 = 0.0, $98 = 0, $99 = 0.0, $not$ = 0, $or$cond = 0, $or$cond11 = 0, $or$cond13 = 0, $or$cond169 = 0, $or$cond171 = 0, $or$cond3 = 0, $or$cond5 = 0, $or$cond7 = 0, $or$cond9 = 0; + var $storemerge = 0.0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $1 = sp; + $2 = sp + 8|0; + _GetMousePosition($1); + $3 = (_GetMouseWheelMove()|0); + $4 = HEAP32[744]|0; + $5 = (_IsMouseButtonDown($4)|0); + $6 = HEAP32[745]|0; + $7 = (_IsKeyDown($6)|0); + $8 = HEAP32[746]|0; + $9 = (_IsKeyDown($8)|0); + $10 = HEAP32[747]|0; + $11 = (_IsKeyDown($10)|0); + HEAP32[$2>>2] = $11; + $12 = ((($2)) + 4|0); + $13 = HEAP32[748]|0; + $14 = (_IsKeyDown($13)|0); + HEAP32[$12>>2] = $14; + $15 = ((($2)) + 8|0); + $16 = HEAP32[749]|0; + $17 = (_IsKeyDown($16)|0); + HEAP32[$15>>2] = $17; + $18 = ((($2)) + 12|0); + $19 = HEAP32[750]|0; + $20 = (_IsKeyDown($19)|0); + HEAP32[$18>>2] = $20; + $21 = ((($2)) + 16|0); + $22 = HEAP32[751]|0; + $23 = (_IsKeyDown($22)|0); + HEAP32[$21>>2] = $23; + $24 = ((($2)) + 20|0); + $25 = HEAP32[752]|0; + $26 = (_IsKeyDown($25)|0); + HEAP32[$24>>2] = $26; + $27 = HEAP32[4683]|0; + $28 = ($27|0)==(0); + L1: do { + if ($28) { + label = 47; + } else { + $29 = +HEAPF32[$1>>2]; + $30 = +HEAPF32[4146]; + $31 = $29 - $30; + $32 = ((($1)) + 4|0); + $33 = +HEAPF32[$32>>2]; + $34 = +HEAPF32[(16588)>>2]; + $35 = $33 - $34; + $36 = $1; + $37 = $36; + $38 = HEAP32[$37>>2]|0; + $39 = (($36) + 4)|0; + $40 = $39; + $41 = HEAP32[$40>>2]|0; + $42 = 16584; + $43 = $42; + HEAP32[$43>>2] = $38; + $44 = (($42) + 4)|0; + $45 = $44; + HEAP32[$45>>2] = $41; + $$pr = HEAP32[4683]|0; + switch ($$pr|0) { + case 1: { + $46 = +HEAPF32[4680]; + $47 = $46 < 120.0; + $48 = ($3|0)<(0); + $or$cond = $48 & $47; + do { + if ($or$cond) { + $49 = (+($3|0)); + $50 = $49 * 1.5; + $51 = $46 - $50; + HEAPF32[4680] = $51; + $52 = $51 > 120.0; + if ($52) { + HEAPF32[4680] = 120.0; + } + } else { + $53 = ((($0)) + 4|0); + $54 = +HEAPF32[$53>>2]; + $55 = ((($0)) + 12|0); + $56 = ((($0)) + 16|0); + $57 = +HEAPF32[$56>>2]; + $58 = $54 > $57; + $59 = $46 == 120.0; + $or$cond3 = $59 & $58; + $or$cond5 = $48 & $or$cond3; + if ($or$cond5) { + $60 = (+($3|0)); + $61 = +HEAPF32[$55>>2]; + $62 = +HEAPF32[$0>>2]; + $63 = $61 - $62; + $64 = $60 * $63; + $65 = $64 * 1.5; + $66 = $65 / $46; + $67 = $61 + $66; + HEAPF32[$55>>2] = $67; + $68 = $57 - $54; + $69 = $60 * $68; + $70 = $69 * 1.5; + $71 = $70 / $46; + $72 = $57 + $71; + HEAPF32[$56>>2] = $72; + $73 = ((($0)) + 20|0); + $74 = +HEAPF32[$73>>2]; + $75 = ((($0)) + 8|0); + $76 = +HEAPF32[$75>>2]; + $77 = $74 - $76; + $78 = $60 * $77; + $79 = $78 * 1.5; + $80 = $79 / $46; + $81 = $74 + $80; + HEAPF32[$73>>2] = $81; + break; + } + $$not = $58 ^ 1; + $82 = !($57 >= 0.0); + $or$cond169 = $82 | $$not; + if (!($or$cond169)) { + $83 = (+($3|0)); + $84 = +HEAPF32[$55>>2]; + $85 = +HEAPF32[$0>>2]; + $86 = $84 - $85; + $87 = $83 * $86; + $88 = $87 * 1.5; + $89 = $88 / $46; + $90 = $84 + $89; + HEAPF32[$55>>2] = $90; + $91 = $57 - $54; + $92 = $83 * $91; + $93 = $92 * 1.5; + $94 = $93 / $46; + $95 = $57 + $94; + HEAPF32[$56>>2] = $95; + $96 = ((($0)) + 20|0); + $97 = +HEAPF32[$96>>2]; + $98 = ((($0)) + 8|0); + $99 = +HEAPF32[$98>>2]; + $100 = $97 - $99; + $101 = $83 * $100; + $102 = $101 * 1.5; + $103 = $102 / $46; + $104 = $97 + $103; + HEAPF32[$96>>2] = $104; + break; + } + if ($58) { + $105 = $57 < 0.0; + $106 = ($3|0)>(0); + $or$cond7 = $106 & $105; + if ($or$cond7) { + $107 = (+($3|0)); + $108 = $107 * 1.5; + $109 = $46 - $108; + HEAPF32[4680] = $109; + $110 = $109 < 0.30000001192092896; + if (!($110)) { + break; + } + HEAPF32[4680] = 0.30000001192092896; + break; + } + } + $111 = $54 < $57; + $or$cond9 = $59 & $111; + $or$cond11 = $48 & $or$cond9; + $112 = +HEAPF32[$56>>2]; + $113 = +HEAPF32[$53>>2]; + if ($or$cond11) { + $114 = (+($3|0)); + $115 = +HEAPF32[$55>>2]; + $116 = +HEAPF32[$0>>2]; + $117 = $115 - $116; + $118 = $114 * $117; + $119 = $118 * 1.5; + $120 = $119 / $46; + $121 = $115 + $120; + HEAPF32[$55>>2] = $121; + $122 = $112 - $113; + $123 = $114 * $122; + $124 = $123 * 1.5; + $125 = +HEAPF32[4680]; + $126 = $124 / $125; + $127 = $112 + $126; + HEAPF32[$56>>2] = $127; + $128 = ((($0)) + 20|0); + $129 = +HEAPF32[$128>>2]; + $130 = ((($0)) + 8|0); + $131 = +HEAPF32[$130>>2]; + $132 = $129 - $131; + $133 = $114 * $132; + $134 = $133 * 1.5; + $135 = $134 / $125; + $136 = $129 + $135; + HEAPF32[$128>>2] = $136; + break; + } + $$not170 = $111 ^ 1; + $137 = !($57 <= 0.0); + $or$cond171 = $137 | $$not170; + if (!($or$cond171)) { + $138 = (+($3|0)); + $139 = +HEAPF32[$55>>2]; + $140 = +HEAPF32[$0>>2]; + $141 = $139 - $140; + $142 = $138 * $141; + $143 = $142 * 1.5; + $144 = $143 / $46; + $145 = $139 + $144; + HEAPF32[$55>>2] = $145; + $146 = $112 - $113; + $147 = $138 * $146; + $148 = $147 * 1.5; + $149 = +HEAPF32[4680]; + $150 = $148 / $149; + $151 = $112 + $150; + HEAPF32[$56>>2] = $151; + $152 = ((($0)) + 20|0); + $153 = +HEAPF32[$152>>2]; + $154 = ((($0)) + 8|0); + $155 = +HEAPF32[$154>>2]; + $156 = $153 - $155; + $157 = $138 * $156; + $158 = $157 * 1.5; + $159 = $158 / $149; + $160 = $153 + $159; + HEAPF32[$152>>2] = $160; + break; + } + $161 = $113 < $112; + if ($161) { + $162 = $112 > 0.0; + $163 = ($3|0)>(0); + $or$cond13 = $163 & $162; + if ($or$cond13) { + $164 = (+($3|0)); + $165 = $164 * 1.5; + $166 = +HEAPF32[4680]; + $167 = $166 - $165; + HEAPF32[4680] = $167; + $168 = $167 < 0.30000001192092896; + if ($168) { + HEAPF32[4680] = 0.30000001192092896; + } + } + } + } + } while(0); + $169 = ($5|0)==(0); + if ($169) { + label = 47; + break L1; + } + $170 = ($7|0)==(0); + if ($170) { + $183 = $31 * -0.0099999997764825821; + $184 = +HEAPF32[4681]; + $185 = (+Math_cos((+$184))); + $186 = $183 * $185; + $187 = $35 * 0.0099999997764825821; + $188 = (+Math_sin((+$184))); + $189 = $187 * $188; + $190 = +HEAPF32[4682]; + $191 = (+Math_sin((+$190))); + $192 = $189 * $191; + $193 = $186 + $192; + $194 = +HEAPF32[4680]; + $195 = $194 / 5.0999999046325684; + $196 = $193 * $195; + $197 = ((($0)) + 12|0); + $198 = +HEAPF32[$197>>2]; + $199 = $198 + $196; + HEAPF32[$197>>2] = $199; + $200 = (+Math_cos((+$190))); + $201 = $187 * $200; + $202 = $195 * $201; + $203 = ((($0)) + 16|0); + $204 = +HEAPF32[$203>>2]; + $205 = $204 + $202; + HEAPF32[$203>>2] = $205; + $206 = $31 * 0.0099999997764825821; + $207 = $206 * $188; + $208 = $187 * $185; + $209 = $208 * $191; + $210 = $207 + $209; + $211 = $210 * $195; + $212 = ((($0)) + 20|0); + $213 = +HEAPF32[$212>>2]; + $214 = $211 + $213; + HEAPF32[$212>>2] = $214; + label = 47; + break L1; + } + $171 = ($9|0)==(0); + if (!($171)) { + $172 = $35 * 0.05000000074505806; + $173 = +HEAPF32[4680]; + $174 = $172 + $173; + HEAPF32[4680] = $174; + label = 47; + break L1; + } + $175 = $31 * 0.0099999997764825821; + $176 = +HEAPF32[4681]; + $177 = $176 - $175; + HEAPF32[4681] = $177; + $178 = $35 * 0.0099999997764825821; + $179 = +HEAPF32[4682]; + $180 = $179 - $178; + HEAPF32[4682] = $180; + $181 = $180 > 1.483529806137085; + if ($181) { + HEAPF32[4682] = 1.483529806137085; + label = 47; + break L1; + } + $182 = $180 < -1.483529806137085; + if (!($182)) { + label = 47; + break L1; + } + HEAPF32[4682] = -1.483529806137085; + label = 47; + break L1; + break; + } + case 2: { + $215 = +HEAPF32[4681]; + $216 = $215 + 0.0099999997764825821; + HEAPF32[4681] = $216; + $217 = (+($3|0)); + $218 = $217 * 1.5; + $219 = +HEAPF32[4680]; + $220 = $219 - $218; + HEAPF32[4680] = $220; + $221 = $220 < 1.2000000476837158; + if (!($221)) { + label = 47; + break L1; + } + HEAPF32[4680] = 1.2000000476837158; + label = 47; + break L1; + break; + } + case 4: case 3: { + $225 = +HEAPF32[4681]; + $226 = (+Math_sin((+$225))); + $227 = HEAP32[$12>>2]|0; + $228 = (+($227>>>0)); + $229 = $226 * $228; + $230 = HEAP32[$2>>2]|0; + $231 = (+($230>>>0)); + $232 = $226 * $231; + $233 = $229 - $232; + $234 = (+Math_cos((+$225))); + $235 = HEAP32[$18>>2]|0; + $236 = (+($235>>>0)); + $237 = $234 * $236; + $238 = $233 - $237; + $239 = HEAP32[$15>>2]|0; + $240 = (+($239>>>0)); + $241 = $234 * $240; + $242 = $238 + $241; + $243 = $242 / 20.0; + $244 = +HEAPF32[$0>>2]; + $245 = $244 + $243; + HEAPF32[$0>>2] = $245; + $246 = +HEAPF32[4682]; + $247 = (+Math_sin((+$246))); + $248 = $231 * $247; + $249 = $228 * $247; + $250 = $248 - $249; + $251 = HEAP32[$21>>2]|0; + $252 = (+($251>>>0)); + $253 = $250 + $252; + $254 = HEAP32[$24>>2]|0; + $255 = (+($254>>>0)); + $256 = $253 - $255; + $257 = $256 / 20.0; + $258 = ((($0)) + 4|0); + $259 = +HEAPF32[$258>>2]; + $260 = $259 + $257; + HEAPF32[$258>>2] = $260; + $261 = $228 * $234; + $262 = $234 * $231; + $263 = $261 - $262; + $264 = $226 * $236; + $265 = $263 + $264; + $266 = $226 * $240; + $267 = $265 - $266; + $268 = $267 / 20.0; + $269 = ((($0)) + 8|0); + $270 = +HEAPF32[$269>>2]; + $271 = $268 + $270; + HEAPF32[$269>>2] = $271; + $272 = HEAP32[$2>>2]|0; + $273 = ($272|0)==(0); + if ($273) { + $222 = ((($2)) + 4|0); + $223 = HEAP32[$222>>2]|0; + $224 = ($223|0)==(0); + if ($224) { + $368 = ((($2)) + 8|0); + $369 = HEAP32[$368>>2]|0; + $370 = ($369|0)==(0); + if ($370) { + $371 = ((($2)) + 12|0); + $372 = HEAP32[$371>>2]|0; + $373 = ($372|0)==(0); + if ($373) { + $374 = ((($2)) + 16|0); + $375 = HEAP32[$374>>2]|0; + $376 = ($375|0)==(0); + if ($376) { + $377 = ((($2)) + 20|0); + $378 = HEAP32[$377>>2]|0; + $not$ = ($378|0)!=(0); + $$ = $not$&1; + $$0 = $$; + } else { + $$0 = 1; + } + } else { + $$0 = 1; + } + } else { + $$0 = 1; + } + } else { + $$0 = 1; + } + } else { + $$0 = 1; + } + $274 = $31 * 0.0030000000260770321; + $275 = +HEAPF32[4681]; + $276 = $275 - $274; + HEAPF32[4681] = $276; + $277 = $35 * 0.0030000000260770321; + $278 = +HEAPF32[4682]; + $279 = $278 - $277; + HEAPF32[4682] = $279; + $280 = HEAP32[4683]|0; + $281 = ($280|0)==(4); + if ($281) { + $282 = $279 > 0.087266460061073303; + if ($282) { + $$sink24 = 0.087266460061073303; + label = 38; + } else { + $283 = $279 < -1.483529806137085; + if ($283) { + $$sink24 = -1.483529806137085; + label = 38; + } + } + if ((label|0) == 38) { + HEAPF32[4682] = $$sink24; + } + $284 = (+($3|0)); + $285 = $284 * 1.5; + $286 = +HEAPF32[4680]; + $287 = $286 - $285; + $288 = $287 < 1.2000000476837158; + $storemerge = $288 ? 1.2000000476837158 : $287; + HEAPF32[4680] = $storemerge; + $289 = +HEAPF32[$0>>2]; + $290 = +HEAPF32[4681]; + $291 = (+Math_cos((+$290))); + $292 = $291 * 0.40000000596046448; + $293 = $289 + $292; + $294 = (+Math_sin((+$290))); + $295 = $294 * 0.0; + $296 = $293 + $295; + $297 = ((($0)) + 12|0); + HEAPF32[$297>>2] = $296; + $298 = +HEAPF32[$258>>2]; + $299 = $298 + 0.0; + $300 = ((($0)) + 16|0); + HEAPF32[$300>>2] = $299; + $301 = +HEAPF32[$269>>2]; + $302 = $295 + $301; + $303 = $294 * 0.40000000596046448; + $304 = $302 - $303; + $$sink = $304;$$sink15 = $297; + } else { + $305 = $279 > 1.483529806137085; + if ($305) { + $$sink26 = 1.483529806137085; + label = 42; + } else { + $306 = $279 < -1.483529806137085; + if ($306) { + $$sink26 = -1.483529806137085; + label = 42; + } + } + if ((label|0) == 42) { + HEAPF32[4682] = $$sink26; + } + $307 = +HEAPF32[$0>>2]; + $308 = +HEAPF32[4681]; + $309 = (+Math_sin((+$308))); + $310 = $309 * 25.0; + $311 = $307 - $310; + $312 = ((($0)) + 12|0); + HEAPF32[$312>>2] = $311; + $313 = +HEAPF32[$258>>2]; + $314 = +HEAPF32[4682]; + $315 = (+Math_sin((+$314))); + $316 = $315 * 25.0; + $317 = $313 + $316; + $318 = ((($0)) + 16|0); + HEAPF32[$318>>2] = $317; + $319 = +HEAPF32[$269>>2]; + $320 = (+Math_cos((+$308))); + $321 = $320 * 25.0; + $322 = $319 - $321; + $323 = ((($0)) + 20|0); + HEAPF32[$323>>2] = $322; + $324 = ($$0|0)==(0); + if (!($324)) { + $325 = HEAP32[4686]|0; + $326 = (($325) + 1)|0; + HEAP32[4686] = $326; + } + $327 = +HEAPF32[743]; + $328 = HEAP32[4686]|0; + $329 = (+($328|0)); + $330 = $329 / 5.0; + $331 = (+Math_sin((+$330))); + $332 = $331 / 30.0; + $333 = $327 - $332; + HEAPF32[$258>>2] = $333; + $334 = $329 / 10.0; + $335 = (+Math_sin((+$334))); + $336 = $335 / 200.0; + $337 = ((($0)) + 24|0); + HEAPF32[$337>>2] = $336; + $338 = -$335; + $339 = $338 / 200.0; + $$sink = $339;$$sink15 = $337; + } + $340 = ((($$sink15)) + 8|0); + HEAPF32[$340>>2] = $$sink; + label = 47; + break L1; + break; + } + default: { + $341 = $$pr; + break L1; + } + } + } + } while(0); + if ((label|0) == 47) { + $$pr172 = HEAP32[4683]|0; + $341 = $$pr172; + } + switch ($341|0) { + case 1: case 2: case 4: { + break; + } + default: { + STACKTOP = sp;return; + } + } + $342 = +HEAPF32[4681]; + $343 = (+Math_sin((+$342))); + $344 = +HEAPF32[4680]; + $345 = $343 * $344; + $346 = +HEAPF32[4682]; + $347 = (+Math_cos((+$346))); + $348 = $345 * $347; + $349 = ((($0)) + 12|0); + $350 = +HEAPF32[$349>>2]; + $351 = $348 + $350; + HEAPF32[$0>>2] = $351; + $352 = !($346 <= 0.0); + $353 = (+Math_sin((+$346))); + $354 = +HEAPF32[4680]; + $355 = ((($0)) + 16|0); + $356 = +HEAPF32[$355>>2]; + $357 = $353 * $354; + $358 = $353 * $357; + $359 = -$358; + $$sink20$p = $352 ? $359 : $358; + $$sink20 = $356 + $$sink20$p; + $360 = ((($0)) + 4|0); + HEAPF32[$360>>2] = $$sink20; + $361 = (+Math_cos((+$342))); + $362 = $354 * $361; + $363 = $347 * $362; + $364 = ((($0)) + 20|0); + $365 = +HEAPF32[$364>>2]; + $366 = $365 + $363; + $367 = ((($0)) + 8|0); + HEAPF32[$367>>2] = $366; + STACKTOP = sp;return; +} +function _GetMousePosition($0) { + $0 = $0|0; + var $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = 16592; + $2 = $1; + $3 = HEAP32[$2>>2]|0; + $4 = (($1) + 4)|0; + $5 = $4; + $6 = HEAP32[$5>>2]|0; + $7 = $0; + $8 = $7; + HEAP32[$8>>2] = $3; + $9 = (($7) + 4)|0; + $10 = $9; + HEAP32[$10>>2] = $6; + return; +} +function _GetMouseWheelMove() { + var $0 = 0, $1 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[4688]|0; + $1 = (($0|0) / 100)&-1; + return ($1|0); +} +function _IsMouseButtonDown($0) { + $0 = $0|0; + var $$ = 0, $1 = 0, $2 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = (_GetMouseButtonStatus($0)|0); + $2 = ($1|0)==(1); + $$ = $2&1; + return ($$|0); +} +function _IsKeyDown($0) { + $0 = $0|0; + var $$ = 0, $1 = 0, $2 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = (_GetKeyStatus($0)|0); + $2 = ($1|0)==(1); + $$ = $2&1; + return ($$|0); +} +function _GetKeyStatus($0) { + $0 = $0|0; + var $1 = 0, $2 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = HEAP32[4687]|0; + $2 = (_glfwGetKey(($1|0),($0|0))|0); + return ($2|0); +} +function _GetMouseButtonStatus($0) { + $0 = $0|0; + var $1 = 0, $2 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = HEAP32[4687]|0; + $2 = (_glfwGetMouseButton(($1|0),($0|0))|0); + return ($2|0); +} +function _InitWindow($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $10 = 0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0, $vararg_buffer = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $vararg_buffer = sp; + _TraceLog(0,4567,$vararg_buffer); + HEAP32[4689] = $2; + _InitGraphicsDevice($0,$1); + _LoadDefaultFont(); + _InitTimer(); + (_emscripten_set_fullscreenchange_callback((0|0),(0|0),1,(4|0))|0); + (_emscripten_set_keypress_callback((4596|0),(0|0),1,(5|0))|0); + (_emscripten_set_click_callback((4596|0),(0|0),1,(6|0))|0); + (_emscripten_set_touchstart_callback((4596|0),(0|0),1,(7|0))|0); + (_emscripten_set_touchend_callback((4596|0),(0|0),1,(7|0))|0); + (_emscripten_set_touchmove_callback((4596|0),(0|0),1,(7|0))|0); + (_emscripten_set_touchcancel_callback((4596|0),(0|0),1,(7|0))|0); + (_emscripten_set_gamepadconnected_callback((0|0),1,(8|0))|0); + (_emscripten_set_gamepaddisconnected_callback((0|0),1,(8|0))|0); + $3 = HEAP32[4690]|0; + $4 = (+($3|0)); + $5 = $4 * 0.5; + HEAPF32[4148] = $5; + $6 = HEAP32[4691]|0; + $7 = (+($6|0)); + $8 = $7 * 0.5; + HEAPF32[(16596)>>2] = $8; + $9 = HEAP32[4692]|0; + $10 = ($9|0)==(0); + if ($10) { + STACKTOP = sp;return; + } + _SetTargetFPS(60); + _LogoAnimation(); + STACKTOP = sp;return; +} +function _InitGraphicsDevice($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $$015 = 0, $$byval_copy = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0; + var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0.0, $79 = 0, $8 = 0, $80 = 0; + var $81 = 0, $82 = 0.0, $83 = 0, $84 = 0, $85 = 0, $9 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer10 = 0, $vararg_buffer14 = 0, $vararg_buffer18 = 0, $vararg_buffer22 = 0, $vararg_buffer3 = 0, $vararg_buffer6 = 0, $vararg_buffer8 = 0, $vararg_ptr13 = 0, $vararg_ptr17 = 0, $vararg_ptr21 = 0, $vararg_ptr5 = 0, dest = 0; + var label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 144|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(144|0); + $$byval_copy = sp + 136|0; + $vararg_buffer22 = sp + 64|0; + $vararg_buffer18 = sp + 56|0; + $vararg_buffer14 = sp + 48|0; + $vararg_buffer10 = sp + 40|0; + $vararg_buffer8 = sp + 32|0; + $vararg_buffer6 = sp + 24|0; + $vararg_buffer3 = sp + 16|0; + $vararg_buffer1 = sp + 8|0; + $vararg_buffer = sp; + $2 = sp + 72|0; + $3 = sp + 140|0; + HEAP32[4690] = $0; + HEAP32[4691] = $1; + _MatrixIdentity($2); + dest=18788; src=$2; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + (_glfwSetErrorCallback((1|0))|0); + $4 = (_glfwInit()|0); + $5 = ($4|0)==(0); + if ($5) { + _TraceLog(2,4791,$vararg_buffer); + } + $6 = HEAP32[4690]|0; + HEAP32[4713] = $6; + $7 = HEAP32[4691]|0; + HEAP32[4714] = $7; + _glfwDefaultWindowHints(); + $8 = HEAP8[19732]|0; + $9 = $8 & 4; + $10 = ($9<<24>>24)==(0); + if ($10) { + _glfwWindowHint(131075,0); + } else { + _glfwWindowHint(131075,1); + } + $11 = HEAP8[19732]|0; + $12 = $11 & 8; + $13 = ($12<<24>>24)==(0); + if (!($13)) { + _glfwWindowHint(131077,1); + } + $14 = HEAP8[19732]|0; + $15 = $14 & 32; + $16 = ($15<<24>>24)==(0); + if (!($16)) { + _glfwWindowHint(135181,4); + _TraceLog(0,4817,$vararg_buffer1); + } + $17 = (_rlGetVersion()|0); + $18 = ($17|0)==(2); + if ($18) { + _glfwWindowHint(139266,2); + _glfwWindowHint(139267,1); + } else { + $19 = (_rlGetVersion()|0); + $20 = ($19|0)==(3); + if ($20) { + _glfwWindowHint(139266,3); + _glfwWindowHint(139267,3); + _glfwWindowHint(139272,204801); + _glfwWindowHint(139270,0); + } + } + $21 = HEAP32[4715]|0; + $22 = ($21|0)==(0); + if ($22) { + $47 = HEAP32[4690]|0; + $48 = HEAP32[4691]|0; + $49 = HEAP32[4689]|0; + $50 = (_glfwCreateWindow(($47|0),($48|0),($49|0),(0|0),(0|0))|0); + HEAP32[4687] = $50; + $51 = HEAP32[4690]|0; + HEAP32[4716] = $51; + $52 = HEAP32[4691]|0; + HEAP32[4717] = $52; + $54 = $50; + } else { + $23 = (_glfwGetPrimaryMonitor()|0); + $24 = (_glfwGetVideoModes(($23|0),($$byval_copy|0))|0); + $25 = HEAP32[$$byval_copy>>2]|0; + $26 = ($25|0)>(0); + L22: do { + if ($26) { + $27 = HEAP32[4690]|0; + $28 = HEAP32[$$byval_copy>>2]|0; + $29 = HEAP32[4691]|0; + $$015 = 0; + while(1) { + $30 = (($24) + (($$015*24)|0)|0); + $31 = HEAP32[$30>>2]|0; + $32 = ($31|0)<($27|0); + if (!($32)) { + $33 = (((($24) + (($$015*24)|0)|0)) + 4|0); + $34 = HEAP32[$33>>2]|0; + $35 = ($34|0)<($29|0); + if (!($35)) { + break; + } + } + $36 = (($$015) + 1)|0; + $37 = ($36|0)<($28|0); + if ($37) { + $$015 = $36; + } else { + break L22; + } + } + HEAP32[4713] = $31; + HEAP32[4714] = $34; + } + } while(0); + $38 = HEAP32[4713]|0; + $39 = HEAP32[4714]|0; + HEAP32[$vararg_buffer3>>2] = $38; + $vararg_ptr5 = ((($vararg_buffer3)) + 4|0); + HEAP32[$vararg_ptr5>>2] = $39; + _TraceLog(1,4842,$vararg_buffer3); + $40 = HEAP32[4713]|0; + $41 = HEAP32[4714]|0; + _SetupFramebufferSize($40,$41); + $42 = HEAP32[4713]|0; + $43 = HEAP32[4714]|0; + $44 = HEAP32[4689]|0; + $45 = (_glfwGetPrimaryMonitor()|0); + $46 = (_glfwCreateWindow(($42|0),($43|0),($44|0),($45|0),(0|0))|0); + HEAP32[4687] = $46; + $54 = $46; + } + $53 = ($54|0)==(0|0); + if ($53) { + _glfwTerminate(); + _TraceLog(2,4880,$vararg_buffer6); + } else { + _TraceLog(0,4913,$vararg_buffer8); + $55 = HEAP32[4716]|0; + $56 = HEAP32[4717]|0; + HEAP32[$vararg_buffer10>>2] = $55; + $vararg_ptr13 = ((($vararg_buffer10)) + 4|0); + HEAP32[$vararg_ptr13>>2] = $56; + _TraceLog(0,4953,$vararg_buffer10); + $57 = HEAP32[4690]|0; + $58 = HEAP32[4691]|0; + HEAP32[$vararg_buffer14>>2] = $57; + $vararg_ptr17 = ((($vararg_buffer14)) + 4|0); + HEAP32[$vararg_ptr17>>2] = $58; + _TraceLog(0,4974,$vararg_buffer14); + $59 = HEAP32[4718]|0; + $60 = HEAP32[4719]|0; + HEAP32[$vararg_buffer18>>2] = $59; + $vararg_ptr21 = ((($vararg_buffer18)) + 4|0); + HEAP32[$vararg_ptr21>>2] = $60; + _TraceLog(0,4995,$vararg_buffer18); + } + $61 = HEAP32[4687]|0; + (_glfwSetWindowSizeCallback(($61|0),(1|0))|0); + $62 = HEAP32[4687]|0; + (_glfwSetCursorEnterCallback(($62|0),(2|0))|0); + $63 = HEAP32[4687]|0; + (_glfwSetKeyCallback(($63|0),(1|0))|0); + $64 = HEAP32[4687]|0; + (_glfwSetMouseButtonCallback(($64|0),(1|0))|0); + $65 = HEAP32[4687]|0; + (_glfwSetCursorPosCallback(($65|0),(1|0))|0); + $66 = HEAP32[4687]|0; + (_glfwSetCharCallback(($66|0),(3|0))|0); + $67 = HEAP32[4687]|0; + (_glfwSetScrollCallback(($67|0),(2|0))|0); + $68 = HEAP32[4687]|0; + (_glfwSetWindowIconifyCallback(($68|0),(4|0))|0); + $69 = HEAP32[4687]|0; + _glfwMakeContextCurrent(($69|0)); + _glfwSwapInterval(0); + $70 = HEAP8[19732]|0; + $71 = $70 & 64; + $72 = ($71<<24>>24)==(0); + if ($72) { + $73 = HEAP32[4690]|0; + $74 = HEAP32[4691]|0; + _rlglInit($73,$74); + _SetupViewport(); + _rlMatrixMode(5889); + _rlLoadIdentity(); + $75 = HEAP32[4716]|0; + $76 = HEAP32[4718]|0; + $77 = (($75) - ($76))|0; + $78 = (+($77|0)); + $79 = HEAP32[4717]|0; + $80 = HEAP32[4719]|0; + $81 = (($79) - ($80))|0; + $82 = (+($81|0)); + _rlOrtho(0.0,$78,$82,0.0,0.0,1.0); + _rlMatrixMode(5888); + _rlLoadIdentity(); + HEAP8[$3>>0] = -11; + $83 = ((($3)) + 1|0); + HEAP8[$83>>0] = -11; + $84 = ((($3)) + 2|0); + HEAP8[$84>>0] = -11; + $85 = ((($3)) + 3|0); + HEAP8[$85>>0] = -1; + ;HEAP8[$$byval_copy>>0]=HEAP8[$3>>0]|0;HEAP8[$$byval_copy+1>>0]=HEAP8[$3+1>>0]|0;HEAP8[$$byval_copy+2>>0]=HEAP8[$3+2>>0]|0;HEAP8[$$byval_copy+3>>0]=HEAP8[$3+3>>0]|0; + _ClearBackground($$byval_copy); + STACKTOP = sp;return; + } + _glfwSwapInterval(1); + _TraceLog(0,5020,$vararg_buffer22); + $73 = HEAP32[4690]|0; + $74 = HEAP32[4691]|0; + _rlglInit($73,$74); + _SetupViewport(); + _rlMatrixMode(5889); + _rlLoadIdentity(); + $75 = HEAP32[4716]|0; + $76 = HEAP32[4718]|0; + $77 = (($75) - ($76))|0; + $78 = (+($77|0)); + $79 = HEAP32[4717]|0; + $80 = HEAP32[4719]|0; + $81 = (($79) - ($80))|0; + $82 = (+($81|0)); + _rlOrtho(0.0,$78,$82,0.0,0.0,1.0); + _rlMatrixMode(5888); + _rlLoadIdentity(); + HEAP8[$3>>0] = -11; + $83 = ((($3)) + 1|0); + HEAP8[$83>>0] = -11; + $84 = ((($3)) + 2|0); + HEAP8[$84>>0] = -11; + $85 = ((($3)) + 3|0); + HEAP8[$85>>0] = -1; + ;HEAP8[$$byval_copy>>0]=HEAP8[$3>>0]|0;HEAP8[$$byval_copy+1>>0]=HEAP8[$3+1>>0]|0;HEAP8[$$byval_copy+2>>0]=HEAP8[$3+2>>0]|0;HEAP8[$$byval_copy+3>>0]=HEAP8[$3+3>>0]|0; + _ClearBackground($$byval_copy); + STACKTOP = sp;return; +} +function _InitTimer() { + var $0 = 0, $1 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + $0 = (_time((0|0))|0); + _srand($0); + $1 = (+_GetTime()); + HEAPF64[2078] = $1; + return; +} +function _EmscriptenFullscreenChangeCallback($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $10 = 0, $11 = 0, $12 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0, $vararg_buffer4 = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, $vararg_ptr3 = 0, $vararg_ptr7 = 0, $vararg_ptr8 = 0, $vararg_ptr9 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $vararg_buffer4 = sp + 16|0; + $vararg_buffer = sp; + $3 = HEAP32[$1>>2]|0; + $4 = ($3|0)==(0); + $5 = ((($1)) + 264|0); + $6 = HEAP32[$5>>2]|0; + $7 = ((($1)) + 268|0); + $8 = HEAP32[$7>>2]|0; + $9 = ((($1)) + 272|0); + $10 = HEAP32[$9>>2]|0; + $11 = ((($1)) + 276|0); + $12 = HEAP32[$11>>2]|0; + if ($4) { + HEAP32[$vararg_buffer4>>2] = $6; + $vararg_ptr7 = ((($vararg_buffer4)) + 4|0); + HEAP32[$vararg_ptr7>>2] = $8; + $vararg_ptr8 = ((($vararg_buffer4)) + 8|0); + HEAP32[$vararg_ptr8>>2] = $10; + $vararg_ptr9 = ((($vararg_buffer4)) + 12|0); + HEAP32[$vararg_ptr9>>2] = $12; + _TraceLog(0,4724,$vararg_buffer4); + STACKTOP = sp;return 0; + } else { + HEAP32[$vararg_buffer>>2] = $6; + $vararg_ptr1 = ((($vararg_buffer)) + 4|0); + HEAP32[$vararg_ptr1>>2] = $8; + $vararg_ptr2 = ((($vararg_buffer)) + 8|0); + HEAP32[$vararg_ptr2>>2] = $10; + $vararg_ptr3 = ((($vararg_buffer)) + 12|0); + HEAP32[$vararg_ptr3>>2] = $12; + _TraceLog(0,4655,$vararg_buffer); + STACKTOP = sp;return 0; + } + return (0)|0; +} +function _EmscriptenKeyboardCallback($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; + sp = STACKTOP; + $3 = ($0|0)==(1); + if (!($3)) { + return 0; + } + $4 = ((($1)) + 32|0); + $5 = (_strcmp($4,4648)|0); + $6 = ($5|0)==(0); + if (!($6)) { + return 0; + } + (_emscripten_exit_pointerlock()|0); + return 0; +} +function _EmscriptenMouseCallback($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $or$cond = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 272|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(272|0); + $3 = sp; + $4 = ($0|0)==(4); + $5 = HEAP32[4684]|0; + $6 = ($5|0)!=(0); + $or$cond = $4 & $6; + if (!($or$cond)) { + STACKTOP = sp;return 0; + } + (_emscripten_get_pointerlock_status(($3|0))|0); + $7 = HEAP32[$3>>2]|0; + $8 = ($7|0)==(0); + if ($8) { + (_emscripten_request_pointerlock((0|0),1)|0); + } else { + (_emscripten_exit_pointerlock()|0); + (_emscripten_get_pointerlock_status(($3|0))|0); + } + HEAP32[4684] = 0; + STACKTOP = sp;return 0; +} +function _EmscriptenTouchCallback($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $$byval_copy = 0, $$sink = 0, $$sroa$0$0$$sroa_idx = 0, $$sroa$03$0$$sroa_idx = 0, $$sroa$2$0$$sroa_idx2 = 0, $$sroa$24$0$$sroa_idx5 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0.0; + var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0; + var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0.0, $48 = 0.0, $49 = 0.0, $5 = 0, $50 = 0, $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0, $55 = 0.0, $56 = 0.0, $57 = 0.0, $58 = 0, $59 = 0.0, $6 = 0; + var $60 = 0.0, $61 = 0.0, $7 = 0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(112|0); + $$byval_copy = sp + 56|0; + $3 = sp; + switch ($0|0) { + case 22: { + $$sink = 1; + label = 4; + break; + } + case 23: { + $$sink = 0; + label = 4; + break; + } + case 24: { + $$sink = 2; + label = 4; + break; + } + default: { + } + } + if ((label|0) == 4) { + HEAP32[$3>>2] = $$sink; + } + $4 = HEAP32[$1>>2]|0; + $5 = ((($3)) + 4|0); + HEAP32[$5>>2] = $4; + $6 = ((($1)) + 20|0); + $7 = HEAP32[$6>>2]|0; + $8 = ((($3)) + 8|0); + HEAP32[$8>>2] = $7; + $9 = ((($1)) + 72|0); + $10 = HEAP32[$9>>2]|0; + $11 = ((($3)) + 12|0); + HEAP32[$11>>2] = $10; + $12 = ((($1)) + 56|0); + $13 = HEAP32[$12>>2]|0; + $14 = (+($13|0)); + $15 = ((($1)) + 60|0); + $16 = HEAP32[$15>>2]|0; + $17 = (+($16|0)); + $$sroa$03$0$$sroa_idx = ((($3)) + 24|0); + HEAPF32[$$sroa$03$0$$sroa_idx>>2] = $14; + $$sroa$24$0$$sroa_idx5 = ((($3)) + 28|0); + HEAPF32[$$sroa$24$0$$sroa_idx5>>2] = $17; + $18 = ((($1)) + 108|0); + $19 = HEAP32[$18>>2]|0; + $20 = (+($19|0)); + $21 = ((($1)) + 112|0); + $22 = HEAP32[$21>>2]|0; + $23 = (+($22|0)); + $$sroa$0$0$$sroa_idx = ((($3)) + 32|0); + HEAPF32[$$sroa$0$0$$sroa_idx>>2] = $20; + $$sroa$2$0$$sroa_idx2 = ((($3)) + 36|0); + HEAPF32[$$sroa$2$0$$sroa_idx2>>2] = $23; + $24 = ((($3)) + 24|0); + $25 = $24; + $26 = $25; + $27 = HEAP32[$26>>2]|0; + $28 = (($25) + 4)|0; + $29 = $28; + $30 = HEAP32[$29>>2]|0; + $31 = 16608; + $32 = $31; + HEAP32[$32>>2] = $27; + $33 = (($31) + 4)|0; + $34 = $33; + HEAP32[$34>>2] = $30; + $35 = ((($3)) + 32|0); + $36 = $35; + $37 = $36; + $38 = HEAP32[$37>>2]|0; + $39 = (($36) + 4)|0; + $40 = $39; + $41 = HEAP32[$40>>2]|0; + $42 = (16616); + $43 = $42; + HEAP32[$43>>2] = $38; + $44 = (($42) + 4)|0; + $45 = $44; + HEAP32[$45>>2] = $41; + $46 = (_GetScreenWidth()|0); + $47 = (+($46|0)); + $48 = +HEAPF32[$24>>2]; + $49 = $48 / $47; + HEAPF32[$24>>2] = $49; + $50 = (_GetScreenHeight()|0); + $51 = (+($50|0)); + $52 = +HEAPF32[$$sroa$24$0$$sroa_idx5>>2]; + $53 = $52 / $51; + HEAPF32[$$sroa$24$0$$sroa_idx5>>2] = $53; + $54 = (_GetScreenWidth()|0); + $55 = (+($54|0)); + $56 = +HEAPF32[$35>>2]; + $57 = $56 / $55; + HEAPF32[$35>>2] = $57; + $58 = (_GetScreenHeight()|0); + $59 = (+($58|0)); + $60 = +HEAPF32[$$sroa$2$0$$sroa_idx2>>2]; + $61 = $60 / $59; + HEAPF32[$$sroa$2$0$$sroa_idx2>>2] = $61; + dest=$$byval_copy; src=$3; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _ProcessGestureEvent($$byval_copy); + STACKTOP = sp;return 1; +} +function _EmscriptenGamepadCallback($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $$sink = 0, $10 = 0, $11 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $3 = ((($1)) + 1296|0); + $4 = HEAP32[$3>>2]|0; + $5 = ($4|0)==(0); + if ($5) { + label = 3; + } else { + $6 = ((($1)) + 1300|0); + $7 = HEAP32[$6>>2]|0; + $8 = ($7|0)<(4); + if ($8) { + $$sink = 1; + } else { + label = 3; + } + } + if ((label|0) == 3) { + $$sink = 0; + } + $9 = ((($1)) + 1300|0); + $10 = HEAP32[$9>>2]|0; + $11 = (18772 + ($10<<2)|0); + HEAP32[$11>>2] = $$sink; + return 0; +} +function _SetTargetFPS($0) { + $0 = $0|0; + var $$ = 0.0, $$op = 0.0, $1 = 0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $vararg_buffer = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $vararg_buffer = sp; + $1 = ($0|0)<(1); + $2 = (+($0|0)); + $3 = 1.0 / $2; + $$ = $1 ? 0.0 : $3; + HEAPF64[2075] = $$; + $4 = $3; + $$op = $4 * 1000.0; + $5 = $$op; + $6 = $1 ? 0.0 : $5; + HEAPF64[$vararg_buffer>>3] = $6; + _TraceLog(0,4604,$vararg_buffer); + STACKTOP = sp;return; +} +function _LogoAnimation() { + var label = 0, sp = 0; + sp = STACKTOP; + HEAP32[4692] = 0; + return; +} +function _GetScreenWidth() { + var $0 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[4690]|0; + return ($0|0); +} +function _GetScreenHeight() { + var $0 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[4691]|0; + return ($0|0); +} +function _GetTime() { + var $0 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + $0 = (+_glfwGetTime()); + return (+$0); +} +function _ErrorCallback($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $vararg_buffer = sp; + HEAP32[$vararg_buffer>>2] = $0; + $vararg_ptr1 = ((($vararg_buffer)) + 4|0); + HEAP32[$vararg_ptr1>>2] = $1; + _TraceLog(1,8629,$vararg_buffer); + STACKTOP = sp;return; +} +function _SetupFramebufferSize($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $$sink = 0, $$sink1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0, $21 = 0, $22 = 0.0, $23 = 0, $24 = 0, $25 = 0, $26 = 0.0; + var $27 = 0, $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0.0, $37 = 0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0, $41 = 0.0, $42 = 0, $43 = 0, $44 = 0.0; + var $45 = 0, $46 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0, $or$cond = 0, $roundf = 0.0, $roundf38 = 0.0, $roundf39 = 0.0, $roundf40 = 0.0, $vararg_buffer = 0, $vararg_buffer4 = 0, $vararg_buffer8 = 0, $vararg_ptr1 = 0, $vararg_ptr11 = 0, $vararg_ptr12 = 0, $vararg_ptr13 = 0, $vararg_ptr2 = 0; + var $vararg_ptr3 = 0, $vararg_ptr7 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(112|0); + $vararg_buffer8 = sp + 24|0; + $vararg_buffer4 = sp + 16|0; + $vararg_buffer = sp; + $2 = sp + 40|0; + $3 = HEAP32[4690]|0; + $4 = ($3|0)>($0|0); + if (!($4)) { + $5 = HEAP32[4691]|0; + $6 = ($5|0)>($1|0); + if (!($6)) { + $30 = ($3|0)<($0|0); + $31 = ($5|0)<($1|0); + $or$cond = $30 | $31; + if (!($or$cond)) { + HEAP32[4716] = $3; + HEAP32[4717] = $5; + HEAP32[4718] = 0; + HEAP32[4719] = 0; + STACKTOP = sp;return; + } + HEAP32[$vararg_buffer8>>2] = $3; + $vararg_ptr11 = ((($vararg_buffer8)) + 4|0); + HEAP32[$vararg_ptr11>>2] = $5; + $vararg_ptr12 = ((($vararg_buffer8)) + 8|0); + HEAP32[$vararg_ptr12>>2] = $0; + $vararg_ptr13 = ((($vararg_buffer8)) + 12|0); + HEAP32[$vararg_ptr13>>2] = $1; + _TraceLog(0,8563,$vararg_buffer8); + $32 = (+($0|0)); + $33 = (+($1|0)); + $34 = $32 / $33; + $35 = HEAP32[4690]|0; + $36 = (+($35|0)); + $37 = HEAP32[4691]|0; + $38 = (+($37|0)); + $39 = $36 / $38; + $40 = !($34 <= $39); + if ($40) { + $44 = $34 * $38; + $roundf = (+_roundf((+$44))); + $45 = (~~(($roundf))); + HEAP32[4716] = $45; + HEAP32[4717] = $37; + $46 = (($45) - ($35))|0; + HEAP32[4718] = $46; + $$sink1 = 0; + } else { + HEAP32[4716] = $35; + $41 = $36 / $34; + $roundf38 = (+_roundf((+$41))); + $42 = (~~(($roundf38))); + HEAP32[4717] = $42; + HEAP32[4718] = 0; + $43 = (($42) - ($37))|0; + $$sink1 = $43; + } + HEAP32[4719] = $$sink1; + STACKTOP = sp;return; + } + } + $7 = HEAP32[4691]|0; + HEAP32[$vararg_buffer>>2] = $3; + $vararg_ptr1 = ((($vararg_buffer)) + 4|0); + HEAP32[$vararg_ptr1>>2] = $7; + $vararg_ptr2 = ((($vararg_buffer)) + 8|0); + HEAP32[$vararg_ptr2>>2] = $0; + $vararg_ptr3 = ((($vararg_buffer)) + 12|0); + HEAP32[$vararg_ptr3>>2] = $1; + _TraceLog(1,8420,$vararg_buffer); + $8 = (+($0|0)); + $9 = HEAP32[4690]|0; + $10 = (+($9|0)); + $11 = $8 / $10; + $12 = (+($1|0)); + $13 = HEAP32[4691]|0; + $14 = (+($13|0)); + $15 = $12 / $14; + $16 = !($11 <= $15); + if ($16) { + $22 = $10 * $15; + $roundf39 = (+_roundf((+$22))); + $23 = (~~(($roundf39))); + HEAP32[4716] = $23; + HEAP32[4717] = $1; + $24 = (($0) - ($23))|0; + HEAP32[4718] = $24; + $$sink = 0; + } else { + HEAP32[4716] = $0; + $17 = HEAP32[4691]|0; + $18 = (+($17|0)); + $19 = $11 * $18; + $roundf40 = (+_roundf((+$19))); + $20 = (~~(($roundf40))); + HEAP32[4717] = $20; + HEAP32[4718] = 0; + $21 = (($1) - ($20))|0; + $$sink = $21; + } + HEAP32[4719] = $$sink; + $25 = HEAP32[4716]|0; + $26 = (+($25|0)); + $27 = HEAP32[4690]|0; + $28 = (+($27|0)); + $29 = $26 / $28; + _MatrixScale($2,$29,$29,$29); + dest=18788; src=$2; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + HEAP32[4716] = $0; + HEAP32[4717] = $1; + HEAP32[$vararg_buffer4>>2] = $0; + $vararg_ptr7 = ((($vararg_buffer4)) + 4|0); + HEAP32[$vararg_ptr7>>2] = $1; + _TraceLog(1,8498,$vararg_buffer4); + STACKTOP = sp;return; +} +function _WindowSizeCallback($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $3 = 0.0, $4 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + _rlViewport(0,0,$1,$2); + _rlMatrixMode(5889); + _rlLoadIdentity(); + $3 = (+($1|0)); + $4 = (+($2|0)); + _rlOrtho(0.0,$3,$4,0.0,0.0,1.0); + _rlMatrixMode(5888); + _rlLoadIdentity(); + _rlClearScreenBuffers(); + HEAP32[4690] = $1; + HEAP32[4691] = $2; + HEAP32[4716] = $1; + HEAP32[4717] = $2; + return; +} +function _CursorEnterCallback($0,$1) { + $0 = $0|0; + $1 = $1|0; + var label = 0, sp = 0; + sp = STACKTOP; + return; +} +function _KeyCallback($0,$1,$2,$3,$4) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + $4 = $4|0; + var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; + sp = STACKTOP; + $5 = HEAP32[754]|0; + $6 = ($5|0)==($1|0); + $7 = ($3|0)==(1); + $or$cond = $7 & $6; + if ($or$cond) { + _glfwSetWindowShouldClose(($0|0),1); + return; + } + $8 = $3&255; + $9 = (19739 + ($1)|0); + HEAP8[$9>>0] = $8; + if (!($7)) { + return; + } + HEAP32[753] = $1; + return; +} +function _MouseButtonCallback($0,$1,$2,$3) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + var $$byval_copy = 0, $$sink = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0.0, $27 = 0.0; + var $28 = 0.0, $29 = 0, $30 = 0.0, $31 = 0, $32 = 0.0, $33 = 0.0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(128|0); + $$byval_copy = sp + 64|0; + $4 = sp + 8|0; + $5 = sp; + $6 = $2&255; + $7 = (19733 + ($1)|0); + HEAP8[$7>>0] = $6; + $8 = (_IsMouseButtonPressed(0)|0); + $9 = ($8|0)==(0); + if ($9) { + $10 = (_IsMouseButtonReleased(0)|0); + $11 = ($10|0)==(0); + if (!($11)) { + $$sink = 0; + label = 3; + } + } else { + $$sink = 1; + label = 3; + } + if ((label|0) == 3) { + HEAP32[$4>>2] = $$sink; + } + $12 = ((($4)) + 8|0); + HEAP32[$12>>2] = 0; + $13 = ((($4)) + 4|0); + HEAP32[$13>>2] = 1; + $14 = ((($4)) + 24|0); + _GetMousePosition($5); + $15 = $5; + $16 = $15; + $17 = HEAP32[$16>>2]|0; + $18 = (($15) + 4)|0; + $19 = $18; + $20 = HEAP32[$19>>2]|0; + $21 = $14; + $22 = $21; + HEAP32[$22>>2] = $17; + $23 = (($21) + 4)|0; + $24 = $23; + HEAP32[$24>>2] = $20; + $25 = (_GetScreenWidth()|0); + $26 = (+($25|0)); + $27 = +HEAPF32[$14>>2]; + $28 = $27 / $26; + HEAPF32[$14>>2] = $28; + $29 = (_GetScreenHeight()|0); + $30 = (+($29|0)); + $31 = ((($4)) + 28|0); + $32 = +HEAPF32[$31>>2]; + $33 = $32 / $30; + HEAPF32[$31>>2] = $33; + dest=$$byval_copy; src=$4; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _ProcessGestureEvent($$byval_copy); + STACKTOP = sp;return; +} +function _MouseCursorPosCallback($0,$1,$2) { + $0 = $0|0; + $1 = +$1; + $2 = +$2; + var $$byval_copy = 0, $$sroa$0$0$$sroa_idx = 0, $$sroa$2$0$$sroa_idx1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0, $24 = 0.0, $25 = 0.0, $26 = 0.0; + var $3 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(112|0); + $$byval_copy = sp + 56|0; + $3 = sp; + HEAP32[$3>>2] = 2; + $4 = ((($3)) + 8|0); + HEAP32[$4>>2] = 0; + $5 = ((($3)) + 4|0); + HEAP32[$5>>2] = 1; + $6 = $1; + $7 = $2; + $$sroa$0$0$$sroa_idx = ((($3)) + 24|0); + HEAPF32[$$sroa$0$0$$sroa_idx>>2] = $6; + $$sroa$2$0$$sroa_idx1 = ((($3)) + 28|0); + HEAPF32[$$sroa$2$0$$sroa_idx1>>2] = $7; + $8 = ((($3)) + 24|0); + $9 = $8; + $10 = $9; + $11 = HEAP32[$10>>2]|0; + $12 = (($9) + 4)|0; + $13 = $12; + $14 = HEAP32[$13>>2]|0; + $15 = 16608; + $16 = $15; + HEAP32[$16>>2] = $11; + $17 = (($15) + 4)|0; + $18 = $17; + HEAP32[$18>>2] = $14; + $19 = (_GetScreenWidth()|0); + $20 = (+($19|0)); + $21 = +HEAPF32[$8>>2]; + $22 = $21 / $20; + HEAPF32[$8>>2] = $22; + $23 = (_GetScreenHeight()|0); + $24 = (+($23|0)); + $25 = +HEAPF32[$$sroa$2$0$$sroa_idx1>>2]; + $26 = $25 / $24; + HEAPF32[$$sroa$2$0$$sroa_idx1>>2] = $26; + dest=$$byval_copy; src=$3; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _ProcessGestureEvent($$byval_copy); + STACKTOP = sp;return; +} +function _CharCallback($0,$1) { + $0 = $0|0; + $1 = $1|0; + var label = 0, sp = 0; + sp = STACKTOP; + HEAP32[753] = $1; + return; +} +function _ScrollCallback($0,$1,$2) { + $0 = $0|0; + $1 = +$1; + $2 = +$2; + var $3 = 0, label = 0, sp = 0; + sp = STACKTOP; + $3 = (~~(($2))); + HEAP32[4722] = $3; + return; +} +function _WindowIconifyCallback($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $$sink = 0, $2 = 0, label = 0, sp = 0; + sp = STACKTOP; + $2 = ($1|0)!=(0); + $$sink = $2&1; + HEAP32[4721] = $$sink; + return; +} +function _rlglInit($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $$06066 = 0, $$06167 = 0, $$06268 = 0, $$063 = 0, $$sink64 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; + var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0; + var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0; + var $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0.0, $73 = 0.0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0; + var $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $9 = 0, $exitcond = 0, $exitcond70 = 0, $exitcond71 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer10 = 0, $vararg_buffer13 = 0, $vararg_buffer15 = 0, $vararg_buffer17 = 0; + var $vararg_buffer19 = 0, $vararg_buffer21 = 0, $vararg_buffer23 = 0, $vararg_buffer25 = 0, $vararg_buffer27 = 0, $vararg_buffer29 = 0, $vararg_buffer31 = 0, $vararg_buffer34 = 0, $vararg_buffer36 = 0, $vararg_buffer39 = 0, $vararg_buffer4 = 0, $vararg_buffer41 = 0, $vararg_buffer7 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 2464|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(2464|0); + $vararg_buffer41 = sp + 2184|0; + $vararg_buffer39 = sp + 2176|0; + $vararg_buffer36 = sp + 2168|0; + $vararg_buffer34 = sp + 2160|0; + $vararg_buffer31 = sp + 2152|0; + $vararg_buffer29 = sp + 2144|0; + $vararg_buffer27 = sp + 2136|0; + $vararg_buffer25 = sp + 2128|0; + $vararg_buffer23 = sp + 2120|0; + $vararg_buffer21 = sp + 2112|0; + $vararg_buffer19 = sp + 2104|0; + $vararg_buffer17 = sp + 2096|0; + $vararg_buffer15 = sp + 2088|0; + $vararg_buffer13 = sp + 2080|0; + $vararg_buffer10 = sp + 2072|0; + $vararg_buffer7 = sp + 24|0; + $vararg_buffer4 = sp + 16|0; + $vararg_buffer1 = sp + 8|0; + $vararg_buffer = sp; + $2 = sp + 2400|0; + $3 = sp + 2384|0; + $4 = sp + 2320|0; + $5 = sp + 2256|0; + $6 = sp + 2192|0; + $7 = (_glGetString(7936)|0); + HEAP32[$vararg_buffer>>2] = $7; + _TraceLog(0,5043,$vararg_buffer); + $8 = (_glGetString(7937)|0); + HEAP32[$vararg_buffer1>>2] = $8; + _TraceLog(0,5061,$vararg_buffer1); + $9 = (_glGetString(7938)|0); + HEAP32[$vararg_buffer4>>2] = $9; + _TraceLog(0,5079,$vararg_buffer4); + $10 = (_glGetString(35724)|0); + HEAP32[$vararg_buffer7>>2] = $10; + _TraceLog(0,5097,$vararg_buffer7); + $11 = (_glGetString(7939)|0); + $12 = (_strlen($11)|0); + $13 = (($12) + 1)|0; + $14 = (_malloc($13)|0); + _memcpy(($14|0),($11|0),($13|0))|0; + $$063 = 0;$$sink64 = $14; + while(1) { + $15 = (_strtok($$sink64,5115)|0); + $16 = (($vararg_buffer7) + ($$063<<2)|0); + HEAP32[$16>>2] = $15; + $17 = ($15|0)==(0|0); + $18 = (($$063) + 1)|0; + if ($17) { + break; + } else { + $$063 = $18;$$sink64 = 0; + } + } + _free($14); + $19 = (($$063) + -1)|0; + HEAP32[$vararg_buffer10>>2] = $19; + _TraceLog(0,5117,$vararg_buffer10); + $20 = ($$063|0)>(1); + if ($20) { + $$06268 = 0; + while(1) { + $23 = (($vararg_buffer7) + ($$06268<<2)|0); + $24 = HEAP32[$23>>2]|0; + $25 = (_strcmp($24,5152)|0); + $26 = ($25|0)==(0); + if ($26) { + HEAP32[4282] = 1; + $27 = (_eglGetProcAddress((5179|0))|0); + HEAP32[4656] = $27; + $28 = (_eglGetProcAddress((5200|0))|0); + HEAP32[4283] = $28; + $29 = (_eglGetProcAddress((5221|0))|0); + HEAP32[4671] = $29; + } + $30 = (_strcmp($24,5245)|0); + $31 = ($30|0)==(0); + if ($31) { + HEAP32[4193] = 1; + } + $32 = (_strcmp($24,5265)|0); + $33 = ($32|0)==(0); + if ($33) { + HEAP32[4192] = 1; + } + $34 = (_strcmp($24,5283)|0); + $35 = ($34|0)==(0); + if ($35) { + label = 14; + } else { + $36 = HEAP32[$23>>2]|0; + $37 = (_strcmp($36,5315)|0); + $38 = ($37|0)==(0); + if ($38) { + label = 14; + } else { + $39 = (_strcmp($36,5348)|0); + $40 = ($39|0)==(0); + if ($40) { + label = 14; + } + } + } + if ((label|0) == 14) { + label = 0; + HEAP32[4187] = 1; + } + $41 = HEAP32[$23>>2]|0; + $42 = (_strcmp($41,5388)|0); + $43 = ($42|0)==(0); + if ($43) { + label = 17; + } else { + $44 = (_strcmp($41,5424)|0); + $45 = ($44|0)==(0); + if ($45) { + label = 17; + } + } + if ((label|0) == 17) { + label = 0; + HEAP32[4188] = 1; + } + $46 = (_strcmp($41,5457)|0); + $47 = ($46|0)==(0); + if ($47) { + HEAP32[4189] = 1; + } + $48 = HEAP32[$23>>2]|0; + $49 = (_strcmp($48,5482)|0); + $50 = ($49|0)==(0); + if ($50) { + HEAP32[4190] = 1; + } + $51 = (_strcmp($48,5515)|0); + $52 = ($51|0)==(0); + if ($52) { + HEAP32[4191] = 1; + } + $53 = (_strcmp($48,5551)|0); + $54 = ($53|0)==(0); + if ($54) { + HEAP32[4720] = 1; + _glGetFloatv(34047,(16780|0)); + } + $55 = (_strcmp($48,5585)|0); + $56 = ($55|0)==(0); + if ($56) { + HEAP32[4194] = 1; + } + $57 = (($$06268) + 1)|0; + $exitcond71 = ($57|0)==($19|0); + if ($exitcond71) { + break; + } else { + $$06268 = $57; + } + } + } + $21 = HEAP32[4282]|0; + $22 = ($21|0)==(0); + if ($22) { + _TraceLog(1,5688,$vararg_buffer15); + } else { + _TraceLog(0,5613,$vararg_buffer13); + } + $58 = HEAP32[4193]|0; + $59 = ($58|0)==(0); + if ($59) { + _TraceLog(1,5824,$vararg_buffer19); + } else { + _TraceLog(0,5749,$vararg_buffer17); + } + $60 = HEAP32[4187]|0; + $61 = ($60|0)==(0); + if (!($61)) { + _TraceLog(0,5916,$vararg_buffer21); + } + $62 = HEAP32[4188]|0; + $63 = ($62|0)==(0); + if (!($63)) { + _TraceLog(0,5962,$vararg_buffer23); + } + $64 = HEAP32[4189]|0; + $65 = ($64|0)==(0); + if (!($65)) { + _TraceLog(0,6009,$vararg_buffer25); + } + $66 = HEAP32[4190]|0; + $67 = ($66|0)==(0); + if (!($67)) { + _TraceLog(0,6060,$vararg_buffer27); + } + $68 = HEAP32[4191]|0; + $69 = ($68|0)==(0); + if (!($69)) { + _TraceLog(0,6107,$vararg_buffer29); + } + $70 = HEAP32[4720]|0; + $71 = ($70|0)==(0); + if (!($71)) { + $72 = +HEAPF32[4195]; + $73 = $72; + HEAPF64[$vararg_buffer31>>3] = $73; + _TraceLog(0,6154,$vararg_buffer31); + } + $74 = HEAP32[4194]|0; + $75 = ($74|0)==(0); + if (!($75)) { + _TraceLog(0,6220,$vararg_buffer34); + } + HEAP32[$vararg_buffer10>>2] = -1; + $76 = (_rlglLoadTexture($vararg_buffer10,1,1,7,1)|0); + HEAP32[4242] = $76; + $77 = ($76|0)==(0); + if ($77) { + _TraceLog(1,6324,$vararg_buffer39); + } else { + HEAP32[$vararg_buffer36>>2] = $76; + _TraceLog(0,6273,$vararg_buffer36); + } + _LoadDefaultShader($2); + dest=18628; src=$2; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=17072; src=$2; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _LoadDefaultBuffers(); + $78 = (_malloc(49152)|0); + HEAP32[4651] = $78; + $$06167 = 0; + while(1) { + $80 = HEAP32[4651]|0; + $81 = (($80) + (($$06167*12)|0)|0); + _VectorZero($3); + ;HEAP32[$81>>2]=HEAP32[$3>>2]|0;HEAP32[$81+4>>2]=HEAP32[$3+4>>2]|0;HEAP32[$81+8>>2]=HEAP32[$3+8>>2]|0; + $82 = (($$06167) + 1)|0; + $exitcond70 = ($82|0)==(4096); + if ($exitcond70) { + break; + } else { + $$06167 = $82; + } + } + $79 = (_malloc(36864)|0); + HEAP32[4243] = $79; + $$06066 = 0; + while(1) { + $83 = (((($79) + (($$06066*144)|0)|0)) + 8|0); + HEAP32[$83>>2] = 0; + $84 = (($79) + (($$06066*144)|0)|0); + HEAP32[$84>>2] = 0; + $85 = (($$06066) + 1)|0; + $exitcond = ($85|0)==(256); + if ($exitcond) { + break; + } else { + $$06066 = $85; + } + } + HEAP32[4241] = 1; + $86 = HEAP32[4242]|0; + $87 = ((($79)) + 8|0); + HEAP32[$87>>2] = $86; + HEAP32[4652] = 4; + _MatrixIdentity($4); + dest=17568; src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($4); + dest=(17632); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($4); + dest=(17696); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($4); + dest=(17760); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($4); + dest=(17824); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($4); + dest=(17888); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($4); + dest=(17952); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($4); + dest=(18016); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($4); + dest=(18080); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($4); + dest=(18144); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($4); + dest=(18208); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($4); + dest=(18272); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($4); + dest=(18336); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($4); + dest=(18400); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($4); + dest=(18464); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($4); + dest=(18528); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($5); + dest=16832; src=$5; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($6); + dest=16896; src=$6; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + HEAP32[4648] = 16896; + _glDepthFunc(515); + _glDisable(2929); + _glBlendFunc(770,771); + _glEnable(3042); + _glCullFace(1029); + _glFrontFace(2305); + _glEnable(2884); + _glClearColor(0.0,0.0,0.0,1.0); + _glClearDepthf(1.0); + _glClear(16640); + HEAP32[4300] = $0; + HEAP32[4301] = $1; + _TraceLog(0,6363,$vararg_buffer41); + STACKTOP = sp;return; +} +function _SetupViewport() { + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[4718]|0; + $1 = (($0|0) / 2)&-1; + $2 = HEAP32[4719]|0; + $3 = (($2|0) / 2)&-1; + $4 = HEAP32[4716]|0; + $5 = (($4) - ($0))|0; + $6 = HEAP32[4717]|0; + $7 = (($6) - ($2))|0; + _rlViewport($1,$3,$5,$7); + return; +} +function _rlMatrixMode($0) { + $0 = $0|0; + var $modelview$sink = 0, label = 0, sp = 0; + sp = STACKTOP; + switch ($0|0) { + case 5889: { + $modelview$sink = 16832; + label = 3; + break; + } + case 5888: { + $modelview$sink = 16896; + label = 3; + break; + } + default: { + } + } + if ((label|0) == 3) { + HEAP32[4648] = $modelview$sink; + } + HEAP32[4653] = $0; + return; +} +function _rlOrtho($0,$1,$2,$3,$4,$5) { + $0 = +$0; + $1 = +$1; + $2 = +$2; + $3 = +$3; + $4 = +$4; + $5 = +$5; + var $$byval_copy = 0, $$byval_copy1 = 0, $6 = 0, $7 = 0, $8 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 256|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(256|0); + $$byval_copy1 = sp + 192|0; + $$byval_copy = sp + 128|0; + $6 = sp + 64|0; + $7 = sp; + _MatrixOrtho($6,$0,$1,$2,$3,$4,$5); + _MatrixTranspose($6); + $8 = HEAP32[4648]|0; + dest=$$byval_copy; src=$8; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$$byval_copy1; src=$6; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixMultiply($7,$$byval_copy,$$byval_copy1); + dest=$8; src=$7; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + STACKTOP = sp;return; +} +function _ClearBackground($0) { + $0 = $0|0; + var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = HEAP8[$0>>0]|0; + $2 = ((($0)) + 1|0); + $3 = HEAP8[$2>>0]|0; + $4 = ((($0)) + 2|0); + $5 = HEAP8[$4>>0]|0; + $6 = ((($0)) + 3|0); + $7 = HEAP8[$6>>0]|0; + _rlClearColor($1,$3,$5,$7); + return; +} +function _rlClearColor($0,$1,$2,$3) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + var $10 = 0.0, $11 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + $4 = (+($0&255)); + $5 = $4 / 255.0; + $6 = (+($1&255)); + $7 = $6 / 255.0; + $8 = (+($2&255)); + $9 = $8 / 255.0; + $10 = (+($3&255)); + $11 = $10 / 255.0; + _glClearColor((+$5),(+$7),(+$9),(+$11)); + return; +} +function _LoadDefaultShader($0) { + $0 = $0|0; + var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 1008|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(1008|0); + $vararg_buffer1 = sp + 8|0; + $vararg_buffer = sp; + $1 = sp + 16|0; + $2 = sp + 513|0; + $3 = sp + 72|0; + _memcpy(($2|0),(6939|0),489)|0; + _memcpy(($3|0),(7428|0),441)|0; + $4 = (_LoadShaderProgram($2,$3)|0); + HEAP32[$1>>2] = $4; + $5 = ($4|0)==(0); + if ($5) { + HEAP32[$vararg_buffer1>>2] = $4; + _TraceLog(1,7917,$vararg_buffer1); + } else { + HEAP32[$vararg_buffer>>2] = $4; + _TraceLog(0,7869,$vararg_buffer); + } + $6 = HEAP32[$1>>2]|0; + $7 = ($6|0)==(0); + if (!($7)) { + _LoadDefaultShaderLocations($1); + } + dest=$0; src=$1; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + STACKTOP = sp;return; +} +function _LoadDefaultBuffers() { + var $$05365 = 0, $$05467 = 0, $$05770 = 0, $$05972 = 0, $$066 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0; + var $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0; + var $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0; + var $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0; + var $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0; + var $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $exitcond = 0, $exitcond75 = 0, $exitcond78 = 0, $exitcond80 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer10 = 0, $vararg_buffer14 = 0, $vararg_buffer17 = 0; + var $vararg_buffer3 = 0, $vararg_buffer7 = 0, $vararg_ptr13 = 0, $vararg_ptr20 = 0, $vararg_ptr21 = 0, $vararg_ptr22 = 0, $vararg_ptr6 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $vararg_buffer17 = sp + 48|0; + $vararg_buffer14 = sp + 40|0; + $vararg_buffer10 = sp + 32|0; + $vararg_buffer7 = sp + 24|0; + $vararg_buffer3 = sp + 16|0; + $vararg_buffer1 = sp + 8|0; + $vararg_buffer = sp; + $0 = (_malloc(24576)|0); + HEAP32[(16988)>>2] = $0; + $1 = (_malloc(8192)|0); + HEAP32[(16996)>>2] = $1; + HEAP32[(16992)>>2] = 0; + HEAP32[(17000)>>2] = 0; + _memset(($0|0),0,24576)|0; + $$05972 = 0; + while(1) { + $2 = HEAP32[(16996)>>2]|0; + $3 = (($2) + ($$05972)|0); + HEAP8[$3>>0] = 0; + $4 = (($$05972) + 1)|0; + $exitcond80 = ($4|0)==(8192); + if ($exitcond80) { + break; + } else { + $$05972 = $4; + } + } + HEAP32[4244] = 0; + HEAP32[(16984)>>2] = 0; + HEAP32[(16980)>>2] = 0; + $5 = (_malloc(73728)|0); + HEAP32[(17036)>>2] = $5; + $6 = (_malloc(24576)|0); + HEAP32[(17044)>>2] = $6; + HEAP32[(17040)>>2] = 0; + HEAP32[(17048)>>2] = 0; + _memset(($5|0),0,73728)|0; + $$05770 = 0; + while(1) { + $7 = HEAP32[(17044)>>2]|0; + $8 = (($7) + ($$05770)|0); + HEAP8[$8>>0] = 0; + $9 = (($$05770) + 1)|0; + $exitcond78 = ($9|0)==(24576); + if ($exitcond78) { + break; + } else { + $$05770 = $9; + } + } + HEAP32[4256] = 0; + HEAP32[(17032)>>2] = 0; + HEAP32[(17028)>>2] = 0; + $10 = (_malloc(49152)|0); + HEAP32[(16796)>>2] = $10; + $11 = (_malloc(32768)|0); + HEAP32[(16800)>>2] = $11; + $12 = (_malloc(16384)|0); + HEAP32[(16804)>>2] = $12; + $13 = (_malloc(12288)|0); + HEAP32[(16808)>>2] = $13; + $14 = HEAP32[(16796)>>2]|0; + _memset(($14|0),0,49152)|0; + $15 = HEAP32[(16800)>>2]|0; + _memset(($15|0),0,32768)|0; + $$05467 = 0; + while(1) { + $17 = HEAP32[(16804)>>2]|0; + $18 = (($17) + ($$05467)|0); + HEAP8[$18>>0] = 0; + $19 = (($$05467) + 1)|0; + $exitcond75 = ($19|0)==(16384); + if ($exitcond75) { + break; + } else { + $$05467 = $19; + } + } + $16 = HEAP32[(16808)>>2]|0; + $$05365 = 0;$$066 = 0; + while(1) { + $22 = $$05365 << 2; + $23 = $22&65535; + $24 = (($16) + ($$066<<1)|0); + HEAP16[$24>>1] = $23; + $25 = $22 | 1; + $26 = $25&65535; + $27 = $$066 | 1; + $28 = (($16) + ($27<<1)|0); + HEAP16[$28>>1] = $26; + $29 = $22 | 2; + $30 = $29&65535; + $31 = (($$066) + 2)|0; + $32 = (($16) + ($31<<1)|0); + HEAP16[$32>>1] = $30; + $33 = (($$066) + 3)|0; + $34 = (($16) + ($33<<1)|0); + HEAP16[$34>>1] = $23; + $35 = (($$066) + 4)|0; + $36 = (($16) + ($35<<1)|0); + HEAP16[$36>>1] = $30; + $37 = $22 | 3; + $38 = $37&65535; + $39 = (($$066) + 5)|0; + $40 = (($16) + ($39<<1)|0); + HEAP16[$40>>1] = $38; + $41 = (($$05365) + 1)|0; + $42 = (($$066) + 6)|0; + $exitcond = ($41|0)==(1024); + if ($exitcond) { + break; + } else { + $$05365 = $41;$$066 = $42; + } + } + HEAP32[4196] = 0; + HEAP32[(16788)>>2] = 0; + HEAP32[(16792)>>2] = 0; + _TraceLog(0,6410,$vararg_buffer); + $20 = HEAP32[4282]|0; + $21 = ($20|0)==(0); + if (!($21)) { + $43 = HEAP32[4656]|0; + FUNCTION_TABLE_vii[$43 & 63](1,(17004)); + $44 = HEAP32[4283]|0; + $45 = HEAP32[(17004)>>2]|0; + FUNCTION_TABLE_vi[$44 & 31]($45); + } + _glGenBuffers(2,((17008)|0)); + $46 = HEAP32[(17008)>>2]|0; + _glBindBuffer(34962,($46|0)); + $47 = HEAP32[(16988)>>2]|0; + _glBufferData(34962,24576,($47|0),35048); + $48 = HEAP32[(17076)>>2]|0; + _glEnableVertexAttribArray(($48|0)); + $49 = HEAP32[(17076)>>2]|0; + _glVertexAttribPointer(($49|0),3,5126,0,0,(0|0)); + _glGenBuffers(2,((17012)|0)); + $50 = HEAP32[(17012)>>2]|0; + _glBindBuffer(34962,($50|0)); + $51 = HEAP32[(16996)>>2]|0; + _glBufferData(34962,8192,($51|0),35048); + $52 = HEAP32[(17096)>>2]|0; + _glEnableVertexAttribArray(($52|0)); + $53 = HEAP32[(17096)>>2]|0; + _glVertexAttribPointer(($53|0),4,5121,1,0,(0|0)); + $54 = HEAP32[4282]|0; + $55 = ($54|0)==(0); + if ($55) { + $57 = HEAP32[(17008)>>2]|0; + $58 = HEAP32[(17012)>>2]|0; + HEAP32[$vararg_buffer3>>2] = $57; + $vararg_ptr6 = ((($vararg_buffer3)) + 4|0); + HEAP32[$vararg_ptr6>>2] = $58; + _TraceLog(0,6548,$vararg_buffer3); + } else { + $56 = HEAP32[(17004)>>2]|0; + HEAP32[$vararg_buffer1>>2] = $56; + _TraceLog(0,6483,$vararg_buffer1); + } + $59 = HEAP32[4282]|0; + $60 = ($59|0)==(0); + if (!($60)) { + $61 = HEAP32[4656]|0; + FUNCTION_TABLE_vii[$61 & 63](1,(17052)); + $62 = HEAP32[4283]|0; + $63 = HEAP32[(17052)>>2]|0; + FUNCTION_TABLE_vi[$62 & 31]($63); + } + _glGenBuffers(1,((17056)|0)); + $64 = HEAP32[(17056)>>2]|0; + _glBindBuffer(34962,($64|0)); + $65 = HEAP32[(17036)>>2]|0; + _glBufferData(34962,73728,($65|0),35048); + $66 = HEAP32[(17076)>>2]|0; + _glEnableVertexAttribArray(($66|0)); + $67 = HEAP32[(17076)>>2]|0; + _glVertexAttribPointer(($67|0),3,5126,0,0,(0|0)); + _glGenBuffers(1,((17060)|0)); + $68 = HEAP32[(17060)>>2]|0; + _glBindBuffer(34962,($68|0)); + $69 = HEAP32[(17044)>>2]|0; + _glBufferData(34962,24576,($69|0),35048); + $70 = HEAP32[(17096)>>2]|0; + _glEnableVertexAttribArray(($70|0)); + $71 = HEAP32[(17096)>>2]|0; + _glVertexAttribPointer(($71|0),4,5121,1,0,(0|0)); + $72 = HEAP32[4282]|0; + $73 = ($72|0)==(0); + if ($73) { + $75 = HEAP32[(17056)>>2]|0; + $76 = HEAP32[(17060)>>2]|0; + HEAP32[$vararg_buffer10>>2] = $75; + $vararg_ptr13 = ((($vararg_buffer10)) + 4|0); + HEAP32[$vararg_ptr13>>2] = $76; + _TraceLog(0,6694,$vararg_buffer10); + } else { + $74 = HEAP32[(17052)>>2]|0; + HEAP32[$vararg_buffer7>>2] = $74; + _TraceLog(0,6625,$vararg_buffer7); + } + $77 = HEAP32[4282]|0; + $78 = ($77|0)==(0); + if (!($78)) { + $79 = HEAP32[4656]|0; + FUNCTION_TABLE_vii[$79 & 63](1,(16812)); + $80 = HEAP32[4283]|0; + $81 = HEAP32[(16812)>>2]|0; + FUNCTION_TABLE_vi[$80 & 31]($81); + } + _glGenBuffers(1,((16816)|0)); + $82 = HEAP32[(16816)>>2]|0; + _glBindBuffer(34962,($82|0)); + $83 = HEAP32[(16796)>>2]|0; + _glBufferData(34962,49152,($83|0),35048); + $84 = HEAP32[(17076)>>2]|0; + _glEnableVertexAttribArray(($84|0)); + $85 = HEAP32[(17076)>>2]|0; + _glVertexAttribPointer(($85|0),3,5126,0,0,(0|0)); + _glGenBuffers(1,((16820)|0)); + $86 = HEAP32[(16820)>>2]|0; + _glBindBuffer(34962,($86|0)); + $87 = HEAP32[(16800)>>2]|0; + _glBufferData(34962,32768,($87|0),35048); + $88 = HEAP32[(17080)>>2]|0; + _glEnableVertexAttribArray(($88|0)); + $89 = HEAP32[(17080)>>2]|0; + _glVertexAttribPointer(($89|0),2,5126,0,0,(0|0)); + _glGenBuffers(1,((16824)|0)); + $90 = HEAP32[(16824)>>2]|0; + _glBindBuffer(34962,($90|0)); + $91 = HEAP32[(16804)>>2]|0; + _glBufferData(34962,16384,($91|0),35048); + $92 = HEAP32[(17096)>>2]|0; + _glEnableVertexAttribArray(($92|0)); + $93 = HEAP32[(17096)>>2]|0; + _glVertexAttribPointer(($93|0),4,5121,1,0,(0|0)); + _glGenBuffers(1,((16828)|0)); + $94 = HEAP32[(16828)>>2]|0; + _glBindBuffer(34963,($94|0)); + $95 = HEAP32[(16808)>>2]|0; + _glBufferData(34963,12288,($95|0),35044); + $96 = HEAP32[4282]|0; + $97 = ($96|0)==(0); + if ($97) { + $99 = HEAP32[(16816)>>2]|0; + $100 = HEAP32[(16820)>>2]|0; + $101 = HEAP32[(16824)>>2]|0; + $102 = HEAP32[(16828)>>2]|0; + HEAP32[$vararg_buffer17>>2] = $99; + $vararg_ptr20 = ((($vararg_buffer17)) + 4|0); + HEAP32[$vararg_ptr20>>2] = $100; + $vararg_ptr21 = ((($vararg_buffer17)) + 8|0); + HEAP32[$vararg_ptr21>>2] = $101; + $vararg_ptr22 = ((($vararg_buffer17)) + 12|0); + HEAP32[$vararg_ptr22>>2] = $102; + _TraceLog(0,6840,$vararg_buffer17); + } else { + $98 = HEAP32[(16812)>>2]|0; + HEAP32[$vararg_buffer14>>2] = $98; + _TraceLog(0,6775,$vararg_buffer14); + } + $103 = HEAP32[4282]|0; + $104 = ($103|0)==(0); + if ($104) { + STACKTOP = sp;return; + } + $105 = HEAP32[4283]|0; + FUNCTION_TABLE_vi[$105 & 31](0); + STACKTOP = sp;return; +} +function _LoadShaderProgram($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $$0 = 0, $$alloca_mul = 0, $$alloca_mul34 = 0, $$alloca_mul36 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; + var $25 = 0, $26 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer10 = 0, $vararg_buffer13 = 0, $vararg_buffer16 = 0, $vararg_buffer19 = 0, $vararg_buffer22 = 0, $vararg_buffer4 = 0, $vararg_buffer7 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(96|0); + $vararg_buffer22 = sp + 64|0; + $vararg_buffer19 = sp + 56|0; + $vararg_buffer16 = sp + 48|0; + $vararg_buffer13 = sp + 40|0; + $vararg_buffer10 = sp + 32|0; + $vararg_buffer7 = sp + 24|0; + $vararg_buffer4 = sp + 16|0; + $vararg_buffer1 = sp + 8|0; + $vararg_buffer = sp; + $2 = sp + 80|0; + $3 = sp + 76|0; + $4 = sp + 72|0; + $5 = sp + 68|0; + $6 = (_glCreateShader(35633)|0); + $7 = (_glCreateShader(35632)|0); + HEAP32[$2>>2] = $0; + HEAP32[$3>>2] = $1; + _glShaderSource(($6|0),1,($2|0),(0|0)); + _glShaderSource(($7|0),1,($3|0),(0|0)); + HEAP32[$4>>2] = 0; + _glCompileShader(($6|0)); + _glGetShaderiv(($6|0),35713,($4|0)); + $8 = HEAP32[$4>>2]|0; + $9 = ($8|0)==(1); + if ($9) { + HEAP32[$vararg_buffer4>>2] = $6; + _TraceLog(0,8173,$vararg_buffer4); + } else { + HEAP32[$vararg_buffer>>2] = $6; + _TraceLog(1,8121,$vararg_buffer); + HEAP32[$vararg_buffer>>2] = 0; + _glGetShaderiv(($6|0),35716,($vararg_buffer|0)); + $10 = HEAP32[$vararg_buffer>>2]|0; + $11 = (_llvm_stacksave()|0); + $$alloca_mul = $10; + $12 = STACKTOP; STACKTOP = STACKTOP + ((((1*$$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$$alloca_mul)|0)+15)&-16)|0);; + $13 = HEAP32[$vararg_buffer>>2]|0; + _glGetShaderInfoLog(($6|0),($13|0),($5|0),($12|0)); + HEAP32[$vararg_buffer1>>2] = $12; + _TraceLog(0,8170,$vararg_buffer1); + _llvm_stackrestore(($11|0)); + } + _glCompileShader(($7|0)); + _glGetShaderiv(($7|0),35713,($4|0)); + $14 = HEAP32[$4>>2]|0; + $15 = ($14|0)==(1); + if ($15) { + HEAP32[$vararg_buffer13>>2] = $7; + _TraceLog(0,8274,$vararg_buffer13); + } else { + HEAP32[$vararg_buffer7>>2] = $7; + _TraceLog(1,8223,$vararg_buffer7); + HEAP32[$vararg_buffer7>>2] = 0; + _glGetShaderiv(($7|0),35716,($vararg_buffer7|0)); + $16 = HEAP32[$vararg_buffer7>>2]|0; + $17 = (_llvm_stacksave()|0); + $$alloca_mul34 = $16; + $18 = STACKTOP; STACKTOP = STACKTOP + ((((1*$$alloca_mul34)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$$alloca_mul34)|0)+15)&-16)|0);; + $19 = HEAP32[$vararg_buffer7>>2]|0; + _glGetShaderInfoLog(($7|0),($19|0),($5|0),($18|0)); + HEAP32[$vararg_buffer10>>2] = $18; + _TraceLog(0,8170,$vararg_buffer10); + _llvm_stackrestore(($17|0)); + } + $20 = (_glCreateProgram()|0); + _glAttachShader(($20|0),($6|0)); + _glAttachShader(($20|0),($7|0)); + _glBindAttribLocation(($20|0),0,(7965|0)); + _glBindAttribLocation(($20|0),1,(7980|0)); + _glBindAttribLocation(($20|0),2,(8011|0)); + _glBindAttribLocation(($20|0),3,(8038|0)); + _glBindAttribLocation(($20|0),4,(8024|0)); + _glBindAttribLocation(($20|0),5,(7995|0)); + _glLinkProgram(($20|0)); + _glGetProgramiv(($20|0),35714,($4|0)); + $21 = HEAP32[$4>>2]|0; + $22 = ($21|0)==(0); + if ($22) { + HEAP32[$vararg_buffer16>>2] = $20; + _TraceLog(1,8326,$vararg_buffer16); + HEAP32[$vararg_buffer16>>2] = 0; + _glGetProgramiv(($20|0),35716,($vararg_buffer16|0)); + $23 = HEAP32[$vararg_buffer16>>2]|0; + $24 = (_llvm_stacksave()|0); + $$alloca_mul36 = $23; + $25 = STACKTOP; STACKTOP = STACKTOP + ((((1*$$alloca_mul36)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$$alloca_mul36)|0)+15)&-16)|0);; + $26 = HEAP32[$vararg_buffer16>>2]|0; + _glGetProgramInfoLog(($20|0),($26|0),($5|0),($25|0)); + HEAP32[$vararg_buffer19>>2] = $25; + _TraceLog(0,8170,$vararg_buffer19); + _glDeleteProgram(($20|0)); + _llvm_stackrestore(($24|0)); + $$0 = 0; + _glDeleteShader(($6|0)); + _glDeleteShader(($7|0)); + STACKTOP = sp;return ($$0|0); + } else { + HEAP32[$vararg_buffer22>>2] = $20; + _TraceLog(0,8372,$vararg_buffer22); + $$0 = $20; + _glDeleteShader(($6|0)); + _glDeleteShader(($7|0)); + STACKTOP = sp;return ($$0|0); + } + return (0)|0; +} +function _LoadDefaultShaderLocations($0) { + $0 = $0|0; + var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; + var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; + var sp = 0; + sp = STACKTOP; + $1 = HEAP32[$0>>2]|0; + $2 = (_glGetAttribLocation(($1|0),(7965|0))|0); + $3 = ((($0)) + 4|0); + HEAP32[$3>>2] = $2; + $4 = HEAP32[$0>>2]|0; + $5 = (_glGetAttribLocation(($4|0),(7980|0))|0); + $6 = ((($0)) + 8|0); + HEAP32[$6>>2] = $5; + $7 = HEAP32[$0>>2]|0; + $8 = (_glGetAttribLocation(($7|0),(7995|0))|0); + $9 = ((($0)) + 12|0); + HEAP32[$9>>2] = $8; + $10 = HEAP32[$0>>2]|0; + $11 = (_glGetAttribLocation(($10|0),(8011|0))|0); + $12 = ((($0)) + 16|0); + HEAP32[$12>>2] = $11; + $13 = HEAP32[$0>>2]|0; + $14 = (_glGetAttribLocation(($13|0),(8024|0))|0); + $15 = ((($0)) + 20|0); + HEAP32[$15>>2] = $14; + $16 = HEAP32[$0>>2]|0; + $17 = (_glGetAttribLocation(($16|0),(8038|0))|0); + $18 = ((($0)) + 24|0); + HEAP32[$18>>2] = $17; + $19 = HEAP32[$0>>2]|0; + $20 = (_glGetUniformLocation(($19|0),(8050|0))|0); + $21 = ((($0)) + 28|0); + HEAP32[$21>>2] = $20; + $22 = HEAP32[$0>>2]|0; + $23 = (_glGetUniformLocation(($22|0),(8060|0))|0); + $24 = ((($0)) + 32|0); + HEAP32[$24>>2] = $23; + $25 = HEAP32[$0>>2]|0; + $26 = (_glGetUniformLocation(($25|0),(8071|0))|0); + $27 = ((($0)) + 36|0); + HEAP32[$27>>2] = $26; + $28 = HEAP32[$0>>2]|0; + $29 = (_glGetUniformLocation(($28|0),(8082|0))|0); + $30 = ((($0)) + 40|0); + HEAP32[$30>>2] = $29; + $31 = HEAP32[$0>>2]|0; + $32 = (_glGetUniformLocation(($31|0),(8094|0))|0); + $33 = ((($0)) + 44|0); + HEAP32[$33>>2] = $32; + $34 = HEAP32[$0>>2]|0; + $35 = (_glGetUniformLocation(($34|0),(8103|0))|0); + $36 = ((($0)) + 48|0); + HEAP32[$36>>2] = $35; + $37 = HEAP32[$0>>2]|0; + $38 = (_glGetUniformLocation(($37|0),(8112|0))|0); + $39 = ((($0)) + 52|0); + HEAP32[$39>>2] = $38; + return; +} +function _IsMouseButtonPressed($0) { + $0 = $0|0; + var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $or$cond = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = (19733 + ($0)|0); + $2 = HEAP8[$1>>0]|0; + $3 = (19736 + ($0)|0); + $4 = HEAP8[$3>>0]|0; + $5 = ($2<<24>>24)!=($4<<24>>24); + $6 = ($2<<24>>24)==(1); + $or$cond = $6 & $5; + $$0 = $or$cond&1; + return ($$0|0); +} +function _IsMouseButtonReleased($0) { + $0 = $0|0; + var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $or$cond = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = (19733 + ($0)|0); + $2 = HEAP8[$1>>0]|0; + $3 = (19736 + ($0)|0); + $4 = HEAP8[$3>>0]|0; + $5 = ($2<<24>>24)!=($4<<24>>24); + $6 = ($2<<24>>24)==(0); + $or$cond = $6 & $5; + $$0 = $or$cond&1; + return ($$0|0); +} +function _rlClearScreenBuffers() { + var label = 0, sp = 0; + sp = STACKTOP; + _glClear(16640); + return; +} +function _CloseWindow() { + var $0 = 0, $vararg_buffer = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $vararg_buffer = sp; + _UnloadDefaultFont(); + _rlglClose(); + $0 = HEAP32[4687]|0; + _glfwDestroyWindow(($0|0)); + _glfwTerminate(); + _TraceLog(0,8667,$vararg_buffer); + STACKTOP = sp;return; +} +function _rlglClose() { + var $0 = 0, $1 = 0, $vararg_buffer = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $vararg_buffer = sp; + _UnloadDefaultShader(); + _UnloadDefaultBuffers(); + _glDeleteTextures(1,(16968|0)); + $0 = HEAP32[4242]|0; + HEAP32[$vararg_buffer>>2] = $0; + _TraceLog(0,8694,$vararg_buffer); + $1 = HEAP32[4243]|0; + _free($1); + STACKTOP = sp;return; +} +function _UnloadDefaultShader() { + var $0 = 0, label = 0, sp = 0; + sp = STACKTOP; + _glUseProgram(0); + $0 = HEAP32[4657]|0; + _glDeleteProgram(($0|0)); + return; +} +function _UnloadDefaultBuffers() { + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[4282]|0; + $1 = ($0|0)==(0); + if (!($1)) { + $2 = HEAP32[4283]|0; + FUNCTION_TABLE_vi[$2 & 31](0); + } + _glDisableVertexAttribArray(0); + _glDisableVertexAttribArray(1); + _glDisableVertexAttribArray(2); + _glDisableVertexAttribArray(3); + _glBindBuffer(34962,0); + _glBindBuffer(34963,0); + _glDeleteBuffers(1,((17008)|0)); + _glDeleteBuffers(1,((17012)|0)); + _glDeleteBuffers(1,((17056)|0)); + _glDeleteBuffers(1,((17060)|0)); + _glDeleteBuffers(1,((16816)|0)); + _glDeleteBuffers(1,((16820)|0)); + _glDeleteBuffers(1,((16824)|0)); + _glDeleteBuffers(1,((16828)|0)); + $3 = HEAP32[4282]|0; + $4 = ($3|0)==(0); + if (!($4)) { + $5 = HEAP32[4671]|0; + FUNCTION_TABLE_vii[$5 & 63](1,(17004)); + $6 = HEAP32[4671]|0; + FUNCTION_TABLE_vii[$6 & 63](1,(17052)); + $7 = HEAP32[4671]|0; + FUNCTION_TABLE_vii[$7 & 63](1,(16812)); + } + $8 = HEAP32[(16988)>>2]|0; + _free($8); + $9 = HEAP32[(16996)>>2]|0; + _free($9); + $10 = HEAP32[(17036)>>2]|0; + _free($10); + $11 = HEAP32[(17044)>>2]|0; + _free($11); + $12 = HEAP32[(16796)>>2]|0; + _free($12); + $13 = HEAP32[(16800)>>2]|0; + _free($13); + $14 = HEAP32[(16804)>>2]|0; + _free($14); + $15 = HEAP32[(16808)>>2]|0; + _free($15); + return; +} +function _BeginDrawing() { + var $0 = 0.0, $1 = 0.0, $2 = 0.0, $downscaleView$byval_copy = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $downscaleView$byval_copy = sp; + $0 = (+_GetTime()); + HEAPF64[2079] = $0; + $1 = +HEAPF64[2078]; + $2 = $0 - $1; + HEAPF64[2080] = $2; + HEAPF64[2078] = $0; + _rlClearScreenBuffers(); + _rlLoadIdentity(); + dest=$downscaleView$byval_copy; src=18788; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + (_MatrixToFloat($downscaleView$byval_copy)|0); + _rlMultMatrixf(17136); + STACKTOP = sp;return; +} +function _rlMultMatrixf($0) { + $0 = $0|0; + var $$byval_copy = 0, $$byval_copy1 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; + var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0; + var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 256|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(256|0); + $$byval_copy1 = sp + 192|0; + $$byval_copy = sp + 128|0; + $1 = sp + 64|0; + $2 = sp; + $3 = HEAP32[$0>>2]|0; + HEAP32[$1>>2] = $3; + $4 = ((($1)) + 4|0); + $5 = ((($0)) + 4|0); + $6 = HEAP32[$5>>2]|0; + HEAP32[$4>>2] = $6; + $7 = ((($1)) + 8|0); + $8 = ((($0)) + 8|0); + $9 = HEAP32[$8>>2]|0; + HEAP32[$7>>2] = $9; + $10 = ((($1)) + 12|0); + $11 = ((($0)) + 12|0); + $12 = HEAP32[$11>>2]|0; + HEAP32[$10>>2] = $12; + $13 = ((($1)) + 16|0); + $14 = ((($0)) + 16|0); + $15 = HEAP32[$14>>2]|0; + HEAP32[$13>>2] = $15; + $16 = ((($1)) + 20|0); + $17 = ((($0)) + 20|0); + $18 = HEAP32[$17>>2]|0; + HEAP32[$16>>2] = $18; + $19 = ((($1)) + 24|0); + $20 = ((($0)) + 24|0); + $21 = HEAP32[$20>>2]|0; + HEAP32[$19>>2] = $21; + $22 = ((($1)) + 28|0); + $23 = ((($0)) + 28|0); + $24 = HEAP32[$23>>2]|0; + HEAP32[$22>>2] = $24; + $25 = ((($1)) + 32|0); + $26 = ((($0)) + 32|0); + $27 = HEAP32[$26>>2]|0; + HEAP32[$25>>2] = $27; + $28 = ((($1)) + 36|0); + $29 = ((($0)) + 36|0); + $30 = HEAP32[$29>>2]|0; + HEAP32[$28>>2] = $30; + $31 = ((($1)) + 40|0); + $32 = ((($0)) + 40|0); + $33 = HEAP32[$32>>2]|0; + HEAP32[$31>>2] = $33; + $34 = ((($1)) + 44|0); + $35 = ((($0)) + 44|0); + $36 = HEAP32[$35>>2]|0; + HEAP32[$34>>2] = $36; + $37 = ((($1)) + 48|0); + $38 = ((($0)) + 48|0); + $39 = HEAP32[$38>>2]|0; + HEAP32[$37>>2] = $39; + $40 = ((($1)) + 52|0); + $41 = ((($0)) + 52|0); + $42 = HEAP32[$41>>2]|0; + HEAP32[$40>>2] = $42; + $43 = ((($1)) + 56|0); + $44 = ((($0)) + 56|0); + $45 = HEAP32[$44>>2]|0; + HEAP32[$43>>2] = $45; + $46 = ((($1)) + 60|0); + $47 = ((($0)) + 60|0); + $48 = HEAP32[$47>>2]|0; + HEAP32[$46>>2] = $48; + $49 = HEAP32[4648]|0; + dest=$$byval_copy; src=$49; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$$byval_copy1; src=$1; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixMultiply($2,$$byval_copy,$$byval_copy1); + dest=$49; src=$2; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + STACKTOP = sp;return; +} +function _EndDrawing() { + var $0 = 0.0, $1 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + _rlglDraw(); + _SwapBuffers(); + _PollInputEvents(); + $0 = (+_GetTime()); + HEAPF64[2079] = $0; + $1 = +HEAPF64[2078]; + $2 = $0 - $1; + HEAPF64[2081] = $2; + HEAPF64[2078] = $0; + $3 = +HEAPF64[2080]; + $4 = $2 + $3; + HEAPF64[2064] = $4; + $5 = +HEAPF64[2075]; + $6 = $4 < $5; + if (!($6)) { + return; + } + $7 = $5 - $4; + $8 = $7 * 1000.0; + $9 = $8; + _Wait($9); + $10 = (+_GetTime()); + HEAPF64[2079] = $10; + $11 = +HEAPF64[2078]; + $12 = $10 - $11; + HEAPF64[2078] = $10; + $13 = +HEAPF64[2064]; + $14 = $12 + $13; + HEAPF64[2064] = $14; + return; +} +function _SwapBuffers() { + var $0 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[4687]|0; + _glfwSwapBuffers(($0|0)); + return; +} +function _PollInputEvents() { + var $$04857 = 0, $$05160 = 0, $$058 = 0, $$lcssa = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0; + var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0.0, $40 = 0; + var $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, $scevgep = 0, $scevgep67 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 1456|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(1456|0); + $0 = sp + 1440|0; + $1 = sp + 1432|0; + $2 = sp; + _UpdateGestures(); + HEAP32[753] = -1; + HEAP32[755] = -1; + HEAP32[4723] = 0; + $3 = HEAP32[4687]|0; + _glfwGetCursorPos(($3|0),($0|0),($1|0)); + $4 = +HEAPF64[$0>>3]; + $5 = $4; + HEAPF32[4148] = $5; + $6 = +HEAPF64[$1>>3]; + $7 = $6; + HEAPF32[(16596)>>2] = $7; + _memcpy((20251|0),(19739|0),512)|0; + ;HEAP8[19736>>0]=HEAP8[19733>>0]|0;HEAP8[19736+1>>0]=HEAP8[19733+1>>0]|0;HEAP8[19736+2>>0]=HEAP8[19733+2>>0]|0; + $8 = HEAP32[4722]|0; + HEAP32[4688] = $8; + HEAP32[4722] = 0; + $9 = (_emscripten_get_num_gamepads()|0); + $10 = ($9|0)>(0); + if (!($10)) { + STACKTOP = sp;return; + } + $11 = ((($2)) + 12|0); + $12 = ((($2)) + 8|0); + $$05160 = 0; + while(1) { + $scevgep = (20763 + ($$05160<<5)|0); + $scevgep67 = (20891 + ($$05160<<5)|0); + dest=$scevgep; src=$scevgep67; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + $13 = (_emscripten_get_gamepad_status(($$05160|0),($2|0))|0); + $14 = ($13|0)==(0); + if ($14) { + $15 = HEAP32[$11>>2]|0; + $16 = ($15|0)>(0); + if ($16) { + $17 = HEAP32[$11>>2]|0; + $$04857 = 0; + while(1) { + $21 = (((($2)) + 1040|0) + ($$04857<<2)|0); + $22 = HEAP32[$21>>2]|0; + $23 = ($22|0)==(1); + $24 = ((20891 + ($$05160<<5)|0) + ($$04857)|0); + if ($23) { + HEAP8[$24>>0] = 1; + HEAP32[755] = $$04857; + } else { + HEAP8[$24>>0] = 0; + } + $25 = (($$04857) + 1)|0; + $26 = ($25|0)<($17|0); + $27 = ($25|0)<(32); + $28 = $27 & $26; + if ($28) { + $$04857 = $25; + } else { + break; + } + } + } + $18 = HEAP32[$12>>2]|0; + $19 = ($18|0)>(0); + if ($19) { + $20 = HEAP32[$12>>2]|0; + $$058 = 0; + while(1) { + $29 = (((($2)) + 16|0) + ($$058<<3)|0); + $30 = +HEAPF64[$29>>3]; + $31 = $30; + $32 = ((18896 + ($$05160<<5)|0) + ($$058<<2)|0); + HEAPF32[$32>>2] = $31; + $33 = (($$058) + 1)|0; + $34 = ($33|0)<($20|0); + $35 = ($33|0)<(8); + $36 = $35 & $34; + if ($36) { + $$058 = $33; + } else { + $$lcssa = $20; + break; + } + } + } else { + $$lcssa = $18; + } + HEAP32[4723] = $$lcssa; + } + $37 = (($$05160) + 1)|0; + $38 = ($37|0)<($9|0); + $39 = ($37|0)<(4); + $40 = $38 & $39; + if ($40) { + $$05160 = $37; + } else { + break; + } + } + STACKTOP = sp;return; +} +function _Wait($0) { + $0 = +$0; + var $1 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = (+_GetTime()); + $2 = 0.0 - $1; + $3 = $0 / 1000.0; + $4 = $3; + $5 = $2 < $4; + if (!($5)) { + return; + } + while(1) { + $6 = (+_GetTime()); + $7 = $6 - $1; + $8 = $7 < $4; + if (!($8)) { + break; + } + } + return; +} +function _Begin3dMode($0) { + $0 = $0|0; + var $$byval_copy = 0, $$byval_copy1 = 0, $$byval_copy3 = 0, $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0; + var $8 = 0.0, $9 = 0.0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 160|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(160|0); + $$byval_copy3 = sp + 88|0; + $$byval_copy1 = sp + 76|0; + $$byval_copy = sp + 64|0; + $1 = sp; + _rlglDraw(); + _rlMatrixMode(5889); + _rlPushMatrix(); + _rlLoadIdentity(); + $2 = HEAP32[4690]|0; + $3 = (+($2|0)); + $4 = HEAP32[4691]|0; + $5 = (+($4|0)); + $6 = $3 / $5; + $7 = ((($0)) + 36|0); + $8 = +HEAPF32[$7>>2]; + $9 = $8 * 3.1415927410125732; + $10 = $9; + $11 = $10 / 360.0; + $12 = (+Math_tan((+$11))); + $13 = $12 * 0.01; + $14 = $6; + $15 = $13 * $14; + $16 = -$15; + $17 = -$13; + _rlFrustum($16,$15,$17,$13,0.01,1000.0); + _rlMatrixMode(5888); + _rlLoadIdentity(); + $18 = ((($0)) + 12|0); + $19 = ((($0)) + 24|0); + ;HEAP32[$$byval_copy>>2]=HEAP32[$0>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$0+8>>2]|0; + ;HEAP32[$$byval_copy1>>2]=HEAP32[$18>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$18+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$18+8>>2]|0; + ;HEAP32[$$byval_copy3>>2]=HEAP32[$19>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$19+4>>2]|0;HEAP32[$$byval_copy3+8>>2]=HEAP32[$19+8>>2]|0; + _MatrixLookAt($1,$$byval_copy,$$byval_copy1,$$byval_copy3); + dest=$$byval_copy3; src=$1; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + (_MatrixToFloat($$byval_copy3)|0); + _rlMultMatrixf(17136); + _rlEnableDepthTest(); + STACKTOP = sp;return; +} +function _rlFrustum($0,$1,$2,$3,$4,$5) { + $0 = +$0; + $1 = +$1; + $2 = +$2; + $3 = +$3; + $4 = +$4; + $5 = +$5; + var $$byval_copy = 0, $$byval_copy1 = 0, $6 = 0, $7 = 0, $8 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 256|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(256|0); + $$byval_copy1 = sp + 192|0; + $$byval_copy = sp + 128|0; + $6 = sp + 64|0; + $7 = sp; + _MatrixFrustum($6,$0,$1,$2,$3,$4,$5); + _MatrixTranspose($6); + $8 = HEAP32[4648]|0; + dest=$$byval_copy; src=$8; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$$byval_copy1; src=$6; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixMultiply($7,$$byval_copy,$$byval_copy1); + dest=$8; src=$7; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + STACKTOP = sp;return; +} +function _rlEnableDepthTest() { + var label = 0, sp = 0; + sp = STACKTOP; + _glEnable(2929); + return; +} +function _End3dMode() { + var label = 0, sp = 0; + sp = STACKTOP; + _rlglDraw(); + _rlMatrixMode(5889); + _rlPopMatrix(); + _rlMatrixMode(5888); + _rlLoadIdentity(); + _rlDisableDepthTest(); + return; +} +function _rlDisableDepthTest() { + var label = 0, sp = 0; + sp = STACKTOP; + _glDisable(2929); + return; +} +function _rlEnableRenderTexture($0) { + $0 = $0|0; + var label = 0, sp = 0; + sp = STACKTOP; + _glBindFramebuffer(36160,($0|0)); + return; +} +function _rlDisableRenderTexture() { + var label = 0, sp = 0; + sp = STACKTOP; + _glBindFramebuffer(36160,0); + return; +} +function _IsKeyPressed($0) { + $0 = $0|0; + var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $or$cond = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = (19739 + ($0)|0); + $2 = HEAP8[$1>>0]|0; + $3 = (20251 + ($0)|0); + $4 = HEAP8[$3>>0]|0; + $5 = ($2<<24>>24)!=($4<<24>>24); + $6 = ($2<<24>>24)==(1); + $or$cond = $6 & $5; + $$0 = $or$cond&1; + return ($$0|0); +} +function _rlDeleteShader($0) { + $0 = $0|0; + var $1 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = ($0|0)==(0); + if ($1) { + return; + } + _glDeleteProgram(($0|0)); + return; +} +function _UnloadShader($0) { + $0 = $0|0; + var $1 = 0, $2 = 0, $3 = 0, $vararg_buffer = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $vararg_buffer = sp; + $1 = HEAP32[$0>>2]|0; + $2 = ($1|0)==(0); + if ($2) { + STACKTOP = sp;return; + } + _rlDeleteShader($1); + $3 = HEAP32[$0>>2]|0; + HEAP32[$vararg_buffer>>2] = $3; + _TraceLog(0,8759,$vararg_buffer); + STACKTOP = sp;return; +} +function _GetShaderLocation($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $2 = 0, $3 = 0, $4 = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $vararg_buffer = sp; + $2 = HEAP32[$0>>2]|0; + $3 = (_glGetUniformLocation(($2|0),($1|0))|0); + $4 = ($3|0)==(-1); + if (!($4)) { + STACKTOP = sp;return ($3|0); + } + HEAP32[$vararg_buffer>>2] = $2; + $vararg_ptr1 = ((($vararg_buffer)) + 4|0); + HEAP32[$vararg_ptr1>>2] = $1; + _TraceLog(3,8801,$vararg_buffer); + STACKTOP = sp;return ($3|0); +} +function _SetShaderValue($0,$1,$2,$3) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + var $4 = 0, $vararg_buffer = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $vararg_buffer = sp; + $4 = HEAP32[$0>>2]|0; + _glUseProgram(($4|0)); + switch ($3|0) { + case 1: { + _glUniform1fv(($1|0),1,($2|0)); + break; + } + case 2: { + _glUniform2fv(($1|0),1,($2|0)); + break; + } + case 3: { + _glUniform3fv(($1|0),1,($2|0)); + break; + } + case 4: { + _glUniform4fv(($1|0),1,($2|0)); + break; + } + default: { + _TraceLog(1,8856,$vararg_buffer); + } + } + STACKTOP = sp;return; +} +function _InitVrSimulator($0) { + $0 = $0|0; + var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $hmd$byval_copy = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer3 = 0, $vararg_buffer5 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 144|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(144|0); + $hmd$byval_copy = sp + 72|0; + $vararg_buffer5 = sp + 24|0; + $vararg_buffer3 = sp + 16|0; + $vararg_buffer1 = sp + 8|0; + $vararg_buffer = sp; + $1 = sp + 28|0; + $2 = ($0|0)==(1); + do { + if ($2) { + HEAP32[4756] = 1280; + HEAP32[(19028)>>2] = 800; + HEAPF32[(19032)>>2] = 0.14975999295711517; + HEAPF32[(19036)>>2] = 0.093560002744197845; + HEAPF32[(19040)>>2] = 0.046780001372098923; + HEAPF32[(19044)>>2] = 0.041000001132488251; + HEAPF32[(19048)>>2] = 0.063500002026557922; + HEAPF32[(19052)>>2] = 0.064000003039836884; + HEAPF32[(19056)>>2] = 1.0; + HEAPF32[(19060)>>2] = 0.2199999988079071; + HEAPF32[(19064)>>2] = 0.23999999463558197; + HEAPF32[(19068)>>2] = 0.0; + HEAPF32[(19072)>>2] = 0.99599999189376831; + HEAPF32[(19076)>>2] = -0.0040000001899898052; + HEAPF32[(19080)>>2] = 1.0140000581741333; + HEAPF32[(19084)>>2] = 0.0; + _TraceLog(0,8900,$vararg_buffer); + } else { + $3 = $0 | 2; + $4 = ($3|0)==(2); + if ($4) { + HEAP32[4756] = 2160; + HEAP32[(19028)>>2] = 1200; + HEAPF32[(19032)>>2] = 0.13379299640655518; + HEAPF32[(19036)>>2] = 0.066899999976158142; + HEAPF32[(19040)>>2] = 0.046780001372098923; + HEAPF32[(19044)>>2] = 0.041000001132488251; + HEAPF32[(19048)>>2] = 0.070000000298023224; + HEAPF32[(19052)>>2] = 0.070000000298023224; + HEAPF32[(19056)>>2] = 1.0; + HEAPF32[(19060)>>2] = 0.2199999988079071; + HEAPF32[(19064)>>2] = 0.23999999463558197; + HEAPF32[(19068)>>2] = 0.0; + HEAPF32[(19072)>>2] = 0.99599999189376831; + HEAPF32[(19076)>>2] = -0.0040000001899898052; + HEAPF32[(19080)>>2] = 1.0140000581741333; + HEAPF32[(19084)>>2] = 0.0; + _TraceLog(0,8944,$vararg_buffer1); + break; + } else { + _TraceLog(1,8988,$vararg_buffer3); + _TraceLog(1,9045,$vararg_buffer5); + break; + } + } + } while(0); + $5 = HEAP32[4300]|0; + $6 = HEAP32[4301]|0; + _rlglLoadRenderTexture($1,$5,$6); + dest=17208; src=$1; stop=dest+44|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $7 = (_LoadShaderProgram(6939,9083)|0); + HEAP32[(17252)>>2] = $7; + $8 = ($7|0)==(0); + if ($8) { + dest=$hmd$byval_copy; src=19024; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _SetStereoConfig($hmd$byval_copy); + HEAP32[4772] = 1; + STACKTOP = sp;return; + } + _LoadDefaultShaderLocations((17252)); + dest=$hmd$byval_copy; src=19024; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _SetStereoConfig($hmd$byval_copy); + HEAP32[4772] = 1; + STACKTOP = sp;return; +} +function _SetStereoConfig($0) { + $0 = $0|0; + var $$byval_copy34 = 0, $$byval_copy35 = 0, $1 = 0, $10 = 0, $100 = 0.0, $101 = 0.0, $102 = 0.0, $103 = 0.0, $104 = 0.0, $105 = 0.0, $106 = 0, $107 = 0.0, $108 = 0.0, $109 = 0.0, $11 = 0, $110 = 0.0, $12 = 0, $13 = 0.0, $14 = 0.0, $15 = 0; + var $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0.0, $21 = 0.0, $22 = 0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $27 = 0.0, $28 = 0, $29 = 0.0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0; + var $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0, $44 = 0.0, $45 = 0, $46 = 0.0, $47 = 0.0, $48 = 0.0, $49 = 0, $5 = 0, $50 = 0.0, $51 = 0.0; + var $52 = 0.0, $53 = 0.0, $54 = 0, $55 = 0.0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0.0, $61 = 0, $62 = 0.0, $63 = 0.0, $64 = 0, $65 = 0.0, $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0.0, $7 = 0; + var $70 = 0.0, $71 = 0.0, $72 = 0.0, $73 = 0.0, $74 = 0.0, $75 = 0.0, $76 = 0.0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0.0, $81 = 0.0, $82 = 0.0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0; + var $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0.0, $94 = 0.0, $95 = 0.0, $96 = 0, $97 = 0.0, $98 = 0.0, $99 = 0.0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer5 = 0, $vararg_ptr12 = 0, $vararg_ptr16 = 0, $vararg_ptr4 = 0, $vararg_ptr8 = 0, dest = 0; + var label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 640|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(640|0); + $$byval_copy35 = sp + 168|0; + $$byval_copy34 = sp + 104|0; + $vararg_buffer5 = sp + 40|0; + $vararg_buffer1 = sp + 24|0; + $vararg_buffer = sp + 16|0; + $1 = sp + 248|0; + $2 = sp + 240|0; + $3 = sp + 8|0; + $4 = sp; + $5 = sp + 232|0; + $6 = sp + 576|0; + $7 = sp + 512|0; + $8 = sp + 448|0; + $9 = sp + 384|0; + $10 = sp + 320|0; + $11 = sp + 256|0; + $12 = HEAP32[$0>>2]|0; + $13 = (+($12|0)); + $14 = $13 * 0.5; + $15 = ((($0)) + 4|0); + $16 = HEAP32[$15>>2]|0; + $17 = (+($16|0)); + $18 = $14 / $17; + $19 = ((($0)) + 8|0); + $20 = +HEAPF32[$19>>2]; + $21 = $20 * 0.25; + $22 = ((($0)) + 24|0); + $23 = +HEAPF32[$22>>2]; + $24 = $23 * 0.5; + $25 = $21 - $24; + $26 = $25 / $20; + $27 = $26 + 0.25; + HEAPF32[$1>>2] = $27; + $28 = ((($1)) + 4|0); + HEAPF32[$28>>2] = 0.5; + $29 = 0.75 - $26; + HEAPF32[$2>>2] = $29; + $30 = ((($2)) + 4|0); + HEAPF32[$30>>2] = 0.5; + $31 = $3; + $32 = $31; + HEAP32[$32>>2] = 1048576000; + $33 = (($31) + 4)|0; + $34 = $33; + HEAP32[$34>>2] = 1056964608; + $35 = $4; + $36 = $35; + HEAP32[$36>>2] = 1061158912; + $37 = (($35) + 4)|0; + $38 = $37; + HEAP32[$38>>2] = 1056964608; + $39 = $26 * 4.0; + $40 = -1.0 - $39; + $41 = (+Math_abs((+$40))); + $42 = $41 * $41; + $43 = ((($0)) + 32|0); + $44 = +HEAPF32[$43>>2]; + $45 = ((($0)) + 36|0); + $46 = +HEAPF32[$45>>2]; + $47 = $42 * $46; + $48 = $44 + $47; + $49 = ((($0)) + 40|0); + $50 = +HEAPF32[$49>>2]; + $51 = $42 * $50; + $52 = $42 * $51; + $53 = $48 + $52; + $54 = ((($0)) + 44|0); + $55 = +HEAPF32[$54>>2]; + $56 = $42 * $55; + $57 = $42 * $56; + $58 = $42 * $57; + $59 = $53 + $58; + $60 = $59; + HEAPF64[$vararg_buffer>>3] = $60; + _TraceLog(3,10674,$vararg_buffer); + HEAPF32[$vararg_buffer>>2] = 4.0; + $61 = ((($vararg_buffer)) + 4|0); + $62 = 2.0 / $18; + HEAPF32[$61>>2] = $62; + $63 = 0.25 / $59; + HEAPF32[$5>>2] = $63; + $64 = ((($5)) + 4|0); + $65 = $18 * 0.5; + $66 = $65 / $59; + HEAPF32[$64>>2] = $66; + $67 = +HEAPF32[$1>>2]; + $68 = $67; + $69 = +HEAPF32[$28>>2]; + $70 = $69; + HEAPF64[$vararg_buffer1>>3] = $68; + $vararg_ptr4 = ((($vararg_buffer1)) + 8|0); + HEAPF64[$vararg_ptr4>>3] = $70; + _TraceLog(3,10699,$vararg_buffer1); + $71 = +HEAPF32[$2>>2]; + $72 = $71; + $73 = +HEAPF32[$30>>2]; + $74 = $73; + HEAPF64[$vararg_buffer5>>3] = $72; + $vararg_ptr8 = ((($vararg_buffer5)) + 8|0); + HEAPF64[$vararg_ptr8>>3] = $74; + _TraceLog(3,10750,$vararg_buffer5); + $75 = +HEAPF32[$5>>2]; + $76 = $75; + $77 = +HEAPF32[$64>>2]; + $78 = $77; + HEAPF64[$$byval_copy34>>3] = $76; + $vararg_ptr12 = ((($$byval_copy34)) + 8|0); + HEAPF64[$vararg_ptr12>>3] = $78; + _TraceLog(3,10802,$$byval_copy34); + $79 = +HEAPF32[$vararg_buffer>>2]; + $80 = $79; + $81 = +HEAPF32[$61>>2]; + $82 = $81; + HEAPF64[$$byval_copy35>>3] = $80; + $vararg_ptr16 = ((($$byval_copy35)) + 8|0); + HEAPF64[$vararg_ptr16>>3] = $82; + _TraceLog(3,10844,$$byval_copy35); + dest=$$byval_copy35; src=(17252); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $83 = (_GetShaderLocation($$byval_copy35,10888)|0); + dest=$$byval_copy35; src=(17252); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _SetShaderValue($$byval_copy35,$83,$1,2); + dest=$$byval_copy35; src=(17252); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $84 = (_GetShaderLocation($$byval_copy35,10903)|0); + dest=$$byval_copy35; src=(17252); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _SetShaderValue($$byval_copy35,$84,$2,2); + dest=$$byval_copy35; src=(17252); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $85 = (_GetShaderLocation($$byval_copy35,10919)|0); + dest=$$byval_copy35; src=(17252); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _SetShaderValue($$byval_copy35,$85,$3,2); + dest=$$byval_copy35; src=(17252); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $86 = (_GetShaderLocation($$byval_copy35,10936)|0); + dest=$$byval_copy35; src=(17252); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _SetShaderValue($$byval_copy35,$86,$4,2); + dest=$$byval_copy35; src=(17252); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $87 = (_GetShaderLocation($$byval_copy35,10954)|0); + dest=$$byval_copy35; src=(17252); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _SetShaderValue($$byval_copy35,$87,$5,2); + dest=$$byval_copy35; src=(17252); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $88 = (_GetShaderLocation($$byval_copy35,10960)|0); + dest=$$byval_copy35; src=(17252); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _SetShaderValue($$byval_copy35,$88,$vararg_buffer,2); + dest=$$byval_copy35; src=(17252); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $89 = (_GetShaderLocation($$byval_copy35,10968)|0); + dest=$$byval_copy35; src=(17252); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _SetShaderValue($$byval_copy35,$89,$43,4); + dest=$$byval_copy35; src=(17252); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $90 = (_GetShaderLocation($$byval_copy35,10981)|0); + $91 = ((($0)) + 48|0); + dest=$$byval_copy35; src=(17252); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _SetShaderValue($$byval_copy35,$90,$91,4); + $92 = ((($0)) + 12|0); + $93 = +HEAPF32[$92>>2]; + $94 = $93 * 0.5; + $95 = $94; + $96 = ((($0)) + 20|0); + $97 = +HEAPF32[$96>>2]; + $98 = $97; + $99 = (+Math_atan2((+$95),(+$98))); + $100 = $99; + $101 = $100 * 2.0; + $102 = $101 * 57.2957763671875; + $103 = $102; + $104 = $18; + _MatrixPerspective($vararg_buffer5,$103,$104,0.01,1000.0); + _MatrixTranslate($6,$39,0.0,0.0); + dest=$$byval_copy34; src=$vararg_buffer5; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$$byval_copy35; src=$6; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixMultiply($7,$$byval_copy34,$$byval_copy35); + dest=(17308); src=$7; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $105 = -$39; + _MatrixTranslate($8,$105,0.0,0.0); + dest=$$byval_copy34; src=$vararg_buffer5; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$$byval_copy35; src=$8; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixMultiply($9,$$byval_copy34,$$byval_copy35); + dest=(17372); src=$9; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixTranspose((17308)); + _MatrixTranspose((17372)); + $106 = ((($0)) + 28|0); + $107 = +HEAPF32[$106>>2]; + $108 = $107 * -0.5; + _MatrixTranslate($10,$108,0.075000002980232239,0.045000001788139343); + dest=(17436); src=$10; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $109 = +HEAPF32[$106>>2]; + $110 = $109 * 0.5; + _MatrixTranslate($11,$110,0.075000002980232239,0.045000001788139343); + dest=(17500); src=$11; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + STACKTOP = sp;return; +} +function _CloseVrSimulator() { + var $$byval_copy1 = 0, $0 = 0, $1 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $$byval_copy1 = sp; + $0 = HEAP32[4772]|0; + $1 = ($0|0)==(0); + if ($1) { + STACKTOP = sp;return; + } + dest=$$byval_copy1; src=17208; stop=dest+44|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _rlDeleteRenderTextures($$byval_copy1); + dest=$$byval_copy1; src=(17252); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _UnloadShader($$byval_copy1); + STACKTOP = sp;return; +} +function _ToggleVrMode() { + var $0 = 0, $1 = 0, $10 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(128|0); + $0 = sp + 64|0; + $1 = sp; + $2 = HEAP32[4772]|0; + $3 = ($2|0)==(0); + $4 = $3&1; + HEAP32[4772] = $4; + if ($3) { + HEAP32[4240] = 1; + STACKTOP = sp;return; + } else { + HEAP32[4240] = 0; + $5 = HEAP32[4300]|0; + $6 = HEAP32[4301]|0; + _rlViewport(0,0,$5,$6); + $7 = HEAP32[4300]|0; + $8 = (+($7|0)); + $9 = HEAP32[4301]|0; + $10 = (+($9|0)); + _MatrixOrtho($0,0.0,$8,$10,0.0,0.0,1.0); + dest=16832; src=$0; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixTranspose(16832); + _MatrixIdentity($1); + dest=16896; src=$1; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + STACKTOP = sp;return; + } +} +function _BeginVrDrawing() { + var $0 = 0, $1 = 0, $2 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[4772]|0; + $1 = ($0|0)==(0); + if ($1) { + return; + } + $2 = HEAP32[4302]|0; + _rlEnableRenderTexture($2); + _rlClearScreenBuffers(); + HEAP32[4240] = 1; + return; +} +function _EndVrDrawing() { + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0, $18 = 0.0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0.0, $23 = 0, $24 = 0.0, $3 = 0, $4 = 0; + var $5 = 0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(128|0); + $0 = sp + 64|0; + $1 = sp; + $2 = HEAP32[4772]|0; + $3 = ($2|0)==(0); + if ($3) { + STACKTOP = sp;return; + } + HEAP32[4240] = 0; + _rlDisableRenderTexture(); + _rlClearScreenBuffers(); + $4 = HEAP32[4300]|0; + $5 = HEAP32[4301]|0; + _rlViewport(0,0,$4,$5); + _rlMatrixMode(5889); + _rlLoadIdentity(); + $6 = HEAP32[4300]|0; + $7 = (+($6|0)); + $8 = HEAP32[4301]|0; + $9 = (+($8|0)); + _rlOrtho(0.0,$7,$9,0.0,0.0,1.0); + _rlMatrixMode(5888); + _rlLoadIdentity(); + dest=17072; src=(17252); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $10 = HEAP32[(17212)>>2]|0; + _rlEnableTexture($10); + _rlPushMatrix(); + _rlBegin(7); + _rlColor4ub(-1,-1,-1,-1); + _rlTexCoord2f(0.0,1.0); + _rlVertex2f(0.0,0.0); + _rlTexCoord2f(0.0,0.0); + $11 = HEAP32[(17220)>>2]|0; + $12 = (+($11|0)); + _rlVertex2f(0.0,$12); + _rlTexCoord2f(1.0,0.0); + $13 = HEAP32[(17216)>>2]|0; + $14 = (+($13|0)); + $15 = HEAP32[(17220)>>2]|0; + $16 = (+($15|0)); + _rlVertex2f($14,$16); + _rlTexCoord2f(1.0,1.0); + $17 = HEAP32[(17216)>>2]|0; + $18 = (+($17|0)); + _rlVertex2f($18,0.0); + _rlEnd(); + _rlPopMatrix(); + _rlDisableTexture(); + _UpdateDefaultBuffers(); + _DrawDefaultBuffers(); + dest=17072; src=18628; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $19 = HEAP32[4300]|0; + $20 = HEAP32[4301]|0; + _rlViewport(0,0,$19,$20); + $21 = HEAP32[4300]|0; + $22 = (+($21|0)); + $23 = HEAP32[4301]|0; + $24 = (+($23|0)); + _MatrixOrtho($0,0.0,$22,$24,0.0,0.0,1.0); + dest=16832; src=$0; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixTranspose(16832); + _MatrixIdentity($1); + dest=16896; src=$1; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _rlDisableDepthTest(); + STACKTOP = sp;return; +} function _emscripten_GetProcAddress($0) { $0 = $0|0; var $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0; @@ -15583,7 +15509,7 @@ function _emscripten_GetProcAddress($0) { $10 = HEAP32[$2>>2]|0; (_strcpy($9,$10)|0); $11 = HEAP32[$3>>2]|0; - $12 = (_strstr($11,10927)|0); + $12 = (_strstr($11,10995)|0); HEAP32[$4>>2] = $12; $13 = HEAP32[$4>>2]|0; $14 = ($13|0)!=(0|0); @@ -15592,7 +15518,7 @@ function _emscripten_GetProcAddress($0) { HEAP8[$15>>0] = 0; } $16 = HEAP32[$3>>2]|0; - $17 = (_strstr($16,10931)|0); + $17 = (_strstr($16,10999)|0); HEAP32[$4>>2] = $17; $18 = HEAP32[$4>>2]|0; $19 = ($18|0)!=(0|0); @@ -15601,7 +15527,7 @@ function _emscripten_GetProcAddress($0) { HEAP8[$20>>0] = 0; } $21 = HEAP32[$3>>2]|0; - $22 = (_strstr($21,10935)|0); + $22 = (_strstr($21,11003)|0); HEAP32[$4>>2] = $22; $23 = HEAP32[$4>>2]|0; $24 = ($23|0)!=(0|0); @@ -15610,7 +15536,7 @@ function _emscripten_GetProcAddress($0) { HEAP8[$25>>0] = 0; } $26 = HEAP32[$3>>2]|0; - $27 = (_strstr($26,10939)|0); + $27 = (_strstr($26,11007)|0); HEAP32[$4>>2] = $27; $28 = HEAP32[$4>>2]|0; $29 = ($28|0)!=(0|0); @@ -15619,1210 +15545,1210 @@ function _emscripten_GetProcAddress($0) { HEAP8[$30>>0] = 0; } $31 = HEAP32[$3>>2]|0; - $32 = (_strcmp($31,10945)|0); + $32 = (_strcmp($31,11013)|0); $33 = ($32|0)!=(0); do { if ($33) { $34 = HEAP32[$3>>2]|0; - $35 = (_strcmp($34,10983)|0); + $35 = (_strcmp($34,11051)|0); $36 = ($35|0)!=(0); if (!($36)) { - HEAP32[$3>>2] = 11002; + HEAP32[$3>>2] = 11070; break; } $37 = HEAP32[$3>>2]|0; - $38 = (_strcmp($37,11015)|0); + $38 = (_strcmp($37,11083)|0); $39 = ($38|0)!=(0); if (!($39)) { - HEAP32[$3>>2] = 11036; + HEAP32[$3>>2] = 11104; break; } $40 = HEAP32[$3>>2]|0; - $41 = (_strcmp($40,11051)|0); + $41 = (_strcmp($40,11119)|0); $42 = ($41|0)!=(0); if (!($42)) { - HEAP32[$3>>2] = 11066; + HEAP32[$3>>2] = 11134; break; } $43 = HEAP32[$3>>2]|0; - $44 = (_strcmp($43,11081)|0); + $44 = (_strcmp($43,11149)|0); $45 = ($44|0)!=(0); if (!($45)) { - HEAP32[$3>>2] = 11096; + HEAP32[$3>>2] = 11164; } } else { - HEAP32[$3>>2] = 10967; + HEAP32[$3>>2] = 11035; } } while(0); $46 = HEAP32[$3>>2]|0; - $47 = (_strcmp($46,11111)|0); + $47 = (_strcmp($46,11179)|0); $48 = ($47|0)!=(0); do { if ($48) { $49 = HEAP32[$3>>2]|0; - $50 = (_strcmp($49,11125)|0); + $50 = (_strcmp($49,11193)|0); $51 = ($50|0)!=(0); if (!($51)) { HEAP32[$1>>2] = 2; break; } $52 = HEAP32[$3>>2]|0; - $53 = (_strcmp($52,11137)|0); + $53 = (_strcmp($52,11205)|0); $54 = ($53|0)!=(0); if (!($54)) { HEAP32[$1>>2] = 6; break; } $55 = HEAP32[$3>>2]|0; - $56 = (_strcmp($55,11151)|0); + $56 = (_strcmp($55,11219)|0); $57 = ($56|0)!=(0); if (!($57)) { HEAP32[$1>>2] = 7; break; } $58 = HEAP32[$3>>2]|0; - $59 = (_strcmp($58,11163)|0); + $59 = (_strcmp($58,11231)|0); $60 = ($59|0)!=(0); if (!($60)) { HEAP32[$1>>2] = 8; break; } $61 = HEAP32[$3>>2]|0; - $62 = (_strcmp($61,11177)|0); + $62 = (_strcmp($61,11245)|0); $63 = ($62|0)!=(0); if (!($63)) { HEAP32[$1>>2] = 9; break; } $64 = HEAP32[$3>>2]|0; - $65 = (_strcmp($64,11191)|0); + $65 = (_strcmp($64,11259)|0); $66 = ($65|0)!=(0); if (!($66)) { HEAP32[$1>>2] = 10; break; } $67 = HEAP32[$3>>2]|0; - $68 = (_strcmp($67,11208)|0); + $68 = (_strcmp($67,11276)|0); $69 = ($68|0)!=(0); if (!($69)) { HEAP32[$1>>2] = 1; break; } $70 = HEAP32[$3>>2]|0; - $71 = (_strcmp($70,11231)|0); + $71 = (_strcmp($70,11299)|0); $72 = ($71|0)!=(0); if (!($72)) { HEAP32[$1>>2] = 1; break; } $73 = HEAP32[$3>>2]|0; - $74 = (_strcmp($73,11257)|0); + $74 = (_strcmp($73,11325)|0); $75 = ($74|0)!=(0); if (!($75)) { HEAP32[$1>>2] = 2; break; } $76 = HEAP32[$3>>2]|0; - $77 = (_strcmp($76,11270)|0); + $77 = (_strcmp($76,11338)|0); $78 = ($77|0)!=(0); if (!($78)) { HEAP32[$1>>2] = 3; break; } $79 = HEAP32[$3>>2]|0; - $80 = (_strcmp($79,11286)|0); + $80 = (_strcmp($79,11354)|0); $81 = ($80|0)!=(0); if (!($81)) { HEAP32[$1>>2] = 1; break; } $82 = HEAP32[$3>>2]|0; - $83 = (_strcmp($82,11299)|0); + $83 = (_strcmp($82,11367)|0); $84 = ($83|0)!=(0); if (!($84)) { HEAP32[$1>>2] = 11; break; } $85 = HEAP32[$3>>2]|0; - $86 = (_strcmp($85,11313)|0); + $86 = (_strcmp($85,11381)|0); $87 = ($86|0)!=(0); if (!($87)) { HEAP32[$1>>2] = 2; break; } $88 = HEAP32[$3>>2]|0; - $89 = (_strcmp($88,11333)|0); + $89 = (_strcmp($88,11401)|0); $90 = ($89|0)!=(0); if (!($90)) { HEAP32[$1>>2] = 3; break; } $91 = HEAP32[$3>>2]|0; - $92 = (_strcmp($91,11353)|0); + $92 = (_strcmp($91,11421)|0); $93 = ($92|0)!=(0); if (!($93)) { HEAP32[$1>>2] = 4; break; } $94 = HEAP32[$3>>2]|0; - $95 = (_strcmp($94,11370)|0); + $95 = (_strcmp($94,11438)|0); $96 = ($95|0)!=(0); if (!($96)) { HEAP32[$1>>2] = 5; break; } $97 = HEAP32[$3>>2]|0; - $98 = (_strcmp($97,11387)|0); + $98 = (_strcmp($97,11455)|0); $99 = ($98|0)!=(0); if (!($99)) { HEAP32[$1>>2] = 3; break; } $100 = HEAP32[$3>>2]|0; - $101 = (_strcmp($100,11399)|0); + $101 = (_strcmp($100,11467)|0); $102 = ($101|0)!=(0); if (!($102)) { HEAP32[$1>>2] = 12; break; } $103 = HEAP32[$3>>2]|0; - $104 = (_strcmp($103,11412)|0); + $104 = (_strcmp($103,11480)|0); $105 = ($104|0)!=(0); if (!($105)) { HEAP32[$1>>2] = 13; break; } $106 = HEAP32[$3>>2]|0; - $107 = (_strcmp($106,11428)|0); + $107 = (_strcmp($106,11496)|0); $108 = ($107|0)!=(0); if (!($108)) { HEAP32[$1>>2] = 6; break; } $109 = HEAP32[$3>>2]|0; - $110 = (_strcmp($109,11451)|0); + $110 = (_strcmp($109,11519)|0); $111 = ($110|0)!=(0); if (!($111)) { HEAP32[$1>>2] = 2; break; } $112 = HEAP32[$3>>2]|0; - $113 = (_strcmp($112,11464)|0); + $113 = (_strcmp($112,11532)|0); $114 = ($113|0)!=(0); if (!($114)) { HEAP32[$1>>2] = 3; break; } $115 = HEAP32[$3>>2]|0; - $116 = (_strcmp($115,11480)|0); + $116 = (_strcmp($115,11548)|0); $117 = ($116|0)!=(0); if (!($117)) { HEAP32[$1>>2] = 4; break; } $118 = HEAP32[$3>>2]|0; - $119 = (_strcmp($118,11491)|0); + $119 = (_strcmp($118,11559)|0); $120 = ($119|0)!=(0); if (!($120)) { HEAP32[$1>>2] = 14; break; } $121 = HEAP32[$3>>2]|0; - $122 = (_strcmp($121,11510)|0); + $122 = (_strcmp($121,11578)|0); $123 = ($122|0)!=(0); if (!($123)) { HEAP32[$1>>2] = 15; break; } $124 = HEAP32[$3>>2]|0; - $125 = (_strcmp($124,11532)|0); + $125 = (_strcmp($124,11600)|0); $126 = ($125|0)!=(0); if (!($126)) { HEAP32[$1>>2] = 16; break; } $127 = HEAP32[$3>>2]|0; - $128 = (_strcmp($127,11551)|0); + $128 = (_strcmp($127,11619)|0); $129 = ($128|0)!=(0); if (!($129)) { HEAP32[$1>>2] = 7; break; } $130 = HEAP32[$3>>2]|0; - $131 = (_strcmp($130,11580)|0); + $131 = (_strcmp($130,11648)|0); $132 = ($131|0)!=(0); if (!($132)) { HEAP32[$1>>2] = 5; break; } $133 = HEAP32[$3>>2]|0; - $134 = (_strcmp($133,11597)|0); + $134 = (_strcmp($133,11665)|0); $135 = ($134|0)!=(0); if (!($135)) { HEAP32[$1>>2] = 8; break; } $136 = HEAP32[$3>>2]|0; - $137 = (_strcmp($136,11612)|0); + $137 = (_strcmp($136,11680)|0); $138 = ($137|0)!=(0); if (!($138)) { HEAP32[$1>>2] = 9; break; } $139 = HEAP32[$3>>2]|0; - $140 = (_strcmp($139,11627)|0); + $140 = (_strcmp($139,11695)|0); $141 = ($140|0)!=(0); if (!($141)) { HEAP32[$1>>2] = 1; break; } $142 = HEAP32[$3>>2]|0; - $143 = (_strcmp($142,11648)|0); + $143 = (_strcmp($142,11716)|0); $144 = ($143|0)!=(0); if (!($144)) { HEAP32[$1>>2] = 10; break; } $145 = HEAP32[$3>>2]|0; - $146 = (_strcmp($145,11668)|0); + $146 = (_strcmp($145,11736)|0); $147 = ($146|0)!=(0); if (!($147)) { HEAP32[$1>>2] = 11; break; } $148 = HEAP32[$3>>2]|0; - $149 = (_strcmp($148,11688)|0); + $149 = (_strcmp($148,11756)|0); $150 = ($149|0)!=(0); if (!($150)) { HEAP32[$1>>2] = 12; break; } $151 = HEAP32[$3>>2]|0; - $152 = (_strcmp($151,11714)|0); + $152 = (_strcmp($151,11782)|0); $153 = ($152|0)!=(0); if (!($153)) { HEAP32[$1>>2] = 2; break; } $154 = HEAP32[$3>>2]|0; - $155 = (_strcmp($154,11733)|0); + $155 = (_strcmp($154,11801)|0); $156 = ($155|0)!=(0); if (!($156)) { HEAP32[$1>>2] = 1; break; } $157 = HEAP32[$3>>2]|0; - $158 = (_strcmp($157,11745)|0); + $158 = (_strcmp($157,11813)|0); $159 = ($158|0)!=(0); if (!($159)) { HEAP32[$1>>2] = 3; break; } $160 = HEAP32[$3>>2]|0; - $161 = (_strcmp($160,11757)|0); + $161 = (_strcmp($160,11825)|0); $162 = ($161|0)!=(0); if (!($162)) { HEAP32[$1>>2] = 1; break; } $163 = HEAP32[$3>>2]|0; - $164 = (_strcmp($163,11769)|0); + $164 = (_strcmp($163,11837)|0); $165 = ($164|0)!=(0); if (!($165)) { HEAP32[$1>>2] = 1; break; } $166 = HEAP32[$3>>2]|0; - $167 = (_strcmp($166,11781)|0); + $167 = (_strcmp($166,11849)|0); $168 = ($167|0)!=(0); if (!($168)) { HEAP32[$1>>2] = 17; break; } $169 = HEAP32[$3>>2]|0; - $170 = (_strcmp($169,11793)|0); + $170 = (_strcmp($169,11861)|0); $171 = ($170|0)!=(0); if (!($171)) { HEAP32[$1>>2] = 13; break; } $172 = HEAP32[$3>>2]|0; - $173 = (_strcmp($172,11805)|0); + $173 = (_strcmp($172,11873)|0); $174 = ($173|0)!=(0); if (!($174)) { HEAP32[$1>>2] = 4; break; } $175 = HEAP32[$3>>2]|0; - $176 = (_strcmp($175,11817)|0); + $176 = (_strcmp($175,11885)|0); $177 = ($176|0)!=(0); if (!($177)) { HEAP32[$1>>2] = 2; break; } $178 = HEAP32[$3>>2]|0; - $179 = (_strcmp($178,11829)|0); + $179 = (_strcmp($178,11897)|0); $180 = ($179|0)!=(0); if (!($180)) { HEAP32[$1>>2] = 14; break; } $181 = HEAP32[$3>>2]|0; - $182 = (_strcmp($181,11842)|0); + $182 = (_strcmp($181,11910)|0); $183 = ($182|0)!=(0); if (!($183)) { HEAP32[$1>>2] = 15; break; } $184 = HEAP32[$3>>2]|0; - $185 = (_strcmp($184,11855)|0); + $185 = (_strcmp($184,11923)|0); $186 = ($185|0)!=(0); if (!($186)) { HEAP32[$1>>2] = 16; break; } $187 = HEAP32[$3>>2]|0; - $188 = (_strcmp($187,11868)|0); + $188 = (_strcmp($187,11936)|0); $189 = ($188|0)!=(0); if (!($189)) { HEAP32[$1>>2] = 17; break; } $190 = HEAP32[$3>>2]|0; - $191 = (_strcmp($190,11881)|0); + $191 = (_strcmp($190,11949)|0); $192 = ($191|0)!=(0); if (!($192)) { HEAP32[$1>>2] = 18; break; } $193 = HEAP32[$3>>2]|0; - $194 = (_strcmp($193,11894)|0); + $194 = (_strcmp($193,11962)|0); $195 = ($194|0)!=(0); if (!($195)) { HEAP32[$1>>2] = 19; break; } $196 = HEAP32[$3>>2]|0; - $197 = (_strcmp($196,11907)|0); + $197 = (_strcmp($196,11975)|0); $198 = ($197|0)!=(0); if (!($198)) { HEAP32[$1>>2] = 20; break; } $199 = HEAP32[$3>>2]|0; - $200 = (_strcmp($199,11920)|0); + $200 = (_strcmp($199,11988)|0); $201 = ($200|0)!=(0); if (!($201)) { HEAP32[$1>>2] = 21; break; } $202 = HEAP32[$3>>2]|0; - $203 = (_strcmp($202,11933)|0); + $203 = (_strcmp($202,12001)|0); $204 = ($203|0)!=(0); if (!($204)) { HEAP32[$1>>2] = 5; break; } $205 = HEAP32[$3>>2]|0; - $206 = (_strcmp($205,11952)|0); + $206 = (_strcmp($205,12020)|0); $207 = ($206|0)!=(0); if (!($207)) { HEAP32[$1>>2] = 6; break; } $208 = HEAP32[$3>>2]|0; - $209 = (_strcmp($208,11971)|0); + $209 = (_strcmp($208,12039)|0); $210 = ($209|0)!=(0); if (!($210)) { HEAP32[$1>>2] = 7; break; } $211 = HEAP32[$3>>2]|0; - $212 = (_strcmp($211,11990)|0); + $212 = (_strcmp($211,12058)|0); $213 = ($212|0)!=(0); if (!($213)) { HEAP32[$1>>2] = 18; break; } $214 = HEAP32[$3>>2]|0; - $215 = (_strcmp($214,12003)|0); + $215 = (_strcmp($214,12071)|0); $216 = ($215|0)!=(0); if (!($216)) { HEAP32[$1>>2] = 19; break; } $217 = HEAP32[$3>>2]|0; - $218 = (_strcmp($217,12021)|0); + $218 = (_strcmp($217,12089)|0); $219 = ($218|0)!=(0); if (!($219)) { HEAP32[$1>>2] = 20; break; } $220 = HEAP32[$3>>2]|0; - $221 = (_strcmp($220,12039)|0); + $221 = (_strcmp($220,12107)|0); $222 = ($221|0)!=(0); if (!($222)) { HEAP32[$1>>2] = 21; break; } $223 = HEAP32[$3>>2]|0; - $224 = (_strcmp($223,12057)|0); + $224 = (_strcmp($223,12125)|0); $225 = ($224|0)!=(0); if (!($225)) { HEAP32[$1>>2] = 22; break; } $226 = HEAP32[$3>>2]|0; - $227 = (_strcmp($226,12075)|0); + $227 = (_strcmp($226,12143)|0); $228 = ($227|0)!=(0); if (!($228)) { HEAP32[$1>>2] = 2; break; } $229 = HEAP32[$3>>2]|0; - $230 = (_strcmp($229,12095)|0); + $230 = (_strcmp($229,12163)|0); $231 = ($230|0)!=(0); if (!($231)) { HEAP32[$1>>2] = 3; break; } $232 = HEAP32[$3>>2]|0; - $233 = (_strcmp($232,11036)|0); + $233 = (_strcmp($232,11104)|0); $234 = ($233|0)!=(0); if (!($234)) { HEAP32[$1>>2] = 6; break; } $235 = HEAP32[$3>>2]|0; - $236 = (_strcmp($235,12113)|0); + $236 = (_strcmp($235,12181)|0); $237 = ($236|0)!=(0); if (!($237)) { HEAP32[$1>>2] = 1; break; } $238 = HEAP32[$3>>2]|0; - $239 = (_strcmp($238,12128)|0); + $239 = (_strcmp($238,12196)|0); $240 = ($239|0)!=(0); if (!($240)) { HEAP32[$1>>2] = 8; break; } $241 = HEAP32[$3>>2]|0; - $242 = (_strcmp($241,12149)|0); + $242 = (_strcmp($241,12217)|0); $243 = ($242|0)!=(0); if (!($243)) { HEAP32[$1>>2] = 9; break; } $244 = HEAP32[$3>>2]|0; - $245 = (_strcmp($244,12164)|0); + $245 = (_strcmp($244,12232)|0); $246 = ($245|0)!=(0); if (!($246)) { HEAP32[$1>>2] = 10; break; } $247 = HEAP32[$3>>2]|0; - $248 = (_strcmp($247,12182)|0); + $248 = (_strcmp($247,12250)|0); $249 = ($248|0)!=(0); if (!($249)) { HEAP32[$1>>2] = 2; break; } $250 = HEAP32[$3>>2]|0; - $251 = (_strcmp($250,12198)|0); + $251 = (_strcmp($250,12266)|0); $252 = ($251|0)!=(0); if (!($252)) { HEAP32[$1>>2] = 11; break; } $253 = HEAP32[$3>>2]|0; - $254 = (_strcmp($253,12217)|0); + $254 = (_strcmp($253,12285)|0); $255 = ($254|0)!=(0); if (!($255)) { HEAP32[$1>>2] = 22; break; } $256 = HEAP32[$3>>2]|0; - $257 = (_strcmp($256,12231)|0); + $257 = (_strcmp($256,12299)|0); $258 = ($257|0)!=(0); if (!($258)) { HEAP32[$1>>2] = 23; break; } $259 = HEAP32[$3>>2]|0; - $260 = (_strcmp($259,12246)|0); + $260 = (_strcmp($259,12314)|0); $261 = ($260|0)!=(0); if (!($261)) { HEAP32[$1>>2] = 7; break; } $262 = HEAP32[$3>>2]|0; - $263 = (_strcmp($262,10967)|0); + $263 = (_strcmp($262,11035)|0); $264 = ($263|0)!=(0); if (!($264)) { HEAP32[$1>>2] = 1; break; } $265 = HEAP32[$3>>2]|0; - $266 = (_strcmp($265,12257)|0); + $266 = (_strcmp($265,12325)|0); $267 = ($266|0)!=(0); if (!($267)) { HEAP32[$1>>2] = 3; break; } $268 = HEAP32[$3>>2]|0; - $269 = (_strcmp($268,11066)|0); + $269 = (_strcmp($268,11134)|0); $270 = ($269|0)!=(0); if (!($270)) { HEAP32[$1>>2] = 23; break; } $271 = HEAP32[$3>>2]|0; - $272 = (_strcmp($271,11096)|0); + $272 = (_strcmp($271,11164)|0); $273 = ($272|0)!=(0); if (!($273)) { HEAP32[$1>>2] = 24; break; } $274 = HEAP32[$3>>2]|0; - $275 = (_strcmp($274,12273)|0); + $275 = (_strcmp($274,12341)|0); $276 = ($275|0)!=(0); if (!($276)) { HEAP32[$1>>2] = 12; break; } $277 = HEAP32[$3>>2]|0; - $278 = (_strcmp($277,12300)|0); + $278 = (_strcmp($277,12368)|0); $279 = ($278|0)!=(0); if (!($279)) { HEAP32[$1>>2] = 4; break; } $280 = HEAP32[$3>>2]|0; - $281 = (_strcmp($280,12314)|0); + $281 = (_strcmp($280,12382)|0); $282 = ($281|0)!=(0); if (!($282)) { HEAP32[$1>>2] = 13; break; } $283 = HEAP32[$3>>2]|0; - $284 = (_strcmp($283,11002)|0); + $284 = (_strcmp($283,11070)|0); $285 = ($284|0)!=(0); if (!($285)) { HEAP32[$1>>2] = 5; break; } $286 = HEAP32[$3>>2]|0; - $287 = (_strcmp($286,12334)|0); + $287 = (_strcmp($286,12402)|0); $288 = ($287|0)!=(0); if (!($288)) { HEAP32[$1>>2] = 6; break; } $289 = HEAP32[$3>>2]|0; - $290 = (_strcmp($289,12352)|0); + $290 = (_strcmp($289,12420)|0); $291 = ($290|0)!=(0); if (!($291)) { HEAP32[$1>>2] = 8; break; } $292 = HEAP32[$3>>2]|0; - $293 = (_strcmp($292,12364)|0); + $293 = (_strcmp($292,12432)|0); $294 = ($293|0)!=(0); if (!($294)) { HEAP32[$1>>2] = 24; break; } $295 = HEAP32[$3>>2]|0; - $296 = (_strcmp($295,12385)|0); + $296 = (_strcmp($295,12453)|0); $297 = ($296|0)!=(0); if (!($297)) { HEAP32[$1>>2] = 25; break; } $298 = HEAP32[$3>>2]|0; - $299 = (_strcmp($298,12403)|0); + $299 = (_strcmp($298,12471)|0); $300 = ($299|0)!=(0); if (!($300)) { HEAP32[$1>>2] = 26; break; } $301 = HEAP32[$3>>2]|0; - $302 = (_strcmp($301,12421)|0); + $302 = (_strcmp($301,12489)|0); $303 = ($302|0)!=(0); if (!($303)) { HEAP32[$1>>2] = 27; break; } $304 = HEAP32[$3>>2]|0; - $305 = (_strcmp($304,12442)|0); + $305 = (_strcmp($304,12510)|0); $306 = ($305|0)!=(0); if (!($306)) { HEAP32[$1>>2] = 14; break; } $307 = HEAP32[$3>>2]|0; - $308 = (_strcmp($307,12468)|0); + $308 = (_strcmp($307,12536)|0); $309 = ($308|0)!=(0); if (!($309)) { HEAP32[$1>>2] = 3; break; } $310 = HEAP32[$3>>2]|0; - $311 = (_strcmp($310,12491)|0); + $311 = (_strcmp($310,12559)|0); $312 = ($311|0)!=(0); if (!($312)) { HEAP32[$1>>2] = 15; break; } $313 = HEAP32[$3>>2]|0; - $314 = (_strcmp($313,12529)|0); + $314 = (_strcmp($313,12597)|0); $315 = ($314|0)!=(0); if (!($315)) { HEAP32[$1>>2] = 9; break; } $316 = HEAP32[$3>>2]|0; - $317 = (_strcmp($316,12545)|0); + $317 = (_strcmp($316,12613)|0); $318 = ($317|0)!=(0); if (!($318)) { HEAP32[$1>>2] = 7; break; } $319 = HEAP32[$3>>2]|0; - $320 = (_strcmp($319,12560)|0); + $320 = (_strcmp($319,12628)|0); $321 = ($320|0)!=(0); if (!($321)) { HEAP32[$1>>2] = 25; break; } $322 = HEAP32[$3>>2]|0; - $323 = (_strcmp($322,12583)|0); + $323 = (_strcmp($322,12651)|0); $324 = ($323|0)!=(0); if (!($324)) { HEAP32[$1>>2] = 16; break; } $325 = HEAP32[$3>>2]|0; - $326 = (_strcmp($325,12596)|0); + $326 = (_strcmp($325,12664)|0); $327 = ($326|0)!=(0); if (!($327)) { HEAP32[$1>>2] = 28; break; } $328 = HEAP32[$3>>2]|0; - $329 = (_strcmp($328,12610)|0); + $329 = (_strcmp($328,12678)|0); $330 = ($329|0)!=(0); if (!($330)) { HEAP32[$1>>2] = 29; break; } $331 = HEAP32[$3>>2]|0; - $332 = (_strcmp($331,12624)|0); + $332 = (_strcmp($331,12692)|0); $333 = ($332|0)!=(0); if (!($333)) { HEAP32[$1>>2] = 1; break; } $334 = HEAP32[$3>>2]|0; - $335 = (_strcmp($334,12644)|0); + $335 = (_strcmp($334,12712)|0); $336 = ($335|0)!=(0); if (!($336)) { HEAP32[$1>>2] = 8; break; } $337 = HEAP32[$3>>2]|0; - $338 = (_strcmp($337,12664)|0); + $338 = (_strcmp($337,12732)|0); $339 = ($338|0)!=(0); if (!($339)) { HEAP32[$1>>2] = 17; break; } $340 = HEAP32[$3>>2]|0; - $341 = (_strcmp($340,12680)|0); + $341 = (_strcmp($340,12748)|0); $342 = ($341|0)!=(0); if (!($342)) { HEAP32[$1>>2] = 18; break; } $343 = HEAP32[$3>>2]|0; - $344 = (_strcmp($343,12698)|0); + $344 = (_strcmp($343,12766)|0); $345 = ($344|0)!=(0); if (!($345)) { HEAP32[$1>>2] = 26; break; } $346 = HEAP32[$3>>2]|0; - $347 = (_strcmp($346,12714)|0); + $347 = (_strcmp($346,12782)|0); $348 = ($347|0)!=(0); if (!($348)) { HEAP32[$1>>2] = 19; break; } $349 = HEAP32[$3>>2]|0; - $350 = (_strcmp($349,12729)|0); + $350 = (_strcmp($349,12797)|0); $351 = ($350|0)!=(0); if (!($351)) { HEAP32[$1>>2] = 9; break; } $352 = HEAP32[$3>>2]|0; - $353 = (_strcmp($352,12751)|0); + $353 = (_strcmp($352,12819)|0); $354 = ($353|0)!=(0); if (!($354)) { HEAP32[$1>>2] = 30; break; } $355 = HEAP32[$3>>2]|0; - $356 = (_strcmp($355,12769)|0); + $356 = (_strcmp($355,12837)|0); $357 = ($356|0)!=(0); if (!($357)) { HEAP32[$1>>2] = 31; break; } $358 = HEAP32[$3>>2]|0; - $359 = (_strcmp($358,12790)|0); + $359 = (_strcmp($358,12858)|0); $360 = ($359|0)!=(0); if (!($360)) { HEAP32[$1>>2] = 10; break; } $361 = HEAP32[$3>>2]|0; - $362 = (_strcmp($361,12808)|0); + $362 = (_strcmp($361,12876)|0); $363 = ($362|0)!=(0); if (!($363)) { HEAP32[$1>>2] = 11; break; } $364 = HEAP32[$3>>2]|0; - $365 = (_strcmp($364,12821)|0); + $365 = (_strcmp($364,12889)|0); $366 = ($365|0)!=(0); if (!($366)) { HEAP32[$1>>2] = 2; break; } $367 = HEAP32[$3>>2]|0; - $368 = (_strcmp($367,12836)|0); + $368 = (_strcmp($367,12904)|0); $369 = ($368|0)!=(0); if (!($369)) { HEAP32[$1>>2] = 12; break; } $370 = HEAP32[$3>>2]|0; - $371 = (_strcmp($370,12850)|0); + $371 = (_strcmp($370,12918)|0); $372 = ($371|0)!=(0); if (!($372)) { HEAP32[$1>>2] = 1; break; } $373 = HEAP32[$3>>2]|0; - $374 = (_strcmp($373,12860)|0); + $374 = (_strcmp($373,12928)|0); $375 = ($374|0)!=(0); if (!($375)) { HEAP32[$1>>2] = 1; break; } $376 = HEAP32[$3>>2]|0; - $377 = (_strcmp($376,12870)|0); + $377 = (_strcmp($376,12938)|0); $378 = ($377|0)!=(0); if (!($378)) { HEAP32[$1>>2] = 2; break; } $379 = HEAP32[$3>>2]|0; - $380 = (_strcmp($379,12892)|0); + $380 = (_strcmp($379,12960)|0); $381 = ($380|0)!=(0); if (!($381)) { HEAP32[$1>>2] = 13; break; } $382 = HEAP32[$3>>2]|0; - $383 = (_strcmp($382,12918)|0); + $383 = (_strcmp($382,12986)|0); $384 = ($383|0)!=(0); if (!($384)) { HEAP32[$1>>2] = 14; break; } $385 = HEAP32[$3>>2]|0; - $386 = (_strcmp($385,12945)|0); + $386 = (_strcmp($385,13013)|0); $387 = ($386|0)!=(0); if (!($387)) { HEAP32[$1>>2] = 27; break; } $388 = HEAP32[$3>>2]|0; - $389 = (_strcmp($388,12958)|0); + $389 = (_strcmp($388,13026)|0); $390 = ($389|0)!=(0); if (!($390)) { HEAP32[$1>>2] = 20; break; } $391 = HEAP32[$3>>2]|0; - $392 = (_strcmp($391,12973)|0); + $392 = (_strcmp($391,13041)|0); $393 = ($392|0)!=(0); if (!($393)) { HEAP32[$1>>2] = 4; break; } $394 = HEAP32[$3>>2]|0; - $395 = (_strcmp($394,12988)|0); + $395 = (_strcmp($394,13056)|0); $396 = ($395|0)!=(0); if (!($396)) { HEAP32[$1>>2] = 3; break; } $397 = HEAP32[$3>>2]|0; - $398 = (_strcmp($397,13012)|0); + $398 = (_strcmp($397,13080)|0); $399 = ($398|0)!=(0); if (!($399)) { HEAP32[$1>>2] = 2; break; } $400 = HEAP32[$3>>2]|0; - $401 = (_strcmp($400,13023)|0); + $401 = (_strcmp($400,13091)|0); $402 = ($401|0)!=(0); if (!($402)) { HEAP32[$1>>2] = 32; break; } $403 = HEAP32[$3>>2]|0; - $404 = (_strcmp($403,13045)|0); + $404 = (_strcmp($403,13113)|0); $405 = ($404|0)!=(0); if (!($405)) { HEAP32[$1>>2] = 21; break; } $406 = HEAP32[$3>>2]|0; - $407 = (_strcmp($406,13067)|0); + $407 = (_strcmp($406,13135)|0); $408 = ($407|0)!=(0); if (!($408)) { HEAP32[$1>>2] = 5; break; } $409 = HEAP32[$3>>2]|0; - $410 = (_strcmp($409,13091)|0); + $410 = (_strcmp($409,13159)|0); $411 = ($410|0)!=(0); if (!($411)) { HEAP32[$1>>2] = 4; break; } $412 = HEAP32[$3>>2]|0; - $413 = (_strcmp($412,13100)|0); + $413 = (_strcmp($412,13168)|0); $414 = ($413|0)!=(0); if (!($414)) { HEAP32[$1>>2] = 5; break; } $415 = HEAP32[$3>>2]|0; - $416 = (_strcmp($415,13108)|0); + $416 = (_strcmp($415,13176)|0); $417 = ($416|0)!=(0); if (!($417)) { HEAP32[$1>>2] = 1; break; } $418 = HEAP32[$3>>2]|0; - $419 = (_strcmp($418,13121)|0); + $419 = (_strcmp($418,13189)|0); $420 = ($419|0)!=(0); if (!($420)) { HEAP32[$1>>2] = 2; break; } $421 = HEAP32[$3>>2]|0; - $422 = (_strcmp($421,13135)|0); + $422 = (_strcmp($421,13203)|0); $423 = ($422|0)!=(0); if (!($423)) { HEAP32[$1>>2] = 15; break; } $424 = HEAP32[$3>>2]|0; - $425 = (_strcmp($424,13147)|0); + $425 = (_strcmp($424,13215)|0); $426 = ($425|0)!=(0); if (!($426)) { HEAP32[$1>>2] = 16; break; } $427 = HEAP32[$3>>2]|0; - $428 = (_strcmp($427,13156)|0); + $428 = (_strcmp($427,13224)|0); $429 = ($428|0)!=(0); if (!($429)) { HEAP32[$1>>2] = 17; break; } $430 = HEAP32[$3>>2]|0; - $431 = (_strcmp($430,13166)|0); + $431 = (_strcmp($430,13234)|0); $432 = ($431|0)!=(0); if (!($432)) { HEAP32[$1>>2] = 18; break; } $433 = HEAP32[$3>>2]|0; - $434 = (_strcmp($433,13178)|0); + $434 = (_strcmp($433,13246)|0); $435 = ($434|0)!=(0); if (!($435)) { HEAP32[$1>>2] = 19; break; } $436 = HEAP32[$3>>2]|0; - $437 = (_strcmp($436,13189)|0); + $437 = (_strcmp($436,13257)|0); $438 = ($437|0)!=(0); if (!($438)) { HEAP32[$1>>2] = 20; break; } $439 = HEAP32[$3>>2]|0; - $440 = (_strcmp($439,13197)|0); + $440 = (_strcmp($439,13265)|0); $441 = ($440|0)!=(0); if (!($441)) { HEAP32[$1>>2] = 3; break; } $442 = HEAP32[$3>>2]|0; - $443 = (_strcmp($442,13209)|0); + $443 = (_strcmp($442,13277)|0); $444 = ($443|0)!=(0); if (!($444)) { HEAP32[$1>>2] = 21; break; } $445 = HEAP32[$3>>2]|0; - $446 = (_strcmp($445,13224)|0); + $446 = (_strcmp($445,13292)|0); $447 = ($446|0)!=(0); if (!($447)) { HEAP32[$1>>2] = 22; break; } $448 = HEAP32[$3>>2]|0; - $449 = (_strcmp($448,13236)|0); + $449 = (_strcmp($448,13304)|0); $450 = ($449|0)!=(0); if (!($450)) { HEAP32[$1>>2] = 23; break; } $451 = HEAP32[$3>>2]|0; - $452 = (_strcmp($451,13250)|0); + $452 = (_strcmp($451,13318)|0); $453 = ($452|0)!=(0); if (!($453)) { HEAP32[$1>>2] = 10; break; } $454 = HEAP32[$3>>2]|0; - $455 = (_strcmp($454,13275)|0); + $455 = (_strcmp($454,13343)|0); $456 = ($455|0)!=(0); if (!($456)) { HEAP32[$1>>2] = 24; break; } $457 = HEAP32[$3>>2]|0; - $458 = (_strcmp($457,13292)|0); + $458 = (_strcmp($457,13360)|0); $459 = ($458|0)!=(0); if (!($459)) { HEAP32[$1>>2] = 25; break; } $460 = HEAP32[$3>>2]|0; - $461 = (_strcmp($460,13308)|0); + $461 = (_strcmp($460,13376)|0); $462 = ($461|0)!=(0); if (!($462)) { HEAP32[$1>>2] = 26; break; } $463 = HEAP32[$3>>2]|0; - $464 = (_strcmp($463,13324)|0); + $464 = (_strcmp($463,13392)|0); $465 = ($464|0)!=(0); if (!($465)) { HEAP32[$1>>2] = 11; break; } $466 = HEAP32[$3>>2]|0; - $467 = (_strcmp($466,13336)|0); + $467 = (_strcmp($466,13404)|0); $468 = ($467|0)!=(0); if (!($468)) { HEAP32[$1>>2] = 33; break; } $469 = HEAP32[$3>>2]|0; - $470 = (_strcmp($469,13348)|0); + $470 = (_strcmp($469,13416)|0); $471 = ($470|0)!=(0); if (!($471)) { HEAP32[$1>>2] = 34; break; } $472 = HEAP32[$3>>2]|0; - $473 = (_strcmp($472,13372)|0); + $473 = (_strcmp($472,13440)|0); $474 = ($473|0)!=(0); if (!($474)) { HEAP32[$1>>2] = 1; break; } $475 = HEAP32[$3>>2]|0; - $476 = (_strcmp($475,13385)|0); + $476 = (_strcmp($475,13453)|0); $477 = ($476|0)!=(0); if (!($477)) { HEAP32[$1>>2] = 2; break; } $478 = HEAP32[$3>>2]|0; - $479 = (_strcmp($478,13399)|0); + $479 = (_strcmp($478,13467)|0); $480 = ($479|0)!=(0); if (!($480)) { HEAP32[$1>>2] = 35; break; } $481 = HEAP32[$3>>2]|0; - $482 = (_strcmp($481,13421)|0); + $482 = (_strcmp($481,13489)|0); $483 = ($482|0)!=(0); if (!($483)) { HEAP32[$1>>2] = 36; break; } $484 = HEAP32[$3>>2]|0; - $485 = (_strcmp($484,13428)|0); + $485 = (_strcmp($484,13496)|0); $486 = ($485|0)!=(0); if (!($486)) { HEAP32[$1>>2] = 3; break; } $487 = HEAP32[$3>>2]|0; - $488 = (_strcmp($487,13444)|0); + $488 = (_strcmp($487,13512)|0); $489 = ($488|0)!=(0); if (!($489)) { HEAP32[$1>>2] = 2; break; } $490 = HEAP32[$3>>2]|0; - $491 = (_strcmp($490,13461)|0); + $491 = (_strcmp($490,13529)|0); $492 = ($491|0)!=(0); if (!($492)) { HEAP32[$1>>2] = 1; break; } $493 = HEAP32[$3>>2]|0; - $494 = (_strcmp($493,13478)|0); + $494 = (_strcmp($493,13546)|0); $495 = ($494|0)!=(0); if (!($495)) { HEAP32[$1>>2] = 28; break; } $496 = HEAP32[$3>>2]|0; - $497 = (_strcmp($496,13494)|0); + $497 = (_strcmp($496,13562)|0); $498 = ($497|0)!=(0); if (!($498)) { HEAP32[$1>>2] = 1; break; } $499 = HEAP32[$3>>2]|0; - $500 = (_strcmp($499,13510)|0); + $500 = (_strcmp($499,13578)|0); $501 = ($500|0)!=(0); if (!($501)) { HEAP32[$1>>2] = 4; break; } $502 = HEAP32[$3>>2]|0; - $503 = (_strcmp($502,13527)|0); + $503 = (_strcmp($502,13595)|0); $504 = ($503|0)!=(0); if (!($504)) { HEAP32[$1>>2] = 29; break; } $505 = HEAP32[$3>>2]|0; - $506 = (_strcmp($505,13541)|0); + $506 = (_strcmp($505,13609)|0); $507 = ($506|0)!=(0); if (!($507)) { HEAP32[$1>>2] = 30; break; } $508 = HEAP32[$3>>2]|0; - $509 = (_strcmp($508,13553)|0); + $509 = (_strcmp($508,13621)|0); $510 = ($509|0)!=(0); if (!($510)) { HEAP32[$1>>2] = 22; break; } $511 = HEAP32[$3>>2]|0; - $512 = (_strcmp($511,13564)|0); + $512 = (_strcmp($511,13632)|0); $513 = ($512|0)!=(0); if (!($513)) { HEAP32[$1>>2] = 2; break; } $514 = HEAP32[$3>>2]|0; - $515 = (_strcmp($514,13577)|0); + $515 = (_strcmp($514,13645)|0); $516 = ($515|0)!=(0); if (!($516)) { HEAP32[$1>>2] = 23; break; } $517 = HEAP32[$3>>2]|0; - $518 = (_strcmp($517,13587)|0); + $518 = (_strcmp($517,13655)|0); $519 = ($518|0)!=(0); if (!($519)) { HEAP32[$1>>2] = 2; break; } $520 = HEAP32[$3>>2]|0; - $521 = (_strcmp($520,13604)|0); + $521 = (_strcmp($520,13672)|0); $522 = ($521|0)!=(0); if (!($522)) { HEAP32[$1>>2] = 24; break; } $523 = HEAP32[$3>>2]|0; - $524 = (_strcmp($523,13616)|0); + $524 = (_strcmp($523,13684)|0); $525 = ($524|0)!=(0); if (!($525)) { HEAP32[$1>>2] = 25; break; } $526 = HEAP32[$3>>2]|0; - $527 = (_strcmp($526,13638)|0); + $527 = (_strcmp($526,13706)|0); $528 = ($527|0)!=(0); if (!($528)) { HEAP32[$1>>2] = 26; break; } $529 = HEAP32[$3>>2]|0; - $530 = (_strcmp($529,13658)|0); + $530 = (_strcmp($529,13726)|0); $531 = ($530|0)!=(0); if (!($531)) { HEAP32[$1>>2] = 3; break; } $532 = HEAP32[$3>>2]|0; - $533 = (_strcmp($532,13671)|0); + $533 = (_strcmp($532,13739)|0); $534 = ($533|0)!=(0); if (!($534)) { HEAP32[$1>>2] = 27; break; } $535 = HEAP32[$3>>2]|0; - $536 = (_strcmp($535,13693)|0); + $536 = (_strcmp($535,13761)|0); $537 = ($536|0)!=(0); if (!($537)) { HEAP32[$1>>2] = 28; break; } $538 = HEAP32[$3>>2]|0; - $539 = (_strcmp($538,13713)|0); + $539 = (_strcmp($538,13781)|0); $540 = ($539|0)!=(0); if (!($540)) { HEAP32[$1>>2] = 2; break; } $541 = HEAP32[$3>>2]|0; - $542 = (_strcmp($541,13730)|0); + $542 = (_strcmp($541,13798)|0); $543 = ($542|0)!=(0); if (!($543)) { HEAP32[$1>>2] = 2; break; } $544 = HEAP32[$3>>2]|0; - $545 = (_strcmp($544,13747)|0); + $545 = (_strcmp($544,13815)|0); $546 = ($545|0)!=(0); if (!($546)) { HEAP32[$1>>2] = 3; break; } $547 = HEAP32[$3>>2]|0; - $548 = (_strcmp($547,13767)|0); + $548 = (_strcmp($547,13835)|0); $549 = ($548|0)!=(0); if ($549) { $550 = HEAP32[$2>>2]|0; @@ -16844,7 +16770,7 @@ function _emscripten_GetProcAddress($0) { function _emscripten_get_global_libc() { var label = 0, sp = 0; sp = STACKTOP; - return (19012|0); + return (19092|0); } function ___stdio_close($0) { $0 = $0|0; @@ -17656,7 +17582,7 @@ function _printf_core($0,$1,$2,$3,$4) { $133 = HEAP8[$128>>0]|0; $134 = $133 << 24 >> 24; $135 = (($134) + -65)|0; - $136 = ((13883 + (($$0252*58)|0)|0) + ($135)|0); + $136 = ((13951 + (($$0252*58)|0)|0) + ($135)|0); $137 = HEAP8[$136>>0]|0; $138 = $137&255; $139 = (($138) + -1)|0; @@ -17834,7 +17760,7 @@ function _printf_core($0,$1,$2,$3,$4) { $222 = (($220) + 1)|0; $223 = $218 | $221; $$0254$$0254$ = $223 ? $$0254 : $222; - $$0228 = $216;$$1233 = 0;$$1238 = 14347;$$2256 = $$0254$$0254$;$$4266 = $$1263$;$248 = $212;$250 = $215; + $$0228 = $216;$$1233 = 0;$$1238 = 14415;$$2256 = $$0254$$0254$;$$4266 = $$1263$;$248 = $212;$250 = $215; label = 67; break; } @@ -17855,7 +17781,7 @@ function _printf_core($0,$1,$2,$3,$4) { $235 = (($233) + 4)|0; $236 = $235; HEAP32[$236>>2] = $232; - $$0232 = 1;$$0237 = 14347;$242 = $231;$243 = $232; + $$0232 = 1;$$0237 = 14415;$242 = $231;$243 = $232; label = 66; break L71; } else { @@ -17863,8 +17789,8 @@ function _printf_core($0,$1,$2,$3,$4) { $238 = ($237|0)==(0); $239 = $$1263$ & 1; $240 = ($239|0)==(0); - $$ = $240 ? 14347 : (14349); - $$$ = $238 ? $$ : (14348); + $$ = $240 ? 14415 : (14417); + $$$ = $238 ? $$ : (14416); $241 = $$1263$ & 2049; $narrow = ($241|0)!=(0); $$284$ = $narrow&1; @@ -17881,7 +17807,7 @@ function _printf_core($0,$1,$2,$3,$4) { $168 = (($165) + 4)|0; $169 = $168; $170 = HEAP32[$169>>2]|0; - $$0232 = 0;$$0237 = 14347;$242 = $167;$243 = $170; + $$0232 = 0;$$0237 = 14415;$242 = $167;$243 = $170; label = 66; break; } @@ -17894,7 +17820,7 @@ function _printf_core($0,$1,$2,$3,$4) { $264 = HEAP32[$263>>2]|0; $265 = $261&255; HEAP8[$13>>0] = $265; - $$2 = $13;$$2234 = 0;$$2239 = 14347;$$2251 = $11;$$5 = 1;$$6268 = $164; + $$2 = $13;$$2234 = 0;$$2239 = 14415;$$2251 = $11;$$5 = 1;$$6268 = $164; break; } case 109: { @@ -17908,7 +17834,7 @@ function _printf_core($0,$1,$2,$3,$4) { case 115: { $269 = HEAP32[$6>>2]|0; $270 = ($269|0)!=(0|0); - $271 = $270 ? $269 : 14357; + $271 = $270 ? $269 : 14425; $$1 = $271; label = 71; break; @@ -17948,7 +17874,7 @@ function _printf_core($0,$1,$2,$3,$4) { break; } default: { - $$2 = $21;$$2234 = 0;$$2239 = 14347;$$2251 = $11;$$5 = $$0254;$$6268 = $$1263$; + $$2 = $21;$$2234 = 0;$$2239 = 14415;$$2251 = $11;$$5 = $$0254;$$6268 = $$1263$; } } } while(0); @@ -17970,8 +17896,8 @@ function _printf_core($0,$1,$2,$3,$4) { $207 = ($206|0)==(0); $or$cond283 = $207 | $205; $208 = $$1236 >> 4; - $209 = (14347 + ($208)|0); - $$289 = $or$cond283 ? 14347 : $209; + $209 = (14415 + ($208)|0); + $$289 = $or$cond283 ? 14415 : $209; $$290 = $or$cond283 ? 0 : 2; $$0228 = $202;$$1233 = $$290;$$1238 = $$289;$$2256 = $$1255;$$4266 = $$3265;$248 = $197;$250 = $200; label = 67; @@ -17992,7 +17918,7 @@ function _printf_core($0,$1,$2,$3,$4) { $277 = (($$1) + ($$0254)|0); $$3257 = $273 ? $$0254 : $276; $$1250 = $273 ? $277 : $272; - $$2 = $$1;$$2234 = 0;$$2239 = 14347;$$2251 = $$1250;$$5 = $$3257;$$6268 = $164; + $$2 = $$1;$$2234 = 0;$$2239 = 14415;$$2251 = $$1250;$$5 = $$3257;$$6268 = $164; } else if ((label|0) == 75) { label = 0; @@ -18522,7 +18448,7 @@ function _fmt_x($0,$1,$2,$3) { $$056 = $2;$15 = $1;$8 = $0; while(1) { $7 = $8 & 15; - $9 = (14399 + ($7)|0); + $9 = (14467 + ($7)|0); $10 = HEAP8[$9>>0]|0; $11 = $10&255; $12 = $11 | $3; @@ -18880,14 +18806,14 @@ function _fmt_fp($0,$1,$2,$3,$4,$5) { $13 = ($12|0)<(0); if ($13) { $14 = -$1; - $$0471 = $14;$$0520 = 1;$$0521 = 14364; + $$0471 = $14;$$0520 = 1;$$0521 = 14432; } else { $15 = $4 & 2048; $16 = ($15|0)==(0); $17 = $4 & 1; $18 = ($17|0)==(0); - $$ = $18 ? (14365) : (14370); - $$$ = $16 ? $$ : (14367); + $$ = $18 ? (14433) : (14438); + $$$ = $16 ? $$ : (14435); $19 = $4 & 2049; $narrow = ($19|0)!=(0); $$534$ = $narrow&1; @@ -18986,7 +18912,7 @@ function _fmt_fp($0,$1,$2,$3,$4,$5) { $$0523 = $8;$$2473 = $$1472; while(1) { $80 = (~~(($$2473))); - $81 = (14399 + ($80)|0); + $81 = (14467 + ($80)|0); $82 = HEAP8[$81>>0]|0; $83 = $82&255; $84 = $83 | $42; @@ -19597,7 +19523,7 @@ function _fmt_fp($0,$1,$2,$3,$4,$5) { } $339 = ($289|0)==(0); if (!($339)) { - _out($0,14415,1); + _out($0,14483,1); } $340 = ($337>>>0)<($$7505>>>0); $341 = ($$3477|0)>(0); @@ -19678,7 +19604,7 @@ function _fmt_fp($0,$1,$2,$3,$4,$5) { $$2 = $372; break; } - _out($0,14415,1); + _out($0,14483,1); $$2 = $372; } else { $369 = ($$0>>>0)>($8>>>0); @@ -19735,9 +19661,9 @@ function _fmt_fp($0,$1,$2,$3,$4,$5) { } else { $27 = $5 & 32; $28 = ($27|0)!=(0); - $29 = $28 ? 14383 : 14387; + $29 = $28 ? 14451 : 14455; $30 = ($$0471 != $$0471) | (0.0 != 0.0); - $31 = $28 ? 14391 : 14395; + $31 = $28 ? 14459 : 14463; $$0510 = $30 ? $31 : $29; $32 = (($$0520) + 3)|0; $33 = $4 & -65537; @@ -19947,7 +19873,7 @@ function ___strerror_l($0,$1) { sp = STACKTOP; $$016 = 0; while(1) { - $3 = (14417 + ($$016)|0); + $3 = (14485 + ($$016)|0); $4 = HEAP8[$3>>0]|0; $5 = $4&255; $6 = ($5|0)==($0|0); @@ -19958,7 +19884,7 @@ function ___strerror_l($0,$1) { $7 = (($$016) + 1)|0; $8 = ($7|0)==(87); if ($8) { - $$01214 = 14505;$$115 = 87; + $$01214 = 14573;$$115 = 87; label = 5; break; } else { @@ -19968,9 +19894,9 @@ function ___strerror_l($0,$1) { if ((label|0) == 2) { $2 = ($$016|0)==(0); if ($2) { - $$012$lcssa = 14505; + $$012$lcssa = 14573; } else { - $$01214 = 14505;$$115 = $$016; + $$01214 = 14573;$$115 = $$016; label = 5; } } @@ -20607,13 +20533,13 @@ function ___stpcpy($0,$1) { function ___ofl_lock() { var label = 0, sp = 0; sp = STACKTOP; - ___lock((19076|0)); - return (19084|0); + ___lock((19156|0)); + return (19164|0); } function ___ofl_unlock() { var label = 0, sp = 0; sp = STACKTOP; - ___unlock((19076|0)); + ___unlock((19156|0)); return; } function _fflush($0) { @@ -21453,7 +21379,7 @@ function _srand($0) { var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (($0) + -1)|0; - $2 = 16584; + $2 = 16656; $3 = $2; HEAP32[$3>>2] = $1; $4 = (($2) + 4)|0; @@ -21573,7 +21499,7 @@ function _strtok($0,$1) { sp = STACKTOP; $2 = ($0|0)==(0|0); if ($2) { - $3 = HEAP32[4772]|0; + $3 = HEAP32[4792]|0; $4 = ($3|0)==(0|0); if ($4) { $$0 = 0; @@ -21592,22 +21518,22 @@ function _strtok($0,$1) { $7 = HEAP8[$6>>0]|0; $8 = ($7<<24>>24)==(0); if ($8) { - HEAP32[4772] = 0; + HEAP32[4792] = 0; $$0 = 0; break; } $9 = (_strcspn($6,$1)|0); $10 = (($6) + ($9)|0); - HEAP32[4772] = $10; + HEAP32[4792] = $10; $11 = HEAP8[$10>>0]|0; $12 = ($11<<24>>24)==(0); if ($12) { - HEAP32[4772] = 0; + HEAP32[4792] = 0; $$0 = $6; break; } else { $13 = ((($10)) + 1|0); - HEAP32[4772] = $13; + HEAP32[4792] = $13; HEAP8[$10>>0] = 0; $$0 = $6; break; @@ -21688,7 +21614,7 @@ function _malloc($0) { $5 = $4 & -8; $6 = $3 ? 16 : $5; $7 = $6 >>> 3; - $8 = HEAP32[4773]|0; + $8 = HEAP32[4793]|0; $9 = $8 >>> $7; $10 = $9 & 3; $11 = ($10|0)==(0); @@ -21697,7 +21623,7 @@ function _malloc($0) { $13 = $12 ^ 1; $14 = (($13) + ($7))|0; $15 = $14 << 1; - $16 = (19132 + ($15<<2)|0); + $16 = (19212 + ($15<<2)|0); $17 = ((($16)) + 8|0); $18 = HEAP32[$17>>2]|0; $19 = ((($18)) + 8|0); @@ -21708,9 +21634,9 @@ function _malloc($0) { $22 = 1 << $14; $23 = $22 ^ -1; $24 = $8 & $23; - HEAP32[4773] = $24; + HEAP32[4793] = $24; } else { - $25 = HEAP32[(19108)>>2]|0; + $25 = HEAP32[(19188)>>2]|0; $26 = ($20>>>0)<($25>>>0); if ($26) { _abort(); @@ -21741,7 +21667,7 @@ function _malloc($0) { $$0 = $19; STACKTOP = sp;return ($$0|0); } - $37 = HEAP32[(19100)>>2]|0; + $37 = HEAP32[(19180)>>2]|0; $38 = ($6>>>0)>($37>>>0); if ($38) { $39 = ($9|0)==(0); @@ -21775,7 +21701,7 @@ function _malloc($0) { $66 = $62 >>> $64; $67 = (($65) + ($66))|0; $68 = $67 << 1; - $69 = (19132 + ($68<<2)|0); + $69 = (19212 + ($68<<2)|0); $70 = ((($69)) + 8|0); $71 = HEAP32[$70>>2]|0; $72 = ((($71)) + 8|0); @@ -21786,10 +21712,10 @@ function _malloc($0) { $75 = 1 << $67; $76 = $75 ^ -1; $77 = $8 & $76; - HEAP32[4773] = $77; + HEAP32[4793] = $77; $98 = $77; } else { - $78 = HEAP32[(19108)>>2]|0; + $78 = HEAP32[(19188)>>2]|0; $79 = ($73>>>0)<($78>>>0); if ($79) { _abort(); @@ -21822,22 +21748,22 @@ function _malloc($0) { HEAP32[$90>>2] = $84; $91 = ($37|0)==(0); if (!($91)) { - $92 = HEAP32[(19112)>>2]|0; + $92 = HEAP32[(19192)>>2]|0; $93 = $37 >>> 3; $94 = $93 << 1; - $95 = (19132 + ($94<<2)|0); + $95 = (19212 + ($94<<2)|0); $96 = 1 << $93; $97 = $98 & $96; $99 = ($97|0)==(0); if ($99) { $100 = $98 | $96; - HEAP32[4773] = $100; + HEAP32[4793] = $100; $$pre = ((($95)) + 8|0); $$0199 = $95;$$pre$phiZ2D = $$pre; } else { $101 = ((($95)) + 8|0); $102 = HEAP32[$101>>2]|0; - $103 = HEAP32[(19108)>>2]|0; + $103 = HEAP32[(19188)>>2]|0; $104 = ($102>>>0)<($103>>>0); if ($104) { _abort(); @@ -21854,12 +21780,12 @@ function _malloc($0) { $107 = ((($92)) + 12|0); HEAP32[$107>>2] = $95; } - HEAP32[(19100)>>2] = $84; - HEAP32[(19112)>>2] = $87; + HEAP32[(19180)>>2] = $84; + HEAP32[(19192)>>2] = $87; $$0 = $72; STACKTOP = sp;return ($$0|0); } - $108 = HEAP32[(19096)>>2]|0; + $108 = HEAP32[(19176)>>2]|0; $109 = ($108|0)==(0); if ($109) { $$0197 = $6; @@ -21887,7 +21813,7 @@ function _malloc($0) { $130 = $126 | $129; $131 = $127 >>> $129; $132 = (($130) + ($131))|0; - $133 = (19396 + ($132<<2)|0); + $133 = (19476 + ($132<<2)|0); $134 = HEAP32[$133>>2]|0; $135 = ((($134)) + 4|0); $136 = HEAP32[$135>>2]|0; @@ -21927,7 +21853,7 @@ function _malloc($0) { } } } - $155 = HEAP32[(19108)>>2]|0; + $155 = HEAP32[(19188)>>2]|0; $156 = ($$0192$lcssa$i>>>0)<($155>>>0); if ($156) { _abort(); @@ -22022,7 +21948,7 @@ function _malloc($0) { if (!($186)) { $187 = ((($$0192$lcssa$i)) + 28|0); $188 = HEAP32[$187>>2]|0; - $189 = (19396 + ($188<<2)|0); + $189 = (19476 + ($188<<2)|0); $190 = HEAP32[$189>>2]|0; $191 = ($$0192$lcssa$i|0)==($190|0); do { @@ -22033,11 +21959,11 @@ function _malloc($0) { $192 = 1 << $188; $193 = $192 ^ -1; $194 = $108 & $193; - HEAP32[(19096)>>2] = $194; + HEAP32[(19176)>>2] = $194; break L73; } } else { - $195 = HEAP32[(19108)>>2]|0; + $195 = HEAP32[(19188)>>2]|0; $196 = ($160>>>0)<($195>>>0); if ($196) { _abort(); @@ -22058,7 +21984,7 @@ function _malloc($0) { } } } while(0); - $201 = HEAP32[(19108)>>2]|0; + $201 = HEAP32[(19188)>>2]|0; $202 = ($$3$i>>>0)<($201>>>0); if ($202) { _abort(); @@ -22088,7 +22014,7 @@ function _malloc($0) { $211 = HEAP32[$210>>2]|0; $212 = ($211|0)==(0|0); if (!($212)) { - $213 = HEAP32[(19108)>>2]|0; + $213 = HEAP32[(19188)>>2]|0; $214 = ($211>>>0)<($213>>>0); if ($214) { _abort(); @@ -22125,22 +22051,22 @@ function _malloc($0) { HEAP32[$229>>2] = $$0193$lcssa$i; $230 = ($37|0)==(0); if (!($230)) { - $231 = HEAP32[(19112)>>2]|0; + $231 = HEAP32[(19192)>>2]|0; $232 = $37 >>> 3; $233 = $232 << 1; - $234 = (19132 + ($233<<2)|0); + $234 = (19212 + ($233<<2)|0); $235 = 1 << $232; $236 = $8 & $235; $237 = ($236|0)==(0); if ($237) { $238 = $8 | $235; - HEAP32[4773] = $238; + HEAP32[4793] = $238; $$pre$i = ((($234)) + 8|0); $$0189$i = $234;$$pre$phi$iZ2D = $$pre$i; } else { $239 = ((($234)) + 8|0); $240 = HEAP32[$239>>2]|0; - $241 = HEAP32[(19108)>>2]|0; + $241 = HEAP32[(19188)>>2]|0; $242 = ($240>>>0)<($241>>>0); if ($242) { _abort(); @@ -22157,8 +22083,8 @@ function _malloc($0) { $245 = ((($231)) + 12|0); HEAP32[$245>>2] = $234; } - HEAP32[(19100)>>2] = $$0193$lcssa$i; - HEAP32[(19112)>>2] = $157; + HEAP32[(19180)>>2] = $$0193$lcssa$i; + HEAP32[(19192)>>2] = $157; } $246 = ((($$0192$lcssa$i)) + 8|0); $$0 = $246; @@ -22174,7 +22100,7 @@ function _malloc($0) { } else { $248 = (($0) + 11)|0; $249 = $248 & -8; - $250 = HEAP32[(19096)>>2]|0; + $250 = HEAP32[(19176)>>2]|0; $251 = ($250|0)==(0); if ($251) { $$0197 = $249; @@ -22214,7 +22140,7 @@ function _malloc($0) { $$0358$i = $277; } } - $278 = (19396 + ($$0358$i<<2)|0); + $278 = (19476 + ($$0358$i<<2)|0); $279 = HEAP32[$278>>2]|0; $280 = ($279|0)==(0|0); L117: do { @@ -22306,7 +22232,7 @@ function _malloc($0) { $328 = $324 | $327; $329 = $325 >>> $327; $330 = (($328) + ($329))|0; - $331 = (19396 + ($330<<2)|0); + $331 = (19476 + ($330<<2)|0); $332 = HEAP32[$331>>2]|0; $$4$ph$i = 0;$$4357$ph$i = $332; } else { @@ -22350,11 +22276,11 @@ function _malloc($0) { if ($344) { $$0197 = $249; } else { - $345 = HEAP32[(19100)>>2]|0; + $345 = HEAP32[(19180)>>2]|0; $346 = (($345) - ($249))|0; $347 = ($$4351$lcssa$i>>>0)<($346>>>0); if ($347) { - $348 = HEAP32[(19108)>>2]|0; + $348 = HEAP32[(19188)>>2]|0; $349 = ($$4$lcssa$i>>>0)<($348>>>0); if ($349) { _abort(); @@ -22451,7 +22377,7 @@ function _malloc($0) { } else { $380 = ((($$4$lcssa$i)) + 28|0); $381 = HEAP32[$380>>2]|0; - $382 = (19396 + ($381<<2)|0); + $382 = (19476 + ($381<<2)|0); $383 = HEAP32[$382>>2]|0; $384 = ($$4$lcssa$i|0)==($383|0); do { @@ -22462,12 +22388,12 @@ function _malloc($0) { $385 = 1 << $381; $386 = $385 ^ -1; $387 = $250 & $386; - HEAP32[(19096)>>2] = $387; + HEAP32[(19176)>>2] = $387; $470 = $387; break L164; } } else { - $388 = HEAP32[(19108)>>2]|0; + $388 = HEAP32[(19188)>>2]|0; $389 = ($353>>>0)<($388>>>0); if ($389) { _abort(); @@ -22489,7 +22415,7 @@ function _malloc($0) { } } } while(0); - $394 = HEAP32[(19108)>>2]|0; + $394 = HEAP32[(19188)>>2]|0; $395 = ($$3372$i>>>0)<($394>>>0); if ($395) { _abort(); @@ -22521,7 +22447,7 @@ function _malloc($0) { if ($405) { $470 = $250; } else { - $406 = HEAP32[(19108)>>2]|0; + $406 = HEAP32[(19188)>>2]|0; $407 = ($404>>>0)<($406>>>0); if ($407) { _abort(); @@ -22562,20 +22488,20 @@ function _malloc($0) { $424 = ($$4351$lcssa$i>>>0)<(256); if ($424) { $425 = $423 << 1; - $426 = (19132 + ($425<<2)|0); - $427 = HEAP32[4773]|0; + $426 = (19212 + ($425<<2)|0); + $427 = HEAP32[4793]|0; $428 = 1 << $423; $429 = $427 & $428; $430 = ($429|0)==(0); if ($430) { $431 = $427 | $428; - HEAP32[4773] = $431; + HEAP32[4793] = $431; $$pre$i210 = ((($426)) + 8|0); $$0368$i = $426;$$pre$phi$i211Z2D = $$pre$i210; } else { $432 = ((($426)) + 8|0); $433 = HEAP32[$432>>2]|0; - $434 = HEAP32[(19108)>>2]|0; + $434 = HEAP32[(19188)>>2]|0; $435 = ($433>>>0)<($434>>>0); if ($435) { _abort(); @@ -22627,7 +22553,7 @@ function _malloc($0) { $$0361$i = $463; } } - $464 = (19396 + ($$0361$i<<2)|0); + $464 = (19476 + ($$0361$i<<2)|0); $465 = ((($350)) + 28|0); HEAP32[$465>>2] = $$0361$i; $466 = ((($350)) + 16|0); @@ -22639,7 +22565,7 @@ function _malloc($0) { $471 = ($469|0)==(0); if ($471) { $472 = $470 | $468; - HEAP32[(19096)>>2] = $472; + HEAP32[(19176)>>2] = $472; HEAP32[$464>>2] = $350; $473 = ((($350)) + 24|0); HEAP32[$473>>2] = $464; @@ -22678,7 +22604,7 @@ function _malloc($0) { } } if ((label|0) == 136) { - $491 = HEAP32[(19108)>>2]|0; + $491 = HEAP32[(19188)>>2]|0; $492 = ($487>>>0)<($491>>>0); if ($492) { _abort(); @@ -22697,7 +22623,7 @@ function _malloc($0) { else if ((label|0) == 139) { $496 = ((($$0345$i)) + 8|0); $497 = HEAP32[$496>>2]|0; - $498 = HEAP32[(19108)>>2]|0; + $498 = HEAP32[(19188)>>2]|0; $499 = ($497>>>0)>=($498>>>0); $not$9$i = ($$0345$i>>>0)>=($498>>>0); $500 = $499 & $not$9$i; @@ -22730,16 +22656,16 @@ function _malloc($0) { } } } while(0); - $506 = HEAP32[(19100)>>2]|0; + $506 = HEAP32[(19180)>>2]|0; $507 = ($506>>>0)<($$0197>>>0); if (!($507)) { $508 = (($506) - ($$0197))|0; - $509 = HEAP32[(19112)>>2]|0; + $509 = HEAP32[(19192)>>2]|0; $510 = ($508>>>0)>(15); if ($510) { $511 = (($509) + ($$0197)|0); - HEAP32[(19112)>>2] = $511; - HEAP32[(19100)>>2] = $508; + HEAP32[(19192)>>2] = $511; + HEAP32[(19180)>>2] = $508; $512 = $508 | 1; $513 = ((($511)) + 4|0); HEAP32[$513>>2] = $512; @@ -22749,8 +22675,8 @@ function _malloc($0) { $516 = ((($509)) + 4|0); HEAP32[$516>>2] = $515; } else { - HEAP32[(19100)>>2] = 0; - HEAP32[(19112)>>2] = 0; + HEAP32[(19180)>>2] = 0; + HEAP32[(19192)>>2] = 0; $517 = $506 | 3; $518 = ((($509)) + 4|0); HEAP32[$518>>2] = $517; @@ -22764,14 +22690,14 @@ function _malloc($0) { $$0 = $523; STACKTOP = sp;return ($$0|0); } - $524 = HEAP32[(19104)>>2]|0; + $524 = HEAP32[(19184)>>2]|0; $525 = ($524>>>0)>($$0197>>>0); if ($525) { $526 = (($524) - ($$0197))|0; - HEAP32[(19104)>>2] = $526; - $527 = HEAP32[(19116)>>2]|0; + HEAP32[(19184)>>2] = $526; + $527 = HEAP32[(19196)>>2]|0; $528 = (($527) + ($$0197)|0); - HEAP32[(19116)>>2] = $528; + HEAP32[(19196)>>2] = $528; $529 = $526 | 1; $530 = ((($528)) + 4|0); HEAP32[$530>>2] = $529; @@ -22782,23 +22708,23 @@ function _malloc($0) { $$0 = $533; STACKTOP = sp;return ($$0|0); } - $534 = HEAP32[4891]|0; + $534 = HEAP32[4911]|0; $535 = ($534|0)==(0); if ($535) { - HEAP32[(19572)>>2] = 4096; - HEAP32[(19568)>>2] = 4096; - HEAP32[(19576)>>2] = -1; - HEAP32[(19580)>>2] = -1; - HEAP32[(19584)>>2] = 0; - HEAP32[(19536)>>2] = 0; + HEAP32[(19652)>>2] = 4096; + HEAP32[(19648)>>2] = 4096; + HEAP32[(19656)>>2] = -1; + HEAP32[(19660)>>2] = -1; + HEAP32[(19664)>>2] = 0; + HEAP32[(19616)>>2] = 0; $536 = $1; $537 = $536 & -16; $538 = $537 ^ 1431655768; HEAP32[$1>>2] = $538; - HEAP32[4891] = $538; + HEAP32[4911] = $538; $542 = 4096; } else { - $$pre$i212 = HEAP32[(19572)>>2]|0; + $$pre$i212 = HEAP32[(19652)>>2]|0; $542 = $$pre$i212; } $539 = (($$0197) + 48)|0; @@ -22811,10 +22737,10 @@ function _malloc($0) { $$0 = 0; STACKTOP = sp;return ($$0|0); } - $546 = HEAP32[(19532)>>2]|0; + $546 = HEAP32[(19612)>>2]|0; $547 = ($546|0)==(0); if (!($547)) { - $548 = HEAP32[(19524)>>2]|0; + $548 = HEAP32[(19604)>>2]|0; $549 = (($548) + ($544))|0; $550 = ($549>>>0)<=($548>>>0); $551 = ($549>>>0)>($546>>>0); @@ -22824,18 +22750,18 @@ function _malloc($0) { STACKTOP = sp;return ($$0|0); } } - $552 = HEAP32[(19536)>>2]|0; + $552 = HEAP32[(19616)>>2]|0; $553 = $552 & 4; $554 = ($553|0)==(0); L244: do { if ($554) { - $555 = HEAP32[(19116)>>2]|0; + $555 = HEAP32[(19196)>>2]|0; $556 = ($555|0)==(0|0); L246: do { if ($556) { label = 163; } else { - $$0$i$i = (19540); + $$0$i$i = (19620); while(1) { $557 = HEAP32[$$0$i$i>>2]|0; $558 = ($557>>>0)>($555>>>0); @@ -22893,7 +22819,7 @@ function _malloc($0) { $$2234253237$i = 0; } else { $568 = $566; - $569 = HEAP32[(19568)>>2]|0; + $569 = HEAP32[(19648)>>2]|0; $570 = (($569) + -1)|0; $571 = $570 & $568; $572 = ($571|0)==(0); @@ -22903,13 +22829,13 @@ function _malloc($0) { $576 = (($575) - ($568))|0; $577 = $572 ? 0 : $576; $$$i = (($577) + ($544))|0; - $578 = HEAP32[(19524)>>2]|0; + $578 = HEAP32[(19604)>>2]|0; $579 = (($$$i) + ($578))|0; $580 = ($$$i>>>0)>($$0197>>>0); $581 = ($$$i>>>0)<(2147483647); $or$cond$i214 = $580 & $581; if ($or$cond$i214) { - $582 = HEAP32[(19532)>>2]|0; + $582 = HEAP32[(19612)>>2]|0; $583 = ($582|0)==(0); if (!($583)) { $584 = ($579>>>0)<=($578>>>0); @@ -22955,7 +22881,7 @@ function _malloc($0) { break L244; } } - $601 = HEAP32[(19572)>>2]|0; + $601 = HEAP32[(19652)>>2]|0; $602 = (($540) - ($$2253$ph$i))|0; $603 = (($602) + ($601))|0; $604 = (0 - ($601))|0; @@ -22980,9 +22906,9 @@ function _malloc($0) { } } } while(0); - $611 = HEAP32[(19536)>>2]|0; + $611 = HEAP32[(19616)>>2]|0; $612 = $611 | 4; - HEAP32[(19536)>>2] = $612; + HEAP32[(19616)>>2] = $612; $$4236$i = $$2234253237$i; label = 178; } else { @@ -23018,35 +22944,35 @@ function _malloc($0) { } } if ((label|0) == 180) { - $626 = HEAP32[(19524)>>2]|0; + $626 = HEAP32[(19604)>>2]|0; $627 = (($626) + ($$723948$i))|0; - HEAP32[(19524)>>2] = $627; - $628 = HEAP32[(19528)>>2]|0; + HEAP32[(19604)>>2] = $627; + $628 = HEAP32[(19608)>>2]|0; $629 = ($627>>>0)>($628>>>0); if ($629) { - HEAP32[(19528)>>2] = $627; + HEAP32[(19608)>>2] = $627; } - $630 = HEAP32[(19116)>>2]|0; + $630 = HEAP32[(19196)>>2]|0; $631 = ($630|0)==(0|0); do { if ($631) { - $632 = HEAP32[(19108)>>2]|0; + $632 = HEAP32[(19188)>>2]|0; $633 = ($632|0)==(0|0); $634 = ($$749$i>>>0)<($632>>>0); $or$cond12$i = $633 | $634; if ($or$cond12$i) { - HEAP32[(19108)>>2] = $$749$i; + HEAP32[(19188)>>2] = $$749$i; } - HEAP32[(19540)>>2] = $$749$i; - HEAP32[(19544)>>2] = $$723948$i; - HEAP32[(19552)>>2] = 0; - $635 = HEAP32[4891]|0; - HEAP32[(19128)>>2] = $635; - HEAP32[(19124)>>2] = -1; + HEAP32[(19620)>>2] = $$749$i; + HEAP32[(19624)>>2] = $$723948$i; + HEAP32[(19632)>>2] = 0; + $635 = HEAP32[4911]|0; + HEAP32[(19208)>>2] = $635; + HEAP32[(19204)>>2] = -1; $$01$i$i = 0; while(1) { $636 = $$01$i$i << 1; - $637 = (19132 + ($636<<2)|0); + $637 = (19212 + ($636<<2)|0); $638 = ((($637)) + 12|0); HEAP32[$638>>2] = $637; $639 = ((($637)) + 8|0); @@ -23069,18 +22995,18 @@ function _malloc($0) { $648 = $645 ? 0 : $647; $649 = (($$749$i) + ($648)|0); $650 = (($641) - ($648))|0; - HEAP32[(19116)>>2] = $649; - HEAP32[(19104)>>2] = $650; + HEAP32[(19196)>>2] = $649; + HEAP32[(19184)>>2] = $650; $651 = $650 | 1; $652 = ((($649)) + 4|0); HEAP32[$652>>2] = $651; $653 = (($649) + ($650)|0); $654 = ((($653)) + 4|0); HEAP32[$654>>2] = 40; - $655 = HEAP32[(19580)>>2]|0; - HEAP32[(19120)>>2] = $655; + $655 = HEAP32[(19660)>>2]|0; + HEAP32[(19200)>>2] = $655; } else { - $$024371$i = (19540); + $$024371$i = (19620); while(1) { $656 = HEAP32[$$024371$i>>2]|0; $657 = ((($$024371$i)) + 4|0); @@ -23112,7 +23038,7 @@ function _malloc($0) { if ($or$cond51$i) { $670 = (($658) + ($$723948$i))|0; HEAP32[$657>>2] = $670; - $671 = HEAP32[(19104)>>2]|0; + $671 = HEAP32[(19184)>>2]|0; $672 = ((($630)) + 8|0); $673 = $672; $674 = $673 & 7; @@ -23123,30 +23049,30 @@ function _malloc($0) { $679 = (($630) + ($678)|0); $680 = (($$723948$i) - ($678))|0; $681 = (($671) + ($680))|0; - HEAP32[(19116)>>2] = $679; - HEAP32[(19104)>>2] = $681; + HEAP32[(19196)>>2] = $679; + HEAP32[(19184)>>2] = $681; $682 = $681 | 1; $683 = ((($679)) + 4|0); HEAP32[$683>>2] = $682; $684 = (($679) + ($681)|0); $685 = ((($684)) + 4|0); HEAP32[$685>>2] = 40; - $686 = HEAP32[(19580)>>2]|0; - HEAP32[(19120)>>2] = $686; + $686 = HEAP32[(19660)>>2]|0; + HEAP32[(19200)>>2] = $686; break; } } } - $687 = HEAP32[(19108)>>2]|0; + $687 = HEAP32[(19188)>>2]|0; $688 = ($$749$i>>>0)<($687>>>0); if ($688) { - HEAP32[(19108)>>2] = $$749$i; + HEAP32[(19188)>>2] = $$749$i; $752 = $$749$i; } else { $752 = $687; } $689 = (($$749$i) + ($$723948$i)|0); - $$124470$i = (19540); + $$124470$i = (19620); while(1) { $690 = HEAP32[$$124470$i>>2]|0; $691 = ($690|0)==($689|0); @@ -23201,21 +23127,21 @@ function _malloc($0) { $725 = ($717|0)==($630|0); do { if ($725) { - $726 = HEAP32[(19104)>>2]|0; + $726 = HEAP32[(19184)>>2]|0; $727 = (($726) + ($722))|0; - HEAP32[(19104)>>2] = $727; - HEAP32[(19116)>>2] = $721; + HEAP32[(19184)>>2] = $727; + HEAP32[(19196)>>2] = $721; $728 = $727 | 1; $729 = ((($721)) + 4|0); HEAP32[$729>>2] = $728; } else { - $730 = HEAP32[(19112)>>2]|0; + $730 = HEAP32[(19192)>>2]|0; $731 = ($717|0)==($730|0); if ($731) { - $732 = HEAP32[(19100)>>2]|0; + $732 = HEAP32[(19180)>>2]|0; $733 = (($732) + ($722))|0; - HEAP32[(19100)>>2] = $733; - HEAP32[(19112)>>2] = $721; + HEAP32[(19180)>>2] = $733; + HEAP32[(19192)>>2] = $721; $734 = $733 | 1; $735 = ((($721)) + 4|0); HEAP32[$735>>2] = $734; @@ -23238,7 +23164,7 @@ function _malloc($0) { $746 = ((($717)) + 12|0); $747 = HEAP32[$746>>2]|0; $748 = $742 << 1; - $749 = (19132 + ($748<<2)|0); + $749 = (19212 + ($748<<2)|0); $750 = ($745|0)==($749|0); do { if (!($750)) { @@ -23261,9 +23187,9 @@ function _malloc($0) { if ($756) { $757 = 1 << $742; $758 = $757 ^ -1; - $759 = HEAP32[4773]|0; + $759 = HEAP32[4793]|0; $760 = $759 & $758; - HEAP32[4773] = $760; + HEAP32[4793] = $760; break; } $761 = ($747|0)==($749|0); @@ -23376,7 +23302,7 @@ function _malloc($0) { } $795 = ((($717)) + 28|0); $796 = HEAP32[$795>>2]|0; - $797 = (19396 + ($796<<2)|0); + $797 = (19476 + ($796<<2)|0); $798 = HEAP32[$797>>2]|0; $799 = ($717|0)==($798|0); do { @@ -23388,12 +23314,12 @@ function _malloc($0) { } $800 = 1 << $796; $801 = $800 ^ -1; - $802 = HEAP32[(19096)>>2]|0; + $802 = HEAP32[(19176)>>2]|0; $803 = $802 & $801; - HEAP32[(19096)>>2] = $803; + HEAP32[(19176)>>2] = $803; break L314; } else { - $804 = HEAP32[(19108)>>2]|0; + $804 = HEAP32[(19188)>>2]|0; $805 = ($768>>>0)<($804>>>0); if ($805) { _abort(); @@ -23414,7 +23340,7 @@ function _malloc($0) { } } } while(0); - $810 = HEAP32[(19108)>>2]|0; + $810 = HEAP32[(19188)>>2]|0; $811 = ($$3$i$i>>>0)<($810>>>0); if ($811) { _abort(); @@ -23446,7 +23372,7 @@ function _malloc($0) { if ($821) { break; } - $822 = HEAP32[(19108)>>2]|0; + $822 = HEAP32[(19188)>>2]|0; $823 = ($820>>>0)<($822>>>0); if ($823) { _abort(); @@ -23479,21 +23405,21 @@ function _malloc($0) { $835 = ($$0287$i$i>>>0)<(256); if ($835) { $836 = $834 << 1; - $837 = (19132 + ($836<<2)|0); - $838 = HEAP32[4773]|0; + $837 = (19212 + ($836<<2)|0); + $838 = HEAP32[4793]|0; $839 = 1 << $834; $840 = $838 & $839; $841 = ($840|0)==(0); do { if ($841) { $842 = $838 | $839; - HEAP32[4773] = $842; + HEAP32[4793] = $842; $$pre$i19$i = ((($837)) + 8|0); $$0295$i$i = $837;$$pre$phi$i20$iZ2D = $$pre$i19$i; } else { $843 = ((($837)) + 8|0); $844 = HEAP32[$843>>2]|0; - $845 = HEAP32[(19108)>>2]|0; + $845 = HEAP32[(19188)>>2]|0; $846 = ($844>>>0)<($845>>>0); if (!($846)) { $$0295$i$i = $844;$$pre$phi$i20$iZ2D = $843; @@ -23548,20 +23474,20 @@ function _malloc($0) { $$0296$i$i = $874; } } while(0); - $875 = (19396 + ($$0296$i$i<<2)|0); + $875 = (19476 + ($$0296$i$i<<2)|0); $876 = ((($721)) + 28|0); HEAP32[$876>>2] = $$0296$i$i; $877 = ((($721)) + 16|0); $878 = ((($877)) + 4|0); HEAP32[$878>>2] = 0; HEAP32[$877>>2] = 0; - $879 = HEAP32[(19096)>>2]|0; + $879 = HEAP32[(19176)>>2]|0; $880 = 1 << $$0296$i$i; $881 = $879 & $880; $882 = ($881|0)==(0); if ($882) { $883 = $879 | $880; - HEAP32[(19096)>>2] = $883; + HEAP32[(19176)>>2] = $883; HEAP32[$875>>2] = $721; $884 = ((($721)) + 24|0); HEAP32[$884>>2] = $875; @@ -23600,7 +23526,7 @@ function _malloc($0) { } } if ((label|0) == 262) { - $902 = HEAP32[(19108)>>2]|0; + $902 = HEAP32[(19188)>>2]|0; $903 = ($898>>>0)<($902>>>0); if ($903) { _abort(); @@ -23619,7 +23545,7 @@ function _malloc($0) { else if ((label|0) == 265) { $907 = ((($$0289$i$i)) + 8|0); $908 = HEAP32[$907>>2]|0; - $909 = HEAP32[(19108)>>2]|0; + $909 = HEAP32[(19188)>>2]|0; $910 = ($908>>>0)>=($909>>>0); $not$7$i$i = ($$0289$i$i>>>0)>=($909>>>0); $911 = $910 & $not$7$i$i; @@ -23646,7 +23572,7 @@ function _malloc($0) { STACKTOP = sp;return ($$0|0); } } - $$0$i$i$i = (19540); + $$0$i$i$i = (19620); while(1) { $916 = HEAP32[$$0$i$i$i>>2]|0; $917 = ($916>>>0)>($630>>>0); @@ -23687,23 +23613,23 @@ function _malloc($0) { $945 = $942 ? 0 : $944; $946 = (($$749$i) + ($945)|0); $947 = (($938) - ($945))|0; - HEAP32[(19116)>>2] = $946; - HEAP32[(19104)>>2] = $947; + HEAP32[(19196)>>2] = $946; + HEAP32[(19184)>>2] = $947; $948 = $947 | 1; $949 = ((($946)) + 4|0); HEAP32[$949>>2] = $948; $950 = (($946) + ($947)|0); $951 = ((($950)) + 4|0); HEAP32[$951>>2] = 40; - $952 = HEAP32[(19580)>>2]|0; - HEAP32[(19120)>>2] = $952; + $952 = HEAP32[(19660)>>2]|0; + HEAP32[(19200)>>2] = $952; $953 = ((($935)) + 4|0); HEAP32[$953>>2] = 27; - ;HEAP32[$936>>2]=HEAP32[(19540)>>2]|0;HEAP32[$936+4>>2]=HEAP32[(19540)+4>>2]|0;HEAP32[$936+8>>2]=HEAP32[(19540)+8>>2]|0;HEAP32[$936+12>>2]=HEAP32[(19540)+12>>2]|0; - HEAP32[(19540)>>2] = $$749$i; - HEAP32[(19544)>>2] = $$723948$i; - HEAP32[(19552)>>2] = 0; - HEAP32[(19548)>>2] = $936; + ;HEAP32[$936>>2]=HEAP32[(19620)>>2]|0;HEAP32[$936+4>>2]=HEAP32[(19620)+4>>2]|0;HEAP32[$936+8>>2]=HEAP32[(19620)+8>>2]|0;HEAP32[$936+12>>2]=HEAP32[(19620)+12>>2]|0; + HEAP32[(19620)>>2] = $$749$i; + HEAP32[(19624)>>2] = $$723948$i; + HEAP32[(19632)>>2] = 0; + HEAP32[(19628)>>2] = $936; $955 = $937; while(1) { $954 = ((($955)) + 4|0); @@ -23732,20 +23658,20 @@ function _malloc($0) { $967 = ($961>>>0)<(256); if ($967) { $968 = $966 << 1; - $969 = (19132 + ($968<<2)|0); - $970 = HEAP32[4773]|0; + $969 = (19212 + ($968<<2)|0); + $970 = HEAP32[4793]|0; $971 = 1 << $966; $972 = $970 & $971; $973 = ($972|0)==(0); if ($973) { $974 = $970 | $971; - HEAP32[4773] = $974; + HEAP32[4793] = $974; $$pre$i$i = ((($969)) + 8|0); $$0211$i$i = $969;$$pre$phi$i$iZ2D = $$pre$i$i; } else { $975 = ((($969)) + 8|0); $976 = HEAP32[$975>>2]|0; - $977 = HEAP32[(19108)>>2]|0; + $977 = HEAP32[(19188)>>2]|0; $978 = ($976>>>0)<($977>>>0); if ($978) { _abort(); @@ -23797,19 +23723,19 @@ function _malloc($0) { $$0212$i$i = $1006; } } - $1007 = (19396 + ($$0212$i$i<<2)|0); + $1007 = (19476 + ($$0212$i$i<<2)|0); $1008 = ((($630)) + 28|0); HEAP32[$1008>>2] = $$0212$i$i; $1009 = ((($630)) + 20|0); HEAP32[$1009>>2] = 0; HEAP32[$933>>2] = 0; - $1010 = HEAP32[(19096)>>2]|0; + $1010 = HEAP32[(19176)>>2]|0; $1011 = 1 << $$0212$i$i; $1012 = $1010 & $1011; $1013 = ($1012|0)==(0); if ($1013) { $1014 = $1010 | $1011; - HEAP32[(19096)>>2] = $1014; + HEAP32[(19176)>>2] = $1014; HEAP32[$1007>>2] = $630; $1015 = ((($630)) + 24|0); HEAP32[$1015>>2] = $1007; @@ -23848,7 +23774,7 @@ function _malloc($0) { } } if ((label|0) == 289) { - $1033 = HEAP32[(19108)>>2]|0; + $1033 = HEAP32[(19188)>>2]|0; $1034 = ($1029>>>0)<($1033>>>0); if ($1034) { _abort(); @@ -23867,7 +23793,7 @@ function _malloc($0) { else if ((label|0) == 292) { $1038 = ((($$0207$i$i)) + 8|0); $1039 = HEAP32[$1038>>2]|0; - $1040 = HEAP32[(19108)>>2]|0; + $1040 = HEAP32[(19188)>>2]|0; $1041 = ($1039>>>0)>=($1040>>>0); $not$$i$i = ($$0207$i$i>>>0)>=($1040>>>0); $1042 = $1041 & $not$$i$i; @@ -23890,14 +23816,14 @@ function _malloc($0) { } } } while(0); - $1048 = HEAP32[(19104)>>2]|0; + $1048 = HEAP32[(19184)>>2]|0; $1049 = ($1048>>>0)>($$0197>>>0); if ($1049) { $1050 = (($1048) - ($$0197))|0; - HEAP32[(19104)>>2] = $1050; - $1051 = HEAP32[(19116)>>2]|0; + HEAP32[(19184)>>2] = $1050; + $1051 = HEAP32[(19196)>>2]|0; $1052 = (($1051) + ($$0197)|0); - HEAP32[(19116)>>2] = $1052; + HEAP32[(19196)>>2] = $1052; $1053 = $1050 | 1; $1054 = ((($1052)) + 4|0); HEAP32[$1054>>2] = $1053; @@ -23940,7 +23866,7 @@ function _free($0) { return; } $2 = ((($0)) + -8|0); - $3 = HEAP32[(19108)>>2]|0; + $3 = HEAP32[(19188)>>2]|0; $4 = ($2>>>0)<($3>>>0); if ($4) { _abort(); @@ -23973,7 +23899,7 @@ function _free($0) { _abort(); // unreachable; } - $19 = HEAP32[(19112)>>2]|0; + $19 = HEAP32[(19192)>>2]|0; $20 = ($16|0)==($19|0); if ($20) { $104 = ((($10)) + 4|0); @@ -23988,7 +23914,7 @@ function _free($0) { $109 = ((($16)) + 4|0); $110 = $17 | 1; $111 = $105 & -2; - HEAP32[(19100)>>2] = $17; + HEAP32[(19180)>>2] = $17; HEAP32[$104>>2] = $111; HEAP32[$109>>2] = $110; HEAP32[$108>>2] = $17; @@ -24002,7 +23928,7 @@ function _free($0) { $25 = ((($16)) + 12|0); $26 = HEAP32[$25>>2]|0; $27 = $21 << 1; - $28 = (19132 + ($27<<2)|0); + $28 = (19212 + ($27<<2)|0); $29 = ($24|0)==($28|0); if (!($29)) { $30 = ($24>>>0)<($3>>>0); @@ -24022,9 +23948,9 @@ function _free($0) { if ($34) { $35 = 1 << $21; $36 = $35 ^ -1; - $37 = HEAP32[4773]|0; + $37 = HEAP32[4793]|0; $38 = $37 & $36; - HEAP32[4773] = $38; + HEAP32[4793] = $38; $$1 = $16;$$1382 = $17;$113 = $16; break; } @@ -24138,7 +24064,7 @@ function _free($0) { } else { $73 = ((($16)) + 28|0); $74 = HEAP32[$73>>2]|0; - $75 = (19396 + ($74<<2)|0); + $75 = (19476 + ($74<<2)|0); $76 = HEAP32[$75>>2]|0; $77 = ($16|0)==($76|0); do { @@ -24148,14 +24074,14 @@ function _free($0) { if ($cond421) { $78 = 1 << $74; $79 = $78 ^ -1; - $80 = HEAP32[(19096)>>2]|0; + $80 = HEAP32[(19176)>>2]|0; $81 = $80 & $79; - HEAP32[(19096)>>2] = $81; + HEAP32[(19176)>>2] = $81; $$1 = $16;$$1382 = $17;$113 = $16; break L10; } } else { - $82 = HEAP32[(19108)>>2]|0; + $82 = HEAP32[(19188)>>2]|0; $83 = ($46>>>0)<($82>>>0); if ($83) { _abort(); @@ -24177,7 +24103,7 @@ function _free($0) { } } } while(0); - $88 = HEAP32[(19108)>>2]|0; + $88 = HEAP32[(19188)>>2]|0; $89 = ($$3>>>0)<($88>>>0); if ($89) { _abort(); @@ -24209,7 +24135,7 @@ function _free($0) { if ($99) { $$1 = $16;$$1382 = $17;$113 = $16; } else { - $100 = HEAP32[(19108)>>2]|0; + $100 = HEAP32[(19188)>>2]|0; $101 = ($98>>>0)<($100>>>0); if ($101) { _abort(); @@ -24244,14 +24170,14 @@ function _free($0) { $118 = $115 & 2; $119 = ($118|0)==(0); if ($119) { - $120 = HEAP32[(19116)>>2]|0; + $120 = HEAP32[(19196)>>2]|0; $121 = ($10|0)==($120|0); - $122 = HEAP32[(19112)>>2]|0; + $122 = HEAP32[(19192)>>2]|0; if ($121) { - $123 = HEAP32[(19104)>>2]|0; + $123 = HEAP32[(19184)>>2]|0; $124 = (($123) + ($$1382))|0; - HEAP32[(19104)>>2] = $124; - HEAP32[(19116)>>2] = $$1; + HEAP32[(19184)>>2] = $124; + HEAP32[(19196)>>2] = $$1; $125 = $124 | 1; $126 = ((($$1)) + 4|0); HEAP32[$126>>2] = $125; @@ -24259,16 +24185,16 @@ function _free($0) { if (!($127)) { return; } - HEAP32[(19112)>>2] = 0; - HEAP32[(19100)>>2] = 0; + HEAP32[(19192)>>2] = 0; + HEAP32[(19180)>>2] = 0; return; } $128 = ($10|0)==($122|0); if ($128) { - $129 = HEAP32[(19100)>>2]|0; + $129 = HEAP32[(19180)>>2]|0; $130 = (($129) + ($$1382))|0; - HEAP32[(19100)>>2] = $130; - HEAP32[(19112)>>2] = $113; + HEAP32[(19180)>>2] = $130; + HEAP32[(19192)>>2] = $113; $131 = $130 | 1; $132 = ((($$1)) + 4|0); HEAP32[$132>>2] = $131; @@ -24287,10 +24213,10 @@ function _free($0) { $140 = ((($10)) + 12|0); $141 = HEAP32[$140>>2]|0; $142 = $136 << 1; - $143 = (19132 + ($142<<2)|0); + $143 = (19212 + ($142<<2)|0); $144 = ($139|0)==($143|0); if (!($144)) { - $145 = HEAP32[(19108)>>2]|0; + $145 = HEAP32[(19188)>>2]|0; $146 = ($139>>>0)<($145>>>0); if ($146) { _abort(); @@ -24308,9 +24234,9 @@ function _free($0) { if ($150) { $151 = 1 << $136; $152 = $151 ^ -1; - $153 = HEAP32[4773]|0; + $153 = HEAP32[4793]|0; $154 = $153 & $152; - HEAP32[4773] = $154; + HEAP32[4793] = $154; break; } $155 = ($141|0)==($143|0); @@ -24318,7 +24244,7 @@ function _free($0) { $$pre442 = ((($141)) + 8|0); $$pre$phi443Z2D = $$pre442; } else { - $156 = HEAP32[(19108)>>2]|0; + $156 = HEAP32[(19188)>>2]|0; $157 = ($141>>>0)<($156>>>0); if ($157) { _abort(); @@ -24378,7 +24304,7 @@ function _free($0) { $$1398 = $187;$$1402 = $186; } } - $189 = HEAP32[(19108)>>2]|0; + $189 = HEAP32[(19188)>>2]|0; $190 = ($$1402>>>0)<($189>>>0); if ($190) { _abort(); @@ -24391,7 +24317,7 @@ function _free($0) { } else { $167 = ((($10)) + 8|0); $168 = HEAP32[$167>>2]|0; - $169 = HEAP32[(19108)>>2]|0; + $169 = HEAP32[(19188)>>2]|0; $170 = ($168>>>0)<($169>>>0); if ($170) { _abort(); @@ -24422,7 +24348,7 @@ function _free($0) { if (!($191)) { $192 = ((($10)) + 28|0); $193 = HEAP32[$192>>2]|0; - $194 = (19396 + ($193<<2)|0); + $194 = (19476 + ($193<<2)|0); $195 = HEAP32[$194>>2]|0; $196 = ($10|0)==($195|0); do { @@ -24432,13 +24358,13 @@ function _free($0) { if ($cond422) { $197 = 1 << $193; $198 = $197 ^ -1; - $199 = HEAP32[(19096)>>2]|0; + $199 = HEAP32[(19176)>>2]|0; $200 = $199 & $198; - HEAP32[(19096)>>2] = $200; + HEAP32[(19176)>>2] = $200; break L108; } } else { - $201 = HEAP32[(19108)>>2]|0; + $201 = HEAP32[(19188)>>2]|0; $202 = ($163>>>0)<($201>>>0); if ($202) { _abort(); @@ -24459,7 +24385,7 @@ function _free($0) { } } } while(0); - $207 = HEAP32[(19108)>>2]|0; + $207 = HEAP32[(19188)>>2]|0; $208 = ($$3400>>>0)<($207>>>0); if ($208) { _abort(); @@ -24489,7 +24415,7 @@ function _free($0) { $217 = HEAP32[$216>>2]|0; $218 = ($217|0)==(0|0); if (!($218)) { - $219 = HEAP32[(19108)>>2]|0; + $219 = HEAP32[(19188)>>2]|0; $220 = ($217>>>0)<($219>>>0); if ($220) { _abort(); @@ -24510,10 +24436,10 @@ function _free($0) { HEAP32[$224>>2] = $223; $225 = (($113) + ($135)|0); HEAP32[$225>>2] = $135; - $226 = HEAP32[(19112)>>2]|0; + $226 = HEAP32[(19192)>>2]|0; $227 = ($$1|0)==($226|0); if ($227) { - HEAP32[(19100)>>2] = $135; + HEAP32[(19180)>>2] = $135; return; } else { $$2 = $135; @@ -24532,20 +24458,20 @@ function _free($0) { $233 = ($$2>>>0)<(256); if ($233) { $234 = $232 << 1; - $235 = (19132 + ($234<<2)|0); - $236 = HEAP32[4773]|0; + $235 = (19212 + ($234<<2)|0); + $236 = HEAP32[4793]|0; $237 = 1 << $232; $238 = $236 & $237; $239 = ($238|0)==(0); if ($239) { $240 = $236 | $237; - HEAP32[4773] = $240; + HEAP32[4793] = $240; $$pre = ((($235)) + 8|0); $$0403 = $235;$$pre$phiZ2D = $$pre; } else { $241 = ((($235)) + 8|0); $242 = HEAP32[$241>>2]|0; - $243 = HEAP32[(19108)>>2]|0; + $243 = HEAP32[(19188)>>2]|0; $244 = ($242>>>0)<($243>>>0); if ($244) { _abort(); @@ -24597,21 +24523,21 @@ function _free($0) { $$0396 = $272; } } - $273 = (19396 + ($$0396<<2)|0); + $273 = (19476 + ($$0396<<2)|0); $274 = ((($$1)) + 28|0); HEAP32[$274>>2] = $$0396; $275 = ((($$1)) + 16|0); $276 = ((($$1)) + 20|0); HEAP32[$276>>2] = 0; HEAP32[$275>>2] = 0; - $277 = HEAP32[(19096)>>2]|0; + $277 = HEAP32[(19176)>>2]|0; $278 = 1 << $$0396; $279 = $277 & $278; $280 = ($279|0)==(0); do { if ($280) { $281 = $277 | $278; - HEAP32[(19096)>>2] = $281; + HEAP32[(19176)>>2] = $281; HEAP32[$273>>2] = $$1; $282 = ((($$1)) + 24|0); HEAP32[$282>>2] = $273; @@ -24649,7 +24575,7 @@ function _free($0) { } } if ((label|0) == 121) { - $300 = HEAP32[(19108)>>2]|0; + $300 = HEAP32[(19188)>>2]|0; $301 = ($296>>>0)<($300>>>0); if ($301) { _abort(); @@ -24668,7 +24594,7 @@ function _free($0) { else if ((label|0) == 124) { $305 = ((($$0384)) + 8|0); $306 = HEAP32[$305>>2]|0; - $307 = HEAP32[(19108)>>2]|0; + $307 = HEAP32[(19188)>>2]|0; $308 = ($306>>>0)>=($307>>>0); $not$437 = ($$0384>>>0)>=($307>>>0); $309 = $308 & $not$437; @@ -24690,12 +24616,12 @@ function _free($0) { } } } while(0); - $314 = HEAP32[(19124)>>2]|0; + $314 = HEAP32[(19204)>>2]|0; $315 = (($314) + -1)|0; - HEAP32[(19124)>>2] = $315; + HEAP32[(19204)>>2] = $315; $316 = ($315|0)==(0); if ($316) { - $$0212$in$i = (19548); + $$0212$in$i = (19628); } else { return; } @@ -24709,7 +24635,7 @@ function _free($0) { $$0212$in$i = $318; } } - HEAP32[(19124)>>2] = -1; + HEAP32[(19204)>>2] = -1; return; } function runPostSets() { diff --git a/docs/examples/web/makefile b/docs/examples/web/makefile index a04f7949d..0b327f8e3 100644 --- a/docs/examples/web/makefile +++ b/docs/examples/web/makefile @@ -563,8 +563,7 @@ shaders/shaders_postprocessing: shaders/shaders_postprocessing.c $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) -s TOTAL_MEMORY=67108864 \ --preload-file shaders/resources/model/dwarf.obj@resources/model/dwarf.obj \ --preload-file shaders/resources/model/dwarf_diffuse.png@resources/model/dwarf_diffuse.png \ - --preload-file shaders/resources/shaders/glsl100/base.vs@resources/shaders/glsl100/base.vs \ - --preload-file shaders/resources/shaders/glsl100/bloom.fs@resources/shaders/glsl100/bloom.fs + --preload-file shaders/resources/shaders/glsl100@resources/shaders/glsl100 # compile [audio] example - sound loading and playing (WAV and OGG) audio/audio_sound_loading: audio/audio_sound_loading.c diff --git a/shaders/glsl100/template.fs b/docs/examples/web/shaders/resources/shaders/glsl100/base.fs similarity index 92% rename from shaders/glsl100/template.fs rename to docs/examples/web/shaders/resources/shaders/glsl100/base.fs index c1126423a..b004ba0bd 100644 --- a/shaders/glsl100/template.fs +++ b/docs/examples/web/shaders/resources/shaders/glsl100/base.fs @@ -11,6 +11,7 @@ uniform sampler2D texture0; uniform vec4 colDiffuse; // NOTE: Add here your custom variables +uniform vec2 resolution = vec2(800, 450); void main() { diff --git a/docs/examples/web/shaders/resources/shaders/glsl100/blur.fs b/docs/examples/web/shaders/resources/shaders/glsl100/blur.fs new file mode 100644 index 000000000..96f780e1e --- /dev/null +++ b/docs/examples/web/shaders/resources/shaders/glsl100/blur.fs @@ -0,0 +1,34 @@ +#version 100 + +precision mediump float; + +// Input vertex attributes (from vertex shader) +varying vec2 fragTexCoord; +varying vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// NOTE: Add here your custom variables + +// NOTE: Render size values must be passed from code +const float renderWidth = 800.0; +const float renderHeight = 450.0; + +vec3 offset = vec3(0.0, 1.3846153846, 3.2307692308); +vec3 weight = vec3(0.2270270270, 0.3162162162, 0.0702702703); + +void main() +{ + // Texel color fetching from texture sampler + vec3 tc = texture2D(texture0, fragTexCoord).rgb*weight.x; + + tc += texture2D(texture0, fragTexCoord + vec2(offset.y)/renderWidth, 0.0).rgb*weight.y; + tc += texture2D(texture0, fragTexCoord - vec2(offset.y)/renderWidth, 0.0).rgb*weight.y; + + tc += texture2D(texture0, fragTexCoord + vec2(offset.z)/renderWidth, 0.0).rgb*weight.z; + tc += texture2D(texture0, fragTexCoord - vec2(offset.z)/renderWidth, 0.0).rgb*weight.z; + + gl_FragColor = vec4(tc, 1.0); +} \ No newline at end of file diff --git a/shaders/glsl100/cross_hatching.fs b/docs/examples/web/shaders/resources/shaders/glsl100/cross_hatching.fs similarity index 87% rename from shaders/glsl100/cross_hatching.fs rename to docs/examples/web/shaders/resources/shaders/glsl100/cross_hatching.fs index ced0fd63c..7d63b0a50 100644 --- a/shaders/glsl100/cross_hatching.fs +++ b/docs/examples/web/shaders/resources/shaders/glsl100/cross_hatching.fs @@ -12,11 +12,11 @@ uniform vec4 colDiffuse; // NOTE: Add here your custom variables -float hatchOffsetY = 5.0f; -float lumThreshold01 = 0.9f; -float lumThreshold02 = 0.7f; -float lumThreshold03 = 0.5f; -float lumThreshold04 = 0.3f; +float hatchOffsetY = 5.0; +float lumThreshold01 = 0.9; +float lumThreshold02 = 0.7; +float lumThreshold03 = 0.5; +float lumThreshold04 = 0.3; void main() { diff --git a/shaders/glsl100/cross_stitching.fs b/docs/examples/web/shaders/resources/shaders/glsl100/cross_stitching.fs similarity index 91% rename from shaders/glsl100/cross_stitching.fs rename to docs/examples/web/shaders/resources/shaders/glsl100/cross_stitching.fs index 67639a551..de6d4f400 100644 --- a/shaders/glsl100/cross_stitching.fs +++ b/docs/examples/web/shaders/resources/shaders/glsl100/cross_stitching.fs @@ -13,12 +13,11 @@ uniform vec4 colDiffuse; // NOTE: Add here your custom variables // NOTE: Render size values must be passed from code -const float renderWidth = 800; -const float renderHeight = 450; +const float renderWidth = 800.0; +const float renderHeight = 450.0; -float stitchingSize = 6.0f; - -uniform int invert = 0; +float stitchingSize = 6.0; +int invert = 0; vec4 PostFX(sampler2D tex, vec2 uv) { diff --git a/shaders/glsl100/dream_vision.fs b/docs/examples/web/shaders/resources/shaders/glsl100/dream_vision.fs similarity index 100% rename from shaders/glsl100/dream_vision.fs rename to docs/examples/web/shaders/resources/shaders/glsl100/dream_vision.fs diff --git a/shaders/glsl100/fisheye.fs b/docs/examples/web/shaders/resources/shaders/glsl100/fisheye.fs similarity index 94% rename from shaders/glsl100/fisheye.fs rename to docs/examples/web/shaders/resources/shaders/glsl100/fisheye.fs index 461e1405d..8beb3d4a8 100644 --- a/shaders/glsl100/fisheye.fs +++ b/docs/examples/web/shaders/resources/shaders/glsl100/fisheye.fs @@ -16,11 +16,11 @@ const float PI = 3.1415926535; void main() { - float aperture = 178.0f; + float aperture = 178.0; float apertureHalf = 0.5 * aperture * (PI / 180.0); float maxFactor = sin(apertureHalf); - vec2 uv = vec2(0); + vec2 uv = vec2(0.0); vec2 xy = 2.0 * fragTexCoord.xy - 1.0; float d = length(xy); diff --git a/shaders/glsl100/pixel.fs b/docs/examples/web/shaders/resources/shaders/glsl100/pixelizer.fs similarity index 82% rename from shaders/glsl100/pixel.fs rename to docs/examples/web/shaders/resources/shaders/glsl100/pixelizer.fs index 41ba3ed62..44fb0ca20 100644 --- a/shaders/glsl100/pixel.fs +++ b/docs/examples/web/shaders/resources/shaders/glsl100/pixelizer.fs @@ -13,11 +13,11 @@ uniform vec4 colDiffuse; // NOTE: Add here your custom variables // NOTE: Render size values must be passed from code -const float renderWidth = 800; -const float renderHeight = 450; +const float renderWidth = 800.0; +const float renderHeight = 450.0; -uniform float pixelWidth = 5.0f; -uniform float pixelHeight = 5.0f; +float pixelWidth = 5.0; +float pixelHeight = 5.0; void main() { diff --git a/shaders/glsl100/posterization.fs b/docs/examples/web/shaders/resources/shaders/glsl100/posterization.fs similarity index 100% rename from shaders/glsl100/posterization.fs rename to docs/examples/web/shaders/resources/shaders/glsl100/posterization.fs diff --git a/shaders/glsl100/predator.fs b/docs/examples/web/shaders/resources/shaders/glsl100/predator.fs similarity index 77% rename from shaders/glsl100/predator.fs rename to docs/examples/web/shaders/resources/shaders/glsl100/predator.fs index efa7fe79b..37dc0bdf7 100644 --- a/shaders/glsl100/predator.fs +++ b/docs/examples/web/shaders/resources/shaders/glsl100/predator.fs @@ -13,7 +13,7 @@ uniform vec4 colDiffuse; // NOTE: Add here your custom variables void main() -{ +{ vec3 color = texture2D(texture0, fragTexCoord).rgb; vec3 colors[3]; colors[0] = vec3(0.0, 0.0, 1.0); @@ -21,10 +21,11 @@ void main() colors[2] = vec3(1.0, 0.0, 0.0); float lum = (color.r + color.g + color.b)/3.0; + + vec3 tc = vec3(0.0, 0.0, 0.0); - int ix = (lum < 0.5)? 0:1; - - vec3 tc = mix(colors[ix], colors[ix+1], (lum-float(ix)*0.5)/0.5); - + if (lum < 0.5) tc = mix(colors[0], colors[1], lum/0.5); + else tc = mix(colors[1], colors[2], (lum - 0.5)/0.5); + gl_FragColor = vec4(tc, 1.0); } \ No newline at end of file diff --git a/shaders/glsl100/scanlines.fs b/docs/examples/web/shaders/resources/shaders/glsl100/scanlines.fs similarity index 89% rename from shaders/glsl100/scanlines.fs rename to docs/examples/web/shaders/resources/shaders/glsl100/scanlines.fs index 529120d00..ce649e1a0 100644 --- a/shaders/glsl100/scanlines.fs +++ b/docs/examples/web/shaders/resources/shaders/glsl100/scanlines.fs @@ -12,8 +12,8 @@ uniform vec4 colDiffuse; // NOTE: Add here your custom variables -float offset = 0; -float frequency = 720/3.0; +float offset = 0.0; +float frequency = 450.0/3.0; uniform float time; @@ -40,5 +40,5 @@ void main() vec4 color = texture2D(texture0, fragTexCoord); - gl_FragColor = mix(vec4(0, 0.3, 0, 0), color, wavePos); + gl_FragColor = mix(vec4(0.0, 0.3, 0.0, 0.0), color, wavePos); } \ No newline at end of file diff --git a/docs/examples/web/shaders/resources/shaders/glsl100/sobel.fs b/docs/examples/web/shaders/resources/shaders/glsl100/sobel.fs new file mode 100644 index 000000000..745562ad0 --- /dev/null +++ b/docs/examples/web/shaders/resources/shaders/glsl100/sobel.fs @@ -0,0 +1,40 @@ +#version 100 + +precision mediump float; + +// Input vertex attributes (from vertex shader) +varying vec2 fragTexCoord; +varying vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// NOTE: Add here your custom variables +vec2 resolution = vec2(800.0, 450.0); + +void main() +{ + float x = 1.0/resolution.x; + float y = 1.0/resolution.y; + + vec4 horizEdge = vec4(0.0); + horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y - y))*1.0; + horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y ))*2.0; + horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y + y))*1.0; + horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y - y))*1.0; + horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y ))*2.0; + horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y + y))*1.0; + + vec4 vertEdge = vec4(0.0); + vertEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y - y))*1.0; + vertEdge -= texture2D(texture0, vec2(fragTexCoord.x , fragTexCoord.y - y))*2.0; + vertEdge -= texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y - y))*1.0; + vertEdge += texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y + y))*1.0; + vertEdge += texture2D(texture0, vec2(fragTexCoord.x , fragTexCoord.y + y))*2.0; + vertEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y + y))*1.0; + + vec3 edge = sqrt((horizEdge.rgb*horizEdge.rgb) + (vertEdge.rgb*vertEdge.rgb)); + + gl_FragColor = vec4(edge, texture2D(texture0, fragTexCoord).a); +} \ No newline at end of file diff --git a/docs/examples/web/shaders/resources/shaders/glsl100/swirl.fs b/docs/examples/web/shaders/resources/shaders/glsl100/swirl.fs index ca7668b29..b969aab70 100644 --- a/docs/examples/web/shaders/resources/shaders/glsl100/swirl.fs +++ b/docs/examples/web/shaders/resources/shaders/glsl100/swirl.fs @@ -12,8 +12,9 @@ uniform vec4 colDiffuse; // NOTE: Add here your custom variables -const float renderWidth = 800.0; // HARDCODED for example! -const float renderHeight = 480.0; // Use uniforms instead... +// NOTE: Render size values should be passed from code +const float renderWidth = 800; +const float renderHeight = 450; float radius = 250.0; float angle = 0.8; diff --git a/docs/examples/web/shaders/resources/shaders/glsl330/base.vs b/docs/examples/web/shaders/resources/shaders/glsl330/base.vs deleted file mode 100644 index 638cb8aee..000000000 --- a/docs/examples/web/shaders/resources/shaders/glsl330/base.vs +++ /dev/null @@ -1,26 +0,0 @@ -#version 330 - -// Input vertex attributes -in vec3 vertexPosition; -in vec2 vertexTexCoord; -in vec3 vertexNormal; -in vec4 vertexColor; - -// Input uniform values -uniform mat4 mvpMatrix; - -// Output vertex attributes (to fragment shader) -out vec2 fragTexCoord; -out vec4 fragColor; - -// NOTE: Add here your custom variables - -void main() -{ - // Send vertex attributes to fragment shader - fragTexCoord = vertexTexCoord; - fragColor = vertexColor; - - // Calculate final vertex position - gl_Position = mvpMatrix*vec4(vertexPosition, 1.0); -} \ No newline at end of file diff --git a/docs/examples/web/shaders/resources/shaders/glsl330/bloom.fs b/docs/examples/web/shaders/resources/shaders/glsl330/bloom.fs deleted file mode 100644 index 333d5b059..000000000 --- a/docs/examples/web/shaders/resources/shaders/glsl330/bloom.fs +++ /dev/null @@ -1,40 +0,0 @@ -#version 330 - -// Input vertex attributes (from vertex shader) -in vec2 fragTexCoord; -in vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// Output fragment color -out vec4 finalColor; - -// NOTE: Add here your custom variables - -const vec2 size = vec2(800, 450); // render size -const float samples = 5.0; // pixels per axis; higher = bigger glow, worse performance -const float quality = 2.5; // lower = smaller glow, better quality - -void main() -{ - vec4 sum = vec4(0); - vec2 sizeFactor = vec2(1)/size*quality; - - // Texel color fetching from texture sampler - vec4 source = texture(texture0, fragTexCoord); - - const int range = 2; // should be = (samples - 1)/2; - - for (int x = -range; x <= range; x++) - { - for (int y = -range; y <= range; y++) - { - sum += texture(texture0, fragTexCoord + vec2(x, y)*sizeFactor); - } - } - - // Calculate final fragment color - finalColor = ((sum/(samples*samples)) + source)*colDiffuse; -} \ No newline at end of file diff --git a/docs/examples/web/shaders/resources/shaders/glsl330/depth.fs b/docs/examples/web/shaders/resources/shaders/glsl330/depth.fs deleted file mode 100644 index 06d399f9f..000000000 --- a/docs/examples/web/shaders/resources/shaders/glsl330/depth.fs +++ /dev/null @@ -1,27 +0,0 @@ -#version 330 - -// Input vertex attributes (from vertex shader) -in vec2 fragTexCoord; -in vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; // Depth texture -uniform vec4 fragTintColor; - -// Output fragment color -out vec4 finalColor; - -// NOTE: Add here your custom variables - -void main() -{ - float zNear = 0.01; // camera z near - float zFar = 10.0; // camera z far - float z = texture(texture0, fragTexCoord).x; - - // Linearize depth value - float depth = (2.0*zNear)/(zFar + zNear - z*(zFar - zNear)); - - // Calculate final fragment color - finalColor = vec4(depth, depth, depth, 1.0f); -} \ No newline at end of file diff --git a/docs/examples/web/shaders/resources/shaders/glsl330/distortion.fs b/docs/examples/web/shaders/resources/shaders/glsl330/distortion.fs deleted file mode 100644 index cb4be8fc3..000000000 --- a/docs/examples/web/shaders/resources/shaders/glsl330/distortion.fs +++ /dev/null @@ -1,56 +0,0 @@ -#version 330 - -// Input vertex attributes (from vertex shader) -in vec2 fragTexCoord; - -// Input uniform values -uniform sampler2D texture0; - -// Output fragment color -out vec4 finalColor; - -// NOTE: Default parameters for Oculus Rift DK2 device -const vec2 LeftLensCenter = vec2(0.2863248, 0.5); -const vec2 RightLensCenter = vec2(0.7136753, 0.5); -const vec2 LeftScreenCenter = vec2(0.25, 0.5); -const vec2 RightScreenCenter = vec2(0.75, 0.5); -const vec2 Scale = vec2(0.25, 0.45); -const vec2 ScaleIn = vec2(4.0, 2.5); -const vec4 HmdWarpParam = vec4(1.0, 0.22, 0.24, 0.0); -const vec4 ChromaAbParam = vec4(0.996, -0.004, 1.014, 0.0); - -void main() -{ - // The following two variables need to be set per eye - vec2 LensCenter = fragTexCoord.x < 0.5 ? LeftLensCenter : RightLensCenter; - vec2 ScreenCenter = fragTexCoord.x < 0.5 ? LeftScreenCenter : RightScreenCenter; - - // Scales input texture coordinates for distortion: vec2 HmdWarp(vec2 fragTexCoord, vec2 LensCenter) - vec2 theta = (fragTexCoord - LensCenter)*ScaleIn; // Scales to [-1, 1] - float rSq = theta.x*theta.x + theta.y*theta.y; - vec2 theta1 = theta*(HmdWarpParam.x + HmdWarpParam.y*rSq + HmdWarpParam.z*rSq*rSq + HmdWarpParam.w*rSq*rSq*rSq); - //vec2 tc = LensCenter + Scale*theta1; - - // Detect whether blue texture coordinates are out of range since these will scaled out the furthest - vec2 thetaBlue = theta1*(ChromaAbParam.z + ChromaAbParam.w*rSq); - vec2 tcBlue = LensCenter + Scale*thetaBlue; - - if (any(bvec2(clamp(tcBlue, ScreenCenter - vec2(0.25, 0.5), ScreenCenter + vec2(0.25, 0.5)) - tcBlue))) finalColor = vec4(0.0, 0.0, 0.0, 1.0); - else - { - // Do blue texture lookup - float blue = texture(texture0, tcBlue).b; - - // Do green lookup (no scaling) - vec2 tcGreen = LensCenter + Scale*theta1; - float green = texture(texture0, tcGreen).g; - - // Do red scale and lookup - vec2 thetaRed = theta1*(ChromaAbParam.x + ChromaAbParam.y*rSq); - vec2 tcRed = LensCenter + Scale*thetaRed; - float red = texture(texture0, tcRed).r; - - finalColor = vec4(red, green, blue, 1.0); - } -} - diff --git a/docs/examples/web/shaders/resources/shaders/glsl330/grayscale.fs b/docs/examples/web/shaders/resources/shaders/glsl330/grayscale.fs deleted file mode 100644 index 5b3e11be6..000000000 --- a/docs/examples/web/shaders/resources/shaders/glsl330/grayscale.fs +++ /dev/null @@ -1,26 +0,0 @@ -#version 330 - -// Input vertex attributes (from vertex shader) -in vec2 fragTexCoord; -in vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// Output fragment color -out vec4 finalColor; - -// NOTE: Add here your custom variables - -void main() -{ - // Texel color fetching from texture sampler - vec4 texelColor = texture(texture0, fragTexCoord)*colDiffuse*fragColor; - - // Convert texel color to grayscale using NTSC conversion weights - float gray = dot(texelColor.rgb, vec3(0.299, 0.587, 0.114)); - - // Calculate final fragment color - finalColor = vec4(gray, gray, gray, texelColor.a); -} \ No newline at end of file diff --git a/docs/examples/web/shaders/resources/shaders/glsl330/swirl.fs b/docs/examples/web/shaders/resources/shaders/glsl330/swirl.fs deleted file mode 100644 index 5d238ac93..000000000 --- a/docs/examples/web/shaders/resources/shaders/glsl330/swirl.fs +++ /dev/null @@ -1,46 +0,0 @@ -#version 330 - -// Input vertex attributes (from vertex shader) -in vec2 fragTexCoord; -in vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// Output fragment color -out vec4 finalColor; - -// NOTE: Add here your custom variables - -const float renderWidth = 800.0; // HARDCODED for example! -const float renderHeight = 480.0; // Use uniforms instead... - -float radius = 250.0; -float angle = 0.8; - -uniform vec2 center = vec2(200.0, 200.0); - -void main() -{ - vec2 texSize = vec2(renderWidth, renderHeight); - vec2 tc = fragTexCoord*texSize; - tc -= center; - - float dist = length(tc); - - if (dist < radius) - { - float percent = (radius - dist)/radius; - float theta = percent*percent*angle*8.0; - float s = sin(theta); - float c = cos(theta); - - tc = vec2(dot(tc, vec2(c, -s)), dot(tc, vec2(s, c))); - } - - tc += center; - vec4 color = texture2D(texture0, tc/texSize)*colDiffuse*fragColor;; - - finalColor = vec4(color.rgb, 1.0);; -} \ No newline at end of file diff --git a/docs/examples/web/shaders/shaders_postprocessing.c b/docs/examples/web/shaders/shaders_postprocessing.c index f7a78b016..bf65be937 100644 --- a/docs/examples/web/shaders/shaders_postprocessing.c +++ b/docs/examples/web/shaders/shaders_postprocessing.c @@ -22,6 +22,48 @@ #include #endif +#if defined(PLATFORM_DESKTOP) + #define GLSL_VERSION 330 + #define DEFAULT_VERTEX_SHADER "resources/shaders/glsl330/base.vs" +#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB + #define GLSL_VERSION 100 + #define DEFAULT_VERTEX_SHADER "resources/shaders/glsl100/base.vs" +#endif + +#define MAX_POSTPRO_SHADERS 12 + +typedef enum { + FX_GRAYSCALE = 0, + FX_POSTERIZATION, + FX_DREAM_VISION, + FX_PIXELIZER, + FX_CROSS_HATCHING, + FX_CROSS_STITCHING, + FX_PREDATOR_VIEW, + FX_SCANLINES, + FX_FISHEYE, + FX_SOBEL, + FX_BLOOM, + FX_BLUR, + //FX_FXAA +} PostproShader; + +static const char *postproShaderText[] = { + "GRAYSCALE", + "POSTERIZATION", + "DREAM_VISION", + "PIXELIZER", + "CROSS_HATCHING", + "CROSS_STITCHING", + "PREDATOR_VIEW", + "SCANLINES", + "FISHEYE", + "SOBEL", + "BLOOM", + "BLUR", + //"FXAA" +}; + //---------------------------------------------------------------------------------- // Global Variables Definition //---------------------------------------------------------------------------------- @@ -33,9 +75,11 @@ Camera camera = {{ 3.0f, 3.0f, 3.0f }, { 0.0f, 1.5f, 0.0f }, { 0.0f, 1.0f, 0.0f Model dwarf; // OBJ model Texture2D texture; // Model texture -Shader shader; // Postpro shader -Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position +Shader shaders[MAX_POSTPRO_SHADERS]; // Postpro shaders +int currentShader = FX_GRAYSCALE; // Current shader selected + +Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position RenderTexture2D target; @@ -58,8 +102,21 @@ int main() texture = LoadTexture("resources/model/dwarf_diffuse.png"); // Load model texture dwarf.material.texDiffuse = texture; // Set dwarf model diffuse texture - shader = LoadShader("resources/shaders/glsl100/base.vs", - "resources/shaders/glsl100/bloom.fs"); // Load postpro shader + // Load all postpro shaders + // NOTE 1: All postpro shader use the base vertex shader (DEFAULT_VERTEX_SHADER) + // NOTE 2: We load the correct shader depending on GLSL version + shaders[FX_GRAYSCALE] = LoadShader(DEFAULT_VERTEX_SHADER, FormatText("resources/shaders/glsl%i/grayscale.fs", GLSL_VERSION)); + shaders[FX_POSTERIZATION] = LoadShader(DEFAULT_VERTEX_SHADER, FormatText("resources/shaders/glsl%i/posterization.fs", GLSL_VERSION)); + shaders[FX_DREAM_VISION] = LoadShader(DEFAULT_VERTEX_SHADER, FormatText("resources/shaders/glsl%i/dream_vision.fs", GLSL_VERSION)); + shaders[FX_PIXELIZER] = LoadShader(DEFAULT_VERTEX_SHADER, FormatText("resources/shaders/glsl%i/pixelizer.fs", GLSL_VERSION)); + shaders[FX_CROSS_HATCHING] = LoadShader(DEFAULT_VERTEX_SHADER, FormatText("resources/shaders/glsl%i/cross_hatching.fs", GLSL_VERSION)); + shaders[FX_CROSS_STITCHING] = LoadShader(DEFAULT_VERTEX_SHADER, FormatText("resources/shaders/glsl%i/cross_stitching.fs", GLSL_VERSION)); + shaders[FX_PREDATOR_VIEW] = LoadShader(DEFAULT_VERTEX_SHADER, FormatText("resources/shaders/glsl%i/predator.fs", GLSL_VERSION)); + shaders[FX_SCANLINES] = LoadShader(DEFAULT_VERTEX_SHADER, FormatText("resources/shaders/glsl%i/scanlines.fs", GLSL_VERSION)); + shaders[FX_FISHEYE] = LoadShader(DEFAULT_VERTEX_SHADER, FormatText("resources/shaders/glsl%i/fisheye.fs", GLSL_VERSION)); + shaders[FX_SOBEL] = LoadShader(DEFAULT_VERTEX_SHADER, FormatText("resources/shaders/glsl%i/sobel.fs", GLSL_VERSION)); + shaders[FX_BLOOM] = LoadShader(DEFAULT_VERTEX_SHADER, FormatText("resources/shaders/glsl%i/bloom.fs", GLSL_VERSION)); + shaders[FX_BLUR] = LoadShader(DEFAULT_VERTEX_SHADER, FormatText("resources/shaders/glsl%i/blur.fs", GLSL_VERSION)); // Create a RenderTexture2D to be used for render to texture target = LoadRenderTexture(screenWidth, screenHeight); @@ -82,7 +139,10 @@ int main() // De-Initialization //-------------------------------------------------------------------------------------- - UnloadShader(shader); // Unload shader + + // Unload all postpro shaders + for (int i = 0; i < MAX_POSTPRO_SHADERS; i++) UnloadShader(shaders[i]); + UnloadTexture(texture); // Unload texture UnloadModel(dwarf); // Unload model @@ -100,6 +160,12 @@ void UpdateDrawFrame(void) // Update //---------------------------------------------------------------------------------- UpdateCamera(&camera); // Update internal camera and our camera + + if (IsKeyPressed(KEY_RIGHT)) currentShader++; + else if (IsKeyPressed(KEY_LEFT)) currentShader--; + + if (currentShader >= MAX_POSTPRO_SHADERS) currentShader = 0; + else if (currentShader < 0) currentShader = MAX_POSTPRO_SHADERS - 1; //---------------------------------------------------------------------------------- // Draw @@ -117,21 +183,26 @@ void UpdateDrawFrame(void) DrawGrid(10, 1.0f); // Draw a grid End3dMode(); - - DrawText("HELLO POSTPROCESSING!", 70, 190, 50, RED); EndTextureMode(); // End drawing to texture (now we have a texture available for next passes) - BeginShaderMode(shader); + // Render previously generated texture using selected postpro shader + BeginShaderMode(shaders[currentShader]); // NOTE: Render texture must be y-flipped due to default OpenGL coordinates (left-bottom) DrawTextureRec(target.texture, (Rectangle){ 0, 0, target.texture.width, -target.texture.height }, (Vector2){ 0, 0 }, WHITE); EndShaderMode(); + DrawRectangle(0, 9, 580, 30, Fade(LIGHTGRAY, 0.7f)); + DrawText("(c) Dwarf 3D model by David Moreno", screenWidth - 200, screenHeight - 20, 10, DARKGRAY); - - DrawFPS(10, 10); + + DrawText("CURRENT POSTPRO SHADER:", 10, 15, 20, BLACK); + DrawText(postproShaderText[currentShader], 330, 15, 20, RED); + DrawText("< >", 540, 10, 30, DARKBLUE); + + DrawFPS(700, 15); EndDrawing(); //---------------------------------------------------------------------------------- diff --git a/docs/examples/web/shaders/shaders_postprocessing.data b/docs/examples/web/shaders/shaders_postprocessing.data index f6f6502dd..a0ed44767 100644 --- a/docs/examples/web/shaders/shaders_postprocessing.data +++ b/docs/examples/web/shaders/shaders_postprocessing.data @@ -60389,6 +60389,29 @@ _ 3  VZ_|F^ "G|: +%2?`XVW;.x|* R׊Վ`0,NO:C>! `W `WX`!`0  `0X0 ``0 `0  `0X0 ``0 `0  `0X0 ``0 `0)S/{uIENDB`#version 100 +precision mediump float; + +// Input vertex attributes (from vertex shader) +varying vec2 fragTexCoord; +varying vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// NOTE: Add here your custom variables +uniform vec2 resolution = vec2(800, 450); + +void main() +{ + // Texel color fetching from texture sampler + vec4 texelColor = texture2D(texture0, fragTexCoord); + + // NOTE: Implement here your fragment shader code + + gl_FragColor = texelColor*colDiffuse; +}#version 100 + // Input vertex attributes attribute vec3 vertexPosition; attribute vec2 vertexTexCoord; @@ -60450,4 +60473,511 @@ void main() // Calculate final fragment color gl_FragColor = ((sum/(samples*samples)) + source)*colDiffuse; +}#version 100 + +precision mediump float; + +// Input vertex attributes (from vertex shader) +varying vec2 fragTexCoord; +varying vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// NOTE: Add here your custom variables + +// NOTE: Render size values must be passed from code +const float renderWidth = 800.0; +const float renderHeight = 450.0; + +vec3 offset = vec3(0.0, 1.3846153846, 3.2307692308); +vec3 weight = vec3(0.2270270270, 0.3162162162, 0.0702702703); + +void main() +{ + // Texel color fetching from texture sampler + vec3 tc = texture2D(texture0, fragTexCoord).rgb*weight.x; + + tc += texture2D(texture0, fragTexCoord + vec2(offset.y)/renderWidth, 0.0).rgb*weight.y; + tc += texture2D(texture0, fragTexCoord - vec2(offset.y)/renderWidth, 0.0).rgb*weight.y; + + tc += texture2D(texture0, fragTexCoord + vec2(offset.z)/renderWidth, 0.0).rgb*weight.z; + tc += texture2D(texture0, fragTexCoord - vec2(offset.z)/renderWidth, 0.0).rgb*weight.z; + + gl_FragColor = vec4(tc, 1.0); +}# version 100 + +precision mediump float; + +// Input vertex attributes (from vertex shader) +varying vec2 fragTexCoord; +varying vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// NOTE: Add here your custom variables + +float hatchOffsetY = 5.0; +float lumThreshold01 = 0.9; +float lumThreshold02 = 0.7; +float lumThreshold03 = 0.5; +float lumThreshold04 = 0.3; + +void main() +{ + vec3 tc = vec3(1.0, 1.0, 1.0); + float lum = length(texture2D(texture0, fragTexCoord).rgb); + + if (lum < lumThreshold01) + { + if (mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0); + } + + if (lum < lumThreshold02) + { + if (mod(gl_FragCoord .x - gl_FragCoord .y, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0); + } + + if (lum < lumThreshold03) + { + if (mod(gl_FragCoord .x + gl_FragCoord .y - hatchOffsetY, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0); + } + + if (lum < lumThreshold04) + { + if (mod(gl_FragCoord .x - gl_FragCoord .y - hatchOffsetY, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0); + } + + gl_FragColor = vec4(tc, 1.0); +}# version 100 + +precision mediump float; + +// Input vertex attributes (from vertex shader) +varying vec2 fragTexCoord; +varying vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// NOTE: Add here your custom variables + +// NOTE: Render size values must be passed from code +const float renderWidth = 800.0; +const float renderHeight = 450.0; + +float stitchingSize = 6.0; +int invert = 0; + +vec4 PostFX(sampler2D tex, vec2 uv) +{ + vec4 c = vec4(0.0); + float size = stitchingSize; + vec2 cPos = uv * vec2(renderWidth, renderHeight); + vec2 tlPos = floor(cPos / vec2(size, size)); + tlPos *= size; + + int remX = int(mod(cPos.x, size)); + int remY = int(mod(cPos.y, size)); + + if (remX == 0 && remY == 0) tlPos = cPos; + + vec2 blPos = tlPos; + blPos.y += (size - 1.0); + + if ((remX == remY) || (((int(cPos.x) - int(blPos.x)) == (int(blPos.y) - int(cPos.y))))) + { + if (invert == 1) c = vec4(0.2, 0.15, 0.05, 1.0); + else c = texture2D(tex, tlPos * vec2(1.0/renderWidth, 1.0/renderHeight)) * 1.4; + } + else + { + if (invert == 1) c = texture2D(tex, tlPos * vec2(1.0/renderWidth, 1.0/renderHeight)) * 1.4; + else c = vec4(0.0, 0.0, 0.0, 1.0); + } + + return c; +} + +void main() +{ + vec3 tc = PostFX(texture0, fragTexCoord).rgb; + + gl_FragColor = vec4(tc, 1.0); +}#version 100 + +precision mediump float; + +// Input vertex attributes (from vertex shader) +varying vec2 fragTexCoord; + +// Input uniform values +uniform sampler2D texture0; + +// NOTE: Default parameters for Oculus Rift DK2 device +const vec2 LeftLensCenter = vec2(0.2863248, 0.5); +const vec2 RightLensCenter = vec2(0.7136753, 0.5); +const vec2 LeftScreenCenter = vec2(0.25, 0.5); +const vec2 RightScreenCenter = vec2(0.75, 0.5); +const vec2 Scale = vec2(0.25, 0.45); +const vec2 ScaleIn = vec2(4.0, 2.5); +const vec4 HmdWarpParam = vec4(1.0, 0.22, 0.24, 0.0); +const vec4 ChromaAbParam = vec4(0.996, -0.004, 1.014, 0.0); + +void main() +{ + // The following two variables need to be set per eye + vec2 LensCenter = fragTexCoord.x < 0.5 ? LeftLensCenter : RightLensCenter; + vec2 ScreenCenter = fragTexCoord.x < 0.5 ? LeftScreenCenter : RightScreenCenter; + + // Scales input texture coordinates for distortion: vec2 HmdWarp(vec2 fragTexCoord, vec2 LensCenter) + vec2 theta = (fragTexCoord - LensCenter)*ScaleIn; // Scales to [-1, 1] + float rSq = theta.x*theta.x + theta.y*theta.y; + vec2 theta1 = theta*(HmdWarpParam.x + HmdWarpParam.y*rSq + HmdWarpParam.z*rSq*rSq + HmdWarpParam.w*rSq*rSq*rSq); + //vec2 tc = LensCenter + Scale*theta1; + + // Detect whether blue texture coordinates are out of range since these will scaled out the furthest + vec2 thetaBlue = theta1*(ChromaAbParam.z + ChromaAbParam.w*rSq); + vec2 tcBlue = LensCenter + Scale*thetaBlue; + + if (any(bvec2(clamp(tcBlue, ScreenCenter - vec2(0.25, 0.5), ScreenCenter + vec2(0.25, 0.5)) - tcBlue))) gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0); + else + { + // Do blue texture lookup + float blue = texture2D(texture0, tcBlue).b; + + // Do green lookup (no scaling) + vec2 tcGreen = LensCenter + Scale*theta1; + float green = texture2D(texture0, tcGreen).g; + + // Do red scale and lookup + vec2 thetaRed = theta1*(ChromaAbParam.x + ChromaAbParam.y*rSq); + vec2 tcRed = LensCenter + Scale*thetaRed; + float red = texture2D(texture0, tcRed).r; + + gl_FragColor = vec4(red, green, blue, 1.0); + } +} +#version 100 + +precision mediump float; + +// Input vertex attributes (from vertex shader) +varying vec2 fragTexCoord; +varying vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// NOTE: Add here your custom variables + +void main() +{ + vec4 color = texture2D(texture0, fragTexCoord); + + color += texture2D(texture0, fragTexCoord + 0.001); + color += texture2D(texture0, fragTexCoord + 0.003); + color += texture2D(texture0, fragTexCoord + 0.005); + color += texture2D(texture0, fragTexCoord + 0.007); + color += texture2D(texture0, fragTexCoord + 0.009); + color += texture2D(texture0, fragTexCoord + 0.011); + + color += texture2D(texture0, fragTexCoord - 0.001); + color += texture2D(texture0, fragTexCoord - 0.003); + color += texture2D(texture0, fragTexCoord - 0.005); + color += texture2D(texture0, fragTexCoord - 0.007); + color += texture2D(texture0, fragTexCoord - 0.009); + color += texture2D(texture0, fragTexCoord - 0.011); + + color.rgb = vec3((color.r + color.g + color.b)/3.0); + color = color/9.5; + + gl_FragColor = color; +} #version 100 + +precision mediump float; + +// Input vertex attributes (from vertex shader) +varying vec2 fragTexCoord; +varying vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// NOTE: Add here your custom variables + +const float PI = 3.1415926535; + +void main() +{ + float aperture = 178.0; + float apertureHalf = 0.5 * aperture * (PI / 180.0); + float maxFactor = sin(apertureHalf); + + vec2 uv = vec2(0.0); + vec2 xy = 2.0 * fragTexCoord.xy - 1.0; + float d = length(xy); + + if (d < (2.0 - maxFactor)) + { + d = length(xy * maxFactor); + float z = sqrt(1.0 - d * d); + float r = atan(d, z) / PI; + float phi = atan(xy.y, xy.x); + + uv.x = r * cos(phi) + 0.5; + uv.y = r * sin(phi) + 0.5; + } + else + { + uv = fragTexCoord.xy; + } + + gl_FragColor = texture2D(texture0, uv); +}#version 100 + +precision mediump float; + +// Input vertex attributes (from vertex shader) +varying vec2 fragTexCoord; +varying vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// NOTE: Add here your custom variables + +void main() +{ + // Texel color fetching from texture sampler + vec4 texelColor = texture2D(texture0, fragTexCoord)*colDiffuse*fragColor; + + // Convert texel color to grayscale using NTSC conversion weights + float gray = dot(texelColor.rgb, vec3(0.299, 0.587, 0.114)); + + // Calculate final fragment color + gl_FragColor = vec4(gray, gray, gray, texelColor.a); +}#version 100 + +precision mediump float; + +// Input vertex attributes (from vertex shader) +varying vec2 fragTexCoord; +varying vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// NOTE: Add here your custom variables + +// NOTE: Render size values must be passed from code +const float renderWidth = 800.0; +const float renderHeight = 450.0; + +const float pixelWidth = 5.0; +const float pixelHeight = 5.0; + +void main() +{ + float dx = pixelWidth*(1.0/renderWidth); + float dy = pixelHeight*(1.0/renderHeight); + + vec2 coord = vec2(dx*floor(fragTexCoord.x/dx), dy*floor(fragTexCoord.y/dy)); + + vec3 tc = texture2D(texture0, coord).rgb; + + gl_FragColor = vec4(tc, 1.0); +}#version 100 + +precision mediump float; + +// Input vertex attributes (from vertex shader) +varying vec2 fragTexCoord; +varying vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// NOTE: Add here your custom variables + +float gamma = 0.6; +float numColors = 8.0; + +void main() +{ + vec3 color = texture2D(texture0, fragTexCoord.xy).rgb; + + color = pow(color, vec3(gamma, gamma, gamma)); + color = color*numColors; + color = floor(color); + color = color/numColors; + color = pow(color, vec3(1.0/gamma)); + + gl_FragColor = vec4(color, 1.0); +}#version 100 + +precision mediump float; + +// Input vertex attributes (from vertex shader) +varying vec2 fragTexCoord; +varying vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// NOTE: Add here your custom variables + +void main() +{ + vec3 color = texture2D(texture0, fragTexCoord).rgb; + vec3 colors[3]; + colors[0] = vec3(0.0, 0.0, 1.0); + colors[1] = vec3(1.0, 1.0, 0.0); + colors[2] = vec3(1.0, 0.0, 0.0); + + float lum = (color.r + color.g + color.b)/3.0; + + vec3 tc = vec3(0.0, 0.0, 0.0); + + if (lum < 0.5) tc = mix(colors[0], colors[1], lum/0.5); + else tc = mix(colors[1], colors[2], (lum - 0.5)/0.5); + + gl_FragColor = vec4(tc, 1.0); +}#version 100 + +precision mediump float; + +// Input vertex attributes (from vertex shader) +varying vec2 fragTexCoord; +varying vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// NOTE: Add here your custom variables + +float offset = 0.0; +float frequency = 450.0/3.0; + +uniform float time; + +void main() +{ +/* + // Scanlines method 1 + float tval = 0; //time + vec2 uv = 0.5 + (fragTexCoord - 0.5)*(0.9 + 0.01*sin(0.5*tval)); + + vec4 color = texture2D(texture0, fragTexCoord); + + color = clamp(color*0.5 + 0.5*color*color*1.2, 0.0, 1.0); + color *= 0.5 + 0.5*16.0*uv.x*uv.y*(1.0 - uv.x)*(1.0 - uv.y); + color *= vec4(0.8, 1.0, 0.7, 1); + color *= 0.9 + 0.1*sin(10.0*tval + uv.y*1000.0); + color *= 0.97 + 0.03*sin(110.0*tval); + + fragColor = color; +*/ + // Scanlines method 2 + float globalPos = (fragTexCoord.y + offset) * frequency; + float wavePos = cos((fract(globalPos) - 0.5)*3.14); + + vec4 color = texture2D(texture0, fragTexCoord); + + gl_FragColor = mix(vec4(0.0, 0.3, 0.0, 0.0), color, wavePos); +}#version 100 + +precision mediump float; + +// Input vertex attributes (from vertex shader) +varying vec2 fragTexCoord; +varying vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// NOTE: Add here your custom variables +vec2 resolution = vec2(800.0, 450.0); + +void main() +{ + float x = 1.0/resolution.x; + float y = 1.0/resolution.y; + + vec4 horizEdge = vec4(0.0); + horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y - y))*1.0; + horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y ))*2.0; + horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y + y))*1.0; + horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y - y))*1.0; + horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y ))*2.0; + horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y + y))*1.0; + + vec4 vertEdge = vec4(0.0); + vertEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y - y))*1.0; + vertEdge -= texture2D(texture0, vec2(fragTexCoord.x , fragTexCoord.y - y))*2.0; + vertEdge -= texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y - y))*1.0; + vertEdge += texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y + y))*1.0; + vertEdge += texture2D(texture0, vec2(fragTexCoord.x , fragTexCoord.y + y))*2.0; + vertEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y + y))*1.0; + + vec3 edge = sqrt((horizEdge.rgb*horizEdge.rgb) + (vertEdge.rgb*vertEdge.rgb)); + + gl_FragColor = vec4(edge, texture2D(texture0, fragTexCoord).a); +}#version 100 + +precision mediump float; + +// Input vertex attributes (from vertex shader) +varying vec2 fragTexCoord; +varying vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// NOTE: Add here your custom variables + +// NOTE: Render size values should be passed from code +const float renderWidth = 800; +const float renderHeight = 450; + +float radius = 250.0; +float angle = 0.8; + +uniform vec2 center; + +void main() +{ + vec2 texSize = vec2(renderWidth, renderHeight); + vec2 tc = fragTexCoord*texSize; + tc -= center; + + float dist = length(tc); + + if (dist < radius) + { + float percent = (radius - dist)/radius; + float theta = percent*percent*angle*8.0; + float s = sin(theta); + float c = cos(theta); + + tc = vec2(dot(tc, vec2(c, -s)), dot(tc, vec2(s, c))); + } + + tc += center; + vec4 color = texture2D(texture0, tc/texSize)*colDiffuse*fragColor;; + + gl_FragColor = vec4(color.rgb, 1.0);; } \ No newline at end of file diff --git a/docs/examples/web/shaders/shaders_postprocessing.js b/docs/examples/web/shaders/shaders_postprocessing.js index cb64cef85..d3f6aa847 100644 --- a/docs/examples/web/shaders/shaders_postprocessing.js +++ b/docs/examples/web/shaders/shaders_postprocessing.js @@ -185,7 +185,7 @@ Module['FS_createPath']('/resources/shaders', 'glsl100', true, true); } } - loadPackage({"files": [{"audio": 0, "start": 0, "crunched": 0, "end": 2748249, "filename": "/resources/model/dwarf.obj"}, {"audio": 0, "start": 2748249, "crunched": 0, "end": 4022872, "filename": "/resources/model/dwarf_diffuse.png"}, {"audio": 0, "start": 4022872, "crunched": 0, "end": 4023477, "filename": "/resources/shaders/glsl100/base.vs"}, {"audio": 0, "start": 4023477, "crunched": 0, "end": 4024557, "filename": "/resources/shaders/glsl100/bloom.fs"}], "remote_package_size": 4024557, "package_uuid": "0ca8ae12-1910-4954-a883-a725db607080"}); + loadPackage({"files": [{"audio": 0, "start": 0, "crunched": 0, "end": 2748249, "filename": "/resources/model/dwarf.obj"}, {"audio": 0, "start": 2748249, "crunched": 0, "end": 4022872, "filename": "/resources/model/dwarf_diffuse.png"}, {"audio": 0, "start": 4022872, "crunched": 0, "end": 4023423, "filename": "/resources/shaders/glsl100/base.fs"}, {"audio": 0, "start": 4023423, "crunched": 0, "end": 4024028, "filename": "/resources/shaders/glsl100/base.vs"}, {"audio": 0, "start": 4024028, "crunched": 0, "end": 4025108, "filename": "/resources/shaders/glsl100/bloom.fs"}, {"audio": 0, "start": 4025108, "crunched": 0, "end": 4026178, "filename": "/resources/shaders/glsl100/blur.fs"}, {"audio": 0, "start": 4026178, "crunched": 0, "end": 4027346, "filename": "/resources/shaders/glsl100/cross_hatching.fs"}, {"audio": 0, "start": 4027346, "crunched": 0, "end": 4028771, "filename": "/resources/shaders/glsl100/cross_stitching.fs"}, {"audio": 0, "start": 4028771, "crunched": 0, "end": 4030960, "filename": "/resources/shaders/glsl100/distortion.fs"}, {"audio": 0, "start": 4030960, "crunched": 0, "end": 4032107, "filename": "/resources/shaders/glsl100/dream_vision.fs"}, {"audio": 0, "start": 4032107, "crunched": 0, "end": 4033036, "filename": "/resources/shaders/glsl100/fisheye.fs"}, {"audio": 0, "start": 4033036, "crunched": 0, "end": 4033701, "filename": "/resources/shaders/glsl100/grayscale.fs"}, {"audio": 0, "start": 4033701, "crunched": 0, "end": 4034456, "filename": "/resources/shaders/glsl100/pixelizer.fs"}, {"audio": 0, "start": 4034456, "crunched": 0, "end": 4035085, "filename": "/resources/shaders/glsl100/posterization.fs"}, {"audio": 0, "start": 4035085, "crunched": 0, "end": 4035827, "filename": "/resources/shaders/glsl100/predator.fs"}, {"audio": 0, "start": 4035827, "crunched": 0, "end": 4036947, "filename": "/resources/shaders/glsl100/scanlines.fs"}, {"audio": 0, "start": 4036947, "crunched": 0, "end": 4038590, "filename": "/resources/shaders/glsl100/sobel.fs"}, {"audio": 0, "start": 4038590, "crunched": 0, "end": 4039631, "filename": "/resources/shaders/glsl100/swirl.fs"}], "remote_package_size": 4039631, "package_uuid": "09621c9e-8caf-4662-85f4-3a180518546b"}); })(); @@ -1778,12 +1778,12 @@ function _emscripten_asm_const_iii(code, a0, a1) { STATIC_BASE = 8; -STATICTOP = STATIC_BASE + 24368; +STATICTOP = STATIC_BASE + 25904; /* global initializers */ __ATINIT__.push(); -/* memory initializer */ allocate([32,3,0,0,194,1,0,0,0,0,64,64,0,0,64,64,0,0,64,64,0,0,0,0,0,0,192,63,0,0,0,0,0,0,0,0,0,0,128,63,0,0,0,0,0,0,52,66,255,255,255,255,205,204,236,63,2,0,0,0,86,1,0,0,85,1,0,0,87,0,0,0,83,0,0,0,68,0,0,0,65,0,0,0,69,0,0,0,81,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,0,32,0,0,176,1,0,0,0,0,0,0,0,0,0,32,37,249,142,0,10,2,0,0,128,190,125,95,244,125,31,160,242,43,74,30,9,82,8,0,64,34,65,80,20,4,16,32,32,41,46,18,8,34,8,0,32,34,65,80,20,4,16,32,32,249,16,76,8,250,62,60,16,34,125,222,247,125,16,32,32,161,232,50,8,34,8,0,8,34,5,16,4,69,16,0,240,163,164,50,8,82,8,0,4,34,5,16,4,69,16,32,32,249,226,94,8,2,0,129,2,62,125,31,244,125,16,0,0,32,0,0,176,1,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,190,15,0,192,15,224,247,251,125,126,191,95,232,190,80,0,162,8,8,68,232,47,20,10,133,2,129,80,72,160,80,0,162,40,228,73,40,40,20,10,132,2,129,64,72,160,72,0,190,15,2,16,175,235,247,9,132,62,159,216,79,160,71,0,34,136,228,9,161,42,20,10,132,2,129,80,72,160,72,0,34,40,8,4,160,47,20,10,133,2,129,80,72,162,80,0,190,143,0,0,33,32,244,251,125,126,129,95,232,156,208,7,0,128,0,0,224,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,1,12,0,130,66,191,223,239,247,251,11,5,5,133,66,191,4,72,0,198,66,161,80,40,20,64,8,5,37,133,66,160,8,168,0,170,70,161,80,40,20,64,8,5,37,133,66,144,16,8,0,146,74,161,95,232,247,67,8,5,37,121,126,136,32,8,0,130,82,161,64,40,1,66,8,137,36,133,64,132,64,8,0,130,98,161,64,42,2,66,8,81,36,133,64,130,128,8,0,130,66,191,192,47,244,67,248,33,252,133,126,191,0,9,62,0,0,0,0,4,0,0,0,0,0,0,0,128,1,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,0,4,0,32,72,65,0,0,0,0,0,8,0,0,4,4,0,4,60,32,0,65,0,0,0,0,0,8,0,0,240,125,223,247,133,239,75,81,190,239,251,190,239,59,81,4,0,69,65,20,133,40,74,73,170,40,138,162,32,8,81,4,240,69,65,244,157,40,74,71,170,40,138,162,224,11,81,4,16,69,65,20,132,40,74,73,170,40,138,162,0,10,145,2,240,125,223,247,133,47,74,209,170,232,251,190,224,123,31,1,0,0,0,0,4,8,64,0,0,0,8,32,0,0,0,0,0,0,0,0,132,15,96,0,0,0,8,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,1,15,0,0,0,0,0,0,0,0,0,0,0,0,0,36,1,9,0,0,0,0,0,0,0,0,0,6,0,0,0,36,1,9,0,0,0,0,0,0,0,128,16,9,162,40,250,36,1,9,0,0,0,0,0,0,0,0,62,1,42,37,66,34,82,9,0,0,0,0,0,0,0,128,138,3,42,34,34,36,41,9,0,0,0,0,0,0,0,128,10,1,42,37,18,36,1,9,0,0,0,0,0,0,0,128,10,1,190,232,251,36,1,9,0,0,0,0,0,0,0,128,190,14,0,0,2,172,1,15,0,0,0,0,0,0,0,128,4,0,0,224,3,0,0,0,0,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,0,0,0,14,184,67,132,3,58,32,0,128,160,190,2,32,0,0,240,138,32,82,196,2,43,32,4,34,145,2,248,59,0,240,7,142,56,75,228,2,58,32,2,28,138,30,8,42,233,17,4,224,11,66,244,2,130,36,1,20,4,20,232,186,4,209,5,128,184,195,231,10,58,137,0,28,14,60,40,2,9,80,4,128,0,64,196,2,128,68,0,34,132,32,232,2,0,80,4,0,0,64,128,2,0,32,5,0,142,62,8,2,0,16,4,224,3,64,128,66,0,0,7,0,132,0,248,3,0,240,7,0,0,64,128,34,0,0,4,0,0,0,0,0,0,0,0,0,0,64,128,2,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,7,128,0,194,160,72,24,0,0,1,132,33,9,146,2,66,38,4,1,33,81,0,0,127,63,2,66,2,16,41,0,34,20,192,239,247,251,253,126,9,161,223,239,247,187,187,3,18,15,68,40,20,10,133,66,9,129,64,32,16,16,17,1,8,4,68,40,20,10,133,66,127,129,64,32,16,16,17,1,4,130,199,239,247,251,253,126,9,129,207,231,243,17,17,1,50,169,80,40,20,10,133,66,9,161,64,32,16,16,17,1,64,184,80,40,20,10,133,66,121,191,223,239,247,187,187,3,32,160,31,0,0,0,0,0,0,16,0,0,0,0,0,0,112,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,2,8,131,34,1,0,2,8,67,2,1,0,1,1,124,20,4,132,68,1,0,32,4,132,4,128,8,63,130,0,132,66,191,223,239,247,3,126,161,80,40,20,10,33,0,0,132,70,161,80,40,20,138,82,161,80,40,20,122,161,239,3,158,74,161,80,40,20,82,82,161,80,40,20,74,31,8,2,132,82,161,80,40,20,34,74,161,80,40,244,75,161,239,3,132,98,161,80,40,20,82,74,161,80,40,4,122,161,40,2,124,66,191,223,239,247,139,126,191,223,239,247,11,189,239,3,0,0,0,0,0,0,0,4,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,5,32,0,0,4,132,0,34,129,69,17,16,66,1,0,148,66,81,0,0,8,66,81,148,42,162,32,8,165,80,0,0,0,32,0,0,0,0,0,0,0,5,0,0,0,0,8,190,239,251,254,251,190,239,251,20,145,235,251,190,239,251,0,32,8,130,32,10,162,40,138,20,145,40,138,162,40,138,62,190,239,251,254,11,190,239,251,20,145,40,138,162,40,138,0,162,40,138,34,8,130,32,8,20,145,40,138,162,40,138,8,190,239,251,254,251,190,239,251,20,145,47,250,190,239,251,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,33,0,4,0,0,0,0,0,0,0,0,0,0,0,0,130,80,20,2,20,0,0,0,0,0,0,0,0,0,0,16,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0,190,40,138,162,40,34,0,0,0,0,0,0,0,0,0,0,170,40,138,162,232,34,0,0,0,0,0,0,0,0,0,0,170,40,138,162,168,34,0,0,0,0,0,0,0,0,0,0,170,40,138,162,232,34,0,0,0,0,0,0,0,0,0,0,190,239,251,190,47,62,0,0,0,0,0,0,0,0,0,0,4,0,0,0,40,32,0,0,0,0,0,0,0,0,0,0,0,0,0,128,15,62,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,1,0,0,0,4,0,0,0,6,0,0,0,5,0,0,0,7,0,0,0,6,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,5,0,0,0,5,0,0,0,2,0,0,0,4,0,0,0,1,0,0,0,7,0,0,0,5,0,0,0,2,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,1,0,0,0,1,0,0,0,3,0,0,0,4,0,0,0,3,0,0,0,6,0,0,0,7,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,3,0,0,0,5,0,0,0,6,0,0,0,5,0,0,0,7,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,7,0,0,0,6,0,0,0,7,0,0,0,7,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,2,0,0,0,7,0,0,0,2,0,0,0,3,0,0,0,5,0,0,0,2,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,4,0,0,0,5,0,0,0,5,0,0,0,1,0,0,0,2,0,0,0,5,0,0,0,2,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,4,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,3,0,0,0,1,0,0,0,3,0,0,0,4,0,0,0,4,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,7,0,0,0,1,0,0,0,5,0,0,0,3,0,0,0,7,0,0,0,3,0,0,0,5,0,0,0,4,0,0,0,1,0,0,0,7,0,0,0,4,0,0,0,3,0,0,0,5,0,0,0,3,0,0,0,3,0,0,0,2,0,0,0,5,0,0,0,6,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,5,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,7,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,7,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,5,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,4,0,0,0,6,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,9,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,3,0,0,0,5,0,0,0,255,255,255,255,0,1,0,0,255,255,255,255,0,0,128,191,0,0,0,0,4,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,8,0,0,0,8,0,0,0,4,0,0,0,4,0,0,0,2,0,0,0,2,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,1,0,0,0,8,0,0,0,8,0,0,0,8,0,0,0,4,0,0,0,4,0,0,0,2,0,0,0,2,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,1,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,7,0,0,0,8,0,0,0,9,0,0,0,10,0,0,0,11,0,0,0,13,0,0,0,15,0,0,0,17,0,0,0,19,0,0,0,23,0,0,0,27,0,0,0,31,0,0,0,35,0,0,0,43,0,0,0,51,0,0,0,59,0,0,0,67,0,0,0,83,0,0,0,99,0,0,0,115,0,0,0,131,0,0,0,163,0,0,0,195,0,0,0,227,0,0,0,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,4,0,0,0,4,0,0,0,5,0,0,0,5,0,0,0,6,0,0,0,6,0,0,0,7,0,0,0,7,0,0,0,8,0,0,0,8,0,0,0,9,0,0,0,9,0,0,0,10,0,0,0,10,0,0,0,11,0,0,0,11,0,0,0,12,0,0,0,12,0,0,0,13,0,0,0,13,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,7,0,0,0,9,0,0,0,13,0,0,0,17,0,0,0,25,0,0,0,33,0,0,0,49,0,0,0,65,0,0,0,97,0,0,0,129,0,0,0,193,0,0,0,1,1,0,0,129,1,0,0,1,2,0,0,1,3,0,0,1,4,0,0,1,6,0,0,1,8,0,0,1,12,0,0,1,16,0,0,1,24,0,0,1,32,0,0,1,48,0,0,1,64,0,0,1,96,0,0,0,0,0,0,0,0,0,0,20,0,0,0,2,0,0,192,3,0,0,192,4,0,0,192,5,0,0,192,6,0,0,192,7,0,0,192,8,0,0,192,9,0,0,192,10,0,0,192,11,0,0,192,12,0,0,192,13,0,0,192,14,0,0,192,15,0,0,192,16,0,0,192,17,0,0,192,18,0,0,192,19,0,0,192,20,0,0,192,21,0,0,192,22,0,0,192,23,0,0,192,24,0,0,192,25,0,0,192,26,0,0,192,27,0,0,192,28,0,0,192,29,0,0,192,30,0,0,192,31,0,0,192,0,0,0,179,1,0,0,195,2,0,0,195,3,0,0,195,4,0,0,195,5,0,0,195,6,0,0,195,7,0,0,195,8,0,0,195,9,0,0,195,10,0,0,195,11,0,0,195,12,0,0,195,13,0,0,211,14,0,0,195,15,0,0,195,0,0,12,187,1,0,12,195,2,0,12,195,3,0,12,195,4,0,12,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,83,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,16,0,0,5,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,3,0,0,0,43,91,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,100,0,0,0,232,3,0,0,16,39,0,0,160,134,1,0,64,66,15,0,128,150,152,0,0,225,245,5,95,112,137,0,255,9,47,15,114,97,121,108,105,98,32,91,115,104,97,100,101,114,115,93,32,101,120,97,109,112,108,101,32,45,32,112,111,115,116,112,114,111,99,101,115,115,105,110,103,32,115,104,97,100,101,114,0,114,101,115,111,117,114,99,101,115,47,109,111,100,101,108,47,100,119,97,114,102,46,111,98,106,0,114,101,115,111,117,114,99,101,115,47,109,111,100,101,108,47,100,119,97,114,102,95,100,105,102,102,117,115,101,46,112,110,103,0,114,101,115,111,117,114,99,101,115,47,115,104,97,100,101,114,115,47,103,108,115,108,49,48,48,47,98,97,115,101,46,118,115,0,114,101,115,111,117,114,99,101,115,47,115,104,97,100,101,114,115,47,103,108,115,108,49,48,48,47,98,108,111,111,109,46,102,115,0,72,69,76,76,79,32,80,79,83,84,80,82,79,67,69,83,83,73,78,71,33,0,40,99,41,32,68,119,97,114,102,32,51,68,32,109,111,100,101,108,32,98,121,32,68,97,118,105,100,32,77,111,114,101,110,111,0,73,110,105,116,105,97,108,105,122,105,110,103,32,114,97,121,108,105,98,32,40,118,49,46,55,46,48,41,0,35,99,97,110,118,97,115,0,84,97,114,103,101,116,32,116,105,109,101,32,112,101,114,32,102,114,97,109,101,58,32,37,48,50,46,48,51,102,32,109,105,108,108,105,115,101,99,111,110,100,115,0,69,115,99,97,112,101,0,67,97,110,118,97,115,32,115,99,97,108,101,100,32,116,111,32,102,117,108,108,115,99,114,101,101,110,46,32,69,108,101,109,101,110,116,83,105,122,101,58,32,40,37,105,120,37,105,41,44,32,83,99,114,101,101,110,83,105,122,101,40,37,105,120,37,105,41,0,67,97,110,118,97,115,32,115,99,97,108,101,100,32,116,111,32,119,105,110,100,111,119,101,100,46,32,69,108,101,109,101,110,116,83,105,122,101,58,32,40,37,105,120,37,105,41,44,32,83,99,114,101,101,110,83,105,122,101,40,37,105,120,37,105,41,0,91,84,69,88,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,102,111,110,116,32,108,111,97,100,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,68,88,84,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,32,102,111,114,109,97,116,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,69,84,67,49,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,32,102,111,114,109,97,116,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,69,84,67,50,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,32,102,111,114,109,97,116,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,80,86,82,84,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,32,102,111,114,109,97,116,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,83,84,67,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,32,102,111,114,109,97,116,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,84,101,120,116,117,114,101,32,102,111,114,109,97,116,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,91,84,69,88,32,73,68,32,37,105,93,32,84,101,120,116,117,114,101,32,99,114,101,97,116,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,37,105,120,37,105,41,0,73,109,97,103,101,32,100,97,116,97,32,102,111,114,109,97,116,32,105,115,32,99,111,109,112,114,101,115,115,101,100,44,32,99,97,110,32,110,111,116,32,98,101,32,99,111,110,118,101,114,116,101,100,0,70,111,114,109,97,116,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,102,111,114,32,112,105,120,101,108,32,100,97,116,97,32,114,101,116,114,105,101,118,97,108,0,70,97,105,108,101,100,32,116,111,32,105,110,105,116,105,97,108,105,122,101,32,71,76,70,87,0,84,114,121,105,110,103,32,116,111,32,101,110,97,98,108,101,32,77,83,65,65,32,120,52,0,67,108,111,115,101,115,116,32,102,117,108,108,115,99,114,101,101,110,32,118,105,100,101,111,109,111,100,101,58,32,37,105,32,120,32,37,105,0,71,76,70,87,32,70,97,105,108,101,100,32,116,111,32,105,110,105,116,105,97,108,105,122,101,32,87,105,110,100,111,119,0,68,105,115,112,108,97,121,32,100,101,118,105,99,101,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,82,101,110,100,101,114,32,115,105,122,101,58,32,37,105,32,120,32,37,105,0,83,99,114,101,101,110,32,115,105,122,101,58,32,37,105,32,120,32,37,105,0,86,105,101,119,112,111,114,116,32,111,102,102,115,101,116,115,58,32,37,105,44,32,37,105,0,84,114,121,105,110,103,32,116,111,32,101,110,97,98,108,101,32,86,83,89,78,67,0,71,80,85,58,32,86,101,110,100,111,114,58,32,32,32,37,115,0,71,80,85,58,32,82,101,110,100,101,114,101,114,58,32,37,115,0,71,80,85,58,32,86,101,114,115,105,111,110,58,32,32,37,115,0,71,80,85,58,32,71,76,83,76,58,32,32,32,32,32,37,115,0,32,0,78,117,109,98,101,114,32,111,102,32,115,117,112,112,111,114,116,101,100,32,101,120,116,101,110,115,105,111,110,115,58,32,37,105,0,71,76,95,79,69,83,95,118,101,114,116,101,120,95,97,114,114,97,121,95,111,98,106,101,99,116,0,103,108,71,101,110,86,101,114,116,101,120,65,114,114,97,121,115,79,69,83,0,103,108,66,105,110,100,86,101,114,116,101,120,65,114,114,97,121,79,69,83,0,103,108,68,101,108,101,116,101,86,101,114,116,101,120,65,114,114,97,121,115,79,69,83,0,71,76,95,79,69,83,95,116,101,120,116,117,114,101,95,110,112,111,116,0,71,76,95,69,88,84,95,116,101,120,116,117,114,101,95,99,111,109,112,114,101,115,115,105,111,110,95,115,51,116,99,0,71,76,95,87,69,66,71,76,95,99,111,109,112,114,101,115,115,101,100,95,116,101,120,116,117,114,101,95,115,51,116,99,0,71,76,95,87,69,66,75,73,84,95,87,69,66,71,76,95,99,111,109,112,114,101,115,115,101,100,95,116,101,120,116,117,114,101,95,115,51,116,99,0,71,76,95,79,69,83,95,99,111,109,112,114,101,115,115,101,100,95,69,84,67,49,95,82,71,66,56,95,116,101,120,116,117,114,101,0,71,76,95,87,69,66,71,76,95,99,111,109,112,114,101,115,115,101,100,95,116,101,120,116,117,114,101,95,101,116,99,49,0,71,76,95,65,82,66,95,69,83,51,95,99,111,109,112,97,116,105,98,105,108,105,116,121,0,71,76,95,73,77,71,95,116,101,120,116,117,114,101,95,99,111,109,112,114,101,115,115,105,111,110,95,112,118,114,116,99,0,71,76,95,75,72,82,95,116,101,120,116,117,114,101,95,99,111,109,112,114,101,115,115,105,111,110,95,97,115,116,99,95,104,100,114,0,71,76,95,69,88,84,95,116,101,120,116,117,114,101,95,102,105,108,116,101,114,95,97,110,105,115,111,116,114,111,112,105,99,0,71,76,95,69,88,84,95,116,101,120,116,117,114,101,95,109,105,114,114,111,114,95,99,108,97,109,112,0,91,69,88,84,69,78,83,73,79,78,93,32,86,65,79,32,101,120,116,101,110,115,105,111,110,32,100,101,116,101,99,116,101,100,44,32,86,65,79,32,102,117,110,99,116,105,111,110,115,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,91,69,88,84,69,78,83,73,79,78,93,32,86,65,79,32,101,120,116,101,110,115,105,111,110,32,110,111,116,32,102,111,117,110,100,44,32,86,65,79,32,117,115,97,103,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,91,69,88,84,69,78,83,73,79,78,93,32,78,80,79,84,32,116,101,120,116,117,114,101,115,32,101,120,116,101,110,115,105,111,110,32,100,101,116,101,99,116,101,100,44,32,102,117,108,108,32,78,80,79,84,32,116,101,120,116,117,114,101,115,32,115,117,112,112,111,114,116,101,100,0,91,69,88,84,69,78,83,73,79,78,93,32,78,80,79,84,32,116,101,120,116,117,114,101,115,32,101,120,116,101,110,115,105,111,110,32,110,111,116,32,102,111,117,110,100,44,32,108,105,109,105,116,101,100,32,78,80,79,84,32,115,117,112,112,111,114,116,32,40,110,111,45,109,105,112,109,97,112,115,44,32,110,111,45,114,101,112,101,97,116,41,0,91,69,88,84,69,78,83,73,79,78,93,32,68,88,84,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,115,32,115,117,112,112,111,114,116,101,100,0,91,69,88,84,69,78,83,73,79,78,93,32,69,84,67,49,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,115,32,115,117,112,112,111,114,116,101,100,0,91,69,88,84,69,78,83,73,79,78,93,32,69,84,67,50,47,69,65,67,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,115,32,115,117,112,112,111,114,116,101,100,0,91,69,88,84,69,78,83,73,79,78,93,32,80,86,82,84,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,115,32,115,117,112,112,111,114,116,101,100,0,91,69,88,84,69,78,83,73,79,78,93,32,65,83,84,67,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,115,32,115,117,112,112,111,114,116,101,100,0,91,69,88,84,69,78,83,73,79,78,93,32,65,110,105,115,111,116,114,111,112,105,99,32,116,101,120,116,117,114,101,115,32,102,105,108,116,101,114,105,110,103,32,115,117,112,112,111,114,116,101,100,32,40,109,97,120,58,32,37,46,48,102,88,41,0,91,69,88,84,69,78,83,73,79,78,93,32,67,108,97,109,112,32,109,105,114,114,111,114,32,119,114,97,112,32,116,101,120,116,117,114,101,32,109,111,100,101,32,115,117,112,112,111,114,116,101,100,0,91,84,69,88,32,73,68,32,37,105,93,32,66,97,115,101,32,119,104,105,116,101,32,116,101,120,116,117,114,101,32,108,111,97,100,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,66,97,115,101,32,119,104,105,116,101,32,116,101,120,116,117,114,101,32,99,111,117,108,100,32,110,111,116,32,98,101,32,108,111,97,100,101,100,0,79,112,101,110,71,76,32,100,101,102,97,117,108,116,32,115,116,97,116,101,115,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,91,67,80,85,93,32,68,101,102,97,117,108,116,32,98,117,102,102,101,114,115,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,108,105,110,101,115,44,32,116,114,105,97,110,103,108,101,115,44,32,113,117,97,100,115,41,0,91,86,65,79,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,98,117,102,102,101,114,115,32,86,65,79,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,108,105,110,101,115,41,0,91,86,66,79,32,73,68,32,37,105,93,91,86,66,79,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,98,117,102,102,101,114,115,32,86,66,79,115,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,108,105,110,101,115,41,0,91,86,65,79,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,98,117,102,102,101,114,115,32,86,65,79,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,116,114,105,97,110,103,108,101,115,41,0,91,86,66,79,32,73,68,32,37,105,93,91,86,66,79,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,98,117,102,102,101,114,115,32,86,66,79,115,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,116,114,105,97,110,103,108,101,115,41,0,91,86,65,79,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,98,117,102,102,101,114,115,32,86,65,79,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,113,117,97,100,115,41,0,91,86,66,79,32,73,68,32,37,105,93,91,86,66,79,32,73,68,32,37,105,93,91,86,66,79,32,73,68,32,37,105,93,91,86,66,79,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,98,117,102,102,101,114,115,32,86,66,79,115,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,113,117,97,100,115,41,0,35,118,101,114,115,105,111,110,32,49,48,48,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,97,116,116,114,105,98,117,116,101,32,118,101,99,51,32,118,101,114,116,101,120,80,111,115,105,116,105,111,110,59,32,32,32,32,32,10,97,116,116,114,105,98,117,116,101,32,118,101,99,50,32,118,101,114,116,101,120,84,101,120,67,111,111,114,100,59,32,32,32,32,32,10,97,116,116,114,105,98,117,116,101,32,118,101,99,52,32,118,101,114,116,101,120,67,111,108,111,114,59,32,32,32,32,32,32,32,32,10,118,97,114,121,105,110,103,32,118,101,99,50,32,102,114,97,103,84,101,120,67,111,111,114,100,59,32,32,32,32,32,32,32,32,32,10,118,97,114,121,105,110,103,32,118,101,99,52,32,102,114,97,103,67,111,108,111,114,59,32,32,32,32,32,32,32,32,32,32,32,32,10,117,110,105,102,111,114,109,32,109,97,116,52,32,109,118,112,77,97,116,114,105,120,59,32,32,32,32,32,32,32,32,32,32,32,32,10,118,111,105,100,32,109,97,105,110,40,41,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,123,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,32,32,32,32,102,114,97,103,84,101,120,67,111,111,114,100,32,61,32,118,101,114,116,101,120,84,101,120,67,111,111,114,100,59,32,10,32,32,32,32,102,114,97,103,67,111,108,111,114,32,61,32,118,101,114,116,101,120,67,111,108,111,114,59,32,32,32,32,32,32,32,10,32,32,32,32,103,108,95,80,111,115,105,116,105,111,110,32,61,32,109,118,112,77,97,116,114,105,120,42,118,101,99,52,40,118,101,114,116,101,120,80,111,115,105,116,105,111,110,44,32,49,46,48,41,59,32,10,125,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,0,35,118,101,114,115,105,111,110,32,49,48,48,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,112,114,101,99,105,115,105,111,110,32,109,101,100,105,117,109,112,32,102,108,111,97,116,59,32,32,32,32,32,32,32,32,32,32,32,10,118,97,114,121,105,110,103,32,118,101,99,50,32,102,114,97,103,84,101,120,67,111,111,114,100,59,32,32,32,32,32,32,32,32,32,10,118,97,114,121,105,110,103,32,118,101,99,52,32,102,114,97,103,67,111,108,111,114,59,32,32,32,32,32,32,32,32,32,32,32,32,10,117,110,105,102,111,114,109,32,115,97,109,112,108,101,114,50,68,32,116,101,120,116,117,114,101,48,59,32,32,32,32,32,32,32,32,10,117,110,105,102,111,114,109,32,118,101,99,52,32,99,111,108,68,105,102,102,117,115,101,59,32,32,32,32,32,32,32,32,32,32,32,10,118,111,105,100,32,109,97,105,110,40,41,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,123,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,32,32,32,32,118,101,99,52,32,116,101,120,101,108,67,111,108,111,114,32,61,32,116,101,120,116,117,114,101,50,68,40,116,101,120,116,117,114,101,48,44,32,102,114,97,103,84,101,120,67,111,111,114,100,41,59,32,10,32,32,32,32,103,108,95,70,114,97,103,67,111,108,111,114,32,61,32,116,101,120,101,108,67,111,108,111,114,42,99,111,108,68,105,102,102,117,115,101,42,102,114,97,103,67,111,108,111,114,59,32,32,32,32,32,32,10,125,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,0,91,83,72,68,82,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,115,104,97,100,101,114,32,108,111,97,100,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,91,83,72,68,82,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,115,104,97,100,101,114,32,99,111,117,108,100,32,110,111,116,32,98,101,32,108,111,97,100,101,100,0,118,101,114,116,101,120,80,111,115,105,116,105,111,110,0,118,101,114,116,101,120,84,101,120,67,111,111,114,100,0,118,101,114,116,101,120,84,101,120,67,111,111,114,100,50,0,118,101,114,116,101,120,78,111,114,109,97,108,0,118,101,114,116,101,120,84,97,110,103,101,110,116,0,118,101,114,116,101,120,67,111,108,111,114,0,109,118,112,77,97,116,114,105,120,0,99,111,108,68,105,102,102,117,115,101,0,99,111,108,65,109,98,105,101,110,116,0,99,111,108,83,112,101,99,117,108,97,114,0,116,101,120,116,117,114,101,48,0,116,101,120,116,117,114,101,49,0,116,101,120,116,117,114,101,50,0,91,86,83,72,68,82,32,73,68,32,37,105,93,32,70,97,105,108,101,100,32,116,111,32,99,111,109,112,105,108,101,32,118,101,114,116,101,120,32,115,104,97,100,101,114,46,46,46,0,37,115,0,91,86,83,72,68,82,32,73,68,32,37,105,93,32,86,101,114,116,101,120,32,115,104,97,100,101,114,32,99,111,109,112,105,108,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,91,70,83,72,68,82,32,73,68,32,37,105,93,32,70,97,105,108,101,100,32,116,111,32,99,111,109,112,105,108,101,32,102,114,97,103,109,101,110,116,32,115,104,97,100,101,114,46,46,46,0,91,70,83,72,68,82,32,73,68,32,37,105,93,32,70,114,97,103,109,101,110,116,32,115,104,97,100,101,114,32,99,111,109,112,105,108,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,91,83,72,68,82,32,73,68,32,37,105,93,32,70,97,105,108,101,100,32,116,111,32,108,105,110,107,32,115,104,97,100,101,114,32,112,114,111,103,114,97,109,46,46,46,0,91,83,72,68,82,32,73,68,32,37,105,93,32,83,104,97,100,101,114,32,112,114,111,103,114,97,109,32,108,111,97,100,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,68,79,87,78,83,67,65,76,73,78,71,58,32,82,101,113,117,105,114,101,100,32,115,99,114,101,101,110,32,115,105,122,101,32,40,37,105,120,37,105,41,32,105,115,32,98,105,103,103,101,114,32,116,104,97,110,32,100,105,115,112,108,97,121,32,115,105,122,101,32,40,37,105,120,37,105,41,0,68,111,119,110,115,99,97,108,101,32,109,97,116,114,105,120,32,103,101,110,101,114,97,116,101,100,44,32,99,111,110,116,101,110,116,32,119,105,108,108,32,98,101,32,114,101,110,100,101,114,101,100,32,97,116,58,32,37,105,32,120,32,37,105,0,85,80,83,67,65,76,73,78,71,58,32,82,101,113,117,105,114,101,100,32,115,99,114,101,101,110,32,115,105,122,101,58,32,37,105,32,120,32,37,105,32,45,62,32,68,105,115,112,108,97,121,32,115,105,122,101,58,32,37,105,32,120,32,37,105,0,91,71,76,70,87,51,32,69,114,114,111,114,93,32,67,111,100,101,58,32,37,105,32,68,101,99,114,105,112,116,105,111,110,58,32,37,115,0,73,78,70,79,58,32,0,87,65,82,78,73,78,71,58,32,0,87,105,110,100,111,119,32,99,108,111,115,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,91,84,69,88,32,73,68,32,37,105,93,32,85,110,108,111,97,100,101,100,32,116,101,120,116,117,114,101,32,100,97,116,97,32,40,98,97,115,101,32,119,104,105,116,101,32,116,101,120,116,117,114,101,41,32,102,114,111,109,32,86,82,65,77,0,91,84,69,88,32,73,68,32,37,105,93,32,85,110,108,111,97,100,101,100,32,116,101,120,116,117,114,101,32,100,97,116,97,32,102,114,111,109,32,86,82,65,77,32,40,71,80,85,41,0,83,116,97,99,107,32,66,117,102,102,101,114,32,79,118,101,114,102,108,111,119,32,40,77,65,88,32,37,105,32,77,97,116,114,105,120,41,0,77,65,88,95,76,73,78,69,83,95,66,65,84,67,72,32,111,118,101,114,102,108,111,119,0,77,65,88,95,84,82,73,65,78,71,76,69,83,95,66,65,84,67,72,32,111,118,101,114,102,108,111,119,0,77,65,88,95,81,85,65,68,83,95,66,65,84,67,72,32,111,118,101,114,102,108,111,119,0,91,86,65,79,32,73,68,32,37,105,93,32,85,110,108,111,97,100,101,100,32,109,111,100,101,108,32,100,97,116,97,32,102,114,111,109,32,86,82,65,77,32,40,71,80,85,41,0,91,86,66,79,32,73,68,32,37,105,93,32,85,110,108,111,97,100,101,100,32,109,111,100,101,108,32,118,101,114,116,101,120,32,100,97,116,97,32,102,114,111,109,32,86,82,65,77,32,40,71,80,85,41,0,70,114,97,109,101,98,117,102,102,101,114,32,111,98,106,101,99,116,32,99,111,117,108,100,32,110,111,116,32,98,101,32,99,114,101,97,116,101,100,46,46,46,0,70,114,97,109,101,98,117,102,102,101,114,32,105,115,32,117,110,115,117,112,112,111,114,116,101,100,0,70,114,97,109,101,98,117,102,102,101,114,32,105,110,99,111,109,112,108,101,116,101,32,97,116,116,97,99,104,109,101,110,116,0,70,114,97,109,101,98,117,102,102,101,114,32,105,110,99,111,109,112,108,101,116,101,32,100,105,109,101,110,115,105,111,110,115,0,70,114,97,109,101,98,117,102,102,101,114,32,105,110,99,111,109,112,108,101,116,101,32,109,105,115,115,105,110,103,32,97,116,116,97,99,104,109,101,110,116,0,91,70,66,79,32,73,68,32,37,105,93,32,70,114,97,109,101,98,117,102,102,101,114,32,111,98,106,101,99,116,32,99,114,101,97,116,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,91,86,65,79,32,73,68,32,37,105,93,32,77,101,115,104,32,117,112,108,111,97,100,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,116,111,32,86,82,65,77,32,40,71,80,85,41,0,77,101,115,104,32,99,111,117,108,100,32,110,111,116,32,98,101,32,117,112,108,111,97,100,101,100,32,116,111,32,86,82,65,77,32,40,71,80,85,41,0,91,86,66,79,115,93,32,77,101,115,104,32,117,112,108,111,97,100,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,116,111,32,86,82,65,77,32,40,71,80,85,41,0,109,111,100,101,108,77,97,116,114,105,120,0,118,105,101,119,68,105,114,0,103,108,111,115,115,105,110,101,115,115,0,117,115,101,78,111,114,109,97,108,0,117,115,101,83,112,101,99,117,108,97,114,0,91,37,115,93,32,84,101,120,116,32,102,105,108,101,32,99,111,117,108,100,32,110,111,116,32,98,101,32,111,112,101,110,101,100,0,67,117,115,116,111,109,32,115,104,97,100,101,114,32,99,111,117,108,100,32,110,111,116,32,98,101,32,108,111,97,100,101,100,0,91,83,72,68,82,32,73,68,32,37,105,93,32,85,110,108,111,97,100,101,100,32,115,104,97,100,101,114,32,112,114,111,103,114,97,109,32,100,97,116,97,0,114,105,46,98,105,116,115,95,112,101,114,95,99,104,97,110,110,101,108,32,61,61,32,49,54,0,46,47,101,120,116,101,114,110,97,108,47,115,116,98,95,105,109,97,103,101,46,104,0,115,116,98,105,95,95,108,111,97,100,95,97,110,100,95,112,111,115,116,112,114,111,99,101,115,115,95,56,98,105,116,0,111,117,116,111,102,109,101,109,0,117,110,107,110,111,119,110,32,105,109,97,103,101,32,116,121,112,101,0,98,97,100,32,114,101,113,95,99,111], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE); -/* memory initializer */ allocate([109,112,0,114,101,113,95,99,111,109,112,32,62,61,32,49,32,38,38,32,114,101,113,95,99,111,109,112,32,60,61,32,52,0,115,116,98,105,95,95,99,111,110,118,101,114,116,95,102,111,114,109,97,116,49,54,0,48,0,115,116,98,105,95,95,99,111,110,118,101,114,116,95,102,111,114,109,97,116,0,109,117,108,116,105,112,108,101,32,73,72,68,82,0,98,97,100,32,73,72,68,82,32,108,101,110,0,116,111,111,32,108,97,114,103,101,0,49,47,50,47,52,47,56,47,49,54,45,98,105,116,32,111,110,108,121,0,98,97,100,32,99,116,121,112,101,0,98,97,100,32,99,111,109,112,32,109,101,116,104,111,100,0,98,97,100,32,102,105,108,116,101,114,32,109,101,116,104,111,100,0,98,97,100,32,105,110,116,101,114,108,97,99,101,32,109,101,116,104,111,100,0,48,45,112,105,120,101,108,32,105,109,97,103,101,0,102,105,114,115,116,32,110,111,116,32,73,72,68,82,0,105,110,118,97,108,105,100,32,80,76,84,69,0,116,82,78,83,32,97,102,116,101,114,32,73,68,65,84,0,116,82,78,83,32,98,101,102,111,114,101,32,80,76,84,69,0,98,97,100,32,116,82,78,83,32,108,101,110,0,116,82,78,83,32,119,105,116,104,32,97,108,112,104,97,0,0,255,85,0,17,0,0,0,1,110,111,32,80,76,84,69,0,111,117,116,111,102,100,97,116,97,0,110,111,32,73,68,65,84,0,88,88,88,88,32,80,78,71,32,99,104,117,110,107,32,110,111,116,32,107,110,111,119,110,0,115,45,62,105,109,103,95,111,117,116,95,110,32,61,61,32,52,0,115,116,98,105,95,95,100,101,95,105,112,104,111,110,101,0,111,117,116,95,110,32,61,61,32,50,32,124,124,32,111,117,116,95,110,32,61,61,32,52,0,115,116,98,105,95,95,99,111,109,112,117,116,101,95,116,114,97,110,115,112,97,114,101,110,99,121,0,115,116,98,105,95,95,99,111,109,112,117,116,101,95,116,114,97,110,115,112,97,114,101,110,99,121,49,54,0,111,117,116,95,110,32,61,61,32,115,45,62,105,109,103,95,110,32,124,124,32,111,117,116,95,110,32,61,61,32,115,45,62,105,109,103,95,110,43,49,0,115,116,98,105,95,95,99,114,101,97,116,101,95,112,110,103,95,105,109,97,103,101,95,114,97,119,0,110,111,116,32,101,110,111,117,103,104,32,112,105,120,101,108,115,0,105,109,103,95,119,105,100,116,104,95,98,121,116,101,115,32,60,61,32,120,0,0,1,0,5,6,105,109,103,95,110,43,49,32,61,61,32,111,117,116,95,110,0,105,110,118,97,108,105,100,32,102,105,108,116,101,114,0,105,109,103,95,110,32,61,61,32,51,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,98,97,100,32,104,117,102,102,109,97,110,32,99,111,100,101,0,98,97,100,32,100,105,115,116,0,111,117,116,112,117,116,32,98,117,102,102,101,114,32,108,105,109,105,116,0,122,45,62,115,105,122,101,91,98,93,32,61,61,32,115,0,115,116,98,105,95,95,122,104,117,102,102,109,97,110,95,100,101,99,111,100,101,95,115,108,111,119,112,97,116,104,0,98,105,116,115,32,60,61,32,49,54,0,115,116,98,105,95,95,98,105,116,95,114,101,118,101,114,115,101,0,122,45,62,99,111,100,101,95,98,117,102,102,101,114,32,60,32,40,49,85,32,60,60,32,122,45,62,110,117,109,95,98,105,116,115,41,0,115,116,98,105,95,95,102,105,108,108,95,98,105,116,115,0,98,97,100,32,99,111,100,101,108,101,110,103,116,104,115,0,99,32,61,61,32,49,56,0,115,116,98,105,95,95,99,111,109,112,117,116,101,95,104,117,102,102,109,97,110,95,99,111,100,101,115,0,98,97,100,32,115,105,122,101,115,0,97,45,62,110,117,109,95,98,105,116,115,32,61,61,32,48,0,115,116,98,105,95,95,112,97,114,115,101,95,117,110,99,111,109,112,114,101,115,115,101,100,95,98,108,111,99,107,0,122,108,105,98,32,99,111,114,114,117,112,116,0,114,101,97,100,32,112,97,115,116,32,98,117,102,102,101,114,0,98,97,100,32,122,108,105,98,32,104,101,97,100,101,114,0,110,111,32,112,114,101,115,101,116,32,100,105,99,116,0,98,97,100,32,99,111,109,112,114,101,115,115,105,111,110,0,98,97,100,32,112,110,103,32,115,105,103,0,46,114,114,101,115,0,91,37,115,93,32,82,101,115,111,117,114,99,101,32,102,105,108,101,32,100,111,101,115,32,110,111,116,32,99,111,110,116,97,105,110,32,105,109,97,103,101,32,100,97,116,97,0,46,112,110,103,0,91,37,115,93,32,73,109,97,103,101,32,102,105,108,101,102,111,114,109,97,116,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,91,37,115,93,32,73,109,97,103,101,32,108,111,97,100,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,37,105,120,37,105,41,0,91,37,115,93,32,73,109,97,103,101,32,99,111,117,108,100,32,110,111,116,32,98,101,32,108,111,97,100,101,100,0,73,109,97,103,101,32,102,111,114,109,97,116,32,110,111,116,32,114,101,99,111,103,110,105,122,101,100,0,114,98,0,91,37,115,93,32,114,82,69,83,32,114,97,121,108,105,98,32,114,101,115,111,117,114,99,101,32,102,105,108,101,32,99,111,117,108,100,32,110,111,116,32,98,101,32,111,112,101,110,101,100,0,91,37,115,93,32,84,104,105,115,32,105,115,32,110,111,116,32,97,32,118,97,108,105,100,32,114,97,121,108,105,98,32,114,101,115,111,117,114,99,101,32,102,105,108,101,0,91,37,115,93,91,73,68,32,37,105,93,32,82,101,115,111,117,114,99,101,32,100,97,116,97,32,108,111,97,100,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,91,37,115,93,91,73,68,32,37,105,93,32,82,101,113,117,101,115,116,101,100,32,114,101,115,111,117,114,99,101,32,99,111,117,108,100,32,110,111,116,32,98,101,32,102,111,117,110,100,0,79,117,116,32,111,102,32,109,101,109,111,114,121,32,119,104,105,108,101,32,100,101,99,111,109,112,114,101,115,115,105,110,103,32,100,97,116,97,0,68,97,116,97,32,100,101,99,111,109,112,114,101,115,115,105,111,110,32,102,97,105,108,101,100,0,69,120,112,101,99,116,101,100,32,117,110,99,111,109,112,114,101,115,115,101,100,32,115,105,122,101,32,100,111,32,110,111,116,32,109,97,116,99,104,44,32,100,97,116,97,32,109,97,121,32,98,101,32,99,111,114,114,117,112,116,101,100,0,32,45,45,32,69,120,112,101,99,116,101,100,32,117,110,99,111,109,112,114,101,115,115,101,100,32,115,105,122,101,58,32,37,105,0,32,45,45,32,82,101,116,117,114,110,101,100,32,117,110,99,111,109,112,114,101,115,115,101,100,32,115,105,122,101,58,32,37,105,0,68,97,116,97,32,100,101,99,111,109,112,114,101,115,115,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,102,114,111,109,32,37,117,32,98,121,116,101,115,32,116,111,32,37,117,32,98,121,116,101,115,0,5,5,4,0,16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15,2,3,7,0,3,3,11,0,84,101,120,116,117,114,101,32,99,111,117,108,100,32,110,111,116,32,98,101,32,99,114,101,97,116,101,100,0,37,50,105,32,70,80,83,0,46,111,98,106,0,77,101,115,104,32,99,111,117,108,100,32,110,111,116,32,98,101,32,108,111,97,100,101,100,0,114,116,0,91,37,115,93,32,79,66,74,32,102,105,108,101,32,99,111,117,108,100,32,110,111,116,32,98,101,32,111,112,101,110,101,100,0,37,99,0,91,37,115,93,32,77,111,100,101,108,32,110,117,109,32,118,101,114,116,105,99,101,115,58,32,37,105,0,91,37,115,93,32,77,111,100,101,108,32,110,117,109,32,116,101,120,99,111,111,114,100,115,58,32,37,105,0,91,37,115,93,32,77,111,100,101,108,32,110,117,109,32,110,111,114,109,97,108,115,58,32,37,105,0,91,37,115,93,32,77,111,100,101,108,32,110,117,109,32,116,114,105,97,110,103,108,101,115,58,32,37,105,0,37,102,32,37,102,37,42,91,94,10,93,115,10,0,37,102,32,37,102,32,37,102,0,91,37,115,93,32,78,111,32,110,111,114,109,97,108,115,32,100,97,116,97,32,111,110,32,79,66,74,44,32,110,111,114,109,97,108,115,32,119,105,108,108,32,98,101,32,103,101,110,101,114,97,116,101,100,32,102,114,111,109,32,102,97,99,101,115,32,100,97,116,97,0,37,105,32,37,105,32,37,105,0,37,105,47,37,105,32,37,105,47,37,105,32,37,105,47,37,105,0,37,105,47,47,37,105,32,37,105,47,47,37,105,32,37,105,47,47,37,105,0,37,105,47,37,105,47,37,105,32,37,105,47,37,105,47,37,105,32,37,105,47,37,105,47,37,105,0,91,37,115,93,32,77,111,100,101,108,32,108,111,97,100,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,105,110,32,82,65,77,32,40,67,80,85,41,0,85,110,108,111,97,100,101,100,32,109,111,100,101,108,32,100,97,116,97,32,40,109,101,115,104,32,97,110,100,32,109,97,116,101,114,105,97,108,41,32,102,114,111,109,32,82,65,77,32,97,110,100,32,86,82,65,77,0,69,88,84,0,65,82,66,0,79,69,83,0,65,78,71,76,69,0,103,108,67,114,101,97,116,101,80,114,111,103,114,97,109,79,98,106,101,99,116,0,103,108,67,114,101,97,116,101,80,114,111,103,114,97,109,0,103,108,85,115,101,80,114,111,103,114,97,109,79,98,106,101,99,116,0,103,108,85,115,101,80,114,111,103,114,97,109,0,103,108,67,114,101,97,116,101,83,104,97,100,101,114,79,98,106,101,99,116,0,103,108,67,114,101,97,116,101,83,104,97,100,101,114,0,103,108,65,116,116,97,99,104,79,98,106,101,99,116,0,103,108,65,116,116,97,99,104,83,104,97,100,101,114,0,103,108,68,101,116,97,99,104,79,98,106,101,99,116,0,103,108,68,101,116,97,99,104,83,104,97,100,101,114,0,103,108,80,105,120,101,108,83,116,111,114,101,105,0,103,108,71,101,116,83,116,114,105,110,103,0,103,108,71,101,116,73,110,116,101,103,101,114,118,0,103,108,71,101,116,70,108,111,97,116,118,0,103,108,71,101,116,66,111,111,108,101,97,110,118,0,103,108,71,101,110,84,101,120,116,117,114,101,115,0,103,108,68,101,108,101,116,101,84,101,120,116,117,114,101,115,0,103,108,67,111,109,112,114,101,115,115,101,100,84,101,120,73,109,97,103,101,50,68,0,103,108,67,111,109,112,114,101,115,115,101,100,84,101,120,83,117,98,73,109,97,103,101,50,68,0,103,108,84,101,120,73,109,97,103,101,50,68,0,103,108,84,101,120,83,117,98,73,109,97,103,101,50,68,0,103,108,82,101,97,100,80,105,120,101,108,115,0,103,108,66,105,110,100,84,101,120,116,117,114,101,0,103,108,71,101,116,84,101,120,80,97,114,97,109,101,116,101,114,102,118,0,103,108,71,101,116,84,101,120,80,97,114,97,109,101,116,101,114,105,118,0,103,108,84,101,120,80,97,114,97,109,101,116,101,114,102,118,0,103,108,84,101,120,80,97,114,97,109,101,116,101,114,105,118,0,103,108,73,115,84,101,120,116,117,114,101,0,103,108,71,101,110,66,117,102,102,101,114,115,0,103,108,68,101,108,101,116,101,66,117,102,102,101,114,115,0,103,108,71,101,116,66,117,102,102,101,114,80,97,114,97,109,101,116,101,114,105,118,0,103,108,66,117,102,102,101,114,68,97,116,97,0,103,108,66,117,102,102,101,114,83,117,98,68,97,116,97,0,103,108,73,115,66,117,102,102,101,114,0,103,108,71,101,110,82,101,110,100,101,114,98,117,102,102,101,114,115,0,103,108,68,101,108,101,116,101,82,101,110,100,101,114,98,117,102,102,101,114,115,0,103,108,66,105,110,100,82,101,110,100,101,114,98,117,102,102,101,114,0,103,108,71,101,116,82,101,110,100,101,114,98,117,102,102,101,114,80,97,114,97,109,101,116,101,114,105,118,0,103,108,73,115,82,101,110,100,101,114,98,117,102,102,101,114,0,103,108,71,101,116,85,110,105,102,111,114,109,102,118,0,103,108,71,101,116,85,110,105,102,111,114,109,105,118,0,103,108,71,101,116,85,110,105,102,111,114,109,76,111,99,97,116,105,111,110,0,103,108,71,101,116,86,101,114,116,101,120,65,116,116,114,105,98,102,118,0,103,108,71,101,116,86,101,114,116,101,120,65,116,116,114,105,98,105,118,0,103,108,71,101,116,86,101,114,116,101,120,65,116,116,114,105,98,80,111,105,110,116,101,114,118,0,103,108,71,101,116,65,99,116,105,118,101,85,110,105,102,111,114,109,0,103,108,85,110,105,102,111,114,109,49,102,0,103,108,85,110,105,102,111,114,109,50,102,0,103,108,85,110,105,102,111,114,109,51,102,0,103,108,85,110,105,102,111,114,109,52,102,0,103,108,85,110,105,102,111,114,109,49,105,0,103,108,85,110,105,102,111,114,109,50,105,0,103,108,85,110,105,102,111,114,109,51,105,0,103,108,85,110,105,102,111,114,109,52,105,0,103,108,85,110,105,102,111,114,109,49,105,118,0,103,108,85,110,105,102,111,114,109,50,105,118,0,103,108,85,110,105,102,111,114,109,51,105,118,0,103,108,85,110,105,102,111,114,109,52,105,118,0,103,108,85,110,105,102,111,114,109,49,102,118,0,103,108,85,110,105,102,111,114,109,50,102,118,0,103,108,85,110,105,102,111,114,109,51,102,118,0,103,108,85,110,105,102,111,114,109,52,102,118,0,103,108,85,110,105,102,111,114,109,77,97,116,114,105,120,50,102,118,0,103,108,85,110,105,102,111,114,109,77,97,116,114,105,120,51,102,118,0,103,108,85,110,105,102,111,114,109,77,97,116,114,105,120,52,102,118,0,103,108,66,105,110,100,66,117,102,102,101,114,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,49,102,118,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,50,102,118,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,51,102,118,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,52,102,118,0,103,108,71,101,116,65,116,116,114,105,98,76,111,99,97,116,105,111,110,0,103,108,71,101,116,65,99,116,105,118,101,65,116,116,114,105,98,0,103,108,68,101,108,101,116,101,83,104,97,100,101,114,0,103,108,71,101,116,65,116,116,97,99,104,101,100,83,104,97,100,101,114,115,0,103,108,83,104,97,100,101,114,83,111,117,114,99,101,0,103,108,71,101,116,83,104,97,100,101,114,83,111,117,114,99,101,0,103,108,67,111,109,112,105,108,101,83,104,97,100,101,114,0,103,108,71,101,116,83,104,97,100,101,114,73,110,102,111,76,111,103,0,103,108,71,101,116,83,104,97,100,101,114,105,118,0,103,108,71,101,116,80,114,111,103,114,97,109,105,118,0,103,108,73,115,83,104,97,100,101,114,0,103,108,68,101,108,101,116,101,80,114,111,103,114,97,109,0,103,108,71,101,116,83,104,97,100,101,114,80,114,101,99,105,115,105,111,110,70,111,114,109,97,116,0,103,108,76,105,110,107,80,114,111,103,114,97,109,0,103,108,71,101,116,80,114,111,103,114,97,109,73,110,102,111,76,111,103,0,103,108,86,97,108,105,100,97,116,101,80,114,111,103,114,97,109,0,103,108,73,115,80,114,111,103,114,97,109,0,103,108,66,105,110,100,65,116,116,114,105,98,76,111,99,97,116,105,111,110,0,103,108,66,105,110,100,70,114,97,109,101,98,117,102,102,101,114,0,103,108,71,101,110,70,114,97,109,101,98,117,102,102,101,114,115,0,103,108,68,101,108,101,116,101,70,114,97,109,101,98,117,102,102,101,114,115,0,103,108,70,114,97,109,101,98,117,102,102,101,114,82,101,110,100,101,114,98,117,102,102,101,114,0,103,108,70,114,97,109,101,98,117,102,102,101,114,84,101,120,116,117,114,101,50,68,0,103,108,71,101,116,70,114,97,109,101,98,117,102,102,101,114,65,116,116,97,99,104,109,101,110,116,80,97,114,97,109,101,116,101,114,105,118,0,103,108,73,115,70,114,97,109,101,98,117,102,102,101,114,0,103,108,68,101,108,101,116,101,79,98,106,101,99,116,0,103,108,71,101,116,79,98,106,101,99,116,80,97,114,97,109,101,116,101,114,105,118,0,103,108,71,101,116,73,110,102,111,76,111,103,0,103,108,66,105,110,100,80,114,111,103,114,97,109,0,103,108,71,101,116,80,111,105,110,116,101,114,118,0,103,108,68,114,97,119,82,97,110,103,101,69,108,101,109,101,110,116,115,0,103,108,69,110,97,98,108,101,67,108,105,101,110,116,83,116,97,116,101,0,103,108,86,101,114,116,101,120,80,111,105,110,116,101,114,0,103,108,84,101,120,67,111,111,114,100,80,111,105,110,116,101,114,0,103,108,78,111,114,109,97,108,80,111,105,110,116,101,114,0,103,108,67,111,108,111,114,80,111,105,110,116,101,114,0,103,108,67,108,105,101,110,116,65,99,116,105,118,101,84,101,120,116,117,114,101,0,103,108,71,101,110,86,101,114,116,101,120,65,114,114,97,121,115,0,103,108,68,101,108,101,116,101,86,101,114,116,101,120,65,114,114,97,121,115,0,103,108,66,105,110,100,86,101,114,116,101,120,65,114,114,97,121,0,103,108,77,97,116,114,105,120,77,111,100,101,0,103,108,76,111,97,100,73,100,101,110,116,105,116,121,0,103,108,76,111,97,100,77,97,116,114,105,120,102,0,103,108,70,114,117,115,116,117,109,0,103,108,82,111,116,97,116,101,102,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,80,111,105,110,116,101,114,0,103,108,69,110,97,98,108,101,86,101,114,116,101,120,65,116,116,114,105,98,65,114,114,97,121,0,103,108,68,105,115,97,98,108,101,86,101,114,116,101,120,65,116,116,114,105,98,65,114,114,97,121,0,103,108,68,114,97,119,65,114,114,97,121,115,0,103,108,68,114,97,119,69,108,101,109,101,110,116,115,0,103,108,83,104,97,100,101,114,66,105,110,97,114,121,0,103,108,82,101,108,101,97,115,101,83,104,97,100,101,114,67,111,109,112,105,108,101,114,0,103,108,71,101,116,69,114,114,111,114,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,68,105,118,105,115,111,114,0,103,108,68,114,97,119,65,114,114,97,121,115,73,110,115,116,97,110,99,101,100,0,103,108,68,114,97,119,69,108,101,109,101,110,116,115,73,110,115,116,97,110,99,101,100,0,103,108,70,105,110,105,115,104,0,103,108,70,108,117,115,104,0,103,108,67,108,101,97,114,68,101,112,116,104,0,103,108,67,108,101,97,114,68,101,112,116,104,102,0,103,108,68,101,112,116,104,70,117,110,99,0,103,108,69,110,97,98,108,101,0,103,108,68,105,115,97,98,108,101,0,103,108,70,114,111,110,116,70,97,99,101,0,103,108,67,117,108,108,70,97,99,101,0,103,108,67,108,101,97,114,0,103,108,76,105,110,101,87,105,100,116,104,0,103,108,67,108,101,97,114,83,116,101,110,99,105,108,0,103,108,68,101,112,116,104,77,97,115,107,0,103,108,83,116,101,110,99,105,108,77,97,115,107,0,103,108,67,104,101,99,107,70,114,97,109,101,98,117,102,102,101,114,83,116,97,116,117,115,0,103,108,71,101,110,101,114,97,116,101,77,105,112,109,97,112,0,103,108,65,99,116,105,118,101,84,101,120,116,117,114,101,0,103,108,66,108,101,110,100,69,113,117,97,116,105,111,110,0,103,108,73,115,69,110,97,98,108,101,100,0,103,108,66,108,101,110,100,70,117,110,99,0,103,108,66,108,101,110,100,69,113,117,97,116,105,111,110,83,101,112,97,114,97,116,101,0,103,108,68,101,112,116,104,82,97,110,103,101,0,103,108,68,101,112,116,104,82,97,110,103,101,102,0,103,108,83,116,101,110,99,105,108,77,97,115,107,83,101,112,97,114,97,116,101,0,103,108,72,105,110,116,0,103,108,80,111,108,121,103,111,110,79,102,102,115,101,116,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,49,102,0,103,108,83,97,109,112,108,101,67,111,118,101,114,97,103,101,0,103,108,84,101,120,80,97,114,97,109,101,116,101,114,105,0,103,108,84,101,120,80,97,114,97,109,101,116,101,114,102,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,50,102,0,103,108,83,116,101,110,99,105,108,70,117,110,99,0,103,108,83,116,101,110,99,105,108,79,112,0,103,108,86,105,101,119,112,111,114,116,0,103,108,67,108,101,97,114,67,111,108,111,114,0,103,108,83,99,105,115,115,111,114,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,51,102,0,103,108,67,111,108,111,114,77,97,115,107,0,103,108,82,101,110,100,101,114,98,117,102,102,101,114,83,116,111,114,97,103,101,0,103,108,66,108,101,110,100,70,117,110,99,83,101,112,97,114,97,116,101,0,103,108,66,108,101,110,100,67,111,108,111,114,0,103,108,83,116,101,110,99,105,108,70,117,110,99,83,101,112,97,114,97,116,101,0,103,108,83,116,101,110,99,105,108,79,112,83,101,112,97,114,97,116,101,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,52,102,0,103,108,67,111,112,121,84,101,120,73,109,97,103,101,50,68,0,103,108,67,111,112,121,84,101,120,83,117,98,73,109,97,103,101,50,68,0,103,108,68,114,97,119,66,117,102,102,101,114,115,0,123,32,77,111,100,117,108,101,46,112,114,105,110,116,69,114,114,40,39,98,97,100,32,110,97,109,101,32,105,110,32,103,101,116,80,114,111,99,65,100,100,114,101,115,115,58,32,39,32,43,32,91,80,111,105,110,116,101,114,95,115,116,114,105,110,103,105,102,121,40,36,48,41,44,32,80,111,105,110,116,101,114,95,115,116,114,105,110,103,105,102,121,40,36,49,41,93,41,59,32,125,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,1,2,3,4,5,6,7,8,9,255,255,255,255,255,255,255,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,255,255,255,255,255,255,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,1,2,4,7,3,6,5,0,17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,78,65,78,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,46,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116,32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0,105,110,102,105,110,105,116,121,0,110,97,110,0,114,119,97,0], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+10240); +/* memory initializer */ allocate([32,3,0,0,194,1,0,0,0,0,64,64,0,0,64,64,0,0,64,64,0,0,0,0,0,0,192,63,0,0,0,0,0,0,0,0,0,0,128,63,0,0,0,0,0,0,52,66,56,20,0,0,66,20,0,0,80,20,0,0,93,20,0,0,103,20,0,0,118,20,0,0,134,20,0,0,148,20,0,0,158,20,0,0,166,20,0,0,172,20,0,0,178,20,0,0,1,1,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,0,32,0,0,176,1,0,0,0,0,0,0,0,0,0,32,37,249,142,0,10,2,0,0,128,190,125,95,244,125,31,160,242,43,74,30,9,82,8,0,64,34,65,80,20,4,16,32,32,41,46,18,8,34,8,0,32,34,65,80,20,4,16,32,32,249,16,76,8,250,62,60,16,34,125,222,247,125,16,32,32,161,232,50,8,34,8,0,8,34,5,16,4,69,16,0,240,163,164,50,8,82,8,0,4,34,5,16,4,69,16,32,32,249,226,94,8,2,0,129,2,62,125,31,244,125,16,0,0,32,0,0,176,1,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,190,15,0,192,15,224,247,251,125,126,191,95,232,190,80,0,162,8,8,68,232,47,20,10,133,2,129,80,72,160,80,0,162,40,228,73,40,40,20,10,132,2,129,64,72,160,72,0,190,15,2,16,175,235,247,9,132,62,159,216,79,160,71,0,34,136,228,9,161,42,20,10,132,2,129,80,72,160,72,0,34,40,8,4,160,47,20,10,133,2,129,80,72,162,80,0,190,143,0,0,33,32,244,251,125,126,129,95,232,156,208,7,0,128,0,0,224,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,1,12,0,130,66,191,223,239,247,251,11,5,5,133,66,191,4,72,0,198,66,161,80,40,20,64,8,5,37,133,66,160,8,168,0,170,70,161,80,40,20,64,8,5,37,133,66,144,16,8,0,146,74,161,95,232,247,67,8,5,37,121,126,136,32,8,0,130,82,161,64,40,1,66,8,137,36,133,64,132,64,8,0,130,98,161,64,42,2,66,8,81,36,133,64,130,128,8,0,130,66,191,192,47,244,67,248,33,252,133,126,191,0,9,62,0,0,0,0,4,0,0,0,0,0,0,0,128,1,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,0,4,0,32,72,65,0,0,0,0,0,8,0,0,4,4,0,4,60,32,0,65,0,0,0,0,0,8,0,0,240,125,223,247,133,239,75,81,190,239,251,190,239,59,81,4,0,69,65,20,133,40,74,73,170,40,138,162,32,8,81,4,240,69,65,244,157,40,74,71,170,40,138,162,224,11,81,4,16,69,65,20,132,40,74,73,170,40,138,162,0,10,145,2,240,125,223,247,133,47,74,209,170,232,251,190,224,123,31,1,0,0,0,0,4,8,64,0,0,0,8,32,0,0,0,0,0,0,0,0,132,15,96,0,0,0,8,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,1,15,0,0,0,0,0,0,0,0,0,0,0,0,0,36,1,9,0,0,0,0,0,0,0,0,0,6,0,0,0,36,1,9,0,0,0,0,0,0,0,128,16,9,162,40,250,36,1,9,0,0,0,0,0,0,0,0,62,1,42,37,66,34,82,9,0,0,0,0,0,0,0,128,138,3,42,34,34,36,41,9,0,0,0,0,0,0,0,128,10,1,42,37,18,36,1,9,0,0,0,0,0,0,0,128,10,1,190,232,251,36,1,9,0,0,0,0,0,0,0,128,190,14,0,0,2,172,1,15,0,0,0,0,0,0,0,128,4,0,0,224,3,0,0,0,0,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,0,0,0,14,184,67,132,3,58,32,0,128,160,190,2,32,0,0,240,138,32,82,196,2,43,32,4,34,145,2,248,59,0,240,7,142,56,75,228,2,58,32,2,28,138,30,8,42,233,17,4,224,11,66,244,2,130,36,1,20,4,20,232,186,4,209,5,128,184,195,231,10,58,137,0,28,14,60,40,2,9,80,4,128,0,64,196,2,128,68,0,34,132,32,232,2,0,80,4,0,0,64,128,2,0,32,5,0,142,62,8,2,0,16,4,224,3,64,128,66,0,0,7,0,132,0,248,3,0,240,7,0,0,64,128,34,0,0,4,0,0,0,0,0,0,0,0,0,0,64,128,2,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,7,128,0,194,160,72,24,0,0,1,132,33,9,146,2,66,38,4,1,33,81,0,0,127,63,2,66,2,16,41,0,34,20,192,239,247,251,253,126,9,161,223,239,247,187,187,3,18,15,68,40,20,10,133,66,9,129,64,32,16,16,17,1,8,4,68,40,20,10,133,66,127,129,64,32,16,16,17,1,4,130,199,239,247,251,253,126,9,129,207,231,243,17,17,1,50,169,80,40,20,10,133,66,9,161,64,32,16,16,17,1,64,184,80,40,20,10,133,66,121,191,223,239,247,187,187,3,32,160,31,0,0,0,0,0,0,16,0,0,0,0,0,0,112,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,2,8,131,34,1,0,2,8,67,2,1,0,1,1,124,20,4,132,68,1,0,32,4,132,4,128,8,63,130,0,132,66,191,223,239,247,3,126,161,80,40,20,10,33,0,0,132,70,161,80,40,20,138,82,161,80,40,20,122,161,239,3,158,74,161,80,40,20,82,82,161,80,40,20,74,31,8,2,132,82,161,80,40,20,34,74,161,80,40,244,75,161,239,3,132,98,161,80,40,20,82,74,161,80,40,4,122,161,40,2,124,66,191,223,239,247,139,126,191,223,239,247,11,189,239,3,0,0,0,0,0,0,0,4,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,5,32,0,0,4,132,0,34,129,69,17,16,66,1,0,148,66,81,0,0,8,66,81,148,42,162,32,8,165,80,0,0,0,32,0,0,0,0,0,0,0,5,0,0,0,0,8,190,239,251,254,251,190,239,251,20,145,235,251,190,239,251,0,32,8,130,32,10,162,40,138,20,145,40,138,162,40,138,62,190,239,251,254,11,190,239,251,20,145,40,138,162,40,138,0,162,40,138,34,8,130,32,8,20,145,40,138,162,40,138,8,190,239,251,254,251,190,239,251,20,145,47,250,190,239,251,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,33,0,4,0,0,0,0,0,0,0,0,0,0,0,0,130,80,20,2,20,0,0,0,0,0,0,0,0,0,0,16,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0,190,40,138,162,40,34,0,0,0,0,0,0,0,0,0,0,170,40,138,162,232,34,0,0,0,0,0,0,0,0,0,0,170,40,138,162,168,34,0,0,0,0,0,0,0,0,0,0,170,40,138,162,232,34,0,0,0,0,0,0,0,0,0,0,190,239,251,190,47,62,0,0,0,0,0,0,0,0,0,0,4,0,0,0,40,32,0,0,0,0,0,0,0,0,0,0,0,0,0,128,15,62,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,1,0,0,0,4,0,0,0,6,0,0,0,5,0,0,0,7,0,0,0,6,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,5,0,0,0,5,0,0,0,2,0,0,0,4,0,0,0,1,0,0,0,7,0,0,0,5,0,0,0,2,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,1,0,0,0,1,0,0,0,3,0,0,0,4,0,0,0,3,0,0,0,6,0,0,0,7,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,3,0,0,0,5,0,0,0,6,0,0,0,5,0,0,0,7,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,7,0,0,0,6,0,0,0,7,0,0,0,7,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,2,0,0,0,7,0,0,0,2,0,0,0,3,0,0,0,5,0,0,0,2,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,4,0,0,0,5,0,0,0,5,0,0,0,1,0,0,0,2,0,0,0,5,0,0,0,2,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,4,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,3,0,0,0,1,0,0,0,3,0,0,0,4,0,0,0,4,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,7,0,0,0,1,0,0,0,5,0,0,0,3,0,0,0,7,0,0,0,3,0,0,0,5,0,0,0,4,0,0,0,1,0,0,0,7,0,0,0,4,0,0,0,3,0,0,0,5,0,0,0,3,0,0,0,3,0,0,0,2,0,0,0,5,0,0,0,6,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,5,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,7,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,7,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,5,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,4,0,0,0,6,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,9,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,3,0,0,0,5,0,0,0,205,204,12,64,0,0,128,63,0,0,128,63,46,186,232,62,0,0,0,0,4,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,8,0,0,0,8,0,0,0,4,0,0,0,4,0,0,0,2,0,0,0,2,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,1,0,0,0,8,0,0,0,8,0,0,0,8,0,0,0,4,0,0,0,4,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,7,0,0,0,8,0,0,0,9,0,0,0,10,0,0,0,11,0,0,0,13,0,0,0,15,0,0,0,17,0,0,0,19,0,0,0,23,0,0,0,27,0,0,0,31,0,0,0,35,0,0,0,43,0,0,0,51,0,0,0,59,0,0,0,67,0,0,0,83,0,0,0,99,0,0,0,115,0,0,0,131,0,0,0,163,0,0,0,195,0,0,0,227,0,0,0,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,7,0,0,0,9,0,0,0,13,0,0,0,17,0,0,0,25,0,0,0,33,0,0,0,49,0,0,0,65,0,0,0,97,0,0,0,129,0,0,0,193,0,0,0,1,1,0,0,129,1,0,0,1,2,0,0,1,3,0,0,1,4,0,0,1,6,0,0,1,8,0,0,1,12,0,0,1,16,0,0,1,24,0,0,1,32,0,0,1,48,0,0,1,64,0,0,1,96,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,4,0,0,0,4,0,0,0,5,0,0,0,5,0,0,0,6,0,0,0,6,0,0,0,7,0,0,0,7,0,0,0,8,0,0,0,8,0,0,0,9,0,0,0,9,0,0,0,10,0,0,0,10,0,0,0,11,0,0,0,11,0,0,0,12,0,0,0,12,0,0,0,13,0,0,0,13,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,128,191,20,0,0,0,255,255,255,255,205,204,236,63,2,0,0,0,86,1,0,0,85,1,0,0,87,0,0,0,83,0,0,0,68,0,0,0,65,0,0,0,69,0,0,0,81,0,0,0,255,255,255,255,0,1,0,0,255,255,255,255,2,0,0,192,3,0,0,192,4,0,0,192,5,0,0,192,6,0,0,192,7,0,0,192,8,0,0,192,9,0,0,192,10,0,0,192,11,0,0,192,12,0,0,192,13,0,0,192,14,0,0,192,15,0,0,192,16,0,0,192,17,0,0,192,18,0,0,192,19,0,0,192,20,0,0,192,21,0,0,192,22,0,0,192,23,0,0,192,24,0,0,192,25,0,0,192,26,0,0,192,27,0,0,192,28,0,0,192,29,0,0,192,30,0,0,192,31,0,0,192,0,0,0,179,1,0,0,195,2,0,0,195,3,0,0,195,4,0,0,195,5,0,0,195,6,0,0,195,7,0,0,195,8,0,0,195,9,0,0,195,10,0,0,195,11,0,0,195,12,0,0,195,13,0,0,211,14,0,0,195,15,0,0,195,0,0,12,187,1,0,12,195,2,0,12,195,3,0,12,195,4,0,12,211,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,188,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,124,16,0,0,5,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,3,0,0,0,39,97,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,124,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,100,0,0,0,232,3,0,0,16,39,0,0,160,134,1,0,64,66,15,0,128,150,152,0,0,225,245,5,95,112,137,0,255,9,47,15,114,97,121,108,105,98,32,91,115,104,97,100,101,114,115,93,32,101,120,97,109,112,108,101,32,45,32,112,111,115,116,112,114,111,99,101,115,115,105,110,103,32,115,104,97,100,101,114,0,114,101,115,111,117,114,99,101,115,47,109,111,100,101,108,47,100,119,97,114,102,46,111,98,106,0,114,101,115,111,117,114,99,101,115,47,109,111,100,101,108,47,100,119,97,114,102,95,100,105,102,102,117,115,101,46,112,110,103,0,114,101,115,111,117,114,99,101,115,47,115,104,97,100,101,114,115,47,103,108,115,108,49,48,48,47,98,97,115,101,46,118,115,0,114,101,115,111,117,114,99,101,115,47,115,104,97,100,101,114,115,47,103,108,115,108,37,105,47,103,114,97,121,115,99,97,108,101,46,102,115,0,114,101,115,111,117,114,99,101,115,47,115,104,97,100,101,114,115,47,103,108,115,108,37,105,47,112,111,115,116,101,114,105,122,97,116,105,111,110,46,102,115,0,114,101,115,111,117,114,99,101,115,47,115,104,97,100,101,114,115,47,103,108,115,108,37,105,47,100,114,101,97,109,95,118,105,115,105,111,110,46,102,115,0,114,101,115,111,117,114,99,101,115,47,115,104,97,100,101,114,115,47,103,108,115,108,37,105,47,112,105,120,101,108,105,122,101,114,46,102,115,0,114,101,115,111,117,114,99,101,115,47,115,104,97,100,101,114,115,47,103,108,115,108,37,105,47,99,114,111,115,115,95,104,97,116,99,104,105,110,103,46,102,115,0,114,101,115,111,117,114,99,101,115,47,115,104,97,100,101,114,115,47,103,108,115,108,37,105,47,99,114,111,115,115,95,115,116,105,116,99,104,105,110,103,46,102,115,0,114,101,115,111,117,114,99,101,115,47,115,104,97,100,101,114,115,47,103,108,115,108,37,105,47,112,114,101,100,97,116,111,114,46,102,115,0,114,101,115,111,117,114,99,101,115,47,115,104,97,100,101,114,115,47,103,108,115,108,37,105,47,115,99,97,110,108,105,110,101,115,46,102,115,0,114,101,115,111,117,114,99,101,115,47,115,104,97,100,101,114,115,47,103,108,115,108,37,105,47,102,105,115,104,101,121,101,46,102,115,0,114,101,115,111,117,114,99,101,115,47,115,104,97,100,101,114,115,47,103,108,115,108,37,105,47,115,111,98,101,108,46,102,115,0,114,101,115,111,117,114,99,101,115,47,115,104,97,100,101,114,115,47,103,108,115,108,37,105,47,98,108,111,111,109,46,102,115,0,114,101,115,111,117,114,99,101,115,47,115,104,97,100,101,114,115,47,103,108,115,108,37,105,47,98,108,117,114,46,102,115,0,40,99,41,32,68,119,97,114,102,32,51,68,32,109,111,100,101,108,32,98,121,32,68,97,118,105,100,32,77,111,114,101,110,111,0,67,85,82,82,69,78,84,32,80,79,83,84,80,82,79,32,83,72,65,68,69,82,58,0,60,32,62,0,71,82,65,89,83,67,65,76,69,0,80,79,83,84,69,82,73,90,65,84,73,79,78,0,68,82,69,65,77,95,86,73,83,73,79,78,0,80,73,88,69,76,73,90,69,82,0,67,82,79,83,83,95,72,65,84,67,72,73,78,71,0,67,82,79,83,83,95,83,84,73,84,67,72,73,78,71,0,80,82,69,68,65,84,79,82,95,86,73,69,87,0,83,67,65,78,76,73,78,69,83,0,70,73,83,72,69,89,69,0,83,79,66,69,76,0,66,76,79,79,77,0,66,76,85,82,0,5,5,4,0,2,3,7,0,3,3,11,0,91,37,115,93,32,114,82,69,83,32,114,97,121,108,105,98,32,114,101,115,111,117,114,99,101,32,102,105,108,101,32,99,111,117,108,100,32,110,111,116,32,98,101,32,111,112,101,110,101,100,0,91,37,115,93,32,84,104,105,115,32,105,115,32,110,111,116,32,97,32,118,97,108,105,100,32,114,97,121,108,105,98,32,114,101,115,111,117,114,99,101,32,102,105,108,101,0,91,37,115,93,91,73,68,32,37,105,93,32,82,101,115,111,117,114,99,101,32,100,97,116,97,32,108,111,97,100,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,91,37,115,93,91,73,68,32,37,105,93,32,82,101,113,117,101,115,116,101,100,32,114,101,115,111,117,114,99,101,32,99,111,117,108,100,32,110,111,116,32,98,101,32,102,111,117,110,100,0,79,117,116,32,111,102,32,109,101,109,111,114,121,32,119,104,105,108,101,32,100,101,99,111,109,112,114,101,115,115,105,110,103,32,100,97,116,97,0,68,97,116,97,32,100,101,99,111,109,112,114,101,115,115,105,111,110,32,102,97,105,108,101,100,0,69,120,112,101,99,116,101,100,32,117,110,99,111,109,112,114,101,115,115,101,100,32,115,105,122,101,32,100,111,32,110,111,116,32,109,97,116,99,104,44,32,100,97,116,97,32,109,97,121,32,98,101,32,99,111,114,114,117,112,116,101,100,0,32,45,45,32,69,120,112,101,99,116,101,100,32,117,110,99,111,109,112,114,101,115,115,101,100,32,115,105,122,101,58,32,37,105,0,32,45,45,32,82,101,116,117,114,110,101,100,32,117,110,99,111,109,112,114,101,115,115,101,100,32,115,105,122,101,58,32,37,105,0,68,97,116,97,32,100,101,99,111,109,112,114,101,115,115,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,102,114,111,109,32,37,117,32,98,121,116,101,115,32,116,111,32,37,117,32,98,121,116,101,115,0,73,78,70,79,58,32,0,87,65,82,78,73,78,71,58,32,0,91,84,69,88,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,102,111,110,116,32,108,111,97,100,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,91,84,69,88,32,73,68,32,37,105,93,32,80,97,114,97,109,101,116,101,114,115,58,32,37,105,120,37,105,44,32,37,105,32,109,105,112,115,44,32,102,111,114,109,97,116,32,37,105,0,68,88,84,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,32,102,111,114,109,97,116,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,69,84,67,49,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,32,102,111,114,109,97,116,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,69,84,67,50,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,32,102,111,114,109,97,116,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,80,86,82,84,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,32,102,111,114,109,97,116,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,83,84,67,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,32,102,111,114,109,97,116,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,84,101,120,116,117,114,101,32,102,111,114,109,97,116,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,91,84,69,88,32,73,68,32,37,105,93,32,84,101,120,116,117,114,101,32,99,114,101,97,116,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,37,105,120,37,105,41,0,73,109,97,103,101,32,100,97,116,97,32,102,111,114,109,97,116,32,105,115,32,99,111,109,112,114,101,115,115,101,100,44,32,99,97,110,32,110,111,116,32,98,101,32,99,111,110,118,101,114,116,101,100,0,70,111,114,109,97,116,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,102,111,114,32,112,105,120,101,108,32,100,97,116,97,32,114,101,116,114,105,101,118,97,108,0,91,84,69,88,32,73,68,32,37,105,93,32,85,110,108,111,97,100,101,100,32,116,101,120,116,117,114,101,32,100,97,116,97,32,102,114,111,109,32,86,82,65,77,32,40,71,80,85,41,0,46,114,114,101,115,0,91,37,115,93,32,82,101,115,111,117,114,99,101,32,102,105,108,101,32,100,111,101,115,32,110,111,116,32,99,111,110,116,97,105,110,32,105,109,97,103,101,32,100,97,116,97,0,46,112,110,103,0,114,98,0,46,104,100,114,0,91,37,115,93,32,73,109,97,103,101,32,102,105,108,101,102,111,114,109,97,116,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,40,111,110,108,121,32,51,32,99,104,97,110,110,101,108,32,51,50,32,98,105,116,32,102,108,111,97,116,115,41,0,91,37,115,93,32,73,109,97,103,101,32,102,105,108,101,102,111,114,109,97,116,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,91,37,115,93,32,73,109,97,103,101,32,108,111,97,100,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,37,105,120,37,105,41,0,91,37,115,93,32,73,109,97,103,101,32,99,111,117,108,100,32,110,111,116,32,98,101,32,108,111,97,100,101,100,0,117,110,107,110,111,119,110,32,105,109,97,103,101,32,116,121,112,101,0,111,117,116,111,102,109,101,109,0,114,105,46,98,105,116,115,95,112,101,114,95,99,104,97,110,110,101,108,32,61,61,32,49,54,0,46,47,101,120,116,101,114,110,97,108,47,115,116,98,95,105,109,97,103,101,46,104,0,115,116,98,105,95,95,108,111,97,100,95,97,110,100,95,112,111,115,116,112,114,111,99,101,115,115,95,56,98,105,116,0,98,97,100,32,114,101,113,95,99,111,109,112,0,114,101,113,95,99,111,109,112,32,62,61,32,49,32,38,38,32,114,101,113,95,99,111,109,112,32,60,61,32,52,0,115,116,98,105,95,95,99,111,110,118,101,114,116,95,102,111,114,109,97,116,49,54,0,48,0,115,116,98,105,95,95,99,111,110,118,101,114,116,95,102,111,114,109,97,116,0,109,117,108,116,105,112,108,101,32,73,72,68,82,0,98,97,100,32,73,72,68,82,32,108,101,110,0,116,111,111,32,108,97,114,103,101,0,49,47,50,47,52,47,56,47,49,54,45,98,105,116,32,111,110,108,121,0,98,97,100,32,99,116,121,112,101,0,98,97,100,32,99,111,109,112,32,109,101,116,104,111,100,0,98,97,100,32,102,105,108,116,101,114,32,109,101,116,104,111,100,0,98,97,100,32,105,110,116,101,114,108,97,99,101,32,109,101,116,104,111,100,0,48,45,112,105,120,101,108,32,105,109,97,103,101,0,102,105,114,115,116,32,110,111,116,32,73,72,68,82,0,105,110,118,97,108,105,100,32,80,76,84,69,0,116,82,78,83,32,97,102,116,101,114,32,73,68,65,84,0,116,82,78,83,32,98,101,102,111,114,101,32,80,76,84,69,0,98,97,100,32,116,82,78,83,32,108,101,110,0,116,82,78,83,32,119,105,116,104,32,97,108,112,104,97,0,0,255,85,0,17,0,0,0,1,110,111,32,80,76,84,69,0,111,117,116,111,102,100,97,116,97,0,110,111,32,73,68,65,84,0,88,88,88,88,32,80,78,71,32,99,104,117,110,107,32,110,111,116,32,107,110,111,119,110,0,115,45,62,105,109,103,95,111,117,116,95,110,32,61,61,32,52,0,115,116,98,105,95,95,100,101,95,105,112,104,111,110,101,0,111,117,116,95,110,32,61,61,32,50,32,124,124,32,111,117,116,95,110,32,61,61,32,52,0,115,116,98,105,95,95,99,111,109,112,117,116,101,95,116,114,97,110,115,112,97,114,101,110,99,121,0,115,116,98,105,95,95,99,111,109,112,117,116,101,95,116,114,97,110,115,112,97,114,101,110,99,121,49,54,0,111,117,116,95,110,32,61,61,32,115,45,62,105,109,103,95,110,32,124,124,32,111,117,116,95,110,32,61,61,32,115,45,62,105,109,103,95,110,43,49,0,115,116,98,105,95,95,99,114,101,97,116,101,95,112,110,103,95,105,109,97,103,101,95,114,97,119,0,110,111,116,32,101,110,111,117,103,104,32,112,105,120,101,108,115,0,105,109,103,95,119,105,100,116,104,95,98,121,116,101,115,32,60,61,32,120,0,0,1,0,5,6,105,109,103,95,110,43,49,32,61,61,32,111,117,116,95,110,0,105,110,118,97,108,105,100,32,102,105,108,116,101,114,0,105,109,103,95,110,32,61,61,32,51,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,98,97,100,32,104,117,102,102,109,97,110,32,99,111,100,101,0,98,97,100,32,100,105,115,116,0,111,117,116,112,117,116,32,98,117,102,102,101,114,32,108,105,109,105,116,0,122,45,62,115,105,122,101,91,98,93,32,61,61,32,115,0,115,116,98,105,95,95,122,104,117,102,102,109,97,110,95,100,101,99,111,100,101,95,115,108,111,119,112,97,116,104,0,98,105,116,115,32,60,61,32,49,54,0,115,116,98,105,95,95,98,105,116,95,114,101,118,101,114,115,101,0,122,45,62,99,111,100,101,95,98,117,102,102,101,114,32,60,32,40,49,85,32,60,60,32,122,45,62,110,117,109,95,98,105,116,115,41,0,115,116,98,105,95,95,102,105,108,108,95,98,105,116,115,0,16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15,98,97,100,32,99,111,100,101,108,101,110,103,116,104,115,0,99,32,61,61,32,49,56,0,115,116,98,105,95,95,99,111,109,112,117,116,101,95,104,117,102,102,109,97,110,95,99,111,100,101,115,0,98,97,100,32,115,105,122,101,115,0,97,45,62,110,117,109,95,98,105,116,115,32,61,61,32,48,0,115,116,98,105,95,95,112,97,114,115,101,95,117,110,99,111,109,112,114,101,115,115,101,100,95,98,108,111,99,107,0,122,108,105,98,32,99,111,114,114,117,112,116,0,114,101,97,100,32,112,97,115,116,32,98,117,102,102,101,114,0,98,97,100,32,122,108,105,98,32,104,101,97,100,101,114,0,110,111,32,112,114,101,115,101,116,32,100,105,99,116,0,98,97,100,32,99,111,109,112,114,101,115,115,105,111,110,0,98,97,100,32,112,110,103,32,115,105,103,0,35,63,82,65,68,73,65,78,67,69,0,35,63,82,71,66,69,0,110,111,116,32,72,68,82,0,70,79,82,77,65,84,61,51,50,45,98,105,116,95,114,108,101,95,114,103,98,101,0,117,110,115,117,112,112,111,114,116,101,100,32,102,111,114,109,97,116,0,45,89,32,0,117,110,115,117,112,112,111,114,116,101,100,32,100,97,116,97,32,108,97,121,111,117,116,0,43,88,32,0,105,110,118,97,108,105,100,32,100,101,99,111,100,101,100,32,115,99,97,110,108,105,110,101,32,108,101,110,103,116,104,0,99,111,114,114,117,112,116,0,35,63,82,65,68,73,65,78,67,69,10,0,35,63,82,71,66,69,10,0,73,109,97,103,101,32,102,111,114,109,97,116,32,110,111,116,32,114,101,99,111,103,110,105,122,101,100,0,77,65,88,95,76,73,78,69,83,95,66,65,84,67,72,32,111,118,101,114,102,108,111,119,0,77,65,88,95,84,82,73,65,78,71,76,69,83,95,66,65,84,67,72,32,111,118,101,114,102,108,111,119,0,77,65,88,95,81,85,65,68,83,95,66,65,84,67,72,32,111,118,101,114,102,108,111,119,0,83,116,97,99,107,32,66,117,102,102,101,114,32,79,118,101,114,102,108,111,119,32,40,77,65,88,32,37,105,32,77,97,116,114,105,120,41,0,37,50,105,32,70,80,83,0,84,101,120,116,117,114,101,32,99,111,117,108,100,32,110,111,116,32,98,101,32,99,114,101,97,116,101,100,0,70,114,97,109,101,98,117,102,102,101,114,32,111,98,106,101,99,116,32,99,111,117,108,100,32,110,111,116,32,98,101,32,99,114,101,97,116,101,100,46,46,46,0,70,114,97,109,101,98,117,102,102,101,114,32,105,115,32,117,110,115,117,112,112,111,114,116,101,100,0,70,114,97,109,101,98,117,102,102,101,114,32,105,110,99,111,109,112,108,101,116,101,32,97,116,116,97,99,104,109,101,110,116,0,70,114,97,109,101,98,117,102,102,101,114,32,105,110,99,111,109,112,108,101,116,101,32,100,105,109,101,110,115,105,111,110,115,0,70,114,97,109,101,98,117,102,102,101,114,32,105,110,99,111,109,112,108,101,116,101,32,109,105,115,115,105,110,103,32,97,116,116,97,99,104,109,101,110,116,0,91,70,66,79,32,73,68,32,37,105,93,32,70,114,97,109,101,98,117,102,102,101,114,32,111,98,106,101,99,116,32,99,114,101,97,116,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,46,111,98,106,0,77,101,115,104,32,99,111,117,108,100,32,110,111,116,32,98,101,32,108,111,97,100,101,100,0,91,86,65,79,32,73,68,32,37,105,93,32,77,101,115,104,32,117,112,108,111,97,100,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,116,111,32,86,82,65,77,32,40,71,80,85,41,0,77,101,115,104,32,99,111,117,108,100,32,110,111,116,32,98,101,32,117,112,108,111,97,100,101,100,32,116,111,32,86,82,65,77,32,40,71,80,85,41,0,91,86,66,79,115,93,32,77,101,115,104,32,117,112,108,111,97,100,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,116,111,32,86,82,65,77,32,40,71,80,85,41,0,91,37,115,93,32,79,66,74,32,102,105,108,101,32,99,111,117,108,100,32,110,111,116,32,98,101,32,111,112,101,110,101,100,0,37,99,0,91,37,115,93,32,77,111,100,101,108,32,118,101,114,116,105,99,101,115,58,32,37,105,0,91,37,115,93,32,77,111,100,101,108,32,116,101,120,99,111,111,114,100,115,58,32,37,105,0,91,37,115,93,32,77,111,100,101,108,32,110,111,114,109,97,108,115,58,32,37,105,0,91,37,115,93,32,77,111,100,101,108,32,116,114,105,97,110,103,108,101,115,58,32,37,105,0,37,102,32,37,102,37,42,91,94,10,93,115,10,0,37,102,32,37,102,32,37,102,0,91,37,115,93,32,78,111,32,110,111,114,109,97,108,115,32,100,97,116,97,32,111,110,32,79,66,74,44,32,110,111,114,109,97,108,115,32,119,105,108,108,32,98,101,32,103,101,110,101,114,97,116,101,100,32,102,114,111,109,32,102,97,99,101,115,32,100,97,116,97,0,37,105,32,37,105,32,37,105,0,37,105,47,37,105,32,37,105,47,37,105,32,37,105,47,37,105,0,37,105,47,47,37,105,32,37,105,47,47,37,105,32,37,105,47,47,37,105,0,37,105,47,37,105,47,37,105,32,37,105,47,37,105,47,37,105,32,37,105,47,37,105,47,37,105,0,91,37,115,93,32,77,111,100,101,108,32,108,111,97,100,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,105,110,32,82,65,77,32,40,67,80,85,41,0,91,86,65,79,32,73,68,32,37,105,93,32,85,110,108,111,97,100,101,100,32,109,111,100,101,108,32,100,97,116,97,32,102,114,111,109,32,86,82,65,77,32,40,71,80,85,41,0,91,86,66,79,32,73,68,32,37,105,93,32,85,110,108,111,97,100,101,100,32,109,111,100,101,108,32,118,101,114,116,101,120,32,100,97,116,97,32,102,114,111,109,32,86,82,65,77,32,40,71,80,85,41,0,85,110,108,111,97,100,101,100,32,109,111,100,101,108,32,100,97,116,97,32,40,109,101,115,104,32,97,110,100,32,109,97,116,101,114,105,97,108,41,32,102,114,111,109,32,82,65,77,32,97,110,100,32,86,82,65,77,0,109,111,100,101,108,77,97,116,114,105,120,0,118,105,101,119,68,105,114,0,103,108,111,115,115,105,110,101,115,115,0,117,115,101,78,111,114,109,97,108,0,117,115,101,83,112,101,99,117,108,97,114,0,73,110,105,116,105,97,108,105,122,105,110,103,32,114,97,121,108,105,98,32,40,118,49,46,55,46,48,41,0,35,99,97,110,118,97,115,0,84,97,114,103,101,116,32,116,105,109,101,32,112,101,114,32,102,114,97,109,101,58,32,37,48,50,46,48,51,102,32,109,105,108,108,105,115,101,99,111,110,100,115,0,69,115,99,97,112,101,0,67,97,110,118,97,115,32,115,99,97,108,101,100,32,116,111,32,102,117,108,108,115,99,114,101,101,110,46,32,69,108,101,109,101,110,116,83,105,122,101,58,32,40,37,105,120,37,105,41,44,32,83,99,114,101,101,110,83,105,122,101,40,37,105,120,37,105,41,0,67,97,110,118,97,115,32,115,99,97,108,101,100,32,116,111,32,119,105,110,100,111,119,101,100,46,32,69,108,101,109,101,110,116,83,105,122,101,58,32,40,37,105,120,37,105,41,44,32,83,99,114,101,101,110,83,105,122,101,40,37,105,120,37,105,41,0,70,97,105,108,101,100,32,116,111,32,105,110,105,116,105,97,108,105,122,101,32,71,76,70,87,0,84,114,121,105,110,103,32,116,111,32,101,110,97,98,108,101,32,77,83,65,65,32,120,52,0,67,108,111,115,101,115,116,32,102,117,108,108,115,99,114,101,101,110,32,118,105,100,101,111,109,111,100,101,58,32,37,105,32,120,32,37,105,0,71,76,70,87,32,70,97,105,108,101,100,32,116,111,32,105,110,105,116,105,97,108,105,122,101,32,87,105,110,100,111,119,0,68,105,115,112,108,97,121,32,100,101,118,105,99,101,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,82,101,110,100,101,114,32,115,105,122,101,58,32,37,105,32,120,32,37,105,0,83,99,114,101,101,110,32,115,105,122,101,58,32,37,105,32,120,32,37,105,0,86,105,101,119,112,111,114,116,32,111,102,102,115,101,116,115,58,32,37,105,44,32,37,105,0,84,114,121,105,110,103,32,116,111,32,101,110,97,98,108,101,32,86,83,89,78,67,0,71,80,85,58,32,86,101,110,100,111,114,58,32,32,32,37,115,0,71,80,85,58,32,82,101,110,100,101,114,101,114,58,32,37,115,0,71,80,85,58,32,86,101,114,115,105,111,110,58,32,32,37,115,0,71,80,85,58,32,71,76,83,76,58,32,32,32,32,32,37,115,0,32,0,78,117,109,98,101,114,32,111,102,32,115,117,112,112,111,114,116,101,100,32,101,120,116,101,110,115,105,111,110,115,58,32,37,105,0,71,76,95,79,69,83,95,118,101,114,116,101,120,95,97,114,114,97,121,95,111,98,106,101,99,116,0,103,108,71,101,110,86,101,114,116,101,120,65,114,114,97,121,115,79,69,83,0,103,108,66,105,110,100,86,101,114,116,101,120,65,114,114,97,121,79,69,83,0,103,108,68,101,108,101,116,101,86,101,114,116,101,120,65,114,114,97,121,115,79,69,83,0,71,76,95,79,69,83,95,116,101,120,116,117,114,101,95,110,112,111,116,0,79,69,83,95,116,101,120,116,117,114,101,95,102,108,111,97,116,0,71,76,95,69,88,84,95,116,101,120,116,117,114,101,95,99,111,109,112,114,101,115,115,105,111,110,95,115,51,116,99,0,71,76,95,87,69,66,71,76,95,99,111,109,112,114,101,115,115,101,100,95,116,101,120,116,117,114,101,95,115,51,116,99,0,71,76,95,87,69,66,75,73,84,95,87,69,66,71,76,95,99,111,109,112,114,101,115,115,101,100,95,116,101,120,116,117,114,101,95,115,51,116,99,0,71,76,95,79,69,83,95,99,111,109,112,114,101,115,115,101,100,95,69,84,67,49,95,82,71,66,56,95,116,101,120,116,117,114,101,0,71,76,95,87,69,66,71,76,95,99,111,109,112,114,101,115,115,101,100,95,116,101,120,116,117,114,101,95,101,116,99,49,0,71,76,95,65,82,66,95,69,83,51,95,99,111,109,112,97,116], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE); +/* memory initializer */ allocate([105,98,105,108,105,116,121,0,71,76,95,73,77,71,95,116,101,120,116,117,114,101,95,99,111,109,112,114,101,115,115,105,111,110,95,112,118,114,116,99,0,71,76,95,75,72,82,95,116,101,120,116,117,114,101,95,99,111,109,112,114,101,115,115,105,111,110,95,97,115,116,99,95,104,100,114,0,71,76,95,69,88,84,95,116,101,120,116,117,114,101,95,102,105,108,116,101,114,95,97,110,105,115,111,116,114,111,112,105,99,0,71,76,95,69,88,84,95,116,101,120,116,117,114,101,95,109,105,114,114,111,114,95,99,108,97,109,112,0,91,69,88,84,69,78,83,73,79,78,93,32,86,65,79,32,101,120,116,101,110,115,105,111,110,32,100,101,116,101,99,116,101,100,44,32,86,65,79,32,102,117,110,99,116,105,111,110,115,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,91,69,88,84,69,78,83,73,79,78,93,32,86,65,79,32,101,120,116,101,110,115,105,111,110,32,110,111,116,32,102,111,117,110,100,44,32,86,65,79,32,117,115,97,103,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,91,69,88,84,69,78,83,73,79,78,93,32,78,80,79,84,32,116,101,120,116,117,114,101,115,32,101,120,116,101,110,115,105,111,110,32,100,101,116,101,99,116,101,100,44,32,102,117,108,108,32,78,80,79,84,32,116,101,120,116,117,114,101,115,32,115,117,112,112,111,114,116,101,100,0,91,69,88,84,69,78,83,73,79,78,93,32,78,80,79,84,32,116,101,120,116,117,114,101,115,32,101,120,116,101,110,115,105,111,110,32,110,111,116,32,102,111,117,110,100,44,32,108,105,109,105,116,101,100,32,78,80,79,84,32,115,117,112,112,111,114,116,32,40,110,111,45,109,105,112,109,97,112,115,44,32,110,111,45,114,101,112,101,97,116,41,0,91,69,88,84,69,78,83,73,79,78,93,32,68,88,84,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,115,32,115,117,112,112,111,114,116,101,100,0,91,69,88,84,69,78,83,73,79,78,93,32,69,84,67,49,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,115,32,115,117,112,112,111,114,116,101,100,0,91,69,88,84,69,78,83,73,79,78,93,32,69,84,67,50,47,69,65,67,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,115,32,115,117,112,112,111,114,116,101,100,0,91,69,88,84,69,78,83,73,79,78,93,32,80,86,82,84,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,115,32,115,117,112,112,111,114,116,101,100,0,91,69,88,84,69,78,83,73,79,78,93,32,65,83,84,67,32,99,111,109,112,114,101,115,115,101,100,32,116,101,120,116,117,114,101,115,32,115,117,112,112,111,114,116,101,100,0,91,69,88,84,69,78,83,73,79,78,93,32,65,110,105,115,111,116,114,111,112,105,99,32,116,101,120,116,117,114,101,115,32,102,105,108,116,101,114,105,110,103,32,115,117,112,112,111,114,116,101,100,32,40,109,97,120,58,32,37,46,48,102,88,41,0,91,69,88,84,69,78,83,73,79,78,93,32,67,108,97,109,112,32,109,105,114,114,111,114,32,119,114,97,112,32,116,101,120,116,117,114,101,32,109,111,100,101,32,115,117,112,112,111,114,116,101,100,0,91,84,69,88,32,73,68,32,37,105,93,32,66,97,115,101,32,119,104,105,116,101,32,116,101,120,116,117,114,101,32,108,111,97,100,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,66,97,115,101,32,119,104,105,116,101,32,116,101,120,116,117,114,101,32,99,111,117,108,100,32,110,111,116,32,98,101,32,108,111,97,100,101,100,0,79,112,101,110,71,76,32,100,101,102,97,117,108,116,32,115,116,97,116,101,115,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,91,67,80,85,93,32,68,101,102,97,117,108,116,32,98,117,102,102,101,114,115,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,108,105,110,101,115,44,32,116,114,105,97,110,103,108,101,115,44,32,113,117,97,100,115,41,0,91,86,65,79,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,98,117,102,102,101,114,115,32,86,65,79,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,108,105,110,101,115,41,0,91,86,66,79,32,73,68,32,37,105,93,91,86,66,79,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,98,117,102,102,101,114,115,32,86,66,79,115,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,108,105,110,101,115,41,0,91,86,65,79,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,98,117,102,102,101,114,115,32,86,65,79,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,116,114,105,97,110,103,108,101,115,41,0,91,86,66,79,32,73,68,32,37,105,93,91,86,66,79,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,98,117,102,102,101,114,115,32,86,66,79,115,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,116,114,105,97,110,103,108,101,115,41,0,91,86,65,79,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,98,117,102,102,101,114,115,32,86,65,79,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,113,117,97,100,115,41,0,91,86,66,79,32,73,68,32,37,105,93,91,86,66,79,32,73,68,32,37,105,93,91,86,66,79,32,73,68,32,37,105,93,91,86,66,79,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,98,117,102,102,101,114,115,32,86,66,79,115,32,105,110,105,116,105,97,108,105,122,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,32,40,113,117,97,100,115,41,0,35,118,101,114,115,105,111,110,32,49,48,48,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,97,116,116,114,105,98,117,116,101,32,118,101,99,51,32,118,101,114,116,101,120,80,111,115,105,116,105,111,110,59,32,32,32,32,32,10,97,116,116,114,105,98,117,116,101,32,118,101,99,50,32,118,101,114,116,101,120,84,101,120,67,111,111,114,100,59,32,32,32,32,32,10,97,116,116,114,105,98,117,116,101,32,118,101,99,52,32,118,101,114,116,101,120,67,111,108,111,114,59,32,32,32,32,32,32,32,32,10,118,97,114,121,105,110,103,32,118,101,99,50,32,102,114,97,103,84,101,120,67,111,111,114,100,59,32,32,32,32,32,32,32,32,32,10,118,97,114,121,105,110,103,32,118,101,99,52,32,102,114,97,103,67,111,108,111,114,59,32,32,32,32,32,32,32,32,32,32,32,32,10,117,110,105,102,111,114,109,32,109,97,116,52,32,109,118,112,77,97,116,114,105,120,59,32,32,32,32,32,32,32,32,32,32,32,32,10,118,111,105,100,32,109,97,105,110,40,41,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,123,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,32,32,32,32,102,114,97,103,84,101,120,67,111,111,114,100,32,61,32,118,101,114,116,101,120,84,101,120,67,111,111,114,100,59,32,10,32,32,32,32,102,114,97,103,67,111,108,111,114,32,61,32,118,101,114,116,101,120,67,111,108,111,114,59,32,32,32,32,32,32,32,10,32,32,32,32,103,108,95,80,111,115,105,116,105,111,110,32,61,32,109,118,112,77,97,116,114,105,120,42,118,101,99,52,40,118,101,114,116,101,120,80,111,115,105,116,105,111,110,44,32,49,46,48,41,59,32,10,125,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,0,35,118,101,114,115,105,111,110,32,49,48,48,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,112,114,101,99,105,115,105,111,110,32,109,101,100,105,117,109,112,32,102,108,111,97,116,59,32,32,32,32,32,32,32,32,32,32,32,10,118,97,114,121,105,110,103,32,118,101,99,50,32,102,114,97,103,84,101,120,67,111,111,114,100,59,32,32,32,32,32,32,32,32,32,10,118,97,114,121,105,110,103,32,118,101,99,52,32,102,114,97,103,67,111,108,111,114,59,32,32,32,32,32,32,32,32,32,32,32,32,10,117,110,105,102,111,114,109,32,115,97,109,112,108,101,114,50,68,32,116,101,120,116,117,114,101,48,59,32,32,32,32,32,32,32,32,10,117,110,105,102,111,114,109,32,118,101,99,52,32,99,111,108,68,105,102,102,117,115,101,59,32,32,32,32,32,32,32,32,32,32,32,10,118,111,105,100,32,109,97,105,110,40,41,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,123,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,32,32,32,32,118,101,99,52,32,116,101,120,101,108,67,111,108,111,114,32,61,32,116,101,120,116,117,114,101,50,68,40,116,101,120,116,117,114,101,48,44,32,102,114,97,103,84,101,120,67,111,111,114,100,41,59,32,10,32,32,32,32,103,108,95,70,114,97,103,67,111,108,111,114,32,61,32,116,101,120,101,108,67,111,108,111,114,42,99,111,108,68,105,102,102,117,115,101,42,102,114,97,103,67,111,108,111,114,59,32,32,32,32,32,32,10,125,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,10,0,91,83,72,68,82,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,115,104,97,100,101,114,32,108,111,97,100,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,91,83,72,68,82,32,73,68,32,37,105,93,32,68,101,102,97,117,108,116,32,115,104,97,100,101,114,32,99,111,117,108,100,32,110,111,116,32,98,101,32,108,111,97,100,101,100,0,118,101,114,116,101,120,80,111,115,105,116,105,111,110,0,118,101,114,116,101,120,84,101,120,67,111,111,114,100,0,118,101,114,116,101,120,84,101,120,67,111,111,114,100,50,0,118,101,114,116,101,120,78,111,114,109,97,108,0,118,101,114,116,101,120,84,97,110,103,101,110,116,0,118,101,114,116,101,120,67,111,108,111,114,0,109,118,112,77,97,116,114,105,120,0,99,111,108,68,105,102,102,117,115,101,0,99,111,108,65,109,98,105,101,110,116,0,99,111,108,83,112,101,99,117,108,97,114,0,116,101,120,116,117,114,101,48,0,116,101,120,116,117,114,101,49,0,116,101,120,116,117,114,101,50,0,91,86,83,72,68,82,32,73,68,32,37,105,93,32,70,97,105,108,101,100,32,116,111,32,99,111,109,112,105,108,101,32,118,101,114,116,101,120,32,115,104,97,100,101,114,46,46,46,0,37,115,0,91,86,83,72,68,82,32,73,68,32,37,105,93,32,86,101,114,116,101,120,32,115,104,97,100,101,114,32,99,111,109,112,105,108,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,91,70,83,72,68,82,32,73,68,32,37,105,93,32,70,97,105,108,101,100,32,116,111,32,99,111,109,112,105,108,101,32,102,114,97,103,109,101,110,116,32,115,104,97,100,101,114,46,46,46,0,91,70,83,72,68,82,32,73,68,32,37,105,93,32,70,114,97,103,109,101,110,116,32,115,104,97,100,101,114,32,99,111,109,112,105,108,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,91,83,72,68,82,32,73,68,32,37,105,93,32,70,97,105,108,101,100,32,116,111,32,108,105,110,107,32,115,104,97,100,101,114,32,112,114,111,103,114,97,109,46,46,46,0,91,83,72,68,82,32,73,68,32,37,105,93,32,83,104,97,100,101,114,32,112,114,111,103,114,97,109,32,108,111,97,100,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,68,79,87,78,83,67,65,76,73,78,71,58,32,82,101,113,117,105,114,101,100,32,115,99,114,101,101,110,32,115,105,122,101,32,40,37,105,120,37,105,41,32,105,115,32,98,105,103,103,101,114,32,116,104,97,110,32,100,105,115,112,108,97,121,32,115,105,122,101,32,40,37,105,120,37,105,41,0,68,111,119,110,115,99,97,108,101,32,109,97,116,114,105,120,32,103,101,110,101,114,97,116,101,100,44,32,99,111,110,116,101,110,116,32,119,105,108,108,32,98,101,32,114,101,110,100,101,114,101,100,32,97,116,58,32,37,105,32,120,32,37,105,0,85,80,83,67,65,76,73,78,71,58,32,82,101,113,117,105,114,101,100,32,115,99,114,101,101,110,32,115,105,122,101,58,32,37,105,32,120,32,37,105,32,45,62,32,68,105,115,112,108,97,121,32,115,105,122,101,58,32,37,105,32,120,32,37,105,0,91,71,76,70,87,51,32,69,114,114,111,114,93,32,67,111,100,101,58,32,37,105,32,68,101,99,114,105,112,116,105,111,110,58,32,37,115,0,87,105,110,100,111,119,32,99,108,111,115,101,100,32,115,117,99,99,101,115,115,102,117,108,108,121,0,91,84,69,88,32,73,68,32,37,105,93,32,85,110,108,111,97,100,101,100,32,116,101,120,116,117,114,101,32,100,97,116,97,32,40,98,97,115,101,32,119,104,105,116,101,32,116,101,120,116,117,114,101,41,32,102,114,111,109,32,86,82,65,77,0,114,116,0,91,37,115,93,32,84,101,120,116,32,102,105,108,101,32,99,111,117,108,100,32,110,111,116,32,98,101,32,111,112,101,110,101,100,0,67,117,115,116,111,109,32,115,104,97,100,101,114,32,99,111,117,108,100,32,110,111,116,32,98,101,32,108,111,97,100,101,100,0,91,83,72,68,82,32,73,68,32,37,105,93,32,85,110,108,111,97,100,101,100,32,115,104,97,100,101,114,32,112,114,111,103,114,97,109,32,100,97,116,97,0,69,88,84,0,65,82,66,0,79,69,83,0,65,78,71,76,69,0,103,108,67,114,101,97,116,101,80,114,111,103,114,97,109,79,98,106,101,99,116,0,103,108,67,114,101,97,116,101,80,114,111,103,114,97,109,0,103,108,85,115,101,80,114,111,103,114,97,109,79,98,106,101,99,116,0,103,108,85,115,101,80,114,111,103,114,97,109,0,103,108,67,114,101,97,116,101,83,104,97,100,101,114,79,98,106,101,99,116,0,103,108,67,114,101,97,116,101,83,104,97,100,101,114,0,103,108,65,116,116,97,99,104,79,98,106,101,99,116,0,103,108,65,116,116,97,99,104,83,104,97,100,101,114,0,103,108,68,101,116,97,99,104,79,98,106,101,99,116,0,103,108,68,101,116,97,99,104,83,104,97,100,101,114,0,103,108,80,105,120,101,108,83,116,111,114,101,105,0,103,108,71,101,116,83,116,114,105,110,103,0,103,108,71,101,116,73,110,116,101,103,101,114,118,0,103,108,71,101,116,70,108,111,97,116,118,0,103,108,71,101,116,66,111,111,108,101,97,110,118,0,103,108,71,101,110,84,101,120,116,117,114,101,115,0,103,108,68,101,108,101,116,101,84,101,120,116,117,114,101,115,0,103,108,67,111,109,112,114,101,115,115,101,100,84,101,120,73,109,97,103,101,50,68,0,103,108,67,111,109,112,114,101,115,115,101,100,84,101,120,83,117,98,73,109,97,103,101,50,68,0,103,108,84,101,120,73,109,97,103,101,50,68,0,103,108,84,101,120,83,117,98,73,109,97,103,101,50,68,0,103,108,82,101,97,100,80,105,120,101,108,115,0,103,108,66,105,110,100,84,101,120,116,117,114,101,0,103,108,71,101,116,84,101,120,80,97,114,97,109,101,116,101,114,102,118,0,103,108,71,101,116,84,101,120,80,97,114,97,109,101,116,101,114,105,118,0,103,108,84,101,120,80,97,114,97,109,101,116,101,114,102,118,0,103,108,84,101,120,80,97,114,97,109,101,116,101,114,105,118,0,103,108,73,115,84,101,120,116,117,114,101,0,103,108,71,101,110,66,117,102,102,101,114,115,0,103,108,68,101,108,101,116,101,66,117,102,102,101,114,115,0,103,108,71,101,116,66,117,102,102,101,114,80,97,114,97,109,101,116,101,114,105,118,0,103,108,66,117,102,102,101,114,68,97,116,97,0,103,108,66,117,102,102,101,114,83,117,98,68,97,116,97,0,103,108,73,115,66,117,102,102,101,114,0,103,108,71,101,110,82,101,110,100,101,114,98,117,102,102,101,114,115,0,103,108,68,101,108,101,116,101,82,101,110,100,101,114,98,117,102,102,101,114,115,0,103,108,66,105,110,100,82,101,110,100,101,114,98,117,102,102,101,114,0,103,108,71,101,116,82,101,110,100,101,114,98,117,102,102,101,114,80,97,114,97,109,101,116,101,114,105,118,0,103,108,73,115,82,101,110,100,101,114,98,117,102,102,101,114,0,103,108,71,101,116,85,110,105,102,111,114,109,102,118,0,103,108,71,101,116,85,110,105,102,111,114,109,105,118,0,103,108,71,101,116,85,110,105,102,111,114,109,76,111,99,97,116,105,111,110,0,103,108,71,101,116,86,101,114,116,101,120,65,116,116,114,105,98,102,118,0,103,108,71,101,116,86,101,114,116,101,120,65,116,116,114,105,98,105,118,0,103,108,71,101,116,86,101,114,116,101,120,65,116,116,114,105,98,80,111,105,110,116,101,114,118,0,103,108,71,101,116,65,99,116,105,118,101,85,110,105,102,111,114,109,0,103,108,85,110,105,102,111,114,109,49,102,0,103,108,85,110,105,102,111,114,109,50,102,0,103,108,85,110,105,102,111,114,109,51,102,0,103,108,85,110,105,102,111,114,109,52,102,0,103,108,85,110,105,102,111,114,109,49,105,0,103,108,85,110,105,102,111,114,109,50,105,0,103,108,85,110,105,102,111,114,109,51,105,0,103,108,85,110,105,102,111,114,109,52,105,0,103,108,85,110,105,102,111,114,109,49,105,118,0,103,108,85,110,105,102,111,114,109,50,105,118,0,103,108,85,110,105,102,111,114,109,51,105,118,0,103,108,85,110,105,102,111,114,109,52,105,118,0,103,108,85,110,105,102,111,114,109,49,102,118,0,103,108,85,110,105,102,111,114,109,50,102,118,0,103,108,85,110,105,102,111,114,109,51,102,118,0,103,108,85,110,105,102,111,114,109,52,102,118,0,103,108,85,110,105,102,111,114,109,77,97,116,114,105,120,50,102,118,0,103,108,85,110,105,102,111,114,109,77,97,116,114,105,120,51,102,118,0,103,108,85,110,105,102,111,114,109,77,97,116,114,105,120,52,102,118,0,103,108,66,105,110,100,66,117,102,102,101,114,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,49,102,118,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,50,102,118,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,51,102,118,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,52,102,118,0,103,108,71,101,116,65,116,116,114,105,98,76,111,99,97,116,105,111,110,0,103,108,71,101,116,65,99,116,105,118,101,65,116,116,114,105,98,0,103,108,68,101,108,101,116,101,83,104,97,100,101,114,0,103,108,71,101,116,65,116,116,97,99,104,101,100,83,104,97,100,101,114,115,0,103,108,83,104,97,100,101,114,83,111,117,114,99,101,0,103,108,71,101,116,83,104,97,100,101,114,83,111,117,114,99,101,0,103,108,67,111,109,112,105,108,101,83,104,97,100,101,114,0,103,108,71,101,116,83,104,97,100,101,114,73,110,102,111,76,111,103,0,103,108,71,101,116,83,104,97,100,101,114,105,118,0,103,108,71,101,116,80,114,111,103,114,97,109,105,118,0,103,108,73,115,83,104,97,100,101,114,0,103,108,68,101,108,101,116,101,80,114,111,103,114,97,109,0,103,108,71,101,116,83,104,97,100,101,114,80,114,101,99,105,115,105,111,110,70,111,114,109,97,116,0,103,108,76,105,110,107,80,114,111,103,114,97,109,0,103,108,71,101,116,80,114,111,103,114,97,109,73,110,102,111,76,111,103,0,103,108,86,97,108,105,100,97,116,101,80,114,111,103,114,97,109,0,103,108,73,115,80,114,111,103,114,97,109,0,103,108,66,105,110,100,65,116,116,114,105,98,76,111,99,97,116,105,111,110,0,103,108,66,105,110,100,70,114,97,109,101,98,117,102,102,101,114,0,103,108,71,101,110,70,114,97,109,101,98,117,102,102,101,114,115,0,103,108,68,101,108,101,116,101,70,114,97,109,101,98,117,102,102,101,114,115,0,103,108,70,114,97,109,101,98,117,102,102,101,114,82,101,110,100,101,114,98,117,102,102,101,114,0,103,108,70,114,97,109,101,98,117,102,102,101,114,84,101,120,116,117,114,101,50,68,0,103,108,71,101,116,70,114,97,109,101,98,117,102,102,101,114,65,116,116,97,99,104,109,101,110,116,80,97,114,97,109,101,116,101,114,105,118,0,103,108,73,115,70,114,97,109,101,98,117,102,102,101,114,0,103,108,68,101,108,101,116,101,79,98,106,101,99,116,0,103,108,71,101,116,79,98,106,101,99,116,80,97,114,97,109,101,116,101,114,105,118,0,103,108,71,101,116,73,110,102,111,76,111,103,0,103,108,66,105,110,100,80,114,111,103,114,97,109,0,103,108,71,101,116,80,111,105,110,116,101,114,118,0,103,108,68,114,97,119,82,97,110,103,101,69,108,101,109,101,110,116,115,0,103,108,69,110,97,98,108,101,67,108,105,101,110,116,83,116,97,116,101,0,103,108,86,101,114,116,101,120,80,111,105,110,116,101,114,0,103,108,84,101,120,67,111,111,114,100,80,111,105,110,116,101,114,0,103,108,78,111,114,109,97,108,80,111,105,110,116,101,114,0,103,108,67,111,108,111,114,80,111,105,110,116,101,114,0,103,108,67,108,105,101,110,116,65,99,116,105,118,101,84,101,120,116,117,114,101,0,103,108,71,101,110,86,101,114,116,101,120,65,114,114,97,121,115,0,103,108,68,101,108,101,116,101,86,101,114,116,101,120,65,114,114,97,121,115,0,103,108,66,105,110,100,86,101,114,116,101,120,65,114,114,97,121,0,103,108,77,97,116,114,105,120,77,111,100,101,0,103,108,76,111,97,100,73,100,101,110,116,105,116,121,0,103,108,76,111,97,100,77,97,116,114,105,120,102,0,103,108,70,114,117,115,116,117,109,0,103,108,82,111,116,97,116,101,102,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,80,111,105,110,116,101,114,0,103,108,69,110,97,98,108,101,86,101,114,116,101,120,65,116,116,114,105,98,65,114,114,97,121,0,103,108,68,105,115,97,98,108,101,86,101,114,116,101,120,65,116,116,114,105,98,65,114,114,97,121,0,103,108,68,114,97,119,65,114,114,97,121,115,0,103,108,68,114,97,119,69,108,101,109,101,110,116,115,0,103,108,83,104,97,100,101,114,66,105,110,97,114,121,0,103,108,82,101,108,101,97,115,101,83,104,97,100,101,114,67,111,109,112,105,108,101,114,0,103,108,71,101,116,69,114,114,111,114,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,68,105,118,105,115,111,114,0,103,108,68,114,97,119,65,114,114,97,121,115,73,110,115,116,97,110,99,101,100,0,103,108,68,114,97,119,69,108,101,109,101,110,116,115,73,110,115,116,97,110,99,101,100,0,103,108,70,105,110,105,115,104,0,103,108,70,108,117,115,104,0,103,108,67,108,101,97,114,68,101,112,116,104,0,103,108,67,108,101,97,114,68,101,112,116,104,102,0,103,108,68,101,112,116,104,70,117,110,99,0,103,108,69,110,97,98,108,101,0,103,108,68,105,115,97,98,108,101,0,103,108,70,114,111,110,116,70,97,99,101,0,103,108,67,117,108,108,70,97,99,101,0,103,108,67,108,101,97,114,0,103,108,76,105,110,101,87,105,100,116,104,0,103,108,67,108,101,97,114,83,116,101,110,99,105,108,0,103,108,68,101,112,116,104,77,97,115,107,0,103,108,83,116,101,110,99,105,108,77,97,115,107,0,103,108,67,104,101,99,107,70,114,97,109,101,98,117,102,102,101,114,83,116,97,116,117,115,0,103,108,71,101,110,101,114,97,116,101,77,105,112,109,97,112,0,103,108,65,99,116,105,118,101,84,101,120,116,117,114,101,0,103,108,66,108,101,110,100,69,113,117,97,116,105,111,110,0,103,108,73,115,69,110,97,98,108,101,100,0,103,108,66,108,101,110,100,70,117,110,99,0,103,108,66,108,101,110,100,69,113,117,97,116,105,111,110,83,101,112,97,114,97,116,101,0,103,108,68,101,112,116,104,82,97,110,103,101,0,103,108,68,101,112,116,104,82,97,110,103,101,102,0,103,108,83,116,101,110,99,105,108,77,97,115,107,83,101,112,97,114,97,116,101,0,103,108,72,105,110,116,0,103,108,80,111,108,121,103,111,110,79,102,102,115,101,116,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,49,102,0,103,108,83,97,109,112,108,101,67,111,118,101,114,97,103,101,0,103,108,84,101,120,80,97,114,97,109,101,116,101,114,105,0,103,108,84,101,120,80,97,114,97,109,101,116,101,114,102,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,50,102,0,103,108,83,116,101,110,99,105,108,70,117,110,99,0,103,108,83,116,101,110,99,105,108,79,112,0,103,108,86,105,101,119,112,111,114,116,0,103,108,67,108,101,97,114,67,111,108,111,114,0,103,108,83,99,105,115,115,111,114,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,51,102,0,103,108,67,111,108,111,114,77,97,115,107,0,103,108,82,101,110,100,101,114,98,117,102,102,101,114,83,116,111,114,97,103,101,0,103,108,66,108,101,110,100,70,117,110,99,83,101,112,97,114,97,116,101,0,103,108,66,108,101,110,100,67,111,108,111,114,0,103,108,83,116,101,110,99,105,108,70,117,110,99,83,101,112,97,114,97,116,101,0,103,108,83,116,101,110,99,105,108,79,112,83,101,112,97,114,97,116,101,0,103,108,86,101,114,116,101,120,65,116,116,114,105,98,52,102,0,103,108,67,111,112,121,84,101,120,73,109,97,103,101,50,68,0,103,108,67,111,112,121,84,101,120,83,117,98,73,109,97,103,101,50,68,0,103,108,68,114,97,119,66,117,102,102,101,114,115,0,123,32,77,111,100,117,108,101,46,112,114,105,110,116,69,114,114,40,39,98,97,100,32,110,97,109,101,32,105,110,32,103,101,116,80,114,111,99,65,100,100,114,101,115,115,58,32,39,32,43,32,91,80,111,105,110,116,101,114,95,115,116,114,105,110,103,105,102,121,40,36,48,41,44,32,80,111,105,110,116,101,114,95,115,116,114,105,110,103,105,102,121,40,36,49,41,93,41,59,32,125,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,1,2,3,4,5,6,7,8,9,255,255,255,255,255,255,255,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,255,255,255,255,255,255,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,1,2,4,7,3,6,5,0,17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,78,65,78,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,46,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116,32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0,105,110,102,105,110,105,116,121,0,110,97,110,0,114,119,97,0], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE+10240); @@ -7617,6 +7617,8 @@ function copyTempDouble(ptr) { return 0; } + var _llvm_pow_f64=Math_pow; + function _emscripten_glCopyTexImage2D(x0, x1, x2, x3, x4, x5, x6, x7) { GLctx['copyTexImage2D'](x0, x1, x2, x3, x4, x5, x6, x7) } function _emscripten_glTexParameterfv(target, pname, params) { @@ -8090,16 +8092,9 @@ function copyTempDouble(ptr) { return JSEvents.lastGamepadState.length; } - function _glGetProgramInfoLog(program, maxLength, length, infoLog) { - var log = GLctx.getProgramInfoLog(GL.programs[program]); - if (log === null) log = '(unknown error)'; - - if (maxLength > 0 && infoLog) { - var numBytesWrittenExclNull = stringToUTF8(log, infoLog, maxLength); - if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; - } else { - if (length) HEAP32[((length)>>2)]=0; - } + function ___assert_fail(condition, filename, line, func) { + ABORT = true; + throw 'Assertion failed: ' + Pointer_stringify(condition) + ', at: ' + [filename ? Pointer_stringify(filename) : 'unknown filename', line, func ? Pointer_stringify(func) : 'unknown function'] + ' at ' + stackTrace(); } function _emscripten_glUniform4iv(location, count, value) { @@ -8571,22 +8566,8 @@ function copyTempDouble(ptr) { GLctx.uniform1fv(GL.uniforms[location], view); } - function _glDeleteBuffers(n, buffers) { - for (var i = 0; i < n; i++) { - var id = HEAP32[(((buffers)+(i*4))>>2)]; - var buffer = GL.buffers[id]; - - // From spec: "glDeleteBuffers silently ignores 0's and names that do not - // correspond to existing buffer objects." - if (!buffer) continue; - - GLctx.deleteBuffer(buffer); - buffer.name = 0; - GL.buffers[id] = null; - - if (id == GL.currArrayBuffer) GL.currArrayBuffer = 0; - if (id == GL.currElementArrayBuffer) GL.currElementArrayBuffer = 0; - } + function _glfwSetMouseButtonCallback(winid, cbfun) { + GLFW.setMouseButtonCallback(winid, cbfun); } function _emscripten_set_gamepaddisconnected_callback(userData, useCapture, callbackfunc) { @@ -9501,9 +9482,16 @@ function copyTempDouble(ptr) { GLctx.texImage2D(target, level, internalFormat, width, height, border, format, type, pixelData); } - function ___assert_fail(condition, filename, line, func) { - ABORT = true; - throw 'Assertion failed: ' + Pointer_stringify(condition) + ', at: ' + [filename ? Pointer_stringify(filename) : 'unknown filename', line, func ? Pointer_stringify(func) : 'unknown function'] + ' at ' + stackTrace(); + function _glGetProgramInfoLog(program, maxLength, length, infoLog) { + var log = GLctx.getProgramInfoLog(GL.programs[program]); + if (log === null) log = '(unknown error)'; + + if (maxLength > 0 && infoLog) { + var numBytesWrittenExclNull = stringToUTF8(log, infoLog, maxLength); + if (length) HEAP32[((length)>>2)]=numBytesWrittenExclNull; + } else { + if (length) HEAP32[((length)>>2)]=0; + } } function _emscripten_glVertexAttribDivisor(index, divisor) { @@ -9520,8 +9508,22 @@ function copyTempDouble(ptr) { } - function _glfwSetMouseButtonCallback(winid, cbfun) { - GLFW.setMouseButtonCallback(winid, cbfun); + function _glDeleteBuffers(n, buffers) { + for (var i = 0; i < n; i++) { + var id = HEAP32[(((buffers)+(i*4))>>2)]; + var buffer = GL.buffers[id]; + + // From spec: "glDeleteBuffers silently ignores 0's and names that do not + // correspond to existing buffer objects." + if (!buffer) continue; + + GLctx.deleteBuffer(buffer); + buffer.name = 0; + GL.buffers[id] = null; + + if (id == GL.currArrayBuffer) GL.currArrayBuffer = 0; + if (id == GL.currElementArrayBuffer) GL.currElementArrayBuffer = 0; + } } function _emscripten_glCreateProgram() { @@ -9655,10 +9657,6 @@ function copyTempDouble(ptr) { GLFW.errorFunc = cbfun; } - function _glfwSetCursorPos(winid, x, y) { - GLFW.setCursorPos(winid, x, y); - } - function _emscripten_glCreateShader(shaderType) { var id = GL.getNewId(GL.shaders); GL.shaders[id] = GLctx.createShader(shaderType); @@ -10129,7 +10127,7 @@ function invoke_viiii(index,a1,a2,a3,a4) { Module.asmGlobalArg = { "Math": Math, "Int8Array": Int8Array, "Int16Array": Int16Array, "Int32Array": Int32Array, "Uint8Array": Uint8Array, "Uint16Array": Uint16Array, "Uint32Array": Uint32Array, "Float32Array": Float32Array, "Float64Array": Float64Array, "NaN": NaN, "Infinity": Infinity }; -Module.asmLibraryArg = { "abort": abort, "assert": assert, "enlargeMemory": enlargeMemory, "getTotalMemory": getTotalMemory, "abortOnCannotGrowMemory": abortOnCannotGrowMemory, "abortStackOverflow": abortStackOverflow, "nullFunc_viiiii": nullFunc_viiiii, "nullFunc_vd": nullFunc_vd, "nullFunc_vid": nullFunc_vid, "nullFunc_vi": nullFunc_vi, "nullFunc_vii": nullFunc_vii, "nullFunc_ii": nullFunc_ii, "nullFunc_viddd": nullFunc_viddd, "nullFunc_vidd": nullFunc_vidd, "nullFunc_iiii": nullFunc_iiii, "nullFunc_viiiiiiii": nullFunc_viiiiiiii, "nullFunc_viiiiii": nullFunc_viiiiii, "nullFunc_viii": nullFunc_viii, "nullFunc_vidddd": nullFunc_vidddd, "nullFunc_vdi": nullFunc_vdi, "nullFunc_viiiiiii": nullFunc_viiiiiii, "nullFunc_viiiiiiiii": nullFunc_viiiiiiiii, "nullFunc_iii": nullFunc_iii, "nullFunc_i": nullFunc_i, "nullFunc_vdddddd": nullFunc_vdddddd, "nullFunc_vdddd": nullFunc_vdddd, "nullFunc_vdd": nullFunc_vdd, "nullFunc_v": nullFunc_v, "nullFunc_viid": nullFunc_viid, "nullFunc_viiii": nullFunc_viiii, "invoke_viiiii": invoke_viiiii, "invoke_vd": invoke_vd, "invoke_vid": invoke_vid, "invoke_vi": invoke_vi, "invoke_vii": invoke_vii, "invoke_ii": invoke_ii, "invoke_viddd": invoke_viddd, "invoke_vidd": invoke_vidd, "invoke_iiii": invoke_iiii, "invoke_viiiiiiii": invoke_viiiiiiii, "invoke_viiiiii": invoke_viiiiii, "invoke_viii": invoke_viii, "invoke_vidddd": invoke_vidddd, "invoke_vdi": invoke_vdi, "invoke_viiiiiii": invoke_viiiiiii, "invoke_viiiiiiiii": invoke_viiiiiiiii, "invoke_iii": invoke_iii, "invoke_i": invoke_i, "invoke_vdddddd": invoke_vdddddd, "invoke_vdddd": invoke_vdddd, "invoke_vdd": invoke_vdd, "invoke_v": invoke_v, "invoke_viid": invoke_viid, "invoke_viiii": invoke_viiii, "_emscripten_glGetTexParameterfv": _emscripten_glGetTexParameterfv, "_glUseProgram": _glUseProgram, "_emscripten_glShaderSource": _emscripten_glShaderSource, "_glfwCreateWindow": _glfwCreateWindow, "_emscripten_glReleaseShaderCompiler": _emscripten_glReleaseShaderCompiler, "_emscripten_glBlendFuncSeparate": _emscripten_glBlendFuncSeparate, "_emscripten_glVertexAttribPointer": _emscripten_glVertexAttribPointer, "_emscripten_glGetIntegerv": _emscripten_glGetIntegerv, "_emscripten_glCullFace": _emscripten_glCullFace, "_emscripten_glIsProgram": _emscripten_glIsProgram, "_emscripten_glStencilMaskSeparate": _emscripten_glStencilMaskSeparate, "_emscripten_glViewport": _emscripten_glViewport, "_emscripten_glFrontFace": _emscripten_glFrontFace, "___assert_fail": ___assert_fail, "_glDeleteProgram": _glDeleteProgram, "_emscripten_glUniform3fv": _emscripten_glUniform3fv, "_emscripten_glPolygonOffset": _emscripten_glPolygonOffset, "_emscripten_glUseProgram": _emscripten_glUseProgram, "_glVertexAttrib4f": _glVertexAttrib4f, "_glBindBuffer": _glBindBuffer, "_emscripten_glDepthFunc": _emscripten_glDepthFunc, "_glGetShaderInfoLog": _glGetShaderInfoLog, "_emscripten_set_fullscreenchange_callback": _emscripten_set_fullscreenchange_callback, "_emscripten_set_touchmove_callback": _emscripten_set_touchmove_callback, "_emscripten_set_main_loop_timing": _emscripten_set_main_loop_timing, "_glDisable": _glDisable, "_glBlendFunc": _glBlendFunc, "_emscripten_glDisableVertexAttribArray": _emscripten_glDisableVertexAttribArray, "_glGetAttribLocation": _glGetAttribLocation, "_glDisableVertexAttribArray": _glDisableVertexAttribArray, "_glCreateShader": _glCreateShader, "_emscripten_glReadPixels": _emscripten_glReadPixels, "_emscripten_glSampleCoverage": _emscripten_glSampleCoverage, "_emscripten_glVertexPointer": _emscripten_glVertexPointer, "_emscripten_set_touchstart_callback": _emscripten_set_touchstart_callback, "emscriptenWebGLComputeImageSize": emscriptenWebGLComputeImageSize, "_emscripten_glGetBooleanv": _emscripten_glGetBooleanv, "_emscripten_glGetShaderSource": _emscripten_glGetShaderSource, "_glUniform4f": _glUniform4f, "_llvm_stacksave": _llvm_stacksave, "_emscripten_glUniform1i": _emscripten_glUniform1i, "_emscripten_glLoadMatrixf": _emscripten_glLoadMatrixf, "_emscripten_glGenBuffers": _emscripten_glGenBuffers, "_emscripten_glDeleteObjectARB": _emscripten_glDeleteObjectARB, "_glfwSetWindowSizeCallback": _glfwSetWindowSizeCallback, "_emscripten_glGetShaderPrecisionFormat": _emscripten_glGetShaderPrecisionFormat, "_glfwInit": _glfwInit, "_glGenBuffers": _glGenBuffers, "_glShaderSource": _glShaderSource, "_emscripten_glGetString": _emscripten_glGetString, "_emscripten_glIsFramebuffer": _emscripten_glIsFramebuffer, "_glVertexAttrib3f": _glVertexAttrib3f, "_emscripten_glIsEnabled": _emscripten_glIsEnabled, "_emscripten_glScissor": _emscripten_glScissor, "_emscripten_glVertexAttrib4fv": _emscripten_glVertexAttrib4fv, "_emscripten_glFramebufferTexture2D": _emscripten_glFramebufferTexture2D, "_emscripten_glTexParameteriv": _emscripten_glTexParameteriv, "___syscall145": ___syscall145, "_emscripten_glBindProgramARB": _emscripten_glBindProgramARB, "_emscripten_glStencilOpSeparate": _emscripten_glStencilOpSeparate, "_emscripten_glHint": _emscripten_glHint, "_emscripten_glFramebufferRenderbuffer": _emscripten_glFramebufferRenderbuffer, "___syscall140": ___syscall140, "_glfwSetErrorCallback": _glfwSetErrorCallback, "_glfwDefaultWindowHints": _glfwDefaultWindowHints, "_glfwDestroyWindow": _glfwDestroyWindow, "___syscall146": ___syscall146, "_emscripten_glGetActiveAttrib": _emscripten_glGetActiveAttrib, "_emscripten_glAttachShader": _emscripten_glAttachShader, "_glVertexAttribPointer": _glVertexAttribPointer, "_emscripten_glUniform2i": _emscripten_glUniform2i, "_emscripten_glUniform2f": _emscripten_glUniform2f, "_emscripten_glTexParameterfv": _emscripten_glTexParameterfv, "_emscripten_glUniformMatrix2fv": _emscripten_glUniformMatrix2fv, "_glRenderbufferStorage": _glRenderbufferStorage, "_glGetProgramInfoLog": _glGetProgramInfoLog, "_glfwSetScrollCallback": _glfwSetScrollCallback, "_emscripten_glTexParameterf": _emscripten_glTexParameterf, "_emscripten_glGetAttachedShaders": _emscripten_glGetAttachedShaders, "_emscripten_glGenTextures": _emscripten_glGenTextures, "_emscripten_glTexParameteri": _emscripten_glTexParameteri, "_llvm_stackrestore": _llvm_stackrestore, "_glBindRenderbuffer": _glBindRenderbuffer, "_emscripten_glClear": _emscripten_glClear, "_glDrawElements": _glDrawElements, "_glBufferSubData": _glBufferSubData, "_emscripten_glValidateProgram": _emscripten_glValidateProgram, "_emscripten_glVertexAttrib2fv": _emscripten_glVertexAttrib2fv, "_glViewport": _glViewport, "_emscripten_glUniform4iv": _emscripten_glUniform4iv, "_emscripten_glGetTexParameteriv": _emscripten_glGetTexParameteriv, "___setErrNo": ___setErrNo, "_eglGetProcAddress": _eglGetProcAddress, "_emscripten_glBindAttribLocation": _emscripten_glBindAttribLocation, "_glDeleteTextures": _glDeleteTextures, "_glDepthFunc": _glDepthFunc, "_emscripten_glClientActiveTexture": _emscripten_glClientActiveTexture, "_emscripten_glVertexAttrib2f": _emscripten_glVertexAttrib2f, "_glUniform3f": _glUniform3f, "_emscripten_glFlush": _emscripten_glFlush, "_emscripten_glCheckFramebufferStatus": _emscripten_glCheckFramebufferStatus, "_emscripten_glGenerateMipmap": _emscripten_glGenerateMipmap, "_emscripten_glGetError": _emscripten_glGetError, "_emscripten_glClearDepthf": _emscripten_glClearDepthf, "_emscripten_glUniform3f": _emscripten_glUniform3f, "_emscripten_glUniform3i": _emscripten_glUniform3i, "_emscripten_glRotatef": _emscripten_glRotatef, "_emscripten_glDeleteShader": _emscripten_glDeleteShader, "_glEnable": _glEnable, "_emscripten_glVertexAttrib1fv": _emscripten_glVertexAttrib1fv, "_glGenTextures": _glGenTextures, "_emscripten_glMatrixMode": _emscripten_glMatrixMode, "_glGetString": _glGetString, "_emscripten_glClearStencil": _emscripten_glClearStencil, "_emscripten_glGetUniformLocation": _emscripten_glGetUniformLocation, "emscriptenWebGLGet": emscriptenWebGLGet, "_emscripten_glEnableVertexAttribArray": _emscripten_glEnableVertexAttribArray, "_emscripten_glGetAttribLocation": _emscripten_glGetAttribLocation, "_emscripten_get_now": _emscripten_get_now, "_emscripten_glNormalPointer": _emscripten_glNormalPointer, "_glAttachShader": _glAttachShader, "_glFramebufferRenderbuffer": _glFramebufferRenderbuffer, "_emscripten_glEnable": _emscripten_glEnable, "_glCreateProgram": _glCreateProgram, "_glUniformMatrix4fv": _glUniformMatrix4fv, "_emscripten_glClearDepth": _emscripten_glClearDepth, "___lock": ___lock, "emscriptenWebGLGetTexPixelData": emscriptenWebGLGetTexPixelData, "___syscall6": ___syscall6, "___syscall5": ___syscall5, "_emscripten_glIsBuffer": _emscripten_glIsBuffer, "_emscripten_glVertexAttrib3f": _emscripten_glVertexAttrib3f, "_time": _time, "_glBindFramebuffer": _glBindFramebuffer, "_emscripten_glVertexAttrib1f": _emscripten_glVertexAttrib1f, "_glGenFramebuffers": _glGenFramebuffers, "_emscripten_glGetFramebufferAttachmentParameteriv": _emscripten_glGetFramebufferAttachmentParameteriv, "_emscripten_glBlendEquationSeparate": _emscripten_glBlendEquationSeparate, "_exit": _exit, "_emscripten_glEnableClientState": _emscripten_glEnableClientState, "_emscripten_glUniform4i": _emscripten_glUniform4i, "_emscripten_glDrawRangeElements": _emscripten_glDrawRangeElements, "_glCullFace": _glCullFace, "_emscripten_glGetPointerv": _emscripten_glGetPointerv, "_emscripten_set_keypress_callback": _emscripten_set_keypress_callback, "__emscripten_sample_gamepad_data": __emscripten_sample_gamepad_data, "_glDeleteFramebuffers": _glDeleteFramebuffers, "_emscripten_get_gamepad_status": _emscripten_get_gamepad_status, "_emscripten_glUniform4f": _emscripten_glUniform4f, "_emscripten_glUniform2fv": _emscripten_glUniform2fv, "_glfwGetVideoModes": _glfwGetVideoModes, "_emscripten_set_click_callback": _emscripten_set_click_callback, "_glCheckFramebufferStatus": _glCheckFramebufferStatus, "_emscripten_glFinish": _emscripten_glFinish, "_glFramebufferTexture2D": _glFramebufferTexture2D, "_emscripten_glShaderBinary": _emscripten_glShaderBinary, "_emscripten_glDrawElements": _emscripten_glDrawElements, "_emscripten_glBlendFunc": _emscripten_glBlendFunc, "_emscripten_get_num_gamepads": _emscripten_get_num_gamepads, "___syscall221": ___syscall221, "_emscripten_glStencilMask": _emscripten_glStencilMask, "_emscripten_glUniform1iv": _emscripten_glUniform1iv, "_emscripten_glGetVertexAttribPointerv": _emscripten_glGetVertexAttribPointerv, "_glClearDepthf": _glClearDepthf, "_emscripten_glCompressedTexSubImage2D": _emscripten_glCompressedTexSubImage2D, "emscriptenWebGLGetUniform": emscriptenWebGLGetUniform, "_emscripten_glGenRenderbuffers": _emscripten_glGenRenderbuffers, "_emscripten_glDeleteVertexArrays": _emscripten_glDeleteVertexArrays, "_glfwSetWindowShouldClose": _glfwSetWindowShouldClose, "_emscripten_glUniform1fv": _emscripten_glUniform1fv, "_emscripten_glGetActiveUniform": _emscripten_glGetActiveUniform, "_glBindTexture": _glBindTexture, "_emscripten_glUniform3iv": _emscripten_glUniform3iv, "_emscripten_glUniform2iv": _emscripten_glUniform2iv, "_emscripten_glDisable": _emscripten_glDisable, "_glfwSetCharCallback": _glfwSetCharCallback, "emscriptenWebGLGetVertexAttrib": emscriptenWebGLGetVertexAttrib, "_glGetFloatv": _glGetFloatv, "_emscripten_glDeleteProgram": _emscripten_glDeleteProgram, "_emscripten_glDeleteRenderbuffers": _emscripten_glDeleteRenderbuffers, "_emscripten_glDrawElementsInstanced": _emscripten_glDrawElementsInstanced, "_emscripten_glVertexAttrib4f": _emscripten_glVertexAttrib4f, "_glDrawArrays": _glDrawArrays, "_emscripten_glTexSubImage2D": _emscripten_glTexSubImage2D, "_glfwSetCursorPos": _glfwSetCursorPos, "_emscripten_glPixelStorei": _emscripten_glPixelStorei, "_glCompileShader": _glCompileShader, "_emscripten_get_pointerlock_status": _emscripten_get_pointerlock_status, "_glfwGetMouseButton": _glfwGetMouseButton, "_emscripten_glColorPointer": _emscripten_glColorPointer, "_emscripten_glDepthRange": _emscripten_glDepthRange, "_emscripten_glTexCoordPointer": _emscripten_glTexCoordPointer, "_emscripten_glGetBufferParameteriv": _emscripten_glGetBufferParameteriv, "_glActiveTexture": _glActiveTexture, "_emscripten_request_pointerlock": _emscripten_request_pointerlock, "_emscripten_set_gamepaddisconnected_callback": _emscripten_set_gamepaddisconnected_callback, "_emscripten_asm_const_iii": _emscripten_asm_const_iii, "_emscripten_glDepthMask": _emscripten_glDepthMask, "_glfwSetWindowIconifyCallback": _glfwSetWindowIconifyCallback, "_emscripten_glDrawBuffers": _emscripten_glDrawBuffers, "_glfwTerminate": _glfwTerminate, "_glFrontFace": _glFrontFace, "_emscripten_glGetObjectParameterivARB": _emscripten_glGetObjectParameterivARB, "_emscripten_exit_pointerlock": _emscripten_exit_pointerlock, "_glfwSwapInterval": _glfwSwapInterval, "_glUniform1i": _glUniform1i, "_glEnableVertexAttribArray": _glEnableVertexAttribArray, "_emscripten_glStencilFunc": _emscripten_glStencilFunc, "_abort": _abort, "_emscripten_glGetUniformiv": _emscripten_glGetUniformiv, "_glDeleteBuffers": _glDeleteBuffers, "_glBufferData": _glBufferData, "_glTexImage2D": _glTexImage2D, "_emscripten_glGetShaderiv": _emscripten_glGetShaderiv, "_glfwSetKeyCallback": _glfwSetKeyCallback, "_emscripten_glGenFramebuffers": _emscripten_glGenFramebuffers, "_glUniform1f": _glUniform1f, "_emscripten_glUniformMatrix4fv": _emscripten_glUniformMatrix4fv, "_emscripten_glLoadIdentity": _emscripten_glLoadIdentity, "_glDeleteShader": _glDeleteShader, "_emscripten_glUniform1f": _emscripten_glUniform1f, "_glGetProgramiv": _glGetProgramiv, "_emscripten_glBindFramebuffer": _emscripten_glBindFramebuffer, "_emscripten_glIsRenderbuffer": _emscripten_glIsRenderbuffer, "_glfwGetTime": _glfwGetTime, "_emscripten_glRenderbufferStorage": _emscripten_glRenderbufferStorage, "_emscripten_set_gamepadconnected_callback": _emscripten_set_gamepadconnected_callback, "_emscripten_glBlendColor": _emscripten_glBlendColor, "_emscripten_glGetVertexAttribiv": _emscripten_glGetVertexAttribiv, "_emscripten_glBindVertexArray": _emscripten_glBindVertexArray, "_emscripten_glDrawArraysInstanced": _emscripten_glDrawArraysInstanced, "_emscripten_set_touchcancel_callback": _emscripten_set_touchcancel_callback, "_emscripten_glCreateShader": _emscripten_glCreateShader, "_emscripten_glStencilFuncSeparate": _emscripten_glStencilFuncSeparate, "_emscripten_glDeleteTextures": _emscripten_glDeleteTextures, "_glfwGetKey": _glfwGetKey, "_glfwGetPrimaryMonitor": _glfwGetPrimaryMonitor, "_emscripten_glBufferSubData": _emscripten_glBufferSubData, "_emscripten_glVertexAttribDivisor": _emscripten_glVertexAttribDivisor, "_emscripten_set_touchend_callback": _emscripten_set_touchend_callback, "_emscripten_glGetUniformfv": _emscripten_glGetUniformfv, "_emscripten_glGetVertexAttribfv": _emscripten_glGetVertexAttribfv, "_emscripten_glGetRenderbufferParameteriv": _emscripten_glGetRenderbufferParameteriv, "_emscripten_glDeleteFramebuffers": _emscripten_glDeleteFramebuffers, "_glGetShaderiv": _glGetShaderiv, "_emscripten_glVertexAttrib3fv": _emscripten_glVertexAttrib3fv, "_glGetUniformLocation": _glGetUniformLocation, "_emscripten_glGetInfoLogARB": _emscripten_glGetInfoLogARB, "_emscripten_glCompileShader": _emscripten_glCompileShader, "_glClear": _glClear, "_emscripten_glFrustum": _emscripten_glFrustum, "_glVertexAttrib2f": _glVertexAttrib2f, "_emscripten_glDepthRangef": _emscripten_glDepthRangef, "__exit": __exit, "_emscripten_glLineWidth": _emscripten_glLineWidth, "_emscripten_glGetShaderInfoLog": _emscripten_glGetShaderInfoLog, "_emscripten_glStencilOp": _emscripten_glStencilOp, "_glBindAttribLocation": _glBindAttribLocation, "_glPixelStorei": _glPixelStorei, "_emscripten_glColorMask": _emscripten_glColorMask, "_emscripten_glLinkProgram": _emscripten_glLinkProgram, "_emscripten_glBlendEquation": _emscripten_glBlendEquation, "_emscripten_glIsTexture": _emscripten_glIsTexture, "_emscripten_glGetProgramiv": _emscripten_glGetProgramiv, "_glfwMakeContextCurrent": _glfwMakeContextCurrent, "_emscripten_glUniformMatrix3fv": _emscripten_glUniformMatrix3fv, "_emscripten_glBindTexture": _emscripten_glBindTexture, "_glfwSetMouseButtonCallback": _glfwSetMouseButtonCallback, "_glfwGetCursorPos": _glfwGetCursorPos, "_emscripten_glActiveTexture": _emscripten_glActiveTexture, "_emscripten_glDeleteBuffers": _emscripten_glDeleteBuffers, "___syscall54": ___syscall54, "___unlock": ___unlock, "_glLinkProgram": _glLinkProgram, "_glfwSwapBuffers": _glfwSwapBuffers, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_emscripten_set_main_loop": _emscripten_set_main_loop, "_emscripten_glBindRenderbuffer": _emscripten_glBindRenderbuffer, "_emscripten_glGetProgramInfoLog": _emscripten_glGetProgramInfoLog, "_glfwWindowHint": _glfwWindowHint, "_emscripten_glIsShader": _emscripten_glIsShader, "_emscripten_glUniform4fv": _emscripten_glUniform4fv, "_emscripten_glGenVertexArrays": _emscripten_glGenVertexArrays, "_glCompressedTexImage2D": _glCompressedTexImage2D, "_emscripten_glDrawArrays": _emscripten_glDrawArrays, "_glGenRenderbuffers": _glGenRenderbuffers, "_emscripten_glCompressedTexImage2D": _emscripten_glCompressedTexImage2D, "_emscripten_glClearColor": _emscripten_glClearColor, "_emscripten_glBufferData": _emscripten_glBufferData, "_emscripten_glCreateProgram": _emscripten_glCreateProgram, "_emscripten_glCopyTexSubImage2D": _emscripten_glCopyTexSubImage2D, "_glTexParameteri": _glTexParameteri, "_emscripten_glBindBuffer": _emscripten_glBindBuffer, "_emscripten_glGetFloatv": _emscripten_glGetFloatv, "_emscripten_glDetachShader": _emscripten_glDetachShader, "_glClearColor": _glClearColor, "_glfwSetCursorPosCallback": _glfwSetCursorPosCallback, "_glfwSetCursorEnterCallback": _glfwSetCursorEnterCallback, "_emscripten_glCopyTexImage2D": _emscripten_glCopyTexImage2D, "_emscripten_glTexImage2D": _emscripten_glTexImage2D, "DYNAMICTOP_PTR": DYNAMICTOP_PTR, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "cttz_i8": cttz_i8 }; +Module.asmLibraryArg = { "abort": abort, "assert": assert, "enlargeMemory": enlargeMemory, "getTotalMemory": getTotalMemory, "abortOnCannotGrowMemory": abortOnCannotGrowMemory, "abortStackOverflow": abortStackOverflow, "nullFunc_viiiii": nullFunc_viiiii, "nullFunc_vd": nullFunc_vd, "nullFunc_vid": nullFunc_vid, "nullFunc_vi": nullFunc_vi, "nullFunc_vii": nullFunc_vii, "nullFunc_ii": nullFunc_ii, "nullFunc_viddd": nullFunc_viddd, "nullFunc_vidd": nullFunc_vidd, "nullFunc_iiii": nullFunc_iiii, "nullFunc_viiiiiiii": nullFunc_viiiiiiii, "nullFunc_viiiiii": nullFunc_viiiiii, "nullFunc_viii": nullFunc_viii, "nullFunc_vidddd": nullFunc_vidddd, "nullFunc_vdi": nullFunc_vdi, "nullFunc_viiiiiii": nullFunc_viiiiiii, "nullFunc_viiiiiiiii": nullFunc_viiiiiiiii, "nullFunc_iii": nullFunc_iii, "nullFunc_i": nullFunc_i, "nullFunc_vdddddd": nullFunc_vdddddd, "nullFunc_vdddd": nullFunc_vdddd, "nullFunc_vdd": nullFunc_vdd, "nullFunc_v": nullFunc_v, "nullFunc_viid": nullFunc_viid, "nullFunc_viiii": nullFunc_viiii, "invoke_viiiii": invoke_viiiii, "invoke_vd": invoke_vd, "invoke_vid": invoke_vid, "invoke_vi": invoke_vi, "invoke_vii": invoke_vii, "invoke_ii": invoke_ii, "invoke_viddd": invoke_viddd, "invoke_vidd": invoke_vidd, "invoke_iiii": invoke_iiii, "invoke_viiiiiiii": invoke_viiiiiiii, "invoke_viiiiii": invoke_viiiiii, "invoke_viii": invoke_viii, "invoke_vidddd": invoke_vidddd, "invoke_vdi": invoke_vdi, "invoke_viiiiiii": invoke_viiiiiii, "invoke_viiiiiiiii": invoke_viiiiiiiii, "invoke_iii": invoke_iii, "invoke_i": invoke_i, "invoke_vdddddd": invoke_vdddddd, "invoke_vdddd": invoke_vdddd, "invoke_vdd": invoke_vdd, "invoke_v": invoke_v, "invoke_viid": invoke_viid, "invoke_viiii": invoke_viiii, "_emscripten_glGetTexParameterfv": _emscripten_glGetTexParameterfv, "_glUseProgram": _glUseProgram, "_emscripten_glShaderSource": _emscripten_glShaderSource, "_glfwCreateWindow": _glfwCreateWindow, "_emscripten_glReleaseShaderCompiler": _emscripten_glReleaseShaderCompiler, "_emscripten_glBlendFuncSeparate": _emscripten_glBlendFuncSeparate, "_emscripten_glVertexAttribPointer": _emscripten_glVertexAttribPointer, "_emscripten_glGetIntegerv": _emscripten_glGetIntegerv, "_emscripten_glCullFace": _emscripten_glCullFace, "_emscripten_glIsProgram": _emscripten_glIsProgram, "_emscripten_glStencilMaskSeparate": _emscripten_glStencilMaskSeparate, "_emscripten_glViewport": _emscripten_glViewport, "_emscripten_glFrontFace": _emscripten_glFrontFace, "___assert_fail": ___assert_fail, "_glDeleteProgram": _glDeleteProgram, "_emscripten_glUniform3fv": _emscripten_glUniform3fv, "_emscripten_glPolygonOffset": _emscripten_glPolygonOffset, "_emscripten_glUseProgram": _emscripten_glUseProgram, "_glVertexAttrib4f": _glVertexAttrib4f, "_glBindBuffer": _glBindBuffer, "_emscripten_glDepthFunc": _emscripten_glDepthFunc, "_glGetShaderInfoLog": _glGetShaderInfoLog, "_emscripten_set_fullscreenchange_callback": _emscripten_set_fullscreenchange_callback, "_emscripten_set_touchmove_callback": _emscripten_set_touchmove_callback, "_emscripten_set_main_loop_timing": _emscripten_set_main_loop_timing, "_glDisable": _glDisable, "_glBlendFunc": _glBlendFunc, "_emscripten_glDisableVertexAttribArray": _emscripten_glDisableVertexAttribArray, "_glGetAttribLocation": _glGetAttribLocation, "_glDisableVertexAttribArray": _glDisableVertexAttribArray, "_glCreateShader": _glCreateShader, "_emscripten_glReadPixels": _emscripten_glReadPixels, "_emscripten_glSampleCoverage": _emscripten_glSampleCoverage, "_emscripten_glVertexPointer": _emscripten_glVertexPointer, "_emscripten_set_touchstart_callback": _emscripten_set_touchstart_callback, "emscriptenWebGLComputeImageSize": emscriptenWebGLComputeImageSize, "_emscripten_glGetBooleanv": _emscripten_glGetBooleanv, "_emscripten_glGetShaderSource": _emscripten_glGetShaderSource, "_glUniform4f": _glUniform4f, "_llvm_stacksave": _llvm_stacksave, "_emscripten_glUniform1i": _emscripten_glUniform1i, "_emscripten_glLoadMatrixf": _emscripten_glLoadMatrixf, "_emscripten_glGenBuffers": _emscripten_glGenBuffers, "_emscripten_glDeleteObjectARB": _emscripten_glDeleteObjectARB, "_glfwSetWindowSizeCallback": _glfwSetWindowSizeCallback, "_emscripten_glGetShaderPrecisionFormat": _emscripten_glGetShaderPrecisionFormat, "_glfwInit": _glfwInit, "_emscripten_glGetPointerv": _emscripten_glGetPointerv, "_glGenBuffers": _glGenBuffers, "_glShaderSource": _glShaderSource, "_emscripten_glGetString": _emscripten_glGetString, "_emscripten_glIsFramebuffer": _emscripten_glIsFramebuffer, "_glVertexAttrib3f": _glVertexAttrib3f, "_emscripten_glIsEnabled": _emscripten_glIsEnabled, "_emscripten_glScissor": _emscripten_glScissor, "_emscripten_glVertexAttrib4fv": _emscripten_glVertexAttrib4fv, "_emscripten_glFramebufferTexture2D": _emscripten_glFramebufferTexture2D, "_emscripten_glTexParameteriv": _emscripten_glTexParameteriv, "___syscall145": ___syscall145, "_emscripten_glBindProgramARB": _emscripten_glBindProgramARB, "_emscripten_glStencilOpSeparate": _emscripten_glStencilOpSeparate, "_emscripten_glFramebufferRenderbuffer": _emscripten_glFramebufferRenderbuffer, "___syscall140": ___syscall140, "_glfwSetErrorCallback": _glfwSetErrorCallback, "_glfwDefaultWindowHints": _glfwDefaultWindowHints, "_glfwDestroyWindow": _glfwDestroyWindow, "___syscall146": ___syscall146, "_emscripten_glGetActiveAttrib": _emscripten_glGetActiveAttrib, "_emscripten_glAttachShader": _emscripten_glAttachShader, "_glVertexAttribPointer": _glVertexAttribPointer, "_emscripten_glUniform2i": _emscripten_glUniform2i, "_emscripten_glUniform2f": _emscripten_glUniform2f, "_emscripten_glTexParameterfv": _emscripten_glTexParameterfv, "_emscripten_glUniformMatrix2fv": _emscripten_glUniformMatrix2fv, "_glRenderbufferStorage": _glRenderbufferStorage, "_glGetProgramInfoLog": _glGetProgramInfoLog, "_glfwSetScrollCallback": _glfwSetScrollCallback, "_emscripten_glTexParameterf": _emscripten_glTexParameterf, "_emscripten_glGetAttachedShaders": _emscripten_glGetAttachedShaders, "_emscripten_glGenTextures": _emscripten_glGenTextures, "_emscripten_glTexParameteri": _emscripten_glTexParameteri, "_llvm_stackrestore": _llvm_stackrestore, "_glBindRenderbuffer": _glBindRenderbuffer, "_emscripten_glClear": _emscripten_glClear, "_glDrawElements": _glDrawElements, "_glBufferSubData": _glBufferSubData, "_emscripten_glValidateProgram": _emscripten_glValidateProgram, "_emscripten_glVertexAttrib2fv": _emscripten_glVertexAttrib2fv, "_glViewport": _glViewport, "_emscripten_glUniform4iv": _emscripten_glUniform4iv, "_emscripten_glGetTexParameteriv": _emscripten_glGetTexParameteriv, "___setErrNo": ___setErrNo, "_eglGetProcAddress": _eglGetProcAddress, "_emscripten_glBindAttribLocation": _emscripten_glBindAttribLocation, "_glDeleteTextures": _glDeleteTextures, "_glDepthFunc": _glDepthFunc, "_emscripten_glClientActiveTexture": _emscripten_glClientActiveTexture, "_emscripten_glVertexAttrib2f": _emscripten_glVertexAttrib2f, "_glUniform3f": _glUniform3f, "_emscripten_glFlush": _emscripten_glFlush, "_emscripten_glCheckFramebufferStatus": _emscripten_glCheckFramebufferStatus, "_emscripten_glGenerateMipmap": _emscripten_glGenerateMipmap, "_emscripten_glGetError": _emscripten_glGetError, "_emscripten_glClearDepthf": _emscripten_glClearDepthf, "_emscripten_glUniform3f": _emscripten_glUniform3f, "_emscripten_glUniform3i": _emscripten_glUniform3i, "_emscripten_glRotatef": _emscripten_glRotatef, "_emscripten_glDeleteShader": _emscripten_glDeleteShader, "_glEnable": _glEnable, "_emscripten_glVertexAttrib1fv": _emscripten_glVertexAttrib1fv, "_glGenTextures": _glGenTextures, "_emscripten_glMatrixMode": _emscripten_glMatrixMode, "_glGetString": _glGetString, "_emscripten_glClearStencil": _emscripten_glClearStencil, "_emscripten_glGetUniformLocation": _emscripten_glGetUniformLocation, "emscriptenWebGLGet": emscriptenWebGLGet, "_emscripten_glEnableVertexAttribArray": _emscripten_glEnableVertexAttribArray, "_emscripten_glGetAttribLocation": _emscripten_glGetAttribLocation, "_emscripten_get_now": _emscripten_get_now, "_emscripten_glNormalPointer": _emscripten_glNormalPointer, "_glAttachShader": _glAttachShader, "_glFramebufferRenderbuffer": _glFramebufferRenderbuffer, "_emscripten_glEnable": _emscripten_glEnable, "_glCreateProgram": _glCreateProgram, "_glUniformMatrix4fv": _glUniformMatrix4fv, "_emscripten_glClearDepth": _emscripten_glClearDepth, "___lock": ___lock, "emscriptenWebGLGetTexPixelData": emscriptenWebGLGetTexPixelData, "___syscall6": ___syscall6, "___syscall5": ___syscall5, "_emscripten_glIsBuffer": _emscripten_glIsBuffer, "_emscripten_glVertexAttrib3f": _emscripten_glVertexAttrib3f, "_time": _time, "_glBindFramebuffer": _glBindFramebuffer, "_emscripten_glVertexAttrib1f": _emscripten_glVertexAttrib1f, "_glGenFramebuffers": _glGenFramebuffers, "_glfwSetMouseButtonCallback": _glfwSetMouseButtonCallback, "_emscripten_glBlendEquationSeparate": _emscripten_glBlendEquationSeparate, "_exit": _exit, "_emscripten_glEnableClientState": _emscripten_glEnableClientState, "_emscripten_glUniform4i": _emscripten_glUniform4i, "_emscripten_glDrawRangeElements": _emscripten_glDrawRangeElements, "_glCullFace": _glCullFace, "_llvm_pow_f64": _llvm_pow_f64, "_emscripten_set_keypress_callback": _emscripten_set_keypress_callback, "__emscripten_sample_gamepad_data": __emscripten_sample_gamepad_data, "_glDeleteFramebuffers": _glDeleteFramebuffers, "_emscripten_get_gamepad_status": _emscripten_get_gamepad_status, "_emscripten_glUniform4f": _emscripten_glUniform4f, "_emscripten_glUniform2fv": _emscripten_glUniform2fv, "_glfwGetVideoModes": _glfwGetVideoModes, "_emscripten_set_click_callback": _emscripten_set_click_callback, "_glCheckFramebufferStatus": _glCheckFramebufferStatus, "_emscripten_glFinish": _emscripten_glFinish, "_glFramebufferTexture2D": _glFramebufferTexture2D, "_emscripten_glShaderBinary": _emscripten_glShaderBinary, "_emscripten_glDrawElements": _emscripten_glDrawElements, "_emscripten_glBlendFunc": _emscripten_glBlendFunc, "_emscripten_get_num_gamepads": _emscripten_get_num_gamepads, "___syscall221": ___syscall221, "_emscripten_glStencilMask": _emscripten_glStencilMask, "_emscripten_glUniform1iv": _emscripten_glUniform1iv, "_emscripten_glGetVertexAttribPointerv": _emscripten_glGetVertexAttribPointerv, "_glClearDepthf": _glClearDepthf, "_emscripten_glCompressedTexSubImage2D": _emscripten_glCompressedTexSubImage2D, "emscriptenWebGLGetUniform": emscriptenWebGLGetUniform, "_emscripten_glGenRenderbuffers": _emscripten_glGenRenderbuffers, "_emscripten_glDeleteVertexArrays": _emscripten_glDeleteVertexArrays, "_glfwSetWindowShouldClose": _glfwSetWindowShouldClose, "_emscripten_glUniform1fv": _emscripten_glUniform1fv, "_emscripten_glGetActiveUniform": _emscripten_glGetActiveUniform, "_glBindTexture": _glBindTexture, "_emscripten_glUniform3iv": _emscripten_glUniform3iv, "_emscripten_glUniform2iv": _emscripten_glUniform2iv, "_emscripten_glDisable": _emscripten_glDisable, "_glfwSetCharCallback": _glfwSetCharCallback, "emscriptenWebGLGetVertexAttrib": emscriptenWebGLGetVertexAttrib, "_glGetFloatv": _glGetFloatv, "_emscripten_glDeleteProgram": _emscripten_glDeleteProgram, "_emscripten_glDeleteRenderbuffers": _emscripten_glDeleteRenderbuffers, "_emscripten_glDrawElementsInstanced": _emscripten_glDrawElementsInstanced, "_emscripten_glVertexAttrib4f": _emscripten_glVertexAttrib4f, "_glDrawArrays": _glDrawArrays, "_emscripten_glTexSubImage2D": _emscripten_glTexSubImage2D, "_emscripten_memcpy_big": _emscripten_memcpy_big, "_emscripten_glPixelStorei": _emscripten_glPixelStorei, "_glCompileShader": _glCompileShader, "_emscripten_get_pointerlock_status": _emscripten_get_pointerlock_status, "_glfwGetMouseButton": _glfwGetMouseButton, "_emscripten_glHint": _emscripten_glHint, "_emscripten_glDepthRange": _emscripten_glDepthRange, "_emscripten_glTexCoordPointer": _emscripten_glTexCoordPointer, "_emscripten_glGetBufferParameteriv": _emscripten_glGetBufferParameteriv, "_glActiveTexture": _glActiveTexture, "_emscripten_request_pointerlock": _emscripten_request_pointerlock, "_emscripten_set_gamepaddisconnected_callback": _emscripten_set_gamepaddisconnected_callback, "_emscripten_asm_const_iii": _emscripten_asm_const_iii, "_emscripten_glDepthMask": _emscripten_glDepthMask, "_glfwSetWindowIconifyCallback": _glfwSetWindowIconifyCallback, "_emscripten_glDrawBuffers": _emscripten_glDrawBuffers, "_glfwTerminate": _glfwTerminate, "_glFrontFace": _glFrontFace, "_emscripten_glGetObjectParameterivARB": _emscripten_glGetObjectParameterivARB, "_emscripten_exit_pointerlock": _emscripten_exit_pointerlock, "_glfwSwapInterval": _glfwSwapInterval, "_glUniform1i": _glUniform1i, "_glEnableVertexAttribArray": _glEnableVertexAttribArray, "_emscripten_glStencilFunc": _emscripten_glStencilFunc, "_abort": _abort, "_emscripten_glGetUniformiv": _emscripten_glGetUniformiv, "_glDeleteBuffers": _glDeleteBuffers, "_glBufferData": _glBufferData, "_glTexImage2D": _glTexImage2D, "_emscripten_glGetShaderiv": _emscripten_glGetShaderiv, "_glfwSetKeyCallback": _glfwSetKeyCallback, "_emscripten_glGenFramebuffers": _emscripten_glGenFramebuffers, "_glUniform1f": _glUniform1f, "_emscripten_glUniformMatrix4fv": _emscripten_glUniformMatrix4fv, "_emscripten_glLoadIdentity": _emscripten_glLoadIdentity, "_glDeleteShader": _glDeleteShader, "_emscripten_glUniform1f": _emscripten_glUniform1f, "_glGetProgramiv": _glGetProgramiv, "_emscripten_glBindFramebuffer": _emscripten_glBindFramebuffer, "_emscripten_glIsRenderbuffer": _emscripten_glIsRenderbuffer, "_glfwGetTime": _glfwGetTime, "_emscripten_glRenderbufferStorage": _emscripten_glRenderbufferStorage, "_emscripten_set_gamepadconnected_callback": _emscripten_set_gamepadconnected_callback, "_emscripten_glBlendColor": _emscripten_glBlendColor, "_emscripten_glGetVertexAttribiv": _emscripten_glGetVertexAttribiv, "_emscripten_glBindVertexArray": _emscripten_glBindVertexArray, "_emscripten_glDrawArraysInstanced": _emscripten_glDrawArraysInstanced, "_emscripten_set_touchcancel_callback": _emscripten_set_touchcancel_callback, "_emscripten_glCreateShader": _emscripten_glCreateShader, "_emscripten_glStencilFuncSeparate": _emscripten_glStencilFuncSeparate, "_emscripten_glDeleteTextures": _emscripten_glDeleteTextures, "_glfwGetKey": _glfwGetKey, "_glfwGetPrimaryMonitor": _glfwGetPrimaryMonitor, "_emscripten_glBufferSubData": _emscripten_glBufferSubData, "_emscripten_glVertexAttribDivisor": _emscripten_glVertexAttribDivisor, "_emscripten_set_touchend_callback": _emscripten_set_touchend_callback, "_emscripten_glGetUniformfv": _emscripten_glGetUniformfv, "_emscripten_glGetVertexAttribfv": _emscripten_glGetVertexAttribfv, "_emscripten_glGetRenderbufferParameteriv": _emscripten_glGetRenderbufferParameteriv, "_emscripten_glDeleteFramebuffers": _emscripten_glDeleteFramebuffers, "_glGetShaderiv": _glGetShaderiv, "_emscripten_glVertexAttrib3fv": _emscripten_glVertexAttrib3fv, "_glGetUniformLocation": _glGetUniformLocation, "_emscripten_glGetInfoLogARB": _emscripten_glGetInfoLogARB, "_emscripten_glCompileShader": _emscripten_glCompileShader, "_glClear": _glClear, "_emscripten_glFrustum": _emscripten_glFrustum, "_glVertexAttrib2f": _glVertexAttrib2f, "_emscripten_glDepthRangef": _emscripten_glDepthRangef, "__exit": __exit, "_emscripten_glLineWidth": _emscripten_glLineWidth, "_emscripten_glGetShaderInfoLog": _emscripten_glGetShaderInfoLog, "_emscripten_glStencilOp": _emscripten_glStencilOp, "_glBindAttribLocation": _glBindAttribLocation, "_glPixelStorei": _glPixelStorei, "_emscripten_glColorMask": _emscripten_glColorMask, "_emscripten_glLinkProgram": _emscripten_glLinkProgram, "_emscripten_glBlendEquation": _emscripten_glBlendEquation, "_emscripten_glIsTexture": _emscripten_glIsTexture, "_emscripten_glGetProgramiv": _emscripten_glGetProgramiv, "_glfwMakeContextCurrent": _glfwMakeContextCurrent, "_emscripten_glUniformMatrix3fv": _emscripten_glUniformMatrix3fv, "_emscripten_glBindTexture": _emscripten_glBindTexture, "_emscripten_glGetFramebufferAttachmentParameteriv": _emscripten_glGetFramebufferAttachmentParameteriv, "_glfwGetCursorPos": _glfwGetCursorPos, "_emscripten_glActiveTexture": _emscripten_glActiveTexture, "_emscripten_glDeleteBuffers": _emscripten_glDeleteBuffers, "___syscall54": ___syscall54, "___unlock": ___unlock, "_glLinkProgram": _glLinkProgram, "_glfwSwapBuffers": _glfwSwapBuffers, "_emscripten_glColorPointer": _emscripten_glColorPointer, "_emscripten_set_main_loop": _emscripten_set_main_loop, "_emscripten_glBindRenderbuffer": _emscripten_glBindRenderbuffer, "_emscripten_glGetProgramInfoLog": _emscripten_glGetProgramInfoLog, "_glfwWindowHint": _glfwWindowHint, "_emscripten_glIsShader": _emscripten_glIsShader, "_emscripten_glUniform4fv": _emscripten_glUniform4fv, "_emscripten_glGenVertexArrays": _emscripten_glGenVertexArrays, "_glCompressedTexImage2D": _glCompressedTexImage2D, "_emscripten_glDrawArrays": _emscripten_glDrawArrays, "_glGenRenderbuffers": _glGenRenderbuffers, "_emscripten_glCompressedTexImage2D": _emscripten_glCompressedTexImage2D, "_emscripten_glClearColor": _emscripten_glClearColor, "_emscripten_glBufferData": _emscripten_glBufferData, "_emscripten_glCreateProgram": _emscripten_glCreateProgram, "_emscripten_glCopyTexSubImage2D": _emscripten_glCopyTexSubImage2D, "_glTexParameteri": _glTexParameteri, "_emscripten_glBindBuffer": _emscripten_glBindBuffer, "_emscripten_glGetFloatv": _emscripten_glGetFloatv, "_emscripten_glDetachShader": _emscripten_glDetachShader, "_glClearColor": _glClearColor, "_glfwSetCursorPosCallback": _glfwSetCursorPosCallback, "_glfwSetCursorEnterCallback": _glfwSetCursorEnterCallback, "_emscripten_glCopyTexImage2D": _emscripten_glCopyTexImage2D, "_emscripten_glTexImage2D": _emscripten_glTexImage2D, "DYNAMICTOP_PTR": DYNAMICTOP_PTR, "tempDoublePtr": tempDoublePtr, "ABORT": ABORT, "STACKTOP": STACKTOP, "STACK_MAX": STACK_MAX, "cttz_i8": cttz_i8 }; // EMSCRIPTEN_START_ASM var asm = (function(global, env, buffer) { 'use asm'; @@ -10279,6 +10277,7 @@ var asm = (function(global, env, buffer) { var _glfwSetWindowSizeCallback=env._glfwSetWindowSizeCallback; var _emscripten_glGetShaderPrecisionFormat=env._emscripten_glGetShaderPrecisionFormat; var _glfwInit=env._glfwInit; + var _emscripten_glGetPointerv=env._emscripten_glGetPointerv; var _glGenBuffers=env._glGenBuffers; var _glShaderSource=env._glShaderSource; var _emscripten_glGetString=env._emscripten_glGetString; @@ -10292,7 +10291,6 @@ var asm = (function(global, env, buffer) { var ___syscall145=env.___syscall145; var _emscripten_glBindProgramARB=env._emscripten_glBindProgramARB; var _emscripten_glStencilOpSeparate=env._emscripten_glStencilOpSeparate; - var _emscripten_glHint=env._emscripten_glHint; var _emscripten_glFramebufferRenderbuffer=env._emscripten_glFramebufferRenderbuffer; var ___syscall140=env.___syscall140; var _glfwSetErrorCallback=env._glfwSetErrorCallback; @@ -10368,14 +10366,14 @@ var asm = (function(global, env, buffer) { var _glBindFramebuffer=env._glBindFramebuffer; var _emscripten_glVertexAttrib1f=env._emscripten_glVertexAttrib1f; var _glGenFramebuffers=env._glGenFramebuffers; - var _emscripten_glGetFramebufferAttachmentParameteriv=env._emscripten_glGetFramebufferAttachmentParameteriv; + var _glfwSetMouseButtonCallback=env._glfwSetMouseButtonCallback; var _emscripten_glBlendEquationSeparate=env._emscripten_glBlendEquationSeparate; var _exit=env._exit; var _emscripten_glEnableClientState=env._emscripten_glEnableClientState; var _emscripten_glUniform4i=env._emscripten_glUniform4i; var _emscripten_glDrawRangeElements=env._emscripten_glDrawRangeElements; var _glCullFace=env._glCullFace; - var _emscripten_glGetPointerv=env._emscripten_glGetPointerv; + var _llvm_pow_f64=env._llvm_pow_f64; var _emscripten_set_keypress_callback=env._emscripten_set_keypress_callback; var __emscripten_sample_gamepad_data=env.__emscripten_sample_gamepad_data; var _glDeleteFramebuffers=env._glDeleteFramebuffers; @@ -10416,12 +10414,12 @@ var asm = (function(global, env, buffer) { var _emscripten_glVertexAttrib4f=env._emscripten_glVertexAttrib4f; var _glDrawArrays=env._glDrawArrays; var _emscripten_glTexSubImage2D=env._emscripten_glTexSubImage2D; - var _glfwSetCursorPos=env._glfwSetCursorPos; + var _emscripten_memcpy_big=env._emscripten_memcpy_big; var _emscripten_glPixelStorei=env._emscripten_glPixelStorei; var _glCompileShader=env._glCompileShader; var _emscripten_get_pointerlock_status=env._emscripten_get_pointerlock_status; var _glfwGetMouseButton=env._glfwGetMouseButton; - var _emscripten_glColorPointer=env._emscripten_glColorPointer; + var _emscripten_glHint=env._emscripten_glHint; var _emscripten_glDepthRange=env._emscripten_glDepthRange; var _emscripten_glTexCoordPointer=env._emscripten_glTexCoordPointer; var _emscripten_glGetBufferParameteriv=env._emscripten_glGetBufferParameteriv; @@ -10499,7 +10497,7 @@ var asm = (function(global, env, buffer) { var _glfwMakeContextCurrent=env._glfwMakeContextCurrent; var _emscripten_glUniformMatrix3fv=env._emscripten_glUniformMatrix3fv; var _emscripten_glBindTexture=env._emscripten_glBindTexture; - var _glfwSetMouseButtonCallback=env._glfwSetMouseButtonCallback; + var _emscripten_glGetFramebufferAttachmentParameteriv=env._emscripten_glGetFramebufferAttachmentParameteriv; var _glfwGetCursorPos=env._glfwGetCursorPos; var _emscripten_glActiveTexture=env._emscripten_glActiveTexture; var _emscripten_glDeleteBuffers=env._emscripten_glDeleteBuffers; @@ -10507,7 +10505,7 @@ var asm = (function(global, env, buffer) { var ___unlock=env.___unlock; var _glLinkProgram=env._glLinkProgram; var _glfwSwapBuffers=env._glfwSwapBuffers; - var _emscripten_memcpy_big=env._emscripten_memcpy_big; + var _emscripten_glColorPointer=env._emscripten_glColorPointer; var _emscripten_set_main_loop=env._emscripten_set_main_loop; var _emscripten_glBindRenderbuffer=env._emscripten_glBindRenderbuffer; var _emscripten_glGetProgramInfoLog=env._emscripten_glGetProgramInfoLog; @@ -10578,5455 +10576,14 @@ function getTempRet0() { } function _main() { - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $dwarf$byval_copy = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 656|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(656|0); - $dwarf$byval_copy = sp + 392|0; - $0 = sp + 128|0; - $1 = sp + 104|0; - $2 = sp + 48|0; - $3 = sp; - _SetConfigFlags(32); - $4 = HEAP32[2]|0; - $5 = HEAP32[3]|0; - _InitWindow($4,$5,4448); - _LoadModel($0,4497); - _memcpy((18700|0),($0|0),264)|0; - _LoadTexture($1,4523); - ;HEAP32[18964>>2]=HEAP32[$1>>2]|0;HEAP32[18964+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[18964+8>>2]=HEAP32[$1+8>>2]|0;HEAP32[18964+12>>2]=HEAP32[$1+12>>2]|0;HEAP32[18964+16>>2]=HEAP32[$1+16>>2]|0; - ;HEAP32[(18888)>>2]=HEAP32[$1>>2]|0;HEAP32[(18888)+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[(18888)+8>>2]=HEAP32[$1+8>>2]|0;HEAP32[(18888)+12>>2]=HEAP32[$1+12>>2]|0;HEAP32[(18888)+16>>2]=HEAP32[$1+16>>2]|0; - _LoadShader($2,4557,4591); - dest=18984; src=$2; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - $6 = HEAP32[2]|0; - $7 = HEAP32[3]|0; - _LoadRenderTexture($3,$6,$7); - dest=19040; src=$3; stop=dest+44|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$dwarf$byval_copy; src=16; stop=dest+40|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _SetCameraMode($dwarf$byval_copy,2); - _emscripten_set_main_loop((1|0),0,1); - dest=$dwarf$byval_copy; src=18984; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _UnloadShader($dwarf$byval_copy); - ;HEAP32[$dwarf$byval_copy>>2]=HEAP32[18964>>2]|0;HEAP32[$dwarf$byval_copy+4>>2]=HEAP32[18964+4>>2]|0;HEAP32[$dwarf$byval_copy+8>>2]=HEAP32[18964+8>>2]|0;HEAP32[$dwarf$byval_copy+12>>2]=HEAP32[18964+12>>2]|0;HEAP32[$dwarf$byval_copy+16>>2]=HEAP32[18964+16>>2]|0; - _UnloadTexture($dwarf$byval_copy); - _memcpy(($dwarf$byval_copy|0),(18700|0),264)|0; - _UnloadModel($dwarf$byval_copy); - _CloseWindow(); - STACKTOP = sp;return 0; -} -function _UpdateDrawFrame() { - var $$byval_copy2 = 0, $$byval_copy3 = 0, $$byval_copy4 = 0, $$byval_copy5 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0; - var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 416|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(416|0); - $$byval_copy5 = sp + 336|0; - $$byval_copy4 = sp + 320|0; - $$byval_copy3 = sp + 56|0; - $$byval_copy2 = sp + 36|0; - $0 = sp + 400|0; - $1 = sp + 32|0; - $2 = sp + 396|0; - $3 = sp + 16|0; - $4 = sp + 8|0; - $5 = sp; - $6 = sp + 392|0; - _UpdateCamera(16); - _BeginDrawing(); - HEAP8[$0>>0] = -11; - $7 = ((($0)) + 1|0); - HEAP8[$7>>0] = -11; - $8 = ((($0)) + 2|0); - HEAP8[$8>>0] = -11; - $9 = ((($0)) + 3|0); - HEAP8[$9>>0] = -1; - ;HEAP8[$$byval_copy5>>0]=HEAP8[$0>>0]|0;HEAP8[$$byval_copy5+1>>0]=HEAP8[$0+1>>0]|0;HEAP8[$$byval_copy5+2>>0]=HEAP8[$0+2>>0]|0;HEAP8[$$byval_copy5+3>>0]=HEAP8[$0+3>>0]|0; - _ClearBackground($$byval_copy5); - dest=$$byval_copy5; src=19040; stop=dest+44|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _BeginTextureMode($$byval_copy5); - dest=$$byval_copy5; src=16; stop=dest+40|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _Begin3dMode($$byval_copy5); - HEAP32[$1>>2] = -1; - _memcpy(($$byval_copy3|0),(18700|0),264)|0; - ;HEAP32[$$byval_copy4>>2]=HEAP32[18688>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[18688+4>>2]|0;HEAP32[$$byval_copy4+8>>2]=HEAP32[18688+8>>2]|0; - ;HEAP8[$$byval_copy5>>0]=HEAP8[$1>>0]|0;HEAP8[$$byval_copy5+1>>0]=HEAP8[$1+1>>0]|0;HEAP8[$$byval_copy5+2>>0]=HEAP8[$1+2>>0]|0;HEAP8[$$byval_copy5+3>>0]=HEAP8[$1+3>>0]|0; - _DrawModel($$byval_copy3,$$byval_copy4,2.0,$$byval_copy5); - _DrawGrid(10,1.0); - _End3dMode(); - HEAP8[$2>>0] = -26; - $10 = ((($2)) + 1|0); - HEAP8[$10>>0] = 41; - $11 = ((($2)) + 2|0); - HEAP8[$11>>0] = 55; - $12 = ((($2)) + 3|0); - HEAP8[$12>>0] = -1; - ;HEAP8[$$byval_copy5>>0]=HEAP8[$2>>0]|0;HEAP8[$$byval_copy5+1>>0]=HEAP8[$2+1>>0]|0;HEAP8[$$byval_copy5+2>>0]=HEAP8[$2+2>>0]|0;HEAP8[$$byval_copy5+3>>0]=HEAP8[$2+3>>0]|0; - _DrawText(4626,70,190,50,$$byval_copy5); - _EndTextureMode(); - dest=$$byval_copy5; src=18984; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _BeginShaderMode($$byval_copy5); - HEAP32[$3>>2] = 0; - $13 = ((($3)) + 4|0); - HEAP32[$13>>2] = 0; - $14 = ((($3)) + 8|0); - $15 = HEAP32[(19048)>>2]|0; - HEAP32[$14>>2] = $15; - $16 = ((($3)) + 12|0); - $17 = HEAP32[(19052)>>2]|0; - $18 = (0 - ($17))|0; - HEAP32[$16>>2] = $18; - HEAPF32[$4>>2] = 0.0; - $19 = ((($4)) + 4|0); - HEAPF32[$19>>2] = 0.0; - HEAP32[$5>>2] = -1; - ;HEAP32[$$byval_copy2>>2]=HEAP32[(19044)>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[(19044)+4>>2]|0;HEAP32[$$byval_copy2+8>>2]=HEAP32[(19044)+8>>2]|0;HEAP32[$$byval_copy2+12>>2]=HEAP32[(19044)+12>>2]|0;HEAP32[$$byval_copy2+16>>2]=HEAP32[(19044)+16>>2]|0; - ;HEAP32[$$byval_copy3>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$3+4>>2]|0;HEAP32[$$byval_copy3+8>>2]=HEAP32[$3+8>>2]|0;HEAP32[$$byval_copy3+12>>2]=HEAP32[$3+12>>2]|0; - ;HEAP32[$$byval_copy4>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$4+4>>2]|0; - ;HEAP8[$$byval_copy5>>0]=HEAP8[$5>>0]|0;HEAP8[$$byval_copy5+1>>0]=HEAP8[$5+1>>0]|0;HEAP8[$$byval_copy5+2>>0]=HEAP8[$5+2>>0]|0;HEAP8[$$byval_copy5+3>>0]=HEAP8[$5+3>>0]|0; - _DrawTextureRec($$byval_copy2,$$byval_copy3,$$byval_copy4,$$byval_copy5); - _EndShaderMode(); - $20 = HEAP32[2]|0; - $21 = (($20) + -200)|0; - $22 = HEAP32[3]|0; - $23 = (($22) + -20)|0; - HEAP8[$6>>0] = 80; - $24 = ((($6)) + 1|0); - HEAP8[$24>>0] = 80; - $25 = ((($6)) + 2|0); - HEAP8[$25>>0] = 80; - $26 = ((($6)) + 3|0); - HEAP8[$26>>0] = -1; - ;HEAP8[$$byval_copy5>>0]=HEAP8[$6>>0]|0;HEAP8[$$byval_copy5+1>>0]=HEAP8[$6+1>>0]|0;HEAP8[$$byval_copy5+2>>0]=HEAP8[$6+2>>0]|0;HEAP8[$$byval_copy5+3>>0]=HEAP8[$6+3>>0]|0; - _DrawText(4648,$21,$23,10,$$byval_copy5); - _DrawFPS(10,10); - _EndDrawing(); - STACKTOP = sp;return; -} -function _Vector2Distance($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $2 = +HEAPF32[$0>>2]; - $3 = +HEAPF32[$1>>2]; - $4 = $2 - $3; - $5 = $4 * $4; - $6 = ((($0)) + 4|0); - $7 = +HEAPF32[$6>>2]; - $8 = ((($1)) + 4|0); - $9 = +HEAPF32[$8>>2]; - $10 = $7 - $9; - $11 = $10 * $10; - $12 = $5 + $11; - $13 = (+Math_sqrt((+$12))); - return (+$13); -} -function _Vector2Angle($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $2 = ((($1)) + 4|0); - $3 = +HEAPF32[$2>>2]; - $4 = ((($0)) + 4|0); - $5 = +HEAPF32[$4>>2]; - $6 = $3 - $5; - $7 = +HEAPF32[$1>>2]; - $8 = +HEAPF32[$0>>2]; - $9 = $7 - $8; - $10 = (+Math_atan2((+$6),(+$9))); - $11 = $10 * 57.2957763671875; - $12 = $11 < 0.0; - $13 = $11 + 360.0; - $$0 = $12 ? $13 : $11; - return (+$$0); -} -function _VectorZero($0) { - $0 = $0|0; - var $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - HEAPF32[$0>>2] = 0.0; - $1 = ((($0)) + 4|0); - HEAPF32[$1>>2] = 0.0; - $2 = ((($0)) + 8|0); - HEAPF32[$2>>2] = 0.0; - return; -} -function _VectorSubtract($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $3 = +HEAPF32[$1>>2]; - $4 = +HEAPF32[$2>>2]; - $5 = $3 - $4; - HEAPF32[$0>>2] = $5; - $6 = ((($0)) + 4|0); - $7 = ((($1)) + 4|0); - $8 = +HEAPF32[$7>>2]; - $9 = ((($2)) + 4|0); - $10 = +HEAPF32[$9>>2]; - $11 = $8 - $10; - HEAPF32[$6>>2] = $11; - $12 = ((($0)) + 8|0); - $13 = ((($1)) + 8|0); - $14 = +HEAPF32[$13>>2]; - $15 = ((($2)) + 8|0); - $16 = +HEAPF32[$15>>2]; - $17 = $14 - $16; - HEAPF32[$12>>2] = $17; - return; -} -function _VectorCrossProduct($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $3 = 0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0; - var $9 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $3 = ((($1)) + 4|0); - $4 = +HEAPF32[$3>>2]; - $5 = ((($2)) + 8|0); - $6 = +HEAPF32[$5>>2]; - $7 = $4 * $6; - $8 = ((($1)) + 8|0); - $9 = +HEAPF32[$8>>2]; - $10 = ((($2)) + 4|0); - $11 = +HEAPF32[$10>>2]; - $12 = $9 * $11; - $13 = $7 - $12; - $14 = +HEAPF32[$2>>2]; - $15 = $9 * $14; - $16 = +HEAPF32[$1>>2]; - $17 = $6 * $16; - $18 = $15 - $17; - $19 = $11 * $16; - $20 = $4 * $14; - $21 = $19 - $20; - HEAPF32[$0>>2] = $13; - $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); - HEAPF32[$$sroa$4$0$$sroa_idx2>>2] = $18; - $$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0); - HEAPF32[$$sroa$5$0$$sroa_idx4>>2] = $21; - return; -} -function _VectorLength($0) { - $0 = $0|0; - var $1 = 0.0, $10 = 0.0, $11 = 0.0, $2 = 0.0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $1 = +HEAPF32[$0>>2]; - $2 = $1 * $1; - $3 = ((($0)) + 4|0); - $4 = +HEAPF32[$3>>2]; - $5 = $4 * $4; - $6 = $2 + $5; - $7 = ((($0)) + 8|0); - $8 = +HEAPF32[$7>>2]; - $9 = $8 * $8; - $10 = $6 + $9; - $11 = (+Math_sqrt((+$10))); - return (+$11); -} -function _VectorScale($0,$1) { - $0 = $0|0; - $1 = +$1; - var $2 = 0.0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $2 = +HEAPF32[$0>>2]; - $3 = $2 * $1; - HEAPF32[$0>>2] = $3; - $4 = ((($0)) + 4|0); - $5 = +HEAPF32[$4>>2]; - $6 = $5 * $1; - HEAPF32[$4>>2] = $6; - $7 = ((($0)) + 8|0); - $8 = +HEAPF32[$7>>2]; - $9 = $8 * $1; - HEAPF32[$7>>2] = $9; - return; -} -function _VectorNormalize($0) { - $0 = $0|0; - var $$byval_copy = 0, $$op = 0.0, $1 = 0.0, $10 = 0.0, $11 = 0.0, $2 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $$byval_copy = sp; - ;HEAP32[$$byval_copy>>2]=HEAP32[$0>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$0+8>>2]|0; - $1 = (+_VectorLength($$byval_copy)); - $2 = $1 == 0.0; - $$op = 1.0 / $1; - $3 = $2 ? 1.0 : $$op; - $4 = +HEAPF32[$0>>2]; - $5 = $4 * $3; - HEAPF32[$0>>2] = $5; - $6 = ((($0)) + 4|0); - $7 = +HEAPF32[$6>>2]; - $8 = $3 * $7; - HEAPF32[$6>>2] = $8; - $9 = ((($0)) + 8|0); - $10 = +HEAPF32[$9>>2]; - $11 = $3 * $10; - HEAPF32[$9>>2] = $11; - STACKTOP = sp;return; -} -function _VectorTransform($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0.0, $19 = 0.0, $2 = 0.0, $20 = 0, $21 = 0.0, $22 = 0.0, $23 = 0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $27 = 0, $28 = 0.0; - var $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0, $35 = 0.0, $36 = 0.0, $37 = 0, $38 = 0.0, $39 = 0.0, $4 = 0.0, $40 = 0.0, $41 = 0, $42 = 0.0, $43 = 0.0, $44 = 0.0, $45 = 0, $46 = 0.0; - var $47 = 0.0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $2 = +HEAPF32[$0>>2]; - $3 = ((($0)) + 4|0); - $4 = +HEAPF32[$3>>2]; - $5 = ((($0)) + 8|0); - $6 = +HEAPF32[$5>>2]; - $7 = +HEAPF32[$1>>2]; - $8 = $2 * $7; - $9 = ((($1)) + 4|0); - $10 = +HEAPF32[$9>>2]; - $11 = $4 * $10; - $12 = $8 + $11; - $13 = ((($1)) + 8|0); - $14 = +HEAPF32[$13>>2]; - $15 = $6 * $14; - $16 = $12 + $15; - $17 = ((($1)) + 12|0); - $18 = +HEAPF32[$17>>2]; - $19 = $18 + $16; - HEAPF32[$0>>2] = $19; - $20 = ((($1)) + 16|0); - $21 = +HEAPF32[$20>>2]; - $22 = $2 * $21; - $23 = ((($1)) + 20|0); - $24 = +HEAPF32[$23>>2]; - $25 = $4 * $24; - $26 = $22 + $25; - $27 = ((($1)) + 24|0); - $28 = +HEAPF32[$27>>2]; - $29 = $6 * $28; - $30 = $26 + $29; - $31 = ((($1)) + 28|0); - $32 = +HEAPF32[$31>>2]; - $33 = $32 + $30; - HEAPF32[$3>>2] = $33; - $34 = ((($1)) + 32|0); - $35 = +HEAPF32[$34>>2]; - $36 = $2 * $35; - $37 = ((($1)) + 36|0); - $38 = +HEAPF32[$37>>2]; - $39 = $4 * $38; - $40 = $36 + $39; - $41 = ((($1)) + 40|0); - $42 = +HEAPF32[$41>>2]; - $43 = $6 * $42; - $44 = $40 + $43; - $45 = ((($1)) + 44|0); - $46 = +HEAPF32[$45>>2]; - $47 = $46 + $44; - HEAPF32[$5>>2] = $47; - return; -} -function _MatrixTranspose($0) { - $0 = $0|0; - var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0, $5 = 0; - var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = ((($0)) + 4|0); - $2 = HEAP32[$1>>2]|0; - $3 = ((($0)) + 8|0); - $4 = HEAP32[$3>>2]|0; - $5 = ((($0)) + 12|0); - $6 = HEAP32[$5>>2]|0; - $7 = ((($0)) + 16|0); - $8 = HEAP32[$7>>2]|0; - $9 = ((($0)) + 24|0); - $10 = HEAP32[$9>>2]|0; - $11 = ((($0)) + 28|0); - $12 = HEAP32[$11>>2]|0; - $13 = ((($0)) + 32|0); - $14 = HEAP32[$13>>2]|0; - $15 = ((($0)) + 36|0); - $16 = HEAP32[$15>>2]|0; - $17 = ((($0)) + 44|0); - $18 = HEAP32[$17>>2]|0; - $19 = ((($0)) + 48|0); - $20 = HEAP32[$19>>2]|0; - $21 = ((($0)) + 52|0); - $22 = HEAP32[$21>>2]|0; - $23 = ((($0)) + 56|0); - $24 = HEAP32[$23>>2]|0; - HEAP32[$1>>2] = $8; - HEAP32[$3>>2] = $14; - HEAP32[$5>>2] = $20; - HEAP32[$7>>2] = $2; - HEAP32[$9>>2] = $16; - HEAP32[$11>>2] = $22; - HEAP32[$13>>2] = $4; - HEAP32[$15>>2] = $10; - HEAP32[$17>>2] = $24; - HEAP32[$19>>2] = $6; - HEAP32[$21>>2] = $12; - HEAP32[$23>>2] = $18; - return; -} -function _MatrixInvert($0) { - $0 = $0|0; - var $1 = 0.0, $10 = 0, $100 = 0.0, $101 = 0.0, $102 = 0.0, $103 = 0.0, $104 = 0.0, $105 = 0.0, $106 = 0.0, $107 = 0.0, $108 = 0.0, $109 = 0.0, $11 = 0.0, $110 = 0.0, $111 = 0.0, $112 = 0.0, $113 = 0.0, $114 = 0.0, $115 = 0.0, $116 = 0.0; - var $117 = 0.0, $118 = 0.0, $119 = 0.0, $12 = 0, $120 = 0.0, $121 = 0.0, $122 = 0.0, $123 = 0.0, $124 = 0.0, $125 = 0.0, $126 = 0.0, $127 = 0.0, $128 = 0.0, $129 = 0.0, $13 = 0.0, $130 = 0.0, $131 = 0.0, $132 = 0.0, $133 = 0.0, $134 = 0.0; - var $135 = 0.0, $136 = 0.0, $137 = 0.0, $138 = 0.0, $139 = 0.0, $14 = 0, $140 = 0.0, $141 = 0.0, $142 = 0.0, $143 = 0.0, $144 = 0.0, $145 = 0.0, $146 = 0.0, $147 = 0.0, $148 = 0.0, $149 = 0.0, $15 = 0.0, $150 = 0.0, $151 = 0.0, $152 = 0.0; - var $153 = 0.0, $154 = 0.0, $155 = 0.0, $156 = 0.0, $157 = 0.0, $158 = 0.0, $159 = 0.0, $16 = 0, $160 = 0.0, $161 = 0.0, $162 = 0.0, $163 = 0.0, $164 = 0.0, $165 = 0.0, $166 = 0.0, $167 = 0.0, $168 = 0.0, $169 = 0.0, $17 = 0.0, $170 = 0.0; - var $171 = 0.0, $172 = 0.0, $173 = 0.0, $174 = 0.0, $175 = 0.0, $176 = 0.0, $177 = 0.0, $18 = 0, $19 = 0.0, $2 = 0, $20 = 0, $21 = 0.0, $22 = 0, $23 = 0.0, $24 = 0, $25 = 0.0, $26 = 0, $27 = 0.0, $28 = 0, $29 = 0.0; - var $3 = 0.0, $30 = 0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0.0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0.0, $44 = 0.0, $45 = 0.0, $46 = 0.0, $47 = 0.0; - var $48 = 0.0, $49 = 0.0, $5 = 0.0, $50 = 0.0, $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0.0, $55 = 0.0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0.0, $61 = 0.0, $62 = 0.0, $63 = 0.0, $64 = 0.0, $65 = 0.0; - var $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0.0, $7 = 0.0, $70 = 0.0, $71 = 0.0, $72 = 0.0, $73 = 0.0, $74 = 0.0, $75 = 0.0, $76 = 0.0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0.0, $81 = 0.0, $82 = 0.0, $83 = 0.0; - var $84 = 0.0, $85 = 0.0, $86 = 0.0, $87 = 0.0, $88 = 0.0, $89 = 0.0, $9 = 0.0, $90 = 0.0, $91 = 0.0, $92 = 0.0, $93 = 0.0, $94 = 0.0, $95 = 0.0, $96 = 0.0, $97 = 0.0, $98 = 0.0, $99 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $1 = +HEAPF32[$0>>2]; - $2 = ((($0)) + 16|0); - $3 = +HEAPF32[$2>>2]; - $4 = ((($0)) + 32|0); - $5 = +HEAPF32[$4>>2]; - $6 = ((($0)) + 48|0); - $7 = +HEAPF32[$6>>2]; - $8 = ((($0)) + 4|0); - $9 = +HEAPF32[$8>>2]; - $10 = ((($0)) + 20|0); - $11 = +HEAPF32[$10>>2]; - $12 = ((($0)) + 36|0); - $13 = +HEAPF32[$12>>2]; - $14 = ((($0)) + 52|0); - $15 = +HEAPF32[$14>>2]; - $16 = ((($0)) + 8|0); - $17 = +HEAPF32[$16>>2]; - $18 = ((($0)) + 24|0); - $19 = +HEAPF32[$18>>2]; - $20 = ((($0)) + 40|0); - $21 = +HEAPF32[$20>>2]; - $22 = ((($0)) + 56|0); - $23 = +HEAPF32[$22>>2]; - $24 = ((($0)) + 12|0); - $25 = +HEAPF32[$24>>2]; - $26 = ((($0)) + 28|0); - $27 = +HEAPF32[$26>>2]; - $28 = ((($0)) + 44|0); - $29 = +HEAPF32[$28>>2]; - $30 = ((($0)) + 60|0); - $31 = +HEAPF32[$30>>2]; - $32 = $1 * $11; - $33 = $3 * $9; - $34 = $32 - $33; - $35 = $1 * $13; - $36 = $5 * $9; - $37 = $35 - $36; - $38 = $1 * $15; - $39 = $7 * $9; - $40 = $38 - $39; - $41 = $3 * $13; - $42 = $5 * $11; - $43 = $41 - $42; - $44 = $3 * $15; - $45 = $7 * $11; - $46 = $44 - $45; - $47 = $5 * $15; - $48 = $7 * $13; - $49 = $47 - $48; - $50 = $17 * $27; - $51 = $19 * $25; - $52 = $50 - $51; - $53 = $17 * $29; - $54 = $21 * $25; - $55 = $53 - $54; - $56 = $17 * $31; - $57 = $23 * $25; - $58 = $56 - $57; - $59 = $19 * $29; - $60 = $21 * $27; - $61 = $59 - $60; - $62 = $19 * $31; - $63 = $23 * $27; - $64 = $62 - $63; - $65 = $21 * $31; - $66 = $23 * $29; - $67 = $65 - $66; - $68 = $34 * $67; - $69 = $37 * $64; - $70 = $68 - $69; - $71 = $40 * $61; - $72 = $71 + $70; - $73 = $43 * $58; - $74 = $73 + $72; - $75 = $46 * $55; - $76 = $74 - $75; - $77 = $49 * $52; - $78 = $77 + $76; - $79 = 1.0 / $78; - $80 = $11 * $67; - $81 = $13 * $64; - $82 = $80 - $81; - $83 = $15 * $61; - $84 = $83 + $82; - $85 = $84 * $79; - $86 = $3 * $67; - $87 = $5 * $64; - $88 = $87 - $86; - $89 = $7 * $61; - $90 = $88 - $89; - $91 = $90 * $79; - $92 = $49 * $27; - $93 = $46 * $29; - $94 = $92 - $93; - $95 = $43 * $31; - $96 = $94 + $95; - $97 = $96 * $79; - $98 = $19 * $49; - $99 = $46 * $21; - $100 = $99 - $98; - $101 = $43 * $23; - $102 = $100 - $101; - $103 = $102 * $79; - $104 = -$9; - $105 = $67 * $104; - $106 = $13 * $58; - $107 = $105 + $106; - $108 = $15 * $55; - $109 = $107 - $108; - $110 = $109 * $79; - $111 = $1 * $67; - $112 = $5 * $58; - $113 = $111 - $112; - $114 = $7 * $55; - $115 = $114 + $113; - $116 = $115 * $79; - $117 = -$25; - $118 = $49 * $117; - $119 = $40 * $29; - $120 = $118 + $119; - $121 = $37 * $31; - $122 = $120 - $121; - $123 = $122 * $79; - $124 = $17 * $49; - $125 = $40 * $21; - $126 = $124 - $125; - $127 = $37 * $23; - $128 = $126 + $127; - $129 = $128 * $79; - $130 = $9 * $64; - $131 = $11 * $58; - $132 = $130 - $131; - $133 = $15 * $52; - $134 = $133 + $132; - $135 = $134 * $79; - $136 = $1 * $64; - $137 = $3 * $58; - $138 = $137 - $136; - $139 = $7 * $52; - $140 = $138 - $139; - $141 = $140 * $79; - $142 = $46 * $25; - $143 = $40 * $27; - $144 = $142 - $143; - $145 = $34 * $31; - $146 = $144 + $145; - $147 = $146 * $79; - $148 = $17 * $46; - $149 = $19 * $40; - $150 = $149 - $148; - $151 = $34 * $23; - $152 = $150 - $151; - $153 = $152 * $79; - $154 = $61 * $104; - $155 = $11 * $55; - $156 = $154 + $155; - $157 = $13 * $52; - $158 = $156 - $157; - $159 = $158 * $79; - $160 = $1 * $61; - $161 = $3 * $55; - $162 = $160 - $161; - $163 = $5 * $52; - $164 = $163 + $162; - $165 = $164 * $79; - $166 = $43 * $117; - $167 = $37 * $27; - $168 = $166 + $167; - $169 = $34 * $29; - $170 = $168 - $169; - $171 = $170 * $79; - $172 = $17 * $43; - $173 = $37 * $19; - $174 = $172 - $173; - $175 = $34 * $21; - $176 = $174 + $175; - $177 = $176 * $79; - HEAPF32[$0>>2] = $85; - HEAPF32[$8>>2] = $110; - HEAPF32[$16>>2] = $135; - HEAPF32[$24>>2] = $159; - HEAPF32[$2>>2] = $91; - HEAPF32[$10>>2] = $116; - HEAPF32[$18>>2] = $141; - HEAPF32[$26>>2] = $165; - HEAPF32[$4>>2] = $97; - HEAPF32[$12>>2] = $123; - HEAPF32[$20>>2] = $147; - HEAPF32[$28>>2] = $171; - HEAPF32[$6>>2] = $103; - HEAPF32[$14>>2] = $129; - HEAPF32[$22>>2] = $153; - HEAPF32[$30>>2] = $177; - return; -} -function _MatrixIdentity($0) { - $0 = $0|0; - var $$sroa$5$0$$sroa_idx = 0, $$sroa$55$0$$sroa_idx6 = 0, $$sroa$6$0$$sroa_idx = 0, $$sroa$611$0$$sroa_idx12 = 0, $$sroa$7$0$$sroa_idx = 0, $$sroa$717$0$$sroa_idx18 = 0, label = 0, sp = 0; - sp = STACKTOP; - HEAPF32[$0>>2] = 1.0; - $$sroa$5$0$$sroa_idx = ((($0)) + 4|0); - ;HEAP32[$$sroa$5$0$$sroa_idx>>2]=0|0;HEAP32[$$sroa$5$0$$sroa_idx+4>>2]=0|0;HEAP32[$$sroa$5$0$$sroa_idx+8>>2]=0|0;HEAP32[$$sroa$5$0$$sroa_idx+12>>2]=0|0; - $$sroa$55$0$$sroa_idx6 = ((($0)) + 20|0); - HEAPF32[$$sroa$55$0$$sroa_idx6>>2] = 1.0; - $$sroa$6$0$$sroa_idx = ((($0)) + 24|0); - ;HEAP32[$$sroa$6$0$$sroa_idx>>2]=0|0;HEAP32[$$sroa$6$0$$sroa_idx+4>>2]=0|0;HEAP32[$$sroa$6$0$$sroa_idx+8>>2]=0|0;HEAP32[$$sroa$6$0$$sroa_idx+12>>2]=0|0; - $$sroa$611$0$$sroa_idx12 = ((($0)) + 40|0); - HEAPF32[$$sroa$611$0$$sroa_idx12>>2] = 1.0; - $$sroa$7$0$$sroa_idx = ((($0)) + 44|0); - ;HEAP32[$$sroa$7$0$$sroa_idx>>2]=0|0;HEAP32[$$sroa$7$0$$sroa_idx+4>>2]=0|0;HEAP32[$$sroa$7$0$$sroa_idx+8>>2]=0|0;HEAP32[$$sroa$7$0$$sroa_idx+12>>2]=0|0; - $$sroa$717$0$$sroa_idx18 = ((($0)) + 60|0); - HEAPF32[$$sroa$717$0$$sroa_idx18>>2] = 1.0; - return; -} -function _MatrixTranslate($0,$1,$2,$3) { - $0 = $0|0; - $1 = +$1; - $2 = +$2; - $3 = +$3; - var $$sroa$13$0$$sroa_idx20 = 0, $$sroa$14$0$$sroa_idx22 = 0, $$sroa$15$0$$sroa_idx24 = 0, $$sroa$16$0$$sroa_idx26 = 0, $$sroa$17$0$$sroa_idx28 = 0, $$sroa$18$0$$sroa_idx30 = 0, $$sroa$4$0$$sroa_idx2 = 0, $$sroa$8$0$$sroa_idx10 = 0, $$sroa$9$0$$sroa_idx12 = 0, label = 0, sp = 0; - sp = STACKTOP; - HEAPF32[$0>>2] = 1.0; - $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); - $$sroa$8$0$$sroa_idx10 = ((($0)) + 20|0); - ;HEAP32[$$sroa$4$0$$sroa_idx2>>2]=0|0;HEAP32[$$sroa$4$0$$sroa_idx2+4>>2]=0|0;HEAP32[$$sroa$4$0$$sroa_idx2+8>>2]=0|0;HEAP32[$$sroa$4$0$$sroa_idx2+12>>2]=0|0; - HEAPF32[$$sroa$8$0$$sroa_idx10>>2] = 1.0; - $$sroa$9$0$$sroa_idx12 = ((($0)) + 24|0); - $$sroa$13$0$$sroa_idx20 = ((($0)) + 40|0); - ;HEAP32[$$sroa$9$0$$sroa_idx12>>2]=0|0;HEAP32[$$sroa$9$0$$sroa_idx12+4>>2]=0|0;HEAP32[$$sroa$9$0$$sroa_idx12+8>>2]=0|0;HEAP32[$$sroa$9$0$$sroa_idx12+12>>2]=0|0; - HEAPF32[$$sroa$13$0$$sroa_idx20>>2] = 1.0; - $$sroa$14$0$$sroa_idx22 = ((($0)) + 44|0); - HEAPF32[$$sroa$14$0$$sroa_idx22>>2] = 0.0; - $$sroa$15$0$$sroa_idx24 = ((($0)) + 48|0); - HEAPF32[$$sroa$15$0$$sroa_idx24>>2] = $1; - $$sroa$16$0$$sroa_idx26 = ((($0)) + 52|0); - HEAPF32[$$sroa$16$0$$sroa_idx26>>2] = $2; - $$sroa$17$0$$sroa_idx28 = ((($0)) + 56|0); - HEAPF32[$$sroa$17$0$$sroa_idx28>>2] = $3; - $$sroa$18$0$$sroa_idx30 = ((($0)) + 60|0); - HEAPF32[$$sroa$18$0$$sroa_idx30>>2] = 1.0; - return; -} -function _MatrixRotate($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = +$2; - var $$ = 0.0, $$221 = 0.0, $$222 = 0.0, $$sroa$10$0$$sroa_idx199 = 0, $$sroa$11$0$$sroa_idx201 = 0, $$sroa$12$0$$sroa_idx203 = 0, $$sroa$13$0$$sroa_idx205 = 0, $$sroa$14$0$$sroa_idx207 = 0, $$sroa$15$0$$sroa_idx209 = 0, $$sroa$16$0$$sroa_idx211 = 0, $$sroa$17$0$$sroa_idx213 = 0, $$sroa$18$0$$sroa_idx215 = 0, $$sroa$4$0$$sroa_idx187 = 0, $$sroa$5$0$$sroa_idx189 = 0, $$sroa$6$0$$sroa_idx191 = 0, $$sroa$7$0$$sroa_idx193 = 0, $$sroa$8$0$$sroa_idx195 = 0, $$sroa$9$0$$sroa_idx197 = 0, $10 = 0.0, $100 = 0.0; - var $101 = 0.0, $102 = 0.0, $103 = 0.0, $104 = 0.0, $105 = 0.0, $106 = 0.0, $107 = 0.0, $108 = 0.0, $109 = 0.0, $11 = 0.0, $110 = 0.0, $111 = 0.0, $112 = 0.0, $113 = 0.0, $114 = 0.0, $115 = 0.0, $116 = 0.0, $117 = 0.0, $118 = 0.0, $119 = 0.0; - var $12 = 0.0, $120 = 0.0, $121 = 0.0, $122 = 0.0, $123 = 0.0, $124 = 0.0, $125 = 0.0, $126 = 0.0, $127 = 0.0, $128 = 0.0, $129 = 0.0, $13 = 0.0, $130 = 0.0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0; - var $138 = 0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0, $26 = 0.0, $27 = 0, $28 = 0.0, $29 = 0, $3 = 0, $30 = 0.0, $31 = 0; - var $32 = 0.0, $33 = 0, $34 = 0.0, $35 = 0, $36 = 0.0, $37 = 0, $38 = 0.0, $39 = 0, $4 = 0.0, $40 = 0.0, $41 = 0, $42 = 0.0, $43 = 0, $44 = 0.0, $45 = 0, $46 = 0.0, $47 = 0.0, $48 = 0.0, $49 = 0.0, $5 = 0; - var $50 = 0.0, $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0.0, $55 = 0.0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0.0, $6 = 0.0, $60 = 0.0, $61 = 0.0, $62 = 0.0, $63 = 0.0, $64 = 0.0, $65 = 0.0, $66 = 0.0, $67 = 0.0, $68 = 0.0; - var $69 = 0.0, $7 = 0, $70 = 0.0, $71 = 0.0, $72 = 0.0, $73 = 0.0, $74 = 0.0, $75 = 0.0, $76 = 0.0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0.0, $80 = 0.0, $81 = 0.0, $82 = 0.0, $83 = 0.0, $84 = 0.0, $85 = 0.0, $86 = 0.0; - var $87 = 0.0, $88 = 0.0, $89 = 0.0, $9 = 0.0, $90 = 0.0, $91 = 0.0, $92 = 0.0, $93 = 0.0, $94 = 0.0, $95 = 0.0, $96 = 0.0, $97 = 0.0, $98 = 0.0, $99 = 0.0, $or$cond = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); - $3 = sp; - _MatrixIdentity($3); - $4 = +HEAPF32[$1>>2]; - $5 = ((($1)) + 4|0); - $6 = +HEAPF32[$5>>2]; - $7 = ((($1)) + 8|0); - $8 = +HEAPF32[$7>>2]; - $9 = $4 * $4; - $10 = $6 * $6; - $11 = $9 + $10; - $12 = $8 * $8; - $13 = $11 + $12; - $14 = (+Math_sqrt((+$13))); - $15 = $14 != 1.0; - $16 = $14 != 0.0; - $or$cond = $15 & $16; - $17 = 1.0 / $14; - $18 = $4 * $17; - $19 = $6 * $17; - $20 = $8 * $17; - $$ = $or$cond ? $20 : $8; - $$221 = $or$cond ? $19 : $6; - $$222 = $or$cond ? $18 : $4; - $21 = (+Math_sin((+$2))); - $22 = (+Math_cos((+$2))); - $23 = 1.0 - $22; - $24 = +HEAPF32[$3>>2]; - $25 = ((($3)) + 16|0); - $26 = +HEAPF32[$25>>2]; - $27 = ((($3)) + 32|0); - $28 = +HEAPF32[$27>>2]; - $29 = ((($3)) + 48|0); - $30 = +HEAPF32[$29>>2]; - $31 = ((($3)) + 4|0); - $32 = +HEAPF32[$31>>2]; - $33 = ((($3)) + 20|0); - $34 = +HEAPF32[$33>>2]; - $35 = ((($3)) + 36|0); - $36 = +HEAPF32[$35>>2]; - $37 = ((($3)) + 52|0); - $38 = +HEAPF32[$37>>2]; - $39 = ((($3)) + 8|0); - $40 = +HEAPF32[$39>>2]; - $41 = ((($3)) + 24|0); - $42 = +HEAPF32[$41>>2]; - $43 = ((($3)) + 40|0); - $44 = +HEAPF32[$43>>2]; - $45 = ((($3)) + 56|0); - $46 = +HEAPF32[$45>>2]; - $47 = $$222 * $$222; - $48 = $23 * $47; - $49 = $22 + $48; - $50 = $$221 * $$222; - $51 = $23 * $50; - $52 = $21 * $$; - $53 = $52 + $51; - $54 = $$ * $$222; - $55 = $23 * $54; - $56 = $21 * $$221; - $57 = $55 - $56; - $58 = $51 - $52; - $59 = $$221 * $$221; - $60 = $23 * $59; - $61 = $22 + $60; - $62 = $$ * $$221; - $63 = $23 * $62; - $64 = $21 * $$222; - $65 = $64 + $63; - $66 = $56 + $55; - $67 = $63 - $64; - $68 = $$ * $$; - $69 = $23 * $68; - $70 = $22 + $69; - $71 = $24 * $49; - $72 = $53 * $32; - $73 = $71 + $72; - $74 = $57 * $40; - $75 = $73 + $74; - $76 = $26 * $49; - $77 = $53 * $34; - $78 = $76 + $77; - $79 = $57 * $42; - $80 = $78 + $79; - $81 = $28 * $49; - $82 = $53 * $36; - $83 = $81 + $82; - $84 = $57 * $44; - $85 = $83 + $84; - $86 = $30 * $49; - $87 = $53 * $38; - $88 = $86 + $87; - $89 = $57 * $46; - $90 = $88 + $89; - $91 = $24 * $58; - $92 = $61 * $32; - $93 = $91 + $92; - $94 = $65 * $40; - $95 = $93 + $94; - $96 = $26 * $58; - $97 = $61 * $34; - $98 = $96 + $97; - $99 = $65 * $42; - $100 = $98 + $99; - $101 = $28 * $58; - $102 = $61 * $36; - $103 = $101 + $102; - $104 = $65 * $44; - $105 = $103 + $104; - $106 = $30 * $58; - $107 = $61 * $38; - $108 = $106 + $107; - $109 = $65 * $46; - $110 = $108 + $109; - $111 = $24 * $66; - $112 = $67 * $32; - $113 = $111 + $112; - $114 = $70 * $40; - $115 = $113 + $114; - $116 = $26 * $66; - $117 = $67 * $34; - $118 = $116 + $117; - $119 = $70 * $42; - $120 = $118 + $119; - $121 = $28 * $66; - $122 = $67 * $36; - $123 = $121 + $122; - $124 = $70 * $44; - $125 = $123 + $124; - $126 = $30 * $66; - $127 = $67 * $38; - $128 = $126 + $127; - $129 = $70 * $46; - $130 = $128 + $129; - $131 = ((($3)) + 12|0); - $132 = HEAP32[$131>>2]|0; - $133 = ((($3)) + 28|0); - $134 = HEAP32[$133>>2]|0; - $135 = ((($3)) + 44|0); - $136 = HEAP32[$135>>2]|0; - $137 = ((($3)) + 60|0); - $138 = HEAP32[$137>>2]|0; - HEAPF32[$0>>2] = $75; - $$sroa$4$0$$sroa_idx187 = ((($0)) + 4|0); - HEAPF32[$$sroa$4$0$$sroa_idx187>>2] = $95; - $$sroa$5$0$$sroa_idx189 = ((($0)) + 8|0); - HEAPF32[$$sroa$5$0$$sroa_idx189>>2] = $115; - $$sroa$6$0$$sroa_idx191 = ((($0)) + 12|0); - HEAP32[$$sroa$6$0$$sroa_idx191>>2] = $132; - $$sroa$7$0$$sroa_idx193 = ((($0)) + 16|0); - HEAPF32[$$sroa$7$0$$sroa_idx193>>2] = $80; - $$sroa$8$0$$sroa_idx195 = ((($0)) + 20|0); - HEAPF32[$$sroa$8$0$$sroa_idx195>>2] = $100; - $$sroa$9$0$$sroa_idx197 = ((($0)) + 24|0); - HEAPF32[$$sroa$9$0$$sroa_idx197>>2] = $120; - $$sroa$10$0$$sroa_idx199 = ((($0)) + 28|0); - HEAP32[$$sroa$10$0$$sroa_idx199>>2] = $134; - $$sroa$11$0$$sroa_idx201 = ((($0)) + 32|0); - HEAPF32[$$sroa$11$0$$sroa_idx201>>2] = $85; - $$sroa$12$0$$sroa_idx203 = ((($0)) + 36|0); - HEAPF32[$$sroa$12$0$$sroa_idx203>>2] = $105; - $$sroa$13$0$$sroa_idx205 = ((($0)) + 40|0); - HEAPF32[$$sroa$13$0$$sroa_idx205>>2] = $125; - $$sroa$14$0$$sroa_idx207 = ((($0)) + 44|0); - HEAP32[$$sroa$14$0$$sroa_idx207>>2] = $136; - $$sroa$15$0$$sroa_idx209 = ((($0)) + 48|0); - HEAPF32[$$sroa$15$0$$sroa_idx209>>2] = $90; - $$sroa$16$0$$sroa_idx211 = ((($0)) + 52|0); - HEAPF32[$$sroa$16$0$$sroa_idx211>>2] = $110; - $$sroa$17$0$$sroa_idx213 = ((($0)) + 56|0); - HEAPF32[$$sroa$17$0$$sroa_idx213>>2] = $130; - $$sroa$18$0$$sroa_idx215 = ((($0)) + 60|0); - HEAP32[$$sroa$18$0$$sroa_idx215>>2] = $138; - STACKTOP = sp;return; -} -function _MatrixScale($0,$1,$2,$3) { - $0 = $0|0; - $1 = +$1; - $2 = +$2; - $3 = +$3; - var $$sroa$5$0$$sroa_idx = 0, $$sroa$55$0$$sroa_idx6 = 0, $$sroa$6$0$$sroa_idx = 0, $$sroa$611$0$$sroa_idx12 = 0, $$sroa$7$0$$sroa_idx = 0, $$sroa$717$0$$sroa_idx18 = 0, label = 0, sp = 0; - sp = STACKTOP; - HEAPF32[$0>>2] = $1; - $$sroa$5$0$$sroa_idx = ((($0)) + 4|0); - ;HEAP32[$$sroa$5$0$$sroa_idx>>2]=0|0;HEAP32[$$sroa$5$0$$sroa_idx+4>>2]=0|0;HEAP32[$$sroa$5$0$$sroa_idx+8>>2]=0|0;HEAP32[$$sroa$5$0$$sroa_idx+12>>2]=0|0; - $$sroa$55$0$$sroa_idx6 = ((($0)) + 20|0); - HEAPF32[$$sroa$55$0$$sroa_idx6>>2] = $2; - $$sroa$6$0$$sroa_idx = ((($0)) + 24|0); - ;HEAP32[$$sroa$6$0$$sroa_idx>>2]=0|0;HEAP32[$$sroa$6$0$$sroa_idx+4>>2]=0|0;HEAP32[$$sroa$6$0$$sroa_idx+8>>2]=0|0;HEAP32[$$sroa$6$0$$sroa_idx+12>>2]=0|0; - $$sroa$611$0$$sroa_idx12 = ((($0)) + 40|0); - HEAPF32[$$sroa$611$0$$sroa_idx12>>2] = $3; - $$sroa$7$0$$sroa_idx = ((($0)) + 44|0); - ;HEAP32[$$sroa$7$0$$sroa_idx>>2]=0|0;HEAP32[$$sroa$7$0$$sroa_idx+4>>2]=0|0;HEAP32[$$sroa$7$0$$sroa_idx+8>>2]=0|0;HEAP32[$$sroa$7$0$$sroa_idx+12>>2]=0|0; - $$sroa$717$0$$sroa_idx18 = ((($0)) + 60|0); - HEAPF32[$$sroa$717$0$$sroa_idx18>>2] = 1.0; - return; -} -function _MatrixMultiply($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $$sroa$10$0$$sroa_idx14 = 0, $$sroa$11$0$$sroa_idx16 = 0, $$sroa$12$0$$sroa_idx18 = 0, $$sroa$13$0$$sroa_idx20 = 0, $$sroa$14$0$$sroa_idx22 = 0, $$sroa$15$0$$sroa_idx24 = 0, $$sroa$16$0$$sroa_idx26 = 0, $$sroa$17$0$$sroa_idx28 = 0, $$sroa$18$0$$sroa_idx30 = 0, $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $$sroa$6$0$$sroa_idx6 = 0, $$sroa$7$0$$sroa_idx8 = 0, $$sroa$8$0$$sroa_idx10 = 0, $$sroa$9$0$$sroa_idx12 = 0, $10 = 0.0, $100 = 0.0, $101 = 0.0, $102 = 0.0, $103 = 0.0; - var $104 = 0.0, $105 = 0, $106 = 0.0, $107 = 0.0, $108 = 0, $109 = 0.0, $11 = 0.0, $110 = 0.0, $111 = 0.0, $112 = 0, $113 = 0.0, $114 = 0.0, $115 = 0.0, $116 = 0, $117 = 0.0, $118 = 0.0, $119 = 0.0, $12 = 0, $120 = 0.0, $121 = 0.0; - var $122 = 0.0, $123 = 0.0, $124 = 0.0, $125 = 0.0, $126 = 0.0, $127 = 0.0, $128 = 0.0, $129 = 0.0, $13 = 0.0, $130 = 0.0, $131 = 0.0, $132 = 0.0, $133 = 0.0, $134 = 0.0, $135 = 0.0, $136 = 0.0, $137 = 0.0, $138 = 0.0, $139 = 0.0, $14 = 0; - var $140 = 0.0, $141 = 0, $142 = 0.0, $143 = 0.0, $144 = 0, $145 = 0.0, $146 = 0.0, $147 = 0.0, $148 = 0, $149 = 0.0, $15 = 0.0, $150 = 0.0, $151 = 0.0, $152 = 0, $153 = 0.0, $154 = 0.0, $155 = 0.0, $156 = 0.0, $157 = 0.0, $158 = 0.0; - var $159 = 0.0, $16 = 0.0, $160 = 0.0, $161 = 0.0, $162 = 0.0, $163 = 0.0, $164 = 0.0, $165 = 0.0, $166 = 0.0, $167 = 0.0, $168 = 0.0, $169 = 0.0, $17 = 0.0, $170 = 0.0, $171 = 0.0, $172 = 0.0, $173 = 0.0, $174 = 0.0, $175 = 0.0, $176 = 0.0; - var $18 = 0, $19 = 0.0, $20 = 0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0, $25 = 0.0, $26 = 0.0, $27 = 0, $28 = 0.0, $29 = 0.0, $3 = 0.0, $30 = 0.0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0.0; - var $37 = 0.0, $38 = 0.0, $39 = 0, $4 = 0.0, $40 = 0.0, $41 = 0.0, $42 = 0, $43 = 0.0, $44 = 0.0, $45 = 0.0, $46 = 0, $47 = 0.0, $48 = 0.0, $49 = 0.0, $5 = 0.0, $50 = 0, $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0; - var $55 = 0.0, $56 = 0.0, $57 = 0, $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0.0, $61 = 0, $62 = 0.0, $63 = 0.0, $64 = 0.0, $65 = 0, $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0, $7 = 0.0, $70 = 0.0, $71 = 0.0, $72 = 0; - var $73 = 0.0, $74 = 0.0, $75 = 0.0, $76 = 0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0, $81 = 0.0, $82 = 0.0, $83 = 0.0, $84 = 0.0, $85 = 0.0, $86 = 0.0, $87 = 0.0, $88 = 0.0, $89 = 0.0, $9 = 0.0, $90 = 0.0; - var $91 = 0.0, $92 = 0.0, $93 = 0.0, $94 = 0.0, $95 = 0.0, $96 = 0.0, $97 = 0.0, $98 = 0.0, $99 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $3 = +HEAPF32[$2>>2]; - $4 = +HEAPF32[$1>>2]; - $5 = $3 * $4; - $6 = ((($2)) + 16|0); - $7 = +HEAPF32[$6>>2]; - $8 = ((($1)) + 4|0); - $9 = +HEAPF32[$8>>2]; - $10 = $7 * $9; - $11 = $5 + $10; - $12 = ((($2)) + 32|0); - $13 = +HEAPF32[$12>>2]; - $14 = ((($1)) + 8|0); - $15 = +HEAPF32[$14>>2]; - $16 = $13 * $15; - $17 = $11 + $16; - $18 = ((($2)) + 48|0); - $19 = +HEAPF32[$18>>2]; - $20 = ((($1)) + 12|0); - $21 = +HEAPF32[$20>>2]; - $22 = $19 * $21; - $23 = $17 + $22; - $24 = ((($1)) + 16|0); - $25 = +HEAPF32[$24>>2]; - $26 = $3 * $25; - $27 = ((($1)) + 20|0); - $28 = +HEAPF32[$27>>2]; - $29 = $7 * $28; - $30 = $26 + $29; - $31 = ((($1)) + 24|0); - $32 = +HEAPF32[$31>>2]; - $33 = $13 * $32; - $34 = $30 + $33; - $35 = ((($1)) + 28|0); - $36 = +HEAPF32[$35>>2]; - $37 = $19 * $36; - $38 = $34 + $37; - $39 = ((($1)) + 32|0); - $40 = +HEAPF32[$39>>2]; - $41 = $3 * $40; - $42 = ((($1)) + 36|0); - $43 = +HEAPF32[$42>>2]; - $44 = $7 * $43; - $45 = $41 + $44; - $46 = ((($1)) + 40|0); - $47 = +HEAPF32[$46>>2]; - $48 = $13 * $47; - $49 = $45 + $48; - $50 = ((($1)) + 44|0); - $51 = +HEAPF32[$50>>2]; - $52 = $19 * $51; - $53 = $49 + $52; - $54 = ((($1)) + 48|0); - $55 = +HEAPF32[$54>>2]; - $56 = $3 * $55; - $57 = ((($1)) + 52|0); - $58 = +HEAPF32[$57>>2]; - $59 = $7 * $58; - $60 = $56 + $59; - $61 = ((($1)) + 56|0); - $62 = +HEAPF32[$61>>2]; - $63 = $13 * $62; - $64 = $60 + $63; - $65 = ((($1)) + 60|0); - $66 = +HEAPF32[$65>>2]; - $67 = $19 * $66; - $68 = $64 + $67; - $69 = ((($2)) + 4|0); - $70 = +HEAPF32[$69>>2]; - $71 = $4 * $70; - $72 = ((($2)) + 20|0); - $73 = +HEAPF32[$72>>2]; - $74 = $9 * $73; - $75 = $71 + $74; - $76 = ((($2)) + 36|0); - $77 = +HEAPF32[$76>>2]; - $78 = $15 * $77; - $79 = $75 + $78; - $80 = ((($2)) + 52|0); - $81 = +HEAPF32[$80>>2]; - $82 = $21 * $81; - $83 = $79 + $82; - $84 = $25 * $70; - $85 = $28 * $73; - $86 = $84 + $85; - $87 = $32 * $77; - $88 = $86 + $87; - $89 = $36 * $81; - $90 = $88 + $89; - $91 = $40 * $70; - $92 = $43 * $73; - $93 = $91 + $92; - $94 = $47 * $77; - $95 = $93 + $94; - $96 = $51 * $81; - $97 = $95 + $96; - $98 = $55 * $70; - $99 = $58 * $73; - $100 = $98 + $99; - $101 = $62 * $77; - $102 = $100 + $101; - $103 = $66 * $81; - $104 = $102 + $103; - $105 = ((($2)) + 8|0); - $106 = +HEAPF32[$105>>2]; - $107 = $4 * $106; - $108 = ((($2)) + 24|0); - $109 = +HEAPF32[$108>>2]; - $110 = $9 * $109; - $111 = $107 + $110; - $112 = ((($2)) + 40|0); - $113 = +HEAPF32[$112>>2]; - $114 = $15 * $113; - $115 = $111 + $114; - $116 = ((($2)) + 56|0); - $117 = +HEAPF32[$116>>2]; - $118 = $21 * $117; - $119 = $115 + $118; - $120 = $25 * $106; - $121 = $28 * $109; - $122 = $120 + $121; - $123 = $32 * $113; - $124 = $122 + $123; - $125 = $36 * $117; - $126 = $124 + $125; - $127 = $40 * $106; - $128 = $43 * $109; - $129 = $127 + $128; - $130 = $47 * $113; - $131 = $129 + $130; - $132 = $51 * $117; - $133 = $131 + $132; - $134 = $55 * $106; - $135 = $58 * $109; - $136 = $134 + $135; - $137 = $62 * $113; - $138 = $136 + $137; - $139 = $66 * $117; - $140 = $138 + $139; - $141 = ((($2)) + 12|0); - $142 = +HEAPF32[$141>>2]; - $143 = $4 * $142; - $144 = ((($2)) + 28|0); - $145 = +HEAPF32[$144>>2]; - $146 = $9 * $145; - $147 = $143 + $146; - $148 = ((($2)) + 44|0); - $149 = +HEAPF32[$148>>2]; - $150 = $15 * $149; - $151 = $147 + $150; - $152 = ((($2)) + 60|0); - $153 = +HEAPF32[$152>>2]; - $154 = $21 * $153; - $155 = $151 + $154; - $156 = $25 * $142; - $157 = $28 * $145; - $158 = $156 + $157; - $159 = $32 * $149; - $160 = $158 + $159; - $161 = $36 * $153; - $162 = $160 + $161; - $163 = $40 * $142; - $164 = $43 * $145; - $165 = $163 + $164; - $166 = $47 * $149; - $167 = $165 + $166; - $168 = $51 * $153; - $169 = $167 + $168; - $170 = $55 * $142; - $171 = $58 * $145; - $172 = $170 + $171; - $173 = $62 * $149; - $174 = $172 + $173; - $175 = $66 * $153; - $176 = $174 + $175; - HEAPF32[$0>>2] = $23; - $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); - HEAPF32[$$sroa$4$0$$sroa_idx2>>2] = $83; - $$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0); - HEAPF32[$$sroa$5$0$$sroa_idx4>>2] = $119; - $$sroa$6$0$$sroa_idx6 = ((($0)) + 12|0); - HEAPF32[$$sroa$6$0$$sroa_idx6>>2] = $155; - $$sroa$7$0$$sroa_idx8 = ((($0)) + 16|0); - HEAPF32[$$sroa$7$0$$sroa_idx8>>2] = $38; - $$sroa$8$0$$sroa_idx10 = ((($0)) + 20|0); - HEAPF32[$$sroa$8$0$$sroa_idx10>>2] = $90; - $$sroa$9$0$$sroa_idx12 = ((($0)) + 24|0); - HEAPF32[$$sroa$9$0$$sroa_idx12>>2] = $126; - $$sroa$10$0$$sroa_idx14 = ((($0)) + 28|0); - HEAPF32[$$sroa$10$0$$sroa_idx14>>2] = $162; - $$sroa$11$0$$sroa_idx16 = ((($0)) + 32|0); - HEAPF32[$$sroa$11$0$$sroa_idx16>>2] = $53; - $$sroa$12$0$$sroa_idx18 = ((($0)) + 36|0); - HEAPF32[$$sroa$12$0$$sroa_idx18>>2] = $97; - $$sroa$13$0$$sroa_idx20 = ((($0)) + 40|0); - HEAPF32[$$sroa$13$0$$sroa_idx20>>2] = $133; - $$sroa$14$0$$sroa_idx22 = ((($0)) + 44|0); - HEAPF32[$$sroa$14$0$$sroa_idx22>>2] = $169; - $$sroa$15$0$$sroa_idx24 = ((($0)) + 48|0); - HEAPF32[$$sroa$15$0$$sroa_idx24>>2] = $68; - $$sroa$16$0$$sroa_idx26 = ((($0)) + 52|0); - HEAPF32[$$sroa$16$0$$sroa_idx26>>2] = $104; - $$sroa$17$0$$sroa_idx28 = ((($0)) + 56|0); - HEAPF32[$$sroa$17$0$$sroa_idx28>>2] = $140; - $$sroa$18$0$$sroa_idx30 = ((($0)) + 60|0); - HEAPF32[$$sroa$18$0$$sroa_idx30>>2] = $176; - return; -} -function _MatrixFrustum($0,$1,$2,$3,$4,$5,$6) { - $0 = $0|0; - $1 = +$1; - $2 = +$2; - $3 = +$3; - $4 = +$4; - $5 = +$5; - $6 = +$6; - var $$sroa$10$0$$sroa_idx24 = 0, $$sroa$11$0$$sroa_idx26 = 0, $$sroa$12$0$$sroa_idx28 = 0, $$sroa$13$0$$sroa_idx30 = 0, $$sroa$14$0$$sroa_idx32 = 0, $$sroa$15$0$$sroa_idx34 = 0, $$sroa$16$0$$sroa_idx36 = 0, $$sroa$17$0$$sroa_idx38 = 0, $$sroa$18$0$$sroa_idx40 = 0, $$sroa$4$0$$sroa_idx12 = 0, $$sroa$5$0$$sroa_idx14 = 0, $$sroa$6$0$$sroa_idx16 = 0, $$sroa$7$0$$sroa_idx18 = 0, $$sroa$8$0$$sroa_idx20 = 0, $$sroa$9$0$$sroa_idx22 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0; - var $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $27 = 0.0, $28 = 0.0, $29 = 0.0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0.0; - var $35 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $7 = $2 - $1; - $8 = $7; - $9 = $4 - $3; - $10 = $9; - $11 = $6 - $5; - $12 = $11; - $13 = $5 * 2.0; - $14 = $8; - $15 = $13 / $14; - $16 = $15; - $17 = $10; - $18 = $13 / $17; - $19 = $18; - $20 = $1 + $2; - $21 = $20 / $14; - $22 = $21; - $23 = $3 + $4; - $24 = $23 / $17; - $25 = $24; - $26 = $5 + $6; - $27 = -$26; - $28 = $12; - $29 = $27 / $28; - $30 = $29; - $31 = $5 * $6; - $32 = $31 * 2.0; - $33 = -$32; - $34 = $33 / $28; - $35 = $34; - HEAPF32[$0>>2] = $16; - $$sroa$4$0$$sroa_idx12 = ((($0)) + 4|0); - HEAPF32[$$sroa$4$0$$sroa_idx12>>2] = 0.0; - $$sroa$5$0$$sroa_idx14 = ((($0)) + 8|0); - HEAPF32[$$sroa$5$0$$sroa_idx14>>2] = $22; - $$sroa$6$0$$sroa_idx16 = ((($0)) + 12|0); - HEAPF32[$$sroa$6$0$$sroa_idx16>>2] = 0.0; - $$sroa$7$0$$sroa_idx18 = ((($0)) + 16|0); - HEAPF32[$$sroa$7$0$$sroa_idx18>>2] = 0.0; - $$sroa$8$0$$sroa_idx20 = ((($0)) + 20|0); - HEAPF32[$$sroa$8$0$$sroa_idx20>>2] = $19; - $$sroa$9$0$$sroa_idx22 = ((($0)) + 24|0); - HEAPF32[$$sroa$9$0$$sroa_idx22>>2] = $25; - $$sroa$10$0$$sroa_idx24 = ((($0)) + 28|0); - HEAPF32[$$sroa$10$0$$sroa_idx24>>2] = 0.0; - $$sroa$11$0$$sroa_idx26 = ((($0)) + 32|0); - HEAPF32[$$sroa$11$0$$sroa_idx26>>2] = 0.0; - $$sroa$12$0$$sroa_idx28 = ((($0)) + 36|0); - HEAPF32[$$sroa$12$0$$sroa_idx28>>2] = 0.0; - $$sroa$13$0$$sroa_idx30 = ((($0)) + 40|0); - HEAPF32[$$sroa$13$0$$sroa_idx30>>2] = $30; - $$sroa$14$0$$sroa_idx32 = ((($0)) + 44|0); - HEAPF32[$$sroa$14$0$$sroa_idx32>>2] = $35; - $$sroa$15$0$$sroa_idx34 = ((($0)) + 48|0); - HEAPF32[$$sroa$15$0$$sroa_idx34>>2] = 0.0; - $$sroa$16$0$$sroa_idx36 = ((($0)) + 52|0); - HEAPF32[$$sroa$16$0$$sroa_idx36>>2] = 0.0; - $$sroa$17$0$$sroa_idx38 = ((($0)) + 56|0); - HEAPF32[$$sroa$17$0$$sroa_idx38>>2] = -1.0; - $$sroa$18$0$$sroa_idx40 = ((($0)) + 60|0); - HEAPF32[$$sroa$18$0$$sroa_idx40>>2] = 0.0; - return; -} -function _MatrixOrtho($0,$1,$2,$3,$4,$5,$6) { - $0 = $0|0; - $1 = +$1; - $2 = +$2; - $3 = +$3; - $4 = +$4; - $5 = +$5; - $6 = +$6; - var $$sroa$10$0$$sroa_idx24 = 0, $$sroa$11$0$$sroa_idx26 = 0, $$sroa$12$0$$sroa_idx28 = 0, $$sroa$13$0$$sroa_idx30 = 0, $$sroa$14$0$$sroa_idx32 = 0, $$sroa$15$0$$sroa_idx34 = 0, $$sroa$16$0$$sroa_idx36 = 0, $$sroa$17$0$$sroa_idx38 = 0, $$sroa$18$0$$sroa_idx40 = 0, $$sroa$4$0$$sroa_idx12 = 0, $$sroa$5$0$$sroa_idx14 = 0, $$sroa$6$0$$sroa_idx16 = 0, $$sroa$7$0$$sroa_idx18 = 0, $$sroa$8$0$$sroa_idx20 = 0, $$sroa$9$0$$sroa_idx22 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0; - var $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $27 = 0.0, $28 = 0.0, $29 = 0.0, $30 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0; - var sp = 0; - sp = STACKTOP; - $7 = $2 - $1; - $8 = $7; - $9 = $4 - $3; - $10 = $9; - $11 = $6 - $5; - $12 = $11; - $13 = 2.0 / $8; - $14 = 2.0 / $10; - $15 = -2.0 / $12; - $16 = $1 + $2; - $17 = -$16; - $18 = $8; - $19 = $17 / $18; - $20 = $19; - $21 = $3 + $4; - $22 = -$21; - $23 = $10; - $24 = $22 / $23; - $25 = $24; - $26 = $5 + $6; - $27 = -$26; - $28 = $12; - $29 = $27 / $28; - $30 = $29; - HEAPF32[$0>>2] = $13; - $$sroa$4$0$$sroa_idx12 = ((($0)) + 4|0); - HEAPF32[$$sroa$4$0$$sroa_idx12>>2] = 0.0; - $$sroa$5$0$$sroa_idx14 = ((($0)) + 8|0); - HEAPF32[$$sroa$5$0$$sroa_idx14>>2] = 0.0; - $$sroa$6$0$$sroa_idx16 = ((($0)) + 12|0); - HEAPF32[$$sroa$6$0$$sroa_idx16>>2] = $20; - $$sroa$7$0$$sroa_idx18 = ((($0)) + 16|0); - HEAPF32[$$sroa$7$0$$sroa_idx18>>2] = 0.0; - $$sroa$8$0$$sroa_idx20 = ((($0)) + 20|0); - HEAPF32[$$sroa$8$0$$sroa_idx20>>2] = $14; - $$sroa$9$0$$sroa_idx22 = ((($0)) + 24|0); - HEAPF32[$$sroa$9$0$$sroa_idx22>>2] = 0.0; - $$sroa$10$0$$sroa_idx24 = ((($0)) + 28|0); - HEAPF32[$$sroa$10$0$$sroa_idx24>>2] = $25; - $$sroa$11$0$$sroa_idx26 = ((($0)) + 32|0); - HEAPF32[$$sroa$11$0$$sroa_idx26>>2] = 0.0; - $$sroa$12$0$$sroa_idx28 = ((($0)) + 36|0); - HEAPF32[$$sroa$12$0$$sroa_idx28>>2] = 0.0; - $$sroa$13$0$$sroa_idx30 = ((($0)) + 40|0); - HEAPF32[$$sroa$13$0$$sroa_idx30>>2] = $15; - $$sroa$14$0$$sroa_idx32 = ((($0)) + 44|0); - HEAPF32[$$sroa$14$0$$sroa_idx32>>2] = $30; - $$sroa$15$0$$sroa_idx34 = ((($0)) + 48|0); - HEAPF32[$$sroa$15$0$$sroa_idx34>>2] = 0.0; - $$sroa$16$0$$sroa_idx36 = ((($0)) + 52|0); - HEAPF32[$$sroa$16$0$$sroa_idx36>>2] = 0.0; - $$sroa$17$0$$sroa_idx38 = ((($0)) + 56|0); - HEAPF32[$$sroa$17$0$$sroa_idx38>>2] = 0.0; - $$sroa$18$0$$sroa_idx40 = ((($0)) + 60|0); - HEAPF32[$$sroa$18$0$$sroa_idx40>>2] = 1.0; - return; -} -function _MatrixLookAt($0,$1,$2,$3) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - $3 = $3|0; - var $$byval_copy4 = 0, $$byval_copy5 = 0, $$sroa$10$0$$sroa_idx14 = 0, $$sroa$11$0$$sroa_idx16 = 0, $$sroa$12$0$$sroa_idx18 = 0, $$sroa$13$0$$sroa_idx20 = 0, $$sroa$14$0$$sroa_idx22 = 0, $$sroa$15$0$$sroa_idx24 = 0, $$sroa$16$0$$sroa_idx26 = 0, $$sroa$17$0$$sroa_idx28 = 0, $$sroa$18$0$$sroa_idx30 = 0, $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $$sroa$6$0$$sroa_idx6 = 0, $$sroa$7$0$$sroa_idx8 = 0, $$sroa$8$0$$sroa_idx10 = 0, $$sroa$9$0$$sroa_idx12 = 0, $10 = 0, $11 = 0.0, $12 = 0.0; - var $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0, $25 = 0.0, $26 = 0, $27 = 0.0, $28 = 0.0, $29 = 0.0, $30 = 0.0, $31 = 0.0, $32 = 0.0; - var $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0.0, $37 = 0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0.0, $44 = 0.0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); - $$byval_copy5 = sp + 48|0; - $$byval_copy4 = sp + 36|0; - $4 = sp + 24|0; - $5 = sp + 12|0; - $6 = sp; - ;HEAP32[$$byval_copy4>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$$byval_copy4+8>>2]=HEAP32[$1+8>>2]|0; - ;HEAP32[$$byval_copy5>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$2+4>>2]|0;HEAP32[$$byval_copy5+8>>2]=HEAP32[$2+8>>2]|0; - _VectorSubtract($4,$$byval_copy4,$$byval_copy5); - _VectorNormalize($4); - ;HEAP32[$$byval_copy4>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$3+4>>2]|0;HEAP32[$$byval_copy4+8>>2]=HEAP32[$3+8>>2]|0; - ;HEAP32[$$byval_copy5>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$4+4>>2]|0;HEAP32[$$byval_copy5+8>>2]=HEAP32[$4+8>>2]|0; - _VectorCrossProduct($5,$$byval_copy4,$$byval_copy5); - _VectorNormalize($5); - ;HEAP32[$$byval_copy4>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$4+4>>2]|0;HEAP32[$$byval_copy4+8>>2]=HEAP32[$4+8>>2]|0; - ;HEAP32[$$byval_copy5>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$5+4>>2]|0;HEAP32[$$byval_copy5+8>>2]=HEAP32[$5+8>>2]|0; - _VectorCrossProduct($6,$$byval_copy4,$$byval_copy5); - _VectorNormalize($6); - $7 = +HEAPF32[$5>>2]; - $8 = ((($5)) + 4|0); - $9 = +HEAPF32[$8>>2]; - $10 = ((($5)) + 8|0); - $11 = +HEAPF32[$10>>2]; - $12 = +HEAPF32[$1>>2]; - $13 = $7 * $12; - $14 = ((($1)) + 4|0); - $15 = +HEAPF32[$14>>2]; - $16 = $9 * $15; - $17 = $13 + $16; - $18 = ((($1)) + 8|0); - $19 = +HEAPF32[$18>>2]; - $20 = $11 * $19; - $21 = $17 + $20; - $22 = -$21; - $23 = +HEAPF32[$6>>2]; - $24 = ((($6)) + 4|0); - $25 = +HEAPF32[$24>>2]; - $26 = ((($6)) + 8|0); - $27 = +HEAPF32[$26>>2]; - $28 = $12 * $23; - $29 = $15 * $25; - $30 = $28 + $29; - $31 = $19 * $27; - $32 = $30 + $31; - $33 = -$32; - $34 = +HEAPF32[$4>>2]; - $35 = ((($4)) + 4|0); - $36 = +HEAPF32[$35>>2]; - $37 = ((($4)) + 8|0); - $38 = +HEAPF32[$37>>2]; - $39 = $12 * $34; - $40 = $15 * $36; - $41 = $39 + $40; - $42 = $19 * $38; - $43 = $41 + $42; - $44 = -$43; - HEAPF32[$0>>2] = $7; - $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); - HEAPF32[$$sroa$4$0$$sroa_idx2>>2] = $23; - $$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0); - HEAPF32[$$sroa$5$0$$sroa_idx4>>2] = $34; - $$sroa$6$0$$sroa_idx6 = ((($0)) + 12|0); - HEAPF32[$$sroa$6$0$$sroa_idx6>>2] = 0.0; - $$sroa$7$0$$sroa_idx8 = ((($0)) + 16|0); - HEAPF32[$$sroa$7$0$$sroa_idx8>>2] = $9; - $$sroa$8$0$$sroa_idx10 = ((($0)) + 20|0); - HEAPF32[$$sroa$8$0$$sroa_idx10>>2] = $25; - $$sroa$9$0$$sroa_idx12 = ((($0)) + 24|0); - HEAPF32[$$sroa$9$0$$sroa_idx12>>2] = $36; - $$sroa$10$0$$sroa_idx14 = ((($0)) + 28|0); - HEAPF32[$$sroa$10$0$$sroa_idx14>>2] = 0.0; - $$sroa$11$0$$sroa_idx16 = ((($0)) + 32|0); - HEAPF32[$$sroa$11$0$$sroa_idx16>>2] = $11; - $$sroa$12$0$$sroa_idx18 = ((($0)) + 36|0); - HEAPF32[$$sroa$12$0$$sroa_idx18>>2] = $27; - $$sroa$13$0$$sroa_idx20 = ((($0)) + 40|0); - HEAPF32[$$sroa$13$0$$sroa_idx20>>2] = $38; - $$sroa$14$0$$sroa_idx22 = ((($0)) + 44|0); - HEAPF32[$$sroa$14$0$$sroa_idx22>>2] = 0.0; - $$sroa$15$0$$sroa_idx24 = ((($0)) + 48|0); - HEAPF32[$$sroa$15$0$$sroa_idx24>>2] = $22; - $$sroa$16$0$$sroa_idx26 = ((($0)) + 52|0); - HEAPF32[$$sroa$16$0$$sroa_idx26>>2] = $33; - $$sroa$17$0$$sroa_idx28 = ((($0)) + 56|0); - HEAPF32[$$sroa$17$0$$sroa_idx28>>2] = $44; - $$sroa$18$0$$sroa_idx30 = ((($0)) + 60|0); - HEAPF32[$$sroa$18$0$$sroa_idx30>>2] = 1.0; - STACKTOP = sp;return; -} -function _ProcessGestureEvent($0) { - $0 = $0|0; - var $$$sink = 0, $$sink = 0, $$sink10 = 0, $$sink11 = 0, $$sink16 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0.0, $111 = 0.0; - var $112 = 0.0, $113 = 0.0, $114 = 0.0, $115 = 0.0, $116 = 0.0, $117 = 0, $118 = 0, $119 = 0, $12 = 0.0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0; - var $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0; - var $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0.0, $16 = 0, $160 = 0.0, $161 = 0.0, $162 = 0.0, $163 = 0.0, $164 = 0.0, $165 = 0.0, $166 = 0; - var $167 = 0.0, $168 = 0, $169 = 0.0, $17 = 0, $170 = 0.0, $171 = 0.0, $172 = 0, $173 = 0.0, $174 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; - var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; - var $46 = 0, $47 = 0, $48 = 0.0, $49 = 0.0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0.0, $56 = 0.0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0; - var $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0.0, $81 = 0; - var $82 = 0.0, $83 = 0.0, $84 = 0.0, $85 = 0.0, $86 = 0.0, $87 = 0.0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $moveDownPosition$byval_copy11 = 0; - var $moveDownPosition2$byval_copy12 = 0, $or$cond = 0, $or$cond3 = 0, $or$cond5 = 0, $or$cond7 = 0, $or$cond9 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $moveDownPosition2$byval_copy12 = sp + 8|0; - $moveDownPosition$byval_copy11 = sp; - $1 = ((($0)) + 4|0); - $2 = HEAP32[$1>>2]|0; - HEAP32[4772] = $2; - $3 = ($2|0)<(2); - $4 = HEAP32[$0>>2]|0; - $5 = ($4|0)==(1); - if (!($3)) { - if ($5) { - $88 = ((($0)) + 24|0); - $89 = $88; - $90 = $89; - $91 = HEAP32[$90>>2]|0; - $92 = (($89) + 4)|0; - $93 = $92; - $94 = HEAP32[$93>>2]|0; - $95 = 18408; - $96 = $95; - HEAP32[$96>>2] = $91; - $97 = (($95) + 4)|0; - $98 = $97; - HEAP32[$98>>2] = $94; - $99 = ((($0)) + 32|0); - $100 = $99; - $101 = $100; - $102 = HEAP32[$101>>2]|0; - $103 = (($100) + 4)|0; - $104 = $103; - $105 = HEAP32[$104>>2]|0; - $106 = 18448; - $107 = $106; - HEAP32[$107>>2] = $102; - $108 = (($106) + 4)|0; - $109 = $108; - HEAP32[$109>>2] = $105; - $110 = +HEAPF32[4612]; - $111 = +HEAPF32[4602]; - $112 = $110 - $111; - HEAPF32[4614] = $112; - $113 = +HEAPF32[(18452)>>2]; - $114 = +HEAPF32[(18412)>>2]; - $115 = $113 - $114; - HEAPF32[(18460)>>2] = $115; - HEAP32[4771] = 4; - STACKTOP = sp;return; - } - switch ($4|0) { - case 2: { - ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[18440>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[18440+4>>2]|0; - ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[18464>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[18464+4>>2]|0; - $116 = (+_Vector2Distance($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); - HEAPF32[4777] = $116; - $117 = 18440; - $118 = $117; - $119 = HEAP32[$118>>2]|0; - $120 = (($117) + 4)|0; - $121 = $120; - $122 = HEAP32[$121>>2]|0; - $123 = 18408; - $124 = $123; - HEAP32[$124>>2] = $119; - $125 = (($123) + 4)|0; - $126 = $125; - HEAP32[$126>>2] = $122; - $127 = 18464; - $128 = $127; - $129 = HEAP32[$128>>2]|0; - $130 = (($127) + 4)|0; - $131 = $130; - $132 = HEAP32[$131>>2]|0; - $133 = 18448; - $134 = $133; - HEAP32[$134>>2] = $129; - $135 = (($133) + 4)|0; - $136 = $135; - HEAP32[$136>>2] = $132; - $137 = ((($0)) + 24|0); - $138 = $137; - $139 = $138; - $140 = HEAP32[$139>>2]|0; - $141 = (($138) + 4)|0; - $142 = $141; - $143 = HEAP32[$142>>2]|0; - $144 = 18440; - $145 = $144; - HEAP32[$145>>2] = $140; - $146 = (($144) + 4)|0; - $147 = $146; - HEAP32[$147>>2] = $143; - $148 = ((($0)) + 32|0); - $149 = $148; - $150 = $149; - $151 = HEAP32[$150>>2]|0; - $152 = (($149) + 4)|0; - $153 = $152; - $154 = HEAP32[$153>>2]|0; - $155 = 18464; - $156 = $155; - HEAP32[$156>>2] = $151; - $157 = (($155) + 4)|0; - $158 = $157; - HEAP32[$158>>2] = $154; - $159 = +HEAPF32[4616]; - $160 = +HEAPF32[4610]; - $161 = $159 - $160; - HEAPF32[4614] = $161; - $162 = +HEAPF32[(18468)>>2]; - $163 = +HEAPF32[(18444)>>2]; - $164 = $162 - $163; - HEAPF32[(18460)>>2] = $164; - ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[18408>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[18408+4>>2]|0; - ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[18440>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[18440+4>>2]|0; - $165 = (+_Vector2Distance($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); - $166 = !($165 >= 0.004999999888241291); - if ($166) { - ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[18448>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[18448+4>>2]|0; - ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[18464>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[18464+4>>2]|0; - $167 = (+_Vector2Distance($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); - $168 = !($167 >= 0.004999999888241291); - if ($168) { - $$sink16 = 4; - } else { - label = 29; - } - } else { - label = 29; - } - if ((label|0) == 29) { - ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[18440>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[18440+4>>2]|0; - ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[18464>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[18464+4>>2]|0; - $169 = (+_Vector2Distance($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); - $170 = +HEAPF32[4777]; - $171 = $169 - $170; - $172 = $171 < 0.0; - $$sink11 = $172 ? 256 : 512; - $$sink16 = $$sink11; - } - HEAP32[4771] = $$sink16; - ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[18440>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[18440+4>>2]|0; - ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[18464>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[18464+4>>2]|0; - $173 = (+_Vector2Angle($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); - $174 = 360.0 - $173; - HEAPF32[4778] = $174; - STACKTOP = sp;return; - break; - } - case 0: { - HEAPF32[4777] = 0.0; - HEAPF32[4778] = 0.0; - HEAPF32[4614] = 0.0; - HEAPF32[(18460)>>2] = 0.0; - HEAP32[4772] = 0; - HEAP32[4771] = 0; - STACKTOP = sp;return; - break; - } - default: { - STACKTOP = sp;return; - } - } - } - if ($5) { - $6 = HEAP32[4773]|0; - $7 = (($6) + 1)|0; - HEAP32[4773] = $7; - $8 = HEAP32[4771]|0; - $9 = ($8|0)==(0); - $10 = ($6|0)>(0); - $or$cond = $10 & $9; - if ($or$cond) { - $11 = ((($0)) + 24|0); - ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[18408>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[18408+4>>2]|0; - ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[$11>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[$11+4>>2]|0; - $12 = (+_Vector2Distance($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); - $13 = $12 < 0.029999999329447746; - if ($13) { - HEAP32[4771] = 2; - HEAP32[4773] = 0; - } else { - label = 6; - } - } else { - label = 6; - } - if ((label|0) == 6) { - HEAP32[4773] = 1; - HEAP32[4771] = 1; - } - $14 = ((($0)) + 24|0); - $15 = $14; - $16 = $15; - $17 = HEAP32[$16>>2]|0; - $18 = (($15) + 4)|0; - $19 = $18; - $20 = HEAP32[$19>>2]|0; - $21 = 18408; - $22 = $21; - HEAP32[$22>>2] = $17; - $23 = (($21) + 4)|0; - $24 = $23; - HEAP32[$24>>2] = $20; - $25 = 18416; - $26 = $25; - HEAP32[$26>>2] = $17; - $27 = (($25) + 4)|0; - $28 = $27; - HEAP32[$28>>2] = $20; - $29 = 18424; - $30 = $29; - HEAP32[$30>>2] = $17; - $31 = (($29) + 4)|0; - $32 = $31; - HEAP32[$32>>2] = $20; - $33 = ((($0)) + 8|0); - $34 = HEAP32[$33>>2]|0; - HEAP32[14] = $34; - HEAPF32[4608] = 0.0; - HEAPF32[(18436)>>2] = 0.0; - STACKTOP = sp;return; - } - switch ($4|0) { - case 0: { - $35 = HEAP32[4771]|0; - $36 = ($35|0)==(8); - if ($36) { - $37 = ((($0)) + 24|0); - $38 = $37; - $39 = $38; - $40 = HEAP32[$39>>2]|0; - $41 = (($38) + 4)|0; - $42 = $41; - $43 = HEAP32[$42>>2]|0; - $44 = 18424; - $45 = $44; - HEAP32[$45>>2] = $40; - $46 = (($44) + 4)|0; - $47 = $46; - HEAP32[$47>>2] = $43; - } - ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[18408>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[18408+4>>2]|0; - ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[18424>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[18424+4>>2]|0; - $48 = (+_Vector2Distance($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); - $49 = $48 / 0.0; - HEAPF32[4774] = $49; - HEAP32[4775] = 0; - $50 = $49 > 5.0000002374872565E-4; - if ($50) { - $51 = HEAP32[14]|0; - $52 = ((($0)) + 8|0); - $53 = HEAP32[$52>>2]|0; - $54 = ($51|0)==($53|0); - if ($54) { - ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[18408>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[18408+4>>2]|0; - ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[18424>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[18424+4>>2]|0; - $55 = (+_Vector2Angle($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); - $56 = 360.0 - $55; - HEAPF32[4776] = $56; - $57 = $56 < 30.0; - $58 = $56 > 330.0; - $or$cond3 = $57 | $58; - if ($or$cond3) { - $$sink10 = 16; - } else { - $59 = $56 > 30.0; - $60 = $56 < 120.0; - $or$cond5 = $59 & $60; - if ($or$cond5) { - $$sink10 = 64; - } else { - $61 = $56 > 120.0; - $62 = $56 < 210.0; - $or$cond7 = $61 & $62; - $63 = $56 > 210.0; - $64 = $56 < 300.0; - $or$cond9 = $63 & $64; - $$sink = $or$cond9 ? 128 : 0; - $$$sink = $or$cond7 ? 32 : $$sink; - $$sink10 = $$$sink; - } - } - } else { - label = 16; - } - } else { - label = 16; - } - if ((label|0) == 16) { - HEAPF32[4774] = 0.0; - HEAPF32[4776] = 0.0; - $$sink10 = 0; - } - HEAP32[4771] = $$sink10; - HEAPF32[4604] = 0.0; - HEAPF32[(18420)>>2] = 0.0; - HEAP32[4772] = 0; - STACKTOP = sp;return; - break; - } - case 2: { - $65 = HEAP32[4775]|0; - $66 = ($65|0)==(0); - if ($66) { - HEAP32[4775] = 1; - } - $67 = ((($0)) + 24|0); - $68 = $67; - $69 = $68; - $70 = HEAP32[$69>>2]|0; - $71 = (($68) + 4)|0; - $72 = $71; - $73 = HEAP32[$72>>2]|0; - $74 = 18440; - $75 = $74; - HEAP32[$75>>2] = $70; - $76 = (($74) + 4)|0; - $77 = $76; - HEAP32[$77>>2] = $73; - $78 = HEAP32[4771]|0; - $79 = ($78|0)==(4); - if ($79) { - ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[18408>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[18408+4>>2]|0; - ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[18440>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[18440+4>>2]|0; - $80 = (+_Vector2Distance($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); - $81 = !($80 >= 0.014999999664723873); - if (!($81)) { - HEAP32[4771] = 8; - } - } - $82 = +HEAPF32[4610]; - $83 = +HEAPF32[4604]; - $84 = $82 - $83; - HEAPF32[4608] = $84; - $85 = +HEAPF32[(18444)>>2]; - $86 = +HEAPF32[(18420)>>2]; - $87 = $85 - $86; - HEAPF32[(18436)>>2] = $87; - STACKTOP = sp;return; - break; - } - default: { - STACKTOP = sp;return; - } - } -} -function _UpdateGestures() { - var $$off = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $or$cond3 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[4771]|0; - $$off = (($0) + -1)|0; - $1 = ($$off>>>0)<(2); - $2 = HEAP32[4772]|0; - $3 = ($2|0)<(2); - $or$cond3 = $1 & $3; - if ($or$cond3) { - HEAP32[4771] = 4; - } - $4 = HEAP32[4771]|0; - $5 = (($4) + -16)|0; - $6 = $5 >>> 4; - $7 = $5 << 28; - $8 = $6 | $7; - switch ($8|0) { - case 0: case 1: case 3: case 7: { - break; - } - default: { - return; - } - } - HEAP32[4771] = 0; - return; -} -function _SetCameraMode($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $$sroa$023$0$$sroa_idx = 0, $$sroa$023$0$copyload = 0.0, $$sroa$030$0$copyload = 0.0, $$sroa$4$0$$sroa_idx25 = 0, $$sroa$4$0$copyload = 0.0, $$sroa$432$0$$sroa_idx33 = 0, $$sroa$432$0$copyload = 0.0, $$sroa$527$0$$sroa_idx28 = 0, $$sroa$527$0$copyload = 0.0, $$sroa$535$0$$sroa_idx36 = 0, $$sroa$535$0$copyload = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0; - var $19 = 0.0, $2 = 0.0, $20 = 0.0, $21 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $$sroa$030$0$copyload = +HEAPF32[$0>>2]; - $$sroa$432$0$$sroa_idx33 = ((($0)) + 4|0); - $$sroa$432$0$copyload = +HEAPF32[$$sroa$432$0$$sroa_idx33>>2]; - $$sroa$535$0$$sroa_idx36 = ((($0)) + 8|0); - $$sroa$535$0$copyload = +HEAPF32[$$sroa$535$0$$sroa_idx36>>2]; - $$sroa$023$0$$sroa_idx = ((($0)) + 12|0); - $$sroa$023$0$copyload = +HEAPF32[$$sroa$023$0$$sroa_idx>>2]; - $$sroa$4$0$$sroa_idx25 = ((($0)) + 16|0); - $$sroa$4$0$copyload = +HEAPF32[$$sroa$4$0$$sroa_idx25>>2]; - $$sroa$527$0$$sroa_idx28 = ((($0)) + 20|0); - $$sroa$527$0$copyload = +HEAPF32[$$sroa$527$0$$sroa_idx28>>2]; - $2 = $$sroa$023$0$copyload - $$sroa$030$0$copyload; - $3 = $$sroa$4$0$copyload - $$sroa$432$0$copyload; - $4 = $$sroa$527$0$copyload - $$sroa$535$0$copyload; - $5 = $2 * $2; - $6 = $3 * $3; - $7 = $5 + $6; - $8 = $4 * $4; - $9 = $7 + $8; - $10 = (+Math_sqrt((+$9))); - HEAPF32[4779] = $10; - $11 = $5 + $8; - $12 = (+Math_sqrt((+$11))); - $13 = (+Math_sqrt((+$7))); - $14 = (+Math_abs((+$2))); - $15 = $14 / $12; - $16 = (+Math_asin((+$15))); - HEAPF32[4780] = $16; - $17 = (+Math_abs((+$3))); - $18 = $17 / $13; - $19 = (+Math_asin((+$18))); - $20 = -$19; - HEAPF32[4781] = $20; - $21 = HEAP32[$$sroa$432$0$$sroa_idx33>>2]|0; - HEAP32[15] = $21; - HEAP32[4782] = $1; - return; -} -function _UpdateCamera($0) { - $0 = $0|0; - var $$ = 0, $$0 = 0, $$byval_copy3 = 0, $$not = 0, $$not188 = 0, $$off187 = 0, $$pr = 0, $$pr190 = 0, $$sink = 0.0, $$sink17 = 0, $$sink22 = 0.0, $$sink22$p = 0.0, $$sink26 = 0.0, $$sink28 = 0.0, $$sroa$095$0 = 0.0, $$sroa$9$0 = 0.0, $1 = 0, $10 = 0, $100 = 0.0, $101 = 0.0; - var $102 = 0.0, $103 = 0.0, $104 = 0.0, $105 = 0.0, $106 = 0.0, $107 = 0.0, $108 = 0.0, $109 = 0.0, $11 = 0, $110 = 0.0, $111 = 0.0, $112 = 0, $113 = 0.0, $114 = 0, $115 = 0.0, $116 = 0.0, $117 = 0.0, $118 = 0.0, $119 = 0.0, $12 = 0; - var $120 = 0.0, $121 = 0, $122 = 0.0, $123 = 0.0, $124 = 0.0, $125 = 0.0, $126 = 0.0, $127 = 0.0, $128 = 0.0, $129 = 0.0, $13 = 0, $130 = 0.0, $131 = 0.0, $132 = 0.0, $133 = 0.0, $134 = 0.0, $135 = 0, $136 = 0.0, $137 = 0, $138 = 0.0; - var $139 = 0.0, $14 = 0, $140 = 0.0, $141 = 0.0, $142 = 0.0, $143 = 0.0, $144 = 0, $145 = 0, $146 = 0.0, $147 = 0.0, $148 = 0.0, $149 = 0, $15 = 0, $150 = 0, $151 = 0.0, $152 = 0.0, $153 = 0.0, $154 = 0.0, $155 = 0.0, $156 = 0.0; - var $157 = 0.0, $158 = 0.0, $159 = 0.0, $16 = 0, $160 = 0.0, $161 = 0.0, $162 = 0.0, $163 = 0.0, $164 = 0.0, $165 = 0.0, $166 = 0.0, $167 = 0, $168 = 0.0, $169 = 0, $17 = 0, $170 = 0.0, $171 = 0.0, $172 = 0.0, $173 = 0.0, $174 = 0.0; - var $175 = 0.0, $176 = 0, $177 = 0.0, $178 = 0.0, $179 = 0.0, $18 = 0, $180 = 0.0, $181 = 0.0, $182 = 0.0, $183 = 0.0, $184 = 0.0, $185 = 0.0, $186 = 0.0, $187 = 0.0, $188 = 0.0, $189 = 0.0, $19 = 0, $190 = 0.0, $191 = 0, $192 = 0.0; - var $193 = 0, $194 = 0.0, $195 = 0.0, $196 = 0.0, $197 = 0.0, $198 = 0.0, $199 = 0.0, $2 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0.0, $204 = 0.0, $205 = 0.0, $206 = 0.0, $207 = 0, $208 = 0, $209 = 0, $21 = 0; - var $210 = 0, $211 = 0.0, $212 = 0.0, $213 = 0.0, $214 = 0.0, $215 = 0.0, $216 = 0.0, $217 = 0.0, $218 = 0.0, $219 = 0.0, $22 = 0, $220 = 0, $221 = 0, $222 = 0.0, $223 = 0.0, $224 = 0.0, $225 = 0.0, $226 = 0.0, $227 = 0.0, $228 = 0.0; - var $229 = 0.0, $23 = 0, $230 = 0.0, $231 = 0.0, $232 = 0.0, $233 = 0.0, $234 = 0.0, $235 = 0.0, $236 = 0, $237 = 0.0, $238 = 0.0, $239 = 0.0, $24 = 0, $240 = 0.0, $241 = 0.0, $242 = 0, $243 = 0.0, $244 = 0.0, $245 = 0.0, $246 = 0.0; - var $247 = 0.0, $248 = 0.0, $249 = 0.0, $25 = 0, $250 = 0.0, $251 = 0, $252 = 0.0, $253 = 0.0, $254 = 0.0, $255 = 0.0, $256 = 0.0, $257 = 0.0, $258 = 0.0, $259 = 0.0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0.0; - var $265 = 0.0, $266 = 0, $267 = 0.0, $268 = 0.0, $269 = 0, $27 = 0, $270 = 0.0, $271 = 0.0, $272 = 0.0, $273 = 0.0, $274 = 0, $275 = 0.0, $276 = 0.0, $277 = 0.0, $278 = 0, $279 = 0.0, $28 = 0, $280 = 0.0, $281 = 0.0, $282 = 0.0; - var $283 = 0.0, $284 = 0.0, $285 = 0.0, $286 = 0.0, $287 = 0.0, $288 = 0.0, $289 = 0.0, $29 = 0, $290 = 0, $291 = 0.0, $292 = 0.0, $293 = 0, $294 = 0.0, $295 = 0.0, $296 = 0.0, $297 = 0, $298 = 0.0, $299 = 0.0, $3 = 0, $30 = 0; - var $300 = 0.0, $301 = 0.0, $302 = 0.0, $303 = 0.0, $304 = 0.0, $305 = 0.0, $306 = 0.0, $307 = 0.0, $308 = 0, $309 = 0.0, $31 = 0, $310 = 0.0, $311 = 0, $312 = 0, $313 = 0.0, $314 = 0.0, $315 = 0.0, $316 = 0.0, $317 = 0.0, $318 = 0.0; - var $319 = 0, $32 = 0, $320 = 0, $321 = 0, $322 = 0, $323 = 0.0, $324 = 0.0, $325 = 0.0, $326 = 0.0, $327 = 0, $328 = 0.0, $329 = 0.0, $33 = 0, $330 = 0.0, $331 = 0.0, $332 = 0.0, $333 = 0.0, $334 = 0.0, $335 = 0.0, $336 = 0; - var $337 = 0.0, $338 = 0.0, $339 = 0, $34 = 0, $340 = 0.0, $341 = 0.0, $342 = 0.0, $343 = 0.0, $344 = 0, $345 = 0, $346 = 0.0, $347 = 0.0, $348 = 0.0, $349 = 0.0, $35 = 0, $350 = 0.0, $351 = 0, $352 = 0.0, $353 = 0.0, $354 = 0.0; - var $355 = 0.0, $356 = 0.0, $357 = 0, $358 = 0.0, $359 = 0.0, $36 = 0, $360 = 0.0, $361 = 0.0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0.0, $367 = 0, $368 = 0.0, $369 = 0.0, $37 = 0.0, $370 = 0.0, $371 = 0.0, $372 = 0.0; - var $373 = 0.0, $374 = 0.0, $375 = 0.0, $376 = 0, $377 = 0.0, $378 = 0.0, $379 = 0, $38 = 0.0, $380 = 0, $381 = 0.0, $382 = 0.0, $383 = 0.0, $384 = 0.0, $385 = 0.0, $386 = 0.0, $387 = 0.0, $388 = 0, $389 = 0.0, $39 = 0.0, $390 = 0.0; - var $391 = 0, $392 = 0.0, $393 = 0.0, $394 = 0, $395 = 0.0, $396 = 0.0, $397 = 0.0, $398 = 0.0, $399 = 0, $4 = 0, $40 = 0, $400 = 0.0, $401 = 0.0, $402 = 0.0, $403 = 0, $404 = 0.0, $405 = 0.0, $406 = 0, $407 = 0, $408 = 0; - var $409 = 0, $41 = 0, $410 = 0, $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $42 = 0.0, $43 = 0, $44 = 0, $45 = 0.0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0; - var $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0, $55 = 0, $56 = 0.0, $57 = 0, $58 = 0, $59 = 0.0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0.0, $64 = 0.0, $65 = 0.0, $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0.0; - var $7 = 0, $70 = 0.0, $71 = 0, $72 = 0.0, $73 = 0.0, $74 = 0.0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0.0, $86 = 0, $87 = 0; - var $88 = 0.0, $89 = 0.0, $9 = 0, $90 = 0.0, $91 = 0, $92 = 0, $93 = 0.0, $94 = 0, $95 = 0, $96 = 0.0, $97 = 0, $98 = 0, $99 = 0.0, $not$ = 0, $or$cond = 0, $or$cond11 = 0, $or$cond13 = 0, $or$cond15 = 0, $or$cond189 = 0, $or$cond3 = 0; - var $or$cond5 = 0, $or$cond7 = 0, $or$cond9 = 0, $storemerge = 0.0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(80|0); - $$byval_copy3 = sp + 72|0; - $1 = sp + 56|0; - $2 = sp + 16|0; - $3 = sp + 64|0; - $4 = sp + 48|0; - $5 = sp + 40|0; - $6 = sp + 8|0; - $7 = sp; - _GetMousePosition($1); - $8 = (_GetMouseWheelMove()|0); - $9 = HEAP32[16]|0; - $10 = (_IsMouseButtonDown($9)|0); - $11 = HEAP32[17]|0; - $12 = (_IsKeyDown($11)|0); - $13 = HEAP32[18]|0; - $14 = (_IsKeyDown($13)|0); - $15 = HEAP32[19]|0; - $16 = (_IsKeyDown($15)|0); - HEAP32[$2>>2] = $16; - $17 = ((($2)) + 4|0); - $18 = HEAP32[20]|0; - $19 = (_IsKeyDown($18)|0); - HEAP32[$17>>2] = $19; - $20 = ((($2)) + 8|0); - $21 = HEAP32[21]|0; - $22 = (_IsKeyDown($21)|0); - HEAP32[$20>>2] = $22; - $23 = ((($2)) + 12|0); - $24 = HEAP32[22]|0; - $25 = (_IsKeyDown($24)|0); - HEAP32[$23>>2] = $25; - $26 = ((($2)) + 16|0); - $27 = HEAP32[23]|0; - $28 = (_IsKeyDown($27)|0); - HEAP32[$26>>2] = $28; - $29 = ((($2)) + 20|0); - $30 = HEAP32[24]|0; - $31 = (_IsKeyDown($30)|0); - HEAP32[$29>>2] = $31; - $32 = HEAP32[4782]|0; - $33 = ($32|0)==(0); - L1: do { - if ($33) { - label = 58; - } else { - $34 = (_GetScreenWidth()|0); - $35 = (_GetScreenHeight()|0); - $$off187 = (($32) + -3)|0; - $36 = ($$off187>>>0)<(2); - do { - if ($36) { - _HideCursor(); - $37 = +HEAPF32[$1>>2]; - $38 = (+($35|0)); - $39 = $38 / 3.0; - $40 = $37 < $39; - $41 = ((($1)) + 4|0); - $42 = +HEAPF32[$41>>2]; - if ($40) { - $43 = (($35|0) / 3)&-1; - $44 = (($34) - ($43))|0; - $45 = (+($44|0)); - HEAPF32[$3>>2] = $45; - $46 = ((($3)) + 4|0); - HEAPF32[$46>>2] = $42; - ;HEAP32[$$byval_copy3>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$3+4>>2]|0; - _SetMousePosition($$byval_copy3); - $$sroa$095$0 = 0.0;$$sroa$9$0 = 0.0; - break; - } - $47 = $42 < $39; - if ($47) { - HEAPF32[$4>>2] = $37; - $48 = ((($4)) + 4|0); - $49 = (($35|0) / 3)&-1; - $50 = (($35) - ($49))|0; - $51 = (+($50|0)); - HEAPF32[$48>>2] = $51; - ;HEAP32[$$byval_copy3>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$4+4>>2]|0; - _SetMousePosition($$byval_copy3); - $$sroa$095$0 = 0.0;$$sroa$9$0 = 0.0; - break; - } - $52 = (+($34|0)); - $53 = $52 - $39; - $54 = $37 > $53; - if ($54) { - $55 = (($35|0) / 3)&-1; - $56 = (+($55|0)); - HEAPF32[$5>>2] = $56; - $57 = ((($5)) + 4|0); - $58 = HEAP32[$41>>2]|0; - HEAP32[$57>>2] = $58; - ;HEAP32[$$byval_copy3>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$5+4>>2]|0; - _SetMousePosition($$byval_copy3); - $$sroa$095$0 = 0.0;$$sroa$9$0 = 0.0; - break; - } - $59 = $38 - $39; - $60 = $42 > $59; - if ($60) { - HEAPF32[$6>>2] = $37; - $61 = ((($6)) + 4|0); - $62 = (($35|0) / 3)&-1; - $63 = (+($62|0)); - HEAPF32[$61>>2] = $63; - ;HEAP32[$$byval_copy3>>2]=HEAP32[$6>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$6+4>>2]|0; - _SetMousePosition($$byval_copy3); - $$sroa$095$0 = 0.0;$$sroa$9$0 = 0.0; - break; - } else { - $64 = +HEAPF32[4618]; - $65 = $37 - $64; - $66 = +HEAPF32[(18476)>>2]; - $67 = $42 - $66; - $$sroa$095$0 = $65;$$sroa$9$0 = $67; - break; - } - } else { - _ShowCursor(); - $68 = +HEAPF32[$1>>2]; - $69 = +HEAPF32[4618]; - $70 = $68 - $69; - $71 = ((($1)) + 4|0); - $72 = +HEAPF32[$71>>2]; - $73 = +HEAPF32[(18476)>>2]; - $74 = $72 - $73; - $$sroa$095$0 = $70;$$sroa$9$0 = $74; - } - } while(0); - _GetMousePosition($7); - $75 = $7; - $76 = $75; - $77 = HEAP32[$76>>2]|0; - $78 = (($75) + 4)|0; - $79 = $78; - $80 = HEAP32[$79>>2]|0; - $81 = 18472; - $82 = $81; - HEAP32[$82>>2] = $77; - $83 = (($81) + 4)|0; - $84 = $83; - HEAP32[$84>>2] = $80; - $$pr = HEAP32[4782]|0; - switch ($$pr|0) { - case 1: { - $85 = +HEAPF32[4779]; - $86 = $85 < 120.0; - $87 = ($8|0)<(0); - $or$cond3 = $87 & $86; - do { - if ($or$cond3) { - $88 = (+($8|0)); - $89 = $88 * 1.5; - $90 = $85 - $89; - HEAPF32[4779] = $90; - $91 = $90 > 120.0; - if ($91) { - HEAPF32[4779] = 120.0; - } - } else { - $92 = ((($0)) + 4|0); - $93 = +HEAPF32[$92>>2]; - $94 = ((($0)) + 12|0); - $95 = ((($0)) + 16|0); - $96 = +HEAPF32[$95>>2]; - $97 = $93 > $96; - $98 = $85 == 120.0; - $or$cond5 = $98 & $97; - $or$cond7 = $87 & $or$cond5; - if ($or$cond7) { - $99 = (+($8|0)); - $100 = +HEAPF32[$94>>2]; - $101 = +HEAPF32[$0>>2]; - $102 = $100 - $101; - $103 = $99 * $102; - $104 = $103 * 1.5; - $105 = $104 / $85; - $106 = $100 + $105; - HEAPF32[$94>>2] = $106; - $107 = $96 - $93; - $108 = $99 * $107; - $109 = $108 * 1.5; - $110 = $109 / $85; - $111 = $96 + $110; - HEAPF32[$95>>2] = $111; - $112 = ((($0)) + 20|0); - $113 = +HEAPF32[$112>>2]; - $114 = ((($0)) + 8|0); - $115 = +HEAPF32[$114>>2]; - $116 = $113 - $115; - $117 = $99 * $116; - $118 = $117 * 1.5; - $119 = $118 / $85; - $120 = $113 + $119; - HEAPF32[$112>>2] = $120; - break; - } - $$not = $97 ^ 1; - $121 = !($96 >= 0.0); - $or$cond = $121 | $$not; - if (!($or$cond)) { - $122 = (+($8|0)); - $123 = +HEAPF32[$94>>2]; - $124 = +HEAPF32[$0>>2]; - $125 = $123 - $124; - $126 = $122 * $125; - $127 = $126 * 1.5; - $128 = $127 / $85; - $129 = $123 + $128; - HEAPF32[$94>>2] = $129; - $130 = $96 - $93; - $131 = $122 * $130; - $132 = $131 * 1.5; - $133 = $132 / $85; - $134 = $96 + $133; - HEAPF32[$95>>2] = $134; - $135 = ((($0)) + 20|0); - $136 = +HEAPF32[$135>>2]; - $137 = ((($0)) + 8|0); - $138 = +HEAPF32[$137>>2]; - $139 = $136 - $138; - $140 = $122 * $139; - $141 = $140 * 1.5; - $142 = $141 / $85; - $143 = $136 + $142; - HEAPF32[$135>>2] = $143; - break; - } - if ($97) { - $144 = $96 < 0.0; - $145 = ($8|0)>(0); - $or$cond9 = $145 & $144; - if ($or$cond9) { - $146 = (+($8|0)); - $147 = $146 * 1.5; - $148 = $85 - $147; - HEAPF32[4779] = $148; - $149 = $148 < 0.30000001192092896; - if (!($149)) { - break; - } - HEAPF32[4779] = 0.30000001192092896; - break; - } - } - $150 = $93 < $96; - $or$cond11 = $98 & $150; - $or$cond13 = $87 & $or$cond11; - $151 = +HEAPF32[$95>>2]; - $152 = +HEAPF32[$92>>2]; - if ($or$cond13) { - $153 = (+($8|0)); - $154 = +HEAPF32[$94>>2]; - $155 = +HEAPF32[$0>>2]; - $156 = $154 - $155; - $157 = $153 * $156; - $158 = $157 * 1.5; - $159 = $158 / $85; - $160 = $154 + $159; - HEAPF32[$94>>2] = $160; - $161 = $151 - $152; - $162 = $153 * $161; - $163 = $162 * 1.5; - $164 = +HEAPF32[4779]; - $165 = $163 / $164; - $166 = $151 + $165; - HEAPF32[$95>>2] = $166; - $167 = ((($0)) + 20|0); - $168 = +HEAPF32[$167>>2]; - $169 = ((($0)) + 8|0); - $170 = +HEAPF32[$169>>2]; - $171 = $168 - $170; - $172 = $153 * $171; - $173 = $172 * 1.5; - $174 = $173 / $164; - $175 = $168 + $174; - HEAPF32[$167>>2] = $175; - break; - } - $$not188 = $150 ^ 1; - $176 = !($96 <= 0.0); - $or$cond189 = $176 | $$not188; - if (!($or$cond189)) { - $177 = (+($8|0)); - $178 = +HEAPF32[$94>>2]; - $179 = +HEAPF32[$0>>2]; - $180 = $178 - $179; - $181 = $177 * $180; - $182 = $181 * 1.5; - $183 = $182 / $85; - $184 = $178 + $183; - HEAPF32[$94>>2] = $184; - $185 = $151 - $152; - $186 = $177 * $185; - $187 = $186 * 1.5; - $188 = +HEAPF32[4779]; - $189 = $187 / $188; - $190 = $151 + $189; - HEAPF32[$95>>2] = $190; - $191 = ((($0)) + 20|0); - $192 = +HEAPF32[$191>>2]; - $193 = ((($0)) + 8|0); - $194 = +HEAPF32[$193>>2]; - $195 = $192 - $194; - $196 = $177 * $195; - $197 = $196 * 1.5; - $198 = $197 / $188; - $199 = $192 + $198; - HEAPF32[$191>>2] = $199; - break; - } - $200 = $152 < $151; - if ($200) { - $201 = $151 > 0.0; - $202 = ($8|0)>(0); - $or$cond15 = $202 & $201; - if ($or$cond15) { - $203 = (+($8|0)); - $204 = $203 * 1.5; - $205 = +HEAPF32[4779]; - $206 = $205 - $204; - HEAPF32[4779] = $206; - $207 = $206 < 0.30000001192092896; - if ($207) { - HEAPF32[4779] = 0.30000001192092896; - } - } - } - } - } while(0); - $208 = ($10|0)==(0); - if ($208) { - label = 58; - break L1; - } - $209 = ($12|0)==(0); - if ($209) { - $222 = $$sroa$095$0 * -0.0099999997764825821; - $223 = +HEAPF32[4780]; - $224 = (+Math_cos((+$223))); - $225 = $222 * $224; - $226 = $$sroa$9$0 * 0.0099999997764825821; - $227 = (+Math_sin((+$223))); - $228 = $226 * $227; - $229 = +HEAPF32[4781]; - $230 = (+Math_sin((+$229))); - $231 = $228 * $230; - $232 = $225 + $231; - $233 = +HEAPF32[4779]; - $234 = $233 / 5.0999999046325684; - $235 = $232 * $234; - $236 = ((($0)) + 12|0); - $237 = +HEAPF32[$236>>2]; - $238 = $237 + $235; - HEAPF32[$236>>2] = $238; - $239 = (+Math_cos((+$229))); - $240 = $226 * $239; - $241 = $234 * $240; - $242 = ((($0)) + 16|0); - $243 = +HEAPF32[$242>>2]; - $244 = $243 + $241; - HEAPF32[$242>>2] = $244; - $245 = $$sroa$095$0 * 0.0099999997764825821; - $246 = $245 * $227; - $247 = $226 * $224; - $248 = $247 * $230; - $249 = $246 + $248; - $250 = $249 * $234; - $251 = ((($0)) + 20|0); - $252 = +HEAPF32[$251>>2]; - $253 = $250 + $252; - HEAPF32[$251>>2] = $253; - label = 58; - break L1; - } - $210 = ($14|0)==(0); - if (!($210)) { - $211 = $$sroa$9$0 * 0.05000000074505806; - $212 = +HEAPF32[4779]; - $213 = $211 + $212; - HEAPF32[4779] = $213; - label = 58; - break L1; - } - $214 = $$sroa$095$0 * 0.0099999997764825821; - $215 = +HEAPF32[4780]; - $216 = $215 - $214; - HEAPF32[4780] = $216; - $217 = $$sroa$9$0 * 0.0099999997764825821; - $218 = +HEAPF32[4781]; - $219 = $218 - $217; - HEAPF32[4781] = $219; - $220 = $219 > 1.483529806137085; - if ($220) { - HEAPF32[4781] = 1.483529806137085; - label = 58; - break L1; - } - $221 = $219 < -1.483529806137085; - if (!($221)) { - label = 58; - break L1; - } - HEAPF32[4781] = -1.483529806137085; - label = 58; - break L1; - break; - } - case 2: { - $254 = +HEAPF32[4780]; - $255 = $254 + 0.0099999997764825821; - HEAPF32[4780] = $255; - $256 = (+($8|0)); - $257 = $256 * 1.5; - $258 = +HEAPF32[4779]; - $259 = $258 - $257; - HEAPF32[4779] = $259; - $260 = $259 < 1.2000000476837158; - if (!($260)) { - label = 58; - break L1; - } - HEAPF32[4779] = 1.2000000476837158; - label = 58; - break L1; - break; - } - case 4: case 3: { - $264 = +HEAPF32[4780]; - $265 = (+Math_sin((+$264))); - $266 = HEAP32[$17>>2]|0; - $267 = (+($266>>>0)); - $268 = $265 * $267; - $269 = HEAP32[$2>>2]|0; - $270 = (+($269>>>0)); - $271 = $265 * $270; - $272 = $268 - $271; - $273 = (+Math_cos((+$264))); - $274 = HEAP32[$23>>2]|0; - $275 = (+($274>>>0)); - $276 = $273 * $275; - $277 = $272 - $276; - $278 = HEAP32[$20>>2]|0; - $279 = (+($278>>>0)); - $280 = $273 * $279; - $281 = $277 + $280; - $282 = $281 / 20.0; - $283 = +HEAPF32[$0>>2]; - $284 = $283 + $282; - HEAPF32[$0>>2] = $284; - $285 = +HEAPF32[4781]; - $286 = (+Math_sin((+$285))); - $287 = $270 * $286; - $288 = $267 * $286; - $289 = $287 - $288; - $290 = HEAP32[$26>>2]|0; - $291 = (+($290>>>0)); - $292 = $289 + $291; - $293 = HEAP32[$29>>2]|0; - $294 = (+($293>>>0)); - $295 = $292 - $294; - $296 = $295 / 20.0; - $297 = ((($0)) + 4|0); - $298 = +HEAPF32[$297>>2]; - $299 = $298 + $296; - HEAPF32[$297>>2] = $299; - $300 = $267 * $273; - $301 = $273 * $270; - $302 = $300 - $301; - $303 = $265 * $275; - $304 = $302 + $303; - $305 = $265 * $279; - $306 = $304 - $305; - $307 = $306 / 20.0; - $308 = ((($0)) + 8|0); - $309 = +HEAPF32[$308>>2]; - $310 = $307 + $309; - HEAPF32[$308>>2] = $310; - $311 = HEAP32[$2>>2]|0; - $312 = ($311|0)==(0); - if ($312) { - $261 = ((($2)) + 4|0); - $262 = HEAP32[$261>>2]|0; - $263 = ($262|0)==(0); - if ($263) { - $407 = ((($2)) + 8|0); - $408 = HEAP32[$407>>2]|0; - $409 = ($408|0)==(0); - if ($409) { - $410 = ((($2)) + 12|0); - $411 = HEAP32[$410>>2]|0; - $412 = ($411|0)==(0); - if ($412) { - $413 = ((($2)) + 16|0); - $414 = HEAP32[$413>>2]|0; - $415 = ($414|0)==(0); - if ($415) { - $416 = ((($2)) + 20|0); - $417 = HEAP32[$416>>2]|0; - $not$ = ($417|0)!=(0); - $$ = $not$&1; - $$0 = $$; - } else { - $$0 = 1; - } - } else { - $$0 = 1; - } - } else { - $$0 = 1; - } - } else { - $$0 = 1; - } - } else { - $$0 = 1; - } - $313 = $$sroa$095$0 * 0.0030000000260770321; - $314 = +HEAPF32[4780]; - $315 = $314 - $313; - HEAPF32[4780] = $315; - $316 = $$sroa$9$0 * 0.0030000000260770321; - $317 = +HEAPF32[4781]; - $318 = $317 - $316; - HEAPF32[4781] = $318; - $319 = HEAP32[4782]|0; - $320 = ($319|0)==(4); - if ($320) { - $321 = $318 > 0.087266460061073303; - if ($321) { - $$sink26 = 0.087266460061073303; - label = 49; - } else { - $322 = $318 < -1.483529806137085; - if ($322) { - $$sink26 = -1.483529806137085; - label = 49; - } - } - if ((label|0) == 49) { - HEAPF32[4781] = $$sink26; - } - $323 = (+($8|0)); - $324 = $323 * 1.5; - $325 = +HEAPF32[4779]; - $326 = $325 - $324; - $327 = $326 < 1.2000000476837158; - $storemerge = $327 ? 1.2000000476837158 : $326; - HEAPF32[4779] = $storemerge; - $328 = +HEAPF32[$0>>2]; - $329 = +HEAPF32[4780]; - $330 = (+Math_cos((+$329))); - $331 = $330 * 0.40000000596046448; - $332 = $328 + $331; - $333 = (+Math_sin((+$329))); - $334 = $333 * 0.0; - $335 = $332 + $334; - $336 = ((($0)) + 12|0); - HEAPF32[$336>>2] = $335; - $337 = +HEAPF32[$297>>2]; - $338 = $337 + 0.0; - $339 = ((($0)) + 16|0); - HEAPF32[$339>>2] = $338; - $340 = +HEAPF32[$308>>2]; - $341 = $334 + $340; - $342 = $333 * 0.40000000596046448; - $343 = $341 - $342; - $$sink = $343;$$sink17 = $336; - } else { - $344 = $318 > 1.483529806137085; - if ($344) { - $$sink28 = 1.483529806137085; - label = 53; - } else { - $345 = $318 < -1.483529806137085; - if ($345) { - $$sink28 = -1.483529806137085; - label = 53; - } - } - if ((label|0) == 53) { - HEAPF32[4781] = $$sink28; - } - $346 = +HEAPF32[$0>>2]; - $347 = +HEAPF32[4780]; - $348 = (+Math_sin((+$347))); - $349 = $348 * 25.0; - $350 = $346 - $349; - $351 = ((($0)) + 12|0); - HEAPF32[$351>>2] = $350; - $352 = +HEAPF32[$297>>2]; - $353 = +HEAPF32[4781]; - $354 = (+Math_sin((+$353))); - $355 = $354 * 25.0; - $356 = $352 + $355; - $357 = ((($0)) + 16|0); - HEAPF32[$357>>2] = $356; - $358 = +HEAPF32[$308>>2]; - $359 = (+Math_cos((+$347))); - $360 = $359 * 25.0; - $361 = $358 - $360; - $362 = ((($0)) + 20|0); - HEAPF32[$362>>2] = $361; - $363 = ($$0|0)==(0); - if (!($363)) { - $364 = HEAP32[4783]|0; - $365 = (($364) + 1)|0; - HEAP32[4783] = $365; - } - $366 = +HEAPF32[15]; - $367 = HEAP32[4783]|0; - $368 = (+($367|0)); - $369 = $368 / 5.0; - $370 = (+Math_sin((+$369))); - $371 = $370 / 30.0; - $372 = $366 - $371; - HEAPF32[$297>>2] = $372; - $373 = $368 / 10.0; - $374 = (+Math_sin((+$373))); - $375 = $374 / 200.0; - $376 = ((($0)) + 24|0); - HEAPF32[$376>>2] = $375; - $377 = -$374; - $378 = $377 / 200.0; - $$sink = $378;$$sink17 = $376; - } - $379 = ((($$sink17)) + 8|0); - HEAPF32[$379>>2] = $$sink; - label = 58; - break L1; - break; - } - default: { - $380 = $$pr; - break L1; - } - } - } - } while(0); - if ((label|0) == 58) { - $$pr190 = HEAP32[4782]|0; - $380 = $$pr190; - } - switch ($380|0) { - case 1: case 2: case 4: { - break; - } - default: { - STACKTOP = sp;return; - } - } - $381 = +HEAPF32[4780]; - $382 = (+Math_sin((+$381))); - $383 = +HEAPF32[4779]; - $384 = $382 * $383; - $385 = +HEAPF32[4781]; - $386 = (+Math_cos((+$385))); - $387 = $384 * $386; - $388 = ((($0)) + 12|0); - $389 = +HEAPF32[$388>>2]; - $390 = $387 + $389; - HEAPF32[$0>>2] = $390; - $391 = !($385 <= 0.0); - $392 = (+Math_sin((+$385))); - $393 = +HEAPF32[4779]; - $394 = ((($0)) + 16|0); - $395 = +HEAPF32[$394>>2]; - $396 = $392 * $393; - $397 = $392 * $396; - $398 = -$397; - $$sink22$p = $391 ? $398 : $397; - $$sink22 = $395 + $$sink22$p; - $399 = ((($0)) + 4|0); - HEAPF32[$399>>2] = $$sink22; - $400 = (+Math_cos((+$381))); - $401 = $393 * $400; - $402 = $386 * $401; - $403 = ((($0)) + 20|0); - $404 = +HEAPF32[$403>>2]; - $405 = $404 + $402; - $406 = ((($0)) + 8|0); - HEAPF32[$406>>2] = $405; - STACKTOP = sp;return; -} -function _GetMousePosition($0) { - $0 = $0|0; - var $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = 18480; - $2 = $1; - $3 = HEAP32[$2>>2]|0; - $4 = (($1) + 4)|0; - $5 = $4; - $6 = HEAP32[$5>>2]|0; - $7 = $0; - $8 = $7; - HEAP32[$8>>2] = $3; - $9 = (($7) + 4)|0; - $10 = $9; - HEAP32[$10>>2] = $6; - return; -} -function _GetMouseWheelMove() { - var $0 = 0, $1 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[4788]|0; - $1 = (($0|0) / 100)&-1; - return ($1|0); -} -function _IsMouseButtonDown($0) { - $0 = $0|0; - var $$ = 0, $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = (_GetMouseButtonStatus($0)|0); - $2 = ($1|0)==(1); - $$ = $2&1; - return ($$|0); -} -function _IsKeyDown($0) { - $0 = $0|0; - var $$ = 0, $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = (_GetKeyStatus($0)|0); - $2 = ($1|0)==(1); - $$ = $2&1; - return ($$|0); -} -function _GetScreenWidth() { - var $0 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[4787]|0; - return ($0|0); -} -function _GetScreenHeight() { - var $0 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[4786]|0; - return ($0|0); -} -function _HideCursor() { - var label = 0, sp = 0; - sp = STACKTOP; - HEAP32[4784] = 1; - return; -} -function _SetMousePosition($0) { - $0 = $0|0; - var $1 = 0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = $0; - $2 = $1; - $3 = HEAP32[$2>>2]|0; - $4 = (($1) + 4)|0; - $5 = $4; - $6 = HEAP32[$5>>2]|0; - $7 = 18480; - $8 = $7; - HEAP32[$8>>2] = $3; - $9 = (($7) + 4)|0; - $10 = $9; - HEAP32[$10>>2] = $6; - $11 = HEAP32[4785]|0; - $12 = +HEAPF32[$0>>2]; - $13 = $12; - $14 = ((($0)) + 4|0); - $15 = +HEAPF32[$14>>2]; - $16 = $15; - _glfwSetCursorPos(($11|0),(+$13),(+$16)); - return; -} -function _ShowCursor() { - var label = 0, sp = 0; - sp = STACKTOP; - HEAP32[4784] = 0; - return; -} -function _GetKeyStatus($0) { - $0 = $0|0; - var $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = HEAP32[4785]|0; - $2 = (_glfwGetKey(($1|0),($0|0))|0); - return ($2|0); -} -function _GetMouseButtonStatus($0) { - $0 = $0|0; - var $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = HEAP32[4785]|0; - $2 = (_glfwGetMouseButton(($1|0),($0|0))|0); - return ($2|0); -} -function _InitWindow($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $10 = 0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0, $vararg_buffer = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $vararg_buffer = sp; - _TraceLog(0,4683,$vararg_buffer); - HEAP32[4789] = $2; - _InitGraphicsDevice($0,$1); - _LoadDefaultFont(); - _InitTimer(); - (_emscripten_set_fullscreenchange_callback((0|0),(0|0),1,(5|0))|0); - (_emscripten_set_keypress_callback((4712|0),(0|0),1,(6|0))|0); - (_emscripten_set_click_callback((4712|0),(0|0),1,(7|0))|0); - (_emscripten_set_touchstart_callback((4712|0),(0|0),1,(8|0))|0); - (_emscripten_set_touchend_callback((4712|0),(0|0),1,(8|0))|0); - (_emscripten_set_touchmove_callback((4712|0),(0|0),1,(8|0))|0); - (_emscripten_set_touchcancel_callback((4712|0),(0|0),1,(8|0))|0); - (_emscripten_set_gamepadconnected_callback((0|0),1,(9|0))|0); - (_emscripten_set_gamepaddisconnected_callback((0|0),1,(9|0))|0); - $3 = HEAP32[4787]|0; - $4 = (+($3|0)); - $5 = $4 * 0.5; - HEAPF32[4620] = $5; - $6 = HEAP32[4786]|0; - $7 = (+($6|0)); - $8 = $7 * 0.5; - HEAPF32[(18484)>>2] = $8; - $9 = HEAP32[4790]|0; - $10 = ($9|0)==(0); - if ($10) { - STACKTOP = sp;return; - } - _SetTargetFPS(60); - _LogoAnimation(); - STACKTOP = sp;return; -} -function _TraceLog($0,$1,$varargs) { - $0 = $0|0; - $1 = $1|0; - $varargs = $varargs|0; - var $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $endptr = 0, $strlen = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $2 = sp; - switch ($0|0) { - case 0: { - ;HEAP8[18520>>0]=HEAP8[9212>>0]|0;HEAP8[18520+1>>0]=HEAP8[9212+1>>0]|0;HEAP8[18520+2>>0]=HEAP8[9212+2>>0]|0;HEAP8[18520+3>>0]=HEAP8[9212+3>>0]|0;HEAP8[18520+4>>0]=HEAP8[9212+4>>0]|0;HEAP8[18520+5>>0]=HEAP8[9212+5>>0]|0;HEAP8[18520+6>>0]=HEAP8[9212+6>>0]|0; - break; - } - case 1: { - $3 = 18520; - $4 = $3; - HEAP32[$4>>2] = 1330795077; - $5 = (($3) + 4)|0; - $6 = $5; - HEAP32[$6>>2] = 2112082; - break; - } - case 2: { - dest=18520; src=9219; stop=dest+10|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); - break; - } - case 3: { - $7 = 18520; - $8 = $7; - HEAP32[$8>>2] = 1430406468; - $9 = (($7) + 4)|0; - $10 = $9; - HEAP32[$10>>2] = 2112071; - break; - } - default: { - } - } - (_strcat(18520,$1)|0); - $strlen = (_strlen(18520)|0); - $endptr = (18520 + ($strlen)|0); - HEAP8[$endptr>>0]=10&255;HEAP8[$endptr+1>>0]=10>>8; - HEAP32[$2>>2] = $varargs; - $11 = ($0|0)==(3); - if ($11) { - STACKTOP = sp;return; - } - (_vprintf(18520,$2)|0); - $12 = ($0|0)==(1); - if ($12) { - _exit(1); - // unreachable; - } else { - STACKTOP = sp;return; - } -} -function _InitGraphicsDevice($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $$015 = 0, $$byval_copy = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; - var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0; - var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0.0, $79 = 0, $8 = 0, $80 = 0; - var $81 = 0, $82 = 0.0, $83 = 0, $84 = 0, $85 = 0, $9 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer10 = 0, $vararg_buffer14 = 0, $vararg_buffer18 = 0, $vararg_buffer22 = 0, $vararg_buffer3 = 0, $vararg_buffer6 = 0, $vararg_buffer8 = 0, $vararg_ptr13 = 0, $vararg_ptr17 = 0, $vararg_ptr21 = 0, $vararg_ptr5 = 0, dest = 0; - var label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 144|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(144|0); - $$byval_copy = sp + 136|0; - $vararg_buffer22 = sp + 64|0; - $vararg_buffer18 = sp + 56|0; - $vararg_buffer14 = sp + 48|0; - $vararg_buffer10 = sp + 40|0; - $vararg_buffer8 = sp + 32|0; - $vararg_buffer6 = sp + 24|0; - $vararg_buffer3 = sp + 16|0; - $vararg_buffer1 = sp + 8|0; - $vararg_buffer = sp; - $2 = sp + 72|0; - $3 = sp + 140|0; - HEAP32[4787] = $0; - HEAP32[4786] = $1; - _MatrixIdentity($2); - dest=19236; src=$2; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - (_glfwSetErrorCallback((2|0))|0); - $4 = (_glfwInit()|0); - $5 = ($4|0)==(0); - if ($5) { - _TraceLog(1,5354,$vararg_buffer); - } - $6 = HEAP32[4787]|0; - HEAP32[4825] = $6; - $7 = HEAP32[4786]|0; - HEAP32[4826] = $7; - _glfwDefaultWindowHints(); - $8 = HEAP8[21980]|0; - $9 = $8 & 4; - $10 = ($9<<24>>24)==(0); - if ($10) { - _glfwWindowHint(131075,0); - } else { - _glfwWindowHint(131075,1); - } - $11 = HEAP8[21980]|0; - $12 = $11 & 8; - $13 = ($12<<24>>24)==(0); - if (!($13)) { - _glfwWindowHint(131077,1); - } - $14 = HEAP8[21980]|0; - $15 = $14 & 32; - $16 = ($15<<24>>24)==(0); - if (!($16)) { - _glfwWindowHint(135181,4); - _TraceLog(0,5380,$vararg_buffer1); - } - $17 = (_rlGetVersion()|0); - $18 = ($17|0)==(2); - if ($18) { - _glfwWindowHint(139266,2); - _glfwWindowHint(139267,1); - } else { - $19 = (_rlGetVersion()|0); - $20 = ($19|0)==(3); - if ($20) { - _glfwWindowHint(139266,3); - _glfwWindowHint(139267,3); - _glfwWindowHint(139272,204801); - _glfwWindowHint(139270,0); - } - } - $21 = HEAP32[4827]|0; - $22 = ($21|0)==(0); - if ($22) { - $47 = HEAP32[4787]|0; - $48 = HEAP32[4786]|0; - $49 = HEAP32[4789]|0; - $50 = (_glfwCreateWindow(($47|0),($48|0),($49|0),(0|0),(0|0))|0); - HEAP32[4785] = $50; - $51 = HEAP32[4787]|0; - HEAP32[4828] = $51; - $52 = HEAP32[4786]|0; - HEAP32[4829] = $52; - $54 = $50; - } else { - $23 = (_glfwGetPrimaryMonitor()|0); - $24 = (_glfwGetVideoModes(($23|0),($$byval_copy|0))|0); - $25 = HEAP32[$$byval_copy>>2]|0; - $26 = ($25|0)>(0); - L22: do { - if ($26) { - $27 = HEAP32[4787]|0; - $28 = HEAP32[$$byval_copy>>2]|0; - $29 = HEAP32[4786]|0; - $$015 = 0; - while(1) { - $30 = (($24) + (($$015*24)|0)|0); - $31 = HEAP32[$30>>2]|0; - $32 = ($31|0)<($27|0); - if (!($32)) { - $33 = (((($24) + (($$015*24)|0)|0)) + 4|0); - $34 = HEAP32[$33>>2]|0; - $35 = ($34|0)<($29|0); - if (!($35)) { - break; - } - } - $36 = (($$015) + 1)|0; - $37 = ($36|0)<($28|0); - if ($37) { - $$015 = $36; - } else { - break L22; - } - } - HEAP32[4825] = $31; - HEAP32[4826] = $34; - } - } while(0); - $38 = HEAP32[4825]|0; - $39 = HEAP32[4826]|0; - HEAP32[$vararg_buffer3>>2] = $38; - $vararg_ptr5 = ((($vararg_buffer3)) + 4|0); - HEAP32[$vararg_ptr5>>2] = $39; - _TraceLog(2,5405,$vararg_buffer3); - $40 = HEAP32[4825]|0; - $41 = HEAP32[4826]|0; - _SetupFramebufferSize($40,$41); - $42 = HEAP32[4825]|0; - $43 = HEAP32[4826]|0; - $44 = HEAP32[4789]|0; - $45 = (_glfwGetPrimaryMonitor()|0); - $46 = (_glfwCreateWindow(($42|0),($43|0),($44|0),($45|0),(0|0))|0); - HEAP32[4785] = $46; - $54 = $46; - } - $53 = ($54|0)==(0|0); - if ($53) { - _glfwTerminate(); - _TraceLog(1,5443,$vararg_buffer6); - } else { - _TraceLog(0,5476,$vararg_buffer8); - $55 = HEAP32[4828]|0; - $56 = HEAP32[4829]|0; - HEAP32[$vararg_buffer10>>2] = $55; - $vararg_ptr13 = ((($vararg_buffer10)) + 4|0); - HEAP32[$vararg_ptr13>>2] = $56; - _TraceLog(0,5516,$vararg_buffer10); - $57 = HEAP32[4787]|0; - $58 = HEAP32[4786]|0; - HEAP32[$vararg_buffer14>>2] = $57; - $vararg_ptr17 = ((($vararg_buffer14)) + 4|0); - HEAP32[$vararg_ptr17>>2] = $58; - _TraceLog(0,5537,$vararg_buffer14); - $59 = HEAP32[4830]|0; - $60 = HEAP32[4831]|0; - HEAP32[$vararg_buffer18>>2] = $59; - $vararg_ptr21 = ((($vararg_buffer18)) + 4|0); - HEAP32[$vararg_ptr21>>2] = $60; - _TraceLog(0,5558,$vararg_buffer18); - } - $61 = HEAP32[4785]|0; - (_glfwSetWindowSizeCallback(($61|0),(1|0))|0); - $62 = HEAP32[4785]|0; - (_glfwSetCursorEnterCallback(($62|0),(3|0))|0); - $63 = HEAP32[4785]|0; - (_glfwSetKeyCallback(($63|0),(1|0))|0); - $64 = HEAP32[4785]|0; - (_glfwSetMouseButtonCallback(($64|0),(1|0))|0); - $65 = HEAP32[4785]|0; - (_glfwSetCursorPosCallback(($65|0),(1|0))|0); - $66 = HEAP32[4785]|0; - (_glfwSetCharCallback(($66|0),(4|0))|0); - $67 = HEAP32[4785]|0; - (_glfwSetScrollCallback(($67|0),(2|0))|0); - $68 = HEAP32[4785]|0; - (_glfwSetWindowIconifyCallback(($68|0),(5|0))|0); - $69 = HEAP32[4785]|0; - _glfwMakeContextCurrent(($69|0)); - _glfwSwapInterval(0); - $70 = HEAP8[21980]|0; - $71 = $70 & 64; - $72 = ($71<<24>>24)==(0); - if ($72) { - $73 = HEAP32[4787]|0; - $74 = HEAP32[4786]|0; - _rlglInit($73,$74); - _SetupViewport(); - _rlMatrixMode(5889); - _rlLoadIdentity(); - $75 = HEAP32[4828]|0; - $76 = HEAP32[4830]|0; - $77 = (($75) - ($76))|0; - $78 = (+($77|0)); - $79 = HEAP32[4829]|0; - $80 = HEAP32[4831]|0; - $81 = (($79) - ($80))|0; - $82 = (+($81|0)); - _rlOrtho(0.0,$78,$82,0.0,0.0,1.0); - _rlMatrixMode(5888); - _rlLoadIdentity(); - HEAP8[$3>>0] = -11; - $83 = ((($3)) + 1|0); - HEAP8[$83>>0] = -11; - $84 = ((($3)) + 2|0); - HEAP8[$84>>0] = -11; - $85 = ((($3)) + 3|0); - HEAP8[$85>>0] = -1; - ;HEAP8[$$byval_copy>>0]=HEAP8[$3>>0]|0;HEAP8[$$byval_copy+1>>0]=HEAP8[$3+1>>0]|0;HEAP8[$$byval_copy+2>>0]=HEAP8[$3+2>>0]|0;HEAP8[$$byval_copy+3>>0]=HEAP8[$3+3>>0]|0; - _ClearBackground($$byval_copy); - STACKTOP = sp;return; - } - _glfwSwapInterval(1); - _TraceLog(0,5583,$vararg_buffer22); - $73 = HEAP32[4787]|0; - $74 = HEAP32[4786]|0; - _rlglInit($73,$74); - _SetupViewport(); - _rlMatrixMode(5889); - _rlLoadIdentity(); - $75 = HEAP32[4828]|0; - $76 = HEAP32[4830]|0; - $77 = (($75) - ($76))|0; - $78 = (+($77|0)); - $79 = HEAP32[4829]|0; - $80 = HEAP32[4831]|0; - $81 = (($79) - ($80))|0; - $82 = (+($81|0)); - _rlOrtho(0.0,$78,$82,0.0,0.0,1.0); - _rlMatrixMode(5888); - _rlLoadIdentity(); - HEAP8[$3>>0] = -11; - $83 = ((($3)) + 1|0); - HEAP8[$83>>0] = -11; - $84 = ((($3)) + 2|0); - HEAP8[$84>>0] = -11; - $85 = ((($3)) + 3|0); - HEAP8[$85>>0] = -1; - ;HEAP8[$$byval_copy>>0]=HEAP8[$3>>0]|0;HEAP8[$$byval_copy+1>>0]=HEAP8[$3+1>>0]|0;HEAP8[$$byval_copy+2>>0]=HEAP8[$3+2>>0]|0;HEAP8[$$byval_copy+3>>0]=HEAP8[$3+3>>0]|0; - _ClearBackground($$byval_copy); - STACKTOP = sp;return; -} -function _LoadDefaultFont() { - var $$ = 0, $$0101 = 0, $$090100 = 0, $$09299 = 0, $$095104 = 0, $$096103 = 0, $$097102 = 0, $$191 = 0, $$193 = 0, $$byval_copy1 = 0, $$lcssa = 0, $$sroa$0$0$$sroa_idx = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0; - var $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0; - var $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; - var $vararg_buffer = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); - $$byval_copy1 = sp + 44|0; - $vararg_buffer = sp; - $0 = sp + 4|0; - $1 = sp + 24|0; - HEAP32[(19204)>>2] = 224; - $2 = (_malloc(65536)|0); - _memset(($2|0),0,65536)|0; - $$095104 = 0;$$096103 = 0; - while(1) { - $3 = (100 + ($$095104<<2)|0); - $4 = HEAP32[$3>>2]|0; - $$097102 = 31; - while(1) { - $16 = 1 << $$097102; - $17 = $4 & $16; - $18 = ($17|0)==(0); - if (!($18)) { - $19 = (($$097102) + ($$096103))|0; - $$sroa$0$0$$sroa_idx = (($2) + ($19<<2)|0); - HEAP8[$$sroa$0$0$$sroa_idx>>0]=-1&255;HEAP8[$$sroa$0$0$$sroa_idx+1>>0]=(-1>>8)&255;HEAP8[$$sroa$0$0$$sroa_idx+2>>0]=(-1>>16)&255;HEAP8[$$sroa$0$0$$sroa_idx+3>>0]=-1>>24; - } - $20 = (($$097102) + -1)|0; - $21 = ($$097102|0)>(0); - if ($21) { - $$097102 = $20; - } else { - break; - } - } - $12 = (($$095104) + 1)|0; - $13 = ($$095104|0)>(511); - $$ = $13 ? 0 : $12; - $14 = (($$096103) + 32)|0; - $15 = ($14|0)<(16384); - if ($15) { - $$095104 = $$;$$096103 = $14; - } else { - break; - } - } - _LoadImageEx($0,$2,128,128); - _ImageFormat($0,2); - _free($2); - ;HEAP32[$$byval_copy1>>2]=HEAP32[$0>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$0+8>>2]|0;HEAP32[$$byval_copy1+12>>2]=HEAP32[$0+12>>2]|0;HEAP32[$$byval_copy1+16>>2]=HEAP32[$0+16>>2]|0; - _LoadTextureFromImage($1,$$byval_copy1); - ;HEAP32[19180>>2]=HEAP32[$1>>2]|0;HEAP32[19180+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[19180+8>>2]=HEAP32[$1+8>>2]|0;HEAP32[19180+12>>2]=HEAP32[$1+12>>2]|0;HEAP32[19180+16>>2]=HEAP32[$1+16>>2]|0; - ;HEAP32[$$byval_copy1>>2]=HEAP32[$0>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$0+8>>2]|0;HEAP32[$$byval_copy1+12>>2]=HEAP32[$0+12>>2]|0;HEAP32[$$byval_copy1+16>>2]=HEAP32[$0+16>>2]|0; - _UnloadImage($$byval_copy1); - $5 = HEAP32[(19204)>>2]|0; - $6 = $5 << 5; - $7 = (_malloc($6)|0); - HEAP32[(19208)>>2] = $7; - $8 = ($5|0)>(0); - if (!($8)) { - $$lcssa = $7; - $22 = ((($$lcssa)) + 16|0); - $23 = HEAP32[$22>>2]|0; - HEAP32[(19200)>>2] = $23; - $24 = HEAP32[4795]|0; - HEAP32[$vararg_buffer>>2] = $24; - _TraceLog(0,4907,$vararg_buffer); - STACKTOP = sp;return; - } - $9 = HEAP32[(19184)>>2]|0; - $10 = HEAP32[(19204)>>2]|0; - $11 = HEAP32[(19208)>>2]|0; - $$0101 = 0;$$090100 = 1;$$09299 = 0;$27 = $7; - while(1) { - $25 = (($$0101) + 32)|0; - $26 = (($27) + ($$0101<<5)|0); - HEAP32[$26>>2] = $25; - $28 = (((($27) + ($$0101<<5)|0)) + 4|0); - HEAP32[$28>>2] = $$090100; - $29 = ($$09299*11)|0; - $30 = (($29) + 1)|0; - $31 = (((($27) + ($$0101<<5)|0)) + 8|0); - HEAP32[$31>>2] = $30; - $32 = (2148 + ($$0101<<2)|0); - $33 = HEAP32[$32>>2]|0; - $34 = (((($27) + ($$0101<<5)|0)) + 12|0); - HEAP32[$34>>2] = $33; - $35 = (((($27) + ($$0101<<5)|0)) + 16|0); - HEAP32[$35>>2] = 10; - $36 = (($$090100) + 1)|0; - $37 = (($36) + ($33))|0; - $38 = ($37|0)<($9|0); - $39 = (($$09299) + 1)|0; - if ($38) { - $$191 = $37;$$193 = $$09299; - } else { - $40 = ($39*11)|0; - $41 = (($40) + 1)|0; - $42 = (($33) + 2)|0; - HEAP32[$28>>2] = 1; - HEAP32[$31>>2] = $41; - $$191 = $42;$$193 = $39; - } - $43 = (((($27) + ($$0101<<5)|0)) + 20|0); - HEAP32[$43>>2] = 0; - $44 = (((($27) + ($$0101<<5)|0)) + 24|0); - HEAP32[$44>>2] = 0; - $45 = (((($27) + ($$0101<<5)|0)) + 28|0); - HEAP32[$45>>2] = 0; - $46 = (($$0101) + 1)|0; - $47 = ($46|0)<($10|0); - if ($47) { - $$0101 = $46;$$090100 = $$191;$$09299 = $$193;$27 = $11; - } else { - $$lcssa = $11; - break; - } - } - $22 = ((($$lcssa)) + 16|0); - $23 = HEAP32[$22>>2]|0; - HEAP32[(19200)>>2] = $23; - $24 = HEAP32[4795]|0; - HEAP32[$vararg_buffer>>2] = $24; - _TraceLog(0,4907,$vararg_buffer); - STACKTOP = sp;return; -} -function _InitTimer() { - var $0 = 0, $1 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (_time((0|0))|0); - _srand($0); - $1 = (+_GetTime()); - HEAPF64[2314] = $1; - return; -} -function _EmscriptenFullscreenChangeCallback($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $10 = 0, $11 = 0, $12 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0, $vararg_buffer4 = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, $vararg_ptr3 = 0, $vararg_ptr7 = 0, $vararg_ptr8 = 0, $vararg_ptr9 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); - $vararg_buffer4 = sp + 16|0; - $vararg_buffer = sp; - $3 = HEAP32[$1>>2]|0; - $4 = ($3|0)==(0); - $5 = ((($1)) + 264|0); - $6 = HEAP32[$5>>2]|0; - $7 = ((($1)) + 268|0); - $8 = HEAP32[$7>>2]|0; - $9 = ((($1)) + 272|0); - $10 = HEAP32[$9>>2]|0; - $11 = ((($1)) + 276|0); - $12 = HEAP32[$11>>2]|0; - if ($4) { - HEAP32[$vararg_buffer4>>2] = $6; - $vararg_ptr7 = ((($vararg_buffer4)) + 4|0); - HEAP32[$vararg_ptr7>>2] = $8; - $vararg_ptr8 = ((($vararg_buffer4)) + 8|0); - HEAP32[$vararg_ptr8>>2] = $10; - $vararg_ptr9 = ((($vararg_buffer4)) + 12|0); - HEAP32[$vararg_ptr9>>2] = $12; - _TraceLog(0,4840,$vararg_buffer4); - STACKTOP = sp;return 0; - } else { - HEAP32[$vararg_buffer>>2] = $6; - $vararg_ptr1 = ((($vararg_buffer)) + 4|0); - HEAP32[$vararg_ptr1>>2] = $8; - $vararg_ptr2 = ((($vararg_buffer)) + 8|0); - HEAP32[$vararg_ptr2>>2] = $10; - $vararg_ptr3 = ((($vararg_buffer)) + 12|0); - HEAP32[$vararg_ptr3>>2] = $12; - _TraceLog(0,4771,$vararg_buffer); - STACKTOP = sp;return 0; - } - return (0)|0; -} -function _EmscriptenKeyboardCallback($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; - sp = STACKTOP; - $3 = ($0|0)==(1); - if (!($3)) { - return 0; - } - $4 = ((($1)) + 32|0); - $5 = (_strcmp($4,4764)|0); - $6 = ($5|0)==(0); - if (!($6)) { - return 0; - } - (_emscripten_exit_pointerlock()|0); - return 0; -} -function _EmscriptenMouseCallback($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 272|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(272|0); - $3 = sp; - $4 = ($0|0)==(4); - if (!($4)) { - STACKTOP = sp;return 0; - } - (_emscripten_get_pointerlock_status(($3|0))|0); - $5 = HEAP32[$3>>2]|0; - $6 = ($5|0)==(0); - if ($6) { - (_emscripten_request_pointerlock((0|0),1)|0); - } else { - (_emscripten_exit_pointerlock()|0); - (_emscripten_get_pointerlock_status(($3|0))|0); - } - STACKTOP = sp;return 0; -} -function _EmscriptenTouchCallback($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $$byval_copy = 0, $$sink = 0, $$sroa$0$0$$sroa_idx = 0, $$sroa$03$0$$sroa_idx = 0, $$sroa$2$0$$sroa_idx2 = 0, $$sroa$24$0$$sroa_idx5 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0.0; - var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0; - var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0.0, $48 = 0.0, $49 = 0.0, $5 = 0, $50 = 0, $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0, $55 = 0.0, $56 = 0.0, $57 = 0.0, $58 = 0, $59 = 0.0, $6 = 0; - var $60 = 0.0, $61 = 0.0, $7 = 0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(112|0); - $$byval_copy = sp + 56|0; - $3 = sp; - switch ($0|0) { - case 22: { - $$sink = 1; - label = 4; - break; - } - case 23: { - $$sink = 0; - label = 4; - break; - } - case 24: { - $$sink = 2; - label = 4; - break; - } - default: { - } - } - if ((label|0) == 4) { - HEAP32[$3>>2] = $$sink; - } - $4 = HEAP32[$1>>2]|0; - $5 = ((($3)) + 4|0); - HEAP32[$5>>2] = $4; - $6 = ((($1)) + 20|0); - $7 = HEAP32[$6>>2]|0; - $8 = ((($3)) + 8|0); - HEAP32[$8>>2] = $7; - $9 = ((($1)) + 72|0); - $10 = HEAP32[$9>>2]|0; - $11 = ((($3)) + 12|0); - HEAP32[$11>>2] = $10; - $12 = ((($1)) + 56|0); - $13 = HEAP32[$12>>2]|0; - $14 = (+($13|0)); - $15 = ((($1)) + 60|0); - $16 = HEAP32[$15>>2]|0; - $17 = (+($16|0)); - $$sroa$03$0$$sroa_idx = ((($3)) + 24|0); - HEAPF32[$$sroa$03$0$$sroa_idx>>2] = $14; - $$sroa$24$0$$sroa_idx5 = ((($3)) + 28|0); - HEAPF32[$$sroa$24$0$$sroa_idx5>>2] = $17; - $18 = ((($1)) + 108|0); - $19 = HEAP32[$18>>2]|0; - $20 = (+($19|0)); - $21 = ((($1)) + 112|0); - $22 = HEAP32[$21>>2]|0; - $23 = (+($22|0)); - $$sroa$0$0$$sroa_idx = ((($3)) + 32|0); - HEAPF32[$$sroa$0$0$$sroa_idx>>2] = $20; - $$sroa$2$0$$sroa_idx2 = ((($3)) + 36|0); - HEAPF32[$$sroa$2$0$$sroa_idx2>>2] = $23; - $24 = ((($3)) + 24|0); - $25 = $24; - $26 = $25; - $27 = HEAP32[$26>>2]|0; - $28 = (($25) + 4)|0; - $29 = $28; - $30 = HEAP32[$29>>2]|0; - $31 = 18496; - $32 = $31; - HEAP32[$32>>2] = $27; - $33 = (($31) + 4)|0; - $34 = $33; - HEAP32[$34>>2] = $30; - $35 = ((($3)) + 32|0); - $36 = $35; - $37 = $36; - $38 = HEAP32[$37>>2]|0; - $39 = (($36) + 4)|0; - $40 = $39; - $41 = HEAP32[$40>>2]|0; - $42 = (18504); - $43 = $42; - HEAP32[$43>>2] = $38; - $44 = (($42) + 4)|0; - $45 = $44; - HEAP32[$45>>2] = $41; - $46 = (_GetScreenWidth()|0); - $47 = (+($46|0)); - $48 = +HEAPF32[$24>>2]; - $49 = $48 / $47; - HEAPF32[$24>>2] = $49; - $50 = (_GetScreenHeight()|0); - $51 = (+($50|0)); - $52 = +HEAPF32[$$sroa$24$0$$sroa_idx5>>2]; - $53 = $52 / $51; - HEAPF32[$$sroa$24$0$$sroa_idx5>>2] = $53; - $54 = (_GetScreenWidth()|0); - $55 = (+($54|0)); - $56 = +HEAPF32[$35>>2]; - $57 = $56 / $55; - HEAPF32[$35>>2] = $57; - $58 = (_GetScreenHeight()|0); - $59 = (+($58|0)); - $60 = +HEAPF32[$$sroa$2$0$$sroa_idx2>>2]; - $61 = $60 / $59; - HEAPF32[$$sroa$2$0$$sroa_idx2>>2] = $61; - dest=$$byval_copy; src=$3; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _ProcessGestureEvent($$byval_copy); - STACKTOP = sp;return 1; -} -function _EmscriptenGamepadCallback($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $$sink = 0, $10 = 0, $11 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $3 = ((($1)) + 1296|0); - $4 = HEAP32[$3>>2]|0; - $5 = ($4|0)==(0); - if ($5) { - label = 3; - } else { - $6 = ((($1)) + 1300|0); - $7 = HEAP32[$6>>2]|0; - $8 = ($7|0)<(4); - if ($8) { - $$sink = 1; - } else { - label = 3; - } - } - if ((label|0) == 3) { - $$sink = 0; - } - $9 = ((($1)) + 1300|0); - $10 = HEAP32[$9>>2]|0; - $11 = (19164 + ($10<<2)|0); - HEAP32[$11>>2] = $$sink; - return 0; -} -function _SetTargetFPS($0) { - $0 = $0|0; - var $$ = 0.0, $$op = 0.0, $1 = 0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $vararg_buffer = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $vararg_buffer = sp; - $1 = ($0|0)<(1); - $2 = (+($0|0)); - $3 = 1.0 / $2; - $$ = $1 ? 0.0 : $3; - HEAPF64[2311] = $$; - $4 = $3; - $$op = $4 * 1000.0; - $5 = $$op; - $6 = $1 ? 0.0 : $5; - HEAPF64[$vararg_buffer>>3] = $6; - _TraceLog(0,4720,$vararg_buffer); - STACKTOP = sp;return; -} -function _LogoAnimation() { - var label = 0, sp = 0; - sp = STACKTOP; - HEAP32[4790] = 0; - return; -} -function _GetTime() { - var $0 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (+_glfwGetTime()); - return (+$0); -} -function _LoadImageEx($0,$1,$2,$3) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - $3 = $3|0; - var $$03334 = 0, $$035 = 0, $$sroa$12$0$$sroa_idx21 = 0, $$sroa$15$0$$sroa_idx24 = 0, $$sroa$16$0$$sroa_idx26 = 0, $$sroa$9$0$$sroa_idx18 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; - var $24 = 0, $25 = 0, $26 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; - sp = STACKTOP; - $4 = $2 << 2; - $5 = Math_imul($4, $3)|0; - $6 = (_malloc($5)|0); - $7 = ($5|0)>(0); - if ($7) { - $8 = (($5) + -1)|0; - $9 = $8 >>> 2; - $$03334 = 0;$$035 = 0; - while(1) { - $10 = (($1) + ($$03334<<2)|0); - $11 = HEAP8[$10>>0]|0; - $12 = (($6) + ($$035)|0); - HEAP8[$12>>0] = $11; - $13 = (((($1) + ($$03334<<2)|0)) + 1|0); - $14 = HEAP8[$13>>0]|0; - $15 = $$035 | 1; - $16 = (($6) + ($15)|0); - HEAP8[$16>>0] = $14; - $17 = (((($1) + ($$03334<<2)|0)) + 2|0); - $18 = HEAP8[$17>>0]|0; - $19 = $$035 | 2; - $20 = (($6) + ($19)|0); - HEAP8[$20>>0] = $18; - $21 = (((($1) + ($$03334<<2)|0)) + 3|0); - $22 = HEAP8[$21>>0]|0; - $23 = $$035 | 3; - $24 = (($6) + ($23)|0); - HEAP8[$24>>0] = $22; - $25 = (($$03334) + 1)|0; - $26 = (($$035) + 4)|0; - $exitcond = ($$03334|0)==($9|0); - if ($exitcond) { - break; - } else { - $$03334 = $25;$$035 = $26; - } - } - } - HEAP32[$0>>2] = $6; - $$sroa$9$0$$sroa_idx18 = ((($0)) + 4|0); - HEAP32[$$sroa$9$0$$sroa_idx18>>2] = $2; - $$sroa$12$0$$sroa_idx21 = ((($0)) + 8|0); - HEAP32[$$sroa$12$0$$sroa_idx21>>2] = $3; - $$sroa$15$0$$sroa_idx24 = ((($0)) + 12|0); - HEAP32[$$sroa$15$0$$sroa_idx24>>2] = 1; - $$sroa$16$0$$sroa_idx26 = ((($0)) + 16|0); - HEAP32[$$sroa$16$0$$sroa_idx26>>2] = 7; - return; -} -function _ImageFormat($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $$0166199 = 0, $$0167197 = 0, $$0168195 = 0, $$0169192 = 0, $$0170190 = 0, $$0171188 = 0, $$0172189 = 0, $$0202 = 0, $$1194 = 0, $$2201 = 0, $$byval_copy = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0.0, $103 = 0.0, $104 = 0.0, $105 = 0, $106 = 0, $107 = 0; - var $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0; - var $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0; - var $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0; - var $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0.0, $17 = 0, $170 = 0.0, $171 = 0.0, $172 = 0, $173 = 0, $174 = 0, $175 = 0.0, $176 = 0.0, $177 = 0.0, $178 = 0, $179 = 0, $18 = 0; - var $180 = 0, $181 = 0.0, $182 = 0.0, $183 = 0.0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0.0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0; - var $199 = 0, $2 = 0, $20 = 0.0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0; - var $216 = 0, $217 = 0, $218 = 0.0, $219 = 0.0, $22 = 0, $220 = 0.0, $221 = 0, $222 = 0, $223 = 0, $224 = 0.0, $225 = 0.0, $226 = 0.0, $227 = 0, $228 = 0, $229 = 0, $23 = 0.0, $230 = 0.0, $231 = 0.0, $232 = 0.0, $233 = 0; - var $234 = 0, $235 = 0, $236 = 0.0, $237 = 0.0, $238 = 0.0, $239 = 0, $24 = 0.0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0.0, $250 = 0, $251 = 0; - var $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0; - var $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0.0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0; - var $289 = 0, $29 = 0.0, $290 = 0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; - var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0.0, $53 = 0.0, $54 = 0, $55 = 0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0, $6 = 0, $60 = 0, $61 = 0.0, $62 = 0.0; - var $63 = 0.0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0; - var $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0.0, $91 = 0.0, $92 = 0.0, $93 = 0, $94 = 0, $95 = 0, $96 = 0.0, $97 = 0.0, $98 = 0.0, $99 = 0; - var $or$cond = 0, $roundf = 0.0, $roundf173 = 0.0, $roundf174 = 0.0, $roundf175 = 0.0, $roundf176 = 0.0, $roundf177 = 0.0, $roundf178 = 0.0, $roundf179 = 0.0, $roundf180 = 0.0, $roundf181 = 0.0, $vararg_buffer = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); - $$byval_copy = sp + 4|0; - $vararg_buffer = sp; - $2 = ((($0)) + 16|0); - $3 = HEAP32[$2>>2]|0; - $4 = ($3|0)==($1|0); - if ($4) { - STACKTOP = sp;return; - } - $5 = ($3|0)<(8); - $6 = ($1|0)<(8); - $or$cond = $6 & $5; - if (!($or$cond)) { - _TraceLog(2,5254,$vararg_buffer); - STACKTOP = sp;return; - } - ;HEAP32[$$byval_copy>>2]=HEAP32[$0>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$0+8>>2]|0;HEAP32[$$byval_copy+12>>2]=HEAP32[$0+12>>2]|0;HEAP32[$$byval_copy+16>>2]=HEAP32[$0+16>>2]|0; - $7 = (_GetImageData($$byval_copy)|0); - $8 = HEAP32[$0>>2]|0; - _free($8); - HEAP32[$2>>2] = $1; - switch ($1|0) { - case 1: { - $9 = ((($0)) + 4|0); - $10 = HEAP32[$9>>2]|0; - $11 = ((($0)) + 8|0); - $12 = HEAP32[$11>>2]|0; - $13 = Math_imul($12, $10)|0; - $14 = (_malloc($13)|0); - HEAP32[$0>>2] = $14; - $15 = Math_imul($12, $10)|0; - $16 = ($15|0)>(0); - if ($16) { - $$0171188 = 0; - while(1) { - $17 = (($7) + ($$0171188<<2)|0); - $18 = HEAP8[$17>>0]|0; - $19 = (+($18&255)); - $20 = $19 * 0.29899999499320984; - $21 = (((($7) + ($$0171188<<2)|0)) + 1|0); - $22 = HEAP8[$21>>0]|0; - $23 = (+($22&255)); - $24 = $23 * 0.58700001239776611; - $25 = $20 + $24; - $26 = (((($7) + ($$0171188<<2)|0)) + 2|0); - $27 = HEAP8[$26>>0]|0; - $28 = (+($27&255)); - $29 = $28 * 0.11400000005960464; - $30 = $25 + $29; - $31 = (~~(($30))&255); - $32 = HEAP32[$0>>2]|0; - $33 = (($32) + ($$0171188)|0); - HEAP8[$33>>0] = $31; - $34 = (($$0171188) + 1)|0; - $35 = HEAP32[$9>>2]|0; - $36 = HEAP32[$11>>2]|0; - $37 = Math_imul($36, $35)|0; - $38 = ($34|0)<($37|0); - if ($38) { - $$0171188 = $34; - } else { - break; - } - } - } - break; - } - case 2: { - $39 = ((($0)) + 4|0); - $40 = HEAP32[$39>>2]|0; - $41 = ((($0)) + 8|0); - $42 = HEAP32[$41>>2]|0; - $43 = $40 << 1; - $44 = Math_imul($43, $42)|0; - $45 = (_malloc($44)|0); - HEAP32[$0>>2] = $45; - $46 = HEAP32[$39>>2]|0; - $47 = $46 << 1; - $48 = Math_imul($47, $42)|0; - $49 = ($48|0)>(0); - if ($49) { - $$0170190 = 0;$$0172189 = 0; - while(1) { - $50 = (($7) + ($$0172189<<2)|0); - $51 = HEAP8[$50>>0]|0; - $52 = (+($51&255)); - $53 = $52 * 0.29899999499320984; - $54 = (((($7) + ($$0172189<<2)|0)) + 1|0); - $55 = HEAP8[$54>>0]|0; - $56 = (+($55&255)); - $57 = $56 * 0.58700001239776611; - $58 = $53 + $57; - $59 = (((($7) + ($$0172189<<2)|0)) + 2|0); - $60 = HEAP8[$59>>0]|0; - $61 = (+($60&255)); - $62 = $61 * 0.11400000005960464; - $63 = $58 + $62; - $64 = (~~(($63))&255); - $65 = HEAP32[$0>>2]|0; - $66 = (($65) + ($$0170190)|0); - HEAP8[$66>>0] = $64; - $67 = (((($7) + ($$0172189<<2)|0)) + 3|0); - $68 = HEAP8[$67>>0]|0; - $69 = HEAP32[$0>>2]|0; - $70 = $$0170190 | 1; - $71 = (($69) + ($70)|0); - HEAP8[$71>>0] = $68; - $72 = (($$0172189) + 1)|0; - $73 = (($$0170190) + 2)|0; - $74 = HEAP32[$39>>2]|0; - $75 = HEAP32[$41>>2]|0; - $76 = $74 << 1; - $77 = Math_imul($76, $75)|0; - $78 = ($73|0)<($77|0); - if ($78) { - $$0170190 = $73;$$0172189 = $72; - } else { - break; - } - } - } - break; - } - case 3: { - $79 = ((($0)) + 4|0); - $80 = HEAP32[$79>>2]|0; - $81 = ((($0)) + 8|0); - $82 = HEAP32[$81>>2]|0; - $83 = $80 << 1; - $84 = Math_imul($83, $82)|0; - $85 = (_malloc($84)|0); - HEAP32[$0>>2] = $85; - $86 = HEAP32[$79>>2]|0; - $87 = Math_imul($82, $86)|0; - $88 = ($87|0)>(0); - if ($88) { - $89 = HEAP8[$7>>0]|0; - $90 = (+($89&255)); - $91 = $90 * 31.0; - $92 = $91 / 255.0; - $roundf179 = (+_roundf((+$92))); - $93 = (~~(($roundf179))&255); - $94 = ((($7)) + 1|0); - $95 = HEAP8[$94>>0]|0; - $96 = (+($95&255)); - $97 = $96 * 63.0; - $98 = $97 / 255.0; - $roundf180 = (+_roundf((+$98))); - $99 = (~~(($roundf180))&255); - $100 = ((($7)) + 2|0); - $101 = HEAP8[$100>>0]|0; - $102 = (+($101&255)); - $103 = $102 * 31.0; - $104 = $103 / 255.0; - $roundf181 = (+_roundf((+$104))); - $105 = (~~(($roundf181))&255); - $106 = $93&255; - $107 = $106 << 11; - $108 = $99&255; - $109 = $108 << 5; - $110 = $109 | $107; - $111 = $105&255; - $112 = $110 | $111; - $113 = $112&65535; - $114 = HEAP32[$0>>2]|0; - $115 = HEAP32[$79>>2]|0; - $116 = HEAP32[$81>>2]|0; - $117 = Math_imul($116, $115)|0; - $$0169192 = 0; - while(1) { - $118 = (($114) + ($$0169192<<1)|0); - HEAP16[$118>>1] = $113; - $119 = (($$0169192) + 1)|0; - $120 = ($119|0)<($117|0); - if ($120) { - $$0169192 = $119; - } else { - break; - } - } - } - break; - } - case 4: { - $121 = ((($0)) + 4|0); - $122 = HEAP32[$121>>2]|0; - $123 = ((($0)) + 8|0); - $124 = HEAP32[$123>>2]|0; - $125 = ($122*3)|0; - $126 = Math_imul($125, $124)|0; - $127 = (_malloc($126)|0); - HEAP32[$0>>2] = $127; - $128 = HEAP32[$121>>2]|0; - $129 = ($128*3)|0; - $130 = Math_imul($129, $124)|0; - $131 = ($130|0)>(0); - if ($131) { - $$0168195 = 0;$$1194 = 0; - while(1) { - $132 = (($7) + ($$1194<<2)|0); - $133 = HEAP8[$132>>0]|0; - $134 = HEAP32[$0>>2]|0; - $135 = (($134) + ($$0168195)|0); - HEAP8[$135>>0] = $133; - $136 = (((($7) + ($$1194<<2)|0)) + 1|0); - $137 = HEAP8[$136>>0]|0; - $138 = HEAP32[$0>>2]|0; - $139 = (($$0168195) + 1)|0; - $140 = (($138) + ($139)|0); - HEAP8[$140>>0] = $137; - $141 = (((($7) + ($$1194<<2)|0)) + 2|0); - $142 = HEAP8[$141>>0]|0; - $143 = HEAP32[$0>>2]|0; - $144 = (($$0168195) + 2)|0; - $145 = (($143) + ($144)|0); - HEAP8[$145>>0] = $142; - $146 = (($$1194) + 1)|0; - $147 = (($$0168195) + 3)|0; - $148 = HEAP32[$121>>2]|0; - $149 = HEAP32[$123>>2]|0; - $150 = ($148*3)|0; - $151 = Math_imul($150, $149)|0; - $152 = ($147|0)<($151|0); - if ($152) { - $$0168195 = $147;$$1194 = $146; - } else { - break; - } - } - } - break; - } - case 5: { - $153 = ((($0)) + 4|0); - $154 = HEAP32[$153>>2]|0; - $155 = ((($0)) + 8|0); - $156 = HEAP32[$155>>2]|0; - $157 = $154 << 1; - $158 = Math_imul($157, $156)|0; - $159 = (_malloc($158)|0); - HEAP32[$0>>2] = $159; - $160 = HEAP32[$153>>2]|0; - $161 = Math_imul($156, $160)|0; - $162 = ($161|0)>(0); - if ($162) { - $163 = HEAP32[$0>>2]|0; - $164 = HEAP32[$153>>2]|0; - $165 = HEAP32[$155>>2]|0; - $166 = Math_imul($165, $164)|0; - $$0167197 = 0; - while(1) { - $167 = (($7) + ($$0167197<<2)|0); - $168 = HEAP8[$167>>0]|0; - $169 = (+($168&255)); - $170 = $169 * 31.0; - $171 = $170 / 255.0; - $roundf176 = (+_roundf((+$171))); - $172 = (~~(($roundf176))&255); - $173 = (((($7) + ($$0167197<<2)|0)) + 1|0); - $174 = HEAP8[$173>>0]|0; - $175 = (+($174&255)); - $176 = $175 * 31.0; - $177 = $176 / 255.0; - $roundf177 = (+_roundf((+$177))); - $178 = (~~(($roundf177))&255); - $179 = (((($7) + ($$0167197<<2)|0)) + 2|0); - $180 = HEAP8[$179>>0]|0; - $181 = (+($180&255)); - $182 = $181 * 31.0; - $183 = $182 / 255.0; - $roundf178 = (+_roundf((+$183))); - $184 = (~~(($roundf178))&255); - $185 = (((($7) + ($$0167197<<2)|0)) + 3|0); - $186 = HEAP8[$185>>0]|0; - $187 = ($186&255)>(50); - $188 = $172&255; - $189 = $188 << 11; - $190 = $178&255; - $191 = $190 << 6; - $192 = $191 | $189; - $193 = $184&255; - $194 = $193 << 1; - $195 = $192 | $194; - $196 = $187&1; - $197 = $195 | $196; - $198 = $197&65535; - $199 = (($163) + ($$0167197<<1)|0); - HEAP16[$199>>1] = $198; - $200 = (($$0167197) + 1)|0; - $201 = ($200|0)<($166|0); - if ($201) { - $$0167197 = $200; - } else { - break; - } - } - } - break; - } - case 6: { - $202 = ((($0)) + 4|0); - $203 = HEAP32[$202>>2]|0; - $204 = ((($0)) + 8|0); - $205 = HEAP32[$204>>2]|0; - $206 = $203 << 1; - $207 = Math_imul($206, $205)|0; - $208 = (_malloc($207)|0); - HEAP32[$0>>2] = $208; - $209 = HEAP32[$202>>2]|0; - $210 = Math_imul($205, $209)|0; - $211 = ($210|0)>(0); - if ($211) { - $212 = HEAP32[$0>>2]|0; - $213 = HEAP32[$202>>2]|0; - $214 = HEAP32[$204>>2]|0; - $215 = Math_imul($214, $213)|0; - $$0166199 = 0; - while(1) { - $216 = (($7) + ($$0166199<<2)|0); - $217 = HEAP8[$216>>0]|0; - $218 = (+($217&255)); - $219 = $218 * 15.0; - $220 = $219 / 255.0; - $roundf = (+_roundf((+$220))); - $221 = (~~(($roundf))&255); - $222 = (((($7) + ($$0166199<<2)|0)) + 1|0); - $223 = HEAP8[$222>>0]|0; - $224 = (+($223&255)); - $225 = $224 * 15.0; - $226 = $225 / 255.0; - $roundf173 = (+_roundf((+$226))); - $227 = (~~(($roundf173))&255); - $228 = (((($7) + ($$0166199<<2)|0)) + 2|0); - $229 = HEAP8[$228>>0]|0; - $230 = (+($229&255)); - $231 = $230 * 15.0; - $232 = $231 / 255.0; - $roundf174 = (+_roundf((+$232))); - $233 = (~~(($roundf174))&255); - $234 = (((($7) + ($$0166199<<2)|0)) + 3|0); - $235 = HEAP8[$234>>0]|0; - $236 = (+($235&255)); - $237 = $236 * 15.0; - $238 = $237 / 255.0; - $roundf175 = (+_roundf((+$238))); - $239 = (~~(($roundf175))&255); - $240 = $221&255; - $241 = $240 << 12; - $242 = $227&255; - $243 = $242 << 8; - $244 = $243 | $241; - $245 = $233&255; - $246 = $245 << 4; - $247 = $244 | $246; - $248 = $239&255; - $249 = $247 | $248; - $250 = $249&65535; - $251 = (($212) + ($$0166199<<1)|0); - HEAP16[$251>>1] = $250; - $252 = (($$0166199) + 1)|0; - $253 = ($252|0)<($215|0); - if ($253) { - $$0166199 = $252; - } else { - break; - } - } - } - break; - } - case 7: { - $254 = ((($0)) + 4|0); - $255 = HEAP32[$254>>2]|0; - $256 = ((($0)) + 8|0); - $257 = HEAP32[$256>>2]|0; - $258 = $255 << 2; - $259 = Math_imul($258, $257)|0; - $260 = (_malloc($259)|0); - HEAP32[$0>>2] = $260; - $261 = HEAP32[$254>>2]|0; - $262 = $261 << 2; - $263 = Math_imul($262, $257)|0; - $264 = ($263|0)>(0); - if ($264) { - $$0202 = 0;$$2201 = 0; - while(1) { - $265 = (($7) + ($$2201<<2)|0); - $266 = HEAP8[$265>>0]|0; - $267 = HEAP32[$0>>2]|0; - $268 = (($267) + ($$0202)|0); - HEAP8[$268>>0] = $266; - $269 = (((($7) + ($$2201<<2)|0)) + 1|0); - $270 = HEAP8[$269>>0]|0; - $271 = HEAP32[$0>>2]|0; - $272 = $$0202 | 1; - $273 = (($271) + ($272)|0); - HEAP8[$273>>0] = $270; - $274 = (((($7) + ($$2201<<2)|0)) + 2|0); - $275 = HEAP8[$274>>0]|0; - $276 = HEAP32[$0>>2]|0; - $277 = $$0202 | 2; - $278 = (($276) + ($277)|0); - HEAP8[$278>>0] = $275; - $279 = (((($7) + ($$2201<<2)|0)) + 3|0); - $280 = HEAP8[$279>>0]|0; - $281 = HEAP32[$0>>2]|0; - $282 = $$0202 | 3; - $283 = (($281) + ($282)|0); - HEAP8[$283>>0] = $280; - $284 = (($$2201) + 1)|0; - $285 = (($$0202) + 4)|0; - $286 = HEAP32[$254>>2]|0; - $287 = HEAP32[$256>>2]|0; - $288 = $286 << 2; - $289 = Math_imul($288, $287)|0; - $290 = ($285|0)<($289|0); - if ($290) { - $$0202 = $285;$$2201 = $284; - } else { - break; - } - } - } - break; - } - default: { - } - } - _free($7); - STACKTOP = sp;return; -} -function _LoadTextureFromImage($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $$sroa$11$0$$sroa_idx8 = 0, $$sroa$5$0$$sroa_idx2 = 0, $$sroa$7$0$$sroa_idx4 = 0, $$sroa$9$0$$sroa_idx6 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $2 = HEAP32[$1>>2]|0; - $3 = ((($1)) + 4|0); - $4 = HEAP32[$3>>2]|0; - $5 = ((($1)) + 8|0); - $6 = HEAP32[$5>>2]|0; - $7 = ((($1)) + 16|0); - $8 = HEAP32[$7>>2]|0; - $9 = ((($1)) + 12|0); - $10 = HEAP32[$9>>2]|0; - $11 = (_rlglLoadTexture($2,$4,$6,$8,$10)|0); - $12 = HEAP32[$3>>2]|0; - $13 = HEAP32[$5>>2]|0; - HEAP32[$0>>2] = $11; - $$sroa$5$0$$sroa_idx2 = ((($0)) + 4|0); - HEAP32[$$sroa$5$0$$sroa_idx2>>2] = $12; - $$sroa$7$0$$sroa_idx4 = ((($0)) + 8|0); - HEAP32[$$sroa$7$0$$sroa_idx4>>2] = $13; - $$sroa$9$0$$sroa_idx6 = ((($0)) + 12|0); - HEAP32[$$sroa$9$0$$sroa_idx6>>2] = $10; - $$sroa$11$0$$sroa_idx8 = ((($0)) + 16|0); - HEAP32[$$sroa$11$0$$sroa_idx8>>2] = $8; - return; -} -function _UnloadImage($0) { - $0 = $0|0; - var $1 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = HEAP32[$0>>2]|0; - _free($1); - return; -} -function _rlglLoadTexture($0,$1,$2,$3,$4) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - $3 = $3|0; - $4 = $4|0; - var $$0 = 0, $$off = 0, $$off92 = 0, $$off93 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; - var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; - var $46 = 0, $47 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond100 = 0, $or$cond7 = 0, $or$cond96 = 0, $or$cond98 = 0, $switch = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer11 = 0, $vararg_buffer15 = 0, $vararg_buffer3 = 0, $vararg_buffer5 = 0, $vararg_buffer7 = 0; - var $vararg_buffer9 = 0, $vararg_ptr13 = 0, $vararg_ptr14 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(80|0); - $vararg_buffer15 = sp + 64|0; - $vararg_buffer11 = sp + 48|0; - $vararg_buffer9 = sp + 40|0; - $vararg_buffer7 = sp + 32|0; - $vararg_buffer5 = sp + 24|0; - $vararg_buffer3 = sp + 16|0; - $vararg_buffer1 = sp + 8|0; - $vararg_buffer = sp; - $5 = sp + 68|0; - _glBindTexture(3553,0); - HEAP32[$5>>2] = 0; - $6 = HEAP32[4803]|0; - $7 = ($6|0)==(0); - $8 = $3 & -4; - $switch = ($8|0)==(8); - $or$cond100 = $switch & $7; - if ($or$cond100) { - _TraceLog(2,4952,$vararg_buffer); - $$0 = HEAP32[$5>>2]|0; - STACKTOP = sp;return ($$0|0); - } - $9 = HEAP32[4804]|0; - $10 = ($9|0)==(0); - $11 = ($3|0)==(12); - $or$cond7 = $11 & $10; - if ($or$cond7) { - _TraceLog(2,4996,$vararg_buffer1); - $$0 = HEAP32[$5>>2]|0; - STACKTOP = sp;return ($$0|0); - } - $12 = HEAP32[4805]|0; - $13 = ($12|0)==(0); - $$off = (($3) + -13)|0; - $14 = ($$off>>>0)<(2); - $or$cond = $14 & $13; - if ($or$cond) { - _TraceLog(2,5041,$vararg_buffer3); - $$0 = HEAP32[$5>>2]|0; - STACKTOP = sp;return ($$0|0); - } - $15 = HEAP32[4806]|0; - $16 = ($15|0)==(0); - $$off92 = (($3) + -15)|0; - $17 = ($$off92>>>0)<(2); - $or$cond96 = $17 & $16; - if ($or$cond96) { - _TraceLog(2,5086,$vararg_buffer5); - $$0 = HEAP32[$5>>2]|0; - STACKTOP = sp;return ($$0|0); - } - $18 = HEAP32[4807]|0; - $19 = ($18|0)==(0); - $$off93 = (($3) + -17)|0; - $20 = ($$off93>>>0)<(2); - $or$cond98 = $20 & $19; - if ($or$cond98) { - _TraceLog(2,5131,$vararg_buffer7); - $$0 = HEAP32[$5>>2]|0; - STACKTOP = sp;return ($$0|0); - } - _glGenTextures(1,($5|0)); - $21 = HEAP32[$5>>2]|0; - _glBindTexture(3553,($21|0)); - do { - switch ($3|0) { - case 1: { - _glTexImage2D(3553,0,6409,($1|0),($2|0),0,6409,5121,($0|0)); - break; - } - case 2: { - _glTexImage2D(3553,0,6410,($1|0),($2|0),0,6410,5121,($0|0)); - break; - } - case 3: { - _glTexImage2D(3553,0,6407,($1|0),($2|0),0,6407,33635,($0|0)); - break; - } - case 4: { - _glTexImage2D(3553,0,6407,($1|0),($2|0),0,6407,5121,($0|0)); - break; - } - case 5: { - _glTexImage2D(3553,0,6408,($1|0),($2|0),0,6408,32820,($0|0)); - break; - } - case 6: { - _glTexImage2D(3553,0,6408,($1|0),($2|0),0,6408,32819,($0|0)); - break; - } - case 7: { - _glTexImage2D(3553,0,6408,($1|0),($2|0),0,6408,5121,($0|0)); - break; - } - case 8: { - $22 = HEAP32[4803]|0; - $23 = ($22|0)==(0); - if (!($23)) { - _LoadCompressedTexture($0,$1,$2,$4,33776); - } - break; - } - case 9: { - $24 = HEAP32[4803]|0; - $25 = ($24|0)==(0); - if (!($25)) { - _LoadCompressedTexture($0,$1,$2,$4,33777); - } - break; - } - case 10: { - $26 = HEAP32[4803]|0; - $27 = ($26|0)==(0); - if (!($27)) { - _LoadCompressedTexture($0,$1,$2,$4,33778); - } - break; - } - case 11: { - $28 = HEAP32[4803]|0; - $29 = ($28|0)==(0); - if (!($29)) { - _LoadCompressedTexture($0,$1,$2,$4,33779); - } - break; - } - case 12: { - $30 = HEAP32[4804]|0; - $31 = ($30|0)==(0); - if (!($31)) { - _LoadCompressedTexture($0,$1,$2,$4,36196); - } - break; - } - case 13: { - $32 = HEAP32[4805]|0; - $33 = ($32|0)==(0); - if (!($33)) { - _LoadCompressedTexture($0,$1,$2,$4,37492); - } - break; - } - case 14: { - $34 = HEAP32[4805]|0; - $35 = ($34|0)==(0); - if (!($35)) { - _LoadCompressedTexture($0,$1,$2,$4,37496); - } - break; - } - case 15: { - $36 = HEAP32[4806]|0; - $37 = ($36|0)==(0); - if (!($37)) { - _LoadCompressedTexture($0,$1,$2,$4,35840); - } - break; - } - case 16: { - $38 = HEAP32[4806]|0; - $39 = ($38|0)==(0); - if (!($39)) { - _LoadCompressedTexture($0,$1,$2,$4,35842); - } - break; - } - case 17: { - $40 = HEAP32[4807]|0; - $41 = ($40|0)==(0); - if (!($41)) { - _LoadCompressedTexture($0,$1,$2,$4,37808); - } - break; - } - case 18: { - $42 = HEAP32[4807]|0; - $43 = ($42|0)==(0); - if (!($43)) { - _LoadCompressedTexture($0,$1,$2,$4,37815); - } - break; - } - default: { - _TraceLog(2,5176,$vararg_buffer9); - } - } - } while(0); - $44 = HEAP32[4808]|0; - $45 = ($44|0)==(0); - if ($45) { - _glTexParameteri(3553,10242,33071); - _glTexParameteri(3553,10243,33071); - } else { - _glTexParameteri(3553,10242,10497); - _glTexParameteri(3553,10243,10497); - } - _glTexParameteri(3553,10240,9728); - _glTexParameteri(3553,10241,9728); - _glBindTexture(3553,0); - $46 = HEAP32[$5>>2]|0; - $47 = ($46|0)==(0); - if ($47) { - _TraceLog(2,12252,$vararg_buffer15); - $$0 = HEAP32[$5>>2]|0; - STACKTOP = sp;return ($$0|0); - } else { - HEAP32[$vararg_buffer11>>2] = $46; - $vararg_ptr13 = ((($vararg_buffer11)) + 4|0); - HEAP32[$vararg_ptr13>>2] = $1; - $vararg_ptr14 = ((($vararg_buffer11)) + 8|0); - HEAP32[$vararg_ptr14>>2] = $2; - _TraceLog(0,5205,$vararg_buffer11); - $$0 = HEAP32[$5>>2]|0; - STACKTOP = sp;return ($$0|0); - } - return (0)|0; -} -function _LoadCompressedTexture($0,$1,$2,$3,$4) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - $3 = $3|0; - $4 = $4|0; - var $$ = 0, $$03645 = 0, $$03744 = 0, $$038 = 0, $$03943 = 0, $$046 = 0, $$140 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0; - var $23 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond42 = 0, label = 0, sp = 0; - sp = STACKTOP; - _glPixelStorei(3317,1); - switch ($4|0) { - case 33776: case 33777: case 36196: case 37492: { - $$038 = 8; - break; - } - default: { - $$038 = 16; - } - } - $5 = ($3|0)<(1); - $6 = $1 | $2; - $7 = ($6|0)==(0); - $or$cond42 = $5 | $7; - if ($or$cond42) { - return; - } else { - $$03645 = 0;$$03744 = 0;$$03943 = $2;$$046 = $1; - } - while(1) { - $8 = (($$046) + 3)|0; - $9 = (($8|0) / 4)&-1; - $10 = (($$03943) + 3)|0; - $11 = (($10|0) / 4)&-1; - $12 = Math_imul($11, $$038)|0; - $13 = Math_imul($12, $9)|0; - $14 = (($0) + ($$03744)|0); - _glCompressedTexImage2D(3553,($$03645|0),($4|0),($$046|0),($$03943|0),0,($13|0),($14|0)); - $15 = (($13) + ($$03744))|0; - $16 = (($$046|0) / 2)&-1; - $17 = (($$03943|0) / 2)&-1; - $18 = ($$046|0)<(2); - $$ = $18 ? 1 : $16; - $19 = ($$03943|0)<(2); - $$140 = $19 ? 1 : $17; - $20 = (($$03645) + 1)|0; - $21 = ($20|0)>=($3|0); - $22 = $$ | $$140; - $23 = ($22|0)==(0); - $or$cond = $21 | $23; - if ($or$cond) { - break; - } else { - $$03645 = $20;$$03744 = $15;$$03943 = $$140;$$046 = $$; - } - } - return; -} -function _GetImageData($0) { - $0 = $0|0; - var $$0104105 = 0, $$0106 = 0, $$1 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0.0, $103 = 0.0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0; - var $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0; - var $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; - var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0; - var $42 = 0, $43 = 0, $44 = 0, $45 = 0.0, $46 = 0.0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0.0, $52 = 0.0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0; - var $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0.0, $65 = 0.0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0.0, $71 = 0.0, $72 = 0, $73 = 0, $74 = 0, $75 = 0.0, $76 = 0.0, $77 = 0, $78 = 0; - var $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0.0, $86 = 0.0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0.0, $92 = 0.0, $93 = 0, $94 = 0, $95 = 0, $96 = 0; - var $97 = 0.0, $98 = 0.0, $99 = 0, $vararg_buffer = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $vararg_buffer = sp; - $1 = ((($0)) + 4|0); - $2 = HEAP32[$1>>2]|0; - $3 = ((($0)) + 8|0); - $4 = HEAP32[$3>>2]|0; - $5 = $2 << 2; - $6 = Math_imul($5, $4)|0; - $7 = (_malloc($6)|0); - $8 = HEAP32[$1>>2]|0; - $9 = Math_imul($4, $8)|0; - $10 = ($9|0)>(0); - if (!($10)) { - STACKTOP = sp;return ($7|0); - } - $11 = ((($0)) + 16|0); - $12 = HEAP32[$11>>2]|0; - $13 = HEAP32[$0>>2]|0; - $$0104105 = 0;$$0106 = 0; - while(1) { - switch ($12|0) { - case 1: { - $14 = (($13) + ($$0106)|0); - $15 = HEAP8[$14>>0]|0; - $16 = (($7) + ($$0104105<<2)|0); - HEAP8[$16>>0] = $15; - $17 = HEAP8[$14>>0]|0; - $18 = (((($7) + ($$0104105<<2)|0)) + 1|0); - HEAP8[$18>>0] = $17; - $19 = HEAP8[$14>>0]|0; - $20 = (((($7) + ($$0104105<<2)|0)) + 2|0); - HEAP8[$20>>0] = $19; - $21 = (((($7) + ($$0104105<<2)|0)) + 3|0); - HEAP8[$21>>0] = -1; - $22 = (($$0106) + 1)|0; - $$1 = $22; - break; - } - case 2: { - $23 = (($13) + ($$0106)|0); - $24 = HEAP8[$23>>0]|0; - $25 = (($7) + ($$0104105<<2)|0); - HEAP8[$25>>0] = $24; - $26 = HEAP8[$23>>0]|0; - $27 = (((($7) + ($$0104105<<2)|0)) + 1|0); - HEAP8[$27>>0] = $26; - $28 = HEAP8[$23>>0]|0; - $29 = (((($7) + ($$0104105<<2)|0)) + 2|0); - HEAP8[$29>>0] = $28; - $30 = (($$0106) + 1)|0; - $31 = (($13) + ($30)|0); - $32 = HEAP8[$31>>0]|0; - $33 = (((($7) + ($$0104105<<2)|0)) + 3|0); - HEAP8[$33>>0] = $32; - $34 = (($$0106) + 2)|0; - $$1 = $34; - break; - } - case 5: { - $35 = (($13) + ($$0106<<1)|0); - $36 = HEAP16[$35>>1]|0; - $37 = $36&65535; - $38 = $37 >>> 11; - $39 = (+($38|0)); - $40 = $39 * 8.0; - $41 = (~~(($40))&255); - $42 = (($7) + ($$0104105<<2)|0); - HEAP8[$42>>0] = $41; - $43 = $37 >>> 6; - $44 = $43 & 31; - $45 = (+($44|0)); - $46 = $45 * 8.0; - $47 = (~~(($46))&255); - $48 = (((($7) + ($$0104105<<2)|0)) + 1|0); - HEAP8[$48>>0] = $47; - $49 = $37 >>> 1; - $50 = $49 & 31; - $51 = (+($50|0)); - $52 = $51 * 8.0; - $53 = (~~(($52))&255); - $54 = (((($7) + ($$0104105<<2)|0)) + 2|0); - HEAP8[$54>>0] = $53; - $55 = $37 & 1; - $56 = (0 - ($55))|0; - $57 = $56&255; - $58 = (((($7) + ($$0104105<<2)|0)) + 3|0); - HEAP8[$58>>0] = $57; - $59 = (($$0106) + 1)|0; - $$1 = $59; - break; - } - case 3: { - $60 = (($13) + ($$0106<<1)|0); - $61 = HEAP16[$60>>1]|0; - $62 = $61&65535; - $63 = $62 >>> 11; - $64 = (+($63|0)); - $65 = $64 * 8.0; - $66 = (~~(($65))&255); - $67 = (($7) + ($$0104105<<2)|0); - HEAP8[$67>>0] = $66; - $68 = $62 >>> 5; - $69 = $68 & 63; - $70 = (+($69|0)); - $71 = $70 * 4.0; - $72 = (~~(($71))&255); - $73 = (((($7) + ($$0104105<<2)|0)) + 1|0); - HEAP8[$73>>0] = $72; - $74 = $62 & 31; - $75 = (+($74|0)); - $76 = $75 * 8.0; - $77 = (~~(($76))&255); - $78 = (((($7) + ($$0104105<<2)|0)) + 2|0); - HEAP8[$78>>0] = $77; - $79 = (((($7) + ($$0104105<<2)|0)) + 3|0); - HEAP8[$79>>0] = -1; - $80 = (($$0106) + 1)|0; - $$1 = $80; - break; - } - case 6: { - $81 = (($13) + ($$0106<<1)|0); - $82 = HEAP16[$81>>1]|0; - $83 = $82&65535; - $84 = $83 >>> 12; - $85 = (+($84|0)); - $86 = $85 * 17.0; - $87 = (~~(($86))&255); - $88 = (($7) + ($$0104105<<2)|0); - HEAP8[$88>>0] = $87; - $89 = $83 >>> 8; - $90 = $89 & 15; - $91 = (+($90|0)); - $92 = $91 * 17.0; - $93 = (~~(($92))&255); - $94 = (((($7) + ($$0104105<<2)|0)) + 1|0); - HEAP8[$94>>0] = $93; - $95 = $83 >>> 4; - $96 = $95 & 15; - $97 = (+($96|0)); - $98 = $97 * 17.0; - $99 = (~~(($98))&255); - $100 = (((($7) + ($$0104105<<2)|0)) + 2|0); - HEAP8[$100>>0] = $99; - $101 = $83 & 15; - $102 = (+($101|0)); - $103 = $102 * 17.0; - $104 = (~~(($103))&255); - $105 = (((($7) + ($$0104105<<2)|0)) + 3|0); - HEAP8[$105>>0] = $104; - $106 = (($$0106) + 1)|0; - $$1 = $106; - break; - } - case 7: { - $107 = (($13) + ($$0106)|0); - $108 = HEAP8[$107>>0]|0; - $109 = (($7) + ($$0104105<<2)|0); - HEAP8[$109>>0] = $108; - $110 = (($$0106) + 1)|0; - $111 = (($13) + ($110)|0); - $112 = HEAP8[$111>>0]|0; - $113 = (((($7) + ($$0104105<<2)|0)) + 1|0); - HEAP8[$113>>0] = $112; - $114 = (($$0106) + 2)|0; - $115 = (($13) + ($114)|0); - $116 = HEAP8[$115>>0]|0; - $117 = (((($7) + ($$0104105<<2)|0)) + 2|0); - HEAP8[$117>>0] = $116; - $118 = (($$0106) + 3)|0; - $119 = (($13) + ($118)|0); - $120 = HEAP8[$119>>0]|0; - $121 = (((($7) + ($$0104105<<2)|0)) + 3|0); - HEAP8[$121>>0] = $120; - $122 = (($$0106) + 4)|0; - $$1 = $122; - break; - } - case 4: { - $123 = (($13) + ($$0106)|0); - $124 = HEAP8[$123>>0]|0; - $125 = (($7) + ($$0104105<<2)|0); - HEAP8[$125>>0] = $124; - $126 = (($$0106) + 1)|0; - $127 = (($13) + ($126)|0); - $128 = HEAP8[$127>>0]|0; - $129 = (((($7) + ($$0104105<<2)|0)) + 1|0); - HEAP8[$129>>0] = $128; - $130 = (($$0106) + 2)|0; - $131 = (($13) + ($130)|0); - $132 = HEAP8[$131>>0]|0; - $133 = (((($7) + ($$0104105<<2)|0)) + 2|0); - HEAP8[$133>>0] = $132; - $134 = (((($7) + ($$0104105<<2)|0)) + 3|0); - HEAP8[$134>>0] = -1; - $135 = (($$0106) + 3)|0; - $$1 = $135; - break; - } - default: { - _TraceLog(2,5308,$vararg_buffer); - $$1 = $$0106; - } - } - $136 = (($$0104105) + 1)|0; - $137 = HEAP32[$1>>2]|0; - $138 = HEAP32[$3>>2]|0; - $139 = Math_imul($138, $137)|0; - $140 = ($136|0)<($139|0); - if ($140) { - $$0104105 = $136;$$0106 = $$1; - } else { - break; - } - } - STACKTOP = sp;return ($7|0); -} -function _ErrorCallback($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $vararg_buffer = sp; - HEAP32[$vararg_buffer>>2] = $0; - $vararg_ptr1 = ((($vararg_buffer)) + 4|0); - HEAP32[$vararg_ptr1>>2] = $1; - _TraceLog(2,9174,$vararg_buffer); - STACKTOP = sp;return; -} -function _rlGetVersion() { - var label = 0, sp = 0; - sp = STACKTOP; - return 4; -} -function _SetupFramebufferSize($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $$sink = 0, $$sink1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0, $21 = 0, $22 = 0.0, $23 = 0, $24 = 0, $25 = 0, $26 = 0.0; - var $27 = 0, $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0.0, $37 = 0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0, $41 = 0.0, $42 = 0, $43 = 0, $44 = 0.0; - var $45 = 0, $46 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0, $or$cond = 0, $roundf = 0.0, $roundf38 = 0.0, $roundf39 = 0.0, $roundf40 = 0.0, $vararg_buffer = 0, $vararg_buffer4 = 0, $vararg_buffer8 = 0, $vararg_ptr1 = 0, $vararg_ptr11 = 0, $vararg_ptr12 = 0, $vararg_ptr13 = 0, $vararg_ptr2 = 0; - var $vararg_ptr3 = 0, $vararg_ptr7 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(112|0); - $vararg_buffer8 = sp + 24|0; - $vararg_buffer4 = sp + 16|0; - $vararg_buffer = sp; - $2 = sp + 40|0; - $3 = HEAP32[4787]|0; - $4 = ($3|0)>($0|0); - if (!($4)) { - $5 = HEAP32[4786]|0; - $6 = ($5|0)>($1|0); - if (!($6)) { - $30 = ($3|0)<($0|0); - $31 = ($5|0)<($1|0); - $or$cond = $30 | $31; - if (!($or$cond)) { - HEAP32[4828] = $3; - HEAP32[4829] = $5; - HEAP32[4830] = 0; - HEAP32[4831] = 0; - STACKTOP = sp;return; - } - HEAP32[$vararg_buffer8>>2] = $3; - $vararg_ptr11 = ((($vararg_buffer8)) + 4|0); - HEAP32[$vararg_ptr11>>2] = $5; - $vararg_ptr12 = ((($vararg_buffer8)) + 8|0); - HEAP32[$vararg_ptr12>>2] = $0; - $vararg_ptr13 = ((($vararg_buffer8)) + 12|0); - HEAP32[$vararg_ptr13>>2] = $1; - _TraceLog(0,9108,$vararg_buffer8); - $32 = (+($0|0)); - $33 = (+($1|0)); - $34 = $32 / $33; - $35 = HEAP32[4787]|0; - $36 = (+($35|0)); - $37 = HEAP32[4786]|0; - $38 = (+($37|0)); - $39 = $36 / $38; - $40 = !($34 <= $39); - if ($40) { - $44 = $34 * $38; - $roundf = (+_roundf((+$44))); - $45 = (~~(($roundf))); - HEAP32[4828] = $45; - HEAP32[4829] = $37; - $46 = (($45) - ($35))|0; - HEAP32[4830] = $46; - $$sink1 = 0; - } else { - HEAP32[4828] = $35; - $41 = $36 / $34; - $roundf38 = (+_roundf((+$41))); - $42 = (~~(($roundf38))); - HEAP32[4829] = $42; - HEAP32[4830] = 0; - $43 = (($42) - ($37))|0; - $$sink1 = $43; - } - HEAP32[4831] = $$sink1; - STACKTOP = sp;return; - } - } - $7 = HEAP32[4786]|0; - HEAP32[$vararg_buffer>>2] = $3; - $vararg_ptr1 = ((($vararg_buffer)) + 4|0); - HEAP32[$vararg_ptr1>>2] = $7; - $vararg_ptr2 = ((($vararg_buffer)) + 8|0); - HEAP32[$vararg_ptr2>>2] = $0; - $vararg_ptr3 = ((($vararg_buffer)) + 12|0); - HEAP32[$vararg_ptr3>>2] = $1; - _TraceLog(2,8965,$vararg_buffer); - $8 = (+($0|0)); - $9 = HEAP32[4787]|0; - $10 = (+($9|0)); - $11 = $8 / $10; - $12 = (+($1|0)); - $13 = HEAP32[4786]|0; - $14 = (+($13|0)); - $15 = $12 / $14; - $16 = !($11 <= $15); - if ($16) { - $22 = $10 * $15; - $roundf39 = (+_roundf((+$22))); - $23 = (~~(($roundf39))); - HEAP32[4828] = $23; - HEAP32[4829] = $1; - $24 = (($0) - ($23))|0; - HEAP32[4830] = $24; - $$sink = 0; - } else { - HEAP32[4828] = $0; - $17 = HEAP32[4786]|0; - $18 = (+($17|0)); - $19 = $11 * $18; - $roundf40 = (+_roundf((+$19))); - $20 = (~~(($roundf40))); - HEAP32[4829] = $20; - HEAP32[4830] = 0; - $21 = (($1) - ($20))|0; - $$sink = $21; - } - HEAP32[4831] = $$sink; - $25 = HEAP32[4828]|0; - $26 = (+($25|0)); - $27 = HEAP32[4787]|0; - $28 = (+($27|0)); - $29 = $26 / $28; - _MatrixScale($2,$29,$29,$29); - dest=19236; src=$2; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - HEAP32[4828] = $0; - HEAP32[4829] = $1; - HEAP32[$vararg_buffer4>>2] = $0; - $vararg_ptr7 = ((($vararg_buffer4)) + 4|0); - HEAP32[$vararg_ptr7>>2] = $1; - _TraceLog(2,9043,$vararg_buffer4); - STACKTOP = sp;return; -} -function _WindowSizeCallback($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $3 = 0.0, $4 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - _rlViewport(0,0,$1,$2); - _rlMatrixMode(5889); - _rlLoadIdentity(); - $3 = (+($1|0)); - $4 = (+($2|0)); - _rlOrtho(0.0,$3,$4,0.0,0.0,1.0); - _rlMatrixMode(5888); - _rlLoadIdentity(); - _rlClearScreenBuffers(); - HEAP32[4787] = $1; - HEAP32[4786] = $2; - HEAP32[4828] = $1; - HEAP32[4829] = $2; - return; -} -function _CursorEnterCallback($0,$1) { - $0 = $0|0; - $1 = $1|0; - var label = 0, sp = 0; - sp = STACKTOP; - return; -} -function _KeyCallback($0,$1,$2,$3,$4) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - $3 = $3|0; - $4 = $4|0; - var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; - sp = STACKTOP; - $5 = HEAP32[762]|0; - $6 = ($5|0)==($1|0); - $7 = ($3|0)==(1); - $or$cond = $7 & $6; - if ($or$cond) { - _glfwSetWindowShouldClose(($0|0),1); - return; - } - $8 = $3&255; - $9 = (21987 + ($1)|0); - HEAP8[$9>>0] = $8; - if (!($7)) { - return; - } - HEAP32[761] = $1; - return; -} -function _MouseButtonCallback($0,$1,$2,$3) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - $3 = $3|0; - var $$byval_copy = 0, $$sink = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0.0, $27 = 0.0; - var $28 = 0.0, $29 = 0, $30 = 0.0, $31 = 0, $32 = 0.0, $33 = 0.0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(128|0); - $$byval_copy = sp + 64|0; - $4 = sp + 8|0; - $5 = sp; - $6 = $2&255; - $7 = (21981 + ($1)|0); - HEAP8[$7>>0] = $6; - $8 = (_IsMouseButtonPressed(0)|0); - $9 = ($8|0)==(0); - if ($9) { - $10 = (_IsMouseButtonReleased(0)|0); - $11 = ($10|0)==(0); - if (!($11)) { - $$sink = 0; - label = 3; - } - } else { - $$sink = 1; - label = 3; - } - if ((label|0) == 3) { - HEAP32[$4>>2] = $$sink; - } - $12 = ((($4)) + 8|0); - HEAP32[$12>>2] = 0; - $13 = ((($4)) + 4|0); - HEAP32[$13>>2] = 1; - $14 = ((($4)) + 24|0); - _GetMousePosition($5); - $15 = $5; - $16 = $15; - $17 = HEAP32[$16>>2]|0; - $18 = (($15) + 4)|0; - $19 = $18; - $20 = HEAP32[$19>>2]|0; - $21 = $14; - $22 = $21; - HEAP32[$22>>2] = $17; - $23 = (($21) + 4)|0; - $24 = $23; - HEAP32[$24>>2] = $20; - $25 = (_GetScreenWidth()|0); - $26 = (+($25|0)); - $27 = +HEAPF32[$14>>2]; - $28 = $27 / $26; - HEAPF32[$14>>2] = $28; - $29 = (_GetScreenHeight()|0); - $30 = (+($29|0)); - $31 = ((($4)) + 28|0); - $32 = +HEAPF32[$31>>2]; - $33 = $32 / $30; - HEAPF32[$31>>2] = $33; - dest=$$byval_copy; src=$4; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _ProcessGestureEvent($$byval_copy); - STACKTOP = sp;return; -} -function _MouseCursorPosCallback($0,$1,$2) { - $0 = $0|0; - $1 = +$1; - $2 = +$2; - var $$byval_copy = 0, $$sroa$0$0$$sroa_idx = 0, $$sroa$2$0$$sroa_idx1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0, $24 = 0.0, $25 = 0.0, $26 = 0.0; - var $3 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(112|0); - $$byval_copy = sp + 56|0; - $3 = sp; - HEAP32[$3>>2] = 2; - $4 = ((($3)) + 8|0); - HEAP32[$4>>2] = 0; - $5 = ((($3)) + 4|0); - HEAP32[$5>>2] = 1; - $6 = $1; - $7 = $2; - $$sroa$0$0$$sroa_idx = ((($3)) + 24|0); - HEAPF32[$$sroa$0$0$$sroa_idx>>2] = $6; - $$sroa$2$0$$sroa_idx1 = ((($3)) + 28|0); - HEAPF32[$$sroa$2$0$$sroa_idx1>>2] = $7; - $8 = ((($3)) + 24|0); - $9 = $8; - $10 = $9; - $11 = HEAP32[$10>>2]|0; - $12 = (($9) + 4)|0; - $13 = $12; - $14 = HEAP32[$13>>2]|0; - $15 = 18496; - $16 = $15; - HEAP32[$16>>2] = $11; - $17 = (($15) + 4)|0; - $18 = $17; - HEAP32[$18>>2] = $14; - $19 = (_GetScreenWidth()|0); - $20 = (+($19|0)); - $21 = +HEAPF32[$8>>2]; - $22 = $21 / $20; - HEAPF32[$8>>2] = $22; - $23 = (_GetScreenHeight()|0); - $24 = (+($23|0)); - $25 = +HEAPF32[$$sroa$2$0$$sroa_idx1>>2]; - $26 = $25 / $24; - HEAPF32[$$sroa$2$0$$sroa_idx1>>2] = $26; - dest=$$byval_copy; src=$3; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _ProcessGestureEvent($$byval_copy); - STACKTOP = sp;return; -} -function _CharCallback($0,$1) { - $0 = $0|0; - $1 = $1|0; - var label = 0, sp = 0; - sp = STACKTOP; - HEAP32[761] = $1; - return; -} -function _ScrollCallback($0,$1,$2) { - $0 = $0|0; - $1 = +$1; - $2 = +$2; - var $3 = 0, label = 0, sp = 0; - sp = STACKTOP; - $3 = (~~(($2))); - HEAP32[5201] = $3; - return; -} -function _WindowIconifyCallback($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $$sink = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $2 = ($1|0)!=(0); - $$sink = $2&1; - HEAP32[5200] = $$sink; - return; -} -function _rlglInit($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $$05965 = 0, $$06066 = 0, $$06167 = 0, $$062 = 0, $$sink63 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; - var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0; - var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0; - var $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0.0, $72 = 0.0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0; - var $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $9 = 0, $exitcond = 0, $exitcond69 = 0, $exitcond70 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer10 = 0, $vararg_buffer13 = 0, $vararg_buffer15 = 0, $vararg_buffer17 = 0, $vararg_buffer19 = 0; - var $vararg_buffer21 = 0, $vararg_buffer23 = 0, $vararg_buffer25 = 0, $vararg_buffer27 = 0, $vararg_buffer29 = 0, $vararg_buffer31 = 0, $vararg_buffer34 = 0, $vararg_buffer36 = 0, $vararg_buffer39 = 0, $vararg_buffer4 = 0, $vararg_buffer41 = 0, $vararg_buffer7 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 2464|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(2464|0); - $vararg_buffer41 = sp + 2184|0; - $vararg_buffer39 = sp + 2176|0; - $vararg_buffer36 = sp + 2168|0; - $vararg_buffer34 = sp + 2160|0; - $vararg_buffer31 = sp + 2152|0; - $vararg_buffer29 = sp + 2144|0; - $vararg_buffer27 = sp + 2136|0; - $vararg_buffer25 = sp + 2128|0; - $vararg_buffer23 = sp + 2120|0; - $vararg_buffer21 = sp + 2112|0; - $vararg_buffer19 = sp + 2104|0; - $vararg_buffer17 = sp + 2096|0; - $vararg_buffer15 = sp + 2088|0; - $vararg_buffer13 = sp + 2080|0; - $vararg_buffer10 = sp + 2072|0; - $vararg_buffer7 = sp + 24|0; - $vararg_buffer4 = sp + 16|0; - $vararg_buffer1 = sp + 8|0; - $vararg_buffer = sp; - $2 = sp + 2400|0; - $3 = sp + 2384|0; - $4 = sp + 2320|0; - $5 = sp + 2256|0; - $6 = sp + 2192|0; - $7 = (_glGetString(7936)|0); - HEAP32[$vararg_buffer>>2] = $7; - _TraceLog(0,5606,$vararg_buffer); - $8 = (_glGetString(7937)|0); - HEAP32[$vararg_buffer1>>2] = $8; - _TraceLog(0,5624,$vararg_buffer1); - $9 = (_glGetString(7938)|0); - HEAP32[$vararg_buffer4>>2] = $9; - _TraceLog(0,5642,$vararg_buffer4); - $10 = (_glGetString(35724)|0); - HEAP32[$vararg_buffer7>>2] = $10; - _TraceLog(0,5660,$vararg_buffer7); - $11 = (_glGetString(7939)|0); - $12 = (_strlen($11)|0); - $13 = (($12) + 1)|0; - $14 = (_malloc($13)|0); - _memcpy(($14|0),($11|0),($13|0))|0; - $$062 = 0;$$sink63 = $14; - while(1) { - $15 = (_strtok($$sink63,5678)|0); - $16 = (($vararg_buffer7) + ($$062<<2)|0); - HEAP32[$16>>2] = $15; - $17 = ($15|0)==(0|0); - $18 = (($$062) + 1)|0; - if ($17) { - break; - } else { - $$062 = $18;$$sink63 = 0; - } - } - _free($14); - $19 = (($$062) + -1)|0; - HEAP32[$vararg_buffer10>>2] = $19; - _TraceLog(0,5680,$vararg_buffer10); - $20 = ($$062|0)>(1); - if ($20) { - $$06167 = 0; - while(1) { - $23 = (($vararg_buffer7) + ($$06167<<2)|0); - $24 = HEAP32[$23>>2]|0; - $25 = (_strcmp($24,5715)|0); - $26 = ($25|0)==(0); - if ($26) { - HEAP32[4866] = 1; - $27 = (_eglGetProcAddress((5742|0))|0); - HEAP32[4867] = $27; - $28 = (_eglGetProcAddress((5763|0))|0); - HEAP32[4868] = $28; - $29 = (_eglGetProcAddress((5784|0))|0); - HEAP32[4869] = $29; - } - $30 = (_strcmp($24,5808)|0); - $31 = ($30|0)==(0); - if ($31) { - HEAP32[4808] = 1; - } - $32 = (_strcmp($24,5828)|0); - $33 = ($32|0)==(0); - if ($33) { - label = 12; - } else { - $34 = HEAP32[$23>>2]|0; - $35 = (_strcmp($34,5860)|0); - $36 = ($35|0)==(0); - if ($36) { - label = 12; - } else { - $37 = (_strcmp($34,5893)|0); - $38 = ($37|0)==(0); - if ($38) { - label = 12; - } - } - } - if ((label|0) == 12) { - label = 0; - HEAP32[4803] = 1; - } - $39 = (_strcmp($24,5933)|0); - $40 = ($39|0)==(0); - if ($40) { - label = 15; - } else { - $41 = HEAP32[$23>>2]|0; - $42 = (_strcmp($41,5969)|0); - $43 = ($42|0)==(0); - if ($43) { - label = 15; - } - } - if ((label|0) == 15) { - label = 0; - HEAP32[4804] = 1; - } - $44 = HEAP32[$23>>2]|0; - $45 = (_strcmp($44,6002)|0); - $46 = ($45|0)==(0); - if ($46) { - HEAP32[4805] = 1; - } - $47 = (_strcmp($44,6027)|0); - $48 = ($47|0)==(0); - if ($48) { - HEAP32[4806] = 1; - } - $49 = (_strcmp($44,6060)|0); - $50 = ($49|0)==(0); - if ($50) { - HEAP32[4807] = 1; - } - $51 = (_strcmp($44,6096)|0); - $52 = ($51|0)==(0); - if ($52) { - HEAP32[4870] = 1; - _glGetFloatv(34047,(19484|0)); - } - $53 = HEAP32[$23>>2]|0; - $54 = (_strcmp($53,6130)|0); - $55 = ($54|0)==(0); - if ($55) { - HEAP32[4872] = 1; - } - $56 = (($$06167) + 1)|0; - $exitcond70 = ($56|0)==($19|0); - if ($exitcond70) { - break; - } else { - $$06167 = $56; - } - } - } - $21 = HEAP32[4866]|0; - $22 = ($21|0)==(0); - if ($22) { - _TraceLog(2,6233,$vararg_buffer15); - } else { - _TraceLog(0,6158,$vararg_buffer13); - } - $57 = HEAP32[4808]|0; - $58 = ($57|0)==(0); - if ($58) { - _TraceLog(2,6369,$vararg_buffer19); - } else { - _TraceLog(0,6294,$vararg_buffer17); - } - $59 = HEAP32[4803]|0; - $60 = ($59|0)==(0); - if (!($60)) { - _TraceLog(0,6461,$vararg_buffer21); - } - $61 = HEAP32[4804]|0; - $62 = ($61|0)==(0); - if (!($62)) { - _TraceLog(0,6507,$vararg_buffer23); - } - $63 = HEAP32[4805]|0; - $64 = ($63|0)==(0); - if (!($64)) { - _TraceLog(0,6554,$vararg_buffer25); - } - $65 = HEAP32[4806]|0; - $66 = ($65|0)==(0); - if (!($66)) { - _TraceLog(0,6605,$vararg_buffer27); - } - $67 = HEAP32[4807]|0; - $68 = ($67|0)==(0); - if (!($68)) { - _TraceLog(0,6652,$vararg_buffer29); - } - $69 = HEAP32[4870]|0; - $70 = ($69|0)==(0); - if (!($70)) { - $71 = +HEAPF32[4871]; - $72 = $71; - HEAPF64[$vararg_buffer31>>3] = $72; - _TraceLog(0,6699,$vararg_buffer31); - } - $73 = HEAP32[4872]|0; - $74 = ($73|0)==(0); - if (!($74)) { - _TraceLog(0,6765,$vararg_buffer34); - } - HEAP32[$vararg_buffer10>>2] = -1; - $75 = (_rlglLoadTexture($vararg_buffer10,1,1,7,1)|0); - HEAP32[4873] = $75; - $76 = ($75|0)==(0); - if ($76) { - _TraceLog(2,6869,$vararg_buffer39); - } else { - HEAP32[$vararg_buffer36>>2] = $75; - _TraceLog(0,6818,$vararg_buffer36); - } - _LoadDefaultShader($2); - dest=19496; src=$2; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=19552; src=$2; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _LoadDefaultBuffers(); - $77 = (_malloc(49152)|0); - HEAP32[4902] = $77; - $$06066 = 0; - while(1) { - $79 = HEAP32[4902]|0; - $80 = (($79) + (($$06066*12)|0)|0); - _VectorZero($3); - ;HEAP32[$80>>2]=HEAP32[$3>>2]|0;HEAP32[$80+4>>2]=HEAP32[$3+4>>2]|0;HEAP32[$80+8>>2]=HEAP32[$3+8>>2]|0; - $81 = (($$06066) + 1)|0; - $exitcond69 = ($81|0)==(4096); - if ($exitcond69) { - break; - } else { - $$06066 = $81; - } - } - $78 = (_malloc(36864)|0); - HEAP32[4903] = $78; - $$05965 = 0; - while(1) { - $82 = (((($78) + (($$05965*144)|0)|0)) + 8|0); - HEAP32[$82>>2] = 0; - $83 = (($78) + (($$05965*144)|0)|0); - HEAP32[$83>>2] = 0; - $84 = (($$05965) + 1)|0; - $exitcond = ($84|0)==(256); - if ($exitcond) { - break; - } else { - $$05965 = $84; - } - } - HEAP32[4904] = 1; - $85 = HEAP32[4873]|0; - $86 = ((($78)) + 8|0); - HEAP32[$86>>2] = $85; - HEAP32[4905] = 4; - _MatrixIdentity($4); - dest=19624; src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($4); - dest=(19688); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($4); - dest=(19752); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($4); - dest=(19816); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($4); - dest=(19880); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($4); - dest=(19944); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($4); - dest=(20008); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($4); - dest=(20072); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($4); - dest=(20136); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($4); - dest=(20200); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($4); - dest=(20264); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($4); - dest=(20328); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($4); - dest=(20392); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($4); - dest=(20456); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($4); - dest=(20520); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($4); - dest=(20584); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($5); - dest=19332; src=$5; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixIdentity($6); - dest=19396; src=$6; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - HEAP32[4832] = 19396; - _glDepthFunc(515); - _glDisable(2929); - _glBlendFunc(770,771); - _glEnable(3042); - _glCullFace(1029); - _glFrontFace(2305); - _glEnable(2884); - _glClearColor(0.0,0.0,0.0,1.0); - _glClearDepthf(1.0); - _glClear(16640); - HEAP32[5162] = $0; - HEAP32[5163] = $1; - _TraceLog(0,6908,$vararg_buffer41); - STACKTOP = sp;return; -} -function _SetupViewport() { - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[4830]|0; - $1 = (($0|0) / 2)&-1; - $2 = HEAP32[4831]|0; - $3 = (($2|0) / 2)&-1; - $4 = HEAP32[4828]|0; - $5 = (($4) - ($0))|0; - $6 = HEAP32[4829]|0; - $7 = (($6) - ($2))|0; - _rlViewport($1,$3,$5,$7); - return; -} -function _rlMatrixMode($0) { - $0 = $0|0; - var $modelview$sink = 0, label = 0, sp = 0; - sp = STACKTOP; - switch ($0|0) { - case 5889: { - $modelview$sink = 19332; - label = 3; - break; - } - case 5888: { - $modelview$sink = 19396; - label = 3; - break; - } - default: { - } - } - if ((label|0) == 3) { - HEAP32[4832] = $modelview$sink; - } - HEAP32[4865] = $0; - return; -} -function _rlLoadIdentity() { - var $0 = 0, $1 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); - $0 = sp; - $1 = HEAP32[4832]|0; - _MatrixIdentity($0); - dest=$1; src=$0; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; -} -function _rlOrtho($0,$1,$2,$3,$4,$5) { - $0 = +$0; - $1 = +$1; - $2 = +$2; - $3 = +$3; - $4 = +$4; - $5 = +$5; - var $$byval_copy = 0, $$byval_copy1 = 0, $6 = 0, $7 = 0, $8 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 256|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(256|0); - $$byval_copy1 = sp + 192|0; - $$byval_copy = sp + 128|0; - $6 = sp + 64|0; - $7 = sp; - _MatrixOrtho($6,$0,$1,$2,$3,$4,$5); - _MatrixTranspose($6); - $8 = HEAP32[4832]|0; - dest=$$byval_copy; src=$8; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$$byval_copy1; src=$6; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixMultiply($7,$$byval_copy,$$byval_copy1); - dest=$8; src=$7; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; -} -function _ClearBackground($0) { - $0 = $0|0; - var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = HEAP8[$0>>0]|0; - $2 = ((($0)) + 1|0); - $3 = HEAP8[$2>>0]|0; - $4 = ((($0)) + 2|0); - $5 = HEAP8[$4>>0]|0; - $6 = ((($0)) + 3|0); - $7 = HEAP8[$6>>0]|0; - _rlClearColor($1,$3,$5,$7); - return; -} -function _rlClearColor($0,$1,$2,$3) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - $3 = $3|0; - var $10 = 0.0, $11 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $4 = (+($0&255)); - $5 = $4 / 255.0; - $6 = (+($1&255)); - $7 = $6 / 255.0; - $8 = (+($2&255)); - $9 = $8 / 255.0; - $10 = (+($3&255)); - $11 = $10 / 255.0; - _glClearColor((+$5),(+$7),(+$9),(+$11)); - return; -} -function _rlViewport($0,$1,$2,$3) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - $3 = $3|0; - var label = 0, sp = 0; - sp = STACKTOP; - _glViewport(($0|0),($1|0),($2|0),($3|0)); - return; -} -function _LoadDefaultShader($0) { - $0 = $0|0; - var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 1008|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(1008|0); - $vararg_buffer1 = sp + 8|0; - $vararg_buffer = sp; - $1 = sp + 16|0; - $2 = sp + 513|0; - $3 = sp + 72|0; - _memcpy(($2|0),(7484|0),489)|0; - _memcpy(($3|0),(7973|0),441)|0; - $4 = (_LoadShaderProgram($2,$3)|0); - HEAP32[$1>>2] = $4; - $5 = ($4|0)==(0); - if ($5) { - HEAP32[$vararg_buffer1>>2] = $4; - _TraceLog(2,8462,$vararg_buffer1); - } else { - HEAP32[$vararg_buffer>>2] = $4; - _TraceLog(0,8414,$vararg_buffer); - } - $6 = HEAP32[$1>>2]|0; - $7 = ($6|0)==(0); - if (!($7)) { - _LoadDefaultShaderLocations($1); - } - dest=$0; src=$1; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; -} -function _LoadDefaultBuffers() { - var $$05365 = 0, $$05467 = 0, $$05770 = 0, $$05972 = 0, $$066 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0; - var $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0; - var $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0; - var $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0; - var $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0; - var $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $exitcond = 0, $exitcond75 = 0, $exitcond78 = 0, $exitcond80 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer10 = 0, $vararg_buffer14 = 0, $vararg_buffer17 = 0; - var $vararg_buffer3 = 0, $vararg_buffer7 = 0, $vararg_ptr13 = 0, $vararg_ptr20 = 0, $vararg_ptr21 = 0, $vararg_ptr22 = 0, $vararg_ptr6 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); - $vararg_buffer17 = sp + 48|0; - $vararg_buffer14 = sp + 40|0; - $vararg_buffer10 = sp + 32|0; - $vararg_buffer7 = sp + 24|0; - $vararg_buffer3 = sp + 16|0; - $vararg_buffer1 = sp + 8|0; - $vararg_buffer = sp; - $0 = (_malloc(24576)|0); - HEAP32[(20668)>>2] = $0; - $1 = (_malloc(8192)|0); - HEAP32[(20676)>>2] = $1; - HEAP32[(20672)>>2] = 0; - HEAP32[(20680)>>2] = 0; - _memset(($0|0),0,24576)|0; - $$05972 = 0; - while(1) { - $2 = HEAP32[(20676)>>2]|0; - $3 = (($2) + ($$05972)|0); - HEAP8[$3>>0] = 0; - $4 = (($$05972) + 1)|0; - $exitcond80 = ($4|0)==(8192); - if ($exitcond80) { - break; - } else { - $$05972 = $4; - } - } - HEAP32[5164] = 0; - HEAP32[(20664)>>2] = 0; - HEAP32[(20660)>>2] = 0; - $5 = (_malloc(73728)|0); - HEAP32[(20716)>>2] = $5; - $6 = (_malloc(24576)|0); - HEAP32[(20724)>>2] = $6; - HEAP32[(20720)>>2] = 0; - HEAP32[(20728)>>2] = 0; - _memset(($5|0),0,73728)|0; - $$05770 = 0; - while(1) { - $7 = HEAP32[(20724)>>2]|0; - $8 = (($7) + ($$05770)|0); - HEAP8[$8>>0] = 0; - $9 = (($$05770) + 1)|0; - $exitcond78 = ($9|0)==(24576); - if ($exitcond78) { - break; - } else { - $$05770 = $9; - } - } - HEAP32[5176] = 0; - HEAP32[(20712)>>2] = 0; - HEAP32[(20708)>>2] = 0; - $10 = (_malloc(49152)|0); - HEAP32[(20764)>>2] = $10; - $11 = (_malloc(32768)|0); - HEAP32[(20768)>>2] = $11; - $12 = (_malloc(16384)|0); - HEAP32[(20772)>>2] = $12; - $13 = (_malloc(12288)|0); - HEAP32[(20776)>>2] = $13; - $14 = HEAP32[(20764)>>2]|0; - _memset(($14|0),0,49152)|0; - $15 = HEAP32[(20768)>>2]|0; - _memset(($15|0),0,32768)|0; - $$05467 = 0; - while(1) { - $17 = HEAP32[(20772)>>2]|0; - $18 = (($17) + ($$05467)|0); - HEAP8[$18>>0] = 0; - $19 = (($$05467) + 1)|0; - $exitcond75 = ($19|0)==(16384); - if ($exitcond75) { - break; - } else { - $$05467 = $19; - } - } - $16 = HEAP32[(20776)>>2]|0; - $$05365 = 0;$$066 = 0; - while(1) { - $22 = $$05365 << 2; - $23 = $22&65535; - $24 = (($16) + ($$066<<1)|0); - HEAP16[$24>>1] = $23; - $25 = $22 | 1; - $26 = $25&65535; - $27 = $$066 | 1; - $28 = (($16) + ($27<<1)|0); - HEAP16[$28>>1] = $26; - $29 = $22 | 2; - $30 = $29&65535; - $31 = (($$066) + 2)|0; - $32 = (($16) + ($31<<1)|0); - HEAP16[$32>>1] = $30; - $33 = (($$066) + 3)|0; - $34 = (($16) + ($33<<1)|0); - HEAP16[$34>>1] = $23; - $35 = (($$066) + 4)|0; - $36 = (($16) + ($35<<1)|0); - HEAP16[$36>>1] = $30; - $37 = $22 | 3; - $38 = $37&65535; - $39 = (($$066) + 5)|0; - $40 = (($16) + ($39<<1)|0); - HEAP16[$40>>1] = $38; - $41 = (($$05365) + 1)|0; - $42 = (($$066) + 6)|0; - $exitcond = ($41|0)==(1024); - if ($exitcond) { - break; - } else { - $$05365 = $41;$$066 = $42; - } - } - HEAP32[5188] = 0; - HEAP32[(20756)>>2] = 0; - HEAP32[(20760)>>2] = 0; - _TraceLog(0,6955,$vararg_buffer); - $20 = HEAP32[4866]|0; - $21 = ($20|0)==(0); - if (!($21)) { - $43 = HEAP32[4867]|0; - FUNCTION_TABLE_vii[$43 & 63](1,(20684)); - $44 = HEAP32[4868]|0; - $45 = HEAP32[(20684)>>2]|0; - FUNCTION_TABLE_vi[$44 & 31]($45); - } - _glGenBuffers(2,((20688)|0)); - $46 = HEAP32[(20688)>>2]|0; - _glBindBuffer(34962,($46|0)); - $47 = HEAP32[(20668)>>2]|0; - _glBufferData(34962,24576,($47|0),35048); - $48 = HEAP32[(19556)>>2]|0; - _glEnableVertexAttribArray(($48|0)); - $49 = HEAP32[(19556)>>2]|0; - _glVertexAttribPointer(($49|0),3,5126,0,0,(0|0)); - _glGenBuffers(2,((20692)|0)); - $50 = HEAP32[(20692)>>2]|0; - _glBindBuffer(34962,($50|0)); - $51 = HEAP32[(20676)>>2]|0; - _glBufferData(34962,8192,($51|0),35048); - $52 = HEAP32[(19576)>>2]|0; - _glEnableVertexAttribArray(($52|0)); - $53 = HEAP32[(19576)>>2]|0; - _glVertexAttribPointer(($53|0),4,5121,1,0,(0|0)); - $54 = HEAP32[4866]|0; - $55 = ($54|0)==(0); - if ($55) { - $57 = HEAP32[(20688)>>2]|0; - $58 = HEAP32[(20692)>>2]|0; - HEAP32[$vararg_buffer3>>2] = $57; - $vararg_ptr6 = ((($vararg_buffer3)) + 4|0); - HEAP32[$vararg_ptr6>>2] = $58; - _TraceLog(0,7093,$vararg_buffer3); - } else { - $56 = HEAP32[(20684)>>2]|0; - HEAP32[$vararg_buffer1>>2] = $56; - _TraceLog(0,7028,$vararg_buffer1); - } - $59 = HEAP32[4866]|0; - $60 = ($59|0)==(0); - if (!($60)) { - $61 = HEAP32[4867]|0; - FUNCTION_TABLE_vii[$61 & 63](1,(20732)); - $62 = HEAP32[4868]|0; - $63 = HEAP32[(20732)>>2]|0; - FUNCTION_TABLE_vi[$62 & 31]($63); - } - _glGenBuffers(1,((20736)|0)); - $64 = HEAP32[(20736)>>2]|0; - _glBindBuffer(34962,($64|0)); - $65 = HEAP32[(20716)>>2]|0; - _glBufferData(34962,73728,($65|0),35048); - $66 = HEAP32[(19556)>>2]|0; - _glEnableVertexAttribArray(($66|0)); - $67 = HEAP32[(19556)>>2]|0; - _glVertexAttribPointer(($67|0),3,5126,0,0,(0|0)); - _glGenBuffers(1,((20740)|0)); - $68 = HEAP32[(20740)>>2]|0; - _glBindBuffer(34962,($68|0)); - $69 = HEAP32[(20724)>>2]|0; - _glBufferData(34962,24576,($69|0),35048); - $70 = HEAP32[(19576)>>2]|0; - _glEnableVertexAttribArray(($70|0)); - $71 = HEAP32[(19576)>>2]|0; - _glVertexAttribPointer(($71|0),4,5121,1,0,(0|0)); - $72 = HEAP32[4866]|0; - $73 = ($72|0)==(0); - if ($73) { - $75 = HEAP32[(20736)>>2]|0; - $76 = HEAP32[(20740)>>2]|0; - HEAP32[$vararg_buffer10>>2] = $75; - $vararg_ptr13 = ((($vararg_buffer10)) + 4|0); - HEAP32[$vararg_ptr13>>2] = $76; - _TraceLog(0,7239,$vararg_buffer10); - } else { - $74 = HEAP32[(20732)>>2]|0; - HEAP32[$vararg_buffer7>>2] = $74; - _TraceLog(0,7170,$vararg_buffer7); - } - $77 = HEAP32[4866]|0; - $78 = ($77|0)==(0); - if (!($78)) { - $79 = HEAP32[4867]|0; - FUNCTION_TABLE_vii[$79 & 63](1,(20780)); - $80 = HEAP32[4868]|0; - $81 = HEAP32[(20780)>>2]|0; - FUNCTION_TABLE_vi[$80 & 31]($81); - } - _glGenBuffers(1,((20784)|0)); - $82 = HEAP32[(20784)>>2]|0; - _glBindBuffer(34962,($82|0)); - $83 = HEAP32[(20764)>>2]|0; - _glBufferData(34962,49152,($83|0),35048); - $84 = HEAP32[(19556)>>2]|0; - _glEnableVertexAttribArray(($84|0)); - $85 = HEAP32[(19556)>>2]|0; - _glVertexAttribPointer(($85|0),3,5126,0,0,(0|0)); - _glGenBuffers(1,((20788)|0)); - $86 = HEAP32[(20788)>>2]|0; - _glBindBuffer(34962,($86|0)); - $87 = HEAP32[(20768)>>2]|0; - _glBufferData(34962,32768,($87|0),35048); - $88 = HEAP32[(19560)>>2]|0; - _glEnableVertexAttribArray(($88|0)); - $89 = HEAP32[(19560)>>2]|0; - _glVertexAttribPointer(($89|0),2,5126,0,0,(0|0)); - _glGenBuffers(1,((20792)|0)); - $90 = HEAP32[(20792)>>2]|0; - _glBindBuffer(34962,($90|0)); - $91 = HEAP32[(20772)>>2]|0; - _glBufferData(34962,16384,($91|0),35048); - $92 = HEAP32[(19576)>>2]|0; - _glEnableVertexAttribArray(($92|0)); - $93 = HEAP32[(19576)>>2]|0; - _glVertexAttribPointer(($93|0),4,5121,1,0,(0|0)); - _glGenBuffers(1,((20796)|0)); - $94 = HEAP32[(20796)>>2]|0; - _glBindBuffer(34963,($94|0)); - $95 = HEAP32[(20776)>>2]|0; - _glBufferData(34963,12288,($95|0),35044); - $96 = HEAP32[4866]|0; - $97 = ($96|0)==(0); - if ($97) { - $99 = HEAP32[(20784)>>2]|0; - $100 = HEAP32[(20788)>>2]|0; - $101 = HEAP32[(20792)>>2]|0; - $102 = HEAP32[(20796)>>2]|0; - HEAP32[$vararg_buffer17>>2] = $99; - $vararg_ptr20 = ((($vararg_buffer17)) + 4|0); - HEAP32[$vararg_ptr20>>2] = $100; - $vararg_ptr21 = ((($vararg_buffer17)) + 8|0); - HEAP32[$vararg_ptr21>>2] = $101; - $vararg_ptr22 = ((($vararg_buffer17)) + 12|0); - HEAP32[$vararg_ptr22>>2] = $102; - _TraceLog(0,7385,$vararg_buffer17); - } else { - $98 = HEAP32[(20780)>>2]|0; - HEAP32[$vararg_buffer14>>2] = $98; - _TraceLog(0,7320,$vararg_buffer14); - } - $103 = HEAP32[4866]|0; - $104 = ($103|0)==(0); - if ($104) { - STACKTOP = sp;return; - } - $105 = HEAP32[4868]|0; - FUNCTION_TABLE_vi[$105 & 31](0); - STACKTOP = sp;return; -} -function _LoadShaderProgram($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $$0 = 0, $$alloca_mul = 0, $$alloca_mul34 = 0, $$alloca_mul36 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; - var $25 = 0, $26 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer10 = 0, $vararg_buffer13 = 0, $vararg_buffer16 = 0, $vararg_buffer19 = 0, $vararg_buffer22 = 0, $vararg_buffer4 = 0, $vararg_buffer7 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(96|0); + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $dwarf$byval_copy = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer10 = 0, $vararg_buffer13 = 0, $vararg_buffer16 = 0, $vararg_buffer19 = 0, $vararg_buffer22 = 0, $vararg_buffer25 = 0; + var $vararg_buffer28 = 0, $vararg_buffer4 = 0, $vararg_buffer7 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 1360|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(1360|0); + $dwarf$byval_copy = sp + 88|0; + $vararg_buffer28 = sp + 80|0; + $vararg_buffer25 = sp + 72|0; $vararg_buffer22 = sp + 64|0; $vararg_buffer19 = sp + 56|0; $vararg_buffer16 = sp + 48|0; @@ -16036,8715 +10593,279 @@ function _LoadShaderProgram($0,$1) { $vararg_buffer4 = sp + 16|0; $vararg_buffer1 = sp + 8|0; $vararg_buffer = sp; - $2 = sp + 80|0; - $3 = sp + 76|0; - $4 = sp + 72|0; - $5 = sp + 68|0; - $6 = (_glCreateShader(35633)|0); - $7 = (_glCreateShader(35632)|0); - HEAP32[$2>>2] = $0; - HEAP32[$3>>2] = $1; - _glShaderSource(($6|0),1,($2|0),(0|0)); - _glShaderSource(($7|0),1,($3|0),(0|0)); - HEAP32[$4>>2] = 0; - _glCompileShader(($6|0)); - _glGetShaderiv(($6|0),35713,($4|0)); - $8 = HEAP32[$4>>2]|0; - $9 = ($8|0)==(1); - if ($9) { - HEAP32[$vararg_buffer4>>2] = $6; - _TraceLog(0,8718,$vararg_buffer4); - } else { - HEAP32[$vararg_buffer>>2] = $6; - _TraceLog(2,8666,$vararg_buffer); - HEAP32[$vararg_buffer>>2] = 0; - _glGetShaderiv(($6|0),35716,($vararg_buffer|0)); - $10 = HEAP32[$vararg_buffer>>2]|0; - $11 = (_llvm_stacksave()|0); - $$alloca_mul = $10; - $12 = STACKTOP; STACKTOP = STACKTOP + ((((1*$$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$$alloca_mul)|0)+15)&-16)|0);; - $13 = HEAP32[$vararg_buffer>>2]|0; - _glGetShaderInfoLog(($6|0),($13|0),($5|0),($12|0)); - HEAP32[$vararg_buffer1>>2] = $12; - _TraceLog(0,8715,$vararg_buffer1); - _llvm_stackrestore(($11|0)); - } - _glCompileShader(($7|0)); - _glGetShaderiv(($7|0),35713,($4|0)); - $14 = HEAP32[$4>>2]|0; - $15 = ($14|0)==(1); - if ($15) { - HEAP32[$vararg_buffer13>>2] = $7; - _TraceLog(0,8819,$vararg_buffer13); - } else { - HEAP32[$vararg_buffer7>>2] = $7; - _TraceLog(2,8768,$vararg_buffer7); - HEAP32[$vararg_buffer7>>2] = 0; - _glGetShaderiv(($7|0),35716,($vararg_buffer7|0)); - $16 = HEAP32[$vararg_buffer7>>2]|0; - $17 = (_llvm_stacksave()|0); - $$alloca_mul34 = $16; - $18 = STACKTOP; STACKTOP = STACKTOP + ((((1*$$alloca_mul34)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$$alloca_mul34)|0)+15)&-16)|0);; - $19 = HEAP32[$vararg_buffer7>>2]|0; - _glGetShaderInfoLog(($7|0),($19|0),($5|0),($18|0)); - HEAP32[$vararg_buffer10>>2] = $18; - _TraceLog(0,8715,$vararg_buffer10); - _llvm_stackrestore(($17|0)); - } - $20 = (_glCreateProgram()|0); - _glAttachShader(($20|0),($6|0)); - _glAttachShader(($20|0),($7|0)); - _glBindAttribLocation(($20|0),0,(8510|0)); - _glBindAttribLocation(($20|0),1,(8525|0)); - _glBindAttribLocation(($20|0),2,(8556|0)); - _glBindAttribLocation(($20|0),3,(8583|0)); - _glBindAttribLocation(($20|0),4,(8569|0)); - _glBindAttribLocation(($20|0),5,(8540|0)); - _glLinkProgram(($20|0)); - _glGetProgramiv(($20|0),35714,($4|0)); - $21 = HEAP32[$4>>2]|0; - $22 = ($21|0)==(0); - if ($22) { - HEAP32[$vararg_buffer16>>2] = $20; - _TraceLog(2,8871,$vararg_buffer16); - HEAP32[$vararg_buffer16>>2] = 0; - _glGetProgramiv(($20|0),35716,($vararg_buffer16|0)); - $23 = HEAP32[$vararg_buffer16>>2]|0; - $24 = (_llvm_stacksave()|0); - $$alloca_mul36 = $23; - $25 = STACKTOP; STACKTOP = STACKTOP + ((((1*$$alloca_mul36)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$$alloca_mul36)|0)+15)&-16)|0);; - $26 = HEAP32[$vararg_buffer16>>2]|0; - _glGetProgramInfoLog(($20|0),($26|0),($5|0),($25|0)); - HEAP32[$vararg_buffer19>>2] = $25; - _TraceLog(0,8715,$vararg_buffer19); - _glDeleteProgram(($20|0)); - _llvm_stackrestore(($24|0)); - $$0 = 0; - _glDeleteShader(($6|0)); - _glDeleteShader(($7|0)); - STACKTOP = sp;return ($$0|0); - } else { - HEAP32[$vararg_buffer22>>2] = $20; - _TraceLog(0,8917,$vararg_buffer22); - $$0 = $20; - _glDeleteShader(($6|0)); - _glDeleteShader(($7|0)); - STACKTOP = sp;return ($$0|0); - } - return (0)|0; + $0 = sp + 1096|0; + $1 = sp + 1072|0; + $2 = sp + 1016|0; + $3 = sp + 960|0; + $4 = sp + 904|0; + $5 = sp + 848|0; + $6 = sp + 792|0; + $7 = sp + 736|0; + $8 = sp + 680|0; + $9 = sp + 624|0; + $10 = sp + 568|0; + $11 = sp + 512|0; + $12 = sp + 456|0; + $13 = sp + 400|0; + $14 = sp + 352|0; + _SetConfigFlags(32); + $15 = HEAP32[2]|0; + $16 = HEAP32[3]|0; + _InitWindow($15,$16,4512); + _LoadModel($0,4561); + _memcpy((19608|0),($0|0),264)|0; + _LoadTexture($1,4587); + ;HEAP32[19872>>2]=HEAP32[$1>>2]|0;HEAP32[19872+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[19872+8>>2]=HEAP32[$1+8>>2]|0;HEAP32[19872+12>>2]=HEAP32[$1+12>>2]|0;HEAP32[19872+16>>2]=HEAP32[$1+16>>2]|0; + ;HEAP32[(19796)>>2]=HEAP32[$1>>2]|0;HEAP32[(19796)+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[(19796)+8>>2]=HEAP32[$1+8>>2]|0;HEAP32[(19796)+12>>2]=HEAP32[$1+12>>2]|0;HEAP32[(19796)+16>>2]=HEAP32[$1+16>>2]|0; + HEAP32[$vararg_buffer>>2] = 100; + $17 = (_FormatText(4655,$vararg_buffer)|0); + _LoadShader($2,4621,$17); + dest=19892; src=$2; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + HEAP32[$vararg_buffer1>>2] = 100; + $18 = (_FormatText(4693,$vararg_buffer1)|0); + _LoadShader($3,4621,$18); + dest=(19948); src=$3; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + HEAP32[$vararg_buffer4>>2] = 100; + $19 = (_FormatText(4735,$vararg_buffer4)|0); + _LoadShader($4,4621,$19); + dest=(20004); src=$4; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + HEAP32[$vararg_buffer7>>2] = 100; + $20 = (_FormatText(4776,$vararg_buffer7)|0); + _LoadShader($5,4621,$20); + dest=(20060); src=$5; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + HEAP32[$vararg_buffer10>>2] = 100; + $21 = (_FormatText(4814,$vararg_buffer10)|0); + _LoadShader($6,4621,$21); + dest=(20116); src=$6; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + HEAP32[$vararg_buffer13>>2] = 100; + $22 = (_FormatText(4857,$vararg_buffer13)|0); + _LoadShader($7,4621,$22); + dest=(20172); src=$7; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + HEAP32[$vararg_buffer16>>2] = 100; + $23 = (_FormatText(4901,$vararg_buffer16)|0); + _LoadShader($8,4621,$23); + dest=(20228); src=$8; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + HEAP32[$vararg_buffer19>>2] = 100; + $24 = (_FormatText(4938,$vararg_buffer19)|0); + _LoadShader($9,4621,$24); + dest=(20284); src=$9; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + HEAP32[$vararg_buffer22>>2] = 100; + $25 = (_FormatText(4976,$vararg_buffer22)|0); + _LoadShader($10,4621,$25); + dest=(20340); src=$10; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + HEAP32[$vararg_buffer25>>2] = 100; + $26 = (_FormatText(5012,$vararg_buffer25)|0); + _LoadShader($11,4621,$26); + dest=(20396); src=$11; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + HEAP32[$vararg_buffer28>>2] = 100; + $27 = (_FormatText(5046,$vararg_buffer28)|0); + _LoadShader($12,4621,$27); + dest=(20452); src=$12; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + HEAP32[$dwarf$byval_copy>>2] = 100; + $28 = (_FormatText(5080,$dwarf$byval_copy)|0); + _LoadShader($13,4621,$28); + dest=(20508); src=$13; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $29 = HEAP32[2]|0; + $30 = HEAP32[3]|0; + _LoadRenderTexture($14,$29,$30); + dest=20564; src=$14; stop=dest+44|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$dwarf$byval_copy; src=16; stop=dest+40|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _SetCameraMode($dwarf$byval_copy,2); + _emscripten_set_main_loop((1|0),0,1); + dest=$dwarf$byval_copy; src=19892; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _UnloadShader($dwarf$byval_copy); + dest=$dwarf$byval_copy; src=(19948); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _UnloadShader($dwarf$byval_copy); + dest=$dwarf$byval_copy; src=(20004); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _UnloadShader($dwarf$byval_copy); + dest=$dwarf$byval_copy; src=(20060); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _UnloadShader($dwarf$byval_copy); + dest=$dwarf$byval_copy; src=(20116); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _UnloadShader($dwarf$byval_copy); + dest=$dwarf$byval_copy; src=(20172); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _UnloadShader($dwarf$byval_copy); + dest=$dwarf$byval_copy; src=(20228); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _UnloadShader($dwarf$byval_copy); + dest=$dwarf$byval_copy; src=(20284); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _UnloadShader($dwarf$byval_copy); + dest=$dwarf$byval_copy; src=(20340); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _UnloadShader($dwarf$byval_copy); + dest=$dwarf$byval_copy; src=(20396); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _UnloadShader($dwarf$byval_copy); + dest=$dwarf$byval_copy; src=(20452); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _UnloadShader($dwarf$byval_copy); + dest=$dwarf$byval_copy; src=(20508); stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _UnloadShader($dwarf$byval_copy); + ;HEAP32[$dwarf$byval_copy>>2]=HEAP32[19872>>2]|0;HEAP32[$dwarf$byval_copy+4>>2]=HEAP32[19872+4>>2]|0;HEAP32[$dwarf$byval_copy+8>>2]=HEAP32[19872+8>>2]|0;HEAP32[$dwarf$byval_copy+12>>2]=HEAP32[19872+12>>2]|0;HEAP32[$dwarf$byval_copy+16>>2]=HEAP32[19872+16>>2]|0; + _UnloadTexture($dwarf$byval_copy); + _memcpy(($dwarf$byval_copy|0),(19608|0),264)|0; + _UnloadModel($dwarf$byval_copy); + _CloseWindow(); + STACKTOP = sp;return 0; } -function _LoadDefaultShaderLocations($0) { - $0 = $0|0; - var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; - var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; - var sp = 0; +function _UpdateDrawFrame() { + var $$byval_copy10 = 0, $$byval_copy2 = 0, $$byval_copy3 = 0, $$byval_copy4 = 0, $$pr = 0, $$sink = 0, $$sink2 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0; + var $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0; + var $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $6 = 0, $7 = 0, $8 = 0; + var $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; - $1 = HEAP32[$0>>2]|0; - $2 = (_glGetAttribLocation(($1|0),(8510|0))|0); - $3 = ((($0)) + 4|0); - HEAP32[$3>>2] = $2; - $4 = HEAP32[$0>>2]|0; - $5 = (_glGetAttribLocation(($4|0),(8525|0))|0); - $6 = ((($0)) + 8|0); - HEAP32[$6>>2] = $5; - $7 = HEAP32[$0>>2]|0; - $8 = (_glGetAttribLocation(($7|0),(8540|0))|0); - $9 = ((($0)) + 12|0); - HEAP32[$9>>2] = $8; - $10 = HEAP32[$0>>2]|0; - $11 = (_glGetAttribLocation(($10|0),(8556|0))|0); - $12 = ((($0)) + 16|0); - HEAP32[$12>>2] = $11; - $13 = HEAP32[$0>>2]|0; - $14 = (_glGetAttribLocation(($13|0),(8569|0))|0); - $15 = ((($0)) + 20|0); - HEAP32[$15>>2] = $14; - $16 = HEAP32[$0>>2]|0; - $17 = (_glGetAttribLocation(($16|0),(8583|0))|0); - $18 = ((($0)) + 24|0); - HEAP32[$18>>2] = $17; - $19 = HEAP32[$0>>2]|0; - $20 = (_glGetUniformLocation(($19|0),(8595|0))|0); - $21 = ((($0)) + 28|0); - HEAP32[$21>>2] = $20; - $22 = HEAP32[$0>>2]|0; - $23 = (_glGetUniformLocation(($22|0),(8605|0))|0); - $24 = ((($0)) + 32|0); - HEAP32[$24>>2] = $23; - $25 = HEAP32[$0>>2]|0; - $26 = (_glGetUniformLocation(($25|0),(8616|0))|0); - $27 = ((($0)) + 36|0); - HEAP32[$27>>2] = $26; - $28 = HEAP32[$0>>2]|0; - $29 = (_glGetUniformLocation(($28|0),(8627|0))|0); - $30 = ((($0)) + 40|0); - HEAP32[$30>>2] = $29; - $31 = HEAP32[$0>>2]|0; - $32 = (_glGetUniformLocation(($31|0),(8639|0))|0); - $33 = ((($0)) + 44|0); - HEAP32[$33>>2] = $32; - $34 = HEAP32[$0>>2]|0; - $35 = (_glGetUniformLocation(($34|0),(8648|0))|0); - $36 = ((($0)) + 48|0); - HEAP32[$36>>2] = $35; - $37 = HEAP32[$0>>2]|0; - $38 = (_glGetUniformLocation(($37|0),(8657|0))|0); - $39 = ((($0)) + 52|0); - HEAP32[$39>>2] = $38; - return; -} -function _IsMouseButtonPressed($0) { - $0 = $0|0; - var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $or$cond = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = (21981 + ($0)|0); - $2 = HEAP8[$1>>0]|0; - $3 = (21984 + ($0)|0); - $4 = HEAP8[$3>>0]|0; - $5 = ($2<<24>>24)!=($4<<24>>24); - $6 = ($2<<24>>24)==(1); - $or$cond = $6 & $5; - $$0 = $or$cond&1; - return ($$0|0); -} -function _IsMouseButtonReleased($0) { - $0 = $0|0; - var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $or$cond = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = (21981 + ($0)|0); - $2 = HEAP8[$1>>0]|0; - $3 = (21984 + ($0)|0); - $4 = HEAP8[$3>>0]|0; - $5 = ($2<<24>>24)!=($4<<24>>24); - $6 = ($2<<24>>24)==(0); - $or$cond = $6 & $5; - $$0 = $or$cond&1; - return ($$0|0); -} -function _rlClearScreenBuffers() { - var label = 0, sp = 0; - sp = STACKTOP; - _glClear(16640); - return; -} -function _CloseWindow() { - var $0 = 0, $vararg_buffer = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $vararg_buffer = sp; - _UnloadDefaultFont(); - _rlglClose(); - $0 = HEAP32[4785]|0; - _glfwDestroyWindow(($0|0)); - _glfwTerminate(); - _TraceLog(0,9229,$vararg_buffer); - STACKTOP = sp;return; -} -function _UnloadDefaultFont() { - var $$byval_copy = 0, $0 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); - $$byval_copy = sp; - ;HEAP32[$$byval_copy>>2]=HEAP32[19180>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[19180+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[19180+8>>2]|0;HEAP32[$$byval_copy+12>>2]=HEAP32[19180+12>>2]|0;HEAP32[$$byval_copy+16>>2]=HEAP32[19180+16>>2]|0; - _UnloadTexture($$byval_copy); - $0 = HEAP32[(19208)>>2]|0; - _free($0); - STACKTOP = sp;return; -} -function _rlglClose() { - var $0 = 0, $1 = 0, $vararg_buffer = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $vararg_buffer = sp; - _UnloadDefaultShader(); - _UnloadDefaultBuffers(); - _glDeleteTextures(1,(19492|0)); - $0 = HEAP32[4873]|0; - HEAP32[$vararg_buffer>>2] = $0; - _TraceLog(0,9256,$vararg_buffer); - $1 = HEAP32[4903]|0; - _free($1); - STACKTOP = sp;return; -} -function _UnloadDefaultShader() { - var $0 = 0, label = 0, sp = 0; - sp = STACKTOP; - _glUseProgram(0); - $0 = HEAP32[4874]|0; - _glDeleteProgram(($0|0)); - return; -} -function _UnloadDefaultBuffers() { - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[4866]|0; - $1 = ($0|0)==(0); - if (!($1)) { - $2 = HEAP32[4868]|0; - FUNCTION_TABLE_vi[$2 & 31](0); - } - _glDisableVertexAttribArray(0); - _glDisableVertexAttribArray(1); - _glDisableVertexAttribArray(2); - _glDisableVertexAttribArray(3); - _glBindBuffer(34962,0); - _glBindBuffer(34963,0); - _glDeleteBuffers(1,((20688)|0)); - _glDeleteBuffers(1,((20692)|0)); - _glDeleteBuffers(1,((20736)|0)); - _glDeleteBuffers(1,((20740)|0)); - _glDeleteBuffers(1,((20784)|0)); - _glDeleteBuffers(1,((20788)|0)); - _glDeleteBuffers(1,((20792)|0)); - _glDeleteBuffers(1,((20796)|0)); - $3 = HEAP32[4866]|0; - $4 = ($3|0)==(0); - if (!($4)) { - $5 = HEAP32[4869]|0; - FUNCTION_TABLE_vii[$5 & 63](1,(20684)); - $6 = HEAP32[4869]|0; - FUNCTION_TABLE_vii[$6 & 63](1,(20732)); - $7 = HEAP32[4869]|0; - FUNCTION_TABLE_vii[$7 & 63](1,(20780)); - } - $8 = HEAP32[(20668)>>2]|0; - _free($8); - $9 = HEAP32[(20676)>>2]|0; - _free($9); - $10 = HEAP32[(20716)>>2]|0; - _free($10); - $11 = HEAP32[(20724)>>2]|0; - _free($11); - $12 = HEAP32[(20764)>>2]|0; - _free($12); - $13 = HEAP32[(20768)>>2]|0; - _free($13); - $14 = HEAP32[(20772)>>2]|0; - _free($14); - $15 = HEAP32[(20776)>>2]|0; - _free($15); - return; -} -function _UnloadTexture($0) { - $0 = $0|0; - var $1 = 0, $2 = 0, $3 = 0, $vararg_buffer = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $vararg_buffer = sp; - $1 = HEAP32[$0>>2]|0; - $2 = ($1|0)==(0); - if ($2) { - STACKTOP = sp;return; - } - _rlDeleteTextures($1); - $3 = HEAP32[$0>>2]|0; - HEAP32[$vararg_buffer>>2] = $3; - _TraceLog(0,9321,$vararg_buffer); - STACKTOP = sp;return; -} -function _rlDeleteTextures($0) { - $0 = $0|0; - var $1 = 0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $1 = sp; - HEAP32[$1>>2] = $0; - $2 = ($0|0)==(0); - if (!($2)) { - _glDeleteTextures(1,($1|0)); - } - STACKTOP = sp;return; -} -function _BeginDrawing() { - var $0 = 0.0, $1 = 0.0, $2 = 0.0, $downscaleView$byval_copy = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); - $downscaleView$byval_copy = sp; - $0 = (+_GetTime()); - HEAPF64[2331] = $0; - $1 = +HEAPF64[2314]; - $2 = $0 - $1; - HEAPF64[2332] = $2; - HEAPF64[2314] = $0; - _rlClearScreenBuffers(); - _rlLoadIdentity(); - dest=$downscaleView$byval_copy; src=19236; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - (_MatrixToFloat($downscaleView$byval_copy)|0); - _rlMultMatrixf(20808); - STACKTOP = sp;return; -} -function _MatrixToFloat($0) { - $0 = $0|0; - var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; - var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = HEAP32[$0>>2]|0; - HEAP32[5202] = $1; - $2 = ((($0)) + 4|0); - $3 = HEAP32[$2>>2]|0; - HEAP32[(20812)>>2] = $3; - $4 = ((($0)) + 8|0); - $5 = HEAP32[$4>>2]|0; - HEAP32[(20816)>>2] = $5; - $6 = ((($0)) + 12|0); - $7 = HEAP32[$6>>2]|0; - HEAP32[(20820)>>2] = $7; - $8 = ((($0)) + 16|0); - $9 = HEAP32[$8>>2]|0; - HEAP32[(20824)>>2] = $9; - $10 = ((($0)) + 20|0); - $11 = HEAP32[$10>>2]|0; - HEAP32[(20828)>>2] = $11; - $12 = ((($0)) + 24|0); - $13 = HEAP32[$12>>2]|0; - HEAP32[(20832)>>2] = $13; - $14 = ((($0)) + 28|0); - $15 = HEAP32[$14>>2]|0; - HEAP32[(20836)>>2] = $15; - $16 = ((($0)) + 32|0); - $17 = HEAP32[$16>>2]|0; - HEAP32[(20840)>>2] = $17; - $18 = ((($0)) + 36|0); - $19 = HEAP32[$18>>2]|0; - HEAP32[(20844)>>2] = $19; - $20 = ((($0)) + 40|0); - $21 = HEAP32[$20>>2]|0; - HEAP32[(20848)>>2] = $21; - $22 = ((($0)) + 44|0); - $23 = HEAP32[$22>>2]|0; - HEAP32[(20852)>>2] = $23; - $24 = ((($0)) + 48|0); - $25 = HEAP32[$24>>2]|0; - HEAP32[(20856)>>2] = $25; - $26 = ((($0)) + 52|0); - $27 = HEAP32[$26>>2]|0; - HEAP32[(20860)>>2] = $27; - $28 = ((($0)) + 56|0); - $29 = HEAP32[$28>>2]|0; - HEAP32[(20864)>>2] = $29; - $30 = ((($0)) + 60|0); - $31 = HEAP32[$30>>2]|0; - HEAP32[(20868)>>2] = $31; - return (20808|0); -} -function _rlMultMatrixf($0) { - $0 = $0|0; - var $$byval_copy = 0, $$byval_copy1 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; - var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0; - var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 256|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(256|0); - $$byval_copy1 = sp + 192|0; - $$byval_copy = sp + 128|0; - $1 = sp + 64|0; - $2 = sp; - $3 = HEAP32[$0>>2]|0; - HEAP32[$1>>2] = $3; - $4 = ((($1)) + 4|0); - $5 = ((($0)) + 4|0); - $6 = HEAP32[$5>>2]|0; - HEAP32[$4>>2] = $6; - $7 = ((($1)) + 8|0); - $8 = ((($0)) + 8|0); - $9 = HEAP32[$8>>2]|0; - HEAP32[$7>>2] = $9; - $10 = ((($1)) + 12|0); - $11 = ((($0)) + 12|0); - $12 = HEAP32[$11>>2]|0; - HEAP32[$10>>2] = $12; - $13 = ((($1)) + 16|0); - $14 = ((($0)) + 16|0); - $15 = HEAP32[$14>>2]|0; - HEAP32[$13>>2] = $15; - $16 = ((($1)) + 20|0); - $17 = ((($0)) + 20|0); - $18 = HEAP32[$17>>2]|0; - HEAP32[$16>>2] = $18; - $19 = ((($1)) + 24|0); - $20 = ((($0)) + 24|0); - $21 = HEAP32[$20>>2]|0; - HEAP32[$19>>2] = $21; - $22 = ((($1)) + 28|0); - $23 = ((($0)) + 28|0); - $24 = HEAP32[$23>>2]|0; - HEAP32[$22>>2] = $24; - $25 = ((($1)) + 32|0); - $26 = ((($0)) + 32|0); - $27 = HEAP32[$26>>2]|0; - HEAP32[$25>>2] = $27; - $28 = ((($1)) + 36|0); - $29 = ((($0)) + 36|0); - $30 = HEAP32[$29>>2]|0; - HEAP32[$28>>2] = $30; - $31 = ((($1)) + 40|0); - $32 = ((($0)) + 40|0); - $33 = HEAP32[$32>>2]|0; - HEAP32[$31>>2] = $33; - $34 = ((($1)) + 44|0); - $35 = ((($0)) + 44|0); - $36 = HEAP32[$35>>2]|0; - HEAP32[$34>>2] = $36; - $37 = ((($1)) + 48|0); - $38 = ((($0)) + 48|0); - $39 = HEAP32[$38>>2]|0; - HEAP32[$37>>2] = $39; - $40 = ((($1)) + 52|0); - $41 = ((($0)) + 52|0); - $42 = HEAP32[$41>>2]|0; - HEAP32[$40>>2] = $42; - $43 = ((($1)) + 56|0); - $44 = ((($0)) + 56|0); - $45 = HEAP32[$44>>2]|0; - HEAP32[$43>>2] = $45; - $46 = ((($1)) + 60|0); - $47 = ((($0)) + 60|0); - $48 = HEAP32[$47>>2]|0; - HEAP32[$46>>2] = $48; - $49 = HEAP32[4832]|0; - dest=$$byval_copy; src=$49; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$$byval_copy1; src=$1; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixMultiply($2,$$byval_copy,$$byval_copy1); - dest=$49; src=$2; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; -} -function _EndDrawing() { - var $0 = 0.0, $1 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - _rlglDraw(); - _SwapBuffers(); - _PollInputEvents(); - $0 = (+_GetTime()); - HEAPF64[2331] = $0; - $1 = +HEAPF64[2314]; - $2 = $0 - $1; - HEAPF64[2333] = $2; - HEAPF64[2314] = $0; - $3 = +HEAPF64[2332]; - $4 = $2 + $3; - HEAPF64[2334] = $4; - $5 = +HEAPF64[2311]; - $6 = $4 < $5; - if (!($6)) { - return; - } - $7 = $5 - $4; - $8 = $7 * 1000.0; - $9 = $8; - _Wait($9); - $10 = (+_GetTime()); - HEAPF64[2331] = $10; - $11 = +HEAPF64[2314]; - $12 = $10 - $11; - HEAPF64[2314] = $10; - $13 = +HEAPF64[2334]; - $14 = $12 + $13; - HEAPF64[2334] = $14; - return; -} -function _rlglDraw() { - var label = 0, sp = 0; - sp = STACKTOP; - _UpdateDefaultBuffers(); - _DrawDefaultBuffers(); - return; -} -function _SwapBuffers() { - var $0 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[4785]|0; - _glfwSwapBuffers(($0|0)); - return; -} -function _PollInputEvents() { - var $$04857 = 0, $$05160 = 0, $$058 = 0, $$lcssa = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0; - var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0.0, $40 = 0; - var $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, $scevgep = 0, $scevgep67 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 1456|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(1456|0); - $0 = sp + 1440|0; - $1 = sp + 1432|0; - $2 = sp; - _UpdateGestures(); - HEAP32[761] = -1; - HEAP32[763] = -1; - HEAP32[5218] = 0; - $3 = HEAP32[4785]|0; - _glfwGetCursorPos(($3|0),($0|0),($1|0)); - $4 = +HEAPF64[$0>>3]; - $5 = $4; - HEAPF32[4620] = $5; - $6 = +HEAPF64[$1>>3]; - $7 = $6; - HEAPF32[(18484)>>2] = $7; - _memcpy((22499|0),(21987|0),512)|0; - ;HEAP8[21984>>0]=HEAP8[21981>>0]|0;HEAP8[21984+1>>0]=HEAP8[21981+1>>0]|0;HEAP8[21984+2>>0]=HEAP8[21981+2>>0]|0; - $8 = HEAP32[5201]|0; - HEAP32[4788] = $8; - HEAP32[5201] = 0; - $9 = (_emscripten_get_num_gamepads()|0); - $10 = ($9|0)>(0); - if (!($10)) { - STACKTOP = sp;return; - } - $11 = ((($2)) + 12|0); - $12 = ((($2)) + 8|0); - $$05160 = 0; - while(1) { - $scevgep = (23011 + ($$05160<<5)|0); - $scevgep67 = (23139 + ($$05160<<5)|0); - dest=$scevgep; src=$scevgep67; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); - $13 = (_emscripten_get_gamepad_status(($$05160|0),($2|0))|0); + STACKTOP = STACKTOP + 432|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(432|0); + $$byval_copy10 = sp + 336|0; + $$byval_copy4 = sp + 292|0; + $$byval_copy3 = sp + 24|0; + $$byval_copy2 = sp; + $0 = sp + 416|0; + $1 = sp + 328|0; + $2 = sp + 312|0; + $3 = sp + 304|0; + $4 = sp + 288|0; + $5 = sp + 412|0; + $6 = sp + 408|0; + $7 = sp + 404|0; + $8 = sp + 400|0; + $9 = sp + 396|0; + $10 = sp + 392|0; + _UpdateCamera(16); + $11 = (_IsKeyPressed(262)|0); + $12 = ($11|0)==(0); + if ($12) { + $13 = (_IsKeyPressed(263)|0); $14 = ($13|0)==(0); if ($14) { - $15 = HEAP32[$11>>2]|0; - $16 = ($15|0)>(0); - if ($16) { - $17 = HEAP32[$11>>2]|0; - $$04857 = 0; - while(1) { - $21 = (((($2)) + 1040|0) + ($$04857<<2)|0); - $22 = HEAP32[$21>>2]|0; - $23 = ($22|0)==(1); - $24 = ((23139 + ($$05160<<5)|0) + ($$04857)|0); - if ($23) { - HEAP8[$24>>0] = 1; - HEAP32[763] = $$04857; - } else { - HEAP8[$24>>0] = 0; - } - $25 = (($$04857) + 1)|0; - $26 = ($25|0)<($17|0); - $27 = ($25|0)<(32); - $28 = $27 & $26; - if ($28) { - $$04857 = $25; - } else { - break; - } - } - } - $18 = HEAP32[$12>>2]|0; - $19 = ($18|0)>(0); - if ($19) { - $20 = HEAP32[$12>>2]|0; - $$058 = 0; - while(1) { - $29 = (((($2)) + 16|0) + ($$058<<3)|0); - $30 = +HEAPF64[$29>>3]; - $31 = $30; - $32 = ((20876 + ($$05160<<5)|0) + ($$058<<2)|0); - HEAPF32[$32>>2] = $31; - $33 = (($$058) + 1)|0; - $34 = ($33|0)<($20|0); - $35 = ($33|0)<(8); - $36 = $35 & $34; - if ($36) { - $$058 = $33; - } else { - $$lcssa = $20; - break; - } - } - } else { - $$lcssa = $18; - } - HEAP32[5218] = $$lcssa; - } - $37 = (($$05160) + 1)|0; - $38 = ($37|0)<($9|0); - $39 = ($37|0)<(4); - $40 = $38 & $39; - if ($40) { - $$05160 = $37; + $$pr = HEAP32[4898]|0; + $18 = $$pr; } else { - break; - } - } - STACKTOP = sp;return; -} -function _Wait($0) { - $0 = +$0; - var $1 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = (+_GetTime()); - $2 = 0.0 - $1; - $3 = $0 / 1000.0; - $4 = $3; - $5 = $2 < $4; - if (!($5)) { - return; - } - while(1) { - $6 = (+_GetTime()); - $7 = $6 - $1; - $8 = $7 < $4; - if (!($8)) { - break; - } - } - return; -} -function _UpdateDefaultBuffers() { - var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; - var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[5164]|0; - $1 = ($0|0)>(0); - if ($1) { - $2 = HEAP32[4866]|0; - $3 = ($2|0)==(0); - if (!($3)) { - $4 = HEAP32[4868]|0; - $5 = HEAP32[(20684)>>2]|0; - FUNCTION_TABLE_vi[$4 & 31]($5); - } - $6 = HEAP32[(20688)>>2]|0; - _glBindBuffer(34962,($6|0)); - $7 = HEAP32[5164]|0; - $8 = ($7*12)|0; - $9 = HEAP32[(20668)>>2]|0; - _glBufferSubData(34962,0,($8|0),($9|0)); - $10 = HEAP32[(20692)>>2]|0; - _glBindBuffer(34962,($10|0)); - $11 = HEAP32[(20664)>>2]|0; - $12 = $11 << 2; - $13 = HEAP32[(20676)>>2]|0; - _glBufferSubData(34962,0,($12|0),($13|0)); - } - $14 = HEAP32[5176]|0; - $15 = ($14|0)>(0); - if ($15) { - $16 = HEAP32[4866]|0; - $17 = ($16|0)==(0); - if (!($17)) { - $18 = HEAP32[4868]|0; - $19 = HEAP32[(20732)>>2]|0; - FUNCTION_TABLE_vi[$18 & 31]($19); - } - $20 = HEAP32[(20736)>>2]|0; - _glBindBuffer(34962,($20|0)); - $21 = HEAP32[5176]|0; - $22 = ($21*12)|0; - $23 = HEAP32[(20716)>>2]|0; - _glBufferSubData(34962,0,($22|0),($23|0)); - $24 = HEAP32[(20740)>>2]|0; - _glBindBuffer(34962,($24|0)); - $25 = HEAP32[(20712)>>2]|0; - $26 = $25 << 2; - $27 = HEAP32[(20724)>>2]|0; - _glBufferSubData(34962,0,($26|0),($27|0)); - } - $28 = HEAP32[5188]|0; - $29 = ($28|0)>(0); - if ($29) { - $30 = HEAP32[4866]|0; - $31 = ($30|0)==(0); - if (!($31)) { - $32 = HEAP32[4868]|0; - $33 = HEAP32[(20780)>>2]|0; - FUNCTION_TABLE_vi[$32 & 31]($33); - } - $34 = HEAP32[(20784)>>2]|0; - _glBindBuffer(34962,($34|0)); - $35 = HEAP32[5188]|0; - $36 = ($35*12)|0; - $37 = HEAP32[(20764)>>2]|0; - _glBufferSubData(34962,0,($36|0),($37|0)); - $38 = HEAP32[(20788)>>2]|0; - _glBindBuffer(34962,($38|0)); - $39 = HEAP32[5188]|0; - $40 = $39 << 3; - $41 = HEAP32[(20768)>>2]|0; - _glBufferSubData(34962,0,($40|0),($41|0)); - $42 = HEAP32[(20792)>>2]|0; - _glBindBuffer(34962,($42|0)); - $43 = HEAP32[5188]|0; - $44 = $43 << 2; - $45 = HEAP32[(20772)>>2]|0; - _glBufferSubData(34962,0,($44|0),($45|0)); - } - $46 = HEAP32[4866]|0; - $47 = ($46|0)==(0); - if ($47) { - return; - } - $48 = HEAP32[4868]|0; - FUNCTION_TABLE_vi[$48 & 31](0); - return; -} -function _DrawDefaultBuffers() { - var $$ = 0, $$02830 = 0, $$02932 = 0, $$031 = 0, $$byval_copy2 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0; - var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0; - var $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0; - var $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0; - var $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $modelview$byval_copy = 0; - var $or$cond = 0, $or$cond3 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 320|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(320|0); - $$byval_copy2 = sp + 256|0; - $modelview$byval_copy = sp + 192|0; - $0 = sp + 128|0; - $1 = sp + 64|0; - $2 = sp; - dest=$0; src=19332; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$1; src=19396; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - $3 = HEAP32[5251]|0; - $4 = ($3|0)!=(0); - $$ = $4 ? 2 : 1; - $$02932 = 0; - while(1) { - if ($4) { - dest=$modelview$byval_copy; src=$0; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$$byval_copy2; src=$1; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _SetStereoView($$02932,$modelview$byval_copy,$$byval_copy2); - } - $8 = HEAP32[5164]|0; - $9 = ($8|0)>(0); - $10 = HEAP32[5176]|0; - $11 = ($10|0)>(0); - $or$cond = $9 | $11; - $12 = HEAP32[5188]|0; - $13 = ($12|0)>(0); - $or$cond3 = $or$cond | $13; - if ($or$cond3) { - $14 = HEAP32[4888]|0; - _glUseProgram(($14|0)); - dest=$modelview$byval_copy; src=19396; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$$byval_copy2; src=19332; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixMultiply($2,$modelview$byval_copy,$$byval_copy2); - $15 = HEAP32[(19580)>>2]|0; - dest=$$byval_copy2; src=$2; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - $16 = (_MatrixToFloat($$byval_copy2)|0); - _glUniformMatrix4fv(($15|0),1,0,($16|0)); - $17 = HEAP32[(19584)>>2]|0; - _glUniform4f(($17|0),1.0,1.0,1.0,1.0); - $18 = HEAP32[(19596)>>2]|0; - _glUniform1i(($18|0),0); - } - $19 = HEAP32[5164]|0; - $20 = ($19|0)>(0); - if ($20) { - $21 = HEAP32[4873]|0; - _glBindTexture(3553,($21|0)); - $22 = HEAP32[4866]|0; - $23 = ($22|0)==(0); - if ($23) { - $26 = HEAP32[(20688)>>2]|0; - _glBindBuffer(34962,($26|0)); - $27 = HEAP32[(19556)>>2]|0; - _glVertexAttribPointer(($27|0),3,5126,0,0,(0|0)); - $28 = HEAP32[(19556)>>2]|0; - _glEnableVertexAttribArray(($28|0)); - $29 = HEAP32[(20692)>>2]|0; - _glBindBuffer(34962,($29|0)); - $30 = HEAP32[(19576)>>2]|0; - _glVertexAttribPointer(($30|0),4,5121,1,0,(0|0)); - $31 = HEAP32[(19576)>>2]|0; - _glEnableVertexAttribArray(($31|0)); - } else { - $24 = HEAP32[4868]|0; - $25 = HEAP32[(20684)>>2]|0; - FUNCTION_TABLE_vi[$24 & 31]($25); - } - $32 = HEAP32[5164]|0; - _glDrawArrays(1,0,($32|0)); - $33 = HEAP32[4866]|0; - $34 = ($33|0)==(0); - if ($34) { - _glBindBuffer(34962,0); - } - _glBindTexture(3553,0); - } - $35 = HEAP32[5176]|0; - $36 = ($35|0)>(0); - if ($36) { - $37 = HEAP32[4873]|0; - _glBindTexture(3553,($37|0)); - $38 = HEAP32[4866]|0; - $39 = ($38|0)==(0); - if ($39) { - $42 = HEAP32[(20736)>>2]|0; - _glBindBuffer(34962,($42|0)); - $43 = HEAP32[(19556)>>2]|0; - _glVertexAttribPointer(($43|0),3,5126,0,0,(0|0)); - $44 = HEAP32[(19556)>>2]|0; - _glEnableVertexAttribArray(($44|0)); - $45 = HEAP32[(20740)>>2]|0; - _glBindBuffer(34962,($45|0)); - $46 = HEAP32[(19576)>>2]|0; - _glVertexAttribPointer(($46|0),4,5121,1,0,(0|0)); - $47 = HEAP32[(19576)>>2]|0; - _glEnableVertexAttribArray(($47|0)); - } else { - $40 = HEAP32[4868]|0; - $41 = HEAP32[(20732)>>2]|0; - FUNCTION_TABLE_vi[$40 & 31]($41); - } - $48 = HEAP32[5176]|0; - _glDrawArrays(4,0,($48|0)); - $49 = HEAP32[4866]|0; - $50 = ($49|0)==(0); - if ($50) { - _glBindBuffer(34962,0); - } - _glBindTexture(3553,0); - } - $51 = HEAP32[5188]|0; - $52 = ($51|0)>(0); - if ($52) { - $53 = HEAP32[4866]|0; - $54 = ($53|0)==(0); - if ($54) { - $57 = HEAP32[(20784)>>2]|0; - _glBindBuffer(34962,($57|0)); - $58 = HEAP32[(19556)>>2]|0; - _glVertexAttribPointer(($58|0),3,5126,0,0,(0|0)); - $59 = HEAP32[(19556)>>2]|0; - _glEnableVertexAttribArray(($59|0)); - $60 = HEAP32[(20788)>>2]|0; - _glBindBuffer(34962,($60|0)); - $61 = HEAP32[(19560)>>2]|0; - _glVertexAttribPointer(($61|0),2,5126,0,0,(0|0)); - $62 = HEAP32[(19560)>>2]|0; - _glEnableVertexAttribArray(($62|0)); - $63 = HEAP32[(20792)>>2]|0; - _glBindBuffer(34962,($63|0)); - $64 = HEAP32[(19576)>>2]|0; - _glVertexAttribPointer(($64|0),4,5121,1,0,(0|0)); - $65 = HEAP32[(19576)>>2]|0; - _glEnableVertexAttribArray(($65|0)); - $66 = HEAP32[(20796)>>2]|0; - _glBindBuffer(34963,($66|0)); - } else { - $55 = HEAP32[4868]|0; - $56 = HEAP32[(20780)>>2]|0; - FUNCTION_TABLE_vi[$55 & 31]($56); - } - $67 = HEAP32[4904]|0; - $68 = ($67|0)>(0); - if ($68) { - $$02830 = 0;$$031 = 0; - while(1) { - $71 = HEAP32[4903]|0; - $72 = (($71) + (($$031*144)|0)|0); - $73 = HEAP32[$72>>2]|0; - $74 = (($73|0) / 4)&-1; - $75 = ($74*6)|0; - $76 = (((($71) + (($$031*144)|0)|0)) + 8|0); - $77 = HEAP32[$76>>2]|0; - _glBindTexture(3553,($77|0)); - $78 = $$02830 << 1; - $79 = $78; - _glDrawElements(4,($75|0),5123,($79|0)); - $80 = HEAP32[4903]|0; - $81 = (($80) + (($$031*144)|0)|0); - $82 = HEAP32[$81>>2]|0; - $83 = (($82|0) / 4)&-1; - $84 = ($83*6)|0; - $85 = (($84) + ($$02830))|0; - $86 = (($$031) + 1)|0; - $87 = HEAP32[4904]|0; - $88 = ($86|0)<($87|0); - if ($88) { - $$02830 = $85;$$031 = $86; - } else { - break; - } - } - } - $69 = HEAP32[4866]|0; - $70 = ($69|0)==(0); - if ($70) { - _glBindBuffer(34962,0); - _glBindBuffer(34963,0); - } - _glBindTexture(3553,0); - } - $89 = HEAP32[4866]|0; - $90 = ($89|0)==(0); - if (!($90)) { - $91 = HEAP32[4868]|0; - FUNCTION_TABLE_vi[$91 & 31](0); - } - _glUseProgram(0); - $92 = (($$02932) + 1)|0; - $93 = ($92|0)<($$|0); - if ($93) { - $$02932 = $92; - } else { - break; - } - } - HEAP32[4904] = 1; - $5 = HEAP32[4873]|0; - $6 = HEAP32[4903]|0; - $7 = ((($6)) + 8|0); - HEAP32[$7>>2] = $5; - HEAP32[$6>>2] = 0; - HEAP32[5164] = 0; - HEAP32[(20664)>>2] = 0; - HEAP32[5176] = 0; - HEAP32[(20712)>>2] = 0; - HEAP32[5188] = 0; - HEAP32[(20756)>>2] = 0; - HEAP32[(20760)>>2] = 0; - HEAPF32[764] = -1.0; - dest=19332; src=$0; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=19396; src=$1; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; -} -function _SetStereoView($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $$byval_copy = 0, $$byval_copy3 = 0, $10 = 0, $11 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 256|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(256|0); - $$byval_copy3 = sp + 192|0; - $$byval_copy = sp + 64|0; - $3 = sp; - $4 = sp + 128|0; - dest=$3; src=$1; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - $5 = HEAP32[5162]|0; - $6 = Math_imul($5, $0)|0; - $7 = (($6|0) / 2)&-1; - $8 = (($5|0) / 2)&-1; - $9 = HEAP32[5163]|0; - _rlViewport($7,0,$8,$9); - $10 = (21236 + ($0<<6)|0); - dest=$$byval_copy; src=$2; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$$byval_copy3; src=$10; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixMultiply($4,$$byval_copy,$$byval_copy3); - $11 = (21108 + ($0<<6)|0); - dest=$3; src=$11; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$$byval_copy3; src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _SetMatrixModelview($$byval_copy3); - dest=$$byval_copy3; src=$3; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _SetMatrixProjection($$byval_copy3); - STACKTOP = sp;return; -} -function _SetMatrixModelview($0) { - $0 = $0|0; - var dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - dest=19396; src=$0; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - return; -} -function _SetMatrixProjection($0) { - $0 = $0|0; - var dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - dest=19332; src=$0; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - return; -} -function _Begin3dMode($0) { - $0 = $0|0; - var $$byval_copy = 0, $$byval_copy1 = 0, $$byval_copy3 = 0, $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0; - var $8 = 0.0, $9 = 0.0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 160|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(160|0); - $$byval_copy3 = sp + 88|0; - $$byval_copy1 = sp + 76|0; - $$byval_copy = sp + 64|0; - $1 = sp; - _rlglDraw(); - _rlMatrixMode(5889); - _rlPushMatrix(); - _rlLoadIdentity(); - $2 = HEAP32[4787]|0; - $3 = (+($2|0)); - $4 = HEAP32[4786]|0; - $5 = (+($4|0)); - $6 = $3 / $5; - $7 = ((($0)) + 36|0); - $8 = +HEAPF32[$7>>2]; - $9 = $8 * 3.1415927410125732; - $10 = $9; - $11 = $10 / 360.0; - $12 = (+Math_tan((+$11))); - $13 = $12 * 0.01; - $14 = $6; - $15 = $13 * $14; - $16 = -$15; - $17 = -$13; - _rlFrustum($16,$15,$17,$13,0.01,1000.0); - _rlMatrixMode(5888); - _rlLoadIdentity(); - $18 = ((($0)) + 12|0); - $19 = ((($0)) + 24|0); - ;HEAP32[$$byval_copy>>2]=HEAP32[$0>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$0+8>>2]|0; - ;HEAP32[$$byval_copy1>>2]=HEAP32[$18>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$18+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$18+8>>2]|0; - ;HEAP32[$$byval_copy3>>2]=HEAP32[$19>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$19+4>>2]|0;HEAP32[$$byval_copy3+8>>2]=HEAP32[$19+8>>2]|0; - _MatrixLookAt($1,$$byval_copy,$$byval_copy1,$$byval_copy3); - dest=$$byval_copy3; src=$1; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - (_MatrixToFloat($$byval_copy3)|0); - _rlMultMatrixf(20808); - _rlEnableDepthTest(); - STACKTOP = sp;return; -} -function _rlPushMatrix() { - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $vararg_buffer = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $vararg_buffer = sp; - $0 = HEAP32[5341]|0; - $1 = ($0|0)==(15); - if ($1) { - HEAP32[$vararg_buffer>>2] = 16; - _TraceLog(1,9371,$vararg_buffer); - } - $2 = HEAP32[5341]|0; - $3 = (19624 + ($2<<6)|0); - $4 = HEAP32[4832]|0; - dest=$3; src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _rlLoadIdentity(); - $5 = HEAP32[5341]|0; - $6 = (($5) + 1)|0; - HEAP32[5341] = $6; - $7 = HEAP32[4865]|0; - $8 = ($7|0)==(5888); - if (!($8)) { - STACKTOP = sp;return; - } - HEAP32[5342] = 1; - STACKTOP = sp;return; -} -function _rlFrustum($0,$1,$2,$3,$4,$5) { - $0 = +$0; - $1 = +$1; - $2 = +$2; - $3 = +$3; - $4 = +$4; - $5 = +$5; - var $$byval_copy = 0, $$byval_copy1 = 0, $6 = 0, $7 = 0, $8 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 256|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(256|0); - $$byval_copy1 = sp + 192|0; - $$byval_copy = sp + 128|0; - $6 = sp + 64|0; - $7 = sp; - _MatrixFrustum($6,$0,$1,$2,$3,$4,$5); - _MatrixTranspose($6); - $8 = HEAP32[4832]|0; - dest=$$byval_copy; src=$8; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$$byval_copy1; src=$6; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixMultiply($7,$$byval_copy,$$byval_copy1); - dest=$8; src=$7; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; -} -function _rlEnableDepthTest() { - var label = 0, sp = 0; - sp = STACKTOP; - _glEnable(2929); - return; -} -function _End3dMode() { - var label = 0, sp = 0; - sp = STACKTOP; - _rlglDraw(); - _rlMatrixMode(5889); - _rlPopMatrix(); - _rlMatrixMode(5888); - _rlLoadIdentity(); - _rlDisableDepthTest(); - return; -} -function _rlPopMatrix() { - var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[5341]|0; - $1 = ($0|0)>(0); - if (!($1)) { - return; - } - $2 = HEAP32[5341]|0; - $3 = (($2) + -1)|0; - $4 = (19624 + ($3<<6)|0); - $5 = HEAP32[4832]|0; - _memmove(($5|0),($4|0),64)|0; - $6 = (($2) + -1)|0; - HEAP32[5341] = $6; - return; -} -function _rlDisableDepthTest() { - var label = 0, sp = 0; - sp = STACKTOP; - _glDisable(2929); - return; -} -function _BeginTextureMode($0) { - $0 = $0|0; - var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - _rlglDraw(); - $1 = HEAP32[$0>>2]|0; - _rlEnableRenderTexture($1); - _rlClearScreenBuffers(); - $2 = ((($0)) + 8|0); - $3 = HEAP32[$2>>2]|0; - $4 = ((($0)) + 12|0); - $5 = HEAP32[$4>>2]|0; - _rlViewport(0,0,$3,$5); - _rlMatrixMode(5889); - _rlLoadIdentity(); - $6 = (+($3|0)); - $7 = (+($5|0)); - _rlOrtho(0.0,$6,$7,0.0,0.0,1.0); - _rlMatrixMode(5888); - _rlLoadIdentity(); - return; -} -function _rlEnableRenderTexture($0) { - $0 = $0|0; - var label = 0, sp = 0; - sp = STACKTOP; - _glBindFramebuffer(36160,($0|0)); - return; -} -function _EndTextureMode() { - var $0 = 0, $1 = 0.0, $2 = 0, $3 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - _rlglDraw(); - _rlDisableRenderTexture(); - _SetupViewport(); - _rlMatrixMode(5889); - _rlLoadIdentity(); - $0 = (_GetScreenWidth()|0); - $1 = (+($0|0)); - $2 = (_GetScreenHeight()|0); - $3 = (+($2|0)); - _rlOrtho(0.0,$1,$3,0.0,0.0,1.0); - _rlMatrixMode(5888); - _rlLoadIdentity(); - return; -} -function _rlDisableRenderTexture() { - var label = 0, sp = 0; - sp = STACKTOP; - _glBindFramebuffer(36160,0); - return; -} -function _GetFPS() { - var $0 = 0.0, $1 = 0.0, $2 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = (+_GetFrameTime()); - $1 = 1.0 / $0; - $2 = (~~(($1))); - return ($2|0); -} -function _GetFrameTime() { - var $0 = 0.0, $1 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $0 = +HEAPF64[2334]; - $1 = $0; - return (+$1); -} -function _SetConfigFlags($0) { - $0 = $0|0; - var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; - sp = STACKTOP; - HEAP8[21980] = $0; - $1 = $0 & 1; - $2 = ($1<<24>>24)==(0); - if (!($2)) { - HEAP32[4790] = 1; - } - $3 = HEAP8[21980]|0; - $4 = $3 & 2; - $5 = ($4<<24>>24)==(0); - if ($5) { - return; - } - HEAP32[4827] = 1; - return; -} -function _IsFileExtension($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $$ = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; - sp = STACKTOP; - $2 = (_strrchr($0,46)|0); - $3 = ($2|0)==(0|0); - if ($3) { - return 0; - } else { - $4 = (_strcmp($2,$1)|0); - $5 = ($4|0)==(0); - $$ = $5&1; - return ($$|0); - } - return (0)|0; -} -function _rlTranslatef($0,$1,$2) { - $0 = +$0; - $1 = +$1; - $2 = +$2; - var $$byval_copy = 0, $$byval_copy1 = 0, $3 = 0, $4 = 0, $5 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 256|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(256|0); - $$byval_copy1 = sp + 192|0; - $$byval_copy = sp + 128|0; - $3 = sp + 64|0; - $4 = sp; - _MatrixTranslate($3,$0,$1,$2); - _MatrixTranspose($3); - $5 = HEAP32[4832]|0; - dest=$$byval_copy; src=$5; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$$byval_copy1; src=$3; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixMultiply($4,$$byval_copy,$$byval_copy1); - dest=$5; src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; -} -function _rlRotatef($0,$1,$2,$3) { - $0 = +$0; - $1 = +$1; - $2 = +$2; - $3 = +$3; - var $$byval_copy1 = 0, $$byval_copy2 = 0, $10 = 0.0, $11 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 336|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(336|0); - $$byval_copy2 = sp + 272|0; - $$byval_copy1 = sp + 208|0; - $4 = sp + 144|0; - $5 = sp + 64|0; - $6 = sp + 80|0; - $7 = sp; - _MatrixIdentity($4); - HEAPF32[$5>>2] = $1; - $8 = ((($5)) + 4|0); - HEAPF32[$8>>2] = $2; - $9 = ((($5)) + 8|0); - HEAPF32[$9>>2] = $3; - _VectorNormalize($5); - $10 = $0 * 0.01745329238474369; - ;HEAP32[$$byval_copy2>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$5+4>>2]|0;HEAP32[$$byval_copy2+8>>2]=HEAP32[$5+8>>2]|0; - _MatrixRotate($6,$$byval_copy2,$10); - dest=$4; src=$6; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixTranspose($4); - $11 = HEAP32[4832]|0; - dest=$$byval_copy1; src=$11; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$$byval_copy2; src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixMultiply($7,$$byval_copy1,$$byval_copy2); - dest=$11; src=$7; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; -} -function _rlBegin($0) { - $0 = $0|0; - var label = 0, sp = 0; - sp = STACKTOP; - HEAP32[4905] = $0; - return; -} -function _rlEnd() { - var $$03956 = 0, $$04052 = 0, $$04154 = 0, $$04248 = 0, $$04347 = 0, $$byval_copy = 0, $$promoted = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0; - var $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0; - var $128 = 0, $129 = 0, $13 = 0.0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0; - var $146 = 0, $147 = 0, $148 = 0.0, $149 = 0.0, $15 = 0.0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0; - var $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0; - var $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0; - var $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0; - var $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $exitcond = 0, $exitcond60 = 0, $exitcond63 = 0; - var $scevgep = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); - $$byval_copy = sp; - $0 = HEAP32[5342]|0; - $1 = ($0|0)==(0); - if (!($1)) { - $2 = HEAP32[5343]|0; - $3 = ($2|0)>(0); - if ($3) { - $$03956 = 0; - while(1) { - $6 = HEAP32[4902]|0; - $7 = (($6) + (($$03956*12)|0)|0); - $8 = HEAP32[4832]|0; - dest=$$byval_copy; src=$8; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _VectorTransform($7,$$byval_copy); - $9 = (($$03956) + 1)|0; - $5 = HEAP32[5343]|0; - $10 = ($9|0)<($5|0); - if ($10) { - $$03956 = $9; - } else { - break; - } - } - HEAP32[5342] = 0; - $4 = ($5|0)>(0); - if ($4) { - $$04154 = 0; - while(1) { - $11 = HEAP32[4902]|0; - $12 = (($11) + (($$04154*12)|0)|0); - $13 = +HEAPF32[$12>>2]; - $14 = (((($11) + (($$04154*12)|0)|0)) + 4|0); - $15 = +HEAPF32[$14>>2]; - $16 = (((($11) + (($$04154*12)|0)|0)) + 8|0); - $17 = +HEAPF32[$16>>2]; - _rlVertex3f($13,$15,$17); - $18 = (($$04154) + 1)|0; - $19 = HEAP32[5343]|0; - $20 = ($18|0)<($19|0); - if ($20) { - $$04154 = $18; - } else { - break; - } - } - } - } else { - HEAP32[5342] = 0; - } - HEAP32[5343] = 0; - } - $21 = HEAP32[4905]|0; - switch ($21|0) { - case 1: { - $22 = HEAP32[5164]|0; - $23 = HEAP32[(20664)>>2]|0; - $24 = ($22|0)==($23|0); - if ($24) { - $148 = +HEAPF32[764]; - $149 = $148 + 4.9999998736893758E-5; - HEAPF32[764] = $149; - STACKTOP = sp;return; - } - $25 = (($22) - ($23))|0; - $26 = ($25|0)>(0); - if ($26) { - $$04347 = 0; - } else { - $148 = +HEAPF32[764]; - $149 = $148 + 4.9999998736893758E-5; - HEAPF32[764] = $149; - STACKTOP = sp;return; - } - while(1) { - $27 = HEAP32[(20676)>>2]|0; - $28 = HEAP32[(20664)>>2]|0; - $29 = $28 << 2; - $30 = (($29) + -4)|0; - $31 = (($27) + ($30)|0); - $32 = HEAP8[$31>>0]|0; - $33 = (($27) + ($29)|0); - HEAP8[$33>>0] = $32; - $34 = HEAP32[(20676)>>2]|0; - $35 = HEAP32[(20664)>>2]|0; - $36 = $35 << 2; - $37 = (($36) + -3)|0; - $38 = (($34) + ($37)|0); - $39 = HEAP8[$38>>0]|0; - $40 = $36 | 1; - $41 = (($34) + ($40)|0); - HEAP8[$41>>0] = $39; - $42 = HEAP32[(20676)>>2]|0; - $43 = HEAP32[(20664)>>2]|0; - $44 = $43 << 2; - $45 = (($44) + -2)|0; - $46 = (($42) + ($45)|0); - $47 = HEAP8[$46>>0]|0; - $48 = $44 | 2; - $49 = (($42) + ($48)|0); - HEAP8[$49>>0] = $47; - $50 = HEAP32[(20676)>>2]|0; - $51 = HEAP32[(20664)>>2]|0; - $52 = $51 << 2; - $53 = (($52) + -1)|0; - $54 = (($50) + ($53)|0); - $55 = HEAP8[$54>>0]|0; - $56 = $52 | 3; - $57 = (($50) + ($56)|0); - HEAP8[$57>>0] = $55; - $58 = HEAP32[(20664)>>2]|0; - $59 = (($58) + 1)|0; - HEAP32[(20664)>>2] = $59; - $60 = (($$04347) + 1)|0; - $exitcond = ($60|0)==($25|0); - if ($exitcond) { - break; - } else { - $$04347 = $60; - } - } - $148 = +HEAPF32[764]; - $149 = $148 + 4.9999998736893758E-5; - HEAPF32[764] = $149; - STACKTOP = sp;return; - break; - } - case 4: { - $61 = HEAP32[5176]|0; - $62 = HEAP32[(20712)>>2]|0; - $63 = ($61|0)==($62|0); - if ($63) { - $148 = +HEAPF32[764]; - $149 = $148 + 4.9999998736893758E-5; - HEAPF32[764] = $149; - STACKTOP = sp;return; - } - $64 = (($61) - ($62))|0; - $65 = ($64|0)>(0); - if ($65) { - $$04248 = 0; - } else { - $148 = +HEAPF32[764]; - $149 = $148 + 4.9999998736893758E-5; - HEAPF32[764] = $149; - STACKTOP = sp;return; - } - while(1) { - $66 = HEAP32[(20724)>>2]|0; - $67 = HEAP32[(20712)>>2]|0; - $68 = $67 << 2; - $69 = (($68) + -4)|0; - $70 = (($66) + ($69)|0); - $71 = HEAP8[$70>>0]|0; - $72 = (($66) + ($68)|0); - HEAP8[$72>>0] = $71; - $73 = HEAP32[(20724)>>2]|0; - $74 = HEAP32[(20712)>>2]|0; - $75 = $74 << 2; - $76 = (($75) + -3)|0; - $77 = (($73) + ($76)|0); - $78 = HEAP8[$77>>0]|0; - $79 = $75 | 1; - $80 = (($73) + ($79)|0); - HEAP8[$80>>0] = $78; - $81 = HEAP32[(20724)>>2]|0; - $82 = HEAP32[(20712)>>2]|0; - $83 = $82 << 2; - $84 = (($83) + -2)|0; - $85 = (($81) + ($84)|0); - $86 = HEAP8[$85>>0]|0; - $87 = $83 | 2; - $88 = (($81) + ($87)|0); - HEAP8[$88>>0] = $86; - $89 = HEAP32[(20724)>>2]|0; - $90 = HEAP32[(20712)>>2]|0; - $91 = $90 << 2; - $92 = (($91) + -1)|0; - $93 = (($89) + ($92)|0); - $94 = HEAP8[$93>>0]|0; - $95 = $91 | 3; - $96 = (($89) + ($95)|0); - HEAP8[$96>>0] = $94; - $97 = HEAP32[(20712)>>2]|0; - $98 = (($97) + 1)|0; - HEAP32[(20712)>>2] = $98; - $99 = (($$04248) + 1)|0; - $exitcond60 = ($99|0)==($64|0); - if ($exitcond60) { - break; - } else { - $$04248 = $99; - } - } - $148 = +HEAPF32[764]; - $149 = $148 + 4.9999998736893758E-5; - HEAPF32[764] = $149; - STACKTOP = sp;return; - break; - } - case 7: { - $100 = HEAP32[5188]|0; - $101 = HEAP32[(20760)>>2]|0; - $102 = ($100|0)==($101|0); - if (!($102)) { - $103 = (($100) - ($101))|0; - $104 = ($103|0)>(0); - if ($104) { - $$04052 = 0; - while(1) { - $105 = HEAP32[(20772)>>2]|0; - $106 = HEAP32[(20760)>>2]|0; - $107 = $106 << 2; - $108 = (($107) + -4)|0; - $109 = (($105) + ($108)|0); - $110 = HEAP8[$109>>0]|0; - $111 = (($105) + ($107)|0); - HEAP8[$111>>0] = $110; - $112 = HEAP32[(20772)>>2]|0; - $113 = HEAP32[(20760)>>2]|0; - $114 = $113 << 2; - $115 = (($114) + -3)|0; - $116 = (($112) + ($115)|0); - $117 = HEAP8[$116>>0]|0; - $118 = $114 | 1; - $119 = (($112) + ($118)|0); - HEAP8[$119>>0] = $117; - $120 = HEAP32[(20772)>>2]|0; - $121 = HEAP32[(20760)>>2]|0; - $122 = $121 << 2; - $123 = (($122) + -2)|0; - $124 = (($120) + ($123)|0); - $125 = HEAP8[$124>>0]|0; - $126 = $122 | 2; - $127 = (($120) + ($126)|0); - HEAP8[$127>>0] = $125; - $128 = HEAP32[(20772)>>2]|0; - $129 = HEAP32[(20760)>>2]|0; - $130 = $129 << 2; - $131 = (($130) + -1)|0; - $132 = (($128) + ($131)|0); - $133 = HEAP8[$132>>0]|0; - $134 = $130 | 3; - $135 = (($128) + ($134)|0); - HEAP8[$135>>0] = $133; - $136 = HEAP32[(20760)>>2]|0; - $137 = (($136) + 1)|0; - HEAP32[(20760)>>2] = $137; - $138 = (($$04052) + 1)|0; - $exitcond63 = ($138|0)==($103|0); - if ($exitcond63) { - break; - } else { - $$04052 = $138; - } - } - } - } - $139 = HEAP32[5188]|0; - $140 = HEAP32[(20756)>>2]|0; - $141 = ($139|0)>($140|0); - if (!($141)) { - $148 = +HEAPF32[764]; - $149 = $148 + 4.9999998736893758E-5; - HEAPF32[764] = $149; - STACKTOP = sp;return; - } - $142 = HEAP32[(20768)>>2]|0; - $$promoted = HEAP32[(20756)>>2]|0; - $143 = $$promoted << 1; - $scevgep = (($142) + ($143<<2)|0); - $144 = (($139) - ($140))|0; - $145 = $144 << 3; - _memset(($scevgep|0),0,($145|0))|0; - $146 = (($139) + ($$promoted))|0; - $147 = (($146) - ($140))|0; - HEAP32[(20756)>>2] = $147; - $148 = +HEAPF32[764]; - $149 = $148 + 4.9999998736893758E-5; - HEAPF32[764] = $149; - STACKTOP = sp;return; - break; - } - default: { - $148 = +HEAPF32[764]; - $149 = $148 + 4.9999998736893758E-5; - HEAPF32[764] = $149; - STACKTOP = sp;return; - } - } -} -function _rlVertex3f($0,$1,$2) { - $0 = +$0; - $1 = +$1; - $2 = +$2; - var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0; - var $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0; - var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer3 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); - $vararg_buffer3 = sp + 16|0; - $vararg_buffer1 = sp + 8|0; - $vararg_buffer = sp; - $3 = HEAP32[5342]|0; - $4 = ($3|0)==(0); - if (!($4)) { - $5 = HEAP32[4902]|0; - $6 = HEAP32[5343]|0; - $7 = (($5) + (($6*12)|0)|0); - HEAPF32[$7>>2] = $0; - $8 = (((($5) + (($6*12)|0)|0)) + 4|0); - HEAPF32[$8>>2] = $1; - $9 = (((($5) + (($6*12)|0)|0)) + 8|0); - HEAPF32[$9>>2] = $2; - $10 = (($6) + 1)|0; - HEAP32[5343] = $10; - STACKTOP = sp;return; - } - $11 = HEAP32[4905]|0; - switch ($11|0) { - case 1: { - $12 = HEAP32[5164]|0; - $13 = ($12|0)<(2048); - if ($13) { - $14 = HEAP32[(20668)>>2]|0; - $15 = ($12*3)|0; - $16 = (($14) + ($15<<2)|0); - HEAPF32[$16>>2] = $0; - $17 = (($15) + 1)|0; - $18 = (($14) + ($17<<2)|0); - HEAPF32[$18>>2] = $1; - $19 = (($15) + 2)|0; - $20 = (($14) + ($19<<2)|0); - HEAPF32[$20>>2] = $2; - $21 = (($12) + 1)|0; - HEAP32[5164] = $21; - STACKTOP = sp;return; - } else { - _TraceLog(1,9409,$vararg_buffer); - STACKTOP = sp;return; - } - break; - } - case 4: { - $22 = HEAP32[5176]|0; - $23 = ($22|0)<(6144); - if ($23) { - $24 = HEAP32[(20716)>>2]|0; - $25 = ($22*3)|0; - $26 = (($24) + ($25<<2)|0); - HEAPF32[$26>>2] = $0; - $27 = (($25) + 1)|0; - $28 = (($24) + ($27<<2)|0); - HEAPF32[$28>>2] = $1; - $29 = (($25) + 2)|0; - $30 = (($24) + ($29<<2)|0); - HEAPF32[$30>>2] = $2; - $31 = (($22) + 1)|0; - HEAP32[5176] = $31; - STACKTOP = sp;return; - } else { - _TraceLog(1,9434,$vararg_buffer1); - STACKTOP = sp;return; - } - break; - } - case 7: { - $32 = HEAP32[5188]|0; - $33 = ($32|0)<(4096); - if ($33) { - $34 = HEAP32[(20764)>>2]|0; - $35 = ($32*3)|0; - $36 = (($34) + ($35<<2)|0); - HEAPF32[$36>>2] = $0; - $37 = (($35) + 1)|0; - $38 = (($34) + ($37<<2)|0); - HEAPF32[$38>>2] = $1; - $39 = (($35) + 2)|0; - $40 = (($34) + ($39<<2)|0); - HEAPF32[$40>>2] = $2; - $41 = (($32) + 1)|0; - HEAP32[5188] = $41; - $42 = HEAP32[4903]|0; - $43 = HEAP32[4904]|0; - $44 = (($43) + -1)|0; - $45 = (($42) + (($44*144)|0)|0); - $46 = HEAP32[$45>>2]|0; - $47 = (($46) + 1)|0; - HEAP32[$45>>2] = $47; - STACKTOP = sp;return; - } else { - _TraceLog(1,9463,$vararg_buffer3); - STACKTOP = sp;return; - } - break; - } - default: { - STACKTOP = sp;return; - } - } -} -function _rlVertex2f($0,$1) { - $0 = +$0; - $1 = +$1; - var $2 = 0.0, label = 0, sp = 0; - sp = STACKTOP; - $2 = +HEAPF32[764]; - _rlVertex3f($0,$1,$2); - return; -} -function _rlTexCoord2f($0,$1) { - $0 = +$0; - $1 = +$1; - var $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $2 = HEAP32[4905]|0; - $3 = ($2|0)==(7); - if (!($3)) { - return; - } - $4 = HEAP32[(20768)>>2]|0; - $5 = HEAP32[(20756)>>2]|0; - $6 = $5 << 1; - $7 = (($4) + ($6<<2)|0); - HEAPF32[$7>>2] = $0; - $8 = $6 | 1; - $9 = (($4) + ($8<<2)|0); - HEAPF32[$9>>2] = $1; - $10 = (($5) + 1)|0; - HEAP32[(20756)>>2] = $10; - return; -} -function _rlNormal3f($0,$1,$2) { - $0 = +$0; - $1 = +$1; - $2 = +$2; - var label = 0, sp = 0; - sp = STACKTOP; - return; -} -function _rlColor4ub($0,$1,$2,$3) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - $3 = $3|0; - var $$sink37 = 0, $$sink38 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $4 = 0, $5 = 0; - var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $4 = HEAP32[4905]|0; - switch ($4|0) { - case 1: { - $$sink37 = (20664);$$sink38 = (20676); - break; - } - case 4: { - $$sink37 = (20712);$$sink38 = (20724); - break; - } - case 7: { - $$sink37 = (20760);$$sink38 = (20772); - break; - } - default: { - return; - } - } - $5 = HEAP32[$$sink38>>2]|0; - $6 = HEAP32[$$sink37>>2]|0; - $7 = $6 << 2; - $8 = (($5) + ($7)|0); - HEAP8[$8>>0] = $0; - $9 = HEAP32[$$sink38>>2]|0; - $10 = HEAP32[$$sink37>>2]|0; - $11 = $10 << 2; - $12 = $11 | 1; - $13 = (($9) + ($12)|0); - HEAP8[$13>>0] = $1; - $14 = HEAP32[$$sink38>>2]|0; - $15 = HEAP32[$$sink37>>2]|0; - $16 = $15 << 2; - $17 = $16 | 2; - $18 = (($14) + ($17)|0); - HEAP8[$18>>0] = $2; - $19 = HEAP32[$$sink38>>2]|0; - $20 = HEAP32[$$sink37>>2]|0; - $21 = $20 << 2; - $22 = $21 | 3; - $23 = (($19) + ($22)|0); - HEAP8[$23>>0] = $3; - $24 = HEAP32[$$sink37>>2]|0; - $25 = (($24) + 1)|0; - HEAP32[$$sink37>>2] = $25; - return; -} -function _rlColor3f($0,$1,$2) { - $0 = +$0; - $1 = +$1; - $2 = +$2; - var $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, label = 0, sp = 0; - sp = STACKTOP; - $3 = $0 * 255.0; - $4 = (~~(($3))&255); - $5 = $1 * 255.0; - $6 = (~~(($5))&255); - $7 = $2 * 255.0; - $8 = (~~(($7))&255); - _rlColor4ub($4,$6,$8,-1); - return; -} -function _rlEnableTexture($0) { - $0 = $0|0; - var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = HEAP32[4903]|0; - $2 = HEAP32[4904]|0; - $3 = (($2) + -1)|0; - $4 = (((($1) + (($3*144)|0)|0)) + 8|0); - $5 = HEAP32[$4>>2]|0; - $6 = ($5|0)==($0|0); - if ($6) { - return; - } - $7 = (($1) + (($3*144)|0)|0); - $8 = HEAP32[$7>>2]|0; - $9 = ($8|0)>(0); - if ($9) { - $10 = (($2) + 1)|0; - HEAP32[4904] = $10; - } - $11 = HEAP32[4904]|0; - $12 = (($11) + -1)|0; - $13 = (((($1) + (($12*144)|0)|0)) + 8|0); - HEAP32[$13>>2] = $0; - $14 = (($1) + (($12*144)|0)|0); - HEAP32[$14>>2] = 0; - return; -} -function _rlDisableTexture() { - var $0 = 0, $1 = 0, label = 0, sp = 0; - sp = STACKTOP; - $0 = HEAP32[5188]|0; - $1 = ($0|0)>(4095); - if (!($1)) { - return; - } - _rlglDraw(); - return; -} -function _rlDeleteShader($0) { - $0 = $0|0; - var $1 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = ($0|0)==(0); - if ($1) { - return; - } - _glDeleteProgram(($0|0)); - return; -} -function _rlDeleteVertexArrays($0) { - $0 = $0|0; - var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $vararg_buffer = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $vararg_buffer = sp; - $1 = sp + 4|0; - HEAP32[$1>>2] = $0; - $2 = HEAP32[4866]|0; - $3 = ($2|0)==(0); - if ($3) { - STACKTOP = sp;return; - } - $4 = ($0|0)==(0); - if (!($4)) { - $5 = HEAP32[4869]|0; - FUNCTION_TABLE_vii[$5 & 63](1,$1); - } - $6 = HEAP32[$1>>2]|0; - HEAP32[$vararg_buffer>>2] = $6; - _TraceLog(0,9488,$vararg_buffer); - STACKTOP = sp;return; -} -function _rlDeleteBuffers($0) { - $0 = $0|0; - var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $vararg_buffer = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $vararg_buffer = sp; - $1 = sp + 4|0; - HEAP32[$1>>2] = $0; - $2 = ($0|0)==(0); - if ($2) { - STACKTOP = sp;return; - } - _glDeleteBuffers(1,($1|0)); - $3 = HEAP32[4866]|0; - $4 = ($3|0)==(0); - if (!($4)) { - STACKTOP = sp;return; - } - $5 = HEAP32[$1>>2]|0; - HEAP32[$vararg_buffer>>2] = $5; - _TraceLog(0,9536,$vararg_buffer); - STACKTOP = sp;return; -} -function _rlglLoadRenderTexture($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0; - var $vararg_buffer1 = 0, $vararg_buffer3 = 0, $vararg_buffer5 = 0, $vararg_buffer7 = 0, $vararg_buffer9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(96|0); - $vararg_buffer9 = sp + 40|0; - $vararg_buffer7 = sp + 32|0; - $vararg_buffer5 = sp + 24|0; - $vararg_buffer3 = sp + 16|0; - $vararg_buffer1 = sp + 8|0; - $vararg_buffer = sp; - $3 = sp + 44|0; - HEAP32[$3>>2] = 0; - $4 = ((($3)) + 4|0); - HEAP32[$4>>2] = 0; - $5 = ((($3)) + 8|0); - HEAP32[$5>>2] = $1; - $6 = ((($3)) + 12|0); - HEAP32[$6>>2] = $2; - $7 = ((($3)) + 20|0); - HEAP32[$7>>2] = 7; - $8 = ((($3)) + 16|0); - HEAP32[$8>>2] = 1; - $9 = ((($3)) + 24|0); - HEAP32[$9>>2] = 0; - $10 = ((($3)) + 28|0); - HEAP32[$10>>2] = $1; - $11 = ((($3)) + 32|0); - HEAP32[$11>>2] = $2; - $12 = ((($3)) + 40|0); - HEAP32[$12>>2] = 19; - $13 = ((($3)) + 36|0); - HEAP32[$13>>2] = 1; - _glGenTextures(1,($4|0)); - $14 = HEAP32[$4>>2]|0; - _glBindTexture(3553,($14|0)); - _glTexParameteri(3553,10242,33071); - _glTexParameteri(3553,10243,33071); - _glTexParameteri(3553,10241,9729); - _glTexParameteri(3553,10240,9729); - _glTexImage2D(3553,0,6408,($1|0),($2|0),0,6408,5121,(0|0)); - _glBindTexture(3553,0); - _glGenRenderbuffers(1,($9|0)); - $15 = HEAP32[$9>>2]|0; - _glBindRenderbuffer(36161,($15|0)); - _glRenderbufferStorage(36161,33189,($1|0),($2|0)); - _glGenFramebuffers(1,($3|0)); - $16 = HEAP32[$3>>2]|0; - _glBindFramebuffer(36160,($16|0)); - $17 = HEAP32[$4>>2]|0; - _glFramebufferTexture2D(36160,36064,3553,($17|0),0); - $18 = HEAP32[$9>>2]|0; - _glFramebufferRenderbuffer(36160,36096,36161,($18|0)); - $19 = (_glCheckFramebufferStatus(36160)|0); - $20 = ($19|0)==(36053); - if ($20) { - $21 = HEAP32[$3>>2]|0; - HEAP32[$vararg_buffer9>>2] = $21; - _TraceLog(0,9771,$vararg_buffer9); - _glBindFramebuffer(36160,0); - dest=$0; src=$3; stop=dest+44|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; - } - _TraceLog(2,9591,$vararg_buffer); - switch ($19|0) { - case 36061: { - _TraceLog(2,9634,$vararg_buffer1); - break; - } - case 36054: { - _TraceLog(2,9661,$vararg_buffer3); - break; - } - case 36057: { - _TraceLog(2,9695,$vararg_buffer5); - break; - } - case 36055: { - _TraceLog(2,9729,$vararg_buffer7); - break; - } - default: { - } - } - _glDeleteTextures(1,($4|0)); - _glDeleteTextures(1,($9|0)); - _glDeleteFramebuffers(1,($3|0)); - _glBindFramebuffer(36160,0); - dest=$0; src=$3; stop=dest+44|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; -} -function _rlglLoadMesh($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $$ = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; - var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; - var $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0; - var $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0; - var $82 = 0, $83 = 0, $84 = 0, $85 = 0, $9 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer3 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); - $vararg_buffer3 = sp + 16|0; - $vararg_buffer1 = sp + 8|0; - $vararg_buffer = sp; - $2 = sp + 48|0; - $3 = sp + 20|0; - $4 = ((($0)) + 36|0); - $5 = ((($0)) + 40|0); - $6 = ((($0)) + 44|0); - $7 = ((($0)) + 48|0); - $8 = ((($0)) + 52|0); - $9 = ((($0)) + 56|0); - $10 = ((($0)) + 60|0); - $11 = ((($0)) + 64|0); - $12 = ($1|0)!=(0); - $$ = $12 ? 35048 : 35044; - ;HEAP32[$4>>2]=0|0;HEAP32[$4+4>>2]=0|0;HEAP32[$4+8>>2]=0|0;HEAP32[$4+12>>2]=0|0;HEAP32[$4+16>>2]=0|0;HEAP32[$4+20>>2]=0|0;HEAP32[$4+24>>2]=0|0;HEAP32[$4+28>>2]=0|0; - HEAP32[$2>>2] = 0; - ;HEAP32[$3>>2]=0|0;HEAP32[$3+4>>2]=0|0;HEAP32[$3+8>>2]=0|0;HEAP32[$3+12>>2]=0|0;HEAP32[$3+16>>2]=0|0;HEAP32[$3+20>>2]=0|0;HEAP32[$3+24>>2]=0|0; - $13 = HEAP32[4866]|0; - $14 = ($13|0)==(0); - if (!($14)) { - $15 = HEAP32[4867]|0; - FUNCTION_TABLE_vii[$15 & 63](1,$2); - $16 = HEAP32[4868]|0; - $17 = HEAP32[$2>>2]|0; - FUNCTION_TABLE_vi[$16 & 31]($17); - } - _glGenBuffers(1,($3|0)); - $18 = HEAP32[$3>>2]|0; - _glBindBuffer(34962,($18|0)); - $19 = HEAP32[$0>>2]|0; - $20 = ($19*12)|0; - $21 = ((($0)) + 8|0); - $22 = HEAP32[$21>>2]|0; - _glBufferData(34962,($20|0),($22|0),($$|0)); - _glVertexAttribPointer(0,3,5126,0,0,(0|0)); - _glEnableVertexAttribArray(0); - $23 = ((($3)) + 4|0); - _glGenBuffers(1,($23|0)); - $24 = HEAP32[$23>>2]|0; - _glBindBuffer(34962,($24|0)); - $25 = HEAP32[$0>>2]|0; - $26 = $25 << 3; - $27 = ((($0)) + 12|0); - $28 = HEAP32[$27>>2]|0; - _glBufferData(34962,($26|0),($28|0),($$|0)); - _glVertexAttribPointer(1,2,5126,0,0,(0|0)); - _glEnableVertexAttribArray(1); - $29 = ((($0)) + 20|0); - $30 = HEAP32[$29>>2]|0; - $31 = ($30|0)==(0|0); - if ($31) { - _glVertexAttrib3f(2,1.0,1.0,1.0); - _glDisableVertexAttribArray(2); - } else { - $32 = ((($3)) + 8|0); - _glGenBuffers(1,($32|0)); - $33 = HEAP32[$32>>2]|0; - _glBindBuffer(34962,($33|0)); - $34 = HEAP32[$0>>2]|0; - $35 = ($34*12)|0; - $36 = HEAP32[$29>>2]|0; - _glBufferData(34962,($35|0),($36|0),($$|0)); - _glVertexAttribPointer(2,3,5126,0,0,(0|0)); - _glEnableVertexAttribArray(2); - } - $37 = ((($0)) + 28|0); - $38 = HEAP32[$37>>2]|0; - $39 = ($38|0)==(0|0); - if ($39) { - _glVertexAttrib4f(3,1.0,1.0,1.0,1.0); - _glDisableVertexAttribArray(3); - } else { - $40 = ((($3)) + 12|0); - _glGenBuffers(1,($40|0)); - $41 = HEAP32[$40>>2]|0; - _glBindBuffer(34962,($41|0)); - $42 = HEAP32[$0>>2]|0; - $43 = $42 << 2; - $44 = HEAP32[$37>>2]|0; - _glBufferData(34962,($43|0),($44|0),($$|0)); - _glVertexAttribPointer(3,4,5121,1,0,(0|0)); - _glEnableVertexAttribArray(3); - } - $45 = ((($0)) + 24|0); - $46 = HEAP32[$45>>2]|0; - $47 = ($46|0)==(0|0); - if ($47) { - _glVertexAttrib3f(4,0.0,0.0,0.0); - _glDisableVertexAttribArray(4); - } else { - $48 = ((($3)) + 16|0); - _glGenBuffers(1,($48|0)); - $49 = HEAP32[$48>>2]|0; - _glBindBuffer(34962,($49|0)); - $50 = HEAP32[$0>>2]|0; - $51 = ($50*12)|0; - $52 = HEAP32[$45>>2]|0; - _glBufferData(34962,($51|0),($52|0),($$|0)); - _glVertexAttribPointer(4,3,5126,0,0,(0|0)); - _glEnableVertexAttribArray(4); - } - $53 = ((($0)) + 16|0); - $54 = HEAP32[$53>>2]|0; - $55 = ($54|0)==(0|0); - if ($55) { - _glVertexAttrib2f(5,0.0,0.0); - _glDisableVertexAttribArray(5); - } else { - $56 = ((($3)) + 20|0); - _glGenBuffers(1,($56|0)); - $57 = HEAP32[$56>>2]|0; - _glBindBuffer(34962,($57|0)); - $58 = HEAP32[$0>>2]|0; - $59 = $58 << 3; - $60 = HEAP32[$53>>2]|0; - _glBufferData(34962,($59|0),($60|0),($$|0)); - _glVertexAttribPointer(5,2,5126,0,0,(0|0)); - _glEnableVertexAttribArray(5); - } - $61 = ((($0)) + 32|0); - $62 = HEAP32[$61>>2]|0; - $63 = ($62|0)==(0|0); - if (!($63)) { - $64 = ((($3)) + 24|0); - _glGenBuffers(1,($64|0)); - $65 = HEAP32[$64>>2]|0; - _glBindBuffer(34963,($65|0)); - $66 = ((($0)) + 4|0); - $67 = HEAP32[$66>>2]|0; - $68 = ($67*6)|0; - $69 = HEAP32[$61>>2]|0; - _glBufferData(34963,($68|0),($69|0),35044); - } - $70 = HEAP32[$3>>2]|0; - HEAP32[$5>>2] = $70; - $71 = HEAP32[$23>>2]|0; - HEAP32[$6>>2] = $71; - $72 = ((($3)) + 8|0); - $73 = HEAP32[$72>>2]|0; - HEAP32[$7>>2] = $73; - $74 = ((($3)) + 12|0); - $75 = HEAP32[$74>>2]|0; - HEAP32[$8>>2] = $75; - $76 = ((($3)) + 16|0); - $77 = HEAP32[$76>>2]|0; - HEAP32[$9>>2] = $77; - $78 = ((($3)) + 20|0); - $79 = HEAP32[$78>>2]|0; - HEAP32[$10>>2] = $79; - $80 = ((($3)) + 24|0); - $81 = HEAP32[$80>>2]|0; - HEAP32[$11>>2] = $81; - $82 = HEAP32[4866]|0; - $83 = ($82|0)==(0); - if ($83) { - _TraceLog(0,9917,$vararg_buffer3); - STACKTOP = sp;return; - } - $84 = HEAP32[$2>>2]|0; - $85 = ($84|0)==(0); - if ($85) { - _TraceLog(2,9876,$vararg_buffer1); - STACKTOP = sp;return; - } else { - HEAP32[$4>>2] = $84; - HEAP32[$vararg_buffer>>2] = $84; - _TraceLog(0,9823,$vararg_buffer); - STACKTOP = sp;return; - } -} -function _rlglDrawMesh($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $$ = 0, $$020 = 0, $$byval_copy5 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0; - var $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0.0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0.0, $130 = 0, $131 = 0, $132 = 0; - var $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0; - var $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0.0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0; - var $17 = 0.0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $18 = 0, $19 = 0, $20 = 0.0, $21 = 0.0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0.0, $26 = 0, $27 = 0, $28 = 0; - var $29 = 0, $3 = 0, $30 = 0, $31 = 0.0, $32 = 0.0, $33 = 0, $34 = 0, $35 = 0.0, $36 = 0.0, $37 = 0, $38 = 0, $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0, $42 = 0, $43 = 0.0, $44 = 0.0, $45 = 0, $46 = 0; - var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0.0, $51 = 0.0, $52 = 0, $53 = 0, $54 = 0.0, $55 = 0.0, $56 = 0, $57 = 0, $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0, $61 = 0, $62 = 0.0, $63 = 0.0, $64 = 0; - var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0.0, $75 = 0, $76 = 0.0, $77 = 0, $78 = 0.0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0.0; - var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $modelview$byval_copy4 = 0, dest = 0; - var label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 384|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(384|0); - $$byval_copy5 = sp + 320|0; - $modelview$byval_copy4 = sp + 256|0; - $3 = sp + 192|0; - $4 = sp + 128|0; - $5 = sp + 64|0; - $6 = sp; - $7 = HEAP32[$1>>2]|0; - _glUseProgram(($7|0)); - $8 = ((($1)) + 32|0); - $9 = HEAP32[$8>>2]|0; - $10 = ((($1)) + 116|0); - $11 = HEAP8[$10>>0]|0; - $12 = (+($11&255)); - $13 = $12 / 255.0; - $14 = ((($1)) + 117|0); - $15 = HEAP8[$14>>0]|0; - $16 = (+($15&255)); - $17 = $16 / 255.0; - $18 = ((($1)) + 118|0); - $19 = HEAP8[$18>>0]|0; - $20 = (+($19&255)); - $21 = $20 / 255.0; - $22 = ((($1)) + 119|0); - $23 = HEAP8[$22>>0]|0; - $24 = (+($23&255)); - $25 = $24 / 255.0; - _glUniform4f(($9|0),(+$13),(+$17),(+$21),(+$25)); - $26 = ((($1)) + 36|0); - $27 = HEAP32[$26>>2]|0; - $28 = ($27|0)==(-1); - if (!($28)) { - $29 = ((($1)) + 120|0); - $30 = HEAP8[$29>>0]|0; - $31 = (+($30&255)); - $32 = $31 / 255.0; - $33 = ((($1)) + 121|0); - $34 = HEAP8[$33>>0]|0; - $35 = (+($34&255)); - $36 = $35 / 255.0; - $37 = ((($1)) + 122|0); - $38 = HEAP8[$37>>0]|0; - $39 = (+($38&255)); - $40 = $39 / 255.0; - $41 = ((($1)) + 123|0); - $42 = HEAP8[$41>>0]|0; - $43 = (+($42&255)); - $44 = $43 / 255.0; - _glUniform4f(($27|0),(+$32),(+$36),(+$40),(+$44)); - } - $45 = ((($1)) + 40|0); - $46 = HEAP32[$45>>2]|0; - $47 = ($46|0)==(-1); - if (!($47)) { - $48 = ((($1)) + 124|0); - $49 = HEAP8[$48>>0]|0; - $50 = (+($49&255)); - $51 = $50 / 255.0; - $52 = ((($1)) + 125|0); - $53 = HEAP8[$52>>0]|0; - $54 = (+($53&255)); - $55 = $54 / 255.0; - $56 = ((($1)) + 126|0); - $57 = HEAP8[$56>>0]|0; - $58 = (+($57&255)); - $59 = $58 / 255.0; - $60 = ((($1)) + 127|0); - $61 = HEAP8[$60>>0]|0; - $62 = (+($61&255)); - $63 = $62 / 255.0; - _glUniform4f(($46|0),(+$51),(+$55),(+$59),(+$63)); - } - dest=$3; src=19396; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$4; src=19332; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$modelview$byval_copy4; src=$2; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$$byval_copy5; src=19396; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixMultiply($5,$modelview$byval_copy4,$$byval_copy5); - $64 = HEAP32[$1>>2]|0; - $65 = HEAP32[4874]|0; - $66 = ($64|0)==($65|0); - if (!($66)) { - $67 = (_glGetUniformLocation(($64|0),(9965|0))|0); - $68 = ($67|0)==(-1); - if (!($68)) { - dest=$modelview$byval_copy4; src=$2; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixTranspose($modelview$byval_copy4); - _MatrixInvert($modelview$byval_copy4); - dest=$$byval_copy5; src=$modelview$byval_copy4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - $69 = (_MatrixToFloat($$byval_copy5)|0); - _glUniformMatrix4fv(($67|0),1,0,($69|0)); - } - $70 = HEAP32[$1>>2]|0; - $71 = (_glGetUniformLocation(($70|0),(9977|0))|0); - $72 = ($71|0)==(-1); - if (!($72)) { - $73 = ((($3)) + 8|0); - $74 = +HEAPF32[$73>>2]; - $75 = ((($3)) + 24|0); - $76 = +HEAPF32[$75>>2]; - $77 = ((($3)) + 40|0); - $78 = +HEAPF32[$77>>2]; - _glUniform3f(($71|0),(+$74),(+$76),(+$78)); - } - $79 = (_glGetUniformLocation(($70|0),(9985|0))|0); - $80 = ($79|0)==(-1); - if (!($80)) { - $81 = ((($1)) + 128|0); - $82 = +HEAPF32[$81>>2]; - _glUniform1f(($79|0),(+$82)); - } - } - _glActiveTexture(33984); - $83 = ((($1)) + 56|0); - $84 = HEAP32[$83>>2]|0; - _glBindTexture(3553,($84|0)); - $85 = ((($1)) + 44|0); - $86 = HEAP32[$85>>2]|0; - _glUniform1i(($86|0),0); - $87 = ((($1)) + 76|0); - $88 = HEAP32[$87>>2]|0; - $89 = ($88|0)==(0); - if (!($89)) { - $90 = ((($1)) + 48|0); - $91 = HEAP32[$90>>2]|0; - $92 = ($91|0)==(-1); - if (!($92)) { - $93 = HEAP32[$1>>2]|0; - $94 = (_glGetUniformLocation(($93|0),(9996|0))|0); - _glUniform1i(($94|0),1); - _glActiveTexture(33985); - $95 = HEAP32[$87>>2]|0; - _glBindTexture(3553,($95|0)); - $96 = HEAP32[$90>>2]|0; - _glUniform1i(($96|0),1); - } - } - $97 = ((($1)) + 96|0); - $98 = HEAP32[$97>>2]|0; - $99 = ($98|0)==(0); - if (!($99)) { - $100 = ((($1)) + 52|0); - $101 = HEAP32[$100>>2]|0; - $102 = ($101|0)==(-1); - if (!($102)) { - $103 = HEAP32[$1>>2]|0; - $104 = (_glGetUniformLocation(($103|0),(10006|0))|0); - _glUniform1i(($104|0),1); - _glActiveTexture(33986); - $105 = HEAP32[$97>>2]|0; - _glBindTexture(3553,($105|0)); - $106 = HEAP32[$100>>2]|0; - _glUniform1i(($106|0),2); - } - } - $107 = HEAP32[4866]|0; - $108 = ($107|0)==(0); - if ($108) { - $112 = ((($0)) + 40|0); - $113 = HEAP32[$112>>2]|0; - _glBindBuffer(34962,($113|0)); - $114 = ((($1)) + 4|0); - $115 = HEAP32[$114>>2]|0; - _glVertexAttribPointer(($115|0),3,5126,0,0,(0|0)); - _glEnableVertexAttribArray(($115|0)); - $116 = ((($0)) + 44|0); - $117 = HEAP32[$116>>2]|0; - _glBindBuffer(34962,($117|0)); - $118 = ((($1)) + 8|0); - $119 = HEAP32[$118>>2]|0; - _glVertexAttribPointer(($119|0),2,5126,0,0,(0|0)); - _glEnableVertexAttribArray(($119|0)); - $120 = ((($1)) + 16|0); - $121 = HEAP32[$120>>2]|0; - $122 = ($121|0)==(-1); - if (!($122)) { - $123 = ((($0)) + 48|0); - $124 = HEAP32[$123>>2]|0; - _glBindBuffer(34962,($124|0)); - $125 = HEAP32[$120>>2]|0; - _glVertexAttribPointer(($125|0),3,5126,0,0,(0|0)); - $126 = HEAP32[$120>>2]|0; - _glEnableVertexAttribArray(($126|0)); - } - $127 = ((($1)) + 24|0); - $128 = HEAP32[$127>>2]|0; - $129 = ($128|0)==(-1); - do { - if (!($129)) { - $130 = ((($0)) + 52|0); - $131 = HEAP32[$130>>2]|0; - $132 = ($131|0)==(0); - if ($132) { - _glVertexAttrib4f(($128|0),1.0,1.0,1.0,1.0); - $135 = HEAP32[$127>>2]|0; - _glDisableVertexAttribArray(($135|0)); - break; - } else { - _glBindBuffer(34962,($131|0)); - $133 = HEAP32[$127>>2]|0; - _glVertexAttribPointer(($133|0),4,5121,1,0,(0|0)); - $134 = HEAP32[$127>>2]|0; - _glEnableVertexAttribArray(($134|0)); - break; - } - } - } while(0); - $136 = ((($1)) + 20|0); - $137 = HEAP32[$136>>2]|0; - $138 = ($137|0)==(-1); - if (!($138)) { - $139 = ((($0)) + 56|0); - $140 = HEAP32[$139>>2]|0; - _glBindBuffer(34962,($140|0)); - $141 = HEAP32[$136>>2]|0; - _glVertexAttribPointer(($141|0),3,5126,0,0,(0|0)); - $142 = HEAP32[$136>>2]|0; - _glEnableVertexAttribArray(($142|0)); - } - $143 = ((($1)) + 12|0); - $144 = HEAP32[$143>>2]|0; - $145 = ($144|0)==(-1); - if (!($145)) { - $146 = ((($0)) + 60|0); - $147 = HEAP32[$146>>2]|0; - _glBindBuffer(34962,($147|0)); - $148 = HEAP32[$143>>2]|0; - _glVertexAttribPointer(($148|0),2,5126,0,0,(0|0)); - $149 = HEAP32[$143>>2]|0; - _glEnableVertexAttribArray(($149|0)); - } - $150 = ((($0)) + 32|0); - $151 = HEAP32[$150>>2]|0; - $152 = ($151|0)==(0|0); - if (!($152)) { - $153 = HEAP32[(20796)>>2]|0; - _glBindBuffer(34963,($153|0)); - } - } else { - $109 = HEAP32[4868]|0; - $110 = ((($0)) + 36|0); - $111 = HEAP32[$110>>2]|0; - FUNCTION_TABLE_vi[$109 & 31]($111); - } - $154 = HEAP32[5251]|0; - $155 = ($154|0)!=(0); - $$ = $155 ? 2 : 1; - $156 = ((($1)) + 28|0); - $157 = ((($0)) + 32|0); - $158 = HEAP32[$0>>2]|0; - $159 = ((($0)) + 4|0); - $$020 = 0; - while(1) { - if ($155) { - dest=$modelview$byval_copy4; src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$$byval_copy5; src=$5; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _SetStereoView($$020,$modelview$byval_copy4,$$byval_copy5); - } else { - dest=19396; src=$5; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - } - dest=$modelview$byval_copy4; src=19396; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$$byval_copy5; src=19332; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixMultiply($6,$modelview$byval_copy4,$$byval_copy5); - $162 = HEAP32[$156>>2]|0; - dest=$$byval_copy5; src=$6; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - $163 = (_MatrixToFloat($$byval_copy5)|0); - _glUniformMatrix4fv(($162|0),1,0,($163|0)); - $164 = HEAP32[$157>>2]|0; - $165 = ($164|0)==(0|0); - if ($165) { - _glDrawArrays(4,0,($158|0)); - } else { - $166 = HEAP32[$159>>2]|0; - $167 = ($166*3)|0; - _glDrawElements(4,($167|0),5123,(0|0)); - } - $168 = (($$020) + 1)|0; - $169 = ($168|0)<($$|0); - if ($169) { - $$020 = $168; - } else { - break; - } - } - $160 = HEAP32[$87>>2]|0; - $161 = ($160|0)==(0); - if (!($161)) { - _glActiveTexture(33985); - _glBindTexture(3553,0); - } - $170 = HEAP32[$97>>2]|0; - $171 = ($170|0)==(0); - if (!($171)) { - _glActiveTexture(33986); - _glBindTexture(3553,0); - } - _glActiveTexture(33984); - _glBindTexture(3553,0); - $172 = HEAP32[4866]|0; - $173 = ($172|0)==(0); - if (!($173)) { - $174 = HEAP32[4868]|0; - FUNCTION_TABLE_vi[$174 & 31](0); - _glUseProgram(0); - dest=19332; src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=19396; src=$3; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; - } - _glBindBuffer(34962,0); - $175 = ((($0)) + 32|0); - $176 = HEAP32[$175>>2]|0; - $177 = ($176|0)==(0|0); - if ($177) { - _glUseProgram(0); - dest=19332; src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=19396; src=$3; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; - } - _glBindBuffer(34963,0); - _glUseProgram(0); - dest=19332; src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=19396; src=$3; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; -} -function _rlglUnloadMesh($0) { - $0 = $0|0; - var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; - var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = ((($0)) + 8|0); - $2 = HEAP32[$1>>2]|0; - $3 = ($2|0)==(0|0); - if (!($3)) { - _free($2); - } - $4 = ((($0)) + 12|0); - $5 = HEAP32[$4>>2]|0; - $6 = ($5|0)==(0|0); - if (!($6)) { - _free($5); - } - $7 = ((($0)) + 20|0); - $8 = HEAP32[$7>>2]|0; - $9 = ($8|0)==(0|0); - if (!($9)) { - _free($8); - } - $10 = ((($0)) + 28|0); - $11 = HEAP32[$10>>2]|0; - $12 = ($11|0)==(0|0); - if (!($12)) { - _free($11); - } - $13 = ((($0)) + 24|0); - $14 = HEAP32[$13>>2]|0; - $15 = ($14|0)==(0|0); - if (!($15)) { - _free($14); - } - $16 = ((($0)) + 16|0); - $17 = HEAP32[$16>>2]|0; - $18 = ($17|0)==(0|0); - if (!($18)) { - _free($17); - } - $19 = ((($0)) + 32|0); - $20 = HEAP32[$19>>2]|0; - $21 = ($20|0)==(0|0); - if (!($21)) { - _free($20); - } - $22 = ((($0)) + 40|0); - $23 = HEAP32[$22>>2]|0; - _rlDeleteBuffers($23); - $24 = ((($0)) + 44|0); - $25 = HEAP32[$24>>2]|0; - _rlDeleteBuffers($25); - $26 = ((($0)) + 48|0); - $27 = HEAP32[$26>>2]|0; - _rlDeleteBuffers($27); - $28 = ((($0)) + 52|0); - $29 = HEAP32[$28>>2]|0; - _rlDeleteBuffers($29); - $30 = ((($0)) + 56|0); - $31 = HEAP32[$30>>2]|0; - _rlDeleteBuffers($31); - $32 = ((($0)) + 60|0); - $33 = HEAP32[$32>>2]|0; - _rlDeleteBuffers($33); - $34 = ((($0)) + 64|0); - $35 = HEAP32[$34>>2]|0; - _rlDeleteBuffers($35); - $36 = ((($0)) + 36|0); - $37 = HEAP32[$36>>2]|0; - _rlDeleteVertexArrays($37); - return; -} -function _GetDefaultTexture($0) { - $0 = $0|0; - var $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $$sroa$6$0$$sroa_idx6 = 0, $$sroa$7$0$$sroa_idx8 = 0, $1 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = HEAP32[4873]|0; - HEAP32[$0>>2] = $1; - $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); - HEAP32[$$sroa$4$0$$sroa_idx2>>2] = 1; - $$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0); - HEAP32[$$sroa$5$0$$sroa_idx4>>2] = 1; - $$sroa$6$0$$sroa_idx6 = ((($0)) + 12|0); - HEAP32[$$sroa$6$0$$sroa_idx6>>2] = 1; - $$sroa$7$0$$sroa_idx8 = ((($0)) + 16|0); - HEAP32[$$sroa$7$0$$sroa_idx8>>2] = 7; - return; -} -function _LoadText($0) { - $0 = $0|0; - var $$0 = 0, $$1 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $vararg_buffer = sp; - $1 = ($0|0)==(0|0); - if ($1) { - $$1 = 0; - STACKTOP = sp;return ($$1|0); - } - $2 = (_fopen($0,12319)|0); - $3 = ($2|0)==(0|0); - if ($3) { - HEAP32[$vararg_buffer>>2] = $0; - _TraceLog(2,10018,$vararg_buffer); - $$1 = 0; - STACKTOP = sp;return ($$1|0); - } - (_fseek($2,0,2)|0); - $4 = (_ftell($2)|0); - _rewind($2); - $5 = ($4|0)>(0); - if ($5) { - $6 = (($4) + 1)|0; - $7 = (_malloc($6)|0); - $8 = (_fread($7,1,$4,$2)|0); - $9 = (($7) + ($8)|0); - HEAP8[$9>>0] = 0; - $$0 = $7; - } else { - $$0 = 0; - } - (_fclose($2)|0); - $$1 = $$0; - STACKTOP = sp;return ($$1|0); -} -function _LoadShader($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $10 = 0, $11 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $vararg_buffer = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); - $vararg_buffer = sp; - $3 = sp + 8|0; - dest=$3; stop=dest+56|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); - $4 = (_LoadText($1)|0); - $5 = (_LoadText($2)|0); - $6 = ($4|0)!=(0|0); - $7 = ($5|0)!=(0|0); - $or$cond = $6 & $7; - if ($or$cond) { - $8 = (_LoadShaderProgram($4,$5)|0); - HEAP32[$3>>2] = $8; - $9 = ($8|0)==(0); - if (!($9)) { - _LoadDefaultShaderLocations($3); - } - _free($4); - _free($5); - } - $10 = HEAP32[$3>>2]|0; - $11 = ($10|0)==(0); - if ($11) { - _TraceLog(2,10053,$vararg_buffer); - dest=$3; src=19496; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - } - dest=$0; src=$3; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - STACKTOP = sp;return; -} -function _UnloadShader($0) { - $0 = $0|0; - var $1 = 0, $2 = 0, $3 = 0, $vararg_buffer = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $vararg_buffer = sp; - $1 = HEAP32[$0>>2]|0; - $2 = ($1|0)==(0); - if ($2) { - STACKTOP = sp;return; - } - _rlDeleteShader($1); - $3 = HEAP32[$0>>2]|0; - HEAP32[$vararg_buffer>>2] = $3; - _TraceLog(0,10087,$vararg_buffer); - STACKTOP = sp;return; -} -function _BeginShaderMode($0) { - $0 = $0|0; - var $1 = 0, $2 = 0, $3 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - $1 = HEAP32[4888]|0; - $2 = HEAP32[$0>>2]|0; - $3 = ($1|0)==($2|0); - if ($3) { - return; - } - _rlglDraw(); - dest=19552; src=$0; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - return; -} -function _EndShaderMode() { - var $defaultShader$byval_copy = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); - $defaultShader$byval_copy = sp; - dest=$defaultShader$byval_copy; src=19496; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _BeginShaderMode($defaultShader$byval_copy); - STACKTOP = sp;return; -} -function _GetDefaultShader($0) { - $0 = $0|0; - var dest = 0, label = 0, sp = 0, src = 0, stop = 0; - sp = STACKTOP; - dest=$0; src=19496; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - return; -} -function _stbi__err($0) { - $0 = $0|0; - var label = 0, sp = 0; - sp = STACKTOP; - HEAP32[5344] = $0; - return; -} -function _stbi_load_from_file($0,$1,$2,$3,$4) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - $3 = $3|0; - $4 = $4|0; - var $10 = 0, $11 = 0, $12 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 192|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(192|0); - $5 = sp; - _stbi__start_file($5,$0); - $6 = (_stbi__load_and_postprocess_8bit($5,$1,$2,$3,$4)|0); - $7 = ($6|0)==(0|0); - if ($7) { - STACKTOP = sp;return ($6|0); - } - $8 = ((($5)) + 172|0); - $9 = HEAP32[$8>>2]|0; - $10 = ((($5)) + 168|0); - $11 = HEAP32[$10>>2]|0; - $12 = (($11) - ($9))|0; - (_fseek($0,$12,1)|0); - STACKTOP = sp;return ($6|0); -} -function _stbi__start_file($0,$1) { - $0 = $0|0; - $1 = $1|0; - var label = 0, sp = 0; - sp = STACKTOP; - _stbi__start_callbacks($0,3172,$1); - return; -} -function _stbi__load_and_postprocess_8bit($0,$1,$2,$3,$4) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - $3 = $3|0; - $4 = $4|0; - var $$0 = 0, $$070 = 0, $$07175 = 0, $$07276 = 0, $$07378 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; - var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $5 = 0, $6 = 0; - var $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $exitcond79 = 0, $exitcond80 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $5 = sp; - $6 = (_stbi__load_main($0,$1,$2,$3,$4,$5)|0); - $7 = ($6|0)==(0|0); - if ($7) { - $$0 = 0; - STACKTOP = sp;return ($$0|0); - } - $8 = HEAP32[$5>>2]|0; - switch ($8|0) { - case 8: { - $$070 = $6; - break; - } - case 16: { - label = 4; - break; - } - default: { - ___assert_fail((10129|0),(10155|0),1041,(10178|0)); - // unreachable; - } - } - if ((label|0) == 4) { - $9 = HEAP32[$1>>2]|0; - $10 = HEAP32[$2>>2]|0; - $11 = ($4|0)==(0); - if ($11) { - $12 = HEAP32[$3>>2]|0; - $13 = $12; - } else { - $13 = $4; - } - $14 = (_stbi__convert_16_to_8($6,$9,$10,$13)|0); - HEAP32[$5>>2] = 8; - $$070 = $14; - } - $15 = HEAP32[5345]|0; - $16 = ($15|0)==(0); - if ($16) { - $$0 = $$070; - STACKTOP = sp;return ($$0|0); - } - $17 = HEAP32[$1>>2]|0; - $18 = HEAP32[$2>>2]|0; - $19 = ($4|0)==(0); - if ($19) { - $20 = HEAP32[$3>>2]|0; - $25 = $20; - } else { - $25 = $4; - } - $21 = $18 >> 1; - $22 = ($21|0)>(0); - if (!($22)) { - $$0 = $$070; - STACKTOP = sp;return ($$0|0); - } - $23 = ($17|0)>(0); - $24 = ($25|0)>(0); - $26 = (($18) + -1)|0; - $$07378 = 0; - while(1) { - if ($23) { - $27 = Math_imul($$07378, $17)|0; - $28 = (($26) - ($$07378))|0; - $29 = Math_imul($28, $17)|0; - $$07276 = 0; - while(1) { - if ($24) { - $30 = (($$07276) + ($27))|0; - $31 = Math_imul($30, $25)|0; - $32 = (($$07276) + ($29))|0; - $33 = Math_imul($32, $25)|0; - $$07175 = 0; - while(1) { - $34 = (($$07175) + ($31))|0; - $35 = (($$070) + ($34)|0); - $36 = HEAP8[$35>>0]|0; - $37 = (($$07175) + ($33))|0; - $38 = (($$070) + ($37)|0); - $39 = HEAP8[$38>>0]|0; - HEAP8[$35>>0] = $39; - HEAP8[$38>>0] = $36; - $40 = (($$07175) + 1)|0; - $exitcond = ($40|0)==($25|0); - if ($exitcond) { - break; - } else { - $$07175 = $40; - } - } - } - $41 = (($$07276) + 1)|0; - $exitcond79 = ($41|0)==($17|0); - if ($exitcond79) { - break; - } else { - $$07276 = $41; - } - } - } - $42 = (($$07378) + 1)|0; - $exitcond80 = ($42|0)==($21|0); - if ($exitcond80) { - $$0 = $$070; - break; - } else { - $$07378 = $42; - } - } - STACKTOP = sp;return ($$0|0); -} -function _stbi__load_main($0,$1,$2,$3,$4,$5) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - $3 = $3|0; - $4 = $4|0; - $5 = $5|0; - var $$0 = 0, $10 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - HEAP32[$5>>2] = 8; - $6 = ((($5)) + 8|0); - HEAP32[$6>>2] = 0; - $7 = ((($5)) + 4|0); - HEAP32[$7>>2] = 0; - $8 = (_stbi__png_test($0)|0); - $9 = ($8|0)==(0); - if ($9) { - _stbi__err(10219); - $$0 = 0; - return ($$0|0); - } else { - $10 = (_stbi__png_load($0,$1,$2,$3,$4,$5)|0); - $$0 = $10; - return ($$0|0); - } - return (0)|0; -} -function _stbi__convert_16_to_8($0,$1,$2,$3) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - $3 = $3|0; - var $$0 = 0, $$01819 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; - sp = STACKTOP; - $4 = Math_imul($2, $1)|0; - $5 = Math_imul($4, $3)|0; - $6 = (_stbi__malloc($5)|0); - $7 = ($6|0)==(0|0); - if ($7) { - _stbi__err(10210); - $$0 = 0; - return ($$0|0); - } - $8 = ($5|0)>(0); - if ($8) { - $$01819 = 0; - while(1) { - $9 = (($0) + ($$01819<<1)|0); - $10 = HEAP16[$9>>1]|0; - $11 = ($10&65535) >>> 8; - $12 = $11&255; - $13 = (($6) + ($$01819)|0); - HEAP8[$13>>0] = $12; - $14 = (($$01819) + 1)|0; - $exitcond = ($14|0)==($5|0); - if ($exitcond) { - break; - } else { - $$01819 = $14; - } - } - } - _free($0); - $$0 = $6; - return ($$0|0); -} -function _stbi__malloc($0) { - $0 = $0|0; - var $1 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = (_malloc($0)|0); - return ($1|0); -} -function _stbi__png_test($0) { - $0 = $0|0; - var $1 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = (_stbi__check_png_header($0)|0); - _stbi__rewind($0); - return ($1|0); -} -function _stbi__png_load($0,$1,$2,$3,$4,$5) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - $3 = $3|0; - $4 = $4|0; - $5 = $5|0; - var $6 = 0, $7 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); - $6 = sp; - HEAP32[$6>>2] = $0; - $7 = (_stbi__do_png($6,$1,$2,$3,$4,$5)|0); - STACKTOP = sp;return ($7|0); -} -function _stbi__do_png($0,$1,$2,$3,$4,$5) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - $3 = $3|0; - $4 = $4|0; - $5 = $5|0; - var $$ = 0, $$0 = 0, $$045 = 0, $$1 = 0, $$2 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; - var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $6 = 0, $7 = 0, $8 = 0; - var $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $6 = ($4>>>0)>(4); - if ($6) { - _stbi__err(10238); - $$045 = 0; - return ($$045|0); - } - $7 = (_stbi__parse_png_file($0,0,$4)|0); - $8 = ($7|0)==(0); - if ($8) { - $$2 = 0; - } else { - $9 = ((($0)) + 16|0); - $10 = HEAP32[$9>>2]|0; - $11 = ($10|0)>(8); - $$ = $11 ? $10 : 8; - HEAP32[$5>>2] = $$; - $12 = ((($0)) + 12|0); - $13 = HEAP32[$12>>2]|0; - HEAP32[$12>>2] = 0; - $14 = ($4|0)==(0); - if ($14) { - $$1 = $13; - } else { - $15 = HEAP32[$0>>2]|0; - $16 = ((($15)) + 12|0); - $17 = HEAP32[$16>>2]|0; - $18 = ($17|0)==($4|0); - if ($18) { - $$1 = $13; - } else { - $19 = HEAP32[$5>>2]|0; - $20 = ($19|0)==(8); - $21 = ((($15)) + 4|0); - $22 = HEAP32[$21>>2]|0; - $23 = HEAP32[$15>>2]|0; - if ($20) { - $24 = (_stbi__convert_format($13,$17,$4,$23,$22)|0); - $$0 = $24; - } else { - $25 = (_stbi__convert_format16($13,$17,$4,$23,$22)|0); - $$0 = $25; - } - $26 = HEAP32[$0>>2]|0; - $27 = ((($26)) + 12|0); - HEAP32[$27>>2] = $4; - $28 = ($$0|0)==(0|0); - if ($28) { - $$045 = 0; - return ($$045|0); - } else { - $$1 = $$0; - } - } - } - $29 = HEAP32[$0>>2]|0; - $30 = HEAP32[$29>>2]|0; - HEAP32[$1>>2] = $30; - $31 = ((($29)) + 4|0); - $32 = HEAP32[$31>>2]|0; - HEAP32[$2>>2] = $32; - $33 = ($3|0)==(0|0); - if ($33) { - $$2 = $$1; - } else { - $34 = ((($29)) + 8|0); - $35 = HEAP32[$34>>2]|0; - HEAP32[$3>>2] = $35; - $$2 = $$1; - } - } - $36 = ((($0)) + 12|0); - $37 = HEAP32[$36>>2]|0; - _free($37); - HEAP32[$36>>2] = 0; - $38 = ((($0)) + 8|0); - $39 = HEAP32[$38>>2]|0; - _free($39); - HEAP32[$38>>2] = 0; - $40 = ((($0)) + 4|0); - $41 = HEAP32[$40>>2]|0; - _free($41); - HEAP32[$40>>2] = 0; - $$045 = $$2; - return ($$045|0); -} -function _stbi__parse_png_file($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $$ = 0, $$$0217 = 0, $$0206 = 0, $$0211 = 0, $$0214 = 0, $$0217 = 0, $$0226593 = 0, $$0228 = 0, $$0231 = 0, $$0235 = 0, $$0239591 = 0, $$0241 = 0, $$0245 = 0, $$1207 = 0, $$1212 = 0, $$1215 = 0, $$1218 = 0, $$1227588 = 0, $$1229 = 0, $$1240589 = 0; - var $$1246 = 0, $$2219 = 0, $$2233 = 0, $$2237 = 0, $$2243 = 0, $$254 = 0, $$3209 = 0, $$3220 = 0, $$4 = 0, $$6$ph = 0, $$7 = 0, $$lobit = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0; - var $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0; - var $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0; - var $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0; - var $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0; - var $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0; - var $198 = 0, $199 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $22 = 0, $23 = 0; - var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0; - var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0; - var $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0; - var $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0; - var $97 = 0, $98 = 0, $99 = 0, $notlhs = 0, $notrhs = 0, $or$cond = 0, $or$cond11 = 0, $or$cond248 = 0, $or$cond5$not = 0, $or$cond7 = 0, $switch$split112D = 0, $switch$split142D = 0, $switch$split2D = 0, $switch$split52D = 0, $switch$split82D = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 1056|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(1056|0); - $3 = sp + 32|0; - $4 = sp + 22|0; - $5 = sp + 16|0; - $6 = sp + 8|0; - $7 = sp; - $8 = HEAP32[$0>>2]|0; - $9 = ((($0)) + 8|0); - HEAP32[$9>>2] = 0; - $10 = ((($0)) + 4|0); - HEAP32[$10>>2] = 0; - $11 = ((($0)) + 12|0); - HEAP32[$11>>2] = 0; - $12 = (_stbi__check_png_header($8)|0); - $13 = ($12|0)==(0); - if ($13) { - $$7 = 0; - STACKTOP = sp;return ($$7|0); - } - $14 = ($1|0)==(1); - if ($14) { - $$7 = 1; - STACKTOP = sp;return ($$7|0); - } - $15 = ((($6)) + 4|0); - $16 = ((($8)) + 4|0); - $17 = ((($0)) + 16|0); - $18 = ((($8)) + 8|0); - $19 = ($1|0)==(2); - $20 = ((($8)) + 8|0); - $21 = ((($8)) + 8|0); - $22 = ((($0)) + 16|0); - $23 = ($1|0)==(2); - $24 = ($1|0)==(2); - $$0206 = 0;$$0211 = 0;$$0214 = 0;$$0217 = 0;$$0228 = 0;$$0231 = 0;$$0235 = 0;$$0241 = 1;$$0245 = 0; - L7: while(1) { - _stbi__get_chunk_header($6,$8); - $25 = HEAP32[$15>>2]|0; - $switch$split2D = ($25|0)<(1229472850); - L9: do { - if ($switch$split2D) { - $switch$split52D = ($25|0)<(1229209940); - if ($switch$split52D) { - switch ($25|0) { - case 1130840649: { - break; - } - default: { - label = 103; - break L9; - } - } - $26 = HEAP32[$6>>2]|0; - _stbi__skip($8,$26); - $$1212 = $$0211;$$1215 = $$0214;$$1229 = 1;$$1246 = $$0245;$$2233 = $$0231;$$2237 = $$0235;$$2243 = $$0241;$$3209 = $$0206;$$3220 = $$0217; - break; - } - $switch$split112D = ($25|0)<(1229278788); - if (!($switch$split112D)) { - switch ($25|0) { - case 1229278788: { - label = 85; - break L7; - break; - } - default: { - label = 103; - break L9; - } - } - } - switch ($25|0) { - case 1229209940: { - break; - } - default: { - label = 103; - break L9; - } - } - $130 = ($$0241|0)==(0); - if (!($130)) { - label = 70; - break L7; - } - $131 = ($$0206<<24>>24)==(0); - $132 = ($$0245|0)!=(0); - $or$cond = $132 | $131; - if (!($or$cond)) { - label = 72; - break L7; - } - if ($24) { - label = 74; - break L7; - } - $135 = HEAP32[$6>>2]|0; - $136 = (($135) + ($$0214))|0; - $137 = ($136|0)<($$0214|0); - if ($137) { - $$6$ph = 0; - break L7; - } - $138 = ($136>>>0)>($$0217>>>0); - if ($138) { - $139 = ($$0217|0)==(0); - $140 = ($135>>>0)>(4096); - $141 = $140 ? $135 : 4096; - $$$0217 = $139 ? $141 : $$0217; - $142 = HEAP32[$6>>2]|0; - $143 = (($142) + ($$0214))|0; - $$1218 = $$$0217; - while(1) { - $144 = ($143>>>0)>($$1218>>>0); - $145 = $$1218 << 1; - if ($144) { - $$1218 = $145; - } else { - break; - } - } - $146 = HEAP32[$10>>2]|0; - $147 = (_realloc($146,$$1218)|0); - $148 = ($147|0)==(0|0); - if ($148) { - label = 81; - break L7; - } - HEAP32[$10>>2] = $147; - $$2219 = $$1218; - } else { - $$2219 = $$0217; - } - $149 = HEAP32[$10>>2]|0; - $150 = (($149) + ($$0214)|0); - $151 = HEAP32[$6>>2]|0; - $152 = (_stbi__getn($8,$150,$151)|0); - $153 = ($152|0)==(0); - if ($153) { - label = 83; - break L7; - } - $154 = HEAP32[$6>>2]|0; - $155 = (($154) + ($$0214))|0; - $$1212 = $$0211;$$1215 = $155;$$1229 = $$0228;$$1246 = $$0245;$$2233 = $$0231;$$2237 = $$0235;$$2243 = $$0241;$$3209 = $$0206;$$3220 = $$2219; - } else { - $switch$split82D = ($25|0)<(1347179589); - if ($switch$split82D) { - switch ($25|0) { - case 1229472850: { - break; - } - default: { - label = 103; - break L9; - } - } - $27 = ($$0241|0)==(0); - if ($27) { - label = 7; - break L7; - } - $28 = HEAP32[$6>>2]|0; - $29 = ($28|0)==(13); - if (!($29)) { - label = 9; - break L7; - } - $30 = (_stbi__get32be($8)|0); - HEAP32[$8>>2] = $30; - $31 = ($30>>>0)>(16777216); - if ($31) { - label = 11; - break L7; - } - $32 = (_stbi__get32be($8)|0); - HEAP32[$16>>2] = $32; - $33 = ($32>>>0)>(16777216); - if ($33) { - label = 13; - break L7; - } - $34 = (_stbi__get8($8)|0); - $35 = $34&255; - HEAP32[$17>>2] = $35; - switch ($34<<24>>24) { - case 16: case 8: case 4: case 2: case 1: { - break; - } - default: { - label = 15; - break L7; - } - } - $36 = (_stbi__get8($8)|0); - $37 = $36&255; - $38 = ($36&255)>(6); - if ($38) { - label = 17; - break L7; - } - $39 = ($36<<24>>24)==(3); - if ($39) { - $40 = HEAP32[$17>>2]|0; - $41 = ($40|0)==(16); - if ($41) { - label = 20; - break L7; - } else { - $$1207 = 3; - } - } else { - $42 = $37 & 1; - $43 = ($42|0)==(0); - if ($43) { - $$1207 = $$0206; - } else { - label = 22; - break L7; - } - } - $44 = (_stbi__get8($8)|0); - $45 = ($44<<24>>24)==(0); - if (!($45)) { - label = 24; - break L7; - } - $46 = (_stbi__get8($8)|0); - $47 = ($46<<24>>24)==(0); - if (!($47)) { - label = 26; - break L7; - } - $48 = (_stbi__get8($8)|0); - $49 = $48&255; - $50 = ($48&255)>(1); - if ($50) { - label = 28; - break L7; - } - $51 = HEAP32[$8>>2]|0; - $52 = ($51|0)==(0); - if ($52) { - label = 31; - break L7; - } - $53 = HEAP32[$16>>2]|0; - $54 = ($53|0)==(0); - if ($54) { - label = 31; - break L7; - } - $55 = ($$1207<<24>>24)==(0); - $56 = (1073741824 / ($51>>>0))&-1; - if (!($55)) { - HEAP32[$20>>2] = 1; - $63 = $56 >>> 2; - $64 = ($63>>>0)<($53>>>0); - if ($64) { - label = 37; - break L7; - } else { - $$1212 = $$0211;$$1215 = $$0214;$$1229 = $$0228;$$1246 = $$0245;$$2233 = $37;$$2237 = $49;$$2243 = 0;$$3209 = $$1207;$$3220 = $$0217; - break; - } - } - $57 = $37 & 2; - $58 = $57 | 1; - $59 = $37 >>> 2; - $$lobit = $59 & 1; - $60 = (($58) + ($$lobit))|0; - HEAP32[$18>>2] = $60; - $61 = (($56>>>0) / ($60>>>0))&-1; - $62 = ($61>>>0)<($53>>>0); - if ($62) { - label = 34; - break L7; - } - if ($19) { - $$6$ph = 1; - break L7; - } else { - $$1212 = $$0211;$$1215 = $$0214;$$1229 = $$0228;$$1246 = $$0245;$$2233 = $37;$$2237 = $49;$$2243 = 0;$$3209 = 0;$$3220 = $$0217; - break; - } - } - $switch$split142D = ($25|0)<(1951551059); - if ($switch$split142D) { - switch ($25|0) { - case 1347179589: { - break; - } - default: { - label = 103; - break L9; - } - } - $65 = ($$0241|0)==(0); - if (!($65)) { - label = 39; - break L7; - } - $66 = HEAP32[$6>>2]|0; - $67 = ($66>>>0)>(768); - if ($67) { - label = 41; - break L7; - } - $68 = (($66>>>0) / 3)&-1; - $69 = ($68*3)|0; - $70 = ($69|0)==($66|0); - if (!($70)) { - label = 44; - break L7; - } - $71 = ($66>>>0)>(2); - if ($71) { - $$0226593 = 0; - } else { - $$1212 = $$0211;$$1215 = $$0214;$$1229 = $$0228;$$1246 = $68;$$2233 = $$0231;$$2237 = $$0235;$$2243 = 0;$$3209 = $$0206;$$3220 = $$0217; - break; - } - while(1) { - $72 = (_stbi__get8($8)|0); - $73 = $$0226593 << 2; - $74 = (($3) + ($73)|0); - HEAP8[$74>>0] = $72; - $75 = (_stbi__get8($8)|0); - $76 = $73 | 1; - $77 = (($3) + ($76)|0); - HEAP8[$77>>0] = $75; - $78 = (_stbi__get8($8)|0); - $79 = $73 | 2; - $80 = (($3) + ($79)|0); - HEAP8[$80>>0] = $78; - $81 = $73 | 3; - $82 = (($3) + ($81)|0); - HEAP8[$82>>0] = -1; - $83 = (($$0226593) + 1)|0; - $84 = ($83>>>0)<($68>>>0); - if ($84) { - $$0226593 = $83; - } else { - $$1212 = $$0211;$$1215 = $$0214;$$1229 = $$0228;$$1246 = $68;$$2233 = $$0231;$$2237 = $$0235;$$2243 = $$0241;$$3209 = $$0206;$$3220 = $$0217; - break L9; - } - } - } - switch ($25|0) { - case 1951551059: { - break; - } - default: { - label = 103; - break L9; - } - } - $85 = ($$0241|0)==(0); - if (!($85)) { - label = 47; - break L7; - } - $86 = HEAP32[$10>>2]|0; - $87 = ($86|0)==(0|0); - if (!($87)) { - label = 49; - break L7; - } - $88 = ($$0206<<24>>24)==(0); - if (!($88)) { - if ($23) { - label = 52; - break L7; - } - $90 = ($$0245|0)==(0); - if ($90) { - label = 54; - break L7; - } - $91 = HEAP32[$6>>2]|0; - $92 = ($91>>>0)>($$0245>>>0); - if ($92) { - label = 58; - break L7; - } - $93 = HEAP32[$6>>2]|0; - $94 = ($93|0)==(0); - if ($94) { - $$1212 = $$0211;$$1215 = $$0214;$$1229 = $$0228;$$1246 = $$0245;$$2233 = $$0231;$$2237 = $$0235;$$2243 = 0;$$3209 = 4;$$3220 = $$0217; - break; - } - $95 = HEAP32[$6>>2]|0; - $$1227588 = 0; - while(1) { - $96 = (_stbi__get8($8)|0); - $97 = $$1227588 << 2; - $98 = $97 | 3; - $99 = (($3) + ($98)|0); - HEAP8[$99>>0] = $96; - $100 = (($$1227588) + 1)|0; - $101 = ($100>>>0)<($95>>>0); - if ($101) { - $$1227588 = $100; - } else { - $$1212 = $$0211;$$1215 = $$0214;$$1229 = $$0228;$$1246 = $$0245;$$2233 = $$0231;$$2237 = $$0235;$$2243 = $$0241;$$3209 = 4;$$3220 = $$0217; - break L9; - } - } - } - $102 = HEAP32[$21>>2]|0; - $103 = $102 & 1; - $104 = ($103|0)==(0); - if ($104) { - label = 61; - break L7; - } - $105 = HEAP32[$6>>2]|0; - $106 = $102 << 1; - $107 = ($105|0)==($106|0); - if (!($107)) { - label = 63; - break L7; - } - $108 = HEAP32[$22>>2]|0; - $109 = ($108|0)==(16); - $110 = HEAP32[$21>>2]|0; - $111 = ($110|0)>(0); - if ($109) { - if ($111) { - $$0239591 = 0; - } else { - $$1212 = 1;$$1215 = $$0214;$$1229 = $$0228;$$1246 = $$0245;$$2233 = $$0231;$$2237 = $$0235;$$2243 = 0;$$3209 = 0;$$3220 = $$0217; - break; - } - while(1) { - $112 = (_stbi__get16be($8)|0); - $113 = $112&65535; - $114 = (($5) + ($$0239591<<1)|0); - HEAP16[$114>>1] = $113; - $115 = (($$0239591) + 1)|0; - $116 = HEAP32[$21>>2]|0; - $117 = ($115|0)<($116|0); - if ($117) { - $$0239591 = $115; - } else { - $$1212 = 1;$$1215 = $$0214;$$1229 = $$0228;$$1246 = $$0245;$$2233 = $$0231;$$2237 = $$0235;$$2243 = $$0241;$$3209 = $$0206;$$3220 = $$0217; - break; - } - } - } else { - if ($111) { - $$1240589 = 0; - } else { - $$1212 = 1;$$1215 = $$0214;$$1229 = $$0228;$$1246 = $$0245;$$2233 = $$0231;$$2237 = $$0235;$$2243 = 0;$$3209 = 0;$$3220 = $$0217; - break; - } - while(1) { - $118 = (_stbi__get16be($8)|0); - $119 = $118 & 255; - $120 = HEAP32[$22>>2]|0; - $121 = (10554 + ($120)|0); - $122 = HEAP8[$121>>0]|0; - $123 = $122&255; - $124 = Math_imul($123, $119)|0; - $125 = $124&255; - $126 = (($4) + ($$1240589)|0); - HEAP8[$126>>0] = $125; - $127 = (($$1240589) + 1)|0; - $128 = HEAP32[$21>>2]|0; - $129 = ($127|0)<($128|0); - if ($129) { - $$1240589 = $127; - } else { - $$1212 = 1;$$1215 = $$0214;$$1229 = $$0228;$$1246 = $$0245;$$2233 = $$0231;$$2237 = $$0235;$$2243 = $$0241;$$3209 = $$0206;$$3220 = $$0217; - break; - } - } - } - } - } while(0); - if ((label|0) == 103) { - label = 0; - $202 = ($$0241|0)==(0); - if (!($202)) { - label = 104; - break; - } - $203 = $25 & 536870912; - $204 = ($203|0)==(0); - if ($204) { - label = 106; - break; - } - $213 = HEAP32[$6>>2]|0; - _stbi__skip($8,$213); - $$1212 = $$0211;$$1215 = $$0214;$$1229 = $$0228;$$1246 = $$0245;$$2233 = $$0231;$$2237 = $$0235;$$2243 = 0;$$3209 = $$0206;$$3220 = $$0217; - } - (_stbi__get32be($8)|0); - $$0206 = $$3209;$$0211 = $$1212;$$0214 = $$1215;$$0217 = $$3220;$$0228 = $$1229;$$0231 = $$2233;$$0235 = $$2237;$$0241 = $$2243;$$0245 = $$1246; - } - switch (label|0) { - case 7: { - _stbi__err(10328); - $$6$ph = 0; - break; - } - case 9: { - _stbi__err(10342); - $$6$ph = 0; - break; - } - case 11: { - _stbi__err(10355); - $$6$ph = 0; - break; - } - case 13: { - _stbi__err(10355); - $$6$ph = 0; - break; - } - case 15: { - _stbi__err(10365); - $$6$ph = 0; - break; - } - case 17: { - _stbi__err(10385); - $$6$ph = 0; - break; - } - case 20: { - _stbi__err(10385); - $$6$ph = 0; - break; - } - case 22: { - _stbi__err(10385); - $$6$ph = 0; - break; - } - case 24: { - _stbi__err(10395); - $$6$ph = 0; - break; - } - case 26: { - _stbi__err(10411); - $$6$ph = 0; - break; - } - case 28: { - _stbi__err(10429); - $$6$ph = 0; - break; - } - case 31: { - _stbi__err(10450); - $$6$ph = 0; - break; - } - case 34: { - _stbi__err(10355); - $$6$ph = 0; - break; - } - case 37: { - _stbi__err(10355); - $$6$ph = 0; - break; - } - case 39: { - _stbi__err(10464); - $$6$ph = 0; - break; - } - case 41: { - _stbi__err(10479); - $$6$ph = 0; - break; - } - case 44: { - _stbi__err(10479); - $$6$ph = 0; - break; - } - case 47: { - _stbi__err(10464); - $$6$ph = 0; - break; - } - case 49: { - _stbi__err(10492); - $$6$ph = 0; - break; - } - case 52: { - $89 = ((($8)) + 8|0); - HEAP32[$89>>2] = 4; - $$6$ph = 1; - break; - } - case 54: { - _stbi__err(10508); - $$6$ph = 0; - break; - } - case 58: { - _stbi__err(10525); - $$6$ph = 0; - break; - } - case 61: { - _stbi__err(10538); - $$6$ph = 0; - break; - } - case 63: { - _stbi__err(10525); - $$6$ph = 0; - break; - } - case 70: { - _stbi__err(10464); - $$6$ph = 0; - break; - } - case 72: { - _stbi__err(10563); - $$6$ph = 0; - break; - } - case 74: { - $133 = $$0206&255; - $134 = ((($8)) + 8|0); - HEAP32[$134>>2] = $133; - $$6$ph = 1; - break; - } - case 81: { - _stbi__err(10210); - $$6$ph = 0; - break; - } - case 83: { - _stbi__err(10571); - $$6$ph = 0; - break; - } - case 85: { - $156 = ($$0241|0)==(0); - do { - if ($156) { - $157 = ($1|0)==(0); - if ($157) { - $158 = HEAP32[$10>>2]|0; - $159 = ($158|0)==(0|0); - if ($159) { - _stbi__err(10581); - $$4 = 0; - break; - } - $160 = HEAP32[$8>>2]|0; - $161 = ((($0)) + 16|0); - $162 = HEAP32[$161>>2]|0; - $163 = Math_imul($162, $160)|0; - $164 = (($163) + 7)|0; - $165 = $164 >>> 3; - $166 = ((($8)) + 4|0); - $167 = HEAP32[$166>>2]|0; - $168 = ((($8)) + 8|0); - $169 = HEAP32[$168>>2]|0; - $170 = Math_imul($169, $167)|0; - $171 = Math_imul($170, $165)|0; - $172 = (($171) + ($167))|0; - HEAP32[$7>>2] = $172; - $173 = ($$0228|0)!=(0); - $174 = $173 ^ 1; - $175 = $174&1; - $176 = (_stbi_zlib_decode_malloc_guesssize_headerflag($158,$$0214,$172,$7,$175)|0); - HEAP32[$9>>2] = $176; - $177 = ($176|0)==(0|0); - if ($177) { - $$4 = 0; - } else { - $178 = HEAP32[$10>>2]|0; - _free($178); - HEAP32[$10>>2] = 0; - $179 = HEAP32[$168>>2]|0; - $180 = (($179) + 1)|0; - $notlhs = ($180|0)!=($2|0); - $notrhs = ($2|0)==(3); - $or$cond5$not = $notrhs | $notlhs; - $181 = ($$0206<<24>>24)!=(0); - $or$cond7 = $181 | $or$cond5$not; - $182 = ($$0211<<24>>24)==(0); - $or$cond248 = $182 & $or$cond7; - $$254 = $or$cond248 ? $179 : $180; - $183 = ((($8)) + 12|0); - HEAP32[$183>>2] = $$254; - $184 = HEAP32[$9>>2]|0; - $185 = HEAP32[$7>>2]|0; - $186 = HEAP32[$161>>2]|0; - $187 = (_stbi__create_png_image($0,$184,$185,$$254,$186,$$0231,$$0235)|0); - $188 = ($187|0)==(0); - if ($188) { - $$4 = 0; - } else { - do { - if (!($182)) { - $189 = HEAP32[$161>>2]|0; - $190 = ($189|0)==(16); - if ($190) { - $191 = HEAP32[$183>>2]|0; - _stbi__compute_transparency16($0,$5,$191); - break; - } else { - $192 = HEAP32[$183>>2]|0; - _stbi__compute_transparency($0,$4,$192); - break; - } - } - } while(0); - $193 = HEAP32[5346]|0; - $194 = ($193|0)!=(0); - $or$cond11 = $173 & $194; - if ($or$cond11) { - $195 = HEAP32[$183>>2]|0; - $196 = ($195|0)>(2); - if ($196) { - _stbi__de_iphone($0); - } - } - if ($181) { - $197 = $$0206&255; - HEAP32[$168>>2] = $197; - $198 = ($2|0)>(2); - $$ = $198 ? $2 : $197; - HEAP32[$183>>2] = $$; - $199 = (_stbi__expand_png_palette($0,$3,$$)|0); - $200 = ($199|0)==(0); - if ($200) { - $$4 = 0; - break; - } - } - $201 = HEAP32[$9>>2]|0; - _free($201); - HEAP32[$9>>2] = 0; - $$4 = 1; - } - } - } else { - $$4 = 1; - } - } else { - _stbi__err(10464); - $$4 = 0; - } - } while(0); - $$6$ph = $$4; - break; - } - case 104: { - _stbi__err(10464); - $$6$ph = 0; - break; - } - case 106: { - $205 = $25 >>> 24; - $206 = $205&255; - HEAP8[10589] = $206; - $207 = HEAP32[$15>>2]|0; - $208 = $207 >>> 16; - $209 = $208&255; - HEAP8[(10590)>>0] = $209; - $210 = $207 >>> 8; - $211 = $210&255; - HEAP8[(10591)>>0] = $211; - $212 = $207&255; - HEAP8[(10592)>>0] = $212; - _stbi__err(10589); - $$6$ph = 0; - break; - } - } - $$7 = $$6$ph; - STACKTOP = sp;return ($$7|0); -} -function _stbi__convert_format($0,$1,$2,$3,$4) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - $3 = $3|0; - $4 = $4|0; - var $$0151255 = 0, $$0163 = 0, $$0164259 = 0, $$0165 = 0, $$0165254 = 0, $$0165257 = 0, $$0256 = 0, $$10161205 = 0, $$10175 = 0, $$10175204 = 0, $$10175207 = 0, $$10206 = 0, $$11162201 = 0, $$11176 = 0, $$11176200 = 0, $$11176203 = 0, $$11202 = 0, $$1152250 = 0, $$1166 = 0, $$1166249 = 0; - var $$1166252 = 0, $$1251 = 0, $$2153245 = 0, $$2167 = 0, $$2167244 = 0, $$2167247 = 0, $$2246 = 0, $$3154240 = 0, $$3168 = 0, $$3168239 = 0, $$3168242 = 0, $$3241 = 0, $$4155235 = 0, $$4169 = 0, $$4169234 = 0, $$4169237 = 0, $$4236 = 0, $$5156230 = 0, $$5170 = 0, $$5170229 = 0; - var $$5170232 = 0, $$5231 = 0, $$6157225 = 0, $$6171 = 0, $$6171224 = 0, $$6171227 = 0, $$6226 = 0, $$7158220 = 0, $$7172 = 0, $$7172219 = 0, $$7172222 = 0, $$7221 = 0, $$8159215 = 0, $$8173 = 0, $$8173214 = 0, $$8173217 = 0, $$8216 = 0, $$9160210 = 0, $$9174 = 0, $$9174209 = 0; - var $$9174212 = 0, $$9211 = 0, $$off = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0; - var $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0; - var $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; - var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; - var $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0; - var $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0; - var $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0; - var sp = 0; - sp = STACKTOP; - $5 = ($2|0)==($1|0); - if ($5) { - $$0163 = $0; - return ($$0163|0); - } - $$off = (($2) + -1)|0; - $6 = ($$off>>>0)<(4); - if (!($6)) { - ___assert_fail((10251|0),(10155|0),1477,(10307|0)); - // unreachable; - } - $7 = (_stbi__malloc_mad3($2,$3,$4)|0); - $8 = ($7|0)==(0|0); - if ($8) { - _free($0); - _stbi__err(10210); - $$0163 = 0; - return ($$0163|0); - } - $9 = ($4|0)>(0); - L11: do { - if ($9) { - $10 = $1 << 3; - $11 = (($10) + ($2))|0; - $$0165254 = (($3) + -1)|0; - $12 = ($$0165254|0)>(-1); - $$1166249 = (($3) + -1)|0; - $13 = ($$1166249|0)>(-1); - $$2167244 = (($3) + -1)|0; - $14 = ($$2167244|0)>(-1); - $$3168239 = (($3) + -1)|0; - $15 = ($$3168239|0)>(-1); - $$4169234 = (($3) + -1)|0; - $16 = ($$4169234|0)>(-1); - $$5170229 = (($3) + -1)|0; - $17 = ($$5170229|0)>(-1); - $$6171224 = (($3) + -1)|0; - $18 = ($$6171224|0)>(-1); - $$7172219 = (($3) + -1)|0; - $19 = ($$7172219|0)>(-1); - $$8173214 = (($3) + -1)|0; - $20 = ($$8173214|0)>(-1); - $$9174209 = (($3) + -1)|0; - $21 = ($$9174209|0)>(-1); - $$10175204 = (($3) + -1)|0; - $22 = ($$10175204|0)>(-1); - $$11176200 = (($3) + -1)|0; - $23 = ($$11176200|0)>(-1); - $$0164259 = 0; - L13: while(1) { - $24 = Math_imul($$0164259, $3)|0; - $25 = Math_imul($24, $1)|0; - $26 = (($0) + ($25)|0); - $27 = Math_imul($24, $2)|0; - $28 = (($7) + ($27)|0); - do { - switch ($11|0) { - case 10: { - if ($12) { - $$0151255 = $26;$$0165257 = $$0165254;$$0256 = $28; - while(1) { - $29 = HEAP8[$$0151255>>0]|0; - HEAP8[$$0256>>0] = $29; - $30 = ((($$0256)) + 1|0); - HEAP8[$30>>0] = -1; - $31 = ((($$0151255)) + 1|0); - $32 = ((($$0256)) + 2|0); - $$0165 = (($$0165257) + -1)|0; - $33 = ($$0165|0)>(-1); - if ($33) { - $$0151255 = $31;$$0165257 = $$0165;$$0256 = $32; - } else { - break; - } - } - } - break; - } - case 11: { - if ($13) { - $$1152250 = $26;$$1166252 = $$1166249;$$1251 = $28; - while(1) { - $34 = HEAP8[$$1152250>>0]|0; - $35 = ((($$1251)) + 2|0); - HEAP8[$35>>0] = $34; - $36 = ((($$1251)) + 1|0); - HEAP8[$36>>0] = $34; - HEAP8[$$1251>>0] = $34; - $37 = ((($$1152250)) + 1|0); - $38 = ((($$1251)) + 3|0); - $$1166 = (($$1166252) + -1)|0; - $39 = ($$1166|0)>(-1); - if ($39) { - $$1152250 = $37;$$1166252 = $$1166;$$1251 = $38; - } else { - break; - } - } - } - break; - } - case 12: { - if ($14) { - $$2153245 = $26;$$2167247 = $$2167244;$$2246 = $28; - while(1) { - $40 = HEAP8[$$2153245>>0]|0; - $41 = ((($$2246)) + 2|0); - HEAP8[$41>>0] = $40; - $42 = ((($$2246)) + 1|0); - HEAP8[$42>>0] = $40; - HEAP8[$$2246>>0] = $40; - $43 = ((($$2246)) + 3|0); - HEAP8[$43>>0] = -1; - $44 = ((($$2153245)) + 1|0); - $45 = ((($$2246)) + 4|0); - $$2167 = (($$2167247) + -1)|0; - $46 = ($$2167|0)>(-1); - if ($46) { - $$2153245 = $44;$$2167247 = $$2167;$$2246 = $45; - } else { - break; - } - } - } - break; - } - case 17: { - if ($15) { - $$3154240 = $26;$$3168242 = $$3168239;$$3241 = $28; - while(1) { - $47 = HEAP8[$$3154240>>0]|0; - HEAP8[$$3241>>0] = $47; - $48 = ((($$3154240)) + 2|0); - $49 = ((($$3241)) + 1|0); - $$3168 = (($$3168242) + -1)|0; - $50 = ($$3168|0)>(-1); - if ($50) { - $$3154240 = $48;$$3168242 = $$3168;$$3241 = $49; - } else { - break; - } - } - } - break; - } - case 19: { - if ($16) { - $$4155235 = $26;$$4169237 = $$4169234;$$4236 = $28; - while(1) { - $51 = HEAP8[$$4155235>>0]|0; - $52 = ((($$4236)) + 2|0); - HEAP8[$52>>0] = $51; - $53 = ((($$4236)) + 1|0); - HEAP8[$53>>0] = $51; - HEAP8[$$4236>>0] = $51; - $54 = ((($$4155235)) + 2|0); - $55 = ((($$4236)) + 3|0); - $$4169 = (($$4169237) + -1)|0; - $56 = ($$4169|0)>(-1); - if ($56) { - $$4155235 = $54;$$4169237 = $$4169;$$4236 = $55; - } else { - break; - } - } - } - break; - } - case 20: { - if ($17) { - $$5156230 = $26;$$5170232 = $$5170229;$$5231 = $28; - while(1) { - $57 = HEAP8[$$5156230>>0]|0; - $58 = ((($$5231)) + 2|0); - HEAP8[$58>>0] = $57; - $59 = ((($$5231)) + 1|0); - HEAP8[$59>>0] = $57; - HEAP8[$$5231>>0] = $57; - $60 = ((($$5156230)) + 1|0); - $61 = HEAP8[$60>>0]|0; - $62 = ((($$5231)) + 3|0); - HEAP8[$62>>0] = $61; - $63 = ((($$5156230)) + 2|0); - $64 = ((($$5231)) + 4|0); - $$5170 = (($$5170232) + -1)|0; - $65 = ($$5170|0)>(-1); - if ($65) { - $$5156230 = $63;$$5170232 = $$5170;$$5231 = $64; - } else { - break; - } - } - } - break; - } - case 28: { - if ($18) { - $$6157225 = $26;$$6171227 = $$6171224;$$6226 = $28; - while(1) { - $66 = HEAP8[$$6157225>>0]|0; - HEAP8[$$6226>>0] = $66; - $67 = ((($$6157225)) + 1|0); - $68 = HEAP8[$67>>0]|0; - $69 = ((($$6226)) + 1|0); - HEAP8[$69>>0] = $68; - $70 = ((($$6157225)) + 2|0); - $71 = HEAP8[$70>>0]|0; - $72 = ((($$6226)) + 2|0); - HEAP8[$72>>0] = $71; - $73 = ((($$6226)) + 3|0); - HEAP8[$73>>0] = -1; - $74 = ((($$6157225)) + 3|0); - $75 = ((($$6226)) + 4|0); - $$6171 = (($$6171227) + -1)|0; - $76 = ($$6171|0)>(-1); - if ($76) { - $$6157225 = $74;$$6171227 = $$6171;$$6226 = $75; - } else { - break; - } - } - } - break; - } - case 25: { - if ($19) { - $$7158220 = $26;$$7172222 = $$7172219;$$7221 = $28; - while(1) { - $77 = HEAP8[$$7158220>>0]|0; - $78 = $77&255; - $79 = ((($$7158220)) + 1|0); - $80 = HEAP8[$79>>0]|0; - $81 = $80&255; - $82 = ((($$7158220)) + 2|0); - $83 = HEAP8[$82>>0]|0; - $84 = $83&255; - $85 = (_stbi__compute_y($78,$81,$84)|0); - HEAP8[$$7221>>0] = $85; - $86 = ((($$7158220)) + 3|0); - $87 = ((($$7221)) + 1|0); - $$7172 = (($$7172222) + -1)|0; - $88 = ($$7172|0)>(-1); - if ($88) { - $$7158220 = $86;$$7172222 = $$7172;$$7221 = $87; - } else { - break; - } - } - } - break; - } - case 26: { - if ($20) { - $$8159215 = $26;$$8173217 = $$8173214;$$8216 = $28; - while(1) { - $89 = HEAP8[$$8159215>>0]|0; - $90 = $89&255; - $91 = ((($$8159215)) + 1|0); - $92 = HEAP8[$91>>0]|0; - $93 = $92&255; - $94 = ((($$8159215)) + 2|0); - $95 = HEAP8[$94>>0]|0; - $96 = $95&255; - $97 = (_stbi__compute_y($90,$93,$96)|0); - HEAP8[$$8216>>0] = $97; - $98 = ((($$8216)) + 1|0); - HEAP8[$98>>0] = -1; - $99 = ((($$8159215)) + 3|0); - $100 = ((($$8216)) + 2|0); - $$8173 = (($$8173217) + -1)|0; - $101 = ($$8173|0)>(-1); - if ($101) { - $$8159215 = $99;$$8173217 = $$8173;$$8216 = $100; - } else { - break; - } - } - } - break; - } - case 33: { - if ($21) { - $$9160210 = $26;$$9174212 = $$9174209;$$9211 = $28; - while(1) { - $102 = HEAP8[$$9160210>>0]|0; - $103 = $102&255; - $104 = ((($$9160210)) + 1|0); - $105 = HEAP8[$104>>0]|0; - $106 = $105&255; - $107 = ((($$9160210)) + 2|0); - $108 = HEAP8[$107>>0]|0; - $109 = $108&255; - $110 = (_stbi__compute_y($103,$106,$109)|0); - HEAP8[$$9211>>0] = $110; - $111 = ((($$9160210)) + 4|0); - $112 = ((($$9211)) + 1|0); - $$9174 = (($$9174212) + -1)|0; - $113 = ($$9174|0)>(-1); - if ($113) { - $$9160210 = $111;$$9174212 = $$9174;$$9211 = $112; - } else { - break; - } - } - } - break; - } - case 34: { - if ($22) { - $$10161205 = $26;$$10175207 = $$10175204;$$10206 = $28; - while(1) { - $114 = HEAP8[$$10161205>>0]|0; - $115 = $114&255; - $116 = ((($$10161205)) + 1|0); - $117 = HEAP8[$116>>0]|0; - $118 = $117&255; - $119 = ((($$10161205)) + 2|0); - $120 = HEAP8[$119>>0]|0; - $121 = $120&255; - $122 = (_stbi__compute_y($115,$118,$121)|0); - HEAP8[$$10206>>0] = $122; - $123 = ((($$10161205)) + 3|0); - $124 = HEAP8[$123>>0]|0; - $125 = ((($$10206)) + 1|0); - HEAP8[$125>>0] = $124; - $126 = ((($$10161205)) + 4|0); - $127 = ((($$10206)) + 2|0); - $$10175 = (($$10175207) + -1)|0; - $128 = ($$10175|0)>(-1); - if ($128) { - $$10161205 = $126;$$10175207 = $$10175;$$10206 = $127; - } else { - break; - } - } - } - break; - } - case 35: { - if ($23) { - $$11162201 = $26;$$11176203 = $$11176200;$$11202 = $28; - while(1) { - $129 = HEAP8[$$11162201>>0]|0; - HEAP8[$$11202>>0] = $129; - $130 = ((($$11162201)) + 1|0); - $131 = HEAP8[$130>>0]|0; - $132 = ((($$11202)) + 1|0); - HEAP8[$132>>0] = $131; - $133 = ((($$11162201)) + 2|0); - $134 = HEAP8[$133>>0]|0; - $135 = ((($$11202)) + 2|0); - HEAP8[$135>>0] = $134; - $136 = ((($$11162201)) + 4|0); - $137 = ((($$11202)) + 3|0); - $$11176 = (($$11176203) + -1)|0; - $138 = ($$11176|0)>(-1); - if ($138) { - $$11162201 = $136;$$11176203 = $$11176;$$11202 = $137; - } else { - break; - } - } - } - break; - } - default: { - break L13; - } - } - } while(0); - $139 = (($$0164259) + 1)|0; - $140 = ($139|0)<($4|0); - if ($140) { - $$0164259 = $139; - } else { - break L11; - } - } - ___assert_fail((10305|0),(10155|0),1506,(10307|0)); - // unreachable; - } - } while(0); - _free($0); - $$0163 = $7; - return ($$0163|0); -} -function _stbi__convert_format16($0,$1,$2,$3,$4) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - $3 = $3|0; - $4 = $4|0; - var $$0151255 = 0, $$0163 = 0, $$0164259 = 0, $$0165 = 0, $$0165254 = 0, $$0165257 = 0, $$0256 = 0, $$10161205 = 0, $$10175 = 0, $$10175204 = 0, $$10175207 = 0, $$10206 = 0, $$11162201 = 0, $$11176 = 0, $$11176200 = 0, $$11176203 = 0, $$11202 = 0, $$1152250 = 0, $$1166 = 0, $$1166249 = 0; - var $$1166252 = 0, $$1251 = 0, $$2153245 = 0, $$2167 = 0, $$2167244 = 0, $$2167247 = 0, $$2246 = 0, $$3154240 = 0, $$3168 = 0, $$3168239 = 0, $$3168242 = 0, $$3241 = 0, $$4155235 = 0, $$4169 = 0, $$4169234 = 0, $$4169237 = 0, $$4236 = 0, $$5156230 = 0, $$5170 = 0, $$5170229 = 0; - var $$5170232 = 0, $$5231 = 0, $$6157225 = 0, $$6171 = 0, $$6171224 = 0, $$6171227 = 0, $$6226 = 0, $$7158220 = 0, $$7172 = 0, $$7172219 = 0, $$7172222 = 0, $$7221 = 0, $$8159215 = 0, $$8173 = 0, $$8173214 = 0, $$8173217 = 0, $$8216 = 0, $$9160210 = 0, $$9174 = 0, $$9174209 = 0; - var $$9174212 = 0, $$9211 = 0, $$off = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0; - var $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0; - var $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0; - var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0; - var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0; - var $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0; - var $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0; - var $98 = 0, $99 = 0, label = 0, sp = 0; - sp = STACKTOP; - $5 = ($2|0)==($1|0); - if ($5) { - $$0163 = $0; - return ($$0163|0); - } - $$off = (($2) + -1)|0; - $6 = ($$off>>>0)<(4); - if (!($6)) { - ___assert_fail((10251|0),(10155|0),1526,(10282|0)); - // unreachable; - } - $7 = $2 << 1; - $8 = Math_imul($7, $3)|0; - $9 = Math_imul($8, $4)|0; - $10 = (_stbi__malloc($9)|0); - $11 = ($10|0)==(0|0); - if ($11) { - _free($0); - _stbi__err(10210); - $$0163 = 0; - return ($$0163|0); - } - $12 = ($4|0)>(0); - L11: do { - if ($12) { - $13 = $1 << 3; - $14 = (($13) + ($2))|0; - $$0165254 = (($3) + -1)|0; - $15 = ($$0165254|0)>(-1); - $$1166249 = (($3) + -1)|0; - $16 = ($$1166249|0)>(-1); - $$2167244 = (($3) + -1)|0; - $17 = ($$2167244|0)>(-1); - $$3168239 = (($3) + -1)|0; - $18 = ($$3168239|0)>(-1); - $$4169234 = (($3) + -1)|0; - $19 = ($$4169234|0)>(-1); - $$5170229 = (($3) + -1)|0; - $20 = ($$5170229|0)>(-1); - $$6171224 = (($3) + -1)|0; - $21 = ($$6171224|0)>(-1); - $$7172219 = (($3) + -1)|0; - $22 = ($$7172219|0)>(-1); - $$8173214 = (($3) + -1)|0; - $23 = ($$8173214|0)>(-1); - $$9174209 = (($3) + -1)|0; - $24 = ($$9174209|0)>(-1); - $$10175204 = (($3) + -1)|0; - $25 = ($$10175204|0)>(-1); - $$11176200 = (($3) + -1)|0; - $26 = ($$11176200|0)>(-1); - $$0164259 = 0; - L13: while(1) { - $27 = Math_imul($$0164259, $3)|0; - $28 = Math_imul($27, $1)|0; - $29 = (($0) + ($28<<1)|0); - $30 = Math_imul($27, $2)|0; - $31 = (($10) + ($30<<1)|0); - do { - switch ($14|0) { - case 10: { - if ($15) { - $$0151255 = $29;$$0165257 = $$0165254;$$0256 = $31; - while(1) { - $32 = HEAP16[$$0151255>>1]|0; - HEAP16[$$0256>>1] = $32; - $33 = ((($$0256)) + 2|0); - HEAP16[$33>>1] = -1; - $34 = ((($$0151255)) + 2|0); - $35 = ((($$0256)) + 4|0); - $$0165 = (($$0165257) + -1)|0; - $36 = ($$0165|0)>(-1); - if ($36) { - $$0151255 = $34;$$0165257 = $$0165;$$0256 = $35; - } else { - break; - } - } - } - break; - } - case 11: { - if ($16) { - $$1152250 = $29;$$1166252 = $$1166249;$$1251 = $31; - while(1) { - $37 = HEAP16[$$1152250>>1]|0; - $38 = ((($$1251)) + 4|0); - HEAP16[$38>>1] = $37; - $39 = ((($$1251)) + 2|0); - HEAP16[$39>>1] = $37; - HEAP16[$$1251>>1] = $37; - $40 = ((($$1152250)) + 2|0); - $41 = ((($$1251)) + 6|0); - $$1166 = (($$1166252) + -1)|0; - $42 = ($$1166|0)>(-1); - if ($42) { - $$1152250 = $40;$$1166252 = $$1166;$$1251 = $41; - } else { - break; - } - } - } - break; - } - case 12: { - if ($17) { - $$2153245 = $29;$$2167247 = $$2167244;$$2246 = $31; - while(1) { - $43 = HEAP16[$$2153245>>1]|0; - $44 = ((($$2246)) + 4|0); - HEAP16[$44>>1] = $43; - $45 = ((($$2246)) + 2|0); - HEAP16[$45>>1] = $43; - HEAP16[$$2246>>1] = $43; - $46 = ((($$2246)) + 6|0); - HEAP16[$46>>1] = -1; - $47 = ((($$2153245)) + 2|0); - $48 = ((($$2246)) + 8|0); - $$2167 = (($$2167247) + -1)|0; - $49 = ($$2167|0)>(-1); - if ($49) { - $$2153245 = $47;$$2167247 = $$2167;$$2246 = $48; - } else { - break; - } - } - } - break; - } - case 17: { - if ($18) { - $$3154240 = $29;$$3168242 = $$3168239;$$3241 = $31; - while(1) { - $50 = HEAP16[$$3154240>>1]|0; - HEAP16[$$3241>>1] = $50; - $51 = ((($$3154240)) + 4|0); - $52 = ((($$3241)) + 2|0); - $$3168 = (($$3168242) + -1)|0; - $53 = ($$3168|0)>(-1); - if ($53) { - $$3154240 = $51;$$3168242 = $$3168;$$3241 = $52; - } else { - break; - } - } - } - break; - } - case 19: { - if ($19) { - $$4155235 = $29;$$4169237 = $$4169234;$$4236 = $31; - while(1) { - $54 = HEAP16[$$4155235>>1]|0; - $55 = ((($$4236)) + 4|0); - HEAP16[$55>>1] = $54; - $56 = ((($$4236)) + 2|0); - HEAP16[$56>>1] = $54; - HEAP16[$$4236>>1] = $54; - $57 = ((($$4155235)) + 4|0); - $58 = ((($$4236)) + 6|0); - $$4169 = (($$4169237) + -1)|0; - $59 = ($$4169|0)>(-1); - if ($59) { - $$4155235 = $57;$$4169237 = $$4169;$$4236 = $58; - } else { - break; - } - } - } - break; - } - case 20: { - if ($20) { - $$5156230 = $29;$$5170232 = $$5170229;$$5231 = $31; - while(1) { - $60 = HEAP16[$$5156230>>1]|0; - $61 = ((($$5231)) + 4|0); - HEAP16[$61>>1] = $60; - $62 = ((($$5231)) + 2|0); - HEAP16[$62>>1] = $60; - HEAP16[$$5231>>1] = $60; - $63 = ((($$5156230)) + 2|0); - $64 = HEAP16[$63>>1]|0; - $65 = ((($$5231)) + 6|0); - HEAP16[$65>>1] = $64; - $66 = ((($$5156230)) + 4|0); - $67 = ((($$5231)) + 8|0); - $$5170 = (($$5170232) + -1)|0; - $68 = ($$5170|0)>(-1); - if ($68) { - $$5156230 = $66;$$5170232 = $$5170;$$5231 = $67; - } else { - break; - } - } - } - break; - } - case 28: { - if ($21) { - $$6157225 = $29;$$6171227 = $$6171224;$$6226 = $31; - while(1) { - $69 = HEAP16[$$6157225>>1]|0; - HEAP16[$$6226>>1] = $69; - $70 = ((($$6157225)) + 2|0); - $71 = HEAP16[$70>>1]|0; - $72 = ((($$6226)) + 2|0); - HEAP16[$72>>1] = $71; - $73 = ((($$6157225)) + 4|0); - $74 = HEAP16[$73>>1]|0; - $75 = ((($$6226)) + 4|0); - HEAP16[$75>>1] = $74; - $76 = ((($$6226)) + 6|0); - HEAP16[$76>>1] = -1; - $77 = ((($$6157225)) + 6|0); - $78 = ((($$6226)) + 8|0); - $$6171 = (($$6171227) + -1)|0; - $79 = ($$6171|0)>(-1); - if ($79) { - $$6157225 = $77;$$6171227 = $$6171;$$6226 = $78; - } else { - break; - } - } - } - break; - } - case 25: { - if ($22) { - $$7158220 = $29;$$7172222 = $$7172219;$$7221 = $31; - while(1) { - $80 = HEAP16[$$7158220>>1]|0; - $81 = $80&65535; - $82 = ((($$7158220)) + 2|0); - $83 = HEAP16[$82>>1]|0; - $84 = $83&65535; - $85 = ((($$7158220)) + 4|0); - $86 = HEAP16[$85>>1]|0; - $87 = $86&65535; - $88 = (_stbi__compute_y_16($81,$84,$87)|0); - HEAP16[$$7221>>1] = $88; - $89 = ((($$7158220)) + 6|0); - $90 = ((($$7221)) + 2|0); - $$7172 = (($$7172222) + -1)|0; - $91 = ($$7172|0)>(-1); - if ($91) { - $$7158220 = $89;$$7172222 = $$7172;$$7221 = $90; - } else { - break; - } - } - } - break; - } - case 26: { - if ($23) { - $$8159215 = $29;$$8173217 = $$8173214;$$8216 = $31; - while(1) { - $92 = HEAP16[$$8159215>>1]|0; - $93 = $92&65535; - $94 = ((($$8159215)) + 2|0); - $95 = HEAP16[$94>>1]|0; - $96 = $95&65535; - $97 = ((($$8159215)) + 4|0); - $98 = HEAP16[$97>>1]|0; - $99 = $98&65535; - $100 = (_stbi__compute_y_16($93,$96,$99)|0); - HEAP16[$$8216>>1] = $100; - $101 = ((($$8216)) + 2|0); - HEAP16[$101>>1] = -1; - $102 = ((($$8159215)) + 6|0); - $103 = ((($$8216)) + 4|0); - $$8173 = (($$8173217) + -1)|0; - $104 = ($$8173|0)>(-1); - if ($104) { - $$8159215 = $102;$$8173217 = $$8173;$$8216 = $103; - } else { - break; - } - } - } - break; - } - case 33: { - if ($24) { - $$9160210 = $29;$$9174212 = $$9174209;$$9211 = $31; - while(1) { - $105 = HEAP16[$$9160210>>1]|0; - $106 = $105&65535; - $107 = ((($$9160210)) + 2|0); - $108 = HEAP16[$107>>1]|0; - $109 = $108&65535; - $110 = ((($$9160210)) + 4|0); - $111 = HEAP16[$110>>1]|0; - $112 = $111&65535; - $113 = (_stbi__compute_y_16($106,$109,$112)|0); - HEAP16[$$9211>>1] = $113; - $114 = ((($$9160210)) + 8|0); - $115 = ((($$9211)) + 2|0); - $$9174 = (($$9174212) + -1)|0; - $116 = ($$9174|0)>(-1); - if ($116) { - $$9160210 = $114;$$9174212 = $$9174;$$9211 = $115; - } else { - break; - } - } - } - break; - } - case 34: { - if ($25) { - $$10161205 = $29;$$10175207 = $$10175204;$$10206 = $31; - while(1) { - $117 = HEAP16[$$10161205>>1]|0; - $118 = $117&65535; - $119 = ((($$10161205)) + 2|0); - $120 = HEAP16[$119>>1]|0; - $121 = $120&65535; - $122 = ((($$10161205)) + 4|0); - $123 = HEAP16[$122>>1]|0; - $124 = $123&65535; - $125 = (_stbi__compute_y_16($118,$121,$124)|0); - HEAP16[$$10206>>1] = $125; - $126 = ((($$10161205)) + 6|0); - $127 = HEAP16[$126>>1]|0; - $128 = ((($$10206)) + 2|0); - HEAP16[$128>>1] = $127; - $129 = ((($$10161205)) + 8|0); - $130 = ((($$10206)) + 4|0); - $$10175 = (($$10175207) + -1)|0; - $131 = ($$10175|0)>(-1); - if ($131) { - $$10161205 = $129;$$10175207 = $$10175;$$10206 = $130; - } else { - break; - } - } - } - break; - } - case 35: { - if ($26) { - $$11162201 = $29;$$11176203 = $$11176200;$$11202 = $31; - while(1) { - $132 = HEAP16[$$11162201>>1]|0; - HEAP16[$$11202>>1] = $132; - $133 = ((($$11162201)) + 2|0); - $134 = HEAP16[$133>>1]|0; - $135 = ((($$11202)) + 2|0); - HEAP16[$135>>1] = $134; - $136 = ((($$11162201)) + 4|0); - $137 = HEAP16[$136>>1]|0; - $138 = ((($$11202)) + 4|0); - HEAP16[$138>>1] = $137; - $139 = ((($$11162201)) + 8|0); - $140 = ((($$11202)) + 6|0); - $$11176 = (($$11176203) + -1)|0; - $141 = ($$11176|0)>(-1); - if ($141) { - $$11162201 = $139;$$11176203 = $$11176;$$11202 = $140; - } else { - break; - } - } - } - break; - } - default: { - break L13; - } - } - } while(0); - $142 = (($$0164259) + 1)|0; - $143 = ($142|0)<($4|0); - if ($143) { - $$0164259 = $142; - } else { - break L11; - } - } - ___assert_fail((10305|0),(10155|0),1555,(10282|0)); - // unreachable; - } - } while(0); - _free($0); - $$0163 = $10; - return ($$0163|0); -} -function _stbi__compute_y_16($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $3 = ($0*77)|0; - $4 = ($1*150)|0; - $5 = (($4) + ($3))|0; - $6 = ($2*29)|0; - $7 = (($5) + ($6))|0; - $8 = $7 >>> 8; - $9 = $8&65535; - return ($9|0); -} -function _stbi__malloc_mad3($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $$0 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; - sp = STACKTOP; - $3 = (_stbi__mad3sizes_valid($0,$1,$2)|0); - $4 = ($3|0)==(0); - if ($4) { - $$0 = 0; - return ($$0|0); - } - $5 = Math_imul($1, $0)|0; - $6 = Math_imul($5, $2)|0; - $7 = (_stbi__malloc($6)|0); - $$0 = $7; - return ($$0|0); -} -function _stbi__compute_y($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $3 = ($0*77)|0; - $4 = ($1*150)|0; - $5 = (($4) + ($3))|0; - $6 = ($2*29)|0; - $7 = (($5) + ($6))|0; - $8 = $7 >>> 8; - $9 = $8&255; - return ($9|0); -} -function _stbi__mad3sizes_valid($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $10 = 0, $11 = 0, $12 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $3 = (_stbi__mul2sizes_valid($0,$1)|0); - $4 = ($3|0)==(0); - if ($4) { - $12 = 0; - } else { - $5 = Math_imul($1, $0)|0; - $6 = (_stbi__mul2sizes_valid($5,$2)|0); - $7 = ($6|0)==(0); - if ($7) { - $12 = 0; - } else { - $8 = Math_imul($5, $2)|0; - $9 = (_stbi__addsizes_valid($8)|0); - $10 = ($9|0)!=(0); - $12 = $10; - } - } - $11 = $12&1; - return ($11|0); -} -function _stbi__mul2sizes_valid($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; - sp = STACKTOP; - $2 = $1 | $0; - $3 = ($2|0)<(0); - if ($3) { - $$0 = 0; - } else { - $4 = ($1|0)==(0); - if ($4) { - $$0 = 1; - } else { - $5 = (2147483647 / ($1|0))&-1; - $6 = ($5|0)>=($0|0); - $7 = $6&1; - $$0 = $7; - } - } - return ($$0|0); -} -function _stbi__addsizes_valid($0) { - $0 = $0|0; - var label = 0, sp = 0; - sp = STACKTOP; - return 1; -} -function _stbi__check_png_header($0) { - $0 = $0|0; - var $$05 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = (_stbi__get8($0)|0); - $2 = ($1<<24>>24)==(-119); - if ($2) { - $3 = (_stbi__get8($0)|0); - $4 = ($3<<24>>24)==(80); - if ($4) { - $5 = (_stbi__get8($0)|0); - $6 = ($5<<24>>24)==(78); - if ($6) { - $7 = (_stbi__get8($0)|0); - $8 = ($7<<24>>24)==(71); - if ($8) { - $9 = (_stbi__get8($0)|0); - $10 = ($9<<24>>24)==(13); - if ($10) { - $11 = (_stbi__get8($0)|0); - $12 = ($11<<24>>24)==(10); - if ($12) { - $13 = (_stbi__get8($0)|0); - $14 = ($13<<24>>24)==(26); - if ($14) { - $15 = (_stbi__get8($0)|0); - $16 = ($15<<24>>24)==(10); - if ($16) { - $$05 = 1; - return ($$05|0); - } - } - } - } - } - } - } - } - _stbi__err(11566); - $$05 = 0; - return ($$05|0); -} -function _stbi__get_chunk_header($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $$sroa$4$0$$sroa_idx2 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; - sp = STACKTOP; - $2 = (_stbi__get32be($1)|0); - $3 = (_stbi__get32be($1)|0); - HEAP32[$0>>2] = $2; - $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); - HEAP32[$$sroa$4$0$$sroa_idx2>>2] = $3; - return; -} -function _stbi__skip($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; - var $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $2 = ($1|0)<(0); - if ($2) { - $3 = ((($0)) + 172|0); - $4 = HEAP32[$3>>2]|0; - $5 = ((($0)) + 168|0); - HEAP32[$5>>2] = $4; - return; - } - $6 = ((($0)) + 16|0); - $7 = HEAP32[$6>>2]|0; - $8 = ($7|0)==(0|0); - if (!($8)) { - $9 = ((($0)) + 172|0); - $10 = HEAP32[$9>>2]|0; - $11 = ((($0)) + 168|0); - $12 = HEAP32[$11>>2]|0; - $13 = $10; - $14 = (($13) - ($12))|0; - $15 = ($14|0)<($1|0); - if ($15) { - HEAP32[$11>>2] = $10; - $16 = ((($0)) + 20|0); - $17 = HEAP32[$16>>2]|0; - $18 = ((($0)) + 28|0); - $19 = HEAP32[$18>>2]|0; - $20 = (($1) - ($14))|0; - FUNCTION_TABLE_vii[$17 & 63]($19,$20); - return; - } - } - $21 = ((($0)) + 168|0); - $22 = HEAP32[$21>>2]|0; - $23 = (($22) + ($1)|0); - HEAP32[$21>>2] = $23; - return; -} -function _stbi__get32be($0) { - $0 = $0|0; - var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = (_stbi__get16be($0)|0); - $2 = $1 << 16; - $3 = (_stbi__get16be($0)|0); - $4 = (($2) + ($3))|0; - return ($4|0); -} -function _stbi__get8($0) { - $0 = $0|0; - var $$0 = 0, $$sink6 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = ((($0)) + 168|0); - $2 = HEAP32[$1>>2]|0; - $3 = ((($0)) + 172|0); - $4 = HEAP32[$3>>2]|0; - $5 = ($2>>>0)<($4>>>0); - do { - if ($5) { - $$sink6 = $2; - } else { - $6 = ((($0)) + 32|0); - $7 = HEAP32[$6>>2]|0; - $8 = ($7|0)==(0); - if ($8) { - $$0 = 0; - return ($$0|0); - } else { - _stbi__refill_buffer($0); - $9 = HEAP32[$1>>2]|0; - $$sink6 = $9; - break; - } - } - } while(0); - $10 = ((($$sink6)) + 1|0); - HEAP32[$1>>2] = $10; - $11 = HEAP8[$$sink6>>0]|0; - $$0 = $11; - return ($$0|0); -} -function _stbi__get16be($0) { - $0 = $0|0; - var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = (_stbi__get8($0)|0); - $2 = $1&255; - $3 = $2 << 8; - $4 = (_stbi__get8($0)|0); - $5 = $4&255; - $6 = $3 | $5; - return ($6|0); -} -function _stbi__getn($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $$1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; - var $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $3 = ((($0)) + 16|0); - $4 = HEAP32[$3>>2]|0; - $5 = ($4|0)==(0|0); - if (!($5)) { - $6 = ((($0)) + 172|0); - $7 = HEAP32[$6>>2]|0; - $8 = ((($0)) + 168|0); - $9 = HEAP32[$8>>2]|0; - $10 = $9; - $11 = (($7) - ($10))|0; - $12 = ($11|0)<($2|0); - if ($12) { - _memcpy(($1|0),($9|0),($11|0))|0; - $13 = HEAP32[$3>>2]|0; - $14 = ((($0)) + 28|0); - $15 = HEAP32[$14>>2]|0; - $16 = (($1) + ($11)|0); - $17 = (($2) - ($11))|0; - $18 = (FUNCTION_TABLE_iiii[$13 & 15]($15,$16,$17)|0); - $19 = ($18|0)==($17|0); - $20 = $19&1; - $21 = HEAP32[$6>>2]|0; - HEAP32[$8>>2] = $21; - $$1 = $20; - return ($$1|0); - } - } - $22 = ((($0)) + 168|0); - $23 = HEAP32[$22>>2]|0; - $24 = (($23) + ($2)|0); - $25 = ((($0)) + 172|0); - $26 = HEAP32[$25>>2]|0; - $27 = ($24>>>0)>($26>>>0); - if ($27) { - $$1 = 0; - return ($$1|0); - } - _memcpy(($1|0),($23|0),($2|0))|0; - $28 = HEAP32[$22>>2]|0; - $29 = (($28) + ($2)|0); - HEAP32[$22>>2] = $29; - $$1 = 1; - return ($$1|0); -} -function _stbi_zlib_decode_malloc_guesssize_headerflag($0,$1,$2,$3,$4) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - $3 = $3|0; - $4 = $4|0; - var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 4080|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(4080|0); - $5 = sp; - $6 = (_stbi__malloc($2)|0); - $7 = ($6|0)==(0|0); - do { - if ($7) { - $$0 = 0; - } else { - HEAP32[$5>>2] = $0; - $8 = (($0) + ($1)|0); - $9 = ((($5)) + 4|0); - HEAP32[$9>>2] = $8; - $10 = (_stbi__do_zlib($5,$6,$2,1,$4)|0); - $11 = ($10|0)==(0); - $12 = ((($5)) + 20|0); - $13 = HEAP32[$12>>2]|0; - if ($11) { - _free($13); - $$0 = 0; - break; - } - $14 = ($3|0)==(0|0); - if ($14) { - $$0 = $13; - } else { - $15 = ((($5)) + 16|0); - $16 = HEAP32[$15>>2]|0; - $17 = $13; - $18 = (($16) - ($17))|0; - HEAP32[$3>>2] = $18; - $$0 = $13; - } - } - } while(0); - STACKTOP = sp;return ($$0|0); -} -function _stbi__create_png_image($0,$1,$2,$3,$4,$5,$6) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - $3 = $3|0; - $4 = $4|0; - $5 = $5|0; - $6 = $6|0; - var $$0103117 = 0, $$0106116 = 0, $$0107115 = 0, $$095119 = 0, $$099118 = 0, $$3102$ph = 0, $$398$ph = 0, $$4 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0; - var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0; - var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $60 = 0, $61 = 0; - var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0; - var $80 = 0, $81 = 0, $82 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; - sp = STACKTOP; - $7 = ($4|0)==(16); - $8 = $7 ? 2 : 1; - $9 = Math_imul($8, $3)|0; - $10 = ($6|0)==(0); - $11 = HEAP32[$0>>2]|0; - $12 = HEAP32[$11>>2]|0; - $13 = ((($11)) + 4|0); - $14 = HEAP32[$13>>2]|0; - if ($10) { - $15 = (_stbi__create_png_image_raw($0,$1,$2,$3,$12,$14,$4,$5)|0); - $$4 = $15; - return ($$4|0); - } - $16 = (_stbi__malloc_mad3($12,$14,$9)|0); - $17 = ((($0)) + 12|0); - $18 = ((($0)) + 12|0); - $$0103117 = 0;$$095119 = $1;$$099118 = $2; - while(1) { - $19 = HEAP32[$0>>2]|0; - $20 = HEAP32[$19>>2]|0; - $21 = (3060 + ($$0103117<<2)|0); - $22 = HEAP32[$21>>2]|0; - $23 = (3088 + ($$0103117<<2)|0); - $24 = HEAP32[$23>>2]|0; - $25 = (($20) + -1)|0; - $26 = (($25) - ($22))|0; - $27 = (($26) + ($24))|0; - $28 = (($27>>>0) / ($24>>>0))&-1; - $29 = ((($19)) + 4|0); - $30 = HEAP32[$29>>2]|0; - $31 = (3116 + ($$0103117<<2)|0); - $32 = HEAP32[$31>>2]|0; - $33 = (3144 + ($$0103117<<2)|0); - $34 = HEAP32[$33>>2]|0; - $35 = (($30) + -1)|0; - $36 = (($35) - ($32))|0; - $37 = (($36) + ($34))|0; - $38 = (($37>>>0) / ($34>>>0))&-1; - $39 = ($24>>>0)<=($27>>>0); - $40 = ($34>>>0)<=($37>>>0); - $or$cond = $39 & $40; - if ($or$cond) { - $41 = ((($19)) + 8|0); - $42 = HEAP32[$41>>2]|0; - $43 = Math_imul($28, $4)|0; - $44 = Math_imul($43, $42)|0; - $45 = (($44) + 7)|0; - $46 = $45 >> 3; - $47 = (($46) + 1)|0; - $48 = Math_imul($47, $38)|0; - $49 = (_stbi__create_png_image_raw($0,$$095119,$$099118,$3,$28,$38,$4,$5)|0); - $50 = ($49|0)==(0); - if ($50) { - label = 13; - break; - } - $51 = ($38|0)>(0); - if ($51) { - $52 = ($28|0)>(0); - $$0106116 = 0; - while(1) { - if ($52) { - $53 = HEAP32[$33>>2]|0; - $54 = Math_imul($53, $$0106116)|0; - $55 = HEAP32[$31>>2]|0; - $56 = (($54) + ($55))|0; - $57 = HEAP32[$23>>2]|0; - $58 = HEAP32[$21>>2]|0; - $59 = Math_imul($56, $9)|0; - $60 = Math_imul($$0106116, $28)|0; - $$0107115 = 0; - while(1) { - $61 = Math_imul($57, $$0107115)|0; - $62 = (($61) + ($58))|0; - $63 = HEAP32[$0>>2]|0; - $64 = HEAP32[$63>>2]|0; - $65 = Math_imul($59, $64)|0; - $66 = (($16) + ($65)|0); - $67 = Math_imul($62, $9)|0; - $68 = (($66) + ($67)|0); - $69 = HEAP32[$18>>2]|0; - $70 = (($$0107115) + ($60))|0; - $71 = Math_imul($70, $9)|0; - $72 = (($69) + ($71)|0); - _memcpy(($68|0),($72|0),($9|0))|0; - $73 = (($$0107115) + 1)|0; - $74 = ($73|0)<($28|0); - if ($74) { - $$0107115 = $73; - } else { - break; - } - } - } - $75 = (($$0106116) + 1)|0; - $76 = ($75|0)<($38|0); - if ($76) { - $$0106116 = $75; - } else { - break; - } - } - } - $77 = HEAP32[$17>>2]|0; - _free($77); - $78 = (($$095119) + ($48)|0); - $79 = (($$099118) - ($48))|0; - $$3102$ph = $79;$$398$ph = $78; - } else { - $$3102$ph = $$099118;$$398$ph = $$095119; - } - $80 = (($$0103117) + 1)|0; - $81 = ($80|0)<(7); - if ($81) { - $$0103117 = $80;$$095119 = $$398$ph;$$099118 = $$3102$ph; - } else { - label = 15; - break; - } - } - if ((label|0) == 13) { - _free($16); - $$4 = 0; - return ($$4|0); - } - else if ((label|0) == 15) { - $82 = ((($0)) + 12|0); - HEAP32[$82>>2] = $16; - $$4 = 1; - return ($$4|0); - } - return (0)|0; -} -function _stbi__compute_transparency16($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $$0323 = 0, $$04 = 0, $$1335 = 0, $$16 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; - var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $exitcond9 = 0, $not$ = 0, label = 0, sp = 0; - sp = STACKTOP; - $3 = HEAP32[$0>>2]|0; - $4 = HEAP32[$3>>2]|0; - $5 = ((($3)) + 4|0); - $6 = HEAP32[$5>>2]|0; - $7 = Math_imul($6, $4)|0; - $8 = ((($0)) + 12|0); - $9 = HEAP32[$8>>2]|0; - switch ($2|0) { - case 2: { - $13 = ($7|0)==(0); - if ($13) { - return; - } else { - $$0323 = 0;$$04 = $9; - } - while(1) { - $14 = HEAP16[$$04>>1]|0; - $15 = HEAP16[$1>>1]|0; - $not$ = ($14<<16>>16)!=($15<<16>>16); - $16 = $not$ << 31 >> 31; - $17 = ((($$04)) + 2|0); - HEAP16[$17>>1] = $16; - $18 = ((($$04)) + 4|0); - $19 = (($$0323) + 1)|0; - $exitcond = ($19|0)==($7|0); - if ($exitcond) { - break; - } else { - $$0323 = $19;$$04 = $18; - } - } - return; - break; - } - case 4: { - $10 = ($7|0)==(0); - if ($10) { - return; - } - $11 = ((($1)) + 2|0); - $12 = ((($1)) + 4|0); - $$1335 = 0;$$16 = $9; - while(1) { - $20 = HEAP16[$$16>>1]|0; - $21 = HEAP16[$1>>1]|0; - $22 = ($20<<16>>16)==($21<<16>>16); - if ($22) { - $23 = ((($$16)) + 2|0); - $24 = HEAP16[$23>>1]|0; - $25 = HEAP16[$11>>1]|0; - $26 = ($24<<16>>16)==($25<<16>>16); - if ($26) { - $27 = ((($$16)) + 4|0); - $28 = HEAP16[$27>>1]|0; - $29 = HEAP16[$12>>1]|0; - $30 = ($28<<16>>16)==($29<<16>>16); - if ($30) { - $31 = ((($$16)) + 6|0); - HEAP16[$31>>1] = 0; - } - } - } - $32 = ((($$16)) + 8|0); - $33 = (($$1335) + 1)|0; - $exitcond9 = ($33|0)==($7|0); - if ($exitcond9) { - break; - } else { - $$1335 = $33;$$16 = $32; - } - } - return; - break; - } - default: { - ___assert_fail((10648|0),(10155|0),4569,(10700|0)); - // unreachable; - } - } -} -function _stbi__compute_transparency($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $$0323 = 0, $$04 = 0, $$1335 = 0, $$16 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; - var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $exitcond9 = 0, $not$ = 0, label = 0, sp = 0; - sp = STACKTOP; - $3 = HEAP32[$0>>2]|0; - $4 = HEAP32[$3>>2]|0; - $5 = ((($3)) + 4|0); - $6 = HEAP32[$5>>2]|0; - $7 = Math_imul($6, $4)|0; - $8 = ((($0)) + 12|0); - $9 = HEAP32[$8>>2]|0; - switch ($2|0) { - case 2: { - $13 = ($7|0)==(0); - if ($13) { - return; - } else { - $$0323 = 0;$$04 = $9; - } - while(1) { - $14 = HEAP8[$$04>>0]|0; - $15 = HEAP8[$1>>0]|0; - $not$ = ($14<<24>>24)!=($15<<24>>24); - $16 = $not$ << 31 >> 31; - $17 = ((($$04)) + 1|0); - HEAP8[$17>>0] = $16; - $18 = ((($$04)) + 2|0); - $19 = (($$0323) + 1)|0; - $exitcond = ($19|0)==($7|0); - if ($exitcond) { - break; - } else { - $$0323 = $19;$$04 = $18; - } - } - return; - break; - } - case 4: { - $10 = ($7|0)==(0); - if ($10) { - return; - } - $11 = ((($1)) + 1|0); - $12 = ((($1)) + 2|0); - $$1335 = 0;$$16 = $9; - while(1) { - $20 = HEAP8[$$16>>0]|0; - $21 = HEAP8[$1>>0]|0; - $22 = ($20<<24>>24)==($21<<24>>24); - if ($22) { - $23 = ((($$16)) + 1|0); - $24 = HEAP8[$23>>0]|0; - $25 = HEAP8[$11>>0]|0; - $26 = ($24<<24>>24)==($25<<24>>24); - if ($26) { - $27 = ((($$16)) + 2|0); - $28 = HEAP8[$27>>0]|0; - $29 = HEAP8[$12>>0]|0; - $30 = ($28<<24>>24)==($29<<24>>24); - if ($30) { - $31 = ((($$16)) + 3|0); - HEAP8[$31>>0] = 0; - } - } - } - $32 = ((($$16)) + 4|0); - $33 = (($$1335) + 1)|0; - $exitcond9 = ($33|0)==($7|0); - if ($exitcond9) { - break; - } else { - $$1335 = $33;$$16 = $32; - } - } - return; - break; - } - default: { - ___assert_fail((10648|0),(10155|0),4544,(10673|0)); - // unreachable; - } - } -} -function _stbi__de_iphone($0) { - $0 = $0|0; - var $$05158 = 0, $$059 = 0, $$15263 = 0, $$164 = 0, $$25360 = 0, $$261 = 0, $$sink = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0; - var $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0; - var $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $exitcond68 = 0, $exitcond69 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = HEAP32[$0>>2]|0; - $2 = HEAP32[$1>>2]|0; - $3 = ((($1)) + 4|0); - $4 = HEAP32[$3>>2]|0; - $5 = Math_imul($4, $2)|0; - $6 = ((($0)) + 12|0); - $7 = HEAP32[$6>>2]|0; - $8 = ((($1)) + 12|0); - $9 = HEAP32[$8>>2]|0; - switch ($9|0) { - case 3: { - $10 = ($5|0)==(0); - if ($10) { - return; - } else { - $$05158 = $7;$$059 = 0; - } - while(1) { - $11 = HEAP8[$$05158>>0]|0; - $12 = ((($$05158)) + 2|0); - $13 = HEAP8[$12>>0]|0; - HEAP8[$$05158>>0] = $13; - HEAP8[$12>>0] = $11; - $14 = ((($$05158)) + 3|0); - $15 = (($$059) + 1)|0; - $exitcond = ($15|0)==($5|0); - if ($exitcond) { - break; - } else { - $$05158 = $14;$$059 = $15; - } - } - return; - break; - } - case 4: { - $16 = HEAP32[5347]|0; - $17 = ($16|0)==(0); - $18 = ($5|0)!=(0); - if ($17) { - if ($18) { - $$25360 = $7;$$261 = 0; - } else { - return; - } - while(1) { - $42 = HEAP8[$$25360>>0]|0; - $43 = ((($$25360)) + 2|0); - $44 = HEAP8[$43>>0]|0; - HEAP8[$$25360>>0] = $44; - HEAP8[$43>>0] = $42; - $45 = ((($$25360)) + 4|0); - $46 = (($$261) + 1)|0; - $exitcond68 = ($46|0)==($5|0); - if ($exitcond68) { - break; - } else { - $$25360 = $45;$$261 = $46; - } - } - return; - } - if ($18) { - $$15263 = $7;$$164 = 0; - } else { - return; - } - while(1) { - $19 = ((($$15263)) + 3|0); - $20 = HEAP8[$19>>0]|0; - $21 = HEAP8[$$15263>>0]|0; - $22 = ($20<<24>>24)==(0); - $23 = ((($$15263)) + 2|0); - $24 = HEAP8[$23>>0]|0; - if ($22) { - HEAP8[$$15263>>0] = $24; - $$sink = $21; - } else { - $25 = $24&255; - $26 = ($25*255)|0; - $27 = $20&255; - $28 = (($26>>>0) / ($27>>>0))&-1; - $29 = $28&255; - HEAP8[$$15263>>0] = $29; - $30 = ((($$15263)) + 1|0); - $31 = HEAP8[$30>>0]|0; - $32 = $31&255; - $33 = ($32*255)|0; - $34 = (($33>>>0) / ($27>>>0))&-1; - $35 = $34&255; - HEAP8[$30>>0] = $35; - $36 = $21&255; - $37 = ($36*255)|0; - $38 = (($37>>>0) / ($27>>>0))&-1; - $39 = $38&255; - $$sink = $39; - } - HEAP8[$23>>0] = $$sink; - $40 = ((($$15263)) + 4|0); - $41 = (($$164) + 1)|0; - $exitcond69 = ($41|0)==($5|0); - if ($exitcond69) { - break; - } else { - $$15263 = $40;$$164 = $41; - } - } - return; - break; - } - default: { - ___assert_fail((10614|0),(10155|0),4650,(10632|0)); - // unreachable; - } - } -} -function _stbi__expand_png_palette($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $$0 = 0, $$0574 = 0, $$0583 = 0, $$1595 = 0, $$16 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; - var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0; - var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $exitcond9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $3 = HEAP32[$0>>2]|0; - $4 = HEAP32[$3>>2]|0; - $5 = ((($3)) + 4|0); - $6 = HEAP32[$5>>2]|0; - $7 = Math_imul($6, $4)|0; - $8 = ((($0)) + 12|0); - $9 = HEAP32[$8>>2]|0; - $10 = (_stbi__malloc_mad2($7,$2)|0); - $11 = ($10|0)==(0|0); - if ($11) { - _stbi__err(10210); - $$0 = 0; - return ($$0|0); - } - $12 = ($2|0)==(3); - $13 = ($7|0)!=(0); - if ($12) { - if ($13) { - $$0574 = 0;$$0583 = $10; - while(1) { - $14 = (($9) + ($$0574)|0); - $15 = HEAP8[$14>>0]|0; - $16 = $15&255; - $17 = $16 << 2; - $18 = (($1) + ($17)|0); - $19 = HEAP8[$18>>0]|0; - HEAP8[$$0583>>0] = $19; - $20 = $17 | 1; - $21 = (($1) + ($20)|0); - $22 = HEAP8[$21>>0]|0; - $23 = ((($$0583)) + 1|0); - HEAP8[$23>>0] = $22; - $24 = $17 | 2; - $25 = (($1) + ($24)|0); - $26 = HEAP8[$25>>0]|0; - $27 = ((($$0583)) + 2|0); - HEAP8[$27>>0] = $26; - $28 = ((($$0583)) + 3|0); - $29 = (($$0574) + 1)|0; - $exitcond = ($29|0)==($7|0); - if ($exitcond) { - break; - } else { - $$0574 = $29;$$0583 = $28; - } - } - } - } else { - if ($13) { - $$1595 = $10;$$16 = 0; - while(1) { - $30 = (($9) + ($$16)|0); - $31 = HEAP8[$30>>0]|0; - $32 = $31&255; - $33 = $32 << 2; - $34 = (($1) + ($33)|0); - $35 = HEAP8[$34>>0]|0; - HEAP8[$$1595>>0] = $35; - $36 = $33 | 1; - $37 = (($1) + ($36)|0); - $38 = HEAP8[$37>>0]|0; - $39 = ((($$1595)) + 1|0); - HEAP8[$39>>0] = $38; - $40 = $33 | 2; - $41 = (($1) + ($40)|0); - $42 = HEAP8[$41>>0]|0; - $43 = ((($$1595)) + 2|0); - HEAP8[$43>>0] = $42; - $44 = $33 | 3; - $45 = (($1) + ($44)|0); - $46 = HEAP8[$45>>0]|0; - $47 = ((($$1595)) + 3|0); - HEAP8[$47>>0] = $46; - $48 = ((($$1595)) + 4|0); - $49 = (($$16) + 1)|0; - $exitcond9 = ($49|0)==($7|0); - if ($exitcond9) { - break; - } else { - $$1595 = $48;$$16 = $49; - } - } - } - } - $50 = HEAP32[$8>>2]|0; - _free($50); - HEAP32[$8>>2] = $10; - $$0 = 1; - return ($$0|0); -} -function _stbi__malloc_mad2($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; - sp = STACKTOP; - $2 = (_stbi__mad2sizes_valid($0,$1)|0); - $3 = ($2|0)==(0); - if ($3) { - $$0 = 0; - return ($$0|0); - } - $4 = Math_imul($1, $0)|0; - $5 = (_stbi__malloc($4)|0); - $$0 = $5; - return ($$0|0); -} -function _stbi__mad2sizes_valid($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; - sp = STACKTOP; - $2 = (_stbi__mul2sizes_valid($0,$1)|0); - $3 = ($2|0)==(0); - if ($3) { - $8 = 0; - $7 = $8&1; - return ($7|0); - } - $4 = Math_imul($1, $0)|0; - $5 = (_stbi__addsizes_valid($4)|0); - $6 = ($5|0)!=(0); - $8 = $6; - $7 = $8&1; - return ($7|0); -} -function _stbi__create_png_image_raw($0,$1,$2,$3,$4,$5,$6,$7) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - $3 = $3|0; - $4 = $4|0; - $5 = $5|0; - $6 = $6|0; - $7 = $7|0; - var $$0568 = 0, $$0568724 = 0, $$0568725 = 0, $$0571$lcssa = 0, $$0571715 = 0, $$0574$lcssa = 0, $$0574714 = 0, $$0577817 = 0, $$0588 = 0, $$0597 = 0, $$0608816 = 0, $$0611815 = 0, $$0614 = 0, $$0614793 = 0, $$0614796 = 0, $$0623814 = 0, $$0625734 = 0, $$0731 = 0, $$1 = 0, $$10635764 = 0; - var $$11$ph = 0, $$11636755 = 0, $$12747 = 0, $$13739 = 0, $$14$lcssa = 0, $$14713 = 0, $$15$lcssa = 0, $$15705 = 0, $$1572$lcssa = 0, $$1572707 = 0, $$1575$lcssa = 0, $$1575706 = 0, $$1578 = 0, $$16$lcssa = 0, $$1609 = 0, $$1612 = 0, $$1615 = 0, $$1615785 = 0, $$1615788 = 0, $$1624727 = 0; - var $$1626812 = 0, $$16700 = 0, $$1721 = 0, $$1722 = 0, $$2 = 0, $$2573$lcssa = 0, $$2573702 = 0, $$2579795 = 0, $$2599794 = 0, $$2616 = 0, $$2616776 = 0, $$2616780 = 0, $$2627810 = 0, $$3580787 = 0, $$3592778 = 0, $$3600786 = 0, $$3617 = 0, $$3617767 = 0, $$3617771 = 0, $$3628808 = 0; - var $$4$lcssa = 0, $$4581779 = 0, $$4593769 = 0, $$4601777 = 0, $$4618 = 0, $$4618758 = 0, $$4618762 = 0, $$4629806 = 0, $$4701 = 0, $$5582770 = 0, $$5594760 = 0, $$5602768 = 0, $$5619 = 0, $$5619750 = 0, $$5619753 = 0, $$5630804 = 0, $$6583761 = 0, $$6603759 = 0, $$6620 = 0, $$6620742 = 0; - var $$6620745 = 0, $$6631802 = 0, $$7584752 = 0, $$7604751 = 0, $$7621798 = 0, $$7632790 = 0, $$8585744 = 0, $$8605743 = 0, $$8622729 = 0, $$8633782 = 0, $$9586 = 0, $$9606799 = 0, $$9634773 = 0, $$not = 0, $$sink = 0, $$sink1 = 0, $$sink641 = 0, $10 = 0, $100 = 0, $101 = 0; - var $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0; - var $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0; - var $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0; - var $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0; - var $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0; - var $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0; - var $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0; - var $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0; - var $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0; - var $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0; - var $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $30 = 0, $300 = 0, $301 = 0; - var $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0; - var $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0; - var $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0; - var $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0; - var $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0; - var $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0; - var $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0; - var $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0; - var $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0; - var $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0; - var $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $50 = 0, $500 = 0, $501 = 0; - var $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0; - var $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0; - var $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0; - var $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0; - var $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0; - var $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0, $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0; - var $611 = 0, $612 = 0, $613 = 0, $614 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0; - var $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0; - var $96 = 0, $97 = 0, $98 = 0, $99 = 0, $brmerge = 0, $brmerge894 = 0, $exitcond = 0, $exitcond864 = 0, $exitcond865 = 0, $exitcond867 = 0, $exitcond869 = 0, $exitcond871 = 0, $exitcond873 = 0, $exitcond875 = 0, $exitcond877 = 0, $exitcond880 = 0, $exitcond881 = 0, $exitcond882 = 0, $exitcond883 = 0, $exitcond884 = 0; - var $exitcond885 = 0, $exitcond886 = 0, $indvars$iv = 0, $indvars$iv$next = 0, $indvars$iv$next849 = 0, $indvars$iv$next852 = 0, $indvars$iv$next855 = 0, $indvars$iv$next858 = 0, $indvars$iv$next861 = 0, $indvars$iv848 = 0, $indvars$iv851 = 0, $indvars$iv854 = 0, $indvars$iv857 = 0, $indvars$iv860 = 0, $or$cond = 0, $scevgep = 0, $scevgep850 = 0, $scevgep853 = 0, $scevgep856 = 0, $scevgep859 = 0; - var $scevgep862 = 0, $scevgep866 = 0, $scevgep868 = 0, $scevgep870 = 0, $scevgep872 = 0, $scevgep874 = 0, $scevgep876 = 0, $scevgep879 = 0, $trunc = 0, $trunc637 = 0, $trunc638 = 0, label = 0, sp = 0; - sp = STACKTOP; - $8 = ($6|0)==(16); - $9 = $8 ? 2 : 1; - $10 = HEAP32[$0>>2]|0; - $11 = Math_imul($4, $3)|0; - $12 = Math_imul($9, $11)|0; - $13 = ((($10)) + 8|0); - $14 = HEAP32[$13>>2]|0; - $15 = Math_imul($9, $3)|0; - $16 = Math_imul($14, $9)|0; - $17 = ($14|0)==($3|0); - $18 = (($14) + 1)|0; - $19 = ($18|0)==($3|0); - $or$cond = $17 | $19; - if (!($or$cond)) { - ___assert_fail((10729|0),(10155|0),4294,(10770|0)); - // unreachable; - } - $20 = (_stbi__malloc_mad3($4,$5,$15)|0); - $21 = ((($0)) + 12|0); - HEAP32[$21>>2] = $20; - $22 = ($20|0)==(0|0); - if ($22) { - _stbi__err(10210); - $$2 = 0; - return ($$2|0); - } - $23 = Math_imul($14, $4)|0; - $24 = Math_imul($23, $6)|0; - $25 = (($24) + 7)|0; - $26 = $25 >>> 3; - $27 = (($26) + 1)|0; - $28 = Math_imul($27, $5)|0; - $29 = HEAP32[$10>>2]|0; - $30 = ($29|0)==($4|0); - if ($30) { - $31 = ((($10)) + 4|0); - $32 = HEAP32[$31>>2]|0; - $33 = ($32|0)==($5|0); - if ($33) { - $34 = ($28|0)==($2|0); - if (!($34)) { - _stbi__err(10797); - $$2 = 0; - return ($$2|0); - } - } else { - label = 9; - } - } else { - label = 9; - } - if ((label|0) == 9) { - $35 = ($28>>>0)>($2>>>0); - if ($35) { - _stbi__err(10797); - $$2 = 0; - return ($$2|0); - } - } - $36 = ($5|0)==(0); - L18: do { - if (!($36)) { - $37 = ($6|0)<(8); - $38 = ($26>>>0)>($4>>>0); - $39 = (($11) - ($26))|0; - $40 = (0 - ($12))|0; - $41 = ($6|0)==(8); - $brmerge = $37 | $17; - $42 = ($4|0)==(0); - $$0614793 = (($4) + -1)|0; - $43 = ($$0614793|0)==(0); - $$1615785 = (($4) + -1)|0; - $44 = ($$1615785|0)==(0); - $$2616776 = (($4) + -1)|0; - $45 = ($$2616776|0)==(0); - $$3617767 = (($4) + -1)|0; - $46 = ($$3617767|0)==(0); - $$4618758 = (($4) + -1)|0; - $47 = ($$4618758|0)==(0); - $$5619750 = (($4) + -1)|0; - $48 = ($$5619750|0)==(0); - $$6620742 = (($4) + -1)|0; - $49 = ($$6620742|0)==(0); - $$not = $8 ^ 1; - $brmerge894 = $42 | $$not; - $$0577817 = $1;$$0608816 = $4;$$0611815 = $16;$$0623814 = 0; - while(1) { - $50 = HEAP32[$21>>2]|0; - $51 = Math_imul($$0623814, $12)|0; - $52 = (($50) + ($51)|0); - $53 = ((($$0577817)) + 1|0); - $54 = HEAP8[$$0577817>>0]|0; - $55 = $54&255; - $56 = ($54&255)>(4); - if ($56) { - label = 105; - break; - } - if ($37) { - if ($38) { - label = 16; - break; - } - $57 = (($52) + ($39)|0); - $$0597 = $57;$$1609 = $26;$$1612 = 1; - } else { - $$0597 = $52;$$1609 = $$0608816;$$1612 = $$0611815; - } - $58 = (($$0597) + ($40)|0); - $59 = ($$0623814|0)==(0); - if ($59) { - $60 = (10836 + ($55)|0); - $61 = HEAP8[$60>>0]|0; - $62 = $61&255; - $$0588 = $62; - } else { - $$0588 = $55; - } - $63 = ($$1612|0)>(0); - L30: do { - if ($63) { - $trunc638 = $$0588&255; - $$0625734 = 0; - while(1) { - switch ($trunc638<<24>>24) { - case 0: { - $64 = (($53) + ($$0625734)|0); - $65 = HEAP8[$64>>0]|0; - $$sink = $65; - label = 30; - break; - } - case 1: { - $66 = (($53) + ($$0625734)|0); - $67 = HEAP8[$66>>0]|0; - $$sink = $67; - label = 30; - break; - } - case 2: { - $68 = (($53) + ($$0625734)|0); - $69 = HEAP8[$68>>0]|0; - $70 = $69&255; - $71 = (($58) + ($$0625734)|0); - $72 = HEAP8[$71>>0]|0; - $73 = $72&255; - $74 = (($73) + ($70))|0; - $75 = $74&255; - $$sink = $75; - label = 30; - break; - } - case 3: { - $76 = (($53) + ($$0625734)|0); - $77 = HEAP8[$76>>0]|0; - $78 = $77&255; - $79 = (($58) + ($$0625734)|0); - $80 = HEAP8[$79>>0]|0; - $81 = $80&255; - $82 = $81 >>> 1; - $83 = (($82) + ($78))|0; - $84 = $83&255; - $$sink = $84; - label = 30; - break; - } - case 4: { - $85 = (($53) + ($$0625734)|0); - $86 = HEAP8[$85>>0]|0; - $87 = $86&255; - $88 = (($58) + ($$0625734)|0); - $89 = HEAP8[$88>>0]|0; - $90 = $89&255; - $91 = (_stbi__paeth(0,$90,0)|0); - $92 = (($91) + ($87))|0; - $93 = $92&255; - $$sink = $93; - label = 30; - break; - } - case 5: { - $94 = (($53) + ($$0625734)|0); - $95 = HEAP8[$94>>0]|0; - $$sink = $95; - label = 30; - break; - } - case 6: { - $96 = (($53) + ($$0625734)|0); - $97 = HEAP8[$96>>0]|0; - $$sink = $97; - label = 30; - break; - } - default: { - } - } - if ((label|0) == 30) { - label = 0; - $$sink1 = (($$0597) + ($$0625734)|0); - HEAP8[$$sink1>>0] = $$sink; - } - $98 = (($$0625734) + 1)|0; - $exitcond864 = ($98|0)==($$1612|0); - if ($exitcond864) { - break L30; - } else { - $$0625734 = $98; - } - } - } - } while(0); - do { - if ($41) { - if (!($17)) { - $99 = (($$0597) + ($14)|0); - HEAP8[$99>>0] = -1; - } - $100 = (($53) + ($14)|0); - $$1578 = $100;$$sink641 = $3; - } else { - if (!($8)) { - $105 = ((($$0577817)) + 2|0); - $$1578 = $105;$$sink641 = 1; - break; - } - if (!($17)) { - $101 = (($$1612) + 1)|0; - $102 = (($$0597) + ($101)|0); - $103 = (($$0597) + ($$1612)|0); - HEAP8[$103>>0] = -1; - HEAP8[$102>>0] = -1; - } - $104 = (($53) + ($$1612)|0); - $$1578 = $104;$$sink641 = $15; - } - } while(0); - $106 = (($$0597) + ($$sink641)|0); - $107 = (($58) + ($$sink641)|0); - if ($brmerge) { - $108 = (($$1609) + -1)|0; - $109 = Math_imul($108, $$1612)|0; - $trunc637 = $$0588&255; - switch ($trunc637<<24>>24) { - case 0: { - _memcpy(($106|0),($$1578|0),($109|0))|0; - break; - } - case 1: { - $115 = ($109|0)>(0); - if ($115) { - $$1626812 = 0; - while(1) { - $116 = (($$1578) + ($$1626812)|0); - $117 = HEAP8[$116>>0]|0; - $118 = $117&255; - $119 = (($$1626812) - ($$1612))|0; - $120 = (($106) + ($119)|0); - $121 = HEAP8[$120>>0]|0; - $122 = $121&255; - $123 = (($122) + ($118))|0; - $124 = $123&255; - $125 = (($106) + ($$1626812)|0); - HEAP8[$125>>0] = $124; - $126 = (($$1626812) + 1)|0; - $exitcond886 = ($126|0)==($109|0); - if ($exitcond886) { - break; - } else { - $$1626812 = $126; - } - } - } - break; - } - case 2: { - $114 = ($109|0)>(0); - if ($114) { - $$2627810 = 0; - while(1) { - $127 = (($$1578) + ($$2627810)|0); - $128 = HEAP8[$127>>0]|0; - $129 = $128&255; - $130 = (($107) + ($$2627810)|0); - $131 = HEAP8[$130>>0]|0; - $132 = $131&255; - $133 = (($132) + ($129))|0; - $134 = $133&255; - $135 = (($106) + ($$2627810)|0); - HEAP8[$135>>0] = $134; - $136 = (($$2627810) + 1)|0; - $exitcond885 = ($136|0)==($109|0); - if ($exitcond885) { - break; - } else { - $$2627810 = $136; - } - } - } - break; - } - case 3: { - $113 = ($109|0)>(0); - if ($113) { - $$3628808 = 0; - while(1) { - $137 = (($$1578) + ($$3628808)|0); - $138 = HEAP8[$137>>0]|0; - $139 = $138&255; - $140 = (($107) + ($$3628808)|0); - $141 = HEAP8[$140>>0]|0; - $142 = $141&255; - $143 = (($$3628808) - ($$1612))|0; - $144 = (($106) + ($143)|0); - $145 = HEAP8[$144>>0]|0; - $146 = $145&255; - $147 = (($146) + ($142))|0; - $148 = $147 >>> 1; - $149 = (($148) + ($139))|0; - $150 = $149&255; - $151 = (($106) + ($$3628808)|0); - HEAP8[$151>>0] = $150; - $152 = (($$3628808) + 1)|0; - $exitcond884 = ($152|0)==($109|0); - if ($exitcond884) { - break; - } else { - $$3628808 = $152; - } - } - } - break; - } - case 4: { - $112 = ($109|0)>(0); - if ($112) { - $$4629806 = 0; - while(1) { - $153 = (($$1578) + ($$4629806)|0); - $154 = HEAP8[$153>>0]|0; - $155 = $154&255; - $156 = (($$4629806) - ($$1612))|0; - $157 = (($106) + ($156)|0); - $158 = HEAP8[$157>>0]|0; - $159 = $158&255; - $160 = (($107) + ($$4629806)|0); - $161 = HEAP8[$160>>0]|0; - $162 = $161&255; - $163 = (($107) + ($156)|0); - $164 = HEAP8[$163>>0]|0; - $165 = $164&255; - $166 = (_stbi__paeth($159,$162,$165)|0); - $167 = (($166) + ($155))|0; - $168 = $167&255; - $169 = (($106) + ($$4629806)|0); - HEAP8[$169>>0] = $168; - $170 = (($$4629806) + 1)|0; - $exitcond883 = ($170|0)==($109|0); - if ($exitcond883) { - break; - } else { - $$4629806 = $170; - } - } - } - break; - } - case 5: { - $111 = ($109|0)>(0); - if ($111) { - $$5630804 = 0; - while(1) { - $171 = (($$1578) + ($$5630804)|0); - $172 = HEAP8[$171>>0]|0; - $173 = $172&255; - $174 = (($$5630804) - ($$1612))|0; - $175 = (($106) + ($174)|0); - $176 = HEAP8[$175>>0]|0; - $177 = $176&255; - $178 = $177 >>> 1; - $179 = (($178) + ($173))|0; - $180 = $179&255; - $181 = (($106) + ($$5630804)|0); - HEAP8[$181>>0] = $180; - $182 = (($$5630804) + 1)|0; - $exitcond882 = ($182|0)==($109|0); - if ($exitcond882) { - break; - } else { - $$5630804 = $182; - } - } - } - break; - } - case 6: { - $110 = ($109|0)>(0); - if ($110) { - $$6631802 = 0; - while(1) { - $183 = (($$1578) + ($$6631802)|0); - $184 = HEAP8[$183>>0]|0; - $185 = $184&255; - $186 = (($$6631802) - ($$1612))|0; - $187 = (($106) + ($186)|0); - $188 = HEAP8[$187>>0]|0; - $189 = $188&255; - $190 = (_stbi__paeth($189,0,0)|0); - $191 = (($190) + ($185))|0; - $192 = $191&255; - $193 = (($106) + ($$6631802)|0); - HEAP8[$193>>0] = $192; - $194 = (($$6631802) + 1)|0; - $exitcond881 = ($194|0)==($109|0); - if ($exitcond881) { - break; - } else { - $$6631802 = $194; - } - } - } - break; - } - default: { - } - } - $195 = (($$1578) + ($109)|0); - $$11$ph = $195; - } else { - if (!($19)) { - label = 58; - break; - } - $trunc = $$0588&255; - switch ($trunc<<24>>24) { - case 0: { - if ($43) { - $$9586 = $$1578; - } else { - $208 = ($$1612|0)>(0); - $209 = Math_imul($$6620742, $$1612)|0; - $$0614796 = $$0614793;$$2579795 = $$1578;$$2599794 = $106; - while(1) { - if ($208) { - $$7632790 = 0; - while(1) { - $210 = (($$2579795) + ($$7632790)|0); - $211 = HEAP8[$210>>0]|0; - $212 = (($$2599794) + ($$7632790)|0); - HEAP8[$212>>0] = $211; - $213 = (($$7632790) + 1)|0; - $exitcond877 = ($213|0)==($$1612|0); - if ($exitcond877) { - break; - } else { - $$7632790 = $213; - } - } - } - $214 = (($$2599794) + ($$1612)|0); - HEAP8[$214>>0] = -1; - $215 = (($$2579795) + ($$1612)|0); - $216 = (($$2599794) + ($15)|0); - $$0614 = (($$0614796) + -1)|0; - $217 = ($$0614|0)==(0); - if ($217) { - break; - } else { - $$0614796 = $$0614;$$2579795 = $215;$$2599794 = $216; - } - } - $scevgep879 = (($$1578) + ($209)|0); - $$9586 = $scevgep879; - } - break; - } - case 1: { - if ($44) { - $$9586 = $$1578; - } else { - $206 = ($$1612|0)>(0); - $207 = Math_imul($$6620742, $$1612)|0; - $$1615788 = $$1615785;$$3580787 = $$1578;$$3600786 = $106; - while(1) { - if ($206) { - $$8633782 = 0; - while(1) { - $218 = (($$3580787) + ($$8633782)|0); - $219 = HEAP8[$218>>0]|0; - $220 = $219&255; - $221 = (($$8633782) - ($15))|0; - $222 = (($$3600786) + ($221)|0); - $223 = HEAP8[$222>>0]|0; - $224 = $223&255; - $225 = (($224) + ($220))|0; - $226 = $225&255; - $227 = (($$3600786) + ($$8633782)|0); - HEAP8[$227>>0] = $226; - $228 = (($$8633782) + 1)|0; - $exitcond875 = ($228|0)==($$1612|0); - if ($exitcond875) { - break; - } else { - $$8633782 = $228; - } - } - } - $229 = (($$3600786) + ($$1612)|0); - HEAP8[$229>>0] = -1; - $230 = (($$3580787) + ($$1612)|0); - $231 = (($$3600786) + ($15)|0); - $$1615 = (($$1615788) + -1)|0; - $232 = ($$1615|0)==(0); - if ($232) { - break; - } else { - $$1615788 = $$1615;$$3580787 = $230;$$3600786 = $231; - } - } - $scevgep876 = (($$1578) + ($207)|0); - $$9586 = $scevgep876; - } - break; - } - case 2: { - if ($45) { - $$9586 = $$1578; - } else { - $204 = ($$1612|0)>(0); - $205 = Math_imul($$6620742, $$1612)|0; - $$2616780 = $$2616776;$$3592778 = $107;$$4581779 = $$1578;$$4601777 = $106; - while(1) { - if ($204) { - $$9634773 = 0; - while(1) { - $233 = (($$4581779) + ($$9634773)|0); - $234 = HEAP8[$233>>0]|0; - $235 = $234&255; - $236 = (($$3592778) + ($$9634773)|0); - $237 = HEAP8[$236>>0]|0; - $238 = $237&255; - $239 = (($238) + ($235))|0; - $240 = $239&255; - $241 = (($$4601777) + ($$9634773)|0); - HEAP8[$241>>0] = $240; - $242 = (($$9634773) + 1)|0; - $exitcond873 = ($242|0)==($$1612|0); - if ($exitcond873) { - break; - } else { - $$9634773 = $242; - } - } - } - $243 = (($$4601777) + ($$1612)|0); - HEAP8[$243>>0] = -1; - $244 = (($$4581779) + ($$1612)|0); - $245 = (($$4601777) + ($15)|0); - $246 = (($$3592778) + ($15)|0); - $$2616 = (($$2616780) + -1)|0; - $247 = ($$2616|0)==(0); - if ($247) { - break; - } else { - $$2616780 = $$2616;$$3592778 = $246;$$4581779 = $244;$$4601777 = $245; - } - } - $scevgep874 = (($$1578) + ($205)|0); - $$9586 = $scevgep874; - } - break; - } - case 3: { - if ($46) { - $$9586 = $$1578; - } else { - $202 = ($$1612|0)>(0); - $203 = Math_imul($$6620742, $$1612)|0; - $$3617771 = $$3617767;$$4593769 = $107;$$5582770 = $$1578;$$5602768 = $106; - while(1) { - if ($202) { - $$10635764 = 0; - while(1) { - $248 = (($$5582770) + ($$10635764)|0); - $249 = HEAP8[$248>>0]|0; - $250 = $249&255; - $251 = (($$4593769) + ($$10635764)|0); - $252 = HEAP8[$251>>0]|0; - $253 = $252&255; - $254 = (($$10635764) - ($15))|0; - $255 = (($$5602768) + ($254)|0); - $256 = HEAP8[$255>>0]|0; - $257 = $256&255; - $258 = (($257) + ($253))|0; - $259 = $258 >>> 1; - $260 = (($259) + ($250))|0; - $261 = $260&255; - $262 = (($$5602768) + ($$10635764)|0); - HEAP8[$262>>0] = $261; - $263 = (($$10635764) + 1)|0; - $exitcond871 = ($263|0)==($$1612|0); - if ($exitcond871) { - break; - } else { - $$10635764 = $263; - } - } - } - $264 = (($$5602768) + ($$1612)|0); - HEAP8[$264>>0] = -1; - $265 = (($$5582770) + ($$1612)|0); - $266 = (($$5602768) + ($15)|0); - $267 = (($$4593769) + ($15)|0); - $$3617 = (($$3617771) + -1)|0; - $268 = ($$3617|0)==(0); - if ($268) { - break; - } else { - $$3617771 = $$3617;$$4593769 = $267;$$5582770 = $265;$$5602768 = $266; - } - } - $scevgep872 = (($$1578) + ($203)|0); - $$9586 = $scevgep872; - } - break; - } - case 4: { - if ($47) { - $$9586 = $$1578; - } else { - $200 = ($$1612|0)>(0); - $201 = Math_imul($$6620742, $$1612)|0; - $$4618762 = $$4618758;$$5594760 = $107;$$6583761 = $$1578;$$6603759 = $106; - while(1) { - if ($200) { - $$11636755 = 0; - while(1) { - $269 = (($$6583761) + ($$11636755)|0); - $270 = HEAP8[$269>>0]|0; - $271 = $270&255; - $272 = (($$11636755) - ($15))|0; - $273 = (($$6603759) + ($272)|0); - $274 = HEAP8[$273>>0]|0; - $275 = $274&255; - $276 = (($$5594760) + ($$11636755)|0); - $277 = HEAP8[$276>>0]|0; - $278 = $277&255; - $279 = (($$5594760) + ($272)|0); - $280 = HEAP8[$279>>0]|0; - $281 = $280&255; - $282 = (_stbi__paeth($275,$278,$281)|0); - $283 = (($282) + ($271))|0; - $284 = $283&255; - $285 = (($$6603759) + ($$11636755)|0); - HEAP8[$285>>0] = $284; - $286 = (($$11636755) + 1)|0; - $exitcond869 = ($286|0)==($$1612|0); - if ($exitcond869) { - break; - } else { - $$11636755 = $286; - } - } - } - $287 = (($$6603759) + ($$1612)|0); - HEAP8[$287>>0] = -1; - $288 = (($$6583761) + ($$1612)|0); - $289 = (($$6603759) + ($15)|0); - $290 = (($$5594760) + ($15)|0); - $$4618 = (($$4618762) + -1)|0; - $291 = ($$4618|0)==(0); - if ($291) { - break; - } else { - $$4618762 = $$4618;$$5594760 = $290;$$6583761 = $288;$$6603759 = $289; - } - } - $scevgep870 = (($$1578) + ($201)|0); - $$9586 = $scevgep870; - } - break; - } - case 5: { - if ($48) { - $$9586 = $$1578; - } else { - $198 = ($$1612|0)>(0); - $199 = Math_imul($$6620742, $$1612)|0; - $$5619753 = $$5619750;$$7584752 = $$1578;$$7604751 = $106; - while(1) { - if ($198) { - $$12747 = 0; - while(1) { - $292 = (($$7584752) + ($$12747)|0); - $293 = HEAP8[$292>>0]|0; - $294 = $293&255; - $295 = (($$12747) - ($15))|0; - $296 = (($$7604751) + ($295)|0); - $297 = HEAP8[$296>>0]|0; - $298 = $297&255; - $299 = $298 >>> 1; - $300 = (($299) + ($294))|0; - $301 = $300&255; - $302 = (($$7604751) + ($$12747)|0); - HEAP8[$302>>0] = $301; - $303 = (($$12747) + 1)|0; - $exitcond867 = ($303|0)==($$1612|0); - if ($exitcond867) { - break; - } else { - $$12747 = $303; - } - } - } - $304 = (($$7604751) + ($$1612)|0); - HEAP8[$304>>0] = -1; - $305 = (($$7584752) + ($$1612)|0); - $306 = (($$7604751) + ($15)|0); - $$5619 = (($$5619753) + -1)|0; - $307 = ($$5619|0)==(0); - if ($307) { - break; - } else { - $$5619753 = $$5619;$$7584752 = $305;$$7604751 = $306; - } - } - $scevgep868 = (($$1578) + ($199)|0); - $$9586 = $scevgep868; - } - break; - } - case 6: { - if ($49) { - $$9586 = $$1578; - } else { - $196 = ($$1612|0)>(0); - $197 = Math_imul($$6620742, $$1612)|0; - $$6620745 = $$6620742;$$8585744 = $$1578;$$8605743 = $106; - while(1) { - if ($196) { - $$13739 = 0; - while(1) { - $308 = (($$8585744) + ($$13739)|0); - $309 = HEAP8[$308>>0]|0; - $310 = $309&255; - $311 = (($$13739) - ($15))|0; - $312 = (($$8605743) + ($311)|0); - $313 = HEAP8[$312>>0]|0; - $314 = $313&255; - $315 = (_stbi__paeth($314,0,0)|0); - $316 = (($315) + ($310))|0; - $317 = $316&255; - $318 = (($$8605743) + ($$13739)|0); - HEAP8[$318>>0] = $317; - $319 = (($$13739) + 1)|0; - $exitcond865 = ($319|0)==($$1612|0); - if ($exitcond865) { - break; - } else { - $$13739 = $319; - } - } - } - $320 = (($$8605743) + ($$1612)|0); - HEAP8[$320>>0] = -1; - $321 = (($$8585744) + ($$1612)|0); - $322 = (($$8605743) + ($15)|0); - $$6620 = (($$6620745) + -1)|0; - $323 = ($$6620|0)==(0); - if ($323) { - break; - } else { - $$6620745 = $$6620;$$8585744 = $321;$$8605743 = $322; - } - } - $scevgep866 = (($$1578) + ($197)|0); - $$9586 = $scevgep866; - } - break; - } - default: { - $$9586 = $$1578; - } - } - if ($brmerge894) { - $$11$ph = $$9586; - } else { - $324 = HEAP32[$21>>2]|0; - $325 = (($324) + ($51)|0); - $326 = (($$1612) + 1)|0; - $$7621798 = 0;$$9606799 = $325; - while(1) { - $327 = (($$9606799) + ($326)|0); - HEAP8[$327>>0] = -1; - $328 = (($$7621798) + 1)|0; - $329 = (($$9606799) + ($15)|0); - $exitcond880 = ($328|0)==($4|0); - if ($exitcond880) { - $$11$ph = $$9586; - break; - } else { - $$7621798 = $328;$$9606799 = $329; - } - } - } - } - $330 = (($$0623814) + 1)|0; - $331 = ($330>>>0)<($5>>>0); - if ($331) { - $$0577817 = $$11$ph;$$0608816 = $$1609;$$0611815 = $$1612;$$0623814 = $330; - } else { - break L18; - } - } - if ((label|0) == 16) { - ___assert_fail((10815|0),(10155|0),4315,(10770|0)); - // unreachable; - } - else if ((label|0) == 58) { - ___assert_fail((10841|0),(10155|0),4377,(10770|0)); - // unreachable; - } - else if ((label|0) == 105) { - _stbi__err(10858); - $$2 = 0; - return ($$2|0); - } - } - } while(0); - $332 = ($6|0)<(8); - if (!($332)) { - if (!($8)) { - $$2 = 1; - return ($$2|0); - } - $601 = Math_imul($4, $3)|0; - $602 = Math_imul($601, $5)|0; - $603 = ($602|0)==(0); - if ($603) { - $$2 = 1; - return ($$2|0); - } - $604 = HEAP32[$21>>2]|0; - $$0731 = $604;$$8622729 = 0; - while(1) { - $605 = HEAP8[$$0731>>0]|0; - $606 = $605&255; - $607 = $606 << 8; - $608 = ((($$0731)) + 1|0); - $609 = HEAP8[$608>>0]|0; - $610 = $609&255; - $611 = $607 | $610; - $612 = $611&65535; - HEAP16[$$0731>>1] = $612; - $613 = (($$8622729) + 1)|0; - $614 = ((($$0731)) + 2|0); - $exitcond = ($613|0)==($602|0); - if ($exitcond) { - $$2 = 1; - break; - } else { - $$0731 = $614;$$8622729 = $613; - } - } - return ($$2|0); - } - $333 = ($5|0)==(0); - if ($333) { - $$2 = 1; - return ($$2|0); - } - $334 = (0 - ($26))|0; - $335 = ($7|0)==(0); - $336 = (10554 + ($6)|0); - $$0568724 = (($4) + -1)|0; - $337 = ($$0568724|0)>(-1); - $$1721 = (($4) + -1)|0; - $338 = ($$1721|0)>(-1); - $339 = ($23|0)>(1); - $340 = ($23|0)>(3); - $341 = ($23|0)>(7); - $342 = (($23) + -8)|0; - $343 = $342 >>> 3; - $344 = $343 << 3; - $345 = (($344) + 8)|0; - $346 = (($342) - ($344))|0; - $347 = (($343) + ($11))|0; - $348 = (($347) + 1)|0; - $349 = (($348) - ($26))|0; - $350 = (($23) + -4)|0; - $351 = $350 >>> 2; - $352 = $351 << 2; - $353 = (($352) + 4)|0; - $354 = (($350) - ($352))|0; - $355 = (($351) + ($11))|0; - $356 = (($355) + 1)|0; - $357 = (($356) - ($26))|0; - $358 = (($23) + -2)|0; - $359 = $358 >>> 1; - $360 = $359 << 1; - $361 = (($360) + 2)|0; - $362 = (($358) - ($360))|0; - $363 = (($359) + ($11))|0; - $364 = (($363) + 1)|0; - $365 = (($364) - ($26))|0; - $$1624727 = 0;$indvars$iv = $345;$indvars$iv848 = $349;$indvars$iv851 = $353;$indvars$iv854 = $357;$indvars$iv857 = $361;$indvars$iv860 = $365; - L174: while(1) { - $366 = HEAP32[$21>>2]|0; - $367 = Math_imul($$1624727, $12)|0; - $368 = (($366) + ($367)|0); - $369 = (($368) + ($11)|0); - $370 = (($369) + ($334)|0); - if ($335) { - $371 = HEAP8[$336>>0]|0; - $372 = $371&255; - $377 = $372; - } else { - $377 = 1; - } - switch ($6|0) { - case 4: { - if ($339) { - $scevgep859 = (($366) + ($indvars$iv857)|0); - $$0571715 = $370;$$0574714 = $368;$$14713 = $23; - while(1) { - $373 = HEAP8[$$0571715>>0]|0; - $374 = $373&255; - $375 = $374 >>> 4; - $376 = Math_imul($375, $377)|0; - $378 = $376&255; - $379 = ((($$0574714)) + 1|0); - HEAP8[$$0574714>>0] = $378; - $380 = HEAP8[$$0571715>>0]|0; - $381 = $380 & 15; - $382 = $381&255; - $383 = Math_imul($382, $377)|0; - $384 = $383&255; - $385 = ((($$0574714)) + 2|0); - HEAP8[$379>>0] = $384; - $386 = (($$14713) + -2)|0; - $387 = ((($$0571715)) + 1|0); - $388 = ($386|0)>(1); - if ($388) { - $$0571715 = $387;$$0574714 = $385;$$14713 = $386; - } else { - break; - } - } - $scevgep862 = (($366) + ($indvars$iv860)|0); - $$0571$lcssa = $scevgep862;$$0574$lcssa = $scevgep859;$$14$lcssa = $362; - } else { - $$0571$lcssa = $370;$$0574$lcssa = $368;$$14$lcssa = $23; - } - $389 = ($$14$lcssa|0)==(1); - if ($389) { - $390 = HEAP8[$$0571$lcssa>>0]|0; - $391 = $390&255; - $392 = $391 >>> 4; - $393 = Math_imul($392, $377)|0; - $394 = $393&255; - HEAP8[$$0574$lcssa>>0] = $394; - } - break; - } - case 2: { - if ($340) { - $scevgep853 = (($366) + ($indvars$iv851)|0); - $$15705 = $23;$$1572707 = $370;$$1575706 = $368; - while(1) { - $395 = HEAP8[$$1572707>>0]|0; - $396 = $395&255; - $397 = $396 >>> 6; - $398 = Math_imul($397, $377)|0; - $399 = $398&255; - $400 = ((($$1575706)) + 1|0); - HEAP8[$$1575706>>0] = $399; - $401 = HEAP8[$$1572707>>0]|0; - $402 = $401&255; - $403 = $402 >>> 4; - $404 = $403 & 3; - $405 = Math_imul($404, $377)|0; - $406 = $405&255; - $407 = ((($$1575706)) + 2|0); - HEAP8[$400>>0] = $406; - $408 = HEAP8[$$1572707>>0]|0; - $409 = $408&255; - $410 = $409 >>> 2; - $411 = $410 & 3; - $412 = Math_imul($411, $377)|0; - $413 = $412&255; - $414 = ((($$1575706)) + 3|0); - HEAP8[$407>>0] = $413; - $415 = HEAP8[$$1572707>>0]|0; - $416 = $415 & 3; - $417 = $416&255; - $418 = Math_imul($417, $377)|0; - $419 = $418&255; - $420 = ((($$1575706)) + 4|0); - HEAP8[$414>>0] = $419; - $421 = (($$15705) + -4)|0; - $422 = ((($$1572707)) + 1|0); - $423 = ($421|0)>(3); - if ($423) { - $$15705 = $421;$$1572707 = $422;$$1575706 = $420; - } else { - break; - } - } - $scevgep856 = (($366) + ($indvars$iv854)|0); - $$15$lcssa = $354;$$1572$lcssa = $scevgep856;$$1575$lcssa = $scevgep853; - } else { - $$15$lcssa = $23;$$1572$lcssa = $370;$$1575$lcssa = $368; - } - $424 = ($$15$lcssa|0)>(0); - if ($424) { - $425 = HEAP8[$$1572$lcssa>>0]|0; - $426 = $425&255; - $427 = $426 >>> 6; - $428 = Math_imul($427, $377)|0; - $429 = $428&255; - HEAP8[$$1575$lcssa>>0] = $429; - $430 = ($$15$lcssa|0)==(1); - if (!($430)) { - $431 = ((($$1575$lcssa)) + 1|0); - $432 = HEAP8[$$1572$lcssa>>0]|0; - $433 = $432&255; - $434 = $433 >>> 4; - $435 = $434 & 3; - $436 = Math_imul($435, $377)|0; - $437 = $436&255; - HEAP8[$431>>0] = $437; - $438 = ($$15$lcssa|0)>(2); - if ($438) { - $439 = ((($$1575$lcssa)) + 2|0); - $440 = HEAP8[$$1572$lcssa>>0]|0; - $441 = $440&255; - $442 = $441 >>> 2; - $443 = $442 & 3; - $444 = Math_imul($443, $377)|0; - $445 = $444&255; - HEAP8[$439>>0] = $445; - } - } - } - break; - } - case 1: { - if ($341) { - $scevgep = (($366) + ($indvars$iv)|0); - $$16700 = $23;$$2573702 = $370;$$4701 = $368; - while(1) { - $446 = HEAP8[$$2573702>>0]|0; - $447 = $446&255; - $448 = $447 >>> 7; - $449 = (0 - ($448))|0; - $450 = $377 & $449; - $451 = $450&255; - $452 = ((($$4701)) + 1|0); - HEAP8[$$4701>>0] = $451; - $453 = HEAP8[$$2573702>>0]|0; - $454 = $453&255; - $455 = $454 >>> 6; - $456 = $455 & 1; - $457 = (0 - ($456))|0; - $458 = $377 & $457; - $459 = $458&255; - $460 = ((($$4701)) + 2|0); - HEAP8[$452>>0] = $459; - $461 = HEAP8[$$2573702>>0]|0; - $462 = $461&255; - $463 = $462 >>> 5; - $464 = $463 & 1; - $465 = (0 - ($464))|0; - $466 = $377 & $465; - $467 = $466&255; - $468 = ((($$4701)) + 3|0); - HEAP8[$460>>0] = $467; - $469 = HEAP8[$$2573702>>0]|0; - $470 = $469&255; - $471 = $470 >>> 4; - $472 = $471 & 1; - $473 = (0 - ($472))|0; - $474 = $377 & $473; - $475 = $474&255; - $476 = ((($$4701)) + 4|0); - HEAP8[$468>>0] = $475; - $477 = HEAP8[$$2573702>>0]|0; - $478 = $477&255; - $479 = $478 >>> 3; - $480 = $479 & 1; - $481 = (0 - ($480))|0; - $482 = $377 & $481; - $483 = $482&255; - $484 = ((($$4701)) + 5|0); - HEAP8[$476>>0] = $483; - $485 = HEAP8[$$2573702>>0]|0; - $486 = $485&255; - $487 = $486 >>> 2; - $488 = $487 & 1; - $489 = (0 - ($488))|0; - $490 = $377 & $489; - $491 = $490&255; - $492 = ((($$4701)) + 6|0); - HEAP8[$484>>0] = $491; - $493 = HEAP8[$$2573702>>0]|0; - $494 = $493&255; - $495 = $494 >>> 1; - $496 = $495 & 1; - $497 = (0 - ($496))|0; - $498 = $377 & $497; - $499 = $498&255; - $500 = ((($$4701)) + 7|0); - HEAP8[$492>>0] = $499; - $501 = HEAP8[$$2573702>>0]|0; - $502 = $501 & 1; - $503 = $502&255; - $504 = (0 - ($503))|0; - $505 = $377 & $504; - $506 = $505&255; - $507 = ((($$4701)) + 8|0); - HEAP8[$500>>0] = $506; - $508 = (($$16700) + -8)|0; - $509 = ((($$2573702)) + 1|0); - $510 = ($508|0)>(7); - if ($510) { - $$16700 = $508;$$2573702 = $509;$$4701 = $507; - } else { - break; - } - } - $scevgep850 = (($366) + ($indvars$iv848)|0); - $$16$lcssa = $346;$$2573$lcssa = $scevgep850;$$4$lcssa = $scevgep; - } else { - $$16$lcssa = $23;$$2573$lcssa = $370;$$4$lcssa = $368; - } - $511 = ($$16$lcssa|0)>(0); - if ($511) { - $512 = HEAP8[$$2573$lcssa>>0]|0; - $513 = $512&255; - $514 = $513 >>> 7; - $515 = (0 - ($514))|0; - $516 = $377 & $515; - $517 = $516&255; - HEAP8[$$4$lcssa>>0] = $517; - $518 = ($$16$lcssa|0)==(1); - if (!($518)) { - $519 = ((($$4$lcssa)) + 1|0); - $520 = HEAP8[$$2573$lcssa>>0]|0; - $521 = $520&255; - $522 = $521 >>> 6; - $523 = $522 & 1; - $524 = (0 - ($523))|0; - $525 = $377 & $524; - $526 = $525&255; - HEAP8[$519>>0] = $526; - $527 = ($$16$lcssa|0)>(2); - if ($527) { - $528 = ((($$4$lcssa)) + 2|0); - $529 = HEAP8[$$2573$lcssa>>0]|0; - $530 = $529&255; - $531 = $530 >>> 5; - $532 = $531 & 1; - $533 = (0 - ($532))|0; - $534 = $377 & $533; - $535 = $534&255; - HEAP8[$528>>0] = $535; - $536 = ($$16$lcssa|0)==(3); - if (!($536)) { - $537 = ((($$4$lcssa)) + 3|0); - $538 = HEAP8[$$2573$lcssa>>0]|0; - $539 = $538&255; - $540 = $539 >>> 4; - $541 = $540 & 1; - $542 = (0 - ($541))|0; - $543 = $377 & $542; - $544 = $543&255; - HEAP8[$537>>0] = $544; - $545 = ($$16$lcssa|0)>(4); - if ($545) { - $546 = ((($$4$lcssa)) + 4|0); - $547 = HEAP8[$$2573$lcssa>>0]|0; - $548 = $547&255; - $549 = $548 >>> 3; - $550 = $549 & 1; - $551 = (0 - ($550))|0; - $552 = $377 & $551; - $553 = $552&255; - HEAP8[$546>>0] = $553; - $554 = ($$16$lcssa|0)==(5); - if (!($554)) { - $555 = ((($$4$lcssa)) + 5|0); - $556 = HEAP8[$$2573$lcssa>>0]|0; - $557 = $556&255; - $558 = $557 >>> 2; - $559 = $558 & 1; - $560 = (0 - ($559))|0; - $561 = $377 & $560; - $562 = $561&255; - HEAP8[$555>>0] = $562; - $563 = ($$16$lcssa|0)>(6); - if ($563) { - $564 = ((($$4$lcssa)) + 6|0); - $565 = HEAP8[$$2573$lcssa>>0]|0; - $566 = $565&255; - $567 = $566 >>> 1; - $568 = $567 & 1; - $569 = (0 - ($568))|0; - $570 = $377 & $569; - $571 = $570&255; - HEAP8[$564>>0] = $571; - } - } - } - } - } - } - } - break; - } - default: { - } - } - L213: do { - if (!($17)) { - $572 = HEAP32[$21>>2]|0; - $573 = (($572) + ($367)|0); - switch ($14|0) { - case 1: { - if ($337) { - $$0568725 = $$0568724; - } else { - break L213; - } - while(1) { - $574 = $$0568725 << 1; - $575 = $574 | 1; - $576 = (($573) + ($575)|0); - HEAP8[$576>>0] = -1; - $577 = (($573) + ($$0568725)|0); - $578 = HEAP8[$577>>0]|0; - $579 = (($573) + ($574)|0); - HEAP8[$579>>0] = $578; - $$0568 = (($$0568725) + -1)|0; - $580 = ($$0568|0)>(-1); - if ($580) { - $$0568725 = $$0568; - } else { - break; - } - } - break; - } - case 3: { - if ($338) { - $$1722 = $$1721; - } else { - break L213; - } - while(1) { - $581 = $$1722 << 2; - $582 = $581 | 3; - $583 = (($573) + ($582)|0); - HEAP8[$583>>0] = -1; - $584 = ($$1722*3)|0; - $585 = (($584) + 2)|0; - $586 = (($573) + ($585)|0); - $587 = HEAP8[$586>>0]|0; - $588 = $581 | 2; - $589 = (($573) + ($588)|0); - HEAP8[$589>>0] = $587; - $590 = (($584) + 1)|0; - $591 = (($573) + ($590)|0); - $592 = HEAP8[$591>>0]|0; - $593 = $581 | 1; - $594 = (($573) + ($593)|0); - HEAP8[$594>>0] = $592; - $595 = (($573) + ($584)|0); - $596 = HEAP8[$595>>0]|0; - $597 = (($573) + ($581)|0); - HEAP8[$597>>0] = $596; - $$1 = (($$1722) + -1)|0; - $598 = ($$1|0)>(-1); - if ($598) { - $$1722 = $$1; - } else { - break; - } - } - break; - } - default: { - label = 144; - break L174; - } - } - } - } while(0); - $599 = (($$1624727) + 1)|0; - $600 = ($599>>>0)<($5>>>0); - $indvars$iv$next = (($indvars$iv) + ($12))|0; - $indvars$iv$next849 = (($indvars$iv848) + ($12))|0; - $indvars$iv$next852 = (($indvars$iv851) + ($12))|0; - $indvars$iv$next855 = (($indvars$iv854) + ($12))|0; - $indvars$iv$next858 = (($indvars$iv857) + ($12))|0; - $indvars$iv$next861 = (($indvars$iv860) + ($12))|0; - if ($600) { - $$1624727 = $599;$indvars$iv = $indvars$iv$next;$indvars$iv848 = $indvars$iv$next849;$indvars$iv851 = $indvars$iv$next852;$indvars$iv854 = $indvars$iv$next855;$indvars$iv857 = $indvars$iv$next858;$indvars$iv860 = $indvars$iv$next861; - } else { - $$2 = 1; - label = 151; - break; - } - } - if ((label|0) == 144) { - ___assert_fail((10873|0),(10155|0),4466,(10770|0)); - // unreachable; - } - else if ((label|0) == 151) { - return ($$2|0); - } - return (0)|0; -} -function _stbi__paeth($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $$ = 0, $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ispos = 0, $ispos26 = 0, $ispos28 = 0, $neg = 0, $neg27 = 0, $neg29 = 0, $or$cond = 0; - var label = 0, sp = 0; - sp = STACKTOP; - $3 = (($1) + ($0))|0; - $4 = (($3) - ($2))|0; - $5 = (($4) - ($0))|0; - $ispos = ($5|0)>(-1); - $neg = (0 - ($5))|0; - $6 = $ispos ? $5 : $neg; - $7 = (($4) - ($1))|0; - $ispos26 = ($7|0)>(-1); - $neg27 = (0 - ($7))|0; - $8 = $ispos26 ? $7 : $neg27; - $9 = (($4) - ($2))|0; - $ispos28 = ($9|0)>(-1); - $neg29 = (0 - ($9))|0; - $10 = $ispos28 ? $9 : $neg29; - $11 = ($6|0)>($8|0); - $12 = ($6|0)>($10|0); - $or$cond = $11 | $12; - $13 = ($8|0)>($10|0); - $$ = $13 ? $2 : $1; - $$0 = $or$cond ? $$ : $0; - return ($$0|0); -} -function _stbi__do_zlib($0,$1,$2,$3,$4) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - $3 = $3|0; - $4 = $4|0; - var $10 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $5 = ((($0)) + 20|0); - HEAP32[$5>>2] = $1; - $6 = ((($0)) + 16|0); - HEAP32[$6>>2] = $1; - $7 = (($1) + ($2)|0); - $8 = ((($0)) + 24|0); - HEAP32[$8>>2] = $7; - $9 = ((($0)) + 28|0); - HEAP32[$9>>2] = $3; - $10 = (_stbi__parse_zlib($0,$4)|0); - return ($10|0); -} -function _stbi__parse_zlib($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; - var $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $2 = ($1|0)==(0); - if (!($2)) { - $3 = (_stbi__parse_zlib_header($0)|0); - $4 = ($3|0)==(0); - if ($4) { - $$0 = 0; - return ($$0|0); - } - } - $5 = ((($0)) + 8|0); - HEAP32[$5>>2] = 0; - $6 = ((($0)) + 12|0); - HEAP32[$6>>2] = 0; - $7 = ((($0)) + 32|0); - $8 = ((($0)) + 2052|0); - L5: while(1) { - $9 = (_stbi__zreceive($0,1)|0); - $10 = (_stbi__zreceive($0,2)|0); - switch ($10|0) { - case 3: { - $$0 = 0; - label = 11; - break L5; - break; - } - case 0: { - $11 = (_stbi__parse_uncompressed_block($0)|0); - $12 = ($11|0)==(0); - if ($12) { - $$0 = 0; - label = 11; - break L5; - } - break; - } - case 1: { - $13 = (_stbi__zbuild_huffman($7,10884,288)|0); - $14 = ($13|0)==(0); - if ($14) { - $$0 = 0; - label = 11; - break L5; - } - $15 = (_stbi__zbuild_huffman($8,11172,32)|0); - $16 = ($15|0)==(0); - if ($16) { - $$0 = 0; - label = 11; - break L5; - } else { - label = 9; - } - break; - } - default: { - $17 = (_stbi__compute_huffman_codes($0)|0); - $18 = ($17|0)==(0); - if ($18) { - $$0 = 0; - label = 11; - break L5; - } else { - label = 9; - } - } - } - if ((label|0) == 9) { - label = 0; - $19 = (_stbi__parse_huffman_block($0)|0); - $20 = ($19|0)==(0); - if ($20) { - $$0 = 0; - label = 11; - break; - } - } - $21 = ($9|0)==(0); - if (!($21)) { - $$0 = 1; - label = 11; - break; - } - } - if ((label|0) == 11) { - return ($$0|0); - } - return (0)|0; -} -function _stbi__parse_zlib_header($0) { - $0 = $0|0; - var $$0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = (_stbi__zget8($0)|0); - $2 = $1&255; - $3 = $2 & 15; - $4 = (_stbi__zget8($0)|0); - $5 = $4&255; - $6 = $2 << 8; - $7 = $6 | $5; - $8 = (($7>>>0) % 31)&-1; - $9 = ($8|0)==(0); - if (!($9)) { - _stbi__err(11519); - $$0 = 0; - return ($$0|0); - } - $10 = $5 & 32; - $11 = ($10|0)==(0); - if (!($11)) { - _stbi__err(11535); - $$0 = 0; - return ($$0|0); - } - $12 = ($3|0)==(8); - if ($12) { - $$0 = 1; - return ($$0|0); - } - _stbi__err(11550); - $$0 = 0; - return ($$0|0); -} -function _stbi__zreceive($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $2 = ((($0)) + 8|0); - $3 = HEAP32[$2>>2]|0; - $4 = ($3|0)<($1|0); - if ($4) { - _stbi__fill_bits($0); - } - $5 = ((($0)) + 12|0); - $6 = HEAP32[$5>>2]|0; - $7 = 1 << $1; - $8 = (($7) + -1)|0; - $9 = $6 & $8; - $10 = $6 >>> $1; - HEAP32[$5>>2] = $10; - $11 = HEAP32[$2>>2]|0; - $12 = (($11) - ($1))|0; - HEAP32[$2>>2] = $12; - return ($9|0); -} -function _stbi__parse_uncompressed_block($0) { - $0 = $0|0; - var $$0$lcssa = 0, $$034 = 0, $$037 = 0, $$136 = 0, $$lcssa = 0, $$ph = 0, $$pr = 0, $$promoted = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0; - var $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0; - var $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0; - var $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $exitcond47 = 0, $smax = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $1 = sp; - $2 = ((($0)) + 8|0); - $3 = HEAP32[$2>>2]|0; - $4 = $3 & 7; - $5 = ($4|0)==(0); - if ($5) { - $$ph = $3; - } else { - (_stbi__zreceive($0,$4)|0); - $$pr = HEAP32[$2>>2]|0; - $$ph = $$pr; - } - $6 = ($$ph|0)>(0); - if ($6) { - $7 = ((($0)) + 12|0); - $$promoted = HEAP32[$7>>2]|0; - $8 = $$ph ^ -1; - $9 = ($8|0)>(-9); - $smax = $9 ? $8 : -9; - $10 = (($$ph) + ($smax))|0; - $11 = (($10) + 8)|0; - $12 = $11 >>> 3; - $13 = (($12) + 1)|0; - $14 = $12 << 3; - $$037 = 0;$16 = $$promoted; - while(1) { - $15 = $16&255; - $17 = (($$037) + 1)|0; - $18 = (($1) + ($$037)|0); - HEAP8[$18>>0] = $15; - $19 = $16 >>> 8; - $exitcond47 = ($17|0)==($13|0); - if ($exitcond47) { - break; - } else { - $$037 = $17;$16 = $19; - } - } - $20 = (($$ph) + -8)|0; - $21 = (($20) - ($14))|0; - HEAP32[$7>>2] = $19; - HEAP32[$2>>2] = $21; - $$0$lcssa = $13;$$lcssa = $21; - } else { - $$0$lcssa = 0;$$lcssa = $$ph; - } - $22 = ($$lcssa|0)==(0); - if (!($22)) { - ___assert_fail((11441|0),(10155|0),4033,(11458|0)); - // unreachable; - } - $23 = ($$0$lcssa|0)<(4); - if ($23) { - $$136 = $$0$lcssa; - while(1) { - $24 = (_stbi__zget8($0)|0); - $25 = (($$136) + 1)|0; - $26 = (($1) + ($$136)|0); - HEAP8[$26>>0] = $24; - $exitcond = ($25|0)==(4); - if ($exitcond) { - break; - } else { - $$136 = $25; - } - } - } - $27 = ((($1)) + 1|0); - $28 = HEAP8[$27>>0]|0; - $29 = $28&255; - $30 = $29 << 8; - $31 = HEAP8[$1>>0]|0; - $32 = $31&255; - $33 = $30 | $32; - $34 = ((($1)) + 3|0); - $35 = HEAP8[$34>>0]|0; - $36 = $35&255; - $37 = $36 << 8; - $38 = ((($1)) + 2|0); - $39 = HEAP8[$38>>0]|0; - $40 = $39&255; - $41 = $37 | $40; - $42 = $33 ^ 65535; - $43 = ($41|0)==($42|0); - if (!($43)) { - _stbi__err(11489); - $$034 = 0; - STACKTOP = sp;return ($$034|0); - } - $44 = HEAP32[$0>>2]|0; - $45 = (($44) + ($33)|0); - $46 = ((($0)) + 4|0); - $47 = HEAP32[$46>>2]|0; - $48 = ($45>>>0)>($47>>>0); - if ($48) { - _stbi__err(11502); - $$034 = 0; - STACKTOP = sp;return ($$034|0); - } - $49 = ((($0)) + 16|0); - $50 = HEAP32[$49>>2]|0; - $51 = (($50) + ($33)|0); - $52 = ((($0)) + 24|0); - $53 = HEAP32[$52>>2]|0; - $54 = ($51>>>0)>($53>>>0); - if ($54) { - $55 = (_stbi__zexpand($0,$50,$33)|0); - $56 = ($55|0)==(0); - if ($56) { - $$034 = 0; - STACKTOP = sp;return ($$034|0); - } - } - $57 = HEAP32[$49>>2]|0; - $58 = HEAP32[$0>>2]|0; - _memcpy(($57|0),($58|0),($33|0))|0; - $59 = HEAP32[$0>>2]|0; - $60 = (($59) + ($33)|0); - HEAP32[$0>>2] = $60; - $61 = HEAP32[$49>>2]|0; - $62 = (($61) + ($33)|0); - HEAP32[$49>>2] = $62; - $$034 = 1; - STACKTOP = sp;return ($$034|0); -} -function _stbi__zbuild_huffman($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $$075 = 0, $$07688 = 0, $$07785 = 0, $$07884 = 0, $$081 = 0, $$286 = 0, $$382 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0; - var $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0; - var $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0; - var $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0; - var $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0; - var $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $exitcond = 0, $exitcond91 = 0, $or$cond = 0, dest = 0, label = 0, sp = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 144|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(144|0); - $3 = sp + 72|0; - $4 = sp; - dest=$4; stop=dest+68|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); - _memset(($0|0),0,1024)|0; - $5 = ($2|0)>(0); - if ($5) { - $$07688 = 0; - while(1) { - $6 = (($1) + ($$07688)|0); - $7 = HEAP8[$6>>0]|0; - $8 = $7&255; - $9 = (($4) + ($8<<2)|0); - $10 = HEAP32[$9>>2]|0; - $11 = (($10) + 1)|0; - HEAP32[$9>>2] = $11; - $12 = (($$07688) + 1)|0; - $exitcond91 = ($12|0)==($2|0); - if ($exitcond91) { - break; - } else { - $$07688 = $12; - } - } - } - HEAP32[$4>>2] = 0; - $16 = ((($4)) + 4|0); - $17 = HEAP32[$16>>2]|0; - $18 = ($17|0)>(2); - if (!($18)) { - $13 = ((($4)) + 8|0); - $14 = HEAP32[$13>>2]|0; - $15 = ($14|0)>(4); - if (!($15)) { - $69 = ((($4)) + 12|0); - $70 = HEAP32[$69>>2]|0; - $71 = ($70|0)>(8); - if (!($71)) { - $72 = ((($4)) + 16|0); - $73 = HEAP32[$72>>2]|0; - $74 = ($73|0)>(16); - if (!($74)) { - $75 = ((($4)) + 20|0); - $76 = HEAP32[$75>>2]|0; - $77 = ($76|0)>(32); - if (!($77)) { - $78 = ((($4)) + 24|0); - $79 = HEAP32[$78>>2]|0; - $80 = ($79|0)>(64); - if (!($80)) { - $81 = ((($4)) + 28|0); - $82 = HEAP32[$81>>2]|0; - $83 = ($82|0)>(128); - if (!($83)) { - $84 = ((($4)) + 32|0); - $85 = HEAP32[$84>>2]|0; - $86 = ($85|0)>(256); - if (!($86)) { - $87 = ((($4)) + 36|0); - $88 = HEAP32[$87>>2]|0; - $89 = ($88|0)>(512); - if (!($89)) { - $90 = ((($4)) + 40|0); - $91 = HEAP32[$90>>2]|0; - $92 = ($91|0)>(1024); - if (!($92)) { - $93 = ((($4)) + 44|0); - $94 = HEAP32[$93>>2]|0; - $95 = ($94|0)>(2048); - if (!($95)) { - $96 = ((($4)) + 48|0); - $97 = HEAP32[$96>>2]|0; - $98 = ($97|0)>(4096); - if (!($98)) { - $99 = ((($4)) + 52|0); - $100 = HEAP32[$99>>2]|0; - $101 = ($100|0)>(8192); - if (!($101)) { - $102 = ((($4)) + 56|0); - $103 = HEAP32[$102>>2]|0; - $104 = ($103|0)>(16384); - if (!($104)) { - $105 = ((($4)) + 60|0); - $106 = HEAP32[$105>>2]|0; - $107 = ($106|0)>(32768); - if (!($107)) { - $$07785 = 0;$$07884 = 0;$$286 = 1; - while(1) { - $19 = (($3) + ($$286<<2)|0); - HEAP32[$19>>2] = $$07884; - $20 = $$07884&65535; - $21 = (((($0)) + 1024|0) + ($$286<<1)|0); - HEAP16[$21>>1] = $20; - $22 = $$07785&65535; - $23 = (((($0)) + 1124|0) + ($$286<<1)|0); - HEAP16[$23>>1] = $22; - $24 = (($4) + ($$286<<2)|0); - $25 = HEAP32[$24>>2]|0; - $26 = (($25) + ($$07884))|0; - $27 = ($25|0)!=(0); - $28 = 1 << $$286; - $29 = ($26|0)>($28|0); - $or$cond = $27 & $29; - if ($or$cond) { - label = 7; - break; - } - $30 = (16 - ($$286))|0; - $31 = $26 << $30; - $32 = (((($0)) + 1056|0) + ($$286<<2)|0); - HEAP32[$32>>2] = $31; - $33 = $26 << 1; - $34 = (($25) + ($$07785))|0; - $35 = (($$286) + 1)|0; - $36 = ($35|0)<(16); - if ($36) { - $$07785 = $34;$$07884 = $33;$$286 = $35; - } else { - break; - } - } - if ((label|0) == 7) { - _stbi__err(11379); - $$075 = 0; - STACKTOP = sp;return ($$075|0); - } - $37 = ((($0)) + 1120|0); - HEAP32[$37>>2] = 65536; - $38 = ($2|0)>(0); - if ($38) { - $$382 = 0; - } else { - $$075 = 1; - STACKTOP = sp;return ($$075|0); - } - while(1) { - $39 = (($1) + ($$382)|0); - $40 = HEAP8[$39>>0]|0; - $41 = $40&255; - $42 = ($40<<24>>24)==(0); - if (!($42)) { - $43 = (($3) + ($41<<2)|0); - $44 = HEAP32[$43>>2]|0; - $45 = (((($0)) + 1024|0) + ($41<<1)|0); - $46 = HEAP16[$45>>1]|0; - $47 = $46&65535; - $48 = (($44) - ($47))|0; - $49 = (((($0)) + 1124|0) + ($41<<1)|0); - $50 = HEAP16[$49>>1]|0; - $51 = $50&65535; - $52 = (($48) + ($51))|0; - $53 = $41 << 9; - $54 = $53 | $$382; - $55 = $54&65535; - $56 = (((($0)) + 1156|0) + ($52)|0); - HEAP8[$56>>0] = $40; - $57 = $$382&65535; - $58 = (((($0)) + 1444|0) + ($52<<1)|0); - HEAP16[$58>>1] = $57; - $59 = ($40&255)<(10); - do { - if ($59) { - $60 = (_stbi__bit_reverse($44,$41)|0); - $61 = ($60|0)<(512); - if (!($61)) { - break; - } - $62 = 1 << $41; - $$081 = $60; - while(1) { - $63 = (($0) + ($$081<<1)|0); - HEAP16[$63>>1] = $55; - $64 = (($$081) + ($62))|0; - $65 = ($64|0)<(512); - if ($65) { - $$081 = $64; - } else { - break; - } - } - } - } while(0); - $66 = HEAP32[$43>>2]|0; - $67 = (($66) + 1)|0; - HEAP32[$43>>2] = $67; - } - $68 = (($$382) + 1)|0; - $exitcond = ($68|0)==($2|0); - if ($exitcond) { - $$075 = 1; - break; - } else { - $$382 = $68; - } - } - STACKTOP = sp;return ($$075|0); - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - _stbi__err(11431); - $$075 = 0; - STACKTOP = sp;return ($$075|0); -} -function _stbi__compute_huffman_codes($0) { - $0 = $0|0; - var $$ = 0, $$0 = 0, $$061 = 0, $$06579 = 0, $$066$be = 0, $$066$lcssa = 0, $$06678 = 0, $$4 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0; - var $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0; - var $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $not$ = 0, dest = 0; - var label = 0, sp = 0, stop = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 2496|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(2496|0); - $1 = sp; - $2 = sp + 2039|0; - $3 = sp + 2020|0; - $4 = (_stbi__zreceive($0,5)|0); - $5 = (($4) + 257)|0; - $6 = (_stbi__zreceive($0,5)|0); - $7 = (($6) + 1)|0; - $8 = (_stbi__zreceive($0,4)|0); - $9 = (($8) + 4)|0; - $10 = (($7) + ($5))|0; - dest=$3; stop=dest+19|0; do { HEAP8[dest>>0]=0|0; dest=dest+1|0; } while ((dest|0) < (stop|0)); - $11 = ($9|0)>(0); - if ($11) { - $$06579 = 0; - while(1) { - $12 = (_stbi__zreceive($0,3)|0); - $13 = $12&255; - $14 = (12225 + ($$06579)|0); - $15 = HEAP8[$14>>0]|0; - $16 = $15&255; - $17 = (($3) + ($16)|0); - HEAP8[$17>>0] = $13; - $18 = (($$06579) + 1)|0; - $exitcond = ($18|0)==($9|0); - if ($exitcond) { - break; - } else { - $$06579 = $18; - } - } - } - $19 = (_stbi__zbuild_huffman($1,$3,19)|0); - $20 = ($19|0)==(0); - if ($20) { - $$4 = 0; - STACKTOP = sp;return ($$4|0); - } - $21 = ($10|0)>(0); - L8: do { - if ($21) { - $$06678 = 0; - L9: while(1) { - $22 = (_stbi__zhuffman_decode($0,$1)|0); - $23 = ($22>>>0)>(18); - if ($23) { - label = 6; - break; - } - $24 = ($22|0)<(16); - if ($24) { - $25 = $22&255; - $26 = (($$06678) + 1)|0; - $27 = (($2) + ($$06678)|0); - HEAP8[$27>>0] = $25; - $$066$be = $26; - } else { - switch ($22|0) { - case 16: { - $28 = (_stbi__zreceive($0,2)|0); - $29 = ($$06678|0)==(0); - if ($29) { - label = 11; - break L9; - } - $30 = (($28) + 3)|0; - $31 = (($$06678) + -1)|0; - $32 = (($2) + ($31)|0); - $33 = HEAP8[$32>>0]|0; - $$0 = $33;$$061 = $30; - break; - } - case 17: { - $34 = (_stbi__zreceive($0,3)|0); - $35 = (($34) + 3)|0; - $$0 = 0;$$061 = $35; - break; - } - case 18: { - $36 = (_stbi__zreceive($0,7)|0); - $37 = (($36) + 11)|0; - $$0 = 0;$$061 = $37; - break; - } - default: { - label = 14; - break L9; - } - } - $38 = (($10) - ($$06678))|0; - $39 = ($38|0)<($$061|0); - if ($39) { - label = 17; - break; - } - $40 = (($2) + ($$06678)|0); - _memset(($40|0),($$0|0),($$061|0))|0; - $41 = (($$061) + ($$06678))|0; - $$066$be = $41; - } - $42 = ($10|0)>($$066$be|0); - if ($42) { - $$06678 = $$066$be; - } else { - $$066$lcssa = $$066$be; - break L8; - } - } - if ((label|0) == 6) { - _stbi__err(11379); - $$4 = 0; - STACKTOP = sp;return ($$4|0); - } - else if ((label|0) == 11) { - _stbi__err(11379); - $$4 = 0; - STACKTOP = sp;return ($$4|0); - } - else if ((label|0) == 14) { - ___assert_fail((11395|0),(10155|0),4006,(11403|0)); - // unreachable; - } - else if ((label|0) == 17) { - _stbi__err(11379); - $$4 = 0; - STACKTOP = sp;return ($$4|0); - } - } else { - $$066$lcssa = 0; - } - } while(0); - $43 = ($10|0)==($$066$lcssa|0); - if (!($43)) { - _stbi__err(11379); - $$4 = 0; - STACKTOP = sp;return ($$4|0); - } - $44 = ((($0)) + 32|0); - $45 = (_stbi__zbuild_huffman($44,$2,$5)|0); - $46 = ($45|0)==(0); - if ($46) { - $$4 = 0; - STACKTOP = sp;return ($$4|0); - } - $47 = ((($0)) + 2052|0); - $48 = (($2) + ($5)|0); - $49 = (_stbi__zbuild_huffman($47,$48,$7)|0); - $not$ = ($49|0)!=(0); - $$ = $not$&1; - $$4 = $$; - STACKTOP = sp;return ($$4|0); -} -function _stbi__parse_huffman_block($0) { - $0 = $0|0; - var $$063 = 0, $$064 = 0, $$067 = 0, $$070 = 0, $$171 = 0, $$266 = 0, $$272 = 0, $$3$ph = 0, $$5 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0; - var $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0; - var $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0; - var $56 = 0, $57 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $scevgep = 0, $scevgep92 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = ((($0)) + 16|0); - $2 = HEAP32[$1>>2]|0; - $3 = ((($0)) + 32|0); - $4 = ((($0)) + 24|0); - $5 = ((($0)) + 2052|0); - $6 = ((($0)) + 20|0); - $7 = ((($0)) + 24|0); - $$070 = $2; - while(1) { - $10 = (_stbi__zhuffman_decode($0,$3)|0); - $11 = ($10|0)<(256); - if ($11) { - $12 = ($10|0)<(0); - if ($12) { - label = 6; - break; - } - $13 = HEAP32[$4>>2]|0; - $14 = ($$070>>>0)<($13>>>0); - if ($14) { - $$171 = $$070; - } else { - $15 = (_stbi__zexpand($0,$$070,1)|0); - $16 = ($15|0)==(0); - if ($16) { - $$3$ph = 0; - label = 28; - break; - } - $17 = HEAP32[$1>>2]|0; - $$171 = $17; - } - $18 = $10&255; - $19 = ((($$171)) + 1|0); - HEAP8[$$171>>0] = $18; - $$070 = $19; - continue; - } - $20 = ($10|0)==(256); - if ($20) { - label = 12; - break; - } - $21 = (($10) + -257)|0; - $22 = (3320 + ($21<<2)|0); - $23 = HEAP32[$22>>2]|0; - $24 = (($10) + -265)|0; - $25 = ($24>>>0)<(20); - if ($25) { - $26 = (3196 + ($21<<2)|0); - $27 = HEAP32[$26>>2]|0; - $28 = (_stbi__zreceive($0,$27)|0); - $29 = (($28) + ($23))|0; - $$064 = $29; - } else { - $$064 = $23; - } - $30 = (_stbi__zhuffman_decode($0,$5)|0); - $31 = ($30|0)<(0); - if ($31) { - label = 16; - break; - } - $32 = (3572 + ($30<<2)|0); - $33 = HEAP32[$32>>2]|0; - $34 = (($30) + -4)|0; - $35 = ($34>>>0)<(26); - if ($35) { - $36 = (3444 + ($30<<2)|0); - $37 = HEAP32[$36>>2]|0; - $38 = (_stbi__zreceive($0,$37)|0); - $39 = (($38) + ($33))|0; - $$063 = $39; - } else { - $$063 = $33; - } - $40 = HEAP32[$6>>2]|0; - $41 = $$070; - $42 = (($41) - ($40))|0; - $43 = ($42|0)<($$063|0); - if ($43) { - label = 20; - break; - } - $44 = (($$070) + ($$064)|0); - $45 = HEAP32[$7>>2]|0; - $46 = ($44>>>0)>($45>>>0); - if ($46) { - $47 = (_stbi__zexpand($0,$$070,$$064)|0); - $48 = ($47|0)==(0); - if ($48) { - $$3$ph = 0; - label = 28; - break; - } - $49 = HEAP32[$1>>2]|0; - $$272 = $49; - } else { - $$272 = $$070; - } - $50 = (0 - ($$063))|0; - $9 = (($$272) + ($50)|0); - $51 = ($$063|0)==(1); - $52 = ($$064|0)!=(0); - if ($51) { - if (!($52)) { - $$070 = $$272; - continue; - } - $8 = HEAP8[$9>>0]|0; - _memset(($$272|0),($8|0),($$064|0))|0; - $scevgep92 = (($$272) + ($$064)|0); - $$070 = $scevgep92; - continue; - } - if ($52) { - $$067 = $9;$$266 = $$064;$$5 = $$272; - } else { - $$070 = $$272; - continue; - } - while(1) { - $53 = ((($$067)) + 1|0); - $54 = HEAP8[$$067>>0]|0; - $55 = ((($$5)) + 1|0); - HEAP8[$$5>>0] = $54; - $56 = (($$266) + -1)|0; - $57 = ($56|0)==(0); - if ($57) { - break; - } else { - $$067 = $53;$$266 = $56;$$5 = $55; - } - } - $scevgep = (($$272) + ($$064)|0); - $$070 = $scevgep; - } - if ((label|0) == 6) { - _stbi__err(11204); - $$3$ph = 0; - return ($$3$ph|0); - } - else if ((label|0) == 12) { - HEAP32[$1>>2] = $$070; - $$3$ph = 1; - return ($$3$ph|0); - } - else if ((label|0) == 16) { - _stbi__err(11204); - $$3$ph = 0; - return ($$3$ph|0); - } - else if ((label|0) == 20) { - _stbi__err(11221); - $$3$ph = 0; - return ($$3$ph|0); - } - else if ((label|0) == 28) { - return ($$3$ph|0); - } - return (0)|0; -} -function _stbi__zhuffman_decode($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $2 = ((($0)) + 8|0); - $3 = HEAP32[$2>>2]|0; - $4 = ($3|0)<(16); - if ($4) { - _stbi__fill_bits($0); - } - $5 = ((($0)) + 12|0); - $6 = HEAP32[$5>>2]|0; - $7 = $6 & 511; - $8 = (($1) + ($7<<1)|0); - $9 = HEAP16[$8>>1]|0; - $10 = $9&65535; - $11 = ($9<<16>>16)==(0); - if ($11) { - $17 = (_stbi__zhuffman_decode_slowpath($0,$1)|0); - $$0 = $17; - return ($$0|0); - } else { - $12 = $10 >>> 9; - $13 = $6 >>> $12; - HEAP32[$5>>2] = $13; - $14 = HEAP32[$2>>2]|0; - $15 = (($14) - ($12))|0; - HEAP32[$2>>2] = $15; - $16 = $10 & 511; - $$0 = $16; - return ($$0|0); - } - return (0)|0; -} -function _stbi__zexpand($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $$0 = 0, $$029 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; - var $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $3 = ((($0)) + 16|0); - HEAP32[$3>>2] = $1; - $4 = ((($0)) + 28|0); - $5 = HEAP32[$4>>2]|0; - $6 = ($5|0)==(0); - if ($6) { - _stbi__err(11230); - $$0 = 0; - return ($$0|0); - } - $7 = ((($0)) + 20|0); - $8 = HEAP32[$7>>2]|0; - $9 = $1; - $10 = $8; - $11 = (($9) - ($10))|0; - $12 = ((($0)) + 24|0); - $13 = HEAP32[$12>>2]|0; - $14 = (($13) - ($10))|0; - $15 = (($11) + ($2))|0; - $$029 = $14; - while(1) { - $16 = ($15|0)>($$029|0); - $17 = $$029 << 1; - if ($16) { - $$029 = $17; - } else { - break; - } - } - $18 = (_realloc($8,$$029)|0); - $19 = ($18|0)==(0|0); - if ($19) { - _stbi__err(10210); - $$0 = 0; - return ($$0|0); - } else { - HEAP32[$7>>2] = $18; - $20 = (($18) + ($11)|0); - HEAP32[$3>>2] = $20; - $21 = (($18) + ($$029)|0); - HEAP32[$12>>2] = $21; - $$0 = 1; - return ($$0|0); - } - return (0)|0; -} -function _stbi__fill_bits($0) { - $0 = $0|0; - var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = ((($0)) + 12|0); - $2 = ((($0)) + 8|0); - while(1) { - $3 = HEAP32[$1>>2]|0; - $4 = HEAP32[$2>>2]|0; - $5 = 1 << $4; - $6 = ($3>>>0)<($5>>>0); - if (!($6)) { + $$sink2 = -1; label = 3; - break; - } - $7 = (_stbi__zget8($0)|0); - $8 = $7&255; - $9 = HEAP32[$2>>2]|0; - $10 = $8 << $9; - $11 = HEAP32[$1>>2]|0; - $12 = $11 | $10; - HEAP32[$1>>2] = $12; - $13 = (($9) + 8)|0; - HEAP32[$2>>2] = $13; - $14 = ($13|0)<(25); - if (!($14)) { - label = 5; - break; } + } else { + $$sink2 = 1; + label = 3; } if ((label|0) == 3) { - ___assert_fail((11326|0),(10155|0),3848,(11363|0)); - // unreachable; + $15 = HEAP32[4898]|0; + $16 = (($15) + ($$sink2))|0; + HEAP32[4898] = $16; + $18 = $16; } - else if ((label|0) == 5) { - return; - } -} -function _stbi__zhuffman_decode_slowpath($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $$0 = 0, $$025 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; - var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $2 = ((($0)) + 12|0); - $3 = HEAP32[$2>>2]|0; - $4 = (_stbi__bit_reverse($3,16)|0); - $$025 = 10; - while(1) { - $5 = (((($1)) + 1056|0) + ($$025<<2)|0); - $6 = HEAP32[$5>>2]|0; - $7 = ($4|0)<($6|0); - $8 = (($$025) + 1)|0; - if ($7) { - break; - } else { - $$025 = $8; - } - } - $9 = ($$025|0)==(16); - if ($9) { - $$0 = -1; - return ($$0|0); - } - $10 = (16 - ($$025))|0; - $11 = $4 >> $10; - $12 = (((($1)) + 1024|0) + ($$025<<1)|0); - $13 = HEAP16[$12>>1]|0; - $14 = $13&65535; - $15 = (($11) - ($14))|0; - $16 = (((($1)) + 1124|0) + ($$025<<1)|0); - $17 = HEAP16[$16>>1]|0; - $18 = $17&65535; - $19 = (($15) + ($18))|0; - $20 = (((($1)) + 1156|0) + ($19)|0); - $21 = HEAP8[$20>>0]|0; - $22 = $21&255; - $23 = ($22|0)==($$025|0); - if (!($23)) { - ___assert_fail((11250|0),(10155|0),3876,(11266|0)); - // unreachable; - } - $24 = HEAP32[$2>>2]|0; - $25 = $24 >>> $$025; - HEAP32[$2>>2] = $25; - $26 = ((($0)) + 8|0); - $27 = HEAP32[$26>>2]|0; - $28 = (($27) - ($$025))|0; - HEAP32[$26>>2] = $28; - $29 = (((($1)) + 1444|0) + ($19<<1)|0); - $30 = HEAP16[$29>>1]|0; - $31 = $30&65535; - $$0 = $31; - return ($$0|0); -} -function _stbi__bit_reverse($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; - sp = STACKTOP; - $2 = ($1|0)<(17); - if ($2) { - $3 = (_stbi__bitreverse16($0)|0); - $4 = (16 - ($1))|0; - $5 = $3 >> $4; - return ($5|0); + $17 = ($18|0)>(11); + if ($17) { + $$sink = 0; + label = 7; } else { - ___assert_fail((11297|0),(10155|0),3766,(11308|0)); - // unreachable; - } - return (0)|0; -} -function _stbi__bitreverse16($0) { - $0 = $0|0; - var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; - var sp = 0; - sp = STACKTOP; - $1 = $0 >>> 1; - $2 = $1 & 21845; - $3 = $0 << 1; - $4 = $3 & 43690; - $5 = $2 | $4; - $6 = $5 >>> 2; - $7 = $6 & 13107; - $8 = $5 << 2; - $9 = $8 & 52428; - $10 = $7 | $9; - $11 = $10 >>> 4; - $12 = $11 & 3855; - $13 = $10 << 4; - $14 = $13 & 61680; - $15 = $12 | $14; - $16 = $15 >>> 8; - $17 = $15 << 8; - $18 = $17 & 65280; - $19 = $18 | $16; - return ($19|0); -} -function _stbi__zget8($0) { - $0 = $0|0; - var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = HEAP32[$0>>2]|0; - $2 = ((($0)) + 4|0); - $3 = HEAP32[$2>>2]|0; - $4 = ($1>>>0)<($3>>>0); - if (!($4)) { - $$0 = 0; - return ($$0|0); - } - $5 = ((($1)) + 1|0); - HEAP32[$0>>2] = $5; - $6 = HEAP8[$1>>0]|0; - $$0 = $6; - return ($$0|0); -} -function _stbi__refill_buffer($0) { - $0 = $0|0; - var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = ((($0)) + 16|0); - $2 = HEAP32[$1>>2]|0; - $3 = ((($0)) + 28|0); - $4 = HEAP32[$3>>2]|0; - $5 = ((($0)) + 40|0); - $6 = ((($0)) + 36|0); - $7 = HEAP32[$6>>2]|0; - $8 = (FUNCTION_TABLE_iiii[$2 & 15]($4,$5,$7)|0); - $9 = ($8|0)==(0); - if ($9) { - $10 = ((($0)) + 32|0); - HEAP32[$10>>2] = 0; - $11 = ((($0)) + 168|0); - HEAP32[$11>>2] = $5; - $12 = ((($0)) + 41|0); - $13 = ((($0)) + 172|0); - HEAP32[$13>>2] = $12; - HEAP8[$5>>0] = 0; - return; - } else { - $14 = ((($0)) + 168|0); - HEAP32[$14>>2] = $5; - $15 = (((($0)) + 40|0) + ($8)|0); - $16 = ((($0)) + 172|0); - HEAP32[$16>>2] = $15; - return; - } -} -function _stbi__rewind($0) { - $0 = $0|0; - var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = ((($0)) + 176|0); - $2 = HEAP32[$1>>2]|0; - $3 = ((($0)) + 168|0); - HEAP32[$3>>2] = $2; - $4 = ((($0)) + 180|0); - $5 = HEAP32[$4>>2]|0; - $6 = ((($0)) + 172|0); - HEAP32[$6>>2] = $5; - return; -} -function _stbi__start_callbacks($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $10 = 0, $11 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - $3 = ((($0)) + 16|0); - ;HEAP32[$3>>2]=HEAP32[$1>>2]|0;HEAP32[$3+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$3+8>>2]=HEAP32[$1+8>>2]|0; - $4 = ((($0)) + 28|0); - HEAP32[$4>>2] = $2; - $5 = ((($0)) + 36|0); - HEAP32[$5>>2] = 128; - $6 = ((($0)) + 32|0); - HEAP32[$6>>2] = 1; - $7 = ((($0)) + 40|0); - $8 = ((($0)) + 176|0); - HEAP32[$8>>2] = $7; - _stbi__refill_buffer($0); - $9 = ((($0)) + 172|0); - $10 = HEAP32[$9>>2]|0; - $11 = ((($0)) + 180|0); - HEAP32[$11>>2] = $10; - return; -} -function _stbi__stdio_read($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $3 = 0, label = 0, sp = 0; - sp = STACKTOP; - $3 = (_fread($1,1,$2,$0)|0); - return ($3|0); -} -function _stbi__stdio_skip($0,$1) { - $0 = $0|0; - $1 = $1|0; - var label = 0, sp = 0; - sp = STACKTOP; - (_fseek($0,$1,1)|0); - return; -} -function _stbi__stdio_eof($0) { - $0 = $0|0; - var $1 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = (_feof($0)|0); - return ($1|0); -} -function _LoadImage($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $$sink = 0, $$sroa$0$0 = 0, $$sroa$0$0$copyload = 0, $$sroa$0$1 = 0, $$sroa$0$144 = 0, $$sroa$10$0 = 0, $$sroa$10$0$$sroa_idx19 = 0, $$sroa$10$0$$sroa_idx20 = 0, $$sroa$10$0$copyload = 0, $$sroa$10$1 = 0, $$sroa$10$140 = 0, $$sroa$10$141 = 0, $$sroa$13$0 = 0, $$sroa$13$0$$sroa_idx23 = 0, $$sroa$13$0$$sroa_idx24 = 0, $$sroa$13$0$copyload = 0, $$sroa$13$1 = 0, $$sroa$13$146 = 0, $$sroa$13$147 = 0, $$sroa$15$0 = 0; - var $$sroa$15$0$$sroa_idx27 = 0, $$sroa$15$0$$sroa_idx28 = 0, $$sroa$15$0$copyload = 0, $$sroa$15$1 = 0, $$sroa$15$2 = 0, $$sroa$15$248 = 0, $$sroa$15$249 = 0, $$sroa$7$0 = 0, $$sroa$7$0$$sroa_idx15 = 0, $$sroa$7$0$$sroa_idx16 = 0, $$sroa$7$0$copyload = 0, $$sroa$7$1 = 0, $$sroa$7$142 = 0, $$sroa$7$143 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0; - var $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0; - var $vararg_buffer1 = 0, $vararg_buffer4 = 0, $vararg_buffer9 = 0, $vararg_ptr7 = 0, $vararg_ptr8 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(80|0); - $vararg_buffer9 = sp + 32|0; - $vararg_buffer4 = sp + 16|0; - $vararg_buffer1 = sp + 8|0; - $vararg_buffer = sp; - $2 = sp + 48|0; - $3 = sp + 44|0; - $4 = sp + 40|0; - $5 = sp + 36|0; - $6 = (_IsFileExtension($1,11578)|0); - $7 = ($6|0)==(0); - do { - if ($7) { - $19 = (_IsFileExtension($1,11631)|0); - $20 = ($19|0)==(0); - if ($20) { - HEAP32[$vararg_buffer1>>2] = $1; - _TraceLog(2,11636,$vararg_buffer1); - $$sroa$10$141 = 0;$$sroa$13$147 = 0;$$sroa$15$249 = 0;$$sroa$7$143 = 0; - break; - } - HEAP32[$3>>2] = 0; - HEAP32[$4>>2] = 0; - HEAP32[$5>>2] = 0; - $21 = (_fopen($1,11770)|0); - $22 = (_stbi_load_from_file($21,$3,$4,$5,0)|0); - (_fclose($21)|0); - $23 = HEAP32[$3>>2]|0; - $24 = HEAP32[$4>>2]|0; - $25 = HEAP32[$5>>2]|0; - switch ($25|0) { - case 1: { - $$sink = 1; - label = 11; - break; - } - case 2: { - $$sink = 2; - label = 11; - break; - } - case 3: { - $$sink = 4; - label = 11; - break; - } - case 4: { - $$sink = 7; - label = 11; - break; - } - default: { - $$sroa$15$1 = 0; - } - } - if ((label|0) == 11) { - $$sroa$15$1 = $$sink; - } - $$sroa$0$1 = $22;$$sroa$10$1 = $24;$$sroa$13$1 = 1;$$sroa$15$2 = $$sroa$15$1;$$sroa$7$1 = $23; - label = 14; - } else { - $8 = (_LoadResource($1,0)|0); - $9 = HEAP32[$8>>2]|0; - $10 = ($9|0)==(1); - if ($10) { - $11 = ((($8)) + 20|0); - $12 = HEAP32[$11>>2]|0; - $13 = ((($8)) + 4|0); - $14 = HEAP32[$13>>2]|0; - $15 = ((($8)) + 8|0); - $16 = HEAP32[$15>>2]|0; - $17 = ((($8)) + 12|0); - $18 = HEAP32[$17>>2]|0; - _LoadImagePro($2,$12,$14,$16,$18); - $$sroa$0$0$copyload = HEAP32[$2>>2]|0; - $$sroa$7$0$$sroa_idx15 = ((($2)) + 4|0); - $$sroa$7$0$copyload = HEAP32[$$sroa$7$0$$sroa_idx15>>2]|0; - $$sroa$10$0$$sroa_idx19 = ((($2)) + 8|0); - $$sroa$10$0$copyload = HEAP32[$$sroa$10$0$$sroa_idx19>>2]|0; - $$sroa$13$0$$sroa_idx23 = ((($2)) + 12|0); - $$sroa$13$0$copyload = HEAP32[$$sroa$13$0$$sroa_idx23>>2]|0; - $$sroa$15$0$$sroa_idx27 = ((($2)) + 16|0); - $$sroa$15$0$copyload = HEAP32[$$sroa$15$0$$sroa_idx27>>2]|0; - $$sroa$0$0 = $$sroa$0$0$copyload;$$sroa$10$0 = $$sroa$10$0$copyload;$$sroa$13$0 = $$sroa$13$0$copyload;$$sroa$15$0 = $$sroa$15$0$copyload;$$sroa$7$0 = $$sroa$7$0$copyload; - } else { - HEAP32[$vararg_buffer>>2] = $1; - _TraceLog(2,11584,$vararg_buffer); - $$sroa$0$0 = 0;$$sroa$10$0 = 0;$$sroa$13$0 = 0;$$sroa$15$0 = 0;$$sroa$7$0 = 0; - } - _UnloadResource($8); - $$sroa$0$1 = $$sroa$0$0;$$sroa$10$1 = $$sroa$10$0;$$sroa$13$1 = $$sroa$13$0;$$sroa$15$2 = $$sroa$15$0;$$sroa$7$1 = $$sroa$7$0; - label = 14; - } - } while(0); - if ((label|0) == 14) { - $26 = ($$sroa$0$1|0)==(0|0); - if ($26) { - $$sroa$10$141 = $$sroa$10$1;$$sroa$13$147 = $$sroa$13$1;$$sroa$15$249 = $$sroa$15$2;$$sroa$7$143 = $$sroa$7$1; - } else { - HEAP32[$vararg_buffer4>>2] = $1; - $vararg_ptr7 = ((($vararg_buffer4)) + 4|0); - HEAP32[$vararg_ptr7>>2] = $$sroa$7$1; - $vararg_ptr8 = ((($vararg_buffer4)) + 8|0); - HEAP32[$vararg_ptr8>>2] = $$sroa$10$1; - _TraceLog(0,11672,$vararg_buffer4); - $$sroa$0$144 = $$sroa$0$1;$$sroa$10$140 = $$sroa$10$1;$$sroa$13$146 = $$sroa$13$1;$$sroa$15$248 = $$sroa$15$2;$$sroa$7$142 = $$sroa$7$1; - HEAP32[$0>>2] = $$sroa$0$144; - $$sroa$7$0$$sroa_idx16 = ((($0)) + 4|0); - HEAP32[$$sroa$7$0$$sroa_idx16>>2] = $$sroa$7$142; - $$sroa$10$0$$sroa_idx20 = ((($0)) + 8|0); - HEAP32[$$sroa$10$0$$sroa_idx20>>2] = $$sroa$10$140; - $$sroa$13$0$$sroa_idx24 = ((($0)) + 12|0); - HEAP32[$$sroa$13$0$$sroa_idx24>>2] = $$sroa$13$146; - $$sroa$15$0$$sroa_idx28 = ((($0)) + 16|0); - HEAP32[$$sroa$15$0$$sroa_idx28>>2] = $$sroa$15$248; - STACKTOP = sp;return; + $19 = ($18|0)<(0); + if ($19) { + $$sink = 11; + label = 7; } } - HEAP32[$vararg_buffer9>>2] = $1; - _TraceLog(2,11711,$vararg_buffer9); - $$sroa$0$144 = 0;$$sroa$10$140 = $$sroa$10$141;$$sroa$13$146 = $$sroa$13$147;$$sroa$15$248 = $$sroa$15$249;$$sroa$7$142 = $$sroa$7$143; - HEAP32[$0>>2] = $$sroa$0$144; - $$sroa$7$0$$sroa_idx16 = ((($0)) + 4|0); - HEAP32[$$sroa$7$0$$sroa_idx16>>2] = $$sroa$7$142; - $$sroa$10$0$$sroa_idx20 = ((($0)) + 8|0); - HEAP32[$$sroa$10$0$$sroa_idx20>>2] = $$sroa$10$140; - $$sroa$13$0$$sroa_idx24 = ((($0)) + 12|0); - HEAP32[$$sroa$13$0$$sroa_idx24>>2] = $$sroa$13$146; - $$sroa$15$0$$sroa_idx28 = ((($0)) + 16|0); - HEAP32[$$sroa$15$0$$sroa_idx28>>2] = $$sroa$15$248; + if ((label|0) == 7) { + HEAP32[4898] = $$sink; + } + _BeginDrawing(); + HEAP8[$0>>0] = -11; + $20 = ((($0)) + 1|0); + HEAP8[$20>>0] = -11; + $21 = ((($0)) + 2|0); + HEAP8[$21>>0] = -11; + $22 = ((($0)) + 3|0); + HEAP8[$22>>0] = -1; + ;HEAP8[$$byval_copy10>>0]=HEAP8[$0>>0]|0;HEAP8[$$byval_copy10+1>>0]=HEAP8[$0+1>>0]|0;HEAP8[$$byval_copy10+2>>0]=HEAP8[$0+2>>0]|0;HEAP8[$$byval_copy10+3>>0]=HEAP8[$0+3>>0]|0; + _ClearBackground($$byval_copy10); + dest=$$byval_copy10; src=20564; stop=dest+44|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _BeginTextureMode($$byval_copy10); + dest=$$byval_copy10; src=16; stop=dest+40|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _Begin3dMode($$byval_copy10); + HEAP32[$1>>2] = -1; + _memcpy(($$byval_copy3|0),(19608|0),264)|0; + ;HEAP32[$$byval_copy4>>2]=HEAP32[19596>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[19596+4>>2]|0;HEAP32[$$byval_copy4+8>>2]=HEAP32[19596+8>>2]|0; + ;HEAP8[$$byval_copy10>>0]=HEAP8[$1>>0]|0;HEAP8[$$byval_copy10+1>>0]=HEAP8[$1+1>>0]|0;HEAP8[$$byval_copy10+2>>0]=HEAP8[$1+2>>0]|0;HEAP8[$$byval_copy10+3>>0]=HEAP8[$1+3>>0]|0; + _DrawModel($$byval_copy3,$$byval_copy4,2.0,$$byval_copy10); + _DrawGrid(10,1.0); + _End3dMode(); + _EndTextureMode(); + $23 = HEAP32[4898]|0; + $24 = (19892 + (($23*56)|0)|0); + dest=$$byval_copy10; src=$24; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _BeginShaderMode($$byval_copy10); + HEAP32[$2>>2] = 0; + $25 = ((($2)) + 4|0); + HEAP32[$25>>2] = 0; + $26 = ((($2)) + 8|0); + $27 = HEAP32[(20572)>>2]|0; + HEAP32[$26>>2] = $27; + $28 = ((($2)) + 12|0); + $29 = HEAP32[(20576)>>2]|0; + $30 = (0 - ($29))|0; + HEAP32[$28>>2] = $30; + HEAPF32[$3>>2] = 0.0; + $31 = ((($3)) + 4|0); + HEAPF32[$31>>2] = 0.0; + HEAP32[$4>>2] = -1; + ;HEAP32[$$byval_copy2>>2]=HEAP32[(20568)>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[(20568)+4>>2]|0;HEAP32[$$byval_copy2+8>>2]=HEAP32[(20568)+8>>2]|0;HEAP32[$$byval_copy2+12>>2]=HEAP32[(20568)+12>>2]|0;HEAP32[$$byval_copy2+16>>2]=HEAP32[(20568)+16>>2]|0; + ;HEAP32[$$byval_copy3>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$2+4>>2]|0;HEAP32[$$byval_copy3+8>>2]=HEAP32[$2+8>>2]|0;HEAP32[$$byval_copy3+12>>2]=HEAP32[$2+12>>2]|0; + ;HEAP32[$$byval_copy4>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$3+4>>2]|0; + ;HEAP8[$$byval_copy10>>0]=HEAP8[$4>>0]|0;HEAP8[$$byval_copy10+1>>0]=HEAP8[$4+1>>0]|0;HEAP8[$$byval_copy10+2>>0]=HEAP8[$4+2>>0]|0;HEAP8[$$byval_copy10+3>>0]=HEAP8[$4+3>>0]|0; + _DrawTextureRec($$byval_copy2,$$byval_copy3,$$byval_copy4,$$byval_copy10); + _EndShaderMode(); + HEAP8[$6>>0] = -56; + $32 = ((($6)) + 1|0); + HEAP8[$32>>0] = -56; + $33 = ((($6)) + 2|0); + HEAP8[$33>>0] = -56; + $34 = ((($6)) + 3|0); + HEAP8[$34>>0] = -1; + ;HEAP8[$$byval_copy10>>0]=HEAP8[$6>>0]|0;HEAP8[$$byval_copy10+1>>0]=HEAP8[$6+1>>0]|0;HEAP8[$$byval_copy10+2>>0]=HEAP8[$6+2>>0]|0;HEAP8[$$byval_copy10+3>>0]=HEAP8[$6+3>>0]|0; + _Fade($5,$$byval_copy10,0.69999998807907104); + ;HEAP8[$$byval_copy10>>0]=HEAP8[$5>>0]|0;HEAP8[$$byval_copy10+1>>0]=HEAP8[$5+1>>0]|0;HEAP8[$$byval_copy10+2>>0]=HEAP8[$5+2>>0]|0;HEAP8[$$byval_copy10+3>>0]=HEAP8[$5+3>>0]|0; + _DrawRectangle(0,9,580,30,$$byval_copy10); + $35 = HEAP32[2]|0; + $36 = (($35) + -200)|0; + $37 = HEAP32[3]|0; + $38 = (($37) + -20)|0; + HEAP8[$7>>0] = 80; + $39 = ((($7)) + 1|0); + HEAP8[$39>>0] = 80; + $40 = ((($7)) + 2|0); + HEAP8[$40>>0] = 80; + $41 = ((($7)) + 3|0); + HEAP8[$41>>0] = -1; + ;HEAP8[$$byval_copy10>>0]=HEAP8[$7>>0]|0;HEAP8[$$byval_copy10+1>>0]=HEAP8[$7+1>>0]|0;HEAP8[$$byval_copy10+2>>0]=HEAP8[$7+2>>0]|0;HEAP8[$$byval_copy10+3>>0]=HEAP8[$7+3>>0]|0; + _DrawText(5113,$36,$38,10,$$byval_copy10); + HEAP8[$8>>0] = 0; + $42 = ((($8)) + 1|0); + HEAP8[$42>>0] = 0; + $43 = ((($8)) + 2|0); + HEAP8[$43>>0] = 0; + $44 = ((($8)) + 3|0); + HEAP8[$44>>0] = -1; + ;HEAP8[$$byval_copy10>>0]=HEAP8[$8>>0]|0;HEAP8[$$byval_copy10+1>>0]=HEAP8[$8+1>>0]|0;HEAP8[$$byval_copy10+2>>0]=HEAP8[$8+2>>0]|0;HEAP8[$$byval_copy10+3>>0]=HEAP8[$8+3>>0]|0; + _DrawText(5148,10,15,20,$$byval_copy10); + $45 = HEAP32[4898]|0; + $46 = (56 + ($45<<2)|0); + $47 = HEAP32[$46>>2]|0; + HEAP8[$9>>0] = -26; + $48 = ((($9)) + 1|0); + HEAP8[$48>>0] = 41; + $49 = ((($9)) + 2|0); + HEAP8[$49>>0] = 55; + $50 = ((($9)) + 3|0); + HEAP8[$50>>0] = -1; + ;HEAP8[$$byval_copy10>>0]=HEAP8[$9>>0]|0;HEAP8[$$byval_copy10+1>>0]=HEAP8[$9+1>>0]|0;HEAP8[$$byval_copy10+2>>0]=HEAP8[$9+2>>0]|0;HEAP8[$$byval_copy10+3>>0]=HEAP8[$9+3>>0]|0; + _DrawText($47,330,15,20,$$byval_copy10); + HEAP8[$10>>0] = 0; + $51 = ((($10)) + 1|0); + HEAP8[$51>>0] = 82; + $52 = ((($10)) + 2|0); + HEAP8[$52>>0] = -84; + $53 = ((($10)) + 3|0); + HEAP8[$53>>0] = -1; + ;HEAP8[$$byval_copy10>>0]=HEAP8[$10>>0]|0;HEAP8[$$byval_copy10+1>>0]=HEAP8[$10+1>>0]|0;HEAP8[$$byval_copy10+2>>0]=HEAP8[$10+2>>0]|0;HEAP8[$$byval_copy10+3>>0]=HEAP8[$10+3>>0]|0; + _DrawText(5172,540,10,30,$$byval_copy10); + _DrawFPS(700,15); + _EndDrawing(); STACKTOP = sp;return; } -function _LoadResource($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $$0$lcssa = 0, $$05665 = 0, $$05764 = 0, $$1 = 0, $$2 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; - var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0; - var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0; - var $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond60 = 0; - var $or$cond62 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer4 = 0, $vararg_buffer8 = 0, $vararg_ptr11 = 0, $vararg_ptr7 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(80|0); - $vararg_buffer8 = sp + 24|0; - $vararg_buffer4 = sp + 16|0; - $vararg_buffer1 = sp + 8|0; - $vararg_buffer = sp; - $2 = sp + 64|0; - $3 = sp + 32|0; - $4 = (_fopen($0,11770)|0); - $5 = ($4|0)==(0|0); - if ($5) { - HEAP32[$vararg_buffer>>2] = $0; - _TraceLog(2,11773,$vararg_buffer); - $$2 = 0; - STACKTOP = sp;return ($$2|0); - } - (_fread($2,1,1,$4)|0); - $6 = ((($2)) + 1|0); - (_fread($6,1,1,$4)|0); - $7 = ((($2)) + 2|0); - (_fread($7,1,1,$4)|0); - $8 = ((($2)) + 3|0); - (_fread($8,1,1,$4)|0); - $9 = ((($2)) + 4|0); - (_fread($9,2,1,$4)|0); - $10 = ((($2)) + 6|0); - (_fread($10,2,1,$4)|0); - $11 = HEAP8[$2>>0]|0; - $12 = ($11<<24>>24)==(114); - $13 = HEAP8[$6>>0]|0; - $14 = ($13<<24>>24)==(82); - $or$cond = $12 | $14; - $15 = HEAP8[$7>>0]|0; - $16 = ($15<<24>>24)==(69); - $or$cond60 = $or$cond | $16; - $17 = HEAP8[$8>>0]|0; - $18 = ($17<<24>>24)==(83); - $or$cond62 = $or$cond60 | $18; - if ($or$cond62) { - $19 = HEAP16[$10>>1]|0; - $20 = ($19<<16>>16)==(0); - if ($20) { - $$0$lcssa = 0; - } else { - $21 = ((($3)) + 7|0); - $22 = HEAP16[$10>>1]|0; - $23 = $22&65535; - $24 = ((($3)) + 8|0); - $25 = ((($3)) + 4|0); - $26 = ((($3)) + 16|0); - $27 = ((($3)) + 20|0); - $28 = ((($3)) + 24|0); - $29 = ((($3)) + 28|0); - $30 = ((($3)) + 8|0); - $31 = ((($3)) + 5|0); - $32 = ((($3)) + 12|0); - $$05665 = 0; - while(1) { - (_fread($3,32,1,$4)|0); - $36 = HEAP8[$21>>0]|0; - $37 = $36&255; - $38 = ($37*24)|0; - $39 = (_malloc($38)|0); - $40 = HEAP32[$3>>2]|0; - $41 = ($40|0)==($1|0); - if ($41) { - $42 = HEAP8[$21>>0]|0; - $43 = ($42<<24>>24)==(0); - if (!($43)) { - $$05764 = 0; - while(1) { - $44 = HEAP8[$25>>0]|0; - $45 = $44&255; - $46 = (($39) + (($$05764*24)|0)|0); - HEAP32[$46>>2] = $45; - $47 = HEAP32[$26>>2]|0; - $48 = (((($39) + (($$05764*24)|0)|0)) + 4|0); - HEAP32[$48>>2] = $47; - $49 = HEAP32[$27>>2]|0; - $50 = (((($39) + (($$05764*24)|0)|0)) + 8|0); - HEAP32[$50>>2] = $49; - $51 = HEAP32[$28>>2]|0; - $52 = (((($39) + (($$05764*24)|0)|0)) + 12|0); - HEAP32[$52>>2] = $51; - $53 = HEAP32[$29>>2]|0; - $54 = (((($39) + (($$05764*24)|0)|0)) + 16|0); - HEAP32[$54>>2] = $53; - $55 = HEAP32[$30>>2]|0; - $56 = (_malloc($55)|0); - (_fread($56,$55,1,$4)|0); - $57 = HEAP8[$31>>0]|0; - $58 = ($57<<24>>24)==(1); - if ($58) { - $59 = HEAP32[$30>>2]|0; - $60 = HEAP32[$32>>2]|0; - $61 = (_DecompressData($56,$59,$60)|0); - $62 = (((($39) + (($$05764*24)|0)|0)) + 20|0); - HEAP32[$62>>2] = $61; - _free($56); - } else { - $63 = (((($39) + (($$05764*24)|0)|0)) + 20|0); - HEAP32[$63>>2] = $56; - } - $64 = (((($39) + (($$05764*24)|0)|0)) + 20|0); - $65 = HEAP32[$64>>2]|0; - $66 = ($65|0)==(0|0); - if (!($66)) { - $67 = HEAP32[$3>>2]|0; - HEAP32[$vararg_buffer4>>2] = $0; - $vararg_ptr7 = ((($vararg_buffer4)) + 4|0); - HEAP32[$vararg_ptr7>>2] = $67; - _TraceLog(0,11870,$vararg_buffer4); - } - (_fread($3,32,1,$4)|0); - $68 = (($$05764) + 1)|0; - $69 = HEAP8[$21>>0]|0; - $70 = $69&255; - $71 = ($68|0)<($70|0); - if ($71) { - $$05764 = $68; - } else { - break; - } - } - } - } else { - $72 = HEAP32[$24>>2]|0; - (_fseek($4,$72,1)|0); - } - $73 = (($$05665) + 1)|0; - $74 = ($73|0)<($23|0); - if ($74) { - $$05665 = $73; - } else { - $$0$lcssa = $39; - break; - } - } - } - $33 = ((($$0$lcssa)) + 20|0); - $34 = HEAP32[$33>>2]|0; - $35 = ($34|0)==(0|0); - if ($35) { - HEAP32[$vararg_buffer8>>2] = $0; - $vararg_ptr11 = ((($vararg_buffer8)) + 4|0); - HEAP32[$vararg_ptr11>>2] = $1; - _TraceLog(2,11916,$vararg_buffer8); - $$1 = $$0$lcssa; - } else { - $$1 = $$0$lcssa; - } - } else { - HEAP32[$vararg_buffer1>>2] = $0; - _TraceLog(2,11824,$vararg_buffer1); - $$1 = 0; - } - (_fclose($4)|0); - $$2 = $$1; - STACKTOP = sp;return ($$2|0); -} -function _LoadImagePro($0,$1,$2,$3,$4) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - $3 = $3|0; - $4 = $4|0; - var $$byval_copy = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); - $$byval_copy = sp + 20|0; - $5 = sp; - HEAP32[$5>>2] = $1; - $6 = ((($5)) + 4|0); - HEAP32[$6>>2] = $2; - $7 = ((($5)) + 8|0); - HEAP32[$7>>2] = $3; - $8 = ((($5)) + 12|0); - HEAP32[$8>>2] = 1; - $9 = ((($5)) + 16|0); - HEAP32[$9>>2] = $4; - ;HEAP32[$$byval_copy>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$5+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$5+8>>2]|0;HEAP32[$$byval_copy+12>>2]=HEAP32[$5+12>>2]|0;HEAP32[$$byval_copy+16>>2]=HEAP32[$5+16>>2]|0; - _ImageCopy($0,$$byval_copy); - STACKTOP = sp;return; -} -function _UnloadResource($0) { - $0 = $0|0; - var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; - sp = STACKTOP; - $1 = ((($0)) + 20|0); - $2 = HEAP32[$1>>2]|0; - $3 = ($2|0)==(0|0); - if ($3) { - return; - } - _free($2); - return; -} -function _ImageCopy($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $$0 = 0, $$sroa$6$0 = 0, $$sroa$6$0$$sroa_idx10 = 0, $$sroa$7$0 = 0, $$sroa$7$0$$sroa_idx12 = 0, $$sroa$8$0 = 0, $$sroa$8$0$$sroa_idx14 = 0, $$sroa$9$0 = 0, $$sroa$9$0$$sroa_idx16 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0; - var $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $vararg_buffer = sp; - $2 = ((($1)) + 4|0); - $3 = HEAP32[$2>>2]|0; - $4 = ((($1)) + 8|0); - $5 = HEAP32[$4>>2]|0; - $6 = Math_imul($5, $3)|0; - $7 = ((($1)) + 16|0); - $8 = HEAP32[$7>>2]|0; - switch ($8|0) { - case 17: case 14: case 11: case 10: case 1: { - $$0 = $6; - break; - } - case 6: case 5: case 3: case 2: { - $9 = $6 << 1; - $$0 = $9; - break; - } - case 4: { - $10 = ($6*3)|0; - $$0 = $10; - break; - } - case 7: { - $11 = $6 << 2; - $$0 = $11; - break; - } - case 16: case 15: case 13: case 12: case 9: case 8: { - $12 = (($6|0) / 2)&-1; - $$0 = $12; - break; - } - case 18: { - $13 = (($6|0) / 4)&-1; - $$0 = $13; - break; - } - default: { - _TraceLog(2,11742,$vararg_buffer); - $$0 = $6; - } - } - $14 = (_malloc($$0)|0); - $15 = ($14|0)==(0|0); - if ($15) { - $$sroa$6$0 = 0;$$sroa$7$0 = 0;$$sroa$8$0 = 0;$$sroa$9$0 = 0; - } else { - $16 = HEAP32[$1>>2]|0; - _memcpy(($14|0),($16|0),($$0|0))|0; - $17 = HEAP32[$2>>2]|0; - $18 = HEAP32[$4>>2]|0; - $19 = ((($1)) + 12|0); - $20 = HEAP32[$19>>2]|0; - $21 = HEAP32[$7>>2]|0; - $$sroa$6$0 = $17;$$sroa$7$0 = $18;$$sroa$8$0 = $20;$$sroa$9$0 = $21; - } - HEAP32[$0>>2] = $14; - $$sroa$6$0$$sroa_idx10 = ((($0)) + 4|0); - HEAP32[$$sroa$6$0$$sroa_idx10>>2] = $$sroa$6$0; - $$sroa$7$0$$sroa_idx12 = ((($0)) + 8|0); - HEAP32[$$sroa$7$0$$sroa_idx12>>2] = $$sroa$7$0; - $$sroa$8$0$$sroa_idx14 = ((($0)) + 12|0); - HEAP32[$$sroa$8$0$$sroa_idx14>>2] = $$sroa$8$0; - $$sroa$9$0$$sroa_idx16 = ((($0)) + 16|0); - HEAP32[$$sroa$9$0$$sroa_idx16>>2] = $$sroa$9$0; - STACKTOP = sp;return; -} -function _DecompressData($0,$1,$2) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer10 = 0, $vararg_buffer3 = 0, $vararg_buffer5 = 0, $vararg_buffer7 = 0, $vararg_ptr13 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); - $vararg_buffer10 = sp + 40|0; - $vararg_buffer7 = sp + 32|0; - $vararg_buffer5 = sp + 24|0; - $vararg_buffer3 = sp + 16|0; - $vararg_buffer1 = sp + 8|0; - $vararg_buffer = sp; - $3 = (_malloc($2)|0); - $4 = ($3|0)==(0|0); - if ($4) { - _TraceLog(2,11966,$vararg_buffer); - STACKTOP = sp;return ($3|0); - } - $5 = (_tinfl_decompress_mem_to_mem($3,$2,$0,$1,1)|0); - $6 = ($5|0)==(-1); - if ($6) { - _TraceLog(2,12005,$vararg_buffer1); - _free($3); - } - $7 = ($5|0)==($2|0); - if (!($7)) { - _TraceLog(2,12031,$vararg_buffer3); - HEAP32[$vararg_buffer5>>2] = $2; - _TraceLog(2,12094,$vararg_buffer5); - HEAP32[$vararg_buffer7>>2] = $5; - _TraceLog(2,12129,$vararg_buffer7); - } - HEAP32[$vararg_buffer10>>2] = $1; - $vararg_ptr13 = ((($vararg_buffer10)) + 4|0); - HEAP32[$vararg_ptr13>>2] = $5; - _TraceLog(0,12164,$vararg_buffer10); - STACKTOP = sp;return ($3|0); -} -function _tinfl_decompress_mem_to_mem($0,$1,$2,$3,$4) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - $3 = $3|0; - $4 = $4|0; - var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 11008|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(11008|0); - $5 = sp + 11000|0; - $6 = sp; - $7 = sp + 8|0; - HEAP32[$5>>2] = $1; - HEAP32[$6>>2] = $3; - HEAP32[$7>>2] = 0; - $8 = $4 & -7; - $9 = $8 | 4; - $10 = (_tinfl_decompress($7,$2,$6,$0,$0,$5,$9)|0); - $11 = ($10|0)!=(0); - $12 = HEAP32[$5>>2]|0; - $13 = $11 ? -1 : $12; - STACKTOP = sp;return ($13|0); -} function _tinfl_decompress($0,$1,$2,$3,$4,$5,$6) { $0 = $0|0; $1 = $1|0; @@ -25902,7 +12023,7 @@ function _tinfl_decompress($0,$1,$2,$3,$4,$5,$6) { $196 = $$01300 << $$37; $197 = $196 | $$371346; $198 = (($$37) + 8)|0; - $199 = (12221 + ($$361133)|0); + $199 = (5303 + ($$361133)|0); $200 = HEAP8[$199>>0]|0; $201 = $200 << 24 >> 24; $202 = ($198>>>0)<($201>>>0); @@ -26332,7 +12453,7 @@ function _tinfl_decompress($0,$1,$2,$3,$4,$5,$6) { label = 0; $185 = ($$331130>>>0)<(3); if ($185) { - $186 = (12221 + ($$331130)|0); + $186 = (5303 + ($$331130)|0); $187 = HEAP8[$186>>0]|0; $188 = $187 << 24 >> 24; $189 = ($$34>>>0)<($188>>>0); @@ -26370,7 +12491,7 @@ function _tinfl_decompress($0,$1,$2,$3,$4,$5,$6) { } case 68: { label = 0; - $203 = (12221 + ($$371134)|0); + $203 = (5303 + ($$371134)|0); $204 = HEAP8[$203>>0]|0; $205 = $204 << 24 >> 24; $206 = 1 << $205; @@ -26379,7 +12500,7 @@ function _tinfl_decompress($0,$1,$2,$3,$4,$5,$6) { $209 = (((($0)) + 44|0) + ($$371134<<2)|0); $210 = $$381347 >>> $205; $211 = (($$38) - ($205))|0; - $212 = (3184 + ($$371134<<2)|0); + $212 = (104 + ($$371134<<2)|0); $213 = HEAP32[$212>>2]|0; $214 = (($208) + ($213))|0; HEAP32[$209>>2] = $214; @@ -26409,7 +12530,7 @@ function _tinfl_decompress($0,$1,$2,$3,$4,$5,$6) { $232 = $$431352 >>> 3; $233 = (($$43) + -3)|0; $234 = $231&255; - $235 = (12225 + ($$421139)|0); + $235 = (7816 + ($$421139)|0); $236 = HEAP8[$235>>0]|0; $237 = $236&255; $238 = (((($0)) + 7040|0) + ($237)|0); @@ -26816,7 +12937,7 @@ function _tinfl_decompress($0,$1,$2,$3,$4,$5,$6) { continue L46; } $495 = (($$2986) + -16)|0; - $496 = (12244 + ($495)|0); + $496 = (5307 + ($495)|0); $497 = HEAP8[$496>>0]|0; $498 = $497 << 24 >> 24; $499 = ($488>>>0)<($498>>>0); @@ -26853,7 +12974,7 @@ function _tinfl_decompress($0,$1,$2,$3,$4,$5,$6) { $513 = $$551364 >>> $$551258; $514 = (($$55) - ($$551258))|0; $515 = (($$531044) + -16)|0; - $516 = (12248 + ($515)|0); + $516 = (5311 + ($515)|0); $517 = HEAP8[$516>>0]|0; $518 = $517 << 24 >> 24; $519 = (($518) + ($512))|0; @@ -27261,9 +13382,9 @@ function _tinfl_decompress($0,$1,$2,$3,$4,$5,$6) { } $772 = $$771386 >>> $$2955; $773 = (($$77) - ($$2955))|0; - $774 = (3444 + ($$2958<<2)|0); + $774 = (3564 + ($$2958<<2)|0); $775 = HEAP32[$774>>2]|0; - $776 = (3572 + ($$2958<<2)|0); + $776 = (3436 + ($$2958<<2)|0); $777 = HEAP32[$776>>2]|0; $778 = (($$2958) + -4)|0; $779 = ($778>>>0)<(26); @@ -27417,9 +13538,9 @@ function _tinfl_decompress($0,$1,$2,$3,$4,$5,$6) { break L125; } $685 = (($683) + -257)|0; - $686 = (3196 + ($685<<2)|0); + $686 = (3312 + ($685<<2)|0); $687 = HEAP32[$686>>2]|0; - $688 = (3320 + ($685<<2)|0); + $688 = (3188 + ($685<<2)|0); $689 = HEAP32[$688>>2]|0; $690 = (($683) + -265)|0; $691 = ($690>>>0)<(20); @@ -27750,57 +13871,8527 @@ function _tinfl_decompress($0,$1,$2,$3,$4,$5,$6) { } return (0)|0; } -function _LoadTexture($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $$byval_copy1 = 0, $$sroa$0$0 = 0, $$sroa$0$0$copyload = 0, $$sroa$5 = 0, $$sroa$5$0$$sroa_idx = 0, $$sroa$5$0$$sroa_idx5 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $vararg_buffer = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(80|0); - $$byval_copy1 = sp + 60|0; - $vararg_buffer = sp + 16|0; - $$sroa$5 = sp; - $2 = sp + 20|0; - $3 = sp + 40|0; - _LoadImage($2,$1); - $4 = HEAP32[$2>>2]|0; - $5 = ($4|0)==(0|0); - if ($5) { - _TraceLog(2,12252,$vararg_buffer); - $$sroa$0$0 = 0; - } else { - ;HEAP32[$$byval_copy1>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$2+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$2+8>>2]|0;HEAP32[$$byval_copy1+12>>2]=HEAP32[$2+12>>2]|0;HEAP32[$$byval_copy1+16>>2]=HEAP32[$2+16>>2]|0; - _LoadTextureFromImage($3,$$byval_copy1); - $$sroa$0$0$copyload = HEAP32[$3>>2]|0; - $$sroa$5$0$$sroa_idx = ((($3)) + 4|0); - ;HEAP32[$$sroa$5>>2]=HEAP32[$$sroa$5$0$$sroa_idx>>2]|0;HEAP32[$$sroa$5+4>>2]=HEAP32[$$sroa$5$0$$sroa_idx+4>>2]|0;HEAP32[$$sroa$5+8>>2]=HEAP32[$$sroa$5$0$$sroa_idx+8>>2]|0;HEAP32[$$sroa$5+12>>2]=HEAP32[$$sroa$5$0$$sroa_idx+12>>2]|0; - ;HEAP32[$$byval_copy1>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$2+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$2+8>>2]|0;HEAP32[$$byval_copy1+12>>2]=HEAP32[$2+12>>2]|0;HEAP32[$$byval_copy1+16>>2]=HEAP32[$2+16>>2]|0; - _UnloadImage($$byval_copy1); - $$sroa$0$0 = $$sroa$0$0$copyload; - } - HEAP32[$0>>2] = $$sroa$0$0; - $$sroa$5$0$$sroa_idx5 = ((($0)) + 4|0); - ;HEAP32[$$sroa$5$0$$sroa_idx5>>2]=HEAP32[$$sroa$5>>2]|0;HEAP32[$$sroa$5$0$$sroa_idx5+4>>2]=HEAP32[$$sroa$5+4>>2]|0;HEAP32[$$sroa$5$0$$sroa_idx5+8>>2]=HEAP32[$$sroa$5+8>>2]|0;HEAP32[$$sroa$5$0$$sroa_idx5+12>>2]=HEAP32[$$sroa$5+12>>2]|0; - STACKTOP = sp;return; -} -function _LoadRenderTexture($0,$1,$2) { +function _tinfl_decompress_mem_to_mem($0,$1,$2,$3,$4) { $0 = $0|0; $1 = $1|0; $2 = $2|0; - var $3 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + $3 = $3|0; + $4 = $4|0; + var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 11008|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(11008|0); + $5 = sp + 11000|0; + $6 = sp; + $7 = sp + 8|0; + HEAP32[$5>>2] = $1; + HEAP32[$6>>2] = $3; + HEAP32[$7>>2] = 0; + $8 = $4 & -7; + $9 = $8 | 4; + $10 = (_tinfl_decompress($7,$2,$6,$0,$0,$5,$9)|0); + $11 = ($10|0)!=(0); + $12 = HEAP32[$5>>2]|0; + $13 = $11 ? -1 : $12; + STACKTOP = sp;return ($13|0); +} +function _LoadResource($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $$0$lcssa = 0, $$05665 = 0, $$05764 = 0, $$1 = 0, $$2 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; + var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0; + var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0; + var $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond60 = 0; + var $or$cond62 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer4 = 0, $vararg_buffer8 = 0, $vararg_ptr11 = 0, $vararg_ptr7 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(80|0); + $vararg_buffer8 = sp + 24|0; + $vararg_buffer4 = sp + 16|0; + $vararg_buffer1 = sp + 8|0; + $vararg_buffer = sp; + $2 = sp + 64|0; + $3 = sp + 32|0; + $4 = (_fopen($0,6385)|0); + $5 = ($4|0)==(0|0); + if ($5) { + HEAP32[$vararg_buffer>>2] = $0; + _TraceLog(1,5315,$vararg_buffer); + $$2 = 0; + STACKTOP = sp;return ($$2|0); + } + (_fread($2,1,1,$4)|0); + $6 = ((($2)) + 1|0); + (_fread($6,1,1,$4)|0); + $7 = ((($2)) + 2|0); + (_fread($7,1,1,$4)|0); + $8 = ((($2)) + 3|0); + (_fread($8,1,1,$4)|0); + $9 = ((($2)) + 4|0); + (_fread($9,2,1,$4)|0); + $10 = ((($2)) + 6|0); + (_fread($10,2,1,$4)|0); + $11 = HEAP8[$2>>0]|0; + $12 = ($11<<24>>24)==(114); + $13 = HEAP8[$6>>0]|0; + $14 = ($13<<24>>24)==(82); + $or$cond = $12 | $14; + $15 = HEAP8[$7>>0]|0; + $16 = ($15<<24>>24)==(69); + $or$cond60 = $or$cond | $16; + $17 = HEAP8[$8>>0]|0; + $18 = ($17<<24>>24)==(83); + $or$cond62 = $or$cond60 | $18; + if ($or$cond62) { + $19 = HEAP16[$10>>1]|0; + $20 = ($19<<16>>16)==(0); + if ($20) { + $$0$lcssa = 0; + } else { + $21 = ((($3)) + 7|0); + $22 = HEAP16[$10>>1]|0; + $23 = $22&65535; + $24 = ((($3)) + 8|0); + $25 = ((($3)) + 4|0); + $26 = ((($3)) + 16|0); + $27 = ((($3)) + 20|0); + $28 = ((($3)) + 24|0); + $29 = ((($3)) + 28|0); + $30 = ((($3)) + 8|0); + $31 = ((($3)) + 5|0); + $32 = ((($3)) + 12|0); + $$05665 = 0; + while(1) { + (_fread($3,32,1,$4)|0); + $36 = HEAP8[$21>>0]|0; + $37 = $36&255; + $38 = ($37*24)|0; + $39 = (_malloc($38)|0); + $40 = HEAP32[$3>>2]|0; + $41 = ($40|0)==($1|0); + if ($41) { + $42 = HEAP8[$21>>0]|0; + $43 = ($42<<24>>24)==(0); + if (!($43)) { + $$05764 = 0; + while(1) { + $44 = HEAP8[$25>>0]|0; + $45 = $44&255; + $46 = (($39) + (($$05764*24)|0)|0); + HEAP32[$46>>2] = $45; + $47 = HEAP32[$26>>2]|0; + $48 = (((($39) + (($$05764*24)|0)|0)) + 4|0); + HEAP32[$48>>2] = $47; + $49 = HEAP32[$27>>2]|0; + $50 = (((($39) + (($$05764*24)|0)|0)) + 8|0); + HEAP32[$50>>2] = $49; + $51 = HEAP32[$28>>2]|0; + $52 = (((($39) + (($$05764*24)|0)|0)) + 12|0); + HEAP32[$52>>2] = $51; + $53 = HEAP32[$29>>2]|0; + $54 = (((($39) + (($$05764*24)|0)|0)) + 16|0); + HEAP32[$54>>2] = $53; + $55 = HEAP32[$30>>2]|0; + $56 = (_malloc($55)|0); + (_fread($56,$55,1,$4)|0); + $57 = HEAP8[$31>>0]|0; + $58 = ($57<<24>>24)==(1); + if ($58) { + $59 = HEAP32[$30>>2]|0; + $60 = HEAP32[$32>>2]|0; + $61 = (_DecompressData($56,$59,$60)|0); + $62 = (((($39) + (($$05764*24)|0)|0)) + 20|0); + HEAP32[$62>>2] = $61; + _free($56); + } else { + $63 = (((($39) + (($$05764*24)|0)|0)) + 20|0); + HEAP32[$63>>2] = $56; + } + $64 = (((($39) + (($$05764*24)|0)|0)) + 20|0); + $65 = HEAP32[$64>>2]|0; + $66 = ($65|0)==(0|0); + if (!($66)) { + $67 = HEAP32[$3>>2]|0; + HEAP32[$vararg_buffer4>>2] = $0; + $vararg_ptr7 = ((($vararg_buffer4)) + 4|0); + HEAP32[$vararg_ptr7>>2] = $67; + _TraceLog(0,5412,$vararg_buffer4); + } + (_fread($3,32,1,$4)|0); + $68 = (($$05764) + 1)|0; + $69 = HEAP8[$21>>0]|0; + $70 = $69&255; + $71 = ($68|0)<($70|0); + if ($71) { + $$05764 = $68; + } else { + break; + } + } + } + } else { + $72 = HEAP32[$24>>2]|0; + (_fseek($4,$72,1)|0); + } + $73 = (($$05665) + 1)|0; + $74 = ($73|0)<($23|0); + if ($74) { + $$05665 = $73; + } else { + $$0$lcssa = $39; + break; + } + } + } + $33 = ((($$0$lcssa)) + 20|0); + $34 = HEAP32[$33>>2]|0; + $35 = ($34|0)==(0|0); + if ($35) { + HEAP32[$vararg_buffer8>>2] = $0; + $vararg_ptr11 = ((($vararg_buffer8)) + 4|0); + HEAP32[$vararg_ptr11>>2] = $1; + _TraceLog(1,5458,$vararg_buffer8); + $$1 = $$0$lcssa; + } else { + $$1 = $$0$lcssa; + } + } else { + HEAP32[$vararg_buffer1>>2] = $0; + _TraceLog(1,5366,$vararg_buffer1); + $$1 = 0; + } + (_fclose($4)|0); + $$2 = $$1; + STACKTOP = sp;return ($$2|0); +} +function _TraceLog($0,$1,$varargs) { + $0 = $0|0; + $1 = $1|0; + $varargs = $varargs|0; + var $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $endptr = 0, $strlen = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $2 = sp; + switch ($0|0) { + case 0: { + ;HEAP8[19312>>0]=HEAP8[5763>>0]|0;HEAP8[19312+1>>0]=HEAP8[5763+1>>0]|0;HEAP8[19312+2>>0]=HEAP8[5763+2>>0]|0;HEAP8[19312+3>>0]=HEAP8[5763+3>>0]|0;HEAP8[19312+4>>0]=HEAP8[5763+4>>0]|0;HEAP8[19312+5>>0]=HEAP8[5763+5>>0]|0;HEAP8[19312+6>>0]=HEAP8[5763+6>>0]|0; + break; + } + case 2: { + $3 = 19312; + $4 = $3; + HEAP32[$4>>2] = 1330795077; + $5 = (($3) + 4)|0; + $6 = $5; + HEAP32[$6>>2] = 2112082; + break; + } + case 1: { + dest=19312; src=5770; stop=dest+10|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + break; + } + case 3: { + $7 = 19312; + $8 = $7; + HEAP32[$8>>2] = 1430406468; + $9 = (($7) + 4)|0; + $10 = $9; + HEAP32[$10>>2] = 2112071; + break; + } + default: { + } + } + (_strcat(19312,$1)|0); + $strlen = (_strlen(19312)|0); + $endptr = (19312 + ($strlen)|0); + HEAP8[$endptr>>0]=10&255;HEAP8[$endptr+1>>0]=10>>8; + HEAP32[$2>>2] = $varargs; + $11 = ($0|0)==(3); + if ($11) { + STACKTOP = sp;return; + } + (_vprintf(19312,$2)|0); + $12 = ($0|0)==(2); + if ($12) { + _exit(1); + // unreachable; + } else { + STACKTOP = sp;return; + } +} +function _DecompressData($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer10 = 0, $vararg_buffer3 = 0, $vararg_buffer5 = 0, $vararg_buffer7 = 0, $vararg_ptr13 = 0, label = 0, sp = 0; sp = STACKTOP; STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); - $3 = sp; - _rlglLoadRenderTexture($3,$1,$2); - dest=$0; src=$3; stop=dest+44|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $vararg_buffer10 = sp + 40|0; + $vararg_buffer7 = sp + 32|0; + $vararg_buffer5 = sp + 24|0; + $vararg_buffer3 = sp + 16|0; + $vararg_buffer1 = sp + 8|0; + $vararg_buffer = sp; + $3 = (_malloc($2)|0); + $4 = ($3|0)==(0|0); + if ($4) { + _TraceLog(1,5508,$vararg_buffer); + STACKTOP = sp;return ($3|0); + } + $5 = (_tinfl_decompress_mem_to_mem($3,$2,$0,$1,1)|0); + $6 = ($5|0)==(-1); + if ($6) { + _TraceLog(1,5547,$vararg_buffer1); + _free($3); + } + $7 = ($5|0)==($2|0); + if (!($7)) { + _TraceLog(1,5573,$vararg_buffer3); + HEAP32[$vararg_buffer5>>2] = $2; + _TraceLog(1,5636,$vararg_buffer5); + HEAP32[$vararg_buffer7>>2] = $5; + _TraceLog(1,5671,$vararg_buffer7); + } + HEAP32[$vararg_buffer10>>2] = $1; + $vararg_ptr13 = ((($vararg_buffer10)) + 4|0); + HEAP32[$vararg_ptr13>>2] = $5; + _TraceLog(0,5706,$vararg_buffer10); + STACKTOP = sp;return ($3|0); +} +function _UnloadResource($0) { + $0 = $0|0; + var $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = ((($0)) + 20|0); + $2 = HEAP32[$1>>2]|0; + $3 = ($2|0)==(0|0); + if ($3) { + return; + } + _free($2); + return; +} +function _LoadDefaultFont() { + var $$ = 0, $$0101 = 0, $$090100 = 0, $$09299 = 0, $$095104 = 0, $$096103 = 0, $$097102 = 0, $$191 = 0, $$193 = 0, $$byval_copy1 = 0, $$lcssa = 0, $$sroa$0$0$$sroa_idx = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0; + var $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0; + var $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0; + var $vararg_buffer = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $$byval_copy1 = sp + 44|0; + $vararg_buffer = sp; + $0 = sp + 4|0; + $1 = sp + 24|0; + HEAP32[(20632)>>2] = 224; + $2 = (_malloc(65536)|0); + _memset(($2|0),0,65536)|0; + $$095104 = 0;$$096103 = 0; + while(1) { + $3 = (116 + ($$095104<<2)|0); + $4 = HEAP32[$3>>2]|0; + $$097102 = 31; + while(1) { + $16 = 1 << $$097102; + $17 = $4 & $16; + $18 = ($17|0)==(0); + if (!($18)) { + $19 = (($$097102) + ($$096103))|0; + $$sroa$0$0$$sroa_idx = (($2) + ($19<<2)|0); + HEAP8[$$sroa$0$0$$sroa_idx>>0]=-1&255;HEAP8[$$sroa$0$0$$sroa_idx+1>>0]=(-1>>8)&255;HEAP8[$$sroa$0$0$$sroa_idx+2>>0]=(-1>>16)&255;HEAP8[$$sroa$0$0$$sroa_idx+3>>0]=-1>>24; + } + $20 = (($$097102) + -1)|0; + $21 = ($$097102|0)>(0); + if ($21) { + $$097102 = $20; + } else { + break; + } + } + $12 = (($$095104) + 1)|0; + $13 = ($$095104|0)>(511); + $$ = $13 ? 0 : $12; + $14 = (($$096103) + 32)|0; + $15 = ($14|0)<(16384); + if ($15) { + $$095104 = $$;$$096103 = $14; + } else { + break; + } + } + _LoadImageEx($0,$2,128,128); + _ImageFormat($0,2); + _free($2); + ;HEAP32[$$byval_copy1>>2]=HEAP32[$0>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$0+8>>2]|0;HEAP32[$$byval_copy1+12>>2]=HEAP32[$0+12>>2]|0;HEAP32[$$byval_copy1+16>>2]=HEAP32[$0+16>>2]|0; + _LoadTextureFromImage($1,$$byval_copy1); + ;HEAP32[20608>>2]=HEAP32[$1>>2]|0;HEAP32[20608+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[20608+8>>2]=HEAP32[$1+8>>2]|0;HEAP32[20608+12>>2]=HEAP32[$1+12>>2]|0;HEAP32[20608+16>>2]=HEAP32[$1+16>>2]|0; + ;HEAP32[$$byval_copy1>>2]=HEAP32[$0>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$0+8>>2]|0;HEAP32[$$byval_copy1+12>>2]=HEAP32[$0+12>>2]|0;HEAP32[$$byval_copy1+16>>2]=HEAP32[$0+16>>2]|0; + _UnloadImage($$byval_copy1); + $5 = HEAP32[(20632)>>2]|0; + $6 = $5 << 5; + $7 = (_malloc($6)|0); + HEAP32[(20636)>>2] = $7; + $8 = ($5|0)>(0); + if (!($8)) { + $$lcssa = $7; + $22 = ((($$lcssa)) + 16|0); + $23 = HEAP32[$22>>2]|0; + HEAP32[(20628)>>2] = $23; + $24 = HEAP32[5152]|0; + HEAP32[$vararg_buffer>>2] = $24; + _TraceLog(0,5780,$vararg_buffer); + STACKTOP = sp;return; + } + $9 = HEAP32[(20612)>>2]|0; + $10 = HEAP32[(20632)>>2]|0; + $11 = HEAP32[(20636)>>2]|0; + $$0101 = 0;$$090100 = 1;$$09299 = 0;$27 = $7; + while(1) { + $25 = (($$0101) + 32)|0; + $26 = (($27) + ($$0101<<5)|0); + HEAP32[$26>>2] = $25; + $28 = (((($27) + ($$0101<<5)|0)) + 4|0); + HEAP32[$28>>2] = $$090100; + $29 = ($$09299*11)|0; + $30 = (($29) + 1)|0; + $31 = (((($27) + ($$0101<<5)|0)) + 8|0); + HEAP32[$31>>2] = $30; + $32 = (2164 + ($$0101<<2)|0); + $33 = HEAP32[$32>>2]|0; + $34 = (((($27) + ($$0101<<5)|0)) + 12|0); + HEAP32[$34>>2] = $33; + $35 = (((($27) + ($$0101<<5)|0)) + 16|0); + HEAP32[$35>>2] = 10; + $36 = (($$090100) + 1)|0; + $37 = (($36) + ($33))|0; + $38 = ($37|0)<($9|0); + $39 = (($$09299) + 1)|0; + if ($38) { + $$191 = $37;$$193 = $$09299; + } else { + $40 = ($39*11)|0; + $41 = (($40) + 1)|0; + $42 = (($33) + 2)|0; + HEAP32[$28>>2] = 1; + HEAP32[$31>>2] = $41; + $$191 = $42;$$193 = $39; + } + $43 = (((($27) + ($$0101<<5)|0)) + 20|0); + HEAP32[$43>>2] = 0; + $44 = (((($27) + ($$0101<<5)|0)) + 24|0); + HEAP32[$44>>2] = 0; + $45 = (((($27) + ($$0101<<5)|0)) + 28|0); + HEAP32[$45>>2] = 0; + $46 = (($$0101) + 1)|0; + $47 = ($46|0)<($10|0); + if ($47) { + $$0101 = $46;$$090100 = $$191;$$09299 = $$193;$27 = $11; + } else { + $$lcssa = $11; + break; + } + } + $22 = ((($$lcssa)) + 16|0); + $23 = HEAP32[$22>>2]|0; + HEAP32[(20628)>>2] = $23; + $24 = HEAP32[5152]|0; + HEAP32[$vararg_buffer>>2] = $24; + _TraceLog(0,5780,$vararg_buffer); + STACKTOP = sp;return; +} +function _LoadImageEx($0,$1,$2,$3) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + var $$03334 = 0, $$035 = 0, $$sroa$12$0$$sroa_idx21 = 0, $$sroa$15$0$$sroa_idx24 = 0, $$sroa$16$0$$sroa_idx26 = 0, $$sroa$9$0$$sroa_idx18 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; + var $24 = 0, $25 = 0, $26 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; + sp = STACKTOP; + $4 = $2 << 2; + $5 = Math_imul($4, $3)|0; + $6 = (_malloc($5)|0); + $7 = ($5|0)>(0); + if ($7) { + $8 = (($5) + -1)|0; + $9 = $8 >>> 2; + $$03334 = 0;$$035 = 0; + while(1) { + $10 = (($1) + ($$03334<<2)|0); + $11 = HEAP8[$10>>0]|0; + $12 = (($6) + ($$035)|0); + HEAP8[$12>>0] = $11; + $13 = (((($1) + ($$03334<<2)|0)) + 1|0); + $14 = HEAP8[$13>>0]|0; + $15 = $$035 | 1; + $16 = (($6) + ($15)|0); + HEAP8[$16>>0] = $14; + $17 = (((($1) + ($$03334<<2)|0)) + 2|0); + $18 = HEAP8[$17>>0]|0; + $19 = $$035 | 2; + $20 = (($6) + ($19)|0); + HEAP8[$20>>0] = $18; + $21 = (((($1) + ($$03334<<2)|0)) + 3|0); + $22 = HEAP8[$21>>0]|0; + $23 = $$035 | 3; + $24 = (($6) + ($23)|0); + HEAP8[$24>>0] = $22; + $25 = (($$03334) + 1)|0; + $26 = (($$035) + 4)|0; + $exitcond = ($$03334|0)==($9|0); + if ($exitcond) { + break; + } else { + $$03334 = $25;$$035 = $26; + } + } + } + HEAP32[$0>>2] = $6; + $$sroa$9$0$$sroa_idx18 = ((($0)) + 4|0); + HEAP32[$$sroa$9$0$$sroa_idx18>>2] = $2; + $$sroa$12$0$$sroa_idx21 = ((($0)) + 8|0); + HEAP32[$$sroa$12$0$$sroa_idx21>>2] = $3; + $$sroa$15$0$$sroa_idx24 = ((($0)) + 12|0); + HEAP32[$$sroa$15$0$$sroa_idx24>>2] = 1; + $$sroa$16$0$$sroa_idx26 = ((($0)) + 16|0); + HEAP32[$$sroa$16$0$$sroa_idx26>>2] = 7; + return; +} +function _ImageFormat($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $$0166199 = 0, $$0167197 = 0, $$0168195 = 0, $$0169192 = 0, $$0170190 = 0, $$0171188 = 0, $$0172189 = 0, $$0202 = 0, $$1194 = 0, $$2201 = 0, $$byval_copy = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0.0, $103 = 0.0, $104 = 0.0, $105 = 0, $106 = 0, $107 = 0; + var $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0; + var $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0; + var $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0; + var $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0.0, $17 = 0, $170 = 0.0, $171 = 0.0, $172 = 0, $173 = 0, $174 = 0, $175 = 0.0, $176 = 0.0, $177 = 0.0, $178 = 0, $179 = 0, $18 = 0; + var $180 = 0, $181 = 0.0, $182 = 0.0, $183 = 0.0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0.0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0; + var $199 = 0, $2 = 0, $20 = 0.0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0; + var $216 = 0, $217 = 0, $218 = 0.0, $219 = 0.0, $22 = 0, $220 = 0.0, $221 = 0, $222 = 0, $223 = 0, $224 = 0.0, $225 = 0.0, $226 = 0.0, $227 = 0, $228 = 0, $229 = 0, $23 = 0.0, $230 = 0.0, $231 = 0.0, $232 = 0.0, $233 = 0; + var $234 = 0, $235 = 0, $236 = 0.0, $237 = 0.0, $238 = 0.0, $239 = 0, $24 = 0.0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0, $248 = 0, $249 = 0, $25 = 0.0, $250 = 0, $251 = 0; + var $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0, $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0; + var $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0.0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0; + var $289 = 0, $29 = 0.0, $290 = 0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0.0, $53 = 0.0, $54 = 0, $55 = 0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0, $6 = 0, $60 = 0, $61 = 0.0, $62 = 0.0; + var $63 = 0.0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0; + var $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0.0, $91 = 0.0, $92 = 0.0, $93 = 0, $94 = 0, $95 = 0, $96 = 0.0, $97 = 0.0, $98 = 0.0, $99 = 0; + var $or$cond = 0, $roundf = 0.0, $roundf173 = 0.0, $roundf174 = 0.0, $roundf175 = 0.0, $roundf176 = 0.0, $roundf177 = 0.0, $roundf178 = 0.0, $roundf179 = 0.0, $roundf180 = 0.0, $roundf181 = 0.0, $vararg_buffer = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $$byval_copy = sp + 4|0; + $vararg_buffer = sp; + $2 = ((($0)) + 16|0); + $3 = HEAP32[$2>>2]|0; + $4 = ($3|0)==($1|0); + if ($4) { + STACKTOP = sp;return; + } + $5 = ($3|0)<(9); + $6 = ($1|0)<(9); + $or$cond = $6 & $5; + if (!($or$cond)) { + _TraceLog(1,6177,$vararg_buffer); + STACKTOP = sp;return; + } + ;HEAP32[$$byval_copy>>2]=HEAP32[$0>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$0+8>>2]|0;HEAP32[$$byval_copy+12>>2]=HEAP32[$0+12>>2]|0;HEAP32[$$byval_copy+16>>2]=HEAP32[$0+16>>2]|0; + $7 = (_GetImageData($$byval_copy)|0); + $8 = HEAP32[$0>>2]|0; + _free($8); + HEAP32[$2>>2] = $1; + switch ($1|0) { + case 1: { + $9 = ((($0)) + 4|0); + $10 = HEAP32[$9>>2]|0; + $11 = ((($0)) + 8|0); + $12 = HEAP32[$11>>2]|0; + $13 = Math_imul($12, $10)|0; + $14 = (_malloc($13)|0); + HEAP32[$0>>2] = $14; + $15 = Math_imul($12, $10)|0; + $16 = ($15|0)>(0); + if ($16) { + $$0171188 = 0; + while(1) { + $17 = (($7) + ($$0171188<<2)|0); + $18 = HEAP8[$17>>0]|0; + $19 = (+($18&255)); + $20 = $19 * 0.29899999499320984; + $21 = (((($7) + ($$0171188<<2)|0)) + 1|0); + $22 = HEAP8[$21>>0]|0; + $23 = (+($22&255)); + $24 = $23 * 0.58700001239776611; + $25 = $20 + $24; + $26 = (((($7) + ($$0171188<<2)|0)) + 2|0); + $27 = HEAP8[$26>>0]|0; + $28 = (+($27&255)); + $29 = $28 * 0.11400000005960464; + $30 = $25 + $29; + $31 = (~~(($30))&255); + $32 = HEAP32[$0>>2]|0; + $33 = (($32) + ($$0171188)|0); + HEAP8[$33>>0] = $31; + $34 = (($$0171188) + 1)|0; + $35 = HEAP32[$9>>2]|0; + $36 = HEAP32[$11>>2]|0; + $37 = Math_imul($36, $35)|0; + $38 = ($34|0)<($37|0); + if ($38) { + $$0171188 = $34; + } else { + break; + } + } + } + break; + } + case 2: { + $39 = ((($0)) + 4|0); + $40 = HEAP32[$39>>2]|0; + $41 = ((($0)) + 8|0); + $42 = HEAP32[$41>>2]|0; + $43 = $40 << 1; + $44 = Math_imul($43, $42)|0; + $45 = (_malloc($44)|0); + HEAP32[$0>>2] = $45; + $46 = HEAP32[$39>>2]|0; + $47 = $46 << 1; + $48 = Math_imul($47, $42)|0; + $49 = ($48|0)>(0); + if ($49) { + $$0170190 = 0;$$0172189 = 0; + while(1) { + $50 = (($7) + ($$0172189<<2)|0); + $51 = HEAP8[$50>>0]|0; + $52 = (+($51&255)); + $53 = $52 * 0.29899999499320984; + $54 = (((($7) + ($$0172189<<2)|0)) + 1|0); + $55 = HEAP8[$54>>0]|0; + $56 = (+($55&255)); + $57 = $56 * 0.58700001239776611; + $58 = $53 + $57; + $59 = (((($7) + ($$0172189<<2)|0)) + 2|0); + $60 = HEAP8[$59>>0]|0; + $61 = (+($60&255)); + $62 = $61 * 0.11400000005960464; + $63 = $58 + $62; + $64 = (~~(($63))&255); + $65 = HEAP32[$0>>2]|0; + $66 = (($65) + ($$0170190)|0); + HEAP8[$66>>0] = $64; + $67 = (((($7) + ($$0172189<<2)|0)) + 3|0); + $68 = HEAP8[$67>>0]|0; + $69 = HEAP32[$0>>2]|0; + $70 = $$0170190 | 1; + $71 = (($69) + ($70)|0); + HEAP8[$71>>0] = $68; + $72 = (($$0172189) + 1)|0; + $73 = (($$0170190) + 2)|0; + $74 = HEAP32[$39>>2]|0; + $75 = HEAP32[$41>>2]|0; + $76 = $74 << 1; + $77 = Math_imul($76, $75)|0; + $78 = ($73|0)<($77|0); + if ($78) { + $$0170190 = $73;$$0172189 = $72; + } else { + break; + } + } + } + break; + } + case 3: { + $79 = ((($0)) + 4|0); + $80 = HEAP32[$79>>2]|0; + $81 = ((($0)) + 8|0); + $82 = HEAP32[$81>>2]|0; + $83 = $80 << 1; + $84 = Math_imul($83, $82)|0; + $85 = (_malloc($84)|0); + HEAP32[$0>>2] = $85; + $86 = HEAP32[$79>>2]|0; + $87 = Math_imul($82, $86)|0; + $88 = ($87|0)>(0); + if ($88) { + $89 = HEAP8[$7>>0]|0; + $90 = (+($89&255)); + $91 = $90 * 31.0; + $92 = $91 / 255.0; + $roundf179 = (+_roundf((+$92))); + $93 = (~~(($roundf179))&255); + $94 = ((($7)) + 1|0); + $95 = HEAP8[$94>>0]|0; + $96 = (+($95&255)); + $97 = $96 * 63.0; + $98 = $97 / 255.0; + $roundf180 = (+_roundf((+$98))); + $99 = (~~(($roundf180))&255); + $100 = ((($7)) + 2|0); + $101 = HEAP8[$100>>0]|0; + $102 = (+($101&255)); + $103 = $102 * 31.0; + $104 = $103 / 255.0; + $roundf181 = (+_roundf((+$104))); + $105 = (~~(($roundf181))&255); + $106 = $93&255; + $107 = $106 << 11; + $108 = $99&255; + $109 = $108 << 5; + $110 = $109 | $107; + $111 = $105&255; + $112 = $110 | $111; + $113 = $112&65535; + $114 = HEAP32[$0>>2]|0; + $115 = HEAP32[$79>>2]|0; + $116 = HEAP32[$81>>2]|0; + $117 = Math_imul($116, $115)|0; + $$0169192 = 0; + while(1) { + $118 = (($114) + ($$0169192<<1)|0); + HEAP16[$118>>1] = $113; + $119 = (($$0169192) + 1)|0; + $120 = ($119|0)<($117|0); + if ($120) { + $$0169192 = $119; + } else { + break; + } + } + } + break; + } + case 4: { + $121 = ((($0)) + 4|0); + $122 = HEAP32[$121>>2]|0; + $123 = ((($0)) + 8|0); + $124 = HEAP32[$123>>2]|0; + $125 = ($122*3)|0; + $126 = Math_imul($125, $124)|0; + $127 = (_malloc($126)|0); + HEAP32[$0>>2] = $127; + $128 = HEAP32[$121>>2]|0; + $129 = ($128*3)|0; + $130 = Math_imul($129, $124)|0; + $131 = ($130|0)>(0); + if ($131) { + $$0168195 = 0;$$1194 = 0; + while(1) { + $132 = (($7) + ($$1194<<2)|0); + $133 = HEAP8[$132>>0]|0; + $134 = HEAP32[$0>>2]|0; + $135 = (($134) + ($$0168195)|0); + HEAP8[$135>>0] = $133; + $136 = (((($7) + ($$1194<<2)|0)) + 1|0); + $137 = HEAP8[$136>>0]|0; + $138 = HEAP32[$0>>2]|0; + $139 = (($$0168195) + 1)|0; + $140 = (($138) + ($139)|0); + HEAP8[$140>>0] = $137; + $141 = (((($7) + ($$1194<<2)|0)) + 2|0); + $142 = HEAP8[$141>>0]|0; + $143 = HEAP32[$0>>2]|0; + $144 = (($$0168195) + 2)|0; + $145 = (($143) + ($144)|0); + HEAP8[$145>>0] = $142; + $146 = (($$1194) + 1)|0; + $147 = (($$0168195) + 3)|0; + $148 = HEAP32[$121>>2]|0; + $149 = HEAP32[$123>>2]|0; + $150 = ($148*3)|0; + $151 = Math_imul($150, $149)|0; + $152 = ($147|0)<($151|0); + if ($152) { + $$0168195 = $147;$$1194 = $146; + } else { + break; + } + } + } + break; + } + case 5: { + $153 = ((($0)) + 4|0); + $154 = HEAP32[$153>>2]|0; + $155 = ((($0)) + 8|0); + $156 = HEAP32[$155>>2]|0; + $157 = $154 << 1; + $158 = Math_imul($157, $156)|0; + $159 = (_malloc($158)|0); + HEAP32[$0>>2] = $159; + $160 = HEAP32[$153>>2]|0; + $161 = Math_imul($156, $160)|0; + $162 = ($161|0)>(0); + if ($162) { + $163 = HEAP32[$0>>2]|0; + $164 = HEAP32[$153>>2]|0; + $165 = HEAP32[$155>>2]|0; + $166 = Math_imul($165, $164)|0; + $$0167197 = 0; + while(1) { + $167 = (($7) + ($$0167197<<2)|0); + $168 = HEAP8[$167>>0]|0; + $169 = (+($168&255)); + $170 = $169 * 31.0; + $171 = $170 / 255.0; + $roundf176 = (+_roundf((+$171))); + $172 = (~~(($roundf176))&255); + $173 = (((($7) + ($$0167197<<2)|0)) + 1|0); + $174 = HEAP8[$173>>0]|0; + $175 = (+($174&255)); + $176 = $175 * 31.0; + $177 = $176 / 255.0; + $roundf177 = (+_roundf((+$177))); + $178 = (~~(($roundf177))&255); + $179 = (((($7) + ($$0167197<<2)|0)) + 2|0); + $180 = HEAP8[$179>>0]|0; + $181 = (+($180&255)); + $182 = $181 * 31.0; + $183 = $182 / 255.0; + $roundf178 = (+_roundf((+$183))); + $184 = (~~(($roundf178))&255); + $185 = (((($7) + ($$0167197<<2)|0)) + 3|0); + $186 = HEAP8[$185>>0]|0; + $187 = ($186&255)>(50); + $188 = $172&255; + $189 = $188 << 11; + $190 = $178&255; + $191 = $190 << 6; + $192 = $191 | $189; + $193 = $184&255; + $194 = $193 << 1; + $195 = $192 | $194; + $196 = $187&1; + $197 = $195 | $196; + $198 = $197&65535; + $199 = (($163) + ($$0167197<<1)|0); + HEAP16[$199>>1] = $198; + $200 = (($$0167197) + 1)|0; + $201 = ($200|0)<($166|0); + if ($201) { + $$0167197 = $200; + } else { + break; + } + } + } + break; + } + case 6: { + $202 = ((($0)) + 4|0); + $203 = HEAP32[$202>>2]|0; + $204 = ((($0)) + 8|0); + $205 = HEAP32[$204>>2]|0; + $206 = $203 << 1; + $207 = Math_imul($206, $205)|0; + $208 = (_malloc($207)|0); + HEAP32[$0>>2] = $208; + $209 = HEAP32[$202>>2]|0; + $210 = Math_imul($205, $209)|0; + $211 = ($210|0)>(0); + if ($211) { + $212 = HEAP32[$0>>2]|0; + $213 = HEAP32[$202>>2]|0; + $214 = HEAP32[$204>>2]|0; + $215 = Math_imul($214, $213)|0; + $$0166199 = 0; + while(1) { + $216 = (($7) + ($$0166199<<2)|0); + $217 = HEAP8[$216>>0]|0; + $218 = (+($217&255)); + $219 = $218 * 15.0; + $220 = $219 / 255.0; + $roundf = (+_roundf((+$220))); + $221 = (~~(($roundf))&255); + $222 = (((($7) + ($$0166199<<2)|0)) + 1|0); + $223 = HEAP8[$222>>0]|0; + $224 = (+($223&255)); + $225 = $224 * 15.0; + $226 = $225 / 255.0; + $roundf173 = (+_roundf((+$226))); + $227 = (~~(($roundf173))&255); + $228 = (((($7) + ($$0166199<<2)|0)) + 2|0); + $229 = HEAP8[$228>>0]|0; + $230 = (+($229&255)); + $231 = $230 * 15.0; + $232 = $231 / 255.0; + $roundf174 = (+_roundf((+$232))); + $233 = (~~(($roundf174))&255); + $234 = (((($7) + ($$0166199<<2)|0)) + 3|0); + $235 = HEAP8[$234>>0]|0; + $236 = (+($235&255)); + $237 = $236 * 15.0; + $238 = $237 / 255.0; + $roundf175 = (+_roundf((+$238))); + $239 = (~~(($roundf175))&255); + $240 = $221&255; + $241 = $240 << 12; + $242 = $227&255; + $243 = $242 << 8; + $244 = $243 | $241; + $245 = $233&255; + $246 = $245 << 4; + $247 = $244 | $246; + $248 = $239&255; + $249 = $247 | $248; + $250 = $249&65535; + $251 = (($212) + ($$0166199<<1)|0); + HEAP16[$251>>1] = $250; + $252 = (($$0166199) + 1)|0; + $253 = ($252|0)<($215|0); + if ($253) { + $$0166199 = $252; + } else { + break; + } + } + } + break; + } + case 7: { + $254 = ((($0)) + 4|0); + $255 = HEAP32[$254>>2]|0; + $256 = ((($0)) + 8|0); + $257 = HEAP32[$256>>2]|0; + $258 = $255 << 2; + $259 = Math_imul($258, $257)|0; + $260 = (_malloc($259)|0); + HEAP32[$0>>2] = $260; + $261 = HEAP32[$254>>2]|0; + $262 = $261 << 2; + $263 = Math_imul($262, $257)|0; + $264 = ($263|0)>(0); + if ($264) { + $$0202 = 0;$$2201 = 0; + while(1) { + $265 = (($7) + ($$2201<<2)|0); + $266 = HEAP8[$265>>0]|0; + $267 = HEAP32[$0>>2]|0; + $268 = (($267) + ($$0202)|0); + HEAP8[$268>>0] = $266; + $269 = (((($7) + ($$2201<<2)|0)) + 1|0); + $270 = HEAP8[$269>>0]|0; + $271 = HEAP32[$0>>2]|0; + $272 = $$0202 | 1; + $273 = (($271) + ($272)|0); + HEAP8[$273>>0] = $270; + $274 = (((($7) + ($$2201<<2)|0)) + 2|0); + $275 = HEAP8[$274>>0]|0; + $276 = HEAP32[$0>>2]|0; + $277 = $$0202 | 2; + $278 = (($276) + ($277)|0); + HEAP8[$278>>0] = $275; + $279 = (((($7) + ($$2201<<2)|0)) + 3|0); + $280 = HEAP8[$279>>0]|0; + $281 = HEAP32[$0>>2]|0; + $282 = $$0202 | 3; + $283 = (($281) + ($282)|0); + HEAP8[$283>>0] = $280; + $284 = (($$2201) + 1)|0; + $285 = (($$0202) + 4)|0; + $286 = HEAP32[$254>>2]|0; + $287 = HEAP32[$256>>2]|0; + $288 = $286 << 2; + $289 = Math_imul($288, $287)|0; + $290 = ($285|0)<($289|0); + if ($290) { + $$0202 = $285;$$2201 = $284; + } else { + break; + } + } + } + break; + } + default: { + } + } + _free($7); + STACKTOP = sp;return; +} +function _LoadTextureFromImage($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $$sroa$10$0$$sroa_idx6 = 0, $$sroa$12$0$$sroa_idx8 = 0, $$sroa$6$0$$sroa_idx2 = 0, $$sroa$8$0$$sroa_idx4 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, $vararg_ptr3 = 0; + var $vararg_ptr4 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $vararg_buffer = sp; + $2 = HEAP32[$1>>2]|0; + $3 = ((($1)) + 4|0); + $4 = HEAP32[$3>>2]|0; + $5 = ((($1)) + 8|0); + $6 = HEAP32[$5>>2]|0; + $7 = ((($1)) + 16|0); + $8 = HEAP32[$7>>2]|0; + $9 = ((($1)) + 12|0); + $10 = HEAP32[$9>>2]|0; + $11 = (_rlglLoadTexture($2,$4,$6,$8,$10)|0); + $12 = HEAP32[$3>>2]|0; + $13 = HEAP32[$5>>2]|0; + HEAP32[$vararg_buffer>>2] = $11; + $vararg_ptr1 = ((($vararg_buffer)) + 4|0); + HEAP32[$vararg_ptr1>>2] = $12; + $vararg_ptr2 = ((($vararg_buffer)) + 8|0); + HEAP32[$vararg_ptr2>>2] = $13; + $vararg_ptr3 = ((($vararg_buffer)) + 12|0); + HEAP32[$vararg_ptr3>>2] = $10; + $vararg_ptr4 = ((($vararg_buffer)) + 16|0); + HEAP32[$vararg_ptr4>>2] = $8; + _TraceLog(3,5825,$vararg_buffer); + HEAP32[$0>>2] = $11; + $$sroa$6$0$$sroa_idx2 = ((($0)) + 4|0); + HEAP32[$$sroa$6$0$$sroa_idx2>>2] = $12; + $$sroa$8$0$$sroa_idx4 = ((($0)) + 8|0); + HEAP32[$$sroa$8$0$$sroa_idx4>>2] = $13; + $$sroa$10$0$$sroa_idx6 = ((($0)) + 12|0); + HEAP32[$$sroa$10$0$$sroa_idx6>>2] = $10; + $$sroa$12$0$$sroa_idx8 = ((($0)) + 16|0); + HEAP32[$$sroa$12$0$$sroa_idx8>>2] = $8; + STACKTOP = sp;return; +} +function _UnloadImage($0) { + $0 = $0|0; + var $1 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = HEAP32[$0>>2]|0; + _free($1); + return; +} +function _rlglLoadTexture($0,$1,$2,$3,$4) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + $4 = $4|0; + var $$0 = 0, $$off = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; + var $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0; + var $48 = 0, $49 = 0, $5 = 0, $50 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond101 = 0, $or$cond7 = 0, $or$cond97 = 0, $or$cond99 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer11 = 0, $vararg_buffer15 = 0, $vararg_buffer3 = 0, $vararg_buffer5 = 0, $vararg_buffer7 = 0; + var $vararg_buffer9 = 0, $vararg_ptr13 = 0, $vararg_ptr14 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 80|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(80|0); + $vararg_buffer15 = sp + 64|0; + $vararg_buffer11 = sp + 48|0; + $vararg_buffer9 = sp + 40|0; + $vararg_buffer7 = sp + 32|0; + $vararg_buffer5 = sp + 24|0; + $vararg_buffer3 = sp + 16|0; + $vararg_buffer1 = sp + 8|0; + $vararg_buffer = sp; + $5 = sp + 68|0; + _glBindTexture(3553,0); + HEAP32[$5>>2] = 0; + $6 = HEAP32[5160]|0; + $7 = ($6|0)==(0); + $$off = (($3) + -9)|0; + $8 = ($$off>>>0)<(4); + $or$cond = $8 & $7; + if ($or$cond) { + _TraceLog(1,5875,$vararg_buffer); + $$0 = HEAP32[$5>>2]|0; + STACKTOP = sp;return ($$0|0); + } + $9 = HEAP32[5161]|0; + $10 = ($9|0)==(0); + $11 = ($3|0)==(13); + $or$cond7 = $11 & $10; + if ($or$cond7) { + _TraceLog(1,5919,$vararg_buffer1); + $$0 = HEAP32[$5>>2]|0; + STACKTOP = sp;return ($$0|0); + } + $12 = HEAP32[5162]|0; + $13 = ($12|0)==(0); + $14 = $3 | 1; + $15 = ($14|0)==(15); + $or$cond97 = $15 & $13; + if ($or$cond97) { + _TraceLog(1,5964,$vararg_buffer3); + $$0 = HEAP32[$5>>2]|0; + STACKTOP = sp;return ($$0|0); + } + $16 = HEAP32[5163]|0; + $17 = ($16|0)==(0); + $18 = ($14|0)==(17); + $or$cond99 = $18 & $17; + if ($or$cond99) { + _TraceLog(1,6009,$vararg_buffer5); + $$0 = HEAP32[$5>>2]|0; + STACKTOP = sp;return ($$0|0); + } + $19 = HEAP32[5164]|0; + $20 = ($19|0)==(0); + $21 = ($14|0)==(19); + $or$cond101 = $21 & $20; + if ($or$cond101) { + _TraceLog(1,6054,$vararg_buffer7); + $$0 = HEAP32[$5>>2]|0; + STACKTOP = sp;return ($$0|0); + } + _glGenTextures(1,($5|0)); + $22 = HEAP32[$5>>2]|0; + _glBindTexture(3553,($22|0)); + do { + switch ($3|0) { + case 1: { + _glTexImage2D(3553,0,6409,($1|0),($2|0),0,6409,5121,($0|0)); + break; + } + case 2: { + _glTexImage2D(3553,0,6410,($1|0),($2|0),0,6410,5121,($0|0)); + break; + } + case 3: { + _glTexImage2D(3553,0,6407,($1|0),($2|0),0,6407,33635,($0|0)); + break; + } + case 4: { + _glTexImage2D(3553,0,6407,($1|0),($2|0),0,6407,5121,($0|0)); + break; + } + case 5: { + _glTexImage2D(3553,0,6408,($1|0),($2|0),0,6408,32820,($0|0)); + break; + } + case 6: { + _glTexImage2D(3553,0,6408,($1|0),($2|0),0,6408,32819,($0|0)); + break; + } + case 7: { + _glTexImage2D(3553,0,6408,($1|0),($2|0),0,6408,5121,($0|0)); + break; + } + case 8: { + $23 = HEAP32[5165]|0; + $24 = ($23|0)==(0); + if (!($24)) { + _glTexImage2D(3553,0,6407,($1|0),($2|0),0,6407,5126,($0|0)); + } + break; + } + case 9: { + $25 = HEAP32[5160]|0; + $26 = ($25|0)==(0); + if (!($26)) { + _LoadCompressedTexture($0,$1,$2,$4,33776); + } + break; + } + case 10: { + $27 = HEAP32[5160]|0; + $28 = ($27|0)==(0); + if (!($28)) { + _LoadCompressedTexture($0,$1,$2,$4,33777); + } + break; + } + case 11: { + $29 = HEAP32[5160]|0; + $30 = ($29|0)==(0); + if (!($30)) { + _LoadCompressedTexture($0,$1,$2,$4,33778); + } + break; + } + case 12: { + $31 = HEAP32[5160]|0; + $32 = ($31|0)==(0); + if (!($32)) { + _LoadCompressedTexture($0,$1,$2,$4,33779); + } + break; + } + case 13: { + $33 = HEAP32[5161]|0; + $34 = ($33|0)==(0); + if (!($34)) { + _LoadCompressedTexture($0,$1,$2,$4,36196); + } + break; + } + case 14: { + $35 = HEAP32[5162]|0; + $36 = ($35|0)==(0); + if (!($36)) { + _LoadCompressedTexture($0,$1,$2,$4,37492); + } + break; + } + case 15: { + $37 = HEAP32[5162]|0; + $38 = ($37|0)==(0); + if (!($38)) { + _LoadCompressedTexture($0,$1,$2,$4,37496); + } + break; + } + case 16: { + $39 = HEAP32[5163]|0; + $40 = ($39|0)==(0); + if (!($40)) { + _LoadCompressedTexture($0,$1,$2,$4,35840); + } + break; + } + case 17: { + $41 = HEAP32[5163]|0; + $42 = ($41|0)==(0); + if (!($42)) { + _LoadCompressedTexture($0,$1,$2,$4,35842); + } + break; + } + case 18: { + $43 = HEAP32[5164]|0; + $44 = ($43|0)==(0); + if (!($44)) { + _LoadCompressedTexture($0,$1,$2,$4,37808); + } + break; + } + case 19: { + $45 = HEAP32[5164]|0; + $46 = ($45|0)==(0); + if (!($46)) { + _LoadCompressedTexture($0,$1,$2,$4,37815); + } + break; + } + default: { + _TraceLog(1,6099,$vararg_buffer9); + } + } + } while(0); + $47 = HEAP32[5166]|0; + $48 = ($47|0)==(0); + if ($48) { + _glTexParameteri(3553,10242,33071); + _glTexParameteri(3553,10243,33071); + } else { + _glTexParameteri(3553,10242,10497); + _glTexParameteri(3553,10243,10497); + } + _glTexParameteri(3553,10240,9728); + _glTexParameteri(3553,10241,9728); + _glBindTexture(3553,0); + $49 = HEAP32[$5>>2]|0; + $50 = ($49|0)==(0); + if ($50) { + _TraceLog(1,8347,$vararg_buffer15); + $$0 = HEAP32[$5>>2]|0; + STACKTOP = sp;return ($$0|0); + } else { + HEAP32[$vararg_buffer11>>2] = $49; + $vararg_ptr13 = ((($vararg_buffer11)) + 4|0); + HEAP32[$vararg_ptr13>>2] = $1; + $vararg_ptr14 = ((($vararg_buffer11)) + 8|0); + HEAP32[$vararg_ptr14>>2] = $2; + _TraceLog(0,6128,$vararg_buffer11); + $$0 = HEAP32[$5>>2]|0; + STACKTOP = sp;return ($$0|0); + } + return (0)|0; +} +function _LoadCompressedTexture($0,$1,$2,$3,$4) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + $4 = $4|0; + var $$ = 0, $$03645 = 0, $$03744 = 0, $$038 = 0, $$03943 = 0, $$046 = 0, $$140 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0; + var $23 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond42 = 0, label = 0, sp = 0; + sp = STACKTOP; + _glPixelStorei(3317,1); + switch ($4|0) { + case 33776: case 33777: case 36196: case 37492: { + $$038 = 8; + break; + } + default: { + $$038 = 16; + } + } + $5 = ($3|0)<(1); + $6 = $1 | $2; + $7 = ($6|0)==(0); + $or$cond42 = $5 | $7; + if ($or$cond42) { + return; + } else { + $$03645 = 0;$$03744 = 0;$$03943 = $2;$$046 = $1; + } + while(1) { + $8 = (($$046) + 3)|0; + $9 = (($8|0) / 4)&-1; + $10 = (($$03943) + 3)|0; + $11 = (($10|0) / 4)&-1; + $12 = Math_imul($11, $$038)|0; + $13 = Math_imul($12, $9)|0; + $14 = (($0) + ($$03744)|0); + _glCompressedTexImage2D(3553,($$03645|0),($4|0),($$046|0),($$03943|0),0,($13|0),($14|0)); + $15 = (($13) + ($$03744))|0; + $16 = (($$046|0) / 2)&-1; + $17 = (($$03943|0) / 2)&-1; + $18 = ($$046|0)<(2); + $$ = $18 ? 1 : $16; + $19 = ($$03943|0)<(2); + $$140 = $19 ? 1 : $17; + $20 = (($$03645) + 1)|0; + $21 = ($20|0)>=($3|0); + $22 = $$ | $$140; + $23 = ($22|0)==(0); + $or$cond = $21 | $23; + if ($or$cond) { + break; + } else { + $$03645 = $20;$$03744 = $15;$$03943 = $$140;$$046 = $$; + } + } + return; +} +function _GetImageData($0) { + $0 = $0|0; + var $$0104105 = 0, $$0106 = 0, $$1 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0.0, $103 = 0.0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0; + var $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0; + var $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; + var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0; + var $42 = 0, $43 = 0, $44 = 0, $45 = 0.0, $46 = 0.0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0.0, $52 = 0.0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0; + var $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0.0, $65 = 0.0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0.0, $71 = 0.0, $72 = 0, $73 = 0, $74 = 0, $75 = 0.0, $76 = 0.0, $77 = 0, $78 = 0; + var $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0.0, $86 = 0.0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0.0, $92 = 0.0, $93 = 0, $94 = 0, $95 = 0, $96 = 0; + var $97 = 0.0, $98 = 0.0, $99 = 0, $vararg_buffer = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $vararg_buffer = sp; + $1 = ((($0)) + 4|0); + $2 = HEAP32[$1>>2]|0; + $3 = ((($0)) + 8|0); + $4 = HEAP32[$3>>2]|0; + $5 = $2 << 2; + $6 = Math_imul($5, $4)|0; + $7 = (_malloc($6)|0); + $8 = HEAP32[$1>>2]|0; + $9 = Math_imul($4, $8)|0; + $10 = ($9|0)>(0); + if (!($10)) { + STACKTOP = sp;return ($7|0); + } + $11 = ((($0)) + 16|0); + $12 = HEAP32[$11>>2]|0; + $13 = HEAP32[$0>>2]|0; + $$0104105 = 0;$$0106 = 0; + while(1) { + switch ($12|0) { + case 1: { + $14 = (($13) + ($$0106)|0); + $15 = HEAP8[$14>>0]|0; + $16 = (($7) + ($$0104105<<2)|0); + HEAP8[$16>>0] = $15; + $17 = HEAP8[$14>>0]|0; + $18 = (((($7) + ($$0104105<<2)|0)) + 1|0); + HEAP8[$18>>0] = $17; + $19 = HEAP8[$14>>0]|0; + $20 = (((($7) + ($$0104105<<2)|0)) + 2|0); + HEAP8[$20>>0] = $19; + $21 = (((($7) + ($$0104105<<2)|0)) + 3|0); + HEAP8[$21>>0] = -1; + $22 = (($$0106) + 1)|0; + $$1 = $22; + break; + } + case 2: { + $23 = (($13) + ($$0106)|0); + $24 = HEAP8[$23>>0]|0; + $25 = (($7) + ($$0104105<<2)|0); + HEAP8[$25>>0] = $24; + $26 = HEAP8[$23>>0]|0; + $27 = (((($7) + ($$0104105<<2)|0)) + 1|0); + HEAP8[$27>>0] = $26; + $28 = HEAP8[$23>>0]|0; + $29 = (((($7) + ($$0104105<<2)|0)) + 2|0); + HEAP8[$29>>0] = $28; + $30 = (($$0106) + 1)|0; + $31 = (($13) + ($30)|0); + $32 = HEAP8[$31>>0]|0; + $33 = (((($7) + ($$0104105<<2)|0)) + 3|0); + HEAP8[$33>>0] = $32; + $34 = (($$0106) + 2)|0; + $$1 = $34; + break; + } + case 5: { + $35 = (($13) + ($$0106<<1)|0); + $36 = HEAP16[$35>>1]|0; + $37 = $36&65535; + $38 = $37 >>> 11; + $39 = (+($38|0)); + $40 = $39 * 8.0; + $41 = (~~(($40))&255); + $42 = (($7) + ($$0104105<<2)|0); + HEAP8[$42>>0] = $41; + $43 = $37 >>> 6; + $44 = $43 & 31; + $45 = (+($44|0)); + $46 = $45 * 8.0; + $47 = (~~(($46))&255); + $48 = (((($7) + ($$0104105<<2)|0)) + 1|0); + HEAP8[$48>>0] = $47; + $49 = $37 >>> 1; + $50 = $49 & 31; + $51 = (+($50|0)); + $52 = $51 * 8.0; + $53 = (~~(($52))&255); + $54 = (((($7) + ($$0104105<<2)|0)) + 2|0); + HEAP8[$54>>0] = $53; + $55 = $37 & 1; + $56 = (0 - ($55))|0; + $57 = $56&255; + $58 = (((($7) + ($$0104105<<2)|0)) + 3|0); + HEAP8[$58>>0] = $57; + $59 = (($$0106) + 1)|0; + $$1 = $59; + break; + } + case 3: { + $60 = (($13) + ($$0106<<1)|0); + $61 = HEAP16[$60>>1]|0; + $62 = $61&65535; + $63 = $62 >>> 11; + $64 = (+($63|0)); + $65 = $64 * 8.0; + $66 = (~~(($65))&255); + $67 = (($7) + ($$0104105<<2)|0); + HEAP8[$67>>0] = $66; + $68 = $62 >>> 5; + $69 = $68 & 63; + $70 = (+($69|0)); + $71 = $70 * 4.0; + $72 = (~~(($71))&255); + $73 = (((($7) + ($$0104105<<2)|0)) + 1|0); + HEAP8[$73>>0] = $72; + $74 = $62 & 31; + $75 = (+($74|0)); + $76 = $75 * 8.0; + $77 = (~~(($76))&255); + $78 = (((($7) + ($$0104105<<2)|0)) + 2|0); + HEAP8[$78>>0] = $77; + $79 = (((($7) + ($$0104105<<2)|0)) + 3|0); + HEAP8[$79>>0] = -1; + $80 = (($$0106) + 1)|0; + $$1 = $80; + break; + } + case 6: { + $81 = (($13) + ($$0106<<1)|0); + $82 = HEAP16[$81>>1]|0; + $83 = $82&65535; + $84 = $83 >>> 12; + $85 = (+($84|0)); + $86 = $85 * 17.0; + $87 = (~~(($86))&255); + $88 = (($7) + ($$0104105<<2)|0); + HEAP8[$88>>0] = $87; + $89 = $83 >>> 8; + $90 = $89 & 15; + $91 = (+($90|0)); + $92 = $91 * 17.0; + $93 = (~~(($92))&255); + $94 = (((($7) + ($$0104105<<2)|0)) + 1|0); + HEAP8[$94>>0] = $93; + $95 = $83 >>> 4; + $96 = $95 & 15; + $97 = (+($96|0)); + $98 = $97 * 17.0; + $99 = (~~(($98))&255); + $100 = (((($7) + ($$0104105<<2)|0)) + 2|0); + HEAP8[$100>>0] = $99; + $101 = $83 & 15; + $102 = (+($101|0)); + $103 = $102 * 17.0; + $104 = (~~(($103))&255); + $105 = (((($7) + ($$0104105<<2)|0)) + 3|0); + HEAP8[$105>>0] = $104; + $106 = (($$0106) + 1)|0; + $$1 = $106; + break; + } + case 7: { + $107 = (($13) + ($$0106)|0); + $108 = HEAP8[$107>>0]|0; + $109 = (($7) + ($$0104105<<2)|0); + HEAP8[$109>>0] = $108; + $110 = (($$0106) + 1)|0; + $111 = (($13) + ($110)|0); + $112 = HEAP8[$111>>0]|0; + $113 = (((($7) + ($$0104105<<2)|0)) + 1|0); + HEAP8[$113>>0] = $112; + $114 = (($$0106) + 2)|0; + $115 = (($13) + ($114)|0); + $116 = HEAP8[$115>>0]|0; + $117 = (((($7) + ($$0104105<<2)|0)) + 2|0); + HEAP8[$117>>0] = $116; + $118 = (($$0106) + 3)|0; + $119 = (($13) + ($118)|0); + $120 = HEAP8[$119>>0]|0; + $121 = (((($7) + ($$0104105<<2)|0)) + 3|0); + HEAP8[$121>>0] = $120; + $122 = (($$0106) + 4)|0; + $$1 = $122; + break; + } + case 4: { + $123 = (($13) + ($$0106)|0); + $124 = HEAP8[$123>>0]|0; + $125 = (($7) + ($$0104105<<2)|0); + HEAP8[$125>>0] = $124; + $126 = (($$0106) + 1)|0; + $127 = (($13) + ($126)|0); + $128 = HEAP8[$127>>0]|0; + $129 = (((($7) + ($$0104105<<2)|0)) + 1|0); + HEAP8[$129>>0] = $128; + $130 = (($$0106) + 2)|0; + $131 = (($13) + ($130)|0); + $132 = HEAP8[$131>>0]|0; + $133 = (((($7) + ($$0104105<<2)|0)) + 2|0); + HEAP8[$133>>0] = $132; + $134 = (((($7) + ($$0104105<<2)|0)) + 3|0); + HEAP8[$134>>0] = -1; + $135 = (($$0106) + 3)|0; + $$1 = $135; + break; + } + default: { + _TraceLog(1,6231,$vararg_buffer); + $$1 = $$0106; + } + } + $136 = (($$0104105) + 1)|0; + $137 = HEAP32[$1>>2]|0; + $138 = HEAP32[$3>>2]|0; + $139 = Math_imul($138, $137)|0; + $140 = ($136|0)<($139|0); + if ($140) { + $$0104105 = $136;$$0106 = $$1; + } else { + break; + } + } + STACKTOP = sp;return ($7|0); +} +function _UnloadDefaultFont() { + var $$byval_copy = 0, $0 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $$byval_copy = sp; + ;HEAP32[$$byval_copy>>2]=HEAP32[20608>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[20608+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[20608+8>>2]|0;HEAP32[$$byval_copy+12>>2]=HEAP32[20608+12>>2]|0;HEAP32[$$byval_copy+16>>2]=HEAP32[20608+16>>2]|0; + _UnloadTexture($$byval_copy); + $0 = HEAP32[(20636)>>2]|0; + _free($0); + STACKTOP = sp;return; +} +function _UnloadTexture($0) { + $0 = $0|0; + var $1 = 0, $2 = 0, $3 = 0, $vararg_buffer = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $vararg_buffer = sp; + $1 = HEAP32[$0>>2]|0; + $2 = ($1|0)==(0); + if ($2) { + STACKTOP = sp;return; + } + _rlDeleteTextures($1); + $3 = HEAP32[$0>>2]|0; + HEAP32[$vararg_buffer>>2] = $3; + _TraceLog(0,6277,$vararg_buffer); + STACKTOP = sp;return; +} +function _rlDeleteTextures($0) { + $0 = $0|0; + var $1 = 0, $2 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $1 = sp; + HEAP32[$1>>2] = $0; + $2 = ($0|0)==(0); + if (!($2)) { + _glDeleteTextures(1,($1|0)); + } STACKTOP = sp;return; } function _GetDefaultFont($0) { $0 = $0|0; var label = 0, sp = 0; sp = STACKTOP; - ;HEAP32[$0>>2]=HEAP32[19180>>2]|0;HEAP32[$0+4>>2]=HEAP32[19180+4>>2]|0;HEAP32[$0+8>>2]=HEAP32[19180+8>>2]|0;HEAP32[$0+12>>2]=HEAP32[19180+12>>2]|0;HEAP32[$0+16>>2]=HEAP32[19180+16>>2]|0;HEAP32[$0+20>>2]=HEAP32[19180+20>>2]|0;HEAP32[$0+24>>2]=HEAP32[19180+24>>2]|0;HEAP32[$0+28>>2]=HEAP32[19180+28>>2]|0; + ;HEAP32[$0>>2]=HEAP32[20608>>2]|0;HEAP32[$0+4>>2]=HEAP32[20608+4>>2]|0;HEAP32[$0+8>>2]=HEAP32[20608+8>>2]|0;HEAP32[$0+12>>2]=HEAP32[20608+12>>2]|0;HEAP32[$0+16>>2]=HEAP32[20608+16>>2]|0;HEAP32[$0+20>>2]=HEAP32[20608+20>>2]|0;HEAP32[$0+24>>2]=HEAP32[20608+24>>2]|0;HEAP32[$0+28>>2]=HEAP32[20608+28>>2]|0; return; } +function _IsFileExtension($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $$ = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; + sp = STACKTOP; + $2 = (_strrchr($0,46)|0); + $3 = ($2|0)==(0|0); + if ($3) { + return 0; + } else { + $4 = (_strcmp($2,$1)|0); + $5 = ($4|0)==(0); + $$ = $5&1; + return ($$|0); + } + return (0)|0; +} +function _LoadImagePro($0,$1,$2,$3,$4) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + $4 = $4|0; + var $$byval_copy = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $$byval_copy = sp + 20|0; + $5 = sp; + HEAP32[$5>>2] = $1; + $6 = ((($5)) + 4|0); + HEAP32[$6>>2] = $2; + $7 = ((($5)) + 8|0); + HEAP32[$7>>2] = $3; + $8 = ((($5)) + 12|0); + HEAP32[$8>>2] = 1; + $9 = ((($5)) + 16|0); + HEAP32[$9>>2] = $4; + ;HEAP32[$$byval_copy>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$5+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$5+8>>2]|0;HEAP32[$$byval_copy+12>>2]=HEAP32[$5+12>>2]|0;HEAP32[$$byval_copy+16>>2]=HEAP32[$5+16>>2]|0; + _ImageCopy($0,$$byval_copy); + STACKTOP = sp;return; +} +function _LoadImage($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $$byval_copy = 0, $$sink = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0, $vararg_buffer12 = 0, $vararg_buffer4 = 0, $vararg_buffer7 = 0, $vararg_ptr10 = 0, $vararg_ptr11 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(96|0); + $$byval_copy = sp + 40|0; + $vararg_buffer12 = sp + 32|0; + $vararg_buffer7 = sp + 16|0; + $vararg_buffer4 = sp + 8|0; + $vararg_buffer = sp; + $2 = sp + 72|0; + $3 = sp + 68|0; + $4 = sp + 64|0; + $5 = sp + 60|0; + ;HEAP32[$2>>2]=0|0;HEAP32[$2+4>>2]=0|0;HEAP32[$2+8>>2]=0|0;HEAP32[$2+12>>2]=0|0;HEAP32[$2+16>>2]=0|0; + $6 = (_IsFileExtension($1,6327)|0); + $7 = ($6|0)==(0); + do { + if ($7) { + $19 = (_IsFileExtension($1,6380)|0); + $20 = ($19|0)==(0); + if ($20) { + $30 = (_IsFileExtension($1,6388)|0); + $31 = ($30|0)==(0); + if ($31) { + HEAP32[$vararg_buffer4>>2] = $1; + _TraceLog(1,6460,$vararg_buffer4); + break; + } + HEAP32[$3>>2] = 0; + $32 = (_fopen($1,6385)|0); + _stbi_set_flip_vertically_on_load(1); + $33 = ((($2)) + 4|0); + $34 = ((($2)) + 8|0); + $35 = (_stbi_loadf_from_file($32,$33,$34,$3,0)|0); + HEAP32[$2>>2] = $35; + _stbi_set_flip_vertically_on_load(0); + (_fclose($32)|0); + $36 = ((($2)) + 12|0); + HEAP32[$36>>2] = 1; + $37 = HEAP32[$3>>2]|0; + $38 = ($37|0)==(3); + if ($38) { + $39 = ((($2)) + 16|0); + HEAP32[$39>>2] = 8; + } else { + HEAP32[$$byval_copy>>2] = $1; + _TraceLog(1,6393,$$byval_copy); + ;HEAP32[$$byval_copy>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$2+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$2+8>>2]|0;HEAP32[$$byval_copy+12>>2]=HEAP32[$2+12>>2]|0;HEAP32[$$byval_copy+16>>2]=HEAP32[$2+16>>2]|0; + _UnloadImage($$byval_copy); + } + break; + } else { + HEAP32[$3>>2] = 0; + HEAP32[$4>>2] = 0; + HEAP32[$5>>2] = 0; + $21 = (_fopen($1,6385)|0); + $22 = (_stbi_load_from_file($21,$3,$4,$5,0)|0); + HEAP32[$2>>2] = $22; + (_fclose($21)|0); + $23 = HEAP32[$3>>2]|0; + $24 = ((($2)) + 4|0); + HEAP32[$24>>2] = $23; + $25 = HEAP32[$4>>2]|0; + $26 = ((($2)) + 8|0); + HEAP32[$26>>2] = $25; + $27 = ((($2)) + 12|0); + HEAP32[$27>>2] = 1; + $28 = HEAP32[$5>>2]|0; + switch ($28|0) { + case 1: { + $$sink = 1; + label = 11; + break; + } + case 2: { + $$sink = 2; + label = 11; + break; + } + case 3: { + $$sink = 4; + label = 11; + break; + } + case 4: { + $$sink = 7; + label = 11; + break; + } + default: { + } + } + if ((label|0) == 11) { + $29 = ((($2)) + 16|0); + HEAP32[$29>>2] = $$sink; + } + break; + } + } else { + $8 = (_LoadResource($1,0)|0); + $9 = HEAP32[$8>>2]|0; + $10 = ($9|0)==(1); + if ($10) { + $11 = ((($8)) + 20|0); + $12 = HEAP32[$11>>2]|0; + $13 = ((($8)) + 4|0); + $14 = HEAP32[$13>>2]|0; + $15 = ((($8)) + 8|0); + $16 = HEAP32[$15>>2]|0; + $17 = ((($8)) + 12|0); + $18 = HEAP32[$17>>2]|0; + _LoadImagePro($2,$12,$14,$16,$18); + } else { + HEAP32[$vararg_buffer>>2] = $1; + _TraceLog(1,6333,$vararg_buffer); + } + _UnloadResource($8); + } + } while(0); + $40 = HEAP32[$2>>2]|0; + $41 = ($40|0)==(0|0); + if ($41) { + HEAP32[$vararg_buffer12>>2] = $1; + _TraceLog(1,6535,$vararg_buffer12); + ;HEAP32[$0>>2]=HEAP32[$2>>2]|0;HEAP32[$0+4>>2]=HEAP32[$2+4>>2]|0;HEAP32[$0+8>>2]=HEAP32[$2+8>>2]|0;HEAP32[$0+12>>2]=HEAP32[$2+12>>2]|0;HEAP32[$0+16>>2]=HEAP32[$2+16>>2]|0; + STACKTOP = sp;return; + } else { + $42 = ((($2)) + 4|0); + $43 = HEAP32[$42>>2]|0; + $44 = ((($2)) + 8|0); + $45 = HEAP32[$44>>2]|0; + HEAP32[$vararg_buffer7>>2] = $1; + $vararg_ptr10 = ((($vararg_buffer7)) + 4|0); + HEAP32[$vararg_ptr10>>2] = $43; + $vararg_ptr11 = ((($vararg_buffer7)) + 8|0); + HEAP32[$vararg_ptr11>>2] = $45; + _TraceLog(0,6496,$vararg_buffer7); + ;HEAP32[$0>>2]=HEAP32[$2>>2]|0;HEAP32[$0+4>>2]=HEAP32[$2+4>>2]|0;HEAP32[$0+8>>2]=HEAP32[$2+8>>2]|0;HEAP32[$0+12>>2]=HEAP32[$2+12>>2]|0;HEAP32[$0+16>>2]=HEAP32[$2+16>>2]|0; + STACKTOP = sp;return; + } +} +function _stbi_load_from_file($0,$1,$2,$3,$4) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + $4 = $4|0; + var $10 = 0, $11 = 0, $12 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 192|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(192|0); + $5 = sp; + _stbi__start_file($5,$0); + $6 = (_stbi__load_and_postprocess_8bit($5,$1,$2,$3,$4)|0); + $7 = ($6|0)==(0|0); + if ($7) { + STACKTOP = sp;return ($6|0); + } + $8 = ((($5)) + 172|0); + $9 = HEAP32[$8>>2]|0; + $10 = ((($5)) + 168|0); + $11 = HEAP32[$10>>2]|0; + $12 = (($11) - ($9))|0; + (_fseek($0,$12,1)|0); + STACKTOP = sp;return ($6|0); +} +function _stbi_set_flip_vertically_on_load($0) { + $0 = $0|0; + var label = 0, sp = 0; + sp = STACKTOP; + HEAP32[5170] = $0; + return; +} +function _stbi_loadf_from_file($0,$1,$2,$3,$4) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + $4 = $4|0; + var $5 = 0, $6 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 192|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(192|0); + $5 = sp; + _stbi__start_file($5,$0); + $6 = (_stbi__loadf_main($5,$1,$2,$3,$4)|0); + STACKTOP = sp;return ($6|0); +} +function _stbi__start_file($0,$1) { + $0 = $0|0; + $1 = $1|0; + var label = 0, sp = 0; + sp = STACKTOP; + _stbi__start_callbacks($0,3692,$1); + return; +} +function _stbi__loadf_main($0,$1,$2,$3,$4) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + $4 = $4|0; + var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $5 = (_stbi__hdr_test($0)|0); + $6 = ($5|0)==(0); + if (!($6)) { + $7 = (_stbi__hdr_load($0,$1,$2,$3,$4)|0); + $8 = ($7|0)==(0|0); + if ($8) { + $$0 = 0; + return ($$0|0); + } + _stbi__float_postprocess($7,$1,$2,$3,$4); + $$0 = $7; + return ($$0|0); + } + $9 = (_stbi__load_and_postprocess_8bit($0,$1,$2,$3,$4)|0); + $10 = ($9|0)==(0|0); + if ($10) { + _stbi__err(6566); + $$0 = 0; + return ($$0|0); + } + $11 = HEAP32[$1>>2]|0; + $12 = HEAP32[$2>>2]|0; + $13 = ($4|0)==(0); + if ($13) { + $14 = HEAP32[$3>>2]|0; + $15 = $14; + } else { + $15 = $4; + } + $16 = (_stbi__ldr_to_hdr($9,$11,$12,$15)|0); + $$0 = $16; + return ($$0|0); +} +function _stbi__hdr_test($0) { + $0 = $0|0; + var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = (_stbi__hdr_test_core($0,8174)|0); + _stbi__rewind($0); + $2 = ($1|0)==(0); + if (!($2)) { + $$0 = $1; + return ($$0|0); + } + $3 = (_stbi__hdr_test_core($0,8186)|0); + _stbi__rewind($0); + $$0 = $3; + return ($$0|0); +} +function _stbi__hdr_load($0,$1,$2,$3,$4) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + $4 = $4|0; + var $$ = 0, $$$0142 = 0, $$014033 = 0, $$014253 = 0, $$014344 = 0, $$014538 = 0, $$0146 = 0, $$0150 = 0, $$114131 = 0, $$1144 = 0, $$1147 = 0, $$1151 = 0, $$2148 = 0, $$2152$be = 0, $$215236 = 0, $$3 = 0, $$314943 = 0, $$315332 = 0, $$430 = 0, $$540 = 0; + var $$lcssa29 = 0, $$off = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $12 = 0, $13 = 0, $14 = 0; + var $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0; + var $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0; + var $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0; + var $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0; + var $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $exitcond = 0, $exitcond87 = 0, $exitcond88 = 0, $notlhs = 0, $notrhs = 0, $or$cond = 0, $or$cond3$not = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 1040|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(1040|0); + $5 = sp + 16|0; + $6 = sp; + $7 = sp + 4|0; + $8 = sp + 8|0; + $9 = (_stbi__hdr_gettoken($0,$5)|0); + $10 = (_strcmp($9,8034)|0); + $11 = ($10|0)==(0); + if (!($11)) { + $12 = (_strcmp($9,8045)|0); + $13 = ($12|0)==(0); + if (!($13)) { + _stbi__err(8052); + $$3 = 0; + STACKTOP = sp;return ($$3|0); + } + } + $14 = (_stbi__hdr_gettoken($0,$5)|0); + HEAP32[$6>>2] = $14; + $15 = HEAP8[$14>>0]|0; + $16 = ($15<<24>>24)==(0); + if (!($16)) { + $$014253 = 0;$17 = $5; + while(1) { + $18 = (_strcmp($17,8060)|0); + $19 = ($18|0)==(0); + $$$0142 = $19 ? 1 : $$014253; + $20 = (_stbi__hdr_gettoken($0,$5)|0); + $21 = HEAP8[$20>>0]|0; + $22 = ($21<<24>>24)==(0); + if ($22) { + break; + } else { + $$014253 = $$$0142;$17 = $5; + } + } + HEAP32[$6>>2] = $20; + $23 = ($$$0142|0)==(0); + if (!($23)) { + $24 = (_stbi__hdr_gettoken($0,$5)|0); + HEAP32[$6>>2] = $24; + $25 = (_strncmp($24,8102,3)|0); + $26 = ($25|0)==(0); + if (!($26)) { + _stbi__err(8106); + $$3 = 0; + STACKTOP = sp;return ($$3|0); + } + $27 = ((($5)) + 3|0); + HEAP32[$6>>2] = $27; + $28 = (_strtol($27,$6,10)|0); + $29 = HEAP32[$6>>2]|0; + $30 = HEAP8[$29>>0]|0; + $31 = ($30<<24>>24)==(32); + if ($31) { + $33 = $29; + while(1) { + $32 = ((($33)) + 1|0); + $34 = HEAP8[$32>>0]|0; + $35 = ($34<<24>>24)==(32); + if ($35) { + $33 = $32; + } else { + break; + } + } + HEAP32[$6>>2] = $32; + $$lcssa29 = $32; + } else { + $$lcssa29 = $29; + } + $36 = (_strncmp($$lcssa29,8130,3)|0); + $37 = ($36|0)==(0); + if (!($37)) { + _stbi__err(8106); + $$3 = 0; + STACKTOP = sp;return ($$3|0); + } + $38 = ((($$lcssa29)) + 3|0); + HEAP32[$6>>2] = $38; + $39 = (_strtol($38,0,10)|0); + HEAP32[$1>>2] = $39; + HEAP32[$2>>2] = $28; + $40 = ($3|0)==(0|0); + if (!($40)) { + HEAP32[$3>>2] = 3; + } + $41 = ($4|0)==(0); + $$ = $41 ? 3 : $4; + $42 = (_stbi__mad4sizes_valid($39,$28,$$)|0); + $43 = ($42|0)==(0); + if ($43) { + _stbi__err(6792); + $$3 = 0; + STACKTOP = sp;return ($$3|0); + } + $44 = (_stbi__malloc_mad4($39,$28,$$)|0); + $45 = ($44|0)==(0|0); + if ($45) { + _stbi__err(6585); + $$3 = 0; + STACKTOP = sp;return ($$3|0); + } + $$off = (($39) + -8)|0; + $46 = ($$off>>>0)>(32759); + do { + if ($46) { + $$0146 = 0; + label = 23; + } else { + $47 = ($28|0)>(0); + if ($47) { + $$014344 = 0;$$314943 = 0; + } else { + $$3 = $44; + STACKTOP = sp;return ($$3|0); + } + L39: while(1) { + $57 = (_stbi__get8($0)|0); + $58 = (_stbi__get8($0)|0); + $59 = (_stbi__get8($0)|0); + $60 = $59&255; + $notlhs = ($57<<24>>24)==(2); + $notrhs = ($58<<24>>24)==(2); + $or$cond3$not = $notlhs & $notrhs; + $61 = $60 & 128; + $62 = ($61|0)==(0); + $or$cond = $or$cond3$not & $62; + if (!($or$cond)) { + label = 28; + break; + } + $67 = $60 << 8; + $68 = (_stbi__get8($0)|0); + $69 = $68&255; + $70 = $69 | $67; + $71 = ($70|0)==($39|0); + if (!($71)) { + label = 30; + break; + } + $72 = ($$014344|0)==(0|0); + if ($72) { + $73 = (_stbi__malloc_mad2($39,4)|0); + $74 = ($73|0)==(0|0); + if ($74) { + label = 33; + break; + } else { + $$1144 = $73; + } + } else { + $$1144 = $$014344; + } + $$014538 = 0; + while(1) { + $$215236 = 0;$87 = $39; + while(1) { + $82 = (_stbi__get8($0)|0); + $79 = $82&255; + $83 = ($82&255)>(128); + do { + if ($83) { + $84 = (_stbi__get8($0)|0); + $85 = (($79) + 128)|0; + $77 = $85 & 255; + $86 = ($77|0)>($87|0); + if ($86) { + label = 43; + break L39; + } + $88 = ($77|0)==(0); + if ($88) { + $$2152$be = $$215236; + break; + } else { + $$014033 = 0;$$315332 = $$215236; + } + while(1) { + $89 = (($$315332) + 1)|0; + $90 = $$315332 << 2; + $91 = (($90) + ($$014538))|0; + $92 = (($$1144) + ($91)|0); + HEAP8[$92>>0] = $84; + $93 = (($$014033) + 1)|0; + $exitcond87 = ($93|0)==($77|0); + if ($exitcond87) { + break; + } else { + $$014033 = $93;$$315332 = $89; + } + } + $76 = (($$215236) + ($77))|0; + $$2152$be = $76; + } else { + $94 = ($79|0)>($87|0); + if ($94) { + label = 47; + break L39; + } + $95 = ($82<<24>>24)==(0); + if ($95) { + $$2152$be = $$215236; + break; + } else { + $$114131 = 0;$$430 = $$215236; + } + while(1) { + $96 = (_stbi__get8($0)|0); + $97 = (($$430) + 1)|0; + $98 = $$430 << 2; + $99 = (($98) + ($$014538))|0; + $100 = (($$1144) + ($99)|0); + HEAP8[$100>>0] = $96; + $101 = (($$114131) + 1)|0; + $exitcond = ($101|0)==($79|0); + if ($exitcond) { + break; + } else { + $$114131 = $101;$$430 = $97; + } + } + $78 = (($$215236) + ($79))|0; + $$2152$be = $78; + } + } while(0); + $80 = (($39) - ($$2152$be))|0; + $81 = ($80|0)>(0); + if ($81) { + $$215236 = $$2152$be;$87 = $80; + } else { + break; + } + } + $102 = (($$014538) + 1)|0; + $103 = ($102|0)<(4); + if ($103) { + $$014538 = $102; + } else { + break; + } + } + $75 = Math_imul($$314943, $39)|0; + $$540 = 0; + while(1) { + $104 = (($$540) + ($75))|0; + $105 = Math_imul($104, $$)|0; + $106 = (($44) + ($105<<2)|0); + $107 = $$540 << 2; + $108 = (($$1144) + ($107)|0); + _stbi__hdr_convert($106,$108,$$); + $109 = (($$540) + 1)|0; + $exitcond88 = ($109|0)==($39|0); + if ($exitcond88) { + break; + } else { + $$540 = $109; + } + } + $110 = (($$314943) + 1)|0; + $111 = ($110|0)<($28|0); + if ($111) { + $$014344 = $$1144;$$314943 = $110; + } else { + label = 52; + break; + } + } + if ((label|0) == 28) { + HEAP8[$8>>0] = $57; + $63 = ((($8)) + 1|0); + HEAP8[$63>>0] = $58; + $64 = ((($8)) + 2|0); + HEAP8[$64>>0] = $59; + $65 = (_stbi__get8($0)|0); + $66 = ((($8)) + 3|0); + HEAP8[$66>>0] = $65; + _stbi__hdr_convert($44,$8,$$); + _free($$014344); + $$1151 = 1;$$2148 = 0; + label = 25; + break; + } + else if ((label|0) == 30) { + _free($44); + _free($$014344); + _stbi__err(8134); + $$3 = 0; + STACKTOP = sp;return ($$3|0); + } + else if ((label|0) == 33) { + _free($44); + _stbi__err(6585); + $$3 = 0; + STACKTOP = sp;return ($$3|0); + } + else if ((label|0) == 43) { + _free($44); + _free($$1144); + _stbi__err(8166); + $$3 = 0; + STACKTOP = sp;return ($$3|0); + } + else if ((label|0) == 47) { + _free($44); + _free($$1144); + _stbi__err(8166); + $$3 = 0; + STACKTOP = sp;return ($$3|0); + } + else if ((label|0) == 52) { + $112 = ($$1144|0)==(0|0); + if ($112) { + $$3 = $44; + STACKTOP = sp;return ($$3|0); + } + _free($$1144); + $$3 = $44; + STACKTOP = sp;return ($$3|0); + } + } + } while(0); + while(1) { + if ((label|0) == 23) { + label = 0; + $48 = ($$0146|0)<($28|0); + if ($48) { + $$0150 = 0;$$1147 = $$0146; + } else { + $$3 = $44; + break; + } + } + else if ((label|0) == 25) { + label = 0; + (_stbi__getn($0,$7,4)|0); + $50 = Math_imul($39, $$)|0; + $51 = Math_imul($50, $$2148)|0; + $52 = (($44) + ($51<<2)|0); + $53 = Math_imul($$1151, $$)|0; + $54 = (($52) + ($53<<2)|0); + _stbi__hdr_convert($54,$7,$$); + $55 = (($$1151) + 1)|0; + $$0150 = $55;$$1147 = $$2148; + } + $49 = ($$0150|0)<($39|0); + if ($49) { + $$1151 = $$0150;$$2148 = $$1147; + label = 25; + continue; + } + $56 = (($$1147) + 1)|0; + $$0146 = $56; + label = 23; + } + STACKTOP = sp;return ($$3|0); + } + } + _stbi__err(8083); + $$3 = 0; + STACKTOP = sp;return ($$3|0); +} +function _stbi__float_postprocess($0,$1,$2,$3,$4) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + $4 = $4|0; + var $$05558 = 0, $$05659 = 0, $$061 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $exitcond64 = 0, $exitcond65 = 0, $or$cond = 0, label = 0, sp = 0; + sp = STACKTOP; + $5 = HEAP32[5170]|0; + $6 = ($5|0)!=(0); + $7 = ($0|0)!=(0|0); + $or$cond = $7 & $6; + if (!($or$cond)) { + return; + } + $8 = HEAP32[$1>>2]|0; + $9 = HEAP32[$2>>2]|0; + $10 = ($4|0)==(0); + if ($10) { + $11 = HEAP32[$3>>2]|0; + $16 = $11; + } else { + $16 = $4; + } + $12 = $9 >> 1; + $13 = ($12|0)>(0); + if (!($13)) { + return; + } + $14 = ($8|0)>(0); + $15 = ($16|0)>(0); + $17 = (($9) + -1)|0; + $$061 = 0; + while(1) { + if ($14) { + $18 = Math_imul($$061, $8)|0; + $19 = (($17) - ($$061))|0; + $20 = Math_imul($19, $8)|0; + $$05659 = 0; + while(1) { + if ($15) { + $21 = (($$05659) + ($18))|0; + $22 = Math_imul($21, $16)|0; + $23 = (($$05659) + ($20))|0; + $24 = Math_imul($23, $16)|0; + $$05558 = 0; + while(1) { + $25 = (($$05558) + ($22))|0; + $26 = (($0) + ($25<<2)|0); + $27 = HEAP32[$26>>2]|0; + $28 = (($$05558) + ($24))|0; + $29 = (($0) + ($28<<2)|0); + $30 = HEAP32[$29>>2]|0; + HEAP32[$26>>2] = $30; + HEAP32[$29>>2] = $27; + $31 = (($$05558) + 1)|0; + $exitcond = ($31|0)==($16|0); + if ($exitcond) { + break; + } else { + $$05558 = $31; + } + } + } + $32 = (($$05659) + 1)|0; + $exitcond64 = ($32|0)==($8|0); + if ($exitcond64) { + break; + } else { + $$05659 = $32; + } + } + } + $33 = (($$061) + 1)|0; + $exitcond65 = ($33|0)==($12|0); + if ($exitcond65) { + break; + } else { + $$061 = $33; + } + } + return; +} +function _stbi__load_and_postprocess_8bit($0,$1,$2,$3,$4) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + $4 = $4|0; + var $$0 = 0, $$070 = 0, $$07175 = 0, $$07276 = 0, $$07378 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; + var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $5 = 0, $6 = 0; + var $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $exitcond79 = 0, $exitcond80 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $5 = sp; + $6 = (_stbi__load_main($0,$1,$2,$3,$4,$5)|0); + $7 = ($6|0)==(0|0); + if ($7) { + $$0 = 0; + STACKTOP = sp;return ($$0|0); + } + $8 = HEAP32[$5>>2]|0; + switch ($8|0) { + case 8: { + $$070 = $6; + break; + } + case 16: { + label = 4; + break; + } + default: { + ___assert_fail((6594|0),(6620|0),1041,(6643|0)); + // unreachable; + } + } + if ((label|0) == 4) { + $9 = HEAP32[$1>>2]|0; + $10 = HEAP32[$2>>2]|0; + $11 = ($4|0)==(0); + if ($11) { + $12 = HEAP32[$3>>2]|0; + $13 = $12; + } else { + $13 = $4; + } + $14 = (_stbi__convert_16_to_8($6,$9,$10,$13)|0); + HEAP32[$5>>2] = 8; + $$070 = $14; + } + $15 = HEAP32[5170]|0; + $16 = ($15|0)==(0); + if ($16) { + $$0 = $$070; + STACKTOP = sp;return ($$0|0); + } + $17 = HEAP32[$1>>2]|0; + $18 = HEAP32[$2>>2]|0; + $19 = ($4|0)==(0); + if ($19) { + $20 = HEAP32[$3>>2]|0; + $25 = $20; + } else { + $25 = $4; + } + $21 = $18 >> 1; + $22 = ($21|0)>(0); + if (!($22)) { + $$0 = $$070; + STACKTOP = sp;return ($$0|0); + } + $23 = ($17|0)>(0); + $24 = ($25|0)>(0); + $26 = (($18) + -1)|0; + $$07378 = 0; + while(1) { + if ($23) { + $27 = Math_imul($$07378, $17)|0; + $28 = (($26) - ($$07378))|0; + $29 = Math_imul($28, $17)|0; + $$07276 = 0; + while(1) { + if ($24) { + $30 = (($$07276) + ($27))|0; + $31 = Math_imul($30, $25)|0; + $32 = (($$07276) + ($29))|0; + $33 = Math_imul($32, $25)|0; + $$07175 = 0; + while(1) { + $34 = (($$07175) + ($31))|0; + $35 = (($$070) + ($34)|0); + $36 = HEAP8[$35>>0]|0; + $37 = (($$07175) + ($33))|0; + $38 = (($$070) + ($37)|0); + $39 = HEAP8[$38>>0]|0; + HEAP8[$35>>0] = $39; + HEAP8[$38>>0] = $36; + $40 = (($$07175) + 1)|0; + $exitcond = ($40|0)==($25|0); + if ($exitcond) { + break; + } else { + $$07175 = $40; + } + } + } + $41 = (($$07276) + 1)|0; + $exitcond79 = ($41|0)==($17|0); + if ($exitcond79) { + break; + } else { + $$07276 = $41; + } + } + } + $42 = (($$07378) + 1)|0; + $exitcond80 = ($42|0)==($21|0); + if ($exitcond80) { + $$0 = $$070; + break; + } else { + $$07378 = $42; + } + } + STACKTOP = sp;return ($$0|0); +} +function _stbi__ldr_to_hdr($0,$1,$2,$3) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + var $$0 = 0, $$042 = 0, $$043$lcssa = 0, $$04345 = 0, $$04446 = 0, $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0; + var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0.0, $34 = 0.0, $35 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $exitcond48 = 0, $sext = 0; + var label = 0, sp = 0; + sp = STACKTOP; + $4 = ($0|0)==(0|0); + if ($4) { + $$0 = 0; + return ($$0|0); + } + $5 = (_stbi__malloc_mad4($1,$2,$3)|0); + $6 = ($5|0)==(0|0); + if ($6) { + _free($0); + _stbi__err(6585); + $$0 = 0; + return ($$0|0); + } + $7 = $3 & 1; + $sext = (($3) + -1)|0; + $$042 = (($sext) + ($7))|0; + $8 = Math_imul($2, $1)|0; + $9 = ($8|0)>(0); + if ($9) { + $10 = ($$042|0)>(0); + $11 = +HEAPF32[765]; + $12 = $11; + $13 = +HEAPF32[766]; + $14 = $13; + $$04446 = 0; + while(1) { + if ($10) { + $15 = Math_imul($$04446, $3)|0; + $$04345 = 0; + while(1) { + $16 = (($$04345) + ($15))|0; + $17 = (($0) + ($16)|0); + $18 = HEAP8[$17>>0]|0; + $19 = (+($18&255)); + $20 = $19 / 255.0; + $21 = $20; + $22 = (+Math_pow((+$21),(+$12))); + $23 = $22 * $14; + $24 = $23; + $25 = (($5) + ($16<<2)|0); + HEAPF32[$25>>2] = $24; + $26 = (($$04345) + 1)|0; + $exitcond = ($26|0)==($$042|0); + if ($exitcond) { + $$043$lcssa = $$042; + break; + } else { + $$04345 = $26; + } + } + } else { + $$043$lcssa = 0; + } + $27 = ($$043$lcssa|0)<($3|0); + $28 = Math_imul($$04446, $3)|0; + $29 = (($$043$lcssa) + ($28))|0; + if ($27) { + $30 = (($5) + ($29<<2)|0); + $31 = (($0) + ($29)|0); + $32 = HEAP8[$31>>0]|0; + $33 = (+($32&255)); + $34 = $33 / 255.0; + HEAPF32[$30>>2] = $34; + } + $35 = (($$04446) + 1)|0; + $exitcond48 = ($35|0)==($8|0); + if ($exitcond48) { + break; + } else { + $$04446 = $35; + } + } + } + _free($0); + $$0 = $5; + return ($$0|0); +} +function _stbi__err($0) { + $0 = $0|0; + var label = 0, sp = 0; + sp = STACKTOP; + HEAP32[5169] = $0; + return; +} +function _stbi__malloc_mad4($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $$0 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; + sp = STACKTOP; + $3 = (_stbi__mad4sizes_valid($0,$1,$2)|0); + $4 = ($3|0)==(0); + if ($4) { + $$0 = 0; + return ($$0|0); + } + $5 = $0 << 2; + $6 = Math_imul($5, $1)|0; + $7 = Math_imul($6, $2)|0; + $8 = (_stbi__malloc($7)|0); + $$0 = $8; + return ($$0|0); +} +function _stbi__mad4sizes_valid($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $3 = (_stbi__mul2sizes_valid($0,$1)|0); + $4 = ($3|0)==(0); + if ($4) { + $15 = 0; + } else { + $5 = Math_imul($1, $0)|0; + $6 = (_stbi__mul2sizes_valid($5,$2)|0); + $7 = ($6|0)==(0); + if ($7) { + $15 = 0; + } else { + $8 = Math_imul($5, $2)|0; + $9 = (_stbi__mul2sizes_valid($8,4)|0); + $10 = ($9|0)==(0); + if ($10) { + $15 = 0; + } else { + $11 = $8 << 2; + $12 = (_stbi__addsizes_valid($11)|0); + $13 = ($12|0)!=(0); + $15 = $13; + } + } + } + $14 = $15&1; + return ($14|0); +} +function _stbi__malloc($0) { + $0 = $0|0; + var $1 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = (_malloc($0)|0); + return ($1|0); +} +function _stbi__mul2sizes_valid($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; + sp = STACKTOP; + $2 = $1 | $0; + $3 = ($2|0)<(0); + if ($3) { + $$0 = 0; + } else { + $4 = ($1|0)==(0); + if ($4) { + $$0 = 1; + } else { + $5 = (2147483647 / ($1|0))&-1; + $6 = ($5|0)>=($0|0); + $7 = $6&1; + $$0 = $7; + } + } + return ($$0|0); +} +function _stbi__addsizes_valid($0) { + $0 = $0|0; + var label = 0, sp = 0; + sp = STACKTOP; + return 1; +} +function _stbi__load_main($0,$1,$2,$3,$4,$5) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + $4 = $4|0; + $5 = $5|0; + var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + HEAP32[$5>>2] = 8; + $6 = ((($5)) + 8|0); + HEAP32[$6>>2] = 0; + $7 = ((($5)) + 4|0); + HEAP32[$7>>2] = 0; + $8 = (_stbi__png_test($0)|0); + $9 = ($8|0)==(0); + if (!($9)) { + $10 = (_stbi__png_load($0,$1,$2,$3,$4,$5)|0); + $$0 = $10; + return ($$0|0); + } + $11 = (_stbi__hdr_test($0)|0); + $12 = ($11|0)==(0); + if ($12) { + _stbi__err(6566); + $$0 = 0; + return ($$0|0); + } + $13 = (_stbi__hdr_load($0,$1,$2,$3,$4)|0); + $14 = HEAP32[$1>>2]|0; + $15 = HEAP32[$2>>2]|0; + $16 = ($4|0)==(0); + if ($16) { + $17 = HEAP32[$3>>2]|0; + $18 = $17; + } else { + $18 = $4; + } + $19 = (_stbi__hdr_to_ldr($13,$14,$15,$18)|0); + $$0 = $19; + return ($$0|0); +} +function _stbi__convert_16_to_8($0,$1,$2,$3) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + var $$0 = 0, $$01819 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, label = 0, sp = 0; + sp = STACKTOP; + $4 = Math_imul($2, $1)|0; + $5 = Math_imul($4, $3)|0; + $6 = (_stbi__malloc($5)|0); + $7 = ($6|0)==(0|0); + if ($7) { + _stbi__err(6585); + $$0 = 0; + return ($$0|0); + } + $8 = ($5|0)>(0); + if ($8) { + $$01819 = 0; + while(1) { + $9 = (($0) + ($$01819<<1)|0); + $10 = HEAP16[$9>>1]|0; + $11 = ($10&65535) >>> 8; + $12 = $11&255; + $13 = (($6) + ($$01819)|0); + HEAP8[$13>>0] = $12; + $14 = (($$01819) + 1)|0; + $exitcond = ($14|0)==($5|0); + if ($exitcond) { + break; + } else { + $$01819 = $14; + } + } + } + _free($0); + $$0 = $6; + return ($$0|0); +} +function _stbi__png_test($0) { + $0 = $0|0; + var $1 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = (_stbi__check_png_header($0)|0); + _stbi__rewind($0); + return ($1|0); +} +function _stbi__png_load($0,$1,$2,$3,$4,$5) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + $4 = $4|0; + $5 = $5|0; + var $6 = 0, $7 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $6 = sp; + HEAP32[$6>>2] = $0; + $7 = (_stbi__do_png($6,$1,$2,$3,$4,$5)|0); + STACKTOP = sp;return ($7|0); +} +function _stbi__hdr_to_ldr($0,$1,$2,$3) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + var $$0 = 0.0, $$052 = 0.0, $$054 = 0, $$055 = 0, $$056$lcssa = 0, $$05658 = 0, $$05759 = 0, $$1 = 0.0, $$153 = 0.0, $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0; + var $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0, $38 = 0, $39 = 0, $4 = 0; + var $40 = 0, $41 = 0, $42 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $exitcond61 = 0, $sext = 0, label = 0, sp = 0; + sp = STACKTOP; + $4 = ($0|0)==(0|0); + if ($4) { + $$054 = 0; + return ($$054|0); + } + $5 = (_stbi__malloc_mad3($1,$2,$3)|0); + $6 = ($5|0)==(0|0); + if ($6) { + _free($0); + _stbi__err(6585); + $$054 = 0; + return ($$054|0); + } + $7 = $3 & 1; + $sext = (($3) + -1)|0; + $$055 = (($sext) + ($7))|0; + $8 = Math_imul($2, $1)|0; + $9 = ($8|0)>(0); + if ($9) { + $10 = ($$055|0)>(0); + $11 = +HEAPF32[767]; + $12 = +HEAPF32[768]; + $13 = $12; + $$05759 = 0; + while(1) { + if ($10) { + $14 = Math_imul($$05759, $3)|0; + $$05658 = 0; + while(1) { + $15 = (($$05658) + ($14))|0; + $16 = (($0) + ($15<<2)|0); + $17 = +HEAPF32[$16>>2]; + $18 = $17 * $11; + $19 = $18; + $20 = (+Math_pow((+$19),(+$13))); + $21 = $20; + $22 = $21 * 255.0; + $23 = $22 + 0.5; + $24 = $23 < 0.0; + $$052 = $24 ? 0.0 : $23; + $25 = $$052 > 255.0; + $$153 = $25 ? 255.0 : $$052; + $26 = (~~(($$153))); + $27 = $26&255; + $28 = (($5) + ($15)|0); + HEAP8[$28>>0] = $27; + $29 = (($$05658) + 1)|0; + $exitcond = ($29|0)==($$055|0); + if ($exitcond) { + $$056$lcssa = $$055; + break; + } else { + $$05658 = $29; + } + } + } else { + $$056$lcssa = 0; + } + $30 = ($$056$lcssa|0)<($3|0); + if ($30) { + $31 = Math_imul($$05759, $3)|0; + $32 = (($$056$lcssa) + ($31))|0; + $33 = (($0) + ($32<<2)|0); + $34 = +HEAPF32[$33>>2]; + $35 = $34 * 255.0; + $36 = $35 + 0.5; + $37 = $36 < 0.0; + $$0 = $37 ? 0.0 : $36; + $38 = $$0 > 255.0; + $$1 = $38 ? 255.0 : $$0; + $39 = (~~(($$1))); + $40 = $39&255; + $41 = (($5) + ($32)|0); + HEAP8[$41>>0] = $40; + } + $42 = (($$05759) + 1)|0; + $exitcond61 = ($42|0)==($8|0); + if ($exitcond61) { + break; + } else { + $$05759 = $42; + } + } + } + _free($0); + $$054 = $5; + return ($$054|0); +} +function _stbi__malloc_mad3($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $$0 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; + sp = STACKTOP; + $3 = (_stbi__mad3sizes_valid($0,$1,$2)|0); + $4 = ($3|0)==(0); + if ($4) { + $$0 = 0; + return ($$0|0); + } + $5 = Math_imul($1, $0)|0; + $6 = Math_imul($5, $2)|0; + $7 = (_stbi__malloc($6)|0); + $$0 = $7; + return ($$0|0); +} +function _stbi__mad3sizes_valid($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $10 = 0, $11 = 0, $12 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $3 = (_stbi__mul2sizes_valid($0,$1)|0); + $4 = ($3|0)==(0); + if ($4) { + $12 = 0; + } else { + $5 = Math_imul($1, $0)|0; + $6 = (_stbi__mul2sizes_valid($5,$2)|0); + $7 = ($6|0)==(0); + if ($7) { + $12 = 0; + } else { + $8 = Math_imul($5, $2)|0; + $9 = (_stbi__addsizes_valid($8)|0); + $10 = ($9|0)!=(0); + $12 = $10; + } + } + $11 = $12&1; + return ($11|0); +} +function _stbi__do_png($0,$1,$2,$3,$4,$5) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + $4 = $4|0; + $5 = $5|0; + var $$ = 0, $$0 = 0, $$045 = 0, $$1 = 0, $$2 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; + var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $6 = 0, $7 = 0, $8 = 0; + var $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $6 = ($4>>>0)>(4); + if ($6) { + _stbi__err(6675); + $$045 = 0; + return ($$045|0); + } + $7 = (_stbi__parse_png_file($0,0,$4)|0); + $8 = ($7|0)==(0); + if ($8) { + $$2 = 0; + } else { + $9 = ((($0)) + 16|0); + $10 = HEAP32[$9>>2]|0; + $11 = ($10|0)>(8); + $$ = $11 ? $10 : 8; + HEAP32[$5>>2] = $$; + $12 = ((($0)) + 12|0); + $13 = HEAP32[$12>>2]|0; + HEAP32[$12>>2] = 0; + $14 = ($4|0)==(0); + if ($14) { + $$1 = $13; + } else { + $15 = HEAP32[$0>>2]|0; + $16 = ((($15)) + 12|0); + $17 = HEAP32[$16>>2]|0; + $18 = ($17|0)==($4|0); + if ($18) { + $$1 = $13; + } else { + $19 = HEAP32[$5>>2]|0; + $20 = ($19|0)==(8); + $21 = ((($15)) + 4|0); + $22 = HEAP32[$21>>2]|0; + $23 = HEAP32[$15>>2]|0; + if ($20) { + $24 = (_stbi__convert_format($13,$17,$4,$23,$22)|0); + $$0 = $24; + } else { + $25 = (_stbi__convert_format16($13,$17,$4,$23,$22)|0); + $$0 = $25; + } + $26 = HEAP32[$0>>2]|0; + $27 = ((($26)) + 12|0); + HEAP32[$27>>2] = $4; + $28 = ($$0|0)==(0|0); + if ($28) { + $$045 = 0; + return ($$045|0); + } else { + $$1 = $$0; + } + } + } + $29 = HEAP32[$0>>2]|0; + $30 = HEAP32[$29>>2]|0; + HEAP32[$1>>2] = $30; + $31 = ((($29)) + 4|0); + $32 = HEAP32[$31>>2]|0; + HEAP32[$2>>2] = $32; + $33 = ($3|0)==(0|0); + if ($33) { + $$2 = $$1; + } else { + $34 = ((($29)) + 8|0); + $35 = HEAP32[$34>>2]|0; + HEAP32[$3>>2] = $35; + $$2 = $$1; + } + } + $36 = ((($0)) + 12|0); + $37 = HEAP32[$36>>2]|0; + _free($37); + HEAP32[$36>>2] = 0; + $38 = ((($0)) + 8|0); + $39 = HEAP32[$38>>2]|0; + _free($39); + HEAP32[$38>>2] = 0; + $40 = ((($0)) + 4|0); + $41 = HEAP32[$40>>2]|0; + _free($41); + HEAP32[$40>>2] = 0; + $$045 = $$2; + return ($$045|0); +} +function _stbi__parse_png_file($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $$ = 0, $$$0217 = 0, $$0206 = 0, $$0211 = 0, $$0214 = 0, $$0217 = 0, $$0226593 = 0, $$0228 = 0, $$0231 = 0, $$0235 = 0, $$0239591 = 0, $$0241 = 0, $$0245 = 0, $$1207 = 0, $$1212 = 0, $$1215 = 0, $$1218 = 0, $$1227588 = 0, $$1229 = 0, $$1240589 = 0; + var $$1246 = 0, $$2219 = 0, $$2233 = 0, $$2237 = 0, $$2243 = 0, $$254 = 0, $$3209 = 0, $$3220 = 0, $$4 = 0, $$6$ph = 0, $$7 = 0, $$lobit = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0; + var $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0; + var $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0; + var $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0; + var $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0; + var $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0, $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0; + var $198 = 0, $199 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0, $211 = 0, $212 = 0, $213 = 0, $22 = 0, $23 = 0; + var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0; + var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0; + var $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0; + var $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0; + var $97 = 0, $98 = 0, $99 = 0, $notlhs = 0, $notrhs = 0, $or$cond = 0, $or$cond11 = 0, $or$cond248 = 0, $or$cond5$not = 0, $or$cond7 = 0, $switch$split112D = 0, $switch$split142D = 0, $switch$split2D = 0, $switch$split52D = 0, $switch$split82D = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 1056|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(1056|0); + $3 = sp + 32|0; + $4 = sp + 22|0; + $5 = sp + 16|0; + $6 = sp + 8|0; + $7 = sp; + $8 = HEAP32[$0>>2]|0; + $9 = ((($0)) + 8|0); + HEAP32[$9>>2] = 0; + $10 = ((($0)) + 4|0); + HEAP32[$10>>2] = 0; + $11 = ((($0)) + 12|0); + HEAP32[$11>>2] = 0; + $12 = (_stbi__check_png_header($8)|0); + $13 = ($12|0)==(0); + if ($13) { + $$7 = 0; + STACKTOP = sp;return ($$7|0); + } + $14 = ($1|0)==(1); + if ($14) { + $$7 = 1; + STACKTOP = sp;return ($$7|0); + } + $15 = ((($6)) + 4|0); + $16 = ((($8)) + 4|0); + $17 = ((($0)) + 16|0); + $18 = ((($8)) + 8|0); + $19 = ($1|0)==(2); + $20 = ((($8)) + 8|0); + $21 = ((($8)) + 8|0); + $22 = ((($0)) + 16|0); + $23 = ($1|0)==(2); + $24 = ($1|0)==(2); + $$0206 = 0;$$0211 = 0;$$0214 = 0;$$0217 = 0;$$0228 = 0;$$0231 = 0;$$0235 = 0;$$0241 = 1;$$0245 = 0; + L7: while(1) { + _stbi__get_chunk_header($6,$8); + $25 = HEAP32[$15>>2]|0; + $switch$split2D = ($25|0)<(1229472850); + L9: do { + if ($switch$split2D) { + $switch$split52D = ($25|0)<(1229209940); + if ($switch$split52D) { + switch ($25|0) { + case 1130840649: { + break; + } + default: { + label = 103; + break L9; + } + } + $26 = HEAP32[$6>>2]|0; + _stbi__skip($8,$26); + $$1212 = $$0211;$$1215 = $$0214;$$1229 = 1;$$1246 = $$0245;$$2233 = $$0231;$$2237 = $$0235;$$2243 = $$0241;$$3209 = $$0206;$$3220 = $$0217; + break; + } + $switch$split112D = ($25|0)<(1229278788); + if (!($switch$split112D)) { + switch ($25|0) { + case 1229278788: { + label = 85; + break L7; + break; + } + default: { + label = 103; + break L9; + } + } + } + switch ($25|0) { + case 1229209940: { + break; + } + default: { + label = 103; + break L9; + } + } + $130 = ($$0241|0)==(0); + if (!($130)) { + label = 70; + break L7; + } + $131 = ($$0206<<24>>24)==(0); + $132 = ($$0245|0)!=(0); + $or$cond = $132 | $131; + if (!($or$cond)) { + label = 72; + break L7; + } + if ($24) { + label = 74; + break L7; + } + $135 = HEAP32[$6>>2]|0; + $136 = (($135) + ($$0214))|0; + $137 = ($136|0)<($$0214|0); + if ($137) { + $$6$ph = 0; + break L7; + } + $138 = ($136>>>0)>($$0217>>>0); + if ($138) { + $139 = ($$0217|0)==(0); + $140 = ($135>>>0)>(4096); + $141 = $140 ? $135 : 4096; + $$$0217 = $139 ? $141 : $$0217; + $142 = HEAP32[$6>>2]|0; + $143 = (($142) + ($$0214))|0; + $$1218 = $$$0217; + while(1) { + $144 = ($143>>>0)>($$1218>>>0); + $145 = $$1218 << 1; + if ($144) { + $$1218 = $145; + } else { + break; + } + } + $146 = HEAP32[$10>>2]|0; + $147 = (_realloc($146,$$1218)|0); + $148 = ($147|0)==(0|0); + if ($148) { + label = 81; + break L7; + } + HEAP32[$10>>2] = $147; + $$2219 = $$1218; + } else { + $$2219 = $$0217; + } + $149 = HEAP32[$10>>2]|0; + $150 = (($149) + ($$0214)|0); + $151 = HEAP32[$6>>2]|0; + $152 = (_stbi__getn($8,$150,$151)|0); + $153 = ($152|0)==(0); + if ($153) { + label = 83; + break L7; + } + $154 = HEAP32[$6>>2]|0; + $155 = (($154) + ($$0214))|0; + $$1212 = $$0211;$$1215 = $155;$$1229 = $$0228;$$1246 = $$0245;$$2233 = $$0231;$$2237 = $$0235;$$2243 = $$0241;$$3209 = $$0206;$$3220 = $$2219; + } else { + $switch$split82D = ($25|0)<(1347179589); + if ($switch$split82D) { + switch ($25|0) { + case 1229472850: { + break; + } + default: { + label = 103; + break L9; + } + } + $27 = ($$0241|0)==(0); + if ($27) { + label = 7; + break L7; + } + $28 = HEAP32[$6>>2]|0; + $29 = ($28|0)==(13); + if (!($29)) { + label = 9; + break L7; + } + $30 = (_stbi__get32be($8)|0); + HEAP32[$8>>2] = $30; + $31 = ($30>>>0)>(16777216); + if ($31) { + label = 11; + break L7; + } + $32 = (_stbi__get32be($8)|0); + HEAP32[$16>>2] = $32; + $33 = ($32>>>0)>(16777216); + if ($33) { + label = 13; + break L7; + } + $34 = (_stbi__get8($8)|0); + $35 = $34&255; + HEAP32[$17>>2] = $35; + switch ($34<<24>>24) { + case 16: case 8: case 4: case 2: case 1: { + break; + } + default: { + label = 15; + break L7; + } + } + $36 = (_stbi__get8($8)|0); + $37 = $36&255; + $38 = ($36&255)>(6); + if ($38) { + label = 17; + break L7; + } + $39 = ($36<<24>>24)==(3); + if ($39) { + $40 = HEAP32[$17>>2]|0; + $41 = ($40|0)==(16); + if ($41) { + label = 20; + break L7; + } else { + $$1207 = 3; + } + } else { + $42 = $37 & 1; + $43 = ($42|0)==(0); + if ($43) { + $$1207 = $$0206; + } else { + label = 22; + break L7; + } + } + $44 = (_stbi__get8($8)|0); + $45 = ($44<<24>>24)==(0); + if (!($45)) { + label = 24; + break L7; + } + $46 = (_stbi__get8($8)|0); + $47 = ($46<<24>>24)==(0); + if (!($47)) { + label = 26; + break L7; + } + $48 = (_stbi__get8($8)|0); + $49 = $48&255; + $50 = ($48&255)>(1); + if ($50) { + label = 28; + break L7; + } + $51 = HEAP32[$8>>2]|0; + $52 = ($51|0)==(0); + if ($52) { + label = 31; + break L7; + } + $53 = HEAP32[$16>>2]|0; + $54 = ($53|0)==(0); + if ($54) { + label = 31; + break L7; + } + $55 = ($$1207<<24>>24)==(0); + $56 = (1073741824 / ($51>>>0))&-1; + if (!($55)) { + HEAP32[$20>>2] = 1; + $63 = $56 >>> 2; + $64 = ($63>>>0)<($53>>>0); + if ($64) { + label = 37; + break L7; + } else { + $$1212 = $$0211;$$1215 = $$0214;$$1229 = $$0228;$$1246 = $$0245;$$2233 = $37;$$2237 = $49;$$2243 = 0;$$3209 = $$1207;$$3220 = $$0217; + break; + } + } + $57 = $37 & 2; + $58 = $57 | 1; + $59 = $37 >>> 2; + $$lobit = $59 & 1; + $60 = (($58) + ($$lobit))|0; + HEAP32[$18>>2] = $60; + $61 = (($56>>>0) / ($60>>>0))&-1; + $62 = ($61>>>0)<($53>>>0); + if ($62) { + label = 34; + break L7; + } + if ($19) { + $$6$ph = 1; + break L7; + } else { + $$1212 = $$0211;$$1215 = $$0214;$$1229 = $$0228;$$1246 = $$0245;$$2233 = $37;$$2237 = $49;$$2243 = 0;$$3209 = 0;$$3220 = $$0217; + break; + } + } + $switch$split142D = ($25|0)<(1951551059); + if ($switch$split142D) { + switch ($25|0) { + case 1347179589: { + break; + } + default: { + label = 103; + break L9; + } + } + $65 = ($$0241|0)==(0); + if (!($65)) { + label = 39; + break L7; + } + $66 = HEAP32[$6>>2]|0; + $67 = ($66>>>0)>(768); + if ($67) { + label = 41; + break L7; + } + $68 = (($66>>>0) / 3)&-1; + $69 = ($68*3)|0; + $70 = ($69|0)==($66|0); + if (!($70)) { + label = 44; + break L7; + } + $71 = ($66>>>0)>(2); + if ($71) { + $$0226593 = 0; + } else { + $$1212 = $$0211;$$1215 = $$0214;$$1229 = $$0228;$$1246 = $68;$$2233 = $$0231;$$2237 = $$0235;$$2243 = 0;$$3209 = $$0206;$$3220 = $$0217; + break; + } + while(1) { + $72 = (_stbi__get8($8)|0); + $73 = $$0226593 << 2; + $74 = (($3) + ($73)|0); + HEAP8[$74>>0] = $72; + $75 = (_stbi__get8($8)|0); + $76 = $73 | 1; + $77 = (($3) + ($76)|0); + HEAP8[$77>>0] = $75; + $78 = (_stbi__get8($8)|0); + $79 = $73 | 2; + $80 = (($3) + ($79)|0); + HEAP8[$80>>0] = $78; + $81 = $73 | 3; + $82 = (($3) + ($81)|0); + HEAP8[$82>>0] = -1; + $83 = (($$0226593) + 1)|0; + $84 = ($83>>>0)<($68>>>0); + if ($84) { + $$0226593 = $83; + } else { + $$1212 = $$0211;$$1215 = $$0214;$$1229 = $$0228;$$1246 = $68;$$2233 = $$0231;$$2237 = $$0235;$$2243 = $$0241;$$3209 = $$0206;$$3220 = $$0217; + break L9; + } + } + } + switch ($25|0) { + case 1951551059: { + break; + } + default: { + label = 103; + break L9; + } + } + $85 = ($$0241|0)==(0); + if (!($85)) { + label = 47; + break L7; + } + $86 = HEAP32[$10>>2]|0; + $87 = ($86|0)==(0|0); + if (!($87)) { + label = 49; + break L7; + } + $88 = ($$0206<<24>>24)==(0); + if (!($88)) { + if ($23) { + label = 52; + break L7; + } + $90 = ($$0245|0)==(0); + if ($90) { + label = 54; + break L7; + } + $91 = HEAP32[$6>>2]|0; + $92 = ($91>>>0)>($$0245>>>0); + if ($92) { + label = 58; + break L7; + } + $93 = HEAP32[$6>>2]|0; + $94 = ($93|0)==(0); + if ($94) { + $$1212 = $$0211;$$1215 = $$0214;$$1229 = $$0228;$$1246 = $$0245;$$2233 = $$0231;$$2237 = $$0235;$$2243 = 0;$$3209 = 4;$$3220 = $$0217; + break; + } + $95 = HEAP32[$6>>2]|0; + $$1227588 = 0; + while(1) { + $96 = (_stbi__get8($8)|0); + $97 = $$1227588 << 2; + $98 = $97 | 3; + $99 = (($3) + ($98)|0); + HEAP8[$99>>0] = $96; + $100 = (($$1227588) + 1)|0; + $101 = ($100>>>0)<($95>>>0); + if ($101) { + $$1227588 = $100; + } else { + $$1212 = $$0211;$$1215 = $$0214;$$1229 = $$0228;$$1246 = $$0245;$$2233 = $$0231;$$2237 = $$0235;$$2243 = $$0241;$$3209 = 4;$$3220 = $$0217; + break L9; + } + } + } + $102 = HEAP32[$21>>2]|0; + $103 = $102 & 1; + $104 = ($103|0)==(0); + if ($104) { + label = 61; + break L7; + } + $105 = HEAP32[$6>>2]|0; + $106 = $102 << 1; + $107 = ($105|0)==($106|0); + if (!($107)) { + label = 63; + break L7; + } + $108 = HEAP32[$22>>2]|0; + $109 = ($108|0)==(16); + $110 = HEAP32[$21>>2]|0; + $111 = ($110|0)>(0); + if ($109) { + if ($111) { + $$0239591 = 0; + } else { + $$1212 = 1;$$1215 = $$0214;$$1229 = $$0228;$$1246 = $$0245;$$2233 = $$0231;$$2237 = $$0235;$$2243 = 0;$$3209 = 0;$$3220 = $$0217; + break; + } + while(1) { + $112 = (_stbi__get16be($8)|0); + $113 = $112&65535; + $114 = (($5) + ($$0239591<<1)|0); + HEAP16[$114>>1] = $113; + $115 = (($$0239591) + 1)|0; + $116 = HEAP32[$21>>2]|0; + $117 = ($115|0)<($116|0); + if ($117) { + $$0239591 = $115; + } else { + $$1212 = 1;$$1215 = $$0214;$$1229 = $$0228;$$1246 = $$0245;$$2233 = $$0231;$$2237 = $$0235;$$2243 = $$0241;$$3209 = $$0206;$$3220 = $$0217; + break; + } + } + } else { + if ($111) { + $$1240589 = 0; + } else { + $$1212 = 1;$$1215 = $$0214;$$1229 = $$0228;$$1246 = $$0245;$$2233 = $$0231;$$2237 = $$0235;$$2243 = 0;$$3209 = 0;$$3220 = $$0217; + break; + } + while(1) { + $118 = (_stbi__get16be($8)|0); + $119 = $118 & 255; + $120 = HEAP32[$22>>2]|0; + $121 = (6991 + ($120)|0); + $122 = HEAP8[$121>>0]|0; + $123 = $122&255; + $124 = Math_imul($123, $119)|0; + $125 = $124&255; + $126 = (($4) + ($$1240589)|0); + HEAP8[$126>>0] = $125; + $127 = (($$1240589) + 1)|0; + $128 = HEAP32[$21>>2]|0; + $129 = ($127|0)<($128|0); + if ($129) { + $$1240589 = $127; + } else { + $$1212 = 1;$$1215 = $$0214;$$1229 = $$0228;$$1246 = $$0245;$$2233 = $$0231;$$2237 = $$0235;$$2243 = $$0241;$$3209 = $$0206;$$3220 = $$0217; + break; + } + } + } + } + } while(0); + if ((label|0) == 103) { + label = 0; + $202 = ($$0241|0)==(0); + if (!($202)) { + label = 104; + break; + } + $203 = $25 & 536870912; + $204 = ($203|0)==(0); + if ($204) { + label = 106; + break; + } + $213 = HEAP32[$6>>2]|0; + _stbi__skip($8,$213); + $$1212 = $$0211;$$1215 = $$0214;$$1229 = $$0228;$$1246 = $$0245;$$2233 = $$0231;$$2237 = $$0235;$$2243 = 0;$$3209 = $$0206;$$3220 = $$0217; + } + (_stbi__get32be($8)|0); + $$0206 = $$3209;$$0211 = $$1212;$$0214 = $$1215;$$0217 = $$3220;$$0228 = $$1229;$$0231 = $$2233;$$0235 = $$2237;$$0241 = $$2243;$$0245 = $$1246; + } + switch (label|0) { + case 7: { + _stbi__err(6765); + $$6$ph = 0; + break; + } + case 9: { + _stbi__err(6779); + $$6$ph = 0; + break; + } + case 11: { + _stbi__err(6792); + $$6$ph = 0; + break; + } + case 13: { + _stbi__err(6792); + $$6$ph = 0; + break; + } + case 15: { + _stbi__err(6802); + $$6$ph = 0; + break; + } + case 17: { + _stbi__err(6822); + $$6$ph = 0; + break; + } + case 20: { + _stbi__err(6822); + $$6$ph = 0; + break; + } + case 22: { + _stbi__err(6822); + $$6$ph = 0; + break; + } + case 24: { + _stbi__err(6832); + $$6$ph = 0; + break; + } + case 26: { + _stbi__err(6848); + $$6$ph = 0; + break; + } + case 28: { + _stbi__err(6866); + $$6$ph = 0; + break; + } + case 31: { + _stbi__err(6887); + $$6$ph = 0; + break; + } + case 34: { + _stbi__err(6792); + $$6$ph = 0; + break; + } + case 37: { + _stbi__err(6792); + $$6$ph = 0; + break; + } + case 39: { + _stbi__err(6901); + $$6$ph = 0; + break; + } + case 41: { + _stbi__err(6916); + $$6$ph = 0; + break; + } + case 44: { + _stbi__err(6916); + $$6$ph = 0; + break; + } + case 47: { + _stbi__err(6901); + $$6$ph = 0; + break; + } + case 49: { + _stbi__err(6929); + $$6$ph = 0; + break; + } + case 52: { + $89 = ((($8)) + 8|0); + HEAP32[$89>>2] = 4; + $$6$ph = 1; + break; + } + case 54: { + _stbi__err(6945); + $$6$ph = 0; + break; + } + case 58: { + _stbi__err(6962); + $$6$ph = 0; + break; + } + case 61: { + _stbi__err(6975); + $$6$ph = 0; + break; + } + case 63: { + _stbi__err(6962); + $$6$ph = 0; + break; + } + case 70: { + _stbi__err(6901); + $$6$ph = 0; + break; + } + case 72: { + _stbi__err(7000); + $$6$ph = 0; + break; + } + case 74: { + $133 = $$0206&255; + $134 = ((($8)) + 8|0); + HEAP32[$134>>2] = $133; + $$6$ph = 1; + break; + } + case 81: { + _stbi__err(6585); + $$6$ph = 0; + break; + } + case 83: { + _stbi__err(7008); + $$6$ph = 0; + break; + } + case 85: { + $156 = ($$0241|0)==(0); + do { + if ($156) { + $157 = ($1|0)==(0); + if ($157) { + $158 = HEAP32[$10>>2]|0; + $159 = ($158|0)==(0|0); + if ($159) { + _stbi__err(7018); + $$4 = 0; + break; + } + $160 = HEAP32[$8>>2]|0; + $161 = ((($0)) + 16|0); + $162 = HEAP32[$161>>2]|0; + $163 = Math_imul($162, $160)|0; + $164 = (($163) + 7)|0; + $165 = $164 >>> 3; + $166 = ((($8)) + 4|0); + $167 = HEAP32[$166>>2]|0; + $168 = ((($8)) + 8|0); + $169 = HEAP32[$168>>2]|0; + $170 = Math_imul($169, $167)|0; + $171 = Math_imul($170, $165)|0; + $172 = (($171) + ($167))|0; + HEAP32[$7>>2] = $172; + $173 = ($$0228|0)!=(0); + $174 = $173 ^ 1; + $175 = $174&1; + $176 = (_stbi_zlib_decode_malloc_guesssize_headerflag($158,$$0214,$172,$7,$175)|0); + HEAP32[$9>>2] = $176; + $177 = ($176|0)==(0|0); + if ($177) { + $$4 = 0; + } else { + $178 = HEAP32[$10>>2]|0; + _free($178); + HEAP32[$10>>2] = 0; + $179 = HEAP32[$168>>2]|0; + $180 = (($179) + 1)|0; + $notlhs = ($180|0)!=($2|0); + $notrhs = ($2|0)==(3); + $or$cond5$not = $notrhs | $notlhs; + $181 = ($$0206<<24>>24)!=(0); + $or$cond7 = $181 | $or$cond5$not; + $182 = ($$0211<<24>>24)==(0); + $or$cond248 = $182 & $or$cond7; + $$254 = $or$cond248 ? $179 : $180; + $183 = ((($8)) + 12|0); + HEAP32[$183>>2] = $$254; + $184 = HEAP32[$9>>2]|0; + $185 = HEAP32[$7>>2]|0; + $186 = HEAP32[$161>>2]|0; + $187 = (_stbi__create_png_image($0,$184,$185,$$254,$186,$$0231,$$0235)|0); + $188 = ($187|0)==(0); + if ($188) { + $$4 = 0; + } else { + do { + if (!($182)) { + $189 = HEAP32[$161>>2]|0; + $190 = ($189|0)==(16); + if ($190) { + $191 = HEAP32[$183>>2]|0; + _stbi__compute_transparency16($0,$5,$191); + break; + } else { + $192 = HEAP32[$183>>2]|0; + _stbi__compute_transparency($0,$4,$192); + break; + } + } + } while(0); + $193 = HEAP32[5171]|0; + $194 = ($193|0)!=(0); + $or$cond11 = $173 & $194; + if ($or$cond11) { + $195 = HEAP32[$183>>2]|0; + $196 = ($195|0)>(2); + if ($196) { + _stbi__de_iphone($0); + } + } + if ($181) { + $197 = $$0206&255; + HEAP32[$168>>2] = $197; + $198 = ($2|0)>(2); + $$ = $198 ? $2 : $197; + HEAP32[$183>>2] = $$; + $199 = (_stbi__expand_png_palette($0,$3,$$)|0); + $200 = ($199|0)==(0); + if ($200) { + $$4 = 0; + break; + } + } + $201 = HEAP32[$9>>2]|0; + _free($201); + HEAP32[$9>>2] = 0; + $$4 = 1; + } + } + } else { + $$4 = 1; + } + } else { + _stbi__err(6901); + $$4 = 0; + } + } while(0); + $$6$ph = $$4; + break; + } + case 104: { + _stbi__err(6901); + $$6$ph = 0; + break; + } + case 106: { + $205 = $25 >>> 24; + $206 = $205&255; + HEAP8[7026] = $206; + $207 = HEAP32[$15>>2]|0; + $208 = $207 >>> 16; + $209 = $208&255; + HEAP8[(7027)>>0] = $209; + $210 = $207 >>> 8; + $211 = $210&255; + HEAP8[(7028)>>0] = $211; + $212 = $207&255; + HEAP8[(7029)>>0] = $212; + _stbi__err(7026); + $$6$ph = 0; + break; + } + } + $$7 = $$6$ph; + STACKTOP = sp;return ($$7|0); +} +function _stbi__convert_format($0,$1,$2,$3,$4) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + $4 = $4|0; + var $$0151255 = 0, $$0163 = 0, $$0164259 = 0, $$0165 = 0, $$0165254 = 0, $$0165257 = 0, $$0256 = 0, $$10161205 = 0, $$10175 = 0, $$10175204 = 0, $$10175207 = 0, $$10206 = 0, $$11162201 = 0, $$11176 = 0, $$11176200 = 0, $$11176203 = 0, $$11202 = 0, $$1152250 = 0, $$1166 = 0, $$1166249 = 0; + var $$1166252 = 0, $$1251 = 0, $$2153245 = 0, $$2167 = 0, $$2167244 = 0, $$2167247 = 0, $$2246 = 0, $$3154240 = 0, $$3168 = 0, $$3168239 = 0, $$3168242 = 0, $$3241 = 0, $$4155235 = 0, $$4169 = 0, $$4169234 = 0, $$4169237 = 0, $$4236 = 0, $$5156230 = 0, $$5170 = 0, $$5170229 = 0; + var $$5170232 = 0, $$5231 = 0, $$6157225 = 0, $$6171 = 0, $$6171224 = 0, $$6171227 = 0, $$6226 = 0, $$7158220 = 0, $$7172 = 0, $$7172219 = 0, $$7172222 = 0, $$7221 = 0, $$8159215 = 0, $$8173 = 0, $$8173214 = 0, $$8173217 = 0, $$8216 = 0, $$9160210 = 0, $$9174 = 0, $$9174209 = 0; + var $$9174212 = 0, $$9211 = 0, $$off = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0; + var $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0; + var $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; + var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; + var $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0; + var $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0; + var $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, label = 0; + var sp = 0; + sp = STACKTOP; + $5 = ($2|0)==($1|0); + if ($5) { + $$0163 = $0; + return ($$0163|0); + } + $$off = (($2) + -1)|0; + $6 = ($$off>>>0)<(4); + if (!($6)) { + ___assert_fail((6688|0),(6620|0),1477,(6744|0)); + // unreachable; + } + $7 = (_stbi__malloc_mad3($2,$3,$4)|0); + $8 = ($7|0)==(0|0); + if ($8) { + _free($0); + _stbi__err(6585); + $$0163 = 0; + return ($$0163|0); + } + $9 = ($4|0)>(0); + L11: do { + if ($9) { + $10 = $1 << 3; + $11 = (($10) + ($2))|0; + $$0165254 = (($3) + -1)|0; + $12 = ($$0165254|0)>(-1); + $$1166249 = (($3) + -1)|0; + $13 = ($$1166249|0)>(-1); + $$2167244 = (($3) + -1)|0; + $14 = ($$2167244|0)>(-1); + $$3168239 = (($3) + -1)|0; + $15 = ($$3168239|0)>(-1); + $$4169234 = (($3) + -1)|0; + $16 = ($$4169234|0)>(-1); + $$5170229 = (($3) + -1)|0; + $17 = ($$5170229|0)>(-1); + $$6171224 = (($3) + -1)|0; + $18 = ($$6171224|0)>(-1); + $$7172219 = (($3) + -1)|0; + $19 = ($$7172219|0)>(-1); + $$8173214 = (($3) + -1)|0; + $20 = ($$8173214|0)>(-1); + $$9174209 = (($3) + -1)|0; + $21 = ($$9174209|0)>(-1); + $$10175204 = (($3) + -1)|0; + $22 = ($$10175204|0)>(-1); + $$11176200 = (($3) + -1)|0; + $23 = ($$11176200|0)>(-1); + $$0164259 = 0; + L13: while(1) { + $24 = Math_imul($$0164259, $3)|0; + $25 = Math_imul($24, $1)|0; + $26 = (($0) + ($25)|0); + $27 = Math_imul($24, $2)|0; + $28 = (($7) + ($27)|0); + do { + switch ($11|0) { + case 10: { + if ($12) { + $$0151255 = $26;$$0165257 = $$0165254;$$0256 = $28; + while(1) { + $29 = HEAP8[$$0151255>>0]|0; + HEAP8[$$0256>>0] = $29; + $30 = ((($$0256)) + 1|0); + HEAP8[$30>>0] = -1; + $31 = ((($$0151255)) + 1|0); + $32 = ((($$0256)) + 2|0); + $$0165 = (($$0165257) + -1)|0; + $33 = ($$0165|0)>(-1); + if ($33) { + $$0151255 = $31;$$0165257 = $$0165;$$0256 = $32; + } else { + break; + } + } + } + break; + } + case 11: { + if ($13) { + $$1152250 = $26;$$1166252 = $$1166249;$$1251 = $28; + while(1) { + $34 = HEAP8[$$1152250>>0]|0; + $35 = ((($$1251)) + 2|0); + HEAP8[$35>>0] = $34; + $36 = ((($$1251)) + 1|0); + HEAP8[$36>>0] = $34; + HEAP8[$$1251>>0] = $34; + $37 = ((($$1152250)) + 1|0); + $38 = ((($$1251)) + 3|0); + $$1166 = (($$1166252) + -1)|0; + $39 = ($$1166|0)>(-1); + if ($39) { + $$1152250 = $37;$$1166252 = $$1166;$$1251 = $38; + } else { + break; + } + } + } + break; + } + case 12: { + if ($14) { + $$2153245 = $26;$$2167247 = $$2167244;$$2246 = $28; + while(1) { + $40 = HEAP8[$$2153245>>0]|0; + $41 = ((($$2246)) + 2|0); + HEAP8[$41>>0] = $40; + $42 = ((($$2246)) + 1|0); + HEAP8[$42>>0] = $40; + HEAP8[$$2246>>0] = $40; + $43 = ((($$2246)) + 3|0); + HEAP8[$43>>0] = -1; + $44 = ((($$2153245)) + 1|0); + $45 = ((($$2246)) + 4|0); + $$2167 = (($$2167247) + -1)|0; + $46 = ($$2167|0)>(-1); + if ($46) { + $$2153245 = $44;$$2167247 = $$2167;$$2246 = $45; + } else { + break; + } + } + } + break; + } + case 17: { + if ($15) { + $$3154240 = $26;$$3168242 = $$3168239;$$3241 = $28; + while(1) { + $47 = HEAP8[$$3154240>>0]|0; + HEAP8[$$3241>>0] = $47; + $48 = ((($$3154240)) + 2|0); + $49 = ((($$3241)) + 1|0); + $$3168 = (($$3168242) + -1)|0; + $50 = ($$3168|0)>(-1); + if ($50) { + $$3154240 = $48;$$3168242 = $$3168;$$3241 = $49; + } else { + break; + } + } + } + break; + } + case 19: { + if ($16) { + $$4155235 = $26;$$4169237 = $$4169234;$$4236 = $28; + while(1) { + $51 = HEAP8[$$4155235>>0]|0; + $52 = ((($$4236)) + 2|0); + HEAP8[$52>>0] = $51; + $53 = ((($$4236)) + 1|0); + HEAP8[$53>>0] = $51; + HEAP8[$$4236>>0] = $51; + $54 = ((($$4155235)) + 2|0); + $55 = ((($$4236)) + 3|0); + $$4169 = (($$4169237) + -1)|0; + $56 = ($$4169|0)>(-1); + if ($56) { + $$4155235 = $54;$$4169237 = $$4169;$$4236 = $55; + } else { + break; + } + } + } + break; + } + case 20: { + if ($17) { + $$5156230 = $26;$$5170232 = $$5170229;$$5231 = $28; + while(1) { + $57 = HEAP8[$$5156230>>0]|0; + $58 = ((($$5231)) + 2|0); + HEAP8[$58>>0] = $57; + $59 = ((($$5231)) + 1|0); + HEAP8[$59>>0] = $57; + HEAP8[$$5231>>0] = $57; + $60 = ((($$5156230)) + 1|0); + $61 = HEAP8[$60>>0]|0; + $62 = ((($$5231)) + 3|0); + HEAP8[$62>>0] = $61; + $63 = ((($$5156230)) + 2|0); + $64 = ((($$5231)) + 4|0); + $$5170 = (($$5170232) + -1)|0; + $65 = ($$5170|0)>(-1); + if ($65) { + $$5156230 = $63;$$5170232 = $$5170;$$5231 = $64; + } else { + break; + } + } + } + break; + } + case 28: { + if ($18) { + $$6157225 = $26;$$6171227 = $$6171224;$$6226 = $28; + while(1) { + $66 = HEAP8[$$6157225>>0]|0; + HEAP8[$$6226>>0] = $66; + $67 = ((($$6157225)) + 1|0); + $68 = HEAP8[$67>>0]|0; + $69 = ((($$6226)) + 1|0); + HEAP8[$69>>0] = $68; + $70 = ((($$6157225)) + 2|0); + $71 = HEAP8[$70>>0]|0; + $72 = ((($$6226)) + 2|0); + HEAP8[$72>>0] = $71; + $73 = ((($$6226)) + 3|0); + HEAP8[$73>>0] = -1; + $74 = ((($$6157225)) + 3|0); + $75 = ((($$6226)) + 4|0); + $$6171 = (($$6171227) + -1)|0; + $76 = ($$6171|0)>(-1); + if ($76) { + $$6157225 = $74;$$6171227 = $$6171;$$6226 = $75; + } else { + break; + } + } + } + break; + } + case 25: { + if ($19) { + $$7158220 = $26;$$7172222 = $$7172219;$$7221 = $28; + while(1) { + $77 = HEAP8[$$7158220>>0]|0; + $78 = $77&255; + $79 = ((($$7158220)) + 1|0); + $80 = HEAP8[$79>>0]|0; + $81 = $80&255; + $82 = ((($$7158220)) + 2|0); + $83 = HEAP8[$82>>0]|0; + $84 = $83&255; + $85 = (_stbi__compute_y($78,$81,$84)|0); + HEAP8[$$7221>>0] = $85; + $86 = ((($$7158220)) + 3|0); + $87 = ((($$7221)) + 1|0); + $$7172 = (($$7172222) + -1)|0; + $88 = ($$7172|0)>(-1); + if ($88) { + $$7158220 = $86;$$7172222 = $$7172;$$7221 = $87; + } else { + break; + } + } + } + break; + } + case 26: { + if ($20) { + $$8159215 = $26;$$8173217 = $$8173214;$$8216 = $28; + while(1) { + $89 = HEAP8[$$8159215>>0]|0; + $90 = $89&255; + $91 = ((($$8159215)) + 1|0); + $92 = HEAP8[$91>>0]|0; + $93 = $92&255; + $94 = ((($$8159215)) + 2|0); + $95 = HEAP8[$94>>0]|0; + $96 = $95&255; + $97 = (_stbi__compute_y($90,$93,$96)|0); + HEAP8[$$8216>>0] = $97; + $98 = ((($$8216)) + 1|0); + HEAP8[$98>>0] = -1; + $99 = ((($$8159215)) + 3|0); + $100 = ((($$8216)) + 2|0); + $$8173 = (($$8173217) + -1)|0; + $101 = ($$8173|0)>(-1); + if ($101) { + $$8159215 = $99;$$8173217 = $$8173;$$8216 = $100; + } else { + break; + } + } + } + break; + } + case 33: { + if ($21) { + $$9160210 = $26;$$9174212 = $$9174209;$$9211 = $28; + while(1) { + $102 = HEAP8[$$9160210>>0]|0; + $103 = $102&255; + $104 = ((($$9160210)) + 1|0); + $105 = HEAP8[$104>>0]|0; + $106 = $105&255; + $107 = ((($$9160210)) + 2|0); + $108 = HEAP8[$107>>0]|0; + $109 = $108&255; + $110 = (_stbi__compute_y($103,$106,$109)|0); + HEAP8[$$9211>>0] = $110; + $111 = ((($$9160210)) + 4|0); + $112 = ((($$9211)) + 1|0); + $$9174 = (($$9174212) + -1)|0; + $113 = ($$9174|0)>(-1); + if ($113) { + $$9160210 = $111;$$9174212 = $$9174;$$9211 = $112; + } else { + break; + } + } + } + break; + } + case 34: { + if ($22) { + $$10161205 = $26;$$10175207 = $$10175204;$$10206 = $28; + while(1) { + $114 = HEAP8[$$10161205>>0]|0; + $115 = $114&255; + $116 = ((($$10161205)) + 1|0); + $117 = HEAP8[$116>>0]|0; + $118 = $117&255; + $119 = ((($$10161205)) + 2|0); + $120 = HEAP8[$119>>0]|0; + $121 = $120&255; + $122 = (_stbi__compute_y($115,$118,$121)|0); + HEAP8[$$10206>>0] = $122; + $123 = ((($$10161205)) + 3|0); + $124 = HEAP8[$123>>0]|0; + $125 = ((($$10206)) + 1|0); + HEAP8[$125>>0] = $124; + $126 = ((($$10161205)) + 4|0); + $127 = ((($$10206)) + 2|0); + $$10175 = (($$10175207) + -1)|0; + $128 = ($$10175|0)>(-1); + if ($128) { + $$10161205 = $126;$$10175207 = $$10175;$$10206 = $127; + } else { + break; + } + } + } + break; + } + case 35: { + if ($23) { + $$11162201 = $26;$$11176203 = $$11176200;$$11202 = $28; + while(1) { + $129 = HEAP8[$$11162201>>0]|0; + HEAP8[$$11202>>0] = $129; + $130 = ((($$11162201)) + 1|0); + $131 = HEAP8[$130>>0]|0; + $132 = ((($$11202)) + 1|0); + HEAP8[$132>>0] = $131; + $133 = ((($$11162201)) + 2|0); + $134 = HEAP8[$133>>0]|0; + $135 = ((($$11202)) + 2|0); + HEAP8[$135>>0] = $134; + $136 = ((($$11162201)) + 4|0); + $137 = ((($$11202)) + 3|0); + $$11176 = (($$11176203) + -1)|0; + $138 = ($$11176|0)>(-1); + if ($138) { + $$11162201 = $136;$$11176203 = $$11176;$$11202 = $137; + } else { + break; + } + } + } + break; + } + default: { + break L13; + } + } + } while(0); + $139 = (($$0164259) + 1)|0; + $140 = ($139|0)<($4|0); + if ($140) { + $$0164259 = $139; + } else { + break L11; + } + } + ___assert_fail((6742|0),(6620|0),1506,(6744|0)); + // unreachable; + } + } while(0); + _free($0); + $$0163 = $7; + return ($$0163|0); +} +function _stbi__convert_format16($0,$1,$2,$3,$4) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + $4 = $4|0; + var $$0151255 = 0, $$0163 = 0, $$0164259 = 0, $$0165 = 0, $$0165254 = 0, $$0165257 = 0, $$0256 = 0, $$10161205 = 0, $$10175 = 0, $$10175204 = 0, $$10175207 = 0, $$10206 = 0, $$11162201 = 0, $$11176 = 0, $$11176200 = 0, $$11176203 = 0, $$11202 = 0, $$1152250 = 0, $$1166 = 0, $$1166249 = 0; + var $$1166252 = 0, $$1251 = 0, $$2153245 = 0, $$2167 = 0, $$2167244 = 0, $$2167247 = 0, $$2246 = 0, $$3154240 = 0, $$3168 = 0, $$3168239 = 0, $$3168242 = 0, $$3241 = 0, $$4155235 = 0, $$4169 = 0, $$4169234 = 0, $$4169237 = 0, $$4236 = 0, $$5156230 = 0, $$5170 = 0, $$5170229 = 0; + var $$5170232 = 0, $$5231 = 0, $$6157225 = 0, $$6171 = 0, $$6171224 = 0, $$6171227 = 0, $$6226 = 0, $$7158220 = 0, $$7172 = 0, $$7172219 = 0, $$7172222 = 0, $$7221 = 0, $$8159215 = 0, $$8173 = 0, $$8173214 = 0, $$8173217 = 0, $$8216 = 0, $$9160210 = 0, $$9174 = 0, $$9174209 = 0; + var $$9174212 = 0, $$9211 = 0, $$off = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0; + var $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0; + var $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0; + var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0; + var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0; + var $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0; + var $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0; + var $98 = 0, $99 = 0, label = 0, sp = 0; + sp = STACKTOP; + $5 = ($2|0)==($1|0); + if ($5) { + $$0163 = $0; + return ($$0163|0); + } + $$off = (($2) + -1)|0; + $6 = ($$off>>>0)<(4); + if (!($6)) { + ___assert_fail((6688|0),(6620|0),1526,(6719|0)); + // unreachable; + } + $7 = $2 << 1; + $8 = Math_imul($7, $3)|0; + $9 = Math_imul($8, $4)|0; + $10 = (_stbi__malloc($9)|0); + $11 = ($10|0)==(0|0); + if ($11) { + _free($0); + _stbi__err(6585); + $$0163 = 0; + return ($$0163|0); + } + $12 = ($4|0)>(0); + L11: do { + if ($12) { + $13 = $1 << 3; + $14 = (($13) + ($2))|0; + $$0165254 = (($3) + -1)|0; + $15 = ($$0165254|0)>(-1); + $$1166249 = (($3) + -1)|0; + $16 = ($$1166249|0)>(-1); + $$2167244 = (($3) + -1)|0; + $17 = ($$2167244|0)>(-1); + $$3168239 = (($3) + -1)|0; + $18 = ($$3168239|0)>(-1); + $$4169234 = (($3) + -1)|0; + $19 = ($$4169234|0)>(-1); + $$5170229 = (($3) + -1)|0; + $20 = ($$5170229|0)>(-1); + $$6171224 = (($3) + -1)|0; + $21 = ($$6171224|0)>(-1); + $$7172219 = (($3) + -1)|0; + $22 = ($$7172219|0)>(-1); + $$8173214 = (($3) + -1)|0; + $23 = ($$8173214|0)>(-1); + $$9174209 = (($3) + -1)|0; + $24 = ($$9174209|0)>(-1); + $$10175204 = (($3) + -1)|0; + $25 = ($$10175204|0)>(-1); + $$11176200 = (($3) + -1)|0; + $26 = ($$11176200|0)>(-1); + $$0164259 = 0; + L13: while(1) { + $27 = Math_imul($$0164259, $3)|0; + $28 = Math_imul($27, $1)|0; + $29 = (($0) + ($28<<1)|0); + $30 = Math_imul($27, $2)|0; + $31 = (($10) + ($30<<1)|0); + do { + switch ($14|0) { + case 10: { + if ($15) { + $$0151255 = $29;$$0165257 = $$0165254;$$0256 = $31; + while(1) { + $32 = HEAP16[$$0151255>>1]|0; + HEAP16[$$0256>>1] = $32; + $33 = ((($$0256)) + 2|0); + HEAP16[$33>>1] = -1; + $34 = ((($$0151255)) + 2|0); + $35 = ((($$0256)) + 4|0); + $$0165 = (($$0165257) + -1)|0; + $36 = ($$0165|0)>(-1); + if ($36) { + $$0151255 = $34;$$0165257 = $$0165;$$0256 = $35; + } else { + break; + } + } + } + break; + } + case 11: { + if ($16) { + $$1152250 = $29;$$1166252 = $$1166249;$$1251 = $31; + while(1) { + $37 = HEAP16[$$1152250>>1]|0; + $38 = ((($$1251)) + 4|0); + HEAP16[$38>>1] = $37; + $39 = ((($$1251)) + 2|0); + HEAP16[$39>>1] = $37; + HEAP16[$$1251>>1] = $37; + $40 = ((($$1152250)) + 2|0); + $41 = ((($$1251)) + 6|0); + $$1166 = (($$1166252) + -1)|0; + $42 = ($$1166|0)>(-1); + if ($42) { + $$1152250 = $40;$$1166252 = $$1166;$$1251 = $41; + } else { + break; + } + } + } + break; + } + case 12: { + if ($17) { + $$2153245 = $29;$$2167247 = $$2167244;$$2246 = $31; + while(1) { + $43 = HEAP16[$$2153245>>1]|0; + $44 = ((($$2246)) + 4|0); + HEAP16[$44>>1] = $43; + $45 = ((($$2246)) + 2|0); + HEAP16[$45>>1] = $43; + HEAP16[$$2246>>1] = $43; + $46 = ((($$2246)) + 6|0); + HEAP16[$46>>1] = -1; + $47 = ((($$2153245)) + 2|0); + $48 = ((($$2246)) + 8|0); + $$2167 = (($$2167247) + -1)|0; + $49 = ($$2167|0)>(-1); + if ($49) { + $$2153245 = $47;$$2167247 = $$2167;$$2246 = $48; + } else { + break; + } + } + } + break; + } + case 17: { + if ($18) { + $$3154240 = $29;$$3168242 = $$3168239;$$3241 = $31; + while(1) { + $50 = HEAP16[$$3154240>>1]|0; + HEAP16[$$3241>>1] = $50; + $51 = ((($$3154240)) + 4|0); + $52 = ((($$3241)) + 2|0); + $$3168 = (($$3168242) + -1)|0; + $53 = ($$3168|0)>(-1); + if ($53) { + $$3154240 = $51;$$3168242 = $$3168;$$3241 = $52; + } else { + break; + } + } + } + break; + } + case 19: { + if ($19) { + $$4155235 = $29;$$4169237 = $$4169234;$$4236 = $31; + while(1) { + $54 = HEAP16[$$4155235>>1]|0; + $55 = ((($$4236)) + 4|0); + HEAP16[$55>>1] = $54; + $56 = ((($$4236)) + 2|0); + HEAP16[$56>>1] = $54; + HEAP16[$$4236>>1] = $54; + $57 = ((($$4155235)) + 4|0); + $58 = ((($$4236)) + 6|0); + $$4169 = (($$4169237) + -1)|0; + $59 = ($$4169|0)>(-1); + if ($59) { + $$4155235 = $57;$$4169237 = $$4169;$$4236 = $58; + } else { + break; + } + } + } + break; + } + case 20: { + if ($20) { + $$5156230 = $29;$$5170232 = $$5170229;$$5231 = $31; + while(1) { + $60 = HEAP16[$$5156230>>1]|0; + $61 = ((($$5231)) + 4|0); + HEAP16[$61>>1] = $60; + $62 = ((($$5231)) + 2|0); + HEAP16[$62>>1] = $60; + HEAP16[$$5231>>1] = $60; + $63 = ((($$5156230)) + 2|0); + $64 = HEAP16[$63>>1]|0; + $65 = ((($$5231)) + 6|0); + HEAP16[$65>>1] = $64; + $66 = ((($$5156230)) + 4|0); + $67 = ((($$5231)) + 8|0); + $$5170 = (($$5170232) + -1)|0; + $68 = ($$5170|0)>(-1); + if ($68) { + $$5156230 = $66;$$5170232 = $$5170;$$5231 = $67; + } else { + break; + } + } + } + break; + } + case 28: { + if ($21) { + $$6157225 = $29;$$6171227 = $$6171224;$$6226 = $31; + while(1) { + $69 = HEAP16[$$6157225>>1]|0; + HEAP16[$$6226>>1] = $69; + $70 = ((($$6157225)) + 2|0); + $71 = HEAP16[$70>>1]|0; + $72 = ((($$6226)) + 2|0); + HEAP16[$72>>1] = $71; + $73 = ((($$6157225)) + 4|0); + $74 = HEAP16[$73>>1]|0; + $75 = ((($$6226)) + 4|0); + HEAP16[$75>>1] = $74; + $76 = ((($$6226)) + 6|0); + HEAP16[$76>>1] = -1; + $77 = ((($$6157225)) + 6|0); + $78 = ((($$6226)) + 8|0); + $$6171 = (($$6171227) + -1)|0; + $79 = ($$6171|0)>(-1); + if ($79) { + $$6157225 = $77;$$6171227 = $$6171;$$6226 = $78; + } else { + break; + } + } + } + break; + } + case 25: { + if ($22) { + $$7158220 = $29;$$7172222 = $$7172219;$$7221 = $31; + while(1) { + $80 = HEAP16[$$7158220>>1]|0; + $81 = $80&65535; + $82 = ((($$7158220)) + 2|0); + $83 = HEAP16[$82>>1]|0; + $84 = $83&65535; + $85 = ((($$7158220)) + 4|0); + $86 = HEAP16[$85>>1]|0; + $87 = $86&65535; + $88 = (_stbi__compute_y_16($81,$84,$87)|0); + HEAP16[$$7221>>1] = $88; + $89 = ((($$7158220)) + 6|0); + $90 = ((($$7221)) + 2|0); + $$7172 = (($$7172222) + -1)|0; + $91 = ($$7172|0)>(-1); + if ($91) { + $$7158220 = $89;$$7172222 = $$7172;$$7221 = $90; + } else { + break; + } + } + } + break; + } + case 26: { + if ($23) { + $$8159215 = $29;$$8173217 = $$8173214;$$8216 = $31; + while(1) { + $92 = HEAP16[$$8159215>>1]|0; + $93 = $92&65535; + $94 = ((($$8159215)) + 2|0); + $95 = HEAP16[$94>>1]|0; + $96 = $95&65535; + $97 = ((($$8159215)) + 4|0); + $98 = HEAP16[$97>>1]|0; + $99 = $98&65535; + $100 = (_stbi__compute_y_16($93,$96,$99)|0); + HEAP16[$$8216>>1] = $100; + $101 = ((($$8216)) + 2|0); + HEAP16[$101>>1] = -1; + $102 = ((($$8159215)) + 6|0); + $103 = ((($$8216)) + 4|0); + $$8173 = (($$8173217) + -1)|0; + $104 = ($$8173|0)>(-1); + if ($104) { + $$8159215 = $102;$$8173217 = $$8173;$$8216 = $103; + } else { + break; + } + } + } + break; + } + case 33: { + if ($24) { + $$9160210 = $29;$$9174212 = $$9174209;$$9211 = $31; + while(1) { + $105 = HEAP16[$$9160210>>1]|0; + $106 = $105&65535; + $107 = ((($$9160210)) + 2|0); + $108 = HEAP16[$107>>1]|0; + $109 = $108&65535; + $110 = ((($$9160210)) + 4|0); + $111 = HEAP16[$110>>1]|0; + $112 = $111&65535; + $113 = (_stbi__compute_y_16($106,$109,$112)|0); + HEAP16[$$9211>>1] = $113; + $114 = ((($$9160210)) + 8|0); + $115 = ((($$9211)) + 2|0); + $$9174 = (($$9174212) + -1)|0; + $116 = ($$9174|0)>(-1); + if ($116) { + $$9160210 = $114;$$9174212 = $$9174;$$9211 = $115; + } else { + break; + } + } + } + break; + } + case 34: { + if ($25) { + $$10161205 = $29;$$10175207 = $$10175204;$$10206 = $31; + while(1) { + $117 = HEAP16[$$10161205>>1]|0; + $118 = $117&65535; + $119 = ((($$10161205)) + 2|0); + $120 = HEAP16[$119>>1]|0; + $121 = $120&65535; + $122 = ((($$10161205)) + 4|0); + $123 = HEAP16[$122>>1]|0; + $124 = $123&65535; + $125 = (_stbi__compute_y_16($118,$121,$124)|0); + HEAP16[$$10206>>1] = $125; + $126 = ((($$10161205)) + 6|0); + $127 = HEAP16[$126>>1]|0; + $128 = ((($$10206)) + 2|0); + HEAP16[$128>>1] = $127; + $129 = ((($$10161205)) + 8|0); + $130 = ((($$10206)) + 4|0); + $$10175 = (($$10175207) + -1)|0; + $131 = ($$10175|0)>(-1); + if ($131) { + $$10161205 = $129;$$10175207 = $$10175;$$10206 = $130; + } else { + break; + } + } + } + break; + } + case 35: { + if ($26) { + $$11162201 = $29;$$11176203 = $$11176200;$$11202 = $31; + while(1) { + $132 = HEAP16[$$11162201>>1]|0; + HEAP16[$$11202>>1] = $132; + $133 = ((($$11162201)) + 2|0); + $134 = HEAP16[$133>>1]|0; + $135 = ((($$11202)) + 2|0); + HEAP16[$135>>1] = $134; + $136 = ((($$11162201)) + 4|0); + $137 = HEAP16[$136>>1]|0; + $138 = ((($$11202)) + 4|0); + HEAP16[$138>>1] = $137; + $139 = ((($$11162201)) + 8|0); + $140 = ((($$11202)) + 6|0); + $$11176 = (($$11176203) + -1)|0; + $141 = ($$11176|0)>(-1); + if ($141) { + $$11162201 = $139;$$11176203 = $$11176;$$11202 = $140; + } else { + break; + } + } + } + break; + } + default: { + break L13; + } + } + } while(0); + $142 = (($$0164259) + 1)|0; + $143 = ($142|0)<($4|0); + if ($143) { + $$0164259 = $142; + } else { + break L11; + } + } + ___assert_fail((6742|0),(6620|0),1555,(6719|0)); + // unreachable; + } + } while(0); + _free($0); + $$0163 = $10; + return ($$0163|0); +} +function _stbi__compute_y_16($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $3 = ($0*77)|0; + $4 = ($1*150)|0; + $5 = (($4) + ($3))|0; + $6 = ($2*29)|0; + $7 = (($5) + ($6))|0; + $8 = $7 >>> 8; + $9 = $8&65535; + return ($9|0); +} +function _stbi__compute_y($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $3 = ($0*77)|0; + $4 = ($1*150)|0; + $5 = (($4) + ($3))|0; + $6 = ($2*29)|0; + $7 = (($5) + ($6))|0; + $8 = $7 >>> 8; + $9 = $8&255; + return ($9|0); +} +function _stbi__check_png_header($0) { + $0 = $0|0; + var $$05 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = (_stbi__get8($0)|0); + $2 = ($1<<24>>24)==(-119); + if ($2) { + $3 = (_stbi__get8($0)|0); + $4 = ($3<<24>>24)==(80); + if ($4) { + $5 = (_stbi__get8($0)|0); + $6 = ($5<<24>>24)==(78); + if ($6) { + $7 = (_stbi__get8($0)|0); + $8 = ($7<<24>>24)==(71); + if ($8) { + $9 = (_stbi__get8($0)|0); + $10 = ($9<<24>>24)==(13); + if ($10) { + $11 = (_stbi__get8($0)|0); + $12 = ($11<<24>>24)==(10); + if ($12) { + $13 = (_stbi__get8($0)|0); + $14 = ($13<<24>>24)==(26); + if ($14) { + $15 = (_stbi__get8($0)|0); + $16 = ($15<<24>>24)==(10); + if ($16) { + $$05 = 1; + return ($$05|0); + } + } + } + } + } + } + } + } + _stbi__err(8022); + $$05 = 0; + return ($$05|0); +} +function _stbi__get_chunk_header($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $$sroa$4$0$$sroa_idx2 = 0, $2 = 0, $3 = 0, label = 0, sp = 0; + sp = STACKTOP; + $2 = (_stbi__get32be($1)|0); + $3 = (_stbi__get32be($1)|0); + HEAP32[$0>>2] = $2; + $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); + HEAP32[$$sroa$4$0$$sroa_idx2>>2] = $3; + return; +} +function _stbi__skip($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0; + var $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $2 = ($1|0)<(0); + if ($2) { + $3 = ((($0)) + 172|0); + $4 = HEAP32[$3>>2]|0; + $5 = ((($0)) + 168|0); + HEAP32[$5>>2] = $4; + return; + } + $6 = ((($0)) + 16|0); + $7 = HEAP32[$6>>2]|0; + $8 = ($7|0)==(0|0); + if (!($8)) { + $9 = ((($0)) + 172|0); + $10 = HEAP32[$9>>2]|0; + $11 = ((($0)) + 168|0); + $12 = HEAP32[$11>>2]|0; + $13 = $10; + $14 = (($13) - ($12))|0; + $15 = ($14|0)<($1|0); + if ($15) { + HEAP32[$11>>2] = $10; + $16 = ((($0)) + 20|0); + $17 = HEAP32[$16>>2]|0; + $18 = ((($0)) + 28|0); + $19 = HEAP32[$18>>2]|0; + $20 = (($1) - ($14))|0; + FUNCTION_TABLE_vii[$17 & 63]($19,$20); + return; + } + } + $21 = ((($0)) + 168|0); + $22 = HEAP32[$21>>2]|0; + $23 = (($22) + ($1)|0); + HEAP32[$21>>2] = $23; + return; +} +function _stbi__get32be($0) { + $0 = $0|0; + var $1 = 0, $2 = 0, $3 = 0, $4 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = (_stbi__get16be($0)|0); + $2 = $1 << 16; + $3 = (_stbi__get16be($0)|0); + $4 = (($2) + ($3))|0; + return ($4|0); +} +function _stbi__get8($0) { + $0 = $0|0; + var $$0 = 0, $$sink6 = 0, $1 = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = ((($0)) + 168|0); + $2 = HEAP32[$1>>2]|0; + $3 = ((($0)) + 172|0); + $4 = HEAP32[$3>>2]|0; + $5 = ($2>>>0)<($4>>>0); + do { + if ($5) { + $$sink6 = $2; + } else { + $6 = ((($0)) + 32|0); + $7 = HEAP32[$6>>2]|0; + $8 = ($7|0)==(0); + if ($8) { + $$0 = 0; + return ($$0|0); + } else { + _stbi__refill_buffer($0); + $9 = HEAP32[$1>>2]|0; + $$sink6 = $9; + break; + } + } + } while(0); + $10 = ((($$sink6)) + 1|0); + HEAP32[$1>>2] = $10; + $11 = HEAP8[$$sink6>>0]|0; + $$0 = $11; + return ($$0|0); +} +function _stbi__get16be($0) { + $0 = $0|0; + var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = (_stbi__get8($0)|0); + $2 = $1&255; + $3 = $2 << 8; + $4 = (_stbi__get8($0)|0); + $5 = $4&255; + $6 = $3 | $5; + return ($6|0); +} +function _stbi__getn($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $$1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0; + var $29 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $3 = ((($0)) + 16|0); + $4 = HEAP32[$3>>2]|0; + $5 = ($4|0)==(0|0); + if (!($5)) { + $6 = ((($0)) + 172|0); + $7 = HEAP32[$6>>2]|0; + $8 = ((($0)) + 168|0); + $9 = HEAP32[$8>>2]|0; + $10 = $9; + $11 = (($7) - ($10))|0; + $12 = ($11|0)<($2|0); + if ($12) { + _memcpy(($1|0),($9|0),($11|0))|0; + $13 = HEAP32[$3>>2]|0; + $14 = ((($0)) + 28|0); + $15 = HEAP32[$14>>2]|0; + $16 = (($1) + ($11)|0); + $17 = (($2) - ($11))|0; + $18 = (FUNCTION_TABLE_iiii[$13 & 15]($15,$16,$17)|0); + $19 = ($18|0)==($17|0); + $20 = $19&1; + $21 = HEAP32[$6>>2]|0; + HEAP32[$8>>2] = $21; + $$1 = $20; + return ($$1|0); + } + } + $22 = ((($0)) + 168|0); + $23 = HEAP32[$22>>2]|0; + $24 = (($23) + ($2)|0); + $25 = ((($0)) + 172|0); + $26 = HEAP32[$25>>2]|0; + $27 = ($24>>>0)>($26>>>0); + if ($27) { + $$1 = 0; + return ($$1|0); + } + _memcpy(($1|0),($23|0),($2|0))|0; + $28 = HEAP32[$22>>2]|0; + $29 = (($28) + ($2)|0); + HEAP32[$22>>2] = $29; + $$1 = 1; + return ($$1|0); +} +function _stbi_zlib_decode_malloc_guesssize_headerflag($0,$1,$2,$3,$4) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + $4 = $4|0; + var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 4080|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(4080|0); + $5 = sp; + $6 = (_stbi__malloc($2)|0); + $7 = ($6|0)==(0|0); + do { + if ($7) { + $$0 = 0; + } else { + HEAP32[$5>>2] = $0; + $8 = (($0) + ($1)|0); + $9 = ((($5)) + 4|0); + HEAP32[$9>>2] = $8; + $10 = (_stbi__do_zlib($5,$6,$2,1,$4)|0); + $11 = ($10|0)==(0); + $12 = ((($5)) + 20|0); + $13 = HEAP32[$12>>2]|0; + if ($11) { + _free($13); + $$0 = 0; + break; + } + $14 = ($3|0)==(0|0); + if ($14) { + $$0 = $13; + } else { + $15 = ((($5)) + 16|0); + $16 = HEAP32[$15>>2]|0; + $17 = $13; + $18 = (($16) - ($17))|0; + HEAP32[$3>>2] = $18; + $$0 = $13; + } + } + } while(0); + STACKTOP = sp;return ($$0|0); +} +function _stbi__create_png_image($0,$1,$2,$3,$4,$5,$6) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + $4 = $4|0; + $5 = $5|0; + $6 = $6|0; + var $$0103117 = 0, $$0106116 = 0, $$0107115 = 0, $$095119 = 0, $$099118 = 0, $$3102$ph = 0, $$398$ph = 0, $$4 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0; + var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0; + var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $60 = 0, $61 = 0; + var $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0; + var $80 = 0, $81 = 0, $82 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; + sp = STACKTOP; + $7 = ($4|0)==(16); + $8 = $7 ? 2 : 1; + $9 = Math_imul($8, $3)|0; + $10 = ($6|0)==(0); + $11 = HEAP32[$0>>2]|0; + $12 = HEAP32[$11>>2]|0; + $13 = ((($11)) + 4|0); + $14 = HEAP32[$13>>2]|0; + if ($10) { + $15 = (_stbi__create_png_image_raw($0,$1,$2,$3,$12,$14,$4,$5)|0); + $$4 = $15; + return ($$4|0); + } + $16 = (_stbi__malloc_mad3($12,$14,$9)|0); + $17 = ((($0)) + 12|0); + $18 = ((($0)) + 12|0); + $$0103117 = 0;$$095119 = $1;$$099118 = $2; + while(1) { + $19 = HEAP32[$0>>2]|0; + $20 = HEAP32[$19>>2]|0; + $21 = (3076 + ($$0103117<<2)|0); + $22 = HEAP32[$21>>2]|0; + $23 = (3104 + ($$0103117<<2)|0); + $24 = HEAP32[$23>>2]|0; + $25 = (($20) + -1)|0; + $26 = (($25) - ($22))|0; + $27 = (($26) + ($24))|0; + $28 = (($27>>>0) / ($24>>>0))&-1; + $29 = ((($19)) + 4|0); + $30 = HEAP32[$29>>2]|0; + $31 = (3132 + ($$0103117<<2)|0); + $32 = HEAP32[$31>>2]|0; + $33 = (3160 + ($$0103117<<2)|0); + $34 = HEAP32[$33>>2]|0; + $35 = (($30) + -1)|0; + $36 = (($35) - ($32))|0; + $37 = (($36) + ($34))|0; + $38 = (($37>>>0) / ($34>>>0))&-1; + $39 = ($24>>>0)<=($27>>>0); + $40 = ($34>>>0)<=($37>>>0); + $or$cond = $39 & $40; + if ($or$cond) { + $41 = ((($19)) + 8|0); + $42 = HEAP32[$41>>2]|0; + $43 = Math_imul($28, $4)|0; + $44 = Math_imul($43, $42)|0; + $45 = (($44) + 7)|0; + $46 = $45 >> 3; + $47 = (($46) + 1)|0; + $48 = Math_imul($47, $38)|0; + $49 = (_stbi__create_png_image_raw($0,$$095119,$$099118,$3,$28,$38,$4,$5)|0); + $50 = ($49|0)==(0); + if ($50) { + label = 13; + break; + } + $51 = ($38|0)>(0); + if ($51) { + $52 = ($28|0)>(0); + $$0106116 = 0; + while(1) { + if ($52) { + $53 = HEAP32[$33>>2]|0; + $54 = Math_imul($53, $$0106116)|0; + $55 = HEAP32[$31>>2]|0; + $56 = (($54) + ($55))|0; + $57 = HEAP32[$23>>2]|0; + $58 = HEAP32[$21>>2]|0; + $59 = Math_imul($56, $9)|0; + $60 = Math_imul($$0106116, $28)|0; + $$0107115 = 0; + while(1) { + $61 = Math_imul($57, $$0107115)|0; + $62 = (($61) + ($58))|0; + $63 = HEAP32[$0>>2]|0; + $64 = HEAP32[$63>>2]|0; + $65 = Math_imul($59, $64)|0; + $66 = (($16) + ($65)|0); + $67 = Math_imul($62, $9)|0; + $68 = (($66) + ($67)|0); + $69 = HEAP32[$18>>2]|0; + $70 = (($$0107115) + ($60))|0; + $71 = Math_imul($70, $9)|0; + $72 = (($69) + ($71)|0); + _memcpy(($68|0),($72|0),($9|0))|0; + $73 = (($$0107115) + 1)|0; + $74 = ($73|0)<($28|0); + if ($74) { + $$0107115 = $73; + } else { + break; + } + } + } + $75 = (($$0106116) + 1)|0; + $76 = ($75|0)<($38|0); + if ($76) { + $$0106116 = $75; + } else { + break; + } + } + } + $77 = HEAP32[$17>>2]|0; + _free($77); + $78 = (($$095119) + ($48)|0); + $79 = (($$099118) - ($48))|0; + $$3102$ph = $79;$$398$ph = $78; + } else { + $$3102$ph = $$099118;$$398$ph = $$095119; + } + $80 = (($$0103117) + 1)|0; + $81 = ($80|0)<(7); + if ($81) { + $$0103117 = $80;$$095119 = $$398$ph;$$099118 = $$3102$ph; + } else { + label = 15; + break; + } + } + if ((label|0) == 13) { + _free($16); + $$4 = 0; + return ($$4|0); + } + else if ((label|0) == 15) { + $82 = ((($0)) + 12|0); + HEAP32[$82>>2] = $16; + $$4 = 1; + return ($$4|0); + } + return (0)|0; +} +function _stbi__compute_transparency16($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $$0323 = 0, $$04 = 0, $$1335 = 0, $$16 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; + var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $exitcond9 = 0, $not$ = 0, label = 0, sp = 0; + sp = STACKTOP; + $3 = HEAP32[$0>>2]|0; + $4 = HEAP32[$3>>2]|0; + $5 = ((($3)) + 4|0); + $6 = HEAP32[$5>>2]|0; + $7 = Math_imul($6, $4)|0; + $8 = ((($0)) + 12|0); + $9 = HEAP32[$8>>2]|0; + switch ($2|0) { + case 2: { + $13 = ($7|0)==(0); + if ($13) { + return; + } else { + $$0323 = 0;$$04 = $9; + } + while(1) { + $14 = HEAP16[$$04>>1]|0; + $15 = HEAP16[$1>>1]|0; + $not$ = ($14<<16>>16)!=($15<<16>>16); + $16 = $not$ << 31 >> 31; + $17 = ((($$04)) + 2|0); + HEAP16[$17>>1] = $16; + $18 = ((($$04)) + 4|0); + $19 = (($$0323) + 1)|0; + $exitcond = ($19|0)==($7|0); + if ($exitcond) { + break; + } else { + $$0323 = $19;$$04 = $18; + } + } + return; + break; + } + case 4: { + $10 = ($7|0)==(0); + if ($10) { + return; + } + $11 = ((($1)) + 2|0); + $12 = ((($1)) + 4|0); + $$1335 = 0;$$16 = $9; + while(1) { + $20 = HEAP16[$$16>>1]|0; + $21 = HEAP16[$1>>1]|0; + $22 = ($20<<16>>16)==($21<<16>>16); + if ($22) { + $23 = ((($$16)) + 2|0); + $24 = HEAP16[$23>>1]|0; + $25 = HEAP16[$11>>1]|0; + $26 = ($24<<16>>16)==($25<<16>>16); + if ($26) { + $27 = ((($$16)) + 4|0); + $28 = HEAP16[$27>>1]|0; + $29 = HEAP16[$12>>1]|0; + $30 = ($28<<16>>16)==($29<<16>>16); + if ($30) { + $31 = ((($$16)) + 6|0); + HEAP16[$31>>1] = 0; + } + } + } + $32 = ((($$16)) + 8|0); + $33 = (($$1335) + 1)|0; + $exitcond9 = ($33|0)==($7|0); + if ($exitcond9) { + break; + } else { + $$1335 = $33;$$16 = $32; + } + } + return; + break; + } + default: { + ___assert_fail((7085|0),(6620|0),4569,(7137|0)); + // unreachable; + } + } +} +function _stbi__compute_transparency($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $$0323 = 0, $$04 = 0, $$1335 = 0, $$16 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; + var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $exitcond9 = 0, $not$ = 0, label = 0, sp = 0; + sp = STACKTOP; + $3 = HEAP32[$0>>2]|0; + $4 = HEAP32[$3>>2]|0; + $5 = ((($3)) + 4|0); + $6 = HEAP32[$5>>2]|0; + $7 = Math_imul($6, $4)|0; + $8 = ((($0)) + 12|0); + $9 = HEAP32[$8>>2]|0; + switch ($2|0) { + case 2: { + $13 = ($7|0)==(0); + if ($13) { + return; + } else { + $$0323 = 0;$$04 = $9; + } + while(1) { + $14 = HEAP8[$$04>>0]|0; + $15 = HEAP8[$1>>0]|0; + $not$ = ($14<<24>>24)!=($15<<24>>24); + $16 = $not$ << 31 >> 31; + $17 = ((($$04)) + 1|0); + HEAP8[$17>>0] = $16; + $18 = ((($$04)) + 2|0); + $19 = (($$0323) + 1)|0; + $exitcond = ($19|0)==($7|0); + if ($exitcond) { + break; + } else { + $$0323 = $19;$$04 = $18; + } + } + return; + break; + } + case 4: { + $10 = ($7|0)==(0); + if ($10) { + return; + } + $11 = ((($1)) + 1|0); + $12 = ((($1)) + 2|0); + $$1335 = 0;$$16 = $9; + while(1) { + $20 = HEAP8[$$16>>0]|0; + $21 = HEAP8[$1>>0]|0; + $22 = ($20<<24>>24)==($21<<24>>24); + if ($22) { + $23 = ((($$16)) + 1|0); + $24 = HEAP8[$23>>0]|0; + $25 = HEAP8[$11>>0]|0; + $26 = ($24<<24>>24)==($25<<24>>24); + if ($26) { + $27 = ((($$16)) + 2|0); + $28 = HEAP8[$27>>0]|0; + $29 = HEAP8[$12>>0]|0; + $30 = ($28<<24>>24)==($29<<24>>24); + if ($30) { + $31 = ((($$16)) + 3|0); + HEAP8[$31>>0] = 0; + } + } + } + $32 = ((($$16)) + 4|0); + $33 = (($$1335) + 1)|0; + $exitcond9 = ($33|0)==($7|0); + if ($exitcond9) { + break; + } else { + $$1335 = $33;$$16 = $32; + } + } + return; + break; + } + default: { + ___assert_fail((7085|0),(6620|0),4544,(7110|0)); + // unreachable; + } + } +} +function _stbi__de_iphone($0) { + $0 = $0|0; + var $$05158 = 0, $$059 = 0, $$15263 = 0, $$164 = 0, $$25360 = 0, $$261 = 0, $$sink = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0; + var $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0; + var $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $exitcond68 = 0, $exitcond69 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = HEAP32[$0>>2]|0; + $2 = HEAP32[$1>>2]|0; + $3 = ((($1)) + 4|0); + $4 = HEAP32[$3>>2]|0; + $5 = Math_imul($4, $2)|0; + $6 = ((($0)) + 12|0); + $7 = HEAP32[$6>>2]|0; + $8 = ((($1)) + 12|0); + $9 = HEAP32[$8>>2]|0; + switch ($9|0) { + case 3: { + $10 = ($5|0)==(0); + if ($10) { + return; + } else { + $$05158 = $7;$$059 = 0; + } + while(1) { + $11 = HEAP8[$$05158>>0]|0; + $12 = ((($$05158)) + 2|0); + $13 = HEAP8[$12>>0]|0; + HEAP8[$$05158>>0] = $13; + HEAP8[$12>>0] = $11; + $14 = ((($$05158)) + 3|0); + $15 = (($$059) + 1)|0; + $exitcond = ($15|0)==($5|0); + if ($exitcond) { + break; + } else { + $$05158 = $14;$$059 = $15; + } + } + return; + break; + } + case 4: { + $16 = HEAP32[5172]|0; + $17 = ($16|0)==(0); + $18 = ($5|0)!=(0); + if ($17) { + if ($18) { + $$25360 = $7;$$261 = 0; + } else { + return; + } + while(1) { + $42 = HEAP8[$$25360>>0]|0; + $43 = ((($$25360)) + 2|0); + $44 = HEAP8[$43>>0]|0; + HEAP8[$$25360>>0] = $44; + HEAP8[$43>>0] = $42; + $45 = ((($$25360)) + 4|0); + $46 = (($$261) + 1)|0; + $exitcond68 = ($46|0)==($5|0); + if ($exitcond68) { + break; + } else { + $$25360 = $45;$$261 = $46; + } + } + return; + } + if ($18) { + $$15263 = $7;$$164 = 0; + } else { + return; + } + while(1) { + $19 = ((($$15263)) + 3|0); + $20 = HEAP8[$19>>0]|0; + $21 = HEAP8[$$15263>>0]|0; + $22 = ($20<<24>>24)==(0); + $23 = ((($$15263)) + 2|0); + $24 = HEAP8[$23>>0]|0; + if ($22) { + HEAP8[$$15263>>0] = $24; + $$sink = $21; + } else { + $25 = $24&255; + $26 = ($25*255)|0; + $27 = $20&255; + $28 = (($26>>>0) / ($27>>>0))&-1; + $29 = $28&255; + HEAP8[$$15263>>0] = $29; + $30 = ((($$15263)) + 1|0); + $31 = HEAP8[$30>>0]|0; + $32 = $31&255; + $33 = ($32*255)|0; + $34 = (($33>>>0) / ($27>>>0))&-1; + $35 = $34&255; + HEAP8[$30>>0] = $35; + $36 = $21&255; + $37 = ($36*255)|0; + $38 = (($37>>>0) / ($27>>>0))&-1; + $39 = $38&255; + $$sink = $39; + } + HEAP8[$23>>0] = $$sink; + $40 = ((($$15263)) + 4|0); + $41 = (($$164) + 1)|0; + $exitcond69 = ($41|0)==($5|0); + if ($exitcond69) { + break; + } else { + $$15263 = $40;$$164 = $41; + } + } + return; + break; + } + default: { + ___assert_fail((7051|0),(6620|0),4650,(7069|0)); + // unreachable; + } + } +} +function _stbi__expand_png_palette($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $$0 = 0, $$0574 = 0, $$0583 = 0, $$1595 = 0, $$16 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; + var $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0; + var $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $exitcond9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $3 = HEAP32[$0>>2]|0; + $4 = HEAP32[$3>>2]|0; + $5 = ((($3)) + 4|0); + $6 = HEAP32[$5>>2]|0; + $7 = Math_imul($6, $4)|0; + $8 = ((($0)) + 12|0); + $9 = HEAP32[$8>>2]|0; + $10 = (_stbi__malloc_mad2($7,$2)|0); + $11 = ($10|0)==(0|0); + if ($11) { + _stbi__err(6585); + $$0 = 0; + return ($$0|0); + } + $12 = ($2|0)==(3); + $13 = ($7|0)!=(0); + if ($12) { + if ($13) { + $$0574 = 0;$$0583 = $10; + while(1) { + $14 = (($9) + ($$0574)|0); + $15 = HEAP8[$14>>0]|0; + $16 = $15&255; + $17 = $16 << 2; + $18 = (($1) + ($17)|0); + $19 = HEAP8[$18>>0]|0; + HEAP8[$$0583>>0] = $19; + $20 = $17 | 1; + $21 = (($1) + ($20)|0); + $22 = HEAP8[$21>>0]|0; + $23 = ((($$0583)) + 1|0); + HEAP8[$23>>0] = $22; + $24 = $17 | 2; + $25 = (($1) + ($24)|0); + $26 = HEAP8[$25>>0]|0; + $27 = ((($$0583)) + 2|0); + HEAP8[$27>>0] = $26; + $28 = ((($$0583)) + 3|0); + $29 = (($$0574) + 1)|0; + $exitcond = ($29|0)==($7|0); + if ($exitcond) { + break; + } else { + $$0574 = $29;$$0583 = $28; + } + } + } + } else { + if ($13) { + $$1595 = $10;$$16 = 0; + while(1) { + $30 = (($9) + ($$16)|0); + $31 = HEAP8[$30>>0]|0; + $32 = $31&255; + $33 = $32 << 2; + $34 = (($1) + ($33)|0); + $35 = HEAP8[$34>>0]|0; + HEAP8[$$1595>>0] = $35; + $36 = $33 | 1; + $37 = (($1) + ($36)|0); + $38 = HEAP8[$37>>0]|0; + $39 = ((($$1595)) + 1|0); + HEAP8[$39>>0] = $38; + $40 = $33 | 2; + $41 = (($1) + ($40)|0); + $42 = HEAP8[$41>>0]|0; + $43 = ((($$1595)) + 2|0); + HEAP8[$43>>0] = $42; + $44 = $33 | 3; + $45 = (($1) + ($44)|0); + $46 = HEAP8[$45>>0]|0; + $47 = ((($$1595)) + 3|0); + HEAP8[$47>>0] = $46; + $48 = ((($$1595)) + 4|0); + $49 = (($$16) + 1)|0; + $exitcond9 = ($49|0)==($7|0); + if ($exitcond9) { + break; + } else { + $$1595 = $48;$$16 = $49; + } + } + } + } + $50 = HEAP32[$8>>2]|0; + _free($50); + HEAP32[$8>>2] = $10; + $$0 = 1; + return ($$0|0); +} +function _stbi__malloc_mad2($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $$0 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; + sp = STACKTOP; + $2 = (_stbi__mad2sizes_valid($0,$1)|0); + $3 = ($2|0)==(0); + if ($3) { + $$0 = 0; + return ($$0|0); + } + $4 = Math_imul($1, $0)|0; + $5 = (_stbi__malloc($4)|0); + $$0 = $5; + return ($$0|0); +} +function _stbi__mad2sizes_valid($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, label = 0, sp = 0; + sp = STACKTOP; + $2 = (_stbi__mul2sizes_valid($0,$1)|0); + $3 = ($2|0)==(0); + if ($3) { + $8 = 0; + $7 = $8&1; + return ($7|0); + } + $4 = Math_imul($1, $0)|0; + $5 = (_stbi__addsizes_valid($4)|0); + $6 = ($5|0)!=(0); + $8 = $6; + $7 = $8&1; + return ($7|0); +} +function _stbi__create_png_image_raw($0,$1,$2,$3,$4,$5,$6,$7) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + $4 = $4|0; + $5 = $5|0; + $6 = $6|0; + $7 = $7|0; + var $$0568 = 0, $$0568724 = 0, $$0568725 = 0, $$0571$lcssa = 0, $$0571715 = 0, $$0574$lcssa = 0, $$0574714 = 0, $$0577817 = 0, $$0588 = 0, $$0597 = 0, $$0608816 = 0, $$0611815 = 0, $$0614 = 0, $$0614793 = 0, $$0614796 = 0, $$0623814 = 0, $$0625734 = 0, $$0731 = 0, $$1 = 0, $$10635764 = 0; + var $$11$ph = 0, $$11636755 = 0, $$12747 = 0, $$13739 = 0, $$14$lcssa = 0, $$14713 = 0, $$15$lcssa = 0, $$15705 = 0, $$1572$lcssa = 0, $$1572707 = 0, $$1575$lcssa = 0, $$1575706 = 0, $$1578 = 0, $$16$lcssa = 0, $$1609 = 0, $$1612 = 0, $$1615 = 0, $$1615785 = 0, $$1615788 = 0, $$1624727 = 0; + var $$1626812 = 0, $$16700 = 0, $$1721 = 0, $$1722 = 0, $$2 = 0, $$2573$lcssa = 0, $$2573702 = 0, $$2579795 = 0, $$2599794 = 0, $$2616 = 0, $$2616776 = 0, $$2616780 = 0, $$2627810 = 0, $$3580787 = 0, $$3592778 = 0, $$3600786 = 0, $$3617 = 0, $$3617767 = 0, $$3617771 = 0, $$3628808 = 0; + var $$4$lcssa = 0, $$4581779 = 0, $$4593769 = 0, $$4601777 = 0, $$4618 = 0, $$4618758 = 0, $$4618762 = 0, $$4629806 = 0, $$4701 = 0, $$5582770 = 0, $$5594760 = 0, $$5602768 = 0, $$5619 = 0, $$5619750 = 0, $$5619753 = 0, $$5630804 = 0, $$6583761 = 0, $$6603759 = 0, $$6620 = 0, $$6620742 = 0; + var $$6620745 = 0, $$6631802 = 0, $$7584752 = 0, $$7604751 = 0, $$7621798 = 0, $$7632790 = 0, $$8585744 = 0, $$8605743 = 0, $$8622729 = 0, $$8633782 = 0, $$9586 = 0, $$9606799 = 0, $$9634773 = 0, $$not = 0, $$sink = 0, $$sink1 = 0, $$sink641 = 0, $10 = 0, $100 = 0, $101 = 0; + var $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0; + var $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0; + var $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0; + var $157 = 0, $158 = 0, $159 = 0, $16 = 0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0; + var $175 = 0, $176 = 0, $177 = 0, $178 = 0, $179 = 0, $18 = 0, $180 = 0, $181 = 0, $182 = 0, $183 = 0, $184 = 0, $185 = 0, $186 = 0, $187 = 0, $188 = 0, $189 = 0, $19 = 0, $190 = 0, $191 = 0, $192 = 0; + var $193 = 0, $194 = 0, $195 = 0, $196 = 0, $197 = 0, $198 = 0, $199 = 0, $20 = 0, $200 = 0, $201 = 0, $202 = 0, $203 = 0, $204 = 0, $205 = 0, $206 = 0, $207 = 0, $208 = 0, $209 = 0, $21 = 0, $210 = 0; + var $211 = 0, $212 = 0, $213 = 0, $214 = 0, $215 = 0, $216 = 0, $217 = 0, $218 = 0, $219 = 0, $22 = 0, $220 = 0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0, $226 = 0, $227 = 0, $228 = 0, $229 = 0; + var $23 = 0, $230 = 0, $231 = 0, $232 = 0, $233 = 0, $234 = 0, $235 = 0, $236 = 0, $237 = 0, $238 = 0, $239 = 0, $24 = 0, $240 = 0, $241 = 0, $242 = 0, $243 = 0, $244 = 0, $245 = 0, $246 = 0, $247 = 0; + var $248 = 0, $249 = 0, $25 = 0, $250 = 0, $251 = 0, $252 = 0, $253 = 0, $254 = 0, $255 = 0, $256 = 0, $257 = 0, $258 = 0, $259 = 0, $26 = 0, $260 = 0, $261 = 0, $262 = 0, $263 = 0, $264 = 0, $265 = 0; + var $266 = 0, $267 = 0, $268 = 0, $269 = 0, $27 = 0, $270 = 0, $271 = 0, $272 = 0, $273 = 0, $274 = 0, $275 = 0, $276 = 0, $277 = 0, $278 = 0, $279 = 0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0; + var $284 = 0, $285 = 0, $286 = 0, $287 = 0, $288 = 0, $289 = 0, $29 = 0, $290 = 0, $291 = 0, $292 = 0, $293 = 0, $294 = 0, $295 = 0, $296 = 0, $297 = 0, $298 = 0, $299 = 0, $30 = 0, $300 = 0, $301 = 0; + var $302 = 0, $303 = 0, $304 = 0, $305 = 0, $306 = 0, $307 = 0, $308 = 0, $309 = 0, $31 = 0, $310 = 0, $311 = 0, $312 = 0, $313 = 0, $314 = 0, $315 = 0, $316 = 0, $317 = 0, $318 = 0, $319 = 0, $32 = 0; + var $320 = 0, $321 = 0, $322 = 0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0, $328 = 0, $329 = 0, $33 = 0, $330 = 0, $331 = 0, $332 = 0, $333 = 0, $334 = 0, $335 = 0, $336 = 0, $337 = 0, $338 = 0; + var $339 = 0, $34 = 0, $340 = 0, $341 = 0, $342 = 0, $343 = 0, $344 = 0, $345 = 0, $346 = 0, $347 = 0, $348 = 0, $349 = 0, $35 = 0, $350 = 0, $351 = 0, $352 = 0, $353 = 0, $354 = 0, $355 = 0, $356 = 0; + var $357 = 0, $358 = 0, $359 = 0, $36 = 0, $360 = 0, $361 = 0, $362 = 0, $363 = 0, $364 = 0, $365 = 0, $366 = 0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0; + var $375 = 0, $376 = 0, $377 = 0, $378 = 0, $379 = 0, $38 = 0, $380 = 0, $381 = 0, $382 = 0, $383 = 0, $384 = 0, $385 = 0, $386 = 0, $387 = 0, $388 = 0, $389 = 0, $39 = 0, $390 = 0, $391 = 0, $392 = 0; + var $393 = 0, $394 = 0, $395 = 0, $396 = 0, $397 = 0, $398 = 0, $399 = 0, $40 = 0, $400 = 0, $401 = 0, $402 = 0, $403 = 0, $404 = 0, $405 = 0, $406 = 0, $407 = 0, $408 = 0, $409 = 0, $41 = 0, $410 = 0; + var $411 = 0, $412 = 0, $413 = 0, $414 = 0, $415 = 0, $416 = 0, $417 = 0, $418 = 0, $419 = 0, $42 = 0, $420 = 0, $421 = 0, $422 = 0, $423 = 0, $424 = 0, $425 = 0, $426 = 0, $427 = 0, $428 = 0, $429 = 0; + var $43 = 0, $430 = 0, $431 = 0, $432 = 0, $433 = 0, $434 = 0, $435 = 0, $436 = 0, $437 = 0, $438 = 0, $439 = 0, $44 = 0, $440 = 0, $441 = 0, $442 = 0, $443 = 0, $444 = 0, $445 = 0, $446 = 0, $447 = 0; + var $448 = 0, $449 = 0, $45 = 0, $450 = 0, $451 = 0, $452 = 0, $453 = 0, $454 = 0, $455 = 0, $456 = 0, $457 = 0, $458 = 0, $459 = 0, $46 = 0, $460 = 0, $461 = 0, $462 = 0, $463 = 0, $464 = 0, $465 = 0; + var $466 = 0, $467 = 0, $468 = 0, $469 = 0, $47 = 0, $470 = 0, $471 = 0, $472 = 0, $473 = 0, $474 = 0, $475 = 0, $476 = 0, $477 = 0, $478 = 0, $479 = 0, $48 = 0, $480 = 0, $481 = 0, $482 = 0, $483 = 0; + var $484 = 0, $485 = 0, $486 = 0, $487 = 0, $488 = 0, $489 = 0, $49 = 0, $490 = 0, $491 = 0, $492 = 0, $493 = 0, $494 = 0, $495 = 0, $496 = 0, $497 = 0, $498 = 0, $499 = 0, $50 = 0, $500 = 0, $501 = 0; + var $502 = 0, $503 = 0, $504 = 0, $505 = 0, $506 = 0, $507 = 0, $508 = 0, $509 = 0, $51 = 0, $510 = 0, $511 = 0, $512 = 0, $513 = 0, $514 = 0, $515 = 0, $516 = 0, $517 = 0, $518 = 0, $519 = 0, $52 = 0; + var $520 = 0, $521 = 0, $522 = 0, $523 = 0, $524 = 0, $525 = 0, $526 = 0, $527 = 0, $528 = 0, $529 = 0, $53 = 0, $530 = 0, $531 = 0, $532 = 0, $533 = 0, $534 = 0, $535 = 0, $536 = 0, $537 = 0, $538 = 0; + var $539 = 0, $54 = 0, $540 = 0, $541 = 0, $542 = 0, $543 = 0, $544 = 0, $545 = 0, $546 = 0, $547 = 0, $548 = 0, $549 = 0, $55 = 0, $550 = 0, $551 = 0, $552 = 0, $553 = 0, $554 = 0, $555 = 0, $556 = 0; + var $557 = 0, $558 = 0, $559 = 0, $56 = 0, $560 = 0, $561 = 0, $562 = 0, $563 = 0, $564 = 0, $565 = 0, $566 = 0, $567 = 0, $568 = 0, $569 = 0, $57 = 0, $570 = 0, $571 = 0, $572 = 0, $573 = 0, $574 = 0; + var $575 = 0, $576 = 0, $577 = 0, $578 = 0, $579 = 0, $58 = 0, $580 = 0, $581 = 0, $582 = 0, $583 = 0, $584 = 0, $585 = 0, $586 = 0, $587 = 0, $588 = 0, $589 = 0, $59 = 0, $590 = 0, $591 = 0, $592 = 0; + var $593 = 0, $594 = 0, $595 = 0, $596 = 0, $597 = 0, $598 = 0, $599 = 0, $60 = 0, $600 = 0, $601 = 0, $602 = 0, $603 = 0, $604 = 0, $605 = 0, $606 = 0, $607 = 0, $608 = 0, $609 = 0, $61 = 0, $610 = 0; + var $611 = 0, $612 = 0, $613 = 0, $614 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0; + var $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0; + var $96 = 0, $97 = 0, $98 = 0, $99 = 0, $brmerge = 0, $brmerge894 = 0, $exitcond = 0, $exitcond864 = 0, $exitcond865 = 0, $exitcond867 = 0, $exitcond869 = 0, $exitcond871 = 0, $exitcond873 = 0, $exitcond875 = 0, $exitcond877 = 0, $exitcond880 = 0, $exitcond881 = 0, $exitcond882 = 0, $exitcond883 = 0, $exitcond884 = 0; + var $exitcond885 = 0, $exitcond886 = 0, $indvars$iv = 0, $indvars$iv$next = 0, $indvars$iv$next849 = 0, $indvars$iv$next852 = 0, $indvars$iv$next855 = 0, $indvars$iv$next858 = 0, $indvars$iv$next861 = 0, $indvars$iv848 = 0, $indvars$iv851 = 0, $indvars$iv854 = 0, $indvars$iv857 = 0, $indvars$iv860 = 0, $or$cond = 0, $scevgep = 0, $scevgep850 = 0, $scevgep853 = 0, $scevgep856 = 0, $scevgep859 = 0; + var $scevgep862 = 0, $scevgep866 = 0, $scevgep868 = 0, $scevgep870 = 0, $scevgep872 = 0, $scevgep874 = 0, $scevgep876 = 0, $scevgep879 = 0, $trunc = 0, $trunc637 = 0, $trunc638 = 0, label = 0, sp = 0; + sp = STACKTOP; + $8 = ($6|0)==(16); + $9 = $8 ? 2 : 1; + $10 = HEAP32[$0>>2]|0; + $11 = Math_imul($4, $3)|0; + $12 = Math_imul($9, $11)|0; + $13 = ((($10)) + 8|0); + $14 = HEAP32[$13>>2]|0; + $15 = Math_imul($9, $3)|0; + $16 = Math_imul($14, $9)|0; + $17 = ($14|0)==($3|0); + $18 = (($14) + 1)|0; + $19 = ($18|0)==($3|0); + $or$cond = $17 | $19; + if (!($or$cond)) { + ___assert_fail((7166|0),(6620|0),4294,(7207|0)); + // unreachable; + } + $20 = (_stbi__malloc_mad3($4,$5,$15)|0); + $21 = ((($0)) + 12|0); + HEAP32[$21>>2] = $20; + $22 = ($20|0)==(0|0); + if ($22) { + _stbi__err(6585); + $$2 = 0; + return ($$2|0); + } + $23 = Math_imul($14, $4)|0; + $24 = Math_imul($23, $6)|0; + $25 = (($24) + 7)|0; + $26 = $25 >>> 3; + $27 = (($26) + 1)|0; + $28 = Math_imul($27, $5)|0; + $29 = HEAP32[$10>>2]|0; + $30 = ($29|0)==($4|0); + if ($30) { + $31 = ((($10)) + 4|0); + $32 = HEAP32[$31>>2]|0; + $33 = ($32|0)==($5|0); + if ($33) { + $34 = ($28|0)==($2|0); + if (!($34)) { + _stbi__err(7234); + $$2 = 0; + return ($$2|0); + } + } else { + label = 9; + } + } else { + label = 9; + } + if ((label|0) == 9) { + $35 = ($28>>>0)>($2>>>0); + if ($35) { + _stbi__err(7234); + $$2 = 0; + return ($$2|0); + } + } + $36 = ($5|0)==(0); + L18: do { + if (!($36)) { + $37 = ($6|0)<(8); + $38 = ($26>>>0)>($4>>>0); + $39 = (($11) - ($26))|0; + $40 = (0 - ($12))|0; + $41 = ($6|0)==(8); + $brmerge = $37 | $17; + $42 = ($4|0)==(0); + $$0614793 = (($4) + -1)|0; + $43 = ($$0614793|0)==(0); + $$1615785 = (($4) + -1)|0; + $44 = ($$1615785|0)==(0); + $$2616776 = (($4) + -1)|0; + $45 = ($$2616776|0)==(0); + $$3617767 = (($4) + -1)|0; + $46 = ($$3617767|0)==(0); + $$4618758 = (($4) + -1)|0; + $47 = ($$4618758|0)==(0); + $$5619750 = (($4) + -1)|0; + $48 = ($$5619750|0)==(0); + $$6620742 = (($4) + -1)|0; + $49 = ($$6620742|0)==(0); + $$not = $8 ^ 1; + $brmerge894 = $42 | $$not; + $$0577817 = $1;$$0608816 = $4;$$0611815 = $16;$$0623814 = 0; + while(1) { + $50 = HEAP32[$21>>2]|0; + $51 = Math_imul($$0623814, $12)|0; + $52 = (($50) + ($51)|0); + $53 = ((($$0577817)) + 1|0); + $54 = HEAP8[$$0577817>>0]|0; + $55 = $54&255; + $56 = ($54&255)>(4); + if ($56) { + label = 105; + break; + } + if ($37) { + if ($38) { + label = 16; + break; + } + $57 = (($52) + ($39)|0); + $$0597 = $57;$$1609 = $26;$$1612 = 1; + } else { + $$0597 = $52;$$1609 = $$0608816;$$1612 = $$0611815; + } + $58 = (($$0597) + ($40)|0); + $59 = ($$0623814|0)==(0); + if ($59) { + $60 = (7273 + ($55)|0); + $61 = HEAP8[$60>>0]|0; + $62 = $61&255; + $$0588 = $62; + } else { + $$0588 = $55; + } + $63 = ($$1612|0)>(0); + L30: do { + if ($63) { + $trunc638 = $$0588&255; + $$0625734 = 0; + while(1) { + switch ($trunc638<<24>>24) { + case 0: { + $64 = (($53) + ($$0625734)|0); + $65 = HEAP8[$64>>0]|0; + $$sink = $65; + label = 30; + break; + } + case 1: { + $66 = (($53) + ($$0625734)|0); + $67 = HEAP8[$66>>0]|0; + $$sink = $67; + label = 30; + break; + } + case 2: { + $68 = (($53) + ($$0625734)|0); + $69 = HEAP8[$68>>0]|0; + $70 = $69&255; + $71 = (($58) + ($$0625734)|0); + $72 = HEAP8[$71>>0]|0; + $73 = $72&255; + $74 = (($73) + ($70))|0; + $75 = $74&255; + $$sink = $75; + label = 30; + break; + } + case 3: { + $76 = (($53) + ($$0625734)|0); + $77 = HEAP8[$76>>0]|0; + $78 = $77&255; + $79 = (($58) + ($$0625734)|0); + $80 = HEAP8[$79>>0]|0; + $81 = $80&255; + $82 = $81 >>> 1; + $83 = (($82) + ($78))|0; + $84 = $83&255; + $$sink = $84; + label = 30; + break; + } + case 4: { + $85 = (($53) + ($$0625734)|0); + $86 = HEAP8[$85>>0]|0; + $87 = $86&255; + $88 = (($58) + ($$0625734)|0); + $89 = HEAP8[$88>>0]|0; + $90 = $89&255; + $91 = (_stbi__paeth(0,$90,0)|0); + $92 = (($91) + ($87))|0; + $93 = $92&255; + $$sink = $93; + label = 30; + break; + } + case 5: { + $94 = (($53) + ($$0625734)|0); + $95 = HEAP8[$94>>0]|0; + $$sink = $95; + label = 30; + break; + } + case 6: { + $96 = (($53) + ($$0625734)|0); + $97 = HEAP8[$96>>0]|0; + $$sink = $97; + label = 30; + break; + } + default: { + } + } + if ((label|0) == 30) { + label = 0; + $$sink1 = (($$0597) + ($$0625734)|0); + HEAP8[$$sink1>>0] = $$sink; + } + $98 = (($$0625734) + 1)|0; + $exitcond864 = ($98|0)==($$1612|0); + if ($exitcond864) { + break L30; + } else { + $$0625734 = $98; + } + } + } + } while(0); + do { + if ($41) { + if (!($17)) { + $99 = (($$0597) + ($14)|0); + HEAP8[$99>>0] = -1; + } + $100 = (($53) + ($14)|0); + $$1578 = $100;$$sink641 = $3; + } else { + if (!($8)) { + $105 = ((($$0577817)) + 2|0); + $$1578 = $105;$$sink641 = 1; + break; + } + if (!($17)) { + $101 = (($$1612) + 1)|0; + $102 = (($$0597) + ($101)|0); + $103 = (($$0597) + ($$1612)|0); + HEAP8[$103>>0] = -1; + HEAP8[$102>>0] = -1; + } + $104 = (($53) + ($$1612)|0); + $$1578 = $104;$$sink641 = $15; + } + } while(0); + $106 = (($$0597) + ($$sink641)|0); + $107 = (($58) + ($$sink641)|0); + if ($brmerge) { + $108 = (($$1609) + -1)|0; + $109 = Math_imul($108, $$1612)|0; + $trunc637 = $$0588&255; + switch ($trunc637<<24>>24) { + case 0: { + _memcpy(($106|0),($$1578|0),($109|0))|0; + break; + } + case 1: { + $115 = ($109|0)>(0); + if ($115) { + $$1626812 = 0; + while(1) { + $116 = (($$1578) + ($$1626812)|0); + $117 = HEAP8[$116>>0]|0; + $118 = $117&255; + $119 = (($$1626812) - ($$1612))|0; + $120 = (($106) + ($119)|0); + $121 = HEAP8[$120>>0]|0; + $122 = $121&255; + $123 = (($122) + ($118))|0; + $124 = $123&255; + $125 = (($106) + ($$1626812)|0); + HEAP8[$125>>0] = $124; + $126 = (($$1626812) + 1)|0; + $exitcond886 = ($126|0)==($109|0); + if ($exitcond886) { + break; + } else { + $$1626812 = $126; + } + } + } + break; + } + case 2: { + $114 = ($109|0)>(0); + if ($114) { + $$2627810 = 0; + while(1) { + $127 = (($$1578) + ($$2627810)|0); + $128 = HEAP8[$127>>0]|0; + $129 = $128&255; + $130 = (($107) + ($$2627810)|0); + $131 = HEAP8[$130>>0]|0; + $132 = $131&255; + $133 = (($132) + ($129))|0; + $134 = $133&255; + $135 = (($106) + ($$2627810)|0); + HEAP8[$135>>0] = $134; + $136 = (($$2627810) + 1)|0; + $exitcond885 = ($136|0)==($109|0); + if ($exitcond885) { + break; + } else { + $$2627810 = $136; + } + } + } + break; + } + case 3: { + $113 = ($109|0)>(0); + if ($113) { + $$3628808 = 0; + while(1) { + $137 = (($$1578) + ($$3628808)|0); + $138 = HEAP8[$137>>0]|0; + $139 = $138&255; + $140 = (($107) + ($$3628808)|0); + $141 = HEAP8[$140>>0]|0; + $142 = $141&255; + $143 = (($$3628808) - ($$1612))|0; + $144 = (($106) + ($143)|0); + $145 = HEAP8[$144>>0]|0; + $146 = $145&255; + $147 = (($146) + ($142))|0; + $148 = $147 >>> 1; + $149 = (($148) + ($139))|0; + $150 = $149&255; + $151 = (($106) + ($$3628808)|0); + HEAP8[$151>>0] = $150; + $152 = (($$3628808) + 1)|0; + $exitcond884 = ($152|0)==($109|0); + if ($exitcond884) { + break; + } else { + $$3628808 = $152; + } + } + } + break; + } + case 4: { + $112 = ($109|0)>(0); + if ($112) { + $$4629806 = 0; + while(1) { + $153 = (($$1578) + ($$4629806)|0); + $154 = HEAP8[$153>>0]|0; + $155 = $154&255; + $156 = (($$4629806) - ($$1612))|0; + $157 = (($106) + ($156)|0); + $158 = HEAP8[$157>>0]|0; + $159 = $158&255; + $160 = (($107) + ($$4629806)|0); + $161 = HEAP8[$160>>0]|0; + $162 = $161&255; + $163 = (($107) + ($156)|0); + $164 = HEAP8[$163>>0]|0; + $165 = $164&255; + $166 = (_stbi__paeth($159,$162,$165)|0); + $167 = (($166) + ($155))|0; + $168 = $167&255; + $169 = (($106) + ($$4629806)|0); + HEAP8[$169>>0] = $168; + $170 = (($$4629806) + 1)|0; + $exitcond883 = ($170|0)==($109|0); + if ($exitcond883) { + break; + } else { + $$4629806 = $170; + } + } + } + break; + } + case 5: { + $111 = ($109|0)>(0); + if ($111) { + $$5630804 = 0; + while(1) { + $171 = (($$1578) + ($$5630804)|0); + $172 = HEAP8[$171>>0]|0; + $173 = $172&255; + $174 = (($$5630804) - ($$1612))|0; + $175 = (($106) + ($174)|0); + $176 = HEAP8[$175>>0]|0; + $177 = $176&255; + $178 = $177 >>> 1; + $179 = (($178) + ($173))|0; + $180 = $179&255; + $181 = (($106) + ($$5630804)|0); + HEAP8[$181>>0] = $180; + $182 = (($$5630804) + 1)|0; + $exitcond882 = ($182|0)==($109|0); + if ($exitcond882) { + break; + } else { + $$5630804 = $182; + } + } + } + break; + } + case 6: { + $110 = ($109|0)>(0); + if ($110) { + $$6631802 = 0; + while(1) { + $183 = (($$1578) + ($$6631802)|0); + $184 = HEAP8[$183>>0]|0; + $185 = $184&255; + $186 = (($$6631802) - ($$1612))|0; + $187 = (($106) + ($186)|0); + $188 = HEAP8[$187>>0]|0; + $189 = $188&255; + $190 = (_stbi__paeth($189,0,0)|0); + $191 = (($190) + ($185))|0; + $192 = $191&255; + $193 = (($106) + ($$6631802)|0); + HEAP8[$193>>0] = $192; + $194 = (($$6631802) + 1)|0; + $exitcond881 = ($194|0)==($109|0); + if ($exitcond881) { + break; + } else { + $$6631802 = $194; + } + } + } + break; + } + default: { + } + } + $195 = (($$1578) + ($109)|0); + $$11$ph = $195; + } else { + if (!($19)) { + label = 58; + break; + } + $trunc = $$0588&255; + switch ($trunc<<24>>24) { + case 0: { + if ($43) { + $$9586 = $$1578; + } else { + $208 = ($$1612|0)>(0); + $209 = Math_imul($$6620742, $$1612)|0; + $$0614796 = $$0614793;$$2579795 = $$1578;$$2599794 = $106; + while(1) { + if ($208) { + $$7632790 = 0; + while(1) { + $210 = (($$2579795) + ($$7632790)|0); + $211 = HEAP8[$210>>0]|0; + $212 = (($$2599794) + ($$7632790)|0); + HEAP8[$212>>0] = $211; + $213 = (($$7632790) + 1)|0; + $exitcond877 = ($213|0)==($$1612|0); + if ($exitcond877) { + break; + } else { + $$7632790 = $213; + } + } + } + $214 = (($$2599794) + ($$1612)|0); + HEAP8[$214>>0] = -1; + $215 = (($$2579795) + ($$1612)|0); + $216 = (($$2599794) + ($15)|0); + $$0614 = (($$0614796) + -1)|0; + $217 = ($$0614|0)==(0); + if ($217) { + break; + } else { + $$0614796 = $$0614;$$2579795 = $215;$$2599794 = $216; + } + } + $scevgep879 = (($$1578) + ($209)|0); + $$9586 = $scevgep879; + } + break; + } + case 1: { + if ($44) { + $$9586 = $$1578; + } else { + $206 = ($$1612|0)>(0); + $207 = Math_imul($$6620742, $$1612)|0; + $$1615788 = $$1615785;$$3580787 = $$1578;$$3600786 = $106; + while(1) { + if ($206) { + $$8633782 = 0; + while(1) { + $218 = (($$3580787) + ($$8633782)|0); + $219 = HEAP8[$218>>0]|0; + $220 = $219&255; + $221 = (($$8633782) - ($15))|0; + $222 = (($$3600786) + ($221)|0); + $223 = HEAP8[$222>>0]|0; + $224 = $223&255; + $225 = (($224) + ($220))|0; + $226 = $225&255; + $227 = (($$3600786) + ($$8633782)|0); + HEAP8[$227>>0] = $226; + $228 = (($$8633782) + 1)|0; + $exitcond875 = ($228|0)==($$1612|0); + if ($exitcond875) { + break; + } else { + $$8633782 = $228; + } + } + } + $229 = (($$3600786) + ($$1612)|0); + HEAP8[$229>>0] = -1; + $230 = (($$3580787) + ($$1612)|0); + $231 = (($$3600786) + ($15)|0); + $$1615 = (($$1615788) + -1)|0; + $232 = ($$1615|0)==(0); + if ($232) { + break; + } else { + $$1615788 = $$1615;$$3580787 = $230;$$3600786 = $231; + } + } + $scevgep876 = (($$1578) + ($207)|0); + $$9586 = $scevgep876; + } + break; + } + case 2: { + if ($45) { + $$9586 = $$1578; + } else { + $204 = ($$1612|0)>(0); + $205 = Math_imul($$6620742, $$1612)|0; + $$2616780 = $$2616776;$$3592778 = $107;$$4581779 = $$1578;$$4601777 = $106; + while(1) { + if ($204) { + $$9634773 = 0; + while(1) { + $233 = (($$4581779) + ($$9634773)|0); + $234 = HEAP8[$233>>0]|0; + $235 = $234&255; + $236 = (($$3592778) + ($$9634773)|0); + $237 = HEAP8[$236>>0]|0; + $238 = $237&255; + $239 = (($238) + ($235))|0; + $240 = $239&255; + $241 = (($$4601777) + ($$9634773)|0); + HEAP8[$241>>0] = $240; + $242 = (($$9634773) + 1)|0; + $exitcond873 = ($242|0)==($$1612|0); + if ($exitcond873) { + break; + } else { + $$9634773 = $242; + } + } + } + $243 = (($$4601777) + ($$1612)|0); + HEAP8[$243>>0] = -1; + $244 = (($$4581779) + ($$1612)|0); + $245 = (($$4601777) + ($15)|0); + $246 = (($$3592778) + ($15)|0); + $$2616 = (($$2616780) + -1)|0; + $247 = ($$2616|0)==(0); + if ($247) { + break; + } else { + $$2616780 = $$2616;$$3592778 = $246;$$4581779 = $244;$$4601777 = $245; + } + } + $scevgep874 = (($$1578) + ($205)|0); + $$9586 = $scevgep874; + } + break; + } + case 3: { + if ($46) { + $$9586 = $$1578; + } else { + $202 = ($$1612|0)>(0); + $203 = Math_imul($$6620742, $$1612)|0; + $$3617771 = $$3617767;$$4593769 = $107;$$5582770 = $$1578;$$5602768 = $106; + while(1) { + if ($202) { + $$10635764 = 0; + while(1) { + $248 = (($$5582770) + ($$10635764)|0); + $249 = HEAP8[$248>>0]|0; + $250 = $249&255; + $251 = (($$4593769) + ($$10635764)|0); + $252 = HEAP8[$251>>0]|0; + $253 = $252&255; + $254 = (($$10635764) - ($15))|0; + $255 = (($$5602768) + ($254)|0); + $256 = HEAP8[$255>>0]|0; + $257 = $256&255; + $258 = (($257) + ($253))|0; + $259 = $258 >>> 1; + $260 = (($259) + ($250))|0; + $261 = $260&255; + $262 = (($$5602768) + ($$10635764)|0); + HEAP8[$262>>0] = $261; + $263 = (($$10635764) + 1)|0; + $exitcond871 = ($263|0)==($$1612|0); + if ($exitcond871) { + break; + } else { + $$10635764 = $263; + } + } + } + $264 = (($$5602768) + ($$1612)|0); + HEAP8[$264>>0] = -1; + $265 = (($$5582770) + ($$1612)|0); + $266 = (($$5602768) + ($15)|0); + $267 = (($$4593769) + ($15)|0); + $$3617 = (($$3617771) + -1)|0; + $268 = ($$3617|0)==(0); + if ($268) { + break; + } else { + $$3617771 = $$3617;$$4593769 = $267;$$5582770 = $265;$$5602768 = $266; + } + } + $scevgep872 = (($$1578) + ($203)|0); + $$9586 = $scevgep872; + } + break; + } + case 4: { + if ($47) { + $$9586 = $$1578; + } else { + $200 = ($$1612|0)>(0); + $201 = Math_imul($$6620742, $$1612)|0; + $$4618762 = $$4618758;$$5594760 = $107;$$6583761 = $$1578;$$6603759 = $106; + while(1) { + if ($200) { + $$11636755 = 0; + while(1) { + $269 = (($$6583761) + ($$11636755)|0); + $270 = HEAP8[$269>>0]|0; + $271 = $270&255; + $272 = (($$11636755) - ($15))|0; + $273 = (($$6603759) + ($272)|0); + $274 = HEAP8[$273>>0]|0; + $275 = $274&255; + $276 = (($$5594760) + ($$11636755)|0); + $277 = HEAP8[$276>>0]|0; + $278 = $277&255; + $279 = (($$5594760) + ($272)|0); + $280 = HEAP8[$279>>0]|0; + $281 = $280&255; + $282 = (_stbi__paeth($275,$278,$281)|0); + $283 = (($282) + ($271))|0; + $284 = $283&255; + $285 = (($$6603759) + ($$11636755)|0); + HEAP8[$285>>0] = $284; + $286 = (($$11636755) + 1)|0; + $exitcond869 = ($286|0)==($$1612|0); + if ($exitcond869) { + break; + } else { + $$11636755 = $286; + } + } + } + $287 = (($$6603759) + ($$1612)|0); + HEAP8[$287>>0] = -1; + $288 = (($$6583761) + ($$1612)|0); + $289 = (($$6603759) + ($15)|0); + $290 = (($$5594760) + ($15)|0); + $$4618 = (($$4618762) + -1)|0; + $291 = ($$4618|0)==(0); + if ($291) { + break; + } else { + $$4618762 = $$4618;$$5594760 = $290;$$6583761 = $288;$$6603759 = $289; + } + } + $scevgep870 = (($$1578) + ($201)|0); + $$9586 = $scevgep870; + } + break; + } + case 5: { + if ($48) { + $$9586 = $$1578; + } else { + $198 = ($$1612|0)>(0); + $199 = Math_imul($$6620742, $$1612)|0; + $$5619753 = $$5619750;$$7584752 = $$1578;$$7604751 = $106; + while(1) { + if ($198) { + $$12747 = 0; + while(1) { + $292 = (($$7584752) + ($$12747)|0); + $293 = HEAP8[$292>>0]|0; + $294 = $293&255; + $295 = (($$12747) - ($15))|0; + $296 = (($$7604751) + ($295)|0); + $297 = HEAP8[$296>>0]|0; + $298 = $297&255; + $299 = $298 >>> 1; + $300 = (($299) + ($294))|0; + $301 = $300&255; + $302 = (($$7604751) + ($$12747)|0); + HEAP8[$302>>0] = $301; + $303 = (($$12747) + 1)|0; + $exitcond867 = ($303|0)==($$1612|0); + if ($exitcond867) { + break; + } else { + $$12747 = $303; + } + } + } + $304 = (($$7604751) + ($$1612)|0); + HEAP8[$304>>0] = -1; + $305 = (($$7584752) + ($$1612)|0); + $306 = (($$7604751) + ($15)|0); + $$5619 = (($$5619753) + -1)|0; + $307 = ($$5619|0)==(0); + if ($307) { + break; + } else { + $$5619753 = $$5619;$$7584752 = $305;$$7604751 = $306; + } + } + $scevgep868 = (($$1578) + ($199)|0); + $$9586 = $scevgep868; + } + break; + } + case 6: { + if ($49) { + $$9586 = $$1578; + } else { + $196 = ($$1612|0)>(0); + $197 = Math_imul($$6620742, $$1612)|0; + $$6620745 = $$6620742;$$8585744 = $$1578;$$8605743 = $106; + while(1) { + if ($196) { + $$13739 = 0; + while(1) { + $308 = (($$8585744) + ($$13739)|0); + $309 = HEAP8[$308>>0]|0; + $310 = $309&255; + $311 = (($$13739) - ($15))|0; + $312 = (($$8605743) + ($311)|0); + $313 = HEAP8[$312>>0]|0; + $314 = $313&255; + $315 = (_stbi__paeth($314,0,0)|0); + $316 = (($315) + ($310))|0; + $317 = $316&255; + $318 = (($$8605743) + ($$13739)|0); + HEAP8[$318>>0] = $317; + $319 = (($$13739) + 1)|0; + $exitcond865 = ($319|0)==($$1612|0); + if ($exitcond865) { + break; + } else { + $$13739 = $319; + } + } + } + $320 = (($$8605743) + ($$1612)|0); + HEAP8[$320>>0] = -1; + $321 = (($$8585744) + ($$1612)|0); + $322 = (($$8605743) + ($15)|0); + $$6620 = (($$6620745) + -1)|0; + $323 = ($$6620|0)==(0); + if ($323) { + break; + } else { + $$6620745 = $$6620;$$8585744 = $321;$$8605743 = $322; + } + } + $scevgep866 = (($$1578) + ($197)|0); + $$9586 = $scevgep866; + } + break; + } + default: { + $$9586 = $$1578; + } + } + if ($brmerge894) { + $$11$ph = $$9586; + } else { + $324 = HEAP32[$21>>2]|0; + $325 = (($324) + ($51)|0); + $326 = (($$1612) + 1)|0; + $$7621798 = 0;$$9606799 = $325; + while(1) { + $327 = (($$9606799) + ($326)|0); + HEAP8[$327>>0] = -1; + $328 = (($$7621798) + 1)|0; + $329 = (($$9606799) + ($15)|0); + $exitcond880 = ($328|0)==($4|0); + if ($exitcond880) { + $$11$ph = $$9586; + break; + } else { + $$7621798 = $328;$$9606799 = $329; + } + } + } + } + $330 = (($$0623814) + 1)|0; + $331 = ($330>>>0)<($5>>>0); + if ($331) { + $$0577817 = $$11$ph;$$0608816 = $$1609;$$0611815 = $$1612;$$0623814 = $330; + } else { + break L18; + } + } + if ((label|0) == 16) { + ___assert_fail((7252|0),(6620|0),4315,(7207|0)); + // unreachable; + } + else if ((label|0) == 58) { + ___assert_fail((7278|0),(6620|0),4377,(7207|0)); + // unreachable; + } + else if ((label|0) == 105) { + _stbi__err(7295); + $$2 = 0; + return ($$2|0); + } + } + } while(0); + $332 = ($6|0)<(8); + if (!($332)) { + if (!($8)) { + $$2 = 1; + return ($$2|0); + } + $601 = Math_imul($4, $3)|0; + $602 = Math_imul($601, $5)|0; + $603 = ($602|0)==(0); + if ($603) { + $$2 = 1; + return ($$2|0); + } + $604 = HEAP32[$21>>2]|0; + $$0731 = $604;$$8622729 = 0; + while(1) { + $605 = HEAP8[$$0731>>0]|0; + $606 = $605&255; + $607 = $606 << 8; + $608 = ((($$0731)) + 1|0); + $609 = HEAP8[$608>>0]|0; + $610 = $609&255; + $611 = $607 | $610; + $612 = $611&65535; + HEAP16[$$0731>>1] = $612; + $613 = (($$8622729) + 1)|0; + $614 = ((($$0731)) + 2|0); + $exitcond = ($613|0)==($602|0); + if ($exitcond) { + $$2 = 1; + break; + } else { + $$0731 = $614;$$8622729 = $613; + } + } + return ($$2|0); + } + $333 = ($5|0)==(0); + if ($333) { + $$2 = 1; + return ($$2|0); + } + $334 = (0 - ($26))|0; + $335 = ($7|0)==(0); + $336 = (6991 + ($6)|0); + $$0568724 = (($4) + -1)|0; + $337 = ($$0568724|0)>(-1); + $$1721 = (($4) + -1)|0; + $338 = ($$1721|0)>(-1); + $339 = ($23|0)>(1); + $340 = ($23|0)>(3); + $341 = ($23|0)>(7); + $342 = (($23) + -8)|0; + $343 = $342 >>> 3; + $344 = $343 << 3; + $345 = (($344) + 8)|0; + $346 = (($342) - ($344))|0; + $347 = (($343) + ($11))|0; + $348 = (($347) + 1)|0; + $349 = (($348) - ($26))|0; + $350 = (($23) + -4)|0; + $351 = $350 >>> 2; + $352 = $351 << 2; + $353 = (($352) + 4)|0; + $354 = (($350) - ($352))|0; + $355 = (($351) + ($11))|0; + $356 = (($355) + 1)|0; + $357 = (($356) - ($26))|0; + $358 = (($23) + -2)|0; + $359 = $358 >>> 1; + $360 = $359 << 1; + $361 = (($360) + 2)|0; + $362 = (($358) - ($360))|0; + $363 = (($359) + ($11))|0; + $364 = (($363) + 1)|0; + $365 = (($364) - ($26))|0; + $$1624727 = 0;$indvars$iv = $345;$indvars$iv848 = $349;$indvars$iv851 = $353;$indvars$iv854 = $357;$indvars$iv857 = $361;$indvars$iv860 = $365; + L174: while(1) { + $366 = HEAP32[$21>>2]|0; + $367 = Math_imul($$1624727, $12)|0; + $368 = (($366) + ($367)|0); + $369 = (($368) + ($11)|0); + $370 = (($369) + ($334)|0); + if ($335) { + $371 = HEAP8[$336>>0]|0; + $372 = $371&255; + $377 = $372; + } else { + $377 = 1; + } + switch ($6|0) { + case 4: { + if ($339) { + $scevgep859 = (($366) + ($indvars$iv857)|0); + $$0571715 = $370;$$0574714 = $368;$$14713 = $23; + while(1) { + $373 = HEAP8[$$0571715>>0]|0; + $374 = $373&255; + $375 = $374 >>> 4; + $376 = Math_imul($375, $377)|0; + $378 = $376&255; + $379 = ((($$0574714)) + 1|0); + HEAP8[$$0574714>>0] = $378; + $380 = HEAP8[$$0571715>>0]|0; + $381 = $380 & 15; + $382 = $381&255; + $383 = Math_imul($382, $377)|0; + $384 = $383&255; + $385 = ((($$0574714)) + 2|0); + HEAP8[$379>>0] = $384; + $386 = (($$14713) + -2)|0; + $387 = ((($$0571715)) + 1|0); + $388 = ($386|0)>(1); + if ($388) { + $$0571715 = $387;$$0574714 = $385;$$14713 = $386; + } else { + break; + } + } + $scevgep862 = (($366) + ($indvars$iv860)|0); + $$0571$lcssa = $scevgep862;$$0574$lcssa = $scevgep859;$$14$lcssa = $362; + } else { + $$0571$lcssa = $370;$$0574$lcssa = $368;$$14$lcssa = $23; + } + $389 = ($$14$lcssa|0)==(1); + if ($389) { + $390 = HEAP8[$$0571$lcssa>>0]|0; + $391 = $390&255; + $392 = $391 >>> 4; + $393 = Math_imul($392, $377)|0; + $394 = $393&255; + HEAP8[$$0574$lcssa>>0] = $394; + } + break; + } + case 2: { + if ($340) { + $scevgep853 = (($366) + ($indvars$iv851)|0); + $$15705 = $23;$$1572707 = $370;$$1575706 = $368; + while(1) { + $395 = HEAP8[$$1572707>>0]|0; + $396 = $395&255; + $397 = $396 >>> 6; + $398 = Math_imul($397, $377)|0; + $399 = $398&255; + $400 = ((($$1575706)) + 1|0); + HEAP8[$$1575706>>0] = $399; + $401 = HEAP8[$$1572707>>0]|0; + $402 = $401&255; + $403 = $402 >>> 4; + $404 = $403 & 3; + $405 = Math_imul($404, $377)|0; + $406 = $405&255; + $407 = ((($$1575706)) + 2|0); + HEAP8[$400>>0] = $406; + $408 = HEAP8[$$1572707>>0]|0; + $409 = $408&255; + $410 = $409 >>> 2; + $411 = $410 & 3; + $412 = Math_imul($411, $377)|0; + $413 = $412&255; + $414 = ((($$1575706)) + 3|0); + HEAP8[$407>>0] = $413; + $415 = HEAP8[$$1572707>>0]|0; + $416 = $415 & 3; + $417 = $416&255; + $418 = Math_imul($417, $377)|0; + $419 = $418&255; + $420 = ((($$1575706)) + 4|0); + HEAP8[$414>>0] = $419; + $421 = (($$15705) + -4)|0; + $422 = ((($$1572707)) + 1|0); + $423 = ($421|0)>(3); + if ($423) { + $$15705 = $421;$$1572707 = $422;$$1575706 = $420; + } else { + break; + } + } + $scevgep856 = (($366) + ($indvars$iv854)|0); + $$15$lcssa = $354;$$1572$lcssa = $scevgep856;$$1575$lcssa = $scevgep853; + } else { + $$15$lcssa = $23;$$1572$lcssa = $370;$$1575$lcssa = $368; + } + $424 = ($$15$lcssa|0)>(0); + if ($424) { + $425 = HEAP8[$$1572$lcssa>>0]|0; + $426 = $425&255; + $427 = $426 >>> 6; + $428 = Math_imul($427, $377)|0; + $429 = $428&255; + HEAP8[$$1575$lcssa>>0] = $429; + $430 = ($$15$lcssa|0)==(1); + if (!($430)) { + $431 = ((($$1575$lcssa)) + 1|0); + $432 = HEAP8[$$1572$lcssa>>0]|0; + $433 = $432&255; + $434 = $433 >>> 4; + $435 = $434 & 3; + $436 = Math_imul($435, $377)|0; + $437 = $436&255; + HEAP8[$431>>0] = $437; + $438 = ($$15$lcssa|0)>(2); + if ($438) { + $439 = ((($$1575$lcssa)) + 2|0); + $440 = HEAP8[$$1572$lcssa>>0]|0; + $441 = $440&255; + $442 = $441 >>> 2; + $443 = $442 & 3; + $444 = Math_imul($443, $377)|0; + $445 = $444&255; + HEAP8[$439>>0] = $445; + } + } + } + break; + } + case 1: { + if ($341) { + $scevgep = (($366) + ($indvars$iv)|0); + $$16700 = $23;$$2573702 = $370;$$4701 = $368; + while(1) { + $446 = HEAP8[$$2573702>>0]|0; + $447 = $446&255; + $448 = $447 >>> 7; + $449 = (0 - ($448))|0; + $450 = $377 & $449; + $451 = $450&255; + $452 = ((($$4701)) + 1|0); + HEAP8[$$4701>>0] = $451; + $453 = HEAP8[$$2573702>>0]|0; + $454 = $453&255; + $455 = $454 >>> 6; + $456 = $455 & 1; + $457 = (0 - ($456))|0; + $458 = $377 & $457; + $459 = $458&255; + $460 = ((($$4701)) + 2|0); + HEAP8[$452>>0] = $459; + $461 = HEAP8[$$2573702>>0]|0; + $462 = $461&255; + $463 = $462 >>> 5; + $464 = $463 & 1; + $465 = (0 - ($464))|0; + $466 = $377 & $465; + $467 = $466&255; + $468 = ((($$4701)) + 3|0); + HEAP8[$460>>0] = $467; + $469 = HEAP8[$$2573702>>0]|0; + $470 = $469&255; + $471 = $470 >>> 4; + $472 = $471 & 1; + $473 = (0 - ($472))|0; + $474 = $377 & $473; + $475 = $474&255; + $476 = ((($$4701)) + 4|0); + HEAP8[$468>>0] = $475; + $477 = HEAP8[$$2573702>>0]|0; + $478 = $477&255; + $479 = $478 >>> 3; + $480 = $479 & 1; + $481 = (0 - ($480))|0; + $482 = $377 & $481; + $483 = $482&255; + $484 = ((($$4701)) + 5|0); + HEAP8[$476>>0] = $483; + $485 = HEAP8[$$2573702>>0]|0; + $486 = $485&255; + $487 = $486 >>> 2; + $488 = $487 & 1; + $489 = (0 - ($488))|0; + $490 = $377 & $489; + $491 = $490&255; + $492 = ((($$4701)) + 6|0); + HEAP8[$484>>0] = $491; + $493 = HEAP8[$$2573702>>0]|0; + $494 = $493&255; + $495 = $494 >>> 1; + $496 = $495 & 1; + $497 = (0 - ($496))|0; + $498 = $377 & $497; + $499 = $498&255; + $500 = ((($$4701)) + 7|0); + HEAP8[$492>>0] = $499; + $501 = HEAP8[$$2573702>>0]|0; + $502 = $501 & 1; + $503 = $502&255; + $504 = (0 - ($503))|0; + $505 = $377 & $504; + $506 = $505&255; + $507 = ((($$4701)) + 8|0); + HEAP8[$500>>0] = $506; + $508 = (($$16700) + -8)|0; + $509 = ((($$2573702)) + 1|0); + $510 = ($508|0)>(7); + if ($510) { + $$16700 = $508;$$2573702 = $509;$$4701 = $507; + } else { + break; + } + } + $scevgep850 = (($366) + ($indvars$iv848)|0); + $$16$lcssa = $346;$$2573$lcssa = $scevgep850;$$4$lcssa = $scevgep; + } else { + $$16$lcssa = $23;$$2573$lcssa = $370;$$4$lcssa = $368; + } + $511 = ($$16$lcssa|0)>(0); + if ($511) { + $512 = HEAP8[$$2573$lcssa>>0]|0; + $513 = $512&255; + $514 = $513 >>> 7; + $515 = (0 - ($514))|0; + $516 = $377 & $515; + $517 = $516&255; + HEAP8[$$4$lcssa>>0] = $517; + $518 = ($$16$lcssa|0)==(1); + if (!($518)) { + $519 = ((($$4$lcssa)) + 1|0); + $520 = HEAP8[$$2573$lcssa>>0]|0; + $521 = $520&255; + $522 = $521 >>> 6; + $523 = $522 & 1; + $524 = (0 - ($523))|0; + $525 = $377 & $524; + $526 = $525&255; + HEAP8[$519>>0] = $526; + $527 = ($$16$lcssa|0)>(2); + if ($527) { + $528 = ((($$4$lcssa)) + 2|0); + $529 = HEAP8[$$2573$lcssa>>0]|0; + $530 = $529&255; + $531 = $530 >>> 5; + $532 = $531 & 1; + $533 = (0 - ($532))|0; + $534 = $377 & $533; + $535 = $534&255; + HEAP8[$528>>0] = $535; + $536 = ($$16$lcssa|0)==(3); + if (!($536)) { + $537 = ((($$4$lcssa)) + 3|0); + $538 = HEAP8[$$2573$lcssa>>0]|0; + $539 = $538&255; + $540 = $539 >>> 4; + $541 = $540 & 1; + $542 = (0 - ($541))|0; + $543 = $377 & $542; + $544 = $543&255; + HEAP8[$537>>0] = $544; + $545 = ($$16$lcssa|0)>(4); + if ($545) { + $546 = ((($$4$lcssa)) + 4|0); + $547 = HEAP8[$$2573$lcssa>>0]|0; + $548 = $547&255; + $549 = $548 >>> 3; + $550 = $549 & 1; + $551 = (0 - ($550))|0; + $552 = $377 & $551; + $553 = $552&255; + HEAP8[$546>>0] = $553; + $554 = ($$16$lcssa|0)==(5); + if (!($554)) { + $555 = ((($$4$lcssa)) + 5|0); + $556 = HEAP8[$$2573$lcssa>>0]|0; + $557 = $556&255; + $558 = $557 >>> 2; + $559 = $558 & 1; + $560 = (0 - ($559))|0; + $561 = $377 & $560; + $562 = $561&255; + HEAP8[$555>>0] = $562; + $563 = ($$16$lcssa|0)>(6); + if ($563) { + $564 = ((($$4$lcssa)) + 6|0); + $565 = HEAP8[$$2573$lcssa>>0]|0; + $566 = $565&255; + $567 = $566 >>> 1; + $568 = $567 & 1; + $569 = (0 - ($568))|0; + $570 = $377 & $569; + $571 = $570&255; + HEAP8[$564>>0] = $571; + } + } + } + } + } + } + } + break; + } + default: { + } + } + L213: do { + if (!($17)) { + $572 = HEAP32[$21>>2]|0; + $573 = (($572) + ($367)|0); + switch ($14|0) { + case 1: { + if ($337) { + $$0568725 = $$0568724; + } else { + break L213; + } + while(1) { + $574 = $$0568725 << 1; + $575 = $574 | 1; + $576 = (($573) + ($575)|0); + HEAP8[$576>>0] = -1; + $577 = (($573) + ($$0568725)|0); + $578 = HEAP8[$577>>0]|0; + $579 = (($573) + ($574)|0); + HEAP8[$579>>0] = $578; + $$0568 = (($$0568725) + -1)|0; + $580 = ($$0568|0)>(-1); + if ($580) { + $$0568725 = $$0568; + } else { + break; + } + } + break; + } + case 3: { + if ($338) { + $$1722 = $$1721; + } else { + break L213; + } + while(1) { + $581 = $$1722 << 2; + $582 = $581 | 3; + $583 = (($573) + ($582)|0); + HEAP8[$583>>0] = -1; + $584 = ($$1722*3)|0; + $585 = (($584) + 2)|0; + $586 = (($573) + ($585)|0); + $587 = HEAP8[$586>>0]|0; + $588 = $581 | 2; + $589 = (($573) + ($588)|0); + HEAP8[$589>>0] = $587; + $590 = (($584) + 1)|0; + $591 = (($573) + ($590)|0); + $592 = HEAP8[$591>>0]|0; + $593 = $581 | 1; + $594 = (($573) + ($593)|0); + HEAP8[$594>>0] = $592; + $595 = (($573) + ($584)|0); + $596 = HEAP8[$595>>0]|0; + $597 = (($573) + ($581)|0); + HEAP8[$597>>0] = $596; + $$1 = (($$1722) + -1)|0; + $598 = ($$1|0)>(-1); + if ($598) { + $$1722 = $$1; + } else { + break; + } + } + break; + } + default: { + label = 144; + break L174; + } + } + } + } while(0); + $599 = (($$1624727) + 1)|0; + $600 = ($599>>>0)<($5>>>0); + $indvars$iv$next = (($indvars$iv) + ($12))|0; + $indvars$iv$next849 = (($indvars$iv848) + ($12))|0; + $indvars$iv$next852 = (($indvars$iv851) + ($12))|0; + $indvars$iv$next855 = (($indvars$iv854) + ($12))|0; + $indvars$iv$next858 = (($indvars$iv857) + ($12))|0; + $indvars$iv$next861 = (($indvars$iv860) + ($12))|0; + if ($600) { + $$1624727 = $599;$indvars$iv = $indvars$iv$next;$indvars$iv848 = $indvars$iv$next849;$indvars$iv851 = $indvars$iv$next852;$indvars$iv854 = $indvars$iv$next855;$indvars$iv857 = $indvars$iv$next858;$indvars$iv860 = $indvars$iv$next861; + } else { + $$2 = 1; + label = 151; + break; + } + } + if ((label|0) == 144) { + ___assert_fail((7310|0),(6620|0),4466,(7207|0)); + // unreachable; + } + else if ((label|0) == 151) { + return ($$2|0); + } + return (0)|0; +} +function _stbi__paeth($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $$ = 0, $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $ispos = 0, $ispos26 = 0, $ispos28 = 0, $neg = 0, $neg27 = 0, $neg29 = 0, $or$cond = 0; + var label = 0, sp = 0; + sp = STACKTOP; + $3 = (($1) + ($0))|0; + $4 = (($3) - ($2))|0; + $5 = (($4) - ($0))|0; + $ispos = ($5|0)>(-1); + $neg = (0 - ($5))|0; + $6 = $ispos ? $5 : $neg; + $7 = (($4) - ($1))|0; + $ispos26 = ($7|0)>(-1); + $neg27 = (0 - ($7))|0; + $8 = $ispos26 ? $7 : $neg27; + $9 = (($4) - ($2))|0; + $ispos28 = ($9|0)>(-1); + $neg29 = (0 - ($9))|0; + $10 = $ispos28 ? $9 : $neg29; + $11 = ($6|0)>($8|0); + $12 = ($6|0)>($10|0); + $or$cond = $11 | $12; + $13 = ($8|0)>($10|0); + $$ = $13 ? $2 : $1; + $$0 = $or$cond ? $$ : $0; + return ($$0|0); +} +function _stbi__do_zlib($0,$1,$2,$3,$4) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + $4 = $4|0; + var $10 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $5 = ((($0)) + 20|0); + HEAP32[$5>>2] = $1; + $6 = ((($0)) + 16|0); + HEAP32[$6>>2] = $1; + $7 = (($1) + ($2)|0); + $8 = ((($0)) + 24|0); + HEAP32[$8>>2] = $7; + $9 = ((($0)) + 28|0); + HEAP32[$9>>2] = $3; + $10 = (_stbi__parse_zlib($0,$4)|0); + return ($10|0); +} +function _stbi__parse_zlib($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; + var $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $2 = ($1|0)==(0); + if (!($2)) { + $3 = (_stbi__parse_zlib_header($0)|0); + $4 = ($3|0)==(0); + if ($4) { + $$0 = 0; + return ($$0|0); + } + } + $5 = ((($0)) + 8|0); + HEAP32[$5>>2] = 0; + $6 = ((($0)) + 12|0); + HEAP32[$6>>2] = 0; + $7 = ((($0)) + 32|0); + $8 = ((($0)) + 2052|0); + L5: while(1) { + $9 = (_stbi__zreceive($0,1)|0); + $10 = (_stbi__zreceive($0,2)|0); + switch ($10|0) { + case 3: { + $$0 = 0; + label = 11; + break L5; + break; + } + case 0: { + $11 = (_stbi__parse_uncompressed_block($0)|0); + $12 = ($11|0)==(0); + if ($12) { + $$0 = 0; + label = 11; + break L5; + } + break; + } + case 1: { + $13 = (_stbi__zbuild_huffman($7,7321,288)|0); + $14 = ($13|0)==(0); + if ($14) { + $$0 = 0; + label = 11; + break L5; + } + $15 = (_stbi__zbuild_huffman($8,7609,32)|0); + $16 = ($15|0)==(0); + if ($16) { + $$0 = 0; + label = 11; + break L5; + } else { + label = 9; + } + break; + } + default: { + $17 = (_stbi__compute_huffman_codes($0)|0); + $18 = ($17|0)==(0); + if ($18) { + $$0 = 0; + label = 11; + break L5; + } else { + label = 9; + } + } + } + if ((label|0) == 9) { + label = 0; + $19 = (_stbi__parse_huffman_block($0)|0); + $20 = ($19|0)==(0); + if ($20) { + $$0 = 0; + label = 11; + break; + } + } + $21 = ($9|0)==(0); + if (!($21)) { + $$0 = 1; + label = 11; + break; + } + } + if ((label|0) == 11) { + return ($$0|0); + } + return (0)|0; +} +function _stbi__parse_zlib_header($0) { + $0 = $0|0; + var $$0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = (_stbi__zget8($0)|0); + $2 = $1&255; + $3 = $2 & 15; + $4 = (_stbi__zget8($0)|0); + $5 = $4&255; + $6 = $2 << 8; + $7 = $6 | $5; + $8 = (($7>>>0) % 31)&-1; + $9 = ($8|0)==(0); + if (!($9)) { + _stbi__err(7975); + $$0 = 0; + return ($$0|0); + } + $10 = $5 & 32; + $11 = ($10|0)==(0); + if (!($11)) { + _stbi__err(7991); + $$0 = 0; + return ($$0|0); + } + $12 = ($3|0)==(8); + if ($12) { + $$0 = 1; + return ($$0|0); + } + _stbi__err(8006); + $$0 = 0; + return ($$0|0); +} +function _stbi__zreceive($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $10 = 0, $11 = 0, $12 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $2 = ((($0)) + 8|0); + $3 = HEAP32[$2>>2]|0; + $4 = ($3|0)<($1|0); + if ($4) { + _stbi__fill_bits($0); + } + $5 = ((($0)) + 12|0); + $6 = HEAP32[$5>>2]|0; + $7 = 1 << $1; + $8 = (($7) + -1)|0; + $9 = $6 & $8; + $10 = $6 >>> $1; + HEAP32[$5>>2] = $10; + $11 = HEAP32[$2>>2]|0; + $12 = (($11) - ($1))|0; + HEAP32[$2>>2] = $12; + return ($9|0); +} +function _stbi__parse_uncompressed_block($0) { + $0 = $0|0; + var $$0$lcssa = 0, $$034 = 0, $$037 = 0, $$136 = 0, $$lcssa = 0, $$ph = 0, $$pr = 0, $$promoted = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0; + var $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0; + var $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0; + var $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $exitcond47 = 0, $smax = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $1 = sp; + $2 = ((($0)) + 8|0); + $3 = HEAP32[$2>>2]|0; + $4 = $3 & 7; + $5 = ($4|0)==(0); + if ($5) { + $$ph = $3; + } else { + (_stbi__zreceive($0,$4)|0); + $$pr = HEAP32[$2>>2]|0; + $$ph = $$pr; + } + $6 = ($$ph|0)>(0); + if ($6) { + $7 = ((($0)) + 12|0); + $$promoted = HEAP32[$7>>2]|0; + $8 = $$ph ^ -1; + $9 = ($8|0)>(-9); + $smax = $9 ? $8 : -9; + $10 = (($$ph) + ($smax))|0; + $11 = (($10) + 8)|0; + $12 = $11 >>> 3; + $13 = (($12) + 1)|0; + $14 = $12 << 3; + $$037 = 0;$16 = $$promoted; + while(1) { + $15 = $16&255; + $17 = (($$037) + 1)|0; + $18 = (($1) + ($$037)|0); + HEAP8[$18>>0] = $15; + $19 = $16 >>> 8; + $exitcond47 = ($17|0)==($13|0); + if ($exitcond47) { + break; + } else { + $$037 = $17;$16 = $19; + } + } + $20 = (($$ph) + -8)|0; + $21 = (($20) - ($14))|0; + HEAP32[$7>>2] = $19; + HEAP32[$2>>2] = $21; + $$0$lcssa = $13;$$lcssa = $21; + } else { + $$0$lcssa = 0;$$lcssa = $$ph; + } + $22 = ($$lcssa|0)==(0); + if (!($22)) { + ___assert_fail((7897|0),(6620|0),4033,(7914|0)); + // unreachable; + } + $23 = ($$0$lcssa|0)<(4); + if ($23) { + $$136 = $$0$lcssa; + while(1) { + $24 = (_stbi__zget8($0)|0); + $25 = (($$136) + 1)|0; + $26 = (($1) + ($$136)|0); + HEAP8[$26>>0] = $24; + $exitcond = ($25|0)==(4); + if ($exitcond) { + break; + } else { + $$136 = $25; + } + } + } + $27 = ((($1)) + 1|0); + $28 = HEAP8[$27>>0]|0; + $29 = $28&255; + $30 = $29 << 8; + $31 = HEAP8[$1>>0]|0; + $32 = $31&255; + $33 = $30 | $32; + $34 = ((($1)) + 3|0); + $35 = HEAP8[$34>>0]|0; + $36 = $35&255; + $37 = $36 << 8; + $38 = ((($1)) + 2|0); + $39 = HEAP8[$38>>0]|0; + $40 = $39&255; + $41 = $37 | $40; + $42 = $33 ^ 65535; + $43 = ($41|0)==($42|0); + if (!($43)) { + _stbi__err(7945); + $$034 = 0; + STACKTOP = sp;return ($$034|0); + } + $44 = HEAP32[$0>>2]|0; + $45 = (($44) + ($33)|0); + $46 = ((($0)) + 4|0); + $47 = HEAP32[$46>>2]|0; + $48 = ($45>>>0)>($47>>>0); + if ($48) { + _stbi__err(7958); + $$034 = 0; + STACKTOP = sp;return ($$034|0); + } + $49 = ((($0)) + 16|0); + $50 = HEAP32[$49>>2]|0; + $51 = (($50) + ($33)|0); + $52 = ((($0)) + 24|0); + $53 = HEAP32[$52>>2]|0; + $54 = ($51>>>0)>($53>>>0); + if ($54) { + $55 = (_stbi__zexpand($0,$50,$33)|0); + $56 = ($55|0)==(0); + if ($56) { + $$034 = 0; + STACKTOP = sp;return ($$034|0); + } + } + $57 = HEAP32[$49>>2]|0; + $58 = HEAP32[$0>>2]|0; + _memcpy(($57|0),($58|0),($33|0))|0; + $59 = HEAP32[$0>>2]|0; + $60 = (($59) + ($33)|0); + HEAP32[$0>>2] = $60; + $61 = HEAP32[$49>>2]|0; + $62 = (($61) + ($33)|0); + HEAP32[$49>>2] = $62; + $$034 = 1; + STACKTOP = sp;return ($$034|0); +} +function _stbi__zbuild_huffman($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $$075 = 0, $$07688 = 0, $$07785 = 0, $$07884 = 0, $$081 = 0, $$286 = 0, $$382 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0; + var $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0; + var $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0; + var $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0; + var $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0; + var $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $exitcond = 0, $exitcond91 = 0, $or$cond = 0, dest = 0, label = 0, sp = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 144|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(144|0); + $3 = sp + 72|0; + $4 = sp; + dest=$4; stop=dest+68|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); + _memset(($0|0),0,1024)|0; + $5 = ($2|0)>(0); + if ($5) { + $$07688 = 0; + while(1) { + $6 = (($1) + ($$07688)|0); + $7 = HEAP8[$6>>0]|0; + $8 = $7&255; + $9 = (($4) + ($8<<2)|0); + $10 = HEAP32[$9>>2]|0; + $11 = (($10) + 1)|0; + HEAP32[$9>>2] = $11; + $12 = (($$07688) + 1)|0; + $exitcond91 = ($12|0)==($2|0); + if ($exitcond91) { + break; + } else { + $$07688 = $12; + } + } + } + HEAP32[$4>>2] = 0; + $16 = ((($4)) + 4|0); + $17 = HEAP32[$16>>2]|0; + $18 = ($17|0)>(2); + if (!($18)) { + $13 = ((($4)) + 8|0); + $14 = HEAP32[$13>>2]|0; + $15 = ($14|0)>(4); + if (!($15)) { + $69 = ((($4)) + 12|0); + $70 = HEAP32[$69>>2]|0; + $71 = ($70|0)>(8); + if (!($71)) { + $72 = ((($4)) + 16|0); + $73 = HEAP32[$72>>2]|0; + $74 = ($73|0)>(16); + if (!($74)) { + $75 = ((($4)) + 20|0); + $76 = HEAP32[$75>>2]|0; + $77 = ($76|0)>(32); + if (!($77)) { + $78 = ((($4)) + 24|0); + $79 = HEAP32[$78>>2]|0; + $80 = ($79|0)>(64); + if (!($80)) { + $81 = ((($4)) + 28|0); + $82 = HEAP32[$81>>2]|0; + $83 = ($82|0)>(128); + if (!($83)) { + $84 = ((($4)) + 32|0); + $85 = HEAP32[$84>>2]|0; + $86 = ($85|0)>(256); + if (!($86)) { + $87 = ((($4)) + 36|0); + $88 = HEAP32[$87>>2]|0; + $89 = ($88|0)>(512); + if (!($89)) { + $90 = ((($4)) + 40|0); + $91 = HEAP32[$90>>2]|0; + $92 = ($91|0)>(1024); + if (!($92)) { + $93 = ((($4)) + 44|0); + $94 = HEAP32[$93>>2]|0; + $95 = ($94|0)>(2048); + if (!($95)) { + $96 = ((($4)) + 48|0); + $97 = HEAP32[$96>>2]|0; + $98 = ($97|0)>(4096); + if (!($98)) { + $99 = ((($4)) + 52|0); + $100 = HEAP32[$99>>2]|0; + $101 = ($100|0)>(8192); + if (!($101)) { + $102 = ((($4)) + 56|0); + $103 = HEAP32[$102>>2]|0; + $104 = ($103|0)>(16384); + if (!($104)) { + $105 = ((($4)) + 60|0); + $106 = HEAP32[$105>>2]|0; + $107 = ($106|0)>(32768); + if (!($107)) { + $$07785 = 0;$$07884 = 0;$$286 = 1; + while(1) { + $19 = (($3) + ($$286<<2)|0); + HEAP32[$19>>2] = $$07884; + $20 = $$07884&65535; + $21 = (((($0)) + 1024|0) + ($$286<<1)|0); + HEAP16[$21>>1] = $20; + $22 = $$07785&65535; + $23 = (((($0)) + 1124|0) + ($$286<<1)|0); + HEAP16[$23>>1] = $22; + $24 = (($4) + ($$286<<2)|0); + $25 = HEAP32[$24>>2]|0; + $26 = (($25) + ($$07884))|0; + $27 = ($25|0)!=(0); + $28 = 1 << $$286; + $29 = ($26|0)>($28|0); + $or$cond = $27 & $29; + if ($or$cond) { + label = 7; + break; + } + $30 = (16 - ($$286))|0; + $31 = $26 << $30; + $32 = (((($0)) + 1056|0) + ($$286<<2)|0); + HEAP32[$32>>2] = $31; + $33 = $26 << 1; + $34 = (($25) + ($$07785))|0; + $35 = (($$286) + 1)|0; + $36 = ($35|0)<(16); + if ($36) { + $$07785 = $34;$$07884 = $33;$$286 = $35; + } else { + break; + } + } + if ((label|0) == 7) { + _stbi__err(7835); + $$075 = 0; + STACKTOP = sp;return ($$075|0); + } + $37 = ((($0)) + 1120|0); + HEAP32[$37>>2] = 65536; + $38 = ($2|0)>(0); + if ($38) { + $$382 = 0; + } else { + $$075 = 1; + STACKTOP = sp;return ($$075|0); + } + while(1) { + $39 = (($1) + ($$382)|0); + $40 = HEAP8[$39>>0]|0; + $41 = $40&255; + $42 = ($40<<24>>24)==(0); + if (!($42)) { + $43 = (($3) + ($41<<2)|0); + $44 = HEAP32[$43>>2]|0; + $45 = (((($0)) + 1024|0) + ($41<<1)|0); + $46 = HEAP16[$45>>1]|0; + $47 = $46&65535; + $48 = (($44) - ($47))|0; + $49 = (((($0)) + 1124|0) + ($41<<1)|0); + $50 = HEAP16[$49>>1]|0; + $51 = $50&65535; + $52 = (($48) + ($51))|0; + $53 = $41 << 9; + $54 = $53 | $$382; + $55 = $54&65535; + $56 = (((($0)) + 1156|0) + ($52)|0); + HEAP8[$56>>0] = $40; + $57 = $$382&65535; + $58 = (((($0)) + 1444|0) + ($52<<1)|0); + HEAP16[$58>>1] = $57; + $59 = ($40&255)<(10); + do { + if ($59) { + $60 = (_stbi__bit_reverse($44,$41)|0); + $61 = ($60|0)<(512); + if (!($61)) { + break; + } + $62 = 1 << $41; + $$081 = $60; + while(1) { + $63 = (($0) + ($$081<<1)|0); + HEAP16[$63>>1] = $55; + $64 = (($$081) + ($62))|0; + $65 = ($64|0)<(512); + if ($65) { + $$081 = $64; + } else { + break; + } + } + } + } while(0); + $66 = HEAP32[$43>>2]|0; + $67 = (($66) + 1)|0; + HEAP32[$43>>2] = $67; + } + $68 = (($$382) + 1)|0; + $exitcond = ($68|0)==($2|0); + if ($exitcond) { + $$075 = 1; + break; + } else { + $$382 = $68; + } + } + STACKTOP = sp;return ($$075|0); + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + _stbi__err(7887); + $$075 = 0; + STACKTOP = sp;return ($$075|0); +} +function _stbi__compute_huffman_codes($0) { + $0 = $0|0; + var $$ = 0, $$0 = 0, $$061 = 0, $$06579 = 0, $$066$be = 0, $$066$lcssa = 0, $$06678 = 0, $$4 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0; + var $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0; + var $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $exitcond = 0, $not$ = 0, dest = 0; + var label = 0, sp = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 2496|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(2496|0); + $1 = sp; + $2 = sp + 2039|0; + $3 = sp + 2020|0; + $4 = (_stbi__zreceive($0,5)|0); + $5 = (($4) + 257)|0; + $6 = (_stbi__zreceive($0,5)|0); + $7 = (($6) + 1)|0; + $8 = (_stbi__zreceive($0,4)|0); + $9 = (($8) + 4)|0; + $10 = (($7) + ($5))|0; + dest=$3; stop=dest+19|0; do { HEAP8[dest>>0]=0|0; dest=dest+1|0; } while ((dest|0) < (stop|0)); + $11 = ($9|0)>(0); + if ($11) { + $$06579 = 0; + while(1) { + $12 = (_stbi__zreceive($0,3)|0); + $13 = $12&255; + $14 = (7816 + ($$06579)|0); + $15 = HEAP8[$14>>0]|0; + $16 = $15&255; + $17 = (($3) + ($16)|0); + HEAP8[$17>>0] = $13; + $18 = (($$06579) + 1)|0; + $exitcond = ($18|0)==($9|0); + if ($exitcond) { + break; + } else { + $$06579 = $18; + } + } + } + $19 = (_stbi__zbuild_huffman($1,$3,19)|0); + $20 = ($19|0)==(0); + if ($20) { + $$4 = 0; + STACKTOP = sp;return ($$4|0); + } + $21 = ($10|0)>(0); + L8: do { + if ($21) { + $$06678 = 0; + L9: while(1) { + $22 = (_stbi__zhuffman_decode($0,$1)|0); + $23 = ($22>>>0)>(18); + if ($23) { + label = 6; + break; + } + $24 = ($22|0)<(16); + if ($24) { + $25 = $22&255; + $26 = (($$06678) + 1)|0; + $27 = (($2) + ($$06678)|0); + HEAP8[$27>>0] = $25; + $$066$be = $26; + } else { + switch ($22|0) { + case 16: { + $28 = (_stbi__zreceive($0,2)|0); + $29 = ($$06678|0)==(0); + if ($29) { + label = 11; + break L9; + } + $30 = (($28) + 3)|0; + $31 = (($$06678) + -1)|0; + $32 = (($2) + ($31)|0); + $33 = HEAP8[$32>>0]|0; + $$0 = $33;$$061 = $30; + break; + } + case 17: { + $34 = (_stbi__zreceive($0,3)|0); + $35 = (($34) + 3)|0; + $$0 = 0;$$061 = $35; + break; + } + case 18: { + $36 = (_stbi__zreceive($0,7)|0); + $37 = (($36) + 11)|0; + $$0 = 0;$$061 = $37; + break; + } + default: { + label = 14; + break L9; + } + } + $38 = (($10) - ($$06678))|0; + $39 = ($38|0)<($$061|0); + if ($39) { + label = 17; + break; + } + $40 = (($2) + ($$06678)|0); + _memset(($40|0),($$0|0),($$061|0))|0; + $41 = (($$061) + ($$06678))|0; + $$066$be = $41; + } + $42 = ($10|0)>($$066$be|0); + if ($42) { + $$06678 = $$066$be; + } else { + $$066$lcssa = $$066$be; + break L8; + } + } + if ((label|0) == 6) { + _stbi__err(7835); + $$4 = 0; + STACKTOP = sp;return ($$4|0); + } + else if ((label|0) == 11) { + _stbi__err(7835); + $$4 = 0; + STACKTOP = sp;return ($$4|0); + } + else if ((label|0) == 14) { + ___assert_fail((7851|0),(6620|0),4006,(7859|0)); + // unreachable; + } + else if ((label|0) == 17) { + _stbi__err(7835); + $$4 = 0; + STACKTOP = sp;return ($$4|0); + } + } else { + $$066$lcssa = 0; + } + } while(0); + $43 = ($10|0)==($$066$lcssa|0); + if (!($43)) { + _stbi__err(7835); + $$4 = 0; + STACKTOP = sp;return ($$4|0); + } + $44 = ((($0)) + 32|0); + $45 = (_stbi__zbuild_huffman($44,$2,$5)|0); + $46 = ($45|0)==(0); + if ($46) { + $$4 = 0; + STACKTOP = sp;return ($$4|0); + } + $47 = ((($0)) + 2052|0); + $48 = (($2) + ($5)|0); + $49 = (_stbi__zbuild_huffman($47,$48,$7)|0); + $not$ = ($49|0)!=(0); + $$ = $not$&1; + $$4 = $$; + STACKTOP = sp;return ($$4|0); +} +function _stbi__parse_huffman_block($0) { + $0 = $0|0; + var $$063 = 0, $$064 = 0, $$067 = 0, $$070 = 0, $$171 = 0, $$266 = 0, $$272 = 0, $$3$ph = 0, $$5 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0; + var $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0; + var $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0; + var $56 = 0, $57 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $scevgep = 0, $scevgep92 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = ((($0)) + 16|0); + $2 = HEAP32[$1>>2]|0; + $3 = ((($0)) + 32|0); + $4 = ((($0)) + 24|0); + $5 = ((($0)) + 2052|0); + $6 = ((($0)) + 20|0); + $7 = ((($0)) + 24|0); + $$070 = $2; + while(1) { + $10 = (_stbi__zhuffman_decode($0,$3)|0); + $11 = ($10|0)<(256); + if ($11) { + $12 = ($10|0)<(0); + if ($12) { + label = 6; + break; + } + $13 = HEAP32[$4>>2]|0; + $14 = ($$070>>>0)<($13>>>0); + if ($14) { + $$171 = $$070; + } else { + $15 = (_stbi__zexpand($0,$$070,1)|0); + $16 = ($15|0)==(0); + if ($16) { + $$3$ph = 0; + label = 28; + break; + } + $17 = HEAP32[$1>>2]|0; + $$171 = $17; + } + $18 = $10&255; + $19 = ((($$171)) + 1|0); + HEAP8[$$171>>0] = $18; + $$070 = $19; + continue; + } + $20 = ($10|0)==(256); + if ($20) { + label = 12; + break; + } + $21 = (($10) + -257)|0; + $22 = (3188 + ($21<<2)|0); + $23 = HEAP32[$22>>2]|0; + $24 = (($10) + -265)|0; + $25 = ($24>>>0)<(20); + if ($25) { + $26 = (3312 + ($21<<2)|0); + $27 = HEAP32[$26>>2]|0; + $28 = (_stbi__zreceive($0,$27)|0); + $29 = (($28) + ($23))|0; + $$064 = $29; + } else { + $$064 = $23; + } + $30 = (_stbi__zhuffman_decode($0,$5)|0); + $31 = ($30|0)<(0); + if ($31) { + label = 16; + break; + } + $32 = (3436 + ($30<<2)|0); + $33 = HEAP32[$32>>2]|0; + $34 = (($30) + -4)|0; + $35 = ($34>>>0)<(26); + if ($35) { + $36 = (3564 + ($30<<2)|0); + $37 = HEAP32[$36>>2]|0; + $38 = (_stbi__zreceive($0,$37)|0); + $39 = (($38) + ($33))|0; + $$063 = $39; + } else { + $$063 = $33; + } + $40 = HEAP32[$6>>2]|0; + $41 = $$070; + $42 = (($41) - ($40))|0; + $43 = ($42|0)<($$063|0); + if ($43) { + label = 20; + break; + } + $44 = (($$070) + ($$064)|0); + $45 = HEAP32[$7>>2]|0; + $46 = ($44>>>0)>($45>>>0); + if ($46) { + $47 = (_stbi__zexpand($0,$$070,$$064)|0); + $48 = ($47|0)==(0); + if ($48) { + $$3$ph = 0; + label = 28; + break; + } + $49 = HEAP32[$1>>2]|0; + $$272 = $49; + } else { + $$272 = $$070; + } + $50 = (0 - ($$063))|0; + $9 = (($$272) + ($50)|0); + $51 = ($$063|0)==(1); + $52 = ($$064|0)!=(0); + if ($51) { + if (!($52)) { + $$070 = $$272; + continue; + } + $8 = HEAP8[$9>>0]|0; + _memset(($$272|0),($8|0),($$064|0))|0; + $scevgep92 = (($$272) + ($$064)|0); + $$070 = $scevgep92; + continue; + } + if ($52) { + $$067 = $9;$$266 = $$064;$$5 = $$272; + } else { + $$070 = $$272; + continue; + } + while(1) { + $53 = ((($$067)) + 1|0); + $54 = HEAP8[$$067>>0]|0; + $55 = ((($$5)) + 1|0); + HEAP8[$$5>>0] = $54; + $56 = (($$266) + -1)|0; + $57 = ($56|0)==(0); + if ($57) { + break; + } else { + $$067 = $53;$$266 = $56;$$5 = $55; + } + } + $scevgep = (($$272) + ($$064)|0); + $$070 = $scevgep; + } + if ((label|0) == 6) { + _stbi__err(7641); + $$3$ph = 0; + return ($$3$ph|0); + } + else if ((label|0) == 12) { + HEAP32[$1>>2] = $$070; + $$3$ph = 1; + return ($$3$ph|0); + } + else if ((label|0) == 16) { + _stbi__err(7641); + $$3$ph = 0; + return ($$3$ph|0); + } + else if ((label|0) == 20) { + _stbi__err(7658); + $$3$ph = 0; + return ($$3$ph|0); + } + else if ((label|0) == 28) { + return ($$3$ph|0); + } + return (0)|0; +} +function _stbi__zhuffman_decode($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $$0 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $2 = ((($0)) + 8|0); + $3 = HEAP32[$2>>2]|0; + $4 = ($3|0)<(16); + if ($4) { + _stbi__fill_bits($0); + } + $5 = ((($0)) + 12|0); + $6 = HEAP32[$5>>2]|0; + $7 = $6 & 511; + $8 = (($1) + ($7<<1)|0); + $9 = HEAP16[$8>>1]|0; + $10 = $9&65535; + $11 = ($9<<16>>16)==(0); + if ($11) { + $17 = (_stbi__zhuffman_decode_slowpath($0,$1)|0); + $$0 = $17; + return ($$0|0); + } else { + $12 = $10 >>> 9; + $13 = $6 >>> $12; + HEAP32[$5>>2] = $13; + $14 = HEAP32[$2>>2]|0; + $15 = (($14) - ($12))|0; + HEAP32[$2>>2] = $15; + $16 = $10 & 511; + $$0 = $16; + return ($$0|0); + } + return (0)|0; +} +function _stbi__zexpand($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $$0 = 0, $$029 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0; + var $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $3 = ((($0)) + 16|0); + HEAP32[$3>>2] = $1; + $4 = ((($0)) + 28|0); + $5 = HEAP32[$4>>2]|0; + $6 = ($5|0)==(0); + if ($6) { + _stbi__err(7667); + $$0 = 0; + return ($$0|0); + } + $7 = ((($0)) + 20|0); + $8 = HEAP32[$7>>2]|0; + $9 = $1; + $10 = $8; + $11 = (($9) - ($10))|0; + $12 = ((($0)) + 24|0); + $13 = HEAP32[$12>>2]|0; + $14 = (($13) - ($10))|0; + $15 = (($11) + ($2))|0; + $$029 = $14; + while(1) { + $16 = ($15|0)>($$029|0); + $17 = $$029 << 1; + if ($16) { + $$029 = $17; + } else { + break; + } + } + $18 = (_realloc($8,$$029)|0); + $19 = ($18|0)==(0|0); + if ($19) { + _stbi__err(6585); + $$0 = 0; + return ($$0|0); + } else { + HEAP32[$7>>2] = $18; + $20 = (($18) + ($11)|0); + HEAP32[$3>>2] = $20; + $21 = (($18) + ($$029)|0); + HEAP32[$12>>2] = $21; + $$0 = 1; + return ($$0|0); + } + return (0)|0; +} +function _stbi__fill_bits($0) { + $0 = $0|0; + var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = ((($0)) + 12|0); + $2 = ((($0)) + 8|0); + while(1) { + $3 = HEAP32[$1>>2]|0; + $4 = HEAP32[$2>>2]|0; + $5 = 1 << $4; + $6 = ($3>>>0)<($5>>>0); + if (!($6)) { + label = 3; + break; + } + $7 = (_stbi__zget8($0)|0); + $8 = $7&255; + $9 = HEAP32[$2>>2]|0; + $10 = $8 << $9; + $11 = HEAP32[$1>>2]|0; + $12 = $11 | $10; + HEAP32[$1>>2] = $12; + $13 = (($9) + 8)|0; + HEAP32[$2>>2] = $13; + $14 = ($13|0)<(25); + if (!($14)) { + label = 5; + break; + } + } + if ((label|0) == 3) { + ___assert_fail((7763|0),(6620|0),3848,(7800|0)); + // unreachable; + } + else if ((label|0) == 5) { + return; + } +} +function _stbi__zhuffman_decode_slowpath($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $$0 = 0, $$025 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $2 = ((($0)) + 12|0); + $3 = HEAP32[$2>>2]|0; + $4 = (_stbi__bit_reverse($3,16)|0); + $$025 = 10; + while(1) { + $5 = (((($1)) + 1056|0) + ($$025<<2)|0); + $6 = HEAP32[$5>>2]|0; + $7 = ($4|0)<($6|0); + $8 = (($$025) + 1)|0; + if ($7) { + break; + } else { + $$025 = $8; + } + } + $9 = ($$025|0)==(16); + if ($9) { + $$0 = -1; + return ($$0|0); + } + $10 = (16 - ($$025))|0; + $11 = $4 >> $10; + $12 = (((($1)) + 1024|0) + ($$025<<1)|0); + $13 = HEAP16[$12>>1]|0; + $14 = $13&65535; + $15 = (($11) - ($14))|0; + $16 = (((($1)) + 1124|0) + ($$025<<1)|0); + $17 = HEAP16[$16>>1]|0; + $18 = $17&65535; + $19 = (($15) + ($18))|0; + $20 = (((($1)) + 1156|0) + ($19)|0); + $21 = HEAP8[$20>>0]|0; + $22 = $21&255; + $23 = ($22|0)==($$025|0); + if (!($23)) { + ___assert_fail((7687|0),(6620|0),3876,(7703|0)); + // unreachable; + } + $24 = HEAP32[$2>>2]|0; + $25 = $24 >>> $$025; + HEAP32[$2>>2] = $25; + $26 = ((($0)) + 8|0); + $27 = HEAP32[$26>>2]|0; + $28 = (($27) - ($$025))|0; + HEAP32[$26>>2] = $28; + $29 = (((($1)) + 1444|0) + ($19<<1)|0); + $30 = HEAP16[$29>>1]|0; + $31 = $30&65535; + $$0 = $31; + return ($$0|0); +} +function _stbi__bit_reverse($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; + sp = STACKTOP; + $2 = ($1|0)<(17); + if ($2) { + $3 = (_stbi__bitreverse16($0)|0); + $4 = (16 - ($1))|0; + $5 = $3 >> $4; + return ($5|0); + } else { + ___assert_fail((7734|0),(6620|0),3766,(7745|0)); + // unreachable; + } + return (0)|0; +} +function _stbi__bitreverse16($0) { + $0 = $0|0; + var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; + var sp = 0; + sp = STACKTOP; + $1 = $0 >>> 1; + $2 = $1 & 21845; + $3 = $0 << 1; + $4 = $3 & 43690; + $5 = $2 | $4; + $6 = $5 >>> 2; + $7 = $6 & 13107; + $8 = $5 << 2; + $9 = $8 & 52428; + $10 = $7 | $9; + $11 = $10 >>> 4; + $12 = $11 & 3855; + $13 = $10 << 4; + $14 = $13 & 61680; + $15 = $12 | $14; + $16 = $15 >>> 8; + $17 = $15 << 8; + $18 = $17 & 65280; + $19 = $18 | $16; + return ($19|0); +} +function _stbi__zget8($0) { + $0 = $0|0; + var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = HEAP32[$0>>2]|0; + $2 = ((($0)) + 4|0); + $3 = HEAP32[$2>>2]|0; + $4 = ($1>>>0)<($3>>>0); + if (!($4)) { + $$0 = 0; + return ($$0|0); + } + $5 = ((($1)) + 1|0); + HEAP32[$0>>2] = $5; + $6 = HEAP8[$1>>0]|0; + $$0 = $6; + return ($$0|0); +} +function _stbi__refill_buffer($0) { + $0 = $0|0; + var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = ((($0)) + 16|0); + $2 = HEAP32[$1>>2]|0; + $3 = ((($0)) + 28|0); + $4 = HEAP32[$3>>2]|0; + $5 = ((($0)) + 40|0); + $6 = ((($0)) + 36|0); + $7 = HEAP32[$6>>2]|0; + $8 = (FUNCTION_TABLE_iiii[$2 & 15]($4,$5,$7)|0); + $9 = ($8|0)==(0); + if ($9) { + $10 = ((($0)) + 32|0); + HEAP32[$10>>2] = 0; + $11 = ((($0)) + 168|0); + HEAP32[$11>>2] = $5; + $12 = ((($0)) + 41|0); + $13 = ((($0)) + 172|0); + HEAP32[$13>>2] = $12; + HEAP8[$5>>0] = 0; + return; + } else { + $14 = ((($0)) + 168|0); + HEAP32[$14>>2] = $5; + $15 = (((($0)) + 40|0) + ($8)|0); + $16 = ((($0)) + 172|0); + HEAP32[$16>>2] = $15; + return; + } +} +function _stbi__rewind($0) { + $0 = $0|0; + var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = ((($0)) + 176|0); + $2 = HEAP32[$1>>2]|0; + $3 = ((($0)) + 168|0); + HEAP32[$3>>2] = $2; + $4 = ((($0)) + 180|0); + $5 = HEAP32[$4>>2]|0; + $6 = ((($0)) + 172|0); + HEAP32[$6>>2] = $5; + return; +} +function _stbi__hdr_gettoken($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $$014 = 0, $$1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; + sp = STACKTOP; + $$014 = 0; + while(1) { + $2 = (_stbi__get8($0)|0); + $3 = (_stbi__at_eof($0)|0); + $4 = ($3|0)!=(0); + $5 = ($2<<24>>24)==(10); + $or$cond = $5 | $4; + if ($or$cond) { + $$1 = $$014; + break; + } + $6 = (($$014) + 1)|0; + $7 = (($1) + ($$014)|0); + HEAP8[$7>>0] = $2; + $8 = ($6|0)==(1023); + if ($8) { + label = 4; + break; + } else { + $$014 = $6; + } + } + L4: do { + if ((label|0) == 4) { + while(1) { + label = 0; + $9 = (_stbi__at_eof($0)|0); + $10 = ($9|0)==(0); + if (!($10)) { + $$1 = $6; + break L4; + } + $11 = (_stbi__get8($0)|0); + $12 = ($11<<24>>24)==(10); + if ($12) { + $$1 = $6; + break; + } else { + label = 4; + } + } + } + } while(0); + $13 = (($1) + ($$1)|0); + HEAP8[$13>>0] = 0; + return ($1|0); +} +function _stbi__hdr_convert($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $$sink = 0.0, $$sink1 = 0, $$sink30 = 0.0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0; + var $27 = 0, $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0.0; + var $9 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + $3 = ((($1)) + 3|0); + $4 = HEAP8[$3>>0]|0; + $5 = ($4<<24>>24)==(0); + if ($5) { + switch ($2|0) { + case 4: { + $38 = ((($0)) + 12|0); + HEAPF32[$38>>2] = 1.0; + label = 10; + break; + } + case 3: { + label = 10; + break; + } + case 2: { + $$sink30 = 1.0; + label = 11; + break; + } + case 1: { + break; + } + default: { + return; + } + } + if ((label|0) == 10) { + $39 = ((($0)) + 8|0); + HEAPF32[$39>>2] = 0.0; + $$sink30 = 0.0; + label = 11; + } + if ((label|0) == 11) { + $40 = ((($0)) + 4|0); + HEAPF32[$40>>2] = $$sink30; + } + HEAPF32[$0>>2] = 0.0; + return; + } + $6 = $4&255; + $7 = (($6) + -136)|0; + $8 = (+_ldexp(1.0,$7)); + $9 = $8; + $10 = ($2|0)<(3); + $11 = HEAP8[$1>>0]|0; + if ($10) { + $12 = $11&255; + $13 = ((($1)) + 1|0); + $14 = HEAP8[$13>>0]|0; + $15 = $14&255; + $16 = (($15) + ($12))|0; + $17 = ((($1)) + 2|0); + $18 = HEAP8[$17>>0]|0; + $19 = $18&255; + $20 = (($16) + ($19))|0; + $21 = (+($20|0)); + $22 = $9 * $21; + $23 = $22 / 3.0; + $$sink = $23;$$sink1 = $0; + } else { + $24 = (+($11&255)); + $25 = $9 * $24; + HEAPF32[$0>>2] = $25; + $26 = ((($1)) + 1|0); + $27 = HEAP8[$26>>0]|0; + $28 = (+($27&255)); + $29 = $9 * $28; + $30 = ((($0)) + 4|0); + HEAPF32[$30>>2] = $29; + $31 = ((($1)) + 2|0); + $32 = HEAP8[$31>>0]|0; + $33 = (+($32&255)); + $34 = $9 * $33; + $35 = ((($0)) + 8|0); + $$sink = $34;$$sink1 = $35; + } + HEAPF32[$$sink1>>2] = $$sink; + switch ($2|0) { + case 2: { + $36 = ((($0)) + 4|0); + HEAPF32[$36>>2] = 1.0; + return; + break; + } + case 4: { + $37 = ((($0)) + 12|0); + HEAPF32[$37>>2] = 1.0; + return; + break; + } + default: { + return; + } + } +} +function _stbi__at_eof($0) { + $0 = $0|0; + var $$0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; + var sp = 0; + sp = STACKTOP; + $1 = ((($0)) + 16|0); + $2 = HEAP32[$1>>2]|0; + $3 = ($2|0)==(0|0); + if (!($3)) { + $4 = ((($0)) + 24|0); + $5 = HEAP32[$4>>2]|0; + $6 = ((($0)) + 28|0); + $7 = HEAP32[$6>>2]|0; + $8 = (FUNCTION_TABLE_ii[$5 & 15]($7)|0); + $9 = ($8|0)==(0); + if ($9) { + $$0 = 0; + return ($$0|0); + } + $10 = ((($0)) + 32|0); + $11 = HEAP32[$10>>2]|0; + $12 = ($11|0)==(0); + if ($12) { + $$0 = 1; + return ($$0|0); + } + } + $13 = ((($0)) + 168|0); + $14 = HEAP32[$13>>2]|0; + $15 = ((($0)) + 172|0); + $16 = HEAP32[$15>>2]|0; + $17 = ($14>>>0)>=($16>>>0); + $18 = $17&1; + $$0 = $18; + return ($$0|0); +} +function _stbi__hdr_test_core($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $$07 = 0, $$08 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $2 = HEAP8[$1>>0]|0; + $3 = ($2<<24>>24)==(0); + L1: do { + if (!($3)) { + $$08 = 0;$11 = $1; + while(1) { + $8 = (_stbi__get8($0)|0); + $9 = $8&255; + $10 = HEAP8[$11>>0]|0; + $12 = $10 << 24 >> 24; + $13 = ($9|0)==($12|0); + $5 = (($$08) + 1)|0; + if (!($13)) { + $$07 = 0; + break; + } + $4 = (($1) + ($5)|0); + $6 = HEAP8[$4>>0]|0; + $7 = ($6<<24>>24)==(0); + if ($7) { + break L1; + } else { + $$08 = $5;$11 = $4; + } + } + return ($$07|0); + } + } while(0); + _stbi__rewind($0); + $$07 = 1; + return ($$07|0); +} +function _stbi__start_callbacks($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $10 = 0, $11 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $3 = ((($0)) + 16|0); + ;HEAP32[$3>>2]=HEAP32[$1>>2]|0;HEAP32[$3+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$3+8>>2]=HEAP32[$1+8>>2]|0; + $4 = ((($0)) + 28|0); + HEAP32[$4>>2] = $2; + $5 = ((($0)) + 36|0); + HEAP32[$5>>2] = 128; + $6 = ((($0)) + 32|0); + HEAP32[$6>>2] = 1; + $7 = ((($0)) + 40|0); + $8 = ((($0)) + 176|0); + HEAP32[$8>>2] = $7; + _stbi__refill_buffer($0); + $9 = ((($0)) + 172|0); + $10 = HEAP32[$9>>2]|0; + $11 = ((($0)) + 180|0); + HEAP32[$11>>2] = $10; + return; +} +function _stbi__stdio_read($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $3 = 0, label = 0, sp = 0; + sp = STACKTOP; + $3 = (_fread($1,1,$2,$0)|0); + return ($3|0); +} +function _stbi__stdio_skip($0,$1) { + $0 = $0|0; + $1 = $1|0; + var label = 0, sp = 0; + sp = STACKTOP; + (_fseek($0,$1,1)|0); + return; +} +function _stbi__stdio_eof($0) { + $0 = $0|0; + var $1 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = (_feof($0)|0); + return ($1|0); +} +function _ImageCopy($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $$0 = 0, $$sroa$6$0 = 0, $$sroa$6$0$$sroa_idx11 = 0, $$sroa$7$0 = 0, $$sroa$7$0$$sroa_idx13 = 0, $$sroa$8$0 = 0, $$sroa$8$0$$sroa_idx15 = 0, $$sroa$9$0 = 0, $$sroa$9$0$$sroa_idx17 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0; + var $20 = 0, $21 = 0, $22 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $vararg_buffer = sp; + $2 = ((($1)) + 4|0); + $3 = HEAP32[$2>>2]|0; + $4 = ((($1)) + 8|0); + $5 = HEAP32[$4>>2]|0; + $6 = Math_imul($5, $3)|0; + $7 = ((($1)) + 16|0); + $8 = HEAP32[$7>>2]|0; + switch ($8|0) { + case 18: case 15: case 12: case 11: case 1: { + $$0 = $6; + break; + } + case 6: case 5: case 3: case 2: { + $9 = $6 << 1; + $$0 = $9; + break; + } + case 4: { + $10 = ($6*3)|0; + $$0 = $10; + break; + } + case 7: { + $11 = $6 << 2; + $$0 = $11; + break; + } + case 8: { + $12 = ($6*12)|0; + $$0 = $12; + break; + } + case 17: case 16: case 14: case 13: case 10: case 9: { + $13 = (($6|0) / 2)&-1; + $$0 = $13; + break; + } + case 19: { + $14 = (($6|0) / 4)&-1; + $$0 = $14; + break; + } + default: { + _TraceLog(1,8194,$vararg_buffer); + $$0 = $6; + } + } + $15 = (_malloc($$0)|0); + $16 = ($15|0)==(0|0); + if ($16) { + $$sroa$6$0 = 0;$$sroa$7$0 = 0;$$sroa$8$0 = 0;$$sroa$9$0 = 0; + } else { + $17 = HEAP32[$1>>2]|0; + _memcpy(($15|0),($17|0),($$0|0))|0; + $18 = HEAP32[$2>>2]|0; + $19 = HEAP32[$4>>2]|0; + $20 = ((($1)) + 12|0); + $21 = HEAP32[$20>>2]|0; + $22 = HEAP32[$7>>2]|0; + $$sroa$6$0 = $18;$$sroa$7$0 = $19;$$sroa$8$0 = $21;$$sroa$9$0 = $22; + } + HEAP32[$0>>2] = $15; + $$sroa$6$0$$sroa_idx11 = ((($0)) + 4|0); + HEAP32[$$sroa$6$0$$sroa_idx11>>2] = $$sroa$6$0; + $$sroa$7$0$$sroa_idx13 = ((($0)) + 8|0); + HEAP32[$$sroa$7$0$$sroa_idx13>>2] = $$sroa$7$0; + $$sroa$8$0$$sroa_idx15 = ((($0)) + 12|0); + HEAP32[$$sroa$8$0$$sroa_idx15>>2] = $$sroa$8$0; + $$sroa$9$0$$sroa_idx17 = ((($0)) + 16|0); + HEAP32[$$sroa$9$0$$sroa_idx17>>2] = $$sroa$9$0; + STACKTOP = sp;return; +} +function _DrawText($0,$1,$2,$3,$4) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + $4 = $4|0; + var $$ = 0, $$byval_copy = 0, $$byval_copy1 = 0, $$byval_copy2 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0.0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(128|0); + $$byval_copy2 = sp + 112|0; + $$byval_copy1 = sp + 104|0; + $$byval_copy = sp + 72|0; + $5 = sp + 32|0; + $6 = sp + 64|0; + $7 = sp; + _GetDefaultFont($5); + $8 = HEAP32[$5>>2]|0; + $9 = ($8|0)==(0); + if ($9) { + STACKTOP = sp;return; + } + $10 = (+($1|0)); + HEAPF32[$6>>2] = $10; + $11 = ((($6)) + 4|0); + $12 = (+($2|0)); + HEAPF32[$11>>2] = $12; + $13 = ($3|0)>(10); + $$ = $13 ? $3 : 10; + $14 = (($$>>>0) / 10)&-1; + _GetDefaultFont($7); + $15 = (+($$|0)); + ;HEAP32[$$byval_copy>>2]=HEAP32[$7>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$7+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$7+8>>2]|0;HEAP32[$$byval_copy+12>>2]=HEAP32[$7+12>>2]|0;HEAP32[$$byval_copy+16>>2]=HEAP32[$7+16>>2]|0;HEAP32[$$byval_copy+20>>2]=HEAP32[$7+20>>2]|0;HEAP32[$$byval_copy+24>>2]=HEAP32[$7+24>>2]|0;HEAP32[$$byval_copy+28>>2]=HEAP32[$7+28>>2]|0; + ;HEAP32[$$byval_copy1>>2]=HEAP32[$6>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$6+4>>2]|0; + ;HEAP8[$$byval_copy2>>0]=HEAP8[$4>>0]|0;HEAP8[$$byval_copy2+1>>0]=HEAP8[$4+1>>0]|0;HEAP8[$$byval_copy2+2>>0]=HEAP8[$4+2>>0]|0;HEAP8[$$byval_copy2+3>>0]=HEAP8[$4+3>>0]|0; + _DrawTextEx($$byval_copy,$0,$$byval_copy1,$15,$14,$$byval_copy2); + STACKTOP = sp;return; +} +function _DrawTextEx($0,$1,$2,$3,$4,$5) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = +$3; + $4 = $4|0; + $5 = $5|0; + var $$04954 = 0, $$05153 = 0, $$055 = 0, $$1 = 0, $$150 = 0, $$152 = 0, $$2 = 0, $$byval_copy1 = 0, $$byval_copy2 = 0, $$byval_copy3 = 0, $$byval_copy4 = 0, $$byval_copy5 = 0, $$sink = 0, $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0; + var $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0.0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0.0, $29 = 0.0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0; + var $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0.0, $45 = 0.0, $46 = 0, $47 = 0, $48 = 0.0, $49 = 0.0, $50 = 0.0, $51 = 0, $52 = 0.0, $53 = 0.0, $54 = 0.0, $55 = 0, $56 = 0; + var $57 = 0.0, $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0.0, $64 = 0.0, $65 = 0, $66 = 0, $67 = 0, $68 = 0.0, $69 = 0.0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0; + var $75 = 0, $76 = 0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0, $81 = 0, $82 = 0.0, $83 = 0.0, $84 = 0.0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(128|0); + $$byval_copy5 = sp + 88|0; + $$byval_copy4 = sp + 80|0; + $$byval_copy3 = sp + 64|0; + $$byval_copy2 = sp + 48|0; + $$byval_copy1 = sp + 24|0; + $6 = sp + 8|0; + $7 = sp; + $8 = (_strlen($1)|0); + $9 = ((($0)) + 20|0); + $10 = HEAP32[$9>>2]|0; + $11 = (+($10|0)); + $12 = $3 / $11; + $13 = ($8|0)>(0); + if (!($13)) { + STACKTOP = sp;return; + } + $14 = ((($0)) + 28|0); + $15 = +HEAPF32[$2>>2]; + $16 = ((($6)) + 4|0); + $17 = ((($2)) + 4|0); + $18 = ((($6)) + 8|0); + $19 = ((($6)) + 12|0); + $20 = ((($7)) + 4|0); + $21 = (+($4|0)); + $$04954 = 0;$$05153 = 0;$$055 = 0; + while(1) { + $22 = (($1) + ($$055)|0); + $23 = HEAP8[$22>>0]|0; + $24 = $23&255; + switch ($23<<24>>24) { + case 10: { + $25 = HEAP32[$9>>2]|0; + $26 = (($25|0) / 2)&-1; + $27 = (($26) + ($25))|0; + $28 = (+($27|0)); + $29 = $12 * $28; + $30 = (~~(($29))); + $31 = (($30) + ($$05153))|0; + $$150 = 0;$$152 = $31;$$2 = $$055; + break; + } + case -62: { + $32 = (($$055) + 1)|0; + $33 = (($1) + ($32)|0); + $34 = HEAP8[$33>>0]|0; + $35 = $34&255; + $$1 = $32;$$sink = $35; + label = 8; + break; + } + case -61: { + $36 = (($$055) + 1)|0; + $37 = (($1) + ($36)|0); + $38 = HEAP8[$37>>0]|0; + $39 = $38&255; + $40 = (($39) + 64)|0; + $$1 = $36;$$sink = $40; + label = 8; + break; + } + default: { + $$1 = $$055;$$sink = $24; + label = 8; + } + } + do { + if ((label|0) == 8) { + label = 0; + ;HEAP32[$$byval_copy5>>2]=HEAP32[$0>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$$byval_copy5+8>>2]=HEAP32[$0+8>>2]|0;HEAP32[$$byval_copy5+12>>2]=HEAP32[$0+12>>2]|0;HEAP32[$$byval_copy5+16>>2]=HEAP32[$0+16>>2]|0;HEAP32[$$byval_copy5+20>>2]=HEAP32[$0+20>>2]|0;HEAP32[$$byval_copy5+24>>2]=HEAP32[$0+24>>2]|0;HEAP32[$$byval_copy5+28>>2]=HEAP32[$0+28>>2]|0; + $41 = (_GetCharIndex($$byval_copy5,$$sink)|0); + $42 = HEAP32[$14>>2]|0; + $43 = (((($42) + ($41<<5)|0)) + 4|0); + $44 = (+($$04954|0)); + $45 = $44 + $15; + $46 = (((($42) + ($41<<5)|0)) + 20|0); + $47 = HEAP32[$46>>2]|0; + $48 = (+($47|0)); + $49 = $12 * $48; + $50 = $45 + $49; + $51 = (~~(($50))); + HEAP32[$6>>2] = $51; + $52 = +HEAPF32[$17>>2]; + $53 = (+($$05153|0)); + $54 = $53 + $52; + $55 = (((($42) + ($41<<5)|0)) + 24|0); + $56 = HEAP32[$55>>2]|0; + $57 = (+($56|0)); + $58 = $12 * $57; + $59 = $54 + $58; + $60 = (~~(($59))); + HEAP32[$16>>2] = $60; + $61 = (((($42) + ($41<<5)|0)) + 12|0); + $62 = HEAP32[$61>>2]|0; + $63 = (+($62|0)); + $64 = $12 * $63; + $65 = (~~(($64))); + HEAP32[$18>>2] = $65; + $66 = (((($42) + ($41<<5)|0)) + 16|0); + $67 = HEAP32[$66>>2]|0; + $68 = (+($67|0)); + $69 = $12 * $68; + $70 = (~~(($69))); + HEAP32[$19>>2] = $70; + HEAPF32[$7>>2] = 0.0; + HEAPF32[$20>>2] = 0.0; + ;HEAP32[$$byval_copy1>>2]=HEAP32[$0>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$0+8>>2]|0;HEAP32[$$byval_copy1+12>>2]=HEAP32[$0+12>>2]|0;HEAP32[$$byval_copy1+16>>2]=HEAP32[$0+16>>2]|0; + ;HEAP32[$$byval_copy2>>2]=HEAP32[$43>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$43+4>>2]|0;HEAP32[$$byval_copy2+8>>2]=HEAP32[$43+8>>2]|0;HEAP32[$$byval_copy2+12>>2]=HEAP32[$43+12>>2]|0; + ;HEAP32[$$byval_copy3>>2]=HEAP32[$6>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$6+4>>2]|0;HEAP32[$$byval_copy3+8>>2]=HEAP32[$6+8>>2]|0;HEAP32[$$byval_copy3+12>>2]=HEAP32[$6+12>>2]|0; + ;HEAP32[$$byval_copy4>>2]=HEAP32[$7>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$7+4>>2]|0; + ;HEAP8[$$byval_copy5>>0]=HEAP8[$5>>0]|0;HEAP8[$$byval_copy5+1>>0]=HEAP8[$5+1>>0]|0;HEAP8[$$byval_copy5+2>>0]=HEAP8[$5+2>>0]|0;HEAP8[$$byval_copy5+3>>0]=HEAP8[$5+3>>0]|0; + _DrawTexturePro($$byval_copy1,$$byval_copy2,$$byval_copy3,$$byval_copy4,0.0,$$byval_copy5); + $71 = HEAP32[$14>>2]|0; + $72 = (((($71) + ($41<<5)|0)) + 28|0); + $73 = HEAP32[$72>>2]|0; + $74 = ($73|0)==(0); + if ($74) { + $75 = (((($71) + ($41<<5)|0)) + 12|0); + $76 = HEAP32[$75>>2]|0; + $77 = (+($76|0)); + $78 = $12 * $77; + $79 = $21 + $78; + $80 = (~~(($79))); + $81 = (($80) + ($$04954))|0; + $$150 = $81;$$152 = $$05153;$$2 = $$1; + break; + } else { + $82 = (+($73|0)); + $83 = $12 * $82; + $84 = $21 + $83; + $85 = (~~(($84))); + $86 = (($85) + ($$04954))|0; + $$150 = $86;$$152 = $$05153;$$2 = $$1; + break; + } + } + } while(0); + $87 = (($$2) + 1)|0; + $88 = ($87|0)<($8|0); + if ($88) { + $$04954 = $$150;$$05153 = $$152;$$055 = $87; + } else { + break; + } + } + STACKTOP = sp;return; +} function _GetCharIndex($0,$1) { $0 = $0|0; $1 = $1|0; @@ -27975,6 +22566,1887 @@ function _DrawTexturePro($0,$1,$2,$3,$4,$5) { _rlDisableTexture(); return; } +function _rlEnableTexture($0) { + $0 = $0|0; + var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = HEAP32[5220]|0; + $2 = HEAP32[5218]|0; + $3 = (($2) + -1)|0; + $4 = (((($1) + (($3*144)|0)|0)) + 8|0); + $5 = HEAP32[$4>>2]|0; + $6 = ($5|0)==($0|0); + if ($6) { + return; + } + $7 = (($1) + (($3*144)|0)|0); + $8 = HEAP32[$7>>2]|0; + $9 = ($8|0)>(0); + if ($9) { + $10 = (($2) + 1)|0; + HEAP32[5218] = $10; + } + $11 = HEAP32[5218]|0; + $12 = (($11) + -1)|0; + $13 = (((($1) + (($12*144)|0)|0)) + 8|0); + HEAP32[$13>>2] = $0; + $14 = (($1) + (($12*144)|0)|0); + HEAP32[$14>>2] = 0; + return; +} +function _rlPushMatrix() { + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $vararg_buffer = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $vararg_buffer = sp; + $0 = HEAP32[5368]|0; + $1 = ($0|0)==(15); + if ($1) { + HEAP32[$vararg_buffer>>2] = 16; + _TraceLog(2,8301,$vararg_buffer); + } + $2 = HEAP32[5368]|0; + $3 = (21476 + ($2<<6)|0); + $4 = HEAP32[5625]|0; + dest=$3; src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _rlLoadIdentity(); + $5 = HEAP32[5368]|0; + $6 = (($5) + 1)|0; + HEAP32[5368] = $6; + $7 = HEAP32[5630]|0; + $8 = ($7|0)==(5888); + if (!($8)) { + STACKTOP = sp;return; + } + HEAP32[5626] = 1; + STACKTOP = sp;return; +} +function _rlTranslatef($0,$1,$2) { + $0 = +$0; + $1 = +$1; + $2 = +$2; + var $$byval_copy = 0, $$byval_copy1 = 0, $3 = 0, $4 = 0, $5 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 256|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(256|0); + $$byval_copy1 = sp + 192|0; + $$byval_copy = sp + 128|0; + $3 = sp + 64|0; + $4 = sp; + _MatrixTranslate($3,$0,$1,$2); + _MatrixTranspose($3); + $5 = HEAP32[5625]|0; + dest=$$byval_copy; src=$5; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$$byval_copy1; src=$3; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixMultiply($4,$$byval_copy,$$byval_copy1); + dest=$5; src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + STACKTOP = sp;return; +} +function _rlRotatef($0,$1,$2,$3) { + $0 = +$0; + $1 = +$1; + $2 = +$2; + $3 = +$3; + var $$byval_copy1 = 0, $$byval_copy2 = 0, $10 = 0.0, $11 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 336|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(336|0); + $$byval_copy2 = sp + 272|0; + $$byval_copy1 = sp + 208|0; + $4 = sp + 144|0; + $5 = sp + 64|0; + $6 = sp + 80|0; + $7 = sp; + _MatrixIdentity($4); + HEAPF32[$5>>2] = $1; + $8 = ((($5)) + 4|0); + HEAPF32[$8>>2] = $2; + $9 = ((($5)) + 8|0); + HEAPF32[$9>>2] = $3; + _VectorNormalize($5); + $10 = $0 * 0.01745329238474369; + ;HEAP32[$$byval_copy2>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$5+4>>2]|0;HEAP32[$$byval_copy2+8>>2]=HEAP32[$5+8>>2]|0; + _MatrixRotate($6,$$byval_copy2,$10); + dest=$4; src=$6; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixTranspose($4); + $11 = HEAP32[5625]|0; + dest=$$byval_copy1; src=$11; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$$byval_copy2; src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixMultiply($7,$$byval_copy1,$$byval_copy2); + dest=$11; src=$7; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + STACKTOP = sp;return; +} +function _rlBegin($0) { + $0 = $0|0; + var label = 0, sp = 0; + sp = STACKTOP; + HEAP32[5629] = $0; + return; +} +function _rlColor4ub($0,$1,$2,$3) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + var $$sink37 = 0, $$sink38 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $4 = 0, $5 = 0; + var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $4 = HEAP32[5629]|0; + switch ($4|0) { + case 1: { + $$sink37 = (20892);$$sink38 = (20904); + break; + } + case 4: { + $$sink37 = (20940);$$sink38 = (20952); + break; + } + case 7: { + $$sink37 = (20700);$$sink38 = (20712); + break; + } + default: { + return; + } + } + $5 = HEAP32[$$sink38>>2]|0; + $6 = HEAP32[$$sink37>>2]|0; + $7 = $6 << 2; + $8 = (($5) + ($7)|0); + HEAP8[$8>>0] = $0; + $9 = HEAP32[$$sink38>>2]|0; + $10 = HEAP32[$$sink37>>2]|0; + $11 = $10 << 2; + $12 = $11 | 1; + $13 = (($9) + ($12)|0); + HEAP8[$13>>0] = $1; + $14 = HEAP32[$$sink38>>2]|0; + $15 = HEAP32[$$sink37>>2]|0; + $16 = $15 << 2; + $17 = $16 | 2; + $18 = (($14) + ($17)|0); + HEAP8[$18>>0] = $2; + $19 = HEAP32[$$sink38>>2]|0; + $20 = HEAP32[$$sink37>>2]|0; + $21 = $20 << 2; + $22 = $21 | 3; + $23 = (($19) + ($22)|0); + HEAP8[$23>>0] = $3; + $24 = HEAP32[$$sink37>>2]|0; + $25 = (($24) + 1)|0; + HEAP32[$$sink37>>2] = $25; + return; +} +function _rlNormal3f($0,$1,$2) { + $0 = +$0; + $1 = +$1; + $2 = +$2; + var label = 0, sp = 0; + sp = STACKTOP; + return; +} +function _rlTexCoord2f($0,$1) { + $0 = +$0; + $1 = +$1; + var $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $2 = HEAP32[5629]|0; + $3 = ($2|0)==(7); + if (!($3)) { + return; + } + $4 = HEAP32[(20708)>>2]|0; + $5 = HEAP32[(20696)>>2]|0; + $6 = $5 << 1; + $7 = (($4) + ($6<<2)|0); + HEAPF32[$7>>2] = $0; + $8 = $6 | 1; + $9 = (($4) + ($8<<2)|0); + HEAPF32[$9>>2] = $1; + $10 = (($5) + 1)|0; + HEAP32[(20696)>>2] = $10; + return; +} +function _rlVertex2f($0,$1) { + $0 = +$0; + $1 = +$1; + var $2 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + $2 = +HEAPF32[926]; + _rlVertex3f($0,$1,$2); + return; +} +function _rlEnd() { + var $$03956 = 0, $$04052 = 0, $$04154 = 0, $$04248 = 0, $$04347 = 0, $$byval_copy = 0, $$promoted = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0; + var $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0, $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0; + var $128 = 0, $129 = 0, $13 = 0.0, $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0; + var $146 = 0, $147 = 0, $148 = 0.0, $149 = 0.0, $15 = 0.0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0; + var $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0; + var $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0; + var $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0; + var $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $exitcond = 0, $exitcond60 = 0, $exitcond63 = 0; + var $scevgep = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $$byval_copy = sp; + $0 = HEAP32[5626]|0; + $1 = ($0|0)==(0); + if (!($1)) { + $2 = HEAP32[5627]|0; + $3 = ($2|0)>(0); + if ($3) { + $$03956 = 0; + while(1) { + $6 = HEAP32[5628]|0; + $7 = (($6) + (($$03956*12)|0)|0); + $8 = HEAP32[5625]|0; + dest=$$byval_copy; src=$8; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _VectorTransform($7,$$byval_copy); + $9 = (($$03956) + 1)|0; + $5 = HEAP32[5627]|0; + $10 = ($9|0)<($5|0); + if ($10) { + $$03956 = $9; + } else { + break; + } + } + HEAP32[5626] = 0; + $4 = ($5|0)>(0); + if ($4) { + $$04154 = 0; + while(1) { + $11 = HEAP32[5628]|0; + $12 = (($11) + (($$04154*12)|0)|0); + $13 = +HEAPF32[$12>>2]; + $14 = (((($11) + (($$04154*12)|0)|0)) + 4|0); + $15 = +HEAPF32[$14>>2]; + $16 = (((($11) + (($$04154*12)|0)|0)) + 8|0); + $17 = +HEAPF32[$16>>2]; + _rlVertex3f($13,$15,$17); + $18 = (($$04154) + 1)|0; + $19 = HEAP32[5627]|0; + $20 = ($18|0)<($19|0); + if ($20) { + $$04154 = $18; + } else { + break; + } + } + } + } else { + HEAP32[5626] = 0; + } + HEAP32[5627] = 0; + } + $21 = HEAP32[5629]|0; + switch ($21|0) { + case 1: { + $22 = HEAP32[5221]|0; + $23 = HEAP32[(20892)>>2]|0; + $24 = ($22|0)==($23|0); + if ($24) { + $148 = +HEAPF32[926]; + $149 = $148 + 4.9999998736893758E-5; + HEAPF32[926] = $149; + STACKTOP = sp;return; + } + $25 = (($22) - ($23))|0; + $26 = ($25|0)>(0); + if ($26) { + $$04347 = 0; + } else { + $148 = +HEAPF32[926]; + $149 = $148 + 4.9999998736893758E-5; + HEAPF32[926] = $149; + STACKTOP = sp;return; + } + while(1) { + $27 = HEAP32[(20904)>>2]|0; + $28 = HEAP32[(20892)>>2]|0; + $29 = $28 << 2; + $30 = (($29) + -4)|0; + $31 = (($27) + ($30)|0); + $32 = HEAP8[$31>>0]|0; + $33 = (($27) + ($29)|0); + HEAP8[$33>>0] = $32; + $34 = HEAP32[(20904)>>2]|0; + $35 = HEAP32[(20892)>>2]|0; + $36 = $35 << 2; + $37 = (($36) + -3)|0; + $38 = (($34) + ($37)|0); + $39 = HEAP8[$38>>0]|0; + $40 = $36 | 1; + $41 = (($34) + ($40)|0); + HEAP8[$41>>0] = $39; + $42 = HEAP32[(20904)>>2]|0; + $43 = HEAP32[(20892)>>2]|0; + $44 = $43 << 2; + $45 = (($44) + -2)|0; + $46 = (($42) + ($45)|0); + $47 = HEAP8[$46>>0]|0; + $48 = $44 | 2; + $49 = (($42) + ($48)|0); + HEAP8[$49>>0] = $47; + $50 = HEAP32[(20904)>>2]|0; + $51 = HEAP32[(20892)>>2]|0; + $52 = $51 << 2; + $53 = (($52) + -1)|0; + $54 = (($50) + ($53)|0); + $55 = HEAP8[$54>>0]|0; + $56 = $52 | 3; + $57 = (($50) + ($56)|0); + HEAP8[$57>>0] = $55; + $58 = HEAP32[(20892)>>2]|0; + $59 = (($58) + 1)|0; + HEAP32[(20892)>>2] = $59; + $60 = (($$04347) + 1)|0; + $exitcond = ($60|0)==($25|0); + if ($exitcond) { + break; + } else { + $$04347 = $60; + } + } + $148 = +HEAPF32[926]; + $149 = $148 + 4.9999998736893758E-5; + HEAPF32[926] = $149; + STACKTOP = sp;return; + break; + } + case 4: { + $61 = HEAP32[5233]|0; + $62 = HEAP32[(20940)>>2]|0; + $63 = ($61|0)==($62|0); + if ($63) { + $148 = +HEAPF32[926]; + $149 = $148 + 4.9999998736893758E-5; + HEAPF32[926] = $149; + STACKTOP = sp;return; + } + $64 = (($61) - ($62))|0; + $65 = ($64|0)>(0); + if ($65) { + $$04248 = 0; + } else { + $148 = +HEAPF32[926]; + $149 = $148 + 4.9999998736893758E-5; + HEAPF32[926] = $149; + STACKTOP = sp;return; + } + while(1) { + $66 = HEAP32[(20952)>>2]|0; + $67 = HEAP32[(20940)>>2]|0; + $68 = $67 << 2; + $69 = (($68) + -4)|0; + $70 = (($66) + ($69)|0); + $71 = HEAP8[$70>>0]|0; + $72 = (($66) + ($68)|0); + HEAP8[$72>>0] = $71; + $73 = HEAP32[(20952)>>2]|0; + $74 = HEAP32[(20940)>>2]|0; + $75 = $74 << 2; + $76 = (($75) + -3)|0; + $77 = (($73) + ($76)|0); + $78 = HEAP8[$77>>0]|0; + $79 = $75 | 1; + $80 = (($73) + ($79)|0); + HEAP8[$80>>0] = $78; + $81 = HEAP32[(20952)>>2]|0; + $82 = HEAP32[(20940)>>2]|0; + $83 = $82 << 2; + $84 = (($83) + -2)|0; + $85 = (($81) + ($84)|0); + $86 = HEAP8[$85>>0]|0; + $87 = $83 | 2; + $88 = (($81) + ($87)|0); + HEAP8[$88>>0] = $86; + $89 = HEAP32[(20952)>>2]|0; + $90 = HEAP32[(20940)>>2]|0; + $91 = $90 << 2; + $92 = (($91) + -1)|0; + $93 = (($89) + ($92)|0); + $94 = HEAP8[$93>>0]|0; + $95 = $91 | 3; + $96 = (($89) + ($95)|0); + HEAP8[$96>>0] = $94; + $97 = HEAP32[(20940)>>2]|0; + $98 = (($97) + 1)|0; + HEAP32[(20940)>>2] = $98; + $99 = (($$04248) + 1)|0; + $exitcond60 = ($99|0)==($64|0); + if ($exitcond60) { + break; + } else { + $$04248 = $99; + } + } + $148 = +HEAPF32[926]; + $149 = $148 + 4.9999998736893758E-5; + HEAPF32[926] = $149; + STACKTOP = sp;return; + break; + } + case 7: { + $100 = HEAP32[5173]|0; + $101 = HEAP32[(20700)>>2]|0; + $102 = ($100|0)==($101|0); + if (!($102)) { + $103 = (($100) - ($101))|0; + $104 = ($103|0)>(0); + if ($104) { + $$04052 = 0; + while(1) { + $105 = HEAP32[(20712)>>2]|0; + $106 = HEAP32[(20700)>>2]|0; + $107 = $106 << 2; + $108 = (($107) + -4)|0; + $109 = (($105) + ($108)|0); + $110 = HEAP8[$109>>0]|0; + $111 = (($105) + ($107)|0); + HEAP8[$111>>0] = $110; + $112 = HEAP32[(20712)>>2]|0; + $113 = HEAP32[(20700)>>2]|0; + $114 = $113 << 2; + $115 = (($114) + -3)|0; + $116 = (($112) + ($115)|0); + $117 = HEAP8[$116>>0]|0; + $118 = $114 | 1; + $119 = (($112) + ($118)|0); + HEAP8[$119>>0] = $117; + $120 = HEAP32[(20712)>>2]|0; + $121 = HEAP32[(20700)>>2]|0; + $122 = $121 << 2; + $123 = (($122) + -2)|0; + $124 = (($120) + ($123)|0); + $125 = HEAP8[$124>>0]|0; + $126 = $122 | 2; + $127 = (($120) + ($126)|0); + HEAP8[$127>>0] = $125; + $128 = HEAP32[(20712)>>2]|0; + $129 = HEAP32[(20700)>>2]|0; + $130 = $129 << 2; + $131 = (($130) + -1)|0; + $132 = (($128) + ($131)|0); + $133 = HEAP8[$132>>0]|0; + $134 = $130 | 3; + $135 = (($128) + ($134)|0); + HEAP8[$135>>0] = $133; + $136 = HEAP32[(20700)>>2]|0; + $137 = (($136) + 1)|0; + HEAP32[(20700)>>2] = $137; + $138 = (($$04052) + 1)|0; + $exitcond63 = ($138|0)==($103|0); + if ($exitcond63) { + break; + } else { + $$04052 = $138; + } + } + } + } + $139 = HEAP32[5173]|0; + $140 = HEAP32[(20696)>>2]|0; + $141 = ($139|0)>($140|0); + if (!($141)) { + $148 = +HEAPF32[926]; + $149 = $148 + 4.9999998736893758E-5; + HEAPF32[926] = $149; + STACKTOP = sp;return; + } + $142 = HEAP32[(20708)>>2]|0; + $$promoted = HEAP32[(20696)>>2]|0; + $143 = $$promoted << 1; + $scevgep = (($142) + ($143<<2)|0); + $144 = (($139) - ($140))|0; + $145 = $144 << 3; + _memset(($scevgep|0),0,($145|0))|0; + $146 = (($139) + ($$promoted))|0; + $147 = (($146) - ($140))|0; + HEAP32[(20696)>>2] = $147; + $148 = +HEAPF32[926]; + $149 = $148 + 4.9999998736893758E-5; + HEAPF32[926] = $149; + STACKTOP = sp;return; + break; + } + default: { + $148 = +HEAPF32[926]; + $149 = $148 + 4.9999998736893758E-5; + HEAPF32[926] = $149; + STACKTOP = sp;return; + } + } +} +function _rlPopMatrix() { + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[5368]|0; + $1 = ($0|0)>(0); + if (!($1)) { + return; + } + $2 = HEAP32[5368]|0; + $3 = (($2) + -1)|0; + $4 = (21476 + ($3<<6)|0); + $5 = HEAP32[5625]|0; + _memmove(($5|0),($4|0),64)|0; + $6 = (($2) + -1)|0; + HEAP32[5368] = $6; + return; +} +function _rlDisableTexture() { + var $0 = 0, $1 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[5173]|0; + $1 = ($0|0)>(4095); + if (!($1)) { + return; + } + _rlglDraw(); + return; +} +function _rlglDraw() { + var label = 0, sp = 0; + sp = STACKTOP; + _UpdateDefaultBuffers(); + _DrawDefaultBuffers(); + return; +} +function _UpdateDefaultBuffers() { + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[5221]|0; + $1 = ($0|0)>(0); + if ($1) { + $2 = HEAP32[5259]|0; + $3 = ($2|0)==(0); + if (!($3)) { + $4 = HEAP32[5260]|0; + $5 = HEAP32[(20912)>>2]|0; + FUNCTION_TABLE_vi[$4 & 31]($5); + } + $6 = HEAP32[(20916)>>2]|0; + _glBindBuffer(34962,($6|0)); + $7 = HEAP32[5221]|0; + $8 = ($7*12)|0; + $9 = HEAP32[(20896)>>2]|0; + _glBufferSubData(34962,0,($8|0),($9|0)); + $10 = HEAP32[(20920)>>2]|0; + _glBindBuffer(34962,($10|0)); + $11 = HEAP32[(20892)>>2]|0; + $12 = $11 << 2; + $13 = HEAP32[(20904)>>2]|0; + _glBufferSubData(34962,0,($12|0),($13|0)); + } + $14 = HEAP32[5233]|0; + $15 = ($14|0)>(0); + if ($15) { + $16 = HEAP32[5259]|0; + $17 = ($16|0)==(0); + if (!($17)) { + $18 = HEAP32[5260]|0; + $19 = HEAP32[(20960)>>2]|0; + FUNCTION_TABLE_vi[$18 & 31]($19); + } + $20 = HEAP32[(20964)>>2]|0; + _glBindBuffer(34962,($20|0)); + $21 = HEAP32[5233]|0; + $22 = ($21*12)|0; + $23 = HEAP32[(20944)>>2]|0; + _glBufferSubData(34962,0,($22|0),($23|0)); + $24 = HEAP32[(20968)>>2]|0; + _glBindBuffer(34962,($24|0)); + $25 = HEAP32[(20940)>>2]|0; + $26 = $25 << 2; + $27 = HEAP32[(20952)>>2]|0; + _glBufferSubData(34962,0,($26|0),($27|0)); + } + $28 = HEAP32[5173]|0; + $29 = ($28|0)>(0); + if ($29) { + $30 = HEAP32[5259]|0; + $31 = ($30|0)==(0); + if (!($31)) { + $32 = HEAP32[5260]|0; + $33 = HEAP32[(20720)>>2]|0; + FUNCTION_TABLE_vi[$32 & 31]($33); + } + $34 = HEAP32[(20724)>>2]|0; + _glBindBuffer(34962,($34|0)); + $35 = HEAP32[5173]|0; + $36 = ($35*12)|0; + $37 = HEAP32[(20704)>>2]|0; + _glBufferSubData(34962,0,($36|0),($37|0)); + $38 = HEAP32[(20728)>>2]|0; + _glBindBuffer(34962,($38|0)); + $39 = HEAP32[5173]|0; + $40 = $39 << 3; + $41 = HEAP32[(20708)>>2]|0; + _glBufferSubData(34962,0,($40|0),($41|0)); + $42 = HEAP32[(20732)>>2]|0; + _glBindBuffer(34962,($42|0)); + $43 = HEAP32[5173]|0; + $44 = $43 << 2; + $45 = HEAP32[(20712)>>2]|0; + _glBufferSubData(34962,0,($44|0),($45|0)); + } + $46 = HEAP32[5259]|0; + $47 = ($46|0)==(0); + if ($47) { + return; + } + $48 = HEAP32[5260]|0; + FUNCTION_TABLE_vi[$48 & 31](0); + return; +} +function _DrawDefaultBuffers() { + var $$ = 0, $$02830 = 0, $$02932 = 0, $$031 = 0, $$byval_copy2 = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0; + var $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0; + var $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0; + var $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0; + var $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $modelview$byval_copy = 0; + var $or$cond = 0, $or$cond3 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 320|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(320|0); + $$byval_copy2 = sp + 256|0; + $modelview$byval_copy = sp + 192|0; + $0 = sp + 128|0; + $1 = sp + 64|0; + $2 = sp; + dest=$0; src=20740; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$1; src=20804; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $3 = HEAP32[5217]|0; + $4 = ($3|0)!=(0); + $$ = $4 ? 2 : 1; + $$02932 = 0; + while(1) { + if ($4) { + dest=$modelview$byval_copy; src=$0; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$$byval_copy2; src=$1; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _SetStereoView($$02932,$modelview$byval_copy,$$byval_copy2); + } + $8 = HEAP32[5221]|0; + $9 = ($8|0)>(0); + $10 = HEAP32[5233]|0; + $11 = ($10|0)>(0); + $or$cond = $9 | $11; + $12 = HEAP32[5173]|0; + $13 = ($12|0)>(0); + $or$cond3 = $or$cond | $13; + if ($or$cond3) { + $14 = HEAP32[5245]|0; + _glUseProgram(($14|0)); + dest=$modelview$byval_copy; src=20804; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$$byval_copy2; src=20740; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixMultiply($2,$modelview$byval_copy,$$byval_copy2); + $15 = HEAP32[(21008)>>2]|0; + dest=$$byval_copy2; src=$2; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $16 = (_MatrixToFloat($$byval_copy2)|0); + _glUniformMatrix4fv(($15|0),1,0,($16|0)); + $17 = HEAP32[(21012)>>2]|0; + _glUniform4f(($17|0),1.0,1.0,1.0,1.0); + $18 = HEAP32[(21024)>>2]|0; + _glUniform1i(($18|0),0); + } + $19 = HEAP32[5221]|0; + $20 = ($19|0)>(0); + if ($20) { + $21 = HEAP32[5219]|0; + _glBindTexture(3553,($21|0)); + $22 = HEAP32[5259]|0; + $23 = ($22|0)==(0); + if ($23) { + $26 = HEAP32[(20916)>>2]|0; + _glBindBuffer(34962,($26|0)); + $27 = HEAP32[(20984)>>2]|0; + _glVertexAttribPointer(($27|0),3,5126,0,0,(0|0)); + $28 = HEAP32[(20984)>>2]|0; + _glEnableVertexAttribArray(($28|0)); + $29 = HEAP32[(20920)>>2]|0; + _glBindBuffer(34962,($29|0)); + $30 = HEAP32[(21004)>>2]|0; + _glVertexAttribPointer(($30|0),4,5121,1,0,(0|0)); + $31 = HEAP32[(21004)>>2]|0; + _glEnableVertexAttribArray(($31|0)); + } else { + $24 = HEAP32[5260]|0; + $25 = HEAP32[(20912)>>2]|0; + FUNCTION_TABLE_vi[$24 & 31]($25); + } + $32 = HEAP32[5221]|0; + _glDrawArrays(1,0,($32|0)); + $33 = HEAP32[5259]|0; + $34 = ($33|0)==(0); + if ($34) { + _glBindBuffer(34962,0); + } + _glBindTexture(3553,0); + } + $35 = HEAP32[5233]|0; + $36 = ($35|0)>(0); + if ($36) { + $37 = HEAP32[5219]|0; + _glBindTexture(3553,($37|0)); + $38 = HEAP32[5259]|0; + $39 = ($38|0)==(0); + if ($39) { + $42 = HEAP32[(20964)>>2]|0; + _glBindBuffer(34962,($42|0)); + $43 = HEAP32[(20984)>>2]|0; + _glVertexAttribPointer(($43|0),3,5126,0,0,(0|0)); + $44 = HEAP32[(20984)>>2]|0; + _glEnableVertexAttribArray(($44|0)); + $45 = HEAP32[(20968)>>2]|0; + _glBindBuffer(34962,($45|0)); + $46 = HEAP32[(21004)>>2]|0; + _glVertexAttribPointer(($46|0),4,5121,1,0,(0|0)); + $47 = HEAP32[(21004)>>2]|0; + _glEnableVertexAttribArray(($47|0)); + } else { + $40 = HEAP32[5260]|0; + $41 = HEAP32[(20960)>>2]|0; + FUNCTION_TABLE_vi[$40 & 31]($41); + } + $48 = HEAP32[5233]|0; + _glDrawArrays(4,0,($48|0)); + $49 = HEAP32[5259]|0; + $50 = ($49|0)==(0); + if ($50) { + _glBindBuffer(34962,0); + } + _glBindTexture(3553,0); + } + $51 = HEAP32[5173]|0; + $52 = ($51|0)>(0); + if ($52) { + $53 = HEAP32[5259]|0; + $54 = ($53|0)==(0); + if ($54) { + $57 = HEAP32[(20724)>>2]|0; + _glBindBuffer(34962,($57|0)); + $58 = HEAP32[(20984)>>2]|0; + _glVertexAttribPointer(($58|0),3,5126,0,0,(0|0)); + $59 = HEAP32[(20984)>>2]|0; + _glEnableVertexAttribArray(($59|0)); + $60 = HEAP32[(20728)>>2]|0; + _glBindBuffer(34962,($60|0)); + $61 = HEAP32[(20988)>>2]|0; + _glVertexAttribPointer(($61|0),2,5126,0,0,(0|0)); + $62 = HEAP32[(20988)>>2]|0; + _glEnableVertexAttribArray(($62|0)); + $63 = HEAP32[(20732)>>2]|0; + _glBindBuffer(34962,($63|0)); + $64 = HEAP32[(21004)>>2]|0; + _glVertexAttribPointer(($64|0),4,5121,1,0,(0|0)); + $65 = HEAP32[(21004)>>2]|0; + _glEnableVertexAttribArray(($65|0)); + $66 = HEAP32[(20736)>>2]|0; + _glBindBuffer(34963,($66|0)); + } else { + $55 = HEAP32[5260]|0; + $56 = HEAP32[(20720)>>2]|0; + FUNCTION_TABLE_vi[$55 & 31]($56); + } + $67 = HEAP32[5218]|0; + $68 = ($67|0)>(0); + if ($68) { + $$02830 = 0;$$031 = 0; + while(1) { + $71 = HEAP32[5220]|0; + $72 = (($71) + (($$031*144)|0)|0); + $73 = HEAP32[$72>>2]|0; + $74 = (($73|0) / 4)&-1; + $75 = ($74*6)|0; + $76 = (((($71) + (($$031*144)|0)|0)) + 8|0); + $77 = HEAP32[$76>>2]|0; + _glBindTexture(3553,($77|0)); + $78 = $$02830 << 1; + $79 = $78; + _glDrawElements(4,($75|0),5123,($79|0)); + $80 = HEAP32[5220]|0; + $81 = (($80) + (($$031*144)|0)|0); + $82 = HEAP32[$81>>2]|0; + $83 = (($82|0) / 4)&-1; + $84 = ($83*6)|0; + $85 = (($84) + ($$02830))|0; + $86 = (($$031) + 1)|0; + $87 = HEAP32[5218]|0; + $88 = ($86|0)<($87|0); + if ($88) { + $$02830 = $85;$$031 = $86; + } else { + break; + } + } + } + $69 = HEAP32[5259]|0; + $70 = ($69|0)==(0); + if ($70) { + _glBindBuffer(34962,0); + _glBindBuffer(34963,0); + } + _glBindTexture(3553,0); + } + $89 = HEAP32[5259]|0; + $90 = ($89|0)==(0); + if (!($90)) { + $91 = HEAP32[5260]|0; + FUNCTION_TABLE_vi[$91 & 31](0); + } + _glUseProgram(0); + $92 = (($$02932) + 1)|0; + $93 = ($92|0)<($$|0); + if ($93) { + $$02932 = $92; + } else { + break; + } + } + HEAP32[5218] = 1; + $5 = HEAP32[5219]|0; + $6 = HEAP32[5220]|0; + $7 = ((($6)) + 8|0); + HEAP32[$7>>2] = $5; + HEAP32[$6>>2] = 0; + HEAP32[5221] = 0; + HEAP32[(20892)>>2] = 0; + HEAP32[5233] = 0; + HEAP32[(20940)>>2] = 0; + HEAP32[5173] = 0; + HEAP32[(20696)>>2] = 0; + HEAP32[(20700)>>2] = 0; + HEAPF32[926] = -1.0; + dest=20740; src=$0; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=20804; src=$1; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + STACKTOP = sp;return; +} +function _SetStereoView($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $$byval_copy = 0, $$byval_copy3 = 0, $10 = 0, $11 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 256|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(256|0); + $$byval_copy3 = sp + 192|0; + $$byval_copy = sp + 64|0; + $3 = sp; + $4 = sp + 128|0; + dest=$3; src=$1; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $5 = HEAP32[5277]|0; + $6 = Math_imul($5, $0)|0; + $7 = (($6|0) / 2)&-1; + $8 = (($5|0) / 2)&-1; + $9 = HEAP32[5278]|0; + _rlViewport($7,0,$8,$9); + $10 = (21344 + ($0<<6)|0); + dest=$$byval_copy; src=$2; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$$byval_copy3; src=$10; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixMultiply($4,$$byval_copy,$$byval_copy3); + $11 = (21216 + ($0<<6)|0); + dest=$3; src=$11; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$$byval_copy3; src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _SetMatrixModelview($$byval_copy3); + dest=$$byval_copy3; src=$3; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _SetMatrixProjection($$byval_copy3); + STACKTOP = sp;return; +} +function _MatrixMultiply($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $$sroa$10$0$$sroa_idx14 = 0, $$sroa$11$0$$sroa_idx16 = 0, $$sroa$12$0$$sroa_idx18 = 0, $$sroa$13$0$$sroa_idx20 = 0, $$sroa$14$0$$sroa_idx22 = 0, $$sroa$15$0$$sroa_idx24 = 0, $$sroa$16$0$$sroa_idx26 = 0, $$sroa$17$0$$sroa_idx28 = 0, $$sroa$18$0$$sroa_idx30 = 0, $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $$sroa$6$0$$sroa_idx6 = 0, $$sroa$7$0$$sroa_idx8 = 0, $$sroa$8$0$$sroa_idx10 = 0, $$sroa$9$0$$sroa_idx12 = 0, $10 = 0.0, $100 = 0.0, $101 = 0.0, $102 = 0.0, $103 = 0.0; + var $104 = 0.0, $105 = 0, $106 = 0.0, $107 = 0.0, $108 = 0, $109 = 0.0, $11 = 0.0, $110 = 0.0, $111 = 0.0, $112 = 0, $113 = 0.0, $114 = 0.0, $115 = 0.0, $116 = 0, $117 = 0.0, $118 = 0.0, $119 = 0.0, $12 = 0, $120 = 0.0, $121 = 0.0; + var $122 = 0.0, $123 = 0.0, $124 = 0.0, $125 = 0.0, $126 = 0.0, $127 = 0.0, $128 = 0.0, $129 = 0.0, $13 = 0.0, $130 = 0.0, $131 = 0.0, $132 = 0.0, $133 = 0.0, $134 = 0.0, $135 = 0.0, $136 = 0.0, $137 = 0.0, $138 = 0.0, $139 = 0.0, $14 = 0; + var $140 = 0.0, $141 = 0, $142 = 0.0, $143 = 0.0, $144 = 0, $145 = 0.0, $146 = 0.0, $147 = 0.0, $148 = 0, $149 = 0.0, $15 = 0.0, $150 = 0.0, $151 = 0.0, $152 = 0, $153 = 0.0, $154 = 0.0, $155 = 0.0, $156 = 0.0, $157 = 0.0, $158 = 0.0; + var $159 = 0.0, $16 = 0.0, $160 = 0.0, $161 = 0.0, $162 = 0.0, $163 = 0.0, $164 = 0.0, $165 = 0.0, $166 = 0.0, $167 = 0.0, $168 = 0.0, $169 = 0.0, $17 = 0.0, $170 = 0.0, $171 = 0.0, $172 = 0.0, $173 = 0.0, $174 = 0.0, $175 = 0.0, $176 = 0.0; + var $18 = 0, $19 = 0.0, $20 = 0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0, $25 = 0.0, $26 = 0.0, $27 = 0, $28 = 0.0, $29 = 0.0, $3 = 0.0, $30 = 0.0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0.0; + var $37 = 0.0, $38 = 0.0, $39 = 0, $4 = 0.0, $40 = 0.0, $41 = 0.0, $42 = 0, $43 = 0.0, $44 = 0.0, $45 = 0.0, $46 = 0, $47 = 0.0, $48 = 0.0, $49 = 0.0, $5 = 0.0, $50 = 0, $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0; + var $55 = 0.0, $56 = 0.0, $57 = 0, $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0.0, $61 = 0, $62 = 0.0, $63 = 0.0, $64 = 0.0, $65 = 0, $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0, $7 = 0.0, $70 = 0.0, $71 = 0.0, $72 = 0; + var $73 = 0.0, $74 = 0.0, $75 = 0.0, $76 = 0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0, $81 = 0.0, $82 = 0.0, $83 = 0.0, $84 = 0.0, $85 = 0.0, $86 = 0.0, $87 = 0.0, $88 = 0.0, $89 = 0.0, $9 = 0.0, $90 = 0.0; + var $91 = 0.0, $92 = 0.0, $93 = 0.0, $94 = 0.0, $95 = 0.0, $96 = 0.0, $97 = 0.0, $98 = 0.0, $99 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + $3 = +HEAPF32[$2>>2]; + $4 = +HEAPF32[$1>>2]; + $5 = $3 * $4; + $6 = ((($2)) + 16|0); + $7 = +HEAPF32[$6>>2]; + $8 = ((($1)) + 4|0); + $9 = +HEAPF32[$8>>2]; + $10 = $7 * $9; + $11 = $5 + $10; + $12 = ((($2)) + 32|0); + $13 = +HEAPF32[$12>>2]; + $14 = ((($1)) + 8|0); + $15 = +HEAPF32[$14>>2]; + $16 = $13 * $15; + $17 = $11 + $16; + $18 = ((($2)) + 48|0); + $19 = +HEAPF32[$18>>2]; + $20 = ((($1)) + 12|0); + $21 = +HEAPF32[$20>>2]; + $22 = $19 * $21; + $23 = $17 + $22; + $24 = ((($1)) + 16|0); + $25 = +HEAPF32[$24>>2]; + $26 = $3 * $25; + $27 = ((($1)) + 20|0); + $28 = +HEAPF32[$27>>2]; + $29 = $7 * $28; + $30 = $26 + $29; + $31 = ((($1)) + 24|0); + $32 = +HEAPF32[$31>>2]; + $33 = $13 * $32; + $34 = $30 + $33; + $35 = ((($1)) + 28|0); + $36 = +HEAPF32[$35>>2]; + $37 = $19 * $36; + $38 = $34 + $37; + $39 = ((($1)) + 32|0); + $40 = +HEAPF32[$39>>2]; + $41 = $3 * $40; + $42 = ((($1)) + 36|0); + $43 = +HEAPF32[$42>>2]; + $44 = $7 * $43; + $45 = $41 + $44; + $46 = ((($1)) + 40|0); + $47 = +HEAPF32[$46>>2]; + $48 = $13 * $47; + $49 = $45 + $48; + $50 = ((($1)) + 44|0); + $51 = +HEAPF32[$50>>2]; + $52 = $19 * $51; + $53 = $49 + $52; + $54 = ((($1)) + 48|0); + $55 = +HEAPF32[$54>>2]; + $56 = $3 * $55; + $57 = ((($1)) + 52|0); + $58 = +HEAPF32[$57>>2]; + $59 = $7 * $58; + $60 = $56 + $59; + $61 = ((($1)) + 56|0); + $62 = +HEAPF32[$61>>2]; + $63 = $13 * $62; + $64 = $60 + $63; + $65 = ((($1)) + 60|0); + $66 = +HEAPF32[$65>>2]; + $67 = $19 * $66; + $68 = $64 + $67; + $69 = ((($2)) + 4|0); + $70 = +HEAPF32[$69>>2]; + $71 = $4 * $70; + $72 = ((($2)) + 20|0); + $73 = +HEAPF32[$72>>2]; + $74 = $9 * $73; + $75 = $71 + $74; + $76 = ((($2)) + 36|0); + $77 = +HEAPF32[$76>>2]; + $78 = $15 * $77; + $79 = $75 + $78; + $80 = ((($2)) + 52|0); + $81 = +HEAPF32[$80>>2]; + $82 = $21 * $81; + $83 = $79 + $82; + $84 = $25 * $70; + $85 = $28 * $73; + $86 = $84 + $85; + $87 = $32 * $77; + $88 = $86 + $87; + $89 = $36 * $81; + $90 = $88 + $89; + $91 = $40 * $70; + $92 = $43 * $73; + $93 = $91 + $92; + $94 = $47 * $77; + $95 = $93 + $94; + $96 = $51 * $81; + $97 = $95 + $96; + $98 = $55 * $70; + $99 = $58 * $73; + $100 = $98 + $99; + $101 = $62 * $77; + $102 = $100 + $101; + $103 = $66 * $81; + $104 = $102 + $103; + $105 = ((($2)) + 8|0); + $106 = +HEAPF32[$105>>2]; + $107 = $4 * $106; + $108 = ((($2)) + 24|0); + $109 = +HEAPF32[$108>>2]; + $110 = $9 * $109; + $111 = $107 + $110; + $112 = ((($2)) + 40|0); + $113 = +HEAPF32[$112>>2]; + $114 = $15 * $113; + $115 = $111 + $114; + $116 = ((($2)) + 56|0); + $117 = +HEAPF32[$116>>2]; + $118 = $21 * $117; + $119 = $115 + $118; + $120 = $25 * $106; + $121 = $28 * $109; + $122 = $120 + $121; + $123 = $32 * $113; + $124 = $122 + $123; + $125 = $36 * $117; + $126 = $124 + $125; + $127 = $40 * $106; + $128 = $43 * $109; + $129 = $127 + $128; + $130 = $47 * $113; + $131 = $129 + $130; + $132 = $51 * $117; + $133 = $131 + $132; + $134 = $55 * $106; + $135 = $58 * $109; + $136 = $134 + $135; + $137 = $62 * $113; + $138 = $136 + $137; + $139 = $66 * $117; + $140 = $138 + $139; + $141 = ((($2)) + 12|0); + $142 = +HEAPF32[$141>>2]; + $143 = $4 * $142; + $144 = ((($2)) + 28|0); + $145 = +HEAPF32[$144>>2]; + $146 = $9 * $145; + $147 = $143 + $146; + $148 = ((($2)) + 44|0); + $149 = +HEAPF32[$148>>2]; + $150 = $15 * $149; + $151 = $147 + $150; + $152 = ((($2)) + 60|0); + $153 = +HEAPF32[$152>>2]; + $154 = $21 * $153; + $155 = $151 + $154; + $156 = $25 * $142; + $157 = $28 * $145; + $158 = $156 + $157; + $159 = $32 * $149; + $160 = $158 + $159; + $161 = $36 * $153; + $162 = $160 + $161; + $163 = $40 * $142; + $164 = $43 * $145; + $165 = $163 + $164; + $166 = $47 * $149; + $167 = $165 + $166; + $168 = $51 * $153; + $169 = $167 + $168; + $170 = $55 * $142; + $171 = $58 * $145; + $172 = $170 + $171; + $173 = $62 * $149; + $174 = $172 + $173; + $175 = $66 * $153; + $176 = $174 + $175; + HEAPF32[$0>>2] = $23; + $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); + HEAPF32[$$sroa$4$0$$sroa_idx2>>2] = $83; + $$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0); + HEAPF32[$$sroa$5$0$$sroa_idx4>>2] = $119; + $$sroa$6$0$$sroa_idx6 = ((($0)) + 12|0); + HEAPF32[$$sroa$6$0$$sroa_idx6>>2] = $155; + $$sroa$7$0$$sroa_idx8 = ((($0)) + 16|0); + HEAPF32[$$sroa$7$0$$sroa_idx8>>2] = $38; + $$sroa$8$0$$sroa_idx10 = ((($0)) + 20|0); + HEAPF32[$$sroa$8$0$$sroa_idx10>>2] = $90; + $$sroa$9$0$$sroa_idx12 = ((($0)) + 24|0); + HEAPF32[$$sroa$9$0$$sroa_idx12>>2] = $126; + $$sroa$10$0$$sroa_idx14 = ((($0)) + 28|0); + HEAPF32[$$sroa$10$0$$sroa_idx14>>2] = $162; + $$sroa$11$0$$sroa_idx16 = ((($0)) + 32|0); + HEAPF32[$$sroa$11$0$$sroa_idx16>>2] = $53; + $$sroa$12$0$$sroa_idx18 = ((($0)) + 36|0); + HEAPF32[$$sroa$12$0$$sroa_idx18>>2] = $97; + $$sroa$13$0$$sroa_idx20 = ((($0)) + 40|0); + HEAPF32[$$sroa$13$0$$sroa_idx20>>2] = $133; + $$sroa$14$0$$sroa_idx22 = ((($0)) + 44|0); + HEAPF32[$$sroa$14$0$$sroa_idx22>>2] = $169; + $$sroa$15$0$$sroa_idx24 = ((($0)) + 48|0); + HEAPF32[$$sroa$15$0$$sroa_idx24>>2] = $68; + $$sroa$16$0$$sroa_idx26 = ((($0)) + 52|0); + HEAPF32[$$sroa$16$0$$sroa_idx26>>2] = $104; + $$sroa$17$0$$sroa_idx28 = ((($0)) + 56|0); + HEAPF32[$$sroa$17$0$$sroa_idx28>>2] = $140; + $$sroa$18$0$$sroa_idx30 = ((($0)) + 60|0); + HEAPF32[$$sroa$18$0$$sroa_idx30>>2] = $176; + return; +} +function _MatrixToFloat($0) { + $0 = $0|0; + var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; + var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = HEAP32[$0>>2]|0; + HEAP32[5261] = $1; + $2 = ((($0)) + 4|0); + $3 = HEAP32[$2>>2]|0; + HEAP32[(21048)>>2] = $3; + $4 = ((($0)) + 8|0); + $5 = HEAP32[$4>>2]|0; + HEAP32[(21052)>>2] = $5; + $6 = ((($0)) + 12|0); + $7 = HEAP32[$6>>2]|0; + HEAP32[(21056)>>2] = $7; + $8 = ((($0)) + 16|0); + $9 = HEAP32[$8>>2]|0; + HEAP32[(21060)>>2] = $9; + $10 = ((($0)) + 20|0); + $11 = HEAP32[$10>>2]|0; + HEAP32[(21064)>>2] = $11; + $12 = ((($0)) + 24|0); + $13 = HEAP32[$12>>2]|0; + HEAP32[(21068)>>2] = $13; + $14 = ((($0)) + 28|0); + $15 = HEAP32[$14>>2]|0; + HEAP32[(21072)>>2] = $15; + $16 = ((($0)) + 32|0); + $17 = HEAP32[$16>>2]|0; + HEAP32[(21076)>>2] = $17; + $18 = ((($0)) + 36|0); + $19 = HEAP32[$18>>2]|0; + HEAP32[(21080)>>2] = $19; + $20 = ((($0)) + 40|0); + $21 = HEAP32[$20>>2]|0; + HEAP32[(21084)>>2] = $21; + $22 = ((($0)) + 44|0); + $23 = HEAP32[$22>>2]|0; + HEAP32[(21088)>>2] = $23; + $24 = ((($0)) + 48|0); + $25 = HEAP32[$24>>2]|0; + HEAP32[(21092)>>2] = $25; + $26 = ((($0)) + 52|0); + $27 = HEAP32[$26>>2]|0; + HEAP32[(21096)>>2] = $27; + $28 = ((($0)) + 56|0); + $29 = HEAP32[$28>>2]|0; + HEAP32[(21100)>>2] = $29; + $30 = ((($0)) + 60|0); + $31 = HEAP32[$30>>2]|0; + HEAP32[(21104)>>2] = $31; + return (21044|0); +} +function _rlViewport($0,$1,$2,$3) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + var label = 0, sp = 0; + sp = STACKTOP; + _glViewport(($0|0),($1|0),($2|0),($3|0)); + return; +} +function _SetMatrixModelview($0) { + $0 = $0|0; + var dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + dest=20804; src=$0; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + return; +} +function _SetMatrixProjection($0) { + $0 = $0|0; + var dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + dest=20740; src=$0; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + return; +} +function _VectorTransform($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0, $18 = 0.0, $19 = 0.0, $2 = 0.0, $20 = 0, $21 = 0.0, $22 = 0.0, $23 = 0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $27 = 0, $28 = 0.0; + var $29 = 0.0, $3 = 0, $30 = 0.0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0, $35 = 0.0, $36 = 0.0, $37 = 0, $38 = 0.0, $39 = 0.0, $4 = 0.0, $40 = 0.0, $41 = 0, $42 = 0.0, $43 = 0.0, $44 = 0.0, $45 = 0, $46 = 0.0; + var $47 = 0.0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $2 = +HEAPF32[$0>>2]; + $3 = ((($0)) + 4|0); + $4 = +HEAPF32[$3>>2]; + $5 = ((($0)) + 8|0); + $6 = +HEAPF32[$5>>2]; + $7 = +HEAPF32[$1>>2]; + $8 = $2 * $7; + $9 = ((($1)) + 4|0); + $10 = +HEAPF32[$9>>2]; + $11 = $4 * $10; + $12 = $8 + $11; + $13 = ((($1)) + 8|0); + $14 = +HEAPF32[$13>>2]; + $15 = $6 * $14; + $16 = $12 + $15; + $17 = ((($1)) + 12|0); + $18 = +HEAPF32[$17>>2]; + $19 = $18 + $16; + HEAPF32[$0>>2] = $19; + $20 = ((($1)) + 16|0); + $21 = +HEAPF32[$20>>2]; + $22 = $2 * $21; + $23 = ((($1)) + 20|0); + $24 = +HEAPF32[$23>>2]; + $25 = $4 * $24; + $26 = $22 + $25; + $27 = ((($1)) + 24|0); + $28 = +HEAPF32[$27>>2]; + $29 = $6 * $28; + $30 = $26 + $29; + $31 = ((($1)) + 28|0); + $32 = +HEAPF32[$31>>2]; + $33 = $32 + $30; + HEAPF32[$3>>2] = $33; + $34 = ((($1)) + 32|0); + $35 = +HEAPF32[$34>>2]; + $36 = $2 * $35; + $37 = ((($1)) + 36|0); + $38 = +HEAPF32[$37>>2]; + $39 = $4 * $38; + $40 = $36 + $39; + $41 = ((($1)) + 40|0); + $42 = +HEAPF32[$41>>2]; + $43 = $6 * $42; + $44 = $40 + $43; + $45 = ((($1)) + 44|0); + $46 = +HEAPF32[$45>>2]; + $47 = $46 + $44; + HEAPF32[$5>>2] = $47; + return; +} +function _rlVertex3f($0,$1,$2) { + $0 = +$0; + $1 = +$1; + $2 = +$2; + var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0; + var $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0; + var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer3 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $vararg_buffer3 = sp + 16|0; + $vararg_buffer1 = sp + 8|0; + $vararg_buffer = sp; + $3 = HEAP32[5626]|0; + $4 = ($3|0)==(0); + if (!($4)) { + $5 = HEAP32[5628]|0; + $6 = HEAP32[5627]|0; + $7 = (($5) + (($6*12)|0)|0); + HEAPF32[$7>>2] = $0; + $8 = (((($5) + (($6*12)|0)|0)) + 4|0); + HEAPF32[$8>>2] = $1; + $9 = (((($5) + (($6*12)|0)|0)) + 8|0); + HEAPF32[$9>>2] = $2; + $10 = (($6) + 1)|0; + HEAP32[5627] = $10; + STACKTOP = sp;return; + } + $11 = HEAP32[5629]|0; + switch ($11|0) { + case 1: { + $12 = HEAP32[5221]|0; + $13 = ($12|0)<(2048); + if ($13) { + $14 = HEAP32[(20896)>>2]|0; + $15 = ($12*3)|0; + $16 = (($14) + ($15<<2)|0); + HEAPF32[$16>>2] = $0; + $17 = (($15) + 1)|0; + $18 = (($14) + ($17<<2)|0); + HEAPF32[$18>>2] = $1; + $19 = (($15) + 2)|0; + $20 = (($14) + ($19<<2)|0); + HEAPF32[$20>>2] = $2; + $21 = (($12) + 1)|0; + HEAP32[5221] = $21; + STACKTOP = sp;return; + } else { + _TraceLog(2,8222,$vararg_buffer); + STACKTOP = sp;return; + } + break; + } + case 4: { + $22 = HEAP32[5233]|0; + $23 = ($22|0)<(6144); + if ($23) { + $24 = HEAP32[(20944)>>2]|0; + $25 = ($22*3)|0; + $26 = (($24) + ($25<<2)|0); + HEAPF32[$26>>2] = $0; + $27 = (($25) + 1)|0; + $28 = (($24) + ($27<<2)|0); + HEAPF32[$28>>2] = $1; + $29 = (($25) + 2)|0; + $30 = (($24) + ($29<<2)|0); + HEAPF32[$30>>2] = $2; + $31 = (($22) + 1)|0; + HEAP32[5233] = $31; + STACKTOP = sp;return; + } else { + _TraceLog(2,8247,$vararg_buffer1); + STACKTOP = sp;return; + } + break; + } + case 7: { + $32 = HEAP32[5173]|0; + $33 = ($32|0)<(4096); + if ($33) { + $34 = HEAP32[(20704)>>2]|0; + $35 = ($32*3)|0; + $36 = (($34) + ($35<<2)|0); + HEAPF32[$36>>2] = $0; + $37 = (($35) + 1)|0; + $38 = (($34) + ($37<<2)|0); + HEAPF32[$38>>2] = $1; + $39 = (($35) + 2)|0; + $40 = (($34) + ($39<<2)|0); + HEAPF32[$40>>2] = $2; + $41 = (($32) + 1)|0; + HEAP32[5173] = $41; + $42 = HEAP32[5220]|0; + $43 = HEAP32[5218]|0; + $44 = (($43) + -1)|0; + $45 = (($42) + (($44*144)|0)|0); + $46 = HEAP32[$45>>2]|0; + $47 = (($46) + 1)|0; + HEAP32[$45>>2] = $47; + STACKTOP = sp;return; + } else { + _TraceLog(2,8276,$vararg_buffer3); + STACKTOP = sp;return; + } + break; + } + default: { + STACKTOP = sp;return; + } + } +} +function _MatrixIdentity($0) { + $0 = $0|0; + var $$sroa$5$0$$sroa_idx = 0, $$sroa$55$0$$sroa_idx6 = 0, $$sroa$6$0$$sroa_idx = 0, $$sroa$611$0$$sroa_idx12 = 0, $$sroa$7$0$$sroa_idx = 0, $$sroa$717$0$$sroa_idx18 = 0, label = 0, sp = 0; + sp = STACKTOP; + HEAPF32[$0>>2] = 1.0; + $$sroa$5$0$$sroa_idx = ((($0)) + 4|0); + ;HEAP32[$$sroa$5$0$$sroa_idx>>2]=0|0;HEAP32[$$sroa$5$0$$sroa_idx+4>>2]=0|0;HEAP32[$$sroa$5$0$$sroa_idx+8>>2]=0|0;HEAP32[$$sroa$5$0$$sroa_idx+12>>2]=0|0; + $$sroa$55$0$$sroa_idx6 = ((($0)) + 20|0); + HEAPF32[$$sroa$55$0$$sroa_idx6>>2] = 1.0; + $$sroa$6$0$$sroa_idx = ((($0)) + 24|0); + ;HEAP32[$$sroa$6$0$$sroa_idx>>2]=0|0;HEAP32[$$sroa$6$0$$sroa_idx+4>>2]=0|0;HEAP32[$$sroa$6$0$$sroa_idx+8>>2]=0|0;HEAP32[$$sroa$6$0$$sroa_idx+12>>2]=0|0; + $$sroa$611$0$$sroa_idx12 = ((($0)) + 40|0); + HEAPF32[$$sroa$611$0$$sroa_idx12>>2] = 1.0; + $$sroa$7$0$$sroa_idx = ((($0)) + 44|0); + ;HEAP32[$$sroa$7$0$$sroa_idx>>2]=0|0;HEAP32[$$sroa$7$0$$sroa_idx+4>>2]=0|0;HEAP32[$$sroa$7$0$$sroa_idx+8>>2]=0|0;HEAP32[$$sroa$7$0$$sroa_idx+12>>2]=0|0; + $$sroa$717$0$$sroa_idx18 = ((($0)) + 60|0); + HEAPF32[$$sroa$717$0$$sroa_idx18>>2] = 1.0; + return; +} +function _VectorNormalize($0) { + $0 = $0|0; + var $$byval_copy = 0, $$op = 0.0, $1 = 0.0, $10 = 0.0, $11 = 0.0, $2 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $$byval_copy = sp; + ;HEAP32[$$byval_copy>>2]=HEAP32[$0>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$0+8>>2]|0; + $1 = (+_VectorLength($$byval_copy)); + $2 = $1 == 0.0; + $$op = 1.0 / $1; + $3 = $2 ? 1.0 : $$op; + $4 = +HEAPF32[$0>>2]; + $5 = $4 * $3; + HEAPF32[$0>>2] = $5; + $6 = ((($0)) + 4|0); + $7 = +HEAPF32[$6>>2]; + $8 = $3 * $7; + HEAPF32[$6>>2] = $8; + $9 = ((($0)) + 8|0); + $10 = +HEAPF32[$9>>2]; + $11 = $3 * $10; + HEAPF32[$9>>2] = $11; + STACKTOP = sp;return; +} +function _MatrixRotate($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = +$2; + var $$ = 0.0, $$221 = 0.0, $$222 = 0.0, $$sroa$10$0$$sroa_idx199 = 0, $$sroa$11$0$$sroa_idx201 = 0, $$sroa$12$0$$sroa_idx203 = 0, $$sroa$13$0$$sroa_idx205 = 0, $$sroa$14$0$$sroa_idx207 = 0, $$sroa$15$0$$sroa_idx209 = 0, $$sroa$16$0$$sroa_idx211 = 0, $$sroa$17$0$$sroa_idx213 = 0, $$sroa$18$0$$sroa_idx215 = 0, $$sroa$4$0$$sroa_idx187 = 0, $$sroa$5$0$$sroa_idx189 = 0, $$sroa$6$0$$sroa_idx191 = 0, $$sroa$7$0$$sroa_idx193 = 0, $$sroa$8$0$$sroa_idx195 = 0, $$sroa$9$0$$sroa_idx197 = 0, $10 = 0.0, $100 = 0.0; + var $101 = 0.0, $102 = 0.0, $103 = 0.0, $104 = 0.0, $105 = 0.0, $106 = 0.0, $107 = 0.0, $108 = 0.0, $109 = 0.0, $11 = 0.0, $110 = 0.0, $111 = 0.0, $112 = 0.0, $113 = 0.0, $114 = 0.0, $115 = 0.0, $116 = 0.0, $117 = 0.0, $118 = 0.0, $119 = 0.0; + var $12 = 0.0, $120 = 0.0, $121 = 0.0, $122 = 0.0, $123 = 0.0, $124 = 0.0, $125 = 0.0, $126 = 0.0, $127 = 0.0, $128 = 0.0, $129 = 0.0, $13 = 0.0, $130 = 0.0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0; + var $138 = 0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0, $26 = 0.0, $27 = 0, $28 = 0.0, $29 = 0, $3 = 0, $30 = 0.0, $31 = 0; + var $32 = 0.0, $33 = 0, $34 = 0.0, $35 = 0, $36 = 0.0, $37 = 0, $38 = 0.0, $39 = 0, $4 = 0.0, $40 = 0.0, $41 = 0, $42 = 0.0, $43 = 0, $44 = 0.0, $45 = 0, $46 = 0.0, $47 = 0.0, $48 = 0.0, $49 = 0.0, $5 = 0; + var $50 = 0.0, $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0.0, $55 = 0.0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0.0, $6 = 0.0, $60 = 0.0, $61 = 0.0, $62 = 0.0, $63 = 0.0, $64 = 0.0, $65 = 0.0, $66 = 0.0, $67 = 0.0, $68 = 0.0; + var $69 = 0.0, $7 = 0, $70 = 0.0, $71 = 0.0, $72 = 0.0, $73 = 0.0, $74 = 0.0, $75 = 0.0, $76 = 0.0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0.0, $80 = 0.0, $81 = 0.0, $82 = 0.0, $83 = 0.0, $84 = 0.0, $85 = 0.0, $86 = 0.0; + var $87 = 0.0, $88 = 0.0, $89 = 0.0, $9 = 0.0, $90 = 0.0, $91 = 0.0, $92 = 0.0, $93 = 0.0, $94 = 0.0, $95 = 0.0, $96 = 0.0, $97 = 0.0, $98 = 0.0, $99 = 0.0, $or$cond = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $3 = sp; + _MatrixIdentity($3); + $4 = +HEAPF32[$1>>2]; + $5 = ((($1)) + 4|0); + $6 = +HEAPF32[$5>>2]; + $7 = ((($1)) + 8|0); + $8 = +HEAPF32[$7>>2]; + $9 = $4 * $4; + $10 = $6 * $6; + $11 = $9 + $10; + $12 = $8 * $8; + $13 = $11 + $12; + $14 = (+Math_sqrt((+$13))); + $15 = $14 != 1.0; + $16 = $14 != 0.0; + $or$cond = $15 & $16; + $17 = 1.0 / $14; + $18 = $4 * $17; + $19 = $6 * $17; + $20 = $8 * $17; + $$ = $or$cond ? $20 : $8; + $$221 = $or$cond ? $19 : $6; + $$222 = $or$cond ? $18 : $4; + $21 = (+Math_sin((+$2))); + $22 = (+Math_cos((+$2))); + $23 = 1.0 - $22; + $24 = +HEAPF32[$3>>2]; + $25 = ((($3)) + 16|0); + $26 = +HEAPF32[$25>>2]; + $27 = ((($3)) + 32|0); + $28 = +HEAPF32[$27>>2]; + $29 = ((($3)) + 48|0); + $30 = +HEAPF32[$29>>2]; + $31 = ((($3)) + 4|0); + $32 = +HEAPF32[$31>>2]; + $33 = ((($3)) + 20|0); + $34 = +HEAPF32[$33>>2]; + $35 = ((($3)) + 36|0); + $36 = +HEAPF32[$35>>2]; + $37 = ((($3)) + 52|0); + $38 = +HEAPF32[$37>>2]; + $39 = ((($3)) + 8|0); + $40 = +HEAPF32[$39>>2]; + $41 = ((($3)) + 24|0); + $42 = +HEAPF32[$41>>2]; + $43 = ((($3)) + 40|0); + $44 = +HEAPF32[$43>>2]; + $45 = ((($3)) + 56|0); + $46 = +HEAPF32[$45>>2]; + $47 = $$222 * $$222; + $48 = $23 * $47; + $49 = $22 + $48; + $50 = $$221 * $$222; + $51 = $23 * $50; + $52 = $21 * $$; + $53 = $52 + $51; + $54 = $$ * $$222; + $55 = $23 * $54; + $56 = $21 * $$221; + $57 = $55 - $56; + $58 = $51 - $52; + $59 = $$221 * $$221; + $60 = $23 * $59; + $61 = $22 + $60; + $62 = $$ * $$221; + $63 = $23 * $62; + $64 = $21 * $$222; + $65 = $64 + $63; + $66 = $56 + $55; + $67 = $63 - $64; + $68 = $$ * $$; + $69 = $23 * $68; + $70 = $22 + $69; + $71 = $24 * $49; + $72 = $53 * $32; + $73 = $71 + $72; + $74 = $57 * $40; + $75 = $73 + $74; + $76 = $26 * $49; + $77 = $53 * $34; + $78 = $76 + $77; + $79 = $57 * $42; + $80 = $78 + $79; + $81 = $28 * $49; + $82 = $53 * $36; + $83 = $81 + $82; + $84 = $57 * $44; + $85 = $83 + $84; + $86 = $30 * $49; + $87 = $53 * $38; + $88 = $86 + $87; + $89 = $57 * $46; + $90 = $88 + $89; + $91 = $24 * $58; + $92 = $61 * $32; + $93 = $91 + $92; + $94 = $65 * $40; + $95 = $93 + $94; + $96 = $26 * $58; + $97 = $61 * $34; + $98 = $96 + $97; + $99 = $65 * $42; + $100 = $98 + $99; + $101 = $28 * $58; + $102 = $61 * $36; + $103 = $101 + $102; + $104 = $65 * $44; + $105 = $103 + $104; + $106 = $30 * $58; + $107 = $61 * $38; + $108 = $106 + $107; + $109 = $65 * $46; + $110 = $108 + $109; + $111 = $24 * $66; + $112 = $67 * $32; + $113 = $111 + $112; + $114 = $70 * $40; + $115 = $113 + $114; + $116 = $26 * $66; + $117 = $67 * $34; + $118 = $116 + $117; + $119 = $70 * $42; + $120 = $118 + $119; + $121 = $28 * $66; + $122 = $67 * $36; + $123 = $121 + $122; + $124 = $70 * $44; + $125 = $123 + $124; + $126 = $30 * $66; + $127 = $67 * $38; + $128 = $126 + $127; + $129 = $70 * $46; + $130 = $128 + $129; + $131 = ((($3)) + 12|0); + $132 = HEAP32[$131>>2]|0; + $133 = ((($3)) + 28|0); + $134 = HEAP32[$133>>2]|0; + $135 = ((($3)) + 44|0); + $136 = HEAP32[$135>>2]|0; + $137 = ((($3)) + 60|0); + $138 = HEAP32[$137>>2]|0; + HEAPF32[$0>>2] = $75; + $$sroa$4$0$$sroa_idx187 = ((($0)) + 4|0); + HEAPF32[$$sroa$4$0$$sroa_idx187>>2] = $95; + $$sroa$5$0$$sroa_idx189 = ((($0)) + 8|0); + HEAPF32[$$sroa$5$0$$sroa_idx189>>2] = $115; + $$sroa$6$0$$sroa_idx191 = ((($0)) + 12|0); + HEAP32[$$sroa$6$0$$sroa_idx191>>2] = $132; + $$sroa$7$0$$sroa_idx193 = ((($0)) + 16|0); + HEAPF32[$$sroa$7$0$$sroa_idx193>>2] = $80; + $$sroa$8$0$$sroa_idx195 = ((($0)) + 20|0); + HEAPF32[$$sroa$8$0$$sroa_idx195>>2] = $100; + $$sroa$9$0$$sroa_idx197 = ((($0)) + 24|0); + HEAPF32[$$sroa$9$0$$sroa_idx197>>2] = $120; + $$sroa$10$0$$sroa_idx199 = ((($0)) + 28|0); + HEAP32[$$sroa$10$0$$sroa_idx199>>2] = $134; + $$sroa$11$0$$sroa_idx201 = ((($0)) + 32|0); + HEAPF32[$$sroa$11$0$$sroa_idx201>>2] = $85; + $$sroa$12$0$$sroa_idx203 = ((($0)) + 36|0); + HEAPF32[$$sroa$12$0$$sroa_idx203>>2] = $105; + $$sroa$13$0$$sroa_idx205 = ((($0)) + 40|0); + HEAPF32[$$sroa$13$0$$sroa_idx205>>2] = $125; + $$sroa$14$0$$sroa_idx207 = ((($0)) + 44|0); + HEAP32[$$sroa$14$0$$sroa_idx207>>2] = $136; + $$sroa$15$0$$sroa_idx209 = ((($0)) + 48|0); + HEAPF32[$$sroa$15$0$$sroa_idx209>>2] = $90; + $$sroa$16$0$$sroa_idx211 = ((($0)) + 52|0); + HEAPF32[$$sroa$16$0$$sroa_idx211>>2] = $110; + $$sroa$17$0$$sroa_idx213 = ((($0)) + 56|0); + HEAPF32[$$sroa$17$0$$sroa_idx213>>2] = $130; + $$sroa$18$0$$sroa_idx215 = ((($0)) + 60|0); + HEAP32[$$sroa$18$0$$sroa_idx215>>2] = $138; + STACKTOP = sp;return; +} +function _MatrixTranspose($0) { + $0 = $0|0; + var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $3 = 0, $4 = 0, $5 = 0; + var $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = ((($0)) + 4|0); + $2 = HEAP32[$1>>2]|0; + $3 = ((($0)) + 8|0); + $4 = HEAP32[$3>>2]|0; + $5 = ((($0)) + 12|0); + $6 = HEAP32[$5>>2]|0; + $7 = ((($0)) + 16|0); + $8 = HEAP32[$7>>2]|0; + $9 = ((($0)) + 24|0); + $10 = HEAP32[$9>>2]|0; + $11 = ((($0)) + 28|0); + $12 = HEAP32[$11>>2]|0; + $13 = ((($0)) + 32|0); + $14 = HEAP32[$13>>2]|0; + $15 = ((($0)) + 36|0); + $16 = HEAP32[$15>>2]|0; + $17 = ((($0)) + 44|0); + $18 = HEAP32[$17>>2]|0; + $19 = ((($0)) + 48|0); + $20 = HEAP32[$19>>2]|0; + $21 = ((($0)) + 52|0); + $22 = HEAP32[$21>>2]|0; + $23 = ((($0)) + 56|0); + $24 = HEAP32[$23>>2]|0; + HEAP32[$1>>2] = $8; + HEAP32[$3>>2] = $14; + HEAP32[$5>>2] = $20; + HEAP32[$7>>2] = $2; + HEAP32[$9>>2] = $16; + HEAP32[$11>>2] = $22; + HEAP32[$13>>2] = $4; + HEAP32[$15>>2] = $10; + HEAP32[$17>>2] = $24; + HEAP32[$19>>2] = $6; + HEAP32[$21>>2] = $12; + HEAP32[$23>>2] = $18; + return; +} +function _VectorLength($0) { + $0 = $0|0; + var $1 = 0.0, $10 = 0.0, $11 = 0.0, $2 = 0.0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + $1 = +HEAPF32[$0>>2]; + $2 = $1 * $1; + $3 = ((($0)) + 4|0); + $4 = +HEAPF32[$3>>2]; + $5 = $4 * $4; + $6 = $2 + $5; + $7 = ((($0)) + 8|0); + $8 = +HEAPF32[$7>>2]; + $9 = $8 * $8; + $10 = $6 + $9; + $11 = (+Math_sqrt((+$10))); + return (+$11); +} +function _MatrixTranslate($0,$1,$2,$3) { + $0 = $0|0; + $1 = +$1; + $2 = +$2; + $3 = +$3; + var $$sroa$13$0$$sroa_idx20 = 0, $$sroa$14$0$$sroa_idx22 = 0, $$sroa$15$0$$sroa_idx24 = 0, $$sroa$16$0$$sroa_idx26 = 0, $$sroa$17$0$$sroa_idx28 = 0, $$sroa$18$0$$sroa_idx30 = 0, $$sroa$4$0$$sroa_idx2 = 0, $$sroa$8$0$$sroa_idx10 = 0, $$sroa$9$0$$sroa_idx12 = 0, label = 0, sp = 0; + sp = STACKTOP; + HEAPF32[$0>>2] = 1.0; + $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); + $$sroa$8$0$$sroa_idx10 = ((($0)) + 20|0); + ;HEAP32[$$sroa$4$0$$sroa_idx2>>2]=0|0;HEAP32[$$sroa$4$0$$sroa_idx2+4>>2]=0|0;HEAP32[$$sroa$4$0$$sroa_idx2+8>>2]=0|0;HEAP32[$$sroa$4$0$$sroa_idx2+12>>2]=0|0; + HEAPF32[$$sroa$8$0$$sroa_idx10>>2] = 1.0; + $$sroa$9$0$$sroa_idx12 = ((($0)) + 24|0); + $$sroa$13$0$$sroa_idx20 = ((($0)) + 40|0); + ;HEAP32[$$sroa$9$0$$sroa_idx12>>2]=0|0;HEAP32[$$sroa$9$0$$sroa_idx12+4>>2]=0|0;HEAP32[$$sroa$9$0$$sroa_idx12+8>>2]=0|0;HEAP32[$$sroa$9$0$$sroa_idx12+12>>2]=0|0; + HEAPF32[$$sroa$13$0$$sroa_idx20>>2] = 1.0; + $$sroa$14$0$$sroa_idx22 = ((($0)) + 44|0); + HEAPF32[$$sroa$14$0$$sroa_idx22>>2] = 0.0; + $$sroa$15$0$$sroa_idx24 = ((($0)) + 48|0); + HEAPF32[$$sroa$15$0$$sroa_idx24>>2] = $1; + $$sroa$16$0$$sroa_idx26 = ((($0)) + 52|0); + HEAPF32[$$sroa$16$0$$sroa_idx26>>2] = $2; + $$sroa$17$0$$sroa_idx28 = ((($0)) + 56|0); + HEAPF32[$$sroa$17$0$$sroa_idx28>>2] = $3; + $$sroa$18$0$$sroa_idx30 = ((($0)) + 60|0); + HEAPF32[$$sroa$18$0$$sroa_idx30>>2] = 1.0; + return; +} +function _rlLoadIdentity() { + var $0 = 0, $1 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $0 = sp; + $1 = HEAP32[5625]|0; + _MatrixIdentity($0); + dest=$1; src=$0; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + STACKTOP = sp;return; +} +function _FormatText($0,$varargs) { + $0 = $0|0; + $varargs = $varargs|0; + var $1 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $1 = sp; + HEAP32[$1>>2] = $varargs; + (_vsprintf(23512,$0,$1)|0); + STACKTOP = sp;return (23512|0); +} +function _DrawFPS($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $$byval_copy = 0, $$sink = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $$byval_copy = sp; + $2 = sp + 4|0; + $3 = HEAP32[5631]|0; + $4 = HEAP32[927]|0; + $5 = ($3|0)<($4|0); + if ($5) { + $6 = (($3) + 1)|0; + $$sink = $6; + } else { + $7 = (_GetFPS()|0); + HEAP32[5632] = $7; + HEAP32[927] = $7; + $$sink = 0; + } + HEAP32[5631] = $$sink; + $8 = HEAP32[5632]|0; + HEAP32[$$byval_copy>>2] = $8; + (_FormatText(8339,$$byval_copy)|0); + HEAP8[$2>>0] = 0; + $9 = ((($2)) + 1|0); + HEAP8[$9>>0] = -98; + $10 = ((($2)) + 2|0); + HEAP8[$10>>0] = 47; + $11 = ((($2)) + 3|0); + HEAP8[$11>>0] = -1; + ;HEAP8[$$byval_copy>>0]=HEAP8[$2>>0]|0;HEAP8[$$byval_copy+1>>0]=HEAP8[$2+1>>0]|0;HEAP8[$$byval_copy+2>>0]=HEAP8[$2+2>>0]|0;HEAP8[$$byval_copy+3>>0]=HEAP8[$2+3>>0]|0; + _DrawText(23512,$0,$1,20,$$byval_copy); + STACKTOP = sp;return; +} +function _GetFPS() { + var $0 = 0.0, $1 = 0.0, $2 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = (+_GetFrameTime()); + $1 = 1.0 / $0; + $2 = (~~(($1))); + return ($2|0); +} +function _GetFrameTime() { + var $0 = 0.0, $1 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + $0 = +HEAPF64[2430]; + $1 = $0; + return (+$1); +} +function _LoadTexture($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $$byval_copy1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $vararg_buffer = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $$byval_copy1 = sp + 44|0; + $vararg_buffer = sp; + $2 = sp + 24|0; + $3 = sp + 4|0; + ;HEAP32[$2>>2]=0|0;HEAP32[$2+4>>2]=0|0;HEAP32[$2+8>>2]=0|0;HEAP32[$2+12>>2]=0|0;HEAP32[$2+16>>2]=0|0; + _LoadImage($3,$1); + $4 = HEAP32[$3>>2]|0; + $5 = ($4|0)==(0|0); + if ($5) { + _TraceLog(1,8347,$vararg_buffer); + ;HEAP32[$0>>2]=HEAP32[$2>>2]|0;HEAP32[$0+4>>2]=HEAP32[$2+4>>2]|0;HEAP32[$0+8>>2]=HEAP32[$2+8>>2]|0;HEAP32[$0+12>>2]=HEAP32[$2+12>>2]|0;HEAP32[$0+16>>2]=HEAP32[$2+16>>2]|0; + STACKTOP = sp;return; + } else { + ;HEAP32[$$byval_copy1>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$3+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$3+8>>2]|0;HEAP32[$$byval_copy1+12>>2]=HEAP32[$3+12>>2]|0;HEAP32[$$byval_copy1+16>>2]=HEAP32[$3+16>>2]|0; + _LoadTextureFromImage($2,$$byval_copy1); + ;HEAP32[$$byval_copy1>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$3+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$3+8>>2]|0;HEAP32[$$byval_copy1+12>>2]=HEAP32[$3+12>>2]|0;HEAP32[$$byval_copy1+16>>2]=HEAP32[$3+16>>2]|0; + _UnloadImage($$byval_copy1); + ;HEAP32[$0>>2]=HEAP32[$2>>2]|0;HEAP32[$0+4>>2]=HEAP32[$2+4>>2]|0;HEAP32[$0+8>>2]=HEAP32[$2+8>>2]|0;HEAP32[$0+12>>2]=HEAP32[$2+12>>2]|0;HEAP32[$0+16>>2]=HEAP32[$2+16>>2]|0; + STACKTOP = sp;return; + } +} +function _LoadRenderTexture($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $3 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $3 = sp; + _rlglLoadRenderTexture($3,$1,$2); + dest=$0; src=$3; stop=dest+44|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + STACKTOP = sp;return; +} +function _rlglLoadRenderTexture($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0; + var $vararg_buffer1 = 0, $vararg_buffer3 = 0, $vararg_buffer5 = 0, $vararg_buffer7 = 0, $vararg_buffer9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(96|0); + $vararg_buffer9 = sp + 40|0; + $vararg_buffer7 = sp + 32|0; + $vararg_buffer5 = sp + 24|0; + $vararg_buffer3 = sp + 16|0; + $vararg_buffer1 = sp + 8|0; + $vararg_buffer = sp; + $3 = sp + 44|0; + HEAP32[$3>>2] = 0; + $4 = ((($3)) + 4|0); + HEAP32[$4>>2] = 0; + $5 = ((($3)) + 8|0); + HEAP32[$5>>2] = $1; + $6 = ((($3)) + 12|0); + HEAP32[$6>>2] = $2; + $7 = ((($3)) + 20|0); + HEAP32[$7>>2] = 7; + $8 = ((($3)) + 16|0); + HEAP32[$8>>2] = 1; + $9 = ((($3)) + 24|0); + HEAP32[$9>>2] = 0; + $10 = ((($3)) + 28|0); + HEAP32[$10>>2] = $1; + $11 = ((($3)) + 32|0); + HEAP32[$11>>2] = $2; + $12 = ((($3)) + 40|0); + HEAP32[$12>>2] = 19; + $13 = ((($3)) + 36|0); + HEAP32[$13>>2] = 1; + _glGenTextures(1,($4|0)); + $14 = HEAP32[$4>>2]|0; + _glBindTexture(3553,($14|0)); + _glTexParameteri(3553,10242,33071); + _glTexParameteri(3553,10243,33071); + _glTexParameteri(3553,10241,9729); + _glTexParameteri(3553,10240,9729); + _glTexImage2D(3553,0,6408,($1|0),($2|0),0,6408,5121,(0|0)); + _glBindTexture(3553,0); + _glGenRenderbuffers(1,($9|0)); + $15 = HEAP32[$9>>2]|0; + _glBindRenderbuffer(36161,($15|0)); + _glRenderbufferStorage(36161,33189,($1|0),($2|0)); + _glGenFramebuffers(1,($3|0)); + $16 = HEAP32[$3>>2]|0; + _glBindFramebuffer(36160,($16|0)); + $17 = HEAP32[$4>>2]|0; + _glFramebufferTexture2D(36160,36064,3553,($17|0),0); + $18 = HEAP32[$9>>2]|0; + _glFramebufferRenderbuffer(36160,36096,36161,($18|0)); + $19 = (_glCheckFramebufferStatus(36160)|0); + $20 = ($19|0)==(36053); + if ($20) { + $21 = HEAP32[$3>>2]|0; + HEAP32[$vararg_buffer9>>2] = $21; + _TraceLog(0,8556,$vararg_buffer9); + _glBindFramebuffer(36160,0); + dest=$0; src=$3; stop=dest+44|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + STACKTOP = sp;return; + } + _TraceLog(1,8376,$vararg_buffer); + switch ($19|0) { + case 36061: { + _TraceLog(1,8419,$vararg_buffer1); + break; + } + case 36054: { + _TraceLog(1,8446,$vararg_buffer3); + break; + } + case 36057: { + _TraceLog(1,8480,$vararg_buffer5); + break; + } + case 36055: { + _TraceLog(1,8514,$vararg_buffer7); + break; + } + default: { + } + } + _glDeleteTextures(1,($4|0)); + _glDeleteTextures(1,($9|0)); + _glDeleteFramebuffers(1,($3|0)); + _glBindFramebuffer(36160,0); + dest=$0; src=$3; stop=dest+44|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + STACKTOP = sp;return; +} +function _rlGetVersion() { + var label = 0, sp = 0; + sp = STACKTOP; + return 4; +} function _DrawTextureRec($0,$1,$2,$3) { $0 = $0|0; $1 = $1|0; @@ -28027,248 +24499,27 @@ function _DrawTextureRec($0,$1,$2,$3) { _DrawTexturePro($$byval_copy,$$byval_copy1,$$byval_copy2,$tmpcast$byval_copy,0.0,$$byval_copy3); STACKTOP = sp;return; } -function _DrawText($0,$1,$2,$3,$4) { +function _MatrixScale($0,$1,$2,$3) { $0 = $0|0; - $1 = $1|0; - $2 = $2|0; - $3 = $3|0; - $4 = $4|0; - var $$ = 0, $$byval_copy = 0, $$byval_copy1 = 0, $$byval_copy2 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0.0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(128|0); - $$byval_copy2 = sp + 112|0; - $$byval_copy1 = sp + 104|0; - $$byval_copy = sp + 72|0; - $5 = sp + 32|0; - $6 = sp + 64|0; - $7 = sp; - _GetDefaultFont($5); - $8 = HEAP32[$5>>2]|0; - $9 = ($8|0)==(0); - if ($9) { - STACKTOP = sp;return; - } - $10 = (+($1|0)); - HEAPF32[$6>>2] = $10; - $11 = ((($6)) + 4|0); - $12 = (+($2|0)); - HEAPF32[$11>>2] = $12; - $13 = ($3|0)>(10); - $$ = $13 ? $3 : 10; - $14 = (($$>>>0) / 10)&-1; - _GetDefaultFont($7); - $15 = (+($$|0)); - ;HEAP32[$$byval_copy>>2]=HEAP32[$7>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$7+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$7+8>>2]|0;HEAP32[$$byval_copy+12>>2]=HEAP32[$7+12>>2]|0;HEAP32[$$byval_copy+16>>2]=HEAP32[$7+16>>2]|0;HEAP32[$$byval_copy+20>>2]=HEAP32[$7+20>>2]|0;HEAP32[$$byval_copy+24>>2]=HEAP32[$7+24>>2]|0;HEAP32[$$byval_copy+28>>2]=HEAP32[$7+28>>2]|0; - ;HEAP32[$$byval_copy1>>2]=HEAP32[$6>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$6+4>>2]|0; - ;HEAP8[$$byval_copy2>>0]=HEAP8[$4>>0]|0;HEAP8[$$byval_copy2+1>>0]=HEAP8[$4+1>>0]|0;HEAP8[$$byval_copy2+2>>0]=HEAP8[$4+2>>0]|0;HEAP8[$$byval_copy2+3>>0]=HEAP8[$4+3>>0]|0; - _DrawTextEx($$byval_copy,$0,$$byval_copy1,$15,$14,$$byval_copy2); - STACKTOP = sp;return; -} -function _DrawTextEx($0,$1,$2,$3,$4,$5) { - $0 = $0|0; - $1 = $1|0; - $2 = $2|0; + $1 = +$1; + $2 = +$2; $3 = +$3; - $4 = $4|0; - $5 = $5|0; - var $$04954 = 0, $$05153 = 0, $$055 = 0, $$1 = 0, $$150 = 0, $$152 = 0, $$2 = 0, $$byval_copy1 = 0, $$byval_copy2 = 0, $$byval_copy3 = 0, $$byval_copy4 = 0, $$byval_copy5 = 0, $$sink = 0, $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0, $15 = 0.0, $16 = 0; - var $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0.0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0.0, $28 = 0.0, $29 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0; - var $37 = 0, $38 = 0, $39 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0.0, $45 = 0.0, $46 = 0, $47 = 0, $48 = 0.0, $49 = 0.0, $50 = 0.0, $51 = 0, $52 = 0.0, $53 = 0.0, $54 = 0.0, $55 = 0, $56 = 0; - var $57 = 0.0, $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0.0, $64 = 0.0, $65 = 0, $66 = 0, $67 = 0, $68 = 0.0, $69 = 0.0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0; - var $75 = 0, $76 = 0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0, $81 = 0, $82 = 0.0, $83 = 0.0, $84 = 0.0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $9 = 0, label = 0, sp = 0; + var $$sroa$5$0$$sroa_idx = 0, $$sroa$55$0$$sroa_idx6 = 0, $$sroa$6$0$$sroa_idx = 0, $$sroa$611$0$$sroa_idx12 = 0, $$sroa$7$0$$sroa_idx = 0, $$sroa$717$0$$sroa_idx18 = 0, label = 0, sp = 0; sp = STACKTOP; - STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(128|0); - $$byval_copy5 = sp + 88|0; - $$byval_copy4 = sp + 80|0; - $$byval_copy3 = sp + 64|0; - $$byval_copy2 = sp + 48|0; - $$byval_copy1 = sp + 24|0; - $6 = sp + 8|0; - $7 = sp; - $8 = (_strlen($1)|0); - $9 = ((($0)) + 20|0); - $10 = HEAP32[$9>>2]|0; - $11 = (+($10|0)); - $12 = $3 / $11; - $13 = ($8|0)>(0); - if (!($13)) { - STACKTOP = sp;return; - } - $14 = ((($0)) + 28|0); - $15 = +HEAPF32[$2>>2]; - $16 = ((($6)) + 4|0); - $17 = ((($2)) + 4|0); - $18 = ((($6)) + 8|0); - $19 = ((($6)) + 12|0); - $20 = ((($7)) + 4|0); - $21 = (+($4|0)); - $$04954 = 0;$$05153 = 0;$$055 = 0; - while(1) { - $22 = (($1) + ($$055)|0); - $23 = HEAP8[$22>>0]|0; - switch ($23<<24>>24) { - case 10: { - $24 = HEAP32[$9>>2]|0; - $25 = (($24|0) / 2)&-1; - $26 = (($25) + ($24))|0; - $27 = (+($26|0)); - $28 = $12 * $27; - $29 = (~~(($28))); - $30 = (($29) + ($$05153))|0; - $$150 = 0;$$152 = $30;$$2 = $$055; - break; - } - case -62: { - $31 = (($$055) + 1)|0; - $32 = (($1) + ($31)|0); - $33 = HEAP8[$32>>0]|0; - $34 = $33&255; - $$1 = $31;$$sink = $34; - label = 9; - break; - } - case -61: { - $35 = (($$055) + 1)|0; - $36 = (($1) + ($35)|0); - $37 = HEAP8[$36>>0]|0; - $38 = $37&255; - $39 = (($38) + 64)|0; - $$1 = $35;$$sink = $39; - label = 9; - break; - } - default: { - $40 = $23 << 24 >> 24; - $$1 = $$055;$$sink = $40; - label = 9; - } - } - do { - if ((label|0) == 9) { - label = 0; - ;HEAP32[$$byval_copy5>>2]=HEAP32[$0>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$$byval_copy5+8>>2]=HEAP32[$0+8>>2]|0;HEAP32[$$byval_copy5+12>>2]=HEAP32[$0+12>>2]|0;HEAP32[$$byval_copy5+16>>2]=HEAP32[$0+16>>2]|0;HEAP32[$$byval_copy5+20>>2]=HEAP32[$0+20>>2]|0;HEAP32[$$byval_copy5+24>>2]=HEAP32[$0+24>>2]|0;HEAP32[$$byval_copy5+28>>2]=HEAP32[$0+28>>2]|0; - $41 = (_GetCharIndex($$byval_copy5,$$sink)|0); - $42 = HEAP32[$14>>2]|0; - $43 = (((($42) + ($41<<5)|0)) + 4|0); - $44 = (+($$04954|0)); - $45 = $44 + $15; - $46 = (((($42) + ($41<<5)|0)) + 20|0); - $47 = HEAP32[$46>>2]|0; - $48 = (+($47|0)); - $49 = $12 * $48; - $50 = $45 + $49; - $51 = (~~(($50))); - HEAP32[$6>>2] = $51; - $52 = +HEAPF32[$17>>2]; - $53 = (+($$05153|0)); - $54 = $53 + $52; - $55 = (((($42) + ($41<<5)|0)) + 24|0); - $56 = HEAP32[$55>>2]|0; - $57 = (+($56|0)); - $58 = $12 * $57; - $59 = $54 + $58; - $60 = (~~(($59))); - HEAP32[$16>>2] = $60; - $61 = (((($42) + ($41<<5)|0)) + 12|0); - $62 = HEAP32[$61>>2]|0; - $63 = (+($62|0)); - $64 = $12 * $63; - $65 = (~~(($64))); - HEAP32[$18>>2] = $65; - $66 = (((($42) + ($41<<5)|0)) + 16|0); - $67 = HEAP32[$66>>2]|0; - $68 = (+($67|0)); - $69 = $12 * $68; - $70 = (~~(($69))); - HEAP32[$19>>2] = $70; - HEAPF32[$7>>2] = 0.0; - HEAPF32[$20>>2] = 0.0; - ;HEAP32[$$byval_copy1>>2]=HEAP32[$0>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$0+8>>2]|0;HEAP32[$$byval_copy1+12>>2]=HEAP32[$0+12>>2]|0;HEAP32[$$byval_copy1+16>>2]=HEAP32[$0+16>>2]|0; - ;HEAP32[$$byval_copy2>>2]=HEAP32[$43>>2]|0;HEAP32[$$byval_copy2+4>>2]=HEAP32[$43+4>>2]|0;HEAP32[$$byval_copy2+8>>2]=HEAP32[$43+8>>2]|0;HEAP32[$$byval_copy2+12>>2]=HEAP32[$43+12>>2]|0; - ;HEAP32[$$byval_copy3>>2]=HEAP32[$6>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$6+4>>2]|0;HEAP32[$$byval_copy3+8>>2]=HEAP32[$6+8>>2]|0;HEAP32[$$byval_copy3+12>>2]=HEAP32[$6+12>>2]|0; - ;HEAP32[$$byval_copy4>>2]=HEAP32[$7>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$7+4>>2]|0; - ;HEAP8[$$byval_copy5>>0]=HEAP8[$5>>0]|0;HEAP8[$$byval_copy5+1>>0]=HEAP8[$5+1>>0]|0;HEAP8[$$byval_copy5+2>>0]=HEAP8[$5+2>>0]|0;HEAP8[$$byval_copy5+3>>0]=HEAP8[$5+3>>0]|0; - _DrawTexturePro($$byval_copy1,$$byval_copy2,$$byval_copy3,$$byval_copy4,0.0,$$byval_copy5); - $71 = HEAP32[$14>>2]|0; - $72 = (((($71) + ($41<<5)|0)) + 28|0); - $73 = HEAP32[$72>>2]|0; - $74 = ($73|0)==(0); - if ($74) { - $75 = (((($71) + ($41<<5)|0)) + 12|0); - $76 = HEAP32[$75>>2]|0; - $77 = (+($76|0)); - $78 = $12 * $77; - $79 = $21 + $78; - $80 = (~~(($79))); - $81 = (($80) + ($$04954))|0; - $$150 = $81;$$152 = $$05153;$$2 = $$1; - break; - } else { - $82 = (+($73|0)); - $83 = $12 * $82; - $84 = $21 + $83; - $85 = (~~(($84))); - $86 = (($85) + ($$04954))|0; - $$150 = $86;$$152 = $$05153;$$2 = $$1; - break; - } - } - } while(0); - $87 = (($$2) + 1)|0; - $88 = ($87|0)<($8|0); - if ($88) { - $$04954 = $$150;$$05153 = $$152;$$055 = $87; - } else { - break; - } - } - STACKTOP = sp;return; -} -function _FormatText($0,$varargs) { - $0 = $0|0; - $varargs = $varargs|0; - var $1 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $1 = sp; - HEAP32[$1>>2] = $varargs; - (_vsprintf(23267,$0,$1)|0); - STACKTOP = sp;return (23267|0); -} -function _DrawFPS($0,$1) { - $0 = $0|0; - $1 = $1|0; - var $$byval_copy = 0, $$sink = 0, $10 = 0, $11 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; - sp = STACKTOP; - STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); - $$byval_copy = sp; - $2 = sp + 4|0; - $3 = HEAP32[5348]|0; - $4 = HEAP32[925]|0; - $5 = ($3|0)<($4|0); - if ($5) { - $6 = (($3) + 1)|0; - $$sink = $6; - } else { - $7 = (_GetFPS()|0); - HEAP32[5349] = $7; - HEAP32[925] = $7; - $$sink = 0; - } - HEAP32[5348] = $$sink; - $8 = HEAP32[5349]|0; - HEAP32[$$byval_copy>>2] = $8; - (_FormatText(12281,$$byval_copy)|0); - HEAP8[$2>>0] = 0; - $9 = ((($2)) + 1|0); - HEAP8[$9>>0] = -98; - $10 = ((($2)) + 2|0); - HEAP8[$10>>0] = 47; - $11 = ((($2)) + 3|0); - HEAP8[$11>>0] = -1; - ;HEAP8[$$byval_copy>>0]=HEAP8[$2>>0]|0;HEAP8[$$byval_copy+1>>0]=HEAP8[$2+1>>0]|0;HEAP8[$$byval_copy+2>>0]=HEAP8[$2+2>>0]|0;HEAP8[$$byval_copy+3>>0]=HEAP8[$2+3>>0]|0; - _DrawText(23267,$0,$1,20,$$byval_copy); - STACKTOP = sp;return; + HEAPF32[$0>>2] = $1; + $$sroa$5$0$$sroa_idx = ((($0)) + 4|0); + ;HEAP32[$$sroa$5$0$$sroa_idx>>2]=0|0;HEAP32[$$sroa$5$0$$sroa_idx+4>>2]=0|0;HEAP32[$$sroa$5$0$$sroa_idx+8>>2]=0|0;HEAP32[$$sroa$5$0$$sroa_idx+12>>2]=0|0; + $$sroa$55$0$$sroa_idx6 = ((($0)) + 20|0); + HEAPF32[$$sroa$55$0$$sroa_idx6>>2] = $2; + $$sroa$6$0$$sroa_idx = ((($0)) + 24|0); + ;HEAP32[$$sroa$6$0$$sroa_idx>>2]=0|0;HEAP32[$$sroa$6$0$$sroa_idx+4>>2]=0|0;HEAP32[$$sroa$6$0$$sroa_idx+8>>2]=0|0;HEAP32[$$sroa$6$0$$sroa_idx+12>>2]=0|0; + $$sroa$611$0$$sroa_idx12 = ((($0)) + 40|0); + HEAPF32[$$sroa$611$0$$sroa_idx12>>2] = $3; + $$sroa$7$0$$sroa_idx = ((($0)) + 44|0); + ;HEAP32[$$sroa$7$0$$sroa_idx>>2]=0|0;HEAP32[$$sroa$7$0$$sroa_idx+4>>2]=0|0;HEAP32[$$sroa$7$0$$sroa_idx+8>>2]=0|0;HEAP32[$$sroa$7$0$$sroa_idx+12>>2]=0|0; + $$sroa$717$0$$sroa_idx18 = ((($0)) + 60|0); + HEAPF32[$$sroa$717$0$$sroa_idx18>>2] = 1.0; + return; } function _DrawGrid($0,$1) { $0 = $0|0; @@ -28318,6 +24569,21 @@ function _DrawGrid($0,$1) { _rlEnd(); return; } +function _rlColor3f($0,$1,$2) { + $0 = +$0; + $1 = +$1; + $2 = +$2; + var $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, label = 0, sp = 0; + sp = STACKTOP; + $3 = $0 * 255.0; + $4 = (~~(($3))&255); + $5 = $1 * 255.0; + $6 = (~~(($5))&255); + $7 = $2 * 255.0; + $8 = (~~(($7))&255); + _rlColor4ub($4,$6,$8,-1); + return; +} function _LoadMesh($0,$1) { $0 = $0|0; $1 = $1|0; @@ -28328,7 +24594,7 @@ function _LoadMesh($0,$1) { $2 = sp + 72|0; $3 = sp + 4|0; dest=$2; stop=dest+68|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); - $4 = (_IsFileExtension($1,12289)|0); + $4 = (_IsFileExtension($1,8608)|0); $5 = ($4|0)==(0); if (!($5)) { _LoadOBJ($3,$1); @@ -28337,7 +24603,7 @@ function _LoadMesh($0,$1) { $6 = HEAP32[$2>>2]|0; $7 = ($6|0)==(0); if ($7) { - _TraceLog(2,12294,$vararg_buffer); + _TraceLog(1,8613,$vararg_buffer); } else { _rlglLoadMesh($2,0); } @@ -28410,11 +24676,11 @@ function _LoadOBJ($0,$1) { $13 = sp + 344|0; $14 = sp + 332|0; dest=$$sroa$75; stop=dest+36|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); - $15 = (_fopen($1,12319)|0); + $15 = (_fopen($1,13533)|0); $16 = ($15|0)==(0|0); if ($16) { HEAP32[$vararg_buffer>>2] = $1; - _TraceLog(2,12322,$vararg_buffer); + _TraceLog(1,8780,$vararg_buffer); $$sroa$75$0$$sroa_idx = ((($0)) + 32|0); ;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;HEAP32[$0+12>>2]=0|0;HEAP32[$0+16>>2]=0|0;HEAP32[$0+20>>2]=0|0;HEAP32[$0+24>>2]=0|0;HEAP32[$0+28>>2]=0|0; dest=$$sroa$75$0$$sroa_idx; src=$$sroa$75; stop=dest+36|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); @@ -28434,7 +24700,7 @@ function _LoadOBJ($0,$1) { L12: while(1) { L14: while(1) { HEAP32[$vararg_buffer1>>2] = $2; - (_fscanf($15,12356,$vararg_buffer1)|0); + (_fscanf($15,8814,$vararg_buffer1)|0); $19 = HEAP8[$2>>0]|0; $20 = $19 << 24 >> 24; switch ($20|0) { @@ -28461,7 +24727,7 @@ function _LoadOBJ($0,$1) { } } HEAP32[$vararg_buffer4>>2] = $2; - (_fscanf($15,12356,$vararg_buffer4)|0); + (_fscanf($15,8814,$vararg_buffer4)|0); $23 = HEAP8[$2>>0]|0; switch ($23<<24>>24) { case 116: { @@ -28526,19 +24792,19 @@ function _LoadOBJ($0,$1) { HEAP32[$vararg_buffer7>>2] = $1; $vararg_ptr10 = ((($vararg_buffer7)) + 4|0); HEAP32[$vararg_ptr10>>2] = $$0$ph379$lcssa386; - _TraceLog(3,12359,$vararg_buffer7); + _TraceLog(3,8817,$vararg_buffer7); HEAP32[$vararg_buffer11>>2] = $1; $vararg_ptr14 = ((($vararg_buffer11)) + 4|0); HEAP32[$vararg_ptr14>>2] = $$0345$ph372$lcssa389; - _TraceLog(3,12387,$vararg_buffer11); + _TraceLog(3,8841,$vararg_buffer11); HEAP32[$$byval_copy102>>2] = $1; $vararg_ptr18 = ((($$byval_copy102)) + 4|0); HEAP32[$vararg_ptr18>>2] = $$0344$ph376$lcssa388; - _TraceLog(3,12416,$$byval_copy102); + _TraceLog(3,8866,$$byval_copy102); HEAP32[$$byval_copy103>>2] = $1; $vararg_ptr22 = ((($$byval_copy103)) + 4|0); HEAP32[$vararg_ptr22>>2] = $$0346$ph$lcssa; - _TraceLog(3,12443,$$byval_copy103); + _TraceLog(3,8889,$$byval_copy103); $36 = ($$0$ph379$lcssa386*12)|0; $37 = (_malloc($36)|0); $38 = ($$0344$ph376$lcssa388|0)>(0); @@ -28570,7 +24836,7 @@ function _LoadOBJ($0,$1) { L36: while(1) { L38: while(1) { HEAP32[$vararg_buffer23>>2] = $2; - (_fscanf($15,12356,$vararg_buffer23)|0); + (_fscanf($15,8814,$vararg_buffer23)|0); $46 = HEAP8[$2>>0]|0; $47 = $46 << 24 >> 24; switch ($47|0) { @@ -28592,7 +24858,7 @@ function _LoadOBJ($0,$1) { } } HEAP32[$vararg_buffer26>>2] = $2; - (_fscanf($15,12356,$vararg_buffer26)|0); + (_fscanf($15,8814,$vararg_buffer26)|0); $50 = HEAP8[$2>>0]|0; switch ($50<<24>>24) { case 110: { @@ -28611,10 +24877,10 @@ function _LoadOBJ($0,$1) { HEAP32[$vararg_buffer29>>2] = $51; $vararg_ptr32 = ((($vararg_buffer29)) + 4|0); HEAP32[$vararg_ptr32>>2] = $52; - (_fscanf($15,12472,$vararg_buffer29)|0); + (_fscanf($15,8914,$vararg_buffer29)|0); $53 = (($$0353$ph367397) + 1)|0; HEAP32[$vararg_buffer33>>2] = $2; - (_fscanf($15,12356,$vararg_buffer33)|0); + (_fscanf($15,8814,$vararg_buffer33)|0); $54 = (_feof($15)|0); $55 = ($54|0)==(0); if ($55) { @@ -28631,10 +24897,10 @@ function _LoadOBJ($0,$1) { HEAP32[$vararg_ptr39>>2] = $57; $vararg_ptr40 = ((($vararg_buffer36)) + 8|0); HEAP32[$vararg_ptr40>>2] = $58; - (_fscanf($15,12486,$vararg_buffer36)|0); + (_fscanf($15,8928,$vararg_buffer36)|0); $59 = (($$0354$ph364398) + 1)|0; HEAP32[$vararg_buffer41>>2] = $2; - (_fscanf($15,12356,$vararg_buffer41)|0); + (_fscanf($15,8814,$vararg_buffer41)|0); $60 = (_feof($15)|0); $61 = ($60|0)==(0); if ($61) { @@ -28651,10 +24917,10 @@ function _LoadOBJ($0,$1) { HEAP32[$vararg_ptr47>>2] = $63; $vararg_ptr48 = ((($vararg_buffer44)) + 8|0); HEAP32[$vararg_ptr48>>2] = $64; - (_fscanf($15,12486,$vararg_buffer44)|0); + (_fscanf($15,8928,$vararg_buffer44)|0); $65 = (($$0355$ph400) + 1)|0; HEAP32[$vararg_buffer49>>2] = $2; - (_fscanf($15,12356,$vararg_buffer49)|0); + (_fscanf($15,8814,$vararg_buffer49)|0); $66 = (_feof($15)|0); $67 = ($66|0)==(0); if ($67) { @@ -28677,7 +24943,7 @@ function _LoadOBJ($0,$1) { $76 = ($$0344$ph376$lcssa388|0)==(0); if ($76) { HEAP32[$vararg_buffer52>>2] = $1; - _TraceLog(0,12495,$vararg_buffer52); + _TraceLog(0,8937,$vararg_buffer52); } $77 = ($$0345$ph372$lcssa389|0)==(0); $78 = $$0344$ph376$lcssa388 | $$0345$ph372$lcssa389; @@ -28717,7 +24983,7 @@ function _LoadOBJ($0,$1) { } L55: while(1) { HEAP32[$vararg_buffer55>>2] = $2; - (_fscanf($15,12356,$vararg_buffer55)|0); + (_fscanf($15,8814,$vararg_buffer55)|0); $106 = HEAP8[$2>>0]|0; $107 = $106 << 24 >> 24; switch ($107|0) { @@ -28745,7 +25011,7 @@ function _LoadOBJ($0,$1) { HEAP32[$vararg_ptr61>>2] = $80; $vararg_ptr62 = ((($vararg_buffer58)) + 8|0); HEAP32[$vararg_ptr62>>2] = $81; - (_fscanf($15,12566,$vararg_buffer58)|0); + (_fscanf($15,9008,$vararg_buffer58)|0); } else { if ($76) { HEAP32[$vararg_buffer63>>2] = $vararg_buffer11; @@ -28759,7 +25025,7 @@ function _LoadOBJ($0,$1) { HEAP32[$vararg_ptr69>>2] = $90; $vararg_ptr70 = ((($vararg_buffer63)) + 20|0); HEAP32[$vararg_ptr70>>2] = $91; - (_fscanf($15,12575,$vararg_buffer63)|0); + (_fscanf($15,9017,$vararg_buffer63)|0); break; } if ($77) { @@ -28774,7 +25040,7 @@ function _LoadOBJ($0,$1) { HEAP32[$vararg_ptr77>>2] = $94; $vararg_ptr78 = ((($vararg_buffer71)) + 20|0); HEAP32[$vararg_ptr78>>2] = $95; - (_fscanf($15,12593,$vararg_buffer71)|0); + (_fscanf($15,9035,$vararg_buffer71)|0); break; } else { HEAP32[$vararg_buffer79>>2] = $vararg_buffer11; @@ -28794,7 +25060,7 @@ function _LoadOBJ($0,$1) { HEAP32[$vararg_ptr88>>2] = $100; $vararg_ptr89 = ((($vararg_buffer79)) + 32|0); HEAP32[$vararg_ptr89>>2] = $101; - (_fscanf($15,12614,$vararg_buffer79)|0); + (_fscanf($15,9056,$vararg_buffer79)|0); break; } } @@ -29174,7 +25440,7 @@ function _LoadOBJ($0,$1) { _free($369); _free($370); HEAP32[$vararg_buffer90>>2] = $1; - _TraceLog(0,12641,$vararg_buffer90); + _TraceLog(0,9083,$vararg_buffer90); HEAP32[$0>>2] = $68; $$sroa$12$0$$sroa_idx244 = ((($0)) + 4|0); HEAP32[$$sroa$12$0$$sroa_idx244>>2] = 0; @@ -29194,6 +25460,264 @@ function _LoadOBJ($0,$1) { dest=$$sroa$75$0$$sroa_idx328; src=$$sroa$75; stop=dest+36|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); STACKTOP = sp;return; } +function _rlglLoadMesh($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $$ = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; + var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; + var $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0; + var $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0; + var $82 = 0, $83 = 0, $84 = 0, $85 = 0, $9 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer3 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $vararg_buffer3 = sp + 16|0; + $vararg_buffer1 = sp + 8|0; + $vararg_buffer = sp; + $2 = sp + 48|0; + $3 = sp + 20|0; + $4 = ((($0)) + 36|0); + $5 = ((($0)) + 40|0); + $6 = ((($0)) + 44|0); + $7 = ((($0)) + 48|0); + $8 = ((($0)) + 52|0); + $9 = ((($0)) + 56|0); + $10 = ((($0)) + 60|0); + $11 = ((($0)) + 64|0); + $12 = ($1|0)!=(0); + $$ = $12 ? 35048 : 35044; + ;HEAP32[$4>>2]=0|0;HEAP32[$4+4>>2]=0|0;HEAP32[$4+8>>2]=0|0;HEAP32[$4+12>>2]=0|0;HEAP32[$4+16>>2]=0|0;HEAP32[$4+20>>2]=0|0;HEAP32[$4+24>>2]=0|0;HEAP32[$4+28>>2]=0|0; + HEAP32[$2>>2] = 0; + ;HEAP32[$3>>2]=0|0;HEAP32[$3+4>>2]=0|0;HEAP32[$3+8>>2]=0|0;HEAP32[$3+12>>2]=0|0;HEAP32[$3+16>>2]=0|0;HEAP32[$3+20>>2]=0|0;HEAP32[$3+24>>2]=0|0; + $13 = HEAP32[5259]|0; + $14 = ($13|0)==(0); + if (!($14)) { + $15 = HEAP32[5633]|0; + FUNCTION_TABLE_vii[$15 & 63](1,$2); + $16 = HEAP32[5260]|0; + $17 = HEAP32[$2>>2]|0; + FUNCTION_TABLE_vi[$16 & 31]($17); + } + _glGenBuffers(1,($3|0)); + $18 = HEAP32[$3>>2]|0; + _glBindBuffer(34962,($18|0)); + $19 = HEAP32[$0>>2]|0; + $20 = ($19*12)|0; + $21 = ((($0)) + 8|0); + $22 = HEAP32[$21>>2]|0; + _glBufferData(34962,($20|0),($22|0),($$|0)); + _glVertexAttribPointer(0,3,5126,0,0,(0|0)); + _glEnableVertexAttribArray(0); + $23 = ((($3)) + 4|0); + _glGenBuffers(1,($23|0)); + $24 = HEAP32[$23>>2]|0; + _glBindBuffer(34962,($24|0)); + $25 = HEAP32[$0>>2]|0; + $26 = $25 << 3; + $27 = ((($0)) + 12|0); + $28 = HEAP32[$27>>2]|0; + _glBufferData(34962,($26|0),($28|0),($$|0)); + _glVertexAttribPointer(1,2,5126,0,0,(0|0)); + _glEnableVertexAttribArray(1); + $29 = ((($0)) + 20|0); + $30 = HEAP32[$29>>2]|0; + $31 = ($30|0)==(0|0); + if ($31) { + _glVertexAttrib3f(2,1.0,1.0,1.0); + _glDisableVertexAttribArray(2); + } else { + $32 = ((($3)) + 8|0); + _glGenBuffers(1,($32|0)); + $33 = HEAP32[$32>>2]|0; + _glBindBuffer(34962,($33|0)); + $34 = HEAP32[$0>>2]|0; + $35 = ($34*12)|0; + $36 = HEAP32[$29>>2]|0; + _glBufferData(34962,($35|0),($36|0),($$|0)); + _glVertexAttribPointer(2,3,5126,0,0,(0|0)); + _glEnableVertexAttribArray(2); + } + $37 = ((($0)) + 28|0); + $38 = HEAP32[$37>>2]|0; + $39 = ($38|0)==(0|0); + if ($39) { + _glVertexAttrib4f(3,1.0,1.0,1.0,1.0); + _glDisableVertexAttribArray(3); + } else { + $40 = ((($3)) + 12|0); + _glGenBuffers(1,($40|0)); + $41 = HEAP32[$40>>2]|0; + _glBindBuffer(34962,($41|0)); + $42 = HEAP32[$0>>2]|0; + $43 = $42 << 2; + $44 = HEAP32[$37>>2]|0; + _glBufferData(34962,($43|0),($44|0),($$|0)); + _glVertexAttribPointer(3,4,5121,1,0,(0|0)); + _glEnableVertexAttribArray(3); + } + $45 = ((($0)) + 24|0); + $46 = HEAP32[$45>>2]|0; + $47 = ($46|0)==(0|0); + if ($47) { + _glVertexAttrib3f(4,0.0,0.0,0.0); + _glDisableVertexAttribArray(4); + } else { + $48 = ((($3)) + 16|0); + _glGenBuffers(1,($48|0)); + $49 = HEAP32[$48>>2]|0; + _glBindBuffer(34962,($49|0)); + $50 = HEAP32[$0>>2]|0; + $51 = ($50*12)|0; + $52 = HEAP32[$45>>2]|0; + _glBufferData(34962,($51|0),($52|0),($$|0)); + _glVertexAttribPointer(4,3,5126,0,0,(0|0)); + _glEnableVertexAttribArray(4); + } + $53 = ((($0)) + 16|0); + $54 = HEAP32[$53>>2]|0; + $55 = ($54|0)==(0|0); + if ($55) { + _glVertexAttrib2f(5,0.0,0.0); + _glDisableVertexAttribArray(5); + } else { + $56 = ((($3)) + 20|0); + _glGenBuffers(1,($56|0)); + $57 = HEAP32[$56>>2]|0; + _glBindBuffer(34962,($57|0)); + $58 = HEAP32[$0>>2]|0; + $59 = $58 << 3; + $60 = HEAP32[$53>>2]|0; + _glBufferData(34962,($59|0),($60|0),($$|0)); + _glVertexAttribPointer(5,2,5126,0,0,(0|0)); + _glEnableVertexAttribArray(5); + } + $61 = ((($0)) + 32|0); + $62 = HEAP32[$61>>2]|0; + $63 = ($62|0)==(0|0); + if (!($63)) { + $64 = ((($3)) + 24|0); + _glGenBuffers(1,($64|0)); + $65 = HEAP32[$64>>2]|0; + _glBindBuffer(34963,($65|0)); + $66 = ((($0)) + 4|0); + $67 = HEAP32[$66>>2]|0; + $68 = ($67*6)|0; + $69 = HEAP32[$61>>2]|0; + _glBufferData(34963,($68|0),($69|0),35044); + } + $70 = HEAP32[$3>>2]|0; + HEAP32[$5>>2] = $70; + $71 = HEAP32[$23>>2]|0; + HEAP32[$6>>2] = $71; + $72 = ((($3)) + 8|0); + $73 = HEAP32[$72>>2]|0; + HEAP32[$7>>2] = $73; + $74 = ((($3)) + 12|0); + $75 = HEAP32[$74>>2]|0; + HEAP32[$8>>2] = $75; + $76 = ((($3)) + 16|0); + $77 = HEAP32[$76>>2]|0; + HEAP32[$9>>2] = $77; + $78 = ((($3)) + 20|0); + $79 = HEAP32[$78>>2]|0; + HEAP32[$10>>2] = $79; + $80 = ((($3)) + 24|0); + $81 = HEAP32[$80>>2]|0; + HEAP32[$11>>2] = $81; + $82 = HEAP32[5259]|0; + $83 = ($82|0)==(0); + if ($83) { + _TraceLog(0,8732,$vararg_buffer3); + STACKTOP = sp;return; + } + $84 = HEAP32[$2>>2]|0; + $85 = ($84|0)==(0); + if ($85) { + _TraceLog(1,8691,$vararg_buffer1); + STACKTOP = sp;return; + } else { + HEAP32[$4>>2] = $84; + HEAP32[$vararg_buffer>>2] = $84; + _TraceLog(0,8638,$vararg_buffer); + STACKTOP = sp;return; + } +} +function _VectorSubtract($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $3 = +HEAPF32[$1>>2]; + $4 = +HEAPF32[$2>>2]; + $5 = $3 - $4; + HEAPF32[$0>>2] = $5; + $6 = ((($0)) + 4|0); + $7 = ((($1)) + 4|0); + $8 = +HEAPF32[$7>>2]; + $9 = ((($2)) + 4|0); + $10 = +HEAPF32[$9>>2]; + $11 = $8 - $10; + HEAPF32[$6>>2] = $11; + $12 = ((($0)) + 8|0); + $13 = ((($1)) + 8|0); + $14 = +HEAPF32[$13>>2]; + $15 = ((($2)) + 8|0); + $16 = +HEAPF32[$15>>2]; + $17 = $14 - $16; + HEAPF32[$12>>2] = $17; + return; +} +function _VectorCrossProduct($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $3 = 0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0; + var $9 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + $3 = ((($1)) + 4|0); + $4 = +HEAPF32[$3>>2]; + $5 = ((($2)) + 8|0); + $6 = +HEAPF32[$5>>2]; + $7 = $4 * $6; + $8 = ((($1)) + 8|0); + $9 = +HEAPF32[$8>>2]; + $10 = ((($2)) + 4|0); + $11 = +HEAPF32[$10>>2]; + $12 = $9 * $11; + $13 = $7 - $12; + $14 = +HEAPF32[$2>>2]; + $15 = $9 * $14; + $16 = +HEAPF32[$1>>2]; + $17 = $6 * $16; + $18 = $15 - $17; + $19 = $11 * $16; + $20 = $4 * $14; + $21 = $19 - $20; + HEAPF32[$0>>2] = $13; + $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); + HEAPF32[$$sroa$4$0$$sroa_idx2>>2] = $18; + $$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0); + HEAPF32[$$sroa$5$0$$sroa_idx4>>2] = $21; + return; +} +function _VectorScale($0,$1) { + $0 = $0|0; + $1 = +$1; + var $2 = 0.0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + $2 = +HEAPF32[$0>>2]; + $3 = $2 * $1; + HEAPF32[$0>>2] = $3; + $4 = ((($0)) + 4|0); + $5 = +HEAPF32[$4>>2]; + $6 = $5 * $1; + HEAPF32[$4>>2] = $6; + $7 = ((($0)) + 8|0); + $8 = +HEAPF32[$7>>2]; + $9 = $8 * $1; + HEAPF32[$7>>2] = $9; + return; +} function _LoadModel($0,$1) { $0 = $0|0; $1 = $1|0; @@ -29235,6 +25759,29 @@ function _LoadDefaultMaterial($0) { HEAPF32[$$sroa$18$0$$sroa_idx15>>2] = 100.0; STACKTOP = sp;return; } +function _GetDefaultShader($0) { + $0 = $0|0; + var dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + dest=$0; src=22536; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + return; +} +function _GetDefaultTexture($0) { + $0 = $0|0; + var $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $$sroa$6$0$$sroa_idx6 = 0, $$sroa$7$0$$sroa_idx8 = 0, $1 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = HEAP32[5219]|0; + HEAP32[$0>>2] = $1; + $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); + HEAP32[$$sroa$4$0$$sroa_idx2>>2] = 1; + $$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0); + HEAP32[$$sroa$5$0$$sroa_idx4>>2] = 1; + $$sroa$6$0$$sroa_idx6 = ((($0)) + 12|0); + HEAP32[$$sroa$6$0$$sroa_idx6>>2] = 1; + $$sroa$7$0$$sroa_idx8 = ((($0)) + 16|0); + HEAP32[$$sroa$7$0$$sroa_idx8>>2] = 7; + return; +} function _UnloadMesh($0) { $0 = $0|0; var label = 0, sp = 0; @@ -29242,6 +25789,125 @@ function _UnloadMesh($0) { _rlglUnloadMesh($0); return; } +function _rlglUnloadMesh($0) { + $0 = $0|0; + var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; + var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = ((($0)) + 8|0); + $2 = HEAP32[$1>>2]|0; + $3 = ($2|0)==(0|0); + if (!($3)) { + _free($2); + } + $4 = ((($0)) + 12|0); + $5 = HEAP32[$4>>2]|0; + $6 = ($5|0)==(0|0); + if (!($6)) { + _free($5); + } + $7 = ((($0)) + 20|0); + $8 = HEAP32[$7>>2]|0; + $9 = ($8|0)==(0|0); + if (!($9)) { + _free($8); + } + $10 = ((($0)) + 28|0); + $11 = HEAP32[$10>>2]|0; + $12 = ($11|0)==(0|0); + if (!($12)) { + _free($11); + } + $13 = ((($0)) + 24|0); + $14 = HEAP32[$13>>2]|0; + $15 = ($14|0)==(0|0); + if (!($15)) { + _free($14); + } + $16 = ((($0)) + 16|0); + $17 = HEAP32[$16>>2]|0; + $18 = ($17|0)==(0|0); + if (!($18)) { + _free($17); + } + $19 = ((($0)) + 32|0); + $20 = HEAP32[$19>>2]|0; + $21 = ($20|0)==(0|0); + if (!($21)) { + _free($20); + } + $22 = ((($0)) + 40|0); + $23 = HEAP32[$22>>2]|0; + _rlDeleteBuffers($23); + $24 = ((($0)) + 44|0); + $25 = HEAP32[$24>>2]|0; + _rlDeleteBuffers($25); + $26 = ((($0)) + 48|0); + $27 = HEAP32[$26>>2]|0; + _rlDeleteBuffers($27); + $28 = ((($0)) + 52|0); + $29 = HEAP32[$28>>2]|0; + _rlDeleteBuffers($29); + $30 = ((($0)) + 56|0); + $31 = HEAP32[$30>>2]|0; + _rlDeleteBuffers($31); + $32 = ((($0)) + 60|0); + $33 = HEAP32[$32>>2]|0; + _rlDeleteBuffers($33); + $34 = ((($0)) + 64|0); + $35 = HEAP32[$34>>2]|0; + _rlDeleteBuffers($35); + $36 = ((($0)) + 36|0); + $37 = HEAP32[$36>>2]|0; + _rlDeleteVertexArrays($37); + return; +} +function _rlDeleteBuffers($0) { + $0 = $0|0; + var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $vararg_buffer = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $vararg_buffer = sp; + $1 = sp + 4|0; + HEAP32[$1>>2] = $0; + $2 = ($0|0)==(0); + if ($2) { + STACKTOP = sp;return; + } + _glDeleteBuffers(1,($1|0)); + $3 = HEAP32[5259]|0; + $4 = ($3|0)==(0); + if (!($4)) { + STACKTOP = sp;return; + } + $5 = HEAP32[$1>>2]|0; + HEAP32[$vararg_buffer>>2] = $5; + _TraceLog(0,9175,$vararg_buffer); + STACKTOP = sp;return; +} +function _rlDeleteVertexArrays($0) { + $0 = $0|0; + var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $vararg_buffer = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $vararg_buffer = sp; + $1 = sp + 4|0; + HEAP32[$1>>2] = $0; + $2 = HEAP32[5259]|0; + $3 = ($2|0)==(0); + if ($3) { + STACKTOP = sp;return; + } + $4 = ($0|0)==(0); + if (!($4)) { + $5 = HEAP32[5648]|0; + FUNCTION_TABLE_vii[$5 & 63](1,$1); + } + $6 = HEAP32[$1>>2]|0; + HEAP32[$vararg_buffer>>2] = $6; + _TraceLog(0,9127,$vararg_buffer); + STACKTOP = sp;return; +} function _UnloadModel($0) { $0 = $0|0; var $$byval_copy = 0, $1 = 0, $vararg_buffer = 0, label = 0, sp = 0; @@ -29253,7 +25919,7 @@ function _UnloadModel($0) { $1 = ((($0)) + 132|0); _memcpy(($$byval_copy|0),($1|0),132)|0; _UnloadMaterial($$byval_copy); - _TraceLog(0,12685,$vararg_buffer); + _TraceLog(0,9230,$vararg_buffer); STACKTOP = sp;return; } function _UnloadMaterial($0) { @@ -29307,49 +25973,4710 @@ function _DrawModelEx($0,$1,$2,$3,$4,$5) { $3 = +$3; $4 = $4|0; $5 = $5|0; - var $$byval_copy5 = 0, $$byval_copy6 = 0, $$byval_copy7 = 0, $10 = 0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0.0, $20 = 0, $21 = 0.0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $6 = 0; - var $7 = 0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + var $$byval_copy7 = 0, $$byval_copy8 = 0, $$byval_copy9 = 0, $10 = 0, $11 = 0, $12 = 0.0, $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0, $17 = 0.0, $18 = 0.0, $19 = 0, $20 = 0.0, $21 = 0, $22 = 0.0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $6 = 0, $7 = 0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; sp = STACKTOP; - STACKTOP = STACKTOP + 592|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(592|0); - $$byval_copy7 = sp + 520|0; - $$byval_copy6 = sp + 388|0; + STACKTOP = STACKTOP + 656|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(656|0); + $$byval_copy9 = sp + 584|0; + $$byval_copy8 = sp + 452|0; + $$byval_copy7 = sp + 384|0; + $6 = sp + 192|0; + $7 = sp + 128|0; + $8 = sp + 64|0; + $9 = sp; + $10 = sp + 320|0; + $11 = sp + 256|0; + $12 = $3 * 0.01745329238474369; + ;HEAP32[$$byval_copy9>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy9+4>>2]=HEAP32[$2+4>>2]|0;HEAP32[$$byval_copy9+8>>2]=HEAP32[$2+8>>2]|0; + _MatrixRotate($6,$$byval_copy9,$12); + $13 = +HEAPF32[$4>>2]; + $14 = ((($4)) + 4|0); + $15 = +HEAPF32[$14>>2]; + $16 = ((($4)) + 8|0); + $17 = +HEAPF32[$16>>2]; + _MatrixScale($7,$13,$15,$17); + $18 = +HEAPF32[$1>>2]; + $19 = ((($1)) + 4|0); + $20 = +HEAPF32[$19>>2]; + $21 = ((($1)) + 8|0); + $22 = +HEAPF32[$21>>2]; + _MatrixTranslate($8,$18,$20,$22); + dest=$$byval_copy8; src=$7; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$$byval_copy9; src=$6; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixMultiply($10,$$byval_copy8,$$byval_copy9); + dest=$$byval_copy8; src=$10; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$$byval_copy9; src=$8; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixMultiply($9,$$byval_copy8,$$byval_copy9); + $23 = ((($0)) + 68|0); + dest=$$byval_copy8; src=$23; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$$byval_copy9; src=$9; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixMultiply($11,$$byval_copy8,$$byval_copy9); + dest=$23; src=$11; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $24 = ((($0)) + 132|0); + $25 = ((($0)) + 248|0); + $26 = HEAPU8[$5>>0]|(HEAPU8[$5+1>>0]<<8)|(HEAPU8[$5+2>>0]<<16)|(HEAPU8[$5+3>>0]<<24); + HEAP32[$25>>2] = $26; + dest=$$byval_copy7; src=$0; stop=dest+68|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _memcpy(($$byval_copy8|0),($24|0),132)|0; + dest=$$byval_copy9; src=$11; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _rlglDrawMesh($$byval_copy7,$$byval_copy8,$$byval_copy9); + STACKTOP = sp;return; +} +function _rlglDrawMesh($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $$ = 0, $$020 = 0, $$byval_copy5 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0, $111 = 0, $112 = 0, $113 = 0, $114 = 0; + var $115 = 0, $116 = 0, $117 = 0, $118 = 0, $119 = 0, $12 = 0.0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0.0, $130 = 0, $131 = 0, $132 = 0; + var $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0, $149 = 0, $15 = 0, $150 = 0; + var $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0, $16 = 0.0, $160 = 0, $161 = 0, $162 = 0, $163 = 0, $164 = 0, $165 = 0, $166 = 0, $167 = 0, $168 = 0, $169 = 0; + var $17 = 0.0, $170 = 0, $171 = 0, $172 = 0, $173 = 0, $174 = 0, $175 = 0, $176 = 0, $177 = 0, $18 = 0, $19 = 0, $20 = 0.0, $21 = 0.0, $22 = 0, $23 = 0, $24 = 0.0, $25 = 0.0, $26 = 0, $27 = 0, $28 = 0; + var $29 = 0, $3 = 0, $30 = 0, $31 = 0.0, $32 = 0.0, $33 = 0, $34 = 0, $35 = 0.0, $36 = 0.0, $37 = 0, $38 = 0, $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0, $42 = 0, $43 = 0.0, $44 = 0.0, $45 = 0, $46 = 0; + var $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0.0, $51 = 0.0, $52 = 0, $53 = 0, $54 = 0.0, $55 = 0.0, $56 = 0, $57 = 0, $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0, $61 = 0, $62 = 0.0, $63 = 0.0, $64 = 0; + var $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0.0, $75 = 0, $76 = 0.0, $77 = 0, $78 = 0.0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0.0; + var $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $modelview$byval_copy4 = 0, dest = 0; + var label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 384|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(384|0); $$byval_copy5 = sp + 320|0; - $6 = sp + 128|0; - $7 = sp + 64|0; - $8 = sp; - $9 = sp + 256|0; - $10 = sp + 192|0; - $11 = $3 * 0.01745329238474369; - ;HEAP32[$$byval_copy7>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy7+4>>2]=HEAP32[$2+4>>2]|0;HEAP32[$$byval_copy7+8>>2]=HEAP32[$2+8>>2]|0; - _MatrixRotate($6,$$byval_copy7,$11); - $12 = +HEAPF32[$4>>2]; - $13 = ((($4)) + 4|0); - $14 = +HEAPF32[$13>>2]; - $15 = ((($4)) + 8|0); - $16 = +HEAPF32[$15>>2]; - _MatrixScale($7,$12,$14,$16); - $17 = +HEAPF32[$1>>2]; - $18 = ((($1)) + 4|0); + $modelview$byval_copy4 = sp + 256|0; + $3 = sp + 192|0; + $4 = sp + 128|0; + $5 = sp + 64|0; + $6 = sp; + $7 = HEAP32[$1>>2]|0; + _glUseProgram(($7|0)); + $8 = ((($1)) + 32|0); + $9 = HEAP32[$8>>2]|0; + $10 = ((($1)) + 116|0); + $11 = HEAP8[$10>>0]|0; + $12 = (+($11&255)); + $13 = $12 / 255.0; + $14 = ((($1)) + 117|0); + $15 = HEAP8[$14>>0]|0; + $16 = (+($15&255)); + $17 = $16 / 255.0; + $18 = ((($1)) + 118|0); + $19 = HEAP8[$18>>0]|0; + $20 = (+($19&255)); + $21 = $20 / 255.0; + $22 = ((($1)) + 119|0); + $23 = HEAP8[$22>>0]|0; + $24 = (+($23&255)); + $25 = $24 / 255.0; + _glUniform4f(($9|0),(+$13),(+$17),(+$21),(+$25)); + $26 = ((($1)) + 36|0); + $27 = HEAP32[$26>>2]|0; + $28 = ($27|0)==(-1); + if (!($28)) { + $29 = ((($1)) + 120|0); + $30 = HEAP8[$29>>0]|0; + $31 = (+($30&255)); + $32 = $31 / 255.0; + $33 = ((($1)) + 121|0); + $34 = HEAP8[$33>>0]|0; + $35 = (+($34&255)); + $36 = $35 / 255.0; + $37 = ((($1)) + 122|0); + $38 = HEAP8[$37>>0]|0; + $39 = (+($38&255)); + $40 = $39 / 255.0; + $41 = ((($1)) + 123|0); + $42 = HEAP8[$41>>0]|0; + $43 = (+($42&255)); + $44 = $43 / 255.0; + _glUniform4f(($27|0),(+$32),(+$36),(+$40),(+$44)); + } + $45 = ((($1)) + 40|0); + $46 = HEAP32[$45>>2]|0; + $47 = ($46|0)==(-1); + if (!($47)) { + $48 = ((($1)) + 124|0); + $49 = HEAP8[$48>>0]|0; + $50 = (+($49&255)); + $51 = $50 / 255.0; + $52 = ((($1)) + 125|0); + $53 = HEAP8[$52>>0]|0; + $54 = (+($53&255)); + $55 = $54 / 255.0; + $56 = ((($1)) + 126|0); + $57 = HEAP8[$56>>0]|0; + $58 = (+($57&255)); + $59 = $58 / 255.0; + $60 = ((($1)) + 127|0); + $61 = HEAP8[$60>>0]|0; + $62 = (+($61&255)); + $63 = $62 / 255.0; + _glUniform4f(($46|0),(+$51),(+$55),(+$59),(+$63)); + } + dest=$3; src=20804; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$4; src=20740; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$modelview$byval_copy4; src=$2; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$$byval_copy5; src=20804; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixMultiply($5,$modelview$byval_copy4,$$byval_copy5); + $64 = HEAP32[$1>>2]|0; + $65 = HEAP32[5634]|0; + $66 = ($64|0)==($65|0); + if (!($66)) { + $67 = (_glGetUniformLocation(($64|0),(9288|0))|0); + $68 = ($67|0)==(-1); + if (!($68)) { + dest=$modelview$byval_copy4; src=$2; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixTranspose($modelview$byval_copy4); + _MatrixInvert($modelview$byval_copy4); + dest=$$byval_copy5; src=$modelview$byval_copy4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $69 = (_MatrixToFloat($$byval_copy5)|0); + _glUniformMatrix4fv(($67|0),1,0,($69|0)); + } + $70 = HEAP32[$1>>2]|0; + $71 = (_glGetUniformLocation(($70|0),(9300|0))|0); + $72 = ($71|0)==(-1); + if (!($72)) { + $73 = ((($3)) + 8|0); + $74 = +HEAPF32[$73>>2]; + $75 = ((($3)) + 24|0); + $76 = +HEAPF32[$75>>2]; + $77 = ((($3)) + 40|0); + $78 = +HEAPF32[$77>>2]; + _glUniform3f(($71|0),(+$74),(+$76),(+$78)); + } + $79 = (_glGetUniformLocation(($70|0),(9308|0))|0); + $80 = ($79|0)==(-1); + if (!($80)) { + $81 = ((($1)) + 128|0); + $82 = +HEAPF32[$81>>2]; + _glUniform1f(($79|0),(+$82)); + } + } + _glActiveTexture(33984); + $83 = ((($1)) + 56|0); + $84 = HEAP32[$83>>2]|0; + _glBindTexture(3553,($84|0)); + $85 = ((($1)) + 44|0); + $86 = HEAP32[$85>>2]|0; + _glUniform1i(($86|0),0); + $87 = ((($1)) + 76|0); + $88 = HEAP32[$87>>2]|0; + $89 = ($88|0)==(0); + if (!($89)) { + $90 = ((($1)) + 48|0); + $91 = HEAP32[$90>>2]|0; + $92 = ($91|0)==(-1); + if (!($92)) { + $93 = HEAP32[$1>>2]|0; + $94 = (_glGetUniformLocation(($93|0),(9319|0))|0); + _glUniform1i(($94|0),1); + _glActiveTexture(33985); + $95 = HEAP32[$87>>2]|0; + _glBindTexture(3553,($95|0)); + $96 = HEAP32[$90>>2]|0; + _glUniform1i(($96|0),1); + } + } + $97 = ((($1)) + 96|0); + $98 = HEAP32[$97>>2]|0; + $99 = ($98|0)==(0); + if (!($99)) { + $100 = ((($1)) + 52|0); + $101 = HEAP32[$100>>2]|0; + $102 = ($101|0)==(-1); + if (!($102)) { + $103 = HEAP32[$1>>2]|0; + $104 = (_glGetUniformLocation(($103|0),(9329|0))|0); + _glUniform1i(($104|0),1); + _glActiveTexture(33986); + $105 = HEAP32[$97>>2]|0; + _glBindTexture(3553,($105|0)); + $106 = HEAP32[$100>>2]|0; + _glUniform1i(($106|0),2); + } + } + $107 = HEAP32[5259]|0; + $108 = ($107|0)==(0); + if ($108) { + $112 = ((($0)) + 40|0); + $113 = HEAP32[$112>>2]|0; + _glBindBuffer(34962,($113|0)); + $114 = ((($1)) + 4|0); + $115 = HEAP32[$114>>2]|0; + _glVertexAttribPointer(($115|0),3,5126,0,0,(0|0)); + _glEnableVertexAttribArray(($115|0)); + $116 = ((($0)) + 44|0); + $117 = HEAP32[$116>>2]|0; + _glBindBuffer(34962,($117|0)); + $118 = ((($1)) + 8|0); + $119 = HEAP32[$118>>2]|0; + _glVertexAttribPointer(($119|0),2,5126,0,0,(0|0)); + _glEnableVertexAttribArray(($119|0)); + $120 = ((($1)) + 16|0); + $121 = HEAP32[$120>>2]|0; + $122 = ($121|0)==(-1); + if (!($122)) { + $123 = ((($0)) + 48|0); + $124 = HEAP32[$123>>2]|0; + _glBindBuffer(34962,($124|0)); + $125 = HEAP32[$120>>2]|0; + _glVertexAttribPointer(($125|0),3,5126,0,0,(0|0)); + $126 = HEAP32[$120>>2]|0; + _glEnableVertexAttribArray(($126|0)); + } + $127 = ((($1)) + 24|0); + $128 = HEAP32[$127>>2]|0; + $129 = ($128|0)==(-1); + do { + if (!($129)) { + $130 = ((($0)) + 52|0); + $131 = HEAP32[$130>>2]|0; + $132 = ($131|0)==(0); + if ($132) { + _glVertexAttrib4f(($128|0),1.0,1.0,1.0,1.0); + $135 = HEAP32[$127>>2]|0; + _glDisableVertexAttribArray(($135|0)); + break; + } else { + _glBindBuffer(34962,($131|0)); + $133 = HEAP32[$127>>2]|0; + _glVertexAttribPointer(($133|0),4,5121,1,0,(0|0)); + $134 = HEAP32[$127>>2]|0; + _glEnableVertexAttribArray(($134|0)); + break; + } + } + } while(0); + $136 = ((($1)) + 20|0); + $137 = HEAP32[$136>>2]|0; + $138 = ($137|0)==(-1); + if (!($138)) { + $139 = ((($0)) + 56|0); + $140 = HEAP32[$139>>2]|0; + _glBindBuffer(34962,($140|0)); + $141 = HEAP32[$136>>2]|0; + _glVertexAttribPointer(($141|0),3,5126,0,0,(0|0)); + $142 = HEAP32[$136>>2]|0; + _glEnableVertexAttribArray(($142|0)); + } + $143 = ((($1)) + 12|0); + $144 = HEAP32[$143>>2]|0; + $145 = ($144|0)==(-1); + if (!($145)) { + $146 = ((($0)) + 60|0); + $147 = HEAP32[$146>>2]|0; + _glBindBuffer(34962,($147|0)); + $148 = HEAP32[$143>>2]|0; + _glVertexAttribPointer(($148|0),2,5126,0,0,(0|0)); + $149 = HEAP32[$143>>2]|0; + _glEnableVertexAttribArray(($149|0)); + } + $150 = ((($0)) + 32|0); + $151 = HEAP32[$150>>2]|0; + $152 = ($151|0)==(0|0); + if (!($152)) { + $153 = HEAP32[(20736)>>2]|0; + _glBindBuffer(34963,($153|0)); + } + } else { + $109 = HEAP32[5260]|0; + $110 = ((($0)) + 36|0); + $111 = HEAP32[$110>>2]|0; + FUNCTION_TABLE_vi[$109 & 31]($111); + } + $154 = HEAP32[5217]|0; + $155 = ($154|0)!=(0); + $$ = $155 ? 2 : 1; + $156 = ((($1)) + 28|0); + $157 = ((($0)) + 32|0); + $158 = HEAP32[$0>>2]|0; + $159 = ((($0)) + 4|0); + $$020 = 0; + while(1) { + if ($155) { + dest=$modelview$byval_copy4; src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$$byval_copy5; src=$5; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _SetStereoView($$020,$modelview$byval_copy4,$$byval_copy5); + } else { + dest=20804; src=$5; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + } + dest=$modelview$byval_copy4; src=20804; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$$byval_copy5; src=20740; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixMultiply($6,$modelview$byval_copy4,$$byval_copy5); + $162 = HEAP32[$156>>2]|0; + dest=$$byval_copy5; src=$6; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + $163 = (_MatrixToFloat($$byval_copy5)|0); + _glUniformMatrix4fv(($162|0),1,0,($163|0)); + $164 = HEAP32[$157>>2]|0; + $165 = ($164|0)==(0|0); + if ($165) { + _glDrawArrays(4,0,($158|0)); + } else { + $166 = HEAP32[$159>>2]|0; + $167 = ($166*3)|0; + _glDrawElements(4,($167|0),5123,(0|0)); + } + $168 = (($$020) + 1)|0; + $169 = ($168|0)<($$|0); + if ($169) { + $$020 = $168; + } else { + break; + } + } + $160 = HEAP32[$87>>2]|0; + $161 = ($160|0)==(0); + if (!($161)) { + _glActiveTexture(33985); + _glBindTexture(3553,0); + } + $170 = HEAP32[$97>>2]|0; + $171 = ($170|0)==(0); + if (!($171)) { + _glActiveTexture(33986); + _glBindTexture(3553,0); + } + _glActiveTexture(33984); + _glBindTexture(3553,0); + $172 = HEAP32[5259]|0; + $173 = ($172|0)==(0); + if (!($173)) { + $174 = HEAP32[5260]|0; + FUNCTION_TABLE_vi[$174 & 31](0); + _glUseProgram(0); + dest=20740; src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=20804; src=$3; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + STACKTOP = sp;return; + } + _glBindBuffer(34962,0); + $175 = ((($0)) + 32|0); + $176 = HEAP32[$175>>2]|0; + $177 = ($176|0)==(0|0); + if ($177) { + _glUseProgram(0); + dest=20740; src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=20804; src=$3; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + STACKTOP = sp;return; + } + _glBindBuffer(34963,0); + _glUseProgram(0); + dest=20740; src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=20804; src=$3; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + STACKTOP = sp;return; +} +function _MatrixInvert($0) { + $0 = $0|0; + var $1 = 0.0, $10 = 0, $100 = 0.0, $101 = 0.0, $102 = 0.0, $103 = 0.0, $104 = 0.0, $105 = 0.0, $106 = 0.0, $107 = 0.0, $108 = 0.0, $109 = 0.0, $11 = 0.0, $110 = 0.0, $111 = 0.0, $112 = 0.0, $113 = 0.0, $114 = 0.0, $115 = 0.0, $116 = 0.0; + var $117 = 0.0, $118 = 0.0, $119 = 0.0, $12 = 0, $120 = 0.0, $121 = 0.0, $122 = 0.0, $123 = 0.0, $124 = 0.0, $125 = 0.0, $126 = 0.0, $127 = 0.0, $128 = 0.0, $129 = 0.0, $13 = 0.0, $130 = 0.0, $131 = 0.0, $132 = 0.0, $133 = 0.0, $134 = 0.0; + var $135 = 0.0, $136 = 0.0, $137 = 0.0, $138 = 0.0, $139 = 0.0, $14 = 0, $140 = 0.0, $141 = 0.0, $142 = 0.0, $143 = 0.0, $144 = 0.0, $145 = 0.0, $146 = 0.0, $147 = 0.0, $148 = 0.0, $149 = 0.0, $15 = 0.0, $150 = 0.0, $151 = 0.0, $152 = 0.0; + var $153 = 0.0, $154 = 0.0, $155 = 0.0, $156 = 0.0, $157 = 0.0, $158 = 0.0, $159 = 0.0, $16 = 0, $160 = 0.0, $161 = 0.0, $162 = 0.0, $163 = 0.0, $164 = 0.0, $165 = 0.0, $166 = 0.0, $167 = 0.0, $168 = 0.0, $169 = 0.0, $17 = 0.0, $170 = 0.0; + var $171 = 0.0, $172 = 0.0, $173 = 0.0, $174 = 0.0, $175 = 0.0, $176 = 0.0, $177 = 0.0, $18 = 0, $19 = 0.0, $2 = 0, $20 = 0, $21 = 0.0, $22 = 0, $23 = 0.0, $24 = 0, $25 = 0.0, $26 = 0, $27 = 0.0, $28 = 0, $29 = 0.0; + var $3 = 0.0, $30 = 0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0.0, $36 = 0.0, $37 = 0.0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0.0, $44 = 0.0, $45 = 0.0, $46 = 0.0, $47 = 0.0; + var $48 = 0.0, $49 = 0.0, $5 = 0.0, $50 = 0.0, $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0.0, $55 = 0.0, $56 = 0.0, $57 = 0.0, $58 = 0.0, $59 = 0.0, $6 = 0, $60 = 0.0, $61 = 0.0, $62 = 0.0, $63 = 0.0, $64 = 0.0, $65 = 0.0; + var $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0.0, $7 = 0.0, $70 = 0.0, $71 = 0.0, $72 = 0.0, $73 = 0.0, $74 = 0.0, $75 = 0.0, $76 = 0.0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0.0, $81 = 0.0, $82 = 0.0, $83 = 0.0; + var $84 = 0.0, $85 = 0.0, $86 = 0.0, $87 = 0.0, $88 = 0.0, $89 = 0.0, $9 = 0.0, $90 = 0.0, $91 = 0.0, $92 = 0.0, $93 = 0.0, $94 = 0.0, $95 = 0.0, $96 = 0.0, $97 = 0.0, $98 = 0.0, $99 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + $1 = +HEAPF32[$0>>2]; + $2 = ((($0)) + 16|0); + $3 = +HEAPF32[$2>>2]; + $4 = ((($0)) + 32|0); + $5 = +HEAPF32[$4>>2]; + $6 = ((($0)) + 48|0); + $7 = +HEAPF32[$6>>2]; + $8 = ((($0)) + 4|0); + $9 = +HEAPF32[$8>>2]; + $10 = ((($0)) + 20|0); + $11 = +HEAPF32[$10>>2]; + $12 = ((($0)) + 36|0); + $13 = +HEAPF32[$12>>2]; + $14 = ((($0)) + 52|0); + $15 = +HEAPF32[$14>>2]; + $16 = ((($0)) + 8|0); + $17 = +HEAPF32[$16>>2]; + $18 = ((($0)) + 24|0); $19 = +HEAPF32[$18>>2]; - $20 = ((($1)) + 8|0); + $20 = ((($0)) + 40|0); $21 = +HEAPF32[$20>>2]; - _MatrixTranslate($8,$17,$19,$21); - $22 = ((($0)) + 68|0); - dest=$$byval_copy6; src=$7; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$$byval_copy7; src=$6; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixMultiply($9,$$byval_copy6,$$byval_copy7); - dest=$$byval_copy6; src=$9; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - dest=$$byval_copy7; src=$8; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _MatrixMultiply($10,$$byval_copy6,$$byval_copy7); - dest=$22; src=$10; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - $23 = ((($0)) + 132|0); - $24 = ((($0)) + 248|0); - $25 = HEAPU8[$5>>0]|(HEAPU8[$5+1>>0]<<8)|(HEAPU8[$5+2>>0]<<16)|(HEAPU8[$5+3>>0]<<24); - HEAP32[$24>>2] = $25; - dest=$$byval_copy5; src=$0; stop=dest+68|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _memcpy(($$byval_copy6|0),($23|0),132)|0; - dest=$$byval_copy7; src=$10; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); - _rlglDrawMesh($$byval_copy5,$$byval_copy6,$$byval_copy7); + $22 = ((($0)) + 56|0); + $23 = +HEAPF32[$22>>2]; + $24 = ((($0)) + 12|0); + $25 = +HEAPF32[$24>>2]; + $26 = ((($0)) + 28|0); + $27 = +HEAPF32[$26>>2]; + $28 = ((($0)) + 44|0); + $29 = +HEAPF32[$28>>2]; + $30 = ((($0)) + 60|0); + $31 = +HEAPF32[$30>>2]; + $32 = $1 * $11; + $33 = $3 * $9; + $34 = $32 - $33; + $35 = $1 * $13; + $36 = $5 * $9; + $37 = $35 - $36; + $38 = $1 * $15; + $39 = $7 * $9; + $40 = $38 - $39; + $41 = $3 * $13; + $42 = $5 * $11; + $43 = $41 - $42; + $44 = $3 * $15; + $45 = $7 * $11; + $46 = $44 - $45; + $47 = $5 * $15; + $48 = $7 * $13; + $49 = $47 - $48; + $50 = $17 * $27; + $51 = $19 * $25; + $52 = $50 - $51; + $53 = $17 * $29; + $54 = $21 * $25; + $55 = $53 - $54; + $56 = $17 * $31; + $57 = $23 * $25; + $58 = $56 - $57; + $59 = $19 * $29; + $60 = $21 * $27; + $61 = $59 - $60; + $62 = $19 * $31; + $63 = $23 * $27; + $64 = $62 - $63; + $65 = $21 * $31; + $66 = $23 * $29; + $67 = $65 - $66; + $68 = $34 * $67; + $69 = $37 * $64; + $70 = $68 - $69; + $71 = $40 * $61; + $72 = $71 + $70; + $73 = $43 * $58; + $74 = $73 + $72; + $75 = $46 * $55; + $76 = $74 - $75; + $77 = $49 * $52; + $78 = $77 + $76; + $79 = 1.0 / $78; + $80 = $11 * $67; + $81 = $13 * $64; + $82 = $80 - $81; + $83 = $15 * $61; + $84 = $83 + $82; + $85 = $84 * $79; + $86 = $3 * $67; + $87 = $5 * $64; + $88 = $87 - $86; + $89 = $7 * $61; + $90 = $88 - $89; + $91 = $90 * $79; + $92 = $49 * $27; + $93 = $46 * $29; + $94 = $92 - $93; + $95 = $43 * $31; + $96 = $94 + $95; + $97 = $96 * $79; + $98 = $19 * $49; + $99 = $46 * $21; + $100 = $99 - $98; + $101 = $43 * $23; + $102 = $100 - $101; + $103 = $102 * $79; + $104 = -$9; + $105 = $67 * $104; + $106 = $13 * $58; + $107 = $105 + $106; + $108 = $15 * $55; + $109 = $107 - $108; + $110 = $109 * $79; + $111 = $1 * $67; + $112 = $5 * $58; + $113 = $111 - $112; + $114 = $7 * $55; + $115 = $114 + $113; + $116 = $115 * $79; + $117 = -$25; + $118 = $49 * $117; + $119 = $40 * $29; + $120 = $118 + $119; + $121 = $37 * $31; + $122 = $120 - $121; + $123 = $122 * $79; + $124 = $17 * $49; + $125 = $40 * $21; + $126 = $124 - $125; + $127 = $37 * $23; + $128 = $126 + $127; + $129 = $128 * $79; + $130 = $9 * $64; + $131 = $11 * $58; + $132 = $130 - $131; + $133 = $15 * $52; + $134 = $133 + $132; + $135 = $134 * $79; + $136 = $1 * $64; + $137 = $3 * $58; + $138 = $137 - $136; + $139 = $7 * $52; + $140 = $138 - $139; + $141 = $140 * $79; + $142 = $46 * $25; + $143 = $40 * $27; + $144 = $142 - $143; + $145 = $34 * $31; + $146 = $144 + $145; + $147 = $146 * $79; + $148 = $17 * $46; + $149 = $19 * $40; + $150 = $149 - $148; + $151 = $34 * $23; + $152 = $150 - $151; + $153 = $152 * $79; + $154 = $61 * $104; + $155 = $11 * $55; + $156 = $154 + $155; + $157 = $13 * $52; + $158 = $156 - $157; + $159 = $158 * $79; + $160 = $1 * $61; + $161 = $3 * $55; + $162 = $160 - $161; + $163 = $5 * $52; + $164 = $163 + $162; + $165 = $164 * $79; + $166 = $43 * $117; + $167 = $37 * $27; + $168 = $166 + $167; + $169 = $34 * $29; + $170 = $168 - $169; + $171 = $170 * $79; + $172 = $17 * $43; + $173 = $37 * $19; + $174 = $172 - $173; + $175 = $34 * $21; + $176 = $174 + $175; + $177 = $176 * $79; + HEAPF32[$0>>2] = $85; + HEAPF32[$8>>2] = $110; + HEAPF32[$16>>2] = $135; + HEAPF32[$24>>2] = $159; + HEAPF32[$2>>2] = $91; + HEAPF32[$10>>2] = $116; + HEAPF32[$18>>2] = $141; + HEAPF32[$26>>2] = $165; + HEAPF32[$4>>2] = $97; + HEAPF32[$12>>2] = $123; + HEAPF32[$20>>2] = $147; + HEAPF32[$28>>2] = $171; + HEAPF32[$6>>2] = $103; + HEAPF32[$14>>2] = $129; + HEAPF32[$22>>2] = $153; + HEAPF32[$30>>2] = $177; + return; +} +function _MatrixLookAt($0,$1,$2,$3) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + var $$byval_copy4 = 0, $$byval_copy5 = 0, $$sroa$10$0$$sroa_idx14 = 0, $$sroa$11$0$$sroa_idx16 = 0, $$sroa$12$0$$sroa_idx18 = 0, $$sroa$13$0$$sroa_idx20 = 0, $$sroa$14$0$$sroa_idx22 = 0, $$sroa$15$0$$sroa_idx24 = 0, $$sroa$16$0$$sroa_idx26 = 0, $$sroa$17$0$$sroa_idx28 = 0, $$sroa$18$0$$sroa_idx30 = 0, $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $$sroa$6$0$$sroa_idx6 = 0, $$sroa$7$0$$sroa_idx8 = 0, $$sroa$8$0$$sroa_idx10 = 0, $$sroa$9$0$$sroa_idx12 = 0, $10 = 0, $11 = 0.0, $12 = 0.0; + var $13 = 0.0, $14 = 0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0, $25 = 0.0, $26 = 0, $27 = 0.0, $28 = 0.0, $29 = 0.0, $30 = 0.0, $31 = 0.0, $32 = 0.0; + var $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0.0, $37 = 0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0.0, $44 = 0.0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $$byval_copy5 = sp + 48|0; + $$byval_copy4 = sp + 36|0; + $4 = sp + 24|0; + $5 = sp + 12|0; + $6 = sp; + ;HEAP32[$$byval_copy4>>2]=HEAP32[$1>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$1+4>>2]|0;HEAP32[$$byval_copy4+8>>2]=HEAP32[$1+8>>2]|0; + ;HEAP32[$$byval_copy5>>2]=HEAP32[$2>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$2+4>>2]|0;HEAP32[$$byval_copy5+8>>2]=HEAP32[$2+8>>2]|0; + _VectorSubtract($4,$$byval_copy4,$$byval_copy5); + _VectorNormalize($4); + ;HEAP32[$$byval_copy4>>2]=HEAP32[$3>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$3+4>>2]|0;HEAP32[$$byval_copy4+8>>2]=HEAP32[$3+8>>2]|0; + ;HEAP32[$$byval_copy5>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$4+4>>2]|0;HEAP32[$$byval_copy5+8>>2]=HEAP32[$4+8>>2]|0; + _VectorCrossProduct($5,$$byval_copy4,$$byval_copy5); + _VectorNormalize($5); + ;HEAP32[$$byval_copy4>>2]=HEAP32[$4>>2]|0;HEAP32[$$byval_copy4+4>>2]=HEAP32[$4+4>>2]|0;HEAP32[$$byval_copy4+8>>2]=HEAP32[$4+8>>2]|0; + ;HEAP32[$$byval_copy5>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy5+4>>2]=HEAP32[$5+4>>2]|0;HEAP32[$$byval_copy5+8>>2]=HEAP32[$5+8>>2]|0; + _VectorCrossProduct($6,$$byval_copy4,$$byval_copy5); + _VectorNormalize($6); + $7 = +HEAPF32[$5>>2]; + $8 = ((($5)) + 4|0); + $9 = +HEAPF32[$8>>2]; + $10 = ((($5)) + 8|0); + $11 = +HEAPF32[$10>>2]; + $12 = +HEAPF32[$1>>2]; + $13 = $7 * $12; + $14 = ((($1)) + 4|0); + $15 = +HEAPF32[$14>>2]; + $16 = $9 * $15; + $17 = $13 + $16; + $18 = ((($1)) + 8|0); + $19 = +HEAPF32[$18>>2]; + $20 = $11 * $19; + $21 = $17 + $20; + $22 = -$21; + $23 = +HEAPF32[$6>>2]; + $24 = ((($6)) + 4|0); + $25 = +HEAPF32[$24>>2]; + $26 = ((($6)) + 8|0); + $27 = +HEAPF32[$26>>2]; + $28 = $12 * $23; + $29 = $15 * $25; + $30 = $28 + $29; + $31 = $19 * $27; + $32 = $30 + $31; + $33 = -$32; + $34 = +HEAPF32[$4>>2]; + $35 = ((($4)) + 4|0); + $36 = +HEAPF32[$35>>2]; + $37 = ((($4)) + 8|0); + $38 = +HEAPF32[$37>>2]; + $39 = $12 * $34; + $40 = $15 * $36; + $41 = $39 + $40; + $42 = $19 * $38; + $43 = $41 + $42; + $44 = -$43; + HEAPF32[$0>>2] = $7; + $$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); + HEAPF32[$$sroa$4$0$$sroa_idx2>>2] = $23; + $$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0); + HEAPF32[$$sroa$5$0$$sroa_idx4>>2] = $34; + $$sroa$6$0$$sroa_idx6 = ((($0)) + 12|0); + HEAPF32[$$sroa$6$0$$sroa_idx6>>2] = 0.0; + $$sroa$7$0$$sroa_idx8 = ((($0)) + 16|0); + HEAPF32[$$sroa$7$0$$sroa_idx8>>2] = $9; + $$sroa$8$0$$sroa_idx10 = ((($0)) + 20|0); + HEAPF32[$$sroa$8$0$$sroa_idx10>>2] = $25; + $$sroa$9$0$$sroa_idx12 = ((($0)) + 24|0); + HEAPF32[$$sroa$9$0$$sroa_idx12>>2] = $36; + $$sroa$10$0$$sroa_idx14 = ((($0)) + 28|0); + HEAPF32[$$sroa$10$0$$sroa_idx14>>2] = 0.0; + $$sroa$11$0$$sroa_idx16 = ((($0)) + 32|0); + HEAPF32[$$sroa$11$0$$sroa_idx16>>2] = $11; + $$sroa$12$0$$sroa_idx18 = ((($0)) + 36|0); + HEAPF32[$$sroa$12$0$$sroa_idx18>>2] = $27; + $$sroa$13$0$$sroa_idx20 = ((($0)) + 40|0); + HEAPF32[$$sroa$13$0$$sroa_idx20>>2] = $38; + $$sroa$14$0$$sroa_idx22 = ((($0)) + 44|0); + HEAPF32[$$sroa$14$0$$sroa_idx22>>2] = 0.0; + $$sroa$15$0$$sroa_idx24 = ((($0)) + 48|0); + HEAPF32[$$sroa$15$0$$sroa_idx24>>2] = $22; + $$sroa$16$0$$sroa_idx26 = ((($0)) + 52|0); + HEAPF32[$$sroa$16$0$$sroa_idx26>>2] = $33; + $$sroa$17$0$$sroa_idx28 = ((($0)) + 56|0); + HEAPF32[$$sroa$17$0$$sroa_idx28>>2] = $44; + $$sroa$18$0$$sroa_idx30 = ((($0)) + 60|0); + HEAPF32[$$sroa$18$0$$sroa_idx30>>2] = 1.0; + STACKTOP = sp;return; +} +function _rlVertex2i($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $2 = 0.0, $3 = 0.0, $4 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + $2 = (+($0|0)); + $3 = (+($1|0)); + $4 = +HEAPF32[926]; + _rlVertex3f($2,$3,$4); + return; +} +function _DrawRectangle($0,$1,$2,$3,$4) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + $4 = $4|0; + var $$byval_copy = 0, $$byval_copy1 = 0, $$byval_copy2 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 48|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(48|0); + $$byval_copy2 = sp + 32|0; + $$byval_copy1 = sp + 24|0; + $$byval_copy = sp + 16|0; + $5 = sp + 8|0; + $6 = sp; + $7 = (+($0|0)); + HEAPF32[$5>>2] = $7; + $8 = ((($5)) + 4|0); + $9 = (+($1|0)); + HEAPF32[$8>>2] = $9; + $10 = (+($2|0)); + HEAPF32[$6>>2] = $10; + $11 = ((($6)) + 4|0); + $12 = (+($3|0)); + HEAPF32[$11>>2] = $12; + ;HEAP32[$$byval_copy>>2]=HEAP32[$5>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$5+4>>2]|0; + ;HEAP32[$$byval_copy1>>2]=HEAP32[$6>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$6+4>>2]|0; + ;HEAP8[$$byval_copy2>>0]=HEAP8[$4>>0]|0;HEAP8[$$byval_copy2+1>>0]=HEAP8[$4+1>>0]|0;HEAP8[$$byval_copy2+2>>0]=HEAP8[$4+2>>0]|0;HEAP8[$$byval_copy2+3>>0]=HEAP8[$4+3>>0]|0; + _DrawRectangleV($$byval_copy,$$byval_copy1,$$byval_copy2); + STACKTOP = sp;return; +} +function _DrawRectangleV($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $10 = 0, $11 = 0, $12 = 0, $13 = 0.0, $14 = 0, $15 = 0, $16 = 0.0, $17 = 0, $18 = 0, $19 = 0.0, $20 = 0.0, $21 = 0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0, $26 = 0.0, $27 = 0.0, $28 = 0.0, $29 = 0; + var $3 = 0, $30 = 0.0, $31 = 0, $32 = 0.0, $33 = 0, $34 = 0.0, $35 = 0.0, $36 = 0, $37 = 0.0, $38 = 0.0, $39 = 0, $4 = 0, $40 = 0.0, $41 = 0.0, $42 = 0.0, $43 = 0, $44 = 0.0, $45 = 0, $46 = 0, $47 = 0; + var $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0.0, $61 = 0, $62 = 0.0, $63 = 0, $64 = 0.0, $65 = 0.0; + var $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0.0, $7 = 0, $70 = 0.0, $71 = 0.0, $72 = 0.0, $73 = 0.0, $74 = 0.0, $75 = 0.0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $3 = sp; + $4 = (_rlGetVersion()|0); + $5 = ($4|0)==(1); + if ($5) { + _rlBegin(4); + $6 = HEAP8[$2>>0]|0; + $7 = ((($2)) + 1|0); + $8 = HEAP8[$7>>0]|0; + $9 = ((($2)) + 2|0); + $10 = HEAP8[$9>>0]|0; + $11 = ((($2)) + 3|0); + $12 = HEAP8[$11>>0]|0; + _rlColor4ub($6,$8,$10,$12); + $13 = +HEAPF32[$0>>2]; + $14 = (~~(($13))); + $15 = ((($0)) + 4|0); + $16 = +HEAPF32[$15>>2]; + $17 = (~~(($16))); + _rlVertex2i($14,$17); + $18 = ((($1)) + 4|0); + $19 = +HEAPF32[$18>>2]; + $20 = $16 + $19; + $21 = (~~(($20))); + _rlVertex2i($14,$21); + $22 = +HEAPF32[$0>>2]; + $23 = +HEAPF32[$1>>2]; + $24 = $22 + $23; + $25 = (~~(($24))); + $26 = +HEAPF32[$15>>2]; + $27 = +HEAPF32[$18>>2]; + $28 = $26 + $27; + $29 = (~~(($28))); + _rlVertex2i($25,$29); + $30 = +HEAPF32[$0>>2]; + $31 = (~~(($30))); + $32 = +HEAPF32[$15>>2]; + $33 = (~~(($32))); + _rlVertex2i($31,$33); + $34 = +HEAPF32[$1>>2]; + $35 = $30 + $34; + $36 = (~~(($35))); + $37 = +HEAPF32[$18>>2]; + $38 = $32 + $37; + $39 = (~~(($38))); + _rlVertex2i($36,$39); + $40 = +HEAPF32[$0>>2]; + $41 = +HEAPF32[$1>>2]; + $42 = $40 + $41; + $43 = (~~(($42))); + $44 = +HEAPF32[$15>>2]; + $45 = (~~(($44))); + _rlVertex2i($43,$45); + _rlEnd(); + STACKTOP = sp;return; + } + $46 = (_rlGetVersion()|0); + $47 = ($46|0)==(2); + if (!($47)) { + $48 = (_rlGetVersion()|0); + $49 = ($48|0)==(3); + if (!($49)) { + $50 = (_rlGetVersion()|0); + $51 = ($50|0)==(4); + if (!($51)) { + STACKTOP = sp;return; + } + } + } + _GetDefaultTexture($3); + $52 = HEAP32[$3>>2]|0; + _rlEnableTexture($52); + _rlBegin(7); + $53 = HEAP8[$2>>0]|0; + $54 = ((($2)) + 1|0); + $55 = HEAP8[$54>>0]|0; + $56 = ((($2)) + 2|0); + $57 = HEAP8[$56>>0]|0; + $58 = ((($2)) + 3|0); + $59 = HEAP8[$58>>0]|0; + _rlColor4ub($53,$55,$57,$59); + _rlTexCoord2f(0.0,0.0); + $60 = +HEAPF32[$0>>2]; + $61 = ((($0)) + 4|0); + $62 = +HEAPF32[$61>>2]; + _rlVertex2f($60,$62); + _rlTexCoord2f(0.0,1.0); + $63 = ((($1)) + 4|0); + $64 = +HEAPF32[$63>>2]; + $65 = $62 + $64; + _rlVertex2f($60,$65); + _rlTexCoord2f(1.0,1.0); + $66 = +HEAPF32[$0>>2]; + $67 = +HEAPF32[$1>>2]; + $68 = $66 + $67; + $69 = +HEAPF32[$61>>2]; + $70 = +HEAPF32[$63>>2]; + $71 = $69 + $70; + _rlVertex2f($68,$71); + _rlTexCoord2f(1.0,0.0); + $72 = +HEAPF32[$0>>2]; + $73 = +HEAPF32[$1>>2]; + $74 = $72 + $73; + $75 = +HEAPF32[$61>>2]; + _rlVertex2f($74,$75); + _rlEnd(); + _rlDisableTexture(); + STACKTOP = sp;return; +} +function _Vector2Distance($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0, $9 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + $2 = +HEAPF32[$0>>2]; + $3 = +HEAPF32[$1>>2]; + $4 = $2 - $3; + $5 = $4 * $4; + $6 = ((($0)) + 4|0); + $7 = +HEAPF32[$6>>2]; + $8 = ((($1)) + 4|0); + $9 = +HEAPF32[$8>>2]; + $10 = $7 - $9; + $11 = $10 * $10; + $12 = $5 + $11; + $13 = (+Math_sqrt((+$12))); + return (+$13); +} +function _Vector2Angle($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $$0 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0.0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + $2 = ((($1)) + 4|0); + $3 = +HEAPF32[$2>>2]; + $4 = ((($0)) + 4|0); + $5 = +HEAPF32[$4>>2]; + $6 = $3 - $5; + $7 = +HEAPF32[$1>>2]; + $8 = +HEAPF32[$0>>2]; + $9 = $7 - $8; + $10 = (+Math_atan2((+$6),(+$9))); + $11 = $10 * 57.2957763671875; + $12 = $11 < 0.0; + $13 = $11 + 360.0; + $$0 = $12 ? $13 : $11; + return (+$$0); +} +function _VectorZero($0) { + $0 = $0|0; + var $1 = 0, $2 = 0, label = 0, sp = 0; + sp = STACKTOP; + HEAPF32[$0>>2] = 0.0; + $1 = ((($0)) + 4|0); + HEAPF32[$1>>2] = 0.0; + $2 = ((($0)) + 8|0); + HEAPF32[$2>>2] = 0.0; + return; +} +function _MatrixFrustum($0,$1,$2,$3,$4,$5,$6) { + $0 = $0|0; + $1 = +$1; + $2 = +$2; + $3 = +$3; + $4 = +$4; + $5 = +$5; + $6 = +$6; + var $$sroa$10$0$$sroa_idx24 = 0, $$sroa$11$0$$sroa_idx26 = 0, $$sroa$12$0$$sroa_idx28 = 0, $$sroa$13$0$$sroa_idx30 = 0, $$sroa$14$0$$sroa_idx32 = 0, $$sroa$15$0$$sroa_idx34 = 0, $$sroa$16$0$$sroa_idx36 = 0, $$sroa$17$0$$sroa_idx38 = 0, $$sroa$18$0$$sroa_idx40 = 0, $$sroa$4$0$$sroa_idx12 = 0, $$sroa$5$0$$sroa_idx14 = 0, $$sroa$6$0$$sroa_idx16 = 0, $$sroa$7$0$$sroa_idx18 = 0, $$sroa$8$0$$sroa_idx20 = 0, $$sroa$9$0$$sroa_idx22 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0; + var $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $27 = 0.0, $28 = 0.0, $29 = 0.0, $30 = 0.0, $31 = 0.0, $32 = 0.0, $33 = 0.0, $34 = 0.0; + var $35 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + $7 = $2 - $1; + $8 = $7; + $9 = $4 - $3; + $10 = $9; + $11 = $6 - $5; + $12 = $11; + $13 = $5 * 2.0; + $14 = $8; + $15 = $13 / $14; + $16 = $15; + $17 = $10; + $18 = $13 / $17; + $19 = $18; + $20 = $1 + $2; + $21 = $20 / $14; + $22 = $21; + $23 = $3 + $4; + $24 = $23 / $17; + $25 = $24; + $26 = $5 + $6; + $27 = -$26; + $28 = $12; + $29 = $27 / $28; + $30 = $29; + $31 = $5 * $6; + $32 = $31 * 2.0; + $33 = -$32; + $34 = $33 / $28; + $35 = $34; + HEAPF32[$0>>2] = $16; + $$sroa$4$0$$sroa_idx12 = ((($0)) + 4|0); + HEAPF32[$$sroa$4$0$$sroa_idx12>>2] = 0.0; + $$sroa$5$0$$sroa_idx14 = ((($0)) + 8|0); + HEAPF32[$$sroa$5$0$$sroa_idx14>>2] = $22; + $$sroa$6$0$$sroa_idx16 = ((($0)) + 12|0); + HEAPF32[$$sroa$6$0$$sroa_idx16>>2] = 0.0; + $$sroa$7$0$$sroa_idx18 = ((($0)) + 16|0); + HEAPF32[$$sroa$7$0$$sroa_idx18>>2] = 0.0; + $$sroa$8$0$$sroa_idx20 = ((($0)) + 20|0); + HEAPF32[$$sroa$8$0$$sroa_idx20>>2] = $19; + $$sroa$9$0$$sroa_idx22 = ((($0)) + 24|0); + HEAPF32[$$sroa$9$0$$sroa_idx22>>2] = $25; + $$sroa$10$0$$sroa_idx24 = ((($0)) + 28|0); + HEAPF32[$$sroa$10$0$$sroa_idx24>>2] = 0.0; + $$sroa$11$0$$sroa_idx26 = ((($0)) + 32|0); + HEAPF32[$$sroa$11$0$$sroa_idx26>>2] = 0.0; + $$sroa$12$0$$sroa_idx28 = ((($0)) + 36|0); + HEAPF32[$$sroa$12$0$$sroa_idx28>>2] = 0.0; + $$sroa$13$0$$sroa_idx30 = ((($0)) + 40|0); + HEAPF32[$$sroa$13$0$$sroa_idx30>>2] = $30; + $$sroa$14$0$$sroa_idx32 = ((($0)) + 44|0); + HEAPF32[$$sroa$14$0$$sroa_idx32>>2] = $35; + $$sroa$15$0$$sroa_idx34 = ((($0)) + 48|0); + HEAPF32[$$sroa$15$0$$sroa_idx34>>2] = 0.0; + $$sroa$16$0$$sroa_idx36 = ((($0)) + 52|0); + HEAPF32[$$sroa$16$0$$sroa_idx36>>2] = 0.0; + $$sroa$17$0$$sroa_idx38 = ((($0)) + 56|0); + HEAPF32[$$sroa$17$0$$sroa_idx38>>2] = -1.0; + $$sroa$18$0$$sroa_idx40 = ((($0)) + 60|0); + HEAPF32[$$sroa$18$0$$sroa_idx40>>2] = 0.0; + return; +} +function _MatrixOrtho($0,$1,$2,$3,$4,$5,$6) { + $0 = $0|0; + $1 = +$1; + $2 = +$2; + $3 = +$3; + $4 = +$4; + $5 = +$5; + $6 = +$6; + var $$sroa$10$0$$sroa_idx24 = 0, $$sroa$11$0$$sroa_idx26 = 0, $$sroa$12$0$$sroa_idx28 = 0, $$sroa$13$0$$sroa_idx30 = 0, $$sroa$14$0$$sroa_idx32 = 0, $$sroa$15$0$$sroa_idx34 = 0, $$sroa$16$0$$sroa_idx36 = 0, $$sroa$17$0$$sroa_idx38 = 0, $$sroa$18$0$$sroa_idx40 = 0, $$sroa$4$0$$sroa_idx12 = 0, $$sroa$5$0$$sroa_idx14 = 0, $$sroa$6$0$$sroa_idx16 = 0, $$sroa$7$0$$sroa_idx18 = 0, $$sroa$8$0$$sroa_idx20 = 0, $$sroa$9$0$$sroa_idx22 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0; + var $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, $19 = 0.0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0.0, $24 = 0.0, $25 = 0.0, $26 = 0.0, $27 = 0.0, $28 = 0.0, $29 = 0.0, $30 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0; + var sp = 0; + sp = STACKTOP; + $7 = $2 - $1; + $8 = $7; + $9 = $4 - $3; + $10 = $9; + $11 = $6 - $5; + $12 = $11; + $13 = 2.0 / $8; + $14 = 2.0 / $10; + $15 = -2.0 / $12; + $16 = $1 + $2; + $17 = -$16; + $18 = $8; + $19 = $17 / $18; + $20 = $19; + $21 = $3 + $4; + $22 = -$21; + $23 = $10; + $24 = $22 / $23; + $25 = $24; + $26 = $5 + $6; + $27 = -$26; + $28 = $12; + $29 = $27 / $28; + $30 = $29; + HEAPF32[$0>>2] = $13; + $$sroa$4$0$$sroa_idx12 = ((($0)) + 4|0); + HEAPF32[$$sroa$4$0$$sroa_idx12>>2] = 0.0; + $$sroa$5$0$$sroa_idx14 = ((($0)) + 8|0); + HEAPF32[$$sroa$5$0$$sroa_idx14>>2] = 0.0; + $$sroa$6$0$$sroa_idx16 = ((($0)) + 12|0); + HEAPF32[$$sroa$6$0$$sroa_idx16>>2] = $20; + $$sroa$7$0$$sroa_idx18 = ((($0)) + 16|0); + HEAPF32[$$sroa$7$0$$sroa_idx18>>2] = 0.0; + $$sroa$8$0$$sroa_idx20 = ((($0)) + 20|0); + HEAPF32[$$sroa$8$0$$sroa_idx20>>2] = $14; + $$sroa$9$0$$sroa_idx22 = ((($0)) + 24|0); + HEAPF32[$$sroa$9$0$$sroa_idx22>>2] = 0.0; + $$sroa$10$0$$sroa_idx24 = ((($0)) + 28|0); + HEAPF32[$$sroa$10$0$$sroa_idx24>>2] = $25; + $$sroa$11$0$$sroa_idx26 = ((($0)) + 32|0); + HEAPF32[$$sroa$11$0$$sroa_idx26>>2] = 0.0; + $$sroa$12$0$$sroa_idx28 = ((($0)) + 36|0); + HEAPF32[$$sroa$12$0$$sroa_idx28>>2] = 0.0; + $$sroa$13$0$$sroa_idx30 = ((($0)) + 40|0); + HEAPF32[$$sroa$13$0$$sroa_idx30>>2] = $15; + $$sroa$14$0$$sroa_idx32 = ((($0)) + 44|0); + HEAPF32[$$sroa$14$0$$sroa_idx32>>2] = $30; + $$sroa$15$0$$sroa_idx34 = ((($0)) + 48|0); + HEAPF32[$$sroa$15$0$$sroa_idx34>>2] = 0.0; + $$sroa$16$0$$sroa_idx36 = ((($0)) + 52|0); + HEAPF32[$$sroa$16$0$$sroa_idx36>>2] = 0.0; + $$sroa$17$0$$sroa_idx38 = ((($0)) + 56|0); + HEAPF32[$$sroa$17$0$$sroa_idx38>>2] = 0.0; + $$sroa$18$0$$sroa_idx40 = ((($0)) + 60|0); + HEAPF32[$$sroa$18$0$$sroa_idx40>>2] = 1.0; + return; +} +function _ProcessGestureEvent($0) { + $0 = $0|0; + var $$$sink = 0, $$sink = 0, $$sink10 = 0, $$sink11 = 0, $$sink16 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $106 = 0, $107 = 0, $108 = 0, $109 = 0, $11 = 0, $110 = 0.0, $111 = 0.0; + var $112 = 0.0, $113 = 0.0, $114 = 0.0, $115 = 0.0, $116 = 0.0, $117 = 0, $118 = 0, $119 = 0, $12 = 0.0, $120 = 0, $121 = 0, $122 = 0, $123 = 0, $124 = 0, $125 = 0, $126 = 0, $127 = 0, $128 = 0, $129 = 0, $13 = 0; + var $130 = 0, $131 = 0, $132 = 0, $133 = 0, $134 = 0, $135 = 0, $136 = 0, $137 = 0, $138 = 0, $139 = 0, $14 = 0, $140 = 0, $141 = 0, $142 = 0, $143 = 0, $144 = 0, $145 = 0, $146 = 0, $147 = 0, $148 = 0; + var $149 = 0, $15 = 0, $150 = 0, $151 = 0, $152 = 0, $153 = 0, $154 = 0, $155 = 0, $156 = 0, $157 = 0, $158 = 0, $159 = 0.0, $16 = 0, $160 = 0.0, $161 = 0.0, $162 = 0.0, $163 = 0.0, $164 = 0.0, $165 = 0.0, $166 = 0; + var $167 = 0.0, $168 = 0, $169 = 0.0, $17 = 0, $170 = 0.0, $171 = 0.0, $172 = 0, $173 = 0.0, $174 = 0.0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; + var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0; + var $46 = 0, $47 = 0, $48 = 0.0, $49 = 0.0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0.0, $56 = 0.0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0; + var $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0.0, $81 = 0; + var $82 = 0.0, $83 = 0.0, $84 = 0.0, $85 = 0.0, $86 = 0.0, $87 = 0.0, $88 = 0, $89 = 0, $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $moveDownPosition$byval_copy11 = 0; + var $moveDownPosition2$byval_copy12 = 0, $or$cond = 0, $or$cond3 = 0, $or$cond5 = 0, $or$cond7 = 0, $or$cond9 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $moveDownPosition2$byval_copy12 = sp + 8|0; + $moveDownPosition$byval_copy11 = sp; + $1 = ((($0)) + 4|0); + $2 = HEAP32[$1>>2]|0; + HEAP32[5650] = $2; + $3 = ($2|0)<(2); + $4 = HEAP32[$0>>2]|0; + $5 = ($4|0)==(1); + if (!($3)) { + if ($5) { + $88 = ((($0)) + 24|0); + $89 = $88; + $90 = $89; + $91 = HEAP32[$90>>2]|0; + $92 = (($89) + 4)|0; + $93 = $92; + $94 = HEAP32[$93>>2]|0; + $95 = 19448; + $96 = $95; + HEAP32[$96>>2] = $91; + $97 = (($95) + 4)|0; + $98 = $97; + HEAP32[$98>>2] = $94; + $99 = ((($0)) + 32|0); + $100 = $99; + $101 = $100; + $102 = HEAP32[$101>>2]|0; + $103 = (($100) + 4)|0; + $104 = $103; + $105 = HEAP32[$104>>2]|0; + $106 = 19488; + $107 = $106; + HEAP32[$107>>2] = $102; + $108 = (($106) + 4)|0; + $109 = $108; + HEAP32[$109>>2] = $105; + $110 = +HEAPF32[4872]; + $111 = +HEAPF32[4862]; + $112 = $110 - $111; + HEAPF32[4874] = $112; + $113 = +HEAPF32[(19492)>>2]; + $114 = +HEAPF32[(19452)>>2]; + $115 = $113 - $114; + HEAPF32[(19500)>>2] = $115; + HEAP32[5649] = 4; + STACKTOP = sp;return; + } + switch ($4|0) { + case 2: { + ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[19480>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[19480+4>>2]|0; + ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[19504>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[19504+4>>2]|0; + $116 = (+_Vector2Distance($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); + HEAPF32[5655] = $116; + $117 = 19480; + $118 = $117; + $119 = HEAP32[$118>>2]|0; + $120 = (($117) + 4)|0; + $121 = $120; + $122 = HEAP32[$121>>2]|0; + $123 = 19448; + $124 = $123; + HEAP32[$124>>2] = $119; + $125 = (($123) + 4)|0; + $126 = $125; + HEAP32[$126>>2] = $122; + $127 = 19504; + $128 = $127; + $129 = HEAP32[$128>>2]|0; + $130 = (($127) + 4)|0; + $131 = $130; + $132 = HEAP32[$131>>2]|0; + $133 = 19488; + $134 = $133; + HEAP32[$134>>2] = $129; + $135 = (($133) + 4)|0; + $136 = $135; + HEAP32[$136>>2] = $132; + $137 = ((($0)) + 24|0); + $138 = $137; + $139 = $138; + $140 = HEAP32[$139>>2]|0; + $141 = (($138) + 4)|0; + $142 = $141; + $143 = HEAP32[$142>>2]|0; + $144 = 19480; + $145 = $144; + HEAP32[$145>>2] = $140; + $146 = (($144) + 4)|0; + $147 = $146; + HEAP32[$147>>2] = $143; + $148 = ((($0)) + 32|0); + $149 = $148; + $150 = $149; + $151 = HEAP32[$150>>2]|0; + $152 = (($149) + 4)|0; + $153 = $152; + $154 = HEAP32[$153>>2]|0; + $155 = 19504; + $156 = $155; + HEAP32[$156>>2] = $151; + $157 = (($155) + 4)|0; + $158 = $157; + HEAP32[$158>>2] = $154; + $159 = +HEAPF32[4876]; + $160 = +HEAPF32[4870]; + $161 = $159 - $160; + HEAPF32[4874] = $161; + $162 = +HEAPF32[(19508)>>2]; + $163 = +HEAPF32[(19484)>>2]; + $164 = $162 - $163; + HEAPF32[(19500)>>2] = $164; + ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[19448>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[19448+4>>2]|0; + ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[19480>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[19480+4>>2]|0; + $165 = (+_Vector2Distance($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); + $166 = !($165 >= 0.004999999888241291); + if ($166) { + ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[19488>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[19488+4>>2]|0; + ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[19504>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[19504+4>>2]|0; + $167 = (+_Vector2Distance($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); + $168 = !($167 >= 0.004999999888241291); + if ($168) { + $$sink16 = 4; + } else { + label = 29; + } + } else { + label = 29; + } + if ((label|0) == 29) { + ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[19480>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[19480+4>>2]|0; + ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[19504>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[19504+4>>2]|0; + $169 = (+_Vector2Distance($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); + $170 = +HEAPF32[5655]; + $171 = $169 - $170; + $172 = $171 < 0.0; + $$sink11 = $172 ? 256 : 512; + $$sink16 = $$sink11; + } + HEAP32[5649] = $$sink16; + ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[19480>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[19480+4>>2]|0; + ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[19504>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[19504+4>>2]|0; + $173 = (+_Vector2Angle($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); + $174 = 360.0 - $173; + HEAPF32[5656] = $174; + STACKTOP = sp;return; + break; + } + case 0: { + HEAPF32[5655] = 0.0; + HEAPF32[5656] = 0.0; + HEAPF32[4874] = 0.0; + HEAPF32[(19500)>>2] = 0.0; + HEAP32[5650] = 0; + HEAP32[5649] = 0; + STACKTOP = sp;return; + break; + } + default: { + STACKTOP = sp;return; + } + } + } + if ($5) { + $6 = HEAP32[5651]|0; + $7 = (($6) + 1)|0; + HEAP32[5651] = $7; + $8 = HEAP32[5649]|0; + $9 = ($8|0)==(0); + $10 = ($6|0)>(0); + $or$cond = $10 & $9; + if ($or$cond) { + $11 = ((($0)) + 24|0); + ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[19448>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[19448+4>>2]|0; + ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[$11>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[$11+4>>2]|0; + $12 = (+_Vector2Distance($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); + $13 = $12 < 0.029999999329447746; + if ($13) { + HEAP32[5649] = 2; + HEAP32[5651] = 0; + } else { + label = 6; + } + } else { + label = 6; + } + if ((label|0) == 6) { + HEAP32[5651] = 1; + HEAP32[5649] = 1; + } + $14 = ((($0)) + 24|0); + $15 = $14; + $16 = $15; + $17 = HEAP32[$16>>2]|0; + $18 = (($15) + 4)|0; + $19 = $18; + $20 = HEAP32[$19>>2]|0; + $21 = 19448; + $22 = $21; + HEAP32[$22>>2] = $17; + $23 = (($21) + 4)|0; + $24 = $23; + HEAP32[$24>>2] = $20; + $25 = 19456; + $26 = $25; + HEAP32[$26>>2] = $17; + $27 = (($25) + 4)|0; + $28 = $27; + HEAP32[$28>>2] = $20; + $29 = 19464; + $30 = $29; + HEAP32[$30>>2] = $17; + $31 = (($29) + 4)|0; + $32 = $31; + HEAP32[$32>>2] = $20; + $33 = ((($0)) + 8|0); + $34 = HEAP32[$33>>2]|0; + HEAP32[928] = $34; + HEAPF32[4868] = 0.0; + HEAPF32[(19476)>>2] = 0.0; + STACKTOP = sp;return; + } + switch ($4|0) { + case 0: { + $35 = HEAP32[5649]|0; + $36 = ($35|0)==(8); + if ($36) { + $37 = ((($0)) + 24|0); + $38 = $37; + $39 = $38; + $40 = HEAP32[$39>>2]|0; + $41 = (($38) + 4)|0; + $42 = $41; + $43 = HEAP32[$42>>2]|0; + $44 = 19464; + $45 = $44; + HEAP32[$45>>2] = $40; + $46 = (($44) + 4)|0; + $47 = $46; + HEAP32[$47>>2] = $43; + } + ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[19448>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[19448+4>>2]|0; + ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[19464>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[19464+4>>2]|0; + $48 = (+_Vector2Distance($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); + $49 = $48 / 0.0; + HEAPF32[5652] = $49; + HEAP32[5653] = 0; + $50 = $49 > 5.0000002374872565E-4; + if ($50) { + $51 = HEAP32[928]|0; + $52 = ((($0)) + 8|0); + $53 = HEAP32[$52>>2]|0; + $54 = ($51|0)==($53|0); + if ($54) { + ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[19448>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[19448+4>>2]|0; + ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[19464>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[19464+4>>2]|0; + $55 = (+_Vector2Angle($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); + $56 = 360.0 - $55; + HEAPF32[5654] = $56; + $57 = $56 < 30.0; + $58 = $56 > 330.0; + $or$cond3 = $57 | $58; + if ($or$cond3) { + $$sink10 = 16; + } else { + $59 = $56 > 30.0; + $60 = $56 < 120.0; + $or$cond5 = $59 & $60; + if ($or$cond5) { + $$sink10 = 64; + } else { + $61 = $56 > 120.0; + $62 = $56 < 210.0; + $or$cond7 = $61 & $62; + $63 = $56 > 210.0; + $64 = $56 < 300.0; + $or$cond9 = $63 & $64; + $$sink = $or$cond9 ? 128 : 0; + $$$sink = $or$cond7 ? 32 : $$sink; + $$sink10 = $$$sink; + } + } + } else { + label = 16; + } + } else { + label = 16; + } + if ((label|0) == 16) { + HEAPF32[5652] = 0.0; + HEAPF32[5654] = 0.0; + $$sink10 = 0; + } + HEAP32[5649] = $$sink10; + HEAPF32[4864] = 0.0; + HEAPF32[(19460)>>2] = 0.0; + HEAP32[5650] = 0; + STACKTOP = sp;return; + break; + } + case 2: { + $65 = HEAP32[5653]|0; + $66 = ($65|0)==(0); + if ($66) { + HEAP32[5653] = 1; + } + $67 = ((($0)) + 24|0); + $68 = $67; + $69 = $68; + $70 = HEAP32[$69>>2]|0; + $71 = (($68) + 4)|0; + $72 = $71; + $73 = HEAP32[$72>>2]|0; + $74 = 19480; + $75 = $74; + HEAP32[$75>>2] = $70; + $76 = (($74) + 4)|0; + $77 = $76; + HEAP32[$77>>2] = $73; + $78 = HEAP32[5649]|0; + $79 = ($78|0)==(4); + if ($79) { + ;HEAP32[$moveDownPosition$byval_copy11>>2]=HEAP32[19448>>2]|0;HEAP32[$moveDownPosition$byval_copy11+4>>2]=HEAP32[19448+4>>2]|0; + ;HEAP32[$moveDownPosition2$byval_copy12>>2]=HEAP32[19480>>2]|0;HEAP32[$moveDownPosition2$byval_copy12+4>>2]=HEAP32[19480+4>>2]|0; + $80 = (+_Vector2Distance($moveDownPosition$byval_copy11,$moveDownPosition2$byval_copy12)); + $81 = !($80 >= 0.014999999664723873); + if (!($81)) { + HEAP32[5649] = 8; + } + } + $82 = +HEAPF32[4870]; + $83 = +HEAPF32[4864]; + $84 = $82 - $83; + HEAPF32[4868] = $84; + $85 = +HEAPF32[(19484)>>2]; + $86 = +HEAPF32[(19460)>>2]; + $87 = $85 - $86; + HEAPF32[(19476)>>2] = $87; + STACKTOP = sp;return; + break; + } + default: { + STACKTOP = sp;return; + } + } +} +function _UpdateGestures() { + var $$off = 0, $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $or$cond3 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[5649]|0; + $$off = (($0) + -1)|0; + $1 = ($$off>>>0)<(2); + $2 = HEAP32[5650]|0; + $3 = ($2|0)<(2); + $or$cond3 = $1 & $3; + if ($or$cond3) { + HEAP32[5649] = 4; + } + $4 = HEAP32[5649]|0; + $5 = (($4) + -16)|0; + $6 = $5 >>> 4; + $7 = $5 << 28; + $8 = $6 | $7; + switch ($8|0) { + case 0: case 1: case 3: case 7: { + break; + } + default: { + return; + } + } + HEAP32[5649] = 0; + return; +} +function _SetCameraMode($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $$off = 0, $$sroa$024$0$$sroa_idx = 0, $$sroa$024$0$copyload = 0.0, $$sroa$031$0$copyload = 0.0, $$sroa$4$0$$sroa_idx26 = 0, $$sroa$4$0$copyload = 0.0, $$sroa$433$0$$sroa_idx34 = 0, $$sroa$433$0$copyload = 0.0, $$sroa$528$0$$sroa_idx29 = 0, $$sroa$528$0$copyload = 0.0, $$sroa$536$0$$sroa_idx37 = 0, $$sroa$536$0$copyload = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0; + var $18 = 0.0, $19 = 0.0, $2 = 0.0, $20 = 0.0, $21 = 0, $22 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + $$sroa$031$0$copyload = +HEAPF32[$0>>2]; + $$sroa$433$0$$sroa_idx34 = ((($0)) + 4|0); + $$sroa$433$0$copyload = +HEAPF32[$$sroa$433$0$$sroa_idx34>>2]; + $$sroa$536$0$$sroa_idx37 = ((($0)) + 8|0); + $$sroa$536$0$copyload = +HEAPF32[$$sroa$536$0$$sroa_idx37>>2]; + $$sroa$024$0$$sroa_idx = ((($0)) + 12|0); + $$sroa$024$0$copyload = +HEAPF32[$$sroa$024$0$$sroa_idx>>2]; + $$sroa$4$0$$sroa_idx26 = ((($0)) + 16|0); + $$sroa$4$0$copyload = +HEAPF32[$$sroa$4$0$$sroa_idx26>>2]; + $$sroa$528$0$$sroa_idx29 = ((($0)) + 20|0); + $$sroa$528$0$copyload = +HEAPF32[$$sroa$528$0$$sroa_idx29>>2]; + $2 = $$sroa$024$0$copyload - $$sroa$031$0$copyload; + $3 = $$sroa$4$0$copyload - $$sroa$433$0$copyload; + $4 = $$sroa$528$0$copyload - $$sroa$536$0$copyload; + $5 = $2 * $2; + $6 = $3 * $3; + $7 = $5 + $6; + $8 = $4 * $4; + $9 = $7 + $8; + $10 = (+Math_sqrt((+$9))); + HEAPF32[5657] = $10; + $11 = $5 + $8; + $12 = (+Math_sqrt((+$11))); + $13 = (+Math_sqrt((+$7))); + $14 = (+Math_abs((+$2))); + $15 = $14 / $12; + $16 = (+Math_asin((+$15))); + HEAPF32[5658] = $16; + $17 = (+Math_abs((+$3))); + $18 = $17 / $13; + $19 = (+Math_asin((+$18))); + $20 = -$19; + HEAPF32[5659] = $20; + $21 = HEAP32[$$sroa$433$0$$sroa_idx34>>2]|0; + HEAP32[929] = $21; + $$off = (($1) + -3)|0; + $22 = ($$off>>>0)<(2); + if ($22) { + _DisableCursor(); + HEAP32[5660] = $1; + return; + } else { + _EnableCursor(); + HEAP32[5660] = $1; + return; + } +} +function _DisableCursor() { + var label = 0, sp = 0; + sp = STACKTOP; + HEAP32[5661] = 1; + HEAP32[5662] = 1; + return; +} +function _EnableCursor() { + var label = 0, sp = 0; + sp = STACKTOP; + HEAP32[5661] = 1; + HEAP32[5662] = 0; + return; +} +function _UpdateCamera($0) { + $0 = $0|0; + var $$ = 0, $$0 = 0, $$not = 0, $$not170 = 0, $$pr = 0, $$pr172 = 0, $$sink = 0.0, $$sink15 = 0, $$sink20 = 0.0, $$sink20$p = 0.0, $$sink24 = 0.0, $$sink26 = 0.0, $1 = 0, $10 = 0, $100 = 0.0, $101 = 0.0, $102 = 0.0, $103 = 0.0, $104 = 0.0, $105 = 0; + var $106 = 0, $107 = 0.0, $108 = 0.0, $109 = 0.0, $11 = 0, $110 = 0, $111 = 0, $112 = 0.0, $113 = 0.0, $114 = 0.0, $115 = 0.0, $116 = 0.0, $117 = 0.0, $118 = 0.0, $119 = 0.0, $12 = 0, $120 = 0.0, $121 = 0.0, $122 = 0.0, $123 = 0.0; + var $124 = 0.0, $125 = 0.0, $126 = 0.0, $127 = 0.0, $128 = 0, $129 = 0.0, $13 = 0, $130 = 0, $131 = 0.0, $132 = 0.0, $133 = 0.0, $134 = 0.0, $135 = 0.0, $136 = 0.0, $137 = 0, $138 = 0.0, $139 = 0.0, $14 = 0, $140 = 0.0, $141 = 0.0; + var $142 = 0.0, $143 = 0.0, $144 = 0.0, $145 = 0.0, $146 = 0.0, $147 = 0.0, $148 = 0.0, $149 = 0.0, $15 = 0, $150 = 0.0, $151 = 0.0, $152 = 0, $153 = 0.0, $154 = 0, $155 = 0.0, $156 = 0.0, $157 = 0.0, $158 = 0.0, $159 = 0.0, $16 = 0; + var $160 = 0.0, $161 = 0, $162 = 0, $163 = 0, $164 = 0.0, $165 = 0.0, $166 = 0.0, $167 = 0.0, $168 = 0, $169 = 0, $17 = 0, $170 = 0, $171 = 0, $172 = 0.0, $173 = 0.0, $174 = 0.0, $175 = 0.0, $176 = 0.0, $177 = 0.0, $178 = 0.0; + var $179 = 0.0, $18 = 0, $180 = 0.0, $181 = 0, $182 = 0, $183 = 0.0, $184 = 0.0, $185 = 0.0, $186 = 0.0, $187 = 0.0, $188 = 0.0, $189 = 0.0, $19 = 0, $190 = 0.0, $191 = 0.0, $192 = 0.0, $193 = 0.0, $194 = 0.0, $195 = 0.0, $196 = 0.0; + var $197 = 0, $198 = 0.0, $199 = 0.0, $2 = 0, $20 = 0, $200 = 0.0, $201 = 0.0, $202 = 0.0, $203 = 0, $204 = 0.0, $205 = 0.0, $206 = 0.0, $207 = 0.0, $208 = 0.0, $209 = 0.0, $21 = 0, $210 = 0.0, $211 = 0.0, $212 = 0, $213 = 0.0; + var $214 = 0.0, $215 = 0.0, $216 = 0.0, $217 = 0.0, $218 = 0.0, $219 = 0.0, $22 = 0, $220 = 0.0, $221 = 0, $222 = 0, $223 = 0, $224 = 0, $225 = 0.0, $226 = 0.0, $227 = 0, $228 = 0.0, $229 = 0.0, $23 = 0, $230 = 0, $231 = 0.0; + var $232 = 0.0, $233 = 0.0, $234 = 0.0, $235 = 0, $236 = 0.0, $237 = 0.0, $238 = 0.0, $239 = 0, $24 = 0, $240 = 0.0, $241 = 0.0, $242 = 0.0, $243 = 0.0, $244 = 0.0, $245 = 0.0, $246 = 0.0, $247 = 0.0, $248 = 0.0, $249 = 0.0, $25 = 0; + var $250 = 0.0, $251 = 0, $252 = 0.0, $253 = 0.0, $254 = 0, $255 = 0.0, $256 = 0.0, $257 = 0.0, $258 = 0, $259 = 0.0, $26 = 0, $260 = 0.0, $261 = 0.0, $262 = 0.0, $263 = 0.0, $264 = 0.0, $265 = 0.0, $266 = 0.0, $267 = 0.0, $268 = 0.0; + var $269 = 0, $27 = 0, $270 = 0.0, $271 = 0.0, $272 = 0, $273 = 0, $274 = 0.0, $275 = 0.0, $276 = 0.0, $277 = 0.0, $278 = 0.0, $279 = 0.0, $28 = 0, $280 = 0, $281 = 0, $282 = 0, $283 = 0, $284 = 0.0, $285 = 0.0, $286 = 0.0; + var $287 = 0.0, $288 = 0, $289 = 0.0, $29 = 0.0, $290 = 0.0, $291 = 0.0, $292 = 0.0, $293 = 0.0, $294 = 0.0, $295 = 0.0, $296 = 0.0, $297 = 0, $298 = 0.0, $299 = 0.0, $3 = 0, $30 = 0.0, $300 = 0, $301 = 0.0, $302 = 0.0, $303 = 0.0; + var $304 = 0.0, $305 = 0, $306 = 0, $307 = 0.0, $308 = 0.0, $309 = 0.0, $31 = 0.0, $310 = 0.0, $311 = 0.0, $312 = 0, $313 = 0.0, $314 = 0.0, $315 = 0.0, $316 = 0.0, $317 = 0.0, $318 = 0, $319 = 0.0, $32 = 0, $320 = 0.0, $321 = 0.0; + var $322 = 0.0, $323 = 0, $324 = 0, $325 = 0, $326 = 0, $327 = 0.0, $328 = 0, $329 = 0.0, $33 = 0.0, $330 = 0.0, $331 = 0.0, $332 = 0.0, $333 = 0.0, $334 = 0.0, $335 = 0.0, $336 = 0.0, $337 = 0, $338 = 0.0, $339 = 0.0, $34 = 0.0; + var $340 = 0, $341 = 0, $342 = 0.0, $343 = 0.0, $344 = 0.0, $345 = 0.0, $346 = 0.0, $347 = 0.0, $348 = 0.0, $349 = 0, $35 = 0.0, $350 = 0.0, $351 = 0.0, $352 = 0, $353 = 0.0, $354 = 0.0, $355 = 0, $356 = 0.0, $357 = 0.0, $358 = 0.0; + var $359 = 0.0, $36 = 0, $360 = 0, $361 = 0.0, $362 = 0.0, $363 = 0.0, $364 = 0, $365 = 0.0, $366 = 0.0, $367 = 0, $368 = 0, $369 = 0, $37 = 0, $370 = 0, $371 = 0, $372 = 0, $373 = 0, $374 = 0, $375 = 0, $376 = 0; + var $377 = 0, $378 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0.0, $47 = 0, $48 = 0, $49 = 0.0, $5 = 0, $50 = 0.0, $51 = 0.0, $52 = 0, $53 = 0; + var $54 = 0.0, $55 = 0, $56 = 0, $57 = 0.0, $58 = 0, $59 = 0, $6 = 0, $60 = 0.0, $61 = 0.0, $62 = 0.0, $63 = 0.0, $64 = 0.0, $65 = 0.0, $66 = 0.0, $67 = 0.0, $68 = 0.0, $69 = 0.0, $7 = 0, $70 = 0.0, $71 = 0.0; + var $72 = 0.0, $73 = 0, $74 = 0.0, $75 = 0, $76 = 0.0, $77 = 0.0, $78 = 0.0, $79 = 0.0, $8 = 0, $80 = 0.0, $81 = 0.0, $82 = 0, $83 = 0.0, $84 = 0.0, $85 = 0.0, $86 = 0.0, $87 = 0.0, $88 = 0.0, $89 = 0.0, $9 = 0; + var $90 = 0.0, $91 = 0.0, $92 = 0.0, $93 = 0.0, $94 = 0.0, $95 = 0.0, $96 = 0, $97 = 0.0, $98 = 0, $99 = 0.0, $not$ = 0, $or$cond = 0, $or$cond11 = 0, $or$cond13 = 0, $or$cond169 = 0, $or$cond171 = 0, $or$cond3 = 0, $or$cond5 = 0, $or$cond7 = 0, $or$cond9 = 0; + var $storemerge = 0.0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $1 = sp; + $2 = sp + 8|0; + _GetMousePosition($1); + $3 = (_GetMouseWheelMove()|0); + $4 = HEAP32[930]|0; + $5 = (_IsMouseButtonDown($4)|0); + $6 = HEAP32[931]|0; + $7 = (_IsKeyDown($6)|0); + $8 = HEAP32[932]|0; + $9 = (_IsKeyDown($8)|0); + $10 = HEAP32[933]|0; + $11 = (_IsKeyDown($10)|0); + HEAP32[$2>>2] = $11; + $12 = ((($2)) + 4|0); + $13 = HEAP32[934]|0; + $14 = (_IsKeyDown($13)|0); + HEAP32[$12>>2] = $14; + $15 = ((($2)) + 8|0); + $16 = HEAP32[935]|0; + $17 = (_IsKeyDown($16)|0); + HEAP32[$15>>2] = $17; + $18 = ((($2)) + 12|0); + $19 = HEAP32[936]|0; + $20 = (_IsKeyDown($19)|0); + HEAP32[$18>>2] = $20; + $21 = ((($2)) + 16|0); + $22 = HEAP32[937]|0; + $23 = (_IsKeyDown($22)|0); + HEAP32[$21>>2] = $23; + $24 = ((($2)) + 20|0); + $25 = HEAP32[938]|0; + $26 = (_IsKeyDown($25)|0); + HEAP32[$24>>2] = $26; + $27 = HEAP32[5660]|0; + $28 = ($27|0)==(0); + L1: do { + if ($28) { + label = 47; + } else { + $29 = +HEAPF32[$1>>2]; + $30 = +HEAPF32[4878]; + $31 = $29 - $30; + $32 = ((($1)) + 4|0); + $33 = +HEAPF32[$32>>2]; + $34 = +HEAPF32[(19516)>>2]; + $35 = $33 - $34; + $36 = $1; + $37 = $36; + $38 = HEAP32[$37>>2]|0; + $39 = (($36) + 4)|0; + $40 = $39; + $41 = HEAP32[$40>>2]|0; + $42 = 19512; + $43 = $42; + HEAP32[$43>>2] = $38; + $44 = (($42) + 4)|0; + $45 = $44; + HEAP32[$45>>2] = $41; + $$pr = HEAP32[5660]|0; + switch ($$pr|0) { + case 1: { + $46 = +HEAPF32[5657]; + $47 = $46 < 120.0; + $48 = ($3|0)<(0); + $or$cond = $48 & $47; + do { + if ($or$cond) { + $49 = (+($3|0)); + $50 = $49 * 1.5; + $51 = $46 - $50; + HEAPF32[5657] = $51; + $52 = $51 > 120.0; + if ($52) { + HEAPF32[5657] = 120.0; + } + } else { + $53 = ((($0)) + 4|0); + $54 = +HEAPF32[$53>>2]; + $55 = ((($0)) + 12|0); + $56 = ((($0)) + 16|0); + $57 = +HEAPF32[$56>>2]; + $58 = $54 > $57; + $59 = $46 == 120.0; + $or$cond3 = $59 & $58; + $or$cond5 = $48 & $or$cond3; + if ($or$cond5) { + $60 = (+($3|0)); + $61 = +HEAPF32[$55>>2]; + $62 = +HEAPF32[$0>>2]; + $63 = $61 - $62; + $64 = $60 * $63; + $65 = $64 * 1.5; + $66 = $65 / $46; + $67 = $61 + $66; + HEAPF32[$55>>2] = $67; + $68 = $57 - $54; + $69 = $60 * $68; + $70 = $69 * 1.5; + $71 = $70 / $46; + $72 = $57 + $71; + HEAPF32[$56>>2] = $72; + $73 = ((($0)) + 20|0); + $74 = +HEAPF32[$73>>2]; + $75 = ((($0)) + 8|0); + $76 = +HEAPF32[$75>>2]; + $77 = $74 - $76; + $78 = $60 * $77; + $79 = $78 * 1.5; + $80 = $79 / $46; + $81 = $74 + $80; + HEAPF32[$73>>2] = $81; + break; + } + $$not = $58 ^ 1; + $82 = !($57 >= 0.0); + $or$cond169 = $82 | $$not; + if (!($or$cond169)) { + $83 = (+($3|0)); + $84 = +HEAPF32[$55>>2]; + $85 = +HEAPF32[$0>>2]; + $86 = $84 - $85; + $87 = $83 * $86; + $88 = $87 * 1.5; + $89 = $88 / $46; + $90 = $84 + $89; + HEAPF32[$55>>2] = $90; + $91 = $57 - $54; + $92 = $83 * $91; + $93 = $92 * 1.5; + $94 = $93 / $46; + $95 = $57 + $94; + HEAPF32[$56>>2] = $95; + $96 = ((($0)) + 20|0); + $97 = +HEAPF32[$96>>2]; + $98 = ((($0)) + 8|0); + $99 = +HEAPF32[$98>>2]; + $100 = $97 - $99; + $101 = $83 * $100; + $102 = $101 * 1.5; + $103 = $102 / $46; + $104 = $97 + $103; + HEAPF32[$96>>2] = $104; + break; + } + if ($58) { + $105 = $57 < 0.0; + $106 = ($3|0)>(0); + $or$cond7 = $106 & $105; + if ($or$cond7) { + $107 = (+($3|0)); + $108 = $107 * 1.5; + $109 = $46 - $108; + HEAPF32[5657] = $109; + $110 = $109 < 0.30000001192092896; + if (!($110)) { + break; + } + HEAPF32[5657] = 0.30000001192092896; + break; + } + } + $111 = $54 < $57; + $or$cond9 = $59 & $111; + $or$cond11 = $48 & $or$cond9; + $112 = +HEAPF32[$56>>2]; + $113 = +HEAPF32[$53>>2]; + if ($or$cond11) { + $114 = (+($3|0)); + $115 = +HEAPF32[$55>>2]; + $116 = +HEAPF32[$0>>2]; + $117 = $115 - $116; + $118 = $114 * $117; + $119 = $118 * 1.5; + $120 = $119 / $46; + $121 = $115 + $120; + HEAPF32[$55>>2] = $121; + $122 = $112 - $113; + $123 = $114 * $122; + $124 = $123 * 1.5; + $125 = +HEAPF32[5657]; + $126 = $124 / $125; + $127 = $112 + $126; + HEAPF32[$56>>2] = $127; + $128 = ((($0)) + 20|0); + $129 = +HEAPF32[$128>>2]; + $130 = ((($0)) + 8|0); + $131 = +HEAPF32[$130>>2]; + $132 = $129 - $131; + $133 = $114 * $132; + $134 = $133 * 1.5; + $135 = $134 / $125; + $136 = $129 + $135; + HEAPF32[$128>>2] = $136; + break; + } + $$not170 = $111 ^ 1; + $137 = !($57 <= 0.0); + $or$cond171 = $137 | $$not170; + if (!($or$cond171)) { + $138 = (+($3|0)); + $139 = +HEAPF32[$55>>2]; + $140 = +HEAPF32[$0>>2]; + $141 = $139 - $140; + $142 = $138 * $141; + $143 = $142 * 1.5; + $144 = $143 / $46; + $145 = $139 + $144; + HEAPF32[$55>>2] = $145; + $146 = $112 - $113; + $147 = $138 * $146; + $148 = $147 * 1.5; + $149 = +HEAPF32[5657]; + $150 = $148 / $149; + $151 = $112 + $150; + HEAPF32[$56>>2] = $151; + $152 = ((($0)) + 20|0); + $153 = +HEAPF32[$152>>2]; + $154 = ((($0)) + 8|0); + $155 = +HEAPF32[$154>>2]; + $156 = $153 - $155; + $157 = $138 * $156; + $158 = $157 * 1.5; + $159 = $158 / $149; + $160 = $153 + $159; + HEAPF32[$152>>2] = $160; + break; + } + $161 = $113 < $112; + if ($161) { + $162 = $112 > 0.0; + $163 = ($3|0)>(0); + $or$cond13 = $163 & $162; + if ($or$cond13) { + $164 = (+($3|0)); + $165 = $164 * 1.5; + $166 = +HEAPF32[5657]; + $167 = $166 - $165; + HEAPF32[5657] = $167; + $168 = $167 < 0.30000001192092896; + if ($168) { + HEAPF32[5657] = 0.30000001192092896; + } + } + } + } + } while(0); + $169 = ($5|0)==(0); + if ($169) { + label = 47; + break L1; + } + $170 = ($7|0)==(0); + if ($170) { + $183 = $31 * -0.0099999997764825821; + $184 = +HEAPF32[5658]; + $185 = (+Math_cos((+$184))); + $186 = $183 * $185; + $187 = $35 * 0.0099999997764825821; + $188 = (+Math_sin((+$184))); + $189 = $187 * $188; + $190 = +HEAPF32[5659]; + $191 = (+Math_sin((+$190))); + $192 = $189 * $191; + $193 = $186 + $192; + $194 = +HEAPF32[5657]; + $195 = $194 / 5.0999999046325684; + $196 = $193 * $195; + $197 = ((($0)) + 12|0); + $198 = +HEAPF32[$197>>2]; + $199 = $198 + $196; + HEAPF32[$197>>2] = $199; + $200 = (+Math_cos((+$190))); + $201 = $187 * $200; + $202 = $195 * $201; + $203 = ((($0)) + 16|0); + $204 = +HEAPF32[$203>>2]; + $205 = $204 + $202; + HEAPF32[$203>>2] = $205; + $206 = $31 * 0.0099999997764825821; + $207 = $206 * $188; + $208 = $187 * $185; + $209 = $208 * $191; + $210 = $207 + $209; + $211 = $210 * $195; + $212 = ((($0)) + 20|0); + $213 = +HEAPF32[$212>>2]; + $214 = $211 + $213; + HEAPF32[$212>>2] = $214; + label = 47; + break L1; + } + $171 = ($9|0)==(0); + if (!($171)) { + $172 = $35 * 0.05000000074505806; + $173 = +HEAPF32[5657]; + $174 = $172 + $173; + HEAPF32[5657] = $174; + label = 47; + break L1; + } + $175 = $31 * 0.0099999997764825821; + $176 = +HEAPF32[5658]; + $177 = $176 - $175; + HEAPF32[5658] = $177; + $178 = $35 * 0.0099999997764825821; + $179 = +HEAPF32[5659]; + $180 = $179 - $178; + HEAPF32[5659] = $180; + $181 = $180 > 1.483529806137085; + if ($181) { + HEAPF32[5659] = 1.483529806137085; + label = 47; + break L1; + } + $182 = $180 < -1.483529806137085; + if (!($182)) { + label = 47; + break L1; + } + HEAPF32[5659] = -1.483529806137085; + label = 47; + break L1; + break; + } + case 2: { + $215 = +HEAPF32[5658]; + $216 = $215 + 0.0099999997764825821; + HEAPF32[5658] = $216; + $217 = (+($3|0)); + $218 = $217 * 1.5; + $219 = +HEAPF32[5657]; + $220 = $219 - $218; + HEAPF32[5657] = $220; + $221 = $220 < 1.2000000476837158; + if (!($221)) { + label = 47; + break L1; + } + HEAPF32[5657] = 1.2000000476837158; + label = 47; + break L1; + break; + } + case 4: case 3: { + $225 = +HEAPF32[5658]; + $226 = (+Math_sin((+$225))); + $227 = HEAP32[$12>>2]|0; + $228 = (+($227>>>0)); + $229 = $226 * $228; + $230 = HEAP32[$2>>2]|0; + $231 = (+($230>>>0)); + $232 = $226 * $231; + $233 = $229 - $232; + $234 = (+Math_cos((+$225))); + $235 = HEAP32[$18>>2]|0; + $236 = (+($235>>>0)); + $237 = $234 * $236; + $238 = $233 - $237; + $239 = HEAP32[$15>>2]|0; + $240 = (+($239>>>0)); + $241 = $234 * $240; + $242 = $238 + $241; + $243 = $242 / 20.0; + $244 = +HEAPF32[$0>>2]; + $245 = $244 + $243; + HEAPF32[$0>>2] = $245; + $246 = +HEAPF32[5659]; + $247 = (+Math_sin((+$246))); + $248 = $231 * $247; + $249 = $228 * $247; + $250 = $248 - $249; + $251 = HEAP32[$21>>2]|0; + $252 = (+($251>>>0)); + $253 = $250 + $252; + $254 = HEAP32[$24>>2]|0; + $255 = (+($254>>>0)); + $256 = $253 - $255; + $257 = $256 / 20.0; + $258 = ((($0)) + 4|0); + $259 = +HEAPF32[$258>>2]; + $260 = $259 + $257; + HEAPF32[$258>>2] = $260; + $261 = $228 * $234; + $262 = $234 * $231; + $263 = $261 - $262; + $264 = $226 * $236; + $265 = $263 + $264; + $266 = $226 * $240; + $267 = $265 - $266; + $268 = $267 / 20.0; + $269 = ((($0)) + 8|0); + $270 = +HEAPF32[$269>>2]; + $271 = $268 + $270; + HEAPF32[$269>>2] = $271; + $272 = HEAP32[$2>>2]|0; + $273 = ($272|0)==(0); + if ($273) { + $222 = ((($2)) + 4|0); + $223 = HEAP32[$222>>2]|0; + $224 = ($223|0)==(0); + if ($224) { + $368 = ((($2)) + 8|0); + $369 = HEAP32[$368>>2]|0; + $370 = ($369|0)==(0); + if ($370) { + $371 = ((($2)) + 12|0); + $372 = HEAP32[$371>>2]|0; + $373 = ($372|0)==(0); + if ($373) { + $374 = ((($2)) + 16|0); + $375 = HEAP32[$374>>2]|0; + $376 = ($375|0)==(0); + if ($376) { + $377 = ((($2)) + 20|0); + $378 = HEAP32[$377>>2]|0; + $not$ = ($378|0)!=(0); + $$ = $not$&1; + $$0 = $$; + } else { + $$0 = 1; + } + } else { + $$0 = 1; + } + } else { + $$0 = 1; + } + } else { + $$0 = 1; + } + } else { + $$0 = 1; + } + $274 = $31 * 0.0030000000260770321; + $275 = +HEAPF32[5658]; + $276 = $275 - $274; + HEAPF32[5658] = $276; + $277 = $35 * 0.0030000000260770321; + $278 = +HEAPF32[5659]; + $279 = $278 - $277; + HEAPF32[5659] = $279; + $280 = HEAP32[5660]|0; + $281 = ($280|0)==(4); + if ($281) { + $282 = $279 > 0.087266460061073303; + if ($282) { + $$sink24 = 0.087266460061073303; + label = 38; + } else { + $283 = $279 < -1.483529806137085; + if ($283) { + $$sink24 = -1.483529806137085; + label = 38; + } + } + if ((label|0) == 38) { + HEAPF32[5659] = $$sink24; + } + $284 = (+($3|0)); + $285 = $284 * 1.5; + $286 = +HEAPF32[5657]; + $287 = $286 - $285; + $288 = $287 < 1.2000000476837158; + $storemerge = $288 ? 1.2000000476837158 : $287; + HEAPF32[5657] = $storemerge; + $289 = +HEAPF32[$0>>2]; + $290 = +HEAPF32[5658]; + $291 = (+Math_cos((+$290))); + $292 = $291 * 0.40000000596046448; + $293 = $289 + $292; + $294 = (+Math_sin((+$290))); + $295 = $294 * 0.0; + $296 = $293 + $295; + $297 = ((($0)) + 12|0); + HEAPF32[$297>>2] = $296; + $298 = +HEAPF32[$258>>2]; + $299 = $298 + 0.0; + $300 = ((($0)) + 16|0); + HEAPF32[$300>>2] = $299; + $301 = +HEAPF32[$269>>2]; + $302 = $295 + $301; + $303 = $294 * 0.40000000596046448; + $304 = $302 - $303; + $$sink = $304;$$sink15 = $297; + } else { + $305 = $279 > 1.483529806137085; + if ($305) { + $$sink26 = 1.483529806137085; + label = 42; + } else { + $306 = $279 < -1.483529806137085; + if ($306) { + $$sink26 = -1.483529806137085; + label = 42; + } + } + if ((label|0) == 42) { + HEAPF32[5659] = $$sink26; + } + $307 = +HEAPF32[$0>>2]; + $308 = +HEAPF32[5658]; + $309 = (+Math_sin((+$308))); + $310 = $309 * 25.0; + $311 = $307 - $310; + $312 = ((($0)) + 12|0); + HEAPF32[$312>>2] = $311; + $313 = +HEAPF32[$258>>2]; + $314 = +HEAPF32[5659]; + $315 = (+Math_sin((+$314))); + $316 = $315 * 25.0; + $317 = $313 + $316; + $318 = ((($0)) + 16|0); + HEAPF32[$318>>2] = $317; + $319 = +HEAPF32[$269>>2]; + $320 = (+Math_cos((+$308))); + $321 = $320 * 25.0; + $322 = $319 - $321; + $323 = ((($0)) + 20|0); + HEAPF32[$323>>2] = $322; + $324 = ($$0|0)==(0); + if (!($324)) { + $325 = HEAP32[5663]|0; + $326 = (($325) + 1)|0; + HEAP32[5663] = $326; + } + $327 = +HEAPF32[929]; + $328 = HEAP32[5663]|0; + $329 = (+($328|0)); + $330 = $329 / 5.0; + $331 = (+Math_sin((+$330))); + $332 = $331 / 30.0; + $333 = $327 - $332; + HEAPF32[$258>>2] = $333; + $334 = $329 / 10.0; + $335 = (+Math_sin((+$334))); + $336 = $335 / 200.0; + $337 = ((($0)) + 24|0); + HEAPF32[$337>>2] = $336; + $338 = -$335; + $339 = $338 / 200.0; + $$sink = $339;$$sink15 = $337; + } + $340 = ((($$sink15)) + 8|0); + HEAPF32[$340>>2] = $$sink; + label = 47; + break L1; + break; + } + default: { + $341 = $$pr; + break L1; + } + } + } + } while(0); + if ((label|0) == 47) { + $$pr172 = HEAP32[5660]|0; + $341 = $$pr172; + } + switch ($341|0) { + case 1: case 2: case 4: { + break; + } + default: { + STACKTOP = sp;return; + } + } + $342 = +HEAPF32[5658]; + $343 = (+Math_sin((+$342))); + $344 = +HEAPF32[5657]; + $345 = $343 * $344; + $346 = +HEAPF32[5659]; + $347 = (+Math_cos((+$346))); + $348 = $345 * $347; + $349 = ((($0)) + 12|0); + $350 = +HEAPF32[$349>>2]; + $351 = $348 + $350; + HEAPF32[$0>>2] = $351; + $352 = !($346 <= 0.0); + $353 = (+Math_sin((+$346))); + $354 = +HEAPF32[5657]; + $355 = ((($0)) + 16|0); + $356 = +HEAPF32[$355>>2]; + $357 = $353 * $354; + $358 = $353 * $357; + $359 = -$358; + $$sink20$p = $352 ? $359 : $358; + $$sink20 = $356 + $$sink20$p; + $360 = ((($0)) + 4|0); + HEAPF32[$360>>2] = $$sink20; + $361 = (+Math_cos((+$342))); + $362 = $354 * $361; + $363 = $347 * $362; + $364 = ((($0)) + 20|0); + $365 = +HEAPF32[$364>>2]; + $366 = $365 + $363; + $367 = ((($0)) + 8|0); + HEAPF32[$367>>2] = $366; + STACKTOP = sp;return; +} +function _GetMousePosition($0) { + $0 = $0|0; + var $1 = 0, $10 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = 19520; + $2 = $1; + $3 = HEAP32[$2>>2]|0; + $4 = (($1) + 4)|0; + $5 = $4; + $6 = HEAP32[$5>>2]|0; + $7 = $0; + $8 = $7; + HEAP32[$8>>2] = $3; + $9 = (($7) + 4)|0; + $10 = $9; + HEAP32[$10>>2] = $6; + return; +} +function _GetMouseWheelMove() { + var $0 = 0, $1 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[5665]|0; + $1 = (($0|0) / 100)&-1; + return ($1|0); +} +function _IsMouseButtonDown($0) { + $0 = $0|0; + var $$ = 0, $1 = 0, $2 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = (_GetMouseButtonStatus($0)|0); + $2 = ($1|0)==(1); + $$ = $2&1; + return ($$|0); +} +function _IsKeyDown($0) { + $0 = $0|0; + var $$ = 0, $1 = 0, $2 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = (_GetKeyStatus($0)|0); + $2 = ($1|0)==(1); + $$ = $2&1; + return ($$|0); +} +function _GetKeyStatus($0) { + $0 = $0|0; + var $1 = 0, $2 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = HEAP32[5664]|0; + $2 = (_glfwGetKey(($1|0),($0|0))|0); + return ($2|0); +} +function _GetMouseButtonStatus($0) { + $0 = $0|0; + var $1 = 0, $2 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = HEAP32[5664]|0; + $2 = (_glfwGetMouseButton(($1|0),($0|0))|0); + return ($2|0); +} +function _InitWindow($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $10 = 0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0, $vararg_buffer = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $vararg_buffer = sp; + _TraceLog(0,9341,$vararg_buffer); + HEAP32[5666] = $2; + _InitGraphicsDevice($0,$1); + _LoadDefaultFont(); + _InitTimer(); + (_emscripten_set_fullscreenchange_callback((0|0),(0|0),1,(5|0))|0); + (_emscripten_set_keypress_callback((9370|0),(0|0),1,(6|0))|0); + (_emscripten_set_click_callback((9370|0),(0|0),1,(7|0))|0); + (_emscripten_set_touchstart_callback((9370|0),(0|0),1,(8|0))|0); + (_emscripten_set_touchend_callback((9370|0),(0|0),1,(8|0))|0); + (_emscripten_set_touchmove_callback((9370|0),(0|0),1,(8|0))|0); + (_emscripten_set_touchcancel_callback((9370|0),(0|0),1,(8|0))|0); + (_emscripten_set_gamepadconnected_callback((0|0),1,(9|0))|0); + (_emscripten_set_gamepaddisconnected_callback((0|0),1,(9|0))|0); + $3 = HEAP32[5667]|0; + $4 = (+($3|0)); + $5 = $4 * 0.5; + HEAPF32[4880] = $5; + $6 = HEAP32[5668]|0; + $7 = (+($6|0)); + $8 = $7 * 0.5; + HEAPF32[(19524)>>2] = $8; + $9 = HEAP32[5669]|0; + $10 = ($9|0)==(0); + if ($10) { + STACKTOP = sp;return; + } + _SetTargetFPS(60); + _LogoAnimation(); + STACKTOP = sp;return; +} +function _InitGraphicsDevice($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $$015 = 0, $$byval_copy = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0; + var $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0; + var $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0; + var $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0.0, $79 = 0, $8 = 0, $80 = 0; + var $81 = 0, $82 = 0.0, $83 = 0, $84 = 0, $85 = 0, $9 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer10 = 0, $vararg_buffer14 = 0, $vararg_buffer18 = 0, $vararg_buffer22 = 0, $vararg_buffer3 = 0, $vararg_buffer6 = 0, $vararg_buffer8 = 0, $vararg_ptr13 = 0, $vararg_ptr17 = 0, $vararg_ptr21 = 0, $vararg_ptr5 = 0, dest = 0; + var label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 144|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(144|0); + $$byval_copy = sp + 136|0; + $vararg_buffer22 = sp + 64|0; + $vararg_buffer18 = sp + 56|0; + $vararg_buffer14 = sp + 48|0; + $vararg_buffer10 = sp + 40|0; + $vararg_buffer8 = sp + 32|0; + $vararg_buffer6 = sp + 24|0; + $vararg_buffer3 = sp + 16|0; + $vararg_buffer1 = sp + 8|0; + $vararg_buffer = sp; + $2 = sp + 72|0; + $3 = sp + 140|0; + HEAP32[5667] = $0; + HEAP32[5668] = $1; + _MatrixIdentity($2); + dest=22696; src=$2; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + (_glfwSetErrorCallback((2|0))|0); + $4 = (_glfwInit()|0); + $5 = ($4|0)==(0); + if ($5) { + _TraceLog(2,9565,$vararg_buffer); + } + $6 = HEAP32[5667]|0; + HEAP32[5690] = $6; + $7 = HEAP32[5668]|0; + HEAP32[5691] = $7; + _glfwDefaultWindowHints(); + $8 = HEAP8[23576]|0; + $9 = $8 & 4; + $10 = ($9<<24>>24)==(0); + if ($10) { + _glfwWindowHint(131075,0); + } else { + _glfwWindowHint(131075,1); + } + $11 = HEAP8[23576]|0; + $12 = $11 & 8; + $13 = ($12<<24>>24)==(0); + if (!($13)) { + _glfwWindowHint(131077,1); + } + $14 = HEAP8[23576]|0; + $15 = $14 & 32; + $16 = ($15<<24>>24)==(0); + if (!($16)) { + _glfwWindowHint(135181,4); + _TraceLog(0,9591,$vararg_buffer1); + } + $17 = (_rlGetVersion()|0); + $18 = ($17|0)==(2); + if ($18) { + _glfwWindowHint(139266,2); + _glfwWindowHint(139267,1); + } else { + $19 = (_rlGetVersion()|0); + $20 = ($19|0)==(3); + if ($20) { + _glfwWindowHint(139266,3); + _glfwWindowHint(139267,3); + _glfwWindowHint(139272,204801); + _glfwWindowHint(139270,0); + } + } + $21 = HEAP32[5692]|0; + $22 = ($21|0)==(0); + if ($22) { + $47 = HEAP32[5667]|0; + $48 = HEAP32[5668]|0; + $49 = HEAP32[5666]|0; + $50 = (_glfwCreateWindow(($47|0),($48|0),($49|0),(0|0),(0|0))|0); + HEAP32[5664] = $50; + $51 = HEAP32[5667]|0; + HEAP32[5693] = $51; + $52 = HEAP32[5668]|0; + HEAP32[5694] = $52; + $54 = $50; + } else { + $23 = (_glfwGetPrimaryMonitor()|0); + $24 = (_glfwGetVideoModes(($23|0),($$byval_copy|0))|0); + $25 = HEAP32[$$byval_copy>>2]|0; + $26 = ($25|0)>(0); + L22: do { + if ($26) { + $27 = HEAP32[5667]|0; + $28 = HEAP32[$$byval_copy>>2]|0; + $29 = HEAP32[5668]|0; + $$015 = 0; + while(1) { + $30 = (($24) + (($$015*24)|0)|0); + $31 = HEAP32[$30>>2]|0; + $32 = ($31|0)<($27|0); + if (!($32)) { + $33 = (((($24) + (($$015*24)|0)|0)) + 4|0); + $34 = HEAP32[$33>>2]|0; + $35 = ($34|0)<($29|0); + if (!($35)) { + break; + } + } + $36 = (($$015) + 1)|0; + $37 = ($36|0)<($28|0); + if ($37) { + $$015 = $36; + } else { + break L22; + } + } + HEAP32[5690] = $31; + HEAP32[5691] = $34; + } + } while(0); + $38 = HEAP32[5690]|0; + $39 = HEAP32[5691]|0; + HEAP32[$vararg_buffer3>>2] = $38; + $vararg_ptr5 = ((($vararg_buffer3)) + 4|0); + HEAP32[$vararg_ptr5>>2] = $39; + _TraceLog(1,9616,$vararg_buffer3); + $40 = HEAP32[5690]|0; + $41 = HEAP32[5691]|0; + _SetupFramebufferSize($40,$41); + $42 = HEAP32[5690]|0; + $43 = HEAP32[5691]|0; + $44 = HEAP32[5666]|0; + $45 = (_glfwGetPrimaryMonitor()|0); + $46 = (_glfwCreateWindow(($42|0),($43|0),($44|0),($45|0),(0|0))|0); + HEAP32[5664] = $46; + $54 = $46; + } + $53 = ($54|0)==(0|0); + if ($53) { + _glfwTerminate(); + _TraceLog(2,9654,$vararg_buffer6); + } else { + _TraceLog(0,9687,$vararg_buffer8); + $55 = HEAP32[5693]|0; + $56 = HEAP32[5694]|0; + HEAP32[$vararg_buffer10>>2] = $55; + $vararg_ptr13 = ((($vararg_buffer10)) + 4|0); + HEAP32[$vararg_ptr13>>2] = $56; + _TraceLog(0,9727,$vararg_buffer10); + $57 = HEAP32[5667]|0; + $58 = HEAP32[5668]|0; + HEAP32[$vararg_buffer14>>2] = $57; + $vararg_ptr17 = ((($vararg_buffer14)) + 4|0); + HEAP32[$vararg_ptr17>>2] = $58; + _TraceLog(0,9748,$vararg_buffer14); + $59 = HEAP32[5695]|0; + $60 = HEAP32[5696]|0; + HEAP32[$vararg_buffer18>>2] = $59; + $vararg_ptr21 = ((($vararg_buffer18)) + 4|0); + HEAP32[$vararg_ptr21>>2] = $60; + _TraceLog(0,9769,$vararg_buffer18); + } + $61 = HEAP32[5664]|0; + (_glfwSetWindowSizeCallback(($61|0),(1|0))|0); + $62 = HEAP32[5664]|0; + (_glfwSetCursorEnterCallback(($62|0),(3|0))|0); + $63 = HEAP32[5664]|0; + (_glfwSetKeyCallback(($63|0),(1|0))|0); + $64 = HEAP32[5664]|0; + (_glfwSetMouseButtonCallback(($64|0),(1|0))|0); + $65 = HEAP32[5664]|0; + (_glfwSetCursorPosCallback(($65|0),(1|0))|0); + $66 = HEAP32[5664]|0; + (_glfwSetCharCallback(($66|0),(4|0))|0); + $67 = HEAP32[5664]|0; + (_glfwSetScrollCallback(($67|0),(2|0))|0); + $68 = HEAP32[5664]|0; + (_glfwSetWindowIconifyCallback(($68|0),(5|0))|0); + $69 = HEAP32[5664]|0; + _glfwMakeContextCurrent(($69|0)); + _glfwSwapInterval(0); + $70 = HEAP8[23576]|0; + $71 = $70 & 64; + $72 = ($71<<24>>24)==(0); + if ($72) { + $73 = HEAP32[5667]|0; + $74 = HEAP32[5668]|0; + _rlglInit($73,$74); + _SetupViewport(); + _rlMatrixMode(5889); + _rlLoadIdentity(); + $75 = HEAP32[5693]|0; + $76 = HEAP32[5695]|0; + $77 = (($75) - ($76))|0; + $78 = (+($77|0)); + $79 = HEAP32[5694]|0; + $80 = HEAP32[5696]|0; + $81 = (($79) - ($80))|0; + $82 = (+($81|0)); + _rlOrtho(0.0,$78,$82,0.0,0.0,1.0); + _rlMatrixMode(5888); + _rlLoadIdentity(); + HEAP8[$3>>0] = -11; + $83 = ((($3)) + 1|0); + HEAP8[$83>>0] = -11; + $84 = ((($3)) + 2|0); + HEAP8[$84>>0] = -11; + $85 = ((($3)) + 3|0); + HEAP8[$85>>0] = -1; + ;HEAP8[$$byval_copy>>0]=HEAP8[$3>>0]|0;HEAP8[$$byval_copy+1>>0]=HEAP8[$3+1>>0]|0;HEAP8[$$byval_copy+2>>0]=HEAP8[$3+2>>0]|0;HEAP8[$$byval_copy+3>>0]=HEAP8[$3+3>>0]|0; + _ClearBackground($$byval_copy); + STACKTOP = sp;return; + } + _glfwSwapInterval(1); + _TraceLog(0,9794,$vararg_buffer22); + $73 = HEAP32[5667]|0; + $74 = HEAP32[5668]|0; + _rlglInit($73,$74); + _SetupViewport(); + _rlMatrixMode(5889); + _rlLoadIdentity(); + $75 = HEAP32[5693]|0; + $76 = HEAP32[5695]|0; + $77 = (($75) - ($76))|0; + $78 = (+($77|0)); + $79 = HEAP32[5694]|0; + $80 = HEAP32[5696]|0; + $81 = (($79) - ($80))|0; + $82 = (+($81|0)); + _rlOrtho(0.0,$78,$82,0.0,0.0,1.0); + _rlMatrixMode(5888); + _rlLoadIdentity(); + HEAP8[$3>>0] = -11; + $83 = ((($3)) + 1|0); + HEAP8[$83>>0] = -11; + $84 = ((($3)) + 2|0); + HEAP8[$84>>0] = -11; + $85 = ((($3)) + 3|0); + HEAP8[$85>>0] = -1; + ;HEAP8[$$byval_copy>>0]=HEAP8[$3>>0]|0;HEAP8[$$byval_copy+1>>0]=HEAP8[$3+1>>0]|0;HEAP8[$$byval_copy+2>>0]=HEAP8[$3+2>>0]|0;HEAP8[$$byval_copy+3>>0]=HEAP8[$3+3>>0]|0; + _ClearBackground($$byval_copy); + STACKTOP = sp;return; +} +function _InitTimer() { + var $0 = 0, $1 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + $0 = (_time((0|0))|0); + _srand($0); + $1 = (+_GetTime()); + HEAPF64[2444] = $1; + return; +} +function _EmscriptenFullscreenChangeCallback($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $10 = 0, $11 = 0, $12 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0, $vararg_buffer4 = 0, $vararg_ptr1 = 0, $vararg_ptr2 = 0, $vararg_ptr3 = 0, $vararg_ptr7 = 0, $vararg_ptr8 = 0, $vararg_ptr9 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 32|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(32|0); + $vararg_buffer4 = sp + 16|0; + $vararg_buffer = sp; + $3 = HEAP32[$1>>2]|0; + $4 = ($3|0)==(0); + $5 = ((($1)) + 264|0); + $6 = HEAP32[$5>>2]|0; + $7 = ((($1)) + 268|0); + $8 = HEAP32[$7>>2]|0; + $9 = ((($1)) + 272|0); + $10 = HEAP32[$9>>2]|0; + $11 = ((($1)) + 276|0); + $12 = HEAP32[$11>>2]|0; + if ($4) { + HEAP32[$vararg_buffer4>>2] = $6; + $vararg_ptr7 = ((($vararg_buffer4)) + 4|0); + HEAP32[$vararg_ptr7>>2] = $8; + $vararg_ptr8 = ((($vararg_buffer4)) + 8|0); + HEAP32[$vararg_ptr8>>2] = $10; + $vararg_ptr9 = ((($vararg_buffer4)) + 12|0); + HEAP32[$vararg_ptr9>>2] = $12; + _TraceLog(0,9498,$vararg_buffer4); + STACKTOP = sp;return 0; + } else { + HEAP32[$vararg_buffer>>2] = $6; + $vararg_ptr1 = ((($vararg_buffer)) + 4|0); + HEAP32[$vararg_ptr1>>2] = $8; + $vararg_ptr2 = ((($vararg_buffer)) + 8|0); + HEAP32[$vararg_ptr2>>2] = $10; + $vararg_ptr3 = ((($vararg_buffer)) + 12|0); + HEAP32[$vararg_ptr3>>2] = $12; + _TraceLog(0,9429,$vararg_buffer); + STACKTOP = sp;return 0; + } + return (0)|0; +} +function _EmscriptenKeyboardCallback($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $3 = 0, $4 = 0, $5 = 0, $6 = 0, label = 0, sp = 0; + sp = STACKTOP; + $3 = ($0|0)==(1); + if (!($3)) { + return 0; + } + $4 = ((($1)) + 32|0); + $5 = (_strcmp($4,9422)|0); + $6 = ($5|0)==(0); + if (!($6)) { + return 0; + } + (_emscripten_exit_pointerlock()|0); + return 0; +} +function _EmscriptenMouseCallback($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $or$cond = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 272|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(272|0); + $3 = sp; + $4 = ($0|0)==(4); + $5 = HEAP32[5661]|0; + $6 = ($5|0)!=(0); + $or$cond = $4 & $6; + if (!($or$cond)) { + STACKTOP = sp;return 0; + } + (_emscripten_get_pointerlock_status(($3|0))|0); + $7 = HEAP32[$3>>2]|0; + $8 = ($7|0)==(0); + if ($8) { + (_emscripten_request_pointerlock((0|0),1)|0); + } else { + (_emscripten_exit_pointerlock()|0); + (_emscripten_get_pointerlock_status(($3|0))|0); + } + HEAP32[5661] = 0; + STACKTOP = sp;return 0; +} +function _EmscriptenTouchCallback($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $$byval_copy = 0, $$sink = 0, $$sroa$0$0$$sroa_idx = 0, $$sroa$03$0$$sroa_idx = 0, $$sroa$2$0$$sroa_idx2 = 0, $$sroa$24$0$$sroa_idx5 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0.0, $15 = 0, $16 = 0, $17 = 0.0, $18 = 0, $19 = 0, $20 = 0.0, $21 = 0, $22 = 0, $23 = 0.0; + var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0; + var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0.0, $48 = 0.0, $49 = 0.0, $5 = 0, $50 = 0, $51 = 0.0, $52 = 0.0, $53 = 0.0, $54 = 0, $55 = 0.0, $56 = 0.0, $57 = 0.0, $58 = 0, $59 = 0.0, $6 = 0; + var $60 = 0.0, $61 = 0.0, $7 = 0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(112|0); + $$byval_copy = sp + 56|0; + $3 = sp; + switch ($0|0) { + case 22: { + $$sink = 1; + label = 4; + break; + } + case 23: { + $$sink = 0; + label = 4; + break; + } + case 24: { + $$sink = 2; + label = 4; + break; + } + default: { + } + } + if ((label|0) == 4) { + HEAP32[$3>>2] = $$sink; + } + $4 = HEAP32[$1>>2]|0; + $5 = ((($3)) + 4|0); + HEAP32[$5>>2] = $4; + $6 = ((($1)) + 20|0); + $7 = HEAP32[$6>>2]|0; + $8 = ((($3)) + 8|0); + HEAP32[$8>>2] = $7; + $9 = ((($1)) + 72|0); + $10 = HEAP32[$9>>2]|0; + $11 = ((($3)) + 12|0); + HEAP32[$11>>2] = $10; + $12 = ((($1)) + 56|0); + $13 = HEAP32[$12>>2]|0; + $14 = (+($13|0)); + $15 = ((($1)) + 60|0); + $16 = HEAP32[$15>>2]|0; + $17 = (+($16|0)); + $$sroa$03$0$$sroa_idx = ((($3)) + 24|0); + HEAPF32[$$sroa$03$0$$sroa_idx>>2] = $14; + $$sroa$24$0$$sroa_idx5 = ((($3)) + 28|0); + HEAPF32[$$sroa$24$0$$sroa_idx5>>2] = $17; + $18 = ((($1)) + 108|0); + $19 = HEAP32[$18>>2]|0; + $20 = (+($19|0)); + $21 = ((($1)) + 112|0); + $22 = HEAP32[$21>>2]|0; + $23 = (+($22|0)); + $$sroa$0$0$$sroa_idx = ((($3)) + 32|0); + HEAPF32[$$sroa$0$0$$sroa_idx>>2] = $20; + $$sroa$2$0$$sroa_idx2 = ((($3)) + 36|0); + HEAPF32[$$sroa$2$0$$sroa_idx2>>2] = $23; + $24 = ((($3)) + 24|0); + $25 = $24; + $26 = $25; + $27 = HEAP32[$26>>2]|0; + $28 = (($25) + 4)|0; + $29 = $28; + $30 = HEAP32[$29>>2]|0; + $31 = 19536; + $32 = $31; + HEAP32[$32>>2] = $27; + $33 = (($31) + 4)|0; + $34 = $33; + HEAP32[$34>>2] = $30; + $35 = ((($3)) + 32|0); + $36 = $35; + $37 = $36; + $38 = HEAP32[$37>>2]|0; + $39 = (($36) + 4)|0; + $40 = $39; + $41 = HEAP32[$40>>2]|0; + $42 = (19544); + $43 = $42; + HEAP32[$43>>2] = $38; + $44 = (($42) + 4)|0; + $45 = $44; + HEAP32[$45>>2] = $41; + $46 = (_GetScreenWidth()|0); + $47 = (+($46|0)); + $48 = +HEAPF32[$24>>2]; + $49 = $48 / $47; + HEAPF32[$24>>2] = $49; + $50 = (_GetScreenHeight()|0); + $51 = (+($50|0)); + $52 = +HEAPF32[$$sroa$24$0$$sroa_idx5>>2]; + $53 = $52 / $51; + HEAPF32[$$sroa$24$0$$sroa_idx5>>2] = $53; + $54 = (_GetScreenWidth()|0); + $55 = (+($54|0)); + $56 = +HEAPF32[$35>>2]; + $57 = $56 / $55; + HEAPF32[$35>>2] = $57; + $58 = (_GetScreenHeight()|0); + $59 = (+($58|0)); + $60 = +HEAPF32[$$sroa$2$0$$sroa_idx2>>2]; + $61 = $60 / $59; + HEAPF32[$$sroa$2$0$$sroa_idx2>>2] = $61; + dest=$$byval_copy; src=$3; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _ProcessGestureEvent($$byval_copy); + STACKTOP = sp;return 1; +} +function _EmscriptenGamepadCallback($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $$sink = 0, $10 = 0, $11 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $3 = ((($1)) + 1296|0); + $4 = HEAP32[$3>>2]|0; + $5 = ($4|0)==(0); + if ($5) { + label = 3; + } else { + $6 = ((($1)) + 1300|0); + $7 = HEAP32[$6>>2]|0; + $8 = ($7|0)<(4); + if ($8) { + $$sink = 1; + } else { + label = 3; + } + } + if ((label|0) == 3) { + $$sink = 0; + } + $9 = ((($1)) + 1300|0); + $10 = HEAP32[$9>>2]|0; + $11 = (22680 + ($10<<2)|0); + HEAP32[$11>>2] = $$sink; + return 0; +} +function _SetTargetFPS($0) { + $0 = $0|0; + var $$ = 0.0, $$op = 0.0, $1 = 0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $vararg_buffer = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $vararg_buffer = sp; + $1 = ($0|0)<(1); + $2 = (+($0|0)); + $3 = 1.0 / $2; + $$ = $1 ? 0.0 : $3; + HEAPF64[2441] = $$; + $4 = $3; + $$op = $4 * 1000.0; + $5 = $$op; + $6 = $1 ? 0.0 : $5; + HEAPF64[$vararg_buffer>>3] = $6; + _TraceLog(0,9378,$vararg_buffer); + STACKTOP = sp;return; +} +function _LogoAnimation() { + var label = 0, sp = 0; + sp = STACKTOP; + HEAP32[5669] = 0; + return; +} +function _GetScreenWidth() { + var $0 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[5667]|0; + return ($0|0); +} +function _GetScreenHeight() { + var $0 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[5668]|0; + return ($0|0); +} +function _GetTime() { + var $0 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + $0 = (+_glfwGetTime()); + return (+$0); +} +function _ErrorCallback($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $vararg_buffer = 0, $vararg_ptr1 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $vararg_buffer = sp; + HEAP32[$vararg_buffer>>2] = $0; + $vararg_ptr1 = ((($vararg_buffer)) + 4|0); + HEAP32[$vararg_ptr1>>2] = $1; + _TraceLog(1,13403,$vararg_buffer); + STACKTOP = sp;return; +} +function _SetupFramebufferSize($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $$sink = 0, $$sink1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 0.0, $16 = 0, $17 = 0, $18 = 0.0, $19 = 0.0, $2 = 0, $20 = 0, $21 = 0, $22 = 0.0, $23 = 0, $24 = 0, $25 = 0, $26 = 0.0; + var $27 = 0, $28 = 0.0, $29 = 0.0, $3 = 0, $30 = 0, $31 = 0, $32 = 0.0, $33 = 0.0, $34 = 0.0, $35 = 0, $36 = 0.0, $37 = 0, $38 = 0.0, $39 = 0.0, $4 = 0, $40 = 0, $41 = 0.0, $42 = 0, $43 = 0, $44 = 0.0; + var $45 = 0, $46 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0.0, $9 = 0, $or$cond = 0, $roundf = 0.0, $roundf38 = 0.0, $roundf39 = 0.0, $roundf40 = 0.0, $vararg_buffer = 0, $vararg_buffer4 = 0, $vararg_buffer8 = 0, $vararg_ptr1 = 0, $vararg_ptr11 = 0, $vararg_ptr12 = 0, $vararg_ptr13 = 0, $vararg_ptr2 = 0; + var $vararg_ptr3 = 0, $vararg_ptr7 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(112|0); + $vararg_buffer8 = sp + 24|0; + $vararg_buffer4 = sp + 16|0; + $vararg_buffer = sp; + $2 = sp + 40|0; + $3 = HEAP32[5667]|0; + $4 = ($3|0)>($0|0); + if (!($4)) { + $5 = HEAP32[5668]|0; + $6 = ($5|0)>($1|0); + if (!($6)) { + $30 = ($3|0)<($0|0); + $31 = ($5|0)<($1|0); + $or$cond = $30 | $31; + if (!($or$cond)) { + HEAP32[5693] = $3; + HEAP32[5694] = $5; + HEAP32[5695] = 0; + HEAP32[5696] = 0; + STACKTOP = sp;return; + } + HEAP32[$vararg_buffer8>>2] = $3; + $vararg_ptr11 = ((($vararg_buffer8)) + 4|0); + HEAP32[$vararg_ptr11>>2] = $5; + $vararg_ptr12 = ((($vararg_buffer8)) + 8|0); + HEAP32[$vararg_ptr12>>2] = $0; + $vararg_ptr13 = ((($vararg_buffer8)) + 12|0); + HEAP32[$vararg_ptr13>>2] = $1; + _TraceLog(0,13337,$vararg_buffer8); + $32 = (+($0|0)); + $33 = (+($1|0)); + $34 = $32 / $33; + $35 = HEAP32[5667]|0; + $36 = (+($35|0)); + $37 = HEAP32[5668]|0; + $38 = (+($37|0)); + $39 = $36 / $38; + $40 = !($34 <= $39); + if ($40) { + $44 = $34 * $38; + $roundf = (+_roundf((+$44))); + $45 = (~~(($roundf))); + HEAP32[5693] = $45; + HEAP32[5694] = $37; + $46 = (($45) - ($35))|0; + HEAP32[5695] = $46; + $$sink1 = 0; + } else { + HEAP32[5693] = $35; + $41 = $36 / $34; + $roundf38 = (+_roundf((+$41))); + $42 = (~~(($roundf38))); + HEAP32[5694] = $42; + HEAP32[5695] = 0; + $43 = (($42) - ($37))|0; + $$sink1 = $43; + } + HEAP32[5696] = $$sink1; + STACKTOP = sp;return; + } + } + $7 = HEAP32[5668]|0; + HEAP32[$vararg_buffer>>2] = $3; + $vararg_ptr1 = ((($vararg_buffer)) + 4|0); + HEAP32[$vararg_ptr1>>2] = $7; + $vararg_ptr2 = ((($vararg_buffer)) + 8|0); + HEAP32[$vararg_ptr2>>2] = $0; + $vararg_ptr3 = ((($vararg_buffer)) + 12|0); + HEAP32[$vararg_ptr3>>2] = $1; + _TraceLog(1,13194,$vararg_buffer); + $8 = (+($0|0)); + $9 = HEAP32[5667]|0; + $10 = (+($9|0)); + $11 = $8 / $10; + $12 = (+($1|0)); + $13 = HEAP32[5668]|0; + $14 = (+($13|0)); + $15 = $12 / $14; + $16 = !($11 <= $15); + if ($16) { + $22 = $10 * $15; + $roundf39 = (+_roundf((+$22))); + $23 = (~~(($roundf39))); + HEAP32[5693] = $23; + HEAP32[5694] = $1; + $24 = (($0) - ($23))|0; + HEAP32[5695] = $24; + $$sink = 0; + } else { + HEAP32[5693] = $0; + $17 = HEAP32[5668]|0; + $18 = (+($17|0)); + $19 = $11 * $18; + $roundf40 = (+_roundf((+$19))); + $20 = (~~(($roundf40))); + HEAP32[5694] = $20; + HEAP32[5695] = 0; + $21 = (($1) - ($20))|0; + $$sink = $21; + } + HEAP32[5696] = $$sink; + $25 = HEAP32[5693]|0; + $26 = (+($25|0)); + $27 = HEAP32[5667]|0; + $28 = (+($27|0)); + $29 = $26 / $28; + _MatrixScale($2,$29,$29,$29); + dest=22696; src=$2; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + HEAP32[5693] = $0; + HEAP32[5694] = $1; + HEAP32[$vararg_buffer4>>2] = $0; + $vararg_ptr7 = ((($vararg_buffer4)) + 4|0); + HEAP32[$vararg_ptr7>>2] = $1; + _TraceLog(1,13272,$vararg_buffer4); + STACKTOP = sp;return; +} +function _WindowSizeCallback($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $3 = 0.0, $4 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + _rlViewport(0,0,$1,$2); + _rlMatrixMode(5889); + _rlLoadIdentity(); + $3 = (+($1|0)); + $4 = (+($2|0)); + _rlOrtho(0.0,$3,$4,0.0,0.0,1.0); + _rlMatrixMode(5888); + _rlLoadIdentity(); + _rlClearScreenBuffers(); + HEAP32[5667] = $1; + HEAP32[5668] = $2; + HEAP32[5693] = $1; + HEAP32[5694] = $2; + return; +} +function _CursorEnterCallback($0,$1) { + $0 = $0|0; + $1 = $1|0; + var label = 0, sp = 0; + sp = STACKTOP; + return; +} +function _KeyCallback($0,$1,$2,$3,$4) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + $4 = $4|0; + var $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, label = 0, sp = 0; + sp = STACKTOP; + $5 = HEAP32[940]|0; + $6 = ($5|0)==($1|0); + $7 = ($3|0)==(1); + $or$cond = $7 & $6; + if ($or$cond) { + _glfwSetWindowShouldClose(($0|0),1); + return; + } + $8 = $3&255; + $9 = (23583 + ($1)|0); + HEAP8[$9>>0] = $8; + if (!($7)) { + return; + } + HEAP32[939] = $1; + return; +} +function _MouseButtonCallback($0,$1,$2,$3) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + var $$byval_copy = 0, $$sink = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0.0, $27 = 0.0; + var $28 = 0.0, $29 = 0, $30 = 0.0, $31 = 0, $32 = 0.0, $33 = 0.0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(128|0); + $$byval_copy = sp + 64|0; + $4 = sp + 8|0; + $5 = sp; + $6 = $2&255; + $7 = (23577 + ($1)|0); + HEAP8[$7>>0] = $6; + $8 = (_IsMouseButtonPressed(0)|0); + $9 = ($8|0)==(0); + if ($9) { + $10 = (_IsMouseButtonReleased(0)|0); + $11 = ($10|0)==(0); + if (!($11)) { + $$sink = 0; + label = 3; + } + } else { + $$sink = 1; + label = 3; + } + if ((label|0) == 3) { + HEAP32[$4>>2] = $$sink; + } + $12 = ((($4)) + 8|0); + HEAP32[$12>>2] = 0; + $13 = ((($4)) + 4|0); + HEAP32[$13>>2] = 1; + $14 = ((($4)) + 24|0); + _GetMousePosition($5); + $15 = $5; + $16 = $15; + $17 = HEAP32[$16>>2]|0; + $18 = (($15) + 4)|0; + $19 = $18; + $20 = HEAP32[$19>>2]|0; + $21 = $14; + $22 = $21; + HEAP32[$22>>2] = $17; + $23 = (($21) + 4)|0; + $24 = $23; + HEAP32[$24>>2] = $20; + $25 = (_GetScreenWidth()|0); + $26 = (+($25|0)); + $27 = +HEAPF32[$14>>2]; + $28 = $27 / $26; + HEAPF32[$14>>2] = $28; + $29 = (_GetScreenHeight()|0); + $30 = (+($29|0)); + $31 = ((($4)) + 28|0); + $32 = +HEAPF32[$31>>2]; + $33 = $32 / $30; + HEAPF32[$31>>2] = $33; + dest=$$byval_copy; src=$4; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _ProcessGestureEvent($$byval_copy); + STACKTOP = sp;return; +} +function _MouseCursorPosCallback($0,$1,$2) { + $0 = $0|0; + $1 = +$1; + $2 = +$2; + var $$byval_copy = 0, $$sroa$0$0$$sroa_idx = 0, $$sroa$2$0$$sroa_idx1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0.0, $21 = 0.0, $22 = 0.0, $23 = 0, $24 = 0.0, $25 = 0.0, $26 = 0.0; + var $3 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 112|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(112|0); + $$byval_copy = sp + 56|0; + $3 = sp; + HEAP32[$3>>2] = 2; + $4 = ((($3)) + 8|0); + HEAP32[$4>>2] = 0; + $5 = ((($3)) + 4|0); + HEAP32[$5>>2] = 1; + $6 = $1; + $7 = $2; + $$sroa$0$0$$sroa_idx = ((($3)) + 24|0); + HEAPF32[$$sroa$0$0$$sroa_idx>>2] = $6; + $$sroa$2$0$$sroa_idx1 = ((($3)) + 28|0); + HEAPF32[$$sroa$2$0$$sroa_idx1>>2] = $7; + $8 = ((($3)) + 24|0); + $9 = $8; + $10 = $9; + $11 = HEAP32[$10>>2]|0; + $12 = (($9) + 4)|0; + $13 = $12; + $14 = HEAP32[$13>>2]|0; + $15 = 19536; + $16 = $15; + HEAP32[$16>>2] = $11; + $17 = (($15) + 4)|0; + $18 = $17; + HEAP32[$18>>2] = $14; + $19 = (_GetScreenWidth()|0); + $20 = (+($19|0)); + $21 = +HEAPF32[$8>>2]; + $22 = $21 / $20; + HEAPF32[$8>>2] = $22; + $23 = (_GetScreenHeight()|0); + $24 = (+($23|0)); + $25 = +HEAPF32[$$sroa$2$0$$sroa_idx1>>2]; + $26 = $25 / $24; + HEAPF32[$$sroa$2$0$$sroa_idx1>>2] = $26; + dest=$$byval_copy; src=$3; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _ProcessGestureEvent($$byval_copy); + STACKTOP = sp;return; +} +function _CharCallback($0,$1) { + $0 = $0|0; + $1 = $1|0; + var label = 0, sp = 0; + sp = STACKTOP; + HEAP32[939] = $1; + return; +} +function _ScrollCallback($0,$1,$2) { + $0 = $0|0; + $1 = +$1; + $2 = +$2; + var $3 = 0, label = 0, sp = 0; + sp = STACKTOP; + $3 = (~~(($2))); + HEAP32[5699] = $3; + return; +} +function _WindowIconifyCallback($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $$sink = 0, $2 = 0, label = 0, sp = 0; + sp = STACKTOP; + $2 = ($1|0)!=(0); + $$sink = $2&1; + HEAP32[5698] = $$sink; + return; +} +function _rlglInit($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $$06066 = 0, $$06167 = 0, $$06268 = 0, $$063 = 0, $$sink64 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0; + var $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0; + var $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0, $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0; + var $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0, $71 = 0, $72 = 0.0, $73 = 0.0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0; + var $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $9 = 0, $exitcond = 0, $exitcond70 = 0, $exitcond71 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer10 = 0, $vararg_buffer13 = 0, $vararg_buffer15 = 0, $vararg_buffer17 = 0; + var $vararg_buffer19 = 0, $vararg_buffer21 = 0, $vararg_buffer23 = 0, $vararg_buffer25 = 0, $vararg_buffer27 = 0, $vararg_buffer29 = 0, $vararg_buffer31 = 0, $vararg_buffer34 = 0, $vararg_buffer36 = 0, $vararg_buffer39 = 0, $vararg_buffer4 = 0, $vararg_buffer41 = 0, $vararg_buffer7 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 2464|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(2464|0); + $vararg_buffer41 = sp + 2184|0; + $vararg_buffer39 = sp + 2176|0; + $vararg_buffer36 = sp + 2168|0; + $vararg_buffer34 = sp + 2160|0; + $vararg_buffer31 = sp + 2152|0; + $vararg_buffer29 = sp + 2144|0; + $vararg_buffer27 = sp + 2136|0; + $vararg_buffer25 = sp + 2128|0; + $vararg_buffer23 = sp + 2120|0; + $vararg_buffer21 = sp + 2112|0; + $vararg_buffer19 = sp + 2104|0; + $vararg_buffer17 = sp + 2096|0; + $vararg_buffer15 = sp + 2088|0; + $vararg_buffer13 = sp + 2080|0; + $vararg_buffer10 = sp + 2072|0; + $vararg_buffer7 = sp + 24|0; + $vararg_buffer4 = sp + 16|0; + $vararg_buffer1 = sp + 8|0; + $vararg_buffer = sp; + $2 = sp + 2400|0; + $3 = sp + 2384|0; + $4 = sp + 2320|0; + $5 = sp + 2256|0; + $6 = sp + 2192|0; + $7 = (_glGetString(7936)|0); + HEAP32[$vararg_buffer>>2] = $7; + _TraceLog(0,9817,$vararg_buffer); + $8 = (_glGetString(7937)|0); + HEAP32[$vararg_buffer1>>2] = $8; + _TraceLog(0,9835,$vararg_buffer1); + $9 = (_glGetString(7938)|0); + HEAP32[$vararg_buffer4>>2] = $9; + _TraceLog(0,9853,$vararg_buffer4); + $10 = (_glGetString(35724)|0); + HEAP32[$vararg_buffer7>>2] = $10; + _TraceLog(0,9871,$vararg_buffer7); + $11 = (_glGetString(7939)|0); + $12 = (_strlen($11)|0); + $13 = (($12) + 1)|0; + $14 = (_malloc($13)|0); + _memcpy(($14|0),($11|0),($13|0))|0; + $$063 = 0;$$sink64 = $14; + while(1) { + $15 = (_strtok($$sink64,9889)|0); + $16 = (($vararg_buffer7) + ($$063<<2)|0); + HEAP32[$16>>2] = $15; + $17 = ($15|0)==(0|0); + $18 = (($$063) + 1)|0; + if ($17) { + break; + } else { + $$063 = $18;$$sink64 = 0; + } + } + _free($14); + $19 = (($$063) + -1)|0; + HEAP32[$vararg_buffer10>>2] = $19; + _TraceLog(0,9891,$vararg_buffer10); + $20 = ($$063|0)>(1); + if ($20) { + $$06268 = 0; + while(1) { + $23 = (($vararg_buffer7) + ($$06268<<2)|0); + $24 = HEAP32[$23>>2]|0; + $25 = (_strcmp($24,9926)|0); + $26 = ($25|0)==(0); + if ($26) { + HEAP32[5259] = 1; + $27 = (_eglGetProcAddress((9953|0))|0); + HEAP32[5633] = $27; + $28 = (_eglGetProcAddress((9974|0))|0); + HEAP32[5260] = $28; + $29 = (_eglGetProcAddress((9995|0))|0); + HEAP32[5648] = $29; + } + $30 = (_strcmp($24,10019)|0); + $31 = ($30|0)==(0); + if ($31) { + HEAP32[5166] = 1; + } + $32 = (_strcmp($24,10039)|0); + $33 = ($32|0)==(0); + if ($33) { + HEAP32[5165] = 1; + } + $34 = (_strcmp($24,10057)|0); + $35 = ($34|0)==(0); + if ($35) { + label = 14; + } else { + $36 = HEAP32[$23>>2]|0; + $37 = (_strcmp($36,10089)|0); + $38 = ($37|0)==(0); + if ($38) { + label = 14; + } else { + $39 = (_strcmp($36,10122)|0); + $40 = ($39|0)==(0); + if ($40) { + label = 14; + } + } + } + if ((label|0) == 14) { + label = 0; + HEAP32[5160] = 1; + } + $41 = HEAP32[$23>>2]|0; + $42 = (_strcmp($41,10162)|0); + $43 = ($42|0)==(0); + if ($43) { + label = 17; + } else { + $44 = (_strcmp($41,10198)|0); + $45 = ($44|0)==(0); + if ($45) { + label = 17; + } + } + if ((label|0) == 17) { + label = 0; + HEAP32[5161] = 1; + } + $46 = (_strcmp($41,10231)|0); + $47 = ($46|0)==(0); + if ($47) { + HEAP32[5162] = 1; + } + $48 = HEAP32[$23>>2]|0; + $49 = (_strcmp($48,10256)|0); + $50 = ($49|0)==(0); + if ($50) { + HEAP32[5163] = 1; + } + $51 = (_strcmp($48,10289)|0); + $52 = ($51|0)==(0); + if ($52) { + HEAP32[5164] = 1; + } + $53 = (_strcmp($48,10325)|0); + $54 = ($53|0)==(0); + if ($54) { + HEAP32[5697] = 1; + _glGetFloatv(34047,(20672|0)); + } + $55 = (_strcmp($48,10359)|0); + $56 = ($55|0)==(0); + if ($56) { + HEAP32[5167] = 1; + } + $57 = (($$06268) + 1)|0; + $exitcond71 = ($57|0)==($19|0); + if ($exitcond71) { + break; + } else { + $$06268 = $57; + } + } + } + $21 = HEAP32[5259]|0; + $22 = ($21|0)==(0); + if ($22) { + _TraceLog(1,10462,$vararg_buffer15); + } else { + _TraceLog(0,10387,$vararg_buffer13); + } + $58 = HEAP32[5166]|0; + $59 = ($58|0)==(0); + if ($59) { + _TraceLog(1,10598,$vararg_buffer19); + } else { + _TraceLog(0,10523,$vararg_buffer17); + } + $60 = HEAP32[5160]|0; + $61 = ($60|0)==(0); + if (!($61)) { + _TraceLog(0,10690,$vararg_buffer21); + } + $62 = HEAP32[5161]|0; + $63 = ($62|0)==(0); + if (!($63)) { + _TraceLog(0,10736,$vararg_buffer23); + } + $64 = HEAP32[5162]|0; + $65 = ($64|0)==(0); + if (!($65)) { + _TraceLog(0,10783,$vararg_buffer25); + } + $66 = HEAP32[5163]|0; + $67 = ($66|0)==(0); + if (!($67)) { + _TraceLog(0,10834,$vararg_buffer27); + } + $68 = HEAP32[5164]|0; + $69 = ($68|0)==(0); + if (!($69)) { + _TraceLog(0,10881,$vararg_buffer29); + } + $70 = HEAP32[5697]|0; + $71 = ($70|0)==(0); + if (!($71)) { + $72 = +HEAPF32[5168]; + $73 = $72; + HEAPF64[$vararg_buffer31>>3] = $73; + _TraceLog(0,10928,$vararg_buffer31); + } + $74 = HEAP32[5167]|0; + $75 = ($74|0)==(0); + if (!($75)) { + _TraceLog(0,10994,$vararg_buffer34); + } + HEAP32[$vararg_buffer10>>2] = -1; + $76 = (_rlglLoadTexture($vararg_buffer10,1,1,7,1)|0); + HEAP32[5219] = $76; + $77 = ($76|0)==(0); + if ($77) { + _TraceLog(1,11098,$vararg_buffer39); + } else { + HEAP32[$vararg_buffer36>>2] = $76; + _TraceLog(0,11047,$vararg_buffer36); + } + _LoadDefaultShader($2); + dest=22536; src=$2; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=20980; src=$2; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _LoadDefaultBuffers(); + $78 = (_malloc(49152)|0); + HEAP32[5628] = $78; + $$06167 = 0; + while(1) { + $80 = HEAP32[5628]|0; + $81 = (($80) + (($$06167*12)|0)|0); + _VectorZero($3); + ;HEAP32[$81>>2]=HEAP32[$3>>2]|0;HEAP32[$81+4>>2]=HEAP32[$3+4>>2]|0;HEAP32[$81+8>>2]=HEAP32[$3+8>>2]|0; + $82 = (($$06167) + 1)|0; + $exitcond70 = ($82|0)==(4096); + if ($exitcond70) { + break; + } else { + $$06167 = $82; + } + } + $79 = (_malloc(36864)|0); + HEAP32[5220] = $79; + $$06066 = 0; + while(1) { + $83 = (((($79) + (($$06066*144)|0)|0)) + 8|0); + HEAP32[$83>>2] = 0; + $84 = (($79) + (($$06066*144)|0)|0); + HEAP32[$84>>2] = 0; + $85 = (($$06066) + 1)|0; + $exitcond = ($85|0)==(256); + if ($exitcond) { + break; + } else { + $$06066 = $85; + } + } + HEAP32[5218] = 1; + $86 = HEAP32[5219]|0; + $87 = ((($79)) + 8|0); + HEAP32[$87>>2] = $86; + HEAP32[5629] = 4; + _MatrixIdentity($4); + dest=21476; src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($4); + dest=(21540); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($4); + dest=(21604); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($4); + dest=(21668); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($4); + dest=(21732); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($4); + dest=(21796); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($4); + dest=(21860); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($4); + dest=(21924); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($4); + dest=(21988); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($4); + dest=(22052); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($4); + dest=(22116); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($4); + dest=(22180); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($4); + dest=(22244); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($4); + dest=(22308); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($4); + dest=(22372); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($4); + dest=(22436); src=$4; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($5); + dest=20740; src=$5; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixIdentity($6); + dest=20804; src=$6; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + HEAP32[5625] = 20804; + _glDepthFunc(515); + _glDisable(2929); + _glBlendFunc(770,771); + _glEnable(3042); + _glCullFace(1029); + _glFrontFace(2305); + _glEnable(2884); + _glClearColor(0.0,0.0,0.0,1.0); + _glClearDepthf(1.0); + _glClear(16640); + HEAP32[5277] = $0; + HEAP32[5278] = $1; + _TraceLog(0,11137,$vararg_buffer41); + STACKTOP = sp;return; +} +function _SetupViewport() { + var $0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[5695]|0; + $1 = (($0|0) / 2)&-1; + $2 = HEAP32[5696]|0; + $3 = (($2|0) / 2)&-1; + $4 = HEAP32[5693]|0; + $5 = (($4) - ($0))|0; + $6 = HEAP32[5694]|0; + $7 = (($6) - ($2))|0; + _rlViewport($1,$3,$5,$7); + return; +} +function _rlMatrixMode($0) { + $0 = $0|0; + var $modelview$sink = 0, label = 0, sp = 0; + sp = STACKTOP; + switch ($0|0) { + case 5889: { + $modelview$sink = 20740; + label = 3; + break; + } + case 5888: { + $modelview$sink = 20804; + label = 3; + break; + } + default: { + } + } + if ((label|0) == 3) { + HEAP32[5625] = $modelview$sink; + } + HEAP32[5630] = $0; + return; +} +function _rlOrtho($0,$1,$2,$3,$4,$5) { + $0 = +$0; + $1 = +$1; + $2 = +$2; + $3 = +$3; + $4 = +$4; + $5 = +$5; + var $$byval_copy = 0, $$byval_copy1 = 0, $6 = 0, $7 = 0, $8 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 256|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(256|0); + $$byval_copy1 = sp + 192|0; + $$byval_copy = sp + 128|0; + $6 = sp + 64|0; + $7 = sp; + _MatrixOrtho($6,$0,$1,$2,$3,$4,$5); + _MatrixTranspose($6); + $8 = HEAP32[5625]|0; + dest=$$byval_copy; src=$8; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$$byval_copy1; src=$6; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixMultiply($7,$$byval_copy,$$byval_copy1); + dest=$8; src=$7; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + STACKTOP = sp;return; +} +function _ClearBackground($0) { + $0 = $0|0; + var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = HEAP8[$0>>0]|0; + $2 = ((($0)) + 1|0); + $3 = HEAP8[$2>>0]|0; + $4 = ((($0)) + 2|0); + $5 = HEAP8[$4>>0]|0; + $6 = ((($0)) + 3|0); + $7 = HEAP8[$6>>0]|0; + _rlClearColor($1,$3,$5,$7); + return; +} +function _rlClearColor($0,$1,$2,$3) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + var $10 = 0.0, $11 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + $4 = (+($0&255)); + $5 = $4 / 255.0; + $6 = (+($1&255)); + $7 = $6 / 255.0; + $8 = (+($2&255)); + $9 = $8 / 255.0; + $10 = (+($3&255)); + $11 = $10 / 255.0; + _glClearColor((+$5),(+$7),(+$9),(+$11)); + return; +} +function _LoadDefaultShader($0) { + $0 = $0|0; + var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 1008|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(1008|0); + $vararg_buffer1 = sp + 8|0; + $vararg_buffer = sp; + $1 = sp + 16|0; + $2 = sp + 513|0; + $3 = sp + 72|0; + _memcpy(($2|0),(11713|0),489)|0; + _memcpy(($3|0),(12202|0),441)|0; + $4 = (_LoadShaderProgram($2,$3)|0); + HEAP32[$1>>2] = $4; + $5 = ($4|0)==(0); + if ($5) { + HEAP32[$vararg_buffer1>>2] = $4; + _TraceLog(1,12691,$vararg_buffer1); + } else { + HEAP32[$vararg_buffer>>2] = $4; + _TraceLog(0,12643,$vararg_buffer); + } + $6 = HEAP32[$1>>2]|0; + $7 = ($6|0)==(0); + if (!($7)) { + _LoadDefaultShaderLocations($1); + } + dest=$0; src=$1; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + STACKTOP = sp;return; +} +function _LoadDefaultBuffers() { + var $$05365 = 0, $$05467 = 0, $$05770 = 0, $$05972 = 0, $$066 = 0, $0 = 0, $1 = 0, $10 = 0, $100 = 0, $101 = 0, $102 = 0, $103 = 0, $104 = 0, $105 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0; + var $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0; + var $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0, $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $50 = 0, $51 = 0, $52 = 0; + var $53 = 0, $54 = 0, $55 = 0, $56 = 0, $57 = 0, $58 = 0, $59 = 0, $6 = 0, $60 = 0, $61 = 0, $62 = 0, $63 = 0, $64 = 0, $65 = 0, $66 = 0, $67 = 0, $68 = 0, $69 = 0, $7 = 0, $70 = 0; + var $71 = 0, $72 = 0, $73 = 0, $74 = 0, $75 = 0, $76 = 0, $77 = 0, $78 = 0, $79 = 0, $8 = 0, $80 = 0, $81 = 0, $82 = 0, $83 = 0, $84 = 0, $85 = 0, $86 = 0, $87 = 0, $88 = 0, $89 = 0; + var $9 = 0, $90 = 0, $91 = 0, $92 = 0, $93 = 0, $94 = 0, $95 = 0, $96 = 0, $97 = 0, $98 = 0, $99 = 0, $exitcond = 0, $exitcond75 = 0, $exitcond78 = 0, $exitcond80 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer10 = 0, $vararg_buffer14 = 0, $vararg_buffer17 = 0; + var $vararg_buffer3 = 0, $vararg_buffer7 = 0, $vararg_ptr13 = 0, $vararg_ptr20 = 0, $vararg_ptr21 = 0, $vararg_ptr22 = 0, $vararg_ptr6 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $vararg_buffer17 = sp + 48|0; + $vararg_buffer14 = sp + 40|0; + $vararg_buffer10 = sp + 32|0; + $vararg_buffer7 = sp + 24|0; + $vararg_buffer3 = sp + 16|0; + $vararg_buffer1 = sp + 8|0; + $vararg_buffer = sp; + $0 = (_malloc(24576)|0); + HEAP32[(20896)>>2] = $0; + $1 = (_malloc(8192)|0); + HEAP32[(20904)>>2] = $1; + HEAP32[(20900)>>2] = 0; + HEAP32[(20908)>>2] = 0; + _memset(($0|0),0,24576)|0; + $$05972 = 0; + while(1) { + $2 = HEAP32[(20904)>>2]|0; + $3 = (($2) + ($$05972)|0); + HEAP8[$3>>0] = 0; + $4 = (($$05972) + 1)|0; + $exitcond80 = ($4|0)==(8192); + if ($exitcond80) { + break; + } else { + $$05972 = $4; + } + } + HEAP32[5221] = 0; + HEAP32[(20892)>>2] = 0; + HEAP32[(20888)>>2] = 0; + $5 = (_malloc(73728)|0); + HEAP32[(20944)>>2] = $5; + $6 = (_malloc(24576)|0); + HEAP32[(20952)>>2] = $6; + HEAP32[(20948)>>2] = 0; + HEAP32[(20956)>>2] = 0; + _memset(($5|0),0,73728)|0; + $$05770 = 0; + while(1) { + $7 = HEAP32[(20952)>>2]|0; + $8 = (($7) + ($$05770)|0); + HEAP8[$8>>0] = 0; + $9 = (($$05770) + 1)|0; + $exitcond78 = ($9|0)==(24576); + if ($exitcond78) { + break; + } else { + $$05770 = $9; + } + } + HEAP32[5233] = 0; + HEAP32[(20940)>>2] = 0; + HEAP32[(20936)>>2] = 0; + $10 = (_malloc(49152)|0); + HEAP32[(20704)>>2] = $10; + $11 = (_malloc(32768)|0); + HEAP32[(20708)>>2] = $11; + $12 = (_malloc(16384)|0); + HEAP32[(20712)>>2] = $12; + $13 = (_malloc(12288)|0); + HEAP32[(20716)>>2] = $13; + $14 = HEAP32[(20704)>>2]|0; + _memset(($14|0),0,49152)|0; + $15 = HEAP32[(20708)>>2]|0; + _memset(($15|0),0,32768)|0; + $$05467 = 0; + while(1) { + $17 = HEAP32[(20712)>>2]|0; + $18 = (($17) + ($$05467)|0); + HEAP8[$18>>0] = 0; + $19 = (($$05467) + 1)|0; + $exitcond75 = ($19|0)==(16384); + if ($exitcond75) { + break; + } else { + $$05467 = $19; + } + } + $16 = HEAP32[(20716)>>2]|0; + $$05365 = 0;$$066 = 0; + while(1) { + $22 = $$05365 << 2; + $23 = $22&65535; + $24 = (($16) + ($$066<<1)|0); + HEAP16[$24>>1] = $23; + $25 = $22 | 1; + $26 = $25&65535; + $27 = $$066 | 1; + $28 = (($16) + ($27<<1)|0); + HEAP16[$28>>1] = $26; + $29 = $22 | 2; + $30 = $29&65535; + $31 = (($$066) + 2)|0; + $32 = (($16) + ($31<<1)|0); + HEAP16[$32>>1] = $30; + $33 = (($$066) + 3)|0; + $34 = (($16) + ($33<<1)|0); + HEAP16[$34>>1] = $23; + $35 = (($$066) + 4)|0; + $36 = (($16) + ($35<<1)|0); + HEAP16[$36>>1] = $30; + $37 = $22 | 3; + $38 = $37&65535; + $39 = (($$066) + 5)|0; + $40 = (($16) + ($39<<1)|0); + HEAP16[$40>>1] = $38; + $41 = (($$05365) + 1)|0; + $42 = (($$066) + 6)|0; + $exitcond = ($41|0)==(1024); + if ($exitcond) { + break; + } else { + $$05365 = $41;$$066 = $42; + } + } + HEAP32[5173] = 0; + HEAP32[(20696)>>2] = 0; + HEAP32[(20700)>>2] = 0; + _TraceLog(0,11184,$vararg_buffer); + $20 = HEAP32[5259]|0; + $21 = ($20|0)==(0); + if (!($21)) { + $43 = HEAP32[5633]|0; + FUNCTION_TABLE_vii[$43 & 63](1,(20912)); + $44 = HEAP32[5260]|0; + $45 = HEAP32[(20912)>>2]|0; + FUNCTION_TABLE_vi[$44 & 31]($45); + } + _glGenBuffers(2,((20916)|0)); + $46 = HEAP32[(20916)>>2]|0; + _glBindBuffer(34962,($46|0)); + $47 = HEAP32[(20896)>>2]|0; + _glBufferData(34962,24576,($47|0),35048); + $48 = HEAP32[(20984)>>2]|0; + _glEnableVertexAttribArray(($48|0)); + $49 = HEAP32[(20984)>>2]|0; + _glVertexAttribPointer(($49|0),3,5126,0,0,(0|0)); + _glGenBuffers(2,((20920)|0)); + $50 = HEAP32[(20920)>>2]|0; + _glBindBuffer(34962,($50|0)); + $51 = HEAP32[(20904)>>2]|0; + _glBufferData(34962,8192,($51|0),35048); + $52 = HEAP32[(21004)>>2]|0; + _glEnableVertexAttribArray(($52|0)); + $53 = HEAP32[(21004)>>2]|0; + _glVertexAttribPointer(($53|0),4,5121,1,0,(0|0)); + $54 = HEAP32[5259]|0; + $55 = ($54|0)==(0); + if ($55) { + $57 = HEAP32[(20916)>>2]|0; + $58 = HEAP32[(20920)>>2]|0; + HEAP32[$vararg_buffer3>>2] = $57; + $vararg_ptr6 = ((($vararg_buffer3)) + 4|0); + HEAP32[$vararg_ptr6>>2] = $58; + _TraceLog(0,11322,$vararg_buffer3); + } else { + $56 = HEAP32[(20912)>>2]|0; + HEAP32[$vararg_buffer1>>2] = $56; + _TraceLog(0,11257,$vararg_buffer1); + } + $59 = HEAP32[5259]|0; + $60 = ($59|0)==(0); + if (!($60)) { + $61 = HEAP32[5633]|0; + FUNCTION_TABLE_vii[$61 & 63](1,(20960)); + $62 = HEAP32[5260]|0; + $63 = HEAP32[(20960)>>2]|0; + FUNCTION_TABLE_vi[$62 & 31]($63); + } + _glGenBuffers(1,((20964)|0)); + $64 = HEAP32[(20964)>>2]|0; + _glBindBuffer(34962,($64|0)); + $65 = HEAP32[(20944)>>2]|0; + _glBufferData(34962,73728,($65|0),35048); + $66 = HEAP32[(20984)>>2]|0; + _glEnableVertexAttribArray(($66|0)); + $67 = HEAP32[(20984)>>2]|0; + _glVertexAttribPointer(($67|0),3,5126,0,0,(0|0)); + _glGenBuffers(1,((20968)|0)); + $68 = HEAP32[(20968)>>2]|0; + _glBindBuffer(34962,($68|0)); + $69 = HEAP32[(20952)>>2]|0; + _glBufferData(34962,24576,($69|0),35048); + $70 = HEAP32[(21004)>>2]|0; + _glEnableVertexAttribArray(($70|0)); + $71 = HEAP32[(21004)>>2]|0; + _glVertexAttribPointer(($71|0),4,5121,1,0,(0|0)); + $72 = HEAP32[5259]|0; + $73 = ($72|0)==(0); + if ($73) { + $75 = HEAP32[(20964)>>2]|0; + $76 = HEAP32[(20968)>>2]|0; + HEAP32[$vararg_buffer10>>2] = $75; + $vararg_ptr13 = ((($vararg_buffer10)) + 4|0); + HEAP32[$vararg_ptr13>>2] = $76; + _TraceLog(0,11468,$vararg_buffer10); + } else { + $74 = HEAP32[(20960)>>2]|0; + HEAP32[$vararg_buffer7>>2] = $74; + _TraceLog(0,11399,$vararg_buffer7); + } + $77 = HEAP32[5259]|0; + $78 = ($77|0)==(0); + if (!($78)) { + $79 = HEAP32[5633]|0; + FUNCTION_TABLE_vii[$79 & 63](1,(20720)); + $80 = HEAP32[5260]|0; + $81 = HEAP32[(20720)>>2]|0; + FUNCTION_TABLE_vi[$80 & 31]($81); + } + _glGenBuffers(1,((20724)|0)); + $82 = HEAP32[(20724)>>2]|0; + _glBindBuffer(34962,($82|0)); + $83 = HEAP32[(20704)>>2]|0; + _glBufferData(34962,49152,($83|0),35048); + $84 = HEAP32[(20984)>>2]|0; + _glEnableVertexAttribArray(($84|0)); + $85 = HEAP32[(20984)>>2]|0; + _glVertexAttribPointer(($85|0),3,5126,0,0,(0|0)); + _glGenBuffers(1,((20728)|0)); + $86 = HEAP32[(20728)>>2]|0; + _glBindBuffer(34962,($86|0)); + $87 = HEAP32[(20708)>>2]|0; + _glBufferData(34962,32768,($87|0),35048); + $88 = HEAP32[(20988)>>2]|0; + _glEnableVertexAttribArray(($88|0)); + $89 = HEAP32[(20988)>>2]|0; + _glVertexAttribPointer(($89|0),2,5126,0,0,(0|0)); + _glGenBuffers(1,((20732)|0)); + $90 = HEAP32[(20732)>>2]|0; + _glBindBuffer(34962,($90|0)); + $91 = HEAP32[(20712)>>2]|0; + _glBufferData(34962,16384,($91|0),35048); + $92 = HEAP32[(21004)>>2]|0; + _glEnableVertexAttribArray(($92|0)); + $93 = HEAP32[(21004)>>2]|0; + _glVertexAttribPointer(($93|0),4,5121,1,0,(0|0)); + _glGenBuffers(1,((20736)|0)); + $94 = HEAP32[(20736)>>2]|0; + _glBindBuffer(34963,($94|0)); + $95 = HEAP32[(20716)>>2]|0; + _glBufferData(34963,12288,($95|0),35044); + $96 = HEAP32[5259]|0; + $97 = ($96|0)==(0); + if ($97) { + $99 = HEAP32[(20724)>>2]|0; + $100 = HEAP32[(20728)>>2]|0; + $101 = HEAP32[(20732)>>2]|0; + $102 = HEAP32[(20736)>>2]|0; + HEAP32[$vararg_buffer17>>2] = $99; + $vararg_ptr20 = ((($vararg_buffer17)) + 4|0); + HEAP32[$vararg_ptr20>>2] = $100; + $vararg_ptr21 = ((($vararg_buffer17)) + 8|0); + HEAP32[$vararg_ptr21>>2] = $101; + $vararg_ptr22 = ((($vararg_buffer17)) + 12|0); + HEAP32[$vararg_ptr22>>2] = $102; + _TraceLog(0,11614,$vararg_buffer17); + } else { + $98 = HEAP32[(20720)>>2]|0; + HEAP32[$vararg_buffer14>>2] = $98; + _TraceLog(0,11549,$vararg_buffer14); + } + $103 = HEAP32[5259]|0; + $104 = ($103|0)==(0); + if ($104) { + STACKTOP = sp;return; + } + $105 = HEAP32[5260]|0; + FUNCTION_TABLE_vi[$105 & 31](0); + STACKTOP = sp;return; +} +function _LoadShaderProgram($0,$1) { + $0 = $0|0; + $1 = $1|0; + var $$0 = 0, $$alloca_mul = 0, $$alloca_mul34 = 0, $$alloca_mul36 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0; + var $25 = 0, $26 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0, $vararg_buffer1 = 0, $vararg_buffer10 = 0, $vararg_buffer13 = 0, $vararg_buffer16 = 0, $vararg_buffer19 = 0, $vararg_buffer22 = 0, $vararg_buffer4 = 0, $vararg_buffer7 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 96|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(96|0); + $vararg_buffer22 = sp + 64|0; + $vararg_buffer19 = sp + 56|0; + $vararg_buffer16 = sp + 48|0; + $vararg_buffer13 = sp + 40|0; + $vararg_buffer10 = sp + 32|0; + $vararg_buffer7 = sp + 24|0; + $vararg_buffer4 = sp + 16|0; + $vararg_buffer1 = sp + 8|0; + $vararg_buffer = sp; + $2 = sp + 80|0; + $3 = sp + 76|0; + $4 = sp + 72|0; + $5 = sp + 68|0; + $6 = (_glCreateShader(35633)|0); + $7 = (_glCreateShader(35632)|0); + HEAP32[$2>>2] = $0; + HEAP32[$3>>2] = $1; + _glShaderSource(($6|0),1,($2|0),(0|0)); + _glShaderSource(($7|0),1,($3|0),(0|0)); + HEAP32[$4>>2] = 0; + _glCompileShader(($6|0)); + _glGetShaderiv(($6|0),35713,($4|0)); + $8 = HEAP32[$4>>2]|0; + $9 = ($8|0)==(1); + if ($9) { + HEAP32[$vararg_buffer4>>2] = $6; + _TraceLog(0,12947,$vararg_buffer4); + } else { + HEAP32[$vararg_buffer>>2] = $6; + _TraceLog(1,12895,$vararg_buffer); + HEAP32[$vararg_buffer>>2] = 0; + _glGetShaderiv(($6|0),35716,($vararg_buffer|0)); + $10 = HEAP32[$vararg_buffer>>2]|0; + $11 = (_llvm_stacksave()|0); + $$alloca_mul = $10; + $12 = STACKTOP; STACKTOP = STACKTOP + ((((1*$$alloca_mul)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$$alloca_mul)|0)+15)&-16)|0);; + $13 = HEAP32[$vararg_buffer>>2]|0; + _glGetShaderInfoLog(($6|0),($13|0),($5|0),($12|0)); + HEAP32[$vararg_buffer1>>2] = $12; + _TraceLog(0,12944,$vararg_buffer1); + _llvm_stackrestore(($11|0)); + } + _glCompileShader(($7|0)); + _glGetShaderiv(($7|0),35713,($4|0)); + $14 = HEAP32[$4>>2]|0; + $15 = ($14|0)==(1); + if ($15) { + HEAP32[$vararg_buffer13>>2] = $7; + _TraceLog(0,13048,$vararg_buffer13); + } else { + HEAP32[$vararg_buffer7>>2] = $7; + _TraceLog(1,12997,$vararg_buffer7); + HEAP32[$vararg_buffer7>>2] = 0; + _glGetShaderiv(($7|0),35716,($vararg_buffer7|0)); + $16 = HEAP32[$vararg_buffer7>>2]|0; + $17 = (_llvm_stacksave()|0); + $$alloca_mul34 = $16; + $18 = STACKTOP; STACKTOP = STACKTOP + ((((1*$$alloca_mul34)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$$alloca_mul34)|0)+15)&-16)|0);; + $19 = HEAP32[$vararg_buffer7>>2]|0; + _glGetShaderInfoLog(($7|0),($19|0),($5|0),($18|0)); + HEAP32[$vararg_buffer10>>2] = $18; + _TraceLog(0,12944,$vararg_buffer10); + _llvm_stackrestore(($17|0)); + } + $20 = (_glCreateProgram()|0); + _glAttachShader(($20|0),($6|0)); + _glAttachShader(($20|0),($7|0)); + _glBindAttribLocation(($20|0),0,(12739|0)); + _glBindAttribLocation(($20|0),1,(12754|0)); + _glBindAttribLocation(($20|0),2,(12785|0)); + _glBindAttribLocation(($20|0),3,(12812|0)); + _glBindAttribLocation(($20|0),4,(12798|0)); + _glBindAttribLocation(($20|0),5,(12769|0)); + _glLinkProgram(($20|0)); + _glGetProgramiv(($20|0),35714,($4|0)); + $21 = HEAP32[$4>>2]|0; + $22 = ($21|0)==(0); + if ($22) { + HEAP32[$vararg_buffer16>>2] = $20; + _TraceLog(1,13100,$vararg_buffer16); + HEAP32[$vararg_buffer16>>2] = 0; + _glGetProgramiv(($20|0),35716,($vararg_buffer16|0)); + $23 = HEAP32[$vararg_buffer16>>2]|0; + $24 = (_llvm_stacksave()|0); + $$alloca_mul36 = $23; + $25 = STACKTOP; STACKTOP = STACKTOP + ((((1*$$alloca_mul36)|0)+15)&-16)|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(((((1*$$alloca_mul36)|0)+15)&-16)|0);; + $26 = HEAP32[$vararg_buffer16>>2]|0; + _glGetProgramInfoLog(($20|0),($26|0),($5|0),($25|0)); + HEAP32[$vararg_buffer19>>2] = $25; + _TraceLog(0,12944,$vararg_buffer19); + _glDeleteProgram(($20|0)); + _llvm_stackrestore(($24|0)); + $$0 = 0; + _glDeleteShader(($6|0)); + _glDeleteShader(($7|0)); + STACKTOP = sp;return ($$0|0); + } else { + HEAP32[$vararg_buffer22>>2] = $20; + _TraceLog(0,13146,$vararg_buffer22); + $$0 = $20; + _glDeleteShader(($6|0)); + _glDeleteShader(($7|0)); + STACKTOP = sp;return ($$0|0); + } + return (0)|0; +} +function _LoadDefaultShaderLocations($0) { + $0 = $0|0; + var $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0; + var $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0; + var sp = 0; + sp = STACKTOP; + $1 = HEAP32[$0>>2]|0; + $2 = (_glGetAttribLocation(($1|0),(12739|0))|0); + $3 = ((($0)) + 4|0); + HEAP32[$3>>2] = $2; + $4 = HEAP32[$0>>2]|0; + $5 = (_glGetAttribLocation(($4|0),(12754|0))|0); + $6 = ((($0)) + 8|0); + HEAP32[$6>>2] = $5; + $7 = HEAP32[$0>>2]|0; + $8 = (_glGetAttribLocation(($7|0),(12769|0))|0); + $9 = ((($0)) + 12|0); + HEAP32[$9>>2] = $8; + $10 = HEAP32[$0>>2]|0; + $11 = (_glGetAttribLocation(($10|0),(12785|0))|0); + $12 = ((($0)) + 16|0); + HEAP32[$12>>2] = $11; + $13 = HEAP32[$0>>2]|0; + $14 = (_glGetAttribLocation(($13|0),(12798|0))|0); + $15 = ((($0)) + 20|0); + HEAP32[$15>>2] = $14; + $16 = HEAP32[$0>>2]|0; + $17 = (_glGetAttribLocation(($16|0),(12812|0))|0); + $18 = ((($0)) + 24|0); + HEAP32[$18>>2] = $17; + $19 = HEAP32[$0>>2]|0; + $20 = (_glGetUniformLocation(($19|0),(12824|0))|0); + $21 = ((($0)) + 28|0); + HEAP32[$21>>2] = $20; + $22 = HEAP32[$0>>2]|0; + $23 = (_glGetUniformLocation(($22|0),(12834|0))|0); + $24 = ((($0)) + 32|0); + HEAP32[$24>>2] = $23; + $25 = HEAP32[$0>>2]|0; + $26 = (_glGetUniformLocation(($25|0),(12845|0))|0); + $27 = ((($0)) + 36|0); + HEAP32[$27>>2] = $26; + $28 = HEAP32[$0>>2]|0; + $29 = (_glGetUniformLocation(($28|0),(12856|0))|0); + $30 = ((($0)) + 40|0); + HEAP32[$30>>2] = $29; + $31 = HEAP32[$0>>2]|0; + $32 = (_glGetUniformLocation(($31|0),(12868|0))|0); + $33 = ((($0)) + 44|0); + HEAP32[$33>>2] = $32; + $34 = HEAP32[$0>>2]|0; + $35 = (_glGetUniformLocation(($34|0),(12877|0))|0); + $36 = ((($0)) + 48|0); + HEAP32[$36>>2] = $35; + $37 = HEAP32[$0>>2]|0; + $38 = (_glGetUniformLocation(($37|0),(12886|0))|0); + $39 = ((($0)) + 52|0); + HEAP32[$39>>2] = $38; + return; +} +function _IsMouseButtonPressed($0) { + $0 = $0|0; + var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $or$cond = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = (23577 + ($0)|0); + $2 = HEAP8[$1>>0]|0; + $3 = (23580 + ($0)|0); + $4 = HEAP8[$3>>0]|0; + $5 = ($2<<24>>24)!=($4<<24>>24); + $6 = ($2<<24>>24)==(1); + $or$cond = $6 & $5; + $$0 = $or$cond&1; + return ($$0|0); +} +function _IsMouseButtonReleased($0) { + $0 = $0|0; + var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $or$cond = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = (23577 + ($0)|0); + $2 = HEAP8[$1>>0]|0; + $3 = (23580 + ($0)|0); + $4 = HEAP8[$3>>0]|0; + $5 = ($2<<24>>24)!=($4<<24>>24); + $6 = ($2<<24>>24)==(0); + $or$cond = $6 & $5; + $$0 = $or$cond&1; + return ($$0|0); +} +function _rlClearScreenBuffers() { + var label = 0, sp = 0; + sp = STACKTOP; + _glClear(16640); + return; +} +function _CloseWindow() { + var $0 = 0, $vararg_buffer = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $vararg_buffer = sp; + _UnloadDefaultFont(); + _rlglClose(); + $0 = HEAP32[5664]|0; + _glfwDestroyWindow(($0|0)); + _glfwTerminate(); + _TraceLog(0,13441,$vararg_buffer); + STACKTOP = sp;return; +} +function _rlglClose() { + var $0 = 0, $1 = 0, $vararg_buffer = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $vararg_buffer = sp; + _UnloadDefaultShader(); + _UnloadDefaultBuffers(); + _glDeleteTextures(1,(20876|0)); + $0 = HEAP32[5219]|0; + HEAP32[$vararg_buffer>>2] = $0; + _TraceLog(0,13468,$vararg_buffer); + $1 = HEAP32[5220]|0; + _free($1); + STACKTOP = sp;return; +} +function _UnloadDefaultShader() { + var $0 = 0, label = 0, sp = 0; + sp = STACKTOP; + _glUseProgram(0); + $0 = HEAP32[5634]|0; + _glDeleteProgram(($0|0)); + return; +} +function _UnloadDefaultBuffers() { + var $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[5259]|0; + $1 = ($0|0)==(0); + if (!($1)) { + $2 = HEAP32[5260]|0; + FUNCTION_TABLE_vi[$2 & 31](0); + } + _glDisableVertexAttribArray(0); + _glDisableVertexAttribArray(1); + _glDisableVertexAttribArray(2); + _glDisableVertexAttribArray(3); + _glBindBuffer(34962,0); + _glBindBuffer(34963,0); + _glDeleteBuffers(1,((20916)|0)); + _glDeleteBuffers(1,((20920)|0)); + _glDeleteBuffers(1,((20964)|0)); + _glDeleteBuffers(1,((20968)|0)); + _glDeleteBuffers(1,((20724)|0)); + _glDeleteBuffers(1,((20728)|0)); + _glDeleteBuffers(1,((20732)|0)); + _glDeleteBuffers(1,((20736)|0)); + $3 = HEAP32[5259]|0; + $4 = ($3|0)==(0); + if (!($4)) { + $5 = HEAP32[5648]|0; + FUNCTION_TABLE_vii[$5 & 63](1,(20912)); + $6 = HEAP32[5648]|0; + FUNCTION_TABLE_vii[$6 & 63](1,(20960)); + $7 = HEAP32[5648]|0; + FUNCTION_TABLE_vii[$7 & 63](1,(20720)); + } + $8 = HEAP32[(20896)>>2]|0; + _free($8); + $9 = HEAP32[(20904)>>2]|0; + _free($9); + $10 = HEAP32[(20944)>>2]|0; + _free($10); + $11 = HEAP32[(20952)>>2]|0; + _free($11); + $12 = HEAP32[(20704)>>2]|0; + _free($12); + $13 = HEAP32[(20708)>>2]|0; + _free($13); + $14 = HEAP32[(20712)>>2]|0; + _free($14); + $15 = HEAP32[(20716)>>2]|0; + _free($15); + return; +} +function _BeginDrawing() { + var $0 = 0.0, $1 = 0.0, $2 = 0.0, $downscaleView$byval_copy = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $downscaleView$byval_copy = sp; + $0 = (+_GetTime()); + HEAPF64[2445] = $0; + $1 = +HEAPF64[2444]; + $2 = $0 - $1; + HEAPF64[2446] = $2; + HEAPF64[2444] = $0; + _rlClearScreenBuffers(); + _rlLoadIdentity(); + dest=$downscaleView$byval_copy; src=22696; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + (_MatrixToFloat($downscaleView$byval_copy)|0); + _rlMultMatrixf(21044); + STACKTOP = sp;return; +} +function _rlMultMatrixf($0) { + $0 = $0|0; + var $$byval_copy = 0, $$byval_copy1 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0, $23 = 0, $24 = 0, $25 = 0; + var $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0, $31 = 0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0, $40 = 0, $41 = 0, $42 = 0, $43 = 0; + var $44 = 0, $45 = 0, $46 = 0, $47 = 0, $48 = 0, $49 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 256|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(256|0); + $$byval_copy1 = sp + 192|0; + $$byval_copy = sp + 128|0; + $1 = sp + 64|0; + $2 = sp; + $3 = HEAP32[$0>>2]|0; + HEAP32[$1>>2] = $3; + $4 = ((($1)) + 4|0); + $5 = ((($0)) + 4|0); + $6 = HEAP32[$5>>2]|0; + HEAP32[$4>>2] = $6; + $7 = ((($1)) + 8|0); + $8 = ((($0)) + 8|0); + $9 = HEAP32[$8>>2]|0; + HEAP32[$7>>2] = $9; + $10 = ((($1)) + 12|0); + $11 = ((($0)) + 12|0); + $12 = HEAP32[$11>>2]|0; + HEAP32[$10>>2] = $12; + $13 = ((($1)) + 16|0); + $14 = ((($0)) + 16|0); + $15 = HEAP32[$14>>2]|0; + HEAP32[$13>>2] = $15; + $16 = ((($1)) + 20|0); + $17 = ((($0)) + 20|0); + $18 = HEAP32[$17>>2]|0; + HEAP32[$16>>2] = $18; + $19 = ((($1)) + 24|0); + $20 = ((($0)) + 24|0); + $21 = HEAP32[$20>>2]|0; + HEAP32[$19>>2] = $21; + $22 = ((($1)) + 28|0); + $23 = ((($0)) + 28|0); + $24 = HEAP32[$23>>2]|0; + HEAP32[$22>>2] = $24; + $25 = ((($1)) + 32|0); + $26 = ((($0)) + 32|0); + $27 = HEAP32[$26>>2]|0; + HEAP32[$25>>2] = $27; + $28 = ((($1)) + 36|0); + $29 = ((($0)) + 36|0); + $30 = HEAP32[$29>>2]|0; + HEAP32[$28>>2] = $30; + $31 = ((($1)) + 40|0); + $32 = ((($0)) + 40|0); + $33 = HEAP32[$32>>2]|0; + HEAP32[$31>>2] = $33; + $34 = ((($1)) + 44|0); + $35 = ((($0)) + 44|0); + $36 = HEAP32[$35>>2]|0; + HEAP32[$34>>2] = $36; + $37 = ((($1)) + 48|0); + $38 = ((($0)) + 48|0); + $39 = HEAP32[$38>>2]|0; + HEAP32[$37>>2] = $39; + $40 = ((($1)) + 52|0); + $41 = ((($0)) + 52|0); + $42 = HEAP32[$41>>2]|0; + HEAP32[$40>>2] = $42; + $43 = ((($1)) + 56|0); + $44 = ((($0)) + 56|0); + $45 = HEAP32[$44>>2]|0; + HEAP32[$43>>2] = $45; + $46 = ((($1)) + 60|0); + $47 = ((($0)) + 60|0); + $48 = HEAP32[$47>>2]|0; + HEAP32[$46>>2] = $48; + $49 = HEAP32[5625]|0; + dest=$$byval_copy; src=$49; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$$byval_copy1; src=$1; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixMultiply($2,$$byval_copy,$$byval_copy1); + dest=$49; src=$2; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + STACKTOP = sp;return; +} +function _EndDrawing() { + var $0 = 0.0, $1 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + _rlglDraw(); + _SwapBuffers(); + _PollInputEvents(); + $0 = (+_GetTime()); + HEAPF64[2445] = $0; + $1 = +HEAPF64[2444]; + $2 = $0 - $1; + HEAPF64[2447] = $2; + HEAPF64[2444] = $0; + $3 = +HEAPF64[2446]; + $4 = $2 + $3; + HEAPF64[2430] = $4; + $5 = +HEAPF64[2441]; + $6 = $4 < $5; + if (!($6)) { + return; + } + $7 = $5 - $4; + $8 = $7 * 1000.0; + $9 = $8; + _Wait($9); + $10 = (+_GetTime()); + HEAPF64[2445] = $10; + $11 = +HEAPF64[2444]; + $12 = $10 - $11; + HEAPF64[2444] = $10; + $13 = +HEAPF64[2430]; + $14 = $12 + $13; + HEAPF64[2430] = $14; + return; +} +function _SwapBuffers() { + var $0 = 0, label = 0, sp = 0; + sp = STACKTOP; + $0 = HEAP32[5664]|0; + _glfwSwapBuffers(($0|0)); + return; +} +function _PollInputEvents() { + var $$04857 = 0, $$05160 = 0, $$058 = 0, $$lcssa = 0, $0 = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $2 = 0, $20 = 0, $21 = 0, $22 = 0; + var $23 = 0, $24 = 0, $25 = 0, $26 = 0, $27 = 0, $28 = 0, $29 = 0, $3 = 0, $30 = 0.0, $31 = 0.0, $32 = 0, $33 = 0, $34 = 0, $35 = 0, $36 = 0, $37 = 0, $38 = 0, $39 = 0, $4 = 0.0, $40 = 0; + var $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0, $9 = 0, $scevgep = 0, $scevgep67 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 1456|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(1456|0); + $0 = sp + 1440|0; + $1 = sp + 1432|0; + $2 = sp; + _UpdateGestures(); + HEAP32[939] = -1; + HEAP32[941] = -1; + HEAP32[5700] = 0; + $3 = HEAP32[5664]|0; + _glfwGetCursorPos(($3|0),($0|0),($1|0)); + $4 = +HEAPF64[$0>>3]; + $5 = $4; + HEAPF32[4880] = $5; + $6 = +HEAPF64[$1>>3]; + $7 = $6; + HEAPF32[(19524)>>2] = $7; + _memcpy((24095|0),(23583|0),512)|0; + ;HEAP8[23580>>0]=HEAP8[23577>>0]|0;HEAP8[23580+1>>0]=HEAP8[23577+1>>0]|0;HEAP8[23580+2>>0]=HEAP8[23577+2>>0]|0; + $8 = HEAP32[5699]|0; + HEAP32[5665] = $8; + HEAP32[5699] = 0; + $9 = (_emscripten_get_num_gamepads()|0); + $10 = ($9|0)>(0); + if (!($10)) { + STACKTOP = sp;return; + } + $11 = ((($2)) + 12|0); + $12 = ((($2)) + 8|0); + $$05160 = 0; + while(1) { + $scevgep = (24607 + ($$05160<<5)|0); + $scevgep67 = (24735 + ($$05160<<5)|0); + dest=$scevgep; src=$scevgep67; stop=dest+32|0; do { HEAP8[dest>>0]=HEAP8[src>>0]|0; dest=dest+1|0; src=src+1|0; } while ((dest|0) < (stop|0)); + $13 = (_emscripten_get_gamepad_status(($$05160|0),($2|0))|0); + $14 = ($13|0)==(0); + if ($14) { + $15 = HEAP32[$11>>2]|0; + $16 = ($15|0)>(0); + if ($16) { + $17 = HEAP32[$11>>2]|0; + $$04857 = 0; + while(1) { + $21 = (((($2)) + 1040|0) + ($$04857<<2)|0); + $22 = HEAP32[$21>>2]|0; + $23 = ($22|0)==(1); + $24 = ((24735 + ($$05160<<5)|0) + ($$04857)|0); + if ($23) { + HEAP8[$24>>0] = 1; + HEAP32[941] = $$04857; + } else { + HEAP8[$24>>0] = 0; + } + $25 = (($$04857) + 1)|0; + $26 = ($25|0)<($17|0); + $27 = ($25|0)<(32); + $28 = $27 & $26; + if ($28) { + $$04857 = $25; + } else { + break; + } + } + } + $18 = HEAP32[$12>>2]|0; + $19 = ($18|0)>(0); + if ($19) { + $20 = HEAP32[$12>>2]|0; + $$058 = 0; + while(1) { + $29 = (((($2)) + 16|0) + ($$058<<3)|0); + $30 = +HEAPF64[$29>>3]; + $31 = $30; + $32 = ((22804 + ($$05160<<5)|0) + ($$058<<2)|0); + HEAPF32[$32>>2] = $31; + $33 = (($$058) + 1)|0; + $34 = ($33|0)<($20|0); + $35 = ($33|0)<(8); + $36 = $35 & $34; + if ($36) { + $$058 = $33; + } else { + $$lcssa = $20; + break; + } + } + } else { + $$lcssa = $18; + } + HEAP32[5700] = $$lcssa; + } + $37 = (($$05160) + 1)|0; + $38 = ($37|0)<($9|0); + $39 = ($37|0)<(4); + $40 = $38 & $39; + if ($40) { + $$05160 = $37; + } else { + break; + } + } + STACKTOP = sp;return; +} +function _Wait($0) { + $0 = +$0; + var $1 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0.0, $8 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = (+_GetTime()); + $2 = 0.0 - $1; + $3 = $0 / 1000.0; + $4 = $3; + $5 = $2 < $4; + if (!($5)) { + return; + } + while(1) { + $6 = (+_GetTime()); + $7 = $6 - $1; + $8 = $7 < $4; + if (!($8)) { + break; + } + } + return; +} +function _Begin3dMode($0) { + $0 = $0|0; + var $$byval_copy = 0, $$byval_copy1 = 0, $$byval_copy3 = 0, $1 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0, $19 = 0, $2 = 0, $3 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0; + var $8 = 0.0, $9 = 0.0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 160|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(160|0); + $$byval_copy3 = sp + 88|0; + $$byval_copy1 = sp + 76|0; + $$byval_copy = sp + 64|0; + $1 = sp; + _rlglDraw(); + _rlMatrixMode(5889); + _rlPushMatrix(); + _rlLoadIdentity(); + $2 = HEAP32[5667]|0; + $3 = (+($2|0)); + $4 = HEAP32[5668]|0; + $5 = (+($4|0)); + $6 = $3 / $5; + $7 = ((($0)) + 36|0); + $8 = +HEAPF32[$7>>2]; + $9 = $8 * 3.1415927410125732; + $10 = $9; + $11 = $10 / 360.0; + $12 = (+Math_tan((+$11))); + $13 = $12 * 0.01; + $14 = $6; + $15 = $13 * $14; + $16 = -$15; + $17 = -$13; + _rlFrustum($16,$15,$17,$13,0.01,1000.0); + _rlMatrixMode(5888); + _rlLoadIdentity(); + $18 = ((($0)) + 12|0); + $19 = ((($0)) + 24|0); + ;HEAP32[$$byval_copy>>2]=HEAP32[$0>>2]|0;HEAP32[$$byval_copy+4>>2]=HEAP32[$0+4>>2]|0;HEAP32[$$byval_copy+8>>2]=HEAP32[$0+8>>2]|0; + ;HEAP32[$$byval_copy1>>2]=HEAP32[$18>>2]|0;HEAP32[$$byval_copy1+4>>2]=HEAP32[$18+4>>2]|0;HEAP32[$$byval_copy1+8>>2]=HEAP32[$18+8>>2]|0; + ;HEAP32[$$byval_copy3>>2]=HEAP32[$19>>2]|0;HEAP32[$$byval_copy3+4>>2]=HEAP32[$19+4>>2]|0;HEAP32[$$byval_copy3+8>>2]=HEAP32[$19+8>>2]|0; + _MatrixLookAt($1,$$byval_copy,$$byval_copy1,$$byval_copy3); + dest=$$byval_copy3; src=$1; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + (_MatrixToFloat($$byval_copy3)|0); + _rlMultMatrixf(21044); + _rlEnableDepthTest(); + STACKTOP = sp;return; +} +function _rlFrustum($0,$1,$2,$3,$4,$5) { + $0 = +$0; + $1 = +$1; + $2 = +$2; + $3 = +$3; + $4 = +$4; + $5 = +$5; + var $$byval_copy = 0, $$byval_copy1 = 0, $6 = 0, $7 = 0, $8 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 256|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(256|0); + $$byval_copy1 = sp + 192|0; + $$byval_copy = sp + 128|0; + $6 = sp + 64|0; + $7 = sp; + _MatrixFrustum($6,$0,$1,$2,$3,$4,$5); + _MatrixTranspose($6); + $8 = HEAP32[5625]|0; + dest=$$byval_copy; src=$8; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$$byval_copy1; src=$6; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _MatrixMultiply($7,$$byval_copy,$$byval_copy1); + dest=$8; src=$7; stop=dest+64|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + STACKTOP = sp;return; +} +function _rlEnableDepthTest() { + var label = 0, sp = 0; + sp = STACKTOP; + _glEnable(2929); + return; +} +function _End3dMode() { + var label = 0, sp = 0; + sp = STACKTOP; + _rlglDraw(); + _rlMatrixMode(5889); + _rlPopMatrix(); + _rlMatrixMode(5888); + _rlLoadIdentity(); + _rlDisableDepthTest(); + return; +} +function _rlDisableDepthTest() { + var label = 0, sp = 0; + sp = STACKTOP; + _glDisable(2929); + return; +} +function _BeginTextureMode($0) { + $0 = $0|0; + var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0.0, $7 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + _rlglDraw(); + $1 = HEAP32[$0>>2]|0; + _rlEnableRenderTexture($1); + _rlClearScreenBuffers(); + $2 = ((($0)) + 8|0); + $3 = HEAP32[$2>>2]|0; + $4 = ((($0)) + 12|0); + $5 = HEAP32[$4>>2]|0; + _rlViewport(0,0,$3,$5); + _rlMatrixMode(5889); + _rlLoadIdentity(); + $6 = (+($3|0)); + $7 = (+($5|0)); + _rlOrtho(0.0,$6,$7,0.0,0.0,1.0); + _rlMatrixMode(5888); + _rlLoadIdentity(); + return; +} +function _rlEnableRenderTexture($0) { + $0 = $0|0; + var label = 0, sp = 0; + sp = STACKTOP; + _glBindFramebuffer(36160,($0|0)); + return; +} +function _EndTextureMode() { + var $0 = 0, $1 = 0.0, $2 = 0, $3 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + _rlglDraw(); + _rlDisableRenderTexture(); + _SetupViewport(); + _rlMatrixMode(5889); + _rlLoadIdentity(); + $0 = (_GetScreenWidth()|0); + $1 = (+($0|0)); + $2 = (_GetScreenHeight()|0); + $3 = (+($2|0)); + _rlOrtho(0.0,$1,$3,0.0,0.0,1.0); + _rlMatrixMode(5888); + _rlLoadIdentity(); + return; +} +function _rlDisableRenderTexture() { + var label = 0, sp = 0; + sp = STACKTOP; + _glBindFramebuffer(36160,0); + return; +} +function _Fade($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = +$2; + var $$0 = 0.0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0.0, $8 = 0.0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + $3 = $2 < 0.0; + if ($3) { + $$0 = 0.0; + } else { + $4 = $2 > 1.0; + if ($4) { + $$0 = 1.0; + } else { + $$0 = $2; + } + } + $5 = ((($1)) + 3|0); + $6 = HEAP8[$5>>0]|0; + $7 = (+($6&255)); + $8 = $$0 * $7; + $9 = HEAP8[$1>>0]|0; + HEAP8[$0>>0] = $9; + $10 = ((($0)) + 1|0); + $11 = ((($1)) + 1|0); + $12 = HEAP8[$11>>0]|0; + HEAP8[$10>>0] = $12; + $13 = ((($0)) + 2|0); + $14 = ((($1)) + 2|0); + $15 = HEAP8[$14>>0]|0; + HEAP8[$13>>0] = $15; + $16 = ((($0)) + 3|0); + $17 = (~~(($8))&255); + HEAP8[$16>>0] = $17; + return; +} +function _SetConfigFlags($0) { + $0 = $0|0; + var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; + sp = STACKTOP; + HEAP8[23576] = $0; + $1 = $0 & 1; + $2 = ($1<<24>>24)==(0); + if (!($2)) { + HEAP32[5669] = 1; + } + $3 = HEAP8[23576]|0; + $4 = $3 & 2; + $5 = ($4<<24>>24)==(0); + if ($5) { + return; + } + HEAP32[5692] = 1; + return; +} +function _IsKeyPressed($0) { + $0 = $0|0; + var $$0 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $or$cond = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = (23583 + ($0)|0); + $2 = HEAP8[$1>>0]|0; + $3 = (24095 + ($0)|0); + $4 = HEAP8[$3>>0]|0; + $5 = ($2<<24>>24)!=($4<<24>>24); + $6 = ($2<<24>>24)==(1); + $or$cond = $6 & $5; + $$0 = $or$cond&1; + return ($$0|0); +} +function _rlDeleteShader($0) { + $0 = $0|0; + var $1 = 0, label = 0, sp = 0; + sp = STACKTOP; + $1 = ($0|0)==(0); + if ($1) { + return; + } + _glDeleteProgram(($0|0)); + return; +} +function _LoadText($0) { + $0 = $0|0; + var $$0 = 0, $$1 = 0, $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $vararg_buffer = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $vararg_buffer = sp; + $1 = ($0|0)==(0|0); + if ($1) { + $$1 = 0; + STACKTOP = sp;return ($$1|0); + } + $2 = (_fopen($0,13533)|0); + $3 = ($2|0)==(0|0); + if ($3) { + HEAP32[$vararg_buffer>>2] = $0; + _TraceLog(1,13536,$vararg_buffer); + $$1 = 0; + STACKTOP = sp;return ($$1|0); + } + (_fseek($2,0,2)|0); + $4 = (_ftell($2)|0); + _rewind($2); + $5 = ($4|0)>(0); + if ($5) { + $6 = (($4) + 1)|0; + $7 = (_malloc($6)|0); + $8 = (_fread($7,1,$4,$2)|0); + $9 = (($7) + ($8)|0); + HEAP8[$9>>0] = 0; + $$0 = $7; + } else { + $$0 = 0; + } + (_fclose($2)|0); + $$1 = $$0; + STACKTOP = sp;return ($$1|0); +} +function _LoadShader($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $10 = 0, $11 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $vararg_buffer = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $vararg_buffer = sp; + $3 = sp + 8|0; + dest=$3; stop=dest+56|0; do { HEAP32[dest>>2]=0|0; dest=dest+4|0; } while ((dest|0) < (stop|0)); + $4 = (_LoadText($1)|0); + $5 = (_LoadText($2)|0); + $6 = ($4|0)!=(0|0); + $7 = ($5|0)!=(0|0); + $or$cond = $6 & $7; + if ($or$cond) { + $8 = (_LoadShaderProgram($4,$5)|0); + HEAP32[$3>>2] = $8; + $9 = ($8|0)==(0); + if (!($9)) { + _LoadDefaultShaderLocations($3); + } + _free($4); + _free($5); + } + $10 = HEAP32[$3>>2]|0; + $11 = ($10|0)==(0); + if ($11) { + _TraceLog(1,13571,$vararg_buffer); + dest=$3; src=22536; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + } + dest=$0; src=$3; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + STACKTOP = sp;return; +} +function _UnloadShader($0) { + $0 = $0|0; + var $1 = 0, $2 = 0, $3 = 0, $vararg_buffer = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); + $vararg_buffer = sp; + $1 = HEAP32[$0>>2]|0; + $2 = ($1|0)==(0); + if ($2) { + STACKTOP = sp;return; + } + _rlDeleteShader($1); + $3 = HEAP32[$0>>2]|0; + HEAP32[$vararg_buffer>>2] = $3; + _TraceLog(0,13605,$vararg_buffer); + STACKTOP = sp;return; +} +function _BeginShaderMode($0) { + $0 = $0|0; + var $1 = 0, $2 = 0, $3 = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + $1 = HEAP32[5245]|0; + $2 = HEAP32[$0>>2]|0; + $3 = ($1|0)==($2|0); + if ($3) { + return; + } + _rlglDraw(); + dest=20980; src=$0; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + return; +} +function _EndShaderMode() { + var $defaultShader$byval_copy = 0, dest = 0, label = 0, sp = 0, src = 0, stop = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 64|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(64|0); + $defaultShader$byval_copy = sp; + dest=$defaultShader$byval_copy; src=22536; stop=dest+56|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + _BeginShaderMode($defaultShader$byval_copy); STACKTOP = sp;return; } function _emscripten_GetProcAddress($0) { @@ -29398,7 +30725,7 @@ function _emscripten_GetProcAddress($0) { $10 = HEAP32[$2>>2]|0; (_strcpy($9,$10)|0); $11 = HEAP32[$3>>2]|0; - $12 = (_strstr($11,12743)|0); + $12 = (_strstr($11,13647)|0); HEAP32[$4>>2] = $12; $13 = HEAP32[$4>>2]|0; $14 = ($13|0)!=(0|0); @@ -29407,7 +30734,7 @@ function _emscripten_GetProcAddress($0) { HEAP8[$15>>0] = 0; } $16 = HEAP32[$3>>2]|0; - $17 = (_strstr($16,12747)|0); + $17 = (_strstr($16,13651)|0); HEAP32[$4>>2] = $17; $18 = HEAP32[$4>>2]|0; $19 = ($18|0)!=(0|0); @@ -29416,7 +30743,7 @@ function _emscripten_GetProcAddress($0) { HEAP8[$20>>0] = 0; } $21 = HEAP32[$3>>2]|0; - $22 = (_strstr($21,12751)|0); + $22 = (_strstr($21,13655)|0); HEAP32[$4>>2] = $22; $23 = HEAP32[$4>>2]|0; $24 = ($23|0)!=(0|0); @@ -29425,7 +30752,7 @@ function _emscripten_GetProcAddress($0) { HEAP8[$25>>0] = 0; } $26 = HEAP32[$3>>2]|0; - $27 = (_strstr($26,12755)|0); + $27 = (_strstr($26,13659)|0); HEAP32[$4>>2] = $27; $28 = HEAP32[$4>>2]|0; $29 = ($28|0)!=(0|0); @@ -29434,1210 +30761,1210 @@ function _emscripten_GetProcAddress($0) { HEAP8[$30>>0] = 0; } $31 = HEAP32[$3>>2]|0; - $32 = (_strcmp($31,12761)|0); + $32 = (_strcmp($31,13665)|0); $33 = ($32|0)!=(0); do { if ($33) { $34 = HEAP32[$3>>2]|0; - $35 = (_strcmp($34,12799)|0); + $35 = (_strcmp($34,13703)|0); $36 = ($35|0)!=(0); if (!($36)) { - HEAP32[$3>>2] = 12818; + HEAP32[$3>>2] = 13722; break; } $37 = HEAP32[$3>>2]|0; - $38 = (_strcmp($37,12831)|0); + $38 = (_strcmp($37,13735)|0); $39 = ($38|0)!=(0); if (!($39)) { - HEAP32[$3>>2] = 12852; + HEAP32[$3>>2] = 13756; break; } $40 = HEAP32[$3>>2]|0; - $41 = (_strcmp($40,12867)|0); + $41 = (_strcmp($40,13771)|0); $42 = ($41|0)!=(0); if (!($42)) { - HEAP32[$3>>2] = 12882; + HEAP32[$3>>2] = 13786; break; } $43 = HEAP32[$3>>2]|0; - $44 = (_strcmp($43,12897)|0); + $44 = (_strcmp($43,13801)|0); $45 = ($44|0)!=(0); if (!($45)) { - HEAP32[$3>>2] = 12912; + HEAP32[$3>>2] = 13816; } } else { - HEAP32[$3>>2] = 12783; + HEAP32[$3>>2] = 13687; } } while(0); $46 = HEAP32[$3>>2]|0; - $47 = (_strcmp($46,12927)|0); + $47 = (_strcmp($46,13831)|0); $48 = ($47|0)!=(0); do { if ($48) { $49 = HEAP32[$3>>2]|0; - $50 = (_strcmp($49,12941)|0); + $50 = (_strcmp($49,13845)|0); $51 = ($50|0)!=(0); if (!($51)) { HEAP32[$1>>2] = 3; break; } $52 = HEAP32[$3>>2]|0; - $53 = (_strcmp($52,12953)|0); + $53 = (_strcmp($52,13857)|0); $54 = ($53|0)!=(0); if (!($54)) { HEAP32[$1>>2] = 7; break; } $55 = HEAP32[$3>>2]|0; - $56 = (_strcmp($55,12967)|0); + $56 = (_strcmp($55,13871)|0); $57 = ($56|0)!=(0); if (!($57)) { HEAP32[$1>>2] = 8; break; } $58 = HEAP32[$3>>2]|0; - $59 = (_strcmp($58,12979)|0); + $59 = (_strcmp($58,13883)|0); $60 = ($59|0)!=(0); if (!($60)) { HEAP32[$1>>2] = 9; break; } $61 = HEAP32[$3>>2]|0; - $62 = (_strcmp($61,12993)|0); + $62 = (_strcmp($61,13897)|0); $63 = ($62|0)!=(0); if (!($63)) { HEAP32[$1>>2] = 10; break; } $64 = HEAP32[$3>>2]|0; - $65 = (_strcmp($64,13007)|0); + $65 = (_strcmp($64,13911)|0); $66 = ($65|0)!=(0); if (!($66)) { HEAP32[$1>>2] = 11; break; } $67 = HEAP32[$3>>2]|0; - $68 = (_strcmp($67,13024)|0); + $68 = (_strcmp($67,13928)|0); $69 = ($68|0)!=(0); if (!($69)) { HEAP32[$1>>2] = 1; break; } $70 = HEAP32[$3>>2]|0; - $71 = (_strcmp($70,13047)|0); + $71 = (_strcmp($70,13951)|0); $72 = ($71|0)!=(0); if (!($72)) { HEAP32[$1>>2] = 1; break; } $73 = HEAP32[$3>>2]|0; - $74 = (_strcmp($73,13073)|0); + $74 = (_strcmp($73,13977)|0); $75 = ($74|0)!=(0); if (!($75)) { HEAP32[$1>>2] = 2; break; } $76 = HEAP32[$3>>2]|0; - $77 = (_strcmp($76,13086)|0); + $77 = (_strcmp($76,13990)|0); $78 = ($77|0)!=(0); if (!($78)) { HEAP32[$1>>2] = 3; break; } $79 = HEAP32[$3>>2]|0; - $80 = (_strcmp($79,13102)|0); + $80 = (_strcmp($79,14006)|0); $81 = ($80|0)!=(0); if (!($81)) { HEAP32[$1>>2] = 1; break; } $82 = HEAP32[$3>>2]|0; - $83 = (_strcmp($82,13115)|0); + $83 = (_strcmp($82,14019)|0); $84 = ($83|0)!=(0); if (!($84)) { HEAP32[$1>>2] = 12; break; } $85 = HEAP32[$3>>2]|0; - $86 = (_strcmp($85,13129)|0); + $86 = (_strcmp($85,14033)|0); $87 = ($86|0)!=(0); if (!($87)) { HEAP32[$1>>2] = 2; break; } $88 = HEAP32[$3>>2]|0; - $89 = (_strcmp($88,13149)|0); + $89 = (_strcmp($88,14053)|0); $90 = ($89|0)!=(0); if (!($90)) { HEAP32[$1>>2] = 3; break; } $91 = HEAP32[$3>>2]|0; - $92 = (_strcmp($91,13169)|0); + $92 = (_strcmp($91,14073)|0); $93 = ($92|0)!=(0); if (!($93)) { HEAP32[$1>>2] = 4; break; } $94 = HEAP32[$3>>2]|0; - $95 = (_strcmp($94,13186)|0); + $95 = (_strcmp($94,14090)|0); $96 = ($95|0)!=(0); if (!($96)) { HEAP32[$1>>2] = 5; break; } $97 = HEAP32[$3>>2]|0; - $98 = (_strcmp($97,13203)|0); + $98 = (_strcmp($97,14107)|0); $99 = ($98|0)!=(0); if (!($99)) { HEAP32[$1>>2] = 4; break; } $100 = HEAP32[$3>>2]|0; - $101 = (_strcmp($100,13215)|0); + $101 = (_strcmp($100,14119)|0); $102 = ($101|0)!=(0); if (!($102)) { HEAP32[$1>>2] = 13; break; } $103 = HEAP32[$3>>2]|0; - $104 = (_strcmp($103,13228)|0); + $104 = (_strcmp($103,14132)|0); $105 = ($104|0)!=(0); if (!($105)) { HEAP32[$1>>2] = 14; break; } $106 = HEAP32[$3>>2]|0; - $107 = (_strcmp($106,13244)|0); + $107 = (_strcmp($106,14148)|0); $108 = ($107|0)!=(0); if (!($108)) { HEAP32[$1>>2] = 6; break; } $109 = HEAP32[$3>>2]|0; - $110 = (_strcmp($109,13267)|0); + $110 = (_strcmp($109,14171)|0); $111 = ($110|0)!=(0); if (!($111)) { HEAP32[$1>>2] = 2; break; } $112 = HEAP32[$3>>2]|0; - $113 = (_strcmp($112,13280)|0); + $113 = (_strcmp($112,14184)|0); $114 = ($113|0)!=(0); if (!($114)) { HEAP32[$1>>2] = 3; break; } $115 = HEAP32[$3>>2]|0; - $116 = (_strcmp($115,13296)|0); + $116 = (_strcmp($115,14200)|0); $117 = ($116|0)!=(0); if (!($117)) { HEAP32[$1>>2] = 5; break; } $118 = HEAP32[$3>>2]|0; - $119 = (_strcmp($118,13307)|0); + $119 = (_strcmp($118,14211)|0); $120 = ($119|0)!=(0); if (!($120)) { HEAP32[$1>>2] = 15; break; } $121 = HEAP32[$3>>2]|0; - $122 = (_strcmp($121,13326)|0); + $122 = (_strcmp($121,14230)|0); $123 = ($122|0)!=(0); if (!($123)) { HEAP32[$1>>2] = 16; break; } $124 = HEAP32[$3>>2]|0; - $125 = (_strcmp($124,13348)|0); + $125 = (_strcmp($124,14252)|0); $126 = ($125|0)!=(0); if (!($126)) { HEAP32[$1>>2] = 17; break; } $127 = HEAP32[$3>>2]|0; - $128 = (_strcmp($127,13367)|0); + $128 = (_strcmp($127,14271)|0); $129 = ($128|0)!=(0); if (!($129)) { HEAP32[$1>>2] = 7; break; } $130 = HEAP32[$3>>2]|0; - $131 = (_strcmp($130,13396)|0); + $131 = (_strcmp($130,14300)|0); $132 = ($131|0)!=(0); if (!($132)) { HEAP32[$1>>2] = 6; break; } $133 = HEAP32[$3>>2]|0; - $134 = (_strcmp($133,13413)|0); + $134 = (_strcmp($133,14317)|0); $135 = ($134|0)!=(0); if (!($135)) { HEAP32[$1>>2] = 8; break; } $136 = HEAP32[$3>>2]|0; - $137 = (_strcmp($136,13428)|0); + $137 = (_strcmp($136,14332)|0); $138 = ($137|0)!=(0); if (!($138)) { HEAP32[$1>>2] = 9; break; } $139 = HEAP32[$3>>2]|0; - $140 = (_strcmp($139,13443)|0); + $140 = (_strcmp($139,14347)|0); $141 = ($140|0)!=(0); if (!($141)) { HEAP32[$1>>2] = 1; break; } $142 = HEAP32[$3>>2]|0; - $143 = (_strcmp($142,13464)|0); + $143 = (_strcmp($142,14368)|0); $144 = ($143|0)!=(0); if (!($144)) { HEAP32[$1>>2] = 10; break; } $145 = HEAP32[$3>>2]|0; - $146 = (_strcmp($145,13484)|0); + $146 = (_strcmp($145,14388)|0); $147 = ($146|0)!=(0); if (!($147)) { HEAP32[$1>>2] = 11; break; } $148 = HEAP32[$3>>2]|0; - $149 = (_strcmp($148,13504)|0); + $149 = (_strcmp($148,14408)|0); $150 = ($149|0)!=(0); if (!($150)) { HEAP32[$1>>2] = 12; break; } $151 = HEAP32[$3>>2]|0; - $152 = (_strcmp($151,13530)|0); + $152 = (_strcmp($151,14434)|0); $153 = ($152|0)!=(0); if (!($153)) { HEAP32[$1>>2] = 2; break; } $154 = HEAP32[$3>>2]|0; - $155 = (_strcmp($154,13549)|0); + $155 = (_strcmp($154,14453)|0); $156 = ($155|0)!=(0); if (!($156)) { HEAP32[$1>>2] = 1; break; } $157 = HEAP32[$3>>2]|0; - $158 = (_strcmp($157,13561)|0); + $158 = (_strcmp($157,14465)|0); $159 = ($158|0)!=(0); if (!($159)) { HEAP32[$1>>2] = 3; break; } $160 = HEAP32[$3>>2]|0; - $161 = (_strcmp($160,13573)|0); + $161 = (_strcmp($160,14477)|0); $162 = ($161|0)!=(0); if (!($162)) { HEAP32[$1>>2] = 1; break; } $163 = HEAP32[$3>>2]|0; - $164 = (_strcmp($163,13585)|0); + $164 = (_strcmp($163,14489)|0); $165 = ($164|0)!=(0); if (!($165)) { HEAP32[$1>>2] = 1; break; } $166 = HEAP32[$3>>2]|0; - $167 = (_strcmp($166,13597)|0); + $167 = (_strcmp($166,14501)|0); $168 = ($167|0)!=(0); if (!($168)) { HEAP32[$1>>2] = 18; break; } $169 = HEAP32[$3>>2]|0; - $170 = (_strcmp($169,13609)|0); + $170 = (_strcmp($169,14513)|0); $171 = ($170|0)!=(0); if (!($171)) { HEAP32[$1>>2] = 13; break; } $172 = HEAP32[$3>>2]|0; - $173 = (_strcmp($172,13621)|0); + $173 = (_strcmp($172,14525)|0); $174 = ($173|0)!=(0); if (!($174)) { HEAP32[$1>>2] = 4; break; } $175 = HEAP32[$3>>2]|0; - $176 = (_strcmp($175,13633)|0); + $176 = (_strcmp($175,14537)|0); $177 = ($176|0)!=(0); if (!($177)) { HEAP32[$1>>2] = 2; break; } $178 = HEAP32[$3>>2]|0; - $179 = (_strcmp($178,13645)|0); + $179 = (_strcmp($178,14549)|0); $180 = ($179|0)!=(0); if (!($180)) { HEAP32[$1>>2] = 14; break; } $181 = HEAP32[$3>>2]|0; - $182 = (_strcmp($181,13658)|0); + $182 = (_strcmp($181,14562)|0); $183 = ($182|0)!=(0); if (!($183)) { HEAP32[$1>>2] = 15; break; } $184 = HEAP32[$3>>2]|0; - $185 = (_strcmp($184,13671)|0); + $185 = (_strcmp($184,14575)|0); $186 = ($185|0)!=(0); if (!($186)) { HEAP32[$1>>2] = 16; break; } $187 = HEAP32[$3>>2]|0; - $188 = (_strcmp($187,13684)|0); + $188 = (_strcmp($187,14588)|0); $189 = ($188|0)!=(0); if (!($189)) { HEAP32[$1>>2] = 17; break; } $190 = HEAP32[$3>>2]|0; - $191 = (_strcmp($190,13697)|0); + $191 = (_strcmp($190,14601)|0); $192 = ($191|0)!=(0); if (!($192)) { HEAP32[$1>>2] = 18; break; } $193 = HEAP32[$3>>2]|0; - $194 = (_strcmp($193,13710)|0); + $194 = (_strcmp($193,14614)|0); $195 = ($194|0)!=(0); if (!($195)) { HEAP32[$1>>2] = 19; break; } $196 = HEAP32[$3>>2]|0; - $197 = (_strcmp($196,13723)|0); + $197 = (_strcmp($196,14627)|0); $198 = ($197|0)!=(0); if (!($198)) { HEAP32[$1>>2] = 20; break; } $199 = HEAP32[$3>>2]|0; - $200 = (_strcmp($199,13736)|0); + $200 = (_strcmp($199,14640)|0); $201 = ($200|0)!=(0); if (!($201)) { HEAP32[$1>>2] = 21; break; } $202 = HEAP32[$3>>2]|0; - $203 = (_strcmp($202,13749)|0); + $203 = (_strcmp($202,14653)|0); $204 = ($203|0)!=(0); if (!($204)) { HEAP32[$1>>2] = 5; break; } $205 = HEAP32[$3>>2]|0; - $206 = (_strcmp($205,13768)|0); + $206 = (_strcmp($205,14672)|0); $207 = ($206|0)!=(0); if (!($207)) { HEAP32[$1>>2] = 6; break; } $208 = HEAP32[$3>>2]|0; - $209 = (_strcmp($208,13787)|0); + $209 = (_strcmp($208,14691)|0); $210 = ($209|0)!=(0); if (!($210)) { HEAP32[$1>>2] = 7; break; } $211 = HEAP32[$3>>2]|0; - $212 = (_strcmp($211,13806)|0); + $212 = (_strcmp($211,14710)|0); $213 = ($212|0)!=(0); if (!($213)) { HEAP32[$1>>2] = 19; break; } $214 = HEAP32[$3>>2]|0; - $215 = (_strcmp($214,13819)|0); + $215 = (_strcmp($214,14723)|0); $216 = ($215|0)!=(0); if (!($216)) { HEAP32[$1>>2] = 20; break; } $217 = HEAP32[$3>>2]|0; - $218 = (_strcmp($217,13837)|0); + $218 = (_strcmp($217,14741)|0); $219 = ($218|0)!=(0); if (!($219)) { HEAP32[$1>>2] = 21; break; } $220 = HEAP32[$3>>2]|0; - $221 = (_strcmp($220,13855)|0); + $221 = (_strcmp($220,14759)|0); $222 = ($221|0)!=(0); if (!($222)) { HEAP32[$1>>2] = 22; break; } $223 = HEAP32[$3>>2]|0; - $224 = (_strcmp($223,13873)|0); + $224 = (_strcmp($223,14777)|0); $225 = ($224|0)!=(0); if (!($225)) { HEAP32[$1>>2] = 23; break; } $226 = HEAP32[$3>>2]|0; - $227 = (_strcmp($226,13891)|0); + $227 = (_strcmp($226,14795)|0); $228 = ($227|0)!=(0); if (!($228)) { HEAP32[$1>>2] = 2; break; } $229 = HEAP32[$3>>2]|0; - $230 = (_strcmp($229,13911)|0); + $230 = (_strcmp($229,14815)|0); $231 = ($230|0)!=(0); if (!($231)) { HEAP32[$1>>2] = 3; break; } $232 = HEAP32[$3>>2]|0; - $233 = (_strcmp($232,12852)|0); + $233 = (_strcmp($232,13756)|0); $234 = ($233|0)!=(0); if (!($234)) { HEAP32[$1>>2] = 7; break; } $235 = HEAP32[$3>>2]|0; - $236 = (_strcmp($235,13929)|0); + $236 = (_strcmp($235,14833)|0); $237 = ($236|0)!=(0); if (!($237)) { HEAP32[$1>>2] = 1; break; } $238 = HEAP32[$3>>2]|0; - $239 = (_strcmp($238,13944)|0); + $239 = (_strcmp($238,14848)|0); $240 = ($239|0)!=(0); if (!($240)) { HEAP32[$1>>2] = 8; break; } $241 = HEAP32[$3>>2]|0; - $242 = (_strcmp($241,13965)|0); + $242 = (_strcmp($241,14869)|0); $243 = ($242|0)!=(0); if (!($243)) { HEAP32[$1>>2] = 9; break; } $244 = HEAP32[$3>>2]|0; - $245 = (_strcmp($244,13980)|0); + $245 = (_strcmp($244,14884)|0); $246 = ($245|0)!=(0); if (!($246)) { HEAP32[$1>>2] = 10; break; } $247 = HEAP32[$3>>2]|0; - $248 = (_strcmp($247,13998)|0); + $248 = (_strcmp($247,14902)|0); $249 = ($248|0)!=(0); if (!($249)) { HEAP32[$1>>2] = 2; break; } $250 = HEAP32[$3>>2]|0; - $251 = (_strcmp($250,14014)|0); + $251 = (_strcmp($250,14918)|0); $252 = ($251|0)!=(0); if (!($252)) { HEAP32[$1>>2] = 11; break; } $253 = HEAP32[$3>>2]|0; - $254 = (_strcmp($253,14033)|0); + $254 = (_strcmp($253,14937)|0); $255 = ($254|0)!=(0); if (!($255)) { HEAP32[$1>>2] = 22; break; } $256 = HEAP32[$3>>2]|0; - $257 = (_strcmp($256,14047)|0); + $257 = (_strcmp($256,14951)|0); $258 = ($257|0)!=(0); if (!($258)) { HEAP32[$1>>2] = 23; break; } $259 = HEAP32[$3>>2]|0; - $260 = (_strcmp($259,14062)|0); + $260 = (_strcmp($259,14966)|0); $261 = ($260|0)!=(0); if (!($261)) { HEAP32[$1>>2] = 8; break; } $262 = HEAP32[$3>>2]|0; - $263 = (_strcmp($262,12783)|0); + $263 = (_strcmp($262,13687)|0); $264 = ($263|0)!=(0); if (!($264)) { HEAP32[$1>>2] = 1; break; } $265 = HEAP32[$3>>2]|0; - $266 = (_strcmp($265,14073)|0); + $266 = (_strcmp($265,14977)|0); $267 = ($266|0)!=(0); if (!($267)) { HEAP32[$1>>2] = 3; break; } $268 = HEAP32[$3>>2]|0; - $269 = (_strcmp($268,12882)|0); + $269 = (_strcmp($268,13786)|0); $270 = ($269|0)!=(0); if (!($270)) { HEAP32[$1>>2] = 24; break; } $271 = HEAP32[$3>>2]|0; - $272 = (_strcmp($271,12912)|0); + $272 = (_strcmp($271,13816)|0); $273 = ($272|0)!=(0); if (!($273)) { HEAP32[$1>>2] = 25; break; } $274 = HEAP32[$3>>2]|0; - $275 = (_strcmp($274,14089)|0); + $275 = (_strcmp($274,14993)|0); $276 = ($275|0)!=(0); if (!($276)) { HEAP32[$1>>2] = 12; break; } $277 = HEAP32[$3>>2]|0; - $278 = (_strcmp($277,14116)|0); + $278 = (_strcmp($277,15020)|0); $279 = ($278|0)!=(0); if (!($279)) { HEAP32[$1>>2] = 4; break; } $280 = HEAP32[$3>>2]|0; - $281 = (_strcmp($280,14130)|0); + $281 = (_strcmp($280,15034)|0); $282 = ($281|0)!=(0); if (!($282)) { HEAP32[$1>>2] = 13; break; } $283 = HEAP32[$3>>2]|0; - $284 = (_strcmp($283,12818)|0); + $284 = (_strcmp($283,13722)|0); $285 = ($284|0)!=(0); if (!($285)) { HEAP32[$1>>2] = 5; break; } $286 = HEAP32[$3>>2]|0; - $287 = (_strcmp($286,14150)|0); + $287 = (_strcmp($286,15054)|0); $288 = ($287|0)!=(0); if (!($288)) { HEAP32[$1>>2] = 6; break; } $289 = HEAP32[$3>>2]|0; - $290 = (_strcmp($289,14168)|0); + $290 = (_strcmp($289,15072)|0); $291 = ($290|0)!=(0); if (!($291)) { HEAP32[$1>>2] = 9; break; } $292 = HEAP32[$3>>2]|0; - $293 = (_strcmp($292,14180)|0); + $293 = (_strcmp($292,15084)|0); $294 = ($293|0)!=(0); if (!($294)) { HEAP32[$1>>2] = 24; break; } $295 = HEAP32[$3>>2]|0; - $296 = (_strcmp($295,14201)|0); + $296 = (_strcmp($295,15105)|0); $297 = ($296|0)!=(0); if (!($297)) { HEAP32[$1>>2] = 26; break; } $298 = HEAP32[$3>>2]|0; - $299 = (_strcmp($298,14219)|0); + $299 = (_strcmp($298,15123)|0); $300 = ($299|0)!=(0); if (!($300)) { HEAP32[$1>>2] = 27; break; } $301 = HEAP32[$3>>2]|0; - $302 = (_strcmp($301,14237)|0); + $302 = (_strcmp($301,15141)|0); $303 = ($302|0)!=(0); if (!($303)) { HEAP32[$1>>2] = 28; break; } $304 = HEAP32[$3>>2]|0; - $305 = (_strcmp($304,14258)|0); + $305 = (_strcmp($304,15162)|0); $306 = ($305|0)!=(0); if (!($306)) { HEAP32[$1>>2] = 14; break; } $307 = HEAP32[$3>>2]|0; - $308 = (_strcmp($307,14284)|0); + $308 = (_strcmp($307,15188)|0); $309 = ($308|0)!=(0); if (!($309)) { HEAP32[$1>>2] = 3; break; } $310 = HEAP32[$3>>2]|0; - $311 = (_strcmp($310,14307)|0); + $311 = (_strcmp($310,15211)|0); $312 = ($311|0)!=(0); if (!($312)) { HEAP32[$1>>2] = 15; break; } $313 = HEAP32[$3>>2]|0; - $314 = (_strcmp($313,14345)|0); + $314 = (_strcmp($313,15249)|0); $315 = ($314|0)!=(0); if (!($315)) { HEAP32[$1>>2] = 10; break; } $316 = HEAP32[$3>>2]|0; - $317 = (_strcmp($316,14361)|0); + $317 = (_strcmp($316,15265)|0); $318 = ($317|0)!=(0); if (!($318)) { HEAP32[$1>>2] = 7; break; } $319 = HEAP32[$3>>2]|0; - $320 = (_strcmp($319,14376)|0); + $320 = (_strcmp($319,15280)|0); $321 = ($320|0)!=(0); if (!($321)) { HEAP32[$1>>2] = 25; break; } $322 = HEAP32[$3>>2]|0; - $323 = (_strcmp($322,14399)|0); + $323 = (_strcmp($322,15303)|0); $324 = ($323|0)!=(0); if (!($324)) { HEAP32[$1>>2] = 16; break; } $325 = HEAP32[$3>>2]|0; - $326 = (_strcmp($325,14412)|0); + $326 = (_strcmp($325,15316)|0); $327 = ($326|0)!=(0); if (!($327)) { HEAP32[$1>>2] = 29; break; } $328 = HEAP32[$3>>2]|0; - $329 = (_strcmp($328,14426)|0); + $329 = (_strcmp($328,15330)|0); $330 = ($329|0)!=(0); if (!($330)) { HEAP32[$1>>2] = 30; break; } $331 = HEAP32[$3>>2]|0; - $332 = (_strcmp($331,14440)|0); + $332 = (_strcmp($331,15344)|0); $333 = ($332|0)!=(0); if (!($333)) { HEAP32[$1>>2] = 1; break; } $334 = HEAP32[$3>>2]|0; - $335 = (_strcmp($334,14460)|0); + $335 = (_strcmp($334,15364)|0); $336 = ($335|0)!=(0); if (!($336)) { HEAP32[$1>>2] = 8; break; } $337 = HEAP32[$3>>2]|0; - $338 = (_strcmp($337,14480)|0); + $338 = (_strcmp($337,15384)|0); $339 = ($338|0)!=(0); if (!($339)) { HEAP32[$1>>2] = 17; break; } $340 = HEAP32[$3>>2]|0; - $341 = (_strcmp($340,14496)|0); + $341 = (_strcmp($340,15400)|0); $342 = ($341|0)!=(0); if (!($342)) { HEAP32[$1>>2] = 18; break; } $343 = HEAP32[$3>>2]|0; - $344 = (_strcmp($343,14514)|0); + $344 = (_strcmp($343,15418)|0); $345 = ($344|0)!=(0); if (!($345)) { HEAP32[$1>>2] = 26; break; } $346 = HEAP32[$3>>2]|0; - $347 = (_strcmp($346,14530)|0); + $347 = (_strcmp($346,15434)|0); $348 = ($347|0)!=(0); if (!($348)) { HEAP32[$1>>2] = 19; break; } $349 = HEAP32[$3>>2]|0; - $350 = (_strcmp($349,14545)|0); + $350 = (_strcmp($349,15449)|0); $351 = ($350|0)!=(0); if (!($351)) { HEAP32[$1>>2] = 9; break; } $352 = HEAP32[$3>>2]|0; - $353 = (_strcmp($352,14567)|0); + $353 = (_strcmp($352,15471)|0); $354 = ($353|0)!=(0); if (!($354)) { HEAP32[$1>>2] = 31; break; } $355 = HEAP32[$3>>2]|0; - $356 = (_strcmp($355,14585)|0); + $356 = (_strcmp($355,15489)|0); $357 = ($356|0)!=(0); if (!($357)) { HEAP32[$1>>2] = 32; break; } $358 = HEAP32[$3>>2]|0; - $359 = (_strcmp($358,14606)|0); + $359 = (_strcmp($358,15510)|0); $360 = ($359|0)!=(0); if (!($360)) { HEAP32[$1>>2] = 10; break; } $361 = HEAP32[$3>>2]|0; - $362 = (_strcmp($361,14624)|0); + $362 = (_strcmp($361,15528)|0); $363 = ($362|0)!=(0); if (!($363)) { HEAP32[$1>>2] = 11; break; } $364 = HEAP32[$3>>2]|0; - $365 = (_strcmp($364,14637)|0); + $365 = (_strcmp($364,15541)|0); $366 = ($365|0)!=(0); if (!($366)) { HEAP32[$1>>2] = 2; break; } $367 = HEAP32[$3>>2]|0; - $368 = (_strcmp($367,14652)|0); + $368 = (_strcmp($367,15556)|0); $369 = ($368|0)!=(0); if (!($369)) { HEAP32[$1>>2] = 12; break; } $370 = HEAP32[$3>>2]|0; - $371 = (_strcmp($370,14666)|0); + $371 = (_strcmp($370,15570)|0); $372 = ($371|0)!=(0); if (!($372)) { HEAP32[$1>>2] = 1; break; } $373 = HEAP32[$3>>2]|0; - $374 = (_strcmp($373,14676)|0); + $374 = (_strcmp($373,15580)|0); $375 = ($374|0)!=(0); if (!($375)) { HEAP32[$1>>2] = 1; break; } $376 = HEAP32[$3>>2]|0; - $377 = (_strcmp($376,14686)|0); + $377 = (_strcmp($376,15590)|0); $378 = ($377|0)!=(0); if (!($378)) { HEAP32[$1>>2] = 2; break; } $379 = HEAP32[$3>>2]|0; - $380 = (_strcmp($379,14708)|0); + $380 = (_strcmp($379,15612)|0); $381 = ($380|0)!=(0); if (!($381)) { HEAP32[$1>>2] = 13; break; } $382 = HEAP32[$3>>2]|0; - $383 = (_strcmp($382,14734)|0); + $383 = (_strcmp($382,15638)|0); $384 = ($383|0)!=(0); if (!($384)) { HEAP32[$1>>2] = 14; break; } $385 = HEAP32[$3>>2]|0; - $386 = (_strcmp($385,14761)|0); + $386 = (_strcmp($385,15665)|0); $387 = ($386|0)!=(0); if (!($387)) { HEAP32[$1>>2] = 27; break; } $388 = HEAP32[$3>>2]|0; - $389 = (_strcmp($388,14774)|0); + $389 = (_strcmp($388,15678)|0); $390 = ($389|0)!=(0); if (!($390)) { HEAP32[$1>>2] = 20; break; } $391 = HEAP32[$3>>2]|0; - $392 = (_strcmp($391,14789)|0); + $392 = (_strcmp($391,15693)|0); $393 = ($392|0)!=(0); if (!($393)) { HEAP32[$1>>2] = 4; break; } $394 = HEAP32[$3>>2]|0; - $395 = (_strcmp($394,14804)|0); + $395 = (_strcmp($394,15708)|0); $396 = ($395|0)!=(0); if (!($396)) { HEAP32[$1>>2] = 3; break; } $397 = HEAP32[$3>>2]|0; - $398 = (_strcmp($397,14828)|0); + $398 = (_strcmp($397,15732)|0); $399 = ($398|0)!=(0); if (!($399)) { HEAP32[$1>>2] = 2; break; } $400 = HEAP32[$3>>2]|0; - $401 = (_strcmp($400,14839)|0); + $401 = (_strcmp($400,15743)|0); $402 = ($401|0)!=(0); if (!($402)) { HEAP32[$1>>2] = 33; break; } $403 = HEAP32[$3>>2]|0; - $404 = (_strcmp($403,14861)|0); + $404 = (_strcmp($403,15765)|0); $405 = ($404|0)!=(0); if (!($405)) { HEAP32[$1>>2] = 21; break; } $406 = HEAP32[$3>>2]|0; - $407 = (_strcmp($406,14883)|0); + $407 = (_strcmp($406,15787)|0); $408 = ($407|0)!=(0); if (!($408)) { HEAP32[$1>>2] = 5; break; } $409 = HEAP32[$3>>2]|0; - $410 = (_strcmp($409,14907)|0); + $410 = (_strcmp($409,15811)|0); $411 = ($410|0)!=(0); if (!($411)) { HEAP32[$1>>2] = 4; break; } $412 = HEAP32[$3>>2]|0; - $413 = (_strcmp($412,14916)|0); + $413 = (_strcmp($412,15820)|0); $414 = ($413|0)!=(0); if (!($414)) { HEAP32[$1>>2] = 5; break; } $415 = HEAP32[$3>>2]|0; - $416 = (_strcmp($415,14924)|0); + $416 = (_strcmp($415,15828)|0); $417 = ($416|0)!=(0); if (!($417)) { HEAP32[$1>>2] = 1; break; } $418 = HEAP32[$3>>2]|0; - $419 = (_strcmp($418,14937)|0); + $419 = (_strcmp($418,15841)|0); $420 = ($419|0)!=(0); if (!($420)) { HEAP32[$1>>2] = 2; break; } $421 = HEAP32[$3>>2]|0; - $422 = (_strcmp($421,14951)|0); + $422 = (_strcmp($421,15855)|0); $423 = ($422|0)!=(0); if (!($423)) { HEAP32[$1>>2] = 15; break; } $424 = HEAP32[$3>>2]|0; - $425 = (_strcmp($424,14963)|0); + $425 = (_strcmp($424,15867)|0); $426 = ($425|0)!=(0); if (!($426)) { HEAP32[$1>>2] = 16; break; } $427 = HEAP32[$3>>2]|0; - $428 = (_strcmp($427,14972)|0); + $428 = (_strcmp($427,15876)|0); $429 = ($428|0)!=(0); if (!($429)) { HEAP32[$1>>2] = 17; break; } $430 = HEAP32[$3>>2]|0; - $431 = (_strcmp($430,14982)|0); + $431 = (_strcmp($430,15886)|0); $432 = ($431|0)!=(0); if (!($432)) { HEAP32[$1>>2] = 18; break; } $433 = HEAP32[$3>>2]|0; - $434 = (_strcmp($433,14994)|0); + $434 = (_strcmp($433,15898)|0); $435 = ($434|0)!=(0); if (!($435)) { HEAP32[$1>>2] = 19; break; } $436 = HEAP32[$3>>2]|0; - $437 = (_strcmp($436,15005)|0); + $437 = (_strcmp($436,15909)|0); $438 = ($437|0)!=(0); if (!($438)) { HEAP32[$1>>2] = 20; break; } $439 = HEAP32[$3>>2]|0; - $440 = (_strcmp($439,15013)|0); + $440 = (_strcmp($439,15917)|0); $441 = ($440|0)!=(0); if (!($441)) { HEAP32[$1>>2] = 3; break; } $442 = HEAP32[$3>>2]|0; - $443 = (_strcmp($442,15025)|0); + $443 = (_strcmp($442,15929)|0); $444 = ($443|0)!=(0); if (!($444)) { HEAP32[$1>>2] = 21; break; } $445 = HEAP32[$3>>2]|0; - $446 = (_strcmp($445,15040)|0); + $446 = (_strcmp($445,15944)|0); $447 = ($446|0)!=(0); if (!($447)) { HEAP32[$1>>2] = 22; break; } $448 = HEAP32[$3>>2]|0; - $449 = (_strcmp($448,15052)|0); + $449 = (_strcmp($448,15956)|0); $450 = ($449|0)!=(0); if (!($450)) { HEAP32[$1>>2] = 23; break; } $451 = HEAP32[$3>>2]|0; - $452 = (_strcmp($451,15066)|0); + $452 = (_strcmp($451,15970)|0); $453 = ($452|0)!=(0); if (!($453)) { HEAP32[$1>>2] = 11; break; } $454 = HEAP32[$3>>2]|0; - $455 = (_strcmp($454,15091)|0); + $455 = (_strcmp($454,15995)|0); $456 = ($455|0)!=(0); if (!($456)) { HEAP32[$1>>2] = 24; break; } $457 = HEAP32[$3>>2]|0; - $458 = (_strcmp($457,15108)|0); + $458 = (_strcmp($457,16012)|0); $459 = ($458|0)!=(0); if (!($459)) { HEAP32[$1>>2] = 25; break; } $460 = HEAP32[$3>>2]|0; - $461 = (_strcmp($460,15124)|0); + $461 = (_strcmp($460,16028)|0); $462 = ($461|0)!=(0); if (!($462)) { HEAP32[$1>>2] = 26; break; } $463 = HEAP32[$3>>2]|0; - $464 = (_strcmp($463,15140)|0); + $464 = (_strcmp($463,16044)|0); $465 = ($464|0)!=(0); if (!($465)) { HEAP32[$1>>2] = 12; break; } $466 = HEAP32[$3>>2]|0; - $467 = (_strcmp($466,15152)|0); + $467 = (_strcmp($466,16056)|0); $468 = ($467|0)!=(0); if (!($468)) { HEAP32[$1>>2] = 34; break; } $469 = HEAP32[$3>>2]|0; - $470 = (_strcmp($469,15164)|0); + $470 = (_strcmp($469,16068)|0); $471 = ($470|0)!=(0); if (!($471)) { HEAP32[$1>>2] = 35; break; } $472 = HEAP32[$3>>2]|0; - $473 = (_strcmp($472,15188)|0); + $473 = (_strcmp($472,16092)|0); $474 = ($473|0)!=(0); if (!($474)) { HEAP32[$1>>2] = 1; break; } $475 = HEAP32[$3>>2]|0; - $476 = (_strcmp($475,15201)|0); + $476 = (_strcmp($475,16105)|0); $477 = ($476|0)!=(0); if (!($477)) { HEAP32[$1>>2] = 2; break; } $478 = HEAP32[$3>>2]|0; - $479 = (_strcmp($478,15215)|0); + $479 = (_strcmp($478,16119)|0); $480 = ($479|0)!=(0); if (!($480)) { HEAP32[$1>>2] = 36; break; } $481 = HEAP32[$3>>2]|0; - $482 = (_strcmp($481,15237)|0); + $482 = (_strcmp($481,16141)|0); $483 = ($482|0)!=(0); if (!($483)) { HEAP32[$1>>2] = 37; break; } $484 = HEAP32[$3>>2]|0; - $485 = (_strcmp($484,15244)|0); + $485 = (_strcmp($484,16148)|0); $486 = ($485|0)!=(0); if (!($486)) { HEAP32[$1>>2] = 3; break; } $487 = HEAP32[$3>>2]|0; - $488 = (_strcmp($487,15260)|0); + $488 = (_strcmp($487,16164)|0); $489 = ($488|0)!=(0); if (!($489)) { HEAP32[$1>>2] = 2; break; } $490 = HEAP32[$3>>2]|0; - $491 = (_strcmp($490,15277)|0); + $491 = (_strcmp($490,16181)|0); $492 = ($491|0)!=(0); if (!($492)) { HEAP32[$1>>2] = 1; break; } $493 = HEAP32[$3>>2]|0; - $494 = (_strcmp($493,15294)|0); + $494 = (_strcmp($493,16198)|0); $495 = ($494|0)!=(0); if (!($495)) { HEAP32[$1>>2] = 28; break; } $496 = HEAP32[$3>>2]|0; - $497 = (_strcmp($496,15310)|0); + $497 = (_strcmp($496,16214)|0); $498 = ($497|0)!=(0); if (!($498)) { HEAP32[$1>>2] = 1; break; } $499 = HEAP32[$3>>2]|0; - $500 = (_strcmp($499,15326)|0); + $500 = (_strcmp($499,16230)|0); $501 = ($500|0)!=(0); if (!($501)) { HEAP32[$1>>2] = 4; break; } $502 = HEAP32[$3>>2]|0; - $503 = (_strcmp($502,15343)|0); + $503 = (_strcmp($502,16247)|0); $504 = ($503|0)!=(0); if (!($504)) { HEAP32[$1>>2] = 29; break; } $505 = HEAP32[$3>>2]|0; - $506 = (_strcmp($505,15357)|0); + $506 = (_strcmp($505,16261)|0); $507 = ($506|0)!=(0); if (!($507)) { HEAP32[$1>>2] = 30; break; } $508 = HEAP32[$3>>2]|0; - $509 = (_strcmp($508,15369)|0); + $509 = (_strcmp($508,16273)|0); $510 = ($509|0)!=(0); if (!($510)) { HEAP32[$1>>2] = 22; break; } $511 = HEAP32[$3>>2]|0; - $512 = (_strcmp($511,15380)|0); + $512 = (_strcmp($511,16284)|0); $513 = ($512|0)!=(0); if (!($513)) { HEAP32[$1>>2] = 2; break; } $514 = HEAP32[$3>>2]|0; - $515 = (_strcmp($514,15393)|0); + $515 = (_strcmp($514,16297)|0); $516 = ($515|0)!=(0); if (!($516)) { HEAP32[$1>>2] = 23; break; } $517 = HEAP32[$3>>2]|0; - $518 = (_strcmp($517,15403)|0); + $518 = (_strcmp($517,16307)|0); $519 = ($518|0)!=(0); if (!($519)) { HEAP32[$1>>2] = 2; break; } $520 = HEAP32[$3>>2]|0; - $521 = (_strcmp($520,15420)|0); + $521 = (_strcmp($520,16324)|0); $522 = ($521|0)!=(0); if (!($522)) { HEAP32[$1>>2] = 24; break; } $523 = HEAP32[$3>>2]|0; - $524 = (_strcmp($523,15432)|0); + $524 = (_strcmp($523,16336)|0); $525 = ($524|0)!=(0); if (!($525)) { HEAP32[$1>>2] = 25; break; } $526 = HEAP32[$3>>2]|0; - $527 = (_strcmp($526,15454)|0); + $527 = (_strcmp($526,16358)|0); $528 = ($527|0)!=(0); if (!($528)) { HEAP32[$1>>2] = 26; break; } $529 = HEAP32[$3>>2]|0; - $530 = (_strcmp($529,15474)|0); + $530 = (_strcmp($529,16378)|0); $531 = ($530|0)!=(0); if (!($531)) { HEAP32[$1>>2] = 3; break; } $532 = HEAP32[$3>>2]|0; - $533 = (_strcmp($532,15487)|0); + $533 = (_strcmp($532,16391)|0); $534 = ($533|0)!=(0); if (!($534)) { HEAP32[$1>>2] = 27; break; } $535 = HEAP32[$3>>2]|0; - $536 = (_strcmp($535,15509)|0); + $536 = (_strcmp($535,16413)|0); $537 = ($536|0)!=(0); if (!($537)) { HEAP32[$1>>2] = 28; break; } $538 = HEAP32[$3>>2]|0; - $539 = (_strcmp($538,15529)|0); + $539 = (_strcmp($538,16433)|0); $540 = ($539|0)!=(0); if (!($540)) { HEAP32[$1>>2] = 2; break; } $541 = HEAP32[$3>>2]|0; - $542 = (_strcmp($541,15546)|0); + $542 = (_strcmp($541,16450)|0); $543 = ($542|0)!=(0); if (!($543)) { HEAP32[$1>>2] = 2; break; } $544 = HEAP32[$3>>2]|0; - $545 = (_strcmp($544,15563)|0); + $545 = (_strcmp($544,16467)|0); $546 = ($545|0)!=(0); if (!($546)) { HEAP32[$1>>2] = 3; break; } $547 = HEAP32[$3>>2]|0; - $548 = (_strcmp($547,15583)|0); + $548 = (_strcmp($547,16487)|0); $549 = ($548|0)!=(0); if ($549) { $550 = HEAP32[$2>>2]|0; @@ -30659,7 +31986,7 @@ function _emscripten_GetProcAddress($0) { function _emscripten_get_global_libc() { var label = 0, sp = 0; sp = STACKTOP; - return (21400|0); + return (22932|0); } function ___stdio_close($0) { $0 = $0|0; @@ -30852,7 +32179,7 @@ function ___pthread_self_108() { function _pthread_self() { var label = 0, sp = 0; sp = STACKTOP; - return (3908|0); + return (3972|0); } function _dummy_738($0) { $0 = $0|0; @@ -30965,6 +32292,45 @@ function ___stdout_write($0,$1,$2) { $14 = (___stdio_write($0,$1,$2)|0); STACKTOP = sp;return ($14|0); } +function _strtox_768($0,$1,$2,$3,$4) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + $3 = $3|0; + $4 = $4|0; + var $$sink = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; + sp = STACKTOP; + STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(128|0); + $5 = sp; + HEAP32[$5>>2] = 0; + $6 = ((($5)) + 4|0); + HEAP32[$6>>2] = $0; + $7 = ((($5)) + 44|0); + HEAP32[$7>>2] = $0; + $8 = ($0|0)<(0|0); + $9 = ((($0)) + 2147483647|0); + $$sink = $8 ? (-1) : $9; + $10 = ((($5)) + 8|0); + HEAP32[$10>>2] = $$sink; + $11 = ((($5)) + 76|0); + HEAP32[$11>>2] = -1; + ___shlim($5,0); + $12 = (___intscan($5,$2,1,$3,$4)|0); + $13 = tempRet0; + $14 = ($1|0)==(0|0); + if (!($14)) { + $15 = ((($5)) + 108|0); + $16 = HEAP32[$15>>2]|0; + $17 = HEAP32[$6>>2]|0; + $18 = HEAP32[$10>>2]|0; + $19 = (($17) + ($16))|0; + $20 = (($19) - ($18))|0; + $21 = (($0) + ($20)|0); + HEAP32[$1>>2] = $21; + } + tempRet0 = ($13); + STACKTOP = sp;return ($12|0); +} function ___shlim($0,$1) { $0 = $0|0; $1 = $1|0; @@ -31116,7 +32482,7 @@ function ___intscan($0,$1,$2,$3,$4) { $48 = (___shgetc($0)|0); $50 = $48; } - $49 = ((15700) + ($50)|0); + $49 = ((16604) + ($50)|0); $51 = HEAP8[$49>>0]|0; $52 = ($51&255)>(15); if ($52) { @@ -31148,7 +32514,7 @@ function ___intscan($0,$1,$2,$3,$4) { } } else { $$166 = $28 ? 10 : $1; - $60 = ((15700) + ($$0159)|0); + $60 = ((16604) + ($$0159)|0); $61 = HEAP8[$60>>0]|0; $62 = $61&255; $63 = ($62>>>0)<($$166>>>0); @@ -31284,10 +32650,10 @@ function ___intscan($0,$1,$2,$3,$4) { $126 = ($$1165168*23)|0; $127 = $126 >>> 5; $128 = $127 & 7; - $129 = (15956 + ($128)|0); + $129 = (16860 + ($128)|0); $130 = HEAP8[$129>>0]|0; $131 = $130 << 24 >> 24; - $132 = ((15700) + ($$1160169)|0); + $132 = ((16604) + ($$1160169)|0); $133 = HEAP8[$132>>0]|0; $134 = $133&255; $135 = ($134>>>0)<($$1165168>>>0); @@ -31309,7 +32675,7 @@ function ___intscan($0,$1,$2,$3,$4) { $145 = (___shgetc($0)|0); $$4163$be = $145; } - $146 = ((15700) + ($$4163$be)|0); + $146 = ((16604) + ($$4163$be)|0); $147 = HEAP8[$146>>0]|0; $148 = $147&255; $149 = ($148>>>0)<($$1165168>>>0); @@ -31360,7 +32726,7 @@ function ___intscan($0,$1,$2,$3,$4) { $177 = (___shgetc($0)|0); $$5$be = $177; } - $178 = ((15700) + ($$5$be)|0); + $178 = ((16604) + ($$5$be)|0); $179 = HEAP8[$178>>0]|0; $180 = $179&255; $181 = ($180>>>0)>=($$1165168>>>0); @@ -31379,7 +32745,7 @@ function ___intscan($0,$1,$2,$3,$4) { } } } - $122 = ((15700) + ($$1160169)|0); + $122 = ((16604) + ($$1160169)|0); $123 = HEAP8[$122>>0]|0; $124 = $123&255; $125 = ($124>>>0)<($$1165168>>>0); @@ -31401,7 +32767,7 @@ function ___intscan($0,$1,$2,$3,$4) { $196 = (___shgetc($0)|0); $$6$be = $196; } - $197 = ((15700) + ($$6$be)|0); + $197 = ((16604) + ($$6$be)|0); $198 = HEAP8[$197>>0]|0; $199 = $198&255; $200 = ($199>>>0)<($$1165168>>>0); @@ -31463,7 +32829,7 @@ function ___intscan($0,$1,$2,$3,$4) { $233 = (___shgetc($0)|0); $$7$be = $233; } - $234 = ((15700) + ($$7$be)|0); + $234 = ((16604) + ($$7$be)|0); $235 = HEAP8[$234>>0]|0; $236 = $235&255; $237 = ($236>>>0)<($$1165168>>>0); @@ -31482,7 +32848,7 @@ function ___intscan($0,$1,$2,$3,$4) { } } while(0); if ((label|0) == 72) { - $238 = ((15700) + ($$8)|0); + $238 = ((16604) + ($$8)|0); $239 = HEAP8[$238>>0]|0; $240 = $239&255; $241 = ($240>>>0)<($$1165167>>>0); @@ -31501,7 +32867,7 @@ function ___intscan($0,$1,$2,$3,$4) { $248 = (___shgetc($0)|0); $$9$be = $248; } - $249 = ((15700) + ($$9$be)|0); + $249 = ((16604) + ($$9$be)|0); $250 = HEAP8[$249>>0]|0; $251 = $250&255; $252 = ($251>>>0)<($$1165167>>>0); @@ -31744,6 +33110,16 @@ function ___toread($0) { } return ($$0|0); } +function _strtol($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $3 = 0, $4 = 0, label = 0, sp = 0; + sp = STACKTOP; + $3 = (_strtox_768($0,$1,$2,-2147483648,0)|0); + $4 = tempRet0; + return ($3|0); +} function _copysign($0,$1) { $0 = +$0; $1 = +$1; @@ -31833,6 +33209,59 @@ function _memcmp($0,$1,$2) { } while(0); return ($14|0); } +function _strncmp($0,$1,$2) { + $0 = $0|0; + $1 = $1|0; + $2 = $2|0; + var $$01824 = 0, $$01926 = 0, $$01926$in = 0, $$020 = 0, $$025 = 0, $$lcssa = 0, $$lcssa22 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $14 = 0, $15 = 0, $16 = 0, $17 = 0, $18 = 0, $19 = 0, $20 = 0, $21 = 0, $22 = 0; + var $23 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, $or$cond = 0, $or$cond21 = 0, label = 0, sp = 0; + sp = STACKTOP; + $3 = ($2|0)==(0); + if ($3) { + $$020 = 0; + } else { + $4 = HEAP8[$0>>0]|0; + $5 = $4&255; + $6 = ($4<<24>>24)==(0); + $7 = HEAP8[$1>>0]|0; + $8 = $7&255; + L3: do { + if ($6) { + $$lcssa = $8;$$lcssa22 = $5; + } else { + $$01824 = $0;$$01926$in = $2;$$025 = $1;$10 = $7;$13 = $4;$22 = $8;$23 = $5; + while(1) { + $$01926 = (($$01926$in) + -1)|0; + $9 = ($10<<24>>24)!=(0); + $11 = ($$01926|0)!=(0); + $or$cond = $11 & $9; + $12 = ($13<<24>>24)==($10<<24>>24); + $or$cond21 = $12 & $or$cond; + if (!($or$cond21)) { + $$lcssa = $22;$$lcssa22 = $23; + break L3; + } + $14 = ((($$01824)) + 1|0); + $15 = ((($$025)) + 1|0); + $16 = HEAP8[$14>>0]|0; + $17 = $16&255; + $18 = ($16<<24>>24)==(0); + $19 = HEAP8[$15>>0]|0; + $20 = $19&255; + if ($18) { + $$lcssa = $20;$$lcssa22 = $17; + break; + } else { + $$01824 = $14;$$01926$in = $$01926;$$025 = $15;$10 = $19;$13 = $16;$22 = $20;$23 = $17; + } + } + } + } while(0); + $21 = (($$lcssa22) - ($$lcssa))|0; + $$020 = $21; + } + return ($$020|0); +} function _vsprintf($0,$1,$2) { $0 = $0|0; $1 = $1|0; @@ -31853,7 +33282,7 @@ function _vsnprintf($0,$1,$2,$3) { STACKTOP = STACKTOP + 128|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(128|0); $4 = sp + 124|0; $5 = sp; - dest=$5; src=4284; stop=dest+124|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); + dest=$5; src=4348; stop=dest+124|0; do { HEAP32[dest>>2]=HEAP32[src>>2]|0; dest=dest+4|0; src=src+4|0; } while ((dest|0) < (stop|0)); $6 = (($1) + -1)|0; $7 = ($6>>>0)>(2147483646); if ($7) { @@ -32337,7 +33766,7 @@ function _printf_core($0,$1,$2,$3,$4) { $133 = HEAP8[$128>>0]|0; $134 = $133 << 24 >> 24; $135 = (($134) + -65)|0; - $136 = ((15965 + (($$0252*58)|0)|0) + ($135)|0); + $136 = ((16869 + (($$0252*58)|0)|0) + ($135)|0); $137 = HEAP8[$136>>0]|0; $138 = $137&255; $139 = (($138) + -1)|0; @@ -32515,7 +33944,7 @@ function _printf_core($0,$1,$2,$3,$4) { $222 = (($220) + 1)|0; $223 = $218 | $221; $$0254$$0254$ = $223 ? $$0254 : $222; - $$0228 = $216;$$1233 = 0;$$1238 = 16429;$$2256 = $$0254$$0254$;$$4266 = $$1263$;$248 = $212;$250 = $215; + $$0228 = $216;$$1233 = 0;$$1238 = 17333;$$2256 = $$0254$$0254$;$$4266 = $$1263$;$248 = $212;$250 = $215; label = 67; break; } @@ -32536,7 +33965,7 @@ function _printf_core($0,$1,$2,$3,$4) { $235 = (($233) + 4)|0; $236 = $235; HEAP32[$236>>2] = $232; - $$0232 = 1;$$0237 = 16429;$242 = $231;$243 = $232; + $$0232 = 1;$$0237 = 17333;$242 = $231;$243 = $232; label = 66; break L71; } else { @@ -32544,8 +33973,8 @@ function _printf_core($0,$1,$2,$3,$4) { $238 = ($237|0)==(0); $239 = $$1263$ & 1; $240 = ($239|0)==(0); - $$ = $240 ? 16429 : (16431); - $$$ = $238 ? $$ : (16430); + $$ = $240 ? 17333 : (17335); + $$$ = $238 ? $$ : (17334); $241 = $$1263$ & 2049; $narrow = ($241|0)!=(0); $$284$ = $narrow&1; @@ -32562,7 +33991,7 @@ function _printf_core($0,$1,$2,$3,$4) { $168 = (($165) + 4)|0; $169 = $168; $170 = HEAP32[$169>>2]|0; - $$0232 = 0;$$0237 = 16429;$242 = $167;$243 = $170; + $$0232 = 0;$$0237 = 17333;$242 = $167;$243 = $170; label = 66; break; } @@ -32575,7 +34004,7 @@ function _printf_core($0,$1,$2,$3,$4) { $264 = HEAP32[$263>>2]|0; $265 = $261&255; HEAP8[$13>>0] = $265; - $$2 = $13;$$2234 = 0;$$2239 = 16429;$$2251 = $11;$$5 = 1;$$6268 = $164; + $$2 = $13;$$2234 = 0;$$2239 = 17333;$$2251 = $11;$$5 = 1;$$6268 = $164; break; } case 109: { @@ -32589,7 +34018,7 @@ function _printf_core($0,$1,$2,$3,$4) { case 115: { $269 = HEAP32[$6>>2]|0; $270 = ($269|0)!=(0|0); - $271 = $270 ? $269 : 16439; + $271 = $270 ? $269 : 17343; $$1 = $271; label = 71; break; @@ -32629,7 +34058,7 @@ function _printf_core($0,$1,$2,$3,$4) { break; } default: { - $$2 = $21;$$2234 = 0;$$2239 = 16429;$$2251 = $11;$$5 = $$0254;$$6268 = $$1263$; + $$2 = $21;$$2234 = 0;$$2239 = 17333;$$2251 = $11;$$5 = $$0254;$$6268 = $$1263$; } } } while(0); @@ -32651,8 +34080,8 @@ function _printf_core($0,$1,$2,$3,$4) { $207 = ($206|0)==(0); $or$cond283 = $207 | $205; $208 = $$1236 >> 4; - $209 = (16429 + ($208)|0); - $$289 = $or$cond283 ? 16429 : $209; + $209 = (17333 + ($208)|0); + $$289 = $or$cond283 ? 17333 : $209; $$290 = $or$cond283 ? 0 : 2; $$0228 = $202;$$1233 = $$290;$$1238 = $$289;$$2256 = $$1255;$$4266 = $$3265;$248 = $197;$250 = $200; label = 67; @@ -32673,7 +34102,7 @@ function _printf_core($0,$1,$2,$3,$4) { $277 = (($$1) + ($$0254)|0); $$3257 = $273 ? $$0254 : $276; $$1250 = $273 ? $277 : $272; - $$2 = $$1;$$2234 = 0;$$2239 = 16429;$$2251 = $$1250;$$5 = $$3257;$$6268 = $164; + $$2 = $$1;$$2234 = 0;$$2239 = 17333;$$2251 = $$1250;$$5 = $$3257;$$6268 = $164; } else if ((label|0) == 75) { label = 0; @@ -33203,7 +34632,7 @@ function _fmt_x($0,$1,$2,$3) { $$056 = $2;$15 = $1;$8 = $0; while(1) { $7 = $8 & 15; - $9 = (16477 + ($7)|0); + $9 = (17381 + ($7)|0); $10 = HEAP8[$9>>0]|0; $11 = $10&255; $12 = $11 | $3; @@ -33561,14 +34990,14 @@ function _fmt_fp($0,$1,$2,$3,$4,$5) { $13 = ($12|0)<(0); if ($13) { $14 = -$1; - $$0471 = $14;$$0520 = 1;$$0521 = 16446; + $$0471 = $14;$$0520 = 1;$$0521 = 17350; } else { $15 = $4 & 2048; $16 = ($15|0)==(0); $17 = $4 & 1; $18 = ($17|0)==(0); - $$ = $18 ? (16447) : (16452); - $$$ = $16 ? $$ : (16449); + $$ = $18 ? (17351) : (17356); + $$$ = $16 ? $$ : (17353); $19 = $4 & 2049; $narrow = ($19|0)!=(0); $$534$ = $narrow&1; @@ -33667,7 +35096,7 @@ function _fmt_fp($0,$1,$2,$3,$4,$5) { $$0523 = $8;$$2473 = $$1472; while(1) { $80 = (~~(($$2473))); - $81 = (16477 + ($80)|0); + $81 = (17381 + ($80)|0); $82 = HEAP8[$81>>0]|0; $83 = $82&255; $84 = $83 | $42; @@ -34278,7 +35707,7 @@ function _fmt_fp($0,$1,$2,$3,$4,$5) { } $339 = ($289|0)==(0); if (!($339)) { - _out($0,16493,1); + _out($0,17397,1); } $340 = ($337>>>0)<($$7505>>>0); $341 = ($$3477|0)>(0); @@ -34359,7 +35788,7 @@ function _fmt_fp($0,$1,$2,$3,$4,$5) { $$2 = $372; break; } - _out($0,16493,1); + _out($0,17397,1); $$2 = $372; } else { $369 = ($$0>>>0)>($8>>>0); @@ -34416,9 +35845,9 @@ function _fmt_fp($0,$1,$2,$3,$4,$5) { } else { $27 = $5 & 32; $28 = ($27|0)!=(0); - $29 = $28 ? 16465 : 16469; + $29 = $28 ? 17369 : 17373; $30 = ($$0471 != $$0471) | (0.0 != 0.0); - $31 = $28 ? 18396 : 16473; + $31 = $28 ? 19300 : 17377; $$0510 = $30 ? $31 : $29; $32 = (($$0520) + 3)|0; $33 = $4 & -65537; @@ -34628,7 +36057,7 @@ function ___strerror_l($0,$1) { sp = STACKTOP; $$016 = 0; while(1) { - $3 = (16495 + ($$016)|0); + $3 = (17399 + ($$016)|0); $4 = HEAP8[$3>>0]|0; $5 = $4&255; $6 = ($5|0)==($0|0); @@ -34639,7 +36068,7 @@ function ___strerror_l($0,$1) { $7 = (($$016) + 1)|0; $8 = ($7|0)==(87); if ($8) { - $$01214 = 16583;$$115 = 87; + $$01214 = 17487;$$115 = 87; label = 5; break; } else { @@ -34649,9 +36078,9 @@ function ___strerror_l($0,$1) { if ((label|0) == 2) { $2 = ($$016|0)==(0); if ($2) { - $$012$lcssa = 16583; + $$012$lcssa = 17487; } else { - $$01214 = 16583;$$115 = $$016; + $$01214 = 17487;$$115 = $$016; label = 5; } } @@ -35076,7 +36505,7 @@ function ___floatscan($0,$1,$2) { $$0107127 = 0;$$1128 = $$0; while(1) { $26 = $$1128 | 32; - $27 = (18387 + ($$0107127)|0); + $27 = (19291 + ($$0107127)|0); $28 = HEAP8[$27>>0]|0; $29 = $28 << 24 >> 24; $30 = ($26|0)==($29|0); @@ -35143,7 +36572,7 @@ function ___floatscan($0,$1,$2) { $$2109125 = 0;$$3126 = $$1$lcssa; while(1) { $57 = $$3126 | 32; - $58 = (18396 + ($$2109125)|0); + $58 = (19300 + ($$2109125)|0); $59 = HEAP8[$58>>0]|0; $60 = $59 << 24 >> 24; $61 = ($57|0)==($60|0); @@ -36224,7 +37653,7 @@ function _decfloat($0,$1,$2,$3,$4,$5) { $163 = (+($157>>>0)); $164 = $162 * $163; $165 = (8 - ($105))|0; - $166 = (4408 + ($165<<2)|0); + $166 = (4472 + ($165<<2)|0); $167 = HEAP32[$166>>2]|0; $168 = (+($167|0)); $169 = $164 / $168; @@ -36240,7 +37669,7 @@ function _decfloat($0,$1,$2,$3,$4,$5) { $or$cond419 = $171 | $173; if ($or$cond419) { $174 = (($105) + -10)|0; - $175 = (4408 + ($174<<2)|0); + $175 = (4472 + ($174<<2)|0); $176 = (+($4|0)); $177 = (+($157>>>0)); $178 = $176 * $177; @@ -36261,7 +37690,7 @@ function _decfloat($0,$1,$2,$3,$4,$5) { $185 = (($182) + 9)|0; $186 = $184 ? $182 : $185; $187 = (8 - ($186))|0; - $188 = (4408 + ($187<<2)|0); + $188 = (4472 + ($187<<2)|0); $189 = HEAP32[$188>>2]|0; $190 = ($$3348|0)==(0); if ($190) { @@ -36422,7 +37851,7 @@ function _decfloat($0,$1,$2,$3,$4,$5) { } $256 = (($6) + ($254<<2)|0); $257 = HEAP32[$256>>2]|0; - $258 = (4440 + ($$0336486<<2)|0); + $258 = (4504 + ($$0336486<<2)|0); $259 = HEAP32[$258>>2]|0; $260 = ($257>>>0)<($259>>>0); if ($260) { @@ -37394,7 +38823,7 @@ function _mbrtowc($0,$1,$2,$3) { STACKTOP = STACKTOP + 16|0; if ((STACKTOP|0) >= (STACK_MAX|0)) abortStackOverflow(16|0); $4 = sp; $5 = ($3|0)==(0|0); - $$ = $5 ? 21464 : $3; + $$ = $5 ? 22996 : $3; $6 = HEAP32[$$>>2]|0; $7 = ($1|0)==(0|0); L1: do { @@ -37445,7 +38874,7 @@ function _mbrtowc($0,$1,$2,$3) { break; } $27 = ((($1)) + 1|0); - $28 = (3704 + ($25<<2)|0); + $28 = (3768 + ($25<<2)|0); $29 = HEAP32[$28>>2]|0; $30 = (($2) + -1)|0; $31 = ($30|0)==(0); @@ -37636,6 +39065,14 @@ function ___stpcpy($0,$1) { } return ($$029|0); } +function _ldexp($0,$1) { + $0 = +$0; + $1 = $1|0; + var $2 = 0.0, label = 0, sp = 0; + sp = STACKTOP; + $2 = (+_scalbn($0,$1)); + return (+$2); +} function ___unlist_locked_file($0) { $0 = $0|0; var $$pre = 0, $$sink = 0, $1 = 0, $10 = 0, $11 = 0, $12 = 0, $13 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, $6 = 0, $7 = 0, $8 = 0, $9 = 0, label = 0, sp = 0; @@ -37685,7 +39122,7 @@ function _fopen($0,$1) { $vararg_buffer = sp; $2 = HEAP8[$1>>0]|0; $3 = $2 << 24 >> 24; - $memchr = (_memchr(18400,$3,4)|0); + $memchr = (_memchr(19304,$3,4)|0); $4 = ($memchr|0)==(0|0); if ($4) { $5 = (___errno_location()|0); @@ -37774,7 +39211,7 @@ function ___fdopen($0,$1) { $2 = sp + 56|0; $3 = HEAP8[$1>>0]|0; $4 = $3 << 24 >> 24; - $memchr = (_memchr(18400,$4,4)|0); + $memchr = (_memchr(19304,$4,4)|0); $5 = ($memchr|0)==(0|0); if ($5) { $6 = (___errno_location()|0); @@ -37865,7 +39302,7 @@ function ___fdopen($0,$1) { HEAP32[$36>>2] = 3; $37 = ((($7)) + 12|0); HEAP32[$37>>2] = 2; - $38 = HEAP32[(21404)>>2]|0; + $38 = HEAP32[(22936)>>2]|0; $39 = ($38|0)==(0); if ($39) { $40 = ((($7)) + 76|0); @@ -37898,13 +39335,13 @@ function ___ofl_add($0) { function ___ofl_lock() { var label = 0, sp = 0; sp = STACKTOP; - ___lock((21468|0)); - return (21476|0); + ___lock((23000|0)); + return (23008|0); } function ___ofl_unlock() { var label = 0, sp = 0; sp = STACKTOP; - ___unlock((21468|0)); + ___unlock((23000|0)); return; } function _fclose($0) { @@ -37979,12 +39416,12 @@ function _fflush($0) { $1 = ($0|0)==(0|0); do { if ($1) { - $8 = HEAP32[1070]|0; + $8 = HEAP32[1086]|0; $9 = ($8|0)==(0|0); if ($9) { $29 = 0; } else { - $10 = HEAP32[1070]|0; + $10 = HEAP32[1086]|0; $11 = (_fflush($10)|0); $29 = $11; } @@ -40164,7 +41601,7 @@ function _srand($0) { var $1 = 0, $2 = 0, $3 = 0, $4 = 0, $5 = 0, label = 0, sp = 0; sp = STACKTOP; $1 = (($0) + -1)|0; - $2 = 18680; + $2 = 19584; $3 = $2; HEAP32[$3>>2] = $1; $4 = (($2) + 4)|0; @@ -40371,7 +41808,7 @@ function _vprintf($0,$1) { $1 = $1|0; var $2 = 0, $3 = 0, label = 0, sp = 0; sp = STACKTOP; - $2 = HEAP32[1038]|0; + $2 = HEAP32[1054]|0; $3 = (_vfprintf($2,$0,$1)|0); return ($3|0); } @@ -40478,7 +41915,7 @@ function _strtok($0,$1) { sp = STACKTOP; $2 = ($0|0)==(0|0); if ($2) { - $3 = HEAP32[5370]|0; + $3 = HEAP32[5753]|0; $4 = ($3|0)==(0|0); if ($4) { $$0 = 0; @@ -40497,22 +41934,22 @@ function _strtok($0,$1) { $7 = HEAP8[$6>>0]|0; $8 = ($7<<24>>24)==(0); if ($8) { - HEAP32[5370] = 0; + HEAP32[5753] = 0; $$0 = 0; break; } $9 = (_strcspn($6,$1)|0); $10 = (($6) + ($9)|0); - HEAP32[5370] = $10; + HEAP32[5753] = $10; $11 = HEAP8[$10>>0]|0; $12 = ($11<<24>>24)==(0); if ($12) { - HEAP32[5370] = 0; + HEAP32[5753] = 0; $$0 = $6; break; } else { $13 = ((($10)) + 1|0); - HEAP32[5370] = $13; + HEAP32[5753] = $13; HEAP8[$10>>0] = 0; $$0 = $6; break; @@ -40593,7 +42030,7 @@ function _malloc($0) { $5 = $4 & -8; $6 = $3 ? 16 : $5; $7 = $6 >>> 3; - $8 = HEAP32[5371]|0; + $8 = HEAP32[5754]|0; $9 = $8 >>> $7; $10 = $9 & 3; $11 = ($10|0)==(0); @@ -40602,7 +42039,7 @@ function _malloc($0) { $13 = $12 ^ 1; $14 = (($13) + ($7))|0; $15 = $14 << 1; - $16 = (21524 + ($15<<2)|0); + $16 = (23056 + ($15<<2)|0); $17 = ((($16)) + 8|0); $18 = HEAP32[$17>>2]|0; $19 = ((($18)) + 8|0); @@ -40613,9 +42050,9 @@ function _malloc($0) { $22 = 1 << $14; $23 = $22 ^ -1; $24 = $8 & $23; - HEAP32[5371] = $24; + HEAP32[5754] = $24; } else { - $25 = HEAP32[(21500)>>2]|0; + $25 = HEAP32[(23032)>>2]|0; $26 = ($20>>>0)<($25>>>0); if ($26) { _abort(); @@ -40646,7 +42083,7 @@ function _malloc($0) { $$0 = $19; STACKTOP = sp;return ($$0|0); } - $37 = HEAP32[(21492)>>2]|0; + $37 = HEAP32[(23024)>>2]|0; $38 = ($6>>>0)>($37>>>0); if ($38) { $39 = ($9|0)==(0); @@ -40680,7 +42117,7 @@ function _malloc($0) { $66 = $62 >>> $64; $67 = (($65) + ($66))|0; $68 = $67 << 1; - $69 = (21524 + ($68<<2)|0); + $69 = (23056 + ($68<<2)|0); $70 = ((($69)) + 8|0); $71 = HEAP32[$70>>2]|0; $72 = ((($71)) + 8|0); @@ -40691,10 +42128,10 @@ function _malloc($0) { $75 = 1 << $67; $76 = $75 ^ -1; $77 = $8 & $76; - HEAP32[5371] = $77; + HEAP32[5754] = $77; $98 = $77; } else { - $78 = HEAP32[(21500)>>2]|0; + $78 = HEAP32[(23032)>>2]|0; $79 = ($73>>>0)<($78>>>0); if ($79) { _abort(); @@ -40727,22 +42164,22 @@ function _malloc($0) { HEAP32[$90>>2] = $84; $91 = ($37|0)==(0); if (!($91)) { - $92 = HEAP32[(21504)>>2]|0; + $92 = HEAP32[(23036)>>2]|0; $93 = $37 >>> 3; $94 = $93 << 1; - $95 = (21524 + ($94<<2)|0); + $95 = (23056 + ($94<<2)|0); $96 = 1 << $93; $97 = $98 & $96; $99 = ($97|0)==(0); if ($99) { $100 = $98 | $96; - HEAP32[5371] = $100; + HEAP32[5754] = $100; $$pre = ((($95)) + 8|0); $$0199 = $95;$$pre$phiZ2D = $$pre; } else { $101 = ((($95)) + 8|0); $102 = HEAP32[$101>>2]|0; - $103 = HEAP32[(21500)>>2]|0; + $103 = HEAP32[(23032)>>2]|0; $104 = ($102>>>0)<($103>>>0); if ($104) { _abort(); @@ -40759,12 +42196,12 @@ function _malloc($0) { $107 = ((($92)) + 12|0); HEAP32[$107>>2] = $95; } - HEAP32[(21492)>>2] = $84; - HEAP32[(21504)>>2] = $87; + HEAP32[(23024)>>2] = $84; + HEAP32[(23036)>>2] = $87; $$0 = $72; STACKTOP = sp;return ($$0|0); } - $108 = HEAP32[(21488)>>2]|0; + $108 = HEAP32[(23020)>>2]|0; $109 = ($108|0)==(0); if ($109) { $$0197 = $6; @@ -40792,7 +42229,7 @@ function _malloc($0) { $130 = $126 | $129; $131 = $127 >>> $129; $132 = (($130) + ($131))|0; - $133 = (21788 + ($132<<2)|0); + $133 = (23320 + ($132<<2)|0); $134 = HEAP32[$133>>2]|0; $135 = ((($134)) + 4|0); $136 = HEAP32[$135>>2]|0; @@ -40832,7 +42269,7 @@ function _malloc($0) { } } } - $155 = HEAP32[(21500)>>2]|0; + $155 = HEAP32[(23032)>>2]|0; $156 = ($$0192$lcssa$i>>>0)<($155>>>0); if ($156) { _abort(); @@ -40927,7 +42364,7 @@ function _malloc($0) { if (!($186)) { $187 = ((($$0192$lcssa$i)) + 28|0); $188 = HEAP32[$187>>2]|0; - $189 = (21788 + ($188<<2)|0); + $189 = (23320 + ($188<<2)|0); $190 = HEAP32[$189>>2]|0; $191 = ($$0192$lcssa$i|0)==($190|0); do { @@ -40938,11 +42375,11 @@ function _malloc($0) { $192 = 1 << $188; $193 = $192 ^ -1; $194 = $108 & $193; - HEAP32[(21488)>>2] = $194; + HEAP32[(23020)>>2] = $194; break L73; } } else { - $195 = HEAP32[(21500)>>2]|0; + $195 = HEAP32[(23032)>>2]|0; $196 = ($160>>>0)<($195>>>0); if ($196) { _abort(); @@ -40963,7 +42400,7 @@ function _malloc($0) { } } } while(0); - $201 = HEAP32[(21500)>>2]|0; + $201 = HEAP32[(23032)>>2]|0; $202 = ($$3$i>>>0)<($201>>>0); if ($202) { _abort(); @@ -40993,7 +42430,7 @@ function _malloc($0) { $211 = HEAP32[$210>>2]|0; $212 = ($211|0)==(0|0); if (!($212)) { - $213 = HEAP32[(21500)>>2]|0; + $213 = HEAP32[(23032)>>2]|0; $214 = ($211>>>0)<($213>>>0); if ($214) { _abort(); @@ -41030,22 +42467,22 @@ function _malloc($0) { HEAP32[$229>>2] = $$0193$lcssa$i; $230 = ($37|0)==(0); if (!($230)) { - $231 = HEAP32[(21504)>>2]|0; + $231 = HEAP32[(23036)>>2]|0; $232 = $37 >>> 3; $233 = $232 << 1; - $234 = (21524 + ($233<<2)|0); + $234 = (23056 + ($233<<2)|0); $235 = 1 << $232; $236 = $8 & $235; $237 = ($236|0)==(0); if ($237) { $238 = $8 | $235; - HEAP32[5371] = $238; + HEAP32[5754] = $238; $$pre$i = ((($234)) + 8|0); $$0189$i = $234;$$pre$phi$iZ2D = $$pre$i; } else { $239 = ((($234)) + 8|0); $240 = HEAP32[$239>>2]|0; - $241 = HEAP32[(21500)>>2]|0; + $241 = HEAP32[(23032)>>2]|0; $242 = ($240>>>0)<($241>>>0); if ($242) { _abort(); @@ -41062,8 +42499,8 @@ function _malloc($0) { $245 = ((($231)) + 12|0); HEAP32[$245>>2] = $234; } - HEAP32[(21492)>>2] = $$0193$lcssa$i; - HEAP32[(21504)>>2] = $157; + HEAP32[(23024)>>2] = $$0193$lcssa$i; + HEAP32[(23036)>>2] = $157; } $246 = ((($$0192$lcssa$i)) + 8|0); $$0 = $246; @@ -41079,7 +42516,7 @@ function _malloc($0) { } else { $248 = (($0) + 11)|0; $249 = $248 & -8; - $250 = HEAP32[(21488)>>2]|0; + $250 = HEAP32[(23020)>>2]|0; $251 = ($250|0)==(0); if ($251) { $$0197 = $249; @@ -41119,7 +42556,7 @@ function _malloc($0) { $$0358$i = $277; } } - $278 = (21788 + ($$0358$i<<2)|0); + $278 = (23320 + ($$0358$i<<2)|0); $279 = HEAP32[$278>>2]|0; $280 = ($279|0)==(0|0); L117: do { @@ -41211,7 +42648,7 @@ function _malloc($0) { $328 = $324 | $327; $329 = $325 >>> $327; $330 = (($328) + ($329))|0; - $331 = (21788 + ($330<<2)|0); + $331 = (23320 + ($330<<2)|0); $332 = HEAP32[$331>>2]|0; $$4$ph$i = 0;$$4357$ph$i = $332; } else { @@ -41255,11 +42692,11 @@ function _malloc($0) { if ($344) { $$0197 = $249; } else { - $345 = HEAP32[(21492)>>2]|0; + $345 = HEAP32[(23024)>>2]|0; $346 = (($345) - ($249))|0; $347 = ($$4351$lcssa$i>>>0)<($346>>>0); if ($347) { - $348 = HEAP32[(21500)>>2]|0; + $348 = HEAP32[(23032)>>2]|0; $349 = ($$4$lcssa$i>>>0)<($348>>>0); if ($349) { _abort(); @@ -41356,7 +42793,7 @@ function _malloc($0) { } else { $380 = ((($$4$lcssa$i)) + 28|0); $381 = HEAP32[$380>>2]|0; - $382 = (21788 + ($381<<2)|0); + $382 = (23320 + ($381<<2)|0); $383 = HEAP32[$382>>2]|0; $384 = ($$4$lcssa$i|0)==($383|0); do { @@ -41367,12 +42804,12 @@ function _malloc($0) { $385 = 1 << $381; $386 = $385 ^ -1; $387 = $250 & $386; - HEAP32[(21488)>>2] = $387; + HEAP32[(23020)>>2] = $387; $470 = $387; break L164; } } else { - $388 = HEAP32[(21500)>>2]|0; + $388 = HEAP32[(23032)>>2]|0; $389 = ($353>>>0)<($388>>>0); if ($389) { _abort(); @@ -41394,7 +42831,7 @@ function _malloc($0) { } } } while(0); - $394 = HEAP32[(21500)>>2]|0; + $394 = HEAP32[(23032)>>2]|0; $395 = ($$3372$i>>>0)<($394>>>0); if ($395) { _abort(); @@ -41426,7 +42863,7 @@ function _malloc($0) { if ($405) { $470 = $250; } else { - $406 = HEAP32[(21500)>>2]|0; + $406 = HEAP32[(23032)>>2]|0; $407 = ($404>>>0)<($406>>>0); if ($407) { _abort(); @@ -41467,20 +42904,20 @@ function _malloc($0) { $424 = ($$4351$lcssa$i>>>0)<(256); if ($424) { $425 = $423 << 1; - $426 = (21524 + ($425<<2)|0); - $427 = HEAP32[5371]|0; + $426 = (23056 + ($425<<2)|0); + $427 = HEAP32[5754]|0; $428 = 1 << $423; $429 = $427 & $428; $430 = ($429|0)==(0); if ($430) { $431 = $427 | $428; - HEAP32[5371] = $431; + HEAP32[5754] = $431; $$pre$i210 = ((($426)) + 8|0); $$0368$i = $426;$$pre$phi$i211Z2D = $$pre$i210; } else { $432 = ((($426)) + 8|0); $433 = HEAP32[$432>>2]|0; - $434 = HEAP32[(21500)>>2]|0; + $434 = HEAP32[(23032)>>2]|0; $435 = ($433>>>0)<($434>>>0); if ($435) { _abort(); @@ -41532,7 +42969,7 @@ function _malloc($0) { $$0361$i = $463; } } - $464 = (21788 + ($$0361$i<<2)|0); + $464 = (23320 + ($$0361$i<<2)|0); $465 = ((($350)) + 28|0); HEAP32[$465>>2] = $$0361$i; $466 = ((($350)) + 16|0); @@ -41544,7 +42981,7 @@ function _malloc($0) { $471 = ($469|0)==(0); if ($471) { $472 = $470 | $468; - HEAP32[(21488)>>2] = $472; + HEAP32[(23020)>>2] = $472; HEAP32[$464>>2] = $350; $473 = ((($350)) + 24|0); HEAP32[$473>>2] = $464; @@ -41583,7 +43020,7 @@ function _malloc($0) { } } if ((label|0) == 136) { - $491 = HEAP32[(21500)>>2]|0; + $491 = HEAP32[(23032)>>2]|0; $492 = ($487>>>0)<($491>>>0); if ($492) { _abort(); @@ -41602,7 +43039,7 @@ function _malloc($0) { else if ((label|0) == 139) { $496 = ((($$0345$i)) + 8|0); $497 = HEAP32[$496>>2]|0; - $498 = HEAP32[(21500)>>2]|0; + $498 = HEAP32[(23032)>>2]|0; $499 = ($497>>>0)>=($498>>>0); $not$9$i = ($$0345$i>>>0)>=($498>>>0); $500 = $499 & $not$9$i; @@ -41635,16 +43072,16 @@ function _malloc($0) { } } } while(0); - $506 = HEAP32[(21492)>>2]|0; + $506 = HEAP32[(23024)>>2]|0; $507 = ($506>>>0)<($$0197>>>0); if (!($507)) { $508 = (($506) - ($$0197))|0; - $509 = HEAP32[(21504)>>2]|0; + $509 = HEAP32[(23036)>>2]|0; $510 = ($508>>>0)>(15); if ($510) { $511 = (($509) + ($$0197)|0); - HEAP32[(21504)>>2] = $511; - HEAP32[(21492)>>2] = $508; + HEAP32[(23036)>>2] = $511; + HEAP32[(23024)>>2] = $508; $512 = $508 | 1; $513 = ((($511)) + 4|0); HEAP32[$513>>2] = $512; @@ -41654,8 +43091,8 @@ function _malloc($0) { $516 = ((($509)) + 4|0); HEAP32[$516>>2] = $515; } else { - HEAP32[(21492)>>2] = 0; - HEAP32[(21504)>>2] = 0; + HEAP32[(23024)>>2] = 0; + HEAP32[(23036)>>2] = 0; $517 = $506 | 3; $518 = ((($509)) + 4|0); HEAP32[$518>>2] = $517; @@ -41669,14 +43106,14 @@ function _malloc($0) { $$0 = $523; STACKTOP = sp;return ($$0|0); } - $524 = HEAP32[(21496)>>2]|0; + $524 = HEAP32[(23028)>>2]|0; $525 = ($524>>>0)>($$0197>>>0); if ($525) { $526 = (($524) - ($$0197))|0; - HEAP32[(21496)>>2] = $526; - $527 = HEAP32[(21508)>>2]|0; + HEAP32[(23028)>>2] = $526; + $527 = HEAP32[(23040)>>2]|0; $528 = (($527) + ($$0197)|0); - HEAP32[(21508)>>2] = $528; + HEAP32[(23040)>>2] = $528; $529 = $526 | 1; $530 = ((($528)) + 4|0); HEAP32[$530>>2] = $529; @@ -41687,23 +43124,23 @@ function _malloc($0) { $$0 = $533; STACKTOP = sp;return ($$0|0); } - $534 = HEAP32[5489]|0; + $534 = HEAP32[5872]|0; $535 = ($534|0)==(0); if ($535) { - HEAP32[(21964)>>2] = 4096; - HEAP32[(21960)>>2] = 4096; - HEAP32[(21968)>>2] = -1; - HEAP32[(21972)>>2] = -1; - HEAP32[(21976)>>2] = 0; - HEAP32[(21928)>>2] = 0; + HEAP32[(23496)>>2] = 4096; + HEAP32[(23492)>>2] = 4096; + HEAP32[(23500)>>2] = -1; + HEAP32[(23504)>>2] = -1; + HEAP32[(23508)>>2] = 0; + HEAP32[(23460)>>2] = 0; $536 = $1; $537 = $536 & -16; $538 = $537 ^ 1431655768; HEAP32[$1>>2] = $538; - HEAP32[5489] = $538; + HEAP32[5872] = $538; $542 = 4096; } else { - $$pre$i212 = HEAP32[(21964)>>2]|0; + $$pre$i212 = HEAP32[(23496)>>2]|0; $542 = $$pre$i212; } $539 = (($$0197) + 48)|0; @@ -41716,10 +43153,10 @@ function _malloc($0) { $$0 = 0; STACKTOP = sp;return ($$0|0); } - $546 = HEAP32[(21924)>>2]|0; + $546 = HEAP32[(23456)>>2]|0; $547 = ($546|0)==(0); if (!($547)) { - $548 = HEAP32[(21916)>>2]|0; + $548 = HEAP32[(23448)>>2]|0; $549 = (($548) + ($544))|0; $550 = ($549>>>0)<=($548>>>0); $551 = ($549>>>0)>($546>>>0); @@ -41729,18 +43166,18 @@ function _malloc($0) { STACKTOP = sp;return ($$0|0); } } - $552 = HEAP32[(21928)>>2]|0; + $552 = HEAP32[(23460)>>2]|0; $553 = $552 & 4; $554 = ($553|0)==(0); L244: do { if ($554) { - $555 = HEAP32[(21508)>>2]|0; + $555 = HEAP32[(23040)>>2]|0; $556 = ($555|0)==(0|0); L246: do { if ($556) { label = 163; } else { - $$0$i$i = (21932); + $$0$i$i = (23464); while(1) { $557 = HEAP32[$$0$i$i>>2]|0; $558 = ($557>>>0)>($555>>>0); @@ -41798,7 +43235,7 @@ function _malloc($0) { $$2234253237$i = 0; } else { $568 = $566; - $569 = HEAP32[(21960)>>2]|0; + $569 = HEAP32[(23492)>>2]|0; $570 = (($569) + -1)|0; $571 = $570 & $568; $572 = ($571|0)==(0); @@ -41808,13 +43245,13 @@ function _malloc($0) { $576 = (($575) - ($568))|0; $577 = $572 ? 0 : $576; $$$i = (($577) + ($544))|0; - $578 = HEAP32[(21916)>>2]|0; + $578 = HEAP32[(23448)>>2]|0; $579 = (($$$i) + ($578))|0; $580 = ($$$i>>>0)>($$0197>>>0); $581 = ($$$i>>>0)<(2147483647); $or$cond$i214 = $580 & $581; if ($or$cond$i214) { - $582 = HEAP32[(21924)>>2]|0; + $582 = HEAP32[(23456)>>2]|0; $583 = ($582|0)==(0); if (!($583)) { $584 = ($579>>>0)<=($578>>>0); @@ -41860,7 +43297,7 @@ function _malloc($0) { break L244; } } - $601 = HEAP32[(21964)>>2]|0; + $601 = HEAP32[(23496)>>2]|0; $602 = (($540) - ($$2253$ph$i))|0; $603 = (($602) + ($601))|0; $604 = (0 - ($601))|0; @@ -41885,9 +43322,9 @@ function _malloc($0) { } } } while(0); - $611 = HEAP32[(21928)>>2]|0; + $611 = HEAP32[(23460)>>2]|0; $612 = $611 | 4; - HEAP32[(21928)>>2] = $612; + HEAP32[(23460)>>2] = $612; $$4236$i = $$2234253237$i; label = 178; } else { @@ -41923,35 +43360,35 @@ function _malloc($0) { } } if ((label|0) == 180) { - $626 = HEAP32[(21916)>>2]|0; + $626 = HEAP32[(23448)>>2]|0; $627 = (($626) + ($$723948$i))|0; - HEAP32[(21916)>>2] = $627; - $628 = HEAP32[(21920)>>2]|0; + HEAP32[(23448)>>2] = $627; + $628 = HEAP32[(23452)>>2]|0; $629 = ($627>>>0)>($628>>>0); if ($629) { - HEAP32[(21920)>>2] = $627; + HEAP32[(23452)>>2] = $627; } - $630 = HEAP32[(21508)>>2]|0; + $630 = HEAP32[(23040)>>2]|0; $631 = ($630|0)==(0|0); do { if ($631) { - $632 = HEAP32[(21500)>>2]|0; + $632 = HEAP32[(23032)>>2]|0; $633 = ($632|0)==(0|0); $634 = ($$749$i>>>0)<($632>>>0); $or$cond12$i = $633 | $634; if ($or$cond12$i) { - HEAP32[(21500)>>2] = $$749$i; + HEAP32[(23032)>>2] = $$749$i; } - HEAP32[(21932)>>2] = $$749$i; - HEAP32[(21936)>>2] = $$723948$i; - HEAP32[(21944)>>2] = 0; - $635 = HEAP32[5489]|0; - HEAP32[(21520)>>2] = $635; - HEAP32[(21516)>>2] = -1; + HEAP32[(23464)>>2] = $$749$i; + HEAP32[(23468)>>2] = $$723948$i; + HEAP32[(23476)>>2] = 0; + $635 = HEAP32[5872]|0; + HEAP32[(23052)>>2] = $635; + HEAP32[(23048)>>2] = -1; $$01$i$i = 0; while(1) { $636 = $$01$i$i << 1; - $637 = (21524 + ($636<<2)|0); + $637 = (23056 + ($636<<2)|0); $638 = ((($637)) + 12|0); HEAP32[$638>>2] = $637; $639 = ((($637)) + 8|0); @@ -41974,18 +43411,18 @@ function _malloc($0) { $648 = $645 ? 0 : $647; $649 = (($$749$i) + ($648)|0); $650 = (($641) - ($648))|0; - HEAP32[(21508)>>2] = $649; - HEAP32[(21496)>>2] = $650; + HEAP32[(23040)>>2] = $649; + HEAP32[(23028)>>2] = $650; $651 = $650 | 1; $652 = ((($649)) + 4|0); HEAP32[$652>>2] = $651; $653 = (($649) + ($650)|0); $654 = ((($653)) + 4|0); HEAP32[$654>>2] = 40; - $655 = HEAP32[(21972)>>2]|0; - HEAP32[(21512)>>2] = $655; + $655 = HEAP32[(23504)>>2]|0; + HEAP32[(23044)>>2] = $655; } else { - $$024371$i = (21932); + $$024371$i = (23464); while(1) { $656 = HEAP32[$$024371$i>>2]|0; $657 = ((($$024371$i)) + 4|0); @@ -42017,7 +43454,7 @@ function _malloc($0) { if ($or$cond51$i) { $670 = (($658) + ($$723948$i))|0; HEAP32[$657>>2] = $670; - $671 = HEAP32[(21496)>>2]|0; + $671 = HEAP32[(23028)>>2]|0; $672 = ((($630)) + 8|0); $673 = $672; $674 = $673 & 7; @@ -42028,30 +43465,30 @@ function _malloc($0) { $679 = (($630) + ($678)|0); $680 = (($$723948$i) - ($678))|0; $681 = (($671) + ($680))|0; - HEAP32[(21508)>>2] = $679; - HEAP32[(21496)>>2] = $681; + HEAP32[(23040)>>2] = $679; + HEAP32[(23028)>>2] = $681; $682 = $681 | 1; $683 = ((($679)) + 4|0); HEAP32[$683>>2] = $682; $684 = (($679) + ($681)|0); $685 = ((($684)) + 4|0); HEAP32[$685>>2] = 40; - $686 = HEAP32[(21972)>>2]|0; - HEAP32[(21512)>>2] = $686; + $686 = HEAP32[(23504)>>2]|0; + HEAP32[(23044)>>2] = $686; break; } } } - $687 = HEAP32[(21500)>>2]|0; + $687 = HEAP32[(23032)>>2]|0; $688 = ($$749$i>>>0)<($687>>>0); if ($688) { - HEAP32[(21500)>>2] = $$749$i; + HEAP32[(23032)>>2] = $$749$i; $752 = $$749$i; } else { $752 = $687; } $689 = (($$749$i) + ($$723948$i)|0); - $$124470$i = (21932); + $$124470$i = (23464); while(1) { $690 = HEAP32[$$124470$i>>2]|0; $691 = ($690|0)==($689|0); @@ -42106,21 +43543,21 @@ function _malloc($0) { $725 = ($717|0)==($630|0); do { if ($725) { - $726 = HEAP32[(21496)>>2]|0; + $726 = HEAP32[(23028)>>2]|0; $727 = (($726) + ($722))|0; - HEAP32[(21496)>>2] = $727; - HEAP32[(21508)>>2] = $721; + HEAP32[(23028)>>2] = $727; + HEAP32[(23040)>>2] = $721; $728 = $727 | 1; $729 = ((($721)) + 4|0); HEAP32[$729>>2] = $728; } else { - $730 = HEAP32[(21504)>>2]|0; + $730 = HEAP32[(23036)>>2]|0; $731 = ($717|0)==($730|0); if ($731) { - $732 = HEAP32[(21492)>>2]|0; + $732 = HEAP32[(23024)>>2]|0; $733 = (($732) + ($722))|0; - HEAP32[(21492)>>2] = $733; - HEAP32[(21504)>>2] = $721; + HEAP32[(23024)>>2] = $733; + HEAP32[(23036)>>2] = $721; $734 = $733 | 1; $735 = ((($721)) + 4|0); HEAP32[$735>>2] = $734; @@ -42143,7 +43580,7 @@ function _malloc($0) { $746 = ((($717)) + 12|0); $747 = HEAP32[$746>>2]|0; $748 = $742 << 1; - $749 = (21524 + ($748<<2)|0); + $749 = (23056 + ($748<<2)|0); $750 = ($745|0)==($749|0); do { if (!($750)) { @@ -42166,9 +43603,9 @@ function _malloc($0) { if ($756) { $757 = 1 << $742; $758 = $757 ^ -1; - $759 = HEAP32[5371]|0; + $759 = HEAP32[5754]|0; $760 = $759 & $758; - HEAP32[5371] = $760; + HEAP32[5754] = $760; break; } $761 = ($747|0)==($749|0); @@ -42281,7 +43718,7 @@ function _malloc($0) { } $795 = ((($717)) + 28|0); $796 = HEAP32[$795>>2]|0; - $797 = (21788 + ($796<<2)|0); + $797 = (23320 + ($796<<2)|0); $798 = HEAP32[$797>>2]|0; $799 = ($717|0)==($798|0); do { @@ -42293,12 +43730,12 @@ function _malloc($0) { } $800 = 1 << $796; $801 = $800 ^ -1; - $802 = HEAP32[(21488)>>2]|0; + $802 = HEAP32[(23020)>>2]|0; $803 = $802 & $801; - HEAP32[(21488)>>2] = $803; + HEAP32[(23020)>>2] = $803; break L314; } else { - $804 = HEAP32[(21500)>>2]|0; + $804 = HEAP32[(23032)>>2]|0; $805 = ($768>>>0)<($804>>>0); if ($805) { _abort(); @@ -42319,7 +43756,7 @@ function _malloc($0) { } } } while(0); - $810 = HEAP32[(21500)>>2]|0; + $810 = HEAP32[(23032)>>2]|0; $811 = ($$3$i$i>>>0)<($810>>>0); if ($811) { _abort(); @@ -42351,7 +43788,7 @@ function _malloc($0) { if ($821) { break; } - $822 = HEAP32[(21500)>>2]|0; + $822 = HEAP32[(23032)>>2]|0; $823 = ($820>>>0)<($822>>>0); if ($823) { _abort(); @@ -42384,21 +43821,21 @@ function _malloc($0) { $835 = ($$0287$i$i>>>0)<(256); if ($835) { $836 = $834 << 1; - $837 = (21524 + ($836<<2)|0); - $838 = HEAP32[5371]|0; + $837 = (23056 + ($836<<2)|0); + $838 = HEAP32[5754]|0; $839 = 1 << $834; $840 = $838 & $839; $841 = ($840|0)==(0); do { if ($841) { $842 = $838 | $839; - HEAP32[5371] = $842; + HEAP32[5754] = $842; $$pre$i19$i = ((($837)) + 8|0); $$0295$i$i = $837;$$pre$phi$i20$iZ2D = $$pre$i19$i; } else { $843 = ((($837)) + 8|0); $844 = HEAP32[$843>>2]|0; - $845 = HEAP32[(21500)>>2]|0; + $845 = HEAP32[(23032)>>2]|0; $846 = ($844>>>0)<($845>>>0); if (!($846)) { $$0295$i$i = $844;$$pre$phi$i20$iZ2D = $843; @@ -42453,20 +43890,20 @@ function _malloc($0) { $$0296$i$i = $874; } } while(0); - $875 = (21788 + ($$0296$i$i<<2)|0); + $875 = (23320 + ($$0296$i$i<<2)|0); $876 = ((($721)) + 28|0); HEAP32[$876>>2] = $$0296$i$i; $877 = ((($721)) + 16|0); $878 = ((($877)) + 4|0); HEAP32[$878>>2] = 0; HEAP32[$877>>2] = 0; - $879 = HEAP32[(21488)>>2]|0; + $879 = HEAP32[(23020)>>2]|0; $880 = 1 << $$0296$i$i; $881 = $879 & $880; $882 = ($881|0)==(0); if ($882) { $883 = $879 | $880; - HEAP32[(21488)>>2] = $883; + HEAP32[(23020)>>2] = $883; HEAP32[$875>>2] = $721; $884 = ((($721)) + 24|0); HEAP32[$884>>2] = $875; @@ -42505,7 +43942,7 @@ function _malloc($0) { } } if ((label|0) == 262) { - $902 = HEAP32[(21500)>>2]|0; + $902 = HEAP32[(23032)>>2]|0; $903 = ($898>>>0)<($902>>>0); if ($903) { _abort(); @@ -42524,7 +43961,7 @@ function _malloc($0) { else if ((label|0) == 265) { $907 = ((($$0289$i$i)) + 8|0); $908 = HEAP32[$907>>2]|0; - $909 = HEAP32[(21500)>>2]|0; + $909 = HEAP32[(23032)>>2]|0; $910 = ($908>>>0)>=($909>>>0); $not$7$i$i = ($$0289$i$i>>>0)>=($909>>>0); $911 = $910 & $not$7$i$i; @@ -42551,7 +43988,7 @@ function _malloc($0) { STACKTOP = sp;return ($$0|0); } } - $$0$i$i$i = (21932); + $$0$i$i$i = (23464); while(1) { $916 = HEAP32[$$0$i$i$i>>2]|0; $917 = ($916>>>0)>($630>>>0); @@ -42592,23 +44029,23 @@ function _malloc($0) { $945 = $942 ? 0 : $944; $946 = (($$749$i) + ($945)|0); $947 = (($938) - ($945))|0; - HEAP32[(21508)>>2] = $946; - HEAP32[(21496)>>2] = $947; + HEAP32[(23040)>>2] = $946; + HEAP32[(23028)>>2] = $947; $948 = $947 | 1; $949 = ((($946)) + 4|0); HEAP32[$949>>2] = $948; $950 = (($946) + ($947)|0); $951 = ((($950)) + 4|0); HEAP32[$951>>2] = 40; - $952 = HEAP32[(21972)>>2]|0; - HEAP32[(21512)>>2] = $952; + $952 = HEAP32[(23504)>>2]|0; + HEAP32[(23044)>>2] = $952; $953 = ((($935)) + 4|0); HEAP32[$953>>2] = 27; - ;HEAP32[$936>>2]=HEAP32[(21932)>>2]|0;HEAP32[$936+4>>2]=HEAP32[(21932)+4>>2]|0;HEAP32[$936+8>>2]=HEAP32[(21932)+8>>2]|0;HEAP32[$936+12>>2]=HEAP32[(21932)+12>>2]|0; - HEAP32[(21932)>>2] = $$749$i; - HEAP32[(21936)>>2] = $$723948$i; - HEAP32[(21944)>>2] = 0; - HEAP32[(21940)>>2] = $936; + ;HEAP32[$936>>2]=HEAP32[(23464)>>2]|0;HEAP32[$936+4>>2]=HEAP32[(23464)+4>>2]|0;HEAP32[$936+8>>2]=HEAP32[(23464)+8>>2]|0;HEAP32[$936+12>>2]=HEAP32[(23464)+12>>2]|0; + HEAP32[(23464)>>2] = $$749$i; + HEAP32[(23468)>>2] = $$723948$i; + HEAP32[(23476)>>2] = 0; + HEAP32[(23472)>>2] = $936; $955 = $937; while(1) { $954 = ((($955)) + 4|0); @@ -42637,20 +44074,20 @@ function _malloc($0) { $967 = ($961>>>0)<(256); if ($967) { $968 = $966 << 1; - $969 = (21524 + ($968<<2)|0); - $970 = HEAP32[5371]|0; + $969 = (23056 + ($968<<2)|0); + $970 = HEAP32[5754]|0; $971 = 1 << $966; $972 = $970 & $971; $973 = ($972|0)==(0); if ($973) { $974 = $970 | $971; - HEAP32[5371] = $974; + HEAP32[5754] = $974; $$pre$i$i = ((($969)) + 8|0); $$0211$i$i = $969;$$pre$phi$i$iZ2D = $$pre$i$i; } else { $975 = ((($969)) + 8|0); $976 = HEAP32[$975>>2]|0; - $977 = HEAP32[(21500)>>2]|0; + $977 = HEAP32[(23032)>>2]|0; $978 = ($976>>>0)<($977>>>0); if ($978) { _abort(); @@ -42702,19 +44139,19 @@ function _malloc($0) { $$0212$i$i = $1006; } } - $1007 = (21788 + ($$0212$i$i<<2)|0); + $1007 = (23320 + ($$0212$i$i<<2)|0); $1008 = ((($630)) + 28|0); HEAP32[$1008>>2] = $$0212$i$i; $1009 = ((($630)) + 20|0); HEAP32[$1009>>2] = 0; HEAP32[$933>>2] = 0; - $1010 = HEAP32[(21488)>>2]|0; + $1010 = HEAP32[(23020)>>2]|0; $1011 = 1 << $$0212$i$i; $1012 = $1010 & $1011; $1013 = ($1012|0)==(0); if ($1013) { $1014 = $1010 | $1011; - HEAP32[(21488)>>2] = $1014; + HEAP32[(23020)>>2] = $1014; HEAP32[$1007>>2] = $630; $1015 = ((($630)) + 24|0); HEAP32[$1015>>2] = $1007; @@ -42753,7 +44190,7 @@ function _malloc($0) { } } if ((label|0) == 289) { - $1033 = HEAP32[(21500)>>2]|0; + $1033 = HEAP32[(23032)>>2]|0; $1034 = ($1029>>>0)<($1033>>>0); if ($1034) { _abort(); @@ -42772,7 +44209,7 @@ function _malloc($0) { else if ((label|0) == 292) { $1038 = ((($$0207$i$i)) + 8|0); $1039 = HEAP32[$1038>>2]|0; - $1040 = HEAP32[(21500)>>2]|0; + $1040 = HEAP32[(23032)>>2]|0; $1041 = ($1039>>>0)>=($1040>>>0); $not$$i$i = ($$0207$i$i>>>0)>=($1040>>>0); $1042 = $1041 & $not$$i$i; @@ -42795,14 +44232,14 @@ function _malloc($0) { } } } while(0); - $1048 = HEAP32[(21496)>>2]|0; + $1048 = HEAP32[(23028)>>2]|0; $1049 = ($1048>>>0)>($$0197>>>0); if ($1049) { $1050 = (($1048) - ($$0197))|0; - HEAP32[(21496)>>2] = $1050; - $1051 = HEAP32[(21508)>>2]|0; + HEAP32[(23028)>>2] = $1050; + $1051 = HEAP32[(23040)>>2]|0; $1052 = (($1051) + ($$0197)|0); - HEAP32[(21508)>>2] = $1052; + HEAP32[(23040)>>2] = $1052; $1053 = $1050 | 1; $1054 = ((($1052)) + 4|0); HEAP32[$1054>>2] = $1053; @@ -42845,7 +44282,7 @@ function _free($0) { return; } $2 = ((($0)) + -8|0); - $3 = HEAP32[(21500)>>2]|0; + $3 = HEAP32[(23032)>>2]|0; $4 = ($2>>>0)<($3>>>0); if ($4) { _abort(); @@ -42878,7 +44315,7 @@ function _free($0) { _abort(); // unreachable; } - $19 = HEAP32[(21504)>>2]|0; + $19 = HEAP32[(23036)>>2]|0; $20 = ($16|0)==($19|0); if ($20) { $104 = ((($10)) + 4|0); @@ -42893,7 +44330,7 @@ function _free($0) { $109 = ((($16)) + 4|0); $110 = $17 | 1; $111 = $105 & -2; - HEAP32[(21492)>>2] = $17; + HEAP32[(23024)>>2] = $17; HEAP32[$104>>2] = $111; HEAP32[$109>>2] = $110; HEAP32[$108>>2] = $17; @@ -42907,7 +44344,7 @@ function _free($0) { $25 = ((($16)) + 12|0); $26 = HEAP32[$25>>2]|0; $27 = $21 << 1; - $28 = (21524 + ($27<<2)|0); + $28 = (23056 + ($27<<2)|0); $29 = ($24|0)==($28|0); if (!($29)) { $30 = ($24>>>0)<($3>>>0); @@ -42927,9 +44364,9 @@ function _free($0) { if ($34) { $35 = 1 << $21; $36 = $35 ^ -1; - $37 = HEAP32[5371]|0; + $37 = HEAP32[5754]|0; $38 = $37 & $36; - HEAP32[5371] = $38; + HEAP32[5754] = $38; $$1 = $16;$$1382 = $17;$113 = $16; break; } @@ -43043,7 +44480,7 @@ function _free($0) { } else { $73 = ((($16)) + 28|0); $74 = HEAP32[$73>>2]|0; - $75 = (21788 + ($74<<2)|0); + $75 = (23320 + ($74<<2)|0); $76 = HEAP32[$75>>2]|0; $77 = ($16|0)==($76|0); do { @@ -43053,14 +44490,14 @@ function _free($0) { if ($cond421) { $78 = 1 << $74; $79 = $78 ^ -1; - $80 = HEAP32[(21488)>>2]|0; + $80 = HEAP32[(23020)>>2]|0; $81 = $80 & $79; - HEAP32[(21488)>>2] = $81; + HEAP32[(23020)>>2] = $81; $$1 = $16;$$1382 = $17;$113 = $16; break L10; } } else { - $82 = HEAP32[(21500)>>2]|0; + $82 = HEAP32[(23032)>>2]|0; $83 = ($46>>>0)<($82>>>0); if ($83) { _abort(); @@ -43082,7 +44519,7 @@ function _free($0) { } } } while(0); - $88 = HEAP32[(21500)>>2]|0; + $88 = HEAP32[(23032)>>2]|0; $89 = ($$3>>>0)<($88>>>0); if ($89) { _abort(); @@ -43114,7 +44551,7 @@ function _free($0) { if ($99) { $$1 = $16;$$1382 = $17;$113 = $16; } else { - $100 = HEAP32[(21500)>>2]|0; + $100 = HEAP32[(23032)>>2]|0; $101 = ($98>>>0)<($100>>>0); if ($101) { _abort(); @@ -43149,14 +44586,14 @@ function _free($0) { $118 = $115 & 2; $119 = ($118|0)==(0); if ($119) { - $120 = HEAP32[(21508)>>2]|0; + $120 = HEAP32[(23040)>>2]|0; $121 = ($10|0)==($120|0); - $122 = HEAP32[(21504)>>2]|0; + $122 = HEAP32[(23036)>>2]|0; if ($121) { - $123 = HEAP32[(21496)>>2]|0; + $123 = HEAP32[(23028)>>2]|0; $124 = (($123) + ($$1382))|0; - HEAP32[(21496)>>2] = $124; - HEAP32[(21508)>>2] = $$1; + HEAP32[(23028)>>2] = $124; + HEAP32[(23040)>>2] = $$1; $125 = $124 | 1; $126 = ((($$1)) + 4|0); HEAP32[$126>>2] = $125; @@ -43164,16 +44601,16 @@ function _free($0) { if (!($127)) { return; } - HEAP32[(21504)>>2] = 0; - HEAP32[(21492)>>2] = 0; + HEAP32[(23036)>>2] = 0; + HEAP32[(23024)>>2] = 0; return; } $128 = ($10|0)==($122|0); if ($128) { - $129 = HEAP32[(21492)>>2]|0; + $129 = HEAP32[(23024)>>2]|0; $130 = (($129) + ($$1382))|0; - HEAP32[(21492)>>2] = $130; - HEAP32[(21504)>>2] = $113; + HEAP32[(23024)>>2] = $130; + HEAP32[(23036)>>2] = $113; $131 = $130 | 1; $132 = ((($$1)) + 4|0); HEAP32[$132>>2] = $131; @@ -43192,10 +44629,10 @@ function _free($0) { $140 = ((($10)) + 12|0); $141 = HEAP32[$140>>2]|0; $142 = $136 << 1; - $143 = (21524 + ($142<<2)|0); + $143 = (23056 + ($142<<2)|0); $144 = ($139|0)==($143|0); if (!($144)) { - $145 = HEAP32[(21500)>>2]|0; + $145 = HEAP32[(23032)>>2]|0; $146 = ($139>>>0)<($145>>>0); if ($146) { _abort(); @@ -43213,9 +44650,9 @@ function _free($0) { if ($150) { $151 = 1 << $136; $152 = $151 ^ -1; - $153 = HEAP32[5371]|0; + $153 = HEAP32[5754]|0; $154 = $153 & $152; - HEAP32[5371] = $154; + HEAP32[5754] = $154; break; } $155 = ($141|0)==($143|0); @@ -43223,7 +44660,7 @@ function _free($0) { $$pre442 = ((($141)) + 8|0); $$pre$phi443Z2D = $$pre442; } else { - $156 = HEAP32[(21500)>>2]|0; + $156 = HEAP32[(23032)>>2]|0; $157 = ($141>>>0)<($156>>>0); if ($157) { _abort(); @@ -43283,7 +44720,7 @@ function _free($0) { $$1398 = $187;$$1402 = $186; } } - $189 = HEAP32[(21500)>>2]|0; + $189 = HEAP32[(23032)>>2]|0; $190 = ($$1402>>>0)<($189>>>0); if ($190) { _abort(); @@ -43296,7 +44733,7 @@ function _free($0) { } else { $167 = ((($10)) + 8|0); $168 = HEAP32[$167>>2]|0; - $169 = HEAP32[(21500)>>2]|0; + $169 = HEAP32[(23032)>>2]|0; $170 = ($168>>>0)<($169>>>0); if ($170) { _abort(); @@ -43327,7 +44764,7 @@ function _free($0) { if (!($191)) { $192 = ((($10)) + 28|0); $193 = HEAP32[$192>>2]|0; - $194 = (21788 + ($193<<2)|0); + $194 = (23320 + ($193<<2)|0); $195 = HEAP32[$194>>2]|0; $196 = ($10|0)==($195|0); do { @@ -43337,13 +44774,13 @@ function _free($0) { if ($cond422) { $197 = 1 << $193; $198 = $197 ^ -1; - $199 = HEAP32[(21488)>>2]|0; + $199 = HEAP32[(23020)>>2]|0; $200 = $199 & $198; - HEAP32[(21488)>>2] = $200; + HEAP32[(23020)>>2] = $200; break L108; } } else { - $201 = HEAP32[(21500)>>2]|0; + $201 = HEAP32[(23032)>>2]|0; $202 = ($163>>>0)<($201>>>0); if ($202) { _abort(); @@ -43364,7 +44801,7 @@ function _free($0) { } } } while(0); - $207 = HEAP32[(21500)>>2]|0; + $207 = HEAP32[(23032)>>2]|0; $208 = ($$3400>>>0)<($207>>>0); if ($208) { _abort(); @@ -43394,7 +44831,7 @@ function _free($0) { $217 = HEAP32[$216>>2]|0; $218 = ($217|0)==(0|0); if (!($218)) { - $219 = HEAP32[(21500)>>2]|0; + $219 = HEAP32[(23032)>>2]|0; $220 = ($217>>>0)<($219>>>0); if ($220) { _abort(); @@ -43415,10 +44852,10 @@ function _free($0) { HEAP32[$224>>2] = $223; $225 = (($113) + ($135)|0); HEAP32[$225>>2] = $135; - $226 = HEAP32[(21504)>>2]|0; + $226 = HEAP32[(23036)>>2]|0; $227 = ($$1|0)==($226|0); if ($227) { - HEAP32[(21492)>>2] = $135; + HEAP32[(23024)>>2] = $135; return; } else { $$2 = $135; @@ -43437,20 +44874,20 @@ function _free($0) { $233 = ($$2>>>0)<(256); if ($233) { $234 = $232 << 1; - $235 = (21524 + ($234<<2)|0); - $236 = HEAP32[5371]|0; + $235 = (23056 + ($234<<2)|0); + $236 = HEAP32[5754]|0; $237 = 1 << $232; $238 = $236 & $237; $239 = ($238|0)==(0); if ($239) { $240 = $236 | $237; - HEAP32[5371] = $240; + HEAP32[5754] = $240; $$pre = ((($235)) + 8|0); $$0403 = $235;$$pre$phiZ2D = $$pre; } else { $241 = ((($235)) + 8|0); $242 = HEAP32[$241>>2]|0; - $243 = HEAP32[(21500)>>2]|0; + $243 = HEAP32[(23032)>>2]|0; $244 = ($242>>>0)<($243>>>0); if ($244) { _abort(); @@ -43502,21 +44939,21 @@ function _free($0) { $$0396 = $272; } } - $273 = (21788 + ($$0396<<2)|0); + $273 = (23320 + ($$0396<<2)|0); $274 = ((($$1)) + 28|0); HEAP32[$274>>2] = $$0396; $275 = ((($$1)) + 16|0); $276 = ((($$1)) + 20|0); HEAP32[$276>>2] = 0; HEAP32[$275>>2] = 0; - $277 = HEAP32[(21488)>>2]|0; + $277 = HEAP32[(23020)>>2]|0; $278 = 1 << $$0396; $279 = $277 & $278; $280 = ($279|0)==(0); do { if ($280) { $281 = $277 | $278; - HEAP32[(21488)>>2] = $281; + HEAP32[(23020)>>2] = $281; HEAP32[$273>>2] = $$1; $282 = ((($$1)) + 24|0); HEAP32[$282>>2] = $273; @@ -43554,7 +44991,7 @@ function _free($0) { } } if ((label|0) == 121) { - $300 = HEAP32[(21500)>>2]|0; + $300 = HEAP32[(23032)>>2]|0; $301 = ($296>>>0)<($300>>>0); if ($301) { _abort(); @@ -43573,7 +45010,7 @@ function _free($0) { else if ((label|0) == 124) { $305 = ((($$0384)) + 8|0); $306 = HEAP32[$305>>2]|0; - $307 = HEAP32[(21500)>>2]|0; + $307 = HEAP32[(23032)>>2]|0; $308 = ($306>>>0)>=($307>>>0); $not$437 = ($$0384>>>0)>=($307>>>0); $309 = $308 & $not$437; @@ -43595,12 +45032,12 @@ function _free($0) { } } } while(0); - $314 = HEAP32[(21516)>>2]|0; + $314 = HEAP32[(23048)>>2]|0; $315 = (($314) + -1)|0; - HEAP32[(21516)>>2] = $315; + HEAP32[(23048)>>2] = $315; $316 = ($315|0)==(0); if ($316) { - $$0212$in$i = (21940); + $$0212$in$i = (23472); } else { return; } @@ -43614,7 +45051,7 @@ function _free($0) { $$0212$in$i = $318; } } - HEAP32[(21516)>>2] = -1; + HEAP32[(23048)>>2] = -1; return; } function _realloc($0,$1) { @@ -43686,7 +45123,7 @@ function _try_realloc_chunk($0,$1) { $3 = HEAP32[$2>>2]|0; $4 = $3 & -8; $5 = (($0) + ($4)|0); - $6 = HEAP32[(21500)>>2]|0; + $6 = HEAP32[(23032)>>2]|0; $7 = $3 & 3; $notlhs = ($0>>>0)>=($6>>>0); $notrhs = ($7|0)!=(1); @@ -43716,7 +45153,7 @@ function _try_realloc_chunk($0,$1) { $16 = ($4>>>0)<($15>>>0); if (!($16)) { $17 = (($4) - ($1))|0; - $18 = HEAP32[(21964)>>2]|0; + $18 = HEAP32[(23496)>>2]|0; $19 = $18 << 1; $20 = ($17>>>0)>($19>>>0); if (!($20)) { @@ -43752,10 +45189,10 @@ function _try_realloc_chunk($0,$1) { $$2 = $0; return ($$2|0); } - $34 = HEAP32[(21508)>>2]|0; + $34 = HEAP32[(23040)>>2]|0; $35 = ($5|0)==($34|0); if ($35) { - $36 = HEAP32[(21496)>>2]|0; + $36 = HEAP32[(23028)>>2]|0; $37 = (($36) + ($4))|0; $38 = ($37>>>0)>($1>>>0); $39 = (($37) - ($1))|0; @@ -43771,15 +45208,15 @@ function _try_realloc_chunk($0,$1) { $45 = $44 | 2; HEAP32[$2>>2] = $45; HEAP32[$42>>2] = $41; - HEAP32[(21508)>>2] = $40; - HEAP32[(21496)>>2] = $39; + HEAP32[(23040)>>2] = $40; + HEAP32[(23028)>>2] = $39; $$2 = $0; return ($$2|0); } - $46 = HEAP32[(21504)>>2]|0; + $46 = HEAP32[(23036)>>2]|0; $47 = ($5|0)==($46|0); if ($47) { - $48 = HEAP32[(21492)>>2]|0; + $48 = HEAP32[(23024)>>2]|0; $49 = (($48) + ($4))|0; $50 = ($49>>>0)<($1>>>0); if ($50) { @@ -43815,8 +45252,8 @@ function _try_realloc_chunk($0,$1) { HEAP32[$66>>2] = $68; $storemerge = 0;$storemerge1 = 0; } - HEAP32[(21492)>>2] = $storemerge1; - HEAP32[(21504)>>2] = $storemerge; + HEAP32[(23024)>>2] = $storemerge1; + HEAP32[(23036)>>2] = $storemerge; $$2 = $0; return ($$2|0); } @@ -43843,7 +45280,7 @@ function _try_realloc_chunk($0,$1) { $79 = ((($5)) + 12|0); $80 = HEAP32[$79>>2]|0; $81 = $75 << 1; - $82 = (21524 + ($81<<2)|0); + $82 = (23056 + ($81<<2)|0); $83 = ($78|0)==($82|0); if (!($83)) { $84 = ($78>>>0)<($6>>>0); @@ -43863,9 +45300,9 @@ function _try_realloc_chunk($0,$1) { if ($88) { $89 = 1 << $75; $90 = $89 ^ -1; - $91 = HEAP32[5371]|0; + $91 = HEAP32[5754]|0; $92 = $91 & $90; - HEAP32[5371] = $92; + HEAP32[5754] = $92; break; } $93 = ($80|0)==($82|0); @@ -43974,7 +45411,7 @@ function _try_realloc_chunk($0,$1) { if (!($126)) { $127 = ((($5)) + 28|0); $128 = HEAP32[$127>>2]|0; - $129 = (21788 + ($128<<2)|0); + $129 = (23320 + ($128<<2)|0); $130 = HEAP32[$129>>2]|0; $131 = ($5|0)==($130|0); do { @@ -43984,13 +45421,13 @@ function _try_realloc_chunk($0,$1) { if ($cond) { $132 = 1 << $128; $133 = $132 ^ -1; - $134 = HEAP32[(21488)>>2]|0; + $134 = HEAP32[(23020)>>2]|0; $135 = $134 & $133; - HEAP32[(21488)>>2] = $135; + HEAP32[(23020)>>2] = $135; break L49; } } else { - $136 = HEAP32[(21500)>>2]|0; + $136 = HEAP32[(23032)>>2]|0; $137 = ($100>>>0)<($136>>>0); if ($137) { _abort(); @@ -44011,7 +45448,7 @@ function _try_realloc_chunk($0,$1) { } } } while(0); - $142 = HEAP32[(21500)>>2]|0; + $142 = HEAP32[(23032)>>2]|0; $143 = ($$3>>>0)<($142>>>0); if ($143) { _abort(); @@ -44041,7 +45478,7 @@ function _try_realloc_chunk($0,$1) { $152 = HEAP32[$151>>2]|0; $153 = ($152|0)==(0|0); if (!($153)) { - $154 = HEAP32[(21500)>>2]|0; + $154 = HEAP32[(23032)>>2]|0; $155 = ($152>>>0)<($154>>>0); if ($155) { _abort(); @@ -44126,13 +45563,13 @@ function _dispose_chunk($0,$1) { $10 = (0 - ($7))|0; $11 = (($0) + ($10)|0); $12 = (($7) + ($1))|0; - $13 = HEAP32[(21500)>>2]|0; + $13 = HEAP32[(23032)>>2]|0; $14 = ($11>>>0)<($13>>>0); if ($14) { _abort(); // unreachable; } - $15 = HEAP32[(21504)>>2]|0; + $15 = HEAP32[(23036)>>2]|0; $16 = ($11|0)==($15|0); if ($16) { $100 = ((($2)) + 4|0); @@ -44147,7 +45584,7 @@ function _dispose_chunk($0,$1) { $105 = ((($11)) + 4|0); $106 = $12 | 1; $107 = $101 & -2; - HEAP32[(21492)>>2] = $12; + HEAP32[(23024)>>2] = $12; HEAP32[$100>>2] = $107; HEAP32[$105>>2] = $106; HEAP32[$104>>2] = $12; @@ -44161,7 +45598,7 @@ function _dispose_chunk($0,$1) { $21 = ((($11)) + 12|0); $22 = HEAP32[$21>>2]|0; $23 = $17 << 1; - $24 = (21524 + ($23<<2)|0); + $24 = (23056 + ($23<<2)|0); $25 = ($20|0)==($24|0); if (!($25)) { $26 = ($20>>>0)<($13>>>0); @@ -44181,9 +45618,9 @@ function _dispose_chunk($0,$1) { if ($30) { $31 = 1 << $17; $32 = $31 ^ -1; - $33 = HEAP32[5371]|0; + $33 = HEAP32[5754]|0; $34 = $33 & $32; - HEAP32[5371] = $34; + HEAP32[5754] = $34; $$1 = $11;$$1418 = $12; break; } @@ -44297,7 +45734,7 @@ function _dispose_chunk($0,$1) { } else { $69 = ((($11)) + 28|0); $70 = HEAP32[$69>>2]|0; - $71 = (21788 + ($70<<2)|0); + $71 = (23320 + ($70<<2)|0); $72 = HEAP32[$71>>2]|0; $73 = ($11|0)==($72|0); do { @@ -44307,14 +45744,14 @@ function _dispose_chunk($0,$1) { if ($cond) { $74 = 1 << $70; $75 = $74 ^ -1; - $76 = HEAP32[(21488)>>2]|0; + $76 = HEAP32[(23020)>>2]|0; $77 = $76 & $75; - HEAP32[(21488)>>2] = $77; + HEAP32[(23020)>>2] = $77; $$1 = $11;$$1418 = $12; break L1; } } else { - $78 = HEAP32[(21500)>>2]|0; + $78 = HEAP32[(23032)>>2]|0; $79 = ($42>>>0)<($78>>>0); if ($79) { _abort(); @@ -44336,7 +45773,7 @@ function _dispose_chunk($0,$1) { } } } while(0); - $84 = HEAP32[(21500)>>2]|0; + $84 = HEAP32[(23032)>>2]|0; $85 = ($$3>>>0)<($84>>>0); if ($85) { _abort(); @@ -44368,7 +45805,7 @@ function _dispose_chunk($0,$1) { if ($95) { $$1 = $11;$$1418 = $12; } else { - $96 = HEAP32[(21500)>>2]|0; + $96 = HEAP32[(23032)>>2]|0; $97 = ($94>>>0)<($96>>>0); if ($97) { _abort(); @@ -44387,7 +45824,7 @@ function _dispose_chunk($0,$1) { $$1 = $0;$$1418 = $1; } } while(0); - $108 = HEAP32[(21500)>>2]|0; + $108 = HEAP32[(23032)>>2]|0; $109 = ($2>>>0)<($108>>>0); if ($109) { _abort(); @@ -44398,14 +45835,14 @@ function _dispose_chunk($0,$1) { $112 = $111 & 2; $113 = ($112|0)==(0); if ($113) { - $114 = HEAP32[(21508)>>2]|0; + $114 = HEAP32[(23040)>>2]|0; $115 = ($2|0)==($114|0); - $116 = HEAP32[(21504)>>2]|0; + $116 = HEAP32[(23036)>>2]|0; if ($115) { - $117 = HEAP32[(21496)>>2]|0; + $117 = HEAP32[(23028)>>2]|0; $118 = (($117) + ($$1418))|0; - HEAP32[(21496)>>2] = $118; - HEAP32[(21508)>>2] = $$1; + HEAP32[(23028)>>2] = $118; + HEAP32[(23040)>>2] = $$1; $119 = $118 | 1; $120 = ((($$1)) + 4|0); HEAP32[$120>>2] = $119; @@ -44413,16 +45850,16 @@ function _dispose_chunk($0,$1) { if (!($121)) { return; } - HEAP32[(21504)>>2] = 0; - HEAP32[(21492)>>2] = 0; + HEAP32[(23036)>>2] = 0; + HEAP32[(23024)>>2] = 0; return; } $122 = ($2|0)==($116|0); if ($122) { - $123 = HEAP32[(21492)>>2]|0; + $123 = HEAP32[(23024)>>2]|0; $124 = (($123) + ($$1418))|0; - HEAP32[(21492)>>2] = $124; - HEAP32[(21504)>>2] = $$1; + HEAP32[(23024)>>2] = $124; + HEAP32[(23036)>>2] = $$1; $125 = $124 | 1; $126 = ((($$1)) + 4|0); HEAP32[$126>>2] = $125; @@ -44441,7 +45878,7 @@ function _dispose_chunk($0,$1) { $134 = ((($2)) + 12|0); $135 = HEAP32[$134>>2]|0; $136 = $130 << 1; - $137 = (21524 + ($136<<2)|0); + $137 = (23056 + ($136<<2)|0); $138 = ($133|0)==($137|0); if (!($138)) { $139 = ($133>>>0)<($108>>>0); @@ -44461,9 +45898,9 @@ function _dispose_chunk($0,$1) { if ($143) { $144 = 1 << $130; $145 = $144 ^ -1; - $146 = HEAP32[5371]|0; + $146 = HEAP32[5754]|0; $147 = $146 & $145; - HEAP32[5371] = $147; + HEAP32[5754] = $147; break; } $148 = ($135|0)==($137|0); @@ -44572,7 +46009,7 @@ function _dispose_chunk($0,$1) { if (!($181)) { $182 = ((($2)) + 28|0); $183 = HEAP32[$182>>2]|0; - $184 = (21788 + ($183<<2)|0); + $184 = (23320 + ($183<<2)|0); $185 = HEAP32[$184>>2]|0; $186 = ($2|0)==($185|0); do { @@ -44582,13 +46019,13 @@ function _dispose_chunk($0,$1) { if ($cond17) { $187 = 1 << $183; $188 = $187 ^ -1; - $189 = HEAP32[(21488)>>2]|0; + $189 = HEAP32[(23020)>>2]|0; $190 = $189 & $188; - HEAP32[(21488)>>2] = $190; + HEAP32[(23020)>>2] = $190; break L96; } } else { - $191 = HEAP32[(21500)>>2]|0; + $191 = HEAP32[(23032)>>2]|0; $192 = ($155>>>0)<($191>>>0); if ($192) { _abort(); @@ -44609,7 +46046,7 @@ function _dispose_chunk($0,$1) { } } } while(0); - $197 = HEAP32[(21500)>>2]|0; + $197 = HEAP32[(23032)>>2]|0; $198 = ($$3435>>>0)<($197>>>0); if ($198) { _abort(); @@ -44639,7 +46076,7 @@ function _dispose_chunk($0,$1) { $207 = HEAP32[$206>>2]|0; $208 = ($207|0)==(0|0); if (!($208)) { - $209 = HEAP32[(21500)>>2]|0; + $209 = HEAP32[(23032)>>2]|0; $210 = ($207>>>0)<($209>>>0); if ($210) { _abort(); @@ -44660,10 +46097,10 @@ function _dispose_chunk($0,$1) { HEAP32[$214>>2] = $213; $215 = (($$1) + ($129)|0); HEAP32[$215>>2] = $129; - $216 = HEAP32[(21504)>>2]|0; + $216 = HEAP32[(23036)>>2]|0; $217 = ($$1|0)==($216|0); if ($217) { - HEAP32[(21492)>>2] = $129; + HEAP32[(23024)>>2] = $129; return; } else { $$2 = $129; @@ -44682,20 +46119,20 @@ function _dispose_chunk($0,$1) { $223 = ($$2>>>0)<(256); if ($223) { $224 = $222 << 1; - $225 = (21524 + ($224<<2)|0); - $226 = HEAP32[5371]|0; + $225 = (23056 + ($224<<2)|0); + $226 = HEAP32[5754]|0; $227 = 1 << $222; $228 = $226 & $227; $229 = ($228|0)==(0); if ($229) { $230 = $226 | $227; - HEAP32[5371] = $230; + HEAP32[5754] = $230; $$pre = ((($225)) + 8|0); $$0438 = $225;$$pre$phiZ2D = $$pre; } else { $231 = ((($225)) + 8|0); $232 = HEAP32[$231>>2]|0; - $233 = HEAP32[(21500)>>2]|0; + $233 = HEAP32[(23032)>>2]|0; $234 = ($232>>>0)<($233>>>0); if ($234) { _abort(); @@ -44747,20 +46184,20 @@ function _dispose_chunk($0,$1) { $$0431 = $262; } } - $263 = (21788 + ($$0431<<2)|0); + $263 = (23320 + ($$0431<<2)|0); $264 = ((($$1)) + 28|0); HEAP32[$264>>2] = $$0431; $265 = ((($$1)) + 16|0); $266 = ((($$1)) + 20|0); HEAP32[$266>>2] = 0; HEAP32[$265>>2] = 0; - $267 = HEAP32[(21488)>>2]|0; + $267 = HEAP32[(23020)>>2]|0; $268 = 1 << $$0431; $269 = $267 & $268; $270 = ($269|0)==(0); if ($270) { $271 = $267 | $268; - HEAP32[(21488)>>2] = $271; + HEAP32[(23020)>>2] = $271; HEAP32[$263>>2] = $$1; $272 = ((($$1)) + 24|0); HEAP32[$272>>2] = $263; @@ -44799,7 +46236,7 @@ function _dispose_chunk($0,$1) { } } if ((label|0) == 118) { - $290 = HEAP32[(21500)>>2]|0; + $290 = HEAP32[(23032)>>2]|0; $291 = ($286>>>0)<($290>>>0); if ($291) { _abort(); @@ -44817,7 +46254,7 @@ function _dispose_chunk($0,$1) { else if ((label|0) == 121) { $295 = ((($$0420)) + 8|0); $296 = HEAP32[$295>>2]|0; - $297 = HEAP32[(21500)>>2]|0; + $297 = HEAP32[(23032)>>2]|0; $298 = ($296>>>0)>=($297>>>0); $not$19 = ($$0420>>>0)>=($297>>>0); $299 = $298 & $not$19; diff --git a/shaders/glsl100/grayscale.fs b/examples/shaders/resources/shaders/glsl100/base.fs similarity index 51% rename from shaders/glsl100/grayscale.fs rename to examples/shaders/resources/shaders/glsl100/base.fs index 15174ea57..b004ba0bd 100644 --- a/shaders/glsl100/grayscale.fs +++ b/examples/shaders/resources/shaders/glsl100/base.fs @@ -11,15 +11,14 @@ uniform sampler2D texture0; uniform vec4 colDiffuse; // NOTE: Add here your custom variables +uniform vec2 resolution = vec2(800, 450); void main() { // Texel color fetching from texture sampler - vec4 texelColor = texture2D(texture0, fragTexCoord)*colDiffuse*fragColor; + vec4 texelColor = texture2D(texture0, fragTexCoord); - // Convert texel color to grayscale using NTSC conversion weights - float gray = dot(texelColor.rgb, vec3(0.299, 0.587, 0.114)); + // NOTE: Implement here your fragment shader code - // Calculate final fragment color - gl_FragColor = vec4(gray, gray, gray, texelColor.a); + gl_FragColor = texelColor*colDiffuse; } \ No newline at end of file diff --git a/examples/shaders/resources/shaders/glsl100/blur.fs b/examples/shaders/resources/shaders/glsl100/blur.fs new file mode 100644 index 000000000..96f780e1e --- /dev/null +++ b/examples/shaders/resources/shaders/glsl100/blur.fs @@ -0,0 +1,34 @@ +#version 100 + +precision mediump float; + +// Input vertex attributes (from vertex shader) +varying vec2 fragTexCoord; +varying vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// NOTE: Add here your custom variables + +// NOTE: Render size values must be passed from code +const float renderWidth = 800.0; +const float renderHeight = 450.0; + +vec3 offset = vec3(0.0, 1.3846153846, 3.2307692308); +vec3 weight = vec3(0.2270270270, 0.3162162162, 0.0702702703); + +void main() +{ + // Texel color fetching from texture sampler + vec3 tc = texture2D(texture0, fragTexCoord).rgb*weight.x; + + tc += texture2D(texture0, fragTexCoord + vec2(offset.y)/renderWidth, 0.0).rgb*weight.y; + tc += texture2D(texture0, fragTexCoord - vec2(offset.y)/renderWidth, 0.0).rgb*weight.y; + + tc += texture2D(texture0, fragTexCoord + vec2(offset.z)/renderWidth, 0.0).rgb*weight.z; + tc += texture2D(texture0, fragTexCoord - vec2(offset.z)/renderWidth, 0.0).rgb*weight.z; + + gl_FragColor = vec4(tc, 1.0); +} \ No newline at end of file diff --git a/examples/shaders/resources/shaders/glsl100/cross_hatching.fs b/examples/shaders/resources/shaders/glsl100/cross_hatching.fs new file mode 100644 index 000000000..7d63b0a50 --- /dev/null +++ b/examples/shaders/resources/shaders/glsl100/cross_hatching.fs @@ -0,0 +1,47 @@ +# version 100 + +precision mediump float; + +// Input vertex attributes (from vertex shader) +varying vec2 fragTexCoord; +varying vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// NOTE: Add here your custom variables + +float hatchOffsetY = 5.0; +float lumThreshold01 = 0.9; +float lumThreshold02 = 0.7; +float lumThreshold03 = 0.5; +float lumThreshold04 = 0.3; + +void main() +{ + vec3 tc = vec3(1.0, 1.0, 1.0); + float lum = length(texture2D(texture0, fragTexCoord).rgb); + + if (lum < lumThreshold01) + { + if (mod(gl_FragCoord.x + gl_FragCoord.y, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0); + } + + if (lum < lumThreshold02) + { + if (mod(gl_FragCoord .x - gl_FragCoord .y, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0); + } + + if (lum < lumThreshold03) + { + if (mod(gl_FragCoord .x + gl_FragCoord .y - hatchOffsetY, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0); + } + + if (lum < lumThreshold04) + { + if (mod(gl_FragCoord .x - gl_FragCoord .y - hatchOffsetY, 10.0) == 0.0) tc = vec3(0.0, 0.0, 0.0); + } + + gl_FragColor = vec4(tc, 1.0); +} \ No newline at end of file diff --git a/examples/shaders/resources/shaders/glsl100/cross_stitching.fs b/examples/shaders/resources/shaders/glsl100/cross_stitching.fs new file mode 100644 index 000000000..de6d4f400 --- /dev/null +++ b/examples/shaders/resources/shaders/glsl100/cross_stitching.fs @@ -0,0 +1,57 @@ +# version 100 + +precision mediump float; + +// Input vertex attributes (from vertex shader) +varying vec2 fragTexCoord; +varying vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// NOTE: Add here your custom variables + +// NOTE: Render size values must be passed from code +const float renderWidth = 800.0; +const float renderHeight = 450.0; + +float stitchingSize = 6.0; +int invert = 0; + +vec4 PostFX(sampler2D tex, vec2 uv) +{ + vec4 c = vec4(0.0); + float size = stitchingSize; + vec2 cPos = uv * vec2(renderWidth, renderHeight); + vec2 tlPos = floor(cPos / vec2(size, size)); + tlPos *= size; + + int remX = int(mod(cPos.x, size)); + int remY = int(mod(cPos.y, size)); + + if (remX == 0 && remY == 0) tlPos = cPos; + + vec2 blPos = tlPos; + blPos.y += (size - 1.0); + + if ((remX == remY) || (((int(cPos.x) - int(blPos.x)) == (int(blPos.y) - int(cPos.y))))) + { + if (invert == 1) c = vec4(0.2, 0.15, 0.05, 1.0); + else c = texture2D(tex, tlPos * vec2(1.0/renderWidth, 1.0/renderHeight)) * 1.4; + } + else + { + if (invert == 1) c = texture2D(tex, tlPos * vec2(1.0/renderWidth, 1.0/renderHeight)) * 1.4; + else c = vec4(0.0, 0.0, 0.0, 1.0); + } + + return c; +} + +void main() +{ + vec3 tc = PostFX(texture0, fragTexCoord).rgb; + + gl_FragColor = vec4(tc, 1.0); +} \ No newline at end of file diff --git a/examples/shaders/resources/shaders/glsl100/dream_vision.fs b/examples/shaders/resources/shaders/glsl100/dream_vision.fs new file mode 100644 index 000000000..fa9c5b771 --- /dev/null +++ b/examples/shaders/resources/shaders/glsl100/dream_vision.fs @@ -0,0 +1,37 @@ +#version 100 + +precision mediump float; + +// Input vertex attributes (from vertex shader) +varying vec2 fragTexCoord; +varying vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// NOTE: Add here your custom variables + +void main() +{ + vec4 color = texture2D(texture0, fragTexCoord); + + color += texture2D(texture0, fragTexCoord + 0.001); + color += texture2D(texture0, fragTexCoord + 0.003); + color += texture2D(texture0, fragTexCoord + 0.005); + color += texture2D(texture0, fragTexCoord + 0.007); + color += texture2D(texture0, fragTexCoord + 0.009); + color += texture2D(texture0, fragTexCoord + 0.011); + + color += texture2D(texture0, fragTexCoord - 0.001); + color += texture2D(texture0, fragTexCoord - 0.003); + color += texture2D(texture0, fragTexCoord - 0.005); + color += texture2D(texture0, fragTexCoord - 0.007); + color += texture2D(texture0, fragTexCoord - 0.009); + color += texture2D(texture0, fragTexCoord - 0.011); + + color.rgb = vec3((color.r + color.g + color.b)/3.0); + color = color/9.5; + + gl_FragColor = color; +} \ No newline at end of file diff --git a/examples/shaders/resources/shaders/glsl100/fisheye.fs b/examples/shaders/resources/shaders/glsl100/fisheye.fs new file mode 100644 index 000000000..8beb3d4a8 --- /dev/null +++ b/examples/shaders/resources/shaders/glsl100/fisheye.fs @@ -0,0 +1,43 @@ +#version 100 + +precision mediump float; + +// Input vertex attributes (from vertex shader) +varying vec2 fragTexCoord; +varying vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// NOTE: Add here your custom variables + +const float PI = 3.1415926535; + +void main() +{ + float aperture = 178.0; + float apertureHalf = 0.5 * aperture * (PI / 180.0); + float maxFactor = sin(apertureHalf); + + vec2 uv = vec2(0.0); + vec2 xy = 2.0 * fragTexCoord.xy - 1.0; + float d = length(xy); + + if (d < (2.0 - maxFactor)) + { + d = length(xy * maxFactor); + float z = sqrt(1.0 - d * d); + float r = atan(d, z) / PI; + float phi = atan(xy.y, xy.x); + + uv.x = r * cos(phi) + 0.5; + uv.y = r * sin(phi) + 0.5; + } + else + { + uv = fragTexCoord.xy; + } + + gl_FragColor = texture2D(texture0, uv); +} \ No newline at end of file diff --git a/examples/shaders/resources/shaders/glsl100/pixelizer.fs b/examples/shaders/resources/shaders/glsl100/pixelizer.fs new file mode 100644 index 000000000..44fb0ca20 --- /dev/null +++ b/examples/shaders/resources/shaders/glsl100/pixelizer.fs @@ -0,0 +1,32 @@ +#version 100 + +precision mediump float; + +// Input vertex attributes (from vertex shader) +varying vec2 fragTexCoord; +varying vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// NOTE: Add here your custom variables + +// NOTE: Render size values must be passed from code +const float renderWidth = 800.0; +const float renderHeight = 450.0; + +float pixelWidth = 5.0; +float pixelHeight = 5.0; + +void main() +{ + float dx = pixelWidth*(1.0/renderWidth); + float dy = pixelHeight*(1.0/renderHeight); + + vec2 coord = vec2(dx*floor(fragTexCoord.x/dx), dy*floor(fragTexCoord.y/dy)); + + vec3 tc = texture2D(texture0, coord).rgb; + + gl_FragColor = vec4(tc, 1.0); +} \ No newline at end of file diff --git a/examples/shaders/resources/shaders/glsl100/posterization.fs b/examples/shaders/resources/shaders/glsl100/posterization.fs new file mode 100644 index 000000000..a7942c82e --- /dev/null +++ b/examples/shaders/resources/shaders/glsl100/posterization.fs @@ -0,0 +1,29 @@ +#version 100 + +precision mediump float; + +// Input vertex attributes (from vertex shader) +varying vec2 fragTexCoord; +varying vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// NOTE: Add here your custom variables + +float gamma = 0.6; +float numColors = 8.0; + +void main() +{ + vec3 color = texture2D(texture0, fragTexCoord.xy).rgb; + + color = pow(color, vec3(gamma, gamma, gamma)); + color = color*numColors; + color = floor(color); + color = color/numColors; + color = pow(color, vec3(1.0/gamma)); + + gl_FragColor = vec4(color, 1.0); +} \ No newline at end of file diff --git a/examples/shaders/resources/shaders/glsl100/predator.fs b/examples/shaders/resources/shaders/glsl100/predator.fs new file mode 100644 index 000000000..37dc0bdf7 --- /dev/null +++ b/examples/shaders/resources/shaders/glsl100/predator.fs @@ -0,0 +1,31 @@ +#version 100 + +precision mediump float; + +// Input vertex attributes (from vertex shader) +varying vec2 fragTexCoord; +varying vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// NOTE: Add here your custom variables + +void main() +{ + vec3 color = texture2D(texture0, fragTexCoord).rgb; + vec3 colors[3]; + colors[0] = vec3(0.0, 0.0, 1.0); + colors[1] = vec3(1.0, 1.0, 0.0); + colors[2] = vec3(1.0, 0.0, 0.0); + + float lum = (color.r + color.g + color.b)/3.0; + + vec3 tc = vec3(0.0, 0.0, 0.0); + + if (lum < 0.5) tc = mix(colors[0], colors[1], lum/0.5); + else tc = mix(colors[1], colors[2], (lum - 0.5)/0.5); + + gl_FragColor = vec4(tc, 1.0); +} \ No newline at end of file diff --git a/examples/shaders/resources/shaders/glsl100/scanlines.fs b/examples/shaders/resources/shaders/glsl100/scanlines.fs new file mode 100644 index 000000000..ce649e1a0 --- /dev/null +++ b/examples/shaders/resources/shaders/glsl100/scanlines.fs @@ -0,0 +1,44 @@ +#version 100 + +precision mediump float; + +// Input vertex attributes (from vertex shader) +varying vec2 fragTexCoord; +varying vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// NOTE: Add here your custom variables + +float offset = 0.0; +float frequency = 450.0/3.0; + +uniform float time; + +void main() +{ +/* + // Scanlines method 1 + float tval = 0; //time + vec2 uv = 0.5 + (fragTexCoord - 0.5)*(0.9 + 0.01*sin(0.5*tval)); + + vec4 color = texture2D(texture0, fragTexCoord); + + color = clamp(color*0.5 + 0.5*color*color*1.2, 0.0, 1.0); + color *= 0.5 + 0.5*16.0*uv.x*uv.y*(1.0 - uv.x)*(1.0 - uv.y); + color *= vec4(0.8, 1.0, 0.7, 1); + color *= 0.9 + 0.1*sin(10.0*tval + uv.y*1000.0); + color *= 0.97 + 0.03*sin(110.0*tval); + + fragColor = color; +*/ + // Scanlines method 2 + float globalPos = (fragTexCoord.y + offset) * frequency; + float wavePos = cos((fract(globalPos) - 0.5)*3.14); + + vec4 color = texture2D(texture0, fragTexCoord); + + gl_FragColor = mix(vec4(0.0, 0.3, 0.0, 0.0), color, wavePos); +} \ No newline at end of file diff --git a/examples/shaders/resources/shaders/glsl100/sobel.fs b/examples/shaders/resources/shaders/glsl100/sobel.fs new file mode 100644 index 000000000..745562ad0 --- /dev/null +++ b/examples/shaders/resources/shaders/glsl100/sobel.fs @@ -0,0 +1,40 @@ +#version 100 + +precision mediump float; + +// Input vertex attributes (from vertex shader) +varying vec2 fragTexCoord; +varying vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// NOTE: Add here your custom variables +vec2 resolution = vec2(800.0, 450.0); + +void main() +{ + float x = 1.0/resolution.x; + float y = 1.0/resolution.y; + + vec4 horizEdge = vec4(0.0); + horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y - y))*1.0; + horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y ))*2.0; + horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y + y))*1.0; + horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y - y))*1.0; + horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y ))*2.0; + horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y + y))*1.0; + + vec4 vertEdge = vec4(0.0); + vertEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y - y))*1.0; + vertEdge -= texture2D(texture0, vec2(fragTexCoord.x , fragTexCoord.y - y))*2.0; + vertEdge -= texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y - y))*1.0; + vertEdge += texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y + y))*1.0; + vertEdge += texture2D(texture0, vec2(fragTexCoord.x , fragTexCoord.y + y))*2.0; + vertEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y + y))*1.0; + + vec3 edge = sqrt((horizEdge.rgb*horizEdge.rgb) + (vertEdge.rgb*vertEdge.rgb)); + + gl_FragColor = vec4(edge, texture2D(texture0, fragTexCoord).a); +} \ No newline at end of file diff --git a/examples/shaders/resources/shaders/glsl100/swirl.fs b/examples/shaders/resources/shaders/glsl100/swirl.fs index ca7668b29..b969aab70 100644 --- a/examples/shaders/resources/shaders/glsl100/swirl.fs +++ b/examples/shaders/resources/shaders/glsl100/swirl.fs @@ -12,8 +12,9 @@ uniform vec4 colDiffuse; // NOTE: Add here your custom variables -const float renderWidth = 800.0; // HARDCODED for example! -const float renderHeight = 480.0; // Use uniforms instead... +// NOTE: Render size values should be passed from code +const float renderWidth = 800; +const float renderHeight = 450; float radius = 250.0; float angle = 0.8; diff --git a/shaders/glsl330/template.fs b/examples/shaders/resources/shaders/glsl330/base.fs similarity index 99% rename from shaders/glsl330/template.fs rename to examples/shaders/resources/shaders/glsl330/base.fs index 2e73de14e..f1418df18 100644 --- a/shaders/glsl330/template.fs +++ b/examples/shaders/resources/shaders/glsl330/base.fs @@ -22,3 +22,4 @@ void main() finalColor = texelColor*colDiffuse; } + diff --git a/shaders/glsl330/blur.fs b/examples/shaders/resources/shaders/glsl330/blur.fs similarity index 100% rename from shaders/glsl330/blur.fs rename to examples/shaders/resources/shaders/glsl330/blur.fs diff --git a/shaders/glsl330/cross_hatching.fs b/examples/shaders/resources/shaders/glsl330/cross_hatching.fs similarity index 100% rename from shaders/glsl330/cross_hatching.fs rename to examples/shaders/resources/shaders/glsl330/cross_hatching.fs diff --git a/shaders/glsl330/cross_stitching.fs b/examples/shaders/resources/shaders/glsl330/cross_stitching.fs similarity index 100% rename from shaders/glsl330/cross_stitching.fs rename to examples/shaders/resources/shaders/glsl330/cross_stitching.fs diff --git a/examples/shaders/resources/shaders/glsl330/depth.fs b/examples/shaders/resources/shaders/glsl330/depth.fs index 06d399f9f..2422f3906 100644 --- a/examples/shaders/resources/shaders/glsl330/depth.fs +++ b/examples/shaders/resources/shaders/glsl330/depth.fs @@ -6,7 +6,7 @@ in vec4 fragColor; // Input uniform values uniform sampler2D texture0; // Depth texture -uniform vec4 fragTintColor; +uniform vec4 colDiffuse; // Output fragment color out vec4 finalColor; diff --git a/shaders/glsl330/dream_vision.fs b/examples/shaders/resources/shaders/glsl330/dream_vision.fs similarity index 100% rename from shaders/glsl330/dream_vision.fs rename to examples/shaders/resources/shaders/glsl330/dream_vision.fs diff --git a/shaders/glsl330/fisheye.fs b/examples/shaders/resources/shaders/glsl330/fisheye.fs similarity index 100% rename from shaders/glsl330/fisheye.fs rename to examples/shaders/resources/shaders/glsl330/fisheye.fs diff --git a/examples/shaders/resources/shaders/glsl330/overdraw.fs b/examples/shaders/resources/shaders/glsl330/overdraw.fs new file mode 100644 index 000000000..435217c37 --- /dev/null +++ b/examples/shaders/resources/shaders/glsl330/overdraw.fs @@ -0,0 +1,26 @@ +#version 330 + +// Input vertex attributes (from vertex shader) +in vec2 fragTexCoord; +in vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// Output fragment color +out vec4 finalColor; + +// NOTE: Add here your custom variables + +void main() +{ + // To show overdraw, we just render all the fragments + // with a solid color and some transparency + + // NOTE: This is not a postpro render, + // it will only render all screen texture in a plain color + + finalColor = vec4(1.0, 0.0, 0.0, 0.2); +} + diff --git a/shaders/glsl330/pixel.fs b/examples/shaders/resources/shaders/glsl330/pixelizer.fs similarity index 100% rename from shaders/glsl330/pixel.fs rename to examples/shaders/resources/shaders/glsl330/pixelizer.fs diff --git a/shaders/glsl330/posterization.fs b/examples/shaders/resources/shaders/glsl330/posterization.fs similarity index 100% rename from shaders/glsl330/posterization.fs rename to examples/shaders/resources/shaders/glsl330/posterization.fs diff --git a/shaders/glsl330/predator.fs b/examples/shaders/resources/shaders/glsl330/predator.fs similarity index 100% rename from shaders/glsl330/predator.fs rename to examples/shaders/resources/shaders/glsl330/predator.fs diff --git a/shaders/glsl330/scanlines.fs b/examples/shaders/resources/shaders/glsl330/scanlines.fs similarity index 100% rename from shaders/glsl330/scanlines.fs rename to examples/shaders/resources/shaders/glsl330/scanlines.fs diff --git a/examples/shaders/resources/shaders/glsl330/sobel.fs b/examples/shaders/resources/shaders/glsl330/sobel.fs new file mode 100644 index 000000000..a1430cdd0 --- /dev/null +++ b/examples/shaders/resources/shaders/glsl330/sobel.fs @@ -0,0 +1,41 @@ +#version 330 + +// Input vertex attributes (from vertex shader) +in vec2 fragTexCoord; +in vec4 fragColor; + +// Input uniform values +uniform sampler2D texture0; +uniform vec4 colDiffuse; + +// Output fragment color +out vec4 finalColor; + +// NOTE: Add here your custom variables +uniform vec2 resolution = vec2(800, 450); + +void main() +{ + float x = 1.0/resolution.x; + float y = 1.0/resolution.y; + + vec4 horizEdge = vec4(0.0); + horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y - y))*1.0; + horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y ))*2.0; + horizEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y + y))*1.0; + horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y - y))*1.0; + horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y ))*2.0; + horizEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y + y))*1.0; + + vec4 vertEdge = vec4(0.0); + vertEdge -= texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y - y))*1.0; + vertEdge -= texture2D(texture0, vec2(fragTexCoord.x , fragTexCoord.y - y))*2.0; + vertEdge -= texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y - y))*1.0; + vertEdge += texture2D(texture0, vec2(fragTexCoord.x - x, fragTexCoord.y + y))*1.0; + vertEdge += texture2D(texture0, vec2(fragTexCoord.x , fragTexCoord.y + y))*2.0; + vertEdge += texture2D(texture0, vec2(fragTexCoord.x + x, fragTexCoord.y + y))*1.0; + + vec3 edge = sqrt((horizEdge.rgb*horizEdge.rgb) + (vertEdge.rgb*vertEdge.rgb)); + + finalColor = vec4(edge, texture2D(texture0, fragTexCoord).a); +} \ No newline at end of file diff --git a/examples/shaders/resources/shaders/glsl330/swirl.fs b/examples/shaders/resources/shaders/glsl330/swirl.fs index 5d238ac93..4741e597e 100644 --- a/examples/shaders/resources/shaders/glsl330/swirl.fs +++ b/examples/shaders/resources/shaders/glsl330/swirl.fs @@ -13,8 +13,9 @@ out vec4 finalColor; // NOTE: Add here your custom variables -const float renderWidth = 800.0; // HARDCODED for example! -const float renderHeight = 480.0; // Use uniforms instead... +// NOTE: Render size values should be passed from code +const float renderWidth = 800; +const float renderHeight = 450; float radius = 250.0; float angle = 0.8; diff --git a/examples/shaders/shaders_postprocessing.c b/examples/shaders/shaders_postprocessing.c index 43d1af725..bb239efad 100644 --- a/examples/shaders/shaders_postprocessing.c +++ b/examples/shaders/shaders_postprocessing.c @@ -18,6 +18,48 @@ #include "raylib.h" +#if defined(PLATFORM_DESKTOP) + #define GLSL_VERSION 330 + #define DEFAULT_VERTEX_SHADER "resources/shaders/glsl330/base.vs" +#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB + #define GLSL_VERSION 100 + #define DEFAULT_VERTEX_SHADER "resources/shaders/glsl100/base.vs" +#endif + +#define MAX_POSTPRO_SHADERS 12 + +typedef enum { + FX_GRAYSCALE = 0, + FX_POSTERIZATION, + FX_DREAM_VISION, + FX_PIXELIZER, + FX_CROSS_HATCHING, + FX_CROSS_STITCHING, + FX_PREDATOR_VIEW, + FX_SCANLINES, + FX_FISHEYE, + FX_SOBEL, + FX_BLOOM, + FX_BLUR, + //FX_FXAA +} PostproShader; + +static const char *postproShaderText[] = { + "GRAYSCALE", + "POSTERIZATION", + "DREAM_VISION", + "PIXELIZER", + "CROSS_HATCHING", + "CROSS_STITCHING", + "PREDATOR_VIEW", + "SCANLINES", + "FISHEYE", + "SOBEL", + "BLOOM", + "BLUR", + //"FXAA" +}; + int main() { // Initialization @@ -38,8 +80,25 @@ int main() Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position - Shader shader = LoadShader("resources/shaders/glsl330/base.vs", - "resources/shaders/glsl330/bloom.fs"); // Load postpro shader + // Load all postpro shaders + // NOTE 1: All postpro shader use the base vertex shader (DEFAULT_VERTEX_SHADER) + // NOTE 2: We load the correct shader depending on GLSL version + Shader shaders[MAX_POSTPRO_SHADERS]; + + shaders[FX_GRAYSCALE] = LoadShader(DEFAULT_VERTEX_SHADER, FormatText("resources/shaders/glsl%i/grayscale.fs", GLSL_VERSION)); + shaders[FX_POSTERIZATION] = LoadShader(DEFAULT_VERTEX_SHADER, FormatText("resources/shaders/glsl%i/posterization.fs", GLSL_VERSION)); + shaders[FX_DREAM_VISION] = LoadShader(DEFAULT_VERTEX_SHADER, FormatText("resources/shaders/glsl%i/dream_vision.fs", GLSL_VERSION)); + shaders[FX_PIXELIZER] = LoadShader(DEFAULT_VERTEX_SHADER, FormatText("resources/shaders/glsl%i/pixelizer.fs", GLSL_VERSION)); + shaders[FX_CROSS_HATCHING] = LoadShader(DEFAULT_VERTEX_SHADER, FormatText("resources/shaders/glsl%i/cross_hatching.fs", GLSL_VERSION)); + shaders[FX_CROSS_STITCHING] = LoadShader(DEFAULT_VERTEX_SHADER, FormatText("resources/shaders/glsl%i/cross_stitching.fs", GLSL_VERSION)); + shaders[FX_PREDATOR_VIEW] = LoadShader(DEFAULT_VERTEX_SHADER, FormatText("resources/shaders/glsl%i/predator.fs", GLSL_VERSION)); + shaders[FX_SCANLINES] = LoadShader(DEFAULT_VERTEX_SHADER, FormatText("resources/shaders/glsl%i/scanlines.fs", GLSL_VERSION)); + shaders[FX_FISHEYE] = LoadShader(DEFAULT_VERTEX_SHADER, FormatText("resources/shaders/glsl%i/fisheye.fs", GLSL_VERSION)); + shaders[FX_SOBEL] = LoadShader(DEFAULT_VERTEX_SHADER, FormatText("resources/shaders/glsl%i/sobel.fs", GLSL_VERSION)); + shaders[FX_BLOOM] = LoadShader(DEFAULT_VERTEX_SHADER, FormatText("resources/shaders/glsl%i/bloom.fs", GLSL_VERSION)); + shaders[FX_BLUR] = LoadShader(DEFAULT_VERTEX_SHADER, FormatText("resources/shaders/glsl%i/blur.fs", GLSL_VERSION)); + + int currentShader = FX_GRAYSCALE; // Create a RenderTexture2D to be used for render to texture RenderTexture2D target = LoadRenderTexture(screenWidth, screenHeight); @@ -56,6 +115,12 @@ int main() // Update //---------------------------------------------------------------------------------- UpdateCamera(&camera); // Update camera + + if (IsKeyPressed(KEY_RIGHT)) currentShader++; + else if (IsKeyPressed(KEY_LEFT)) currentShader--; + + if (currentShader >= MAX_POSTPRO_SHADERS) currentShader = 0; + else if (currentShader < 0) currentShader = MAX_POSTPRO_SHADERS - 1; //---------------------------------------------------------------------------------- // Draw @@ -73,21 +138,26 @@ int main() DrawGrid(10, 1.0f); // Draw a grid End3dMode(); - - DrawText("HELLO POSTPROCESSING!", 70, 190, 50, RED); EndTextureMode(); // End drawing to texture (now we have a texture available for next passes) - BeginShaderMode(shader); + // Render previously generated texture using selected postpro shader + BeginShaderMode(shaders[currentShader]); // NOTE: Render texture must be y-flipped due to default OpenGL coordinates (left-bottom) DrawTextureRec(target.texture, (Rectangle){ 0, 0, target.texture.width, -target.texture.height }, (Vector2){ 0, 0 }, WHITE); EndShaderMode(); + DrawRectangle(0, 9, 580, 30, Fade(LIGHTGRAY, 0.7f)); + DrawText("(c) Dwarf 3D model by David Moreno", screenWidth - 200, screenHeight - 20, 10, DARKGRAY); - - DrawFPS(10, 10); + + DrawText("CURRENT POSTPRO SHADER:", 10, 15, 20, BLACK); + DrawText(postproShaderText[currentShader], 330, 15, 20, RED); + DrawText("< >", 540, 10, 30, DARKBLUE); + + DrawFPS(700, 15); EndDrawing(); //---------------------------------------------------------------------------------- @@ -95,7 +165,10 @@ int main() // De-Initialization //-------------------------------------------------------------------------------------- - UnloadShader(shader); // Unload shader + + // Unload all postpro shaders + for (int i = 0; i < MAX_POSTPRO_SHADERS; i++) UnloadShader(shaders[i]); + UnloadTexture(texture); // Unload texture UnloadModel(dwarf); // Unload model UnloadRenderTexture(target); // Unload render texture diff --git a/games/makefile b/games/Makefile similarity index 100% rename from games/makefile rename to games/Makefile diff --git a/games/arkanoid.c b/games/arkanoid.c index f10f93833..6231fb8b9 100644 --- a/games/arkanoid.c +++ b/games/arkanoid.c @@ -77,9 +77,6 @@ static void DrawGame(void); // Draw game (one frame) static void UnloadGame(void); // Unload game static void UpdateDrawFrame(void); // Update and Draw (one frame) -// Additional module functions -static void UpdateBall(void); - //------------------------------------------------------------------------------------ // Program main entry point //------------------------------------------------------------------------------------ @@ -165,13 +162,13 @@ void UpdateGame(void) if (!pause) { - // Player movement + // Player movement logic if (IsKeyDown(KEY_LEFT)) player.position.x -= 5; if ((player.position.x - player.size.x/2) <= 0) player.position.x = player.size.x/2; if (IsKeyDown(KEY_RIGHT)) player.position.x += 5; if ((player.position.x + player.size.x/2) >= screenWidth) player.position.x = screenWidth - player.size.x/2; - // Launch ball + // Ball launching logic if (!ball.active) { if (IsKeyPressed(KEY_SPACE)) @@ -181,7 +178,81 @@ void UpdateGame(void) } } - UpdateBall(); + // Ball movement logic + if (ball.active) + { + ball.position.x += ball.speed.x; + ball.position.y += ball.speed.y; + } + else + { + ball.position = (Vector2){ player.position.x, screenHeight*7/8 - 30 }; + } + + // Collision logic: ball vs walls + if (((ball.position.x + ball.radius) >= screenWidth) || ((ball.position.x - ball.radius) <= 0)) ball.speed.x *= -1; + if ((ball.position.y - ball.radius) <= 0) ball.speed.y *= -1; + if ((ball.position.y + ball.radius) >= screenHeight) + { + ball.speed = (Vector2){ 0, 0 }; + ball.active = false; + + player.life--; + } + + // Collision logic: ball vs player + if (CheckCollisionCircleRec(ball.position, ball.radius, + (Rectangle){ player.position.x - player.size.x/2, player.position.y - player.size.y/2, player.size.x, player.size.y})) + { + if (ball.speed.y > 0) + { + ball.speed.y *= -1; + ball.speed.x = (ball.position.x - player.position.x)/(player.size.x/2)*5; + } + } + + // Collision logic: ball vs bricks + for (int i = 0; i < LINES_OF_BRICKS; i++) + { + for (int j = 0; j < BRICKS_PER_LINE; j++) + { + if (brick[i][j].active) + { + // Hit below + if (((ball.position.y - ball.radius) <= (brick[i][j].position.y + brickSize.y/2)) && + ((ball.position.y - ball.radius) > (brick[i][j].position.y + brickSize.y/2 + ball.speed.y)) && + ((fabs(ball.position.x - brick[i][j].position.x)) < (brickSize.x/2 + ball.radius*2/3)) && (ball.speed.y < 0)) + { + brick[i][j].active = false; + ball.speed.y *= -1; + } + // Hit above + else if (((ball.position.y + ball.radius) >= (brick[i][j].position.y - brickSize.y/2)) && + ((ball.position.y + ball.radius) < (brick[i][j].position.y - brickSize.y/2 + ball.speed.y)) && + ((fabs(ball.position.x - brick[i][j].position.x)) < (brickSize.x/2 + ball.radius*2/3)) && (ball.speed.y > 0)) + { + brick[i][j].active = false; + ball.speed.y *= -1; + } + // Hit left + else if (((ball.position.x + ball.radius) >= (brick[i][j].position.x - brickSize.x/2)) && + ((ball.position.x + ball.radius) < (brick[i][j].position.x - brickSize.x/2 + ball.speed.x)) && + ((fabs(ball.position.y - brick[i][j].position.y)) < (brickSize.y/2 + ball.radius*2/3)) && (ball.speed.x > 0)) + { + brick[i][j].active = false; + ball.speed.x *= -1; + } + // Hit right + else if (((ball.position.x - ball.radius) <= (brick[i][j].position.x + brickSize.x/2)) && + ((ball.position.x - ball.radius) > (brick[i][j].position.x + brickSize.x/2 + ball.speed.x)) && + ((fabs(ball.position.y - brick[i][j].position.y)) < (brickSize.y/2 + ball.radius*2/3)) && (ball.speed.x < 0)) + { + brick[i][j].active = false; + ball.speed.x *= -1; + } + } + } + } // Game over logic if (player.life <= 0) gameOver = true; @@ -260,90 +331,4 @@ void UpdateDrawFrame(void) { UpdateGame(); DrawGame(); -} - -//-------------------------------------------------------------------------------------- -// Additional module functions -//-------------------------------------------------------------------------------------- -static void UpdateBall() -{ - // Update position - if (ball.active) - { - ball.position.x += ball.speed.x; - ball.position.y += ball.speed.y; - } - else - { - ball.position = (Vector2){ player.position.x, screenHeight*7/8 - 30 }; - } - - // Bounce in x - if (((ball.position.x + ball.radius) >= screenWidth) || ((ball.position.x - ball.radius) <= 0)) ball.speed.x *= -1; - - // Bounce in y - if ((ball.position.y - ball.radius) <= 0) ball.speed.y *= -1; - - // Ball reaches bottom of the screen - if ((ball.position.y + ball.radius) >= screenHeight) - { - ball.speed = (Vector2){ 0, 0 }; - ball.active = false; - - player.life--; - } - - // Collision logic: ball vs player - if (CheckCollisionCircleRec(ball.position, ball.radius, - (Rectangle){ player.position.x - player.size.x/2, player.position.y - player.size.y/2, player.size.x, player.size.y})) - { - if (ball.speed.y > 0) - { - ball.speed.y *= -1; - ball.speed.x = (ball.position.x - player.position.x)/(player.size.x/2)*5; - } - } - - // Collision logic: ball vs bricks - for (int i = 0; i < LINES_OF_BRICKS; i++) - { - for (int j = 0; j < BRICKS_PER_LINE; j++) - { - if (brick[i][j].active) - { - // Hit below - if (((ball.position.y - ball.radius) <= (brick[i][j].position.y + brickSize.y/2)) && - ((ball.position.y - ball.radius) > (brick[i][j].position.y + brickSize.y/2 + ball.speed.y)) && - ((fabs(ball.position.x - brick[i][j].position.x)) < (brickSize.x/2 + ball.radius*2/3)) && (ball.speed.y < 0)) - { - brick[i][j].active = false; - ball.speed.y *= -1; - } - // Hit above - else if (((ball.position.y + ball.radius) >= (brick[i][j].position.y - brickSize.y/2)) && - ((ball.position.y + ball.radius) < (brick[i][j].position.y - brickSize.y/2 + ball.speed.y)) && - ((fabs(ball.position.x - brick[i][j].position.x)) < (brickSize.x/2 + ball.radius*2/3)) && (ball.speed.y > 0)) - { - brick[i][j].active = false; - ball.speed.y *= -1; - } - // Hit left - else if (((ball.position.x + ball.radius) >= (brick[i][j].position.x - brickSize.x/2)) && - ((ball.position.x + ball.radius) < (brick[i][j].position.x - brickSize.x/2 + ball.speed.x)) && - ((fabs(ball.position.y - brick[i][j].position.y)) < (brickSize.y/2 + ball.radius*2/3)) && (ball.speed.x > 0)) - { - brick[i][j].active = false; - ball.speed.x *= -1; - } - // Hit right - else if (((ball.position.x - ball.radius) <= (brick[i][j].position.x + brickSize.x/2)) && - ((ball.position.x - ball.radius) > (brick[i][j].position.x + brickSize.x/2 + ball.speed.x)) && - ((fabs(ball.position.y - brick[i][j].position.y)) < (brickSize.y/2 + ball.radius*2/3)) && (ball.speed.x < 0)) - { - brick[i][j].active = false; - ball.speed.x *= -1; - } - } - } - } } \ No newline at end of file diff --git a/games/asteroids.c b/games/asteroids.c index 53ebbd8e3..110638899 100644 --- a/games/asteroids.c +++ b/games/asteroids.c @@ -82,9 +82,9 @@ static Meteor bigMeteor[MAX_BIG_METEORS]; static Meteor mediumMeteor[MAX_MEDIUM_METEORS]; static Meteor smallMeteor[MAX_SMALL_METEORS]; -static int countMediumMeteors; -static int countSmallMeteors; -static int meteorsDestroyed; +static int midMeteorsCount; +static int smallMeteorsCount; +static int destroyedMeteorsCount; //------------------------------------------------------------------------------------ // Module Functions Declaration (local) @@ -95,7 +95,6 @@ static void DrawGame(void); // Draw game (one frame) static void UnloadGame(void); // Unload game static void UpdateDrawFrame(void); // Update and Draw (one frame) -static void InitShoot(Shoot shoot); static void DrawSpaceship(Vector2 position, float rotation, Color color); //------------------------------------------------------------------------------------ @@ -164,7 +163,7 @@ void InitGame(void) player.collider = (Vector3){player.position.x + sin(player.rotation*DEG2RAD)*(shipHeight/2.5f), player.position.y - cos(player.rotation*DEG2RAD)*(shipHeight/2.5f), 12}; player.color = LIGHTGRAY; - meteorsDestroyed = 0; + destroyedMeteorsCount = 0; // Initialization shoot for (int i = 0; i < PLAYER_MAX_SHOOTS; i++) @@ -237,8 +236,8 @@ void InitGame(void) smallMeteor[i].color = BLUE; } - countMediumMeteors = 0; - countSmallMeteors = 0; + midMeteorsCount = 0; + smallMeteorsCount = 0; } // Update game (one frame) @@ -250,17 +249,15 @@ void UpdateGame(void) if (!pause) { - // Player logic - - // Rotation + // Player logic: rotation if (IsKeyDown(KEY_LEFT)) player.rotation -= 5; if (IsKeyDown(KEY_RIGHT)) player.rotation += 5; - // Speed + // Player logic: speed player.speed.x = sin(player.rotation*DEG2RAD)*PLAYER_SPEED; player.speed.y = cos(player.rotation*DEG2RAD)*PLAYER_SPEED; - // Controller + // Player logic: acceleration if (IsKeyDown(KEY_UP)) { if (player.acceleration < 1) player.acceleration += 0.04f; @@ -276,17 +273,17 @@ void UpdateGame(void) else if (player.acceleration < 0) player.acceleration = 0; } - // Movement + // Player logic: movement player.position.x += (player.speed.x*player.acceleration); player.position.y -= (player.speed.y*player.acceleration); - // Wall behaviour for player + // Collision logic: player vs walls if (player.position.x > screenWidth + shipHeight) player.position.x = -(shipHeight); else if (player.position.x < -(shipHeight)) player.position.x = screenWidth + shipHeight; if (player.position.y > (screenHeight + shipHeight)) player.position.y = -(shipHeight); else if (player.position.y < -(shipHeight)) player.position.y = screenHeight + shipHeight; - // Activation of shoot + // Player shoot logic if (IsKeyPressed(KEY_SPACE)) { for (int i = 0; i < PLAYER_MAX_SHOOTS; i++) @@ -318,7 +315,7 @@ void UpdateGame(void) shoot[i].position.x += shoot[i].speed.x; shoot[i].position.y -= shoot[i].speed.y; - // Wall behaviour for shoot + // Collision logic: shoot vs walls if (shoot[i].position.x > screenWidth + shoot[i].radius) { shoot[i].active = false; @@ -351,7 +348,7 @@ void UpdateGame(void) } } - // Collision Player to meteors + // Collision logic: player vs meteors player.collider = (Vector3){player.position.x + sin(player.rotation*DEG2RAD)*(shipHeight/2.5f), player.position.y - cos(player.rotation*DEG2RAD)*(shipHeight/2.5f), 12}; for (int a = 0; a < MAX_BIG_METEORS; a++) @@ -369,16 +366,16 @@ void UpdateGame(void) if (CheckCollisionCircles((Vector2){player.collider.x, player.collider.y}, player.collider.z, smallMeteor[a].position, smallMeteor[a].radius) && smallMeteor[a].active) gameOver = true; } - // Meteor logic + // Meteors logic: big meteors for (int i = 0; i < MAX_BIG_METEORS; i++) { if (bigMeteor[i].active) { - // movement + // Movement bigMeteor[i].position.x += bigMeteor[i].speed.x; bigMeteor[i].position.y += bigMeteor[i].speed.y; - // wall behaviour + // Collision logic: meteor vs wall if (bigMeteor[i].position.x > screenWidth + bigMeteor[i].radius) bigMeteor[i].position.x = -(bigMeteor[i].radius); else if (bigMeteor[i].position.x < 0 - bigMeteor[i].radius) bigMeteor[i].position.x = screenWidth + bigMeteor[i].radius; if (bigMeteor[i].position.y > screenHeight + bigMeteor[i].radius) bigMeteor[i].position.y = -(bigMeteor[i].radius); @@ -386,15 +383,16 @@ void UpdateGame(void) } } + // Meteors logic: medium meteors for (int i = 0; i < MAX_MEDIUM_METEORS; i++) { if (mediumMeteor[i].active) { - // movement + // Movement mediumMeteor[i].position.x += mediumMeteor[i].speed.x; mediumMeteor[i].position.y += mediumMeteor[i].speed.y; - // wall behaviour + // Collision logic: meteor vs wall if (mediumMeteor[i].position.x > screenWidth + mediumMeteor[i].radius) mediumMeteor[i].position.x = -(mediumMeteor[i].radius); else if (mediumMeteor[i].position.x < 0 - mediumMeteor[i].radius) mediumMeteor[i].position.x = screenWidth + mediumMeteor[i].radius; if (mediumMeteor[i].position.y > screenHeight + mediumMeteor[i].radius) mediumMeteor[i].position.y = -(mediumMeteor[i].radius); @@ -402,15 +400,16 @@ void UpdateGame(void) } } + // Meteors logic: small meteors for (int i = 0; i < MAX_SMALL_METEORS; i++) { if (smallMeteor[i].active) { - // movement + // Movement smallMeteor[i].position.x += smallMeteor[i].speed.x; smallMeteor[i].position.y += smallMeteor[i].speed.y; - // wall behaviour + // Collision logic: meteor vs wall if (smallMeteor[i].position.x > screenWidth + smallMeteor[i].radius) smallMeteor[i].position.x = -(smallMeteor[i].radius); else if (smallMeteor[i].position.x < 0 - smallMeteor[i].radius) smallMeteor[i].position.x = screenWidth + smallMeteor[i].radius; if (smallMeteor[i].position.y > screenHeight + smallMeteor[i].radius) smallMeteor[i].position.y = -(smallMeteor[i].radius); @@ -418,7 +417,7 @@ void UpdateGame(void) } } - // Collision behaviour + // Collision logic: player-shoots vs meteors for (int i = 0; i < PLAYER_MAX_SHOOTS; i++) { if ((shoot[i].active)) @@ -430,31 +429,30 @@ void UpdateGame(void) shoot[i].active = false; shoot[i].lifeSpawn = 0; bigMeteor[a].active = false; - meteorsDestroyed++; + destroyedMeteorsCount++; + for (int j = 0; j < 2; j ++) { - if (countMediumMeteors%2 == 0) + if (midMeteorsCount%2 == 0) { - mediumMeteor[countMediumMeteors].position = (Vector2){bigMeteor[a].position.x, bigMeteor[a].position.y}; - mediumMeteor[countMediumMeteors].speed = (Vector2){cos(shoot[i].rotation*DEG2RAD)*METEORS_SPEED*-1, sin(shoot[i].rotation*DEG2RAD)*METEORS_SPEED*-1}; + mediumMeteor[midMeteorsCount].position = (Vector2){bigMeteor[a].position.x, bigMeteor[a].position.y}; + mediumMeteor[midMeteorsCount].speed = (Vector2){cos(shoot[i].rotation*DEG2RAD)*METEORS_SPEED*-1, sin(shoot[i].rotation*DEG2RAD)*METEORS_SPEED*-1}; } else { - mediumMeteor[countMediumMeteors].position = (Vector2){bigMeteor[a].position.x, bigMeteor[a].position.y}; - mediumMeteor[countMediumMeteors].speed = (Vector2){cos(shoot[i].rotation*DEG2RAD)*METEORS_SPEED, sin(shoot[i].rotation*DEG2RAD)*METEORS_SPEED}; + mediumMeteor[midMeteorsCount].position = (Vector2){bigMeteor[a].position.x, bigMeteor[a].position.y}; + mediumMeteor[midMeteorsCount].speed = (Vector2){cos(shoot[i].rotation*DEG2RAD)*METEORS_SPEED, sin(shoot[i].rotation*DEG2RAD)*METEORS_SPEED}; } - mediumMeteor[countMediumMeteors].active = true; - countMediumMeteors ++; + mediumMeteor[midMeteorsCount].active = true; + midMeteorsCount ++; } //bigMeteor[a].position = (Vector2){-100, -100}; bigMeteor[a].color = RED; a = MAX_BIG_METEORS; } } - } - if ((shoot[i].active)) - { + for (int b = 0; b < MAX_MEDIUM_METEORS; b++) { if (mediumMeteor[b].active && CheckCollisionCircles(shoot[i].position, shoot[i].radius, mediumMeteor[b].position, mediumMeteor[b].radius)) @@ -462,31 +460,30 @@ void UpdateGame(void) shoot[i].active = false; shoot[i].lifeSpawn = 0; mediumMeteor[b].active = false; - meteorsDestroyed++; + destroyedMeteorsCount++; + for (int j = 0; j < 2; j ++) { - if (countSmallMeteors%2 == 0) + if (smallMeteorsCount%2 == 0) { - smallMeteor[countSmallMeteors].position = (Vector2){mediumMeteor[b].position.x, mediumMeteor[b].position.y}; - smallMeteor[countSmallMeteors].speed = (Vector2){cos(shoot[i].rotation*DEG2RAD)*METEORS_SPEED*-1, sin(shoot[i].rotation*DEG2RAD)*METEORS_SPEED*-1}; + smallMeteor[smallMeteorsCount].position = (Vector2){mediumMeteor[b].position.x, mediumMeteor[b].position.y}; + smallMeteor[smallMeteorsCount].speed = (Vector2){cos(shoot[i].rotation*DEG2RAD)*METEORS_SPEED*-1, sin(shoot[i].rotation*DEG2RAD)*METEORS_SPEED*-1}; } else { - smallMeteor[countSmallMeteors].position = (Vector2){mediumMeteor[b].position.x, mediumMeteor[b].position.y}; - smallMeteor[countSmallMeteors].speed = (Vector2){cos(shoot[i].rotation*DEG2RAD)*METEORS_SPEED, sin(shoot[i].rotation*DEG2RAD)*METEORS_SPEED}; + smallMeteor[smallMeteorsCount].position = (Vector2){mediumMeteor[b].position.x, mediumMeteor[b].position.y}; + smallMeteor[smallMeteorsCount].speed = (Vector2){cos(shoot[i].rotation*DEG2RAD)*METEORS_SPEED, sin(shoot[i].rotation*DEG2RAD)*METEORS_SPEED}; } - smallMeteor[countSmallMeteors].active = true; - countSmallMeteors ++; + smallMeteor[smallMeteorsCount].active = true; + smallMeteorsCount ++; } //mediumMeteor[b].position = (Vector2){-100, -100}; mediumMeteor[b].color = GREEN; b = MAX_MEDIUM_METEORS; } } - } - if ((shoot[i].active)) - { + for (int c = 0; c < MAX_SMALL_METEORS; c++) { if (smallMeteor[c].active && CheckCollisionCircles(shoot[i].position, shoot[i].radius, smallMeteor[c].position, smallMeteor[c].radius)) @@ -494,7 +491,7 @@ void UpdateGame(void) shoot[i].active = false; shoot[i].lifeSpawn = 0; smallMeteor[c].active = false; - meteorsDestroyed++; + destroyedMeteorsCount++; smallMeteor[c].color = YELLOW; // smallMeteor[c].position = (Vector2){-100, -100}; c = MAX_SMALL_METEORS; @@ -504,7 +501,7 @@ void UpdateGame(void) } } - if (meteorsDestroyed == MAX_BIG_METEORS + MAX_MEDIUM_METEORS + MAX_SMALL_METEORS) victory = true; + if (destroyedMeteorsCount == MAX_BIG_METEORS + MAX_MEDIUM_METEORS + MAX_SMALL_METEORS) victory = true; } else { diff --git a/games/drturtle/makefile b/games/drturtle/Makefile similarity index 100% rename from games/drturtle/makefile rename to games/drturtle/Makefile diff --git a/games/just_do/makefile b/games/just_do/Makefile similarity index 100% rename from games/just_do/makefile rename to games/just_do/Makefile diff --git a/games/light_my_ritual/makefile b/games/light_my_ritual/Makefile similarity index 100% rename from games/light_my_ritual/makefile rename to games/light_my_ritual/Makefile diff --git a/games/skully_escape/makefile b/games/skully_escape/Makefile similarity index 100% rename from games/skully_escape/makefile rename to games/skully_escape/Makefile diff --git a/release/android/armeabi/libraylib.a b/release/android/armeabi/libraylib.a deleted file mode 100644 index 39975a6ba..000000000 Binary files a/release/android/armeabi/libraylib.a and /dev/null differ diff --git a/release/android/raylib.h b/release/android/raylib.h index d28b07a35..429c26ca0 100644 --- a/release/android/raylib.h +++ b/release/android/raylib.h @@ -1,51 +1,51 @@ /********************************************************************************************** * -* raylib 1.6.0 (www.raylib.com) +* raylib v1.7.0 * -* A simple and easy-to-use library to learn videogames programming +* A simple and easy-to-use library to learn videogames programming (www.raylib.com) * -* Features: -* Library written in plain C code (C99) -* Uses PascalCase/camelCase notation -* Hardware accelerated with OpenGL (1.1, 2.1, 3.3 or ES 2.0) -* Unique OpenGL abstraction layer (usable as standalone module): [rlgl] -* Powerful fonts module with SpriteFonts support (XNA bitmap fonts, AngelCode fonts, TTF) -* Multiple textures support, including compressed formats and mipmaps generation -* Basic 3d support for Shapes, Models, Billboards, Heightmaps and Cubicmaps -* Materials (diffuse, normal, specular) and Lighting (point, directional, spot) support -* Powerful math module for Vector, Matrix and Quaternion operations: [raymath] -* Audio loading and playing with streaming support and mixing channels [audio] -* VR stereo rendering support with configurable HMD device parameters -* Multiple platforms support: Windows, Linux, Mac, Android, Raspberry Pi, HTML5 and Oculus Rift CV1 -* Custom color palette for fancy visuals on raywhite background -* Minimal external dependencies (GLFW3, OpenGL, OpenAL) -* Complete binding for LUA [rlua] +* FEATURES: +* - Library written in plain C code (C99) +* - Multiple platforms supported: Windows, Linux, Mac, Android, Raspberry Pi, HTML5. +* - Hardware accelerated with OpenGL (1.1, 2.1, 3.3 or ES 2.0) +* - Unique OpenGL abstraction layer (usable as standalone module): [rlgl] +* - Powerful fonts module with SpriteFonts support (XNA bitmap fonts, AngelCode fonts, TTF) +* - Multiple textures support, including compressed formats and mipmaps generation +* - Basic 3d support for Shapes, Models, Billboards, Heightmaps and Cubicmaps +* - Powerful math module for Vector2, Vector3, Matrix and Quaternion operations: [raymath] +* - Audio loading and playing with streaming support and mixing channels: [audio] +* - VR stereo rendering support with configurable HMD device parameters +* - Minimal external dependencies (GLFW3, OpenGL, OpenAL) +* - Complete bindings for Lua, Go and Pascal * -* External libs: -* GLFW3 (www.glfw.org) for window/context management and input [core] -* GLAD for OpenGL extensions loading (3.3 Core profile, only PLATFORM_DESKTOP) [rlgl] -* stb_image (Sean Barret) for images loading (JPEG, PNG, BMP, TGA) [textures] -* stb_image_write (Sean Barret) for image writting (PNG) [utils] -* stb_truetype (Sean Barret) for ttf fonts loading [text] -* stb_vorbis (Sean Barret) for ogg audio loading [audio] -* jar_xm (Joshua Reisenauer) for XM audio module loading [audio] -* jar_mod (Joshua Reisenauer) for MOD audio module loading [audio] -* dr_flac (David Reid) for FLAC audio file loading [audio] -* OpenAL Soft for audio device/context management [audio] -* tinfl for data decompression (DEFLATE algorithm) [utils] +* NOTES: +* 32bit Colors - Any defined Color is always RGBA (4 byte) +* One custom font is loaded by default when InitWindow() [core] +* If using OpenGL 3.3 or ES2, one default shader is loaded automatically (internally defined) [rlgl] +* If using OpenGL 3.3 or ES2, several vertex buffers (VAO/VBO) are created to manage lines-triangles-quads * -* Some design decisions: -* 32bit Colors - All defined color are always RGBA (struct Color is 4 byte) -* One custom default font could be loaded automatically when InitWindow() [core] -* If using OpenGL 3.3 or ES2, several vertex buffers (VAO/VBO) are created to manage lines-triangles-quads -* If using OpenGL 3.3 or ES2, two default shaders could be loaded automatically (internally defined) +* DEPENDENCIES: +* GLFW3 (www.glfw.org) for window/context management and input [core] +* GLAD for OpenGL extensions loading (3.3 Core profile, only PLATFORM_DESKTOP) [rlgl] +* OpenAL Soft for audio device/context management [audio] * -* -- LICENSE -- +* OPTIONAL DEPENDENCIES: +* stb_image (Sean Barret) for images loading (JPEG, PNG, BMP, TGA) [textures] +* stb_image_write (Sean Barret) for image writting (PNG) [utils] +* stb_truetype (Sean Barret) for ttf fonts loading [text] +* stb_vorbis (Sean Barret) for ogg audio loading [audio] +* jar_xm (Joshua Reisenauer) for XM audio module loading [audio] +* jar_mod (Joshua Reisenauer) for MOD audio module loading [audio] +* dr_flac (David Reid) for FLAC audio file loading [audio] +* tinfl for data decompression (DEFLATE algorithm) [rres] +* +* +* LICENSE: zlib/libpng * * raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified, * BSD-like license that allows static linking with closed source software: * -* Copyright (c) 2013-2016 Ramon Santamaria (@raysan5) +* Copyright (c) 2013-2017 Ramon Santamaria (@raysan5) * * This software is provided "as-is", without any express or implied warranty. In no event * will the authors be held liable for any damages arising from the use of this software. @@ -72,7 +72,6 @@ //#define PLATFORM_ANDROID // Android device //#define PLATFORM_RPI // Raspberry Pi //#define PLATFORM_WEB // HTML5 (emscripten, asm.js) -//#define RLGL_OCULUS_SUPPORT // Oculus Rift CV1 (complementary to PLATFORM_DESKTOP) // Security check in case no PLATFORM_* defined #if !defined(PLATFORM_DESKTOP) && !defined(PLATFORM_ANDROID) && !defined(PLATFORM_RPI) && !defined(PLATFORM_WEB) @@ -98,13 +97,13 @@ #define RAD2DEG (180.0f/PI) // raylib Config Flags -#define FLAG_FULLSCREEN_MODE 1 -#define FLAG_RESIZABLE_WINDOW 2 -#define FLAG_SHOW_LOGO 4 -#define FLAG_SHOW_MOUSE_CURSOR 8 -#define FLAG_CENTERED_MODE 16 -#define FLAG_MSAA_4X_HINT 32 -#define FLAG_VSYNC_HINT 64 +#define FLAG_SHOW_LOGO 1 // Set to show raylib logo at startup +#define FLAG_FULLSCREEN_MODE 2 // Set to run program in fullscreen +#define FLAG_WINDOW_RESIZABLE 4 // Set to allow resizable window +#define FLAG_WINDOW_DECORATED 8 // Set to show window decoration (frame and buttons) +#define FLAG_WINDOW_TRANSPARENT 16 // Set to allow transparent window +#define FLAG_MSAA_4X_HINT 32 // Set to try enabling MSAA 4X +#define FLAG_VSYNC_HINT 64 // Set to try enabling V-Sync on GPU // Keyboard Function Keys #define KEY_SPACE 32 @@ -293,17 +292,13 @@ #define RAYWHITE CLITERAL{ 245, 245, 245, 255 } // My own White (raylib logo) //---------------------------------------------------------------------------------- -// Types and Structures Definition +// Structures Definition //---------------------------------------------------------------------------------- #ifndef __cplusplus // Boolean type - #ifndef __APPLE__ - #if !defined(_STDBOOL_H) - typedef enum { false, true } bool; - #define _STDBOOL_H - #endif - #else - #include + #if !defined(_STDBOOL_H) + typedef enum { false, true } bool; + #define _STDBOOL_H #endif #endif @@ -351,35 +346,41 @@ typedef struct Image { int width; // Image base width int height; // Image base height int mipmaps; // Mipmap levels, 1 by default - int format; // Data format (TextureFormat) + int format; // Data format (TextureFormat type) } Image; -// Texture2D type, bpp always RGBA (32bit) +// Texture2D type // NOTE: Data stored in GPU memory typedef struct Texture2D { unsigned int id; // OpenGL texture id int width; // Texture base width int height; // Texture base height int mipmaps; // Mipmap levels, 1 by default - int format; // Data format (TextureFormat) + int format; // Data format (TextureFormat type) } Texture2D; // RenderTexture2D type, for texture rendering typedef struct RenderTexture2D { - unsigned int id; // Render texture (fbo) id + unsigned int id; // OpenGL Framebuffer Object (FBO) id Texture2D texture; // Color buffer attachment texture Texture2D depth; // Depth buffer attachment texture } RenderTexture2D; +// SpriteFont character info +typedef struct CharInfo { + int value; // Character value (Unicode) + Rectangle rec; // Character rectangle in sprite font + int offsetX; // Character offset X when drawing + int offsetY; // Character offset Y when drawing + int advanceX; // Character advance position X +} CharInfo; + // SpriteFont type, includes texture and charSet array data typedef struct SpriteFont { Texture2D texture; // Font texture - int size; // Base size (default chars height) - int numChars; // Number of characters - int *charValues; // Characters values array - Rectangle *charRecs; // Characters rectangles within the texture - Vector2 *charOffsets; // Characters offsets (on drawing) - int *charAdvanceX; // Characters x advance (on drawing) + int baseSize; // Base size (default chars height) + int charsCount; // Number of characters + CharInfo *chars; // Characters info data } SpriteFont; // Camera type, defines a camera position/orientation in 3d space @@ -466,31 +467,20 @@ typedef struct Model { Material material; // Shader and textures data } Model; -// Light type -typedef struct LightData { - unsigned int id; // Light unique id - bool enabled; // Light enabled - int type; // Light type: LIGHT_POINT, LIGHT_DIRECTIONAL, LIGHT_SPOT - - Vector3 position; // Light position - Vector3 target; // Light direction: LIGHT_DIRECTIONAL and LIGHT_SPOT (cone direction target) - float radius; // Light attenuation radius light intensity reduced with distance (world distance) - - Color diffuse; // Light diffuse color - float intensity; // Light intensity level - - float coneAngle; // Light cone max angle: LIGHT_SPOT -} LightData, *Light; - -// Light types -typedef enum { LIGHT_POINT, LIGHT_DIRECTIONAL, LIGHT_SPOT } LightType; - // Ray type (useful for raycast) typedef struct Ray { Vector3 position; // Ray position (origin) Vector3 direction; // Ray direction } Ray; +// Information returned from a raycast +typedef struct RayHitInfo { + bool hit; // Did the ray hit something? + float distance; // Distance to nearest hit + Vector3 position; // Position of nearest hit + Vector3 normal; // Surface normal of hit +} RayHitInfo; + // Wave type, defines audio wave data typedef struct Wave { unsigned int sampleCount; // Number of samples @@ -523,6 +513,34 @@ typedef struct AudioStream { unsigned int buffers[2]; // OpenAL audio buffers (double buffering) } AudioStream; +// rRES data returned when reading a resource, +// it contains all required data for user (24 byte) +typedef struct RRESData { + unsigned int type; // Resource type (4 byte) + + unsigned int param1; // Resouce parameter 1 (4 byte) + unsigned int param2; // Resouce parameter 2 (4 byte) + unsigned int param3; // Resouce parameter 3 (4 byte) + unsigned int param4; // Resouce parameter 4 (4 byte) + + void *data; // Resource data pointer (4 byte) +} RRESData; + +// RRES type (pointer to RRESData array) +typedef struct RRESData *RRES; + +//---------------------------------------------------------------------------------- +// Enumerators Definition +//---------------------------------------------------------------------------------- +// Trace log type +typedef enum { + INFO = 0, + WARNING, + ERROR, + DEBUG, + OTHER +} LogType; + // Texture formats // NOTE: Support depends on OpenGL version and platform typedef enum { @@ -533,6 +551,7 @@ typedef enum { UNCOMPRESSED_R5G5B5A1, // 16 bpp (1 bit alpha) UNCOMPRESSED_R4G4B4A4, // 16 bpp (4 bit alpha) UNCOMPRESSED_R8G8B8A8, // 32 bpp + UNCOMPRESSED_R32G32B32, // 32 bit per channel (float) - HDR COMPRESSED_DXT1_RGB, // 4 bpp (no alpha) COMPRESSED_DXT1_RGBA, // 4 bpp (1 bit alpha) COMPRESSED_DXT3_RGBA, // 8 bpp @@ -549,7 +568,7 @@ typedef enum { // Texture parameters: filter mode // NOTE 1: Filtering considers mipmaps if available in the texture // NOTE 2: Filter is accordingly set for minification and magnification -typedef enum { +typedef enum { FILTER_POINT = 0, // No filter, just pixel aproximation FILTER_BILINEAR, // Linear filtering FILTER_TRILINEAR, // Trilinear filtering (linear with mipmaps) @@ -559,10 +578,18 @@ typedef enum { } TextureFilterMode; // Texture parameters: wrap mode -typedef enum { WRAP_REPEAT = 0, WRAP_CLAMP, WRAP_MIRROR } TextureWrapMode; +typedef enum { + WRAP_REPEAT = 0, + WRAP_CLAMP, + WRAP_MIRROR +} TextureWrapMode; // Color blending modes (pre-defined) -typedef enum { BLEND_ALPHA = 0, BLEND_ADDITIVE, BLEND_MULTIPLIED } BlendMode; +typedef enum { + BLEND_ALPHA = 0, + BLEND_ADDITIVE, + BLEND_MULTIPLIED +} BlendMode; // Gestures type // NOTE: It could be used as flags to enable only some gestures @@ -581,12 +608,12 @@ typedef enum { } Gestures; // Camera system modes -typedef enum { - CAMERA_CUSTOM = 0, - CAMERA_FREE, - CAMERA_ORBITAL, - CAMERA_FIRST_PERSON, - CAMERA_THIRD_PERSON +typedef enum { + CAMERA_CUSTOM = 0, + CAMERA_FREE, + CAMERA_ORBITAL, + CAMERA_FIRST_PERSON, + CAMERA_THIRD_PERSON } CameraMode; // Head Mounted Display devices @@ -602,6 +629,18 @@ typedef enum { HMD_FOVE_VR, } VrDevice; +// RRESData type +typedef enum { + RRES_TYPE_RAW = 0, + RRES_TYPE_IMAGE, + RRES_TYPE_WAVE, + RRES_TYPE_VERTEX, + RRES_TYPE_TEXT, + RRES_TYPE_FONT_IMAGE, + RRES_TYPE_FONT_CHARDATA, // CharInfo data array + RRES_TYPE_DIRECTORY +} RRESDataType; + #ifdef __cplusplus extern "C" { // Prevents name mangling of functions #endif @@ -615,44 +654,48 @@ extern "C" { // Prevents name mangling of functions // Window and Graphics Device Functions (Module: core) //------------------------------------------------------------------------------------ #if defined(PLATFORM_ANDROID) -RLAPI void InitWindow(int width, int height, void *state); // Init Android Activity and OpenGL Graphics (struct android_app) +RLAPI void InitWindow(int width, int height, void *state); // Initialize Android activity #elif defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI) || defined(PLATFORM_WEB) -RLAPI void InitWindow(int width, int height, const char *title); // Initialize Window and OpenGL Graphics +RLAPI void InitWindow(int width, int height, const char *title); // Initialize window and OpenGL context #endif -RLAPI void CloseWindow(void); // Close Window and Terminate Context -RLAPI bool WindowShouldClose(void); // Detect if KEY_ESCAPE pressed or Close icon pressed -RLAPI bool IsWindowMinimized(void); // Detect if window has been minimized (or lost focus) -RLAPI void ToggleFullscreen(void); // Fullscreen toggle (only PLATFORM_DESKTOP) +RLAPI void CloseWindow(void); // Close window and unload OpenGL context +RLAPI bool WindowShouldClose(void); // Check if KEY_ESCAPE pressed or Close icon pressed +RLAPI bool IsWindowMinimized(void); // Check if window has been minimized (or lost focus) +RLAPI void ToggleFullscreen(void); // Toggle fullscreen mode (only PLATFORM_DESKTOP) +RLAPI void SetWindowIcon(Image image); // Set icon for window (only PLATFORM_DESKTOP) +RLAPI void SetWindowPosition(int x, int y); // Set window position on screen (only PLATFORM_DESKTOP) +RLAPI void SetWindowMonitor(int monitor); // Set monitor for the current window (fullscreen mode) +RLAPI void SetWindowMinSize(int width, int height); // Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE) RLAPI int GetScreenWidth(void); // Get current screen width RLAPI int GetScreenHeight(void); // Get current screen height #if !defined(PLATFORM_ANDROID) RLAPI void ShowCursor(void); // Shows cursor RLAPI void HideCursor(void); // Hides cursor -RLAPI bool IsCursorHidden(void); // Returns true if cursor is not visible -RLAPI void EnableCursor(void); // Enables cursor -RLAPI void DisableCursor(void); // Disables cursor +RLAPI bool IsCursorHidden(void); // Check if cursor is not visible +RLAPI void EnableCursor(void); // Enables cursor (unlock cursor) +RLAPI void DisableCursor(void); // Disables cursor (lock cursor) #endif -RLAPI void ClearBackground(Color color); // Sets Background Color -RLAPI void BeginDrawing(void); // Setup drawing canvas to start drawing -RLAPI void EndDrawing(void); // End canvas drawing and Swap Buffers (Double Buffering) +RLAPI void ClearBackground(Color color); // Set background color (framebuffer clear color) +RLAPI void BeginDrawing(void); // Setup canvas (framebuffer) to start drawing +RLAPI void EndDrawing(void); // End canvas drawing and swap buffers (double buffering) -RLAPI void Begin2dMode(Camera2D camera); // Initialize 2D mode with custom camera -RLAPI void End2dMode(void); // Ends 2D mode custom camera usage -RLAPI void Begin3dMode(Camera camera); // Initializes 3D mode for drawing (Camera setup) +RLAPI void Begin2dMode(Camera2D camera); // Initialize 2D mode with custom camera (2D) +RLAPI void End2dMode(void); // Ends 2D mode with custom camera +RLAPI void Begin3dMode(Camera camera); // Initializes 3D mode with custom camera (3D) RLAPI void End3dMode(void); // Ends 3D mode and returns to default 2D orthographic mode RLAPI void BeginTextureMode(RenderTexture2D target); // Initializes render texture for drawing RLAPI void EndTextureMode(void); // Ends drawing to render texture RLAPI Ray GetMouseRay(Vector2 mousePosition, Camera camera); // Returns a ray trace from mouse position -RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Returns the screen space position from a 3d world space position +RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Returns the screen space position for a 3d world space position RLAPI Matrix GetCameraMatrix(Camera camera); // Returns camera transform matrix (view matrix) RLAPI void SetTargetFPS(int fps); // Set target FPS (maximum) -RLAPI float GetFPS(void); // Returns current FPS -RLAPI float GetFrameTime(void); // Returns time in seconds for one frame +RLAPI int GetFPS(void); // Returns current FPS +RLAPI float GetFrameTime(void); // Returns time in seconds for last frame drawn RLAPI Color GetColor(int hexValue); // Returns a Color struct from hexadecimal value RLAPI int GetHexValue(Color color); // Returns hexadecimal value for a Color @@ -663,15 +706,21 @@ RLAPI float *MatrixToFloat(Matrix mat); // Converts Ma RLAPI int GetRandomValue(int min, int max); // Returns a random value between min and max (both included) RLAPI Color Fade(Color color, float alpha); // Color fade-in or fade-out, alpha goes from 0.0f to 1.0f -RLAPI void SetConfigFlags(char flags); // Setup some window configuration flags -RLAPI void ShowLogo(void); // Activates raylib logo at startup (can be done with flags) +RLAPI void ShowLogo(void); // Activate raylib logo at startup (can be done with flags) +RLAPI void SetConfigFlags(char flags); // Setup window configuration flags (view FLAGS) +RLAPI void TraceLog(int logType, const char *text, ...); // Show trace log messages (INFO, WARNING, ERROR, DEBUG) +RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (saved a .png) -RLAPI bool IsFileDropped(void); // Check if a file have been dropped into window -RLAPI char **GetDroppedFiles(int *count); // Retrieve dropped files into window +RLAPI bool IsFileExtension(const char *fileName, const char *ext);// Check file extension +RLAPI const char *GetDirectoryPath(const char *fileName); // Get directory for a given fileName (with path) +RLAPI const char *GetWorkingDirectory(void); // Get current working directory +RLAPI bool ChangeDirectory(const char *dir); // Change working directory, returns true if success +RLAPI bool IsFileDropped(void); // Check if a file has been dropped into window +RLAPI char **GetDroppedFiles(int *count); // Get dropped files names RLAPI void ClearDroppedFiles(void); // Clear dropped files paths buffer -RLAPI void StorageSaveValue(int position, int value); // Storage save integer value (to defined position) -RLAPI int StorageLoadValue(int position); // Storage load integer value (from defined position) +RLAPI void StorageSaveValue(int position, int value); // Save integer value to storage file (to defined position) +RLAPI int StorageLoadValue(int position); // Load integer value from storage file (from defined position) //------------------------------------------------------------------------------------ // Input Handling Functions (Module: core) @@ -741,12 +790,15 @@ RLAPI void DrawPixel(int posX, int posY, Color color); RLAPI void DrawPixelV(Vector2 position, Color color); // Draw a pixel (Vector version) RLAPI void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw a line RLAPI void DrawLineV(Vector2 startPos, Vector2 endPos, Color color); // Draw a line (Vector version) +RLAPI void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line defining thickness +RLAPI void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line using cubic-bezier curves in-out RLAPI void DrawCircle(int centerX, int centerY, float radius, Color color); // Draw a color-filled circle RLAPI void DrawCircleGradient(int centerX, int centerY, float radius, Color color1, Color color2); // Draw a gradient-filled circle RLAPI void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version) RLAPI void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rectangle RLAPI void DrawRectangleRec(Rectangle rec, Color color); // Draw a color-filled rectangle +RLAPI void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color); // Draw a color-filled rectangle with pro parameters RLAPI void DrawRectangleGradient(int posX, int posY, int width, int height, Color color1, Color color2); // Draw a gradient-filled rectangle RLAPI void DrawRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rectangle (Vector version) RLAPI void DrawRectangleLines(int posX, int posY, int width, int height, Color color); // Draw rectangle outline @@ -767,21 +819,19 @@ RLAPI bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Ve //------------------------------------------------------------------------------------ // Texture Loading and Drawing Functions (Module: textures) //------------------------------------------------------------------------------------ -RLAPI Image LoadImage(const char *fileName); // Load an image into CPU memory (RAM) -RLAPI Image LoadImageEx(Color *pixels, int width, int height); // Load image data from Color array data (RGBA - 32bit) -RLAPI Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize); // Load image data from RAW file -RLAPI Image LoadImageFromRES(const char *rresName, int resId); // Load an image from rRES file (raylib Resource) -RLAPI Texture2D LoadTexture(const char *fileName); // Load an image as texture into GPU memory -RLAPI Texture2D LoadTextureEx(void *data, int width, int height, int textureFormat); // Load a texture from raw data into GPU memory -RLAPI Texture2D LoadTextureFromRES(const char *rresName, int resId); // Load an image as texture from rRES file (raylib Resource) -RLAPI Texture2D LoadTextureFromImage(Image image); // Load a texture from image data -RLAPI RenderTexture2D LoadRenderTexture(int width, int height); // Load a texture to be used for rendering +RLAPI Image LoadImage(const char *fileName); // Load image from file into CPU memory (RAM) +RLAPI Image LoadImageEx(Color *pixels, int width, int height); // Load image from Color array data (RGBA - 32bit) +RLAPI Image LoadImagePro(void *data, int width, int height, int format); // Load image from raw data with parameters +RLAPI Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize); // Load image from RAW file data +RLAPI Texture2D LoadTexture(const char *fileName); // Load texture from file into GPU memory (VRAM) +RLAPI Texture2D LoadTextureFromImage(Image image); // Load texture from image data +RLAPI RenderTexture2D LoadRenderTexture(int width, int height); // Load texture for rendering (framebuffer) RLAPI void UnloadImage(Image image); // Unload image from CPU memory (RAM) -RLAPI void UnloadTexture(Texture2D texture); // Unload texture from GPU memory -RLAPI void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory +RLAPI void UnloadTexture(Texture2D texture); // Unload texture from GPU memory (VRAM) +RLAPI void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory (VRAM) RLAPI Color *GetImageData(Image image); // Get pixel data from image as a Color struct array RLAPI Image GetTextureData(Texture2D texture); // Get pixel data from GPU texture and return an Image -RLAPI void UpdateTexture(Texture2D texture, void *pixels); // Update GPU texture with new data +RLAPI void UpdateTexture(Texture2D texture, const void *pixels); // Update GPU texture with new data RLAPI void ImageToPOT(Image *image, Color fillColor); // Convert image to POT (power-of-two) RLAPI void ImageFormat(Image *image, int newFormat); // Convert image data to desired format RLAPI void ImageAlphaMask(Image *image, Image alphaMask); // Apply alpha mask to image @@ -794,7 +844,8 @@ RLAPI Image ImageText(const char *text, int fontSize, Color color); RLAPI Image ImageTextEx(SpriteFont font, const char *text, float fontSize, int spacing, Color tint); // Create an image from text (custom sprite font) RLAPI void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec); // Draw a source image within a destination image RLAPI void ImageDrawText(Image *dst, Vector2 position, const char *text, int fontSize, Color color); // Draw text (default font) within an image (destination) -RLAPI void ImageDrawTextEx(Image *dst, Vector2 position, SpriteFont font, const char *text, float fontSize, int spacing, Color color); // Draw text (custom sprite font) within an image (destination) +RLAPI void ImageDrawTextEx(Image *dst, Vector2 position, SpriteFont font, const char *text, + float fontSize, int spacing, Color color); // Draw text (custom sprite font) within an image (destination) RLAPI void ImageFlipVertical(Image *image); // Flip image vertically RLAPI void ImageFlipHorizontal(Image *image); // Flip image horizontally RLAPI void ImageColorTint(Image *image, Color color); // Modify image color: tint @@ -817,9 +868,9 @@ RLAPI void DrawTexturePro(Texture2D texture, Rectangle sourceRec, Rectangle dest // Font Loading and Text Drawing Functions (Module: text) //------------------------------------------------------------------------------------ RLAPI SpriteFont GetDefaultFont(void); // Get the default SpriteFont -RLAPI SpriteFont LoadSpriteFont(const char *fileName); // Load a SpriteFont image into GPU memory -RLAPI SpriteFont LoadSpriteFontTTF(const char *fileName, int fontSize, int numChars, int *fontChars); // Load a SpriteFont from TTF font with parameters -RLAPI void UnloadSpriteFont(SpriteFont spriteFont); // Unload SpriteFont from GPU memory +RLAPI SpriteFont LoadSpriteFont(const char *fileName); // Load SpriteFont from file into GPU memory (VRAM) +RLAPI SpriteFont LoadSpriteFontEx(const char *fileName, int fontSize, int charsCount, int *fontChars); // Load SpriteFont from file with extended parameters +RLAPI void UnloadSpriteFont(SpriteFont spriteFont); // Unload SpriteFont from GPU memory (VRAM) RLAPI void DrawText(const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font) RLAPI void DrawTextEx(SpriteFont spriteFont, const char* text, Vector2 position, // Draw text using SpriteFont and additional parameters @@ -827,7 +878,7 @@ RLAPI void DrawTextEx(SpriteFont spriteFont, const char* text, Vector2 position, RLAPI int MeasureText(const char *text, int fontSize); // Measure string width for default font RLAPI Vector2 MeasureTextEx(SpriteFont spriteFont, const char *text, float fontSize, int spacing); // Measure string size for SpriteFont -RLAPI void DrawFPS(int posX, int posY); // Shows current FPS on top-left corner +RLAPI void DrawFPS(int posX, int posY); // Shows current FPS RLAPI const char *FormatText(const char *text, ...); // Formatting of text with variables to 'embed' RLAPI const char *SubText(const char *text, int position, int length); // Get a piece of a text string @@ -849,50 +900,57 @@ RLAPI void DrawPlane(Vector3 centerPos, Vector2 size, Color color); RLAPI void DrawRay(Ray ray, Color color); // Draw a ray line RLAPI void DrawGrid(int slices, float spacing); // Draw a grid (centered at (0, 0, 0)) RLAPI void DrawGizmo(Vector3 position); // Draw simple gizmo -RLAPI void DrawLight(Light light); // Draw light in 3D world //DrawTorus(), DrawTeapot() could be useful? //------------------------------------------------------------------------------------ // Model 3d Loading and Drawing Functions (Module: models) //------------------------------------------------------------------------------------ -RLAPI Model LoadModel(const char *fileName); // Load a 3d model (.OBJ) -RLAPI Model LoadModelEx(Mesh data, bool dynamic); // Load a 3d model (from mesh data) -RLAPI Model LoadModelFromRES(const char *rresName, int resId); // Load a 3d model from rRES file (raylib Resource) -RLAPI Model LoadHeightmap(Image heightmap, Vector3 size); // Load a heightmap image as a 3d model -RLAPI Model LoadCubicmap(Image cubicmap); // Load a map image as a 3d model (cubes based) -RLAPI void UnloadModel(Model model); // Unload 3d model from memory +RLAPI Mesh LoadMesh(const char *fileName); // Load mesh from file +RLAPI Mesh LoadMeshEx(int numVertex, float *vData, float *vtData, float *vnData, Color *cData); // Load mesh from vertex data +RLAPI Model LoadModel(const char *fileName); // Load model from file +RLAPI Model LoadModelFromMesh(Mesh data, bool dynamic); // Load model from mesh data +RLAPI Model LoadHeightmap(Image heightmap, Vector3 size); // Load heightmap model from image data +RLAPI Model LoadCubicmap(Image cubicmap); // Load cubes-based map model from image data +RLAPI void UnloadMesh(Mesh *mesh); // Unload mesh from memory (RAM and/or VRAM) +RLAPI void UnloadModel(Model model); // Unload model from memory (RAM and/or VRAM) -RLAPI Material LoadMaterial(const char *fileName); // Load material data (.MTL) -RLAPI Material LoadDefaultMaterial(void); // Load default material (uses default models shader) -RLAPI Material LoadStandardMaterial(void); // Load standard material (uses material attributes and lighting shader) -RLAPI void UnloadMaterial(Material material); // Unload material textures from VRAM +RLAPI Material LoadMaterial(const char *fileName); // Load material from file +RLAPI Material LoadDefaultMaterial(void); // Load default material (uses default models shader) +RLAPI void UnloadMaterial(Material material); // Unload material from GPU memory (VRAM) -RLAPI void DrawModel(Model model, Vector3 position, float scale, Color tint); // Draw a model (with texture if set) -RLAPI void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model with extended parameters +RLAPI void DrawModel(Model model, Vector3 position, float scale, Color tint); // Draw a model (with texture if set) +RLAPI void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, + float rotationAngle, Vector3 scale, Color tint); // Draw a model with extended parameters RLAPI void DrawModelWires(Model model, Vector3 position, float scale, Color tint); // Draw a model wires (with texture if set) -RLAPI void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model wires (with texture if set) with extended parameters -RLAPI void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires) +RLAPI void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, + float rotationAngle, Vector3 scale, Color tint); // Draw a model wires (with texture if set) with extended parameters +RLAPI void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires) -RLAPI void DrawBillboard(Camera camera, Texture2D texture, Vector3 center, float size, Color tint); // Draw a billboard texture -RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle sourceRec, Vector3 center, float size, Color tint); // Draw a billboard texture defined by sourceRec +RLAPI void DrawBillboard(Camera camera, Texture2D texture, Vector3 center, float size, Color tint); // Draw a billboard texture +RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle sourceRec, + Vector3 center, float size, Color tint); // Draw a billboard texture defined by sourceRec -RLAPI BoundingBox CalculateBoundingBox(Mesh mesh); // Calculate mesh bounding box limits -RLAPI bool CheckCollisionSpheres(Vector3 centerA, float radiusA, Vector3 centerB, float radiusB); // Detect collision between two spheres -RLAPI bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2); // Detect collision between two bounding boxes -RLAPI bool CheckCollisionBoxSphere(BoundingBox box, Vector3 centerSphere, float radiusSphere); // Detect collision between box and sphere -RLAPI bool CheckCollisionRaySphere(Ray ray, Vector3 spherePosition, float sphereRadius); // Detect collision between ray and sphere -RLAPI bool CheckCollisionRaySphereEx(Ray ray, Vector3 spherePosition, float sphereRadius, Vector3 *collisionPoint); // Detect collision between ray and sphere with extended parameters and collision point detection -RLAPI bool CheckCollisionRayBox(Ray ray, BoundingBox box); // Detect collision between ray and box +RLAPI BoundingBox CalculateBoundingBox(Mesh mesh); // Calculate mesh bounding box limits +RLAPI bool CheckCollisionSpheres(Vector3 centerA, float radiusA, Vector3 centerB, float radiusB); // Detect collision between two spheres +RLAPI bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2); // Detect collision between two bounding boxes +RLAPI bool CheckCollisionBoxSphere(BoundingBox box, Vector3 centerSphere, float radiusSphere); // Detect collision between box and sphere +RLAPI bool CheckCollisionRaySphere(Ray ray, Vector3 spherePosition, float sphereRadius); // Detect collision between ray and sphere +RLAPI bool CheckCollisionRaySphereEx(Ray ray, Vector3 spherePosition, float sphereRadius, + Vector3 *collisionPoint); // Detect collision between ray and sphere, returns collision point +RLAPI bool CheckCollisionRayBox(Ray ray, BoundingBox box); // Detect collision between ray and box +RLAPI RayHitInfo GetCollisionRayMesh(Ray ray, Mesh *mesh); // Get collision info between ray and mesh +RLAPI RayHitInfo GetCollisionRayTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3); // Get collision info between ray and triangle +RLAPI RayHitInfo GetCollisionRayGround(Ray ray, float groundHeight); // Get collision info between ray and ground plane (Y-normal plane) //------------------------------------------------------------------------------------ // Shaders System Functions (Module: rlgl) // NOTE: This functions are useless when using OpenGL 1.1 //------------------------------------------------------------------------------------ -RLAPI Shader LoadShader(char *vsFileName, char *fsFileName); // Load a custom shader and bind default locations -RLAPI void UnloadShader(Shader shader); // Unload a custom shader from memory +RLAPI char *LoadText(const char *fileName); // Load chars array from text file +RLAPI Shader LoadShader(char *vsFileName, char *fsFileName); // Load shader from files and bind default locations +RLAPI void UnloadShader(Shader shader); // Unload shader from GPU memory (VRAM) RLAPI Shader GetDefaultShader(void); // Get default shader -RLAPI Shader GetStandardShader(void); // Get standard shader RLAPI Texture2D GetDefaultTexture(void); // Get default texture RLAPI int GetShaderLocation(Shader shader, const char *uniformName); // Get shader uniform location @@ -908,19 +966,17 @@ RLAPI void EndShaderMode(void); // End RLAPI void BeginBlendMode(int mode); // Begin blending mode (alpha, additive, multiplied) RLAPI void EndBlendMode(void); // End blending mode (reset to default: alpha blending) -RLAPI Light CreateLight(int type, Vector3 position, Color diffuse); // Create a new light, initialize it and add to pool -RLAPI void DestroyLight(Light light); // Destroy a light and take it out of the list - //------------------------------------------------------------------------------------ // VR experience Functions (Module: rlgl) // NOTE: This functions are useless when using OpenGL 1.1 //------------------------------------------------------------------------------------ -RLAPI void InitVrDevice(int vdDevice); // Init VR device -RLAPI void CloseVrDevice(void); // Close VR device -RLAPI bool IsVrDeviceReady(void); // Detect if VR device is ready -RLAPI bool IsVrSimulator(void); // Detect if VR simulator is running -RLAPI void UpdateVrTracking(Camera *camera); // Update VR tracking (position and orientation) and camera -RLAPI void ToggleVrMode(void); // Enable/Disable VR experience (device or simulator) +RLAPI void InitVrSimulator(int vrDevice); // Init VR simulator for selected device +RLAPI void CloseVrSimulator(void); // Close VR simulator for current device +RLAPI bool IsVrSimulatorReady(void); // Detect if VR device is ready +RLAPI void UpdateVrTracking(Camera *camera); // Update VR tracking (position and orientation) and camera +RLAPI void ToggleVrMode(void); // Enable/Disable VR experience (device or simulator) +RLAPI void BeginVrDrawing(void); // Begin VR simulator stereo rendering +RLAPI void EndVrDrawing(void); // End VR simulator stereo rendering //------------------------------------------------------------------------------------ // Audio Loading and Playing Functions (Module: audio) @@ -928,13 +984,13 @@ RLAPI void ToggleVrMode(void); // Enable/Disable VR experienc RLAPI void InitAudioDevice(void); // Initialize audio device and context RLAPI void CloseAudioDevice(void); // Close the audio device and context RLAPI bool IsAudioDeviceReady(void); // Check if audio device has been initialized successfully +RLAPI void SetMasterVolume(float volume); // Set master volume (listener) -RLAPI Wave LoadWave(const char *fileName); // Load wave data from file into RAM -RLAPI Wave LoadWaveEx(float *data, int sampleCount, int sampleRate, int sampleSize, int channels); // Load wave data from float array data (32bit) -RLAPI Sound LoadSound(const char *fileName); // Load sound to memory -RLAPI Sound LoadSoundFromWave(Wave wave); // Load sound to memory from wave data -RLAPI Sound LoadSoundFromRES(const char *rresName, int resId); // Load sound to memory from rRES file (raylib Resource) -RLAPI void UpdateSound(Sound sound, void *data, int numSamples); // Update sound buffer with new data +RLAPI Wave LoadWave(const char *fileName); // Load wave data from file +RLAPI Wave LoadWaveEx(void *data, int sampleCount, int sampleRate, int sampleSize, int channels); // Load wave data from raw array data +RLAPI Sound LoadSound(const char *fileName); // Load sound from file +RLAPI Sound LoadSoundFromWave(Wave wave); // Load sound from wave data +RLAPI void UpdateSound(Sound sound, const void *data, int samplesCount);// Update sound buffer with new data RLAPI void UnloadWave(Wave wave); // Unload wave data RLAPI void UnloadSound(Sound sound); // Unload sound RLAPI void PlaySound(Sound sound); // Play a sound @@ -958,13 +1014,14 @@ RLAPI void ResumeMusicStream(Music music); // Resume RLAPI bool IsMusicPlaying(Music music); // Check if music is playing RLAPI void SetMusicVolume(Music music, float volume); // Set volume for music (1.0 is max level) RLAPI void SetMusicPitch(Music music, float pitch); // Set pitch for a music (1.0 is base level) +RLAPI void SetMusicLoopCount(Music music, float count); // Set music loop count (loop repeats) RLAPI float GetMusicTimeLength(Music music); // Get music time length (in seconds) RLAPI float GetMusicTimePlayed(Music music); // Get current music time played (in seconds) RLAPI AudioStream InitAudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels); // Init audio stream (to stream raw audio pcm data) -RLAPI void UpdateAudioStream(AudioStream stream, void *data, int numSamples); // Update audio stream buffers with data +RLAPI void UpdateAudioStream(AudioStream stream, const void *data, int samplesCount); // Update audio stream buffers with data RLAPI void CloseAudioStream(AudioStream stream); // Close audio stream and free memory RLAPI bool IsAudioBufferProcessed(AudioStream stream); // Check if any audio stream buffers requires refill RLAPI void PlayAudioStream(AudioStream stream); // Play audio stream diff --git a/release/html5/libraylib.bc b/release/html5/libraylib.bc index bdd53addf..8f8448610 100644 Binary files a/release/html5/libraylib.bc and b/release/html5/libraylib.bc differ diff --git a/release/html5/raylib.h b/release/html5/raylib.h index b82ec3429..429c26ca0 100644 --- a/release/html5/raylib.h +++ b/release/html5/raylib.h @@ -6,25 +6,23 @@ * * FEATURES: * - Library written in plain C code (C99) -* - Uses PascalCase/camelCase notation +* - Multiple platforms supported: Windows, Linux, Mac, Android, Raspberry Pi, HTML5. * - Hardware accelerated with OpenGL (1.1, 2.1, 3.3 or ES 2.0) * - Unique OpenGL abstraction layer (usable as standalone module): [rlgl] * - Powerful fonts module with SpriteFonts support (XNA bitmap fonts, AngelCode fonts, TTF) * - Multiple textures support, including compressed formats and mipmaps generation * - Basic 3d support for Shapes, Models, Billboards, Heightmaps and Cubicmaps -* - Powerful math module for Vector, Matrix and Quaternion operations: [raymath] +* - Powerful math module for Vector2, Vector3, Matrix and Quaternion operations: [raymath] * - Audio loading and playing with streaming support and mixing channels: [audio] * - VR stereo rendering support with configurable HMD device parameters -* - Multiple platforms support: Windows, Linux, Mac, Android, Raspberry Pi, HTML5 and Oculus Rift CV1 -* - Custom color palette for fancy visuals on raywhite background * - Minimal external dependencies (GLFW3, OpenGL, OpenAL) * - Complete bindings for Lua, Go and Pascal * * NOTES: -* 32bit Colors - All defined color are always RGBA (struct Color is 4 byte) -* One custom default font could be loaded automatically when InitWindow() [core] +* 32bit Colors - Any defined Color is always RGBA (4 byte) +* One custom font is loaded by default when InitWindow() [core] +* If using OpenGL 3.3 or ES2, one default shader is loaded automatically (internally defined) [rlgl] * If using OpenGL 3.3 or ES2, several vertex buffers (VAO/VBO) are created to manage lines-triangles-quads -* If using OpenGL 3.3 or ES2, two default shaders could be loaded automatically (internally defined) * * DEPENDENCIES: * GLFW3 (www.glfw.org) for window/context management and input [core] @@ -74,7 +72,6 @@ //#define PLATFORM_ANDROID // Android device //#define PLATFORM_RPI // Raspberry Pi //#define PLATFORM_WEB // HTML5 (emscripten, asm.js) -//#define RLGL_OCULUS_SUPPORT // Oculus Rift CV1 (complementary to PLATFORM_DESKTOP) // Security check in case no PLATFORM_* defined #if !defined(PLATFORM_DESKTOP) && !defined(PLATFORM_ANDROID) && !defined(PLATFORM_RPI) && !defined(PLATFORM_WEB) @@ -295,7 +292,7 @@ #define RAYWHITE CLITERAL{ 245, 245, 245, 255 } // My own White (raylib logo) //---------------------------------------------------------------------------------- -// Types and Structures Definition +// Structures Definition //---------------------------------------------------------------------------------- #ifndef __cplusplus // Boolean type @@ -352,7 +349,7 @@ typedef struct Image { int format; // Data format (TextureFormat type) } Image; -// Texture2D type, bpp always RGBA (32bit) +// Texture2D type // NOTE: Data stored in GPU memory typedef struct Texture2D { unsigned int id; // OpenGL texture id @@ -480,8 +477,8 @@ typedef struct Ray { typedef struct RayHitInfo { bool hit; // Did the ray hit something? float distance; // Distance to nearest hit - Vector3 hitPosition; // Position of nearest hit - Vector3 hitNormal; // Surface normal of hit + Vector3 position; // Position of nearest hit + Vector3 normal; // Surface normal of hit } RayHitInfo; // Wave type, defines audio wave data @@ -516,6 +513,34 @@ typedef struct AudioStream { unsigned int buffers[2]; // OpenAL audio buffers (double buffering) } AudioStream; +// rRES data returned when reading a resource, +// it contains all required data for user (24 byte) +typedef struct RRESData { + unsigned int type; // Resource type (4 byte) + + unsigned int param1; // Resouce parameter 1 (4 byte) + unsigned int param2; // Resouce parameter 2 (4 byte) + unsigned int param3; // Resouce parameter 3 (4 byte) + unsigned int param4; // Resouce parameter 4 (4 byte) + + void *data; // Resource data pointer (4 byte) +} RRESData; + +// RRES type (pointer to RRESData array) +typedef struct RRESData *RRES; + +//---------------------------------------------------------------------------------- +// Enumerators Definition +//---------------------------------------------------------------------------------- +// Trace log type +typedef enum { + INFO = 0, + WARNING, + ERROR, + DEBUG, + OTHER +} LogType; + // Texture formats // NOTE: Support depends on OpenGL version and platform typedef enum { @@ -526,6 +551,7 @@ typedef enum { UNCOMPRESSED_R5G5B5A1, // 16 bpp (1 bit alpha) UNCOMPRESSED_R4G4B4A4, // 16 bpp (4 bit alpha) UNCOMPRESSED_R8G8B8A8, // 32 bpp + UNCOMPRESSED_R32G32B32, // 32 bit per channel (float) - HDR COMPRESSED_DXT1_RGB, // 4 bpp (no alpha) COMPRESSED_DXT1_RGBA, // 4 bpp (1 bit alpha) COMPRESSED_DXT3_RGBA, // 8 bpp @@ -552,10 +578,18 @@ typedef enum { } TextureFilterMode; // Texture parameters: wrap mode -typedef enum { WRAP_REPEAT = 0, WRAP_CLAMP, WRAP_MIRROR } TextureWrapMode; +typedef enum { + WRAP_REPEAT = 0, + WRAP_CLAMP, + WRAP_MIRROR +} TextureWrapMode; // Color blending modes (pre-defined) -typedef enum { BLEND_ALPHA = 0, BLEND_ADDITIVE, BLEND_MULTIPLIED } BlendMode; +typedef enum { + BLEND_ALPHA = 0, + BLEND_ADDITIVE, + BLEND_MULTIPLIED +} BlendMode; // Gestures type // NOTE: It could be used as flags to enable only some gestures @@ -595,19 +629,6 @@ typedef enum { HMD_FOVE_VR, } VrDevice; -// rRES data returned when reading a resource, -// it contains all required data for user (24 byte) -typedef struct RRESData { - unsigned int type; // Resource type (4 byte) - - unsigned int param1; // Resouce parameter 1 (4 byte) - unsigned int param2; // Resouce parameter 2 (4 byte) - unsigned int param3; // Resouce parameter 3 (4 byte) - unsigned int param4; // Resouce parameter 4 (4 byte) - - void *data; // Resource data pointer (4 byte) -} RRESData; - // RRESData type typedef enum { RRES_TYPE_RAW = 0, @@ -620,9 +641,6 @@ typedef enum { RRES_TYPE_DIRECTORY } RRESDataType; -// RRES type (pointer to RRESData array) -typedef struct RRESData *RRES; - #ifdef __cplusplus extern "C" { // Prevents name mangling of functions #endif @@ -636,47 +654,48 @@ extern "C" { // Prevents name mangling of functions // Window and Graphics Device Functions (Module: core) //------------------------------------------------------------------------------------ #if defined(PLATFORM_ANDROID) -RLAPI void InitWindow(int width, int height, void *state); // Init Android Activity and OpenGL Graphics (struct android_app) +RLAPI void InitWindow(int width, int height, void *state); // Initialize Android activity #elif defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI) || defined(PLATFORM_WEB) -RLAPI void InitWindow(int width, int height, const char *title); // Initialize Window and OpenGL Graphics +RLAPI void InitWindow(int width, int height, const char *title); // Initialize window and OpenGL context #endif -RLAPI void CloseWindow(void); // Close Window and Terminate Context -RLAPI bool WindowShouldClose(void); // Detect if KEY_ESCAPE pressed or Close icon pressed -RLAPI bool IsWindowMinimized(void); // Detect if window has been minimized (or lost focus) -RLAPI void ToggleFullscreen(void); // Fullscreen toggle (only PLATFORM_DESKTOP) +RLAPI void CloseWindow(void); // Close window and unload OpenGL context +RLAPI bool WindowShouldClose(void); // Check if KEY_ESCAPE pressed or Close icon pressed +RLAPI bool IsWindowMinimized(void); // Check if window has been minimized (or lost focus) +RLAPI void ToggleFullscreen(void); // Toggle fullscreen mode (only PLATFORM_DESKTOP) RLAPI void SetWindowIcon(Image image); // Set icon for window (only PLATFORM_DESKTOP) RLAPI void SetWindowPosition(int x, int y); // Set window position on screen (only PLATFORM_DESKTOP) RLAPI void SetWindowMonitor(int monitor); // Set monitor for the current window (fullscreen mode) +RLAPI void SetWindowMinSize(int width, int height); // Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE) RLAPI int GetScreenWidth(void); // Get current screen width RLAPI int GetScreenHeight(void); // Get current screen height #if !defined(PLATFORM_ANDROID) RLAPI void ShowCursor(void); // Shows cursor RLAPI void HideCursor(void); // Hides cursor -RLAPI bool IsCursorHidden(void); // Returns true if cursor is not visible -RLAPI void EnableCursor(void); // Enables cursor -RLAPI void DisableCursor(void); // Disables cursor +RLAPI bool IsCursorHidden(void); // Check if cursor is not visible +RLAPI void EnableCursor(void); // Enables cursor (unlock cursor) +RLAPI void DisableCursor(void); // Disables cursor (lock cursor) #endif -RLAPI void ClearBackground(Color color); // Sets Background Color -RLAPI void BeginDrawing(void); // Setup drawing canvas to start drawing -RLAPI void EndDrawing(void); // End canvas drawing and Swap Buffers (Double Buffering) +RLAPI void ClearBackground(Color color); // Set background color (framebuffer clear color) +RLAPI void BeginDrawing(void); // Setup canvas (framebuffer) to start drawing +RLAPI void EndDrawing(void); // End canvas drawing and swap buffers (double buffering) -RLAPI void Begin2dMode(Camera2D camera); // Initialize 2D mode with custom camera -RLAPI void End2dMode(void); // Ends 2D mode custom camera usage -RLAPI void Begin3dMode(Camera camera); // Initializes 3D mode for drawing (Camera setup) +RLAPI void Begin2dMode(Camera2D camera); // Initialize 2D mode with custom camera (2D) +RLAPI void End2dMode(void); // Ends 2D mode with custom camera +RLAPI void Begin3dMode(Camera camera); // Initializes 3D mode with custom camera (3D) RLAPI void End3dMode(void); // Ends 3D mode and returns to default 2D orthographic mode RLAPI void BeginTextureMode(RenderTexture2D target); // Initializes render texture for drawing RLAPI void EndTextureMode(void); // Ends drawing to render texture RLAPI Ray GetMouseRay(Vector2 mousePosition, Camera camera); // Returns a ray trace from mouse position -RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Returns the screen space position from a 3d world space position +RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Returns the screen space position for a 3d world space position RLAPI Matrix GetCameraMatrix(Camera camera); // Returns camera transform matrix (view matrix) RLAPI void SetTargetFPS(int fps); // Set target FPS (maximum) RLAPI int GetFPS(void); // Returns current FPS -RLAPI float GetFrameTime(void); // Returns time in seconds for one frame +RLAPI float GetFrameTime(void); // Returns time in seconds for last frame drawn RLAPI Color GetColor(int hexValue); // Returns a Color struct from hexadecimal value RLAPI int GetHexValue(Color color); // Returns hexadecimal value for a Color @@ -687,18 +706,21 @@ RLAPI float *MatrixToFloat(Matrix mat); // Converts Ma RLAPI int GetRandomValue(int min, int max); // Returns a random value between min and max (both included) RLAPI Color Fade(Color color, float alpha); // Color fade-in or fade-out, alpha goes from 0.0f to 1.0f -RLAPI void ShowLogo(void); // Activates raylib logo at startup (can be done with flags) -RLAPI void SetConfigFlags(char flags); // Setup some window configuration flags -//RLAPI void TraceLog(int logType, const char *text, ...); // Show trace log messages (INFO, WARNING, ERROR, DEBUG) -RLAPI void TakeScreenshot(void); // Takes a screenshot and saves it in the same folder as executable -RLAPI bool IsFileExtension(const char *fileName, const char *ext);// Check file extension +RLAPI void ShowLogo(void); // Activate raylib logo at startup (can be done with flags) +RLAPI void SetConfigFlags(char flags); // Setup window configuration flags (view FLAGS) +RLAPI void TraceLog(int logType, const char *text, ...); // Show trace log messages (INFO, WARNING, ERROR, DEBUG) +RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (saved a .png) -RLAPI bool IsFileDropped(void); // Check if a file have been dropped into window -RLAPI char **GetDroppedFiles(int *count); // Retrieve dropped files into window +RLAPI bool IsFileExtension(const char *fileName, const char *ext);// Check file extension +RLAPI const char *GetDirectoryPath(const char *fileName); // Get directory for a given fileName (with path) +RLAPI const char *GetWorkingDirectory(void); // Get current working directory +RLAPI bool ChangeDirectory(const char *dir); // Change working directory, returns true if success +RLAPI bool IsFileDropped(void); // Check if a file has been dropped into window +RLAPI char **GetDroppedFiles(int *count); // Get dropped files names RLAPI void ClearDroppedFiles(void); // Clear dropped files paths buffer -RLAPI void StorageSaveValue(int position, int value); // Storage save integer value (to defined position) -RLAPI int StorageLoadValue(int position); // Storage load integer value (from defined position) +RLAPI void StorageSaveValue(int position, int value); // Save integer value to storage file (to defined position) +RLAPI int StorageLoadValue(int position); // Load integer value from storage file (from defined position) //------------------------------------------------------------------------------------ // Input Handling Functions (Module: core) @@ -847,7 +869,7 @@ RLAPI void DrawTexturePro(Texture2D texture, Rectangle sourceRec, Rectangle dest //------------------------------------------------------------------------------------ RLAPI SpriteFont GetDefaultFont(void); // Get the default SpriteFont RLAPI SpriteFont LoadSpriteFont(const char *fileName); // Load SpriteFont from file into GPU memory (VRAM) -RLAPI SpriteFont LoadSpriteFontTTF(const char *fileName, int fontSize, int charsCount, int *fontChars); // Load SpriteFont from TTF font file with generation parameters +RLAPI SpriteFont LoadSpriteFontEx(const char *fileName, int fontSize, int charsCount, int *fontChars); // Load SpriteFont from file with extended parameters RLAPI void UnloadSpriteFont(SpriteFont spriteFont); // Unload SpriteFont from GPU memory (VRAM) RLAPI void DrawText(const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font) @@ -856,7 +878,7 @@ RLAPI void DrawTextEx(SpriteFont spriteFont, const char* text, Vector2 position, RLAPI int MeasureText(const char *text, int fontSize); // Measure string width for default font RLAPI Vector2 MeasureTextEx(SpriteFont spriteFont, const char *text, float fontSize, int spacing); // Measure string size for SpriteFont -RLAPI void DrawFPS(int posX, int posY); // Shows current FPS on top-left corner +RLAPI void DrawFPS(int posX, int posY); // Shows current FPS RLAPI const char *FormatText(const char *text, ...); // Formatting of text with variables to 'embed' RLAPI const char *SubText(const char *text, int position, int length); // Get a piece of a text string diff --git a/release/linux/raylib.h b/release/linux/raylib.h index d28b07a35..429c26ca0 100644 --- a/release/linux/raylib.h +++ b/release/linux/raylib.h @@ -1,51 +1,51 @@ /********************************************************************************************** * -* raylib 1.6.0 (www.raylib.com) +* raylib v1.7.0 * -* A simple and easy-to-use library to learn videogames programming +* A simple and easy-to-use library to learn videogames programming (www.raylib.com) * -* Features: -* Library written in plain C code (C99) -* Uses PascalCase/camelCase notation -* Hardware accelerated with OpenGL (1.1, 2.1, 3.3 or ES 2.0) -* Unique OpenGL abstraction layer (usable as standalone module): [rlgl] -* Powerful fonts module with SpriteFonts support (XNA bitmap fonts, AngelCode fonts, TTF) -* Multiple textures support, including compressed formats and mipmaps generation -* Basic 3d support for Shapes, Models, Billboards, Heightmaps and Cubicmaps -* Materials (diffuse, normal, specular) and Lighting (point, directional, spot) support -* Powerful math module for Vector, Matrix and Quaternion operations: [raymath] -* Audio loading and playing with streaming support and mixing channels [audio] -* VR stereo rendering support with configurable HMD device parameters -* Multiple platforms support: Windows, Linux, Mac, Android, Raspberry Pi, HTML5 and Oculus Rift CV1 -* Custom color palette for fancy visuals on raywhite background -* Minimal external dependencies (GLFW3, OpenGL, OpenAL) -* Complete binding for LUA [rlua] +* FEATURES: +* - Library written in plain C code (C99) +* - Multiple platforms supported: Windows, Linux, Mac, Android, Raspberry Pi, HTML5. +* - Hardware accelerated with OpenGL (1.1, 2.1, 3.3 or ES 2.0) +* - Unique OpenGL abstraction layer (usable as standalone module): [rlgl] +* - Powerful fonts module with SpriteFonts support (XNA bitmap fonts, AngelCode fonts, TTF) +* - Multiple textures support, including compressed formats and mipmaps generation +* - Basic 3d support for Shapes, Models, Billboards, Heightmaps and Cubicmaps +* - Powerful math module for Vector2, Vector3, Matrix and Quaternion operations: [raymath] +* - Audio loading and playing with streaming support and mixing channels: [audio] +* - VR stereo rendering support with configurable HMD device parameters +* - Minimal external dependencies (GLFW3, OpenGL, OpenAL) +* - Complete bindings for Lua, Go and Pascal * -* External libs: -* GLFW3 (www.glfw.org) for window/context management and input [core] -* GLAD for OpenGL extensions loading (3.3 Core profile, only PLATFORM_DESKTOP) [rlgl] -* stb_image (Sean Barret) for images loading (JPEG, PNG, BMP, TGA) [textures] -* stb_image_write (Sean Barret) for image writting (PNG) [utils] -* stb_truetype (Sean Barret) for ttf fonts loading [text] -* stb_vorbis (Sean Barret) for ogg audio loading [audio] -* jar_xm (Joshua Reisenauer) for XM audio module loading [audio] -* jar_mod (Joshua Reisenauer) for MOD audio module loading [audio] -* dr_flac (David Reid) for FLAC audio file loading [audio] -* OpenAL Soft for audio device/context management [audio] -* tinfl for data decompression (DEFLATE algorithm) [utils] +* NOTES: +* 32bit Colors - Any defined Color is always RGBA (4 byte) +* One custom font is loaded by default when InitWindow() [core] +* If using OpenGL 3.3 or ES2, one default shader is loaded automatically (internally defined) [rlgl] +* If using OpenGL 3.3 or ES2, several vertex buffers (VAO/VBO) are created to manage lines-triangles-quads * -* Some design decisions: -* 32bit Colors - All defined color are always RGBA (struct Color is 4 byte) -* One custom default font could be loaded automatically when InitWindow() [core] -* If using OpenGL 3.3 or ES2, several vertex buffers (VAO/VBO) are created to manage lines-triangles-quads -* If using OpenGL 3.3 or ES2, two default shaders could be loaded automatically (internally defined) +* DEPENDENCIES: +* GLFW3 (www.glfw.org) for window/context management and input [core] +* GLAD for OpenGL extensions loading (3.3 Core profile, only PLATFORM_DESKTOP) [rlgl] +* OpenAL Soft for audio device/context management [audio] * -* -- LICENSE -- +* OPTIONAL DEPENDENCIES: +* stb_image (Sean Barret) for images loading (JPEG, PNG, BMP, TGA) [textures] +* stb_image_write (Sean Barret) for image writting (PNG) [utils] +* stb_truetype (Sean Barret) for ttf fonts loading [text] +* stb_vorbis (Sean Barret) for ogg audio loading [audio] +* jar_xm (Joshua Reisenauer) for XM audio module loading [audio] +* jar_mod (Joshua Reisenauer) for MOD audio module loading [audio] +* dr_flac (David Reid) for FLAC audio file loading [audio] +* tinfl for data decompression (DEFLATE algorithm) [rres] +* +* +* LICENSE: zlib/libpng * * raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified, * BSD-like license that allows static linking with closed source software: * -* Copyright (c) 2013-2016 Ramon Santamaria (@raysan5) +* Copyright (c) 2013-2017 Ramon Santamaria (@raysan5) * * This software is provided "as-is", without any express or implied warranty. In no event * will the authors be held liable for any damages arising from the use of this software. @@ -72,7 +72,6 @@ //#define PLATFORM_ANDROID // Android device //#define PLATFORM_RPI // Raspberry Pi //#define PLATFORM_WEB // HTML5 (emscripten, asm.js) -//#define RLGL_OCULUS_SUPPORT // Oculus Rift CV1 (complementary to PLATFORM_DESKTOP) // Security check in case no PLATFORM_* defined #if !defined(PLATFORM_DESKTOP) && !defined(PLATFORM_ANDROID) && !defined(PLATFORM_RPI) && !defined(PLATFORM_WEB) @@ -98,13 +97,13 @@ #define RAD2DEG (180.0f/PI) // raylib Config Flags -#define FLAG_FULLSCREEN_MODE 1 -#define FLAG_RESIZABLE_WINDOW 2 -#define FLAG_SHOW_LOGO 4 -#define FLAG_SHOW_MOUSE_CURSOR 8 -#define FLAG_CENTERED_MODE 16 -#define FLAG_MSAA_4X_HINT 32 -#define FLAG_VSYNC_HINT 64 +#define FLAG_SHOW_LOGO 1 // Set to show raylib logo at startup +#define FLAG_FULLSCREEN_MODE 2 // Set to run program in fullscreen +#define FLAG_WINDOW_RESIZABLE 4 // Set to allow resizable window +#define FLAG_WINDOW_DECORATED 8 // Set to show window decoration (frame and buttons) +#define FLAG_WINDOW_TRANSPARENT 16 // Set to allow transparent window +#define FLAG_MSAA_4X_HINT 32 // Set to try enabling MSAA 4X +#define FLAG_VSYNC_HINT 64 // Set to try enabling V-Sync on GPU // Keyboard Function Keys #define KEY_SPACE 32 @@ -293,17 +292,13 @@ #define RAYWHITE CLITERAL{ 245, 245, 245, 255 } // My own White (raylib logo) //---------------------------------------------------------------------------------- -// Types and Structures Definition +// Structures Definition //---------------------------------------------------------------------------------- #ifndef __cplusplus // Boolean type - #ifndef __APPLE__ - #if !defined(_STDBOOL_H) - typedef enum { false, true } bool; - #define _STDBOOL_H - #endif - #else - #include + #if !defined(_STDBOOL_H) + typedef enum { false, true } bool; + #define _STDBOOL_H #endif #endif @@ -351,35 +346,41 @@ typedef struct Image { int width; // Image base width int height; // Image base height int mipmaps; // Mipmap levels, 1 by default - int format; // Data format (TextureFormat) + int format; // Data format (TextureFormat type) } Image; -// Texture2D type, bpp always RGBA (32bit) +// Texture2D type // NOTE: Data stored in GPU memory typedef struct Texture2D { unsigned int id; // OpenGL texture id int width; // Texture base width int height; // Texture base height int mipmaps; // Mipmap levels, 1 by default - int format; // Data format (TextureFormat) + int format; // Data format (TextureFormat type) } Texture2D; // RenderTexture2D type, for texture rendering typedef struct RenderTexture2D { - unsigned int id; // Render texture (fbo) id + unsigned int id; // OpenGL Framebuffer Object (FBO) id Texture2D texture; // Color buffer attachment texture Texture2D depth; // Depth buffer attachment texture } RenderTexture2D; +// SpriteFont character info +typedef struct CharInfo { + int value; // Character value (Unicode) + Rectangle rec; // Character rectangle in sprite font + int offsetX; // Character offset X when drawing + int offsetY; // Character offset Y when drawing + int advanceX; // Character advance position X +} CharInfo; + // SpriteFont type, includes texture and charSet array data typedef struct SpriteFont { Texture2D texture; // Font texture - int size; // Base size (default chars height) - int numChars; // Number of characters - int *charValues; // Characters values array - Rectangle *charRecs; // Characters rectangles within the texture - Vector2 *charOffsets; // Characters offsets (on drawing) - int *charAdvanceX; // Characters x advance (on drawing) + int baseSize; // Base size (default chars height) + int charsCount; // Number of characters + CharInfo *chars; // Characters info data } SpriteFont; // Camera type, defines a camera position/orientation in 3d space @@ -466,31 +467,20 @@ typedef struct Model { Material material; // Shader and textures data } Model; -// Light type -typedef struct LightData { - unsigned int id; // Light unique id - bool enabled; // Light enabled - int type; // Light type: LIGHT_POINT, LIGHT_DIRECTIONAL, LIGHT_SPOT - - Vector3 position; // Light position - Vector3 target; // Light direction: LIGHT_DIRECTIONAL and LIGHT_SPOT (cone direction target) - float radius; // Light attenuation radius light intensity reduced with distance (world distance) - - Color diffuse; // Light diffuse color - float intensity; // Light intensity level - - float coneAngle; // Light cone max angle: LIGHT_SPOT -} LightData, *Light; - -// Light types -typedef enum { LIGHT_POINT, LIGHT_DIRECTIONAL, LIGHT_SPOT } LightType; - // Ray type (useful for raycast) typedef struct Ray { Vector3 position; // Ray position (origin) Vector3 direction; // Ray direction } Ray; +// Information returned from a raycast +typedef struct RayHitInfo { + bool hit; // Did the ray hit something? + float distance; // Distance to nearest hit + Vector3 position; // Position of nearest hit + Vector3 normal; // Surface normal of hit +} RayHitInfo; + // Wave type, defines audio wave data typedef struct Wave { unsigned int sampleCount; // Number of samples @@ -523,6 +513,34 @@ typedef struct AudioStream { unsigned int buffers[2]; // OpenAL audio buffers (double buffering) } AudioStream; +// rRES data returned when reading a resource, +// it contains all required data for user (24 byte) +typedef struct RRESData { + unsigned int type; // Resource type (4 byte) + + unsigned int param1; // Resouce parameter 1 (4 byte) + unsigned int param2; // Resouce parameter 2 (4 byte) + unsigned int param3; // Resouce parameter 3 (4 byte) + unsigned int param4; // Resouce parameter 4 (4 byte) + + void *data; // Resource data pointer (4 byte) +} RRESData; + +// RRES type (pointer to RRESData array) +typedef struct RRESData *RRES; + +//---------------------------------------------------------------------------------- +// Enumerators Definition +//---------------------------------------------------------------------------------- +// Trace log type +typedef enum { + INFO = 0, + WARNING, + ERROR, + DEBUG, + OTHER +} LogType; + // Texture formats // NOTE: Support depends on OpenGL version and platform typedef enum { @@ -533,6 +551,7 @@ typedef enum { UNCOMPRESSED_R5G5B5A1, // 16 bpp (1 bit alpha) UNCOMPRESSED_R4G4B4A4, // 16 bpp (4 bit alpha) UNCOMPRESSED_R8G8B8A8, // 32 bpp + UNCOMPRESSED_R32G32B32, // 32 bit per channel (float) - HDR COMPRESSED_DXT1_RGB, // 4 bpp (no alpha) COMPRESSED_DXT1_RGBA, // 4 bpp (1 bit alpha) COMPRESSED_DXT3_RGBA, // 8 bpp @@ -549,7 +568,7 @@ typedef enum { // Texture parameters: filter mode // NOTE 1: Filtering considers mipmaps if available in the texture // NOTE 2: Filter is accordingly set for minification and magnification -typedef enum { +typedef enum { FILTER_POINT = 0, // No filter, just pixel aproximation FILTER_BILINEAR, // Linear filtering FILTER_TRILINEAR, // Trilinear filtering (linear with mipmaps) @@ -559,10 +578,18 @@ typedef enum { } TextureFilterMode; // Texture parameters: wrap mode -typedef enum { WRAP_REPEAT = 0, WRAP_CLAMP, WRAP_MIRROR } TextureWrapMode; +typedef enum { + WRAP_REPEAT = 0, + WRAP_CLAMP, + WRAP_MIRROR +} TextureWrapMode; // Color blending modes (pre-defined) -typedef enum { BLEND_ALPHA = 0, BLEND_ADDITIVE, BLEND_MULTIPLIED } BlendMode; +typedef enum { + BLEND_ALPHA = 0, + BLEND_ADDITIVE, + BLEND_MULTIPLIED +} BlendMode; // Gestures type // NOTE: It could be used as flags to enable only some gestures @@ -581,12 +608,12 @@ typedef enum { } Gestures; // Camera system modes -typedef enum { - CAMERA_CUSTOM = 0, - CAMERA_FREE, - CAMERA_ORBITAL, - CAMERA_FIRST_PERSON, - CAMERA_THIRD_PERSON +typedef enum { + CAMERA_CUSTOM = 0, + CAMERA_FREE, + CAMERA_ORBITAL, + CAMERA_FIRST_PERSON, + CAMERA_THIRD_PERSON } CameraMode; // Head Mounted Display devices @@ -602,6 +629,18 @@ typedef enum { HMD_FOVE_VR, } VrDevice; +// RRESData type +typedef enum { + RRES_TYPE_RAW = 0, + RRES_TYPE_IMAGE, + RRES_TYPE_WAVE, + RRES_TYPE_VERTEX, + RRES_TYPE_TEXT, + RRES_TYPE_FONT_IMAGE, + RRES_TYPE_FONT_CHARDATA, // CharInfo data array + RRES_TYPE_DIRECTORY +} RRESDataType; + #ifdef __cplusplus extern "C" { // Prevents name mangling of functions #endif @@ -615,44 +654,48 @@ extern "C" { // Prevents name mangling of functions // Window and Graphics Device Functions (Module: core) //------------------------------------------------------------------------------------ #if defined(PLATFORM_ANDROID) -RLAPI void InitWindow(int width, int height, void *state); // Init Android Activity and OpenGL Graphics (struct android_app) +RLAPI void InitWindow(int width, int height, void *state); // Initialize Android activity #elif defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI) || defined(PLATFORM_WEB) -RLAPI void InitWindow(int width, int height, const char *title); // Initialize Window and OpenGL Graphics +RLAPI void InitWindow(int width, int height, const char *title); // Initialize window and OpenGL context #endif -RLAPI void CloseWindow(void); // Close Window and Terminate Context -RLAPI bool WindowShouldClose(void); // Detect if KEY_ESCAPE pressed or Close icon pressed -RLAPI bool IsWindowMinimized(void); // Detect if window has been minimized (or lost focus) -RLAPI void ToggleFullscreen(void); // Fullscreen toggle (only PLATFORM_DESKTOP) +RLAPI void CloseWindow(void); // Close window and unload OpenGL context +RLAPI bool WindowShouldClose(void); // Check if KEY_ESCAPE pressed or Close icon pressed +RLAPI bool IsWindowMinimized(void); // Check if window has been minimized (or lost focus) +RLAPI void ToggleFullscreen(void); // Toggle fullscreen mode (only PLATFORM_DESKTOP) +RLAPI void SetWindowIcon(Image image); // Set icon for window (only PLATFORM_DESKTOP) +RLAPI void SetWindowPosition(int x, int y); // Set window position on screen (only PLATFORM_DESKTOP) +RLAPI void SetWindowMonitor(int monitor); // Set monitor for the current window (fullscreen mode) +RLAPI void SetWindowMinSize(int width, int height); // Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE) RLAPI int GetScreenWidth(void); // Get current screen width RLAPI int GetScreenHeight(void); // Get current screen height #if !defined(PLATFORM_ANDROID) RLAPI void ShowCursor(void); // Shows cursor RLAPI void HideCursor(void); // Hides cursor -RLAPI bool IsCursorHidden(void); // Returns true if cursor is not visible -RLAPI void EnableCursor(void); // Enables cursor -RLAPI void DisableCursor(void); // Disables cursor +RLAPI bool IsCursorHidden(void); // Check if cursor is not visible +RLAPI void EnableCursor(void); // Enables cursor (unlock cursor) +RLAPI void DisableCursor(void); // Disables cursor (lock cursor) #endif -RLAPI void ClearBackground(Color color); // Sets Background Color -RLAPI void BeginDrawing(void); // Setup drawing canvas to start drawing -RLAPI void EndDrawing(void); // End canvas drawing and Swap Buffers (Double Buffering) +RLAPI void ClearBackground(Color color); // Set background color (framebuffer clear color) +RLAPI void BeginDrawing(void); // Setup canvas (framebuffer) to start drawing +RLAPI void EndDrawing(void); // End canvas drawing and swap buffers (double buffering) -RLAPI void Begin2dMode(Camera2D camera); // Initialize 2D mode with custom camera -RLAPI void End2dMode(void); // Ends 2D mode custom camera usage -RLAPI void Begin3dMode(Camera camera); // Initializes 3D mode for drawing (Camera setup) +RLAPI void Begin2dMode(Camera2D camera); // Initialize 2D mode with custom camera (2D) +RLAPI void End2dMode(void); // Ends 2D mode with custom camera +RLAPI void Begin3dMode(Camera camera); // Initializes 3D mode with custom camera (3D) RLAPI void End3dMode(void); // Ends 3D mode and returns to default 2D orthographic mode RLAPI void BeginTextureMode(RenderTexture2D target); // Initializes render texture for drawing RLAPI void EndTextureMode(void); // Ends drawing to render texture RLAPI Ray GetMouseRay(Vector2 mousePosition, Camera camera); // Returns a ray trace from mouse position -RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Returns the screen space position from a 3d world space position +RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Returns the screen space position for a 3d world space position RLAPI Matrix GetCameraMatrix(Camera camera); // Returns camera transform matrix (view matrix) RLAPI void SetTargetFPS(int fps); // Set target FPS (maximum) -RLAPI float GetFPS(void); // Returns current FPS -RLAPI float GetFrameTime(void); // Returns time in seconds for one frame +RLAPI int GetFPS(void); // Returns current FPS +RLAPI float GetFrameTime(void); // Returns time in seconds for last frame drawn RLAPI Color GetColor(int hexValue); // Returns a Color struct from hexadecimal value RLAPI int GetHexValue(Color color); // Returns hexadecimal value for a Color @@ -663,15 +706,21 @@ RLAPI float *MatrixToFloat(Matrix mat); // Converts Ma RLAPI int GetRandomValue(int min, int max); // Returns a random value between min and max (both included) RLAPI Color Fade(Color color, float alpha); // Color fade-in or fade-out, alpha goes from 0.0f to 1.0f -RLAPI void SetConfigFlags(char flags); // Setup some window configuration flags -RLAPI void ShowLogo(void); // Activates raylib logo at startup (can be done with flags) +RLAPI void ShowLogo(void); // Activate raylib logo at startup (can be done with flags) +RLAPI void SetConfigFlags(char flags); // Setup window configuration flags (view FLAGS) +RLAPI void TraceLog(int logType, const char *text, ...); // Show trace log messages (INFO, WARNING, ERROR, DEBUG) +RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (saved a .png) -RLAPI bool IsFileDropped(void); // Check if a file have been dropped into window -RLAPI char **GetDroppedFiles(int *count); // Retrieve dropped files into window +RLAPI bool IsFileExtension(const char *fileName, const char *ext);// Check file extension +RLAPI const char *GetDirectoryPath(const char *fileName); // Get directory for a given fileName (with path) +RLAPI const char *GetWorkingDirectory(void); // Get current working directory +RLAPI bool ChangeDirectory(const char *dir); // Change working directory, returns true if success +RLAPI bool IsFileDropped(void); // Check if a file has been dropped into window +RLAPI char **GetDroppedFiles(int *count); // Get dropped files names RLAPI void ClearDroppedFiles(void); // Clear dropped files paths buffer -RLAPI void StorageSaveValue(int position, int value); // Storage save integer value (to defined position) -RLAPI int StorageLoadValue(int position); // Storage load integer value (from defined position) +RLAPI void StorageSaveValue(int position, int value); // Save integer value to storage file (to defined position) +RLAPI int StorageLoadValue(int position); // Load integer value from storage file (from defined position) //------------------------------------------------------------------------------------ // Input Handling Functions (Module: core) @@ -741,12 +790,15 @@ RLAPI void DrawPixel(int posX, int posY, Color color); RLAPI void DrawPixelV(Vector2 position, Color color); // Draw a pixel (Vector version) RLAPI void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw a line RLAPI void DrawLineV(Vector2 startPos, Vector2 endPos, Color color); // Draw a line (Vector version) +RLAPI void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line defining thickness +RLAPI void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line using cubic-bezier curves in-out RLAPI void DrawCircle(int centerX, int centerY, float radius, Color color); // Draw a color-filled circle RLAPI void DrawCircleGradient(int centerX, int centerY, float radius, Color color1, Color color2); // Draw a gradient-filled circle RLAPI void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version) RLAPI void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rectangle RLAPI void DrawRectangleRec(Rectangle rec, Color color); // Draw a color-filled rectangle +RLAPI void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color); // Draw a color-filled rectangle with pro parameters RLAPI void DrawRectangleGradient(int posX, int posY, int width, int height, Color color1, Color color2); // Draw a gradient-filled rectangle RLAPI void DrawRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rectangle (Vector version) RLAPI void DrawRectangleLines(int posX, int posY, int width, int height, Color color); // Draw rectangle outline @@ -767,21 +819,19 @@ RLAPI bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Ve //------------------------------------------------------------------------------------ // Texture Loading and Drawing Functions (Module: textures) //------------------------------------------------------------------------------------ -RLAPI Image LoadImage(const char *fileName); // Load an image into CPU memory (RAM) -RLAPI Image LoadImageEx(Color *pixels, int width, int height); // Load image data from Color array data (RGBA - 32bit) -RLAPI Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize); // Load image data from RAW file -RLAPI Image LoadImageFromRES(const char *rresName, int resId); // Load an image from rRES file (raylib Resource) -RLAPI Texture2D LoadTexture(const char *fileName); // Load an image as texture into GPU memory -RLAPI Texture2D LoadTextureEx(void *data, int width, int height, int textureFormat); // Load a texture from raw data into GPU memory -RLAPI Texture2D LoadTextureFromRES(const char *rresName, int resId); // Load an image as texture from rRES file (raylib Resource) -RLAPI Texture2D LoadTextureFromImage(Image image); // Load a texture from image data -RLAPI RenderTexture2D LoadRenderTexture(int width, int height); // Load a texture to be used for rendering +RLAPI Image LoadImage(const char *fileName); // Load image from file into CPU memory (RAM) +RLAPI Image LoadImageEx(Color *pixels, int width, int height); // Load image from Color array data (RGBA - 32bit) +RLAPI Image LoadImagePro(void *data, int width, int height, int format); // Load image from raw data with parameters +RLAPI Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize); // Load image from RAW file data +RLAPI Texture2D LoadTexture(const char *fileName); // Load texture from file into GPU memory (VRAM) +RLAPI Texture2D LoadTextureFromImage(Image image); // Load texture from image data +RLAPI RenderTexture2D LoadRenderTexture(int width, int height); // Load texture for rendering (framebuffer) RLAPI void UnloadImage(Image image); // Unload image from CPU memory (RAM) -RLAPI void UnloadTexture(Texture2D texture); // Unload texture from GPU memory -RLAPI void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory +RLAPI void UnloadTexture(Texture2D texture); // Unload texture from GPU memory (VRAM) +RLAPI void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory (VRAM) RLAPI Color *GetImageData(Image image); // Get pixel data from image as a Color struct array RLAPI Image GetTextureData(Texture2D texture); // Get pixel data from GPU texture and return an Image -RLAPI void UpdateTexture(Texture2D texture, void *pixels); // Update GPU texture with new data +RLAPI void UpdateTexture(Texture2D texture, const void *pixels); // Update GPU texture with new data RLAPI void ImageToPOT(Image *image, Color fillColor); // Convert image to POT (power-of-two) RLAPI void ImageFormat(Image *image, int newFormat); // Convert image data to desired format RLAPI void ImageAlphaMask(Image *image, Image alphaMask); // Apply alpha mask to image @@ -794,7 +844,8 @@ RLAPI Image ImageText(const char *text, int fontSize, Color color); RLAPI Image ImageTextEx(SpriteFont font, const char *text, float fontSize, int spacing, Color tint); // Create an image from text (custom sprite font) RLAPI void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec); // Draw a source image within a destination image RLAPI void ImageDrawText(Image *dst, Vector2 position, const char *text, int fontSize, Color color); // Draw text (default font) within an image (destination) -RLAPI void ImageDrawTextEx(Image *dst, Vector2 position, SpriteFont font, const char *text, float fontSize, int spacing, Color color); // Draw text (custom sprite font) within an image (destination) +RLAPI void ImageDrawTextEx(Image *dst, Vector2 position, SpriteFont font, const char *text, + float fontSize, int spacing, Color color); // Draw text (custom sprite font) within an image (destination) RLAPI void ImageFlipVertical(Image *image); // Flip image vertically RLAPI void ImageFlipHorizontal(Image *image); // Flip image horizontally RLAPI void ImageColorTint(Image *image, Color color); // Modify image color: tint @@ -817,9 +868,9 @@ RLAPI void DrawTexturePro(Texture2D texture, Rectangle sourceRec, Rectangle dest // Font Loading and Text Drawing Functions (Module: text) //------------------------------------------------------------------------------------ RLAPI SpriteFont GetDefaultFont(void); // Get the default SpriteFont -RLAPI SpriteFont LoadSpriteFont(const char *fileName); // Load a SpriteFont image into GPU memory -RLAPI SpriteFont LoadSpriteFontTTF(const char *fileName, int fontSize, int numChars, int *fontChars); // Load a SpriteFont from TTF font with parameters -RLAPI void UnloadSpriteFont(SpriteFont spriteFont); // Unload SpriteFont from GPU memory +RLAPI SpriteFont LoadSpriteFont(const char *fileName); // Load SpriteFont from file into GPU memory (VRAM) +RLAPI SpriteFont LoadSpriteFontEx(const char *fileName, int fontSize, int charsCount, int *fontChars); // Load SpriteFont from file with extended parameters +RLAPI void UnloadSpriteFont(SpriteFont spriteFont); // Unload SpriteFont from GPU memory (VRAM) RLAPI void DrawText(const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font) RLAPI void DrawTextEx(SpriteFont spriteFont, const char* text, Vector2 position, // Draw text using SpriteFont and additional parameters @@ -827,7 +878,7 @@ RLAPI void DrawTextEx(SpriteFont spriteFont, const char* text, Vector2 position, RLAPI int MeasureText(const char *text, int fontSize); // Measure string width for default font RLAPI Vector2 MeasureTextEx(SpriteFont spriteFont, const char *text, float fontSize, int spacing); // Measure string size for SpriteFont -RLAPI void DrawFPS(int posX, int posY); // Shows current FPS on top-left corner +RLAPI void DrawFPS(int posX, int posY); // Shows current FPS RLAPI const char *FormatText(const char *text, ...); // Formatting of text with variables to 'embed' RLAPI const char *SubText(const char *text, int position, int length); // Get a piece of a text string @@ -849,50 +900,57 @@ RLAPI void DrawPlane(Vector3 centerPos, Vector2 size, Color color); RLAPI void DrawRay(Ray ray, Color color); // Draw a ray line RLAPI void DrawGrid(int slices, float spacing); // Draw a grid (centered at (0, 0, 0)) RLAPI void DrawGizmo(Vector3 position); // Draw simple gizmo -RLAPI void DrawLight(Light light); // Draw light in 3D world //DrawTorus(), DrawTeapot() could be useful? //------------------------------------------------------------------------------------ // Model 3d Loading and Drawing Functions (Module: models) //------------------------------------------------------------------------------------ -RLAPI Model LoadModel(const char *fileName); // Load a 3d model (.OBJ) -RLAPI Model LoadModelEx(Mesh data, bool dynamic); // Load a 3d model (from mesh data) -RLAPI Model LoadModelFromRES(const char *rresName, int resId); // Load a 3d model from rRES file (raylib Resource) -RLAPI Model LoadHeightmap(Image heightmap, Vector3 size); // Load a heightmap image as a 3d model -RLAPI Model LoadCubicmap(Image cubicmap); // Load a map image as a 3d model (cubes based) -RLAPI void UnloadModel(Model model); // Unload 3d model from memory +RLAPI Mesh LoadMesh(const char *fileName); // Load mesh from file +RLAPI Mesh LoadMeshEx(int numVertex, float *vData, float *vtData, float *vnData, Color *cData); // Load mesh from vertex data +RLAPI Model LoadModel(const char *fileName); // Load model from file +RLAPI Model LoadModelFromMesh(Mesh data, bool dynamic); // Load model from mesh data +RLAPI Model LoadHeightmap(Image heightmap, Vector3 size); // Load heightmap model from image data +RLAPI Model LoadCubicmap(Image cubicmap); // Load cubes-based map model from image data +RLAPI void UnloadMesh(Mesh *mesh); // Unload mesh from memory (RAM and/or VRAM) +RLAPI void UnloadModel(Model model); // Unload model from memory (RAM and/or VRAM) -RLAPI Material LoadMaterial(const char *fileName); // Load material data (.MTL) -RLAPI Material LoadDefaultMaterial(void); // Load default material (uses default models shader) -RLAPI Material LoadStandardMaterial(void); // Load standard material (uses material attributes and lighting shader) -RLAPI void UnloadMaterial(Material material); // Unload material textures from VRAM +RLAPI Material LoadMaterial(const char *fileName); // Load material from file +RLAPI Material LoadDefaultMaterial(void); // Load default material (uses default models shader) +RLAPI void UnloadMaterial(Material material); // Unload material from GPU memory (VRAM) -RLAPI void DrawModel(Model model, Vector3 position, float scale, Color tint); // Draw a model (with texture if set) -RLAPI void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model with extended parameters +RLAPI void DrawModel(Model model, Vector3 position, float scale, Color tint); // Draw a model (with texture if set) +RLAPI void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, + float rotationAngle, Vector3 scale, Color tint); // Draw a model with extended parameters RLAPI void DrawModelWires(Model model, Vector3 position, float scale, Color tint); // Draw a model wires (with texture if set) -RLAPI void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model wires (with texture if set) with extended parameters -RLAPI void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires) +RLAPI void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, + float rotationAngle, Vector3 scale, Color tint); // Draw a model wires (with texture if set) with extended parameters +RLAPI void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires) -RLAPI void DrawBillboard(Camera camera, Texture2D texture, Vector3 center, float size, Color tint); // Draw a billboard texture -RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle sourceRec, Vector3 center, float size, Color tint); // Draw a billboard texture defined by sourceRec +RLAPI void DrawBillboard(Camera camera, Texture2D texture, Vector3 center, float size, Color tint); // Draw a billboard texture +RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle sourceRec, + Vector3 center, float size, Color tint); // Draw a billboard texture defined by sourceRec -RLAPI BoundingBox CalculateBoundingBox(Mesh mesh); // Calculate mesh bounding box limits -RLAPI bool CheckCollisionSpheres(Vector3 centerA, float radiusA, Vector3 centerB, float radiusB); // Detect collision between two spheres -RLAPI bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2); // Detect collision between two bounding boxes -RLAPI bool CheckCollisionBoxSphere(BoundingBox box, Vector3 centerSphere, float radiusSphere); // Detect collision between box and sphere -RLAPI bool CheckCollisionRaySphere(Ray ray, Vector3 spherePosition, float sphereRadius); // Detect collision between ray and sphere -RLAPI bool CheckCollisionRaySphereEx(Ray ray, Vector3 spherePosition, float sphereRadius, Vector3 *collisionPoint); // Detect collision between ray and sphere with extended parameters and collision point detection -RLAPI bool CheckCollisionRayBox(Ray ray, BoundingBox box); // Detect collision between ray and box +RLAPI BoundingBox CalculateBoundingBox(Mesh mesh); // Calculate mesh bounding box limits +RLAPI bool CheckCollisionSpheres(Vector3 centerA, float radiusA, Vector3 centerB, float radiusB); // Detect collision between two spheres +RLAPI bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2); // Detect collision between two bounding boxes +RLAPI bool CheckCollisionBoxSphere(BoundingBox box, Vector3 centerSphere, float radiusSphere); // Detect collision between box and sphere +RLAPI bool CheckCollisionRaySphere(Ray ray, Vector3 spherePosition, float sphereRadius); // Detect collision between ray and sphere +RLAPI bool CheckCollisionRaySphereEx(Ray ray, Vector3 spherePosition, float sphereRadius, + Vector3 *collisionPoint); // Detect collision between ray and sphere, returns collision point +RLAPI bool CheckCollisionRayBox(Ray ray, BoundingBox box); // Detect collision between ray and box +RLAPI RayHitInfo GetCollisionRayMesh(Ray ray, Mesh *mesh); // Get collision info between ray and mesh +RLAPI RayHitInfo GetCollisionRayTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3); // Get collision info between ray and triangle +RLAPI RayHitInfo GetCollisionRayGround(Ray ray, float groundHeight); // Get collision info between ray and ground plane (Y-normal plane) //------------------------------------------------------------------------------------ // Shaders System Functions (Module: rlgl) // NOTE: This functions are useless when using OpenGL 1.1 //------------------------------------------------------------------------------------ -RLAPI Shader LoadShader(char *vsFileName, char *fsFileName); // Load a custom shader and bind default locations -RLAPI void UnloadShader(Shader shader); // Unload a custom shader from memory +RLAPI char *LoadText(const char *fileName); // Load chars array from text file +RLAPI Shader LoadShader(char *vsFileName, char *fsFileName); // Load shader from files and bind default locations +RLAPI void UnloadShader(Shader shader); // Unload shader from GPU memory (VRAM) RLAPI Shader GetDefaultShader(void); // Get default shader -RLAPI Shader GetStandardShader(void); // Get standard shader RLAPI Texture2D GetDefaultTexture(void); // Get default texture RLAPI int GetShaderLocation(Shader shader, const char *uniformName); // Get shader uniform location @@ -908,19 +966,17 @@ RLAPI void EndShaderMode(void); // End RLAPI void BeginBlendMode(int mode); // Begin blending mode (alpha, additive, multiplied) RLAPI void EndBlendMode(void); // End blending mode (reset to default: alpha blending) -RLAPI Light CreateLight(int type, Vector3 position, Color diffuse); // Create a new light, initialize it and add to pool -RLAPI void DestroyLight(Light light); // Destroy a light and take it out of the list - //------------------------------------------------------------------------------------ // VR experience Functions (Module: rlgl) // NOTE: This functions are useless when using OpenGL 1.1 //------------------------------------------------------------------------------------ -RLAPI void InitVrDevice(int vdDevice); // Init VR device -RLAPI void CloseVrDevice(void); // Close VR device -RLAPI bool IsVrDeviceReady(void); // Detect if VR device is ready -RLAPI bool IsVrSimulator(void); // Detect if VR simulator is running -RLAPI void UpdateVrTracking(Camera *camera); // Update VR tracking (position and orientation) and camera -RLAPI void ToggleVrMode(void); // Enable/Disable VR experience (device or simulator) +RLAPI void InitVrSimulator(int vrDevice); // Init VR simulator for selected device +RLAPI void CloseVrSimulator(void); // Close VR simulator for current device +RLAPI bool IsVrSimulatorReady(void); // Detect if VR device is ready +RLAPI void UpdateVrTracking(Camera *camera); // Update VR tracking (position and orientation) and camera +RLAPI void ToggleVrMode(void); // Enable/Disable VR experience (device or simulator) +RLAPI void BeginVrDrawing(void); // Begin VR simulator stereo rendering +RLAPI void EndVrDrawing(void); // End VR simulator stereo rendering //------------------------------------------------------------------------------------ // Audio Loading and Playing Functions (Module: audio) @@ -928,13 +984,13 @@ RLAPI void ToggleVrMode(void); // Enable/Disable VR experienc RLAPI void InitAudioDevice(void); // Initialize audio device and context RLAPI void CloseAudioDevice(void); // Close the audio device and context RLAPI bool IsAudioDeviceReady(void); // Check if audio device has been initialized successfully +RLAPI void SetMasterVolume(float volume); // Set master volume (listener) -RLAPI Wave LoadWave(const char *fileName); // Load wave data from file into RAM -RLAPI Wave LoadWaveEx(float *data, int sampleCount, int sampleRate, int sampleSize, int channels); // Load wave data from float array data (32bit) -RLAPI Sound LoadSound(const char *fileName); // Load sound to memory -RLAPI Sound LoadSoundFromWave(Wave wave); // Load sound to memory from wave data -RLAPI Sound LoadSoundFromRES(const char *rresName, int resId); // Load sound to memory from rRES file (raylib Resource) -RLAPI void UpdateSound(Sound sound, void *data, int numSamples); // Update sound buffer with new data +RLAPI Wave LoadWave(const char *fileName); // Load wave data from file +RLAPI Wave LoadWaveEx(void *data, int sampleCount, int sampleRate, int sampleSize, int channels); // Load wave data from raw array data +RLAPI Sound LoadSound(const char *fileName); // Load sound from file +RLAPI Sound LoadSoundFromWave(Wave wave); // Load sound from wave data +RLAPI void UpdateSound(Sound sound, const void *data, int samplesCount);// Update sound buffer with new data RLAPI void UnloadWave(Wave wave); // Unload wave data RLAPI void UnloadSound(Sound sound); // Unload sound RLAPI void PlaySound(Sound sound); // Play a sound @@ -958,13 +1014,14 @@ RLAPI void ResumeMusicStream(Music music); // Resume RLAPI bool IsMusicPlaying(Music music); // Check if music is playing RLAPI void SetMusicVolume(Music music, float volume); // Set volume for music (1.0 is max level) RLAPI void SetMusicPitch(Music music, float pitch); // Set pitch for a music (1.0 is base level) +RLAPI void SetMusicLoopCount(Music music, float count); // Set music loop count (loop repeats) RLAPI float GetMusicTimeLength(Music music); // Get music time length (in seconds) RLAPI float GetMusicTimePlayed(Music music); // Get current music time played (in seconds) RLAPI AudioStream InitAudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels); // Init audio stream (to stream raw audio pcm data) -RLAPI void UpdateAudioStream(AudioStream stream, void *data, int numSamples); // Update audio stream buffers with data +RLAPI void UpdateAudioStream(AudioStream stream, const void *data, int samplesCount); // Update audio stream buffers with data RLAPI void CloseAudioStream(AudioStream stream); // Close audio stream and free memory RLAPI bool IsAudioBufferProcessed(AudioStream stream); // Check if any audio stream buffers requires refill RLAPI void PlayAudioStream(AudioStream stream); // Play audio stream diff --git a/release/osx/raylib.h b/release/osx/raylib.h index d28b07a35..429c26ca0 100644 --- a/release/osx/raylib.h +++ b/release/osx/raylib.h @@ -1,51 +1,51 @@ /********************************************************************************************** * -* raylib 1.6.0 (www.raylib.com) +* raylib v1.7.0 * -* A simple and easy-to-use library to learn videogames programming +* A simple and easy-to-use library to learn videogames programming (www.raylib.com) * -* Features: -* Library written in plain C code (C99) -* Uses PascalCase/camelCase notation -* Hardware accelerated with OpenGL (1.1, 2.1, 3.3 or ES 2.0) -* Unique OpenGL abstraction layer (usable as standalone module): [rlgl] -* Powerful fonts module with SpriteFonts support (XNA bitmap fonts, AngelCode fonts, TTF) -* Multiple textures support, including compressed formats and mipmaps generation -* Basic 3d support for Shapes, Models, Billboards, Heightmaps and Cubicmaps -* Materials (diffuse, normal, specular) and Lighting (point, directional, spot) support -* Powerful math module for Vector, Matrix and Quaternion operations: [raymath] -* Audio loading and playing with streaming support and mixing channels [audio] -* VR stereo rendering support with configurable HMD device parameters -* Multiple platforms support: Windows, Linux, Mac, Android, Raspberry Pi, HTML5 and Oculus Rift CV1 -* Custom color palette for fancy visuals on raywhite background -* Minimal external dependencies (GLFW3, OpenGL, OpenAL) -* Complete binding for LUA [rlua] +* FEATURES: +* - Library written in plain C code (C99) +* - Multiple platforms supported: Windows, Linux, Mac, Android, Raspberry Pi, HTML5. +* - Hardware accelerated with OpenGL (1.1, 2.1, 3.3 or ES 2.0) +* - Unique OpenGL abstraction layer (usable as standalone module): [rlgl] +* - Powerful fonts module with SpriteFonts support (XNA bitmap fonts, AngelCode fonts, TTF) +* - Multiple textures support, including compressed formats and mipmaps generation +* - Basic 3d support for Shapes, Models, Billboards, Heightmaps and Cubicmaps +* - Powerful math module for Vector2, Vector3, Matrix and Quaternion operations: [raymath] +* - Audio loading and playing with streaming support and mixing channels: [audio] +* - VR stereo rendering support with configurable HMD device parameters +* - Minimal external dependencies (GLFW3, OpenGL, OpenAL) +* - Complete bindings for Lua, Go and Pascal * -* External libs: -* GLFW3 (www.glfw.org) for window/context management and input [core] -* GLAD for OpenGL extensions loading (3.3 Core profile, only PLATFORM_DESKTOP) [rlgl] -* stb_image (Sean Barret) for images loading (JPEG, PNG, BMP, TGA) [textures] -* stb_image_write (Sean Barret) for image writting (PNG) [utils] -* stb_truetype (Sean Barret) for ttf fonts loading [text] -* stb_vorbis (Sean Barret) for ogg audio loading [audio] -* jar_xm (Joshua Reisenauer) for XM audio module loading [audio] -* jar_mod (Joshua Reisenauer) for MOD audio module loading [audio] -* dr_flac (David Reid) for FLAC audio file loading [audio] -* OpenAL Soft for audio device/context management [audio] -* tinfl for data decompression (DEFLATE algorithm) [utils] +* NOTES: +* 32bit Colors - Any defined Color is always RGBA (4 byte) +* One custom font is loaded by default when InitWindow() [core] +* If using OpenGL 3.3 or ES2, one default shader is loaded automatically (internally defined) [rlgl] +* If using OpenGL 3.3 or ES2, several vertex buffers (VAO/VBO) are created to manage lines-triangles-quads * -* Some design decisions: -* 32bit Colors - All defined color are always RGBA (struct Color is 4 byte) -* One custom default font could be loaded automatically when InitWindow() [core] -* If using OpenGL 3.3 or ES2, several vertex buffers (VAO/VBO) are created to manage lines-triangles-quads -* If using OpenGL 3.3 or ES2, two default shaders could be loaded automatically (internally defined) +* DEPENDENCIES: +* GLFW3 (www.glfw.org) for window/context management and input [core] +* GLAD for OpenGL extensions loading (3.3 Core profile, only PLATFORM_DESKTOP) [rlgl] +* OpenAL Soft for audio device/context management [audio] * -* -- LICENSE -- +* OPTIONAL DEPENDENCIES: +* stb_image (Sean Barret) for images loading (JPEG, PNG, BMP, TGA) [textures] +* stb_image_write (Sean Barret) for image writting (PNG) [utils] +* stb_truetype (Sean Barret) for ttf fonts loading [text] +* stb_vorbis (Sean Barret) for ogg audio loading [audio] +* jar_xm (Joshua Reisenauer) for XM audio module loading [audio] +* jar_mod (Joshua Reisenauer) for MOD audio module loading [audio] +* dr_flac (David Reid) for FLAC audio file loading [audio] +* tinfl for data decompression (DEFLATE algorithm) [rres] +* +* +* LICENSE: zlib/libpng * * raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified, * BSD-like license that allows static linking with closed source software: * -* Copyright (c) 2013-2016 Ramon Santamaria (@raysan5) +* Copyright (c) 2013-2017 Ramon Santamaria (@raysan5) * * This software is provided "as-is", without any express or implied warranty. In no event * will the authors be held liable for any damages arising from the use of this software. @@ -72,7 +72,6 @@ //#define PLATFORM_ANDROID // Android device //#define PLATFORM_RPI // Raspberry Pi //#define PLATFORM_WEB // HTML5 (emscripten, asm.js) -//#define RLGL_OCULUS_SUPPORT // Oculus Rift CV1 (complementary to PLATFORM_DESKTOP) // Security check in case no PLATFORM_* defined #if !defined(PLATFORM_DESKTOP) && !defined(PLATFORM_ANDROID) && !defined(PLATFORM_RPI) && !defined(PLATFORM_WEB) @@ -98,13 +97,13 @@ #define RAD2DEG (180.0f/PI) // raylib Config Flags -#define FLAG_FULLSCREEN_MODE 1 -#define FLAG_RESIZABLE_WINDOW 2 -#define FLAG_SHOW_LOGO 4 -#define FLAG_SHOW_MOUSE_CURSOR 8 -#define FLAG_CENTERED_MODE 16 -#define FLAG_MSAA_4X_HINT 32 -#define FLAG_VSYNC_HINT 64 +#define FLAG_SHOW_LOGO 1 // Set to show raylib logo at startup +#define FLAG_FULLSCREEN_MODE 2 // Set to run program in fullscreen +#define FLAG_WINDOW_RESIZABLE 4 // Set to allow resizable window +#define FLAG_WINDOW_DECORATED 8 // Set to show window decoration (frame and buttons) +#define FLAG_WINDOW_TRANSPARENT 16 // Set to allow transparent window +#define FLAG_MSAA_4X_HINT 32 // Set to try enabling MSAA 4X +#define FLAG_VSYNC_HINT 64 // Set to try enabling V-Sync on GPU // Keyboard Function Keys #define KEY_SPACE 32 @@ -293,17 +292,13 @@ #define RAYWHITE CLITERAL{ 245, 245, 245, 255 } // My own White (raylib logo) //---------------------------------------------------------------------------------- -// Types and Structures Definition +// Structures Definition //---------------------------------------------------------------------------------- #ifndef __cplusplus // Boolean type - #ifndef __APPLE__ - #if !defined(_STDBOOL_H) - typedef enum { false, true } bool; - #define _STDBOOL_H - #endif - #else - #include + #if !defined(_STDBOOL_H) + typedef enum { false, true } bool; + #define _STDBOOL_H #endif #endif @@ -351,35 +346,41 @@ typedef struct Image { int width; // Image base width int height; // Image base height int mipmaps; // Mipmap levels, 1 by default - int format; // Data format (TextureFormat) + int format; // Data format (TextureFormat type) } Image; -// Texture2D type, bpp always RGBA (32bit) +// Texture2D type // NOTE: Data stored in GPU memory typedef struct Texture2D { unsigned int id; // OpenGL texture id int width; // Texture base width int height; // Texture base height int mipmaps; // Mipmap levels, 1 by default - int format; // Data format (TextureFormat) + int format; // Data format (TextureFormat type) } Texture2D; // RenderTexture2D type, for texture rendering typedef struct RenderTexture2D { - unsigned int id; // Render texture (fbo) id + unsigned int id; // OpenGL Framebuffer Object (FBO) id Texture2D texture; // Color buffer attachment texture Texture2D depth; // Depth buffer attachment texture } RenderTexture2D; +// SpriteFont character info +typedef struct CharInfo { + int value; // Character value (Unicode) + Rectangle rec; // Character rectangle in sprite font + int offsetX; // Character offset X when drawing + int offsetY; // Character offset Y when drawing + int advanceX; // Character advance position X +} CharInfo; + // SpriteFont type, includes texture and charSet array data typedef struct SpriteFont { Texture2D texture; // Font texture - int size; // Base size (default chars height) - int numChars; // Number of characters - int *charValues; // Characters values array - Rectangle *charRecs; // Characters rectangles within the texture - Vector2 *charOffsets; // Characters offsets (on drawing) - int *charAdvanceX; // Characters x advance (on drawing) + int baseSize; // Base size (default chars height) + int charsCount; // Number of characters + CharInfo *chars; // Characters info data } SpriteFont; // Camera type, defines a camera position/orientation in 3d space @@ -466,31 +467,20 @@ typedef struct Model { Material material; // Shader and textures data } Model; -// Light type -typedef struct LightData { - unsigned int id; // Light unique id - bool enabled; // Light enabled - int type; // Light type: LIGHT_POINT, LIGHT_DIRECTIONAL, LIGHT_SPOT - - Vector3 position; // Light position - Vector3 target; // Light direction: LIGHT_DIRECTIONAL and LIGHT_SPOT (cone direction target) - float radius; // Light attenuation radius light intensity reduced with distance (world distance) - - Color diffuse; // Light diffuse color - float intensity; // Light intensity level - - float coneAngle; // Light cone max angle: LIGHT_SPOT -} LightData, *Light; - -// Light types -typedef enum { LIGHT_POINT, LIGHT_DIRECTIONAL, LIGHT_SPOT } LightType; - // Ray type (useful for raycast) typedef struct Ray { Vector3 position; // Ray position (origin) Vector3 direction; // Ray direction } Ray; +// Information returned from a raycast +typedef struct RayHitInfo { + bool hit; // Did the ray hit something? + float distance; // Distance to nearest hit + Vector3 position; // Position of nearest hit + Vector3 normal; // Surface normal of hit +} RayHitInfo; + // Wave type, defines audio wave data typedef struct Wave { unsigned int sampleCount; // Number of samples @@ -523,6 +513,34 @@ typedef struct AudioStream { unsigned int buffers[2]; // OpenAL audio buffers (double buffering) } AudioStream; +// rRES data returned when reading a resource, +// it contains all required data for user (24 byte) +typedef struct RRESData { + unsigned int type; // Resource type (4 byte) + + unsigned int param1; // Resouce parameter 1 (4 byte) + unsigned int param2; // Resouce parameter 2 (4 byte) + unsigned int param3; // Resouce parameter 3 (4 byte) + unsigned int param4; // Resouce parameter 4 (4 byte) + + void *data; // Resource data pointer (4 byte) +} RRESData; + +// RRES type (pointer to RRESData array) +typedef struct RRESData *RRES; + +//---------------------------------------------------------------------------------- +// Enumerators Definition +//---------------------------------------------------------------------------------- +// Trace log type +typedef enum { + INFO = 0, + WARNING, + ERROR, + DEBUG, + OTHER +} LogType; + // Texture formats // NOTE: Support depends on OpenGL version and platform typedef enum { @@ -533,6 +551,7 @@ typedef enum { UNCOMPRESSED_R5G5B5A1, // 16 bpp (1 bit alpha) UNCOMPRESSED_R4G4B4A4, // 16 bpp (4 bit alpha) UNCOMPRESSED_R8G8B8A8, // 32 bpp + UNCOMPRESSED_R32G32B32, // 32 bit per channel (float) - HDR COMPRESSED_DXT1_RGB, // 4 bpp (no alpha) COMPRESSED_DXT1_RGBA, // 4 bpp (1 bit alpha) COMPRESSED_DXT3_RGBA, // 8 bpp @@ -549,7 +568,7 @@ typedef enum { // Texture parameters: filter mode // NOTE 1: Filtering considers mipmaps if available in the texture // NOTE 2: Filter is accordingly set for minification and magnification -typedef enum { +typedef enum { FILTER_POINT = 0, // No filter, just pixel aproximation FILTER_BILINEAR, // Linear filtering FILTER_TRILINEAR, // Trilinear filtering (linear with mipmaps) @@ -559,10 +578,18 @@ typedef enum { } TextureFilterMode; // Texture parameters: wrap mode -typedef enum { WRAP_REPEAT = 0, WRAP_CLAMP, WRAP_MIRROR } TextureWrapMode; +typedef enum { + WRAP_REPEAT = 0, + WRAP_CLAMP, + WRAP_MIRROR +} TextureWrapMode; // Color blending modes (pre-defined) -typedef enum { BLEND_ALPHA = 0, BLEND_ADDITIVE, BLEND_MULTIPLIED } BlendMode; +typedef enum { + BLEND_ALPHA = 0, + BLEND_ADDITIVE, + BLEND_MULTIPLIED +} BlendMode; // Gestures type // NOTE: It could be used as flags to enable only some gestures @@ -581,12 +608,12 @@ typedef enum { } Gestures; // Camera system modes -typedef enum { - CAMERA_CUSTOM = 0, - CAMERA_FREE, - CAMERA_ORBITAL, - CAMERA_FIRST_PERSON, - CAMERA_THIRD_PERSON +typedef enum { + CAMERA_CUSTOM = 0, + CAMERA_FREE, + CAMERA_ORBITAL, + CAMERA_FIRST_PERSON, + CAMERA_THIRD_PERSON } CameraMode; // Head Mounted Display devices @@ -602,6 +629,18 @@ typedef enum { HMD_FOVE_VR, } VrDevice; +// RRESData type +typedef enum { + RRES_TYPE_RAW = 0, + RRES_TYPE_IMAGE, + RRES_TYPE_WAVE, + RRES_TYPE_VERTEX, + RRES_TYPE_TEXT, + RRES_TYPE_FONT_IMAGE, + RRES_TYPE_FONT_CHARDATA, // CharInfo data array + RRES_TYPE_DIRECTORY +} RRESDataType; + #ifdef __cplusplus extern "C" { // Prevents name mangling of functions #endif @@ -615,44 +654,48 @@ extern "C" { // Prevents name mangling of functions // Window and Graphics Device Functions (Module: core) //------------------------------------------------------------------------------------ #if defined(PLATFORM_ANDROID) -RLAPI void InitWindow(int width, int height, void *state); // Init Android Activity and OpenGL Graphics (struct android_app) +RLAPI void InitWindow(int width, int height, void *state); // Initialize Android activity #elif defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI) || defined(PLATFORM_WEB) -RLAPI void InitWindow(int width, int height, const char *title); // Initialize Window and OpenGL Graphics +RLAPI void InitWindow(int width, int height, const char *title); // Initialize window and OpenGL context #endif -RLAPI void CloseWindow(void); // Close Window and Terminate Context -RLAPI bool WindowShouldClose(void); // Detect if KEY_ESCAPE pressed or Close icon pressed -RLAPI bool IsWindowMinimized(void); // Detect if window has been minimized (or lost focus) -RLAPI void ToggleFullscreen(void); // Fullscreen toggle (only PLATFORM_DESKTOP) +RLAPI void CloseWindow(void); // Close window and unload OpenGL context +RLAPI bool WindowShouldClose(void); // Check if KEY_ESCAPE pressed or Close icon pressed +RLAPI bool IsWindowMinimized(void); // Check if window has been minimized (or lost focus) +RLAPI void ToggleFullscreen(void); // Toggle fullscreen mode (only PLATFORM_DESKTOP) +RLAPI void SetWindowIcon(Image image); // Set icon for window (only PLATFORM_DESKTOP) +RLAPI void SetWindowPosition(int x, int y); // Set window position on screen (only PLATFORM_DESKTOP) +RLAPI void SetWindowMonitor(int monitor); // Set monitor for the current window (fullscreen mode) +RLAPI void SetWindowMinSize(int width, int height); // Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE) RLAPI int GetScreenWidth(void); // Get current screen width RLAPI int GetScreenHeight(void); // Get current screen height #if !defined(PLATFORM_ANDROID) RLAPI void ShowCursor(void); // Shows cursor RLAPI void HideCursor(void); // Hides cursor -RLAPI bool IsCursorHidden(void); // Returns true if cursor is not visible -RLAPI void EnableCursor(void); // Enables cursor -RLAPI void DisableCursor(void); // Disables cursor +RLAPI bool IsCursorHidden(void); // Check if cursor is not visible +RLAPI void EnableCursor(void); // Enables cursor (unlock cursor) +RLAPI void DisableCursor(void); // Disables cursor (lock cursor) #endif -RLAPI void ClearBackground(Color color); // Sets Background Color -RLAPI void BeginDrawing(void); // Setup drawing canvas to start drawing -RLAPI void EndDrawing(void); // End canvas drawing and Swap Buffers (Double Buffering) +RLAPI void ClearBackground(Color color); // Set background color (framebuffer clear color) +RLAPI void BeginDrawing(void); // Setup canvas (framebuffer) to start drawing +RLAPI void EndDrawing(void); // End canvas drawing and swap buffers (double buffering) -RLAPI void Begin2dMode(Camera2D camera); // Initialize 2D mode with custom camera -RLAPI void End2dMode(void); // Ends 2D mode custom camera usage -RLAPI void Begin3dMode(Camera camera); // Initializes 3D mode for drawing (Camera setup) +RLAPI void Begin2dMode(Camera2D camera); // Initialize 2D mode with custom camera (2D) +RLAPI void End2dMode(void); // Ends 2D mode with custom camera +RLAPI void Begin3dMode(Camera camera); // Initializes 3D mode with custom camera (3D) RLAPI void End3dMode(void); // Ends 3D mode and returns to default 2D orthographic mode RLAPI void BeginTextureMode(RenderTexture2D target); // Initializes render texture for drawing RLAPI void EndTextureMode(void); // Ends drawing to render texture RLAPI Ray GetMouseRay(Vector2 mousePosition, Camera camera); // Returns a ray trace from mouse position -RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Returns the screen space position from a 3d world space position +RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Returns the screen space position for a 3d world space position RLAPI Matrix GetCameraMatrix(Camera camera); // Returns camera transform matrix (view matrix) RLAPI void SetTargetFPS(int fps); // Set target FPS (maximum) -RLAPI float GetFPS(void); // Returns current FPS -RLAPI float GetFrameTime(void); // Returns time in seconds for one frame +RLAPI int GetFPS(void); // Returns current FPS +RLAPI float GetFrameTime(void); // Returns time in seconds for last frame drawn RLAPI Color GetColor(int hexValue); // Returns a Color struct from hexadecimal value RLAPI int GetHexValue(Color color); // Returns hexadecimal value for a Color @@ -663,15 +706,21 @@ RLAPI float *MatrixToFloat(Matrix mat); // Converts Ma RLAPI int GetRandomValue(int min, int max); // Returns a random value between min and max (both included) RLAPI Color Fade(Color color, float alpha); // Color fade-in or fade-out, alpha goes from 0.0f to 1.0f -RLAPI void SetConfigFlags(char flags); // Setup some window configuration flags -RLAPI void ShowLogo(void); // Activates raylib logo at startup (can be done with flags) +RLAPI void ShowLogo(void); // Activate raylib logo at startup (can be done with flags) +RLAPI void SetConfigFlags(char flags); // Setup window configuration flags (view FLAGS) +RLAPI void TraceLog(int logType, const char *text, ...); // Show trace log messages (INFO, WARNING, ERROR, DEBUG) +RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (saved a .png) -RLAPI bool IsFileDropped(void); // Check if a file have been dropped into window -RLAPI char **GetDroppedFiles(int *count); // Retrieve dropped files into window +RLAPI bool IsFileExtension(const char *fileName, const char *ext);// Check file extension +RLAPI const char *GetDirectoryPath(const char *fileName); // Get directory for a given fileName (with path) +RLAPI const char *GetWorkingDirectory(void); // Get current working directory +RLAPI bool ChangeDirectory(const char *dir); // Change working directory, returns true if success +RLAPI bool IsFileDropped(void); // Check if a file has been dropped into window +RLAPI char **GetDroppedFiles(int *count); // Get dropped files names RLAPI void ClearDroppedFiles(void); // Clear dropped files paths buffer -RLAPI void StorageSaveValue(int position, int value); // Storage save integer value (to defined position) -RLAPI int StorageLoadValue(int position); // Storage load integer value (from defined position) +RLAPI void StorageSaveValue(int position, int value); // Save integer value to storage file (to defined position) +RLAPI int StorageLoadValue(int position); // Load integer value from storage file (from defined position) //------------------------------------------------------------------------------------ // Input Handling Functions (Module: core) @@ -741,12 +790,15 @@ RLAPI void DrawPixel(int posX, int posY, Color color); RLAPI void DrawPixelV(Vector2 position, Color color); // Draw a pixel (Vector version) RLAPI void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw a line RLAPI void DrawLineV(Vector2 startPos, Vector2 endPos, Color color); // Draw a line (Vector version) +RLAPI void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line defining thickness +RLAPI void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line using cubic-bezier curves in-out RLAPI void DrawCircle(int centerX, int centerY, float radius, Color color); // Draw a color-filled circle RLAPI void DrawCircleGradient(int centerX, int centerY, float radius, Color color1, Color color2); // Draw a gradient-filled circle RLAPI void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version) RLAPI void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rectangle RLAPI void DrawRectangleRec(Rectangle rec, Color color); // Draw a color-filled rectangle +RLAPI void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color); // Draw a color-filled rectangle with pro parameters RLAPI void DrawRectangleGradient(int posX, int posY, int width, int height, Color color1, Color color2); // Draw a gradient-filled rectangle RLAPI void DrawRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rectangle (Vector version) RLAPI void DrawRectangleLines(int posX, int posY, int width, int height, Color color); // Draw rectangle outline @@ -767,21 +819,19 @@ RLAPI bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Ve //------------------------------------------------------------------------------------ // Texture Loading and Drawing Functions (Module: textures) //------------------------------------------------------------------------------------ -RLAPI Image LoadImage(const char *fileName); // Load an image into CPU memory (RAM) -RLAPI Image LoadImageEx(Color *pixels, int width, int height); // Load image data from Color array data (RGBA - 32bit) -RLAPI Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize); // Load image data from RAW file -RLAPI Image LoadImageFromRES(const char *rresName, int resId); // Load an image from rRES file (raylib Resource) -RLAPI Texture2D LoadTexture(const char *fileName); // Load an image as texture into GPU memory -RLAPI Texture2D LoadTextureEx(void *data, int width, int height, int textureFormat); // Load a texture from raw data into GPU memory -RLAPI Texture2D LoadTextureFromRES(const char *rresName, int resId); // Load an image as texture from rRES file (raylib Resource) -RLAPI Texture2D LoadTextureFromImage(Image image); // Load a texture from image data -RLAPI RenderTexture2D LoadRenderTexture(int width, int height); // Load a texture to be used for rendering +RLAPI Image LoadImage(const char *fileName); // Load image from file into CPU memory (RAM) +RLAPI Image LoadImageEx(Color *pixels, int width, int height); // Load image from Color array data (RGBA - 32bit) +RLAPI Image LoadImagePro(void *data, int width, int height, int format); // Load image from raw data with parameters +RLAPI Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize); // Load image from RAW file data +RLAPI Texture2D LoadTexture(const char *fileName); // Load texture from file into GPU memory (VRAM) +RLAPI Texture2D LoadTextureFromImage(Image image); // Load texture from image data +RLAPI RenderTexture2D LoadRenderTexture(int width, int height); // Load texture for rendering (framebuffer) RLAPI void UnloadImage(Image image); // Unload image from CPU memory (RAM) -RLAPI void UnloadTexture(Texture2D texture); // Unload texture from GPU memory -RLAPI void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory +RLAPI void UnloadTexture(Texture2D texture); // Unload texture from GPU memory (VRAM) +RLAPI void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory (VRAM) RLAPI Color *GetImageData(Image image); // Get pixel data from image as a Color struct array RLAPI Image GetTextureData(Texture2D texture); // Get pixel data from GPU texture and return an Image -RLAPI void UpdateTexture(Texture2D texture, void *pixels); // Update GPU texture with new data +RLAPI void UpdateTexture(Texture2D texture, const void *pixels); // Update GPU texture with new data RLAPI void ImageToPOT(Image *image, Color fillColor); // Convert image to POT (power-of-two) RLAPI void ImageFormat(Image *image, int newFormat); // Convert image data to desired format RLAPI void ImageAlphaMask(Image *image, Image alphaMask); // Apply alpha mask to image @@ -794,7 +844,8 @@ RLAPI Image ImageText(const char *text, int fontSize, Color color); RLAPI Image ImageTextEx(SpriteFont font, const char *text, float fontSize, int spacing, Color tint); // Create an image from text (custom sprite font) RLAPI void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec); // Draw a source image within a destination image RLAPI void ImageDrawText(Image *dst, Vector2 position, const char *text, int fontSize, Color color); // Draw text (default font) within an image (destination) -RLAPI void ImageDrawTextEx(Image *dst, Vector2 position, SpriteFont font, const char *text, float fontSize, int spacing, Color color); // Draw text (custom sprite font) within an image (destination) +RLAPI void ImageDrawTextEx(Image *dst, Vector2 position, SpriteFont font, const char *text, + float fontSize, int spacing, Color color); // Draw text (custom sprite font) within an image (destination) RLAPI void ImageFlipVertical(Image *image); // Flip image vertically RLAPI void ImageFlipHorizontal(Image *image); // Flip image horizontally RLAPI void ImageColorTint(Image *image, Color color); // Modify image color: tint @@ -817,9 +868,9 @@ RLAPI void DrawTexturePro(Texture2D texture, Rectangle sourceRec, Rectangle dest // Font Loading and Text Drawing Functions (Module: text) //------------------------------------------------------------------------------------ RLAPI SpriteFont GetDefaultFont(void); // Get the default SpriteFont -RLAPI SpriteFont LoadSpriteFont(const char *fileName); // Load a SpriteFont image into GPU memory -RLAPI SpriteFont LoadSpriteFontTTF(const char *fileName, int fontSize, int numChars, int *fontChars); // Load a SpriteFont from TTF font with parameters -RLAPI void UnloadSpriteFont(SpriteFont spriteFont); // Unload SpriteFont from GPU memory +RLAPI SpriteFont LoadSpriteFont(const char *fileName); // Load SpriteFont from file into GPU memory (VRAM) +RLAPI SpriteFont LoadSpriteFontEx(const char *fileName, int fontSize, int charsCount, int *fontChars); // Load SpriteFont from file with extended parameters +RLAPI void UnloadSpriteFont(SpriteFont spriteFont); // Unload SpriteFont from GPU memory (VRAM) RLAPI void DrawText(const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font) RLAPI void DrawTextEx(SpriteFont spriteFont, const char* text, Vector2 position, // Draw text using SpriteFont and additional parameters @@ -827,7 +878,7 @@ RLAPI void DrawTextEx(SpriteFont spriteFont, const char* text, Vector2 position, RLAPI int MeasureText(const char *text, int fontSize); // Measure string width for default font RLAPI Vector2 MeasureTextEx(SpriteFont spriteFont, const char *text, float fontSize, int spacing); // Measure string size for SpriteFont -RLAPI void DrawFPS(int posX, int posY); // Shows current FPS on top-left corner +RLAPI void DrawFPS(int posX, int posY); // Shows current FPS RLAPI const char *FormatText(const char *text, ...); // Formatting of text with variables to 'embed' RLAPI const char *SubText(const char *text, int position, int length); // Get a piece of a text string @@ -849,50 +900,57 @@ RLAPI void DrawPlane(Vector3 centerPos, Vector2 size, Color color); RLAPI void DrawRay(Ray ray, Color color); // Draw a ray line RLAPI void DrawGrid(int slices, float spacing); // Draw a grid (centered at (0, 0, 0)) RLAPI void DrawGizmo(Vector3 position); // Draw simple gizmo -RLAPI void DrawLight(Light light); // Draw light in 3D world //DrawTorus(), DrawTeapot() could be useful? //------------------------------------------------------------------------------------ // Model 3d Loading and Drawing Functions (Module: models) //------------------------------------------------------------------------------------ -RLAPI Model LoadModel(const char *fileName); // Load a 3d model (.OBJ) -RLAPI Model LoadModelEx(Mesh data, bool dynamic); // Load a 3d model (from mesh data) -RLAPI Model LoadModelFromRES(const char *rresName, int resId); // Load a 3d model from rRES file (raylib Resource) -RLAPI Model LoadHeightmap(Image heightmap, Vector3 size); // Load a heightmap image as a 3d model -RLAPI Model LoadCubicmap(Image cubicmap); // Load a map image as a 3d model (cubes based) -RLAPI void UnloadModel(Model model); // Unload 3d model from memory +RLAPI Mesh LoadMesh(const char *fileName); // Load mesh from file +RLAPI Mesh LoadMeshEx(int numVertex, float *vData, float *vtData, float *vnData, Color *cData); // Load mesh from vertex data +RLAPI Model LoadModel(const char *fileName); // Load model from file +RLAPI Model LoadModelFromMesh(Mesh data, bool dynamic); // Load model from mesh data +RLAPI Model LoadHeightmap(Image heightmap, Vector3 size); // Load heightmap model from image data +RLAPI Model LoadCubicmap(Image cubicmap); // Load cubes-based map model from image data +RLAPI void UnloadMesh(Mesh *mesh); // Unload mesh from memory (RAM and/or VRAM) +RLAPI void UnloadModel(Model model); // Unload model from memory (RAM and/or VRAM) -RLAPI Material LoadMaterial(const char *fileName); // Load material data (.MTL) -RLAPI Material LoadDefaultMaterial(void); // Load default material (uses default models shader) -RLAPI Material LoadStandardMaterial(void); // Load standard material (uses material attributes and lighting shader) -RLAPI void UnloadMaterial(Material material); // Unload material textures from VRAM +RLAPI Material LoadMaterial(const char *fileName); // Load material from file +RLAPI Material LoadDefaultMaterial(void); // Load default material (uses default models shader) +RLAPI void UnloadMaterial(Material material); // Unload material from GPU memory (VRAM) -RLAPI void DrawModel(Model model, Vector3 position, float scale, Color tint); // Draw a model (with texture if set) -RLAPI void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model with extended parameters +RLAPI void DrawModel(Model model, Vector3 position, float scale, Color tint); // Draw a model (with texture if set) +RLAPI void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, + float rotationAngle, Vector3 scale, Color tint); // Draw a model with extended parameters RLAPI void DrawModelWires(Model model, Vector3 position, float scale, Color tint); // Draw a model wires (with texture if set) -RLAPI void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model wires (with texture if set) with extended parameters -RLAPI void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires) +RLAPI void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, + float rotationAngle, Vector3 scale, Color tint); // Draw a model wires (with texture if set) with extended parameters +RLAPI void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires) -RLAPI void DrawBillboard(Camera camera, Texture2D texture, Vector3 center, float size, Color tint); // Draw a billboard texture -RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle sourceRec, Vector3 center, float size, Color tint); // Draw a billboard texture defined by sourceRec +RLAPI void DrawBillboard(Camera camera, Texture2D texture, Vector3 center, float size, Color tint); // Draw a billboard texture +RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle sourceRec, + Vector3 center, float size, Color tint); // Draw a billboard texture defined by sourceRec -RLAPI BoundingBox CalculateBoundingBox(Mesh mesh); // Calculate mesh bounding box limits -RLAPI bool CheckCollisionSpheres(Vector3 centerA, float radiusA, Vector3 centerB, float radiusB); // Detect collision between two spheres -RLAPI bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2); // Detect collision between two bounding boxes -RLAPI bool CheckCollisionBoxSphere(BoundingBox box, Vector3 centerSphere, float radiusSphere); // Detect collision between box and sphere -RLAPI bool CheckCollisionRaySphere(Ray ray, Vector3 spherePosition, float sphereRadius); // Detect collision between ray and sphere -RLAPI bool CheckCollisionRaySphereEx(Ray ray, Vector3 spherePosition, float sphereRadius, Vector3 *collisionPoint); // Detect collision between ray and sphere with extended parameters and collision point detection -RLAPI bool CheckCollisionRayBox(Ray ray, BoundingBox box); // Detect collision between ray and box +RLAPI BoundingBox CalculateBoundingBox(Mesh mesh); // Calculate mesh bounding box limits +RLAPI bool CheckCollisionSpheres(Vector3 centerA, float radiusA, Vector3 centerB, float radiusB); // Detect collision between two spheres +RLAPI bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2); // Detect collision between two bounding boxes +RLAPI bool CheckCollisionBoxSphere(BoundingBox box, Vector3 centerSphere, float radiusSphere); // Detect collision between box and sphere +RLAPI bool CheckCollisionRaySphere(Ray ray, Vector3 spherePosition, float sphereRadius); // Detect collision between ray and sphere +RLAPI bool CheckCollisionRaySphereEx(Ray ray, Vector3 spherePosition, float sphereRadius, + Vector3 *collisionPoint); // Detect collision between ray and sphere, returns collision point +RLAPI bool CheckCollisionRayBox(Ray ray, BoundingBox box); // Detect collision between ray and box +RLAPI RayHitInfo GetCollisionRayMesh(Ray ray, Mesh *mesh); // Get collision info between ray and mesh +RLAPI RayHitInfo GetCollisionRayTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3); // Get collision info between ray and triangle +RLAPI RayHitInfo GetCollisionRayGround(Ray ray, float groundHeight); // Get collision info between ray and ground plane (Y-normal plane) //------------------------------------------------------------------------------------ // Shaders System Functions (Module: rlgl) // NOTE: This functions are useless when using OpenGL 1.1 //------------------------------------------------------------------------------------ -RLAPI Shader LoadShader(char *vsFileName, char *fsFileName); // Load a custom shader and bind default locations -RLAPI void UnloadShader(Shader shader); // Unload a custom shader from memory +RLAPI char *LoadText(const char *fileName); // Load chars array from text file +RLAPI Shader LoadShader(char *vsFileName, char *fsFileName); // Load shader from files and bind default locations +RLAPI void UnloadShader(Shader shader); // Unload shader from GPU memory (VRAM) RLAPI Shader GetDefaultShader(void); // Get default shader -RLAPI Shader GetStandardShader(void); // Get standard shader RLAPI Texture2D GetDefaultTexture(void); // Get default texture RLAPI int GetShaderLocation(Shader shader, const char *uniformName); // Get shader uniform location @@ -908,19 +966,17 @@ RLAPI void EndShaderMode(void); // End RLAPI void BeginBlendMode(int mode); // Begin blending mode (alpha, additive, multiplied) RLAPI void EndBlendMode(void); // End blending mode (reset to default: alpha blending) -RLAPI Light CreateLight(int type, Vector3 position, Color diffuse); // Create a new light, initialize it and add to pool -RLAPI void DestroyLight(Light light); // Destroy a light and take it out of the list - //------------------------------------------------------------------------------------ // VR experience Functions (Module: rlgl) // NOTE: This functions are useless when using OpenGL 1.1 //------------------------------------------------------------------------------------ -RLAPI void InitVrDevice(int vdDevice); // Init VR device -RLAPI void CloseVrDevice(void); // Close VR device -RLAPI bool IsVrDeviceReady(void); // Detect if VR device is ready -RLAPI bool IsVrSimulator(void); // Detect if VR simulator is running -RLAPI void UpdateVrTracking(Camera *camera); // Update VR tracking (position and orientation) and camera -RLAPI void ToggleVrMode(void); // Enable/Disable VR experience (device or simulator) +RLAPI void InitVrSimulator(int vrDevice); // Init VR simulator for selected device +RLAPI void CloseVrSimulator(void); // Close VR simulator for current device +RLAPI bool IsVrSimulatorReady(void); // Detect if VR device is ready +RLAPI void UpdateVrTracking(Camera *camera); // Update VR tracking (position and orientation) and camera +RLAPI void ToggleVrMode(void); // Enable/Disable VR experience (device or simulator) +RLAPI void BeginVrDrawing(void); // Begin VR simulator stereo rendering +RLAPI void EndVrDrawing(void); // End VR simulator stereo rendering //------------------------------------------------------------------------------------ // Audio Loading and Playing Functions (Module: audio) @@ -928,13 +984,13 @@ RLAPI void ToggleVrMode(void); // Enable/Disable VR experienc RLAPI void InitAudioDevice(void); // Initialize audio device and context RLAPI void CloseAudioDevice(void); // Close the audio device and context RLAPI bool IsAudioDeviceReady(void); // Check if audio device has been initialized successfully +RLAPI void SetMasterVolume(float volume); // Set master volume (listener) -RLAPI Wave LoadWave(const char *fileName); // Load wave data from file into RAM -RLAPI Wave LoadWaveEx(float *data, int sampleCount, int sampleRate, int sampleSize, int channels); // Load wave data from float array data (32bit) -RLAPI Sound LoadSound(const char *fileName); // Load sound to memory -RLAPI Sound LoadSoundFromWave(Wave wave); // Load sound to memory from wave data -RLAPI Sound LoadSoundFromRES(const char *rresName, int resId); // Load sound to memory from rRES file (raylib Resource) -RLAPI void UpdateSound(Sound sound, void *data, int numSamples); // Update sound buffer with new data +RLAPI Wave LoadWave(const char *fileName); // Load wave data from file +RLAPI Wave LoadWaveEx(void *data, int sampleCount, int sampleRate, int sampleSize, int channels); // Load wave data from raw array data +RLAPI Sound LoadSound(const char *fileName); // Load sound from file +RLAPI Sound LoadSoundFromWave(Wave wave); // Load sound from wave data +RLAPI void UpdateSound(Sound sound, const void *data, int samplesCount);// Update sound buffer with new data RLAPI void UnloadWave(Wave wave); // Unload wave data RLAPI void UnloadSound(Sound sound); // Unload sound RLAPI void PlaySound(Sound sound); // Play a sound @@ -958,13 +1014,14 @@ RLAPI void ResumeMusicStream(Music music); // Resume RLAPI bool IsMusicPlaying(Music music); // Check if music is playing RLAPI void SetMusicVolume(Music music, float volume); // Set volume for music (1.0 is max level) RLAPI void SetMusicPitch(Music music, float pitch); // Set pitch for a music (1.0 is base level) +RLAPI void SetMusicLoopCount(Music music, float count); // Set music loop count (loop repeats) RLAPI float GetMusicTimeLength(Music music); // Get music time length (in seconds) RLAPI float GetMusicTimePlayed(Music music); // Get current music time played (in seconds) RLAPI AudioStream InitAudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels); // Init audio stream (to stream raw audio pcm data) -RLAPI void UpdateAudioStream(AudioStream stream, void *data, int numSamples); // Update audio stream buffers with data +RLAPI void UpdateAudioStream(AudioStream stream, const void *data, int samplesCount); // Update audio stream buffers with data RLAPI void CloseAudioStream(AudioStream stream); // Close audio stream and free memory RLAPI bool IsAudioBufferProcessed(AudioStream stream); // Check if any audio stream buffers requires refill RLAPI void PlayAudioStream(AudioStream stream); // Play audio stream diff --git a/release/rpi/raylib.h b/release/rpi/raylib.h index d28b07a35..429c26ca0 100644 --- a/release/rpi/raylib.h +++ b/release/rpi/raylib.h @@ -1,51 +1,51 @@ /********************************************************************************************** * -* raylib 1.6.0 (www.raylib.com) +* raylib v1.7.0 * -* A simple and easy-to-use library to learn videogames programming +* A simple and easy-to-use library to learn videogames programming (www.raylib.com) * -* Features: -* Library written in plain C code (C99) -* Uses PascalCase/camelCase notation -* Hardware accelerated with OpenGL (1.1, 2.1, 3.3 or ES 2.0) -* Unique OpenGL abstraction layer (usable as standalone module): [rlgl] -* Powerful fonts module with SpriteFonts support (XNA bitmap fonts, AngelCode fonts, TTF) -* Multiple textures support, including compressed formats and mipmaps generation -* Basic 3d support for Shapes, Models, Billboards, Heightmaps and Cubicmaps -* Materials (diffuse, normal, specular) and Lighting (point, directional, spot) support -* Powerful math module for Vector, Matrix and Quaternion operations: [raymath] -* Audio loading and playing with streaming support and mixing channels [audio] -* VR stereo rendering support with configurable HMD device parameters -* Multiple platforms support: Windows, Linux, Mac, Android, Raspberry Pi, HTML5 and Oculus Rift CV1 -* Custom color palette for fancy visuals on raywhite background -* Minimal external dependencies (GLFW3, OpenGL, OpenAL) -* Complete binding for LUA [rlua] +* FEATURES: +* - Library written in plain C code (C99) +* - Multiple platforms supported: Windows, Linux, Mac, Android, Raspberry Pi, HTML5. +* - Hardware accelerated with OpenGL (1.1, 2.1, 3.3 or ES 2.0) +* - Unique OpenGL abstraction layer (usable as standalone module): [rlgl] +* - Powerful fonts module with SpriteFonts support (XNA bitmap fonts, AngelCode fonts, TTF) +* - Multiple textures support, including compressed formats and mipmaps generation +* - Basic 3d support for Shapes, Models, Billboards, Heightmaps and Cubicmaps +* - Powerful math module for Vector2, Vector3, Matrix and Quaternion operations: [raymath] +* - Audio loading and playing with streaming support and mixing channels: [audio] +* - VR stereo rendering support with configurable HMD device parameters +* - Minimal external dependencies (GLFW3, OpenGL, OpenAL) +* - Complete bindings for Lua, Go and Pascal * -* External libs: -* GLFW3 (www.glfw.org) for window/context management and input [core] -* GLAD for OpenGL extensions loading (3.3 Core profile, only PLATFORM_DESKTOP) [rlgl] -* stb_image (Sean Barret) for images loading (JPEG, PNG, BMP, TGA) [textures] -* stb_image_write (Sean Barret) for image writting (PNG) [utils] -* stb_truetype (Sean Barret) for ttf fonts loading [text] -* stb_vorbis (Sean Barret) for ogg audio loading [audio] -* jar_xm (Joshua Reisenauer) for XM audio module loading [audio] -* jar_mod (Joshua Reisenauer) for MOD audio module loading [audio] -* dr_flac (David Reid) for FLAC audio file loading [audio] -* OpenAL Soft for audio device/context management [audio] -* tinfl for data decompression (DEFLATE algorithm) [utils] +* NOTES: +* 32bit Colors - Any defined Color is always RGBA (4 byte) +* One custom font is loaded by default when InitWindow() [core] +* If using OpenGL 3.3 or ES2, one default shader is loaded automatically (internally defined) [rlgl] +* If using OpenGL 3.3 or ES2, several vertex buffers (VAO/VBO) are created to manage lines-triangles-quads * -* Some design decisions: -* 32bit Colors - All defined color are always RGBA (struct Color is 4 byte) -* One custom default font could be loaded automatically when InitWindow() [core] -* If using OpenGL 3.3 or ES2, several vertex buffers (VAO/VBO) are created to manage lines-triangles-quads -* If using OpenGL 3.3 or ES2, two default shaders could be loaded automatically (internally defined) +* DEPENDENCIES: +* GLFW3 (www.glfw.org) for window/context management and input [core] +* GLAD for OpenGL extensions loading (3.3 Core profile, only PLATFORM_DESKTOP) [rlgl] +* OpenAL Soft for audio device/context management [audio] * -* -- LICENSE -- +* OPTIONAL DEPENDENCIES: +* stb_image (Sean Barret) for images loading (JPEG, PNG, BMP, TGA) [textures] +* stb_image_write (Sean Barret) for image writting (PNG) [utils] +* stb_truetype (Sean Barret) for ttf fonts loading [text] +* stb_vorbis (Sean Barret) for ogg audio loading [audio] +* jar_xm (Joshua Reisenauer) for XM audio module loading [audio] +* jar_mod (Joshua Reisenauer) for MOD audio module loading [audio] +* dr_flac (David Reid) for FLAC audio file loading [audio] +* tinfl for data decompression (DEFLATE algorithm) [rres] +* +* +* LICENSE: zlib/libpng * * raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified, * BSD-like license that allows static linking with closed source software: * -* Copyright (c) 2013-2016 Ramon Santamaria (@raysan5) +* Copyright (c) 2013-2017 Ramon Santamaria (@raysan5) * * This software is provided "as-is", without any express or implied warranty. In no event * will the authors be held liable for any damages arising from the use of this software. @@ -72,7 +72,6 @@ //#define PLATFORM_ANDROID // Android device //#define PLATFORM_RPI // Raspberry Pi //#define PLATFORM_WEB // HTML5 (emscripten, asm.js) -//#define RLGL_OCULUS_SUPPORT // Oculus Rift CV1 (complementary to PLATFORM_DESKTOP) // Security check in case no PLATFORM_* defined #if !defined(PLATFORM_DESKTOP) && !defined(PLATFORM_ANDROID) && !defined(PLATFORM_RPI) && !defined(PLATFORM_WEB) @@ -98,13 +97,13 @@ #define RAD2DEG (180.0f/PI) // raylib Config Flags -#define FLAG_FULLSCREEN_MODE 1 -#define FLAG_RESIZABLE_WINDOW 2 -#define FLAG_SHOW_LOGO 4 -#define FLAG_SHOW_MOUSE_CURSOR 8 -#define FLAG_CENTERED_MODE 16 -#define FLAG_MSAA_4X_HINT 32 -#define FLAG_VSYNC_HINT 64 +#define FLAG_SHOW_LOGO 1 // Set to show raylib logo at startup +#define FLAG_FULLSCREEN_MODE 2 // Set to run program in fullscreen +#define FLAG_WINDOW_RESIZABLE 4 // Set to allow resizable window +#define FLAG_WINDOW_DECORATED 8 // Set to show window decoration (frame and buttons) +#define FLAG_WINDOW_TRANSPARENT 16 // Set to allow transparent window +#define FLAG_MSAA_4X_HINT 32 // Set to try enabling MSAA 4X +#define FLAG_VSYNC_HINT 64 // Set to try enabling V-Sync on GPU // Keyboard Function Keys #define KEY_SPACE 32 @@ -293,17 +292,13 @@ #define RAYWHITE CLITERAL{ 245, 245, 245, 255 } // My own White (raylib logo) //---------------------------------------------------------------------------------- -// Types and Structures Definition +// Structures Definition //---------------------------------------------------------------------------------- #ifndef __cplusplus // Boolean type - #ifndef __APPLE__ - #if !defined(_STDBOOL_H) - typedef enum { false, true } bool; - #define _STDBOOL_H - #endif - #else - #include + #if !defined(_STDBOOL_H) + typedef enum { false, true } bool; + #define _STDBOOL_H #endif #endif @@ -351,35 +346,41 @@ typedef struct Image { int width; // Image base width int height; // Image base height int mipmaps; // Mipmap levels, 1 by default - int format; // Data format (TextureFormat) + int format; // Data format (TextureFormat type) } Image; -// Texture2D type, bpp always RGBA (32bit) +// Texture2D type // NOTE: Data stored in GPU memory typedef struct Texture2D { unsigned int id; // OpenGL texture id int width; // Texture base width int height; // Texture base height int mipmaps; // Mipmap levels, 1 by default - int format; // Data format (TextureFormat) + int format; // Data format (TextureFormat type) } Texture2D; // RenderTexture2D type, for texture rendering typedef struct RenderTexture2D { - unsigned int id; // Render texture (fbo) id + unsigned int id; // OpenGL Framebuffer Object (FBO) id Texture2D texture; // Color buffer attachment texture Texture2D depth; // Depth buffer attachment texture } RenderTexture2D; +// SpriteFont character info +typedef struct CharInfo { + int value; // Character value (Unicode) + Rectangle rec; // Character rectangle in sprite font + int offsetX; // Character offset X when drawing + int offsetY; // Character offset Y when drawing + int advanceX; // Character advance position X +} CharInfo; + // SpriteFont type, includes texture and charSet array data typedef struct SpriteFont { Texture2D texture; // Font texture - int size; // Base size (default chars height) - int numChars; // Number of characters - int *charValues; // Characters values array - Rectangle *charRecs; // Characters rectangles within the texture - Vector2 *charOffsets; // Characters offsets (on drawing) - int *charAdvanceX; // Characters x advance (on drawing) + int baseSize; // Base size (default chars height) + int charsCount; // Number of characters + CharInfo *chars; // Characters info data } SpriteFont; // Camera type, defines a camera position/orientation in 3d space @@ -466,31 +467,20 @@ typedef struct Model { Material material; // Shader and textures data } Model; -// Light type -typedef struct LightData { - unsigned int id; // Light unique id - bool enabled; // Light enabled - int type; // Light type: LIGHT_POINT, LIGHT_DIRECTIONAL, LIGHT_SPOT - - Vector3 position; // Light position - Vector3 target; // Light direction: LIGHT_DIRECTIONAL and LIGHT_SPOT (cone direction target) - float radius; // Light attenuation radius light intensity reduced with distance (world distance) - - Color diffuse; // Light diffuse color - float intensity; // Light intensity level - - float coneAngle; // Light cone max angle: LIGHT_SPOT -} LightData, *Light; - -// Light types -typedef enum { LIGHT_POINT, LIGHT_DIRECTIONAL, LIGHT_SPOT } LightType; - // Ray type (useful for raycast) typedef struct Ray { Vector3 position; // Ray position (origin) Vector3 direction; // Ray direction } Ray; +// Information returned from a raycast +typedef struct RayHitInfo { + bool hit; // Did the ray hit something? + float distance; // Distance to nearest hit + Vector3 position; // Position of nearest hit + Vector3 normal; // Surface normal of hit +} RayHitInfo; + // Wave type, defines audio wave data typedef struct Wave { unsigned int sampleCount; // Number of samples @@ -523,6 +513,34 @@ typedef struct AudioStream { unsigned int buffers[2]; // OpenAL audio buffers (double buffering) } AudioStream; +// rRES data returned when reading a resource, +// it contains all required data for user (24 byte) +typedef struct RRESData { + unsigned int type; // Resource type (4 byte) + + unsigned int param1; // Resouce parameter 1 (4 byte) + unsigned int param2; // Resouce parameter 2 (4 byte) + unsigned int param3; // Resouce parameter 3 (4 byte) + unsigned int param4; // Resouce parameter 4 (4 byte) + + void *data; // Resource data pointer (4 byte) +} RRESData; + +// RRES type (pointer to RRESData array) +typedef struct RRESData *RRES; + +//---------------------------------------------------------------------------------- +// Enumerators Definition +//---------------------------------------------------------------------------------- +// Trace log type +typedef enum { + INFO = 0, + WARNING, + ERROR, + DEBUG, + OTHER +} LogType; + // Texture formats // NOTE: Support depends on OpenGL version and platform typedef enum { @@ -533,6 +551,7 @@ typedef enum { UNCOMPRESSED_R5G5B5A1, // 16 bpp (1 bit alpha) UNCOMPRESSED_R4G4B4A4, // 16 bpp (4 bit alpha) UNCOMPRESSED_R8G8B8A8, // 32 bpp + UNCOMPRESSED_R32G32B32, // 32 bit per channel (float) - HDR COMPRESSED_DXT1_RGB, // 4 bpp (no alpha) COMPRESSED_DXT1_RGBA, // 4 bpp (1 bit alpha) COMPRESSED_DXT3_RGBA, // 8 bpp @@ -549,7 +568,7 @@ typedef enum { // Texture parameters: filter mode // NOTE 1: Filtering considers mipmaps if available in the texture // NOTE 2: Filter is accordingly set for minification and magnification -typedef enum { +typedef enum { FILTER_POINT = 0, // No filter, just pixel aproximation FILTER_BILINEAR, // Linear filtering FILTER_TRILINEAR, // Trilinear filtering (linear with mipmaps) @@ -559,10 +578,18 @@ typedef enum { } TextureFilterMode; // Texture parameters: wrap mode -typedef enum { WRAP_REPEAT = 0, WRAP_CLAMP, WRAP_MIRROR } TextureWrapMode; +typedef enum { + WRAP_REPEAT = 0, + WRAP_CLAMP, + WRAP_MIRROR +} TextureWrapMode; // Color blending modes (pre-defined) -typedef enum { BLEND_ALPHA = 0, BLEND_ADDITIVE, BLEND_MULTIPLIED } BlendMode; +typedef enum { + BLEND_ALPHA = 0, + BLEND_ADDITIVE, + BLEND_MULTIPLIED +} BlendMode; // Gestures type // NOTE: It could be used as flags to enable only some gestures @@ -581,12 +608,12 @@ typedef enum { } Gestures; // Camera system modes -typedef enum { - CAMERA_CUSTOM = 0, - CAMERA_FREE, - CAMERA_ORBITAL, - CAMERA_FIRST_PERSON, - CAMERA_THIRD_PERSON +typedef enum { + CAMERA_CUSTOM = 0, + CAMERA_FREE, + CAMERA_ORBITAL, + CAMERA_FIRST_PERSON, + CAMERA_THIRD_PERSON } CameraMode; // Head Mounted Display devices @@ -602,6 +629,18 @@ typedef enum { HMD_FOVE_VR, } VrDevice; +// RRESData type +typedef enum { + RRES_TYPE_RAW = 0, + RRES_TYPE_IMAGE, + RRES_TYPE_WAVE, + RRES_TYPE_VERTEX, + RRES_TYPE_TEXT, + RRES_TYPE_FONT_IMAGE, + RRES_TYPE_FONT_CHARDATA, // CharInfo data array + RRES_TYPE_DIRECTORY +} RRESDataType; + #ifdef __cplusplus extern "C" { // Prevents name mangling of functions #endif @@ -615,44 +654,48 @@ extern "C" { // Prevents name mangling of functions // Window and Graphics Device Functions (Module: core) //------------------------------------------------------------------------------------ #if defined(PLATFORM_ANDROID) -RLAPI void InitWindow(int width, int height, void *state); // Init Android Activity and OpenGL Graphics (struct android_app) +RLAPI void InitWindow(int width, int height, void *state); // Initialize Android activity #elif defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI) || defined(PLATFORM_WEB) -RLAPI void InitWindow(int width, int height, const char *title); // Initialize Window and OpenGL Graphics +RLAPI void InitWindow(int width, int height, const char *title); // Initialize window and OpenGL context #endif -RLAPI void CloseWindow(void); // Close Window and Terminate Context -RLAPI bool WindowShouldClose(void); // Detect if KEY_ESCAPE pressed or Close icon pressed -RLAPI bool IsWindowMinimized(void); // Detect if window has been minimized (or lost focus) -RLAPI void ToggleFullscreen(void); // Fullscreen toggle (only PLATFORM_DESKTOP) +RLAPI void CloseWindow(void); // Close window and unload OpenGL context +RLAPI bool WindowShouldClose(void); // Check if KEY_ESCAPE pressed or Close icon pressed +RLAPI bool IsWindowMinimized(void); // Check if window has been minimized (or lost focus) +RLAPI void ToggleFullscreen(void); // Toggle fullscreen mode (only PLATFORM_DESKTOP) +RLAPI void SetWindowIcon(Image image); // Set icon for window (only PLATFORM_DESKTOP) +RLAPI void SetWindowPosition(int x, int y); // Set window position on screen (only PLATFORM_DESKTOP) +RLAPI void SetWindowMonitor(int monitor); // Set monitor for the current window (fullscreen mode) +RLAPI void SetWindowMinSize(int width, int height); // Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE) RLAPI int GetScreenWidth(void); // Get current screen width RLAPI int GetScreenHeight(void); // Get current screen height #if !defined(PLATFORM_ANDROID) RLAPI void ShowCursor(void); // Shows cursor RLAPI void HideCursor(void); // Hides cursor -RLAPI bool IsCursorHidden(void); // Returns true if cursor is not visible -RLAPI void EnableCursor(void); // Enables cursor -RLAPI void DisableCursor(void); // Disables cursor +RLAPI bool IsCursorHidden(void); // Check if cursor is not visible +RLAPI void EnableCursor(void); // Enables cursor (unlock cursor) +RLAPI void DisableCursor(void); // Disables cursor (lock cursor) #endif -RLAPI void ClearBackground(Color color); // Sets Background Color -RLAPI void BeginDrawing(void); // Setup drawing canvas to start drawing -RLAPI void EndDrawing(void); // End canvas drawing and Swap Buffers (Double Buffering) +RLAPI void ClearBackground(Color color); // Set background color (framebuffer clear color) +RLAPI void BeginDrawing(void); // Setup canvas (framebuffer) to start drawing +RLAPI void EndDrawing(void); // End canvas drawing and swap buffers (double buffering) -RLAPI void Begin2dMode(Camera2D camera); // Initialize 2D mode with custom camera -RLAPI void End2dMode(void); // Ends 2D mode custom camera usage -RLAPI void Begin3dMode(Camera camera); // Initializes 3D mode for drawing (Camera setup) +RLAPI void Begin2dMode(Camera2D camera); // Initialize 2D mode with custom camera (2D) +RLAPI void End2dMode(void); // Ends 2D mode with custom camera +RLAPI void Begin3dMode(Camera camera); // Initializes 3D mode with custom camera (3D) RLAPI void End3dMode(void); // Ends 3D mode and returns to default 2D orthographic mode RLAPI void BeginTextureMode(RenderTexture2D target); // Initializes render texture for drawing RLAPI void EndTextureMode(void); // Ends drawing to render texture RLAPI Ray GetMouseRay(Vector2 mousePosition, Camera camera); // Returns a ray trace from mouse position -RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Returns the screen space position from a 3d world space position +RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Returns the screen space position for a 3d world space position RLAPI Matrix GetCameraMatrix(Camera camera); // Returns camera transform matrix (view matrix) RLAPI void SetTargetFPS(int fps); // Set target FPS (maximum) -RLAPI float GetFPS(void); // Returns current FPS -RLAPI float GetFrameTime(void); // Returns time in seconds for one frame +RLAPI int GetFPS(void); // Returns current FPS +RLAPI float GetFrameTime(void); // Returns time in seconds for last frame drawn RLAPI Color GetColor(int hexValue); // Returns a Color struct from hexadecimal value RLAPI int GetHexValue(Color color); // Returns hexadecimal value for a Color @@ -663,15 +706,21 @@ RLAPI float *MatrixToFloat(Matrix mat); // Converts Ma RLAPI int GetRandomValue(int min, int max); // Returns a random value between min and max (both included) RLAPI Color Fade(Color color, float alpha); // Color fade-in or fade-out, alpha goes from 0.0f to 1.0f -RLAPI void SetConfigFlags(char flags); // Setup some window configuration flags -RLAPI void ShowLogo(void); // Activates raylib logo at startup (can be done with flags) +RLAPI void ShowLogo(void); // Activate raylib logo at startup (can be done with flags) +RLAPI void SetConfigFlags(char flags); // Setup window configuration flags (view FLAGS) +RLAPI void TraceLog(int logType, const char *text, ...); // Show trace log messages (INFO, WARNING, ERROR, DEBUG) +RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (saved a .png) -RLAPI bool IsFileDropped(void); // Check if a file have been dropped into window -RLAPI char **GetDroppedFiles(int *count); // Retrieve dropped files into window +RLAPI bool IsFileExtension(const char *fileName, const char *ext);// Check file extension +RLAPI const char *GetDirectoryPath(const char *fileName); // Get directory for a given fileName (with path) +RLAPI const char *GetWorkingDirectory(void); // Get current working directory +RLAPI bool ChangeDirectory(const char *dir); // Change working directory, returns true if success +RLAPI bool IsFileDropped(void); // Check if a file has been dropped into window +RLAPI char **GetDroppedFiles(int *count); // Get dropped files names RLAPI void ClearDroppedFiles(void); // Clear dropped files paths buffer -RLAPI void StorageSaveValue(int position, int value); // Storage save integer value (to defined position) -RLAPI int StorageLoadValue(int position); // Storage load integer value (from defined position) +RLAPI void StorageSaveValue(int position, int value); // Save integer value to storage file (to defined position) +RLAPI int StorageLoadValue(int position); // Load integer value from storage file (from defined position) //------------------------------------------------------------------------------------ // Input Handling Functions (Module: core) @@ -741,12 +790,15 @@ RLAPI void DrawPixel(int posX, int posY, Color color); RLAPI void DrawPixelV(Vector2 position, Color color); // Draw a pixel (Vector version) RLAPI void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw a line RLAPI void DrawLineV(Vector2 startPos, Vector2 endPos, Color color); // Draw a line (Vector version) +RLAPI void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line defining thickness +RLAPI void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line using cubic-bezier curves in-out RLAPI void DrawCircle(int centerX, int centerY, float radius, Color color); // Draw a color-filled circle RLAPI void DrawCircleGradient(int centerX, int centerY, float radius, Color color1, Color color2); // Draw a gradient-filled circle RLAPI void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version) RLAPI void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rectangle RLAPI void DrawRectangleRec(Rectangle rec, Color color); // Draw a color-filled rectangle +RLAPI void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color); // Draw a color-filled rectangle with pro parameters RLAPI void DrawRectangleGradient(int posX, int posY, int width, int height, Color color1, Color color2); // Draw a gradient-filled rectangle RLAPI void DrawRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rectangle (Vector version) RLAPI void DrawRectangleLines(int posX, int posY, int width, int height, Color color); // Draw rectangle outline @@ -767,21 +819,19 @@ RLAPI bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Ve //------------------------------------------------------------------------------------ // Texture Loading and Drawing Functions (Module: textures) //------------------------------------------------------------------------------------ -RLAPI Image LoadImage(const char *fileName); // Load an image into CPU memory (RAM) -RLAPI Image LoadImageEx(Color *pixels, int width, int height); // Load image data from Color array data (RGBA - 32bit) -RLAPI Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize); // Load image data from RAW file -RLAPI Image LoadImageFromRES(const char *rresName, int resId); // Load an image from rRES file (raylib Resource) -RLAPI Texture2D LoadTexture(const char *fileName); // Load an image as texture into GPU memory -RLAPI Texture2D LoadTextureEx(void *data, int width, int height, int textureFormat); // Load a texture from raw data into GPU memory -RLAPI Texture2D LoadTextureFromRES(const char *rresName, int resId); // Load an image as texture from rRES file (raylib Resource) -RLAPI Texture2D LoadTextureFromImage(Image image); // Load a texture from image data -RLAPI RenderTexture2D LoadRenderTexture(int width, int height); // Load a texture to be used for rendering +RLAPI Image LoadImage(const char *fileName); // Load image from file into CPU memory (RAM) +RLAPI Image LoadImageEx(Color *pixels, int width, int height); // Load image from Color array data (RGBA - 32bit) +RLAPI Image LoadImagePro(void *data, int width, int height, int format); // Load image from raw data with parameters +RLAPI Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize); // Load image from RAW file data +RLAPI Texture2D LoadTexture(const char *fileName); // Load texture from file into GPU memory (VRAM) +RLAPI Texture2D LoadTextureFromImage(Image image); // Load texture from image data +RLAPI RenderTexture2D LoadRenderTexture(int width, int height); // Load texture for rendering (framebuffer) RLAPI void UnloadImage(Image image); // Unload image from CPU memory (RAM) -RLAPI void UnloadTexture(Texture2D texture); // Unload texture from GPU memory -RLAPI void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory +RLAPI void UnloadTexture(Texture2D texture); // Unload texture from GPU memory (VRAM) +RLAPI void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory (VRAM) RLAPI Color *GetImageData(Image image); // Get pixel data from image as a Color struct array RLAPI Image GetTextureData(Texture2D texture); // Get pixel data from GPU texture and return an Image -RLAPI void UpdateTexture(Texture2D texture, void *pixels); // Update GPU texture with new data +RLAPI void UpdateTexture(Texture2D texture, const void *pixels); // Update GPU texture with new data RLAPI void ImageToPOT(Image *image, Color fillColor); // Convert image to POT (power-of-two) RLAPI void ImageFormat(Image *image, int newFormat); // Convert image data to desired format RLAPI void ImageAlphaMask(Image *image, Image alphaMask); // Apply alpha mask to image @@ -794,7 +844,8 @@ RLAPI Image ImageText(const char *text, int fontSize, Color color); RLAPI Image ImageTextEx(SpriteFont font, const char *text, float fontSize, int spacing, Color tint); // Create an image from text (custom sprite font) RLAPI void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec); // Draw a source image within a destination image RLAPI void ImageDrawText(Image *dst, Vector2 position, const char *text, int fontSize, Color color); // Draw text (default font) within an image (destination) -RLAPI void ImageDrawTextEx(Image *dst, Vector2 position, SpriteFont font, const char *text, float fontSize, int spacing, Color color); // Draw text (custom sprite font) within an image (destination) +RLAPI void ImageDrawTextEx(Image *dst, Vector2 position, SpriteFont font, const char *text, + float fontSize, int spacing, Color color); // Draw text (custom sprite font) within an image (destination) RLAPI void ImageFlipVertical(Image *image); // Flip image vertically RLAPI void ImageFlipHorizontal(Image *image); // Flip image horizontally RLAPI void ImageColorTint(Image *image, Color color); // Modify image color: tint @@ -817,9 +868,9 @@ RLAPI void DrawTexturePro(Texture2D texture, Rectangle sourceRec, Rectangle dest // Font Loading and Text Drawing Functions (Module: text) //------------------------------------------------------------------------------------ RLAPI SpriteFont GetDefaultFont(void); // Get the default SpriteFont -RLAPI SpriteFont LoadSpriteFont(const char *fileName); // Load a SpriteFont image into GPU memory -RLAPI SpriteFont LoadSpriteFontTTF(const char *fileName, int fontSize, int numChars, int *fontChars); // Load a SpriteFont from TTF font with parameters -RLAPI void UnloadSpriteFont(SpriteFont spriteFont); // Unload SpriteFont from GPU memory +RLAPI SpriteFont LoadSpriteFont(const char *fileName); // Load SpriteFont from file into GPU memory (VRAM) +RLAPI SpriteFont LoadSpriteFontEx(const char *fileName, int fontSize, int charsCount, int *fontChars); // Load SpriteFont from file with extended parameters +RLAPI void UnloadSpriteFont(SpriteFont spriteFont); // Unload SpriteFont from GPU memory (VRAM) RLAPI void DrawText(const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font) RLAPI void DrawTextEx(SpriteFont spriteFont, const char* text, Vector2 position, // Draw text using SpriteFont and additional parameters @@ -827,7 +878,7 @@ RLAPI void DrawTextEx(SpriteFont spriteFont, const char* text, Vector2 position, RLAPI int MeasureText(const char *text, int fontSize); // Measure string width for default font RLAPI Vector2 MeasureTextEx(SpriteFont spriteFont, const char *text, float fontSize, int spacing); // Measure string size for SpriteFont -RLAPI void DrawFPS(int posX, int posY); // Shows current FPS on top-left corner +RLAPI void DrawFPS(int posX, int posY); // Shows current FPS RLAPI const char *FormatText(const char *text, ...); // Formatting of text with variables to 'embed' RLAPI const char *SubText(const char *text, int position, int length); // Get a piece of a text string @@ -849,50 +900,57 @@ RLAPI void DrawPlane(Vector3 centerPos, Vector2 size, Color color); RLAPI void DrawRay(Ray ray, Color color); // Draw a ray line RLAPI void DrawGrid(int slices, float spacing); // Draw a grid (centered at (0, 0, 0)) RLAPI void DrawGizmo(Vector3 position); // Draw simple gizmo -RLAPI void DrawLight(Light light); // Draw light in 3D world //DrawTorus(), DrawTeapot() could be useful? //------------------------------------------------------------------------------------ // Model 3d Loading and Drawing Functions (Module: models) //------------------------------------------------------------------------------------ -RLAPI Model LoadModel(const char *fileName); // Load a 3d model (.OBJ) -RLAPI Model LoadModelEx(Mesh data, bool dynamic); // Load a 3d model (from mesh data) -RLAPI Model LoadModelFromRES(const char *rresName, int resId); // Load a 3d model from rRES file (raylib Resource) -RLAPI Model LoadHeightmap(Image heightmap, Vector3 size); // Load a heightmap image as a 3d model -RLAPI Model LoadCubicmap(Image cubicmap); // Load a map image as a 3d model (cubes based) -RLAPI void UnloadModel(Model model); // Unload 3d model from memory +RLAPI Mesh LoadMesh(const char *fileName); // Load mesh from file +RLAPI Mesh LoadMeshEx(int numVertex, float *vData, float *vtData, float *vnData, Color *cData); // Load mesh from vertex data +RLAPI Model LoadModel(const char *fileName); // Load model from file +RLAPI Model LoadModelFromMesh(Mesh data, bool dynamic); // Load model from mesh data +RLAPI Model LoadHeightmap(Image heightmap, Vector3 size); // Load heightmap model from image data +RLAPI Model LoadCubicmap(Image cubicmap); // Load cubes-based map model from image data +RLAPI void UnloadMesh(Mesh *mesh); // Unload mesh from memory (RAM and/or VRAM) +RLAPI void UnloadModel(Model model); // Unload model from memory (RAM and/or VRAM) -RLAPI Material LoadMaterial(const char *fileName); // Load material data (.MTL) -RLAPI Material LoadDefaultMaterial(void); // Load default material (uses default models shader) -RLAPI Material LoadStandardMaterial(void); // Load standard material (uses material attributes and lighting shader) -RLAPI void UnloadMaterial(Material material); // Unload material textures from VRAM +RLAPI Material LoadMaterial(const char *fileName); // Load material from file +RLAPI Material LoadDefaultMaterial(void); // Load default material (uses default models shader) +RLAPI void UnloadMaterial(Material material); // Unload material from GPU memory (VRAM) -RLAPI void DrawModel(Model model, Vector3 position, float scale, Color tint); // Draw a model (with texture if set) -RLAPI void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model with extended parameters +RLAPI void DrawModel(Model model, Vector3 position, float scale, Color tint); // Draw a model (with texture if set) +RLAPI void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, + float rotationAngle, Vector3 scale, Color tint); // Draw a model with extended parameters RLAPI void DrawModelWires(Model model, Vector3 position, float scale, Color tint); // Draw a model wires (with texture if set) -RLAPI void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model wires (with texture if set) with extended parameters -RLAPI void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires) +RLAPI void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, + float rotationAngle, Vector3 scale, Color tint); // Draw a model wires (with texture if set) with extended parameters +RLAPI void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires) -RLAPI void DrawBillboard(Camera camera, Texture2D texture, Vector3 center, float size, Color tint); // Draw a billboard texture -RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle sourceRec, Vector3 center, float size, Color tint); // Draw a billboard texture defined by sourceRec +RLAPI void DrawBillboard(Camera camera, Texture2D texture, Vector3 center, float size, Color tint); // Draw a billboard texture +RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle sourceRec, + Vector3 center, float size, Color tint); // Draw a billboard texture defined by sourceRec -RLAPI BoundingBox CalculateBoundingBox(Mesh mesh); // Calculate mesh bounding box limits -RLAPI bool CheckCollisionSpheres(Vector3 centerA, float radiusA, Vector3 centerB, float radiusB); // Detect collision between two spheres -RLAPI bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2); // Detect collision between two bounding boxes -RLAPI bool CheckCollisionBoxSphere(BoundingBox box, Vector3 centerSphere, float radiusSphere); // Detect collision between box and sphere -RLAPI bool CheckCollisionRaySphere(Ray ray, Vector3 spherePosition, float sphereRadius); // Detect collision between ray and sphere -RLAPI bool CheckCollisionRaySphereEx(Ray ray, Vector3 spherePosition, float sphereRadius, Vector3 *collisionPoint); // Detect collision between ray and sphere with extended parameters and collision point detection -RLAPI bool CheckCollisionRayBox(Ray ray, BoundingBox box); // Detect collision between ray and box +RLAPI BoundingBox CalculateBoundingBox(Mesh mesh); // Calculate mesh bounding box limits +RLAPI bool CheckCollisionSpheres(Vector3 centerA, float radiusA, Vector3 centerB, float radiusB); // Detect collision between two spheres +RLAPI bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2); // Detect collision between two bounding boxes +RLAPI bool CheckCollisionBoxSphere(BoundingBox box, Vector3 centerSphere, float radiusSphere); // Detect collision between box and sphere +RLAPI bool CheckCollisionRaySphere(Ray ray, Vector3 spherePosition, float sphereRadius); // Detect collision between ray and sphere +RLAPI bool CheckCollisionRaySphereEx(Ray ray, Vector3 spherePosition, float sphereRadius, + Vector3 *collisionPoint); // Detect collision between ray and sphere, returns collision point +RLAPI bool CheckCollisionRayBox(Ray ray, BoundingBox box); // Detect collision between ray and box +RLAPI RayHitInfo GetCollisionRayMesh(Ray ray, Mesh *mesh); // Get collision info between ray and mesh +RLAPI RayHitInfo GetCollisionRayTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3); // Get collision info between ray and triangle +RLAPI RayHitInfo GetCollisionRayGround(Ray ray, float groundHeight); // Get collision info between ray and ground plane (Y-normal plane) //------------------------------------------------------------------------------------ // Shaders System Functions (Module: rlgl) // NOTE: This functions are useless when using OpenGL 1.1 //------------------------------------------------------------------------------------ -RLAPI Shader LoadShader(char *vsFileName, char *fsFileName); // Load a custom shader and bind default locations -RLAPI void UnloadShader(Shader shader); // Unload a custom shader from memory +RLAPI char *LoadText(const char *fileName); // Load chars array from text file +RLAPI Shader LoadShader(char *vsFileName, char *fsFileName); // Load shader from files and bind default locations +RLAPI void UnloadShader(Shader shader); // Unload shader from GPU memory (VRAM) RLAPI Shader GetDefaultShader(void); // Get default shader -RLAPI Shader GetStandardShader(void); // Get standard shader RLAPI Texture2D GetDefaultTexture(void); // Get default texture RLAPI int GetShaderLocation(Shader shader, const char *uniformName); // Get shader uniform location @@ -908,19 +966,17 @@ RLAPI void EndShaderMode(void); // End RLAPI void BeginBlendMode(int mode); // Begin blending mode (alpha, additive, multiplied) RLAPI void EndBlendMode(void); // End blending mode (reset to default: alpha blending) -RLAPI Light CreateLight(int type, Vector3 position, Color diffuse); // Create a new light, initialize it and add to pool -RLAPI void DestroyLight(Light light); // Destroy a light and take it out of the list - //------------------------------------------------------------------------------------ // VR experience Functions (Module: rlgl) // NOTE: This functions are useless when using OpenGL 1.1 //------------------------------------------------------------------------------------ -RLAPI void InitVrDevice(int vdDevice); // Init VR device -RLAPI void CloseVrDevice(void); // Close VR device -RLAPI bool IsVrDeviceReady(void); // Detect if VR device is ready -RLAPI bool IsVrSimulator(void); // Detect if VR simulator is running -RLAPI void UpdateVrTracking(Camera *camera); // Update VR tracking (position and orientation) and camera -RLAPI void ToggleVrMode(void); // Enable/Disable VR experience (device or simulator) +RLAPI void InitVrSimulator(int vrDevice); // Init VR simulator for selected device +RLAPI void CloseVrSimulator(void); // Close VR simulator for current device +RLAPI bool IsVrSimulatorReady(void); // Detect if VR device is ready +RLAPI void UpdateVrTracking(Camera *camera); // Update VR tracking (position and orientation) and camera +RLAPI void ToggleVrMode(void); // Enable/Disable VR experience (device or simulator) +RLAPI void BeginVrDrawing(void); // Begin VR simulator stereo rendering +RLAPI void EndVrDrawing(void); // End VR simulator stereo rendering //------------------------------------------------------------------------------------ // Audio Loading and Playing Functions (Module: audio) @@ -928,13 +984,13 @@ RLAPI void ToggleVrMode(void); // Enable/Disable VR experienc RLAPI void InitAudioDevice(void); // Initialize audio device and context RLAPI void CloseAudioDevice(void); // Close the audio device and context RLAPI bool IsAudioDeviceReady(void); // Check if audio device has been initialized successfully +RLAPI void SetMasterVolume(float volume); // Set master volume (listener) -RLAPI Wave LoadWave(const char *fileName); // Load wave data from file into RAM -RLAPI Wave LoadWaveEx(float *data, int sampleCount, int sampleRate, int sampleSize, int channels); // Load wave data from float array data (32bit) -RLAPI Sound LoadSound(const char *fileName); // Load sound to memory -RLAPI Sound LoadSoundFromWave(Wave wave); // Load sound to memory from wave data -RLAPI Sound LoadSoundFromRES(const char *rresName, int resId); // Load sound to memory from rRES file (raylib Resource) -RLAPI void UpdateSound(Sound sound, void *data, int numSamples); // Update sound buffer with new data +RLAPI Wave LoadWave(const char *fileName); // Load wave data from file +RLAPI Wave LoadWaveEx(void *data, int sampleCount, int sampleRate, int sampleSize, int channels); // Load wave data from raw array data +RLAPI Sound LoadSound(const char *fileName); // Load sound from file +RLAPI Sound LoadSoundFromWave(Wave wave); // Load sound from wave data +RLAPI void UpdateSound(Sound sound, const void *data, int samplesCount);// Update sound buffer with new data RLAPI void UnloadWave(Wave wave); // Unload wave data RLAPI void UnloadSound(Sound sound); // Unload sound RLAPI void PlaySound(Sound sound); // Play a sound @@ -958,13 +1014,14 @@ RLAPI void ResumeMusicStream(Music music); // Resume RLAPI bool IsMusicPlaying(Music music); // Check if music is playing RLAPI void SetMusicVolume(Music music, float volume); // Set volume for music (1.0 is max level) RLAPI void SetMusicPitch(Music music, float pitch); // Set pitch for a music (1.0 is base level) +RLAPI void SetMusicLoopCount(Music music, float count); // Set music loop count (loop repeats) RLAPI float GetMusicTimeLength(Music music); // Get music time length (in seconds) RLAPI float GetMusicTimePlayed(Music music); // Get current music time played (in seconds) RLAPI AudioStream InitAudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels); // Init audio stream (to stream raw audio pcm data) -RLAPI void UpdateAudioStream(AudioStream stream, void *data, int numSamples); // Update audio stream buffers with data +RLAPI void UpdateAudioStream(AudioStream stream, const void *data, int samplesCount); // Update audio stream buffers with data RLAPI void CloseAudioStream(AudioStream stream); // Close audio stream and free memory RLAPI bool IsAudioBufferProcessed(AudioStream stream); // Check if any audio stream buffers requires refill RLAPI void PlayAudioStream(AudioStream stream); // Play audio stream diff --git a/release/win32/mingw32/libraylib.a b/release/win32/mingw32/libraylib.a index 22d066aaa..5920d25e6 100644 Binary files a/release/win32/mingw32/libraylib.a and b/release/win32/mingw32/libraylib.a differ diff --git a/release/win32/mingw32/libraylibdll.a b/release/win32/mingw32/libraylibdll.a index c0b544054..79806f505 100644 Binary files a/release/win32/mingw32/libraylibdll.a and b/release/win32/mingw32/libraylibdll.a differ diff --git a/release/win32/raylib.h b/release/win32/raylib.h index a47d3c590..429c26ca0 100644 --- a/release/win32/raylib.h +++ b/release/win32/raylib.h @@ -1,51 +1,51 @@ /********************************************************************************************** * -* raylib 1.6.0 (www.raylib.com) +* raylib v1.7.0 * -* A simple and easy-to-use library to learn videogames programming +* A simple and easy-to-use library to learn videogames programming (www.raylib.com) * -* Features: -* Library written in plain C code (C99) -* Uses PascalCase/camelCase notation -* Hardware accelerated with OpenGL (1.1, 2.1, 3.3 or ES 2.0) -* Unique OpenGL abstraction layer (usable as standalone module): [rlgl] -* Powerful fonts module with SpriteFonts support (XNA bitmap fonts, AngelCode fonts, TTF) -* Multiple textures support, including compressed formats and mipmaps generation -* Basic 3d support for Shapes, Models, Billboards, Heightmaps and Cubicmaps -* Materials (diffuse, normal, specular) and Lighting (point, directional, spot) support -* Powerful math module for Vector, Matrix and Quaternion operations: [raymath] -* Audio loading and playing with streaming support and mixing channels [audio] -* VR stereo rendering support with configurable HMD device parameters -* Multiple platforms support: Windows, Linux, Mac, Android, Raspberry Pi, HTML5 and Oculus Rift CV1 -* Custom color palette for fancy visuals on raywhite background -* Minimal external dependencies (GLFW3, OpenGL, OpenAL) -* Complete binding for Lua [rlua] +* FEATURES: +* - Library written in plain C code (C99) +* - Multiple platforms supported: Windows, Linux, Mac, Android, Raspberry Pi, HTML5. +* - Hardware accelerated with OpenGL (1.1, 2.1, 3.3 or ES 2.0) +* - Unique OpenGL abstraction layer (usable as standalone module): [rlgl] +* - Powerful fonts module with SpriteFonts support (XNA bitmap fonts, AngelCode fonts, TTF) +* - Multiple textures support, including compressed formats and mipmaps generation +* - Basic 3d support for Shapes, Models, Billboards, Heightmaps and Cubicmaps +* - Powerful math module for Vector2, Vector3, Matrix and Quaternion operations: [raymath] +* - Audio loading and playing with streaming support and mixing channels: [audio] +* - VR stereo rendering support with configurable HMD device parameters +* - Minimal external dependencies (GLFW3, OpenGL, OpenAL) +* - Complete bindings for Lua, Go and Pascal * -* External libs: -* GLFW3 (www.glfw.org) for window/context management and input [core] -* GLAD for OpenGL extensions loading (3.3 Core profile, only PLATFORM_DESKTOP) [rlgl] -* stb_image (Sean Barret) for images loading (JPEG, PNG, BMP, TGA) [textures] -* stb_image_write (Sean Barret) for image writting (PNG) [utils] -* stb_truetype (Sean Barret) for ttf fonts loading [text] -* stb_vorbis (Sean Barret) for ogg audio loading [audio] -* jar_xm (Joshua Reisenauer) for XM audio module loading [audio] -* jar_mod (Joshua Reisenauer) for MOD audio module loading [audio] -* dr_flac (David Reid) for FLAC audio file loading [audio] -* OpenAL Soft for audio device/context management [audio] -* tinfl for data decompression (DEFLATE algorithm) [utils] +* NOTES: +* 32bit Colors - Any defined Color is always RGBA (4 byte) +* One custom font is loaded by default when InitWindow() [core] +* If using OpenGL 3.3 or ES2, one default shader is loaded automatically (internally defined) [rlgl] +* If using OpenGL 3.3 or ES2, several vertex buffers (VAO/VBO) are created to manage lines-triangles-quads * -* Some design decisions: -* 32bit Colors - All defined color are always RGBA (struct Color is 4 byte) -* One custom default font could be loaded automatically when InitWindow() [core] -* If using OpenGL 3.3 or ES2, several vertex buffers (VAO/VBO) are created to manage lines-triangles-quads -* If using OpenGL 3.3 or ES2, two default shaders could be loaded automatically (internally defined) +* DEPENDENCIES: +* GLFW3 (www.glfw.org) for window/context management and input [core] +* GLAD for OpenGL extensions loading (3.3 Core profile, only PLATFORM_DESKTOP) [rlgl] +* OpenAL Soft for audio device/context management [audio] * -* -- LICENSE -- +* OPTIONAL DEPENDENCIES: +* stb_image (Sean Barret) for images loading (JPEG, PNG, BMP, TGA) [textures] +* stb_image_write (Sean Barret) for image writting (PNG) [utils] +* stb_truetype (Sean Barret) for ttf fonts loading [text] +* stb_vorbis (Sean Barret) for ogg audio loading [audio] +* jar_xm (Joshua Reisenauer) for XM audio module loading [audio] +* jar_mod (Joshua Reisenauer) for MOD audio module loading [audio] +* dr_flac (David Reid) for FLAC audio file loading [audio] +* tinfl for data decompression (DEFLATE algorithm) [rres] +* +* +* LICENSE: zlib/libpng * * raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified, * BSD-like license that allows static linking with closed source software: * -* Copyright (c) 2013-2016 Ramon Santamaria (@raysan5) +* Copyright (c) 2013-2017 Ramon Santamaria (@raysan5) * * This software is provided "as-is", without any express or implied warranty. In no event * will the authors be held liable for any damages arising from the use of this software. @@ -72,7 +72,6 @@ //#define PLATFORM_ANDROID // Android device //#define PLATFORM_RPI // Raspberry Pi //#define PLATFORM_WEB // HTML5 (emscripten, asm.js) -//#define RLGL_OCULUS_SUPPORT // Oculus Rift CV1 (complementary to PLATFORM_DESKTOP) // Security check in case no PLATFORM_* defined #if !defined(PLATFORM_DESKTOP) && !defined(PLATFORM_ANDROID) && !defined(PLATFORM_RPI) && !defined(PLATFORM_WEB) @@ -98,13 +97,13 @@ #define RAD2DEG (180.0f/PI) // raylib Config Flags -#define FLAG_FULLSCREEN_MODE 1 -#define FLAG_RESIZABLE_WINDOW 2 -#define FLAG_SHOW_LOGO 4 -#define FLAG_SHOW_MOUSE_CURSOR 8 -#define FLAG_CENTERED_MODE 16 -#define FLAG_MSAA_4X_HINT 32 -#define FLAG_VSYNC_HINT 64 +#define FLAG_SHOW_LOGO 1 // Set to show raylib logo at startup +#define FLAG_FULLSCREEN_MODE 2 // Set to run program in fullscreen +#define FLAG_WINDOW_RESIZABLE 4 // Set to allow resizable window +#define FLAG_WINDOW_DECORATED 8 // Set to show window decoration (frame and buttons) +#define FLAG_WINDOW_TRANSPARENT 16 // Set to allow transparent window +#define FLAG_MSAA_4X_HINT 32 // Set to try enabling MSAA 4X +#define FLAG_VSYNC_HINT 64 // Set to try enabling V-Sync on GPU // Keyboard Function Keys #define KEY_SPACE 32 @@ -293,17 +292,13 @@ #define RAYWHITE CLITERAL{ 245, 245, 245, 255 } // My own White (raylib logo) //---------------------------------------------------------------------------------- -// Types and Structures Definition +// Structures Definition //---------------------------------------------------------------------------------- #ifndef __cplusplus // Boolean type - #ifndef __APPLE__ - #if !defined(_STDBOOL_H) - typedef enum { false, true } bool; - #define _STDBOOL_H - #endif - #else - #include + #if !defined(_STDBOOL_H) + typedef enum { false, true } bool; + #define _STDBOOL_H #endif #endif @@ -354,7 +349,7 @@ typedef struct Image { int format; // Data format (TextureFormat type) } Image; -// Texture2D type, bpp always RGBA (32bit) +// Texture2D type // NOTE: Data stored in GPU memory typedef struct Texture2D { unsigned int id; // OpenGL texture id @@ -371,15 +366,21 @@ typedef struct RenderTexture2D { Texture2D depth; // Depth buffer attachment texture } RenderTexture2D; +// SpriteFont character info +typedef struct CharInfo { + int value; // Character value (Unicode) + Rectangle rec; // Character rectangle in sprite font + int offsetX; // Character offset X when drawing + int offsetY; // Character offset Y when drawing + int advanceX; // Character advance position X +} CharInfo; + // SpriteFont type, includes texture and charSet array data typedef struct SpriteFont { Texture2D texture; // Font texture - int size; // Base size (default chars height) - int numChars; // Number of characters - int *charValues; // Characters values array - Rectangle *charRecs; // Characters rectangles within the texture - Vector2 *charOffsets; // Characters offsets (on drawing) - int *charAdvanceX; // Characters x advance (on drawing) + int baseSize; // Base size (default chars height) + int charsCount; // Number of characters + CharInfo *chars; // Characters info data } SpriteFont; // Camera type, defines a camera position/orientation in 3d space @@ -466,25 +467,6 @@ typedef struct Model { Material material; // Shader and textures data } Model; -// Light type -typedef struct LightData { - unsigned int id; // Light unique id - bool enabled; // Light enabled - int type; // Light type: LIGHT_POINT, LIGHT_DIRECTIONAL, LIGHT_SPOT - - Vector3 position; // Light position - Vector3 target; // Light direction: LIGHT_DIRECTIONAL and LIGHT_SPOT (cone direction target) - float radius; // Light attenuation radius light intensity reduced with distance (world distance) - - Color diffuse; // Light diffuse color - float intensity; // Light intensity level - - float coneAngle; // Light cone max angle: LIGHT_SPOT -} LightData, *Light; - -// Light types -typedef enum { LIGHT_POINT, LIGHT_DIRECTIONAL, LIGHT_SPOT } LightType; - // Ray type (useful for raycast) typedef struct Ray { Vector3 position; // Ray position (origin) @@ -495,8 +477,8 @@ typedef struct Ray { typedef struct RayHitInfo { bool hit; // Did the ray hit something? float distance; // Distance to nearest hit - Vector3 hitPosition; // Position of nearest hit - Vector3 hitNormal; // Surface normal of hit + Vector3 position; // Position of nearest hit + Vector3 normal; // Surface normal of hit } RayHitInfo; // Wave type, defines audio wave data @@ -531,6 +513,34 @@ typedef struct AudioStream { unsigned int buffers[2]; // OpenAL audio buffers (double buffering) } AudioStream; +// rRES data returned when reading a resource, +// it contains all required data for user (24 byte) +typedef struct RRESData { + unsigned int type; // Resource type (4 byte) + + unsigned int param1; // Resouce parameter 1 (4 byte) + unsigned int param2; // Resouce parameter 2 (4 byte) + unsigned int param3; // Resouce parameter 3 (4 byte) + unsigned int param4; // Resouce parameter 4 (4 byte) + + void *data; // Resource data pointer (4 byte) +} RRESData; + +// RRES type (pointer to RRESData array) +typedef struct RRESData *RRES; + +//---------------------------------------------------------------------------------- +// Enumerators Definition +//---------------------------------------------------------------------------------- +// Trace log type +typedef enum { + INFO = 0, + WARNING, + ERROR, + DEBUG, + OTHER +} LogType; + // Texture formats // NOTE: Support depends on OpenGL version and platform typedef enum { @@ -541,6 +551,7 @@ typedef enum { UNCOMPRESSED_R5G5B5A1, // 16 bpp (1 bit alpha) UNCOMPRESSED_R4G4B4A4, // 16 bpp (4 bit alpha) UNCOMPRESSED_R8G8B8A8, // 32 bpp + UNCOMPRESSED_R32G32B32, // 32 bit per channel (float) - HDR COMPRESSED_DXT1_RGB, // 4 bpp (no alpha) COMPRESSED_DXT1_RGBA, // 4 bpp (1 bit alpha) COMPRESSED_DXT3_RGBA, // 8 bpp @@ -567,10 +578,18 @@ typedef enum { } TextureFilterMode; // Texture parameters: wrap mode -typedef enum { WRAP_REPEAT = 0, WRAP_CLAMP, WRAP_MIRROR } TextureWrapMode; +typedef enum { + WRAP_REPEAT = 0, + WRAP_CLAMP, + WRAP_MIRROR +} TextureWrapMode; // Color blending modes (pre-defined) -typedef enum { BLEND_ALPHA = 0, BLEND_ADDITIVE, BLEND_MULTIPLIED } BlendMode; +typedef enum { + BLEND_ALPHA = 0, + BLEND_ADDITIVE, + BLEND_MULTIPLIED +} BlendMode; // Gestures type // NOTE: It could be used as flags to enable only some gestures @@ -610,24 +629,16 @@ typedef enum { HMD_FOVE_VR, } VrDevice; -// rRES data returned when reading a resource, it contains all required data for user (24 byte) -typedef struct { - unsigned int type; // Resource type (4 byte) - - unsigned int param1; // Resouce parameter 1 (4 byte) - unsigned int param2; // Resouce parameter 2 (4 byte) - unsigned int param3; // Resouce parameter 3 (4 byte) - unsigned int param4; // Resouce parameter 4 (4 byte) - - void *data; // Resource data pointer (4 byte) -} RRESData; - +// RRESData type typedef enum { - RRES_RAW = 0, - RRES_IMAGE, - RRES_WAVE, - RRES_VERTEX, - RRES_TEXT + RRES_TYPE_RAW = 0, + RRES_TYPE_IMAGE, + RRES_TYPE_WAVE, + RRES_TYPE_VERTEX, + RRES_TYPE_TEXT, + RRES_TYPE_FONT_IMAGE, + RRES_TYPE_FONT_CHARDATA, // CharInfo data array + RRES_TYPE_DIRECTORY } RRESDataType; #ifdef __cplusplus @@ -643,44 +654,48 @@ extern "C" { // Prevents name mangling of functions // Window and Graphics Device Functions (Module: core) //------------------------------------------------------------------------------------ #if defined(PLATFORM_ANDROID) -RLAPI void InitWindow(int width, int height, void *state); // Init Android Activity and OpenGL Graphics (struct android_app) +RLAPI void InitWindow(int width, int height, void *state); // Initialize Android activity #elif defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI) || defined(PLATFORM_WEB) -RLAPI void InitWindow(int width, int height, const char *title); // Initialize Window and OpenGL Graphics +RLAPI void InitWindow(int width, int height, const char *title); // Initialize window and OpenGL context #endif -RLAPI void CloseWindow(void); // Close Window and Terminate Context -RLAPI bool WindowShouldClose(void); // Detect if KEY_ESCAPE pressed or Close icon pressed -RLAPI bool IsWindowMinimized(void); // Detect if window has been minimized (or lost focus) -RLAPI void ToggleFullscreen(void); // Fullscreen toggle (only PLATFORM_DESKTOP) +RLAPI void CloseWindow(void); // Close window and unload OpenGL context +RLAPI bool WindowShouldClose(void); // Check if KEY_ESCAPE pressed or Close icon pressed +RLAPI bool IsWindowMinimized(void); // Check if window has been minimized (or lost focus) +RLAPI void ToggleFullscreen(void); // Toggle fullscreen mode (only PLATFORM_DESKTOP) +RLAPI void SetWindowIcon(Image image); // Set icon for window (only PLATFORM_DESKTOP) +RLAPI void SetWindowPosition(int x, int y); // Set window position on screen (only PLATFORM_DESKTOP) +RLAPI void SetWindowMonitor(int monitor); // Set monitor for the current window (fullscreen mode) +RLAPI void SetWindowMinSize(int width, int height); // Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE) RLAPI int GetScreenWidth(void); // Get current screen width RLAPI int GetScreenHeight(void); // Get current screen height #if !defined(PLATFORM_ANDROID) RLAPI void ShowCursor(void); // Shows cursor RLAPI void HideCursor(void); // Hides cursor -RLAPI bool IsCursorHidden(void); // Returns true if cursor is not visible -RLAPI void EnableCursor(void); // Enables cursor -RLAPI void DisableCursor(void); // Disables cursor +RLAPI bool IsCursorHidden(void); // Check if cursor is not visible +RLAPI void EnableCursor(void); // Enables cursor (unlock cursor) +RLAPI void DisableCursor(void); // Disables cursor (lock cursor) #endif -RLAPI void ClearBackground(Color color); // Sets Background Color -RLAPI void BeginDrawing(void); // Setup drawing canvas to start drawing -RLAPI void EndDrawing(void); // End canvas drawing and Swap Buffers (Double Buffering) +RLAPI void ClearBackground(Color color); // Set background color (framebuffer clear color) +RLAPI void BeginDrawing(void); // Setup canvas (framebuffer) to start drawing +RLAPI void EndDrawing(void); // End canvas drawing and swap buffers (double buffering) -RLAPI void Begin2dMode(Camera2D camera); // Initialize 2D mode with custom camera -RLAPI void End2dMode(void); // Ends 2D mode custom camera usage -RLAPI void Begin3dMode(Camera camera); // Initializes 3D mode for drawing (Camera setup) +RLAPI void Begin2dMode(Camera2D camera); // Initialize 2D mode with custom camera (2D) +RLAPI void End2dMode(void); // Ends 2D mode with custom camera +RLAPI void Begin3dMode(Camera camera); // Initializes 3D mode with custom camera (3D) RLAPI void End3dMode(void); // Ends 3D mode and returns to default 2D orthographic mode RLAPI void BeginTextureMode(RenderTexture2D target); // Initializes render texture for drawing RLAPI void EndTextureMode(void); // Ends drawing to render texture RLAPI Ray GetMouseRay(Vector2 mousePosition, Camera camera); // Returns a ray trace from mouse position -RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Returns the screen space position from a 3d world space position +RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Returns the screen space position for a 3d world space position RLAPI Matrix GetCameraMatrix(Camera camera); // Returns camera transform matrix (view matrix) RLAPI void SetTargetFPS(int fps); // Set target FPS (maximum) -RLAPI float GetFPS(void); // Returns current FPS -RLAPI float GetFrameTime(void); // Returns time in seconds for one frame +RLAPI int GetFPS(void); // Returns current FPS +RLAPI float GetFrameTime(void); // Returns time in seconds for last frame drawn RLAPI Color GetColor(int hexValue); // Returns a Color struct from hexadecimal value RLAPI int GetHexValue(Color color); // Returns hexadecimal value for a Color @@ -691,15 +706,21 @@ RLAPI float *MatrixToFloat(Matrix mat); // Converts Ma RLAPI int GetRandomValue(int min, int max); // Returns a random value between min and max (both included) RLAPI Color Fade(Color color, float alpha); // Color fade-in or fade-out, alpha goes from 0.0f to 1.0f -RLAPI void SetConfigFlags(char flags); // Setup some window configuration flags -RLAPI void ShowLogo(void); // Activates raylib logo at startup (can be done with flags) +RLAPI void ShowLogo(void); // Activate raylib logo at startup (can be done with flags) +RLAPI void SetConfigFlags(char flags); // Setup window configuration flags (view FLAGS) +RLAPI void TraceLog(int logType, const char *text, ...); // Show trace log messages (INFO, WARNING, ERROR, DEBUG) +RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (saved a .png) -RLAPI bool IsFileDropped(void); // Check if a file have been dropped into window -RLAPI char **GetDroppedFiles(int *count); // Retrieve dropped files into window +RLAPI bool IsFileExtension(const char *fileName, const char *ext);// Check file extension +RLAPI const char *GetDirectoryPath(const char *fileName); // Get directory for a given fileName (with path) +RLAPI const char *GetWorkingDirectory(void); // Get current working directory +RLAPI bool ChangeDirectory(const char *dir); // Change working directory, returns true if success +RLAPI bool IsFileDropped(void); // Check if a file has been dropped into window +RLAPI char **GetDroppedFiles(int *count); // Get dropped files names RLAPI void ClearDroppedFiles(void); // Clear dropped files paths buffer -RLAPI void StorageSaveValue(int position, int value); // Storage save integer value (to defined position) -RLAPI int StorageLoadValue(int position); // Storage load integer value (from defined position) +RLAPI void StorageSaveValue(int position, int value); // Save integer value to storage file (to defined position) +RLAPI int StorageLoadValue(int position); // Load integer value from storage file (from defined position) //------------------------------------------------------------------------------------ // Input Handling Functions (Module: core) @@ -769,12 +790,15 @@ RLAPI void DrawPixel(int posX, int posY, Color color); RLAPI void DrawPixelV(Vector2 position, Color color); // Draw a pixel (Vector version) RLAPI void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw a line RLAPI void DrawLineV(Vector2 startPos, Vector2 endPos, Color color); // Draw a line (Vector version) +RLAPI void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line defining thickness +RLAPI void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line using cubic-bezier curves in-out RLAPI void DrawCircle(int centerX, int centerY, float radius, Color color); // Draw a color-filled circle RLAPI void DrawCircleGradient(int centerX, int centerY, float radius, Color color1, Color color2); // Draw a gradient-filled circle RLAPI void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version) RLAPI void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rectangle RLAPI void DrawRectangleRec(Rectangle rec, Color color); // Draw a color-filled rectangle +RLAPI void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color); // Draw a color-filled rectangle with pro parameters RLAPI void DrawRectangleGradient(int posX, int posY, int width, int height, Color color1, Color color2); // Draw a gradient-filled rectangle RLAPI void DrawRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rectangle (Vector version) RLAPI void DrawRectangleLines(int posX, int posY, int width, int height, Color color); // Draw rectangle outline @@ -820,7 +844,7 @@ RLAPI Image ImageText(const char *text, int fontSize, Color color); RLAPI Image ImageTextEx(SpriteFont font, const char *text, float fontSize, int spacing, Color tint); // Create an image from text (custom sprite font) RLAPI void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec); // Draw a source image within a destination image RLAPI void ImageDrawText(Image *dst, Vector2 position, const char *text, int fontSize, Color color); // Draw text (default font) within an image (destination) -RLAPI void ImageDrawTextEx(Image *dst, Vector2 position, SpriteFont font, const char *text, +RLAPI void ImageDrawTextEx(Image *dst, Vector2 position, SpriteFont font, const char *text, float fontSize, int spacing, Color color); // Draw text (custom sprite font) within an image (destination) RLAPI void ImageFlipVertical(Image *image); // Flip image vertically RLAPI void ImageFlipHorizontal(Image *image); // Flip image horizontally @@ -845,7 +869,7 @@ RLAPI void DrawTexturePro(Texture2D texture, Rectangle sourceRec, Rectangle dest //------------------------------------------------------------------------------------ RLAPI SpriteFont GetDefaultFont(void); // Get the default SpriteFont RLAPI SpriteFont LoadSpriteFont(const char *fileName); // Load SpriteFont from file into GPU memory (VRAM) -RLAPI SpriteFont LoadSpriteFontTTF(const char *fileName, int fontSize, int numChars, int *fontChars); // Load SpriteFont from TTF font file with generation parameters +RLAPI SpriteFont LoadSpriteFontEx(const char *fileName, int fontSize, int charsCount, int *fontChars); // Load SpriteFont from file with extended parameters RLAPI void UnloadSpriteFont(SpriteFont spriteFont); // Unload SpriteFont from GPU memory (VRAM) RLAPI void DrawText(const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font) @@ -854,7 +878,7 @@ RLAPI void DrawTextEx(SpriteFont spriteFont, const char* text, Vector2 position, RLAPI int MeasureText(const char *text, int fontSize); // Measure string width for default font RLAPI Vector2 MeasureTextEx(SpriteFont spriteFont, const char *text, float fontSize, int spacing); // Measure string size for SpriteFont -RLAPI void DrawFPS(int posX, int posY); // Shows current FPS on top-left corner +RLAPI void DrawFPS(int posX, int posY); // Shows current FPS RLAPI const char *FormatText(const char *text, ...); // Formatting of text with variables to 'embed' RLAPI const char *SubText(const char *text, int position, int length); // Get a piece of a text string @@ -876,7 +900,6 @@ RLAPI void DrawPlane(Vector3 centerPos, Vector2 size, Color color); RLAPI void DrawRay(Ray ray, Color color); // Draw a ray line RLAPI void DrawGrid(int slices, float spacing); // Draw a grid (centered at (0, 0, 0)) RLAPI void DrawGizmo(Vector3 position); // Draw simple gizmo -RLAPI void DrawLight(Light light); // Draw light in 3D world //DrawTorus(), DrawTeapot() could be useful? //------------------------------------------------------------------------------------ @@ -892,21 +915,19 @@ RLAPI void UnloadMesh(Mesh *mesh); RLAPI void UnloadModel(Model model); // Unload model from memory (RAM and/or VRAM) RLAPI Material LoadMaterial(const char *fileName); // Load material from file -RLAPI Material LoadMaterialEx(Shader shader, Texture2D diffuse, Color color); // Load material from basic shading data RLAPI Material LoadDefaultMaterial(void); // Load default material (uses default models shader) -RLAPI Material LoadStandardMaterial(void); // Load standard material (uses material attributes and lighting shader) RLAPI void UnloadMaterial(Material material); // Unload material from GPU memory (VRAM) RLAPI void DrawModel(Model model, Vector3 position, float scale, Color tint); // Draw a model (with texture if set) -RLAPI void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, +RLAPI void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model with extended parameters RLAPI void DrawModelWires(Model model, Vector3 position, float scale, Color tint); // Draw a model wires (with texture if set) -RLAPI void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, +RLAPI void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model wires (with texture if set) with extended parameters RLAPI void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires) RLAPI void DrawBillboard(Camera camera, Texture2D texture, Vector3 center, float size, Color tint); // Draw a billboard texture -RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle sourceRec, +RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle sourceRec, Vector3 center, float size, Color tint); // Draw a billboard texture defined by sourceRec RLAPI BoundingBox CalculateBoundingBox(Mesh mesh); // Calculate mesh bounding box limits @@ -914,7 +935,7 @@ RLAPI bool CheckCollisionSpheres(Vector3 centerA, float radiusA, Vector3 centerB RLAPI bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2); // Detect collision between two bounding boxes RLAPI bool CheckCollisionBoxSphere(BoundingBox box, Vector3 centerSphere, float radiusSphere); // Detect collision between box and sphere RLAPI bool CheckCollisionRaySphere(Ray ray, Vector3 spherePosition, float sphereRadius); // Detect collision between ray and sphere -RLAPI bool CheckCollisionRaySphereEx(Ray ray, Vector3 spherePosition, float sphereRadius, +RLAPI bool CheckCollisionRaySphereEx(Ray ray, Vector3 spherePosition, float sphereRadius, Vector3 *collisionPoint); // Detect collision between ray and sphere, returns collision point RLAPI bool CheckCollisionRayBox(Ray ray, BoundingBox box); // Detect collision between ray and box RLAPI RayHitInfo GetCollisionRayMesh(Ray ray, Mesh *mesh); // Get collision info between ray and mesh @@ -930,7 +951,6 @@ RLAPI Shader LoadShader(char *vsFileName, char *fsFileName); // Loa RLAPI void UnloadShader(Shader shader); // Unload shader from GPU memory (VRAM) RLAPI Shader GetDefaultShader(void); // Get default shader -RLAPI Shader GetStandardShader(void); // Get standard shader RLAPI Texture2D GetDefaultTexture(void); // Get default texture RLAPI int GetShaderLocation(Shader shader, const char *uniformName); // Get shader uniform location @@ -946,19 +966,17 @@ RLAPI void EndShaderMode(void); // End RLAPI void BeginBlendMode(int mode); // Begin blending mode (alpha, additive, multiplied) RLAPI void EndBlendMode(void); // End blending mode (reset to default: alpha blending) -RLAPI Light CreateLight(int type, Vector3 position, Color diffuse); // Create a new light, initialize it and add to pool -RLAPI void DestroyLight(Light light); // Destroy a light and take it out of the list - //------------------------------------------------------------------------------------ // VR experience Functions (Module: rlgl) // NOTE: This functions are useless when using OpenGL 1.1 //------------------------------------------------------------------------------------ -RLAPI void InitVrDevice(int vdDevice); // Init VR device -RLAPI void CloseVrDevice(void); // Close VR device -RLAPI bool IsVrDeviceReady(void); // Detect if VR device is ready -RLAPI bool IsVrSimulator(void); // Detect if VR simulator is running -RLAPI void UpdateVrTracking(Camera *camera); // Update VR tracking (position and orientation) and camera -RLAPI void ToggleVrMode(void); // Enable/Disable VR experience (device or simulator) +RLAPI void InitVrSimulator(int vrDevice); // Init VR simulator for selected device +RLAPI void CloseVrSimulator(void); // Close VR simulator for current device +RLAPI bool IsVrSimulatorReady(void); // Detect if VR device is ready +RLAPI void UpdateVrTracking(Camera *camera); // Update VR tracking (position and orientation) and camera +RLAPI void ToggleVrMode(void); // Enable/Disable VR experience (device or simulator) +RLAPI void BeginVrDrawing(void); // Begin VR simulator stereo rendering +RLAPI void EndVrDrawing(void); // End VR simulator stereo rendering //------------------------------------------------------------------------------------ // Audio Loading and Playing Functions (Module: audio) @@ -966,12 +984,13 @@ RLAPI void ToggleVrMode(void); // Enable/Disable VR experienc RLAPI void InitAudioDevice(void); // Initialize audio device and context RLAPI void CloseAudioDevice(void); // Close the audio device and context RLAPI bool IsAudioDeviceReady(void); // Check if audio device has been initialized successfully +RLAPI void SetMasterVolume(float volume); // Set master volume (listener) RLAPI Wave LoadWave(const char *fileName); // Load wave data from file RLAPI Wave LoadWaveEx(void *data, int sampleCount, int sampleRate, int sampleSize, int channels); // Load wave data from raw array data RLAPI Sound LoadSound(const char *fileName); // Load sound from file RLAPI Sound LoadSoundFromWave(Wave wave); // Load sound from wave data -RLAPI void UpdateSound(Sound sound, const void *data, int numSamples);// Update sound buffer with new data +RLAPI void UpdateSound(Sound sound, const void *data, int samplesCount);// Update sound buffer with new data RLAPI void UnloadWave(Wave wave); // Unload wave data RLAPI void UnloadSound(Sound sound); // Unload sound RLAPI void PlaySound(Sound sound); // Play a sound @@ -995,13 +1014,14 @@ RLAPI void ResumeMusicStream(Music music); // Resume RLAPI bool IsMusicPlaying(Music music); // Check if music is playing RLAPI void SetMusicVolume(Music music, float volume); // Set volume for music (1.0 is max level) RLAPI void SetMusicPitch(Music music, float pitch); // Set pitch for a music (1.0 is base level) +RLAPI void SetMusicLoopCount(Music music, float count); // Set music loop count (loop repeats) RLAPI float GetMusicTimeLength(Music music); // Get music time length (in seconds) RLAPI float GetMusicTimePlayed(Music music); // Get current music time played (in seconds) RLAPI AudioStream InitAudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels); // Init audio stream (to stream raw audio pcm data) -RLAPI void UpdateAudioStream(AudioStream stream, const void *data, int numSamples); // Update audio stream buffers with data +RLAPI void UpdateAudioStream(AudioStream stream, const void *data, int samplesCount); // Update audio stream buffers with data RLAPI void CloseAudioStream(AudioStream stream); // Close audio stream and free memory RLAPI bool IsAudioBufferProcessed(AudioStream stream); // Check if any audio stream buffers requires refill RLAPI void PlayAudioStream(AudioStream stream); // Play audio stream diff --git a/shaders/glsl100/base.vs b/shaders/glsl100/base.vs deleted file mode 100644 index e93869396..000000000 --- a/shaders/glsl100/base.vs +++ /dev/null @@ -1,26 +0,0 @@ -#version 100 - -// Input vertex attributes -attribute vec3 vertexPosition; -attribute vec2 vertexTexCoord; -attribute vec3 vertexNormal; -attribute vec4 vertexColor; - -// Input uniform values -uniform mat4 mvpMatrix; - -// Output vertex attributes (to fragment shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// NOTE: Add here your custom variables - -void main() -{ - // Send vertex attributes to fragment shader - fragTexCoord = vertexTexCoord; - fragColor = vertexColor; - - // Calculate final vertex position - gl_Position = mvpMatrix*vec4(vertexPosition, 1.0); -} \ No newline at end of file diff --git a/shaders/glsl100/bloom.fs b/shaders/glsl100/bloom.fs deleted file mode 100644 index a8e1d20f7..000000000 --- a/shaders/glsl100/bloom.fs +++ /dev/null @@ -1,39 +0,0 @@ -#version 100 - -precision mediump float; - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables - -const vec2 size = vec2(800, 450); // render size -const float samples = 5.0; // pixels per axis; higher = bigger glow, worse performance -const float quality = 2.5; // lower = smaller glow, better quality - -void main() -{ - vec4 sum = vec4(0); - vec2 sizeFactor = vec2(1)/size*quality; - - // Texel color fetching from texture sampler - vec4 source = texture2D(texture0, fragTexCoord); - - const int range = 2; // should be = (samples - 1)/2; - - for (int x = -range; x <= range; x++) - { - for (int y = -range; y <= range; y++) - { - sum += texture2D(texture0, fragTexCoord + vec2(x, y)*sizeFactor); - } - } - - // Calculate final fragment color - gl_FragColor = ((sum/(samples*samples)) + source)*colDiffuse; -} \ No newline at end of file diff --git a/shaders/glsl100/blur.fs b/shaders/glsl100/blur.fs deleted file mode 100644 index 1935f0809..000000000 --- a/shaders/glsl100/blur.fs +++ /dev/null @@ -1,34 +0,0 @@ -#version 100 - -precision mediump float; - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables - -// NOTE: Render size values must be passed from code -const float renderWidth = 800; -const float renderHeight = 450; - -float offset[3] = float[]( 0.0, 1.3846153846, 3.2307692308 ); -float weight[3] = float[]( 0.2270270270, 0.3162162162, 0.0702702703 ); - -void main() -{ - // Texel color fetching from texture sampler - vec3 tc = texture2D(texture0, fragTexCoord).rgb*weight[0]; - - for (int i = 1; i < 3; i++) - { - tc += texture2D(texture0, fragTexCoord + vec2(offset[i])/renderWidth, 0.0).rgb*weight[i]; - tc += texture2D(texture0, fragTexCoord - vec2(offset[i])/renderWidth, 0.0).rgb*weight[i]; - } - - gl_FragColor = vec4(tc, 1.0); -} \ No newline at end of file diff --git a/shaders/glsl100/standard.fs b/shaders/glsl100/standard.fs deleted file mode 100644 index 3e78022dc..000000000 --- a/shaders/glsl100/standard.fs +++ /dev/null @@ -1,150 +0,0 @@ -#version 100 - -precision mediump float; - -varying vec3 fragPosition; -varying vec2 fragTexCoord; -varying vec4 fragColor; -varying vec3 fragNormal; - -uniform sampler2D texture0; -uniform sampler2D texture1; -uniform sampler2D texture2; - -uniform vec4 colAmbient; -uniform vec4 colDiffuse; -uniform vec4 colSpecular; -uniform float glossiness; - -uniform int useNormal; -uniform int useSpecular; - -uniform mat4 modelMatrix; -uniform vec3 viewDir; - -struct Light { - int enabled; - int type; - vec3 position; - vec3 direction; - vec4 diffuse; - float intensity; - float radius; - float coneAngle; -}; - -const int maxLights = 8; -uniform Light lights[maxLights]; - -vec3 CalcPointLight(Light l, vec3 n, vec3 v, float s) -{ - vec3 surfacePos = vec3(modelMatrix*vec4(fragPosition, 1)); - vec3 surfaceToLight = l.position - surfacePos; - - // Diffuse shading - float brightness = clamp(dot(n, surfaceToLight)/(length(surfaceToLight)*length(n)), 0, 1); - float diff = 1.0/dot(surfaceToLight/l.radius, surfaceToLight/l.radius)*brightness*l.intensity; - - // Specular shading - float spec = 0.0; - if (diff > 0.0) - { - vec3 h = normalize(-l.direction + v); - spec = pow(dot(n, h), 3 + glossiness)*s; - } - - return (diff*l.diffuse.rgb + spec*colSpecular.rgb); -} - -vec3 CalcDirectionalLight(Light l, vec3 n, vec3 v, float s) -{ - vec3 lightDir = normalize(-l.direction); - - // Diffuse shading - float diff = clamp(dot(n, lightDir), 0.0, 1.0)*l.intensity; - - // Specular shading - float spec = 0.0; - if (diff > 0.0) - { - vec3 h = normalize(lightDir + v); - spec = pow(dot(n, h), 3 + glossiness)*s; - } - - // Combine results - return (diff*l.intensity*l.diffuse.rgb + spec*colSpecular.rgb); -} - -vec3 CalcSpotLight(Light l, vec3 n, vec3 v, float s) -{ - vec3 surfacePos = vec3(modelMatrix*vec4(fragPosition, 1)); - vec3 lightToSurface = normalize(surfacePos - l.position); - vec3 lightDir = normalize(-l.direction); - - // Diffuse shading - float diff = clamp(dot(n, lightDir), 0.0, 1.0)*l.intensity; - - // Spot attenuation - float attenuation = clamp(dot(n, lightToSurface), 0.0, 1.0); - attenuation = dot(lightToSurface, -lightDir); - - float lightToSurfaceAngle = degrees(acos(attenuation)); - if (lightToSurfaceAngle > l.coneAngle) attenuation = 0.0; - - float falloff = (l.coneAngle - lightToSurfaceAngle)/l.coneAngle; - - // Combine diffuse and attenuation - float diffAttenuation = diff*attenuation; - - // Specular shading - float spec = 0.0; - if (diffAttenuation > 0.0) - { - vec3 h = normalize(lightDir + v); - spec = pow(dot(n, h), 3 + glossiness)*s; - } - - return (falloff*(diffAttenuation*l.diffuse.rgb + spec*colSpecular.rgb)); -} - -void main() -{ - // Calculate fragment normal in screen space - // NOTE: important to multiply model matrix by fragment normal to apply model transformation (rotation and scale) - mat3 normalMatrix = transpose(inverse(mat3(modelMatrix))); - vec3 normal = normalize(normalMatrix*fragNormal); - - // Normalize normal and view direction vectors - vec3 n = normalize(normal); - vec3 v = normalize(viewDir); - - // Calculate diffuse texture color fetching - vec4 texelColor = texture2D(texture0, fragTexCoord); - vec3 lighting = colAmbient.rgb; - - // Calculate normal texture color fetching or set to maximum normal value by default - if (useNormal == 1) - { - n *= texture2D(texture1, fragTexCoord).rgb; - n = normalize(n); - } - - // Calculate specular texture color fetching or set to maximum specular value by default - float spec = 1.0; - if (useSpecular == 1) spec *= normalize(texture2D(texture2, fragTexCoord).r); - - for (int i = 0; i < maxLights; i++) - { - // Check if light is enabled - if (lights[i].enabled == 1) - { - // Calculate lighting based on light type - if(lights[i].type == 0) lighting += CalcPointLight(lights[i], n, v, spec); - else if(lights[i].type == 1) lighting += CalcDirectionalLight(lights[i], n, v, spec); - else if(lights[i].type == 2) lighting += CalcSpotLight(lights[i], n, v, spec); - } - } - - // Calculate final fragment color - gl_FragColor = vec4(texelColor.rgb*lighting*colDiffuse.rgb, texelColor.a*colDiffuse.a); -} diff --git a/shaders/glsl100/standard.vs b/shaders/glsl100/standard.vs deleted file mode 100644 index 49c5a3ebf..000000000 --- a/shaders/glsl100/standard.vs +++ /dev/null @@ -1,23 +0,0 @@ -#version 100 - -attribute vec3 vertexPosition; -attribute vec3 vertexNormal; -attribute vec2 vertexTexCoord; -attribute vec4 vertexColor; - -varying vec3 fragPosition; -varying vec2 fragTexCoord; -varying vec4 fragColor; -varying vec3 fragNormal; - -uniform mat4 mvpMatrix; - -void main() -{ - fragPosition = vertexPosition; - fragTexCoord = vertexTexCoord; - fragColor = vertexColor; - fragNormal = vertexNormal; - - gl_Position = mvpMatrix*vec4(vertexPosition, 1.0); -} \ No newline at end of file diff --git a/shaders/glsl100/swirl.fs b/shaders/glsl100/swirl.fs deleted file mode 100644 index 6b17874c4..000000000 --- a/shaders/glsl100/swirl.fs +++ /dev/null @@ -1,46 +0,0 @@ -#version 100 - -precision mediump float; - -// Input vertex attributes (from vertex shader) -varying vec2 fragTexCoord; -varying vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// NOTE: Add here your custom variables - -// NOTE: Render size values must be passed from code -const float renderWidth = 800; -const float renderHeight = 450; - -float radius = 250.0; -float angle = 0.8; - -uniform vec2 center = vec2(200.0, 200.0); - -void main() -{ - vec2 texSize = vec2(renderWidth, renderHeight); - vec2 tc = fragTexCoord*texSize; - tc -= center; - - float dist = length(tc); - - if (dist < radius) - { - float percent = (radius - dist)/radius; - float theta = percent*percent*angle*8.0; - float s = sin(theta); - float c = cos(theta); - - tc = vec2(dot(tc, vec2(c, -s)), dot(tc, vec2(s, c))); - } - - tc += center; - vec3 color = texture2D(texture0, tc/texSize).rgb; - - gl_FragColor = vec4(color, 1.0);; -} \ No newline at end of file diff --git a/shaders/glsl330/base.vs b/shaders/glsl330/base.vs deleted file mode 100644 index 638cb8aee..000000000 --- a/shaders/glsl330/base.vs +++ /dev/null @@ -1,26 +0,0 @@ -#version 330 - -// Input vertex attributes -in vec3 vertexPosition; -in vec2 vertexTexCoord; -in vec3 vertexNormal; -in vec4 vertexColor; - -// Input uniform values -uniform mat4 mvpMatrix; - -// Output vertex attributes (to fragment shader) -out vec2 fragTexCoord; -out vec4 fragColor; - -// NOTE: Add here your custom variables - -void main() -{ - // Send vertex attributes to fragment shader - fragTexCoord = vertexTexCoord; - fragColor = vertexColor; - - // Calculate final vertex position - gl_Position = mvpMatrix*vec4(vertexPosition, 1.0); -} \ No newline at end of file diff --git a/shaders/glsl330/bloom.fs b/shaders/glsl330/bloom.fs deleted file mode 100644 index 333d5b059..000000000 --- a/shaders/glsl330/bloom.fs +++ /dev/null @@ -1,40 +0,0 @@ -#version 330 - -// Input vertex attributes (from vertex shader) -in vec2 fragTexCoord; -in vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// Output fragment color -out vec4 finalColor; - -// NOTE: Add here your custom variables - -const vec2 size = vec2(800, 450); // render size -const float samples = 5.0; // pixels per axis; higher = bigger glow, worse performance -const float quality = 2.5; // lower = smaller glow, better quality - -void main() -{ - vec4 sum = vec4(0); - vec2 sizeFactor = vec2(1)/size*quality; - - // Texel color fetching from texture sampler - vec4 source = texture(texture0, fragTexCoord); - - const int range = 2; // should be = (samples - 1)/2; - - for (int x = -range; x <= range; x++) - { - for (int y = -range; y <= range; y++) - { - sum += texture(texture0, fragTexCoord + vec2(x, y)*sizeFactor); - } - } - - // Calculate final fragment color - finalColor = ((sum/(samples*samples)) + source)*colDiffuse; -} \ No newline at end of file diff --git a/shaders/glsl330/depth.fs b/shaders/glsl330/depth.fs deleted file mode 100644 index 2422f3906..000000000 --- a/shaders/glsl330/depth.fs +++ /dev/null @@ -1,27 +0,0 @@ -#version 330 - -// Input vertex attributes (from vertex shader) -in vec2 fragTexCoord; -in vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; // Depth texture -uniform vec4 colDiffuse; - -// Output fragment color -out vec4 finalColor; - -// NOTE: Add here your custom variables - -void main() -{ - float zNear = 0.01; // camera z near - float zFar = 10.0; // camera z far - float z = texture(texture0, fragTexCoord).x; - - // Linearize depth value - float depth = (2.0*zNear)/(zFar + zNear - z*(zFar - zNear)); - - // Calculate final fragment color - finalColor = vec4(depth, depth, depth, 1.0f); -} \ No newline at end of file diff --git a/shaders/glsl330/grayscale.fs b/shaders/glsl330/grayscale.fs deleted file mode 100644 index 5b3e11be6..000000000 --- a/shaders/glsl330/grayscale.fs +++ /dev/null @@ -1,26 +0,0 @@ -#version 330 - -// Input vertex attributes (from vertex shader) -in vec2 fragTexCoord; -in vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// Output fragment color -out vec4 finalColor; - -// NOTE: Add here your custom variables - -void main() -{ - // Texel color fetching from texture sampler - vec4 texelColor = texture(texture0, fragTexCoord)*colDiffuse*fragColor; - - // Convert texel color to grayscale using NTSC conversion weights - float gray = dot(texelColor.rgb, vec3(0.299, 0.587, 0.114)); - - // Calculate final fragment color - finalColor = vec4(gray, gray, gray, texelColor.a); -} \ No newline at end of file diff --git a/shaders/glsl330/standard.fs b/shaders/glsl330/standard.fs deleted file mode 100644 index f728be81c..000000000 --- a/shaders/glsl330/standard.fs +++ /dev/null @@ -1,150 +0,0 @@ -#version 330 - -in vec3 fragPosition; -in vec2 fragTexCoord; -in vec4 fragColor; -in vec3 fragNormal; - -out vec4 finalColor; - -uniform sampler2D texture0; -uniform sampler2D texture1; -uniform sampler2D texture2; - -uniform vec4 colAmbient; -uniform vec4 colDiffuse; -uniform vec4 colSpecular; -uniform float glossiness; - -uniform int useNormal; -uniform int useSpecular; - -uniform mat4 modelMatrix; -uniform vec3 viewDir; - -struct Light { - int enabled; - int type; - vec3 position; - vec3 direction; - vec4 diffuse; - float intensity; - float radius; - float coneAngle; -}; - -const int maxLights = 8; -uniform Light lights[maxLights]; - -vec3 CalcPointLight(Light l, vec3 n, vec3 v, float s) -{ - vec3 surfacePos = vec3(modelMatrix*vec4(fragPosition, 1)); - vec3 surfaceToLight = l.position - surfacePos; - - // Diffuse shading - float brightness = clamp(dot(n, surfaceToLight)/(length(surfaceToLight)*length(n)), 0, 1); - float diff = 1.0/dot(surfaceToLight/l.radius, surfaceToLight/l.radius)*brightness*l.intensity; - - // Specular shading - float spec = 0.0; - if (diff > 0.0) - { - vec3 h = normalize(-l.direction + v); - spec = pow(dot(n, h), 3 + glossiness)*s; - } - - return (diff*l.diffuse.rgb + spec*colSpecular.rgb); -} - -vec3 CalcDirectionalLight(Light l, vec3 n, vec3 v, float s) -{ - vec3 lightDir = normalize(-l.direction); - - // Diffuse shading - float diff = clamp(dot(n, lightDir), 0.0, 1.0)*l.intensity; - - // Specular shading - float spec = 0.0; - if (diff > 0.0) - { - vec3 h = normalize(lightDir + v); - spec = pow(dot(n, h), 3 + glossiness)*s; - } - - // Combine results - return (diff*l.intensity*l.diffuse.rgb + spec*colSpecular.rgb); -} - -vec3 CalcSpotLight(Light l, vec3 n, vec3 v, float s) -{ - vec3 surfacePos = vec3(modelMatrix*vec4(fragPosition, 1)); - vec3 lightToSurface = normalize(surfacePos - l.position); - vec3 lightDir = normalize(-l.direction); - - // Diffuse shading - float diff = clamp(dot(n, lightDir), 0.0, 1.0)*l.intensity; - - // Spot attenuation - float attenuation = clamp(dot(n, lightToSurface), 0.0, 1.0); - attenuation = dot(lightToSurface, -lightDir); - - float lightToSurfaceAngle = degrees(acos(attenuation)); - if (lightToSurfaceAngle > l.coneAngle) attenuation = 0.0; - - float falloff = (l.coneAngle - lightToSurfaceAngle)/l.coneAngle; - - // Combine diffuse and attenuation - float diffAttenuation = diff*attenuation; - - // Specular shading - float spec = 0.0; - if (diffAttenuation > 0.0) - { - vec3 h = normalize(lightDir + v); - spec = pow(dot(n, h), 3 + glossiness)*s; - } - - return (falloff*(diffAttenuation*l.diffuse.rgb + spec*colSpecular.rgb)); -} - -void main() -{ - // Calculate fragment normal in screen space - // NOTE: important to multiply model matrix by fragment normal to apply model transformation (rotation and scale) - mat3 normalMatrix = transpose(inverse(mat3(modelMatrix))); - vec3 normal = normalize(normalMatrix*fragNormal); - - // Normalize normal and view direction vectors - vec3 n = normalize(normal); - vec3 v = normalize(viewDir); - - // Calculate diffuse texture color fetching - vec4 texelColor = texture(texture0, fragTexCoord); - vec3 lighting = colAmbient.rgb; - - // Calculate normal texture color fetching or set to maximum normal value by default - if (useNormal == 1) - { - n *= texture(texture1, fragTexCoord).rgb; - n = normalize(n); - } - - // Calculate specular texture color fetching or set to maximum specular value by default - float spec = 1.0; - if (useSpecular == 1) spec *= normalize(texture(texture2, fragTexCoord).r); - - for (int i = 0; i < maxLights; i++) - { - // Check if light is enabled - if (lights[i].enabled == 1) - { - // Calculate lighting based on light type - if(lights[i].type == 0) lighting += CalcPointLight(lights[i], n, v, spec); - else if(lights[i].type == 1) lighting += CalcDirectionalLight(lights[i], n, v, spec); - else if(lights[i].type == 2) lighting += CalcSpotLight(lights[i], n, v, spec); - } - } - - // Calculate final fragment color - finalColor = vec4(texelColor.rgb*lighting*colDiffuse.rgb, texelColor.a*colDiffuse.a); -} diff --git a/shaders/glsl330/standard.vs b/shaders/glsl330/standard.vs deleted file mode 100644 index fc0a5ff40..000000000 --- a/shaders/glsl330/standard.vs +++ /dev/null @@ -1,23 +0,0 @@ -#version 330 - -in vec3 vertexPosition; -in vec3 vertexNormal; -in vec2 vertexTexCoord; -in vec4 vertexColor; - -out vec3 fragPosition; -out vec2 fragTexCoord; -out vec4 fragColor; -out vec3 fragNormal; - -uniform mat4 mvpMatrix; - -void main() -{ - fragPosition = vertexPosition; - fragTexCoord = vertexTexCoord; - fragColor = vertexColor; - fragNormal = vertexNormal; - - gl_Position = mvpMatrix*vec4(vertexPosition, 1.0); -} \ No newline at end of file diff --git a/shaders/glsl330/swirl.fs b/shaders/glsl330/swirl.fs deleted file mode 100644 index c4b667685..000000000 --- a/shaders/glsl330/swirl.fs +++ /dev/null @@ -1,47 +0,0 @@ -#version 330 - -// Input vertex attributes (from vertex shader) -in vec2 fragTexCoord; -in vec4 fragColor; - -// Input uniform values -uniform sampler2D texture0; -uniform vec4 colDiffuse; - -// Output fragment color -out vec4 finalColor; - -// NOTE: Add here your custom variables - -// NOTE: Render size values must be passed from code -const float renderWidth = 800; -const float renderHeight = 450; - -float radius = 250.0; -float angle = 0.8; - -uniform vec2 center = vec2(200.0, 200.0); - -void main() -{ - vec2 texSize = vec2(renderWidth, renderHeight); - vec2 tc = fragTexCoord*texSize; - tc -= center; - - float dist = length(tc); - - if (dist < radius) - { - float percent = (radius - dist)/radius; - float theta = percent*percent*angle*8.0; - float s = sin(theta); - float c = cos(theta); - - tc = vec2(dot(tc, vec2(c, -s)), dot(tc, vec2(s, c))); - } - - tc += center; - vec3 color = texture(texture0, tc/texSize).rgb; - - finalColor = vec4(color, 1.0);; -} \ No newline at end of file diff --git a/src/android/jni/Android.mk b/src/android/jni/Android.mk deleted file mode 100644 index 687c65773..000000000 --- a/src/android/jni/Android.mk +++ /dev/null @@ -1,58 +0,0 @@ -#************************************************************************************************** -# -# raylib for Android -# -# Static library compilation -# -# Copyright (c) 2014-2016 Ramon Santamaria (@raysan5) -# -# This software is provided "as-is", without any express or implied warranty. In no event -# will the authors be held liable for any damages arising from the use of this software. -# -# Permission is granted to anyone to use this software for any purpose, including commercial -# applications, and to alter it and redistribute it freely, subject to the following restrictions: -# -# 1. The origin of this software must not be misrepresented; you must not claim that you -# wrote the original software. If you use this software in a product, an acknowledgment -# in the product documentation would be appreciated but is not required. -# -# 2. Altered source versions must be plainly marked as such, and must not be misrepresented -# as being the original software. -# -# 3. This notice may not be removed or altered from any source distribution. -# -#************************************************************************************************** - -# Path of the current directory (i.e. the directory containing the Android.mk file itself) -LOCAL_PATH := $(call my-dir) - -# raylib static library compilation -# NOTE: It uses source placed on relative path ../../src from this file -#----------------------------------------------------------------------- -# Makefile that will clear many LOCAL_XXX variables for you -include $(CLEAR_VARS) - -# Module name -LOCAL_MODULE := raylib - -# Module source files -LOCAL_SRC_FILES :=\ - ../../core.c \ - ../../rlgl.c \ - ../../textures.c \ - ../../text.c \ - ../../shapes.c \ - ../../models.c \ - ../../utils.c \ - ../../audio.c \ - ../../external/stb_vorbis.c \ - -# Required includes paths (.h) -LOCAL_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/include $(LOCAL_PATH)/../.. - -# Required flags for compilation: defines PLATFORM_ANDROID and GRAPHICS_API_OPENGL_ES2 -LOCAL_CFLAGS := -Wall -std=c99 -Wno-missing-braces -DPLATFORM_ANDROID -DGRAPHICS_API_OPENGL_ES2 - -# Build the static library libraylib.a -include $(BUILD_STATIC_LIBRARY) -#-------------------------------------------------------------------- diff --git a/src/android/jni/Application.mk b/src/android/jni/Application.mk deleted file mode 100644 index fab0d7e5d..000000000 --- a/src/android/jni/Application.mk +++ /dev/null @@ -1,3 +0,0 @@ -APP_ABI := $(TARGET_ARCH_ABI) -# $(warning APP_ABI $(APP_ABI)) -# $(warning LOCAL_ARM_NEON $(LOCAL_ARM_NEON)) diff --git a/src/android/jni/include/AL/al.h b/src/android/jni/include/AL/al.h deleted file mode 100644 index e084b3ed3..000000000 --- a/src/android/jni/include/AL/al.h +++ /dev/null @@ -1,825 +0,0 @@ -#ifndef AL_AL_H -#define AL_AL_H - -#ifdef ANDROID -#include -#ifndef LOGI -#define LOGI(...) __android_log_print(ANDROID_LOG_INFO,"OpenAL",__VA_ARGS__) -#endif -#ifndef LOGE -#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR,"OpenAL",__VA_ARGS__) -#endif -#endif - -#if defined(__cplusplus) -extern "C" { -#endif - -#if defined(AL_LIBTYPE_STATIC) - #define AL_API -#elif defined(_WIN32) && !defined(_XBOX) - #if defined(AL_BUILD_LIBRARY) - #define AL_API __declspec(dllexport) - #else - #define AL_API __declspec(dllimport) - #endif -#else - #if defined(AL_BUILD_LIBRARY) && defined(HAVE_GCC_VISIBILITY) - #define AL_API __attribute__((visibility("protected"))) - #else - #define AL_API extern - #endif -#endif - -#if defined(_WIN32) - #define AL_APIENTRY __cdecl -#else - #define AL_APIENTRY -#endif - -#if defined(TARGET_OS_MAC) && TARGET_OS_MAC - #pragma export on -#endif - -/* - * The OPENAL, ALAPI, ALAPIENTRY, AL_INVALID, AL_ILLEGAL_ENUM, and - * AL_ILLEGAL_COMMAND macros are deprecated, but are included for - * applications porting code from AL 1.0 - */ -#define OPENAL -#define ALAPI AL_API -#define ALAPIENTRY AL_APIENTRY -#define AL_INVALID (-1) -#define AL_ILLEGAL_ENUM AL_INVALID_ENUM -#define AL_ILLEGAL_COMMAND AL_INVALID_OPERATION - -#define AL_VERSION_1_0 -#define AL_VERSION_1_1 - - -/** 8-bit boolean */ -typedef char ALboolean; - -/** character */ -typedef char ALchar; - -/** signed 8-bit 2's complement integer */ -typedef signed char ALbyte; - -/** unsigned 8-bit integer */ -typedef unsigned char ALubyte; - -/** signed 16-bit 2's complement integer */ -typedef short ALshort; - -/** unsigned 16-bit integer */ -typedef unsigned short ALushort; - -/** signed 32-bit 2's complement integer */ -typedef int ALint; - -/** unsigned 32-bit integer */ -typedef unsigned int ALuint; - -/** non-negative 32-bit binary integer size */ -typedef int ALsizei; - -/** enumerated 32-bit value */ -typedef int ALenum; - -/** 32-bit IEEE754 floating-point */ -typedef float ALfloat; - -/** 64-bit IEEE754 floating-point */ -typedef double ALdouble; - -#ifdef OPENAL_FIXED_POINT -/* Apportable tries to define int64_t and int32_t if it thinks it is needed. - * But this is breaking in a complex project involving both pure C and C++ - * something is triggering redefinition errors. The workaround seems to be just using stdint.h. - */ -#include -/** Types and Macros for fixed-point math */ -#ifndef INT64_MAX -typedef long long int64_t; -#define INT64_MAX 9223372036854775807LL - -#endif -#ifndef INT32_MAX -typedef int int32_t; -#define INT32_MAX 2147483647 -#endif - -// FIXME(apportable) make this int32_t -typedef int64_t ALfp; -typedef int64_t ALdfp; - -#define ONE (1<=0 ? 0.5 : -0.5))) -#define ALfp2float(x) ((float)(x) / (1<=0 ? 0.5 : -0.5))) -#define ALdfp2double(x) ((double)(x) / (1<> OPENAL_FIXED_POINT_SHIFT)) - -#define int2ALdfp(x) ((ALdfp)(x) << OPENAL_FIXED_POINT_SHIFT) -#define ALdfp2int(x) ((ALint)((x) >> OPENAL_FIXED_POINT_SHIFT)) - -#define ALfpMult(x,y) ((ALfp)((((int64_t)(x))*((int64_t)(y)))>>OPENAL_FIXED_POINT_SHIFT)) -#define ALfpDiv(x,y) ((ALfp)(((int64_t)(x) << OPENAL_FIXED_POINT_SHIFT) / (y))) - -#define ALdfpMult(x,y) ALfpMult(x,y) -#define ALdfpDiv(x,y) ALfpDiv(x,y) - -#define __isnan(x) (0) -#define __cos(x) (float2ALfp(cos(ALfp2float(x)))) -#define __sin(x) (float2ALfp(sin(ALfp2float(x)))) -#define __log10(x) (float2ALfp(log10(ALfp2float(x)))) -#define __atan(x) (float2ALfp(atan(ALfp2float(x)))) - -#define toALfpConst(x) ((x)*(1< Hz - */ -#define ALC_FREQUENCY 0x1007 - -/** - * followed by Hz - */ -#define ALC_REFRESH 0x1008 - -/** - * followed by AL_TRUE, AL_FALSE - */ -#define ALC_SYNC 0x1009 - -/** - * followed by Num of requested Mono (3D) Sources - */ -#define ALC_MONO_SOURCES 0x1010 - -/** - * followed by Num of requested Stereo Sources - */ -#define ALC_STEREO_SOURCES 0x1011 - -/** - * errors - */ - -/** - * No error - */ -#define ALC_NO_ERROR ALC_FALSE - -/** - * No device - */ -#define ALC_INVALID_DEVICE 0xA001 - -/** - * invalid context ID - */ -#define ALC_INVALID_CONTEXT 0xA002 - -/** - * bad enum - */ -#define ALC_INVALID_ENUM 0xA003 - -/** - * bad value - */ -#define ALC_INVALID_VALUE 0xA004 - -/** - * Out of memory. - */ -#define ALC_OUT_OF_MEMORY 0xA005 - - -/** - * The Specifier string for default device - */ -#define ALC_DEFAULT_DEVICE_SPECIFIER 0x1004 -#define ALC_DEVICE_SPECIFIER 0x1005 -#define ALC_EXTENSIONS 0x1006 - -#define ALC_MAJOR_VERSION 0x1000 -#define ALC_MINOR_VERSION 0x1001 - -#define ALC_ATTRIBUTES_SIZE 0x1002 -#define ALC_ALL_ATTRIBUTES 0x1003 - - -/** - * Capture extension - */ -#define ALC_CAPTURE_DEVICE_SPECIFIER 0x310 -#define ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER 0x311 -#define ALC_CAPTURE_SAMPLES 0x312 - - -/* - * Context Management - */ -ALC_API ALCcontext * ALC_APIENTRY alcCreateContext( ALCdevice *device, const ALCint* attrlist ); - -ALC_API ALCboolean ALC_APIENTRY alcMakeContextCurrent( ALCcontext *context ); - -ALC_API void ALC_APIENTRY alcProcessContext( ALCcontext *context ); - -ALC_API void ALC_APIENTRY alcSuspendContext( ALCcontext *context ); - -ALC_API void ALC_APIENTRY alcDestroyContext( ALCcontext *context ); - -ALC_API ALCcontext * ALC_APIENTRY alcGetCurrentContext( void ); - -ALC_API ALCdevice* ALC_APIENTRY alcGetContextsDevice( ALCcontext *context ); - - -/* - * Device Management - */ -ALC_API ALCdevice * ALC_APIENTRY alcOpenDevice( const ALCchar *devicename ); - -ALC_API ALCboolean ALC_APIENTRY alcCloseDevice( ALCdevice *device ); - - -/* - * Error support. - * Obtain the most recent Context error - */ -ALC_API ALCenum ALC_APIENTRY alcGetError( ALCdevice *device ); - - -/* - * Extension support. - * Query for the presence of an extension, and obtain any appropriate - * function pointers and enum values. - */ -ALC_API ALCboolean ALC_APIENTRY alcIsExtensionPresent( ALCdevice *device, const ALCchar *extname ); - -ALC_API void * ALC_APIENTRY alcGetProcAddress( ALCdevice *device, const ALCchar *funcname ); - -ALC_API ALCenum ALC_APIENTRY alcGetEnumValue( ALCdevice *device, const ALCchar *enumname ); - - -/* - * Query functions - */ -ALC_API const ALCchar * ALC_APIENTRY alcGetString( ALCdevice *device, ALCenum param ); - -ALC_API void ALC_APIENTRY alcGetIntegerv( ALCdevice *device, ALCenum param, ALCsizei size, ALCint *data ); - - -/* - * Capture functions - */ -ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice( const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize ); - -ALC_API ALCboolean ALC_APIENTRY alcCaptureCloseDevice( ALCdevice *device ); - -ALC_API void ALC_APIENTRY alcCaptureStart( ALCdevice *device ); - -ALC_API void ALC_APIENTRY alcCaptureStop( ALCdevice *device ); - -ALC_API void ALC_APIENTRY alcCaptureSamples( ALCdevice *device, ALCvoid *buffer, ALCsizei samples ); - -/* - * Pointer-to-function types, useful for dynamically getting ALC entry points. - */ -typedef ALCcontext * (ALC_APIENTRY *LPALCCREATECONTEXT) (ALCdevice *device, const ALCint *attrlist); -typedef ALCboolean (ALC_APIENTRY *LPALCMAKECONTEXTCURRENT)( ALCcontext *context ); -typedef void (ALC_APIENTRY *LPALCPROCESSCONTEXT)( ALCcontext *context ); -typedef void (ALC_APIENTRY *LPALCSUSPENDCONTEXT)( ALCcontext *context ); -typedef void (ALC_APIENTRY *LPALCDESTROYCONTEXT)( ALCcontext *context ); -typedef ALCcontext * (ALC_APIENTRY *LPALCGETCURRENTCONTEXT)( void ); -typedef ALCdevice * (ALC_APIENTRY *LPALCGETCONTEXTSDEVICE)( ALCcontext *context ); -typedef ALCdevice * (ALC_APIENTRY *LPALCOPENDEVICE)( const ALCchar *devicename ); -typedef ALCboolean (ALC_APIENTRY *LPALCCLOSEDEVICE)( ALCdevice *device ); -typedef ALCenum (ALC_APIENTRY *LPALCGETERROR)( ALCdevice *device ); -typedef ALCboolean (ALC_APIENTRY *LPALCISEXTENSIONPRESENT)( ALCdevice *device, const ALCchar *extname ); -typedef void * (ALC_APIENTRY *LPALCGETPROCADDRESS)(ALCdevice *device, const ALCchar *funcname ); -typedef ALCenum (ALC_APIENTRY *LPALCGETENUMVALUE)(ALCdevice *device, const ALCchar *enumname ); -typedef const ALCchar* (ALC_APIENTRY *LPALCGETSTRING)( ALCdevice *device, ALCenum param ); -typedef void (ALC_APIENTRY *LPALCGETINTEGERV)( ALCdevice *device, ALCenum param, ALCsizei size, ALCint *dest ); -typedef ALCdevice * (ALC_APIENTRY *LPALCCAPTUREOPENDEVICE)( const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize ); -typedef ALCboolean (ALC_APIENTRY *LPALCCAPTURECLOSEDEVICE)( ALCdevice *device ); -typedef void (ALC_APIENTRY *LPALCCAPTURESTART)( ALCdevice *device ); -typedef void (ALC_APIENTRY *LPALCCAPTURESTOP)( ALCdevice *device ); -typedef void (ALC_APIENTRY *LPALCCAPTURESAMPLES)( ALCdevice *device, ALCvoid *buffer, ALCsizei samples ); - -#if defined(TARGET_OS_MAC) && TARGET_OS_MAC - #pragma export off -#endif - -#if defined(ANDROID) -/* - * OpenAL extension for suspend/resume of audio throughout application lifecycle - */ -ALC_API void ALC_APIENTRY alcSuspend( void ); -ALC_API void ALC_APIENTRY alcResume( void ); -#endif - -#if defined(__cplusplus) -} -#endif - -#endif /* AL_ALC_H */ diff --git a/src/android/jni/include/AL/alext.h b/src/android/jni/include/AL/alext.h deleted file mode 100644 index f3c7bcae8..000000000 --- a/src/android/jni/include/AL/alext.h +++ /dev/null @@ -1,165 +0,0 @@ -/** - * OpenAL cross platform audio library - * Copyright (C) 2008 by authors. - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * Or go to http://www.gnu.org/copyleft/lgpl.html - */ - -#ifndef AL_ALEXT_H -#define AL_ALEXT_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#ifndef AL_LOKI_IMA_ADPCM_format -#define AL_LOKI_IMA_ADPCM_format 1 -#define AL_FORMAT_IMA_ADPCM_MONO16_EXT 0x10000 -#define AL_FORMAT_IMA_ADPCM_STEREO16_EXT 0x10001 -#endif - -#ifndef AL_LOKI_WAVE_format -#define AL_LOKI_WAVE_format 1 -#define AL_FORMAT_WAVE_EXT 0x10002 -#endif - -#ifndef AL_EXT_vorbis -#define AL_EXT_vorbis 1 -#define AL_FORMAT_VORBIS_EXT 0x10003 -#endif - -#ifndef AL_LOKI_quadriphonic -#define AL_LOKI_quadriphonic 1 -#define AL_FORMAT_QUAD8_LOKI 0x10004 -#define AL_FORMAT_QUAD16_LOKI 0x10005 -#endif - -#ifndef AL_EXT_float32 -#define AL_EXT_float32 1 -#define AL_FORMAT_MONO_FLOAT32 0x10010 -#define AL_FORMAT_STEREO_FLOAT32 0x10011 -#endif - -#ifndef AL_EXT_double -#define AL_EXT_double 1 -#define AL_FORMAT_MONO_DOUBLE_EXT 0x10012 -#define AL_FORMAT_STEREO_DOUBLE_EXT 0x10013 -#endif - -#ifndef ALC_LOKI_audio_channel -#define ALC_LOKI_audio_channel 1 -#define ALC_CHAN_MAIN_LOKI 0x500001 -#define ALC_CHAN_PCM_LOKI 0x500002 -#define ALC_CHAN_CD_LOKI 0x500003 -#endif - -#ifndef ALC_ENUMERATE_ALL_EXT -#define ALC_ENUMERATE_ALL_EXT 1 -#define ALC_DEFAULT_ALL_DEVICES_SPECIFIER 0x1012 -#define ALC_ALL_DEVICES_SPECIFIER 0x1013 -#endif - -#ifndef AL_EXT_MCFORMATS -#define AL_EXT_MCFORMATS 1 -#define AL_FORMAT_QUAD8 0x1204 -#define AL_FORMAT_QUAD16 0x1205 -#define AL_FORMAT_QUAD32 0x1206 -#define AL_FORMAT_REAR8 0x1207 -#define AL_FORMAT_REAR16 0x1208 -#define AL_FORMAT_REAR32 0x1209 -#define AL_FORMAT_51CHN8 0x120A -#define AL_FORMAT_51CHN16 0x120B -#define AL_FORMAT_51CHN32 0x120C -#define AL_FORMAT_61CHN8 0x120D -#define AL_FORMAT_61CHN16 0x120E -#define AL_FORMAT_61CHN32 0x120F -#define AL_FORMAT_71CHN8 0x1210 -#define AL_FORMAT_71CHN16 0x1211 -#define AL_FORMAT_71CHN32 0x1212 -#endif - -#ifndef AL_EXT_MULAW_MCFORMATS -#define AL_EXT_MULAW_MCFORMATS 1 -#define AL_FORMAT_MONO_MULAW 0x10014 -#define AL_FORMAT_STEREO_MULAW 0x10015 -#define AL_FORMAT_QUAD_MULAW 0x10021 -#define AL_FORMAT_REAR_MULAW 0x10022 -#define AL_FORMAT_51CHN_MULAW 0x10023 -#define AL_FORMAT_61CHN_MULAW 0x10024 -#define AL_FORMAT_71CHN_MULAW 0x10025 -#endif - -#ifndef AL_EXT_IMA4 -#define AL_EXT_IMA4 1 -#define AL_FORMAT_MONO_IMA4 0x1300 -#define AL_FORMAT_STEREO_IMA4 0x1301 -#endif - -#ifndef AL_EXT_STATIC_BUFFER -#define AL_EXT_STATIC_BUFFER 1 -typedef ALvoid (AL_APIENTRY*PFNALBUFFERDATASTATICPROC)(const ALint,ALenum,ALvoid*,ALsizei,ALsizei); -#ifdef AL_ALEXT_PROTOTYPES -AL_API ALvoid AL_APIENTRY alBufferDataStatic(const ALint buffer, ALenum format, ALvoid *data, ALsizei len, ALsizei freq); -#endif -#endif - -#ifndef ALC_EXT_EFX -#define ALC_EXT_EFX 1 -#include "efx.h" -#endif - -#ifndef ALC_EXT_disconnect -#define ALC_EXT_disconnect 1 -#define ALC_CONNECTED 0x313 -#endif - -#ifndef ALC_EXT_thread_local_context -#define ALC_EXT_thread_local_context 1 -typedef ALCboolean (ALC_APIENTRY*PFNALCSETTHREADCONTEXTPROC)(ALCcontext *context); -typedef ALCcontext* (ALC_APIENTRY*PFNALCGETTHREADCONTEXTPROC)(void); -#ifdef AL_ALEXT_PROTOTYPES -ALC_API ALCboolean ALC_APIENTRY alcSetThreadContext(ALCcontext *context); -ALC_API ALCcontext* ALC_APIENTRY alcGetThreadContext(void); -#endif -#endif - -#ifndef AL_EXT_source_distance_model -#define AL_EXT_source_distance_model 1 -#define AL_SOURCE_DISTANCE_MODEL 0x200 -#endif - -#ifndef AL_SOFT_buffer_sub_data -#define AL_SOFT_buffer_sub_data 1 -#define AL_BYTE_RW_OFFSETS_SOFT 0x1031 -#define AL_SAMPLE_RW_OFFSETS_SOFT 0x1032 -typedef ALvoid (AL_APIENTRY*PFNALBUFFERSUBDATASOFTPROC)(ALuint,ALenum,const ALvoid*,ALsizei,ALsizei); -#ifdef AL_ALEXT_PROTOTYPES -AL_API ALvoid AL_APIENTRY alBufferSubDataSOFT(ALuint buffer,ALenum format,const ALvoid *data,ALsizei offset,ALsizei length); -#endif -#endif - -#ifndef AL_SOFT_loop_points -#define AL_SOFT_loop_points 1 -#define AL_LOOP_POINTS_SOFT 0x2015 -#endif - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/android/jni/include/AL/efx-creative.h b/src/android/jni/include/AL/efx-creative.h deleted file mode 100644 index 0a04c982e..000000000 --- a/src/android/jni/include/AL/efx-creative.h +++ /dev/null @@ -1,3 +0,0 @@ -/* The tokens that would be defined here are already defined in efx.h. This - * empty file is here to provide compatibility with Windows-based projects - * that would include it. */ diff --git a/src/android/jni/include/AL/efx.h b/src/android/jni/include/AL/efx.h deleted file mode 100644 index 0ccef95d6..000000000 --- a/src/android/jni/include/AL/efx.h +++ /dev/null @@ -1,758 +0,0 @@ -#ifndef AL_EFX_H -#define AL_EFX_H - - -#ifdef __cplusplus -extern "C" { -#endif - -#define ALC_EXT_EFX_NAME "ALC_EXT_EFX" - -#define ALC_EFX_MAJOR_VERSION 0x20001 -#define ALC_EFX_MINOR_VERSION 0x20002 -#define ALC_MAX_AUXILIARY_SENDS 0x20003 - - -/* Listener properties. */ -#define AL_METERS_PER_UNIT 0x20004 - -/* Source properties. */ -#define AL_DIRECT_FILTER 0x20005 -#define AL_AUXILIARY_SEND_FILTER 0x20006 -#define AL_AIR_ABSORPTION_FACTOR 0x20007 -#define AL_ROOM_ROLLOFF_FACTOR 0x20008 -#define AL_CONE_OUTER_GAINHF 0x20009 -#define AL_DIRECT_FILTER_GAINHF_AUTO 0x2000A -#define AL_AUXILIARY_SEND_FILTER_GAIN_AUTO 0x2000B -#define AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO 0x2000C - - -/* Effect properties. */ - -/* Reverb effect parameters */ -#define AL_REVERB_DENSITY 0x0001 -#define AL_REVERB_DIFFUSION 0x0002 -#define AL_REVERB_GAIN 0x0003 -#define AL_REVERB_GAINHF 0x0004 -#define AL_REVERB_DECAY_TIME 0x0005 -#define AL_REVERB_DECAY_HFRATIO 0x0006 -#define AL_REVERB_REFLECTIONS_GAIN 0x0007 -#define AL_REVERB_REFLECTIONS_DELAY 0x0008 -#define AL_REVERB_LATE_REVERB_GAIN 0x0009 -#define AL_REVERB_LATE_REVERB_DELAY 0x000A -#define AL_REVERB_AIR_ABSORPTION_GAINHF 0x000B -#define AL_REVERB_ROOM_ROLLOFF_FACTOR 0x000C -#define AL_REVERB_DECAY_HFLIMIT 0x000D - -/* EAX Reverb effect parameters */ -#define AL_EAXREVERB_DENSITY 0x0001 -#define AL_EAXREVERB_DIFFUSION 0x0002 -#define AL_EAXREVERB_GAIN 0x0003 -#define AL_EAXREVERB_GAINHF 0x0004 -#define AL_EAXREVERB_GAINLF 0x0005 -#define AL_EAXREVERB_DECAY_TIME 0x0006 -#define AL_EAXREVERB_DECAY_HFRATIO 0x0007 -#define AL_EAXREVERB_DECAY_LFRATIO 0x0008 -#define AL_EAXREVERB_REFLECTIONS_GAIN 0x0009 -#define AL_EAXREVERB_REFLECTIONS_DELAY 0x000A -#define AL_EAXREVERB_REFLECTIONS_PAN 0x000B -#define AL_EAXREVERB_LATE_REVERB_GAIN 0x000C -#define AL_EAXREVERB_LATE_REVERB_DELAY 0x000D -#define AL_EAXREVERB_LATE_REVERB_PAN 0x000E -#define AL_EAXREVERB_ECHO_TIME 0x000F -#define AL_EAXREVERB_ECHO_DEPTH 0x0010 -#define AL_EAXREVERB_MODULATION_TIME 0x0011 -#define AL_EAXREVERB_MODULATION_DEPTH 0x0012 -#define AL_EAXREVERB_AIR_ABSORPTION_GAINHF 0x0013 -#define AL_EAXREVERB_HFREFERENCE 0x0014 -#define AL_EAXREVERB_LFREFERENCE 0x0015 -#define AL_EAXREVERB_ROOM_ROLLOFF_FACTOR 0x0016 -#define AL_EAXREVERB_DECAY_HFLIMIT 0x0017 - -/* Chorus effect parameters */ -#define AL_CHORUS_WAVEFORM 0x0001 -#define AL_CHORUS_PHASE 0x0002 -#define AL_CHORUS_RATE 0x0003 -#define AL_CHORUS_DEPTH 0x0004 -#define AL_CHORUS_FEEDBACK 0x0005 -#define AL_CHORUS_DELAY 0x0006 - -/* Distortion effect parameters */ -#define AL_DISTORTION_EDGE 0x0001 -#define AL_DISTORTION_GAIN 0x0002 -#define AL_DISTORTION_LOWPASS_CUTOFF 0x0003 -#define AL_DISTORTION_EQCENTER 0x0004 -#define AL_DISTORTION_EQBANDWIDTH 0x0005 - -/* Echo effect parameters */ -#define AL_ECHO_DELAY 0x0001 -#define AL_ECHO_LRDELAY 0x0002 -#define AL_ECHO_DAMPING 0x0003 -#define AL_ECHO_FEEDBACK 0x0004 -#define AL_ECHO_SPREAD 0x0005 - -/* Flanger effect parameters */ -#define AL_FLANGER_WAVEFORM 0x0001 -#define AL_FLANGER_PHASE 0x0002 -#define AL_FLANGER_RATE 0x0003 -#define AL_FLANGER_DEPTH 0x0004 -#define AL_FLANGER_FEEDBACK 0x0005 -#define AL_FLANGER_DELAY 0x0006 - -/* Frequency shifter effect parameters */ -#define AL_FREQUENCY_SHIFTER_FREQUENCY 0x0001 -#define AL_FREQUENCY_SHIFTER_LEFT_DIRECTION 0x0002 -#define AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION 0x0003 - -/* Vocal morpher effect parameters */ -#define AL_VOCAL_MORPHER_PHONEMEA 0x0001 -#define AL_VOCAL_MORPHER_PHONEMEA_COARSE_TUNING 0x0002 -#define AL_VOCAL_MORPHER_PHONEMEB 0x0003 -#define AL_VOCAL_MORPHER_PHONEMEB_COARSE_TUNING 0x0004 -#define AL_VOCAL_MORPHER_WAVEFORM 0x0005 -#define AL_VOCAL_MORPHER_RATE 0x0006 - -/* Pitchshifter effect parameters */ -#define AL_PITCH_SHIFTER_COARSE_TUNE 0x0001 -#define AL_PITCH_SHIFTER_FINE_TUNE 0x0002 - -/* Ringmodulator effect parameters */ -#define AL_RING_MODULATOR_FREQUENCY 0x0001 -#define AL_RING_MODULATOR_HIGHPASS_CUTOFF 0x0002 -#define AL_RING_MODULATOR_WAVEFORM 0x0003 - -/* Autowah effect parameters */ -#define AL_AUTOWAH_ATTACK_TIME 0x0001 -#define AL_AUTOWAH_RELEASE_TIME 0x0002 -#define AL_AUTOWAH_RESONANCE 0x0003 -#define AL_AUTOWAH_PEAK_GAIN 0x0004 - -/* Compressor effect parameters */ -#define AL_COMPRESSOR_ONOFF 0x0001 - -/* Equalizer effect parameters */ -#define AL_EQUALIZER_LOW_GAIN 0x0001 -#define AL_EQUALIZER_LOW_CUTOFF 0x0002 -#define AL_EQUALIZER_MID1_GAIN 0x0003 -#define AL_EQUALIZER_MID1_CENTER 0x0004 -#define AL_EQUALIZER_MID1_WIDTH 0x0005 -#define AL_EQUALIZER_MID2_GAIN 0x0006 -#define AL_EQUALIZER_MID2_CENTER 0x0007 -#define AL_EQUALIZER_MID2_WIDTH 0x0008 -#define AL_EQUALIZER_HIGH_GAIN 0x0009 -#define AL_EQUALIZER_HIGH_CUTOFF 0x000A - -/* Effect type */ -#define AL_EFFECT_FIRST_PARAMETER 0x0000 -#define AL_EFFECT_LAST_PARAMETER 0x8000 -#define AL_EFFECT_TYPE 0x8001 - -/* Effect types, used with the AL_EFFECT_TYPE property */ -#define AL_EFFECT_NULL 0x0000 -#define AL_EFFECT_REVERB 0x0001 -#define AL_EFFECT_CHORUS 0x0002 -#define AL_EFFECT_DISTORTION 0x0003 -#define AL_EFFECT_ECHO 0x0004 -#define AL_EFFECT_FLANGER 0x0005 -#define AL_EFFECT_FREQUENCY_SHIFTER 0x0006 -#define AL_EFFECT_VOCAL_MORPHER 0x0007 -#define AL_EFFECT_PITCH_SHIFTER 0x0008 -#define AL_EFFECT_RING_MODULATOR 0x0009 -#define AL_EFFECT_AUTOWAH 0x000A -#define AL_EFFECT_COMPRESSOR 0x000B -#define AL_EFFECT_EQUALIZER 0x000C -#define AL_EFFECT_EAXREVERB 0x8000 - -/* Auxiliary Effect Slot properties. */ -#define AL_EFFECTSLOT_EFFECT 0x0001 -#define AL_EFFECTSLOT_GAIN 0x0002 -#define AL_EFFECTSLOT_AUXILIARY_SEND_AUTO 0x0003 - -/* NULL Auxiliary Slot ID to disable a source send. */ -#define AL_EFFECTSLOT_NULL 0x0000 - - -/* Filter properties. */ - -/* Lowpass filter parameters */ -#define AL_LOWPASS_GAIN 0x0001 -#define AL_LOWPASS_GAINHF 0x0002 - -/* Highpass filter parameters */ -#define AL_HIGHPASS_GAIN 0x0001 -#define AL_HIGHPASS_GAINLF 0x0002 - -/* Bandpass filter parameters */ -#define AL_BANDPASS_GAIN 0x0001 -#define AL_BANDPASS_GAINLF 0x0002 -#define AL_BANDPASS_GAINHF 0x0003 - -/* Filter type */ -#define AL_FILTER_FIRST_PARAMETER 0x0000 -#define AL_FILTER_LAST_PARAMETER 0x8000 -#define AL_FILTER_TYPE 0x8001 - -/* Filter types, used with the AL_FILTER_TYPE property */ -#define AL_FILTER_NULL 0x0000 -#define AL_FILTER_LOWPASS 0x0001 -#define AL_FILTER_HIGHPASS 0x0002 -#define AL_FILTER_BANDPASS 0x0003 - - -/* Effect object function types. */ -typedef void (AL_APIENTRY *LPALGENEFFECTS)(ALsizei, ALuint*); -typedef void (AL_APIENTRY *LPALDELETEEFFECTS)(ALsizei, ALuint*); -typedef ALboolean (AL_APIENTRY *LPALISEFFECT)(ALuint); -typedef void (AL_APIENTRY *LPALEFFECTI)(ALuint, ALenum, ALint); -typedef void (AL_APIENTRY *LPALEFFECTIV)(ALuint, ALenum, ALint*); -typedef void (AL_APIENTRY *LPALEFFECTF)(ALuint, ALenum, ALfloat); -typedef void (AL_APIENTRY *LPALEFFECTFV)(ALuint, ALenum, ALfloat*); -typedef void (AL_APIENTRY *LPALGETEFFECTI)(ALuint, ALenum, ALint*); -typedef void (AL_APIENTRY *LPALGETEFFECTIV)(ALuint, ALenum, ALint*); -typedef void (AL_APIENTRY *LPALGETEFFECTF)(ALuint, ALenum, ALfloat*); -typedef void (AL_APIENTRY *LPALGETEFFECTFV)(ALuint, ALenum, ALfloat*); - -/* Filter object function types. */ -typedef void (AL_APIENTRY *LPALGENFILTERS)(ALsizei, ALuint*); -typedef void (AL_APIENTRY *LPALDELETEFILTERS)(ALsizei, ALuint*); -typedef ALboolean (AL_APIENTRY *LPALISFILTER)(ALuint); -typedef void (AL_APIENTRY *LPALFILTERI)(ALuint, ALenum, ALint); -typedef void (AL_APIENTRY *LPALFILTERIV)(ALuint, ALenum, ALint*); -typedef void (AL_APIENTRY *LPALFILTERF)(ALuint, ALenum, ALfloat); -typedef void (AL_APIENTRY *LPALFILTERFV)(ALuint, ALenum, ALfloat*); -typedef void (AL_APIENTRY *LPALGETFILTERI)(ALuint, ALenum, ALint*); -typedef void (AL_APIENTRY *LPALGETFILTERIV)(ALuint, ALenum, ALint*); -typedef void (AL_APIENTRY *LPALGETFILTERF)(ALuint, ALenum, ALfloat*); -typedef void (AL_APIENTRY *LPALGETFILTERFV)(ALuint, ALenum, ALfloat*); - -/* Auxiliary Effect Slot object function types. */ -typedef void (AL_APIENTRY *LPALGENAUXILIARYEFFECTSLOTS)(ALsizei, ALuint*); -typedef void (AL_APIENTRY *LPALDELETEAUXILIARYEFFECTSLOTS)(ALsizei, ALuint*); -typedef ALboolean (AL_APIENTRY *LPALISAUXILIARYEFFECTSLOT)(ALuint); -typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTI)(ALuint, ALenum, ALint); -typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTIV)(ALuint, ALenum, ALint*); -typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTF)(ALuint, ALenum, ALfloat); -typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTFV)(ALuint, ALenum, ALfloat*); -typedef void (AL_APIENTRY *LPALGETAUXILIARYEFFECTSLOTI)(ALuint, ALenum, ALint*); -typedef void (AL_APIENTRY *LPALGETAUXILIARYEFFECTSLOTIV)(ALuint, ALenum, ALint*); -typedef void (AL_APIENTRY *LPALGETAUXILIARYEFFECTSLOTF)(ALuint, ALenum, ALfloat*); -typedef void (AL_APIENTRY *LPALGETAUXILIARYEFFECTSLOTFV)(ALuint, ALenum, ALfloat*); - -#ifdef AL_ALEXT_PROTOTYPES -AL_API ALvoid AL_APIENTRY alGenEffects(ALsizei n, ALuint *effects); -AL_API ALvoid AL_APIENTRY alDeleteEffects(ALsizei n, ALuint *effects); -AL_API ALboolean AL_APIENTRY alIsEffect(ALuint effect); -AL_API ALvoid AL_APIENTRY alEffecti(ALuint effect, ALenum param, ALint iValue); -AL_API ALvoid AL_APIENTRY alEffectiv(ALuint effect, ALenum param, ALint *piValues); -AL_API ALvoid AL_APIENTRY alEffectf(ALuint effect, ALenum param, ALfloat flValue); -AL_API ALvoid AL_APIENTRY alEffectfv(ALuint effect, ALenum param, ALfloat *pflValues); -AL_API ALvoid AL_APIENTRY alGetEffecti(ALuint effect, ALenum param, ALint *piValue); -AL_API ALvoid AL_APIENTRY alGetEffectiv(ALuint effect, ALenum param, ALint *piValues); -AL_API ALvoid AL_APIENTRY alGetEffectf(ALuint effect, ALenum param, ALfloat *pflValue); -AL_API ALvoid AL_APIENTRY alGetEffectfv(ALuint effect, ALenum param, ALfloat *pflValues); - -AL_API ALvoid AL_APIENTRY alGenFilters(ALsizei n, ALuint *filters); -AL_API ALvoid AL_APIENTRY alDeleteFilters(ALsizei n, ALuint *filters); -AL_API ALboolean AL_APIENTRY alIsFilter(ALuint filter); -AL_API ALvoid AL_APIENTRY alFilteri(ALuint filter, ALenum param, ALint iValue); -AL_API ALvoid AL_APIENTRY alFilteriv(ALuint filter, ALenum param, ALint *piValues); -AL_API ALvoid AL_APIENTRY alFilterf(ALuint filter, ALenum param, ALfloat flValue); -AL_API ALvoid AL_APIENTRY alFilterfv(ALuint filter, ALenum param, ALfloat *pflValues); -AL_API ALvoid AL_APIENTRY alGetFilteri(ALuint filter, ALenum param, ALint *piValue); -AL_API ALvoid AL_APIENTRY alGetFilteriv(ALuint filter, ALenum param, ALint *piValues); -AL_API ALvoid AL_APIENTRY alGetFilterf(ALuint filter, ALenum param, ALfloat *pflValue); -AL_API ALvoid AL_APIENTRY alGetFilterfv(ALuint filter, ALenum param, ALfloat *pflValues); - -AL_API ALvoid AL_APIENTRY alGenAuxiliaryEffectSlots(ALsizei n, ALuint *effectslots); -AL_API ALvoid AL_APIENTRY alDeleteAuxiliaryEffectSlots(ALsizei n, ALuint *effectslots); -AL_API ALboolean AL_APIENTRY alIsAuxiliaryEffectSlot(ALuint effectslot); -AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSloti(ALuint effectslot, ALenum param, ALint iValue); -AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotiv(ALuint effectslot, ALenum param, ALint *piValues); -AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotf(ALuint effectslot, ALenum param, ALfloat flValue); -AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotfv(ALuint effectslot, ALenum param, ALfloat *pflValues); -AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSloti(ALuint effectslot, ALenum param, ALint *piValue); -AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotiv(ALuint effectslot, ALenum param, ALint *piValues); -AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotf(ALuint effectslot, ALenum param, ALfloat *pflValue); -AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotfv(ALuint effectslot, ALenum param, ALfloat *pflValues); -#endif - -/* Filter ranges and defaults. */ - -/* Lowpass filter */ -#define LOWPASS_MIN_GAIN (0.0f) -#define LOWPASS_MAX_GAIN (1.0f) -#define LOWPASS_DEFAULT_GAIN (1.0f) - -#define LOWPASS_MIN_GAINHF (0.0f) -#define LOWPASS_MAX_GAINHF (1.0f) -#define LOWPASS_DEFAULT_GAINHF (1.0f) - -/* Highpass filter */ -#define HIGHPASS_MIN_GAIN (0.0f) -#define HIGHPASS_MAX_GAIN (1.0f) -#define HIGHPASS_DEFAULT_GAIN (1.0f) - -#define HIGHPASS_MIN_GAINLF (0.0f) -#define HIGHPASS_MAX_GAINLF (1.0f) -#define HIGHPASS_DEFAULT_GAINLF (1.0f) - -/* Bandpass filter */ -#define BANDPASS_MIN_GAIN (0.0f) -#define BANDPASS_MAX_GAIN (1.0f) -#define BANDPASS_DEFAULT_GAIN (1.0f) - -#define BANDPASS_MIN_GAINHF (0.0f) -#define BANDPASS_MAX_GAINHF (1.0f) -#define BANDPASS_DEFAULT_GAINHF (1.0f) - -#define BANDPASS_MIN_GAINLF (0.0f) -#define BANDPASS_MAX_GAINLF (1.0f) -#define BANDPASS_DEFAULT_GAINLF (1.0f) - - -/* Effect parameter ranges and defaults. */ - -/* Standard reverb effect */ -#define AL_REVERB_MIN_DENSITY (0.0f) -#define AL_REVERB_MAX_DENSITY (1.0f) -#define AL_REVERB_DEFAULT_DENSITY (1.0f) - -#define AL_REVERB_MIN_DIFFUSION (0.0f) -#define AL_REVERB_MAX_DIFFUSION (1.0f) -#define AL_REVERB_DEFAULT_DIFFUSION (1.0f) - -#define AL_REVERB_MIN_GAIN (0.0f) -#define AL_REVERB_MAX_GAIN (1.0f) -#define AL_REVERB_DEFAULT_GAIN (0.32f) - -#define AL_REVERB_MIN_GAINHF (0.0f) -#define AL_REVERB_MAX_GAINHF (1.0f) -#define AL_REVERB_DEFAULT_GAINHF (0.89f) - -#define AL_REVERB_MIN_DECAY_TIME (0.1f) -#define AL_REVERB_MAX_DECAY_TIME (20.0f) -#define AL_REVERB_DEFAULT_DECAY_TIME (1.49f) - -#define AL_REVERB_MIN_DECAY_HFRATIO (0.1f) -#define AL_REVERB_MAX_DECAY_HFRATIO (2.0f) -#define AL_REVERB_DEFAULT_DECAY_HFRATIO (0.83f) - -#define AL_REVERB_MIN_REFLECTIONS_GAIN (0.0f) -#define AL_REVERB_MAX_REFLECTIONS_GAIN (3.16f) -#define AL_REVERB_DEFAULT_REFLECTIONS_GAIN (0.05f) - -#define AL_REVERB_MIN_REFLECTIONS_DELAY (0.0f) -#define AL_REVERB_MAX_REFLECTIONS_DELAY (0.3f) -#define AL_REVERB_DEFAULT_REFLECTIONS_DELAY (0.007f) - -#define AL_REVERB_MIN_LATE_REVERB_GAIN (0.0f) -#define AL_REVERB_MAX_LATE_REVERB_GAIN (10.0f) -#define AL_REVERB_DEFAULT_LATE_REVERB_GAIN (1.26f) - -#define AL_REVERB_MIN_LATE_REVERB_DELAY (0.0f) -#define AL_REVERB_MAX_LATE_REVERB_DELAY (0.1f) -#define AL_REVERB_DEFAULT_LATE_REVERB_DELAY (0.011f) - -#define AL_REVERB_MIN_AIR_ABSORPTION_GAINHF (0.892f) -#define AL_REVERB_MAX_AIR_ABSORPTION_GAINHF (1.0f) -#define AL_REVERB_DEFAULT_AIR_ABSORPTION_GAINHF (0.994f) - -#define AL_REVERB_MIN_ROOM_ROLLOFF_FACTOR (0.0f) -#define AL_REVERB_MAX_ROOM_ROLLOFF_FACTOR (10.0f) -#define AL_REVERB_DEFAULT_ROOM_ROLLOFF_FACTOR (0.0f) - -#define AL_REVERB_MIN_DECAY_HFLIMIT AL_FALSE -#define AL_REVERB_MAX_DECAY_HFLIMIT AL_TRUE -#define AL_REVERB_DEFAULT_DECAY_HFLIMIT AL_TRUE - -/* EAX reverb effect */ -#define AL_EAXREVERB_MIN_DENSITY (0.0f) -#define AL_EAXREVERB_MAX_DENSITY (1.0f) -#define AL_EAXREVERB_DEFAULT_DENSITY (1.0f) - -#define AL_EAXREVERB_MIN_DIFFUSION (0.0f) -#define AL_EAXREVERB_MAX_DIFFUSION (1.0f) -#define AL_EAXREVERB_DEFAULT_DIFFUSION (1.0f) - -#define AL_EAXREVERB_MIN_GAIN (0.0f) -#define AL_EAXREVERB_MAX_GAIN (1.0f) -#define AL_EAXREVERB_DEFAULT_GAIN (0.32f) - -#define AL_EAXREVERB_MIN_GAINHF (0.0f) -#define AL_EAXREVERB_MAX_GAINHF (1.0f) -#define AL_EAXREVERB_DEFAULT_GAINHF (0.89f) - -#define AL_EAXREVERB_MIN_GAINLF (0.0f) -#define AL_EAXREVERB_MAX_GAINLF (1.0f) -#define AL_EAXREVERB_DEFAULT_GAINLF (1.0f) - -#define AL_EAXREVERB_MIN_DECAY_TIME (0.1f) -#define AL_EAXREVERB_MAX_DECAY_TIME (20.0f) -#define AL_EAXREVERB_DEFAULT_DECAY_TIME (1.49f) - -#define AL_EAXREVERB_MIN_DECAY_HFRATIO (0.1f) -#define AL_EAXREVERB_MAX_DECAY_HFRATIO (2.0f) -#define AL_EAXREVERB_DEFAULT_DECAY_HFRATIO (0.83f) - -#define AL_EAXREVERB_MIN_DECAY_LFRATIO (0.1f) -#define AL_EAXREVERB_MAX_DECAY_LFRATIO (2.0f) -#define AL_EAXREVERB_DEFAULT_DECAY_LFRATIO (1.0f) - -#define AL_EAXREVERB_MIN_REFLECTIONS_GAIN (0.0f) -#define AL_EAXREVERB_MAX_REFLECTIONS_GAIN (3.16f) -#define AL_EAXREVERB_DEFAULT_REFLECTIONS_GAIN (0.05f) - -#define AL_EAXREVERB_MIN_REFLECTIONS_DELAY (0.0f) -#define AL_EAXREVERB_MAX_REFLECTIONS_DELAY (0.3f) -#define AL_EAXREVERB_DEFAULT_REFLECTIONS_DELAY (0.007f) - -#define AL_EAXREVERB_DEFAULT_REFLECTIONS_PAN_XYZ (0.0f) - -#define AL_EAXREVERB_MIN_LATE_REVERB_GAIN (0.0f) -#define AL_EAXREVERB_MAX_LATE_REVERB_GAIN (10.0f) -#define AL_EAXREVERB_DEFAULT_LATE_REVERB_GAIN (1.26f) - -#define AL_EAXREVERB_MIN_LATE_REVERB_DELAY (0.0f) -#define AL_EAXREVERB_MAX_LATE_REVERB_DELAY (0.1f) -#define AL_EAXREVERB_DEFAULT_LATE_REVERB_DELAY (0.011f) - -#define AL_EAXREVERB_DEFAULT_LATE_REVERB_PAN_XYZ (0.0f) - -#define AL_EAXREVERB_MIN_ECHO_TIME (0.075f) -#define AL_EAXREVERB_MAX_ECHO_TIME (0.25f) -#define AL_EAXREVERB_DEFAULT_ECHO_TIME (0.25f) - -#define AL_EAXREVERB_MIN_ECHO_DEPTH (0.0f) -#define AL_EAXREVERB_MAX_ECHO_DEPTH (1.0f) -#define AL_EAXREVERB_DEFAULT_ECHO_DEPTH (0.0f) - -#define AL_EAXREVERB_MIN_MODULATION_TIME (0.04f) -#define AL_EAXREVERB_MAX_MODULATION_TIME (4.0f) -#define AL_EAXREVERB_DEFAULT_MODULATION_TIME (0.25f) - -#define AL_EAXREVERB_MIN_MODULATION_DEPTH (0.0f) -#define AL_EAXREVERB_MAX_MODULATION_DEPTH (1.0f) -#define AL_EAXREVERB_DEFAULT_MODULATION_DEPTH (0.0f) - -#define AL_EAXREVERB_MIN_AIR_ABSORPTION_GAINHF (0.892f) -#define AL_EAXREVERB_MAX_AIR_ABSORPTION_GAINHF (1.0f) -#define AL_EAXREVERB_DEFAULT_AIR_ABSORPTION_GAINHF (0.994f) - -#define AL_EAXREVERB_MIN_HFREFERENCE (1000.0f) -#define AL_EAXREVERB_MAX_HFREFERENCE (20000.0f) -#define AL_EAXREVERB_DEFAULT_HFREFERENCE (5000.0f) - -#define AL_EAXREVERB_MIN_LFREFERENCE (20.0f) -#define AL_EAXREVERB_MAX_LFREFERENCE (1000.0f) -#define AL_EAXREVERB_DEFAULT_LFREFERENCE (250.0f) - -#define AL_EAXREVERB_MIN_ROOM_ROLLOFF_FACTOR (0.0f) -#define AL_EAXREVERB_MAX_ROOM_ROLLOFF_FACTOR (10.0f) -#define AL_EAXREVERB_DEFAULT_ROOM_ROLLOFF_FACTOR (0.0f) - -#define AL_EAXREVERB_MIN_DECAY_HFLIMIT AL_FALSE -#define AL_EAXREVERB_MAX_DECAY_HFLIMIT AL_TRUE -#define AL_EAXREVERB_DEFAULT_DECAY_HFLIMIT AL_TRUE - -/* Chorus effect */ -#define AL_CHORUS_WAVEFORM_SINUSOID (0) -#define AL_CHORUS_WAVEFORM_TRIANGLE (1) - -#define AL_CHORUS_MIN_WAVEFORM (0) -#define AL_CHORUS_MAX_WAVEFORM (1) -#define AL_CHORUS_DEFAULT_WAVEFORM (1) - -#define AL_CHORUS_MIN_PHASE (-180) -#define AL_CHORUS_MAX_PHASE (180) -#define AL_CHORUS_DEFAULT_PHASE (90) - -#define AL_CHORUS_MIN_RATE (0.0f) -#define AL_CHORUS_MAX_RATE (10.0f) -#define AL_CHORUS_DEFAULT_RATE (1.1f) - -#define AL_CHORUS_MIN_DEPTH (0.0f) -#define AL_CHORUS_MAX_DEPTH (1.0f) -#define AL_CHORUS_DEFAULT_DEPTH (0.1f) - -#define AL_CHORUS_MIN_FEEDBACK (-1.0f) -#define AL_CHORUS_MAX_FEEDBACK (1.0f) -#define AL_CHORUS_DEFAULT_FEEDBACK (0.25f) - -#define AL_CHORUS_MIN_DELAY (0.0f) -#define AL_CHORUS_MAX_DELAY (0.016f) -#define AL_CHORUS_DEFAULT_DELAY (0.016f) - -/* Distortion effect */ -#define AL_DISTORTION_MIN_EDGE (0.0f) -#define AL_DISTORTION_MAX_EDGE (1.0f) -#define AL_DISTORTION_DEFAULT_EDGE (0.2f) - -#define AL_DISTORTION_MIN_GAIN (0.01f) -#define AL_DISTORTION_MAX_GAIN (1.0f) -#define AL_DISTORTION_DEFAULT_GAIN (0.05f) - -#define AL_DISTORTION_MIN_LOWPASS_CUTOFF (80.0f) -#define AL_DISTORTION_MAX_LOWPASS_CUTOFF (24000.0f) -#define AL_DISTORTION_DEFAULT_LOWPASS_CUTOFF (8000.0f) - -#define AL_DISTORTION_MIN_EQCENTER (80.0f) -#define AL_DISTORTION_MAX_EQCENTER (24000.0f) -#define AL_DISTORTION_DEFAULT_EQCENTER (3600.0f) - -#define AL_DISTORTION_MIN_EQBANDWIDTH (80.0f) -#define AL_DISTORTION_MAX_EQBANDWIDTH (24000.0f) -#define AL_DISTORTION_DEFAULT_EQBANDWIDTH (3600.0f) - -/* Echo effect */ -#define AL_ECHO_MIN_DELAY (0.0f) -#define AL_ECHO_MAX_DELAY (0.207f) -#define AL_ECHO_DEFAULT_DELAY (0.1f) - -#define AL_ECHO_MIN_LRDELAY (0.0f) -#define AL_ECHO_MAX_LRDELAY (0.404f) -#define AL_ECHO_DEFAULT_LRDELAY (0.1f) - -#define AL_ECHO_MIN_DAMPING (0.0f) -#define AL_ECHO_MAX_DAMPING (0.99f) -#define AL_ECHO_DEFAULT_DAMPING (0.5f) - -#define AL_ECHO_MIN_FEEDBACK (0.0f) -#define AL_ECHO_MAX_FEEDBACK (1.0f) -#define AL_ECHO_DEFAULT_FEEDBACK (0.5f) - -#define AL_ECHO_MIN_SPREAD (-1.0f) -#define AL_ECHO_MAX_SPREAD (1.0f) -#define AL_ECHO_DEFAULT_SPREAD (-1.0f) - -/* Flanger effect */ -#define AL_FLANGER_WAVEFORM_SINUSOID (0) -#define AL_FLANGER_WAVEFORM_TRIANGLE (1) - -#define AL_FLANGER_MIN_WAVEFORM (0) -#define AL_FLANGER_MAX_WAVEFORM (1) -#define AL_FLANGER_DEFAULT_WAVEFORM (1) - -#define AL_FLANGER_MIN_PHASE (-180) -#define AL_FLANGER_MAX_PHASE (180) -#define AL_FLANGER_DEFAULT_PHASE (0) - -#define AL_FLANGER_MIN_RATE (0.0f) -#define AL_FLANGER_MAX_RATE (10.0f) -#define AL_FLANGER_DEFAULT_RATE (0.27f) - -#define AL_FLANGER_MIN_DEPTH (0.0f) -#define AL_FLANGER_MAX_DEPTH (1.0f) -#define AL_FLANGER_DEFAULT_DEPTH (1.0f) - -#define AL_FLANGER_MIN_FEEDBACK (-1.0f) -#define AL_FLANGER_MAX_FEEDBACK (1.0f) -#define AL_FLANGER_DEFAULT_FEEDBACK (-0.5f) - -#define AL_FLANGER_MIN_DELAY (0.0f) -#define AL_FLANGER_MAX_DELAY (0.004f) -#define AL_FLANGER_DEFAULT_DELAY (0.002f) - -/* Frequency shifter effect */ -#define AL_FREQUENCY_SHIFTER_MIN_FREQUENCY (0.0f) -#define AL_FREQUENCY_SHIFTER_MAX_FREQUENCY (24000.0f) -#define AL_FREQUENCY_SHIFTER_DEFAULT_FREQUENCY (0.0f) - -#define AL_FREQUENCY_SHIFTER_MIN_LEFT_DIRECTION (0) -#define AL_FREQUENCY_SHIFTER_MAX_LEFT_DIRECTION (2) -#define AL_FREQUENCY_SHIFTER_DEFAULT_LEFT_DIRECTION (0) - -#define AL_FREQUENCY_SHIFTER_DIRECTION_DOWN (0) -#define AL_FREQUENCY_SHIFTER_DIRECTION_UP (1) -#define AL_FREQUENCY_SHIFTER_DIRECTION_OFF (2) - -#define AL_FREQUENCY_SHIFTER_MIN_RIGHT_DIRECTION (0) -#define AL_FREQUENCY_SHIFTER_MAX_RIGHT_DIRECTION (2) -#define AL_FREQUENCY_SHIFTER_DEFAULT_RIGHT_DIRECTION (0) - -/* Vocal morpher effect */ -#define AL_VOCAL_MORPHER_MIN_PHONEMEA (0) -#define AL_VOCAL_MORPHER_MAX_PHONEMEA (29) -#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEA (0) - -#define AL_VOCAL_MORPHER_MIN_PHONEMEA_COARSE_TUNING (-24) -#define AL_VOCAL_MORPHER_MAX_PHONEMEA_COARSE_TUNING (24) -#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEA_COARSE_TUNING (0) - -#define AL_VOCAL_MORPHER_MIN_PHONEMEB (0) -#define AL_VOCAL_MORPHER_MAX_PHONEMEB (29) -#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEB (10) - -#define AL_VOCAL_MORPHER_MIN_PHONEMEB_COARSE_TUNING (-24) -#define AL_VOCAL_MORPHER_MAX_PHONEMEB_COARSE_TUNING (24) -#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEB_COARSE_TUNING (0) - -#define AL_VOCAL_MORPHER_PHONEME_A (0) -#define AL_VOCAL_MORPHER_PHONEME_E (1) -#define AL_VOCAL_MORPHER_PHONEME_I (2) -#define AL_VOCAL_MORPHER_PHONEME_O (3) -#define AL_VOCAL_MORPHER_PHONEME_U (4) -#define AL_VOCAL_MORPHER_PHONEME_AA (5) -#define AL_VOCAL_MORPHER_PHONEME_AE (6) -#define AL_VOCAL_MORPHER_PHONEME_AH (7) -#define AL_VOCAL_MORPHER_PHONEME_AO (8) -#define AL_VOCAL_MORPHER_PHONEME_EH (9) -#define AL_VOCAL_MORPHER_PHONEME_ER (10) -#define AL_VOCAL_MORPHER_PHONEME_IH (11) -#define AL_VOCAL_MORPHER_PHONEME_IY (12) -#define AL_VOCAL_MORPHER_PHONEME_UH (13) -#define AL_VOCAL_MORPHER_PHONEME_UW (14) -#define AL_VOCAL_MORPHER_PHONEME_B (15) -#define AL_VOCAL_MORPHER_PHONEME_D (16) -#define AL_VOCAL_MORPHER_PHONEME_F (17) -#define AL_VOCAL_MORPHER_PHONEME_G (18) -#define AL_VOCAL_MORPHER_PHONEME_J (19) -#define AL_VOCAL_MORPHER_PHONEME_K (20) -#define AL_VOCAL_MORPHER_PHONEME_L (21) -#define AL_VOCAL_MORPHER_PHONEME_M (22) -#define AL_VOCAL_MORPHER_PHONEME_N (23) -#define AL_VOCAL_MORPHER_PHONEME_P (24) -#define AL_VOCAL_MORPHER_PHONEME_R (25) -#define AL_VOCAL_MORPHER_PHONEME_S (26) -#define AL_VOCAL_MORPHER_PHONEME_T (27) -#define AL_VOCAL_MORPHER_PHONEME_V (28) -#define AL_VOCAL_MORPHER_PHONEME_Z (29) - -#define AL_VOCAL_MORPHER_WAVEFORM_SINUSOID (0) -#define AL_VOCAL_MORPHER_WAVEFORM_TRIANGLE (1) -#define AL_VOCAL_MORPHER_WAVEFORM_SAWTOOTH (2) - -#define AL_VOCAL_MORPHER_MIN_WAVEFORM (0) -#define AL_VOCAL_MORPHER_MAX_WAVEFORM (2) -#define AL_VOCAL_MORPHER_DEFAULT_WAVEFORM (0) - -#define AL_VOCAL_MORPHER_MIN_RATE (0.0f) -#define AL_VOCAL_MORPHER_MAX_RATE (10.0f) -#define AL_VOCAL_MORPHER_DEFAULT_RATE (1.41f) - -/* Pitch shifter effect */ -#define AL_PITCH_SHIFTER_MIN_COARSE_TUNE (-12) -#define AL_PITCH_SHIFTER_MAX_COARSE_TUNE (12) -#define AL_PITCH_SHIFTER_DEFAULT_COARSE_TUNE (12) - -#define AL_PITCH_SHIFTER_MIN_FINE_TUNE (-50) -#define AL_PITCH_SHIFTER_MAX_FINE_TUNE (50) -#define AL_PITCH_SHIFTER_DEFAULT_FINE_TUNE (0) - -/* Ring modulator effect */ -#define AL_RING_MODULATOR_MIN_FREQUENCY (0.0f) -#define AL_RING_MODULATOR_MAX_FREQUENCY (8000.0f) -#define AL_RING_MODULATOR_DEFAULT_FREQUENCY (440.0f) - -#define AL_RING_MODULATOR_MIN_HIGHPASS_CUTOFF (0.0f) -#define AL_RING_MODULATOR_MAX_HIGHPASS_CUTOFF (24000.0f) -#define AL_RING_MODULATOR_DEFAULT_HIGHPASS_CUTOFF (800.0f) - -#define AL_RING_MODULATOR_SINUSOID (0) -#define AL_RING_MODULATOR_SAWTOOTH (1) -#define AL_RING_MODULATOR_SQUARE (2) - -#define AL_RING_MODULATOR_MIN_WAVEFORM (0) -#define AL_RING_MODULATOR_MAX_WAVEFORM (2) -#define AL_RING_MODULATOR_DEFAULT_WAVEFORM (0) - -/* Autowah effect */ -#define AL_AUTOWAH_MIN_ATTACK_TIME (0.0001f) -#define AL_AUTOWAH_MAX_ATTACK_TIME (1.0f) -#define AL_AUTOWAH_DEFAULT_ATTACK_TIME (0.06f) - -#define AL_AUTOWAH_MIN_RELEASE_TIME (0.0001f) -#define AL_AUTOWAH_MAX_RELEASE_TIME (1.0f) -#define AL_AUTOWAH_DEFAULT_RELEASE_TIME (0.06f) - -#define AL_AUTOWAH_MIN_RESONANCE (2.0f) -#define AL_AUTOWAH_MAX_RESONANCE (1000.0f) -#define AL_AUTOWAH_DEFAULT_RESONANCE (1000.0f) - -#define AL_AUTOWAH_MIN_PEAK_GAIN (0.00003f) -#define AL_AUTOWAH_MAX_PEAK_GAIN (31621.0f) -#define AL_AUTOWAH_DEFAULT_PEAK_GAIN (11.22f) - -/* Compressor effect */ -#define AL_COMPRESSOR_MIN_ONOFF (0) -#define AL_COMPRESSOR_MAX_ONOFF (1) -#define AL_COMPRESSOR_DEFAULT_ONOFF (1) - -/* Equalizer effect */ -#define AL_EQUALIZER_MIN_LOW_GAIN (0.126f) -#define AL_EQUALIZER_MAX_LOW_GAIN (7.943f) -#define AL_EQUALIZER_DEFAULT_LOW_GAIN (1.0f) - -#define AL_EQUALIZER_MIN_LOW_CUTOFF (50.0f) -#define AL_EQUALIZER_MAX_LOW_CUTOFF (800.0f) -#define AL_EQUALIZER_DEFAULT_LOW_CUTOFF (200.0f) - -#define AL_EQUALIZER_MIN_MID1_GAIN (0.126f) -#define AL_EQUALIZER_MAX_MID1_GAIN (7.943f) -#define AL_EQUALIZER_DEFAULT_MID1_GAIN (1.0f) - -#define AL_EQUALIZER_MIN_MID1_CENTER (200.0f) -#define AL_EQUALIZER_MAX_MID1_CENTER (3000.0f) -#define AL_EQUALIZER_DEFAULT_MID1_CENTER (500.0f) - -#define AL_EQUALIZER_MIN_MID1_WIDTH (0.01f) -#define AL_EQUALIZER_MAX_MID1_WIDTH (1.0f) -#define AL_EQUALIZER_DEFAULT_MID1_WIDTH (1.0f) - -#define AL_EQUALIZER_MIN_MID2_GAIN (0.126f) -#define AL_EQUALIZER_MAX_MID2_GAIN (7.943f) -#define AL_EQUALIZER_DEFAULT_MID2_GAIN (1.0f) - -#define AL_EQUALIZER_MIN_MID2_CENTER (1000.0f) -#define AL_EQUALIZER_MAX_MID2_CENTER (8000.0f) -#define AL_EQUALIZER_DEFAULT_MID2_CENTER (3000.0f) - -#define AL_EQUALIZER_MIN_MID2_WIDTH (0.01f) -#define AL_EQUALIZER_MAX_MID2_WIDTH (1.0f) -#define AL_EQUALIZER_DEFAULT_MID2_WIDTH (1.0f) - -#define AL_EQUALIZER_MIN_HIGH_GAIN (0.126f) -#define AL_EQUALIZER_MAX_HIGH_GAIN (7.943f) -#define AL_EQUALIZER_DEFAULT_HIGH_GAIN (1.0f) - -#define AL_EQUALIZER_MIN_HIGH_CUTOFF (4000.0f) -#define AL_EQUALIZER_MAX_HIGH_CUTOFF (16000.0f) -#define AL_EQUALIZER_DEFAULT_HIGH_CUTOFF (6000.0f) - - -/* Source parameter value ranges and defaults. */ -#define AL_MIN_AIR_ABSORPTION_FACTOR (0.0f) -#define AL_MAX_AIR_ABSORPTION_FACTOR (10.0f) -#define AL_DEFAULT_AIR_ABSORPTION_FACTOR (0.0f) - -#define AL_MIN_ROOM_ROLLOFF_FACTOR (0.0f) -#define AL_MAX_ROOM_ROLLOFF_FACTOR (10.0f) -#define AL_DEFAULT_ROOM_ROLLOFF_FACTOR (0.0f) - -#define AL_MIN_CONE_OUTER_GAINHF (0.0f) -#define AL_MAX_CONE_OUTER_GAINHF (1.0f) -#define AL_DEFAULT_CONE_OUTER_GAINHF (1.0f) - -#define AL_MIN_DIRECT_FILTER_GAINHF_AUTO AL_FALSE -#define AL_MAX_DIRECT_FILTER_GAINHF_AUTO AL_TRUE -#define AL_DEFAULT_DIRECT_FILTER_GAINHF_AUTO AL_TRUE - -#define AL_MIN_AUXILIARY_SEND_FILTER_GAIN_AUTO AL_FALSE -#define AL_MAX_AUXILIARY_SEND_FILTER_GAIN_AUTO AL_TRUE -#define AL_DEFAULT_AUXILIARY_SEND_FILTER_GAIN_AUTO AL_TRUE - -#define AL_MIN_AUXILIARY_SEND_FILTER_GAINHF_AUTO AL_FALSE -#define AL_MAX_AUXILIARY_SEND_FILTER_GAINHF_AUTO AL_TRUE -#define AL_DEFAULT_AUXILIARY_SEND_FILTER_GAINHF_AUTO AL_TRUE - - -/* Listener parameter value ranges and defaults. */ -#define AL_MIN_METERS_PER_UNIT FLT_MIN -#define AL_MAX_METERS_PER_UNIT FLT_MAX -#define AL_DEFAULT_METERS_PER_UNIT (1.0f) - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* AL_EFX_H */ diff --git a/src/audio.c b/src/audio.c index 3005586f5..b81d55729 100644 --- a/src/audio.c +++ b/src/audio.c @@ -797,7 +797,11 @@ void ResumeMusicStream(Music music) ALenum state; alGetSourcei(music->stream.source, AL_SOURCE_STATE, &state); - if (state == AL_PAUSED) alSourcePlay(music->stream.source); + if (state == AL_PAUSED) + { + TraceLog(INFO, "[AUD ID %i] Resume music stream playing", music->stream.source); + alSourcePlay(music->stream.source); + } } // Stop music playing (close stream) @@ -813,8 +817,6 @@ void StopMusicStream(Music music) for (int i = 0; i < MAX_STREAM_BUFFERS; i++) { - - //UpdateAudioStream(music->stream, pcm, AUDIO_BUFFER_SIZE); // Update one buffer at a time alBufferData(music->stream.buffers[i], music->stream.format, pcm, AUDIO_BUFFER_SIZE*music->stream.sampleSize/8*music->stream.channels, music->stream.sampleRate); } @@ -853,7 +855,7 @@ void UpdateMusicStream(Music music) if (processed > 0) { - bool active = true; + bool streamEnding = false; // NOTE: Using dynamic allocation because it could require more than 16KB void *pcm = calloc(AUDIO_BUFFER_SIZE*music->stream.sampleSize/8*music->stream.channels, 1); @@ -898,7 +900,7 @@ void UpdateMusicStream(Music music) if (music->samplesLeft <= 0) { - active = false; + streamEnding = true; break; } } @@ -907,7 +909,7 @@ void UpdateMusicStream(Music music) free(pcm); // Reset audio stream for looping - if (!active) + if (streamEnding) { StopMusicStream(music); // Stop music (and reset) diff --git a/src/external/OculusSDK/LibOVR/Include/Extras/OVR_CAPI_Util.h b/src/external/OculusSDK/LibOVR/Include/Extras/OVR_CAPI_Util.h deleted file mode 100644 index 552f3b125..000000000 --- a/src/external/OculusSDK/LibOVR/Include/Extras/OVR_CAPI_Util.h +++ /dev/null @@ -1,196 +0,0 @@ -/********************************************************************************//** -\file OVR_CAPI_Util.h -\brief This header provides LibOVR utility function declarations -\copyright Copyright 2015-2016 Oculus VR, LLC All Rights reserved. -*************************************************************************************/ - -#ifndef OVR_CAPI_Util_h -#define OVR_CAPI_Util_h - - -#include "../OVR_CAPI.h" - - -#ifdef __cplusplus -extern "C" { -#endif - - -/// Enumerates modifications to the projection matrix based on the application's needs. -/// -/// \see ovrMatrix4f_Projection -/// -typedef enum ovrProjectionModifier_ -{ - /// Use for generating a default projection matrix that is: - /// * Right-handed. - /// * Near depth values stored in the depth buffer are smaller than far depth values. - /// * Both near and far are explicitly defined. - /// * With a clipping range that is (0 to w). - ovrProjection_None = 0x00, - - /// Enable if using left-handed transformations in your application. - ovrProjection_LeftHanded = 0x01, - - /// After the projection transform is applied, far values stored in the depth buffer will be less than closer depth values. - /// NOTE: Enable only if the application is using a floating-point depth buffer for proper precision. - ovrProjection_FarLessThanNear = 0x02, - - /// When this flag is used, the zfar value pushed into ovrMatrix4f_Projection() will be ignored - /// NOTE: Enable only if ovrProjection_FarLessThanNear is also enabled where the far clipping plane will be pushed to infinity. - ovrProjection_FarClipAtInfinity = 0x04, - - /// Enable if the application is rendering with OpenGL and expects a projection matrix with a clipping range of (-w to w). - /// Ignore this flag if your application already handles the conversion from D3D range (0 to w) to OpenGL. - ovrProjection_ClipRangeOpenGL = 0x08, -} ovrProjectionModifier; - - -/// Return values for ovr_Detect. -/// -/// \see ovr_Detect -/// -typedef struct OVR_ALIGNAS(8) ovrDetectResult_ -{ - /// Is ovrFalse when the Oculus Service is not running. - /// This means that the Oculus Service is either uninstalled or stopped. - /// IsOculusHMDConnected will be ovrFalse in this case. - /// Is ovrTrue when the Oculus Service is running. - /// This means that the Oculus Service is installed and running. - /// IsOculusHMDConnected will reflect the state of the HMD. - ovrBool IsOculusServiceRunning; - - /// Is ovrFalse when an Oculus HMD is not detected. - /// If the Oculus Service is not running, this will be ovrFalse. - /// Is ovrTrue when an Oculus HMD is detected. - /// This implies that the Oculus Service is also installed and running. - ovrBool IsOculusHMDConnected; - - OVR_UNUSED_STRUCT_PAD(pad0, 6) ///< \internal struct padding - -} ovrDetectResult; - -OVR_STATIC_ASSERT(sizeof(ovrDetectResult) == 8, "ovrDetectResult size mismatch"); - - -/// Detects Oculus Runtime and Device Status -/// -/// Checks for Oculus Runtime and Oculus HMD device status without loading the LibOVRRT -/// shared library. This may be called before ovr_Initialize() to help decide whether or -/// not to initialize LibOVR. -/// -/// \param[in] timeoutMilliseconds Specifies a timeout to wait for HMD to be attached or 0 to poll. -/// -/// \return Returns an ovrDetectResult object indicating the result of detection. -/// -/// \see ovrDetectResult -/// -OVR_PUBLIC_FUNCTION(ovrDetectResult) ovr_Detect(int timeoutMilliseconds); - -// On the Windows platform, -#ifdef _WIN32 - /// This is the Windows Named Event name that is used to check for HMD connected state. - #define OVR_HMD_CONNECTED_EVENT_NAME L"OculusHMDConnected" -#endif // _WIN32 - - -/// Used to generate projection from ovrEyeDesc::Fov. -/// -/// \param[in] fov Specifies the ovrFovPort to use. -/// \param[in] znear Distance to near Z limit. -/// \param[in] zfar Distance to far Z limit. -/// \param[in] projectionModFlags A combination of the ovrProjectionModifier flags. -/// -/// \return Returns the calculated projection matrix. -/// -/// \see ovrProjectionModifier -/// -OVR_PUBLIC_FUNCTION(ovrMatrix4f) ovrMatrix4f_Projection(ovrFovPort fov, float znear, float zfar, unsigned int projectionModFlags); - - -/// Extracts the required data from the result of ovrMatrix4f_Projection. -/// -/// \param[in] projection Specifies the project matrix from which to extract ovrTimewarpProjectionDesc. -/// \param[in] projectionModFlags A combination of the ovrProjectionModifier flags. -/// \return Returns the extracted ovrTimewarpProjectionDesc. -/// \see ovrTimewarpProjectionDesc -/// -OVR_PUBLIC_FUNCTION(ovrTimewarpProjectionDesc) ovrTimewarpProjectionDesc_FromProjection(ovrMatrix4f projection, unsigned int projectionModFlags); - - -/// Generates an orthographic sub-projection. -/// -/// Used for 2D rendering, Y is down. -/// -/// \param[in] projection The perspective matrix that the orthographic matrix is derived from. -/// \param[in] orthoScale Equal to 1.0f / pixelsPerTanAngleAtCenter. -/// \param[in] orthoDistance Equal to the distance from the camera in meters, such as 0.8m. -/// \param[in] HmdToEyeOffsetX Specifies the offset of the eye from the center. -/// -/// \return Returns the calculated projection matrix. -/// -OVR_PUBLIC_FUNCTION(ovrMatrix4f) ovrMatrix4f_OrthoSubProjection(ovrMatrix4f projection, ovrVector2f orthoScale, - float orthoDistance, float HmdToEyeOffsetX); - - - -/// Computes offset eye poses based on headPose returned by ovrTrackingState. -/// -/// \param[in] headPose Indicates the HMD position and orientation to use for the calculation. -/// \param[in] hmdToEyeOffset Can be ovrEyeRenderDesc.HmdToEyeOffset returned from -/// ovr_GetRenderDesc. For monoscopic rendering, use a vector that is the average -/// of the two vectors for both eyes. -/// \param[out] outEyePoses If outEyePoses are used for rendering, they should be passed to -/// ovr_SubmitFrame in ovrLayerEyeFov::RenderPose or ovrLayerEyeFovDepth::RenderPose. -/// -OVR_PUBLIC_FUNCTION(void) ovr_CalcEyePoses(ovrPosef headPose, - const ovrVector3f hmdToEyeOffset[2], - ovrPosef outEyePoses[2]); - - -/// Returns the predicted head pose in outHmdTrackingState and offset eye poses in outEyePoses. -/// -/// This is a thread-safe function where caller should increment frameIndex with every frame -/// and pass that index where applicable to functions called on the rendering thread. -/// Assuming outEyePoses are used for rendering, it should be passed as a part of ovrLayerEyeFov. -/// The caller does not need to worry about applying HmdToEyeOffset to the returned outEyePoses variables. -/// -/// \param[in] hmd Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] frameIndex Specifies the targeted frame index, or 0 to refer to one frame after -/// the last time ovr_SubmitFrame was called. -/// \param[in] latencyMarker Specifies that this call is the point in time where -/// the "App-to-Mid-Photon" latency timer starts from. If a given ovrLayer -/// provides "SensorSampleTimestamp", that will override the value stored here. -/// \param[in] hmdToEyeOffset Can be ovrEyeRenderDesc.HmdToEyeOffset returned from -/// ovr_GetRenderDesc. For monoscopic rendering, use a vector that is the average -/// of the two vectors for both eyes. -/// \param[out] outEyePoses The predicted eye poses. -/// \param[out] outSensorSampleTime The time when this function was called. May be NULL, in which case it is ignored. -/// -OVR_PUBLIC_FUNCTION(void) ovr_GetEyePoses(ovrSession session, long long frameIndex, ovrBool latencyMarker, - const ovrVector3f hmdToEyeOffset[2], - ovrPosef outEyePoses[2], - double* outSensorSampleTime); - - - -/// Tracking poses provided by the SDK come in a right-handed coordinate system. If an application -/// is passing in ovrProjection_LeftHanded into ovrMatrix4f_Projection, then it should also use -/// this function to flip the HMD tracking poses to be left-handed. -/// -/// While this utility function is intended to convert a left-handed ovrPosef into a right-handed -/// coordinate system, it will also work for converting right-handed to left-handed since the -/// flip operation is the same for both cases. -/// -/// \param[in] inPose that is right-handed -/// \param[out] outPose that is requested to be left-handed (can be the same pointer to inPose) -/// -OVR_PUBLIC_FUNCTION(void) ovrPosef_FlipHandedness(const ovrPosef* inPose, ovrPosef* outPose); - - -#ifdef __cplusplus -} /* extern "C" */ -#endif - - -#endif // Header include guard diff --git a/src/external/OculusSDK/LibOVR/Include/Extras/OVR_Math.h b/src/external/OculusSDK/LibOVR/Include/Extras/OVR_Math.h deleted file mode 100644 index 89293ff8f..000000000 --- a/src/external/OculusSDK/LibOVR/Include/Extras/OVR_Math.h +++ /dev/null @@ -1,3804 +0,0 @@ -/********************************************************************************//** -\file OVR_Math.h -\brief Implementation of 3D primitives such as vectors, matrices. -\copyright Copyright 2014-2016 Oculus VR, LLC All Rights reserved. -*************************************************************************************/ - -#ifndef OVR_Math_h -#define OVR_Math_h - - -// This file is intended to be independent of the rest of LibOVR and LibOVRKernel and thus -// has no #include dependencies on either. - -#include -#include -#include -#include -#include -#include -#include "../OVR_CAPI.h" // Currently required due to a dependence on the ovrFovPort_ declaration. - -#if defined(_MSC_VER) - #pragma warning(push) - #pragma warning(disable: 4127) // conditional expression is constant -#endif - - -#if defined(_MSC_VER) - #define OVRMath_sprintf sprintf_s -#else - #define OVRMath_sprintf snprintf -#endif - - -//------------------------------------------------------------------------------------- -// ***** OVR_MATH_ASSERT -// -// Independent debug break implementation for OVR_Math.h. - -#if !defined(OVR_MATH_DEBUG_BREAK) - #if defined(_DEBUG) - #if defined(_MSC_VER) - #define OVR_MATH_DEBUG_BREAK __debugbreak() - #else - #define OVR_MATH_DEBUG_BREAK __builtin_trap() - #endif - #else - #define OVR_MATH_DEBUG_BREAK ((void)0) - #endif -#endif - - -//------------------------------------------------------------------------------------- -// ***** OVR_MATH_ASSERT -// -// Independent OVR_MATH_ASSERT implementation for OVR_Math.h. - -#if !defined(OVR_MATH_ASSERT) - #if defined(_DEBUG) - #define OVR_MATH_ASSERT(p) if (!(p)) { OVR_MATH_DEBUG_BREAK; } - #else - #define OVR_MATH_ASSERT(p) ((void)0) - #endif -#endif - - -//------------------------------------------------------------------------------------- -// ***** OVR_MATH_STATIC_ASSERT -// -// Independent OVR_MATH_ASSERT implementation for OVR_Math.h. - -#if !defined(OVR_MATH_STATIC_ASSERT) - #if defined(__cplusplus) && ((defined(_MSC_VER) && (defined(_MSC_VER) >= 1600)) || defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L)) - #define OVR_MATH_STATIC_ASSERT static_assert - #else - #if !defined(OVR_SA_UNUSED) - #if defined(__GNUC__) || defined(__clang__) - #define OVR_SA_UNUSED __attribute__((unused)) - #else - #define OVR_SA_UNUSED - #endif - #define OVR_SA_PASTE(a,b) a##b - #define OVR_SA_HELP(a,b) OVR_SA_PASTE(a,b) - #endif - - #define OVR_MATH_STATIC_ASSERT(expression, msg) typedef char OVR_SA_HELP(compileTimeAssert, __LINE__) [((expression) != 0) ? 1 : -1] OVR_SA_UNUSED - #endif -#endif - - - -namespace OVR { - -template -const T OVRMath_Min(const T a, const T b) -{ return (a < b) ? a : b; } - -template -const T OVRMath_Max(const T a, const T b) -{ return (b < a) ? a : b; } - -template -void OVRMath_Swap(T& a, T& b) -{ T temp(a); a = b; b = temp; } - - -//------------------------------------------------------------------------------------- -// ***** Constants for 3D world/axis definitions. - -// Definitions of axes for coordinate and rotation conversions. -enum Axis -{ - Axis_X = 0, Axis_Y = 1, Axis_Z = 2 -}; - -// RotateDirection describes the rotation direction around an axis, interpreted as follows: -// CW - Clockwise while looking "down" from positive axis towards the origin. -// CCW - Counter-clockwise while looking from the positive axis towards the origin, -// which is in the negative axis direction. -// CCW is the default for the RHS coordinate system. Oculus standard RHS coordinate -// system defines Y up, X right, and Z back (pointing out from the screen). In this -// system Rotate_CCW around Z will specifies counter-clockwise rotation in XY plane. -enum RotateDirection -{ - Rotate_CCW = 1, - Rotate_CW = -1 -}; - -// Constants for right handed and left handed coordinate systems -enum HandedSystem -{ - Handed_R = 1, Handed_L = -1 -}; - -// AxisDirection describes which way the coordinate axis points. Used by WorldAxes. -enum AxisDirection -{ - Axis_Up = 2, - Axis_Down = -2, - Axis_Right = 1, - Axis_Left = -1, - Axis_In = 3, - Axis_Out = -3 -}; - -struct WorldAxes -{ - AxisDirection XAxis, YAxis, ZAxis; - - WorldAxes(AxisDirection x, AxisDirection y, AxisDirection z) - : XAxis(x), YAxis(y), ZAxis(z) - { OVR_MATH_ASSERT(abs(x) != abs(y) && abs(y) != abs(z) && abs(z) != abs(x));} -}; - -} // namespace OVR - - -//------------------------------------------------------------------------------------// -// ***** C Compatibility Types - -// These declarations are used to support conversion between C types used in -// LibOVR C interfaces and their C++ versions. As an example, they allow passing -// Vector3f into a function that expects ovrVector3f. - -typedef struct ovrQuatf_ ovrQuatf; -typedef struct ovrQuatd_ ovrQuatd; -typedef struct ovrSizei_ ovrSizei; -typedef struct ovrSizef_ ovrSizef; -typedef struct ovrSized_ ovrSized; -typedef struct ovrRecti_ ovrRecti; -typedef struct ovrVector2i_ ovrVector2i; -typedef struct ovrVector2f_ ovrVector2f; -typedef struct ovrVector2d_ ovrVector2d; -typedef struct ovrVector3f_ ovrVector3f; -typedef struct ovrVector3d_ ovrVector3d; -typedef struct ovrVector4f_ ovrVector4f; -typedef struct ovrVector4d_ ovrVector4d; -typedef struct ovrMatrix2f_ ovrMatrix2f; -typedef struct ovrMatrix2d_ ovrMatrix2d; -typedef struct ovrMatrix3f_ ovrMatrix3f; -typedef struct ovrMatrix3d_ ovrMatrix3d; -typedef struct ovrMatrix4f_ ovrMatrix4f; -typedef struct ovrMatrix4d_ ovrMatrix4d; -typedef struct ovrPosef_ ovrPosef; -typedef struct ovrPosed_ ovrPosed; -typedef struct ovrPoseStatef_ ovrPoseStatef; -typedef struct ovrPoseStated_ ovrPoseStated; - -namespace OVR { - -// Forward-declare our templates. -template class Quat; -template class Size; -template class Rect; -template class Vector2; -template class Vector3; -template class Vector4; -template class Matrix2; -template class Matrix3; -template class Matrix4; -template class Pose; -template class PoseState; - -// CompatibleTypes::Type is used to lookup a compatible C-version of a C++ class. -template -struct CompatibleTypes -{ - // Declaration here seems necessary for MSVC; specializations are - // used instead. - typedef struct {} Type; -}; - -// Specializations providing CompatibleTypes::Type value. -template<> struct CompatibleTypes > { typedef ovrQuatf Type; }; -template<> struct CompatibleTypes > { typedef ovrQuatd Type; }; -template<> struct CompatibleTypes > { typedef ovrMatrix2f Type; }; -template<> struct CompatibleTypes > { typedef ovrMatrix2d Type; }; -template<> struct CompatibleTypes > { typedef ovrMatrix3f Type; }; -template<> struct CompatibleTypes > { typedef ovrMatrix3d Type; }; -template<> struct CompatibleTypes > { typedef ovrMatrix4f Type; }; -template<> struct CompatibleTypes > { typedef ovrMatrix4d Type; }; -template<> struct CompatibleTypes > { typedef ovrSizei Type; }; -template<> struct CompatibleTypes > { typedef ovrSizef Type; }; -template<> struct CompatibleTypes > { typedef ovrSized Type; }; -template<> struct CompatibleTypes > { typedef ovrRecti Type; }; -template<> struct CompatibleTypes > { typedef ovrVector2i Type; }; -template<> struct CompatibleTypes > { typedef ovrVector2f Type; }; -template<> struct CompatibleTypes > { typedef ovrVector2d Type; }; -template<> struct CompatibleTypes > { typedef ovrVector3f Type; }; -template<> struct CompatibleTypes > { typedef ovrVector3d Type; }; -template<> struct CompatibleTypes > { typedef ovrVector4f Type; }; -template<> struct CompatibleTypes > { typedef ovrVector4d Type; }; -template<> struct CompatibleTypes > { typedef ovrPosef Type; }; -template<> struct CompatibleTypes > { typedef ovrPosed Type; }; - -//------------------------------------------------------------------------------------// -// ***** Math -// -// Math class contains constants and functions. This class is a template specialized -// per type, with Math and Math being distinct. -template -class Math -{ -public: - // By default, support explicit conversion to float. This allows Vector2 to - // compile, for example. - typedef float OtherFloatType; - - static int Tolerance() { return 0; } // Default value so integer types compile -}; - - -//------------------------------------------------------------------------------------// -// ***** double constants -#define MATH_DOUBLE_PI 3.14159265358979323846 -#define MATH_DOUBLE_TWOPI (2*MATH_DOUBLE_PI) -#define MATH_DOUBLE_PIOVER2 (0.5*MATH_DOUBLE_PI) -#define MATH_DOUBLE_PIOVER4 (0.25*MATH_DOUBLE_PI) -#define MATH_FLOAT_MAXVALUE (FLT_MAX) - -#define MATH_DOUBLE_RADTODEGREEFACTOR (360.0 / MATH_DOUBLE_TWOPI) -#define MATH_DOUBLE_DEGREETORADFACTOR (MATH_DOUBLE_TWOPI / 360.0) - -#define MATH_DOUBLE_E 2.71828182845904523536 -#define MATH_DOUBLE_LOG2E 1.44269504088896340736 -#define MATH_DOUBLE_LOG10E 0.434294481903251827651 -#define MATH_DOUBLE_LN2 0.693147180559945309417 -#define MATH_DOUBLE_LN10 2.30258509299404568402 - -#define MATH_DOUBLE_SQRT2 1.41421356237309504880 -#define MATH_DOUBLE_SQRT1_2 0.707106781186547524401 - -#define MATH_DOUBLE_TOLERANCE 1e-12 // a default number for value equality tolerance: about 4500*Epsilon; -#define MATH_DOUBLE_SINGULARITYRADIUS 1e-12 // about 1-cos(.0001 degree), for gimbal lock numerical problems - -//------------------------------------------------------------------------------------// -// ***** float constants -#define MATH_FLOAT_PI float(MATH_DOUBLE_PI) -#define MATH_FLOAT_TWOPI float(MATH_DOUBLE_TWOPI) -#define MATH_FLOAT_PIOVER2 float(MATH_DOUBLE_PIOVER2) -#define MATH_FLOAT_PIOVER4 float(MATH_DOUBLE_PIOVER4) - -#define MATH_FLOAT_RADTODEGREEFACTOR float(MATH_DOUBLE_RADTODEGREEFACTOR) -#define MATH_FLOAT_DEGREETORADFACTOR float(MATH_DOUBLE_DEGREETORADFACTOR) - -#define MATH_FLOAT_E float(MATH_DOUBLE_E) -#define MATH_FLOAT_LOG2E float(MATH_DOUBLE_LOG2E) -#define MATH_FLOAT_LOG10E float(MATH_DOUBLE_LOG10E) -#define MATH_FLOAT_LN2 float(MATH_DOUBLE_LN2) -#define MATH_FLOAT_LN10 float(MATH_DOUBLE_LN10) - -#define MATH_FLOAT_SQRT2 float(MATH_DOUBLE_SQRT2) -#define MATH_FLOAT_SQRT1_2 float(MATH_DOUBLE_SQRT1_2) - -#define MATH_FLOAT_TOLERANCE 1e-5f // a default number for value equality tolerance: 1e-5, about 84*EPSILON; -#define MATH_FLOAT_SINGULARITYRADIUS 1e-7f // about 1-cos(.025 degree), for gimbal lock numerical problems - - - -// Single-precision Math constants class. -template<> -class Math -{ -public: - typedef double OtherFloatType; - - static inline float Tolerance() { return MATH_FLOAT_TOLERANCE; }; // a default number for value equality tolerance - static inline float SingularityRadius() { return MATH_FLOAT_SINGULARITYRADIUS; }; // for gimbal lock numerical problems -}; - -// Double-precision Math constants class -template<> -class Math -{ -public: - typedef float OtherFloatType; - - static inline double Tolerance() { return MATH_DOUBLE_TOLERANCE; }; // a default number for value equality tolerance - static inline double SingularityRadius() { return MATH_DOUBLE_SINGULARITYRADIUS; }; // for gimbal lock numerical problems -}; - -typedef Math Mathf; -typedef Math Mathd; - -// Conversion functions between degrees and radians -// (non-templated to ensure passing int arguments causes warning) -inline float RadToDegree(float rad) { return rad * MATH_FLOAT_RADTODEGREEFACTOR; } -inline double RadToDegree(double rad) { return rad * MATH_DOUBLE_RADTODEGREEFACTOR; } - -inline float DegreeToRad(float deg) { return deg * MATH_FLOAT_DEGREETORADFACTOR; } -inline double DegreeToRad(double deg) { return deg * MATH_DOUBLE_DEGREETORADFACTOR; } - -// Square function -template -inline T Sqr(T x) { return x*x; } - -// Sign: returns 0 if x == 0, -1 if x < 0, and 1 if x > 0 -template -inline T Sign(T x) { return (x != T(0)) ? (x < T(0) ? T(-1) : T(1)) : T(0); } - -// Numerically stable acos function -inline float Acos(float x) { return (x > 1.0f) ? 0.0f : (x < -1.0f) ? MATH_FLOAT_PI : acosf(x); } -inline double Acos(double x) { return (x > 1.0) ? 0.0 : (x < -1.0) ? MATH_DOUBLE_PI : acos(x); } - -// Numerically stable asin function -inline float Asin(float x) { return (x > 1.0f) ? MATH_FLOAT_PIOVER2 : (x < -1.0f) ? -MATH_FLOAT_PIOVER2 : asinf(x); } -inline double Asin(double x) { return (x > 1.0) ? MATH_DOUBLE_PIOVER2 : (x < -1.0) ? -MATH_DOUBLE_PIOVER2 : asin(x); } - -#if defined(_MSC_VER) - inline int isnan(double x) { return ::_isnan(x); } -#elif !defined(isnan) // Some libraries #define isnan. - inline int isnan(double x) { return ::isnan(x); } -#endif - -template -class Quat; - - -//------------------------------------------------------------------------------------- -// ***** Vector2<> - -// Vector2f (Vector2d) represents a 2-dimensional vector or point in space, -// consisting of coordinates x and y - -template -class Vector2 -{ -public: - typedef T ElementType; - static const size_t ElementCount = 2; - - T x, y; - - Vector2() : x(0), y(0) { } - Vector2(T x_, T y_) : x(x_), y(y_) { } - explicit Vector2(T s) : x(s), y(s) { } - explicit Vector2(const Vector2::OtherFloatType> &src) - : x((T)src.x), y((T)src.y) { } - - static Vector2 Zero() { return Vector2(0, 0); } - - // C-interop support. - typedef typename CompatibleTypes >::Type CompatibleType; - - Vector2(const CompatibleType& s) : x(s.x), y(s.y) { } - - operator const CompatibleType& () const - { - OVR_MATH_STATIC_ASSERT(sizeof(Vector2) == sizeof(CompatibleType), "sizeof(Vector2) failure"); - return reinterpret_cast(*this); - } - - - bool operator== (const Vector2& b) const { return x == b.x && y == b.y; } - bool operator!= (const Vector2& b) const { return x != b.x || y != b.y; } - - Vector2 operator+ (const Vector2& b) const { return Vector2(x + b.x, y + b.y); } - Vector2& operator+= (const Vector2& b) { x += b.x; y += b.y; return *this; } - Vector2 operator- (const Vector2& b) const { return Vector2(x - b.x, y - b.y); } - Vector2& operator-= (const Vector2& b) { x -= b.x; y -= b.y; return *this; } - Vector2 operator- () const { return Vector2(-x, -y); } - - // Scalar multiplication/division scales vector. - Vector2 operator* (T s) const { return Vector2(x*s, y*s); } - Vector2& operator*= (T s) { x *= s; y *= s; return *this; } - - Vector2 operator/ (T s) const { T rcp = T(1)/s; - return Vector2(x*rcp, y*rcp); } - Vector2& operator/= (T s) { T rcp = T(1)/s; - x *= rcp; y *= rcp; - return *this; } - - static Vector2 Min(const Vector2& a, const Vector2& b) { return Vector2((a.x < b.x) ? a.x : b.x, - (a.y < b.y) ? a.y : b.y); } - static Vector2 Max(const Vector2& a, const Vector2& b) { return Vector2((a.x > b.x) ? a.x : b.x, - (a.y > b.y) ? a.y : b.y); } - - Vector2 Clamped(T maxMag) const - { - T magSquared = LengthSq(); - if (magSquared <= Sqr(maxMag)) - return *this; - else - return *this * (maxMag / sqrt(magSquared)); - } - - // Compare two vectors for equality with tolerance. Returns true if vectors match withing tolerance. - bool IsEqual(const Vector2& b, T tolerance =Math::Tolerance()) const - { - return (fabs(b.x-x) <= tolerance) && - (fabs(b.y-y) <= tolerance); - } - bool Compare(const Vector2& b, T tolerance = Math::Tolerance()) const - { - return IsEqual(b, tolerance); - } - - // Access element by index - T& operator[] (int idx) - { - OVR_MATH_ASSERT(0 <= idx && idx < 2); - return *(&x + idx); - } - const T& operator[] (int idx) const - { - OVR_MATH_ASSERT(0 <= idx && idx < 2); - return *(&x + idx); - } - - // Entry-wise product of two vectors - Vector2 EntrywiseMultiply(const Vector2& b) const { return Vector2(x * b.x, y * b.y);} - - - // Multiply and divide operators do entry-wise math. Used Dot() for dot product. - Vector2 operator* (const Vector2& b) const { return Vector2(x * b.x, y * b.y); } - Vector2 operator/ (const Vector2& b) const { return Vector2(x / b.x, y / b.y); } - - // Dot product - // Used to calculate angle q between two vectors among other things, - // as (A dot B) = |a||b|cos(q). - T Dot(const Vector2& b) const { return x*b.x + y*b.y; } - - // Returns the angle from this vector to b, in radians. - T Angle(const Vector2& b) const - { - T div = LengthSq()*b.LengthSq(); - OVR_MATH_ASSERT(div != T(0)); - T result = Acos((this->Dot(b))/sqrt(div)); - return result; - } - - // Return Length of the vector squared. - T LengthSq() const { return (x * x + y * y); } - - // Return vector length. - T Length() const { return sqrt(LengthSq()); } - - // Returns squared distance between two points represented by vectors. - T DistanceSq(const Vector2& b) const { return (*this - b).LengthSq(); } - - // Returns distance between two points represented by vectors. - T Distance(const Vector2& b) const { return (*this - b).Length(); } - - // Determine if this a unit vector. - bool IsNormalized() const { return fabs(LengthSq() - T(1)) < Math::Tolerance(); } - - // Normalize, convention vector length to 1. - void Normalize() - { - T s = Length(); - if (s != T(0)) - s = T(1) / s; - *this *= s; - } - - // Returns normalized (unit) version of the vector without modifying itself. - Vector2 Normalized() const - { - T s = Length(); - if (s != T(0)) - s = T(1) / s; - return *this * s; - } - - // Linearly interpolates from this vector to another. - // Factor should be between 0.0 and 1.0, with 0 giving full value to this. - Vector2 Lerp(const Vector2& b, T f) const { return *this*(T(1) - f) + b*f; } - - // Projects this vector onto the argument; in other words, - // A.Project(B) returns projection of vector A onto B. - Vector2 ProjectTo(const Vector2& b) const - { - T l2 = b.LengthSq(); - OVR_MATH_ASSERT(l2 != T(0)); - return b * ( Dot(b) / l2 ); - } - - // returns true if vector b is clockwise from this vector - bool IsClockwise(const Vector2& b) const - { - return (x * b.y - y * b.x) < 0; - } -}; - - -typedef Vector2 Vector2f; -typedef Vector2 Vector2d; -typedef Vector2 Vector2i; - -typedef Vector2 Point2f; -typedef Vector2 Point2d; -typedef Vector2 Point2i; - -//------------------------------------------------------------------------------------- -// ***** Vector3<> - 3D vector of {x, y, z} - -// -// Vector3f (Vector3d) represents a 3-dimensional vector or point in space, -// consisting of coordinates x, y and z. - -template -class Vector3 -{ -public: - typedef T ElementType; - static const size_t ElementCount = 3; - - T x, y, z; - - // FIXME: default initialization of a vector class can be very expensive in a full-blown - // application. A few hundred thousand vector constructions is not unlikely and can add - // up to milliseconds of time on processors like the PS3 PPU. - Vector3() : x(0), y(0), z(0) { } - Vector3(T x_, T y_, T z_ = 0) : x(x_), y(y_), z(z_) { } - explicit Vector3(T s) : x(s), y(s), z(s) { } - explicit Vector3(const Vector3::OtherFloatType> &src) - : x((T)src.x), y((T)src.y), z((T)src.z) { } - - static Vector3 Zero() { return Vector3(0, 0, 0); } - - // C-interop support. - typedef typename CompatibleTypes >::Type CompatibleType; - - Vector3(const CompatibleType& s) : x(s.x), y(s.y), z(s.z) { } - - operator const CompatibleType& () const - { - OVR_MATH_STATIC_ASSERT(sizeof(Vector3) == sizeof(CompatibleType), "sizeof(Vector3) failure"); - return reinterpret_cast(*this); - } - - bool operator== (const Vector3& b) const { return x == b.x && y == b.y && z == b.z; } - bool operator!= (const Vector3& b) const { return x != b.x || y != b.y || z != b.z; } - - Vector3 operator+ (const Vector3& b) const { return Vector3(x + b.x, y + b.y, z + b.z); } - Vector3& operator+= (const Vector3& b) { x += b.x; y += b.y; z += b.z; return *this; } - Vector3 operator- (const Vector3& b) const { return Vector3(x - b.x, y - b.y, z - b.z); } - Vector3& operator-= (const Vector3& b) { x -= b.x; y -= b.y; z -= b.z; return *this; } - Vector3 operator- () const { return Vector3(-x, -y, -z); } - - // Scalar multiplication/division scales vector. - Vector3 operator* (T s) const { return Vector3(x*s, y*s, z*s); } - Vector3& operator*= (T s) { x *= s; y *= s; z *= s; return *this; } - - Vector3 operator/ (T s) const { T rcp = T(1)/s; - return Vector3(x*rcp, y*rcp, z*rcp); } - Vector3& operator/= (T s) { T rcp = T(1)/s; - x *= rcp; y *= rcp; z *= rcp; - return *this; } - - static Vector3 Min(const Vector3& a, const Vector3& b) - { - return Vector3((a.x < b.x) ? a.x : b.x, - (a.y < b.y) ? a.y : b.y, - (a.z < b.z) ? a.z : b.z); - } - static Vector3 Max(const Vector3& a, const Vector3& b) - { - return Vector3((a.x > b.x) ? a.x : b.x, - (a.y > b.y) ? a.y : b.y, - (a.z > b.z) ? a.z : b.z); - } - - Vector3 Clamped(T maxMag) const - { - T magSquared = LengthSq(); - if (magSquared <= Sqr(maxMag)) - return *this; - else - return *this * (maxMag / sqrt(magSquared)); - } - - // Compare two vectors for equality with tolerance. Returns true if vectors match withing tolerance. - bool IsEqual(const Vector3& b, T tolerance = Math::Tolerance()) const - { - return (fabs(b.x-x) <= tolerance) && - (fabs(b.y-y) <= tolerance) && - (fabs(b.z-z) <= tolerance); - } - bool Compare(const Vector3& b, T tolerance = Math::Tolerance()) const - { - return IsEqual(b, tolerance); - } - - T& operator[] (int idx) - { - OVR_MATH_ASSERT(0 <= idx && idx < 3); - return *(&x + idx); - } - - const T& operator[] (int idx) const - { - OVR_MATH_ASSERT(0 <= idx && idx < 3); - return *(&x + idx); - } - - // Entrywise product of two vectors - Vector3 EntrywiseMultiply(const Vector3& b) const { return Vector3(x * b.x, - y * b.y, - z * b.z);} - - // Multiply and divide operators do entry-wise math - Vector3 operator* (const Vector3& b) const { return Vector3(x * b.x, - y * b.y, - z * b.z); } - - Vector3 operator/ (const Vector3& b) const { return Vector3(x / b.x, - y / b.y, - z / b.z); } - - - // Dot product - // Used to calculate angle q between two vectors among other things, - // as (A dot B) = |a||b|cos(q). - T Dot(const Vector3& b) const { return x*b.x + y*b.y + z*b.z; } - - // Compute cross product, which generates a normal vector. - // Direction vector can be determined by right-hand rule: Pointing index finder in - // direction a and middle finger in direction b, thumb will point in a.Cross(b). - Vector3 Cross(const Vector3& b) const { return Vector3(y*b.z - z*b.y, - z*b.x - x*b.z, - x*b.y - y*b.x); } - - // Returns the angle from this vector to b, in radians. - T Angle(const Vector3& b) const - { - T div = LengthSq()*b.LengthSq(); - OVR_MATH_ASSERT(div != T(0)); - T result = Acos((this->Dot(b))/sqrt(div)); - return result; - } - - // Return Length of the vector squared. - T LengthSq() const { return (x * x + y * y + z * z); } - - // Return vector length. - T Length() const { return (T)sqrt(LengthSq()); } - - // Returns squared distance between two points represented by vectors. - T DistanceSq(Vector3 const& b) const { return (*this - b).LengthSq(); } - - // Returns distance between two points represented by vectors. - T Distance(Vector3 const& b) const { return (*this - b).Length(); } - - bool IsNormalized() const { return fabs(LengthSq() - T(1)) < Math::Tolerance(); } - - // Normalize, convention vector length to 1. - void Normalize() - { - T s = Length(); - if (s != T(0)) - s = T(1) / s; - *this *= s; - } - - // Returns normalized (unit) version of the vector without modifying itself. - Vector3 Normalized() const - { - T s = Length(); - if (s != T(0)) - s = T(1) / s; - return *this * s; - } - - // Linearly interpolates from this vector to another. - // Factor should be between 0.0 and 1.0, with 0 giving full value to this. - Vector3 Lerp(const Vector3& b, T f) const { return *this*(T(1) - f) + b*f; } - - // Projects this vector onto the argument; in other words, - // A.Project(B) returns projection of vector A onto B. - Vector3 ProjectTo(const Vector3& b) const - { - T l2 = b.LengthSq(); - OVR_MATH_ASSERT(l2 != T(0)); - return b * ( Dot(b) / l2 ); - } - - // Projects this vector onto a plane defined by a normal vector - Vector3 ProjectToPlane(const Vector3& normal) const { return *this - this->ProjectTo(normal); } -}; - -typedef Vector3 Vector3f; -typedef Vector3 Vector3d; -typedef Vector3 Vector3i; - -OVR_MATH_STATIC_ASSERT((sizeof(Vector3f) == 3*sizeof(float)), "sizeof(Vector3f) failure"); -OVR_MATH_STATIC_ASSERT((sizeof(Vector3d) == 3*sizeof(double)), "sizeof(Vector3d) failure"); -OVR_MATH_STATIC_ASSERT((sizeof(Vector3i) == 3*sizeof(int32_t)), "sizeof(Vector3i) failure"); - -typedef Vector3 Point3f; -typedef Vector3 Point3d; -typedef Vector3 Point3i; - - -//------------------------------------------------------------------------------------- -// ***** Vector4<> - 4D vector of {x, y, z, w} - -// -// Vector4f (Vector4d) represents a 3-dimensional vector or point in space, -// consisting of coordinates x, y, z and w. - -template -class Vector4 -{ -public: - typedef T ElementType; - static const size_t ElementCount = 4; - - T x, y, z, w; - - // FIXME: default initialization of a vector class can be very expensive in a full-blown - // application. A few hundred thousand vector constructions is not unlikely and can add - // up to milliseconds of time on processors like the PS3 PPU. - Vector4() : x(0), y(0), z(0), w(0) { } - Vector4(T x_, T y_, T z_, T w_) : x(x_), y(y_), z(z_), w(w_) { } - explicit Vector4(T s) : x(s), y(s), z(s), w(s) { } - explicit Vector4(const Vector3& v, const T w_=T(1)) : x(v.x), y(v.y), z(v.z), w(w_) { } - explicit Vector4(const Vector4::OtherFloatType> &src) - : x((T)src.x), y((T)src.y), z((T)src.z), w((T)src.w) { } - - static Vector4 Zero() { return Vector4(0, 0, 0, 0); } - - // C-interop support. - typedef typename CompatibleTypes< Vector4 >::Type CompatibleType; - - Vector4(const CompatibleType& s) : x(s.x), y(s.y), z(s.z), w(s.w) { } - - operator const CompatibleType& () const - { - OVR_MATH_STATIC_ASSERT(sizeof(Vector4) == sizeof(CompatibleType), "sizeof(Vector4) failure"); - return reinterpret_cast(*this); - } - - Vector4& operator= (const Vector3& other) { x=other.x; y=other.y; z=other.z; w=1; return *this; } - bool operator== (const Vector4& b) const { return x == b.x && y == b.y && z == b.z && w == b.w; } - bool operator!= (const Vector4& b) const { return x != b.x || y != b.y || z != b.z || w != b.w; } - - Vector4 operator+ (const Vector4& b) const { return Vector4(x + b.x, y + b.y, z + b.z, w + b.w); } - Vector4& operator+= (const Vector4& b) { x += b.x; y += b.y; z += b.z; w += b.w; return *this; } - Vector4 operator- (const Vector4& b) const { return Vector4(x - b.x, y - b.y, z - b.z, w - b.w); } - Vector4& operator-= (const Vector4& b) { x -= b.x; y -= b.y; z -= b.z; w -= b.w; return *this; } - Vector4 operator- () const { return Vector4(-x, -y, -z, -w); } - - // Scalar multiplication/division scales vector. - Vector4 operator* (T s) const { return Vector4(x*s, y*s, z*s, w*s); } - Vector4& operator*= (T s) { x *= s; y *= s; z *= s; w *= s;return *this; } - - Vector4 operator/ (T s) const { T rcp = T(1)/s; - return Vector4(x*rcp, y*rcp, z*rcp, w*rcp); } - Vector4& operator/= (T s) { T rcp = T(1)/s; - x *= rcp; y *= rcp; z *= rcp; w *= rcp; - return *this; } - - static Vector4 Min(const Vector4& a, const Vector4& b) - { - return Vector4((a.x < b.x) ? a.x : b.x, - (a.y < b.y) ? a.y : b.y, - (a.z < b.z) ? a.z : b.z, - (a.w < b.w) ? a.w : b.w); - } - static Vector4 Max(const Vector4& a, const Vector4& b) - { - return Vector4((a.x > b.x) ? a.x : b.x, - (a.y > b.y) ? a.y : b.y, - (a.z > b.z) ? a.z : b.z, - (a.w > b.w) ? a.w : b.w); - } - - Vector4 Clamped(T maxMag) const - { - T magSquared = LengthSq(); - if (magSquared <= Sqr(maxMag)) - return *this; - else - return *this * (maxMag / sqrt(magSquared)); - } - - // Compare two vectors for equality with tolerance. Returns true if vectors match withing tolerance. - bool IsEqual(const Vector4& b, T tolerance = Math::Tolerance()) const - { - return (fabs(b.x-x) <= tolerance) && - (fabs(b.y-y) <= tolerance) && - (fabs(b.z-z) <= tolerance) && - (fabs(b.w-w) <= tolerance); - } - bool Compare(const Vector4& b, T tolerance = Math::Tolerance()) const - { - return IsEqual(b, tolerance); - } - - T& operator[] (int idx) - { - OVR_MATH_ASSERT(0 <= idx && idx < 4); - return *(&x + idx); - } - - const T& operator[] (int idx) const - { - OVR_MATH_ASSERT(0 <= idx && idx < 4); - return *(&x + idx); - } - - // Entry wise product of two vectors - Vector4 EntrywiseMultiply(const Vector4& b) const { return Vector4(x * b.x, - y * b.y, - z * b.z, - w * b.w);} - - // Multiply and divide operators do entry-wise math - Vector4 operator* (const Vector4& b) const { return Vector4(x * b.x, - y * b.y, - z * b.z, - w * b.w); } - - Vector4 operator/ (const Vector4& b) const { return Vector4(x / b.x, - y / b.y, - z / b.z, - w / b.w); } - - - // Dot product - T Dot(const Vector4& b) const { return x*b.x + y*b.y + z*b.z + w*b.w; } - - // Return Length of the vector squared. - T LengthSq() const { return (x * x + y * y + z * z + w * w); } - - // Return vector length. - T Length() const { return sqrt(LengthSq()); } - - bool IsNormalized() const { return fabs(LengthSq() - T(1)) < Math::Tolerance(); } - - // Normalize, convention vector length to 1. - void Normalize() - { - T s = Length(); - if (s != T(0)) - s = T(1) / s; - *this *= s; - } - - // Returns normalized (unit) version of the vector without modifying itself. - Vector4 Normalized() const - { - T s = Length(); - if (s != T(0)) - s = T(1) / s; - return *this * s; - } - - // Linearly interpolates from this vector to another. - // Factor should be between 0.0 and 1.0, with 0 giving full value to this. - Vector4 Lerp(const Vector4& b, T f) const { return *this*(T(1) - f) + b*f; } -}; - -typedef Vector4 Vector4f; -typedef Vector4 Vector4d; -typedef Vector4 Vector4i; - - -//------------------------------------------------------------------------------------- -// ***** Bounds3 - -// Bounds class used to describe a 3D axis aligned bounding box. - -template -class Bounds3 -{ -public: - Vector3 b[2]; - - Bounds3() - { - } - - Bounds3( const Vector3 & mins, const Vector3 & maxs ) -{ - b[0] = mins; - b[1] = maxs; - } - - void Clear() - { - b[0].x = b[0].y = b[0].z = Math::MaxValue; - b[1].x = b[1].y = b[1].z = -Math::MaxValue; - } - - void AddPoint( const Vector3 & v ) - { - b[0].x = (b[0].x < v.x ? b[0].x : v.x); - b[0].y = (b[0].y < v.y ? b[0].y : v.y); - b[0].z = (b[0].z < v.z ? b[0].z : v.z); - b[1].x = (v.x < b[1].x ? b[1].x : v.x); - b[1].y = (v.y < b[1].y ? b[1].y : v.y); - b[1].z = (v.z < b[1].z ? b[1].z : v.z); - } - - const Vector3 & GetMins() const { return b[0]; } - const Vector3 & GetMaxs() const { return b[1]; } - - Vector3 & GetMins() { return b[0]; } - Vector3 & GetMaxs() { return b[1]; } -}; - -typedef Bounds3 Bounds3f; -typedef Bounds3 Bounds3d; - - -//------------------------------------------------------------------------------------- -// ***** Size - -// Size class represents 2D size with Width, Height components. -// Used to describe distentions of render targets, etc. - -template -class Size -{ -public: - T w, h; - - Size() : w(0), h(0) { } - Size(T w_, T h_) : w(w_), h(h_) { } - explicit Size(T s) : w(s), h(s) { } - explicit Size(const Size::OtherFloatType> &src) - : w((T)src.w), h((T)src.h) { } - - // C-interop support. - typedef typename CompatibleTypes >::Type CompatibleType; - - Size(const CompatibleType& s) : w(s.w), h(s.h) { } - - operator const CompatibleType& () const - { - OVR_MATH_STATIC_ASSERT(sizeof(Size) == sizeof(CompatibleType), "sizeof(Size) failure"); - return reinterpret_cast(*this); - } - - bool operator== (const Size& b) const { return w == b.w && h == b.h; } - bool operator!= (const Size& b) const { return w != b.w || h != b.h; } - - Size operator+ (const Size& b) const { return Size(w + b.w, h + b.h); } - Size& operator+= (const Size& b) { w += b.w; h += b.h; return *this; } - Size operator- (const Size& b) const { return Size(w - b.w, h - b.h); } - Size& operator-= (const Size& b) { w -= b.w; h -= b.h; return *this; } - Size operator- () const { return Size(-w, -h); } - Size operator* (const Size& b) const { return Size(w * b.w, h * b.h); } - Size& operator*= (const Size& b) { w *= b.w; h *= b.h; return *this; } - Size operator/ (const Size& b) const { return Size(w / b.w, h / b.h); } - Size& operator/= (const Size& b) { w /= b.w; h /= b.h; return *this; } - - // Scalar multiplication/division scales both components. - Size operator* (T s) const { return Size(w*s, h*s); } - Size& operator*= (T s) { w *= s; h *= s; return *this; } - Size operator/ (T s) const { return Size(w/s, h/s); } - Size& operator/= (T s) { w /= s; h /= s; return *this; } - - static Size Min(const Size& a, const Size& b) { return Size((a.w < b.w) ? a.w : b.w, - (a.h < b.h) ? a.h : b.h); } - static Size Max(const Size& a, const Size& b) { return Size((a.w > b.w) ? a.w : b.w, - (a.h > b.h) ? a.h : b.h); } - - T Area() const { return w * h; } - - inline Vector2 ToVector() const { return Vector2(w, h); } -}; - - -typedef Size Sizei; -typedef Size Sizeu; -typedef Size Sizef; -typedef Size Sized; - - - -//----------------------------------------------------------------------------------- -// ***** Rect - -// Rect describes a rectangular area for rendering, that includes position and size. -template -class Rect -{ -public: - T x, y; - T w, h; - - Rect() { } - Rect(T x1, T y1, T w1, T h1) : x(x1), y(y1), w(w1), h(h1) { } - Rect(const Vector2& pos, const Size& sz) : x(pos.x), y(pos.y), w(sz.w), h(sz.h) { } - Rect(const Size& sz) : x(0), y(0), w(sz.w), h(sz.h) { } - - // C-interop support. - typedef typename CompatibleTypes >::Type CompatibleType; - - Rect(const CompatibleType& s) : x(s.Pos.x), y(s.Pos.y), w(s.Size.w), h(s.Size.h) { } - - operator const CompatibleType& () const - { - OVR_MATH_STATIC_ASSERT(sizeof(Rect) == sizeof(CompatibleType), "sizeof(Rect) failure"); - return reinterpret_cast(*this); - } - - Vector2 GetPos() const { return Vector2(x, y); } - Size GetSize() const { return Size(w, h); } - void SetPos(const Vector2& pos) { x = pos.x; y = pos.y; } - void SetSize(const Size& sz) { w = sz.w; h = sz.h; } - - bool operator == (const Rect& vp) const - { return (x == vp.x) && (y == vp.y) && (w == vp.w) && (h == vp.h); } - bool operator != (const Rect& vp) const - { return !operator == (vp); } -}; - -typedef Rect Recti; - - -//-------------------------------------------------------------------------------------// -// ***** Quat -// -// Quatf represents a quaternion class used for rotations. -// -// Quaternion multiplications are done in right-to-left order, to match the -// behavior of matrices. - - -template -class Quat -{ -public: - typedef T ElementType; - static const size_t ElementCount = 4; - - // x,y,z = axis*sin(angle), w = cos(angle) - T x, y, z, w; - - Quat() : x(0), y(0), z(0), w(1) { } - Quat(T x_, T y_, T z_, T w_) : x(x_), y(y_), z(z_), w(w_) { } - explicit Quat(const Quat::OtherFloatType> &src) - : x((T)src.x), y((T)src.y), z((T)src.z), w((T)src.w) - { - // NOTE: Converting a normalized Quat to Quat - // will generally result in an un-normalized quaternion. - // But we don't normalize here in case the quaternion - // being converted is not a normalized rotation quaternion. - } - - typedef typename CompatibleTypes >::Type CompatibleType; - - // C-interop support. - Quat(const CompatibleType& s) : x(s.x), y(s.y), z(s.z), w(s.w) { } - - operator CompatibleType () const - { - CompatibleType result; - result.x = x; - result.y = y; - result.z = z; - result.w = w; - return result; - } - - // Constructs quaternion for rotation around the axis by an angle. - Quat(const Vector3& axis, T angle) - { - // Make sure we don't divide by zero. - if (axis.LengthSq() == T(0)) - { - // Assert if the axis is zero, but the angle isn't - OVR_MATH_ASSERT(angle == T(0)); - x = y = z = T(0); w = T(1); - return; - } - - Vector3 unitAxis = axis.Normalized(); - T sinHalfAngle = sin(angle * T(0.5)); - - w = cos(angle * T(0.5)); - x = unitAxis.x * sinHalfAngle; - y = unitAxis.y * sinHalfAngle; - z = unitAxis.z * sinHalfAngle; - } - - // Constructs quaternion for rotation around one of the coordinate axis by an angle. - Quat(Axis A, T angle, RotateDirection d = Rotate_CCW, HandedSystem s = Handed_R) - { - T sinHalfAngle = s * d *sin(angle * T(0.5)); - T v[3]; - v[0] = v[1] = v[2] = T(0); - v[A] = sinHalfAngle; - - w = cos(angle * T(0.5)); - x = v[0]; - y = v[1]; - z = v[2]; - } - - Quat operator-() { return Quat(-x, -y, -z, -w); } // unary minus - - static Quat Identity() { return Quat(0, 0, 0, 1); } - - // Compute axis and angle from quaternion - void GetAxisAngle(Vector3* axis, T* angle) const - { - if ( x*x + y*y + z*z > Math::Tolerance() * Math::Tolerance() ) { - *axis = Vector3(x, y, z).Normalized(); - *angle = 2 * Acos(w); - if (*angle > ((T)MATH_DOUBLE_PI)) // Reduce the magnitude of the angle, if necessary - { - *angle = ((T)MATH_DOUBLE_TWOPI) - *angle; - *axis = *axis * (-1); - } - } - else - { - *axis = Vector3(1, 0, 0); - *angle= T(0); - } - } - - // Convert a quaternion to a rotation vector, also known as - // Rodrigues vector, AxisAngle vector, SORA vector, exponential map. - // A rotation vector describes a rotation about an axis: - // the axis of rotation is the vector normalized, - // the angle of rotation is the magnitude of the vector. - Vector3 ToRotationVector() const - { - OVR_MATH_ASSERT(IsNormalized() || LengthSq() == 0); - T s = T(0); - T sinHalfAngle = sqrt(x*x + y*y + z*z); - if (sinHalfAngle > T(0)) - { - T cosHalfAngle = w; - T halfAngle = atan2(sinHalfAngle, cosHalfAngle); - - // Ensure minimum rotation magnitude - if (cosHalfAngle < 0) - halfAngle -= T(MATH_DOUBLE_PI); - - s = T(2) * halfAngle / sinHalfAngle; - } - return Vector3(x*s, y*s, z*s); - } - - // Faster version of the above, optimized for use with small rotations, where rotation angle ~= sin(angle) - inline OVR::Vector3 FastToRotationVector() const - { - OVR_MATH_ASSERT(IsNormalized()); - T s; - T sinHalfSquared = x*x + y*y + z*z; - if (sinHalfSquared < T(.0037)) // =~ sin(7/2 degrees)^2 - { - // Max rotation magnitude error is about .062% at 7 degrees rotation, or about .0043 degrees - s = T(2) * Sign(w); - } - else - { - T sinHalfAngle = sqrt(sinHalfSquared); - T cosHalfAngle = w; - T halfAngle = atan2(sinHalfAngle, cosHalfAngle); - - // Ensure minimum rotation magnitude - if (cosHalfAngle < 0) - halfAngle -= T(MATH_DOUBLE_PI); - - s = T(2) * halfAngle / sinHalfAngle; - } - return Vector3(x*s, y*s, z*s); - } - - // Given a rotation vector of form unitRotationAxis * angle, - // returns the equivalent quaternion (unitRotationAxis * sin(angle), cos(Angle)). - static Quat FromRotationVector(const Vector3& v) - { - T angleSquared = v.LengthSq(); - T s = T(0); - T c = T(1); - if (angleSquared > T(0)) - { - T angle = sqrt(angleSquared); - s = sin(angle * T(0.5)) / angle; // normalize - c = cos(angle * T(0.5)); - } - return Quat(s*v.x, s*v.y, s*v.z, c); - } - - // Faster version of above, optimized for use with small rotation magnitudes, where rotation angle =~ sin(angle). - // If normalize is false, small-angle quaternions are returned un-normalized. - inline static Quat FastFromRotationVector(const OVR::Vector3& v, bool normalize = true) - { - T s, c; - T angleSquared = v.LengthSq(); - if (angleSquared < T(0.0076)) // =~ (5 degrees*pi/180)^2 - { - s = T(0.5); - c = T(1.0); - // Max rotation magnitude error (after normalization) is about .064% at 5 degrees rotation, or .0032 degrees - if (normalize && angleSquared > 0) - { - // sin(angle/2)^2 ~= (angle/2)^2 and cos(angle/2)^2 ~= 1 - T invLen = T(1) / sqrt(angleSquared * T(0.25) + T(1)); // normalize - s = s * invLen; - c = c * invLen; - } - } - else - { - T angle = sqrt(angleSquared); - s = sin(angle * T(0.5)) / angle; - c = cos(angle * T(0.5)); - } - return Quat(s*v.x, s*v.y, s*v.z, c); - } - - // Constructs the quaternion from a rotation matrix - explicit Quat(const Matrix4& m) - { - T trace = m.M[0][0] + m.M[1][1] + m.M[2][2]; - - // In almost all cases, the first part is executed. - // However, if the trace is not positive, the other - // cases arise. - if (trace > T(0)) - { - T s = sqrt(trace + T(1)) * T(2); // s=4*qw - w = T(0.25) * s; - x = (m.M[2][1] - m.M[1][2]) / s; - y = (m.M[0][2] - m.M[2][0]) / s; - z = (m.M[1][0] - m.M[0][1]) / s; - } - else if ((m.M[0][0] > m.M[1][1])&&(m.M[0][0] > m.M[2][2])) - { - T s = sqrt(T(1) + m.M[0][0] - m.M[1][1] - m.M[2][2]) * T(2); - w = (m.M[2][1] - m.M[1][2]) / s; - x = T(0.25) * s; - y = (m.M[0][1] + m.M[1][0]) / s; - z = (m.M[2][0] + m.M[0][2]) / s; - } - else if (m.M[1][1] > m.M[2][2]) - { - T s = sqrt(T(1) + m.M[1][1] - m.M[0][0] - m.M[2][2]) * T(2); // S=4*qy - w = (m.M[0][2] - m.M[2][0]) / s; - x = (m.M[0][1] + m.M[1][0]) / s; - y = T(0.25) * s; - z = (m.M[1][2] + m.M[2][1]) / s; - } - else - { - T s = sqrt(T(1) + m.M[2][2] - m.M[0][0] - m.M[1][1]) * T(2); // S=4*qz - w = (m.M[1][0] - m.M[0][1]) / s; - x = (m.M[0][2] + m.M[2][0]) / s; - y = (m.M[1][2] + m.M[2][1]) / s; - z = T(0.25) * s; - } - OVR_MATH_ASSERT(IsNormalized()); // Ensure input matrix is orthogonal - } - - // Constructs the quaternion from a rotation matrix - explicit Quat(const Matrix3& m) - { - T trace = m.M[0][0] + m.M[1][1] + m.M[2][2]; - - // In almost all cases, the first part is executed. - // However, if the trace is not positive, the other - // cases arise. - if (trace > T(0)) - { - T s = sqrt(trace + T(1)) * T(2); // s=4*qw - w = T(0.25) * s; - x = (m.M[2][1] - m.M[1][2]) / s; - y = (m.M[0][2] - m.M[2][0]) / s; - z = (m.M[1][0] - m.M[0][1]) / s; - } - else if ((m.M[0][0] > m.M[1][1])&&(m.M[0][0] > m.M[2][2])) - { - T s = sqrt(T(1) + m.M[0][0] - m.M[1][1] - m.M[2][2]) * T(2); - w = (m.M[2][1] - m.M[1][2]) / s; - x = T(0.25) * s; - y = (m.M[0][1] + m.M[1][0]) / s; - z = (m.M[2][0] + m.M[0][2]) / s; - } - else if (m.M[1][1] > m.M[2][2]) - { - T s = sqrt(T(1) + m.M[1][1] - m.M[0][0] - m.M[2][2]) * T(2); // S=4*qy - w = (m.M[0][2] - m.M[2][0]) / s; - x = (m.M[0][1] + m.M[1][0]) / s; - y = T(0.25) * s; - z = (m.M[1][2] + m.M[2][1]) / s; - } - else - { - T s = sqrt(T(1) + m.M[2][2] - m.M[0][0] - m.M[1][1]) * T(2); // S=4*qz - w = (m.M[1][0] - m.M[0][1]) / s; - x = (m.M[0][2] + m.M[2][0]) / s; - y = (m.M[1][2] + m.M[2][1]) / s; - z = T(0.25) * s; - } - OVR_MATH_ASSERT(IsNormalized()); // Ensure input matrix is orthogonal - } - - bool operator== (const Quat& b) const { return x == b.x && y == b.y && z == b.z && w == b.w; } - bool operator!= (const Quat& b) const { return x != b.x || y != b.y || z != b.z || w != b.w; } - - Quat operator+ (const Quat& b) const { return Quat(x + b.x, y + b.y, z + b.z, w + b.w); } - Quat& operator+= (const Quat& b) { w += b.w; x += b.x; y += b.y; z += b.z; return *this; } - Quat operator- (const Quat& b) const { return Quat(x - b.x, y - b.y, z - b.z, w - b.w); } - Quat& operator-= (const Quat& b) { w -= b.w; x -= b.x; y -= b.y; z -= b.z; return *this; } - - Quat operator* (T s) const { return Quat(x * s, y * s, z * s, w * s); } - Quat& operator*= (T s) { w *= s; x *= s; y *= s; z *= s; return *this; } - Quat operator/ (T s) const { T rcp = T(1)/s; return Quat(x * rcp, y * rcp, z * rcp, w *rcp); } - Quat& operator/= (T s) { T rcp = T(1)/s; w *= rcp; x *= rcp; y *= rcp; z *= rcp; return *this; } - - // Compare two quats for equality within tolerance. Returns true if quats match withing tolerance. - bool IsEqual(const Quat& b, T tolerance = Math::Tolerance()) const - { - return Abs(Dot(b)) >= T(1) - tolerance; - } - - static T Abs(const T v) { return (v >= 0) ? v : -v; } - - // Get Imaginary part vector - Vector3 Imag() const { return Vector3(x,y,z); } - - // Get quaternion length. - T Length() const { return sqrt(LengthSq()); } - - // Get quaternion length squared. - T LengthSq() const { return (x * x + y * y + z * z + w * w); } - - // Simple Euclidean distance in R^4 (not SLERP distance, but at least respects Haar measure) - T Distance(const Quat& q) const - { - T d1 = (*this - q).Length(); - T d2 = (*this + q).Length(); // Antipodal point check - return (d1 < d2) ? d1 : d2; - } - - T DistanceSq(const Quat& q) const - { - T d1 = (*this - q).LengthSq(); - T d2 = (*this + q).LengthSq(); // Antipodal point check - return (d1 < d2) ? d1 : d2; - } - - T Dot(const Quat& q) const - { - return x * q.x + y * q.y + z * q.z + w * q.w; - } - - // Angle between two quaternions in radians - T Angle(const Quat& q) const - { - return T(2) * Acos(Abs(Dot(q))); - } - - // Angle of quaternion - T Angle() const - { - return T(2) * Acos(Abs(w)); - } - - // Normalize - bool IsNormalized() const { return fabs(LengthSq() - T(1)) < Math::Tolerance(); } - - void Normalize() - { - T s = Length(); - if (s != T(0)) - s = T(1) / s; - *this *= s; - } - - Quat Normalized() const - { - T s = Length(); - if (s != T(0)) - s = T(1) / s; - return *this * s; - } - - inline void EnsureSameHemisphere(const Quat& o) - { - if (Dot(o) < T(0)) - { - x = -x; - y = -y; - z = -z; - w = -w; - } - } - - // Returns conjugate of the quaternion. Produces inverse rotation if quaternion is normalized. - Quat Conj() const { return Quat(-x, -y, -z, w); } - - // Quaternion multiplication. Combines quaternion rotations, performing the one on the - // right hand side first. - Quat operator* (const Quat& b) const { return Quat(w * b.x + x * b.w + y * b.z - z * b.y, - w * b.y - x * b.z + y * b.w + z * b.x, - w * b.z + x * b.y - y * b.x + z * b.w, - w * b.w - x * b.x - y * b.y - z * b.z); } - const Quat& operator*= (const Quat& b) { *this = *this * b; return *this; } - - // - // this^p normalized; same as rotating by this p times. - Quat PowNormalized(T p) const - { - Vector3 v; - T a; - GetAxisAngle(&v, &a); - return Quat(v, a * p); - } - - // Compute quaternion that rotates v into alignTo: alignTo = Quat::Align(alignTo, v).Rotate(v). - // NOTE: alignTo and v must be normalized. - static Quat Align(const Vector3& alignTo, const Vector3& v) - { - OVR_MATH_ASSERT(alignTo.IsNormalized() && v.IsNormalized()); - Vector3 bisector = (v + alignTo); - bisector.Normalize(); - T cosHalfAngle = v.Dot(bisector); // 0..1 - if (cosHalfAngle > T(0)) - { - Vector3 imag = v.Cross(bisector); - return Quat(imag.x, imag.y, imag.z, cosHalfAngle); - } - else - { - // cosHalfAngle == 0: a 180 degree rotation. - // sinHalfAngle == 1, rotation axis is any axis perpendicular - // to alignTo. Choose axis to include largest magnitude components - if (fabs(v.x) > fabs(v.y)) - { - // x or z is max magnitude component - // = Cross(v, (0,1,0)).Normalized(); - T invLen = sqrt(v.x*v.x + v.z*v.z); - if (invLen > T(0)) - invLen = T(1) / invLen; - return Quat(-v.z*invLen, 0, v.x*invLen, 0); - } - else - { - // y or z is max magnitude component - // = Cross(v, (1,0,0)).Normalized(); - T invLen = sqrt(v.y*v.y + v.z*v.z); - if (invLen > T(0)) - invLen = T(1) / invLen; - return Quat(0, v.z*invLen, -v.y*invLen, 0); - } - } - } - - // Decompose a quat into quat = swing * twist, where twist is a rotation about axis, - // and swing is a rotation perpendicular to axis. - Quat GetSwingTwist(const Vector3& axis, Quat* twist) const - { - OVR_MATH_ASSERT(twist); - OVR_MATH_ASSERT(axis.IsNormalized()); - - // Create a normalized quaternion from projection of (x,y,z) onto axis - T d = axis.Dot(Vector3(x, y, z)); - *twist = Quat(axis.x*d, axis.y*d, axis.z*d, w); - T len = twist->Length(); - if (len == 0) - twist->w = T(1); // identity - else - *twist /= len; // normalize - - return *this * twist->Inverted(); - } - - // Normalized linear interpolation of quaternions - // NOTE: This function is a bad approximation of Slerp() - // when the angle between the *this and b is large. - // Use FastSlerp() or Slerp() instead. - Quat Lerp(const Quat& b, T s) const - { - return (*this * (T(1) - s) + b * (Dot(b) < 0 ? -s : s)).Normalized(); - } - - // Spherical linear interpolation between rotations - Quat Slerp(const Quat& b, T s) const - { - Vector3 delta = (b * this->Inverted()).ToRotationVector(); - return (FromRotationVector(delta * s) * *this).Normalized(); // normalize so errors don't accumulate - } - - // Spherical linear interpolation: much faster for small rotations, accurate for large rotations. See FastTo/FromRotationVector - Quat FastSlerp(const Quat& b, T s) const - { - Vector3 delta = (b * this->Inverted()).FastToRotationVector(); - return (FastFromRotationVector(delta * s, false) * *this).Normalized(); - } - - // Rotate transforms vector in a manner that matches Matrix rotations (counter-clockwise, - // assuming negative direction of the axis). Standard formula: q(t) * V * q(t)^-1. - Vector3 Rotate(const Vector3& v) const - { - OVR_MATH_ASSERT(isnan(w) || IsNormalized()); - - // rv = q * (v,0) * q' - // Same as rv = v + real * cross(imag,v)*2 + cross(imag, cross(imag,v)*2); - - // uv = 2 * Imag().Cross(v); - T uvx = T(2) * (y*v.z - z*v.y); - T uvy = T(2) * (z*v.x - x*v.z); - T uvz = T(2) * (x*v.y - y*v.x); - - // return v + Real()*uv + Imag().Cross(uv); - return Vector3(v.x + w*uvx + y*uvz - z*uvy, - v.y + w*uvy + z*uvx - x*uvz, - v.z + w*uvz + x*uvy - y*uvx); - } - - // Rotation by inverse of *this - Vector3 InverseRotate(const Vector3& v) const - { - OVR_MATH_ASSERT(IsNormalized()); - - // rv = q' * (v,0) * q - // Same as rv = v + real * cross(-imag,v)*2 + cross(-imag, cross(-imag,v)*2); - // or rv = v - real * cross(imag,v)*2 + cross(imag, cross(imag,v)*2); - - // uv = 2 * Imag().Cross(v); - T uvx = T(2) * (y*v.z - z*v.y); - T uvy = T(2) * (z*v.x - x*v.z); - T uvz = T(2) * (x*v.y - y*v.x); - - // return v - Real()*uv + Imag().Cross(uv); - return Vector3(v.x - w*uvx + y*uvz - z*uvy, - v.y - w*uvy + z*uvx - x*uvz, - v.z - w*uvz + x*uvy - y*uvx); - } - - // Inversed quaternion rotates in the opposite direction. - Quat Inverted() const - { - return Quat(-x, -y, -z, w); - } - - Quat Inverse() const - { - return Quat(-x, -y, -z, w); - } - - // Sets this quaternion to the one rotates in the opposite direction. - void Invert() - { - *this = Quat(-x, -y, -z, w); - } - - // Time integration of constant angular velocity over dt - Quat TimeIntegrate(Vector3 angularVelocity, T dt) const - { - // solution is: this * exp( omega*dt/2 ); FromRotationVector(v) gives exp(v*.5). - return (*this * FastFromRotationVector(angularVelocity * dt, false)).Normalized(); - } - - // Time integration of constant angular acceleration and velocity over dt - // These are the first two terms of the "Magnus expansion" of the solution - // - // o = o * exp( W=(W1 + W2 + W3+...) * 0.5 ); - // - // omega1 = (omega + omegaDot*dt) - // W1 = (omega + omega1)*dt/2 - // W2 = cross(omega, omega1)/12*dt^2 % (= -cross(omega_dot, omega)/12*dt^3) - // Terms 3 and beyond are vanishingly small: - // W3 = cross(omega_dot, cross(omega_dot, omega))/240*dt^5 - // - Quat TimeIntegrate(Vector3 angularVelocity, Vector3 angularAcceleration, T dt) const - { - const Vector3& omega = angularVelocity; - const Vector3& omegaDot = angularAcceleration; - - Vector3 omega1 = (omega + omegaDot * dt); - Vector3 W = ( (omega + omega1) + omega.Cross(omega1) * (dt/T(6)) ) * (dt/T(2)); - - // FromRotationVector(v) is exp(v*.5) - return (*this * FastFromRotationVector(W, false)).Normalized(); - } - - // Decompose rotation into three rotations: - // roll radians about Z axis, then pitch radians about X axis, then yaw radians about Y axis. - // Call with nullptr if a return value is not needed. - void GetYawPitchRoll(T* yaw, T* pitch, T* roll) const - { - return GetEulerAngles(yaw, pitch, roll); - } - - // GetEulerAngles extracts Euler angles from the quaternion, in the specified order of - // axis rotations and the specified coordinate system. Right-handed coordinate system - // is the default, with CCW rotations while looking in the negative axis direction. - // Here a,b,c, are the Yaw/Pitch/Roll angles to be returned. - // Rotation order is c, b, a: - // rotation c around axis A3 - // is followed by rotation b around axis A2 - // is followed by rotation a around axis A1 - // rotations are CCW or CW (D) in LH or RH coordinate system (S) - // - template - void GetEulerAngles(T *a, T *b, T *c) const - { - OVR_MATH_ASSERT(IsNormalized()); - OVR_MATH_STATIC_ASSERT((A1 != A2) && (A2 != A3) && (A1 != A3), "(A1 != A2) && (A2 != A3) && (A1 != A3)"); - - T Q[3] = { x, y, z }; //Quaternion components x,y,z - - T ww = w*w; - T Q11 = Q[A1]*Q[A1]; - T Q22 = Q[A2]*Q[A2]; - T Q33 = Q[A3]*Q[A3]; - - T psign = T(-1); - // Determine whether even permutation - if (((A1 + 1) % 3 == A2) && ((A2 + 1) % 3 == A3)) - psign = T(1); - - T s2 = psign * T(2) * (psign*w*Q[A2] + Q[A1]*Q[A3]); - - T singularityRadius = Math::SingularityRadius(); - if (s2 < T(-1) + singularityRadius) - { // South pole singularity - if (a) *a = T(0); - if (b) *b = -S*D*((T)MATH_DOUBLE_PIOVER2); - if (c) *c = S*D*atan2(T(2)*(psign*Q[A1] * Q[A2] + w*Q[A3]), ww + Q22 - Q11 - Q33 ); - } - else if (s2 > T(1) - singularityRadius) - { // North pole singularity - if (a) *a = T(0); - if (b) *b = S*D*((T)MATH_DOUBLE_PIOVER2); - if (c) *c = S*D*atan2(T(2)*(psign*Q[A1] * Q[A2] + w*Q[A3]), ww + Q22 - Q11 - Q33); - } - else - { - if (a) *a = -S*D*atan2(T(-2)*(w*Q[A1] - psign*Q[A2] * Q[A3]), ww + Q33 - Q11 - Q22); - if (b) *b = S*D*asin(s2); - if (c) *c = S*D*atan2(T(2)*(w*Q[A3] - psign*Q[A1] * Q[A2]), ww + Q11 - Q22 - Q33); - } - } - - template - void GetEulerAngles(T *a, T *b, T *c) const - { GetEulerAngles(a, b, c); } - - template - void GetEulerAngles(T *a, T *b, T *c) const - { GetEulerAngles(a, b, c); } - - // GetEulerAnglesABA extracts Euler angles from the quaternion, in the specified order of - // axis rotations and the specified coordinate system. Right-handed coordinate system - // is the default, with CCW rotations while looking in the negative axis direction. - // Here a,b,c, are the Yaw/Pitch/Roll angles to be returned. - // rotation a around axis A1 - // is followed by rotation b around axis A2 - // is followed by rotation c around axis A1 - // Rotations are CCW or CW (D) in LH or RH coordinate system (S) - template - void GetEulerAnglesABA(T *a, T *b, T *c) const - { - OVR_MATH_ASSERT(IsNormalized()); - OVR_MATH_STATIC_ASSERT(A1 != A2, "A1 != A2"); - - T Q[3] = {x, y, z}; // Quaternion components - - // Determine the missing axis that was not supplied - int m = 3 - A1 - A2; - - T ww = w*w; - T Q11 = Q[A1]*Q[A1]; - T Q22 = Q[A2]*Q[A2]; - T Qmm = Q[m]*Q[m]; - - T psign = T(-1); - if ((A1 + 1) % 3 == A2) // Determine whether even permutation - { - psign = T(1); - } - - T c2 = ww + Q11 - Q22 - Qmm; - T singularityRadius = Math::SingularityRadius(); - if (c2 < T(-1) + singularityRadius) - { // South pole singularity - if (a) *a = T(0); - if (b) *b = S*D*((T)MATH_DOUBLE_PI); - if (c) *c = S*D*atan2(T(2)*(w*Q[A1] - psign*Q[A2] * Q[m]), - ww + Q22 - Q11 - Qmm); - } - else if (c2 > T(1) - singularityRadius) - { // North pole singularity - if (a) *a = T(0); - if (b) *b = T(0); - if (c) *c = S*D*atan2(T(2)*(w*Q[A1] - psign*Q[A2] * Q[m]), - ww + Q22 - Q11 - Qmm); - } - else - { - if (a) *a = S*D*atan2(psign*w*Q[m] + Q[A1] * Q[A2], - w*Q[A2] -psign*Q[A1]*Q[m]); - if (b) *b = S*D*acos(c2); - if (c) *c = S*D*atan2(-psign*w*Q[m] + Q[A1] * Q[A2], - w*Q[A2] + psign*Q[A1]*Q[m]); - } - } -}; - -typedef Quat Quatf; -typedef Quat Quatd; - -OVR_MATH_STATIC_ASSERT((sizeof(Quatf) == 4*sizeof(float)), "sizeof(Quatf) failure"); -OVR_MATH_STATIC_ASSERT((sizeof(Quatd) == 4*sizeof(double)), "sizeof(Quatd) failure"); - -//------------------------------------------------------------------------------------- -// ***** Pose -// -// Position and orientation combined. -// -// This structure needs to be the same size and layout on 32-bit and 64-bit arch. -// Update OVR_PadCheck.cpp when updating this object. -template -class Pose -{ -public: - typedef typename CompatibleTypes >::Type CompatibleType; - - Pose() { } - Pose(const Quat& orientation, const Vector3& pos) - : Rotation(orientation), Translation(pos) { } - Pose(const Pose& s) - : Rotation(s.Rotation), Translation(s.Translation) { } - Pose(const Matrix3& R, const Vector3& t) - : Rotation((Quat)R), Translation(t) { } - Pose(const CompatibleType& s) - : Rotation(s.Orientation), Translation(s.Position) { } - - explicit Pose(const Pose::OtherFloatType> &s) - : Rotation(s.Rotation), Translation(s.Translation) - { - // Ensure normalized rotation if converting from float to double - if (sizeof(T) > sizeof(typename Math::OtherFloatType)) - Rotation.Normalize(); - } - - static Pose Identity() { return Pose(Quat(0, 0, 0, 1), Vector3(0, 0, 0)); } - - void SetIdentity() { Rotation = Quat(0, 0, 0, 1); Translation = Vector3(0, 0, 0); } - - // used to make things obviously broken if someone tries to use the value - void SetInvalid() { Rotation = Quat(NAN, NAN, NAN, NAN); Translation = Vector3(NAN, NAN, NAN); } - - bool IsEqual(const Pose&b, T tolerance = Math::Tolerance()) const - { - return Translation.IsEqual(b.Translation, tolerance) && Rotation.IsEqual(b.Rotation, tolerance); - } - - operator typename CompatibleTypes >::Type () const - { - typename CompatibleTypes >::Type result; - result.Orientation = Rotation; - result.Position = Translation; - return result; - } - - Quat Rotation; - Vector3 Translation; - - OVR_MATH_STATIC_ASSERT((sizeof(T) == sizeof(double) || sizeof(T) == sizeof(float)), "(sizeof(T) == sizeof(double) || sizeof(T) == sizeof(float))"); - - void ToArray(T* arr) const - { - T temp[7] = { Rotation.x, Rotation.y, Rotation.z, Rotation.w, Translation.x, Translation.y, Translation.z }; - for (int i = 0; i < 7; i++) arr[i] = temp[i]; - } - - static Pose FromArray(const T* v) - { - Quat rotation(v[0], v[1], v[2], v[3]); - Vector3 translation(v[4], v[5], v[6]); - // Ensure rotation is normalized, in case it was originally a float, stored in a .json file, etc. - return Pose(rotation.Normalized(), translation); - } - - Vector3 Rotate(const Vector3& v) const - { - return Rotation.Rotate(v); - } - - Vector3 InverseRotate(const Vector3& v) const - { - return Rotation.InverseRotate(v); - } - - Vector3 Translate(const Vector3& v) const - { - return v + Translation; - } - - Vector3 Transform(const Vector3& v) const - { - return Rotate(v) + Translation; - } - - Vector3 InverseTransform(const Vector3& v) const - { - return InverseRotate(v - Translation); - } - - - Vector3 Apply(const Vector3& v) const - { - return Transform(v); - } - - Pose operator*(const Pose& other) const - { - return Pose(Rotation * other.Rotation, Apply(other.Translation)); - } - - Pose Inverted() const - { - Quat inv = Rotation.Inverted(); - return Pose(inv, inv.Rotate(-Translation)); - } - - // Interpolation between two poses: translation is interpolated with Lerp(), - // and rotations are interpolated with Slerp(). - Pose Lerp(const Pose& b, T s) - { - return Pose(Rotation.Slerp(b.Rotation, s), Translation.Lerp(b.Translation, s)); - } - - // Similar to Lerp above, except faster in case of small rotation differences. See Quat::FastSlerp. - Pose FastLerp(const Pose& b, T s) - { - return Pose(Rotation.FastSlerp(b.Rotation, s), Translation.Lerp(b.Translation, s)); - } - - Pose TimeIntegrate(const Vector3& linearVelocity, const Vector3& angularVelocity, T dt) const - { - return Pose( - (Rotation * Quat::FastFromRotationVector(angularVelocity * dt, false)).Normalized(), - Translation + linearVelocity * dt); - } - - Pose TimeIntegrate(const Vector3& linearVelocity, const Vector3& linearAcceleration, - const Vector3& angularVelocity, const Vector3& angularAcceleration, - T dt) const - { - return Pose(Rotation.TimeIntegrate(angularVelocity, angularAcceleration, dt), - Translation + linearVelocity*dt + linearAcceleration*dt*dt * T(0.5)); - } -}; - -typedef Pose Posef; -typedef Pose Posed; - -OVR_MATH_STATIC_ASSERT((sizeof(Posed) == sizeof(Quatd) + sizeof(Vector3d)), "sizeof(Posed) failure"); -OVR_MATH_STATIC_ASSERT((sizeof(Posef) == sizeof(Quatf) + sizeof(Vector3f)), "sizeof(Posef) failure"); - - -//------------------------------------------------------------------------------------- -// ***** Matrix4 -// -// Matrix4 is a 4x4 matrix used for 3d transformations and projections. -// Translation stored in the last column. -// The matrix is stored in row-major order in memory, meaning that values -// of the first row are stored before the next one. -// -// The arrangement of the matrix is chosen to be in Right-Handed -// coordinate system and counterclockwise rotations when looking down -// the axis -// -// Transformation Order: -// - Transformations are applied from right to left, so the expression -// M1 * M2 * M3 * V means that the vector V is transformed by M3 first, -// followed by M2 and M1. -// -// Coordinate system: Right Handed -// -// Rotations: Counterclockwise when looking down the axis. All angles are in radians. -// -// | sx 01 02 tx | // First column (sx, 10, 20): Axis X basis vector. -// | 10 sy 12 ty | // Second column (01, sy, 21): Axis Y basis vector. -// | 20 21 sz tz | // Third columnt (02, 12, sz): Axis Z basis vector. -// | 30 31 32 33 | -// -// The basis vectors are first three columns. - -template -class Matrix4 -{ -public: - typedef T ElementType; - static const size_t Dimension = 4; - - T M[4][4]; - - enum NoInitType { NoInit }; - - // Construct with no memory initialization. - Matrix4(NoInitType) { } - - // By default, we construct identity matrix. - Matrix4() - { - M[0][0] = M[1][1] = M[2][2] = M[3][3] = T(1); - M[0][1] = M[1][0] = M[2][3] = M[3][1] = T(0); - M[0][2] = M[1][2] = M[2][0] = M[3][2] = T(0); - M[0][3] = M[1][3] = M[2][1] = M[3][0] = T(0); - } - - Matrix4(T m11, T m12, T m13, T m14, - T m21, T m22, T m23, T m24, - T m31, T m32, T m33, T m34, - T m41, T m42, T m43, T m44) - { - M[0][0] = m11; M[0][1] = m12; M[0][2] = m13; M[0][3] = m14; - M[1][0] = m21; M[1][1] = m22; M[1][2] = m23; M[1][3] = m24; - M[2][0] = m31; M[2][1] = m32; M[2][2] = m33; M[2][3] = m34; - M[3][0] = m41; M[3][1] = m42; M[3][2] = m43; M[3][3] = m44; - } - - Matrix4(T m11, T m12, T m13, - T m21, T m22, T m23, - T m31, T m32, T m33) - { - M[0][0] = m11; M[0][1] = m12; M[0][2] = m13; M[0][3] = T(0); - M[1][0] = m21; M[1][1] = m22; M[1][2] = m23; M[1][3] = T(0); - M[2][0] = m31; M[2][1] = m32; M[2][2] = m33; M[2][3] = T(0); - M[3][0] = T(0); M[3][1] = T(0); M[3][2] = T(0); M[3][3] = T(1); - } - - explicit Matrix4(const Matrix3& m) - { - M[0][0] = m.M[0][0]; M[0][1] = m.M[0][1]; M[0][2] = m.M[0][2]; M[0][3] = T(0); - M[1][0] = m.M[1][0]; M[1][1] = m.M[1][1]; M[1][2] = m.M[1][2]; M[1][3] = T(0); - M[2][0] = m.M[2][0]; M[2][1] = m.M[2][1]; M[2][2] = m.M[2][2]; M[2][3] = T(0); - M[3][0] = T(0); M[3][1] = T(0); M[3][2] = T(0); M[3][3] = T(1); - } - - explicit Matrix4(const Quat& q) - { - OVR_MATH_ASSERT(q.IsNormalized()); - T ww = q.w*q.w; - T xx = q.x*q.x; - T yy = q.y*q.y; - T zz = q.z*q.z; - - M[0][0] = ww + xx - yy - zz; M[0][1] = 2 * (q.x*q.y - q.w*q.z); M[0][2] = 2 * (q.x*q.z + q.w*q.y); M[0][3] = T(0); - M[1][0] = 2 * (q.x*q.y + q.w*q.z); M[1][1] = ww - xx + yy - zz; M[1][2] = 2 * (q.y*q.z - q.w*q.x); M[1][3] = T(0); - M[2][0] = 2 * (q.x*q.z - q.w*q.y); M[2][1] = 2 * (q.y*q.z + q.w*q.x); M[2][2] = ww - xx - yy + zz; M[2][3] = T(0); - M[3][0] = T(0); M[3][1] = T(0); M[3][2] = T(0); M[3][3] = T(1); - } - - explicit Matrix4(const Pose& p) - { - Matrix4 result(p.Rotation); - result.SetTranslation(p.Translation); - *this = result; - } - - - // C-interop support - explicit Matrix4(const Matrix4::OtherFloatType> &src) - { - for (int i = 0; i < 4; i++) - for (int j = 0; j < 4; j++) - M[i][j] = (T)src.M[i][j]; - } - - // C-interop support. - Matrix4(const typename CompatibleTypes >::Type& s) - { - OVR_MATH_STATIC_ASSERT(sizeof(s) == sizeof(Matrix4), "sizeof(s) == sizeof(Matrix4)"); - memcpy(M, s.M, sizeof(M)); - } - - operator typename CompatibleTypes >::Type () const - { - typename CompatibleTypes >::Type result; - OVR_MATH_STATIC_ASSERT(sizeof(result) == sizeof(Matrix4), "sizeof(result) == sizeof(Matrix4)"); - memcpy(result.M, M, sizeof(M)); - return result; - } - - void ToString(char* dest, size_t destsize) const - { - size_t pos = 0; - for (int r=0; r<4; r++) - { - for (int c=0; c<4; c++) - { - pos += OVRMath_sprintf(dest+pos, destsize-pos, "%g ", M[r][c]); - } - } - } - - static Matrix4 FromString(const char* src) - { - Matrix4 result; - if (src) - { - for (int r = 0; r < 4; r++) - { - for (int c = 0; c < 4; c++) - { - result.M[r][c] = (T)atof(src); - while (*src && *src != ' ') - { - src++; - } - while (*src && *src == ' ') - { - src++; - } - } - } - } - return result; - } - - static Matrix4 Identity() { return Matrix4(); } - - void SetIdentity() - { - M[0][0] = M[1][1] = M[2][2] = M[3][3] = T(1); - M[0][1] = M[1][0] = M[2][3] = M[3][1] = T(0); - M[0][2] = M[1][2] = M[2][0] = M[3][2] = T(0); - M[0][3] = M[1][3] = M[2][1] = M[3][0] = T(0); - } - - void SetXBasis(const Vector3& v) - { - M[0][0] = v.x; - M[1][0] = v.y; - M[2][0] = v.z; - } - Vector3 GetXBasis() const - { - return Vector3(M[0][0], M[1][0], M[2][0]); - } - - void SetYBasis(const Vector3 & v) - { - M[0][1] = v.x; - M[1][1] = v.y; - M[2][1] = v.z; - } - Vector3 GetYBasis() const - { - return Vector3(M[0][1], M[1][1], M[2][1]); - } - - void SetZBasis(const Vector3 & v) - { - M[0][2] = v.x; - M[1][2] = v.y; - M[2][2] = v.z; - } - Vector3 GetZBasis() const - { - return Vector3(M[0][2], M[1][2], M[2][2]); - } - - bool operator== (const Matrix4& b) const - { - bool isEqual = true; - for (int i = 0; i < 4; i++) - for (int j = 0; j < 4; j++) - isEqual &= (M[i][j] == b.M[i][j]); - - return isEqual; - } - - Matrix4 operator+ (const Matrix4& b) const - { - Matrix4 result(*this); - result += b; - return result; - } - - Matrix4& operator+= (const Matrix4& b) - { - for (int i = 0; i < 4; i++) - for (int j = 0; j < 4; j++) - M[i][j] += b.M[i][j]; - return *this; - } - - Matrix4 operator- (const Matrix4& b) const - { - Matrix4 result(*this); - result -= b; - return result; - } - - Matrix4& operator-= (const Matrix4& b) - { - for (int i = 0; i < 4; i++) - for (int j = 0; j < 4; j++) - M[i][j] -= b.M[i][j]; - return *this; - } - - // Multiplies two matrices into destination with minimum copying. - static Matrix4& Multiply(Matrix4* d, const Matrix4& a, const Matrix4& b) - { - OVR_MATH_ASSERT((d != &a) && (d != &b)); - int i = 0; - do { - d->M[i][0] = a.M[i][0] * b.M[0][0] + a.M[i][1] * b.M[1][0] + a.M[i][2] * b.M[2][0] + a.M[i][3] * b.M[3][0]; - d->M[i][1] = a.M[i][0] * b.M[0][1] + a.M[i][1] * b.M[1][1] + a.M[i][2] * b.M[2][1] + a.M[i][3] * b.M[3][1]; - d->M[i][2] = a.M[i][0] * b.M[0][2] + a.M[i][1] * b.M[1][2] + a.M[i][2] * b.M[2][2] + a.M[i][3] * b.M[3][2]; - d->M[i][3] = a.M[i][0] * b.M[0][3] + a.M[i][1] * b.M[1][3] + a.M[i][2] * b.M[2][3] + a.M[i][3] * b.M[3][3]; - } while((++i) < 4); - - return *d; - } - - Matrix4 operator* (const Matrix4& b) const - { - Matrix4 result(Matrix4::NoInit); - Multiply(&result, *this, b); - return result; - } - - Matrix4& operator*= (const Matrix4& b) - { - return Multiply(this, Matrix4(*this), b); - } - - Matrix4 operator* (T s) const - { - Matrix4 result(*this); - result *= s; - return result; - } - - Matrix4& operator*= (T s) - { - for (int i = 0; i < 4; i++) - for (int j = 0; j < 4; j++) - M[i][j] *= s; - return *this; - } - - - Matrix4 operator/ (T s) const - { - Matrix4 result(*this); - result /= s; - return result; - } - - Matrix4& operator/= (T s) - { - for (int i = 0; i < 4; i++) - for (int j = 0; j < 4; j++) - M[i][j] /= s; - return *this; - } - - Vector3 Transform(const Vector3& v) const - { - const T rcpW = T(1) / (M[3][0] * v.x + M[3][1] * v.y + M[3][2] * v.z + M[3][3]); - return Vector3((M[0][0] * v.x + M[0][1] * v.y + M[0][2] * v.z + M[0][3]) * rcpW, - (M[1][0] * v.x + M[1][1] * v.y + M[1][2] * v.z + M[1][3]) * rcpW, - (M[2][0] * v.x + M[2][1] * v.y + M[2][2] * v.z + M[2][3]) * rcpW); - } - - Vector4 Transform(const Vector4& v) const - { - return Vector4(M[0][0] * v.x + M[0][1] * v.y + M[0][2] * v.z + M[0][3] * v.w, - M[1][0] * v.x + M[1][1] * v.y + M[1][2] * v.z + M[1][3] * v.w, - M[2][0] * v.x + M[2][1] * v.y + M[2][2] * v.z + M[2][3] * v.w, - M[3][0] * v.x + M[3][1] * v.y + M[3][2] * v.z + M[3][3] * v.w); - } - - Matrix4 Transposed() const - { - return Matrix4(M[0][0], M[1][0], M[2][0], M[3][0], - M[0][1], M[1][1], M[2][1], M[3][1], - M[0][2], M[1][2], M[2][2], M[3][2], - M[0][3], M[1][3], M[2][3], M[3][3]); - } - - void Transpose() - { - *this = Transposed(); - } - - - T SubDet (const size_t* rows, const size_t* cols) const - { - return M[rows[0]][cols[0]] * (M[rows[1]][cols[1]] * M[rows[2]][cols[2]] - M[rows[1]][cols[2]] * M[rows[2]][cols[1]]) - - M[rows[0]][cols[1]] * (M[rows[1]][cols[0]] * M[rows[2]][cols[2]] - M[rows[1]][cols[2]] * M[rows[2]][cols[0]]) - + M[rows[0]][cols[2]] * (M[rows[1]][cols[0]] * M[rows[2]][cols[1]] - M[rows[1]][cols[1]] * M[rows[2]][cols[0]]); - } - - T Cofactor(size_t I, size_t J) const - { - const size_t indices[4][3] = {{1,2,3},{0,2,3},{0,1,3},{0,1,2}}; - return ((I+J)&1) ? -SubDet(indices[I],indices[J]) : SubDet(indices[I],indices[J]); - } - - T Determinant() const - { - return M[0][0] * Cofactor(0,0) + M[0][1] * Cofactor(0,1) + M[0][2] * Cofactor(0,2) + M[0][3] * Cofactor(0,3); - } - - Matrix4 Adjugated() const - { - return Matrix4(Cofactor(0,0), Cofactor(1,0), Cofactor(2,0), Cofactor(3,0), - Cofactor(0,1), Cofactor(1,1), Cofactor(2,1), Cofactor(3,1), - Cofactor(0,2), Cofactor(1,2), Cofactor(2,2), Cofactor(3,2), - Cofactor(0,3), Cofactor(1,3), Cofactor(2,3), Cofactor(3,3)); - } - - Matrix4 Inverted() const - { - T det = Determinant(); - OVR_MATH_ASSERT(det != 0); - return Adjugated() * (T(1)/det); - } - - void Invert() - { - *this = Inverted(); - } - - // This is more efficient than general inverse, but ONLY works - // correctly if it is a homogeneous transform matrix (rot + trans) - Matrix4 InvertedHomogeneousTransform() const - { - // Make the inverse rotation matrix - Matrix4 rinv = this->Transposed(); - rinv.M[3][0] = rinv.M[3][1] = rinv.M[3][2] = T(0); - // Make the inverse translation matrix - Vector3 tvinv(-M[0][3],-M[1][3],-M[2][3]); - Matrix4 tinv = Matrix4::Translation(tvinv); - return rinv * tinv; // "untranslate", then "unrotate" - } - - // This is more efficient than general inverse, but ONLY works - // correctly if it is a homogeneous transform matrix (rot + trans) - void InvertHomogeneousTransform() - { - *this = InvertedHomogeneousTransform(); - } - - // Matrix to Euler Angles conversion - // a,b,c, are the YawPitchRoll angles to be returned - // rotation a around axis A1 - // is followed by rotation b around axis A2 - // is followed by rotation c around axis A3 - // rotations are CCW or CW (D) in LH or RH coordinate system (S) - template - void ToEulerAngles(T *a, T *b, T *c) const - { - OVR_MATH_STATIC_ASSERT((A1 != A2) && (A2 != A3) && (A1 != A3), "(A1 != A2) && (A2 != A3) && (A1 != A3)"); - - T psign = T(-1); - if (((A1 + 1) % 3 == A2) && ((A2 + 1) % 3 == A3)) // Determine whether even permutation - psign = T(1); - - T pm = psign*M[A1][A3]; - T singularityRadius = Math::SingularityRadius(); - if (pm < T(-1) + singularityRadius) - { // South pole singularity - *a = T(0); - *b = -S*D*((T)MATH_DOUBLE_PIOVER2); - *c = S*D*atan2( psign*M[A2][A1], M[A2][A2] ); - } - else if (pm > T(1) - singularityRadius) - { // North pole singularity - *a = T(0); - *b = S*D*((T)MATH_DOUBLE_PIOVER2); - *c = S*D*atan2( psign*M[A2][A1], M[A2][A2] ); - } - else - { // Normal case (nonsingular) - *a = S*D*atan2( -psign*M[A2][A3], M[A3][A3] ); - *b = S*D*asin(pm); - *c = S*D*atan2( -psign*M[A1][A2], M[A1][A1] ); - } - } - - // Matrix to Euler Angles conversion - // a,b,c, are the YawPitchRoll angles to be returned - // rotation a around axis A1 - // is followed by rotation b around axis A2 - // is followed by rotation c around axis A1 - // rotations are CCW or CW (D) in LH or RH coordinate system (S) - template - void ToEulerAnglesABA(T *a, T *b, T *c) const - { - OVR_MATH_STATIC_ASSERT(A1 != A2, "A1 != A2"); - - // Determine the axis that was not supplied - int m = 3 - A1 - A2; - - T psign = T(-1); - if ((A1 + 1) % 3 == A2) // Determine whether even permutation - psign = T(1); - - T c2 = M[A1][A1]; - T singularityRadius = Math::SingularityRadius(); - if (c2 < T(-1) + singularityRadius) - { // South pole singularity - *a = T(0); - *b = S*D*((T)MATH_DOUBLE_PI); - *c = S*D*atan2( -psign*M[A2][m],M[A2][A2]); - } - else if (c2 > T(1) - singularityRadius) - { // North pole singularity - *a = T(0); - *b = T(0); - *c = S*D*atan2( -psign*M[A2][m],M[A2][A2]); - } - else - { // Normal case (nonsingular) - *a = S*D*atan2( M[A2][A1],-psign*M[m][A1]); - *b = S*D*acos(c2); - *c = S*D*atan2( M[A1][A2],psign*M[A1][m]); - } - } - - // Creates a matrix that converts the vertices from one coordinate system - // to another. - static Matrix4 AxisConversion(const WorldAxes& to, const WorldAxes& from) - { - // Holds axis values from the 'to' structure - int toArray[3] = { to.XAxis, to.YAxis, to.ZAxis }; - - // The inverse of the toArray - int inv[4]; - inv[0] = inv[abs(to.XAxis)] = 0; - inv[abs(to.YAxis)] = 1; - inv[abs(to.ZAxis)] = 2; - - Matrix4 m(0, 0, 0, - 0, 0, 0, - 0, 0, 0); - - // Only three values in the matrix need to be changed to 1 or -1. - m.M[inv[abs(from.XAxis)]][0] = T(from.XAxis/toArray[inv[abs(from.XAxis)]]); - m.M[inv[abs(from.YAxis)]][1] = T(from.YAxis/toArray[inv[abs(from.YAxis)]]); - m.M[inv[abs(from.ZAxis)]][2] = T(from.ZAxis/toArray[inv[abs(from.ZAxis)]]); - return m; - } - - - // Creates a matrix for translation by vector - static Matrix4 Translation(const Vector3& v) - { - Matrix4 t; - t.M[0][3] = v.x; - t.M[1][3] = v.y; - t.M[2][3] = v.z; - return t; - } - - // Creates a matrix for translation by vector - static Matrix4 Translation(T x, T y, T z = T(0)) - { - Matrix4 t; - t.M[0][3] = x; - t.M[1][3] = y; - t.M[2][3] = z; - return t; - } - - // Sets the translation part - void SetTranslation(const Vector3& v) - { - M[0][3] = v.x; - M[1][3] = v.y; - M[2][3] = v.z; - } - - Vector3 GetTranslation() const - { - return Vector3( M[0][3], M[1][3], M[2][3] ); - } - - // Creates a matrix for scaling by vector - static Matrix4 Scaling(const Vector3& v) - { - Matrix4 t; - t.M[0][0] = v.x; - t.M[1][1] = v.y; - t.M[2][2] = v.z; - return t; - } - - // Creates a matrix for scaling by vector - static Matrix4 Scaling(T x, T y, T z) - { - Matrix4 t; - t.M[0][0] = x; - t.M[1][1] = y; - t.M[2][2] = z; - return t; - } - - // Creates a matrix for scaling by constant - static Matrix4 Scaling(T s) - { - Matrix4 t; - t.M[0][0] = s; - t.M[1][1] = s; - t.M[2][2] = s; - return t; - } - - // Simple L1 distance in R^12 - T Distance(const Matrix4& m2) const - { - T d = fabs(M[0][0] - m2.M[0][0]) + fabs(M[0][1] - m2.M[0][1]); - d += fabs(M[0][2] - m2.M[0][2]) + fabs(M[0][3] - m2.M[0][3]); - d += fabs(M[1][0] - m2.M[1][0]) + fabs(M[1][1] - m2.M[1][1]); - d += fabs(M[1][2] - m2.M[1][2]) + fabs(M[1][3] - m2.M[1][3]); - d += fabs(M[2][0] - m2.M[2][0]) + fabs(M[2][1] - m2.M[2][1]); - d += fabs(M[2][2] - m2.M[2][2]) + fabs(M[2][3] - m2.M[2][3]); - d += fabs(M[3][0] - m2.M[3][0]) + fabs(M[3][1] - m2.M[3][1]); - d += fabs(M[3][2] - m2.M[3][2]) + fabs(M[3][3] - m2.M[3][3]); - return d; - } - - // Creates a rotation matrix rotating around the X axis by 'angle' radians. - // Just for quick testing. Not for final API. Need to remove case. - static Matrix4 RotationAxis(Axis A, T angle, RotateDirection d, HandedSystem s) - { - T sina = s * d *sin(angle); - T cosa = cos(angle); - - switch(A) - { - case Axis_X: - return Matrix4(1, 0, 0, - 0, cosa, -sina, - 0, sina, cosa); - case Axis_Y: - return Matrix4(cosa, 0, sina, - 0, 1, 0, - -sina, 0, cosa); - case Axis_Z: - return Matrix4(cosa, -sina, 0, - sina, cosa, 0, - 0, 0, 1); - default: - return Matrix4(); - } - } - - - // Creates a rotation matrix rotating around the X axis by 'angle' radians. - // Rotation direction is depends on the coordinate system: - // RHS (Oculus default): Positive angle values rotate Counter-clockwise (CCW), - // while looking in the negative axis direction. This is the - // same as looking down from positive axis values towards origin. - // LHS: Positive angle values rotate clock-wise (CW), while looking in the - // negative axis direction. - static Matrix4 RotationX(T angle) - { - T sina = sin(angle); - T cosa = cos(angle); - return Matrix4(1, 0, 0, - 0, cosa, -sina, - 0, sina, cosa); - } - - // Creates a rotation matrix rotating around the Y axis by 'angle' radians. - // Rotation direction is depends on the coordinate system: - // RHS (Oculus default): Positive angle values rotate Counter-clockwise (CCW), - // while looking in the negative axis direction. This is the - // same as looking down from positive axis values towards origin. - // LHS: Positive angle values rotate clock-wise (CW), while looking in the - // negative axis direction. - static Matrix4 RotationY(T angle) - { - T sina = (T)sin(angle); - T cosa = (T)cos(angle); - return Matrix4(cosa, 0, sina, - 0, 1, 0, - -sina, 0, cosa); - } - - // Creates a rotation matrix rotating around the Z axis by 'angle' radians. - // Rotation direction is depends on the coordinate system: - // RHS (Oculus default): Positive angle values rotate Counter-clockwise (CCW), - // while looking in the negative axis direction. This is the - // same as looking down from positive axis values towards origin. - // LHS: Positive angle values rotate clock-wise (CW), while looking in the - // negative axis direction. - static Matrix4 RotationZ(T angle) - { - T sina = sin(angle); - T cosa = cos(angle); - return Matrix4(cosa, -sina, 0, - sina, cosa, 0, - 0, 0, 1); - } - - // LookAtRH creates a View transformation matrix for right-handed coordinate system. - // The resulting matrix points camera from 'eye' towards 'at' direction, with 'up' - // specifying the up vector. The resulting matrix should be used with PerspectiveRH - // projection. - static Matrix4 LookAtRH(const Vector3& eye, const Vector3& at, const Vector3& up) - { - Vector3 z = (eye - at).Normalized(); // Forward - Vector3 x = up.Cross(z).Normalized(); // Right - Vector3 y = z.Cross(x); - - Matrix4 m(x.x, x.y, x.z, -(x.Dot(eye)), - y.x, y.y, y.z, -(y.Dot(eye)), - z.x, z.y, z.z, -(z.Dot(eye)), - 0, 0, 0, 1 ); - return m; - } - - // LookAtLH creates a View transformation matrix for left-handed coordinate system. - // The resulting matrix points camera from 'eye' towards 'at' direction, with 'up' - // specifying the up vector. - static Matrix4 LookAtLH(const Vector3& eye, const Vector3& at, const Vector3& up) - { - Vector3 z = (at - eye).Normalized(); // Forward - Vector3 x = up.Cross(z).Normalized(); // Right - Vector3 y = z.Cross(x); - - Matrix4 m(x.x, x.y, x.z, -(x.Dot(eye)), - y.x, y.y, y.z, -(y.Dot(eye)), - z.x, z.y, z.z, -(z.Dot(eye)), - 0, 0, 0, 1 ); - return m; - } - - // PerspectiveRH creates a right-handed perspective projection matrix that can be - // used with the Oculus sample renderer. - // yfov - Specifies vertical field of view in radians. - // aspect - Screen aspect ration, which is usually width/height for square pixels. - // Note that xfov = yfov * aspect. - // znear - Absolute value of near Z clipping clipping range. - // zfar - Absolute value of far Z clipping clipping range (larger then near). - // Even though RHS usually looks in the direction of negative Z, positive values - // are expected for znear and zfar. - static Matrix4 PerspectiveRH(T yfov, T aspect, T znear, T zfar) - { - Matrix4 m; - T tanHalfFov = tan(yfov * T(0.5)); - - m.M[0][0] = T(1) / (aspect * tanHalfFov); - m.M[1][1] = T(1) / tanHalfFov; - m.M[2][2] = zfar / (znear - zfar); - m.M[3][2] = T(-1); - m.M[2][3] = (zfar * znear) / (znear - zfar); - m.M[3][3] = T(0); - - // Note: Post-projection matrix result assumes Left-Handed coordinate system, - // with Y up, X right and Z forward. This supports positive z-buffer values. - // This is the case even for RHS coordinate input. - return m; - } - - // PerspectiveLH creates a left-handed perspective projection matrix that can be - // used with the Oculus sample renderer. - // yfov - Specifies vertical field of view in radians. - // aspect - Screen aspect ration, which is usually width/height for square pixels. - // Note that xfov = yfov * aspect. - // znear - Absolute value of near Z clipping clipping range. - // zfar - Absolute value of far Z clipping clipping range (larger then near). - static Matrix4 PerspectiveLH(T yfov, T aspect, T znear, T zfar) - { - Matrix4 m; - T tanHalfFov = tan(yfov * T(0.5)); - - m.M[0][0] = T(1) / (aspect * tanHalfFov); - m.M[1][1] = T(1) / tanHalfFov; - //m.M[2][2] = zfar / (znear - zfar); - m.M[2][2] = zfar / (zfar - znear); - m.M[3][2] = T(-1); - m.M[2][3] = (zfar * znear) / (znear - zfar); - m.M[3][3] = T(0); - - // Note: Post-projection matrix result assumes Left-Handed coordinate system, - // with Y up, X right and Z forward. This supports positive z-buffer values. - // This is the case even for RHS coordinate input. - return m; - } - - static Matrix4 Ortho2D(T w, T h) - { - Matrix4 m; - m.M[0][0] = T(2.0)/w; - m.M[1][1] = T(-2.0)/h; - m.M[0][3] = T(-1.0); - m.M[1][3] = T(1.0); - m.M[2][2] = T(0); - return m; - } -}; - -typedef Matrix4 Matrix4f; -typedef Matrix4 Matrix4d; - -//------------------------------------------------------------------------------------- -// ***** Matrix3 -// -// Matrix3 is a 3x3 matrix used for representing a rotation matrix. -// The matrix is stored in row-major order in memory, meaning that values -// of the first row are stored before the next one. -// -// The arrangement of the matrix is chosen to be in Right-Handed -// coordinate system and counterclockwise rotations when looking down -// the axis -// -// Transformation Order: -// - Transformations are applied from right to left, so the expression -// M1 * M2 * M3 * V means that the vector V is transformed by M3 first, -// followed by M2 and M1. -// -// Coordinate system: Right Handed -// -// Rotations: Counterclockwise when looking down the axis. All angles are in radians. - -template -class Matrix3 -{ -public: - typedef T ElementType; - static const size_t Dimension = 3; - - T M[3][3]; - - enum NoInitType { NoInit }; - - // Construct with no memory initialization. - Matrix3(NoInitType) { } - - // By default, we construct identity matrix. - Matrix3() - { - M[0][0] = M[1][1] = M[2][2] = T(1); - M[0][1] = M[1][0] = M[2][0] = T(0); - M[0][2] = M[1][2] = M[2][1] = T(0); - } - - Matrix3(T m11, T m12, T m13, - T m21, T m22, T m23, - T m31, T m32, T m33) - { - M[0][0] = m11; M[0][1] = m12; M[0][2] = m13; - M[1][0] = m21; M[1][1] = m22; M[1][2] = m23; - M[2][0] = m31; M[2][1] = m32; M[2][2] = m33; - } - - // Construction from X, Y, Z basis vectors - Matrix3(const Vector3& xBasis, const Vector3& yBasis, const Vector3& zBasis) - { - M[0][0] = xBasis.x; M[0][1] = yBasis.x; M[0][2] = zBasis.x; - M[1][0] = xBasis.y; M[1][1] = yBasis.y; M[1][2] = zBasis.y; - M[2][0] = xBasis.z; M[2][1] = yBasis.z; M[2][2] = zBasis.z; - } - - explicit Matrix3(const Quat& q) - { - OVR_MATH_ASSERT(q.IsNormalized()); - const T tx = q.x+q.x, ty = q.y+q.y, tz = q.z+q.z; - const T twx = q.w*tx, twy = q.w*ty, twz = q.w*tz; - const T txx = q.x*tx, txy = q.x*ty, txz = q.x*tz; - const T tyy = q.y*ty, tyz = q.y*tz, tzz = q.z*tz; - M[0][0] = T(1) - (tyy + tzz); M[0][1] = txy - twz; M[0][2] = txz + twy; - M[1][0] = txy + twz; M[1][1] = T(1) - (txx + tzz); M[1][2] = tyz - twx; - M[2][0] = txz - twy; M[2][1] = tyz + twx; M[2][2] = T(1) - (txx + tyy); - } - - inline explicit Matrix3(T s) - { - M[0][0] = M[1][1] = M[2][2] = s; - M[0][1] = M[0][2] = M[1][0] = M[1][2] = M[2][0] = M[2][1] = T(0); - } - - Matrix3(T m11, T m22, T m33) - { - M[0][0] = m11; M[0][1] = T(0); M[0][2] = T(0); - M[1][0] = T(0); M[1][1] = m22; M[1][2] = T(0); - M[2][0] = T(0); M[2][1] = T(0); M[2][2] = m33; - } - - explicit Matrix3(const Matrix3::OtherFloatType> &src) - { - for (int i = 0; i < 3; i++) - for (int j = 0; j < 3; j++) - M[i][j] = (T)src.M[i][j]; - } - - // C-interop support. - Matrix3(const typename CompatibleTypes >::Type& s) - { - OVR_MATH_STATIC_ASSERT(sizeof(s) == sizeof(Matrix3), "sizeof(s) == sizeof(Matrix3)"); - memcpy(M, s.M, sizeof(M)); - } - - operator const typename CompatibleTypes >::Type () const - { - typename CompatibleTypes >::Type result; - OVR_MATH_STATIC_ASSERT(sizeof(result) == sizeof(Matrix3), "sizeof(result) == sizeof(Matrix3)"); - memcpy(result.M, M, sizeof(M)); - return result; - } - - T operator()(int i, int j) const { return M[i][j]; } - T& operator()(int i, int j) { return M[i][j]; } - - void ToString(char* dest, size_t destsize) const - { - size_t pos = 0; - for (int r=0; r<3; r++) - { - for (int c=0; c<3; c++) - pos += OVRMath_sprintf(dest+pos, destsize-pos, "%g ", M[r][c]); - } - } - - static Matrix3 FromString(const char* src) - { - Matrix3 result; - if (src) - { - for (int r=0; r<3; r++) - { - for (int c=0; c<3; c++) - { - result.M[r][c] = (T)atof(src); - while (*src && *src != ' ') - src++; - while (*src && *src == ' ') - src++; - } - } - } - return result; - } - - static Matrix3 Identity() { return Matrix3(); } - - void SetIdentity() - { - M[0][0] = M[1][1] = M[2][2] = T(1); - M[0][1] = M[1][0] = M[2][0] = T(0); - M[0][2] = M[1][2] = M[2][1] = T(0); - } - - static Matrix3 Diagonal(T m00, T m11, T m22) - { - return Matrix3(m00, 0, 0, - 0, m11, 0, - 0, 0, m22); - } - static Matrix3 Diagonal(const Vector3& v) { return Diagonal(v.x, v.y, v.z); } - - T Trace() const { return M[0][0] + M[1][1] + M[2][2]; } - - bool operator== (const Matrix3& b) const - { - bool isEqual = true; - for (int i = 0; i < 3; i++) - { - for (int j = 0; j < 3; j++) - isEqual &= (M[i][j] == b.M[i][j]); - } - - return isEqual; - } - - Matrix3 operator+ (const Matrix3& b) const - { - Matrix3 result(*this); - result += b; - return result; - } - - Matrix3& operator+= (const Matrix3& b) - { - for (int i = 0; i < 3; i++) - for (int j = 0; j < 3; j++) - M[i][j] += b.M[i][j]; - return *this; - } - - void operator= (const Matrix3& b) - { - for (int i = 0; i < 3; i++) - for (int j = 0; j < 3; j++) - M[i][j] = b.M[i][j]; - } - - Matrix3 operator- (const Matrix3& b) const - { - Matrix3 result(*this); - result -= b; - return result; - } - - Matrix3& operator-= (const Matrix3& b) - { - for (int i = 0; i < 3; i++) - { - for (int j = 0; j < 3; j++) - M[i][j] -= b.M[i][j]; - } - - return *this; - } - - // Multiplies two matrices into destination with minimum copying. - static Matrix3& Multiply(Matrix3* d, const Matrix3& a, const Matrix3& b) - { - OVR_MATH_ASSERT((d != &a) && (d != &b)); - int i = 0; - do { - d->M[i][0] = a.M[i][0] * b.M[0][0] + a.M[i][1] * b.M[1][0] + a.M[i][2] * b.M[2][0]; - d->M[i][1] = a.M[i][0] * b.M[0][1] + a.M[i][1] * b.M[1][1] + a.M[i][2] * b.M[2][1]; - d->M[i][2] = a.M[i][0] * b.M[0][2] + a.M[i][1] * b.M[1][2] + a.M[i][2] * b.M[2][2]; - } while((++i) < 3); - - return *d; - } - - Matrix3 operator* (const Matrix3& b) const - { - Matrix3 result(Matrix3::NoInit); - Multiply(&result, *this, b); - return result; - } - - Matrix3& operator*= (const Matrix3& b) - { - return Multiply(this, Matrix3(*this), b); - } - - Matrix3 operator* (T s) const - { - Matrix3 result(*this); - result *= s; - return result; - } - - Matrix3& operator*= (T s) - { - for (int i = 0; i < 3; i++) - { - for (int j = 0; j < 3; j++) - M[i][j] *= s; - } - - return *this; - } - - Vector3 operator* (const Vector3 &b) const - { - Vector3 result; - result.x = M[0][0]*b.x + M[0][1]*b.y + M[0][2]*b.z; - result.y = M[1][0]*b.x + M[1][1]*b.y + M[1][2]*b.z; - result.z = M[2][0]*b.x + M[2][1]*b.y + M[2][2]*b.z; - - return result; - } - - Matrix3 operator/ (T s) const - { - Matrix3 result(*this); - result /= s; - return result; - } - - Matrix3& operator/= (T s) - { - for (int i = 0; i < 3; i++) - { - for (int j = 0; j < 3; j++) - M[i][j] /= s; - } - - return *this; - } - - Vector2 Transform(const Vector2& v) const - { - const T rcpZ = T(1) / (M[2][0] * v.x + M[2][1] * v.y + M[2][2]); - return Vector2((M[0][0] * v.x + M[0][1] * v.y + M[0][2]) * rcpZ, - (M[1][0] * v.x + M[1][1] * v.y + M[1][2]) * rcpZ); - } - - Vector3 Transform(const Vector3& v) const - { - return Vector3(M[0][0] * v.x + M[0][1] * v.y + M[0][2] * v.z, - M[1][0] * v.x + M[1][1] * v.y + M[1][2] * v.z, - M[2][0] * v.x + M[2][1] * v.y + M[2][2] * v.z); - } - - Matrix3 Transposed() const - { - return Matrix3(M[0][0], M[1][0], M[2][0], - M[0][1], M[1][1], M[2][1], - M[0][2], M[1][2], M[2][2]); - } - - void Transpose() - { - *this = Transposed(); - } - - - T SubDet (const size_t* rows, const size_t* cols) const - { - return M[rows[0]][cols[0]] * (M[rows[1]][cols[1]] * M[rows[2]][cols[2]] - M[rows[1]][cols[2]] * M[rows[2]][cols[1]]) - - M[rows[0]][cols[1]] * (M[rows[1]][cols[0]] * M[rows[2]][cols[2]] - M[rows[1]][cols[2]] * M[rows[2]][cols[0]]) - + M[rows[0]][cols[2]] * (M[rows[1]][cols[0]] * M[rows[2]][cols[1]] - M[rows[1]][cols[1]] * M[rows[2]][cols[0]]); - } - - - // M += a*b.t() - inline void Rank1Add(const Vector3 &a, const Vector3 &b) - { - M[0][0] += a.x*b.x; M[0][1] += a.x*b.y; M[0][2] += a.x*b.z; - M[1][0] += a.y*b.x; M[1][1] += a.y*b.y; M[1][2] += a.y*b.z; - M[2][0] += a.z*b.x; M[2][1] += a.z*b.y; M[2][2] += a.z*b.z; - } - - // M -= a*b.t() - inline void Rank1Sub(const Vector3 &a, const Vector3 &b) - { - M[0][0] -= a.x*b.x; M[0][1] -= a.x*b.y; M[0][2] -= a.x*b.z; - M[1][0] -= a.y*b.x; M[1][1] -= a.y*b.y; M[1][2] -= a.y*b.z; - M[2][0] -= a.z*b.x; M[2][1] -= a.z*b.y; M[2][2] -= a.z*b.z; - } - - inline Vector3 Col(int c) const - { - return Vector3(M[0][c], M[1][c], M[2][c]); - } - - inline Vector3 Row(int r) const - { - return Vector3(M[r][0], M[r][1], M[r][2]); - } - - inline Vector3 GetColumn(int c) const - { - return Vector3(M[0][c], M[1][c], M[2][c]); - } - - inline Vector3 GetRow(int r) const - { - return Vector3(M[r][0], M[r][1], M[r][2]); - } - - inline void SetColumn(int c, const Vector3& v) - { - M[0][c] = v.x; - M[1][c] = v.y; - M[2][c] = v.z; - } - - inline void SetRow(int r, const Vector3& v) - { - M[r][0] = v.x; - M[r][1] = v.y; - M[r][2] = v.z; - } - - inline T Determinant() const - { - const Matrix3& m = *this; - T d; - - d = m.M[0][0] * (m.M[1][1]*m.M[2][2] - m.M[1][2] * m.M[2][1]); - d -= m.M[0][1] * (m.M[1][0]*m.M[2][2] - m.M[1][2] * m.M[2][0]); - d += m.M[0][2] * (m.M[1][0]*m.M[2][1] - m.M[1][1] * m.M[2][0]); - - return d; - } - - inline Matrix3 Inverse() const - { - Matrix3 a; - const Matrix3& m = *this; - T d = Determinant(); - - OVR_MATH_ASSERT(d != 0); - T s = T(1)/d; - - a.M[0][0] = s * (m.M[1][1] * m.M[2][2] - m.M[1][2] * m.M[2][1]); - a.M[1][0] = s * (m.M[1][2] * m.M[2][0] - m.M[1][0] * m.M[2][2]); - a.M[2][0] = s * (m.M[1][0] * m.M[2][1] - m.M[1][1] * m.M[2][0]); - - a.M[0][1] = s * (m.M[0][2] * m.M[2][1] - m.M[0][1] * m.M[2][2]); - a.M[1][1] = s * (m.M[0][0] * m.M[2][2] - m.M[0][2] * m.M[2][0]); - a.M[2][1] = s * (m.M[0][1] * m.M[2][0] - m.M[0][0] * m.M[2][1]); - - a.M[0][2] = s * (m.M[0][1] * m.M[1][2] - m.M[0][2] * m.M[1][1]); - a.M[1][2] = s * (m.M[0][2] * m.M[1][0] - m.M[0][0] * m.M[1][2]); - a.M[2][2] = s * (m.M[0][0] * m.M[1][1] - m.M[0][1] * m.M[1][0]); - - return a; - } - - // Outer Product of two column vectors: a * b.Transpose() - static Matrix3 OuterProduct(const Vector3& a, const Vector3& b) - { - return Matrix3(a.x*b.x, a.x*b.y, a.x*b.z, - a.y*b.x, a.y*b.y, a.y*b.z, - a.z*b.x, a.z*b.y, a.z*b.z); - } - - // Vector cross product as a premultiply matrix: - // L.Cross(R) = LeftCrossAsMatrix(L) * R - static Matrix3 LeftCrossAsMatrix(const Vector3& L) - { - return Matrix3( - T(0), -L.z, +L.y, - +L.z, T(0), -L.x, - -L.y, +L.x, T(0)); - } - - // Vector cross product as a premultiply matrix: - // L.Cross(R) = RightCrossAsMatrix(R) * L - static Matrix3 RightCrossAsMatrix(const Vector3& R) - { - return Matrix3( - T(0), +R.z, -R.y, - -R.z, T(0), +R.x, - +R.y, -R.x, T(0)); - } - - // Angle in radians of a rotation matrix - // Uses identity trace(a) = 2*cos(theta) + 1 - T Angle() const - { - return Acos((Trace() - T(1)) * T(0.5)); - } - - // Angle in radians between two rotation matrices - T Angle(const Matrix3& b) const - { - // Compute trace of (this->Transposed() * b) - // This works out to sum of products of elements. - T trace = T(0); - for (int i = 0; i < 3; i++) - { - for (int j = 0; j < 3; j++) - { - trace += M[i][j] * b.M[i][j]; - } - } - return Acos((trace - T(1)) * T(0.5)); - } -}; - -typedef Matrix3 Matrix3f; -typedef Matrix3 Matrix3d; - -//------------------------------------------------------------------------------------- -// ***** Matrix2 - -template -class Matrix2 -{ -public: - typedef T ElementType; - static const size_t Dimension = 2; - - T M[2][2]; - - enum NoInitType { NoInit }; - - // Construct with no memory initialization. - Matrix2(NoInitType) { } - - // By default, we construct identity matrix. - Matrix2() - { - M[0][0] = M[1][1] = T(1); - M[0][1] = M[1][0] = T(0); - } - - Matrix2(T m11, T m12, - T m21, T m22) - { - M[0][0] = m11; M[0][1] = m12; - M[1][0] = m21; M[1][1] = m22; - } - - // Construction from X, Y basis vectors - Matrix2(const Vector2& xBasis, const Vector2& yBasis) - { - M[0][0] = xBasis.x; M[0][1] = yBasis.x; - M[1][0] = xBasis.y; M[1][1] = yBasis.y; - } - - explicit Matrix2(T s) - { - M[0][0] = M[1][1] = s; - M[0][1] = M[1][0] = T(0); - } - - Matrix2(T m11, T m22) - { - M[0][0] = m11; M[0][1] = T(0); - M[1][0] = T(0); M[1][1] = m22; - } - - explicit Matrix2(const Matrix2::OtherFloatType> &src) - { - M[0][0] = T(src.M[0][0]); M[0][1] = T(src.M[0][1]); - M[1][0] = T(src.M[1][0]); M[1][1] = T(src.M[1][1]); - } - - // C-interop support - Matrix2(const typename CompatibleTypes >::Type& s) - { - OVR_MATH_STATIC_ASSERT(sizeof(s) == sizeof(Matrix2), "sizeof(s) == sizeof(Matrix2)"); - memcpy(M, s.M, sizeof(M)); - } - - operator const typename CompatibleTypes >::Type() const - { - typename CompatibleTypes >::Type result; - OVR_MATH_STATIC_ASSERT(sizeof(result) == sizeof(Matrix2), "sizeof(result) == sizeof(Matrix2)"); - memcpy(result.M, M, sizeof(M)); - return result; - } - - T operator()(int i, int j) const { return M[i][j]; } - T& operator()(int i, int j) { return M[i][j]; } - const T* operator[](int i) const { return M[i]; } - T* operator[](int i) { return M[i]; } - - static Matrix2 Identity() { return Matrix2(); } - - void SetIdentity() - { - M[0][0] = M[1][1] = T(1); - M[0][1] = M[1][0] = T(0); - } - - static Matrix2 Diagonal(T m00, T m11) - { - return Matrix2(m00, m11); - } - static Matrix2 Diagonal(const Vector2& v) { return Matrix2(v.x, v.y); } - - T Trace() const { return M[0][0] + M[1][1]; } - - bool operator== (const Matrix2& b) const - { - return M[0][0] == b.M[0][0] && M[0][1] == b.M[0][1] && - M[1][0] == b.M[1][0] && M[1][1] == b.M[1][1]; - } - - Matrix2 operator+ (const Matrix2& b) const - { - return Matrix2(M[0][0] + b.M[0][0], M[0][1] + b.M[0][1], - M[1][0] + b.M[1][0], M[1][1] + b.M[1][1]); - } - - Matrix2& operator+= (const Matrix2& b) - { - M[0][0] += b.M[0][0]; M[0][1] += b.M[0][1]; - M[1][0] += b.M[1][0]; M[1][1] += b.M[1][1]; - return *this; - } - - void operator= (const Matrix2& b) - { - M[0][0] = b.M[0][0]; M[0][1] = b.M[0][1]; - M[1][0] = b.M[1][0]; M[1][1] = b.M[1][1]; - } - - Matrix2 operator- (const Matrix2& b) const - { - return Matrix2(M[0][0] - b.M[0][0], M[0][1] - b.M[0][1], - M[1][0] - b.M[1][0], M[1][1] - b.M[1][1]); - } - - Matrix2& operator-= (const Matrix2& b) - { - M[0][0] -= b.M[0][0]; M[0][1] -= b.M[0][1]; - M[1][0] -= b.M[1][0]; M[1][1] -= b.M[1][1]; - return *this; - } - - Matrix2 operator* (const Matrix2& b) const - { - return Matrix2(M[0][0] * b.M[0][0] + M[0][1] * b.M[1][0], M[0][0] * b.M[0][1] + M[0][1] * b.M[1][1], - M[1][0] * b.M[0][0] + M[1][1] * b.M[1][0], M[1][0] * b.M[0][1] + M[1][1] * b.M[1][1]); - } - - Matrix2& operator*= (const Matrix2& b) - { - *this = *this * b; - return *this; - } - - Matrix2 operator* (T s) const - { - return Matrix2(M[0][0] * s, M[0][1] * s, - M[1][0] * s, M[1][1] * s); - } - - Matrix2& operator*= (T s) - { - M[0][0] *= s; M[0][1] *= s; - M[1][0] *= s; M[1][1] *= s; - return *this; - } - - Matrix2 operator/ (T s) const - { - return *this * (T(1) / s); - } - - Matrix2& operator/= (T s) - { - return *this *= (T(1) / s); - } - - Vector2 operator* (const Vector2 &b) const - { - return Vector2(M[0][0] * b.x + M[0][1] * b.y, - M[1][0] * b.x + M[1][1] * b.y); - } - - Vector2 Transform(const Vector2& v) const - { - return Vector2(M[0][0] * v.x + M[0][1] * v.y, - M[1][0] * v.x + M[1][1] * v.y); - } - - Matrix2 Transposed() const - { - return Matrix2(M[0][0], M[1][0], - M[0][1], M[1][1]); - } - - void Transpose() - { - OVRMath_Swap(M[1][0], M[0][1]); - } - - Vector2 GetColumn(int c) const - { - return Vector2(M[0][c], M[1][c]); - } - - Vector2 GetRow(int r) const - { - return Vector2(M[r][0], M[r][1]); - } - - void SetColumn(int c, const Vector2& v) - { - M[0][c] = v.x; - M[1][c] = v.y; - } - - void SetRow(int r, const Vector2& v) - { - M[r][0] = v.x; - M[r][1] = v.y; - } - - T Determinant() const - { - return M[0][0] * M[1][1] - M[0][1] * M[1][0]; - } - - Matrix2 Inverse() const - { - T rcpDet = T(1) / Determinant(); - return Matrix2( M[1][1] * rcpDet, -M[0][1] * rcpDet, - -M[1][0] * rcpDet, M[0][0] * rcpDet); - } - - // Outer Product of two column vectors: a * b.Transpose() - static Matrix2 OuterProduct(const Vector2& a, const Vector2& b) - { - return Matrix2(a.x*b.x, a.x*b.y, - a.y*b.x, a.y*b.y); - } - - // Angle in radians between two rotation matrices - T Angle(const Matrix2& b) const - { - const Matrix2& a = *this; - return Acos(a(0, 0)*b(0, 0) + a(1, 0)*b(1, 0)); - } -}; - -typedef Matrix2 Matrix2f; -typedef Matrix2 Matrix2d; - -//------------------------------------------------------------------------------------- - -template -class SymMat3 -{ -private: - typedef SymMat3 this_type; - -public: - typedef T Value_t; - // Upper symmetric - T v[6]; // _00 _01 _02 _11 _12 _22 - - inline SymMat3() {} - - inline explicit SymMat3(T s) - { - v[0] = v[3] = v[5] = s; - v[1] = v[2] = v[4] = T(0); - } - - inline explicit SymMat3(T a00, T a01, T a02, T a11, T a12, T a22) - { - v[0] = a00; v[1] = a01; v[2] = a02; - v[3] = a11; v[4] = a12; - v[5] = a22; - } - - // Cast to symmetric Matrix3 - operator Matrix3() const - { - return Matrix3(v[0], v[1], v[2], - v[1], v[3], v[4], - v[2], v[4], v[5]); - } - - static inline int Index(unsigned int i, unsigned int j) - { - return (i <= j) ? (3*i - i*(i+1)/2 + j) : (3*j - j*(j+1)/2 + i); - } - - inline T operator()(int i, int j) const { return v[Index(i,j)]; } - - inline T &operator()(int i, int j) { return v[Index(i,j)]; } - - inline this_type& operator+=(const this_type& b) - { - v[0]+=b.v[0]; - v[1]+=b.v[1]; - v[2]+=b.v[2]; - v[3]+=b.v[3]; - v[4]+=b.v[4]; - v[5]+=b.v[5]; - return *this; - } - - inline this_type& operator-=(const this_type& b) - { - v[0]-=b.v[0]; - v[1]-=b.v[1]; - v[2]-=b.v[2]; - v[3]-=b.v[3]; - v[4]-=b.v[4]; - v[5]-=b.v[5]; - - return *this; - } - - inline this_type& operator*=(T s) - { - v[0]*=s; - v[1]*=s; - v[2]*=s; - v[3]*=s; - v[4]*=s; - v[5]*=s; - - return *this; - } - - inline SymMat3 operator*(T s) const - { - SymMat3 d; - d.v[0] = v[0]*s; - d.v[1] = v[1]*s; - d.v[2] = v[2]*s; - d.v[3] = v[3]*s; - d.v[4] = v[4]*s; - d.v[5] = v[5]*s; - - return d; - } - - // Multiplies two matrices into destination with minimum copying. - static SymMat3& Multiply(SymMat3* d, const SymMat3& a, const SymMat3& b) - { - // _00 _01 _02 _11 _12 _22 - - d->v[0] = a.v[0] * b.v[0]; - d->v[1] = a.v[0] * b.v[1] + a.v[1] * b.v[3]; - d->v[2] = a.v[0] * b.v[2] + a.v[1] * b.v[4]; - - d->v[3] = a.v[3] * b.v[3]; - d->v[4] = a.v[3] * b.v[4] + a.v[4] * b.v[5]; - - d->v[5] = a.v[5] * b.v[5]; - - return *d; - } - - inline T Determinant() const - { - const this_type& m = *this; - T d; - - d = m(0,0) * (m(1,1)*m(2,2) - m(1,2) * m(2,1)); - d -= m(0,1) * (m(1,0)*m(2,2) - m(1,2) * m(2,0)); - d += m(0,2) * (m(1,0)*m(2,1) - m(1,1) * m(2,0)); - - return d; - } - - inline this_type Inverse() const - { - this_type a; - const this_type& m = *this; - T d = Determinant(); - - OVR_MATH_ASSERT(d != 0); - T s = T(1)/d; - - a(0,0) = s * (m(1,1) * m(2,2) - m(1,2) * m(2,1)); - - a(0,1) = s * (m(0,2) * m(2,1) - m(0,1) * m(2,2)); - a(1,1) = s * (m(0,0) * m(2,2) - m(0,2) * m(2,0)); - - a(0,2) = s * (m(0,1) * m(1,2) - m(0,2) * m(1,1)); - a(1,2) = s * (m(0,2) * m(1,0) - m(0,0) * m(1,2)); - a(2,2) = s * (m(0,0) * m(1,1) - m(0,1) * m(1,0)); - - return a; - } - - inline T Trace() const { return v[0] + v[3] + v[5]; } - - // M = a*a.t() - inline void Rank1(const Vector3 &a) - { - v[0] = a.x*a.x; v[1] = a.x*a.y; v[2] = a.x*a.z; - v[3] = a.y*a.y; v[4] = a.y*a.z; - v[5] = a.z*a.z; - } - - // M += a*a.t() - inline void Rank1Add(const Vector3 &a) - { - v[0] += a.x*a.x; v[1] += a.x*a.y; v[2] += a.x*a.z; - v[3] += a.y*a.y; v[4] += a.y*a.z; - v[5] += a.z*a.z; - } - - // M -= a*a.t() - inline void Rank1Sub(const Vector3 &a) - { - v[0] -= a.x*a.x; v[1] -= a.x*a.y; v[2] -= a.x*a.z; - v[3] -= a.y*a.y; v[4] -= a.y*a.z; - v[5] -= a.z*a.z; - } -}; - -typedef SymMat3 SymMat3f; -typedef SymMat3 SymMat3d; - -template -inline Matrix3 operator*(const SymMat3& a, const SymMat3& b) -{ - #define AJB_ARBC(r,c) (a(r,0)*b(0,c)+a(r,1)*b(1,c)+a(r,2)*b(2,c)) - return Matrix3( - AJB_ARBC(0,0), AJB_ARBC(0,1), AJB_ARBC(0,2), - AJB_ARBC(1,0), AJB_ARBC(1,1), AJB_ARBC(1,2), - AJB_ARBC(2,0), AJB_ARBC(2,1), AJB_ARBC(2,2)); - #undef AJB_ARBC -} - -template -inline Matrix3 operator*(const Matrix3& a, const SymMat3& b) -{ - #define AJB_ARBC(r,c) (a(r,0)*b(0,c)+a(r,1)*b(1,c)+a(r,2)*b(2,c)) - return Matrix3( - AJB_ARBC(0,0), AJB_ARBC(0,1), AJB_ARBC(0,2), - AJB_ARBC(1,0), AJB_ARBC(1,1), AJB_ARBC(1,2), - AJB_ARBC(2,0), AJB_ARBC(2,1), AJB_ARBC(2,2)); - #undef AJB_ARBC -} - -//------------------------------------------------------------------------------------- -// ***** Angle - -// Cleanly representing the algebra of 2D rotations. -// The operations maintain the angle between -Pi and Pi, the same range as atan2. - -template -class Angle -{ -public: - enum AngularUnits - { - Radians = 0, - Degrees = 1 - }; - - Angle() : a(0) {} - - // Fix the range to be between -Pi and Pi - Angle(T a_, AngularUnits u = Radians) : a((u == Radians) ? a_ : a_*((T)MATH_DOUBLE_DEGREETORADFACTOR)) { FixRange(); } - - T Get(AngularUnits u = Radians) const { return (u == Radians) ? a : a*((T)MATH_DOUBLE_RADTODEGREEFACTOR); } - void Set(const T& x, AngularUnits u = Radians) { a = (u == Radians) ? x : x*((T)MATH_DOUBLE_DEGREETORADFACTOR); FixRange(); } - int Sign() const { if (a == 0) return 0; else return (a > 0) ? 1 : -1; } - T Abs() const { return (a >= 0) ? a : -a; } - - bool operator== (const Angle& b) const { return a == b.a; } - bool operator!= (const Angle& b) const { return a != b.a; } -// bool operator< (const Angle& b) const { return a < a.b; } -// bool operator> (const Angle& b) const { return a > a.b; } -// bool operator<= (const Angle& b) const { return a <= a.b; } -// bool operator>= (const Angle& b) const { return a >= a.b; } -// bool operator= (const T& x) { a = x; FixRange(); } - - // These operations assume a is already between -Pi and Pi. - Angle& operator+= (const Angle& b) { a = a + b.a; FastFixRange(); return *this; } - Angle& operator+= (const T& x) { a = a + x; FixRange(); return *this; } - Angle operator+ (const Angle& b) const { Angle res = *this; res += b; return res; } - Angle operator+ (const T& x) const { Angle res = *this; res += x; return res; } - Angle& operator-= (const Angle& b) { a = a - b.a; FastFixRange(); return *this; } - Angle& operator-= (const T& x) { a = a - x; FixRange(); return *this; } - Angle operator- (const Angle& b) const { Angle res = *this; res -= b; return res; } - Angle operator- (const T& x) const { Angle res = *this; res -= x; return res; } - - T Distance(const Angle& b) { T c = fabs(a - b.a); return (c <= ((T)MATH_DOUBLE_PI)) ? c : ((T)MATH_DOUBLE_TWOPI) - c; } - -private: - - // The stored angle, which should be maintained between -Pi and Pi - T a; - - // Fixes the angle range to [-Pi,Pi], but assumes no more than 2Pi away on either side - inline void FastFixRange() - { - if (a < -((T)MATH_DOUBLE_PI)) - a += ((T)MATH_DOUBLE_TWOPI); - else if (a > ((T)MATH_DOUBLE_PI)) - a -= ((T)MATH_DOUBLE_TWOPI); - } - - // Fixes the angle range to [-Pi,Pi] for any given range, but slower then the fast method - inline void FixRange() - { - // do nothing if the value is already in the correct range, since fmod call is expensive - if (a >= -((T)MATH_DOUBLE_PI) && a <= ((T)MATH_DOUBLE_PI)) - return; - a = fmod(a,((T)MATH_DOUBLE_TWOPI)); - if (a < -((T)MATH_DOUBLE_PI)) - a += ((T)MATH_DOUBLE_TWOPI); - else if (a > ((T)MATH_DOUBLE_PI)) - a -= ((T)MATH_DOUBLE_TWOPI); - } -}; - - -typedef Angle Anglef; -typedef Angle Angled; - - -//------------------------------------------------------------------------------------- -// ***** Plane - -// Consists of a normal vector and distance from the origin where the plane is located. - -template -class Plane -{ -public: - Vector3 N; - T D; - - Plane() : D(0) {} - - // Normals must already be normalized - Plane(const Vector3& n, T d) : N(n), D(d) {} - Plane(T x, T y, T z, T d) : N(x,y,z), D(d) {} - - // construct from a point on the plane and the normal - Plane(const Vector3& p, const Vector3& n) : N(n), D(-(p * n)) {} - - // Find the point to plane distance. The sign indicates what side of the plane the point is on (0 = point on plane). - T TestSide(const Vector3& p) const - { - return (N.Dot(p)) + D; - } - - Plane Flipped() const - { - return Plane(-N, -D); - } - - void Flip() - { - N = -N; - D = -D; - } - - bool operator==(const Plane& rhs) const - { - return (this->D == rhs.D && this->N == rhs.N); - } -}; - -typedef Plane Planef; -typedef Plane Planed; - - - - -//----------------------------------------------------------------------------------- -// ***** ScaleAndOffset2D - -struct ScaleAndOffset2D -{ - Vector2f Scale; - Vector2f Offset; - - ScaleAndOffset2D(float sx = 0.0f, float sy = 0.0f, float ox = 0.0f, float oy = 0.0f) - : Scale(sx, sy), Offset(ox, oy) - { } -}; - - -//----------------------------------------------------------------------------------- -// ***** FovPort - -// FovPort describes Field Of View (FOV) of a viewport. -// This class has values for up, down, left and right, stored in -// tangent of the angle units to simplify calculations. -// -// As an example, for a standard 90 degree vertical FOV, we would -// have: { UpTan = tan(90 degrees / 2), DownTan = tan(90 degrees / 2) }. -// -// CreateFromRadians/Degrees helper functions can be used to -// access FOV in different units. - - -// ***** FovPort - -struct FovPort -{ - float UpTan; - float DownTan; - float LeftTan; - float RightTan; - - FovPort ( float sideTan = 0.0f ) : - UpTan(sideTan), DownTan(sideTan), LeftTan(sideTan), RightTan(sideTan) { } - FovPort ( float u, float d, float l, float r ) : - UpTan(u), DownTan(d), LeftTan(l), RightTan(r) { } - - // C-interop support: FovPort <-> ovrFovPort (implementation in OVR_CAPI.cpp). - FovPort(const ovrFovPort &src) - : UpTan(src.UpTan), DownTan(src.DownTan), LeftTan(src.LeftTan), RightTan(src.RightTan) - { } - - operator ovrFovPort () const - { - ovrFovPort result; - result.LeftTan = LeftTan; - result.RightTan = RightTan; - result.UpTan = UpTan; - result.DownTan = DownTan; - return result; - } - - static FovPort CreateFromRadians(float horizontalFov, float verticalFov) - { - FovPort result; - result.UpTan = tanf ( verticalFov * 0.5f ); - result.DownTan = tanf ( verticalFov * 0.5f ); - result.LeftTan = tanf ( horizontalFov * 0.5f ); - result.RightTan = tanf ( horizontalFov * 0.5f ); - return result; - } - - static FovPort CreateFromDegrees(float horizontalFovDegrees, - float verticalFovDegrees) - { - return CreateFromRadians(DegreeToRad(horizontalFovDegrees), - DegreeToRad(verticalFovDegrees)); - } - - // Get Horizontal/Vertical components of Fov in radians. - float GetVerticalFovRadians() const { return atanf(UpTan) + atanf(DownTan); } - float GetHorizontalFovRadians() const { return atanf(LeftTan) + atanf(RightTan); } - // Get Horizontal/Vertical components of Fov in degrees. - float GetVerticalFovDegrees() const { return RadToDegree(GetVerticalFovRadians()); } - float GetHorizontalFovDegrees() const { return RadToDegree(GetHorizontalFovRadians()); } - - // Compute maximum tangent value among all four sides. - float GetMaxSideTan() const - { - return OVRMath_Max(OVRMath_Max(UpTan, DownTan), OVRMath_Max(LeftTan, RightTan)); - } - - static ScaleAndOffset2D CreateNDCScaleAndOffsetFromFov ( FovPort tanHalfFov ) - { - float projXScale = 2.0f / ( tanHalfFov.LeftTan + tanHalfFov.RightTan ); - float projXOffset = ( tanHalfFov.LeftTan - tanHalfFov.RightTan ) * projXScale * 0.5f; - float projYScale = 2.0f / ( tanHalfFov.UpTan + tanHalfFov.DownTan ); - float projYOffset = ( tanHalfFov.UpTan - tanHalfFov.DownTan ) * projYScale * 0.5f; - - ScaleAndOffset2D result; - result.Scale = Vector2f(projXScale, projYScale); - result.Offset = Vector2f(projXOffset, projYOffset); - // Hey - why is that Y.Offset negated? - // It's because a projection matrix transforms from world coords with Y=up, - // whereas this is from NDC which is Y=down. - - return result; - } - - // Converts Fov Tan angle units to [-1,1] render target NDC space - Vector2f TanAngleToRendertargetNDC(Vector2f const &tanEyeAngle) - { - ScaleAndOffset2D eyeToSourceNDC = CreateNDCScaleAndOffsetFromFov(*this); - return tanEyeAngle * eyeToSourceNDC.Scale + eyeToSourceNDC.Offset; - } - - // Compute per-channel minimum and maximum of Fov. - static FovPort Min(const FovPort& a, const FovPort& b) - { - FovPort fov( OVRMath_Min( a.UpTan , b.UpTan ), - OVRMath_Min( a.DownTan , b.DownTan ), - OVRMath_Min( a.LeftTan , b.LeftTan ), - OVRMath_Min( a.RightTan, b.RightTan ) ); - return fov; - } - - static FovPort Max(const FovPort& a, const FovPort& b) - { - FovPort fov( OVRMath_Max( a.UpTan , b.UpTan ), - OVRMath_Max( a.DownTan , b.DownTan ), - OVRMath_Max( a.LeftTan , b.LeftTan ), - OVRMath_Max( a.RightTan, b.RightTan ) ); - return fov; - } -}; - - -} // Namespace OVR - - -#if defined(_MSC_VER) - #pragma warning(pop) -#endif - - -#endif diff --git a/src/external/OculusSDK/LibOVR/Include/Extras/OVR_StereoProjection.h b/src/external/OculusSDK/LibOVR/Include/Extras/OVR_StereoProjection.h deleted file mode 100644 index b4bc3bc77..000000000 --- a/src/external/OculusSDK/LibOVR/Include/Extras/OVR_StereoProjection.h +++ /dev/null @@ -1,70 +0,0 @@ -/************************************************************************************ - -Filename : OVR_StereoProjection.h -Content : Stereo projection functions -Created : November 30, 2013 -Authors : Tom Fosyth - -Copyright : Copyright 2014-2016 Oculus VR, LLC All Rights reserved. - -Licensed under the Oculus VR Rift SDK License Version 3.3 (the "License"); -you may not use the Oculus VR Rift SDK except in compliance with the License, -which is provided at the time of installation or download, or which -otherwise accompanies this software in either electronic or hard copy form. - -You may obtain a copy of the License at - -http://www.oculusvr.com/licenses/LICENSE-3.3 - -Unless required by applicable law or agreed to in writing, the Oculus VR SDK -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -*************************************************************************************/ - -#ifndef OVR_StereoProjection_h -#define OVR_StereoProjection_h - - -#include "Extras/OVR_Math.h" - - -namespace OVR { - - -//----------------------------------------------------------------------------------- -// ***** Stereo Enumerations - -// StereoEye specifies which eye we are rendering for; it is used to -// retrieve StereoEyeParams. -enum StereoEye -{ - StereoEye_Left, - StereoEye_Right, - StereoEye_Center -}; - - - -//----------------------------------------------------------------------------------- -// ***** Propjection functions - -Matrix4f CreateProjection ( bool rightHanded, bool isOpenGL, FovPort fov, StereoEye eye, - float zNear = 0.01f, float zFar = 10000.0f, - bool flipZ = false, bool farAtInfinity = false); - -Matrix4f CreateOrthoSubProjection ( bool rightHanded, StereoEye eyeType, - float tanHalfFovX, float tanHalfFovY, - float unitsX, float unitsY, float distanceFromCamera, - float interpupillaryDistance, Matrix4f const &projection, - float zNear = 0.0f, float zFar = 0.0f, - bool flipZ = false, bool farAtInfinity = false); - -ScaleAndOffset2D CreateNDCScaleAndOffsetFromFov ( FovPort fov ); - - -} //namespace OVR - -#endif // OVR_StereoProjection_h diff --git a/src/external/OculusSDK/LibOVR/Include/OVR_CAPI.h b/src/external/OculusSDK/LibOVR/Include/OVR_CAPI.h deleted file mode 100644 index eaabcf592..000000000 --- a/src/external/OculusSDK/LibOVR/Include/OVR_CAPI.h +++ /dev/null @@ -1,2234 +0,0 @@ -/********************************************************************************//** -\file OVR_CAPI.h -\brief C Interface to the Oculus PC SDK tracking and rendering library. -\copyright Copyright 2014 Oculus VR, LLC All Rights reserved. -************************************************************************************/ - -#ifndef OVR_CAPI_h // We don't use version numbers within this name, as all versioned variations of this file are currently mutually exclusive. -#define OVR_CAPI_h ///< Header include guard - - -#include "OVR_CAPI_Keys.h" -#include "OVR_Version.h" -#include "OVR_ErrorCode.h" - - -#include - -#if defined(_MSC_VER) - #pragma warning(push) - #pragma warning(disable: 4324) // structure was padded due to __declspec(align()) - #pragma warning(disable: 4359) // The alignment specified for a type is less than the alignment of the type of one of its data members -#endif - - - -//----------------------------------------------------------------------------------- -// ***** OVR_OS -// -#if !defined(OVR_OS_WIN32) && defined(_WIN32) - #define OVR_OS_WIN32 -#endif - -#if !defined(OVR_OS_MAC) && defined(__APPLE__) - #define OVR_OS_MAC -#endif - -#if !defined(OVR_OS_LINUX) && defined(__linux__) - #define OVR_OS_LINUX -#endif - - - -//----------------------------------------------------------------------------------- -// ***** OVR_CPP -// -#if !defined(OVR_CPP) - #if defined(__cplusplus) - #define OVR_CPP(x) x - #else - #define OVR_CPP(x) /* Not C++ */ - #endif -#endif - - - -//----------------------------------------------------------------------------------- -// ***** OVR_CDECL -// -/// LibOVR calling convention for 32-bit Windows builds. -// -#if !defined(OVR_CDECL) - #if defined(_WIN32) - #define OVR_CDECL __cdecl - #else - #define OVR_CDECL - #endif -#endif - - - -//----------------------------------------------------------------------------------- -// ***** OVR_EXTERN_C -// -/// Defined as extern "C" when built from C++ code. -// -#if !defined(OVR_EXTERN_C) - #ifdef __cplusplus - #define OVR_EXTERN_C extern "C" - #else - #define OVR_EXTERN_C - #endif -#endif - - - -//----------------------------------------------------------------------------------- -// ***** OVR_PUBLIC_FUNCTION / OVR_PRIVATE_FUNCTION -// -// OVR_PUBLIC_FUNCTION - Functions that externally visible from a shared library. Corresponds to Microsoft __dllexport. -// OVR_PUBLIC_CLASS - C++ structs and classes that are externally visible from a shared library. Corresponds to Microsoft __dllexport. -// OVR_PRIVATE_FUNCTION - Functions that are not visible outside of a shared library. They are private to the shared library. -// OVR_PRIVATE_CLASS - C++ structs and classes that are not visible outside of a shared library. They are private to the shared library. -// -// OVR_DLL_BUILD - Used to indicate that the current compilation unit is of a shared library. -// OVR_DLL_IMPORT - Used to indicate that the current compilation unit is a user of the corresponding shared library. -// OVR_STATIC_BUILD - used to indicate that the current compilation unit is not a shared library but rather statically linked code. -// -#if !defined(OVR_PUBLIC_FUNCTION) - #if defined(OVR_DLL_BUILD) - #if defined(_WIN32) - #define OVR_PUBLIC_FUNCTION(rval) OVR_EXTERN_C __declspec(dllexport) rval OVR_CDECL - #define OVR_PUBLIC_CLASS __declspec(dllexport) - #define OVR_PRIVATE_FUNCTION(rval) rval OVR_CDECL - #define OVR_PRIVATE_CLASS - #else - #define OVR_PUBLIC_FUNCTION(rval) OVR_EXTERN_C __attribute__((visibility("default"))) rval OVR_CDECL /* Requires GCC 4.0+ */ - #define OVR_PUBLIC_CLASS __attribute__((visibility("default"))) /* Requires GCC 4.0+ */ - #define OVR_PRIVATE_FUNCTION(rval) __attribute__((visibility("hidden"))) rval OVR_CDECL - #define OVR_PRIVATE_CLASS __attribute__((visibility("hidden"))) - #endif - #elif defined(OVR_DLL_IMPORT) - #if defined(_WIN32) - #define OVR_PUBLIC_FUNCTION(rval) OVR_EXTERN_C __declspec(dllimport) rval OVR_CDECL - #define OVR_PUBLIC_CLASS __declspec(dllimport) - #else - #define OVR_PUBLIC_FUNCTION(rval) OVR_EXTERN_C rval OVR_CDECL - #define OVR_PUBLIC_CLASS - #endif - #define OVR_PRIVATE_FUNCTION(rval) rval OVR_CDECL - #define OVR_PRIVATE_CLASS - #else // OVR_STATIC_BUILD - #define OVR_PUBLIC_FUNCTION(rval) OVR_EXTERN_C rval OVR_CDECL - #define OVR_PUBLIC_CLASS - #define OVR_PRIVATE_FUNCTION(rval) rval OVR_CDECL - #define OVR_PRIVATE_CLASS - #endif -#endif - - -//----------------------------------------------------------------------------------- -// ***** OVR_EXPORT -// -/// Provided for backward compatibility with older versions of this library. -// -#if !defined(OVR_EXPORT) - #ifdef OVR_OS_WIN32 - #define OVR_EXPORT __declspec(dllexport) - #else - #define OVR_EXPORT - #endif -#endif - - - -//----------------------------------------------------------------------------------- -// ***** OVR_ALIGNAS -// -#if !defined(OVR_ALIGNAS) - #if defined(__GNUC__) || defined(__clang__) - #define OVR_ALIGNAS(n) __attribute__((aligned(n))) - #elif defined(_MSC_VER) || defined(__INTEL_COMPILER) - #define OVR_ALIGNAS(n) __declspec(align(n)) - #elif defined(__CC_ARM) - #define OVR_ALIGNAS(n) __align(n) - #else - #error Need to define OVR_ALIGNAS - #endif -#endif - - -//----------------------------------------------------------------------------------- -// ***** OVR_CC_HAS_FEATURE -// -// This is a portable way to use compile-time feature identification available -// with some compilers in a clean way. Direct usage of __has_feature in preprocessing -// statements of non-supporting compilers results in a preprocessing error. -// -// Example usage: -// #if OVR_CC_HAS_FEATURE(is_pod) -// if(__is_pod(T)) // If the type is plain data then we can safely memcpy it. -// memcpy(&destObject, &srcObject, sizeof(object)); -// #endif -// -#if !defined(OVR_CC_HAS_FEATURE) - #if defined(__clang__) // http://clang.llvm.org/docs/LanguageExtensions.html#id2 - #define OVR_CC_HAS_FEATURE(x) __has_feature(x) - #else - #define OVR_CC_HAS_FEATURE(x) 0 - #endif -#endif - - -// ------------------------------------------------------------------------ -// ***** OVR_STATIC_ASSERT -// -// Portable support for C++11 static_assert(). -// Acts as if the following were declared: -// void OVR_STATIC_ASSERT(bool const_expression, const char* msg); -// -// Example usage: -// OVR_STATIC_ASSERT(sizeof(int32_t) == 4, "int32_t expected to be 4 bytes."); - -#if !defined(OVR_STATIC_ASSERT) - #if !(defined(__cplusplus) && (__cplusplus >= 201103L)) /* Other */ && \ - !(defined(__GXX_EXPERIMENTAL_CXX0X__)) /* GCC */ && \ - !(defined(__clang__) && defined(__cplusplus) && OVR_CC_HAS_FEATURE(cxx_static_assert)) /* clang */ && \ - !(defined(_MSC_VER) && (_MSC_VER >= 1600) && defined(__cplusplus)) /* VS2010+ */ - - #if !defined(OVR_SA_UNUSED) - #if defined(OVR_CC_GNU) || defined(OVR_CC_CLANG) - #define OVR_SA_UNUSED __attribute__((unused)) - #else - #define OVR_SA_UNUSED - #endif - #define OVR_SA_PASTE(a,b) a##b - #define OVR_SA_HELP(a,b) OVR_SA_PASTE(a,b) - #endif - - #if defined(__COUNTER__) - #define OVR_STATIC_ASSERT(expression, msg) typedef char OVR_SA_HELP(compileTimeAssert, __COUNTER__) [((expression) != 0) ? 1 : -1] OVR_SA_UNUSED - #else - #define OVR_STATIC_ASSERT(expression, msg) typedef char OVR_SA_HELP(compileTimeAssert, __LINE__) [((expression) != 0) ? 1 : -1] OVR_SA_UNUSED - #endif - - #else - #define OVR_STATIC_ASSERT(expression, msg) static_assert(expression, msg) - #endif -#endif - - -//----------------------------------------------------------------------------------- -// ***** Padding -// -/// Defines explicitly unused space for a struct. -/// When used correcly, usage of this macro should not change the size of the struct. -/// Compile-time and runtime behavior with and without this defined should be identical. -/// -#if !defined(OVR_UNUSED_STRUCT_PAD) - #define OVR_UNUSED_STRUCT_PAD(padName, size) char padName[size]; -#endif - - -//----------------------------------------------------------------------------------- -// ***** Word Size -// -/// Specifies the size of a pointer on the given platform. -/// -#if !defined(OVR_PTR_SIZE) - #if defined(__WORDSIZE) - #define OVR_PTR_SIZE ((__WORDSIZE) / 8) - #elif defined(_WIN64) || defined(__LP64__) || defined(_LP64) || defined(_M_IA64) || defined(__ia64__) || defined(__arch64__) || defined(__64BIT__) || defined(__Ptr_Is_64) - #define OVR_PTR_SIZE 8 - #elif defined(__CC_ARM) && (__sizeof_ptr == 8) - #define OVR_PTR_SIZE 8 - #else - #define OVR_PTR_SIZE 4 - #endif -#endif - - -//----------------------------------------------------------------------------------- -// ***** OVR_ON32 / OVR_ON64 -// -#if OVR_PTR_SIZE == 8 - #define OVR_ON32(x) - #define OVR_ON64(x) x -#else - #define OVR_ON32(x) x - #define OVR_ON64(x) -#endif - - -//----------------------------------------------------------------------------------- -// ***** ovrBool - -typedef char ovrBool; ///< Boolean type -#define ovrFalse 0 ///< ovrBool value of false. -#define ovrTrue 1 ///< ovrBool value of true. - - -//----------------------------------------------------------------------------------- -// ***** Simple Math Structures - -/// A RGBA color with normalized float components. -typedef struct OVR_ALIGNAS(4) ovrColorf_ -{ - float r, g, b, a; -} ovrColorf; - -/// A 2D vector with integer components. -typedef struct OVR_ALIGNAS(4) ovrVector2i_ -{ - int x, y; -} ovrVector2i; - -/// A 2D size with integer components. -typedef struct OVR_ALIGNAS(4) ovrSizei_ -{ - int w, h; -} ovrSizei; - -/// A 2D rectangle with a position and size. -/// All components are integers. -typedef struct OVR_ALIGNAS(4) ovrRecti_ -{ - ovrVector2i Pos; - ovrSizei Size; -} ovrRecti; - -/// A quaternion rotation. -typedef struct OVR_ALIGNAS(4) ovrQuatf_ -{ - float x, y, z, w; -} ovrQuatf; - -/// A 2D vector with float components. -typedef struct OVR_ALIGNAS(4) ovrVector2f_ -{ - float x, y; -} ovrVector2f; - -/// A 3D vector with float components. -typedef struct OVR_ALIGNAS(4) ovrVector3f_ -{ - float x, y, z; -} ovrVector3f; - -/// A 4x4 matrix with float elements. -typedef struct OVR_ALIGNAS(4) ovrMatrix4f_ -{ - float M[4][4]; -} ovrMatrix4f; - - -/// Position and orientation together. -typedef struct OVR_ALIGNAS(4) ovrPosef_ -{ - ovrQuatf Orientation; - ovrVector3f Position; -} ovrPosef; - -/// A full pose (rigid body) configuration with first and second derivatives. -/// -/// Body refers to any object for which ovrPoseStatef is providing data. -/// It can be the HMD, Touch controller, sensor or something else. The context -/// depends on the usage of the struct. -typedef struct OVR_ALIGNAS(8) ovrPoseStatef_ -{ - ovrPosef ThePose; ///< Position and orientation. - ovrVector3f AngularVelocity; ///< Angular velocity in radians per second. - ovrVector3f LinearVelocity; ///< Velocity in meters per second. - ovrVector3f AngularAcceleration; ///< Angular acceleration in radians per second per second. - ovrVector3f LinearAcceleration; ///< Acceleration in meters per second per second. - OVR_UNUSED_STRUCT_PAD(pad0, 4) ///< \internal struct pad. - double TimeInSeconds; ///< Absolute time that this pose refers to. \see ovr_GetTimeInSeconds -} ovrPoseStatef; - -/// Describes the up, down, left, and right angles of the field of view. -/// -/// Field Of View (FOV) tangent of the angle units. -/// \note For a standard 90 degree vertical FOV, we would -/// have: { UpTan = tan(90 degrees / 2), DownTan = tan(90 degrees / 2) }. -typedef struct OVR_ALIGNAS(4) ovrFovPort_ -{ - float UpTan; ///< The tangent of the angle between the viewing vector and the top edge of the field of view. - float DownTan; ///< The tangent of the angle between the viewing vector and the bottom edge of the field of view. - float LeftTan; ///< The tangent of the angle between the viewing vector and the left edge of the field of view. - float RightTan; ///< The tangent of the angle between the viewing vector and the right edge of the field of view. -} ovrFovPort; - - -//----------------------------------------------------------------------------------- -// ***** HMD Types - -/// Enumerates all HMD types that we support. -/// -/// The currently released developer kits are ovrHmd_DK1 and ovrHmd_DK2. The other enumerations are for internal use only. -typedef enum ovrHmdType_ -{ - ovrHmd_None = 0, - ovrHmd_DK1 = 3, - ovrHmd_DKHD = 4, - ovrHmd_DK2 = 6, - ovrHmd_CB = 8, - ovrHmd_Other = 9, - ovrHmd_E3_2015 = 10, - ovrHmd_ES06 = 11, - ovrHmd_ES09 = 12, - ovrHmd_ES11 = 13, - ovrHmd_CV1 = 14, - - ovrHmd_EnumSize = 0x7fffffff ///< \internal Force type int32_t. -} ovrHmdType; - - -/// HMD capability bits reported by device. -/// -typedef enum ovrHmdCaps_ -{ - // Read-only flags - ovrHmdCap_DebugDevice = 0x0010, ///< (read only) Specifies that the HMD is a virtual debug device. - - - ovrHmdCap_EnumSize = 0x7fffffff ///< \internal Force type int32_t. -} ovrHmdCaps; - - -/// Tracking capability bits reported by the device. -/// Used with ovr_GetTrackingCaps. -typedef enum ovrTrackingCaps_ -{ - ovrTrackingCap_Orientation = 0x0010, ///< Supports orientation tracking (IMU). - ovrTrackingCap_MagYawCorrection = 0x0020, ///< Supports yaw drift correction via a magnetometer or other means. - ovrTrackingCap_Position = 0x0040, ///< Supports positional tracking. - ovrTrackingCap_EnumSize = 0x7fffffff ///< \internal Force type int32_t. -} ovrTrackingCaps; - - -/// Specifies which eye is being used for rendering. -/// This type explicitly does not include a third "NoStereo" monoscopic option, as such is -/// not required for an HMD-centered API. -typedef enum ovrEyeType_ -{ - ovrEye_Left = 0, ///< The left eye, from the viewer's perspective. - ovrEye_Right = 1, ///< The right eye, from the viewer's perspective. - ovrEye_Count = 2, ///< \internal Count of enumerated elements. - ovrEye_EnumSize = 0x7fffffff ///< \internal Force type int32_t. -} ovrEyeType; - -/// Specifies the coordinate system ovrTrackingState returns tracking poses in. -/// Used with ovr_SetTrackingOriginType() -typedef enum ovrTrackingOrigin_ -{ - /// \brief Tracking system origin reported at eye (HMD) height - /// \details Prefer using this origin when your application requires - /// matching user's current physical head pose to a virtual head pose - /// without any regards to a the height of the floor. Cockpit-based, - /// or 3rd-person experiences are ideal candidates. - /// When used, all poses in ovrTrackingState are reported as an offset - /// transform from the profile calibrated or recentered HMD pose. - /// It is recommended that apps using this origin type call ovr_RecenterTrackingOrigin - /// prior to starting the VR experience, but notify the user before doing so - /// to make sure the user is in a comfortable pose, facing a comfortable - /// direction. - ovrTrackingOrigin_EyeLevel = 0, - /// \brief Tracking system origin reported at floor height - /// \details Prefer using this origin when your application requires the - /// physical floor height to match the virtual floor height, such as - /// standing experiences. - /// When used, all poses in ovrTrackingState are reported as an offset - /// transform from the profile calibrated floor pose. Calling ovr_RecenterTrackingOrigin - /// will recenter the X & Z axes as well as yaw, but the Y-axis (i.e. height) will continue - /// to be reported using the floor height as the origin for all poses. - ovrTrackingOrigin_FloorLevel = 1, - ovrTrackingOrigin_Count = 2, ///< \internal Count of enumerated elements. - ovrTrackingOrigin_EnumSize = 0x7fffffff ///< \internal Force type int32_t. -} ovrTrackingOrigin; - -/// Identifies a graphics device in a platform-specific way. -/// For Windows this is a LUID type. -typedef struct OVR_ALIGNAS(OVR_PTR_SIZE) ovrGraphicsLuid_ -{ - // Public definition reserves space for graphics API-specific implementation - char Reserved[8]; -} ovrGraphicsLuid; - - -/// This is a complete descriptor of the HMD. -typedef struct OVR_ALIGNAS(OVR_PTR_SIZE) ovrHmdDesc_ -{ - ovrHmdType Type; ///< The type of HMD. - OVR_ON64(OVR_UNUSED_STRUCT_PAD(pad0, 4)) ///< \internal struct paddding. - char ProductName[64]; ///< UTF8-encoded product identification string (e.g. "Oculus Rift DK1"). - char Manufacturer[64]; ///< UTF8-encoded HMD manufacturer identification string. - short VendorId; ///< HID (USB) vendor identifier of the device. - short ProductId; ///< HID (USB) product identifier of the device. - char SerialNumber[24]; ///< HMD serial number. - short FirmwareMajor; ///< HMD firmware major version. - short FirmwareMinor; ///< HMD firmware minor version. - unsigned int AvailableHmdCaps; ///< Capability bits described by ovrHmdCaps which the HMD currently supports. - unsigned int DefaultHmdCaps; ///< Capability bits described by ovrHmdCaps which are default for the current Hmd. - unsigned int AvailableTrackingCaps; ///< Capability bits described by ovrTrackingCaps which the system currently supports. - unsigned int DefaultTrackingCaps; ///< Capability bits described by ovrTrackingCaps which are default for the current system. - ovrFovPort DefaultEyeFov[ovrEye_Count]; ///< Defines the recommended FOVs for the HMD. - ovrFovPort MaxEyeFov[ovrEye_Count]; ///< Defines the maximum FOVs for the HMD. - ovrSizei Resolution; ///< Resolution of the full HMD screen (both eyes) in pixels. - float DisplayRefreshRate; ///< Nominal refresh rate of the display in cycles per second at the time of HMD creation. - OVR_ON64(OVR_UNUSED_STRUCT_PAD(pad1, 4)) ///< \internal struct paddding. -} ovrHmdDesc; - - -/// Used as an opaque pointer to an OVR session. -typedef struct ovrHmdStruct* ovrSession; - - - -/// Bit flags describing the current status of sensor tracking. -/// The values must be the same as in enum StatusBits -/// -/// \see ovrTrackingState -/// -typedef enum ovrStatusBits_ -{ - ovrStatus_OrientationTracked = 0x0001, ///< Orientation is currently tracked (connected and in use). - ovrStatus_PositionTracked = 0x0002, ///< Position is currently tracked (false if out of range). - ovrStatus_EnumSize = 0x7fffffff ///< \internal Force type int32_t. -} ovrStatusBits; - - -/// Specifies the description of a single sensor. -/// -/// \see ovr_GetTrackerDesc -/// -typedef struct OVR_ALIGNAS(OVR_PTR_SIZE) ovrTrackerDesc_ -{ - float FrustumHFovInRadians; ///< Sensor frustum horizontal field-of-view (if present). - float FrustumVFovInRadians; ///< Sensor frustum vertical field-of-view (if present). - float FrustumNearZInMeters; ///< Sensor frustum near Z (if present). - float FrustumFarZInMeters; ///< Sensor frustum far Z (if present). -} ovrTrackerDesc; - - -/// Specifies sensor flags. -/// -/// /see ovrTrackerPose -/// -typedef enum ovrTrackerFlags_ -{ - ovrTracker_Connected = 0x0020, ///< The sensor is present, else the sensor is absent or offline. - ovrTracker_PoseTracked = 0x0004 ///< The sensor has a valid pose, else the pose is unavailable. This will only be set if ovrTracker_Connected is set. -} ovrTrackerFlags; - - -/// Specifies the pose for a single sensor. -/// -typedef struct OVR_ALIGNAS(8) _ovrTrackerPose -{ - unsigned int TrackerFlags; ///< ovrTrackerFlags. - ovrPosef Pose; ///< The sensor's pose. This pose includes sensor tilt (roll and pitch). For a leveled coordinate system use LeveledPose. - ovrPosef LeveledPose; ///< The sensor's leveled pose, aligned with gravity. This value includes position and yaw of the sensor, but not roll and pitch. It can be used as a reference point to render real-world objects in the correct location. - OVR_UNUSED_STRUCT_PAD(pad0, 4) ///< \internal struct pad. -} ovrTrackerPose; - - -/// Tracking state at a given absolute time (describes predicted HMD pose, etc.). -/// Returned by ovr_GetTrackingState. -/// -/// \see ovr_GetTrackingState -/// -typedef struct OVR_ALIGNAS(8) ovrTrackingState_ -{ - /// Predicted head pose (and derivatives) at the requested absolute time. - ovrPoseStatef HeadPose; - - /// HeadPose tracking status described by ovrStatusBits. - unsigned int StatusFlags; - - /// The most recent calculated pose for each hand when hand controller tracking is present. - /// HandPoses[ovrHand_Left] refers to the left hand and HandPoses[ovrHand_Right] to the right hand. - /// These values can be combined with ovrInputState for complete hand controller information. - ovrPoseStatef HandPoses[2]; - - /// HandPoses status flags described by ovrStatusBits. - /// Only ovrStatus_OrientationTracked and ovrStatus_PositionTracked are reported. - unsigned int HandStatusFlags[2]; - - /// The pose of the origin captured during calibration. - /// Like all other poses here, this is expressed in the space set by ovr_RecenterTrackingOrigin, - /// and so will change every time that is called. This pose can be used to calculate - /// where the calibrated origin lands in the new recentered space. - /// If an application never calls ovr_RecenterTrackingOrigin, expect this value to be the identity - /// pose and as such will point respective origin based on ovrTrackingOrigin requested when - /// calling ovr_GetTrackingState. - ovrPosef CalibratedOrigin; - -} ovrTrackingState; - - -/// Rendering information for each eye. Computed by ovr_GetRenderDesc() based on the -/// specified FOV. Note that the rendering viewport is not included -/// here as it can be specified separately and modified per frame by -/// passing different Viewport values in the layer structure. -/// -/// \see ovr_GetRenderDesc -/// -typedef struct OVR_ALIGNAS(4) ovrEyeRenderDesc_ -{ - ovrEyeType Eye; ///< The eye index to which this instance corresponds. - ovrFovPort Fov; ///< The field of view. - ovrRecti DistortedViewport; ///< Distortion viewport. - ovrVector2f PixelsPerTanAngleAtCenter; ///< How many display pixels will fit in tan(angle) = 1. - ovrVector3f HmdToEyeOffset; ///< Translation of each eye, in meters. -} ovrEyeRenderDesc; - - -/// Projection information for ovrLayerEyeFovDepth. -/// -/// Use the utility function ovrTimewarpProjectionDesc_FromProjection to -/// generate this structure from the application's projection matrix. -/// -/// \see ovrLayerEyeFovDepth, ovrTimewarpProjectionDesc_FromProjection -/// -typedef struct OVR_ALIGNAS(4) ovrTimewarpProjectionDesc_ -{ - float Projection22; ///< Projection matrix element [2][2]. - float Projection23; ///< Projection matrix element [2][3]. - float Projection32; ///< Projection matrix element [3][2]. -} ovrTimewarpProjectionDesc; - - -/// Contains the data necessary to properly calculate position info for various layer types. -/// - HmdToEyeOffset is the same value pair provided in ovrEyeRenderDesc. -/// - HmdSpaceToWorldScaleInMeters is used to scale player motion into in-application units. -/// In other words, it is how big an in-application unit is in the player's physical meters. -/// For example, if the application uses inches as its units then HmdSpaceToWorldScaleInMeters would be 0.0254. -/// Note that if you are scaling the player in size, this must also scale. So if your application -/// units are inches, but you're shrinking the player to half their normal size, then -/// HmdSpaceToWorldScaleInMeters would be 0.0254*2.0. -/// -/// \see ovrEyeRenderDesc, ovr_SubmitFrame -/// -typedef struct OVR_ALIGNAS(4) ovrViewScaleDesc_ -{ - ovrVector3f HmdToEyeOffset[ovrEye_Count]; ///< Translation of each eye. - float HmdSpaceToWorldScaleInMeters; ///< Ratio of viewer units to meter units. -} ovrViewScaleDesc; - - -//----------------------------------------------------------------------------------- -// ***** Platform-independent Rendering Configuration - -/// The type of texture resource. -/// -/// \see ovrTextureSwapChainDesc -/// -typedef enum ovrTextureType_ -{ - ovrTexture_2D, ///< 2D textures. - ovrTexture_2D_External, ///< External 2D texture. Not used on PC - ovrTexture_Cube, ///< Cube maps. Not currently supported on PC. - ovrTexture_Count, - ovrTexture_EnumSize = 0x7fffffff ///< \internal Force type int32_t. -} ovrTextureType; - -/// The bindings required for texture swap chain. -/// -/// All texture swap chains are automatically bindable as shader -/// input resources since the Oculus runtime needs this to read them. -/// -/// \see ovrTextureSwapChainDesc -/// -typedef enum ovrTextureBindFlags_ -{ - ovrTextureBind_None, - ovrTextureBind_DX_RenderTarget = 0x0001, ///< The application can write into the chain with pixel shader - ovrTextureBind_DX_UnorderedAccess = 0x0002, ///< The application can write to the chain with compute shader - ovrTextureBind_DX_DepthStencil = 0x0004, ///< The chain buffers can be bound as depth and/or stencil buffers - - ovrTextureBind_EnumSize = 0x7fffffff ///< \internal Force type int32_t. -} ovrTextureBindFlags; - -/// The format of a texture. -/// -/// \see ovrTextureSwapChainDesc -/// -typedef enum ovrTextureFormat_ -{ - OVR_FORMAT_UNKNOWN, - OVR_FORMAT_B5G6R5_UNORM, ///< Not currently supported on PC. Would require a DirectX 11.1 device. - OVR_FORMAT_B5G5R5A1_UNORM, ///< Not currently supported on PC. Would require a DirectX 11.1 device. - OVR_FORMAT_B4G4R4A4_UNORM, ///< Not currently supported on PC. Would require a DirectX 11.1 device. - OVR_FORMAT_R8G8B8A8_UNORM, - OVR_FORMAT_R8G8B8A8_UNORM_SRGB, - OVR_FORMAT_B8G8R8A8_UNORM, - OVR_FORMAT_B8G8R8A8_UNORM_SRGB, ///< Not supported for OpenGL applications - OVR_FORMAT_B8G8R8X8_UNORM, ///< Not supported for OpenGL applications - OVR_FORMAT_B8G8R8X8_UNORM_SRGB, ///< Not supported for OpenGL applications - OVR_FORMAT_R16G16B16A16_FLOAT, - OVR_FORMAT_D16_UNORM, - OVR_FORMAT_D24_UNORM_S8_UINT, - OVR_FORMAT_D32_FLOAT, - OVR_FORMAT_D32_FLOAT_S8X24_UINT, - - // Added in 1.5 compressed formats can be used for static layers - OVR_FORMAT_BC1_UNORM, - OVR_FORMAT_BC1_UNORM_SRGB, - OVR_FORMAT_BC2_UNORM, - OVR_FORMAT_BC2_UNORM_SRGB, - OVR_FORMAT_BC3_UNORM, - OVR_FORMAT_BC3_UNORM_SRGB, - OVR_FORMAT_BC6H_UF16, - OVR_FORMAT_BC6H_SF16, - OVR_FORMAT_BC7_UNORM, - OVR_FORMAT_BC7_UNORM_SRGB, - - OVR_FORMAT_ENUMSIZE = 0x7fffffff ///< \internal Force type int32_t. -} ovrTextureFormat; - -/// Misc flags overriding particular -/// behaviors of a texture swap chain -/// -/// \see ovrTextureSwapChainDesc -/// -typedef enum ovrTextureMiscFlags_ -{ - ovrTextureMisc_None, - - /// DX only: The underlying texture is created with a TYPELESS equivalent of the - /// format specified in the texture desc. The SDK will still access the - /// texture using the format specified in the texture desc, but the app can - /// create views with different formats if this is specified. - ovrTextureMisc_DX_Typeless = 0x0001, - - /// DX only: Allow generation of the mip chain on the GPU via the GenerateMips - /// call. This flag requires that RenderTarget binding also be specified. - ovrTextureMisc_AllowGenerateMips = 0x0002, - - /// Texture swap chain contains protected content, and requires - /// HDCP connection in order to display to HMD. Also prevents - /// mirroring or other redirection of any frame containing this contents - ovrTextureMisc_ProtectedContent = 0x0004, - - ovrTextureMisc_EnumSize = 0x7fffffff ///< \internal Force type int32_t. -} ovrTextureFlags; - -/// Description used to create a texture swap chain. -/// -/// \see ovr_CreateTextureSwapChainDX -/// \see ovr_CreateTextureSwapChainGL -/// -typedef struct ovrTextureSwapChainDesc_ -{ - ovrTextureType Type; - ovrTextureFormat Format; - int ArraySize; ///< Only supported with ovrTexture_2D. Not supported on PC at this time. - int Width; - int Height; - int MipLevels; - int SampleCount; ///< Current only supported on depth textures - ovrBool StaticImage; ///< Not buffered in a chain. For images that don't change - unsigned int MiscFlags; ///< ovrTextureFlags - unsigned int BindFlags; ///< ovrTextureBindFlags. Not used for GL. -} ovrTextureSwapChainDesc; - -/// Description used to create a mirror texture. -/// -/// \see ovr_CreateMirrorTextureDX -/// \see ovr_CreateMirrorTextureGL -/// -typedef struct ovrMirrorTextureDesc_ -{ - ovrTextureFormat Format; - int Width; - int Height; - unsigned int MiscFlags; ///< ovrTextureFlags -} ovrMirrorTextureDesc; - -typedef struct ovrTextureSwapChainData* ovrTextureSwapChain; -typedef struct ovrMirrorTextureData* ovrMirrorTexture; - -//----------------------------------------------------------------------------------- - -/// Describes button input types. -/// Button inputs are combined; that is they will be reported as pressed if they are -/// pressed on either one of the two devices. -/// The ovrButton_Up/Down/Left/Right map to both XBox D-Pad and directional buttons. -/// The ovrButton_Enter and ovrButton_Return map to Start and Back controller buttons, respectively. -typedef enum ovrButton_ -{ - ovrButton_A = 0x00000001, - ovrButton_B = 0x00000002, - ovrButton_RThumb = 0x00000004, - ovrButton_RShoulder = 0x00000008, - - ovrButton_X = 0x00000100, - ovrButton_Y = 0x00000200, - ovrButton_LThumb = 0x00000400, - ovrButton_LShoulder = 0x00000800, - - // Navigation through DPad. - ovrButton_Up = 0x00010000, - ovrButton_Down = 0x00020000, - ovrButton_Left = 0x00040000, - ovrButton_Right = 0x00080000, - ovrButton_Enter = 0x00100000, // Start on XBox controller. - ovrButton_Back = 0x00200000, // Back on Xbox controller. - ovrButton_VolUp = 0x00400000, // only supported by Remote. - ovrButton_VolDown = 0x00800000, // only supported by Remote. - ovrButton_Home = 0x01000000, - ovrButton_Private = ovrButton_VolUp | ovrButton_VolDown | ovrButton_Home, - - // Bit mask of all buttons on the right Touch controller - ovrButton_RMask = ovrButton_A | ovrButton_B | ovrButton_RThumb | ovrButton_RShoulder, - - // Bit mask of all buttons on the left Touch controller - ovrButton_LMask = ovrButton_X | ovrButton_Y | ovrButton_LThumb | ovrButton_LShoulder | - ovrButton_Enter, - - - ovrButton_EnumSize = 0x7fffffff ///< \internal Force type int32_t. -} ovrButton; - -/// Describes touch input types. -/// These values map to capacitive touch values reported ovrInputState::Touch. -/// Some of these values are mapped to button bits for consistency. -typedef enum ovrTouch_ -{ - ovrTouch_A = ovrButton_A, - ovrTouch_B = ovrButton_B, - ovrTouch_RThumb = ovrButton_RThumb, - ovrTouch_RThumbRest = 0x00000008, - ovrTouch_RIndexTrigger = 0x00000010, - - // Bit mask of all the button touches on the right controller - ovrTouch_RButtonMask = ovrTouch_A | ovrTouch_B | ovrTouch_RThumb | ovrTouch_RThumbRest | ovrTouch_RIndexTrigger, - - ovrTouch_X = ovrButton_X, - ovrTouch_Y = ovrButton_Y, - ovrTouch_LThumb = ovrButton_LThumb, - ovrTouch_LThumbRest = 0x00000800, - ovrTouch_LIndexTrigger = 0x00001000, - - // Bit mask of all the button touches on the left controller - ovrTouch_LButtonMask = ovrTouch_X | ovrTouch_Y | ovrTouch_LThumb | ovrTouch_LThumbRest | ovrTouch_LIndexTrigger, - - // Finger pose state - // Derived internally based on distance, proximity to sensors and filtering. - ovrTouch_RIndexPointing = 0x00000020, - ovrTouch_RThumbUp = 0x00000040, - - // Bit mask of all right controller poses - ovrTouch_RPoseMask = ovrTouch_RIndexPointing | ovrTouch_RThumbUp, - - ovrTouch_LIndexPointing = 0x00002000, - ovrTouch_LThumbUp = 0x00004000, - - // Bit mask of all left controller poses - ovrTouch_LPoseMask = ovrTouch_LIndexPointing | ovrTouch_LThumbUp, - - ovrTouch_EnumSize = 0x7fffffff ///< \internal Force type int32_t. -} ovrTouch; - -/// Describes the Touch Haptics engine. -/// Currently, those values will NOT change during a session. -typedef struct OVR_ALIGNAS(OVR_PTR_SIZE) ovrTouchHapticsDesc_ -{ - // Haptics engine frequency/sample-rate, sample time in seconds equals 1.0/sampleRateHz - int SampleRateHz; - // Size of each Haptics sample, sample value range is [0, 2^(Bytes*8)-1] - int SampleSizeInBytes; - - // Queue size that would guarantee Haptics engine would not starve for data - // Make sure size doesn't drop below it for best results - int QueueMinSizeToAvoidStarvation; - - // Minimum, Maximum and Optimal number of samples that can be sent to Haptics through ovr_SubmitControllerVibration - int SubmitMinSamples; - int SubmitMaxSamples; - int SubmitOptimalSamples; -} ovrTouchHapticsDesc; - -/// Specifies which controller is connected; multiple can be connected at once. -typedef enum ovrControllerType_ -{ - ovrControllerType_None = 0x00, - ovrControllerType_LTouch = 0x01, - ovrControllerType_RTouch = 0x02, - ovrControllerType_Touch = 0x03, - ovrControllerType_Remote = 0x04, - ovrControllerType_XBox = 0x10, - - ovrControllerType_Active = 0xff, ///< Operate on or query whichever controller is active. - - ovrControllerType_EnumSize = 0x7fffffff ///< \internal Force type int32_t. -} ovrControllerType; - -/// Haptics buffer submit mode -typedef enum ovrHapticsBufferSubmitMode_ -{ - // Enqueue buffer for later playback - ovrHapticsBufferSubmit_Enqueue -} ovrHapticsBufferSubmitMode; - -/// Haptics buffer descriptor, contains amplitude samples used for Touch vibration -typedef struct ovrHapticsBuffer_ -{ - const void* Samples; - int SamplesCount; - ovrHapticsBufferSubmitMode SubmitMode; -} ovrHapticsBuffer; - -/// State of the Haptics playback for Touch vibration -typedef struct ovrHapticsPlaybackState_ -{ - // Remaining space available to queue more samples - int RemainingQueueSpace; - - // Number of samples currently queued - int SamplesQueued; -} ovrHapticsPlaybackState; - -/// Position tracked devices -typedef enum ovrTrackedDeviceType_ -{ - ovrTrackedDevice_HMD = 0x0001, - ovrTrackedDevice_LTouch = 0x0002, - ovrTrackedDevice_RTouch = 0x0004, - ovrTrackedDevice_Touch = 0x0006, - ovrTrackedDevice_All = 0xFFFF, -} ovrTrackedDeviceType; - -/// Provides names for the left and right hand array indexes. -/// -/// \see ovrInputState, ovrTrackingState -/// -typedef enum ovrHandType_ -{ - ovrHand_Left = 0, - ovrHand_Right = 1, - ovrHand_Count = 2, - ovrHand_EnumSize = 0x7fffffff ///< \internal Force type int32_t. -} ovrHandType; - - - -/// ovrInputState describes the complete controller input state, including Oculus Touch, -/// and XBox gamepad. If multiple inputs are connected and used at the same time, -/// their inputs are combined. -typedef struct ovrInputState_ -{ - /// System type when the controller state was last updated. - double TimeInSeconds; - - /// Values for buttons described by ovrButton. - unsigned int Buttons; - - /// Touch values for buttons and sensors as described by ovrTouch. - unsigned int Touches; - - /// Left and right finger trigger values (ovrHand_Left and ovrHand_Right), in the range 0.0 to 1.0f. - /// Returns 0 if the value would otherwise be less than 0.1176, for ovrControllerType_XBox - float IndexTrigger[ovrHand_Count]; - - /// Left and right hand trigger values (ovrHand_Left and ovrHand_Right), in the range 0.0 to 1.0f. - float HandTrigger[ovrHand_Count]; - - /// Horizontal and vertical thumbstick axis values (ovrHand_Left and ovrHand_Right), in the range -1.0f to 1.0f. - /// Returns a deadzone (value 0) per each axis if the value on that axis would otherwise have been between -.2746 to +.2746, for ovrControllerType_XBox - ovrVector2f Thumbstick[ovrHand_Count]; - - /// The type of the controller this state is for. - ovrControllerType ControllerType; - - /// Left and right finger trigger values (ovrHand_Left and ovrHand_Right), in the range 0.0 to 1.0f. - /// Does not apply a deadzone - /// Added in 1.7 - float IndexTriggerNoDeadzone[ovrHand_Count]; - - /// Left and right hand trigger values (ovrHand_Left and ovrHand_Right), in the range 0.0 to 1.0f. - /// Does not apply a deadzone - /// Added in 1.7 - float HandTriggerNoDeadzone[ovrHand_Count]; - - /// Horizontal and vertical thumbstick axis values (ovrHand_Left and ovrHand_Right), in the range -1.0f to 1.0f - /// Does not apply a deadzone - /// Added in 1.7 - ovrVector2f ThumbstickNoDeadzone[ovrHand_Count]; -} ovrInputState; - - - -//----------------------------------------------------------------------------------- -// ***** Initialize structures - -/// Initialization flags. -/// -/// \see ovrInitParams, ovr_Initialize -/// -typedef enum ovrInitFlags_ -{ - /// When a debug library is requested, a slower debugging version of the library will - /// run which can be used to help solve problems in the library and debug application code. - ovrInit_Debug = 0x00000001, - - /// When a version is requested, the LibOVR runtime respects the RequestedMinorVersion - /// field and verifies that the RequestedMinorVersion is supported. - ovrInit_RequestVersion = 0x00000004, - - // These bits are writable by user code. - ovrinit_WritableBits = 0x00ffffff, - - ovrInit_EnumSize = 0x7fffffff ///< \internal Force type int32_t. -} ovrInitFlags; - - -/// Logging levels -/// -/// \see ovrInitParams, ovrLogCallback -/// -typedef enum ovrLogLevel_ -{ - ovrLogLevel_Debug = 0, ///< Debug-level log event. - ovrLogLevel_Info = 1, ///< Info-level log event. - ovrLogLevel_Error = 2, ///< Error-level log event. - - ovrLogLevel_EnumSize = 0x7fffffff ///< \internal Force type int32_t. -} ovrLogLevel; - - -/// Signature of the logging callback function pointer type. -/// -/// \param[in] userData is an arbitrary value specified by the user of ovrInitParams. -/// \param[in] level is one of the ovrLogLevel constants. -/// \param[in] message is a UTF8-encoded null-terminated string. -/// \see ovrInitParams, ovrLogLevel, ovr_Initialize -/// -typedef void (OVR_CDECL* ovrLogCallback)(uintptr_t userData, int level, const char* message); - - -/// Parameters for ovr_Initialize. -/// -/// \see ovr_Initialize -/// -typedef struct OVR_ALIGNAS(8) ovrInitParams_ -{ - /// Flags from ovrInitFlags to override default behavior. - /// Use 0 for the defaults. - uint32_t Flags; - - /// Requests a specific minimum minor version of the LibOVR runtime. - /// Flags must include ovrInit_RequestVersion or this will be ignored - /// and OVR_MINOR_VERSION will be used. - uint32_t RequestedMinorVersion; - - /// User-supplied log callback function, which may be called at any time - /// asynchronously from multiple threads until ovr_Shutdown completes. - /// Use NULL to specify no log callback. - ovrLogCallback LogCallback; - - /// User-supplied data which is passed as-is to LogCallback. Typically this - /// is used to store an application-specific pointer which is read in the - /// callback function. - uintptr_t UserData; - - /// Relative number of milliseconds to wait for a connection to the server - /// before failing. Use 0 for the default timeout. - uint32_t ConnectionTimeoutMS; - - OVR_ON64(OVR_UNUSED_STRUCT_PAD(pad0, 4)) ///< \internal - -} ovrInitParams; - - -#ifdef __cplusplus -extern "C" { -#endif - -#if !defined(OVR_EXPORTING_CAPI) - -// ----------------------------------------------------------------------------------- -// ***** API Interfaces - -/// Initializes LibOVR -/// -/// Initialize LibOVR for application usage. This includes finding and loading the LibOVRRT -/// shared library. No LibOVR API functions, other than ovr_GetLastErrorInfo and ovr_Detect, can -/// be called unless ovr_Initialize succeeds. A successful call to ovr_Initialize must be eventually -/// followed by a call to ovr_Shutdown. ovr_Initialize calls are idempotent. -/// Calling ovr_Initialize twice does not require two matching calls to ovr_Shutdown. -/// If already initialized, the return value is ovr_Success. -/// -/// LibOVRRT shared library search order: -/// -# Current working directory (often the same as the application directory). -/// -# Module directory (usually the same as the application directory, -/// but not if the module is a separate shared library). -/// -# Application directory -/// -# Development directory (only if OVR_ENABLE_DEVELOPER_SEARCH is enabled, -/// which is off by default). -/// -# Standard OS shared library search location(s) (OS-specific). -/// -/// \param params Specifies custom initialization options. May be NULL to indicate default options. -/// \return Returns an ovrResult indicating success or failure. In the case of failure, use -/// ovr_GetLastErrorInfo to get more information. Example failed results include: -/// - ovrError_Initialize: Generic initialization error. -/// - ovrError_LibLoad: Couldn't load LibOVRRT. -/// - ovrError_LibVersion: LibOVRRT version incompatibility. -/// - ovrError_ServiceConnection: Couldn't connect to the OVR Service. -/// - ovrError_ServiceVersion: OVR Service version incompatibility. -/// - ovrError_IncompatibleOS: The operating system version is incompatible. -/// - ovrError_DisplayInit: Unable to initialize the HMD display. -/// - ovrError_ServerStart: Unable to start the server. Is it already running? -/// - ovrError_Reinitialization: Attempted to re-initialize with a different version. -/// -/// Example code -/// \code{.cpp} -/// ovrResult result = ovr_Initialize(NULL); -/// if(OVR_FAILURE(result)) { -/// ovrErrorInfo errorInfo; -/// ovr_GetLastErrorInfo(&errorInfo); -/// DebugLog("ovr_Initialize failed: %s", errorInfo.ErrorString); -/// return false; -/// } -/// [...] -/// \endcode -/// -/// \see ovr_Shutdown -/// -OVR_PUBLIC_FUNCTION(ovrResult) ovr_Initialize(const ovrInitParams* params); - - -/// Shuts down LibOVR -/// -/// A successful call to ovr_Initialize must be eventually matched by a call to ovr_Shutdown. -/// After calling ovr_Shutdown, no LibOVR functions can be called except ovr_GetLastErrorInfo -/// or another ovr_Initialize. ovr_Shutdown invalidates all pointers, references, and created objects -/// previously returned by LibOVR functions. The LibOVRRT shared library can be unloaded by -/// ovr_Shutdown. -/// -/// \see ovr_Initialize -/// -OVR_PUBLIC_FUNCTION(void) ovr_Shutdown(); - -/// Returns information about the most recent failed return value by the -/// current thread for this library. -/// -/// This function itself can never generate an error. -/// The last error is never cleared by LibOVR, but will be overwritten by new errors. -/// Do not use this call to determine if there was an error in the last API -/// call as successful API calls don't clear the last ovrErrorInfo. -/// To avoid any inconsistency, ovr_GetLastErrorInfo should be called immediately -/// after an API function that returned a failed ovrResult, with no other API -/// functions called in the interim. -/// -/// \param[out] errorInfo The last ovrErrorInfo for the current thread. -/// -/// \see ovrErrorInfo -/// -OVR_PUBLIC_FUNCTION(void) ovr_GetLastErrorInfo(ovrErrorInfo* errorInfo); - - -/// Returns the version string representing the LibOVRRT version. -/// -/// The returned string pointer is valid until the next call to ovr_Shutdown. -/// -/// Note that the returned version string doesn't necessarily match the current -/// OVR_MAJOR_VERSION, etc., as the returned string refers to the LibOVRRT shared -/// library version and not the locally compiled interface version. -/// -/// The format of this string is subject to change in future versions and its contents -/// should not be interpreted. -/// -/// \return Returns a UTF8-encoded null-terminated version string. -/// -OVR_PUBLIC_FUNCTION(const char*) ovr_GetVersionString(); - - -/// Writes a message string to the LibOVR tracing mechanism (if enabled). -/// -/// This message will be passed back to the application via the ovrLogCallback if -/// it was registered. -/// -/// \param[in] level One of the ovrLogLevel constants. -/// \param[in] message A UTF8-encoded null-terminated string. -/// \return returns the strlen of the message or a negative value if the message is too large. -/// -/// \see ovrLogLevel, ovrLogCallback -/// -OVR_PUBLIC_FUNCTION(int) ovr_TraceMessage(int level, const char* message); - - -/// Identify client application info. -/// -/// The string is one or more newline-delimited lines of optional info -/// indicating engine name, engine version, engine plugin name, engine plugin -/// version, engine editor. The order of the lines is not relevant. Individual -/// lines are optional. A newline is not necessary at the end of the last line. -/// Call after ovr_Initialize and before the first call to ovr_Create. -/// Each value is limited to 20 characters. Key names such as 'EngineName:' -/// 'EngineVersion:' do not count towards this limit. -/// -/// \param[in] identity Specifies one or more newline-delimited lines of optional info: -/// EngineName: %s\n -/// EngineVersion: %s\n -/// EnginePluginName: %s\n -/// EnginePluginVersion: %s\n -/// EngineEditor: ('true' or 'false')\n -/// -/// Example code -/// \code{.cpp} -/// ovr_IdentifyClient("EngineName: Unity\n" -/// "EngineVersion: 5.3.3\n" -/// "EnginePluginName: OVRPlugin\n" -/// "EnginePluginVersion: 1.2.0\n" -/// "EngineEditor: true"); -/// \endcode -/// -OVR_PUBLIC_FUNCTION(ovrResult) ovr_IdentifyClient(const char* identity); - - -//------------------------------------------------------------------------------------- -/// @name HMD Management -/// -/// Handles the enumeration, creation, destruction, and properties of an HMD (head-mounted display). -///@{ - - -/// Returns information about the current HMD. -/// -/// ovr_Initialize must have first been called in order for this to succeed, otherwise ovrHmdDesc::Type -/// will be reported as ovrHmd_None. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create, else NULL in which -/// case this function detects whether an HMD is present and returns its info if so. -/// -/// \return Returns an ovrHmdDesc. If the hmd is NULL and ovrHmdDesc::Type is ovrHmd_None then -/// no HMD is present. -/// -OVR_PUBLIC_FUNCTION(ovrHmdDesc) ovr_GetHmdDesc(ovrSession session); - - -/// Returns the number of sensors. -/// -/// The number of sensors may change at any time, so this function should be called before use -/// as opposed to once on startup. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// -/// \return Returns unsigned int count. -/// -OVR_PUBLIC_FUNCTION(unsigned int) ovr_GetTrackerCount(ovrSession session); - - -/// Returns a given sensor description. -/// -/// It's possible that sensor desc [0] may indicate a unconnnected or non-pose tracked sensor, but -/// sensor desc [1] may be connected. -/// -/// ovr_Initialize must have first been called in order for this to succeed, otherwise the returned -/// trackerDescArray will be zero-initialized. The data returned by this function can change at runtime. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// -/// \param[in] trackerDescIndex Specifies a sensor index. The valid indexes are in the range of 0 to -/// the sensor count returned by ovr_GetTrackerCount. -/// -/// \return Returns ovrTrackerDesc. An empty ovrTrackerDesc will be returned if trackerDescIndex is out of range. -/// -/// \see ovrTrackerDesc, ovr_GetTrackerCount -/// -OVR_PUBLIC_FUNCTION(ovrTrackerDesc) ovr_GetTrackerDesc(ovrSession session, unsigned int trackerDescIndex); - - -/// Creates a handle to a VR session. -/// -/// Upon success the returned ovrSession must be eventually freed with ovr_Destroy when it is no longer needed. -/// A second call to ovr_Create will result in an error return value if the previous session has not been destroyed. -/// -/// \param[out] pSession Provides a pointer to an ovrSession which will be written to upon success. -/// \param[out] luid Provides a system specific graphics adapter identifier that locates which -/// graphics adapter has the HMD attached. This must match the adapter used by the application -/// or no rendering output will be possible. This is important for stability on multi-adapter systems. An -/// application that simply chooses the default adapter will not run reliably on multi-adapter systems. -/// \return Returns an ovrResult indicating success or failure. Upon failure -/// the returned ovrSession will be NULL. -/// -/// Example code -/// \code{.cpp} -/// ovrSession session; -/// ovrGraphicsLuid luid; -/// ovrResult result = ovr_Create(&session, &luid); -/// if(OVR_FAILURE(result)) -/// ... -/// \endcode -/// -/// \see ovr_Destroy -/// -OVR_PUBLIC_FUNCTION(ovrResult) ovr_Create(ovrSession* pSession, ovrGraphicsLuid* pLuid); - - -/// Destroys the session. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \see ovr_Create -/// -OVR_PUBLIC_FUNCTION(void) ovr_Destroy(ovrSession session); - -#endif // !defined(OVR_EXPORTING_CAPI) - -/// Specifies status information for the current session. -/// -/// \see ovr_GetSessionStatus -/// -typedef struct ovrSessionStatus_ -{ - ovrBool IsVisible; ///< True if the process has VR focus and thus is visible in the HMD. - ovrBool HmdPresent; ///< True if an HMD is present. - ovrBool HmdMounted; ///< True if the HMD is on the user's head. - ovrBool DisplayLost; ///< True if the session is in a display-lost state. See ovr_SubmitFrame. - ovrBool ShouldQuit; ///< True if the application should initiate shutdown. - ovrBool ShouldRecenter; ///< True if UX has requested re-centering. Must call ovr_ClearShouldRecenterFlag or ovr_RecenterTrackingOrigin. -}ovrSessionStatus; - -#if !defined(OVR_EXPORTING_CAPI) - -/// Returns status information for the application. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[out] sessionStatus Provides an ovrSessionStatus that is filled in. -/// -/// \return Returns an ovrResult indicating success or failure. In the case of -/// failure, use ovr_GetLastErrorInfo to get more information. -// Return values include but aren't limited to: -/// - ovrSuccess: Completed successfully. -/// - ovrError_ServiceConnection: The service connection was lost and the application -// must destroy the session. -/// -OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetSessionStatus(ovrSession session, ovrSessionStatus* sessionStatus); - - -//@} - - - -//------------------------------------------------------------------------------------- -/// @name Tracking -/// -/// Tracking functions handle the position, orientation, and movement of the HMD in space. -/// -/// All tracking interface functions are thread-safe, allowing tracking state to be sampled -/// from different threads. -/// -///@{ - - - -/// Sets the tracking origin type -/// -/// When the tracking origin is changed, all of the calls that either provide -/// or accept ovrPosef will use the new tracking origin provided. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] origin Specifies an ovrTrackingOrigin to be used for all ovrPosef -/// -/// \return Returns an ovrResult indicating success or failure. In the case of failure, use -/// ovr_GetLastErrorInfo to get more information. -/// -/// \see ovrTrackingOrigin, ovr_GetTrackingOriginType -OVR_PUBLIC_FUNCTION(ovrResult) ovr_SetTrackingOriginType(ovrSession session, ovrTrackingOrigin origin); - - -/// Gets the tracking origin state -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// -/// \return Returns the ovrTrackingOrigin that was either set by default, or previous set by the application. -/// -/// \see ovrTrackingOrigin, ovr_SetTrackingOriginType -OVR_PUBLIC_FUNCTION(ovrTrackingOrigin) ovr_GetTrackingOriginType(ovrSession session); - - -/// Re-centers the sensor position and orientation. -/// -/// This resets the (x,y,z) positional components and the yaw orientation component. -/// The Roll and pitch orientation components are always determined by gravity and cannot -/// be redefined. All future tracking will report values relative to this new reference position. -/// If you are using ovrTrackerPoses then you will need to call ovr_GetTrackerPose after -/// this, because the sensor position(s) will change as a result of this. -/// -/// The headset cannot be facing vertically upward or downward but rather must be roughly -/// level otherwise this function will fail with ovrError_InvalidHeadsetOrientation. -/// -/// For more info, see the notes on each ovrTrackingOrigin enumeration to understand how -/// recenter will vary slightly in its behavior based on the current ovrTrackingOrigin setting. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// -/// \return Returns an ovrResult indicating success or failure. In the case of failure, use -/// ovr_GetLastErrorInfo to get more information. Return values include but aren't limited to: -/// - ovrSuccess: Completed successfully. -/// - ovrError_InvalidHeadsetOrientation: The headset was facing an invalid direction when -/// attempting recentering, such as facing vertically. -/// -/// \see ovrTrackingOrigin, ovr_GetTrackerPose -/// -OVR_PUBLIC_FUNCTION(ovrResult) ovr_RecenterTrackingOrigin(ovrSession session); - - -/// Clears the ShouldRecenter status bit in ovrSessionStatus. -/// -/// Clears the ShouldRecenter status bit in ovrSessionStatus, allowing further recenter -/// requests to be detected. Since this is automatically done by ovr_RecenterTrackingOrigin, -/// this is only needs to be called when application is doing its own re-centering. -OVR_PUBLIC_FUNCTION(void) ovr_ClearShouldRecenterFlag(ovrSession session); - - -/// Returns tracking state reading based on the specified absolute system time. -/// -/// Pass an absTime value of 0.0 to request the most recent sensor reading. In this case -/// both PredictedPose and SamplePose will have the same value. -/// -/// This may also be used for more refined timing of front buffer rendering logic, and so on. -/// This may be called by multiple threads. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] absTime Specifies the absolute future time to predict the return -/// ovrTrackingState value. Use 0 to request the most recent tracking state. -/// \param[in] latencyMarker Specifies that this call is the point in time where -/// the "App-to-Mid-Photon" latency timer starts from. If a given ovrLayer -/// provides "SensorSampleTime", that will override the value stored here. -/// \return Returns the ovrTrackingState that is predicted for the given absTime. -/// -/// \see ovrTrackingState, ovr_GetEyePoses, ovr_GetTimeInSeconds -/// -OVR_PUBLIC_FUNCTION(ovrTrackingState) ovr_GetTrackingState(ovrSession session, double absTime, ovrBool latencyMarker); - - - -/// Returns the ovrTrackerPose for the given sensor. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] trackerPoseIndex Index of the sensor being requested. -/// -/// \return Returns the requested ovrTrackerPose. An empty ovrTrackerPose will be returned if trackerPoseIndex is out of range. -/// -/// \see ovr_GetTrackerCount -/// -OVR_PUBLIC_FUNCTION(ovrTrackerPose) ovr_GetTrackerPose(ovrSession session, unsigned int trackerPoseIndex); - - - -/// Returns the most recent input state for controllers, without positional tracking info. -/// -/// \param[out] inputState Input state that will be filled in. -/// \param[in] ovrControllerType Specifies which controller the input will be returned for. -/// \return Returns ovrSuccess if the new state was successfully obtained. -/// -/// \see ovrControllerType -/// -OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetInputState(ovrSession session, ovrControllerType controllerType, ovrInputState* inputState); - - -/// Returns controller types connected to the system OR'ed together. -/// -/// \return A bitmask of ovrControllerTypes connected to the system. -/// -/// \see ovrControllerType -/// -OVR_PUBLIC_FUNCTION(unsigned int) ovr_GetConnectedControllerTypes(ovrSession session); - -/// Gets information about Haptics engine for the specified Touch controller. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] controllerType The controller to retrieve the information from. -/// -/// \return Returns an ovrTouchHapticsDesc. -/// -OVR_PUBLIC_FUNCTION(ovrTouchHapticsDesc) ovr_GetTouchHapticsDesc(ovrSession session, ovrControllerType controllerType); - -/// Sets constant vibration (with specified frequency and amplitude) to a controller. -/// Note: ovr_SetControllerVibration cannot be used interchangeably with ovr_SubmitControllerVibration. -/// -/// This method should be called periodically, vibration lasts for a maximum of 2.5 seconds. -/// It's recommended to call this method once a second, calls will be rejected if called too frequently (over 30hz). -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] controllerType The controller to set the vibration to. -/// \param[in] frequency Vibration frequency. Supported values are: 0.0 (disabled), 0.5 and 1.0. Non valid values will be clamped. -/// \param[in] amplitude Vibration amplitude in the [0.0, 1.0] range. -/// \return Returns ovrSuccess upon success. -/// -OVR_PUBLIC_FUNCTION(ovrResult) ovr_SetControllerVibration(ovrSession session, ovrControllerType controllerType, float frequency, float amplitude); - -/// Submits a Haptics buffer (used for vibration) to Touch (only) controllers. -/// Note: ovr_SubmitControllerVibration cannot be used interchangeably with ovr_SetControllerVibration. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] controllerType Controller where the Haptics buffer will be played. -/// \param[in] buffer Haptics buffer containing amplitude samples to be played. -/// \return Returns ovrSuccess upon success. -/// \see ovrHapticsBuffer -/// -OVR_PUBLIC_FUNCTION(ovrResult) ovr_SubmitControllerVibration(ovrSession session, ovrControllerType controllerType, const ovrHapticsBuffer* buffer); - -/// Gets the Haptics engine playback state of a specific Touch controller. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] controllerType Controller where the Haptics buffer wil be played. -/// \param[in] outState State of the haptics engine. -/// \return Returns ovrSuccess upon success. -/// \see ovrHapticsPlaybackState -/// -OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetControllerVibrationState(ovrSession session, ovrControllerType controllerType, ovrHapticsPlaybackState* outState); - - -#endif // !defined(OVR_EXPORTING_CAPI) - -//------------------------------------------------------------------------------------- -// @name Layers -// -///@{ - - -/// Specifies the maximum number of layers supported by ovr_SubmitFrame. -/// -/// /see ovr_SubmitFrame -/// -enum { - ovrMaxLayerCount = 16 -}; - -/// Describes layer types that can be passed to ovr_SubmitFrame. -/// Each layer type has an associated struct, such as ovrLayerEyeFov. -/// -/// \see ovrLayerHeader -/// -typedef enum ovrLayerType_ -{ - ovrLayerType_Disabled = 0, ///< Layer is disabled. - ovrLayerType_EyeFov = 1, ///< Described by ovrLayerEyeFov. - ovrLayerType_Quad = 3, ///< Described by ovrLayerQuad. Previously called ovrLayerType_QuadInWorld. - /// enum 4 used to be ovrLayerType_QuadHeadLocked. Instead, use ovrLayerType_Quad with ovrLayerFlag_HeadLocked. - ovrLayerType_EyeMatrix = 5, ///< Described by ovrLayerEyeMatrix. - ovrLayerType_EnumSize = 0x7fffffff ///< Force type int32_t. -} ovrLayerType; - - -/// Identifies flags used by ovrLayerHeader and which are passed to ovr_SubmitFrame. -/// -/// \see ovrLayerHeader -/// -typedef enum ovrLayerFlags_ -{ - /// ovrLayerFlag_HighQuality enables 4x anisotropic sampling during the composition of the layer. - /// The benefits are mostly visible at the periphery for high-frequency & high-contrast visuals. - /// For best results consider combining this flag with an ovrTextureSwapChain that has mipmaps and - /// instead of using arbitrary sized textures, prefer texture sizes that are powers-of-two. - /// Actual rendered viewport and doesn't necessarily have to fill the whole texture. - ovrLayerFlag_HighQuality = 0x01, - - /// ovrLayerFlag_TextureOriginAtBottomLeft: the opposite is TopLeft. - /// Generally this is false for D3D, true for OpenGL. - ovrLayerFlag_TextureOriginAtBottomLeft = 0x02, - - /// Mark this surface as "headlocked", which means it is specified - /// relative to the HMD and moves with it, rather than being specified - /// relative to sensor/torso space and remaining still while the head moves. - /// What used to be ovrLayerType_QuadHeadLocked is now ovrLayerType_Quad plus this flag. - /// However the flag can be applied to any layer type to achieve a similar effect. - ovrLayerFlag_HeadLocked = 0x04 - -} ovrLayerFlags; - - -/// Defines properties shared by all ovrLayer structs, such as ovrLayerEyeFov. -/// -/// ovrLayerHeader is used as a base member in these larger structs. -/// This struct cannot be used by itself except for the case that Type is ovrLayerType_Disabled. -/// -/// \see ovrLayerType, ovrLayerFlags -/// -typedef struct OVR_ALIGNAS(OVR_PTR_SIZE) ovrLayerHeader_ -{ - ovrLayerType Type; ///< Described by ovrLayerType. - unsigned Flags; ///< Described by ovrLayerFlags. -} ovrLayerHeader; - - -/// Describes a layer that specifies a monoscopic or stereoscopic view. -/// This is the kind of layer that's typically used as layer 0 to ovr_SubmitFrame, -/// as it is the kind of layer used to render a 3D stereoscopic view. -/// -/// Three options exist with respect to mono/stereo texture usage: -/// - ColorTexture[0] and ColorTexture[1] contain the left and right stereo renderings, respectively. -/// Viewport[0] and Viewport[1] refer to ColorTexture[0] and ColorTexture[1], respectively. -/// - ColorTexture[0] contains both the left and right renderings, ColorTexture[1] is NULL, -/// and Viewport[0] and Viewport[1] refer to sub-rects with ColorTexture[0]. -/// - ColorTexture[0] contains a single monoscopic rendering, and Viewport[0] and -/// Viewport[1] both refer to that rendering. -/// -/// \see ovrTextureSwapChain, ovr_SubmitFrame -/// -typedef struct OVR_ALIGNAS(OVR_PTR_SIZE) ovrLayerEyeFov_ -{ - /// Header.Type must be ovrLayerType_EyeFov. - ovrLayerHeader Header; - - /// ovrTextureSwapChains for the left and right eye respectively. - /// The second one of which can be NULL for cases described above. - ovrTextureSwapChain ColorTexture[ovrEye_Count]; - - /// Specifies the ColorTexture sub-rect UV coordinates. - /// Both Viewport[0] and Viewport[1] must be valid. - ovrRecti Viewport[ovrEye_Count]; - - /// The viewport field of view. - ovrFovPort Fov[ovrEye_Count]; - - /// Specifies the position and orientation of each eye view, with the position specified in meters. - /// RenderPose will typically be the value returned from ovr_CalcEyePoses, - /// but can be different in special cases if a different head pose is used for rendering. - ovrPosef RenderPose[ovrEye_Count]; - - /// Specifies the timestamp when the source ovrPosef (used in calculating RenderPose) - /// was sampled from the SDK. Typically retrieved by calling ovr_GetTimeInSeconds - /// around the instant the application calls ovr_GetTrackingState - /// The main purpose for this is to accurately track app tracking latency. - double SensorSampleTime; - -} ovrLayerEyeFov; - - - - -/// Describes a layer that specifies a monoscopic or stereoscopic view. -/// This uses a direct 3x4 matrix to map from view space to the UV coordinates. -/// It is essentially the same thing as ovrLayerEyeFov but using a much -/// lower level. This is mainly to provide compatibility with specific apps. -/// Unless the application really requires this flexibility, it is usually better -/// to use ovrLayerEyeFov. -/// -/// Three options exist with respect to mono/stereo texture usage: -/// - ColorTexture[0] and ColorTexture[1] contain the left and right stereo renderings, respectively. -/// Viewport[0] and Viewport[1] refer to ColorTexture[0] and ColorTexture[1], respectively. -/// - ColorTexture[0] contains both the left and right renderings, ColorTexture[1] is NULL, -/// and Viewport[0] and Viewport[1] refer to sub-rects with ColorTexture[0]. -/// - ColorTexture[0] contains a single monoscopic rendering, and Viewport[0] and -/// Viewport[1] both refer to that rendering. -/// -/// \see ovrTextureSwapChain, ovr_SubmitFrame -/// -typedef struct OVR_ALIGNAS(OVR_PTR_SIZE) ovrLayerEyeMatrix_ -{ - /// Header.Type must be ovrLayerType_EyeMatrix. - ovrLayerHeader Header; - - /// ovrTextureSwapChains for the left and right eye respectively. - /// The second one of which can be NULL for cases described above. - ovrTextureSwapChain ColorTexture[ovrEye_Count]; - - /// Specifies the ColorTexture sub-rect UV coordinates. - /// Both Viewport[0] and Viewport[1] must be valid. - ovrRecti Viewport[ovrEye_Count]; - - /// Specifies the position and orientation of each eye view, with the position specified in meters. - /// RenderPose will typically be the value returned from ovr_CalcEyePoses, - /// but can be different in special cases if a different head pose is used for rendering. - ovrPosef RenderPose[ovrEye_Count]; - - /// Specifies the mapping from a view-space vector - /// to a UV coordinate on the textures given above. - /// P = (x,y,z,1)*Matrix - /// TexU = P.x/P.z - /// TexV = P.y/P.z - ovrMatrix4f Matrix[ovrEye_Count]; - - /// Specifies the timestamp when the source ovrPosef (used in calculating RenderPose) - /// was sampled from the SDK. Typically retrieved by calling ovr_GetTimeInSeconds - /// around the instant the application calls ovr_GetTrackingState - /// The main purpose for this is to accurately track app tracking latency. - double SensorSampleTime; - -} ovrLayerEyeMatrix; - - - - - -/// Describes a layer of Quad type, which is a single quad in world or viewer space. -/// It is used for ovrLayerType_Quad. This type of layer represents a single -/// object placed in the world and not a stereo view of the world itself. -/// -/// A typical use of ovrLayerType_Quad is to draw a television screen in a room -/// that for some reason is more convenient to draw as a layer than as part of the main -/// view in layer 0. For example, it could implement a 3D popup GUI that is drawn at a -/// higher resolution than layer 0 to improve fidelity of the GUI. -/// -/// Quad layers are visible from both sides; they are not back-face culled. -/// -/// \see ovrTextureSwapChain, ovr_SubmitFrame -/// -typedef struct OVR_ALIGNAS(OVR_PTR_SIZE) ovrLayerQuad_ -{ - /// Header.Type must be ovrLayerType_Quad. - ovrLayerHeader Header; - - /// Contains a single image, never with any stereo view. - ovrTextureSwapChain ColorTexture; - - /// Specifies the ColorTexture sub-rect UV coordinates. - ovrRecti Viewport; - - /// Specifies the orientation and position of the center point of a Quad layer type. - /// The supplied direction is the vector perpendicular to the quad. - /// The position is in real-world meters (not the application's virtual world, - /// the physical world the user is in) and is relative to the "zero" position - /// set by ovr_RecenterTrackingOrigin unless the ovrLayerFlag_HeadLocked flag is used. - ovrPosef QuadPoseCenter; - - /// Width and height (respectively) of the quad in meters. - ovrVector2f QuadSize; - -} ovrLayerQuad; - - - - -/// Union that combines ovrLayer types in a way that allows them -/// to be used in a polymorphic way. -typedef union ovrLayer_Union_ -{ - ovrLayerHeader Header; - ovrLayerEyeFov EyeFov; - ovrLayerQuad Quad; -} ovrLayer_Union; - - -//@} - -#if !defined(OVR_EXPORTING_CAPI) - -/// @name SDK Distortion Rendering -/// -/// All of rendering functions including the configure and frame functions -/// are not thread safe. It is OK to use ConfigureRendering on one thread and handle -/// frames on another thread, but explicit synchronization must be done since -/// functions that depend on configured state are not reentrant. -/// -/// These functions support rendering of distortion by the SDK. -/// -//@{ - -/// TextureSwapChain creation is rendering API-specific. -/// ovr_CreateTextureSwapChainDX and ovr_CreateTextureSwapChainGL can be found in the -/// rendering API-specific headers, such as OVR_CAPI_D3D.h and OVR_CAPI_GL.h - -/// Gets the number of buffers in an ovrTextureSwapChain. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] chain Specifies the ovrTextureSwapChain for which the length should be retrieved. -/// \param[out] out_Length Returns the number of buffers in the specified chain. -/// -/// \return Returns an ovrResult for which OVR_SUCCESS(result) is false upon error. -/// -/// \see ovr_CreateTextureSwapChainDX, ovr_CreateTextureSwapChainGL -/// -OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetTextureSwapChainLength(ovrSession session, ovrTextureSwapChain chain, int* out_Length); - -/// Gets the current index in an ovrTextureSwapChain. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] chain Specifies the ovrTextureSwapChain for which the index should be retrieved. -/// \param[out] out_Index Returns the current (free) index in specified chain. -/// -/// \return Returns an ovrResult for which OVR_SUCCESS(result) is false upon error. -/// -/// \see ovr_CreateTextureSwapChainDX, ovr_CreateTextureSwapChainGL -/// -OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetTextureSwapChainCurrentIndex(ovrSession session, ovrTextureSwapChain chain, int* out_Index); - -/// Gets the description of the buffers in an ovrTextureSwapChain -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] chain Specifies the ovrTextureSwapChain for which the description should be retrieved. -/// \param[out] out_Desc Returns the description of the specified chain. -/// -/// \return Returns an ovrResult for which OVR_SUCCESS(result) is false upon error. -/// -/// \see ovr_CreateTextureSwapChainDX, ovr_CreateTextureSwapChainGL -/// -OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetTextureSwapChainDesc(ovrSession session, ovrTextureSwapChain chain, ovrTextureSwapChainDesc* out_Desc); - -/// Commits any pending changes to an ovrTextureSwapChain, and advances its current index -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] chain Specifies the ovrTextureSwapChain to commit. -/// -/// \note When Commit is called, the texture at the current index is considered ready for use by the -/// runtime, and further writes to it should be avoided. The swap chain's current index is advanced, -/// providing there's room in the chain. The next time the SDK dereferences this texture swap chain, -/// it will synchronize with the app's graphics context and pick up the submitted index, opening up -/// room in the swap chain for further commits. -/// -/// \return Returns an ovrResult for which OVR_SUCCESS(result) is false upon error. -/// Failures include but aren't limited to: -/// - ovrError_TextureSwapChainFull: ovr_CommitTextureSwapChain was called too many times on a texture swapchain without calling submit to use the chain. -/// -/// \see ovr_CreateTextureSwapChainDX, ovr_CreateTextureSwapChainGL -/// -OVR_PUBLIC_FUNCTION(ovrResult) ovr_CommitTextureSwapChain(ovrSession session, ovrTextureSwapChain chain); - -/// Destroys an ovrTextureSwapChain and frees all the resources associated with it. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] chain Specifies the ovrTextureSwapChain to destroy. If it is NULL then this function has no effect. -/// -/// \see ovr_CreateTextureSwapChainDX, ovr_CreateTextureSwapChainGL -/// -OVR_PUBLIC_FUNCTION(void) ovr_DestroyTextureSwapChain(ovrSession session, ovrTextureSwapChain chain); - - -/// MirrorTexture creation is rendering API-specific. -/// ovr_CreateMirrorTextureDX and ovr_CreateMirrorTextureGL can be found in the -/// rendering API-specific headers, such as OVR_CAPI_D3D.h and OVR_CAPI_GL.h - -/// Destroys a mirror texture previously created by one of the mirror texture creation functions. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] mirrorTexture Specifies the ovrTexture to destroy. If it is NULL then this function has no effect. -/// -/// \see ovr_CreateMirrorTextureDX, ovr_CreateMirrorTextureGL -/// -OVR_PUBLIC_FUNCTION(void) ovr_DestroyMirrorTexture(ovrSession session, ovrMirrorTexture mirrorTexture); - - -/// Calculates the recommended viewport size for rendering a given eye within the HMD -/// with a given FOV cone. -/// -/// Higher FOV will generally require larger textures to maintain quality. -/// Apps packing multiple eye views together on the same texture should ensure there are -/// at least 8 pixels of padding between them to prevent texture filtering and chromatic -/// aberration causing images to leak between the two eye views. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] eye Specifies which eye (left or right) to calculate for. -/// \param[in] fov Specifies the ovrFovPort to use. -/// \param[in] pixelsPerDisplayPixel Specifies the ratio of the number of render target pixels -/// to display pixels at the center of distortion. 1.0 is the default value. Lower -/// values can improve performance, higher values give improved quality. -/// -/// Example code -/// \code{.cpp} -/// ovrHmdDesc hmdDesc = ovr_GetHmdDesc(session); -/// ovrSizei eyeSizeLeft = ovr_GetFovTextureSize(session, ovrEye_Left, hmdDesc.DefaultEyeFov[ovrEye_Left], 1.0f); -/// ovrSizei eyeSizeRight = ovr_GetFovTextureSize(session, ovrEye_Right, hmdDesc.DefaultEyeFov[ovrEye_Right], 1.0f); -/// \endcode -/// -/// \return Returns the texture width and height size. -/// -OVR_PUBLIC_FUNCTION(ovrSizei) ovr_GetFovTextureSize(ovrSession session, ovrEyeType eye, ovrFovPort fov, - float pixelsPerDisplayPixel); - -/// Computes the distortion viewport, view adjust, and other rendering parameters for -/// the specified eye. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] eyeType Specifies which eye (left or right) for which to perform calculations. -/// \param[in] fov Specifies the ovrFovPort to use. -/// -/// \return Returns the computed ovrEyeRenderDesc for the given eyeType and field of view. -/// -/// \see ovrEyeRenderDesc -/// -OVR_PUBLIC_FUNCTION(ovrEyeRenderDesc) ovr_GetRenderDesc(ovrSession session, - ovrEyeType eyeType, ovrFovPort fov); - -/// Submits layers for distortion and display. -/// -/// ovr_SubmitFrame triggers distortion and processing which might happen asynchronously. -/// The function will return when there is room in the submission queue and surfaces -/// are available. Distortion might or might not have completed. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// -/// \param[in] frameIndex Specifies the targeted application frame index, or 0 to refer to one frame -/// after the last time ovr_SubmitFrame was called. -/// -/// \param[in] viewScaleDesc Provides additional information needed only if layerPtrList contains -/// an ovrLayerType_Quad. If NULL, a default version is used based on the current configuration and a 1.0 world scale. -/// -/// \param[in] layerPtrList Specifies a list of ovrLayer pointers, which can include NULL entries to -/// indicate that any previously shown layer at that index is to not be displayed. -/// Each layer header must be a part of a layer structure such as ovrLayerEyeFov or ovrLayerQuad, -/// with Header.Type identifying its type. A NULL layerPtrList entry in the array indicates the -// absence of the given layer. -/// -/// \param[in] layerCount Indicates the number of valid elements in layerPtrList. The maximum -/// supported layerCount is not currently specified, but may be specified in a future version. -/// -/// - Layers are drawn in the order they are specified in the array, regardless of the layer type. -/// -/// - Layers are not remembered between successive calls to ovr_SubmitFrame. A layer must be -/// specified in every call to ovr_SubmitFrame or it won't be displayed. -/// -/// - If a layerPtrList entry that was specified in a previous call to ovr_SubmitFrame is -/// passed as NULL or is of type ovrLayerType_Disabled, that layer is no longer displayed. -/// -/// - A layerPtrList entry can be of any layer type and multiple entries of the same layer type -/// are allowed. No layerPtrList entry may be duplicated (i.e. the same pointer as an earlier entry). -/// -/// Example code -/// \code{.cpp} -/// ovrLayerEyeFov layer0; -/// ovrLayerQuad layer1; -/// ... -/// ovrLayerHeader* layers[2] = { &layer0.Header, &layer1.Header }; -/// ovrResult result = ovr_SubmitFrame(session, frameIndex, nullptr, layers, 2); -/// \endcode -/// -/// \return Returns an ovrResult for which OVR_SUCCESS(result) is false upon error and true -/// upon success. Return values include but aren't limited to: -/// - ovrSuccess: rendering completed successfully. -/// - ovrSuccess_NotVisible: rendering completed successfully but was not displayed on the HMD, -/// usually because another application currently has ownership of the HMD. Applications receiving -/// this result should stop rendering new content, but continue to call ovr_SubmitFrame periodically -/// until it returns a value other than ovrSuccess_NotVisible. -/// - ovrError_DisplayLost: The session has become invalid (such as due to a device removal) -/// and the shared resources need to be released (ovr_DestroyTextureSwapChain), the session needs to -/// destroyed (ovr_Destroy) and recreated (ovr_Create), and new resources need to be created -/// (ovr_CreateTextureSwapChainXXX). The application's existing private graphics resources do not -/// need to be recreated unless the new ovr_Create call returns a different GraphicsLuid. -/// - ovrError_TextureSwapChainInvalid: The ovrTextureSwapChain is in an incomplete or inconsistent state. -/// Ensure ovr_CommitTextureSwapChain was called at least once first. -/// -/// \see ovr_GetPredictedDisplayTime, ovrViewScaleDesc, ovrLayerHeader -/// -OVR_PUBLIC_FUNCTION(ovrResult) ovr_SubmitFrame(ovrSession session, long long frameIndex, - const ovrViewScaleDesc* viewScaleDesc, - ovrLayerHeader const * const * layerPtrList, unsigned int layerCount); -///@} - -#endif // !defined(OVR_EXPORTING_CAPI) - -//------------------------------------------------------------------------------------- -/// @name Frame Timing -/// -//@{ - - -#if !defined(OVR_EXPORTING_CAPI) - -/// Gets the time of the specified frame midpoint. -/// -/// Predicts the time at which the given frame will be displayed. The predicted time -/// is the middle of the time period during which the corresponding eye images will -/// be displayed. -/// -/// The application should increment frameIndex for each successively targeted frame, -/// and pass that index to any relevant OVR functions that need to apply to the frame -/// identified by that index. -/// -/// This function is thread-safe and allows for multiple application threads to target -/// their processing to the same displayed frame. -/// -/// In the even that prediction fails due to various reasons (e.g. the display being off -/// or app has yet to present any frames), the return value will be current CPU time. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] frameIndex Identifies the frame the caller wishes to target. -/// A value of zero returns the next frame index. -/// \return Returns the absolute frame midpoint time for the given frameIndex. -/// \see ovr_GetTimeInSeconds -/// -OVR_PUBLIC_FUNCTION(double) ovr_GetPredictedDisplayTime(ovrSession session, long long frameIndex); - - -/// Returns global, absolute high-resolution time in seconds. -/// -/// The time frame of reference for this function is not specified and should not be -/// depended upon. -/// -/// \return Returns seconds as a floating point value. -/// \see ovrPoseStatef, ovrFrameTiming -/// -OVR_PUBLIC_FUNCTION(double) ovr_GetTimeInSeconds(); - -#endif // !defined(OVR_EXPORTING_CAPI) - -/// Performance HUD enables the HMD user to see information critical to -/// the real-time operation of the VR application such as latency timing, -/// and CPU & GPU performance metrics -/// -/// App can toggle performance HUD modes as such: -/// \code{.cpp} -/// ovrPerfHudMode PerfHudMode = ovrPerfHud_LatencyTiming; -/// ovr_SetInt(session, OVR_PERF_HUD_MODE, (int)PerfHudMode); -/// \endcode -/// -typedef enum ovrPerfHudMode_ -{ - ovrPerfHud_Off = 0, ///< Turns off the performance HUD - ovrPerfHud_PerfSummary = 1, ///< Shows performance summary and headroom - ovrPerfHud_LatencyTiming = 2, ///< Shows latency related timing info - ovrPerfHud_AppRenderTiming = 3, ///< Shows render timing info for application - ovrPerfHud_CompRenderTiming = 4, ///< Shows render timing info for OVR compositor - ovrPerfHud_VersionInfo = 5, ///< Shows SDK & HMD version Info - ovrPerfHud_Count = 6, ///< \internal Count of enumerated elements. - ovrPerfHud_EnumSize = 0x7fffffff ///< \internal Force type int32_t. -} ovrPerfHudMode; - -/// Layer HUD enables the HMD user to see information about a layer -/// -/// App can toggle layer HUD modes as such: -/// \code{.cpp} -/// ovrLayerHudMode LayerHudMode = ovrLayerHud_Info; -/// ovr_SetInt(session, OVR_LAYER_HUD_MODE, (int)LayerHudMode); -/// \endcode -/// -typedef enum ovrLayerHudMode_ -{ - ovrLayerHud_Off = 0, ///< Turns off the layer HUD - ovrLayerHud_Info = 1, ///< Shows info about a specific layer - ovrLayerHud_EnumSize = 0x7fffffff -} ovrLayerHudMode; - -///@} - -/// Debug HUD is provided to help developers gauge and debug the fidelity of their app's -/// stereo rendering characteristics. Using the provided quad and crosshair guides, -/// the developer can verify various aspects such as VR tracking units (e.g. meters), -/// stereo camera-parallax properties (e.g. making sure objects at infinity are rendered -/// with the proper separation), measuring VR geometry sizes and distances and more. -/// -/// App can toggle the debug HUD modes as such: -/// \code{.cpp} -/// ovrDebugHudStereoMode DebugHudMode = ovrDebugHudStereo_QuadWithCrosshair; -/// ovr_SetInt(session, OVR_DEBUG_HUD_STEREO_MODE, (int)DebugHudMode); -/// \endcode -/// -/// The app can modify the visual properties of the stereo guide (i.e. quad, crosshair) -/// using the ovr_SetFloatArray function. For a list of tweakable properties, -/// see the OVR_DEBUG_HUD_STEREO_GUIDE_* keys in the OVR_CAPI_Keys.h header file. -typedef enum ovrDebugHudStereoMode_ -{ - ovrDebugHudStereo_Off = 0, ///< Turns off the Stereo Debug HUD - ovrDebugHudStereo_Quad = 1, ///< Renders Quad in world for Stereo Debugging - ovrDebugHudStereo_QuadWithCrosshair = 2, ///< Renders Quad+crosshair in world for Stereo Debugging - ovrDebugHudStereo_CrosshairAtInfinity = 3, ///< Renders screen-space crosshair at infinity for Stereo Debugging - ovrDebugHudStereo_Count, ///< \internal Count of enumerated elements - - ovrDebugHudStereo_EnumSize = 0x7fffffff ///< \internal Force type int32_t -} ovrDebugHudStereoMode; - - -#if !defined(OVR_EXPORTING_CAPI) - -// ----------------------------------------------------------------------------------- -/// @name Property Access -/// -/// These functions read and write OVR properties. Supported properties -/// are defined in OVR_CAPI_Keys.h -/// -//@{ - -/// Reads a boolean property. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] propertyName The name of the property, which needs to be valid for only the call. -/// \param[in] defaultVal specifes the value to return if the property couldn't be read. -/// \return Returns the property interpreted as a boolean value. Returns defaultVal if -/// the property doesn't exist. -OVR_PUBLIC_FUNCTION(ovrBool) ovr_GetBool(ovrSession session, const char* propertyName, ovrBool defaultVal); - -/// Writes or creates a boolean property. -/// If the property wasn't previously a boolean property, it is changed to a boolean property. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] propertyName The name of the property, which needs to be valid only for the call. -/// \param[in] value The value to write. -/// \return Returns true if successful, otherwise false. A false result should only occur if the property -/// name is empty or if the property is read-only. -OVR_PUBLIC_FUNCTION(ovrBool) ovr_SetBool(ovrSession session, const char* propertyName, ovrBool value); - - -/// Reads an integer property. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] propertyName The name of the property, which needs to be valid only for the call. -/// \param[in] defaultVal Specifes the value to return if the property couldn't be read. -/// \return Returns the property interpreted as an integer value. Returns defaultVal if -/// the property doesn't exist. -OVR_PUBLIC_FUNCTION(int) ovr_GetInt(ovrSession session, const char* propertyName, int defaultVal); - -/// Writes or creates an integer property. -/// -/// If the property wasn't previously a boolean property, it is changed to an integer property. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] propertyName The name of the property, which needs to be valid only for the call. -/// \param[in] value The value to write. -/// \return Returns true if successful, otherwise false. A false result should only occur if the property -/// name is empty or if the property is read-only. -OVR_PUBLIC_FUNCTION(ovrBool) ovr_SetInt(ovrSession session, const char* propertyName, int value); - - -/// Reads a float property. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] propertyName The name of the property, which needs to be valid only for the call. -/// \param[in] defaultVal specifes the value to return if the property couldn't be read. -/// \return Returns the property interpreted as an float value. Returns defaultVal if -/// the property doesn't exist. -OVR_PUBLIC_FUNCTION(float) ovr_GetFloat(ovrSession session, const char* propertyName, float defaultVal); - -/// Writes or creates a float property. -/// If the property wasn't previously a float property, it's changed to a float property. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] propertyName The name of the property, which needs to be valid only for the call. -/// \param[in] value The value to write. -/// \return Returns true if successful, otherwise false. A false result should only occur if the property -/// name is empty or if the property is read-only. -OVR_PUBLIC_FUNCTION(ovrBool) ovr_SetFloat(ovrSession session, const char* propertyName, float value); - - -/// Reads a float array property. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] propertyName The name of the property, which needs to be valid only for the call. -/// \param[in] values An array of float to write to. -/// \param[in] valuesCapacity Specifies the maximum number of elements to write to the values array. -/// \return Returns the number of elements read, or 0 if property doesn't exist or is empty. -OVR_PUBLIC_FUNCTION(unsigned int) ovr_GetFloatArray(ovrSession session, const char* propertyName, - float values[], unsigned int valuesCapacity); - -/// Writes or creates a float array property. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] propertyName The name of the property, which needs to be valid only for the call. -/// \param[in] values An array of float to write from. -/// \param[in] valuesSize Specifies the number of elements to write. -/// \return Returns true if successful, otherwise false. A false result should only occur if the property -/// name is empty or if the property is read-only. -OVR_PUBLIC_FUNCTION(ovrBool) ovr_SetFloatArray(ovrSession session, const char* propertyName, - const float values[], unsigned int valuesSize); - - -/// Reads a string property. -/// Strings are UTF8-encoded and null-terminated. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] propertyName The name of the property, which needs to be valid only for the call. -/// \param[in] defaultVal Specifes the value to return if the property couldn't be read. -/// \return Returns the string property if it exists. Otherwise returns defaultVal, which can be specified as NULL. -/// The return memory is guaranteed to be valid until next call to ovr_GetString or -/// until the session is destroyed, whichever occurs first. -OVR_PUBLIC_FUNCTION(const char*) ovr_GetString(ovrSession session, const char* propertyName, - const char* defaultVal); - -/// Writes or creates a string property. -/// Strings are UTF8-encoded and null-terminated. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] propertyName The name of the property, which needs to be valid only for the call. -/// \param[in] value The string property, which only needs to be valid for the duration of the call. -/// \return Returns true if successful, otherwise false. A false result should only occur if the property -/// name is empty or if the property is read-only. -OVR_PUBLIC_FUNCTION(ovrBool) ovr_SetString(ovrSession session, const char* propertyName, - const char* value); - -///@} - -#endif // !defined(OVR_EXPORTING_CAPI) - -#ifdef __cplusplus -} // extern "C" -#endif - - -#if defined(_MSC_VER) - #pragma warning(pop) -#endif - -/// @cond DoxygenIgnore -//----------------------------------------------------------------------------- -// ***** Compiler packing validation -// -// These checks ensure that the compiler settings being used will be compatible -// with with pre-built dynamic library provided with the runtime. - -OVR_STATIC_ASSERT(sizeof(ovrBool) == 1, "ovrBool size mismatch"); -OVR_STATIC_ASSERT(sizeof(ovrVector2i) == 4 * 2, "ovrVector2i size mismatch"); -OVR_STATIC_ASSERT(sizeof(ovrSizei) == 4 * 2, "ovrSizei size mismatch"); -OVR_STATIC_ASSERT(sizeof(ovrRecti) == sizeof(ovrVector2i) + sizeof(ovrSizei), "ovrRecti size mismatch"); -OVR_STATIC_ASSERT(sizeof(ovrQuatf) == 4 * 4, "ovrQuatf size mismatch"); -OVR_STATIC_ASSERT(sizeof(ovrVector2f) == 4 * 2, "ovrVector2f size mismatch"); -OVR_STATIC_ASSERT(sizeof(ovrVector3f) == 4 * 3, "ovrVector3f size mismatch"); -OVR_STATIC_ASSERT(sizeof(ovrMatrix4f) == 4 * 16, "ovrMatrix4f size mismatch"); - -OVR_STATIC_ASSERT(sizeof(ovrPosef) == (7 * 4), "ovrPosef size mismatch"); -OVR_STATIC_ASSERT(sizeof(ovrPoseStatef) == (22 * 4), "ovrPoseStatef size mismatch"); -OVR_STATIC_ASSERT(sizeof(ovrFovPort) == (4 * 4), "ovrFovPort size mismatch"); - -OVR_STATIC_ASSERT(sizeof(ovrHmdCaps) == 4, "ovrHmdCaps size mismatch"); -OVR_STATIC_ASSERT(sizeof(ovrTrackingCaps) == 4, "ovrTrackingCaps size mismatch"); -OVR_STATIC_ASSERT(sizeof(ovrEyeType) == 4, "ovrEyeType size mismatch"); -OVR_STATIC_ASSERT(sizeof(ovrHmdType) == 4, "ovrHmdType size mismatch"); - -OVR_STATIC_ASSERT(sizeof(ovrTrackerDesc) == 4 + 4 + 4 + 4, "ovrTrackerDesc size mismatch"); -OVR_STATIC_ASSERT(sizeof(ovrTrackerPose) == 4 + 4 + sizeof(ovrPosef) + sizeof(ovrPosef), "ovrTrackerPose size mismatch"); -OVR_STATIC_ASSERT(sizeof(ovrTrackingState) == sizeof(ovrPoseStatef) + 4 + 4 + (sizeof(ovrPoseStatef) * 2) + (sizeof(unsigned int) * 2) + sizeof(ovrPosef) + 4, "ovrTrackingState size mismatch"); - - -//OVR_STATIC_ASSERT(sizeof(ovrTextureHeader) == sizeof(ovrRenderAPIType) + sizeof(ovrSizei), -// "ovrTextureHeader size mismatch"); -//OVR_STATIC_ASSERT(sizeof(ovrTexture) == sizeof(ovrTextureHeader) OVR_ON64(+4) + sizeof(uintptr_t) * 8, -// "ovrTexture size mismatch"); -// -OVR_STATIC_ASSERT(sizeof(ovrStatusBits) == 4, "ovrStatusBits size mismatch"); - -OVR_STATIC_ASSERT(sizeof(ovrSessionStatus) == 6, "ovrSessionStatus size mismatch"); - -OVR_STATIC_ASSERT(sizeof(ovrEyeRenderDesc) == sizeof(ovrEyeType) + sizeof(ovrFovPort) + sizeof(ovrRecti) + - sizeof(ovrVector2f) + sizeof(ovrVector3f), - "ovrEyeRenderDesc size mismatch"); -OVR_STATIC_ASSERT(sizeof(ovrTimewarpProjectionDesc) == 4 * 3, "ovrTimewarpProjectionDesc size mismatch"); - -OVR_STATIC_ASSERT(sizeof(ovrInitFlags) == 4, "ovrInitFlags size mismatch"); -OVR_STATIC_ASSERT(sizeof(ovrLogLevel) == 4, "ovrLogLevel size mismatch"); - -OVR_STATIC_ASSERT(sizeof(ovrInitParams) == 4 + 4 + sizeof(ovrLogCallback) + sizeof(uintptr_t) + 4 + 4, - "ovrInitParams size mismatch"); - -OVR_STATIC_ASSERT(sizeof(ovrHmdDesc) == - + sizeof(ovrHmdType) // Type - OVR_ON64(+ 4) // pad0 - + 64 // ProductName - + 64 // Manufacturer - + 2 // VendorId - + 2 // ProductId - + 24 // SerialNumber - + 2 // FirmwareMajor - + 2 // FirmwareMinor - + 4 * 4 // AvailableHmdCaps - DefaultTrackingCaps - + sizeof(ovrFovPort) * 2 // DefaultEyeFov - + sizeof(ovrFovPort) * 2 // MaxEyeFov - + sizeof(ovrSizei) // Resolution - + 4 // DisplayRefreshRate - OVR_ON64(+ 4) // pad1 - , "ovrHmdDesc size mismatch"); - - -// ----------------------------------------------------------------------------------- -// ***** Backward compatibility #includes -// -// This is at the bottom of this file because the following is dependent on the -// declarations above. - -#if !defined(OVR_CAPI_NO_UTILS) - #include "Extras/OVR_CAPI_Util.h" -#endif - -/// @endcond - -#endif // OVR_CAPI_h diff --git a/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_Audio.h b/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_Audio.h deleted file mode 100644 index dc61e19e6..000000000 --- a/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_Audio.h +++ /dev/null @@ -1,84 +0,0 @@ -/********************************************************************************//** -\file OVR_CAPI_Audio.h -\brief CAPI audio functions. -\copyright Copyright 2015 Oculus VR, LLC. All Rights reserved. -************************************************************************************/ - - -#ifndef OVR_CAPI_Audio_h -#define OVR_CAPI_Audio_h - -#ifdef _WIN32 -// Prevents from defining min() and max() macro symbols. -#ifndef NOMINMAX -#define NOMINMAX -#endif -#include -#include "OVR_CAPI.h" -#define OVR_AUDIO_MAX_DEVICE_STR_SIZE 128 - -#if !defined(OVR_EXPORTING_CAPI) - -/// Gets the ID of the preferred VR audio output device. -/// -/// \param[out] deviceOutId The ID of the user's preferred VR audio device to use, which will be valid upon a successful return value, else it will be WAVE_MAPPER. -/// -/// \return Returns an ovrResult indicating success or failure. In the case of failure, use -/// ovr_GetLastErrorInfo to get more information. -/// -OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetAudioDeviceOutWaveId(UINT* deviceOutId); - -/// Gets the ID of the preferred VR audio input device. -/// -/// \param[out] deviceInId The ID of the user's preferred VR audio device to use, which will be valid upon a successful return value, else it will be WAVE_MAPPER. -/// -/// \return Returns an ovrResult indicating success or failure. In the case of failure, use -/// ovr_GetLastErrorInfo to get more information. -/// -OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetAudioDeviceInWaveId(UINT* deviceInId); - - -/// Gets the GUID of the preferred VR audio device as a string. -/// -/// \param[out] deviceOutStrBuffer A buffer where the GUID string for the device will copied to. -/// -/// \return Returns an ovrResult indicating success or failure. In the case of failure, use -/// ovr_GetLastErrorInfo to get more information. -/// -OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetAudioDeviceOutGuidStr(WCHAR deviceOutStrBuffer[OVR_AUDIO_MAX_DEVICE_STR_SIZE]); - - -/// Gets the GUID of the preferred VR audio device. -/// -/// \param[out] deviceOutGuid The GUID of the user's preferred VR audio device to use, which will be valid upon a successful return value, else it will be NULL. -/// -/// \return Returns an ovrResult indicating success or failure. In the case of failure, use -/// ovr_GetLastErrorInfo to get more information. -/// -OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetAudioDeviceOutGuid(GUID* deviceOutGuid); - - -/// Gets the GUID of the preferred VR microphone device as a string. -/// -/// \param[out] deviceInStrBuffer A buffer where the GUID string for the device will copied to. -/// -/// \return Returns an ovrResult indicating success or failure. In the case of failure, use -/// ovr_GetLastErrorInfo to get more information. -/// -OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetAudioDeviceInGuidStr(WCHAR deviceInStrBuffer[OVR_AUDIO_MAX_DEVICE_STR_SIZE]); - - -/// Gets the GUID of the preferred VR microphone device. -/// -/// \param[out] deviceInGuid The GUID of the user's preferred VR audio device to use, which will be valid upon a successful return value, else it will be NULL. -/// -/// \return Returns an ovrResult indicating success or failure. In the case of failure, use -/// ovr_GetLastErrorInfo to get more information. -/// -OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetAudioDeviceInGuid(GUID* deviceInGuid); - -#endif // !defined(OVR_EXPORTING_CAPI) - -#endif //OVR_OS_MS - -#endif // OVR_CAPI_Audio_h diff --git a/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_D3D.h b/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_D3D.h deleted file mode 100644 index 374dab84f..000000000 --- a/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_D3D.h +++ /dev/null @@ -1,158 +0,0 @@ -/********************************************************************************//** -\file OVR_CAPI_D3D.h -\brief D3D specific structures used by the CAPI interface. -\copyright Copyright 2014-2016 Oculus VR, LLC All Rights reserved. -************************************************************************************/ - -#ifndef OVR_CAPI_D3D_h -#define OVR_CAPI_D3D_h - -#include "OVR_CAPI.h" -#include "OVR_Version.h" - - -#if defined (_WIN32) -#include - -#if !defined(OVR_EXPORTING_CAPI) - -//----------------------------------------------------------------------------------- -// ***** Direct3D Specific - -/// Create Texture Swap Chain suitable for use with Direct3D 11 and 12. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] d3dPtr Specifies the application's D3D11Device to create resources with or the D3D12CommandQueue -/// which must be the same one the application renders to the eye textures with. -/// \param[in] desc Specifies requested texture properties. See notes for more info about texture format. -/// \param[in] bindFlags Specifies what ovrTextureBindFlags the application requires for this texture chain. -/// \param[out] out_TextureSwapChain Returns the created ovrTextureSwapChain, which will be valid upon a successful return value, else it will be NULL. -/// This texture chain must be eventually destroyed via ovr_DestroyTextureSwapChain before destroying the session with ovr_Destroy. -/// -/// \return Returns an ovrResult indicating success or failure. In the case of failure, use -/// ovr_GetLastErrorInfo to get more information. -/// -/// \note The texture format provided in \a desc should be thought of as the format the distortion-compositor will use for the -/// ShaderResourceView when reading the contents of the texture. To that end, it is highly recommended that the application -/// requests texture swapchain formats that are in sRGB-space (e.g. OVR_FORMAT_R8G8B8A8_UNORM_SRGB) as the compositor -/// does sRGB-correct rendering. As such, the compositor relies on the GPU's hardware sampler to do the sRGB-to-linear -/// conversion. If the application still prefers to render to a linear format (e.g. OVR_FORMAT_R8G8B8A8_UNORM) while handling the -/// linear-to-gamma conversion via HLSL code, then the application must still request the corresponding sRGB format and also use -/// the \a ovrTextureMisc_DX_Typeless flag in the ovrTextureSwapChainDesc's Flag field. This will allow the application to create -/// a RenderTargetView that is the desired linear format while the compositor continues to treat it as sRGB. Failure to do so -/// will cause the compositor to apply unexpected gamma conversions leading to gamma-curve artifacts. The \a ovrTextureMisc_DX_Typeless -/// flag for depth buffer formats (e.g. OVR_FORMAT_D32_FLOAT) is ignored as they are always converted to be typeless. -/// -/// \see ovr_GetTextureSwapChainLength -/// \see ovr_GetTextureSwapChainCurrentIndex -/// \see ovr_GetTextureSwapChainDesc -/// \see ovr_GetTextureSwapChainBufferDX -/// \see ovr_DestroyTextureSwapChain -/// -OVR_PUBLIC_FUNCTION(ovrResult) ovr_CreateTextureSwapChainDX(ovrSession session, - IUnknown* d3dPtr, - const ovrTextureSwapChainDesc* desc, - ovrTextureSwapChain* out_TextureSwapChain); - - -/// Get a specific buffer within the chain as any compatible COM interface (similar to QueryInterface) -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] chain Specifies an ovrTextureSwapChain previously returned by ovr_CreateTextureSwapChainDX -/// \param[in] index Specifies the index within the chain to retrieve. Must be between 0 and length (see ovr_GetTextureSwapChainLength), -/// or may pass -1 to get the buffer at the CurrentIndex location. (Saving a call to GetTextureSwapChainCurrentIndex) -/// \param[in] iid Specifies the interface ID of the interface pointer to query the buffer for. -/// \param[out] out_Buffer Returns the COM interface pointer retrieved. -/// -/// \return Returns an ovrResult indicating success or failure. In the case of failure, use -/// ovr_GetLastErrorInfo to get more information. -/// -/// Example code -/// \code{.cpp} -/// ovr_GetTextureSwapChainBufferDX(session, chain, 0, IID_ID3D11Texture2D, &d3d11Texture); -/// ovr_GetTextureSwapChainBufferDX(session, chain, 1, IID_PPV_ARGS(&dxgiResource)); -/// \endcode -/// -OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetTextureSwapChainBufferDX(ovrSession session, - ovrTextureSwapChain chain, - int index, - IID iid, - void** out_Buffer); - - -/// Create Mirror Texture which is auto-refreshed to mirror Rift contents produced by this application. -/// -/// A second call to ovr_CreateMirrorTextureDX for a given ovrSession before destroying the first one -/// is not supported and will result in an error return. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] d3dPtr Specifies the application's D3D11Device to create resources with or the D3D12CommandQueue -/// which must be the same one the application renders to the textures with. -/// \param[in] desc Specifies requested texture properties. See notes for more info about texture format. -/// \param[out] out_MirrorTexture Returns the created ovrMirrorTexture, which will be valid upon a successful return value, else it will be NULL. -/// This texture must be eventually destroyed via ovr_DestroyMirrorTexture before destroying the session with ovr_Destroy. -/// -/// \return Returns an ovrResult indicating success or failure. In the case of failure, use -/// ovr_GetLastErrorInfo to get more information. -/// -/// \note The texture format provided in \a desc should be thought of as the format the compositor will use for the RenderTargetView when -/// writing into mirror texture. To that end, it is highly recommended that the application requests a mirror texture format that is -/// in sRGB-space (e.g. OVR_FORMAT_R8G8B8A8_UNORM_SRGB) as the compositor does sRGB-correct rendering. If however the application wants -/// to still read the mirror texture as a linear format (e.g. OVR_FORMAT_R8G8B8A8_UNORM) and handle the sRGB-to-linear conversion in -/// HLSL code, then it is recommended the application still requests an sRGB format and also use the \a ovrTextureMisc_DX_Typeless flag in the -/// ovrMirrorTextureDesc's Flags field. This will allow the application to bind a ShaderResourceView that is a linear format while the -/// compositor continues to treat is as sRGB. Failure to do so will cause the compositor to apply unexpected gamma conversions leading to -/// gamma-curve artifacts. -/// -/// -/// Example code -/// \code{.cpp} -/// ovrMirrorTexture mirrorTexture = nullptr; -/// ovrMirrorTextureDesc mirrorDesc = {}; -/// mirrorDesc.Format = OVR_FORMAT_R8G8B8A8_UNORM_SRGB; -/// mirrorDesc.Width = mirrorWindowWidth; -/// mirrorDesc.Height = mirrorWindowHeight; -/// ovrResult result = ovr_CreateMirrorTextureDX(session, d3d11Device, &mirrorDesc, &mirrorTexture); -/// [...] -/// // Destroy the texture when done with it. -/// ovr_DestroyMirrorTexture(session, mirrorTexture); -/// mirrorTexture = nullptr; -/// \endcode -/// -/// \see ovr_GetMirrorTextureBufferDX -/// \see ovr_DestroyMirrorTexture -/// -OVR_PUBLIC_FUNCTION(ovrResult) ovr_CreateMirrorTextureDX(ovrSession session, - IUnknown* d3dPtr, - const ovrMirrorTextureDesc* desc, - ovrMirrorTexture* out_MirrorTexture); - -/// Get a the underlying buffer as any compatible COM interface (similar to QueryInterface) -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] mirrorTexture Specifies an ovrMirrorTexture previously returned by ovr_CreateMirrorTextureDX -/// \param[in] iid Specifies the interface ID of the interface pointer to query the buffer for. -/// \param[out] out_Buffer Returns the COM interface pointer retrieved. -/// -/// \return Returns an ovrResult indicating success or failure. In the case of failure, use -/// ovr_GetLastErrorInfo to get more information. -/// -/// Example code -/// \code{.cpp} -/// ID3D11Texture2D* d3d11Texture = nullptr; -/// ovr_GetMirrorTextureBufferDX(session, mirrorTexture, IID_PPV_ARGS(&d3d11Texture)); -/// d3d11DeviceContext->CopyResource(d3d11TextureBackBuffer, d3d11Texture); -/// d3d11Texture->Release(); -/// dxgiSwapChain->Present(0, 0); -/// \endcode -/// -OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetMirrorTextureBufferDX(ovrSession session, - ovrMirrorTexture mirrorTexture, - IID iid, - void** out_Buffer); - -#endif // !defined(OVR_EXPORTING_CAPI) - -#endif // _WIN32 - -#endif // OVR_CAPI_D3D_h diff --git a/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_GL.h b/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_GL.h deleted file mode 100644 index 1c073f467..000000000 --- a/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_GL.h +++ /dev/null @@ -1,102 +0,0 @@ -/********************************************************************************//** -\file OVR_CAPI_GL.h -\brief OpenGL-specific structures used by the CAPI interface. -\copyright Copyright 2015 Oculus VR, LLC. All Rights reserved. -************************************************************************************/ - -#ifndef OVR_CAPI_GL_h -#define OVR_CAPI_GL_h - -#include "OVR_CAPI.h" - -#if !defined(OVR_EXPORTING_CAPI) - -/// Creates a TextureSwapChain suitable for use with OpenGL. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] desc Specifies the requested texture properties. See notes for more info about texture format. -/// \param[out] out_TextureSwapChain Returns the created ovrTextureSwapChain, which will be valid upon -/// a successful return value, else it will be NULL. This texture swap chain must be eventually -/// destroyed via ovr_DestroyTextureSwapChain before destroying the session with ovr_Destroy. -/// -/// \return Returns an ovrResult indicating success or failure. In the case of failure, use -/// ovr_GetLastErrorInfo to get more information. -/// -/// \note The \a format provided should be thought of as the format the distortion compositor will use when reading -/// the contents of the texture. To that end, it is highly recommended that the application requests texture swap chain -/// formats that are in sRGB-space (e.g. OVR_FORMAT_R8G8B8A8_UNORM_SRGB) as the distortion compositor does sRGB-correct -/// rendering. Furthermore, the app should then make sure "glEnable(GL_FRAMEBUFFER_SRGB);" is called before rendering -/// into these textures. Even though it is not recommended, if the application would like to treat the texture as a linear -/// format and do linear-to-gamma conversion in GLSL, then the application can avoid calling "glEnable(GL_FRAMEBUFFER_SRGB);", -/// but should still pass in an sRGB variant for the \a format. Failure to do so will cause the distortion compositor -/// to apply incorrect gamma conversions leading to gamma-curve artifacts. -/// -/// \see ovr_GetTextureSwapChainLength -/// \see ovr_GetTextureSwapChainCurrentIndex -/// \see ovr_GetTextureSwapChainDesc -/// \see ovr_GetTextureSwapChainBufferGL -/// \see ovr_DestroyTextureSwapChain -/// -OVR_PUBLIC_FUNCTION(ovrResult) ovr_CreateTextureSwapChainGL(ovrSession session, - const ovrTextureSwapChainDesc* desc, - ovrTextureSwapChain* out_TextureSwapChain); - -/// Get a specific buffer within the chain as a GL texture name -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] chain Specifies an ovrTextureSwapChain previously returned by ovr_CreateTextureSwapChainGL -/// \param[in] index Specifies the index within the chain to retrieve. Must be between 0 and length (see ovr_GetTextureSwapChainLength) -/// or may pass -1 to get the buffer at the CurrentIndex location. (Saving a call to GetTextureSwapChainCurrentIndex) -/// \param[out] out_TexId Returns the GL texture object name associated with the specific index requested -/// -/// \return Returns an ovrResult indicating success or failure. In the case of failure, use -/// ovr_GetLastErrorInfo to get more information. -/// -OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetTextureSwapChainBufferGL(ovrSession session, - ovrTextureSwapChain chain, - int index, - unsigned int* out_TexId); - - -/// Creates a Mirror Texture which is auto-refreshed to mirror Rift contents produced by this application. -/// -/// A second call to ovr_CreateMirrorTextureGL for a given ovrSession before destroying the first one -/// is not supported and will result in an error return. -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] desc Specifies the requested mirror texture description. -/// \param[out] out_MirrorTexture Specifies the created ovrMirrorTexture, which will be valid upon a successful return value, else it will be NULL. -/// This texture must be eventually destroyed via ovr_DestroyMirrorTexture before destroying the session with ovr_Destroy. -/// -/// \return Returns an ovrResult indicating success or failure. In the case of failure, use -/// ovr_GetLastErrorInfo to get more information. -/// -/// \note The \a format provided should be thought of as the format the distortion compositor will use when writing into the mirror -/// texture. It is highly recommended that mirror textures are requested as sRGB formats because the distortion compositor -/// does sRGB-correct rendering. If the application requests a non-sRGB format (e.g. R8G8B8A8_UNORM) as the mirror texture, -/// then the application might have to apply a manual linear-to-gamma conversion when reading from the mirror texture. -/// Failure to do so can result in incorrect gamma conversions leading to gamma-curve artifacts and color banding. -/// -/// \see ovr_GetMirrorTextureBufferGL -/// \see ovr_DestroyMirrorTexture -/// -OVR_PUBLIC_FUNCTION(ovrResult) ovr_CreateMirrorTextureGL(ovrSession session, - const ovrMirrorTextureDesc* desc, - ovrMirrorTexture* out_MirrorTexture); - -/// Get a the underlying buffer as a GL texture name -/// -/// \param[in] session Specifies an ovrSession previously returned by ovr_Create. -/// \param[in] mirrorTexture Specifies an ovrMirrorTexture previously returned by ovr_CreateMirrorTextureGL -/// \param[out] out_TexId Specifies the GL texture object name associated with the mirror texture -/// -/// \return Returns an ovrResult indicating success or failure. In the case of failure, use -/// ovr_GetLastErrorInfo to get more information. -/// -OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetMirrorTextureBufferGL(ovrSession session, - ovrMirrorTexture mirrorTexture, - unsigned int* out_TexId); - -#endif // !defined(OVR_EXPORTING_CAPI) - -#endif // OVR_CAPI_GL_h diff --git a/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_Keys.h b/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_Keys.h deleted file mode 100644 index e3e9d689c..000000000 --- a/src/external/OculusSDK/LibOVR/Include/OVR_CAPI_Keys.h +++ /dev/null @@ -1,53 +0,0 @@ -/********************************************************************************//** -\file OVR_CAPI.h -\brief Keys for CAPI proprty function calls -\copyright Copyright 2015 Oculus VR, LLC All Rights reserved. -************************************************************************************/ - -#ifndef OVR_CAPI_Keys_h -#define OVR_CAPI_Keys_h - -#include "OVR_Version.h" - - - -#define OVR_KEY_USER "User" // string - -#define OVR_KEY_NAME "Name" // string - -#define OVR_KEY_GENDER "Gender" // string "Male", "Female", or "Unknown" -#define OVR_DEFAULT_GENDER "Unknown" - -#define OVR_KEY_PLAYER_HEIGHT "PlayerHeight" // float meters -#define OVR_DEFAULT_PLAYER_HEIGHT 1.778f - -#define OVR_KEY_EYE_HEIGHT "EyeHeight" // float meters -#define OVR_DEFAULT_EYE_HEIGHT 1.675f - -#define OVR_KEY_NECK_TO_EYE_DISTANCE "NeckEyeDistance" // float[2] meters -#define OVR_DEFAULT_NECK_TO_EYE_HORIZONTAL 0.0805f -#define OVR_DEFAULT_NECK_TO_EYE_VERTICAL 0.075f - - -#define OVR_KEY_EYE_TO_NOSE_DISTANCE "EyeToNoseDist" // float[2] meters - - - - - -#define OVR_PERF_HUD_MODE "PerfHudMode" // int, allowed values are defined in enum ovrPerfHudMode - -#define OVR_LAYER_HUD_MODE "LayerHudMode" // int, allowed values are defined in enum ovrLayerHudMode -#define OVR_LAYER_HUD_CURRENT_LAYER "LayerHudCurrentLayer" // int, The layer to show -#define OVR_LAYER_HUD_SHOW_ALL_LAYERS "LayerHudShowAll" // bool, Hide other layers when the hud is enabled - -#define OVR_DEBUG_HUD_STEREO_MODE "DebugHudStereoMode" // int, allowed values are defined in enum ovrDebugHudStereoMode -#define OVR_DEBUG_HUD_STEREO_GUIDE_INFO_ENABLE "DebugHudStereoGuideInfoEnable" // bool -#define OVR_DEBUG_HUD_STEREO_GUIDE_SIZE "DebugHudStereoGuideSize2f" // float[2] -#define OVR_DEBUG_HUD_STEREO_GUIDE_POSITION "DebugHudStereoGuidePosition3f" // float[3] -#define OVR_DEBUG_HUD_STEREO_GUIDE_YAWPITCHROLL "DebugHudStereoGuideYawPitchRoll3f" // float[3] -#define OVR_DEBUG_HUD_STEREO_GUIDE_COLOR "DebugHudStereoGuideColor4f" // float[4] - - - -#endif // OVR_CAPI_Keys_h diff --git a/src/external/OculusSDK/LibOVR/Include/OVR_ErrorCode.h b/src/external/OculusSDK/LibOVR/Include/OVR_ErrorCode.h deleted file mode 100644 index a8b810ead..000000000 --- a/src/external/OculusSDK/LibOVR/Include/OVR_ErrorCode.h +++ /dev/null @@ -1,156 +0,0 @@ -/********************************************************************************//** -\file OVR_ErrorCode.h -\brief This header provides LibOVR error code declarations. -\copyright Copyright 2015-2016 Oculus VR, LLC All Rights reserved. -*************************************************************************************/ - -#ifndef OVR_ErrorCode_h -#define OVR_ErrorCode_h - - -#include "OVR_Version.h" -#include - - - - -#ifndef OVR_RESULT_DEFINED -#define OVR_RESULT_DEFINED ///< Allows ovrResult to be independently defined. -/// API call results are represented at the highest level by a single ovrResult. -typedef int32_t ovrResult; -#endif - - -/// \brief Indicates if an ovrResult indicates success. -/// -/// Some functions return additional successful values other than ovrSucces and -/// require usage of this macro to indicate successs. -/// -#if !defined(OVR_SUCCESS) - #define OVR_SUCCESS(result) (result >= 0) -#endif - - -/// \brief Indicates if an ovrResult indicates an unqualified success. -/// -/// This is useful for indicating that the code intentionally wants to -/// check for result == ovrSuccess as opposed to OVR_SUCCESS(), which -/// checks for result >= ovrSuccess. -/// -#if !defined(OVR_UNQUALIFIED_SUCCESS) - #define OVR_UNQUALIFIED_SUCCESS(result) (result == ovrSuccess) -#endif - - -/// \brief Indicates if an ovrResult indicates failure. -/// -#if !defined(OVR_FAILURE) - #define OVR_FAILURE(result) (!OVR_SUCCESS(result)) -#endif - - -// Success is a value greater or equal to 0, while all error types are negative values. -#ifndef OVR_SUCCESS_DEFINED -#define OVR_SUCCESS_DEFINED ///< Allows ovrResult to be independently defined. -typedef enum ovrSuccessType_ -{ - /// This is a general success result. Use OVR_SUCCESS to test for success. - ovrSuccess = 0, -} ovrSuccessType; -#endif - -// Public success types -// Success is a value greater or equal to 0, while all error types are negative values. -typedef enum ovrSuccessTypes_ -{ - /// Returned from a call to SubmitFrame. The call succeeded, but what the app - /// rendered will not be visible on the HMD. Ideally the app should continue - /// calling SubmitFrame, but not do any rendering. When the result becomes - /// ovrSuccess, rendering should continue as usual. - ovrSuccess_NotVisible = 1000, - -} ovrSuccessTypes; - -// Public error types -typedef enum ovrErrorType_ -{ - /* General errors */ - ovrError_MemoryAllocationFailure = -1000, ///< Failure to allocate memory. - ovrError_InvalidSession = -1002, ///< Invalid ovrSession parameter provided. - ovrError_Timeout = -1003, ///< The operation timed out. - ovrError_NotInitialized = -1004, ///< The system or component has not been initialized. - ovrError_InvalidParameter = -1005, ///< Invalid parameter provided. See error info or log for details. - ovrError_ServiceError = -1006, ///< Generic service error. See error info or log for details. - ovrError_NoHmd = -1007, ///< The given HMD doesn't exist. - ovrError_Unsupported = -1009, ///< Function call is not supported on this hardware/software - ovrError_DeviceUnavailable = -1010, ///< Specified device type isn't available. - ovrError_InvalidHeadsetOrientation = -1011, ///< The headset was in an invalid orientation for the requested operation (e.g. vertically oriented during ovr_RecenterPose). - ovrError_ClientSkippedDestroy = -1012, ///< The client failed to call ovr_Destroy on an active session before calling ovr_Shutdown. Or the client crashed. - ovrError_ClientSkippedShutdown = -1013, ///< The client failed to call ovr_Shutdown or the client crashed. - ovrError_ServiceDeadlockDetected = -1014, ///< The service watchdog discovered a deadlock. - ovrError_InvalidOperation = -1015, ///< Function call is invalid for object's current state - - /* Audio error range, reserved for Audio errors. */ - ovrError_AudioDeviceNotFound = -2001, ///< Failure to find the specified audio device. - ovrError_AudioComError = -2002, ///< Generic COM error. - - /* Initialization errors. */ - ovrError_Initialize = -3000, ///< Generic initialization error. - ovrError_LibLoad = -3001, ///< Couldn't load LibOVRRT. - ovrError_LibVersion = -3002, ///< LibOVRRT version incompatibility. - ovrError_ServiceConnection = -3003, ///< Couldn't connect to the OVR Service. - ovrError_ServiceVersion = -3004, ///< OVR Service version incompatibility. - ovrError_IncompatibleOS = -3005, ///< The operating system version is incompatible. - ovrError_DisplayInit = -3006, ///< Unable to initialize the HMD display. - ovrError_ServerStart = -3007, ///< Unable to start the server. Is it already running? - ovrError_Reinitialization = -3008, ///< Attempting to re-initialize with a different version. - ovrError_MismatchedAdapters = -3009, ///< Chosen rendering adapters between client and service do not match - ovrError_LeakingResources = -3010, ///< Calling application has leaked resources - ovrError_ClientVersion = -3011, ///< Client version too old to connect to service - ovrError_OutOfDateOS = -3012, ///< The operating system is out of date. - ovrError_OutOfDateGfxDriver = -3013, ///< The graphics driver is out of date. - ovrError_IncompatibleGPU = -3014, ///< The graphics hardware is not supported - ovrError_NoValidVRDisplaySystem = -3015, ///< No valid VR display system found. - ovrError_Obsolete = -3016, ///< Feature or API is obsolete and no longer supported. - ovrError_DisabledOrDefaultAdapter = -3017, ///< No supported VR display system found, but disabled or driverless adapter found. - ovrError_HybridGraphicsNotSupported = -3018, ///< The system is using hybrid graphics (Optimus, etc...), which is not support. - ovrError_DisplayManagerInit = -3019, ///< Initialization of the DisplayManager failed. - ovrError_TrackerDriverInit = -3020, ///< Failed to get the interface for an attached tracker - ovrError_LibSignCheck = -3021, ///< LibOVRRT signature check failure. - ovrError_LibPath = -3022, ///< LibOVRRT path failure. - ovrError_LibSymbols = -3023, ///< LibOVRRT symbol resolution failure. - - /* Rendering errors */ - ovrError_DisplayLost = -6000, ///< In the event of a system-wide graphics reset or cable unplug this is returned to the app. - ovrError_TextureSwapChainFull = -6001, ///< ovr_CommitTextureSwapChain was called too many times on a texture swapchain without calling submit to use the chain. - ovrError_TextureSwapChainInvalid = -6002, ///< The ovrTextureSwapChain is in an incomplete or inconsistent state. Ensure ovr_CommitTextureSwapChain was called at least once first. - ovrError_GraphicsDeviceReset = -6003, ///< Graphics device has been reset (TDR, etc...) - ovrError_DisplayRemoved = -6004, ///< HMD removed from the display adapter - ovrError_ContentProtectionNotAvailable = -6005,/// + +#include +#include +#include +#include +#include + +#include "android_native_app_glue.h" +#include + +#define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, "threaded_app", __VA_ARGS__)) +#define LOGE(...) ((void)__android_log_print(ANDROID_LOG_ERROR, "threaded_app", __VA_ARGS__)) + +/* For debug builds, always enable the debug traces in this library */ +#ifndef NDEBUG +# define LOGV(...) ((void)__android_log_print(ANDROID_LOG_VERBOSE, "threaded_app", __VA_ARGS__)) +#else +# define LOGV(...) ((void)0) +#endif + +static void free_saved_state(struct android_app* android_app) { + pthread_mutex_lock(&android_app->mutex); + if (android_app->savedState != NULL) { + free(android_app->savedState); + android_app->savedState = NULL; + android_app->savedStateSize = 0; + } + pthread_mutex_unlock(&android_app->mutex); +} + +int8_t android_app_read_cmd(struct android_app* android_app) { + int8_t cmd; + if (read(android_app->msgread, &cmd, sizeof(cmd)) == sizeof(cmd)) { + switch (cmd) { + case APP_CMD_SAVE_STATE: + free_saved_state(android_app); + break; + } + return cmd; + } else { + LOGE("No data on command pipe!"); + } + return -1; +} + +static void print_cur_config(struct android_app* android_app) { + char lang[2], country[2]; + AConfiguration_getLanguage(android_app->config, lang); + AConfiguration_getCountry(android_app->config, country); + + LOGV("Config: mcc=%d mnc=%d lang=%c%c cnt=%c%c orien=%d touch=%d dens=%d " + "keys=%d nav=%d keysHid=%d navHid=%d sdk=%d size=%d long=%d " + "modetype=%d modenight=%d", + AConfiguration_getMcc(android_app->config), + AConfiguration_getMnc(android_app->config), + lang[0], lang[1], country[0], country[1], + AConfiguration_getOrientation(android_app->config), + AConfiguration_getTouchscreen(android_app->config), + AConfiguration_getDensity(android_app->config), + AConfiguration_getKeyboard(android_app->config), + AConfiguration_getNavigation(android_app->config), + AConfiguration_getKeysHidden(android_app->config), + AConfiguration_getNavHidden(android_app->config), + AConfiguration_getSdkVersion(android_app->config), + AConfiguration_getScreenSize(android_app->config), + AConfiguration_getScreenLong(android_app->config), + AConfiguration_getUiModeType(android_app->config), + AConfiguration_getUiModeNight(android_app->config)); +} + +void android_app_pre_exec_cmd(struct android_app* android_app, int8_t cmd) { + switch (cmd) { + case APP_CMD_INPUT_CHANGED: + LOGV("APP_CMD_INPUT_CHANGED\n"); + pthread_mutex_lock(&android_app->mutex); + if (android_app->inputQueue != NULL) { + AInputQueue_detachLooper(android_app->inputQueue); + } + android_app->inputQueue = android_app->pendingInputQueue; + if (android_app->inputQueue != NULL) { + LOGV("Attaching input queue to looper"); + AInputQueue_attachLooper(android_app->inputQueue, + android_app->looper, LOOPER_ID_INPUT, NULL, + &android_app->inputPollSource); + } + pthread_cond_broadcast(&android_app->cond); + pthread_mutex_unlock(&android_app->mutex); + break; + + case APP_CMD_INIT_WINDOW: + LOGV("APP_CMD_INIT_WINDOW\n"); + pthread_mutex_lock(&android_app->mutex); + android_app->window = android_app->pendingWindow; + pthread_cond_broadcast(&android_app->cond); + pthread_mutex_unlock(&android_app->mutex); + break; + + case APP_CMD_TERM_WINDOW: + LOGV("APP_CMD_TERM_WINDOW\n"); + pthread_cond_broadcast(&android_app->cond); + break; + + case APP_CMD_RESUME: + case APP_CMD_START: + case APP_CMD_PAUSE: + case APP_CMD_STOP: + LOGV("activityState=%d\n", cmd); + pthread_mutex_lock(&android_app->mutex); + android_app->activityState = cmd; + pthread_cond_broadcast(&android_app->cond); + pthread_mutex_unlock(&android_app->mutex); + break; + + case APP_CMD_CONFIG_CHANGED: + LOGV("APP_CMD_CONFIG_CHANGED\n"); + AConfiguration_fromAssetManager(android_app->config, + android_app->activity->assetManager); + print_cur_config(android_app); + break; + + case APP_CMD_DESTROY: + LOGV("APP_CMD_DESTROY\n"); + android_app->destroyRequested = 1; + break; + } +} + +void android_app_post_exec_cmd(struct android_app* android_app, int8_t cmd) { + switch (cmd) { + case APP_CMD_TERM_WINDOW: + LOGV("APP_CMD_TERM_WINDOW\n"); + pthread_mutex_lock(&android_app->mutex); + android_app->window = NULL; + pthread_cond_broadcast(&android_app->cond); + pthread_mutex_unlock(&android_app->mutex); + break; + + case APP_CMD_SAVE_STATE: + LOGV("APP_CMD_SAVE_STATE\n"); + pthread_mutex_lock(&android_app->mutex); + android_app->stateSaved = 1; + pthread_cond_broadcast(&android_app->cond); + pthread_mutex_unlock(&android_app->mutex); + break; + + case APP_CMD_RESUME: + free_saved_state(android_app); + break; + } +} + +void app_dummy() { + +} + +static void android_app_destroy(struct android_app* android_app) { + LOGV("android_app_destroy!"); + free_saved_state(android_app); + pthread_mutex_lock(&android_app->mutex); + if (android_app->inputQueue != NULL) { + AInputQueue_detachLooper(android_app->inputQueue); + } + AConfiguration_delete(android_app->config); + android_app->destroyed = 1; + pthread_cond_broadcast(&android_app->cond); + pthread_mutex_unlock(&android_app->mutex); + // Can't touch android_app object after this. +} + +static void process_input(struct android_app* app, struct android_poll_source* source) { + AInputEvent* event = NULL; + while (AInputQueue_getEvent(app->inputQueue, &event) >= 0) { + LOGV("New input event: type=%d\n", AInputEvent_getType(event)); + if (AInputQueue_preDispatchEvent(app->inputQueue, event)) { + continue; + } + int32_t handled = 0; + if (app->onInputEvent != NULL) handled = app->onInputEvent(app, event); + AInputQueue_finishEvent(app->inputQueue, event, handled); + } +} + +static void process_cmd(struct android_app* app, struct android_poll_source* source) { + int8_t cmd = android_app_read_cmd(app); + android_app_pre_exec_cmd(app, cmd); + if (app->onAppCmd != NULL) app->onAppCmd(app, cmd); + android_app_post_exec_cmd(app, cmd); +} + +static void* android_app_entry(void* param) { + struct android_app* android_app = (struct android_app*)param; + + android_app->config = AConfiguration_new(); + AConfiguration_fromAssetManager(android_app->config, android_app->activity->assetManager); + + print_cur_config(android_app); + + android_app->cmdPollSource.id = LOOPER_ID_MAIN; + android_app->cmdPollSource.app = android_app; + android_app->cmdPollSource.process = process_cmd; + android_app->inputPollSource.id = LOOPER_ID_INPUT; + android_app->inputPollSource.app = android_app; + android_app->inputPollSource.process = process_input; + + ALooper* looper = ALooper_prepare(ALOOPER_PREPARE_ALLOW_NON_CALLBACKS); + ALooper_addFd(looper, android_app->msgread, LOOPER_ID_MAIN, ALOOPER_EVENT_INPUT, NULL, + &android_app->cmdPollSource); + android_app->looper = looper; + + pthread_mutex_lock(&android_app->mutex); + android_app->running = 1; + pthread_cond_broadcast(&android_app->cond); + pthread_mutex_unlock(&android_app->mutex); + + android_main(android_app); + + android_app_destroy(android_app); + return NULL; +} + +// -------------------------------------------------------------------- +// Native activity interaction (called from main thread) +// -------------------------------------------------------------------- + +static struct android_app* android_app_create(ANativeActivity* activity, + void* savedState, size_t savedStateSize) { + struct android_app* android_app = (struct android_app*)malloc(sizeof(struct android_app)); + memset(android_app, 0, sizeof(struct android_app)); + android_app->activity = activity; + + pthread_mutex_init(&android_app->mutex, NULL); + pthread_cond_init(&android_app->cond, NULL); + + if (savedState != NULL) { + android_app->savedState = malloc(savedStateSize); + android_app->savedStateSize = savedStateSize; + memcpy(android_app->savedState, savedState, savedStateSize); + } + + int msgpipe[2]; + if (pipe(msgpipe)) { + LOGE("could not create pipe: %s", strerror(errno)); + return NULL; + } + android_app->msgread = msgpipe[0]; + android_app->msgwrite = msgpipe[1]; + + pthread_attr_t attr; + pthread_attr_init(&attr); + pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); + pthread_create(&android_app->thread, &attr, android_app_entry, android_app); + + // Wait for thread to start. + pthread_mutex_lock(&android_app->mutex); + while (!android_app->running) { + pthread_cond_wait(&android_app->cond, &android_app->mutex); + } + pthread_mutex_unlock(&android_app->mutex); + + return android_app; +} + +static void android_app_write_cmd(struct android_app* android_app, int8_t cmd) { + if (write(android_app->msgwrite, &cmd, sizeof(cmd)) != sizeof(cmd)) { + LOGE("Failure writing android_app cmd: %s\n", strerror(errno)); + } +} + +static void android_app_set_input(struct android_app* android_app, AInputQueue* inputQueue) { + pthread_mutex_lock(&android_app->mutex); + android_app->pendingInputQueue = inputQueue; + android_app_write_cmd(android_app, APP_CMD_INPUT_CHANGED); + while (android_app->inputQueue != android_app->pendingInputQueue) { + pthread_cond_wait(&android_app->cond, &android_app->mutex); + } + pthread_mutex_unlock(&android_app->mutex); +} + +static void android_app_set_window(struct android_app* android_app, ANativeWindow* window) { + pthread_mutex_lock(&android_app->mutex); + if (android_app->pendingWindow != NULL) { + android_app_write_cmd(android_app, APP_CMD_TERM_WINDOW); + } + android_app->pendingWindow = window; + if (window != NULL) { + android_app_write_cmd(android_app, APP_CMD_INIT_WINDOW); + } + while (android_app->window != android_app->pendingWindow) { + pthread_cond_wait(&android_app->cond, &android_app->mutex); + } + pthread_mutex_unlock(&android_app->mutex); +} + +static void android_app_set_activity_state(struct android_app* android_app, int8_t cmd) { + pthread_mutex_lock(&android_app->mutex); + android_app_write_cmd(android_app, cmd); + while (android_app->activityState != cmd) { + pthread_cond_wait(&android_app->cond, &android_app->mutex); + } + pthread_mutex_unlock(&android_app->mutex); +} + +static void android_app_free(struct android_app* android_app) { + pthread_mutex_lock(&android_app->mutex); + android_app_write_cmd(android_app, APP_CMD_DESTROY); + while (!android_app->destroyed) { + pthread_cond_wait(&android_app->cond, &android_app->mutex); + } + pthread_mutex_unlock(&android_app->mutex); + + close(android_app->msgread); + close(android_app->msgwrite); + pthread_cond_destroy(&android_app->cond); + pthread_mutex_destroy(&android_app->mutex); + free(android_app); +} + +static void onDestroy(ANativeActivity* activity) { + LOGV("Destroy: %p\n", activity); + android_app_free((struct android_app*)activity->instance); +} + +static void onStart(ANativeActivity* activity) { + LOGV("Start: %p\n", activity); + android_app_set_activity_state((struct android_app*)activity->instance, APP_CMD_START); +} + +static void onResume(ANativeActivity* activity) { + LOGV("Resume: %p\n", activity); + android_app_set_activity_state((struct android_app*)activity->instance, APP_CMD_RESUME); +} + +static void* onSaveInstanceState(ANativeActivity* activity, size_t* outLen) { + struct android_app* android_app = (struct android_app*)activity->instance; + void* savedState = NULL; + + LOGV("SaveInstanceState: %p\n", activity); + pthread_mutex_lock(&android_app->mutex); + android_app->stateSaved = 0; + android_app_write_cmd(android_app, APP_CMD_SAVE_STATE); + while (!android_app->stateSaved) { + pthread_cond_wait(&android_app->cond, &android_app->mutex); + } + + if (android_app->savedState != NULL) { + savedState = android_app->savedState; + *outLen = android_app->savedStateSize; + android_app->savedState = NULL; + android_app->savedStateSize = 0; + } + + pthread_mutex_unlock(&android_app->mutex); + + return savedState; +} + +static void onPause(ANativeActivity* activity) { + LOGV("Pause: %p\n", activity); + android_app_set_activity_state((struct android_app*)activity->instance, APP_CMD_PAUSE); +} + +static void onStop(ANativeActivity* activity) { + LOGV("Stop: %p\n", activity); + android_app_set_activity_state((struct android_app*)activity->instance, APP_CMD_STOP); +} + +static void onConfigurationChanged(ANativeActivity* activity) { + struct android_app* android_app = (struct android_app*)activity->instance; + LOGV("ConfigurationChanged: %p\n", activity); + android_app_write_cmd(android_app, APP_CMD_CONFIG_CHANGED); +} + +static void onLowMemory(ANativeActivity* activity) { + struct android_app* android_app = (struct android_app*)activity->instance; + LOGV("LowMemory: %p\n", activity); + android_app_write_cmd(android_app, APP_CMD_LOW_MEMORY); +} + +static void onWindowFocusChanged(ANativeActivity* activity, int focused) { + LOGV("WindowFocusChanged: %p -- %d\n", activity, focused); + android_app_write_cmd((struct android_app*)activity->instance, + focused ? APP_CMD_GAINED_FOCUS : APP_CMD_LOST_FOCUS); +} + +static void onNativeWindowCreated(ANativeActivity* activity, ANativeWindow* window) { + LOGV("NativeWindowCreated: %p -- %p\n", activity, window); + android_app_set_window((struct android_app*)activity->instance, window); +} + +static void onNativeWindowDestroyed(ANativeActivity* activity, ANativeWindow* window) { + LOGV("NativeWindowDestroyed: %p -- %p\n", activity, window); + android_app_set_window((struct android_app*)activity->instance, NULL); +} + +static void onInputQueueCreated(ANativeActivity* activity, AInputQueue* queue) { + LOGV("InputQueueCreated: %p -- %p\n", activity, queue); + android_app_set_input((struct android_app*)activity->instance, queue); +} + +static void onInputQueueDestroyed(ANativeActivity* activity, AInputQueue* queue) { + LOGV("InputQueueDestroyed: %p -- %p\n", activity, queue); + android_app_set_input((struct android_app*)activity->instance, NULL); +} + +void ANativeActivity_onCreate(ANativeActivity* activity, + void* savedState, size_t savedStateSize) { + LOGV("Creating: %p\n", activity); + activity->callbacks->onDestroy = onDestroy; + activity->callbacks->onStart = onStart; + activity->callbacks->onResume = onResume; + activity->callbacks->onSaveInstanceState = onSaveInstanceState; + activity->callbacks->onPause = onPause; + activity->callbacks->onStop = onStop; + activity->callbacks->onConfigurationChanged = onConfigurationChanged; + activity->callbacks->onLowMemory = onLowMemory; + activity->callbacks->onWindowFocusChanged = onWindowFocusChanged; + activity->callbacks->onNativeWindowCreated = onNativeWindowCreated; + activity->callbacks->onNativeWindowDestroyed = onNativeWindowDestroyed; + activity->callbacks->onInputQueueCreated = onInputQueueCreated; + activity->callbacks->onInputQueueDestroyed = onInputQueueDestroyed; + + activity->instance = android_app_create(activity, savedState, savedStateSize); +} diff --git a/src/android/jni/include/android_native_app_glue.h b/src/external/android/native_app_glue/android_native_app_glue.h similarity index 99% rename from src/android/jni/include/android_native_app_glue.h rename to src/external/android/native_app_glue/android_native_app_glue.h index 1b8c1f107..97202e094 100644 --- a/src/android/jni/include/android_native_app_glue.h +++ b/src/external/android/native_app_glue/android_native_app_glue.h @@ -39,7 +39,7 @@ extern "C" { * risk having the system force-close the application. This programming * model is direct, lightweight, but constraining. * - * The 'threaded_native_app' static library is used to provide a different + * The 'android_native_app_glue' static library is used to provide a different * execution model where the application can implement its own main event * loop in a different thread instead. Here's how it works: * diff --git a/src/external/openal_soft/include/AL/alext.h b/src/external/openal_soft/include/AL/alext.h index 0090c8041..50ad10ec1 100644 --- a/src/external/openal_soft/include/AL/alext.h +++ b/src/external/openal_soft/include/AL/alext.h @@ -436,6 +436,18 @@ ALC_API ALCboolean ALC_APIENTRY alcResetDeviceSOFT(ALCdevice *device, const ALCi #define AL_GAIN_LIMIT_SOFT 0x200E #endif +#ifndef AL_SOFT_source_resampler +#define AL_SOFT_source_resampler +#define AL_NUM_RESAMPLERS_SOFT 0x1210 +#define AL_DEFAULT_RESAMPLER_SOFT 0x1211 +#define AL_SOURCE_RESAMPLER_SOFT 0x1212 +#define AL_RESAMPLER_NAME_SOFT 0x1213 +typedef const ALchar* (AL_APIENTRY*LPALGETSTRINGISOFT)(ALenum pname, ALsizei index); +#ifdef AL_ALEXT_PROTOTYPES +AL_API const ALchar* AL_APIENTRY alGetStringiSOFT(ALenum pname, ALsizei index); +#endif +#endif + #ifdef __cplusplus } #endif diff --git a/src/external/openal_soft/lib/android/libopenal.so b/src/external/openal_soft/lib/android/libopenal.so new file mode 100644 index 000000000..e384d9ad6 Binary files /dev/null and b/src/external/openal_soft/lib/android/libopenal.so differ diff --git a/src/external/openal_soft/lib/win32/OpenAL32.dll b/src/external/openal_soft/lib/win32/OpenAL32.dll index 1e3bddd56..7356f378e 100644 Binary files a/src/external/openal_soft/lib/win32/OpenAL32.dll and b/src/external/openal_soft/lib/win32/OpenAL32.dll differ diff --git a/src/external/openal_soft/lib/win32/libOpenAL32.a b/src/external/openal_soft/lib/win32/libOpenAL32.a index 3c0df3c74..9bb8ad548 100644 Binary files a/src/external/openal_soft/lib/win32/libOpenAL32.a and b/src/external/openal_soft/lib/win32/libOpenAL32.a differ diff --git a/src/external/openal_soft/lib/win32/libOpenAL32dll.a b/src/external/openal_soft/lib/win32/libOpenAL32dll.a index 1c4c63c8f..4fd3497c6 100644 Binary files a/src/external/openal_soft/lib/win32/libOpenAL32dll.a and b/src/external/openal_soft/lib/win32/libOpenAL32dll.a differ diff --git a/src/raylib.h b/src/raylib.h index a3276d8e0..203872f0a 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -6,25 +6,23 @@ * * FEATURES: * - Library written in plain C code (C99) -* - Uses PascalCase/camelCase notation +* - Multiple platforms supported: Windows, Linux, Mac, Android, Raspberry Pi, HTML5. * - Hardware accelerated with OpenGL (1.1, 2.1, 3.3 or ES 2.0) * - Unique OpenGL abstraction layer (usable as standalone module): [rlgl] * - Powerful fonts module with SpriteFonts support (XNA bitmap fonts, AngelCode fonts, TTF) * - Multiple textures support, including compressed formats and mipmaps generation * - Basic 3d support for Shapes, Models, Billboards, Heightmaps and Cubicmaps -* - Powerful math module for Vector, Matrix and Quaternion operations: [raymath] +* - Powerful math module for Vector2, Vector3, Matrix and Quaternion operations: [raymath] * - Audio loading and playing with streaming support and mixing channels: [audio] * - VR stereo rendering support with configurable HMD device parameters -* - Multiple platforms support: Windows, Linux, Mac, Android, Raspberry Pi, HTML5 and Oculus Rift CV1 -* - Custom color palette for fancy visuals on raywhite background * - Minimal external dependencies (GLFW3, OpenGL, OpenAL) * - Complete bindings for Lua, Go and Pascal * * NOTES: -* 32bit Colors - All defined color are always RGBA (struct Color is 4 byte) -* One custom default font could be loaded automatically when InitWindow() [core] +* 32bit Colors - Any defined Color is always RGBA (4 byte) +* One custom font is loaded by default when InitWindow() [core] +* If using OpenGL 3.3 or ES2, one default shader is loaded automatically (internally defined) [rlgl] * If using OpenGL 3.3 or ES2, several vertex buffers (VAO/VBO) are created to manage lines-triangles-quads -* If using OpenGL 3.3 or ES2, two default shaders could be loaded automatically (internally defined) * * DEPENDENCIES: * GLFW3 (www.glfw.org) for window/context management and input [core] @@ -655,12 +653,13 @@ extern "C" { // Prevents name mangling of functions //------------------------------------------------------------------------------------ // Window and Graphics Device Functions (Module: core) //------------------------------------------------------------------------------------ + +// Window-related functions #if defined(PLATFORM_ANDROID) RLAPI void InitWindow(int width, int height, void *state); // Initialize Android activity #elif defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI) || defined(PLATFORM_WEB) RLAPI void InitWindow(int width, int height, const char *title); // Initialize window and OpenGL context #endif - RLAPI void CloseWindow(void); // Close window and unload OpenGL context RLAPI bool WindowShouldClose(void); // Check if KEY_ESCAPE pressed or Close icon pressed RLAPI bool IsWindowMinimized(void); // Check if window has been minimized (or lost focus) @@ -673,6 +672,7 @@ RLAPI int GetScreenWidth(void); // Get current RLAPI int GetScreenHeight(void); // Get current screen height #if !defined(PLATFORM_ANDROID) +// Cursor-related functions RLAPI void ShowCursor(void); // Shows cursor RLAPI void HideCursor(void); // Hides cursor RLAPI bool IsCursorHidden(void); // Check if cursor is not visible @@ -680,10 +680,10 @@ RLAPI void EnableCursor(void); // Enables cur RLAPI void DisableCursor(void); // Disables cursor (lock cursor) #endif +// Drawing-related functions RLAPI void ClearBackground(Color color); // Set background color (framebuffer clear color) RLAPI void BeginDrawing(void); // Setup canvas (framebuffer) to start drawing RLAPI void EndDrawing(void); // End canvas drawing and swap buffers (double buffering) - RLAPI void Begin2dMode(Camera2D camera); // Initialize 2D mode with custom camera (2D) RLAPI void End2dMode(void); // Ends 2D mode with custom camera RLAPI void Begin3dMode(Camera camera); // Initializes 3D mode with custom camera (3D) @@ -691,28 +691,33 @@ RLAPI void End3dMode(void); // Ends 3D mod RLAPI void BeginTextureMode(RenderTexture2D target); // Initializes render texture for drawing RLAPI void EndTextureMode(void); // Ends drawing to render texture +// Screen-space-related functions RLAPI Ray GetMouseRay(Vector2 mousePosition, Camera camera); // Returns a ray trace from mouse position RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Returns the screen space position for a 3d world space position RLAPI Matrix GetCameraMatrix(Camera camera); // Returns camera transform matrix (view matrix) +// Timming-related functions RLAPI void SetTargetFPS(int fps); // Set target FPS (maximum) RLAPI int GetFPS(void); // Returns current FPS RLAPI float GetFrameTime(void); // Returns time in seconds for last frame drawn -RLAPI Color GetColor(int hexValue); // Returns a Color struct from hexadecimal value +// Color-related functions RLAPI int GetHexValue(Color color); // Returns hexadecimal value for a Color +RLAPI Color GetColor(int hexValue); // Returns a Color struct from hexadecimal value +RLAPI Color Fade(Color color, float alpha); // Color fade-in or fade-out, alpha goes from 0.0f to 1.0f RLAPI float *ColorToFloat(Color color); // Converts Color to float array and normalizes RLAPI float *VectorToFloat(Vector3 vec); // Converts Vector3 to float array RLAPI float *MatrixToFloat(Matrix mat); // Converts Matrix to float array -RLAPI int GetRandomValue(int min, int max); // Returns a random value between min and max (both included) -RLAPI Color Fade(Color color, float alpha); // Color fade-in or fade-out, alpha goes from 0.0f to 1.0f - +// Misc. functions RLAPI void ShowLogo(void); // Activate raylib logo at startup (can be done with flags) RLAPI void SetConfigFlags(char flags); // Setup window configuration flags (view FLAGS) RLAPI void TraceLog(int logType, const char *text, ...); // Show trace log messages (INFO, WARNING, ERROR, DEBUG) RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (saved a .png) +RLAPI int GetRandomValue(int min, int max); // Returns a random value between min and max (both included) + +// Files management functions RLAPI bool IsFileExtension(const char *fileName, const char *ext);// Check file extension RLAPI const char *GetDirectoryPath(const char *fileName); // Get directory for a given fileName (with path) RLAPI const char *GetWorkingDirectory(void); // Get current working directory @@ -721,12 +726,15 @@ RLAPI bool IsFileDropped(void); // Check if a RLAPI char **GetDroppedFiles(int *count); // Get dropped files names RLAPI void ClearDroppedFiles(void); // Clear dropped files paths buffer +// Persistent storage management RLAPI void StorageSaveValue(int position, int value); // Save integer value to storage file (to defined position) RLAPI int StorageLoadValue(int position); // Load integer value from storage file (from defined position) //------------------------------------------------------------------------------------ // Input Handling Functions (Module: core) //------------------------------------------------------------------------------------ + +// Input-related functions: keyboard RLAPI bool IsKeyPressed(int key); // Detect if a key has been pressed once RLAPI bool IsKeyDown(int key); // Detect if a key is being pressed RLAPI bool IsKeyReleased(int key); // Detect if a key has been released once @@ -734,6 +742,7 @@ RLAPI bool IsKeyUp(int key); // Detect if a key RLAPI int GetKeyPressed(void); // Get latest key pressed RLAPI void SetExitKey(int key); // Set a custom key to exit program (default is ESC) +// Input-related functions: gamepads RLAPI bool IsGamepadAvailable(int gamepad); // Detect if a gamepad is available RLAPI bool IsGamepadName(int gamepad, const char *name); // Check gamepad name (if available) RLAPI const char *GetGamepadName(int gamepad); // Return gamepad internal name id @@ -745,6 +754,7 @@ RLAPI int GetGamepadButtonPressed(void); // Get the last ga RLAPI int GetGamepadAxisCount(int gamepad); // Return gamepad axis count for a gamepad RLAPI float GetGamepadAxisMovement(int gamepad, int axis); // Return axis movement value for a gamepad axis +// Input-related functions: mouse RLAPI bool IsMouseButtonPressed(int button); // Detect if a mouse button has been pressed once RLAPI bool IsMouseButtonDown(int button); // Detect if a mouse button is being pressed RLAPI bool IsMouseButtonReleased(int button); // Detect if a mouse button has been released once @@ -755,6 +765,7 @@ RLAPI Vector2 GetMousePosition(void); // Returns mouse p RLAPI void SetMousePosition(Vector2 position); // Set mouse position XY RLAPI int GetMouseWheelMove(void); // Returns mouse wheel movement Y +// Input-related functions: touch RLAPI int GetTouchX(void); // Returns touch position X for touch point 0 (relative to screen size) RLAPI int GetTouchY(void); // Returns touch position Y for touch point 0 (relative to screen size) RLAPI Vector2 GetTouchPosition(int index); // Returns touch position XY for a touch point index (relative to screen size) @@ -788,6 +799,8 @@ RLAPI void SetCameraMoveControls(int frontKey, int backKey, //------------------------------------------------------------------------------------ // Basic Shapes Drawing Functions (Module: shapes) //------------------------------------------------------------------------------------ + +// Basic shapes drawing functions RLAPI void DrawPixel(int posX, int posY, Color color); // Draw a pixel RLAPI void DrawPixelV(Vector2 position, Color color); // Draw a pixel (Vector version) RLAPI void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw a line @@ -810,6 +823,7 @@ RLAPI void DrawPoly(Vector2 center, int sides, float radius, float rotation, Col RLAPI void DrawPolyEx(Vector2 *points, int numPoints, Color color); // Draw a closed polygon defined by points RLAPI void DrawPolyExLines(Vector2 *points, int numPoints, Color color); // Draw polygon lines +// Basic shapes collision detection functions RLAPI bool CheckCollisionRecs(Rectangle rec1, Rectangle rec2); // Check collision between two rectangles RLAPI bool CheckCollisionCircles(Vector2 center1, float radius1, Vector2 center2, float radius2); // Check collision between two circles RLAPI bool CheckCollisionCircleRec(Vector2 center, float radius, Rectangle rec); // Check collision between circle and rectangle @@ -821,6 +835,8 @@ RLAPI bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Ve //------------------------------------------------------------------------------------ // Texture Loading and Drawing Functions (Module: textures) //------------------------------------------------------------------------------------ + +// Image/Texture2D data loading/unloading functions RLAPI Image LoadImage(const char *fileName); // Load image from file into CPU memory (RAM) RLAPI Image LoadImageEx(Color *pixels, int width, int height); // Load image from Color array data (RGBA - 32bit) RLAPI Image LoadImagePro(void *data, int width, int height, int format); // Load image from raw data with parameters @@ -834,6 +850,8 @@ RLAPI void UnloadRenderTexture(RenderTexture2D target); RLAPI Color *GetImageData(Image image); // Get pixel data from image as a Color struct array RLAPI Image GetTextureData(Texture2D texture); // Get pixel data from GPU texture and return an Image RLAPI void UpdateTexture(Texture2D texture, const void *pixels); // Update GPU texture with new data + +// Image manipulation functions RLAPI void ImageToPOT(Image *image, Color fillColor); // Convert image to POT (power-of-two) RLAPI void ImageFormat(Image *image, int newFormat); // Convert image data to desired format RLAPI void ImageAlphaMask(Image *image, Image alphaMask); // Apply alpha mask to image @@ -855,10 +873,13 @@ RLAPI void ImageColorInvert(Image *image); RLAPI void ImageColorGrayscale(Image *image); // Modify image color: grayscale RLAPI void ImageColorContrast(Image *image, float contrast); // Modify image color: contrast (-100 to 100) RLAPI void ImageColorBrightness(Image *image, int brightness); // Modify image color: brightness (-255 to 255) + +// Texture2D configuration functions RLAPI void GenTextureMipmaps(Texture2D *texture); // Generate GPU mipmaps for a texture RLAPI void SetTextureFilter(Texture2D texture, int filterMode); // Set texture scaling filter mode RLAPI void SetTextureWrap(Texture2D texture, int wrapMode); // Set texture wrapping mode +// Texture2D drawing functions RLAPI void DrawTexture(Texture2D texture, int posX, int posY, Color tint); // Draw a Texture2D RLAPI void DrawTextureV(Texture2D texture, Vector2 position, Color tint); // Draw a Texture2D with position defined as Vector2 RLAPI void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint); // Draw a Texture2D with extended parameters @@ -869,24 +890,30 @@ RLAPI void DrawTexturePro(Texture2D texture, Rectangle sourceRec, Rectangle dest //------------------------------------------------------------------------------------ // Font Loading and Text Drawing Functions (Module: text) //------------------------------------------------------------------------------------ + +// SpriteFont loading/unloading functions RLAPI SpriteFont GetDefaultFont(void); // Get the default SpriteFont RLAPI SpriteFont LoadSpriteFont(const char *fileName); // Load SpriteFont from file into GPU memory (VRAM) RLAPI SpriteFont LoadSpriteFontEx(const char *fileName, int fontSize, int charsCount, int *fontChars); // Load SpriteFont from file with extended parameters RLAPI void UnloadSpriteFont(SpriteFont spriteFont); // Unload SpriteFont from GPU memory (VRAM) +// Text drawing functions +RLAPI void DrawFPS(int posX, int posY); // Shows current FPS RLAPI void DrawText(const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font) RLAPI void DrawTextEx(SpriteFont spriteFont, const char* text, Vector2 position, // Draw text using SpriteFont and additional parameters float fontSize, int spacing, Color tint); + +// Text misc. functions RLAPI int MeasureText(const char *text, int fontSize); // Measure string width for default font RLAPI Vector2 MeasureTextEx(SpriteFont spriteFont, const char *text, float fontSize, int spacing); // Measure string size for SpriteFont - -RLAPI void DrawFPS(int posX, int posY); // Shows current FPS RLAPI const char *FormatText(const char *text, ...); // Formatting of text with variables to 'embed' RLAPI const char *SubText(const char *text, int position, int length); // Get a piece of a text string //------------------------------------------------------------------------------------ // Basic 3d Shapes Drawing Functions (Module: models) //------------------------------------------------------------------------------------ + +// Basic geometric 3D shapes drawing functions RLAPI void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color); // Draw a line in 3D world space RLAPI void DrawCircle3D(Vector3 center, float radius, Vector3 rotationAxis, float rotationAngle, Color color); // Draw a circle in 3D world space RLAPI void DrawCube(Vector3 position, float width, float height, float length, Color color); // Draw cube @@ -907,6 +934,8 @@ RLAPI void DrawGizmo(Vector3 position); //------------------------------------------------------------------------------------ // Model 3d Loading and Drawing Functions (Module: models) //------------------------------------------------------------------------------------ + +// Model loading/unloading functions RLAPI Mesh LoadMesh(const char *fileName); // Load mesh from file RLAPI Mesh LoadMeshEx(int numVertex, float *vData, float *vtData, float *vnData, Color *cData); // Load mesh from vertex data RLAPI Model LoadModel(const char *fileName); // Load model from file @@ -916,10 +945,12 @@ RLAPI Model LoadCubicmap(Image cubicmap); RLAPI void UnloadMesh(Mesh *mesh); // Unload mesh from memory (RAM and/or VRAM) RLAPI void UnloadModel(Model model); // Unload model from memory (RAM and/or VRAM) +// Material loading/unloading functions RLAPI Material LoadMaterial(const char *fileName); // Load material from file RLAPI Material LoadDefaultMaterial(void); // Load default material (uses default models shader) RLAPI void UnloadMaterial(Material material); // Unload material from GPU memory (VRAM) +// Model drawing functions RLAPI void DrawModel(Model model, Vector3 position, float scale, Color tint); // Draw a model (with texture if set) RLAPI void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model with extended parameters @@ -932,6 +963,7 @@ RLAPI void DrawBillboard(Camera camera, Texture2D texture, Vector3 center, float RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle sourceRec, Vector3 center, float size, Color tint); // Draw a billboard texture defined by sourceRec +// Collision detection functions RLAPI BoundingBox CalculateBoundingBox(Mesh mesh); // Calculate mesh bounding box limits RLAPI bool CheckCollisionSpheres(Vector3 centerA, float radiusA, Vector3 centerB, float radiusB); // Detect collision between two spheres RLAPI bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2); // Detect collision between two bounding boxes @@ -948,6 +980,8 @@ RLAPI RayHitInfo GetCollisionRayGround(Ray ray, float groundHeight); // Shaders System Functions (Module: rlgl) // NOTE: This functions are useless when using OpenGL 1.1 //------------------------------------------------------------------------------------ + +// Shader loading/unloading functions RLAPI char *LoadText(const char *fileName); // Load chars array from text file RLAPI Shader LoadShader(char *vsFileName, char *fsFileName); // Load shader from files and bind default locations RLAPI void UnloadShader(Shader shader); // Unload shader from GPU memory (VRAM) @@ -955,23 +989,21 @@ RLAPI void UnloadShader(Shader shader); // Unl RLAPI Shader GetDefaultShader(void); // Get default shader RLAPI Texture2D GetDefaultTexture(void); // Get default texture +// Shader configuration functions RLAPI int GetShaderLocation(Shader shader, const char *uniformName); // Get shader uniform location RLAPI void SetShaderValue(Shader shader, int uniformLoc, float *value, int size); // Set shader uniform value (float) RLAPI void SetShaderValuei(Shader shader, int uniformLoc, int *value, int size); // Set shader uniform value (int) RLAPI void SetShaderValueMatrix(Shader shader, int uniformLoc, Matrix mat); // Set shader uniform value (matrix 4x4) - RLAPI void SetMatrixProjection(Matrix proj); // Set a custom projection matrix (replaces internal projection matrix) RLAPI void SetMatrixModelview(Matrix view); // Set a custom modelview matrix (replaces internal modelview matrix) +// Shading begin/end functions RLAPI void BeginShaderMode(Shader shader); // Begin custom shader drawing RLAPI void EndShaderMode(void); // End custom shader drawing (use default shader) RLAPI void BeginBlendMode(int mode); // Begin blending mode (alpha, additive, multiplied) RLAPI void EndBlendMode(void); // End blending mode (reset to default: alpha blending) -//------------------------------------------------------------------------------------ -// VR experience Functions (Module: rlgl) -// NOTE: This functions are useless when using OpenGL 1.1 -//------------------------------------------------------------------------------------ +// VR control functions RLAPI void InitVrSimulator(int vrDevice); // Init VR simulator for selected device RLAPI void CloseVrSimulator(void); // Close VR simulator for current device RLAPI bool IsVrSimulatorReady(void); // Detect if VR device is ready @@ -983,11 +1015,14 @@ RLAPI void EndVrDrawing(void); // End VR simulator stereo r //------------------------------------------------------------------------------------ // Audio Loading and Playing Functions (Module: audio) //------------------------------------------------------------------------------------ + +// Audio device management functions RLAPI void InitAudioDevice(void); // Initialize audio device and context RLAPI void CloseAudioDevice(void); // Close the audio device and context RLAPI bool IsAudioDeviceReady(void); // Check if audio device has been initialized successfully RLAPI void SetMasterVolume(float volume); // Set master volume (listener) +// Wave/Sound loading/unloading functions RLAPI Wave LoadWave(const char *fileName); // Load wave data from file RLAPI Wave LoadWaveEx(void *data, int sampleCount, int sampleRate, int sampleSize, int channels); // Load wave data from raw array data RLAPI Sound LoadSound(const char *fileName); // Load sound from file @@ -995,6 +1030,8 @@ RLAPI Sound LoadSoundFromWave(Wave wave); // Load so RLAPI void UpdateSound(Sound sound, const void *data, int samplesCount);// Update sound buffer with new data RLAPI void UnloadWave(Wave wave); // Unload wave data RLAPI void UnloadSound(Sound sound); // Unload sound + +// Wave/Sound management functions RLAPI void PlaySound(Sound sound); // Play a sound RLAPI void PauseSound(Sound sound); // Pause a sound RLAPI void ResumeSound(Sound sound); // Resume a paused sound @@ -1006,6 +1043,8 @@ RLAPI void WaveFormat(Wave *wave, int sampleRate, int sampleSize, int channels); RLAPI Wave WaveCopy(Wave wave); // Copy a wave to a new wave RLAPI void WaveCrop(Wave *wave, int initSample, int finalSample); // Crop a wave to defined samples range RLAPI float *GetWaveData(Wave wave); // Get samples data from wave as a floats array + +// Music management functions RLAPI Music LoadMusicStream(const char *fileName); // Load music stream from file RLAPI void UnloadMusicStream(Music music); // Unload music stream RLAPI void PlayMusicStream(Music music); // Start music playing @@ -1020,8 +1059,8 @@ RLAPI void SetMusicLoopCount(Music music, float count); // Set mus RLAPI float GetMusicTimeLength(Music music); // Get music time length (in seconds) RLAPI float GetMusicTimePlayed(Music music); // Get current music time played (in seconds) -RLAPI AudioStream InitAudioStream(unsigned int sampleRate, - unsigned int sampleSize, +// AudioStream management functions +RLAPI AudioStream InitAudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels); // Init audio stream (to stream raw audio pcm data) RLAPI void UpdateAudioStream(AudioStream stream, const void *data, int samplesCount); // Update audio stream buffers with data RLAPI void CloseAudioStream(AudioStream stream); // Close audio stream and free memory diff --git a/templates/android_project/jni/Android.mk b/templates/android_project/jni/Android.mk index 4a0bcb421..4bd6f57a3 100644 --- a/templates/android_project/jni/Android.mk +++ b/templates/android_project/jni/Android.mk @@ -34,13 +34,13 @@ include $(CLEAR_VARS) LOCAL_MODULE := openal # Precompiled lib -LOCAL_SRC_FILES := libs/libopenal.a +LOCAL_SRC_FILES := libs/libopenal.so # Export headers LOCAL_EXPORT_C_INCLUDES := include # Build static library -include $(PREBUILT_STATIC_LIBRARY) +include $(PREBUILT_SHARED_LIBRARY) #-------------------------------------------------------------------- diff --git a/templates/android_project/jni/include/AL/al.h b/templates/android_project/jni/include/AL/al.h index 95d339881..413b38331 100644 --- a/templates/android_project/jni/include/AL/al.h +++ b/templates/android_project/jni/include/AL/al.h @@ -21,26 +21,19 @@ extern "C" { #define AL_APIENTRY #endif -#if defined(TARGET_OS_MAC) && TARGET_OS_MAC - #pragma export on -#endif -/* - * The OPENAL, ALAPI, ALAPIENTRY, AL_INVALID, AL_ILLEGAL_ENUM, and - * AL_ILLEGAL_COMMAND macros are deprecated, but are included for - * applications porting code from AL 1.0 - */ +/** Deprecated macro. */ #define OPENAL -#define ALAPI AL_API -#define ALAPIENTRY AL_APIENTRY -#define AL_INVALID (-1) -#define AL_ILLEGAL_ENUM AL_INVALID_ENUM -#define AL_ILLEGAL_COMMAND AL_INVALID_OPERATION +#define ALAPI AL_API +#define ALAPIENTRY AL_APIENTRY +#define AL_INVALID (-1) +#define AL_ILLEGAL_ENUM AL_INVALID_ENUM +#define AL_ILLEGAL_COMMAND AL_INVALID_OPERATION +/** Supported AL version. */ #define AL_VERSION_1_0 #define AL_VERSION_1_1 - /** 8-bit boolean */ typedef char ALboolean; @@ -83,633 +76,578 @@ typedef void ALvoid; /* Enumerant values begin at column 50. No tabs. */ -/* "no distance model" or "no buffer" */ -#define AL_NONE 0 +/** "no distance model" or "no buffer" */ +#define AL_NONE 0 -/* Boolean False. */ -#define AL_FALSE 0 +/** Boolean False. */ +#define AL_FALSE 0 /** Boolean True. */ -#define AL_TRUE 1 - -/** Indicate Source has relative coordinates. */ -#define AL_SOURCE_RELATIVE 0x202 - +#define AL_TRUE 1 /** - * Directional source, inner cone angle, in degrees. - * Range: [0-360] - * Default: 360 - */ -#define AL_CONE_INNER_ANGLE 0x1001 - -/** - * Directional source, outer cone angle, in degrees. - * Range: [0-360] - * Default: 360 - */ -#define AL_CONE_OUTER_ANGLE 0x1002 - -/** - * Specify the pitch to be applied at source. - * Range: [0.5-2.0] - * Default: 1.0 - */ -#define AL_PITCH 0x1003 - -/** - * Specify the current location in three dimensional space. - * OpenAL, like OpenGL, uses a right handed coordinate system, - * where in a frontal default view X (thumb) points right, - * Y points up (index finger), and Z points towards the - * viewer/camera (middle finger). - * To switch from a left handed coordinate system, flip the - * sign on the Z coordinate. - * Listener position is always in the world coordinate system. - */ -#define AL_POSITION 0x1004 - -/** Specify the current direction. */ -#define AL_DIRECTION 0x1005 - -/** Specify the current velocity in three dimensional space. */ -#define AL_VELOCITY 0x1006 - -/** - * Indicate whether source is looping. - * Type: ALboolean? + * Relative source. + * Type: ALboolean * Range: [AL_TRUE, AL_FALSE] - * Default: FALSE. - */ -#define AL_LOOPING 0x1007 - -/** - * Indicate the buffer to provide sound samples. - * Type: ALuint. - * Range: any valid Buffer id. - */ -#define AL_BUFFER 0x1009 - -/** - * Indicate the gain (volume amplification) applied. - * Type: ALfloat. - * Range: ]0.0- ] - * A value of 1.0 means un-attenuated/unchanged. - * Each division by 2 equals an attenuation of -6dB. - * Each multiplicaton with 2 equals an amplification of +6dB. - * A value of 0.0 is meaningless with respect to a logarithmic - * scale; it is interpreted as zero volume - the channel - * is effectively disabled. - */ -#define AL_GAIN 0x100A - -/* - * Indicate minimum source attenuation - * Type: ALfloat - * Range: [0.0 - 1.0] + * Default: AL_FALSE * - * Logarthmic + * Specifies if the Source has relative coordinates. */ -#define AL_MIN_GAIN 0x100D +#define AL_SOURCE_RELATIVE 0x202 + /** - * Indicate maximum source attenuation - * Type: ALfloat - * Range: [0.0 - 1.0] + * Inner cone angle, in degrees. + * Type: ALint, ALfloat + * Range: [0 - 360] + * Default: 360 * - * Logarthmic + * The angle covered by the inner cone, where the source will not attenuate. */ -#define AL_MAX_GAIN 0x100E +#define AL_CONE_INNER_ANGLE 0x1001 /** - * Indicate listener orientation. + * Outer cone angle, in degrees. + * Range: [0 - 360] + * Default: 360 * - * at/up + * The angle covered by the outer cone, where the source will be fully + * attenuated. */ -#define AL_ORIENTATION 0x100F +#define AL_CONE_OUTER_ANGLE 0x1002 /** - * Source state information. - */ -#define AL_SOURCE_STATE 0x1010 -#define AL_INITIAL 0x1011 -#define AL_PLAYING 0x1012 -#define AL_PAUSED 0x1013 -#define AL_STOPPED 0x1014 - -/** - * Buffer Queue params - */ -#define AL_BUFFERS_QUEUED 0x1015 -#define AL_BUFFERS_PROCESSED 0x1016 - -/** - * Source buffer position information - */ -#define AL_SEC_OFFSET 0x1024 -#define AL_SAMPLE_OFFSET 0x1025 -#define AL_BYTE_OFFSET 0x1026 - -/* - * Source type (Static, Streaming or undetermined) - * Source is Static if a Buffer has been attached using AL_BUFFER - * Source is Streaming if one or more Buffers have been attached using alSourceQueueBuffers - * Source is undetermined when it has the NULL buffer attached - */ -#define AL_SOURCE_TYPE 0x1027 -#define AL_STATIC 0x1028 -#define AL_STREAMING 0x1029 -#define AL_UNDETERMINED 0x1030 - -/** Sound samples: format specifier. */ -#define AL_FORMAT_MONO8 0x1100 -#define AL_FORMAT_MONO16 0x1101 -#define AL_FORMAT_STEREO8 0x1102 -#define AL_FORMAT_STEREO16 0x1103 - -/** - * source specific reference distance - * Type: ALfloat - * Range: 0.0 - +inf + * Source pitch. + * Type: ALfloat + * Range: [0.5 - 2.0] + * Default: 1.0 * - * At 0.0, no distance attenuation occurs. Default is - * 1.0. + * A multiplier for the frequency (sample rate) of the source's buffer. */ -#define AL_REFERENCE_DISTANCE 0x1020 +#define AL_PITCH 0x1003 /** - * source specific rolloff factor - * Type: ALfloat - * Range: 0.0 - +inf + * Source or listener position. + * Type: ALfloat[3], ALint[3] + * Default: {0, 0, 0} * + * The source or listener location in three dimensional space. + * + * OpenAL, like OpenGL, uses a right handed coordinate system, where in a + * frontal default view X (thumb) points right, Y points up (index finger), and + * Z points towards the viewer/camera (middle finger). + * + * To switch from a left handed coordinate system, flip the sign on the Z + * coordinate. */ -#define AL_ROLLOFF_FACTOR 0x1021 +#define AL_POSITION 0x1004 /** - * Directional source, outer cone gain. + * Source direction. + * Type: ALfloat[3], ALint[3] + * Default: {0, 0, 0} * - * Default: 0.0 - * Range: [0.0 - 1.0] - * Logarithmic + * Specifies the current direction in local space. + * A zero-length vector specifies an omni-directional source (cone is ignored). */ -#define AL_CONE_OUTER_GAIN 0x1022 +#define AL_DIRECTION 0x1005 /** - * Indicate distance above which sources are not - * attenuated using the inverse clamped distance model. + * Source or listener velocity. + * Type: ALfloat[3], ALint[3] + * Default: {0, 0, 0} * + * Specifies the current velocity in local space. + */ +#define AL_VELOCITY 0x1006 + +/** + * Source looping. + * Type: ALboolean + * Range: [AL_TRUE, AL_FALSE] + * Default: AL_FALSE + * + * Specifies whether source is looping. + */ +#define AL_LOOPING 0x1007 + +/** + * Source buffer. + * Type: ALuint + * Range: any valid Buffer. + * + * Specifies the buffer to provide sound samples. + */ +#define AL_BUFFER 0x1009 + +/** + * Source or listener gain. + * Type: ALfloat + * Range: [0.0 - ] + * + * A value of 1.0 means unattenuated. Each division by 2 equals an attenuation + * of about -6dB. Each multiplicaton by 2 equals an amplification of about + * +6dB. + * + * A value of 0.0 is meaningless with respect to a logarithmic scale; it is + * silent. + */ +#define AL_GAIN 0x100A + +/** + * Minimum source gain. + * Type: ALfloat + * Range: [0.0 - 1.0] + * + * The minimum gain allowed for a source, after distance and cone attenation is + * applied (if applicable). + */ +#define AL_MIN_GAIN 0x100D + +/** + * Maximum source gain. + * Type: ALfloat + * Range: [0.0 - 1.0] + * + * The maximum gain allowed for a source, after distance and cone attenation is + * applied (if applicable). + */ +#define AL_MAX_GAIN 0x100E + +/** + * Listener orientation. + * Type: ALfloat[6] + * Default: {0.0, 0.0, -1.0, 0.0, 1.0, 0.0} + * + * Effectively two three dimensional vectors. The first vector is the front (or + * "at") and the second is the top (or "up"). + * + * Both vectors are in local space. + */ +#define AL_ORIENTATION 0x100F + +/** + * Source state (query only). + * Type: ALint + * Range: [AL_INITIAL, AL_PLAYING, AL_PAUSED, AL_STOPPED] + */ +#define AL_SOURCE_STATE 0x1010 + +/** Source state value. */ +#define AL_INITIAL 0x1011 +#define AL_PLAYING 0x1012 +#define AL_PAUSED 0x1013 +#define AL_STOPPED 0x1014 + +/** + * Source Buffer Queue size (query only). + * Type: ALint + * + * The number of buffers queued using alSourceQueueBuffers, minus the buffers + * removed with alSourceUnqueueBuffers. + */ +#define AL_BUFFERS_QUEUED 0x1015 + +/** + * Source Buffer Queue processed count (query only). + * Type: ALint + * + * The number of queued buffers that have been fully processed, and can be + * removed with alSourceUnqueueBuffers. + * + * Looping sources will never fully process buffers because they will be set to + * play again for when the source loops. + */ +#define AL_BUFFERS_PROCESSED 0x1016 + +/** + * Source reference distance. + * Type: ALfloat + * Range: [0.0 - ] + * Default: 1.0 + * + * The distance in units that no attenuation occurs. + * + * At 0.0, no distance attenuation ever occurs on non-linear attenuation models. + */ +#define AL_REFERENCE_DISTANCE 0x1020 + +/** + * Source rolloff factor. + * Type: ALfloat + * Range: [0.0 - ] + * Default: 1.0 + * + * Multiplier to exaggerate or diminish distance attenuation. + * + * At 0.0, no distance attenuation ever occurs. + */ +#define AL_ROLLOFF_FACTOR 0x1021 + +/** + * Outer cone gain. + * Type: ALfloat + * Range: [0.0 - 1.0] + * Default: 0.0 + * + * The gain attenuation applied when the listener is outside of the source's + * outer cone. + */ +#define AL_CONE_OUTER_GAIN 0x1022 + +/** + * Source maximum distance. + * Type: ALfloat + * Range: [0.0 - ] * Default: +inf - * Type: ALfloat - * Range: 0.0 - +inf + * + * The distance above which the source is not attenuated any further with a + * clamped distance model, or where attenuation reaches 0.0 gain for linear + * distance models with a default rolloff factor. */ -#define AL_MAX_DISTANCE 0x1023 +#define AL_MAX_DISTANCE 0x1023 -/** - * Sound samples: frequency, in units of Hertz [Hz]. - * This is the number of samples per second. Half of the - * sample frequency marks the maximum significant - * frequency component. +/** Source buffer position, in seconds */ +#define AL_SEC_OFFSET 0x1024 +/** Source buffer position, in sample frames */ +#define AL_SAMPLE_OFFSET 0x1025 +/** Source buffer position, in bytes */ +#define AL_BYTE_OFFSET 0x1026 + +/** + * Source type (query only). + * Type: ALint + * Range: [AL_STATIC, AL_STREAMING, AL_UNDETERMINED] + * + * A Source is Static if a Buffer has been attached using AL_BUFFER. + * + * A Source is Streaming if one or more Buffers have been attached using + * alSourceQueueBuffers. + * + * A Source is Undetermined when it has the NULL buffer attached using + * AL_BUFFER. */ -#define AL_FREQUENCY 0x2001 -#define AL_BITS 0x2002 -#define AL_CHANNELS 0x2003 -#define AL_SIZE 0x2004 +#define AL_SOURCE_TYPE 0x1027 + +/** Source type value. */ +#define AL_STATIC 0x1028 +#define AL_STREAMING 0x1029 +#define AL_UNDETERMINED 0x1030 + +/** Buffer format specifier. */ +#define AL_FORMAT_MONO8 0x1100 +#define AL_FORMAT_MONO16 0x1101 +#define AL_FORMAT_STEREO8 0x1102 +#define AL_FORMAT_STEREO16 0x1103 + +/** Buffer frequency (query only). */ +#define AL_FREQUENCY 0x2001 +/** Buffer bits per sample (query only). */ +#define AL_BITS 0x2002 +/** Buffer channel count (query only). */ +#define AL_CHANNELS 0x2003 +/** Buffer data size (query only). */ +#define AL_SIZE 0x2004 /** * Buffer state. * - * Not supported for public use (yet). + * Not for public use. */ -#define AL_UNUSED 0x2010 -#define AL_PENDING 0x2011 -#define AL_PROCESSED 0x2012 +#define AL_UNUSED 0x2010 +#define AL_PENDING 0x2011 +#define AL_PROCESSED 0x2012 -/** Errors: No Error. */ -#define AL_NO_ERROR AL_FALSE +/** No error. */ +#define AL_NO_ERROR 0 -/** - * Invalid Name paramater passed to AL call. - */ -#define AL_INVALID_NAME 0xA001 +/** Invalid name paramater passed to AL call. */ +#define AL_INVALID_NAME 0xA001 -/** - * Invalid parameter passed to AL call. - */ -#define AL_INVALID_ENUM 0xA002 +/** Invalid enum parameter passed to AL call. */ +#define AL_INVALID_ENUM 0xA002 -/** - * Invalid enum parameter value. - */ -#define AL_INVALID_VALUE 0xA003 +/** Invalid value parameter passed to AL call. */ +#define AL_INVALID_VALUE 0xA003 -/** - * Illegal call. - */ -#define AL_INVALID_OPERATION 0xA004 +/** Illegal AL call. */ +#define AL_INVALID_OPERATION 0xA004 - -/** - * No mojo. - */ -#define AL_OUT_OF_MEMORY 0xA005 +/** Not enough memory. */ +#define AL_OUT_OF_MEMORY 0xA005 -/** Context strings: Vendor Name. */ -#define AL_VENDOR 0xB001 -#define AL_VERSION 0xB002 -#define AL_RENDERER 0xB003 -#define AL_EXTENSIONS 0xB004 +/** Context string: Vendor ID. */ +#define AL_VENDOR 0xB001 +/** Context string: Version. */ +#define AL_VERSION 0xB002 +/** Context string: Renderer ID. */ +#define AL_RENDERER 0xB003 +/** Context string: Space-separated extension list. */ +#define AL_EXTENSIONS 0xB004 -/** Global tweakage. */ /** - * Doppler scale. Default 1.0 - */ -#define AL_DOPPLER_FACTOR 0xC000 - -/** - * Tweaks speed of propagation. - */ -#define AL_DOPPLER_VELOCITY 0xC001 - -/** - * Speed of Sound in units per second - */ -#define AL_SPEED_OF_SOUND 0xC003 - -/** - * Distance models + * Doppler scale. + * Type: ALfloat + * Range: [0.0 - ] + * Default: 1.0 * - * used in conjunction with DistanceModel + * Scale for source and listener velocities. + */ +#define AL_DOPPLER_FACTOR 0xC000 +AL_API void AL_APIENTRY alDopplerFactor(ALfloat value); + +/** + * Doppler velocity (deprecated). * - * implicit: NONE, which disances distance attenuation. + * A multiplier applied to the Speed of Sound. */ -#define AL_DISTANCE_MODEL 0xD000 -#define AL_INVERSE_DISTANCE 0xD001 -#define AL_INVERSE_DISTANCE_CLAMPED 0xD002 -#define AL_LINEAR_DISTANCE 0xD003 -#define AL_LINEAR_DISTANCE_CLAMPED 0xD004 -#define AL_EXPONENT_DISTANCE 0xD005 -#define AL_EXPONENT_DISTANCE_CLAMPED 0xD006 +#define AL_DOPPLER_VELOCITY 0xC001 +AL_API void AL_APIENTRY alDopplerVelocity(ALfloat value); -/* - * Renderer State management +/** + * Speed of Sound, in units per second. + * Type: ALfloat + * Range: [0.0001 - ] + * Default: 343.3 + * + * The speed at which sound waves are assumed to travel, when calculating the + * doppler effect. */ -AL_API void AL_APIENTRY alEnable( ALenum capability ); +#define AL_SPEED_OF_SOUND 0xC003 +AL_API void AL_APIENTRY alSpeedOfSound(ALfloat value); -AL_API void AL_APIENTRY alDisable( ALenum capability ); - -AL_API ALboolean AL_APIENTRY alIsEnabled( ALenum capability ); - - -/* - * State retrieval +/** + * Distance attenuation model. + * Type: ALint + * Range: [AL_NONE, AL_INVERSE_DISTANCE, AL_INVERSE_DISTANCE_CLAMPED, + * AL_LINEAR_DISTANCE, AL_LINEAR_DISTANCE_CLAMPED, + * AL_EXPONENT_DISTANCE, AL_EXPONENT_DISTANCE_CLAMPED] + * Default: AL_INVERSE_DISTANCE_CLAMPED + * + * The model by which sources attenuate with distance. + * + * None - No distance attenuation. + * Inverse - Doubling the distance halves the source gain. + * Linear - Linear gain scaling between the reference and max distances. + * Exponent - Exponential gain dropoff. + * + * Clamped variations work like the non-clamped counterparts, except the + * distance calculated is clamped between the reference and max distances. */ -AL_API const ALchar* AL_APIENTRY alGetString( ALenum param ); +#define AL_DISTANCE_MODEL 0xD000 +AL_API void AL_APIENTRY alDistanceModel(ALenum distanceModel); -AL_API void AL_APIENTRY alGetBooleanv( ALenum param, ALboolean* data ); +/** Distance model value. */ +#define AL_INVERSE_DISTANCE 0xD001 +#define AL_INVERSE_DISTANCE_CLAMPED 0xD002 +#define AL_LINEAR_DISTANCE 0xD003 +#define AL_LINEAR_DISTANCE_CLAMPED 0xD004 +#define AL_EXPONENT_DISTANCE 0xD005 +#define AL_EXPONENT_DISTANCE_CLAMPED 0xD006 -AL_API void AL_APIENTRY alGetIntegerv( ALenum param, ALint* data ); +/** Renderer State management. */ +AL_API void AL_APIENTRY alEnable(ALenum capability); +AL_API void AL_APIENTRY alDisable(ALenum capability); +AL_API ALboolean AL_APIENTRY alIsEnabled(ALenum capability); -AL_API void AL_APIENTRY alGetFloatv( ALenum param, ALfloat* data ); +/** State retrieval. */ +AL_API const ALchar* AL_APIENTRY alGetString(ALenum param); +AL_API void AL_APIENTRY alGetBooleanv(ALenum param, ALboolean *values); +AL_API void AL_APIENTRY alGetIntegerv(ALenum param, ALint *values); +AL_API void AL_APIENTRY alGetFloatv(ALenum param, ALfloat *values); +AL_API void AL_APIENTRY alGetDoublev(ALenum param, ALdouble *values); +AL_API ALboolean AL_APIENTRY alGetBoolean(ALenum param); +AL_API ALint AL_APIENTRY alGetInteger(ALenum param); +AL_API ALfloat AL_APIENTRY alGetFloat(ALenum param); +AL_API ALdouble AL_APIENTRY alGetDouble(ALenum param); -AL_API void AL_APIENTRY alGetDoublev( ALenum param, ALdouble* data ); - -AL_API ALboolean AL_APIENTRY alGetBoolean( ALenum param ); - -AL_API ALint AL_APIENTRY alGetInteger( ALenum param ); - -AL_API ALfloat AL_APIENTRY alGetFloat( ALenum param ); - -AL_API ALdouble AL_APIENTRY alGetDouble( ALenum param ); - - -/* - * Error support. - * Obtain the most recent error generated in the AL state machine. +/** + * Error retrieval. + * + * Obtain the first error generated in the AL context since the last check. */ -AL_API ALenum AL_APIENTRY alGetError( void ); +AL_API ALenum AL_APIENTRY alGetError(void); - -/* +/** * Extension support. - * Query for the presence of an extension, and obtain any appropriate - * function pointers and enum values. - */ -AL_API ALboolean AL_APIENTRY alIsExtensionPresent( const ALchar* extname ); - -AL_API void* AL_APIENTRY alGetProcAddress( const ALchar* fname ); - -AL_API ALenum AL_APIENTRY alGetEnumValue( const ALchar* ename ); - - -/* - * LISTENER - * Listener represents the location and orientation of the - * 'user' in 3D-space. * - * Properties include: - - * - * Gain AL_GAIN ALfloat - * Position AL_POSITION ALfloat[3] - * Velocity AL_VELOCITY ALfloat[3] - * Orientation AL_ORIENTATION ALfloat[6] (Forward then Up vectors) -*/ - -/* - * Set Listener parameters + * Query for the presence of an extension, and obtain any appropriate function + * pointers and enum values. */ -AL_API void AL_APIENTRY alListenerf( ALenum param, ALfloat value ); - -AL_API void AL_APIENTRY alListener3f( ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 ); - -AL_API void AL_APIENTRY alListenerfv( ALenum param, const ALfloat* values ); - -AL_API void AL_APIENTRY alListeneri( ALenum param, ALint value ); - -AL_API void AL_APIENTRY alListener3i( ALenum param, ALint value1, ALint value2, ALint value3 ); - -AL_API void AL_APIENTRY alListeneriv( ALenum param, const ALint* values ); - -/* - * Get Listener parameters - */ -AL_API void AL_APIENTRY alGetListenerf( ALenum param, ALfloat* value ); - -AL_API void AL_APIENTRY alGetListener3f( ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3 ); - -AL_API void AL_APIENTRY alGetListenerfv( ALenum param, ALfloat* values ); - -AL_API void AL_APIENTRY alGetListeneri( ALenum param, ALint* value ); - -AL_API void AL_APIENTRY alGetListener3i( ALenum param, ALint *value1, ALint *value2, ALint *value3 ); - -AL_API void AL_APIENTRY alGetListeneriv( ALenum param, ALint* values ); - - -/** - * SOURCE - * Sources represent individual sound objects in 3D-space. - * Sources take the PCM data provided in the specified Buffer, - * apply Source-specific modifications, and then - * submit them to be mixed according to spatial arrangement etc. - * - * Properties include: - - * - * Gain AL_GAIN ALfloat - * Min Gain AL_MIN_GAIN ALfloat - * Max Gain AL_MAX_GAIN ALfloat - * Position AL_POSITION ALfloat[3] - * Velocity AL_VELOCITY ALfloat[3] - * Direction AL_DIRECTION ALfloat[3] - * Head Relative Mode AL_SOURCE_RELATIVE ALint (AL_TRUE or AL_FALSE) - * Reference Distance AL_REFERENCE_DISTANCE ALfloat - * Max Distance AL_MAX_DISTANCE ALfloat - * RollOff Factor AL_ROLLOFF_FACTOR ALfloat - * Inner Angle AL_CONE_INNER_ANGLE ALint or ALfloat - * Outer Angle AL_CONE_OUTER_ANGLE ALint or ALfloat - * Cone Outer Gain AL_CONE_OUTER_GAIN ALint or ALfloat - * Pitch AL_PITCH ALfloat - * Looping AL_LOOPING ALint (AL_TRUE or AL_FALSE) - * MS Offset AL_MSEC_OFFSET ALint or ALfloat - * Byte Offset AL_BYTE_OFFSET ALint or ALfloat - * Sample Offset AL_SAMPLE_OFFSET ALint or ALfloat - * Attached Buffer AL_BUFFER ALint - * State (Query only) AL_SOURCE_STATE ALint - * Buffers Queued (Query only) AL_BUFFERS_QUEUED ALint - * Buffers Processed (Query only) AL_BUFFERS_PROCESSED ALint - */ - -/* Create Source objects */ -AL_API void AL_APIENTRY alGenSources( ALsizei n, ALuint* sources ); - -/* Delete Source objects */ -AL_API void AL_APIENTRY alDeleteSources( ALsizei n, const ALuint* sources ); - -/* Verify a handle is a valid Source */ -AL_API ALboolean AL_APIENTRY alIsSource( ALuint sid ); - -/* - * Set Source parameters - */ -AL_API void AL_APIENTRY alSourcef( ALuint sid, ALenum param, ALfloat value ); - -AL_API void AL_APIENTRY alSource3f( ALuint sid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 ); - -AL_API void AL_APIENTRY alSourcefv( ALuint sid, ALenum param, const ALfloat* values ); - -AL_API void AL_APIENTRY alSourcei( ALuint sid, ALenum param, ALint value ); - -AL_API void AL_APIENTRY alSource3i( ALuint sid, ALenum param, ALint value1, ALint value2, ALint value3 ); - -AL_API void AL_APIENTRY alSourceiv( ALuint sid, ALenum param, const ALint* values ); - -/* - * Get Source parameters - */ -AL_API void AL_APIENTRY alGetSourcef( ALuint sid, ALenum param, ALfloat* value ); - -AL_API void AL_APIENTRY alGetSource3f( ALuint sid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3); - -AL_API void AL_APIENTRY alGetSourcefv( ALuint sid, ALenum param, ALfloat* values ); - -AL_API void AL_APIENTRY alGetSourcei( ALuint sid, ALenum param, ALint* value ); - -AL_API void AL_APIENTRY alGetSource3i( ALuint sid, ALenum param, ALint* value1, ALint* value2, ALint* value3); - -AL_API void AL_APIENTRY alGetSourceiv( ALuint sid, ALenum param, ALint* values ); - - -/* - * Source vector based playback calls - */ - -/* Play, replay, or resume (if paused) a list of Sources */ -AL_API void AL_APIENTRY alSourcePlayv( ALsizei ns, const ALuint *sids ); - -/* Stop a list of Sources */ -AL_API void AL_APIENTRY alSourceStopv( ALsizei ns, const ALuint *sids ); - -/* Rewind a list of Sources */ -AL_API void AL_APIENTRY alSourceRewindv( ALsizei ns, const ALuint *sids ); - -/* Pause a list of Sources */ -AL_API void AL_APIENTRY alSourcePausev( ALsizei ns, const ALuint *sids ); - -/* - * Source based playback calls - */ - -/* Play, replay, or resume a Source */ -AL_API void AL_APIENTRY alSourcePlay( ALuint sid ); - -/* Stop a Source */ -AL_API void AL_APIENTRY alSourceStop( ALuint sid ); - -/* Rewind a Source (set playback postiton to beginning) */ -AL_API void AL_APIENTRY alSourceRewind( ALuint sid ); - -/* Pause a Source */ -AL_API void AL_APIENTRY alSourcePause( ALuint sid ); - -/* - * Source Queuing - */ -AL_API void AL_APIENTRY alSourceQueueBuffers( ALuint sid, ALsizei numEntries, const ALuint *bids ); - -AL_API void AL_APIENTRY alSourceUnqueueBuffers( ALuint sid, ALsizei numEntries, ALuint *bids ); - - -/** - * BUFFER - * Buffer objects are storage space for sample data. - * Buffers are referred to by Sources. One Buffer can be used - * by multiple Sources. - * - * Properties include: - - * - * Frequency (Query only) AL_FREQUENCY ALint - * Size (Query only) AL_SIZE ALint - * Bits (Query only) AL_BITS ALint - * Channels (Query only) AL_CHANNELS ALint - */ - -/* Create Buffer objects */ -AL_API void AL_APIENTRY alGenBuffers( ALsizei n, ALuint* buffers ); - -/* Delete Buffer objects */ -AL_API void AL_APIENTRY alDeleteBuffers( ALsizei n, const ALuint* buffers ); - -/* Verify a handle is a valid Buffer */ -AL_API ALboolean AL_APIENTRY alIsBuffer( ALuint bid ); - -/* Specify the data to be copied into a buffer */ -AL_API void AL_APIENTRY alBufferData( ALuint bid, ALenum format, const ALvoid* data, ALsizei size, ALsizei freq ); - -/* - * Set Buffer parameters - */ -AL_API void AL_APIENTRY alBufferf( ALuint bid, ALenum param, ALfloat value ); - -AL_API void AL_APIENTRY alBuffer3f( ALuint bid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 ); - -AL_API void AL_APIENTRY alBufferfv( ALuint bid, ALenum param, const ALfloat* values ); - -AL_API void AL_APIENTRY alBufferi( ALuint bid, ALenum param, ALint value ); - -AL_API void AL_APIENTRY alBuffer3i( ALuint bid, ALenum param, ALint value1, ALint value2, ALint value3 ); - -AL_API void AL_APIENTRY alBufferiv( ALuint bid, ALenum param, const ALint* values ); - -/* - * Get Buffer parameters - */ -AL_API void AL_APIENTRY alGetBufferf( ALuint bid, ALenum param, ALfloat* value ); - -AL_API void AL_APIENTRY alGetBuffer3f( ALuint bid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3); - -AL_API void AL_APIENTRY alGetBufferfv( ALuint bid, ALenum param, ALfloat* values ); - -AL_API void AL_APIENTRY alGetBufferi( ALuint bid, ALenum param, ALint* value ); - -AL_API void AL_APIENTRY alGetBuffer3i( ALuint bid, ALenum param, ALint* value1, ALint* value2, ALint* value3); - -AL_API void AL_APIENTRY alGetBufferiv( ALuint bid, ALenum param, ALint* values ); - - -/* - * Global Parameters - */ -AL_API void AL_APIENTRY alDopplerFactor( ALfloat value ); - -AL_API void AL_APIENTRY alDopplerVelocity( ALfloat value ); - -AL_API void AL_APIENTRY alSpeedOfSound( ALfloat value ); - -AL_API void AL_APIENTRY alDistanceModel( ALenum distanceModel ); - -/* - * Pointer-to-function types, useful for dynamically getting AL entry points. - */ -typedef void (AL_APIENTRY *LPALENABLE)( ALenum capability ); -typedef void (AL_APIENTRY *LPALDISABLE)( ALenum capability ); -typedef ALboolean (AL_APIENTRY *LPALISENABLED)( ALenum capability ); -typedef const ALchar* (AL_APIENTRY *LPALGETSTRING)( ALenum param ); -typedef void (AL_APIENTRY *LPALGETBOOLEANV)( ALenum param, ALboolean* data ); -typedef void (AL_APIENTRY *LPALGETINTEGERV)( ALenum param, ALint* data ); -typedef void (AL_APIENTRY *LPALGETFLOATV)( ALenum param, ALfloat* data ); -typedef void (AL_APIENTRY *LPALGETDOUBLEV)( ALenum param, ALdouble* data ); -typedef ALboolean (AL_APIENTRY *LPALGETBOOLEAN)( ALenum param ); -typedef ALint (AL_APIENTRY *LPALGETINTEGER)( ALenum param ); -typedef ALfloat (AL_APIENTRY *LPALGETFLOAT)( ALenum param ); -typedef ALdouble (AL_APIENTRY *LPALGETDOUBLE)( ALenum param ); -typedef ALenum (AL_APIENTRY *LPALGETERROR)( void ); -typedef ALboolean (AL_APIENTRY *LPALISEXTENSIONPRESENT)(const ALchar* extname ); -typedef void* (AL_APIENTRY *LPALGETPROCADDRESS)( const ALchar* fname ); -typedef ALenum (AL_APIENTRY *LPALGETENUMVALUE)( const ALchar* ename ); -typedef void (AL_APIENTRY *LPALLISTENERF)( ALenum param, ALfloat value ); -typedef void (AL_APIENTRY *LPALLISTENER3F)( ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 ); -typedef void (AL_APIENTRY *LPALLISTENERFV)( ALenum param, const ALfloat* values ); -typedef void (AL_APIENTRY *LPALLISTENERI)( ALenum param, ALint value ); -typedef void (AL_APIENTRY *LPALLISTENER3I)( ALenum param, ALint value1, ALint value2, ALint value3 ); -typedef void (AL_APIENTRY *LPALLISTENERIV)( ALenum param, const ALint* values ); -typedef void (AL_APIENTRY *LPALGETLISTENERF)( ALenum param, ALfloat* value ); -typedef void (AL_APIENTRY *LPALGETLISTENER3F)( ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3 ); -typedef void (AL_APIENTRY *LPALGETLISTENERFV)( ALenum param, ALfloat* values ); -typedef void (AL_APIENTRY *LPALGETLISTENERI)( ALenum param, ALint* value ); -typedef void (AL_APIENTRY *LPALGETLISTENER3I)( ALenum param, ALint *value1, ALint *value2, ALint *value3 ); -typedef void (AL_APIENTRY *LPALGETLISTENERIV)( ALenum param, ALint* values ); -typedef void (AL_APIENTRY *LPALGENSOURCES)( ALsizei n, ALuint* sources ); -typedef void (AL_APIENTRY *LPALDELETESOURCES)( ALsizei n, const ALuint* sources ); -typedef ALboolean (AL_APIENTRY *LPALISSOURCE)( ALuint sid ); -typedef void (AL_APIENTRY *LPALSOURCEF)( ALuint sid, ALenum param, ALfloat value); -typedef void (AL_APIENTRY *LPALSOURCE3F)( ALuint sid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 ); -typedef void (AL_APIENTRY *LPALSOURCEFV)( ALuint sid, ALenum param, const ALfloat* values ); -typedef void (AL_APIENTRY *LPALSOURCEI)( ALuint sid, ALenum param, ALint value); -typedef void (AL_APIENTRY *LPALSOURCE3I)( ALuint sid, ALenum param, ALint value1, ALint value2, ALint value3 ); -typedef void (AL_APIENTRY *LPALSOURCEIV)( ALuint sid, ALenum param, const ALint* values ); -typedef void (AL_APIENTRY *LPALGETSOURCEF)( ALuint sid, ALenum param, ALfloat* value ); -typedef void (AL_APIENTRY *LPALGETSOURCE3F)( ALuint sid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3); -typedef void (AL_APIENTRY *LPALGETSOURCEFV)( ALuint sid, ALenum param, ALfloat* values ); -typedef void (AL_APIENTRY *LPALGETSOURCEI)( ALuint sid, ALenum param, ALint* value ); -typedef void (AL_APIENTRY *LPALGETSOURCE3I)( ALuint sid, ALenum param, ALint* value1, ALint* value2, ALint* value3); -typedef void (AL_APIENTRY *LPALGETSOURCEIV)( ALuint sid, ALenum param, ALint* values ); -typedef void (AL_APIENTRY *LPALSOURCEPLAYV)( ALsizei ns, const ALuint *sids ); -typedef void (AL_APIENTRY *LPALSOURCESTOPV)( ALsizei ns, const ALuint *sids ); -typedef void (AL_APIENTRY *LPALSOURCEREWINDV)( ALsizei ns, const ALuint *sids ); -typedef void (AL_APIENTRY *LPALSOURCEPAUSEV)( ALsizei ns, const ALuint *sids ); -typedef void (AL_APIENTRY *LPALSOURCEPLAY)( ALuint sid ); -typedef void (AL_APIENTRY *LPALSOURCESTOP)( ALuint sid ); -typedef void (AL_APIENTRY *LPALSOURCEREWIND)( ALuint sid ); -typedef void (AL_APIENTRY *LPALSOURCEPAUSE)( ALuint sid ); -typedef void (AL_APIENTRY *LPALSOURCEQUEUEBUFFERS)(ALuint sid, ALsizei numEntries, const ALuint *bids ); -typedef void (AL_APIENTRY *LPALSOURCEUNQUEUEBUFFERS)(ALuint sid, ALsizei numEntries, ALuint *bids ); -typedef void (AL_APIENTRY *LPALGENBUFFERS)( ALsizei n, ALuint* buffers ); -typedef void (AL_APIENTRY *LPALDELETEBUFFERS)( ALsizei n, const ALuint* buffers ); -typedef ALboolean (AL_APIENTRY *LPALISBUFFER)( ALuint bid ); -typedef void (AL_APIENTRY *LPALBUFFERDATA)( ALuint bid, ALenum format, const ALvoid* data, ALsizei size, ALsizei freq ); -typedef void (AL_APIENTRY *LPALBUFFERF)( ALuint bid, ALenum param, ALfloat value); -typedef void (AL_APIENTRY *LPALBUFFER3F)( ALuint bid, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3 ); -typedef void (AL_APIENTRY *LPALBUFFERFV)( ALuint bid, ALenum param, const ALfloat* values ); -typedef void (AL_APIENTRY *LPALBUFFERI)( ALuint bid, ALenum param, ALint value); -typedef void (AL_APIENTRY *LPALBUFFER3I)( ALuint bid, ALenum param, ALint value1, ALint value2, ALint value3 ); -typedef void (AL_APIENTRY *LPALBUFFERIV)( ALuint bid, ALenum param, const ALint* values ); -typedef void (AL_APIENTRY *LPALGETBUFFERF)( ALuint bid, ALenum param, ALfloat* value ); -typedef void (AL_APIENTRY *LPALGETBUFFER3F)( ALuint bid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3); -typedef void (AL_APIENTRY *LPALGETBUFFERFV)( ALuint bid, ALenum param, ALfloat* values ); -typedef void (AL_APIENTRY *LPALGETBUFFERI)( ALuint bid, ALenum param, ALint* value ); -typedef void (AL_APIENTRY *LPALGETBUFFER3I)( ALuint bid, ALenum param, ALint* value1, ALint* value2, ALint* value3); -typedef void (AL_APIENTRY *LPALGETBUFFERIV)( ALuint bid, ALenum param, ALint* values ); -typedef void (AL_APIENTRY *LPALDOPPLERFACTOR)( ALfloat value ); -typedef void (AL_APIENTRY *LPALDOPPLERVELOCITY)( ALfloat value ); -typedef void (AL_APIENTRY *LPALSPEEDOFSOUND)( ALfloat value ); -typedef void (AL_APIENTRY *LPALDISTANCEMODEL)( ALenum distanceModel ); - -#if defined(TARGET_OS_MAC) && TARGET_OS_MAC - #pragma export off -#endif +AL_API ALboolean AL_APIENTRY alIsExtensionPresent(const ALchar *extname); +AL_API void* AL_APIENTRY alGetProcAddress(const ALchar *fname); +AL_API ALenum AL_APIENTRY alGetEnumValue(const ALchar *ename); + + +/** Set Listener parameters */ +AL_API void AL_APIENTRY alListenerf(ALenum param, ALfloat value); +AL_API void AL_APIENTRY alListener3f(ALenum param, ALfloat value1, ALfloat value2, ALfloat value3); +AL_API void AL_APIENTRY alListenerfv(ALenum param, const ALfloat *values); +AL_API void AL_APIENTRY alListeneri(ALenum param, ALint value); +AL_API void AL_APIENTRY alListener3i(ALenum param, ALint value1, ALint value2, ALint value3); +AL_API void AL_APIENTRY alListeneriv(ALenum param, const ALint *values); + +/** Get Listener parameters */ +AL_API void AL_APIENTRY alGetListenerf(ALenum param, ALfloat *value); +AL_API void AL_APIENTRY alGetListener3f(ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3); +AL_API void AL_APIENTRY alGetListenerfv(ALenum param, ALfloat *values); +AL_API void AL_APIENTRY alGetListeneri(ALenum param, ALint *value); +AL_API void AL_APIENTRY alGetListener3i(ALenum param, ALint *value1, ALint *value2, ALint *value3); +AL_API void AL_APIENTRY alGetListeneriv(ALenum param, ALint *values); + + +/** Create Source objects. */ +AL_API void AL_APIENTRY alGenSources(ALsizei n, ALuint *sources); +/** Delete Source objects. */ +AL_API void AL_APIENTRY alDeleteSources(ALsizei n, const ALuint *sources); +/** Verify a handle is a valid Source. */ +AL_API ALboolean AL_APIENTRY alIsSource(ALuint source); + +/** Set Source parameters. */ +AL_API void AL_APIENTRY alSourcef(ALuint source, ALenum param, ALfloat value); +AL_API void AL_APIENTRY alSource3f(ALuint source, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3); +AL_API void AL_APIENTRY alSourcefv(ALuint source, ALenum param, const ALfloat *values); +AL_API void AL_APIENTRY alSourcei(ALuint source, ALenum param, ALint value); +AL_API void AL_APIENTRY alSource3i(ALuint source, ALenum param, ALint value1, ALint value2, ALint value3); +AL_API void AL_APIENTRY alSourceiv(ALuint source, ALenum param, const ALint *values); + +/** Get Source parameters. */ +AL_API void AL_APIENTRY alGetSourcef(ALuint source, ALenum param, ALfloat *value); +AL_API void AL_APIENTRY alGetSource3f(ALuint source, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3); +AL_API void AL_APIENTRY alGetSourcefv(ALuint source, ALenum param, ALfloat *values); +AL_API void AL_APIENTRY alGetSourcei(ALuint source, ALenum param, ALint *value); +AL_API void AL_APIENTRY alGetSource3i(ALuint source, ALenum param, ALint *value1, ALint *value2, ALint *value3); +AL_API void AL_APIENTRY alGetSourceiv(ALuint source, ALenum param, ALint *values); + + +/** Play, replay, or resume (if paused) a list of Sources */ +AL_API void AL_APIENTRY alSourcePlayv(ALsizei n, const ALuint *sources); +/** Stop a list of Sources */ +AL_API void AL_APIENTRY alSourceStopv(ALsizei n, const ALuint *sources); +/** Rewind a list of Sources */ +AL_API void AL_APIENTRY alSourceRewindv(ALsizei n, const ALuint *sources); +/** Pause a list of Sources */ +AL_API void AL_APIENTRY alSourcePausev(ALsizei n, const ALuint *sources); + +/** Play, replay, or resume a Source */ +AL_API void AL_APIENTRY alSourcePlay(ALuint source); +/** Stop a Source */ +AL_API void AL_APIENTRY alSourceStop(ALuint source); +/** Rewind a Source (set playback postiton to beginning) */ +AL_API void AL_APIENTRY alSourceRewind(ALuint source); +/** Pause a Source */ +AL_API void AL_APIENTRY alSourcePause(ALuint source); + +/** Queue buffers onto a source */ +AL_API void AL_APIENTRY alSourceQueueBuffers(ALuint source, ALsizei nb, const ALuint *buffers); +/** Unqueue processed buffers from a source */ +AL_API void AL_APIENTRY alSourceUnqueueBuffers(ALuint source, ALsizei nb, ALuint *buffers); + + +/** Create Buffer objects */ +AL_API void AL_APIENTRY alGenBuffers(ALsizei n, ALuint *buffers); +/** Delete Buffer objects */ +AL_API void AL_APIENTRY alDeleteBuffers(ALsizei n, const ALuint *buffers); +/** Verify a handle is a valid Buffer */ +AL_API ALboolean AL_APIENTRY alIsBuffer(ALuint buffer); + +/** Specifies the data to be copied into a buffer */ +AL_API void AL_APIENTRY alBufferData(ALuint buffer, ALenum format, const ALvoid *data, ALsizei size, ALsizei freq); + +/** Set Buffer parameters, */ +AL_API void AL_APIENTRY alBufferf(ALuint buffer, ALenum param, ALfloat value); +AL_API void AL_APIENTRY alBuffer3f(ALuint buffer, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3); +AL_API void AL_APIENTRY alBufferfv(ALuint buffer, ALenum param, const ALfloat *values); +AL_API void AL_APIENTRY alBufferi(ALuint buffer, ALenum param, ALint value); +AL_API void AL_APIENTRY alBuffer3i(ALuint buffer, ALenum param, ALint value1, ALint value2, ALint value3); +AL_API void AL_APIENTRY alBufferiv(ALuint buffer, ALenum param, const ALint *values); + +/** Get Buffer parameters. */ +AL_API void AL_APIENTRY alGetBufferf(ALuint buffer, ALenum param, ALfloat *value); +AL_API void AL_APIENTRY alGetBuffer3f(ALuint buffer, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3); +AL_API void AL_APIENTRY alGetBufferfv(ALuint buffer, ALenum param, ALfloat *values); +AL_API void AL_APIENTRY alGetBufferi(ALuint buffer, ALenum param, ALint *value); +AL_API void AL_APIENTRY alGetBuffer3i(ALuint buffer, ALenum param, ALint *value1, ALint *value2, ALint *value3); +AL_API void AL_APIENTRY alGetBufferiv(ALuint buffer, ALenum param, ALint *values); + +/** Pointer-to-function type, useful for dynamically getting AL entry points. */ +typedef void (AL_APIENTRY *LPALENABLE)(ALenum capability); +typedef void (AL_APIENTRY *LPALDISABLE)(ALenum capability); +typedef ALboolean (AL_APIENTRY *LPALISENABLED)(ALenum capability); +typedef const ALchar* (AL_APIENTRY *LPALGETSTRING)(ALenum param); +typedef void (AL_APIENTRY *LPALGETBOOLEANV)(ALenum param, ALboolean *values); +typedef void (AL_APIENTRY *LPALGETINTEGERV)(ALenum param, ALint *values); +typedef void (AL_APIENTRY *LPALGETFLOATV)(ALenum param, ALfloat *values); +typedef void (AL_APIENTRY *LPALGETDOUBLEV)(ALenum param, ALdouble *values); +typedef ALboolean (AL_APIENTRY *LPALGETBOOLEAN)(ALenum param); +typedef ALint (AL_APIENTRY *LPALGETINTEGER)(ALenum param); +typedef ALfloat (AL_APIENTRY *LPALGETFLOAT)(ALenum param); +typedef ALdouble (AL_APIENTRY *LPALGETDOUBLE)(ALenum param); +typedef ALenum (AL_APIENTRY *LPALGETERROR)(void); +typedef ALboolean (AL_APIENTRY *LPALISEXTENSIONPRESENT)(const ALchar *extname); +typedef void* (AL_APIENTRY *LPALGETPROCADDRESS)(const ALchar *fname); +typedef ALenum (AL_APIENTRY *LPALGETENUMVALUE)(const ALchar *ename); +typedef void (AL_APIENTRY *LPALLISTENERF)(ALenum param, ALfloat value); +typedef void (AL_APIENTRY *LPALLISTENER3F)(ALenum param, ALfloat value1, ALfloat value2, ALfloat value3); +typedef void (AL_APIENTRY *LPALLISTENERFV)(ALenum param, const ALfloat *values); +typedef void (AL_APIENTRY *LPALLISTENERI)(ALenum param, ALint value); +typedef void (AL_APIENTRY *LPALLISTENER3I)(ALenum param, ALint value1, ALint value2, ALint value3); +typedef void (AL_APIENTRY *LPALLISTENERIV)(ALenum param, const ALint *values); +typedef void (AL_APIENTRY *LPALGETLISTENERF)(ALenum param, ALfloat *value); +typedef void (AL_APIENTRY *LPALGETLISTENER3F)(ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3); +typedef void (AL_APIENTRY *LPALGETLISTENERFV)(ALenum param, ALfloat *values); +typedef void (AL_APIENTRY *LPALGETLISTENERI)(ALenum param, ALint *value); +typedef void (AL_APIENTRY *LPALGETLISTENER3I)(ALenum param, ALint *value1, ALint *value2, ALint *value3); +typedef void (AL_APIENTRY *LPALGETLISTENERIV)(ALenum param, ALint *values); +typedef void (AL_APIENTRY *LPALGENSOURCES)(ALsizei n, ALuint *sources); +typedef void (AL_APIENTRY *LPALDELETESOURCES)(ALsizei n, const ALuint *sources); +typedef ALboolean (AL_APIENTRY *LPALISSOURCE)(ALuint source); +typedef void (AL_APIENTRY *LPALSOURCEF)(ALuint source, ALenum param, ALfloat value); +typedef void (AL_APIENTRY *LPALSOURCE3F)(ALuint source, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3); +typedef void (AL_APIENTRY *LPALSOURCEFV)(ALuint source, ALenum param, const ALfloat *values); +typedef void (AL_APIENTRY *LPALSOURCEI)(ALuint source, ALenum param, ALint value); +typedef void (AL_APIENTRY *LPALSOURCE3I)(ALuint source, ALenum param, ALint value1, ALint value2, ALint value3); +typedef void (AL_APIENTRY *LPALSOURCEIV)(ALuint source, ALenum param, const ALint *values); +typedef void (AL_APIENTRY *LPALGETSOURCEF)(ALuint source, ALenum param, ALfloat *value); +typedef void (AL_APIENTRY *LPALGETSOURCE3F)(ALuint source, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3); +typedef void (AL_APIENTRY *LPALGETSOURCEFV)(ALuint source, ALenum param, ALfloat *values); +typedef void (AL_APIENTRY *LPALGETSOURCEI)(ALuint source, ALenum param, ALint *value); +typedef void (AL_APIENTRY *LPALGETSOURCE3I)(ALuint source, ALenum param, ALint *value1, ALint *value2, ALint *value3); +typedef void (AL_APIENTRY *LPALGETSOURCEIV)(ALuint source, ALenum param, ALint *values); +typedef void (AL_APIENTRY *LPALSOURCEPLAYV)(ALsizei n, const ALuint *sources); +typedef void (AL_APIENTRY *LPALSOURCESTOPV)(ALsizei n, const ALuint *sources); +typedef void (AL_APIENTRY *LPALSOURCEREWINDV)(ALsizei n, const ALuint *sources); +typedef void (AL_APIENTRY *LPALSOURCEPAUSEV)(ALsizei n, const ALuint *sources); +typedef void (AL_APIENTRY *LPALSOURCEPLAY)(ALuint source); +typedef void (AL_APIENTRY *LPALSOURCESTOP)(ALuint source); +typedef void (AL_APIENTRY *LPALSOURCEREWIND)(ALuint source); +typedef void (AL_APIENTRY *LPALSOURCEPAUSE)(ALuint source); +typedef void (AL_APIENTRY *LPALSOURCEQUEUEBUFFERS)(ALuint source, ALsizei nb, const ALuint *buffers); +typedef void (AL_APIENTRY *LPALSOURCEUNQUEUEBUFFERS)(ALuint source, ALsizei nb, ALuint *buffers); +typedef void (AL_APIENTRY *LPALGENBUFFERS)(ALsizei n, ALuint *buffers); +typedef void (AL_APIENTRY *LPALDELETEBUFFERS)(ALsizei n, const ALuint *buffers); +typedef ALboolean (AL_APIENTRY *LPALISBUFFER)(ALuint buffer); +typedef void (AL_APIENTRY *LPALBUFFERDATA)(ALuint buffer, ALenum format, const ALvoid *data, ALsizei size, ALsizei freq); +typedef void (AL_APIENTRY *LPALBUFFERF)(ALuint buffer, ALenum param, ALfloat value); +typedef void (AL_APIENTRY *LPALBUFFER3F)(ALuint buffer, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3); +typedef void (AL_APIENTRY *LPALBUFFERFV)(ALuint buffer, ALenum param, const ALfloat *values); +typedef void (AL_APIENTRY *LPALBUFFERI)(ALuint buffer, ALenum param, ALint value); +typedef void (AL_APIENTRY *LPALBUFFER3I)(ALuint buffer, ALenum param, ALint value1, ALint value2, ALint value3); +typedef void (AL_APIENTRY *LPALBUFFERIV)(ALuint buffer, ALenum param, const ALint *values); +typedef void (AL_APIENTRY *LPALGETBUFFERF)(ALuint buffer, ALenum param, ALfloat *value); +typedef void (AL_APIENTRY *LPALGETBUFFER3F)(ALuint buffer, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3); +typedef void (AL_APIENTRY *LPALGETBUFFERFV)(ALuint buffer, ALenum param, ALfloat *values); +typedef void (AL_APIENTRY *LPALGETBUFFERI)(ALuint buffer, ALenum param, ALint *value); +typedef void (AL_APIENTRY *LPALGETBUFFER3I)(ALuint buffer, ALenum param, ALint *value1, ALint *value2, ALint *value3); +typedef void (AL_APIENTRY *LPALGETBUFFERIV)(ALuint buffer, ALenum param, ALint *values); +typedef void (AL_APIENTRY *LPALDOPPLERFACTOR)(ALfloat value); +typedef void (AL_APIENTRY *LPALDOPPLERVELOCITY)(ALfloat value); +typedef void (AL_APIENTRY *LPALSPEEDOFSOUND)(ALfloat value); +typedef void (AL_APIENTRY *LPALDISTANCEMODEL)(ALenum distanceModel); #if defined(__cplusplus) } /* extern "C" */ diff --git a/templates/android_project/jni/include/AL/alc.h b/templates/android_project/jni/include/AL/alc.h index 4712055c6..294e8b33c 100644 --- a/templates/android_project/jni/include/AL/alc.h +++ b/templates/android_project/jni/include/AL/alc.h @@ -21,25 +21,20 @@ extern "C" { #define ALC_APIENTRY #endif -#if defined(TARGET_OS_MAC) && TARGET_OS_MAC - #pragma export on -#endif -/* - * The ALCAPI, ALCAPIENTRY, and ALC_INVALID macros are deprecated, but are - * included for applications porting code from AL 1.0 - */ -#define ALCAPI ALC_API -#define ALCAPIENTRY ALC_APIENTRY -#define ALC_INVALID 0 +/** Deprecated macro. */ +#define ALCAPI ALC_API +#define ALCAPIENTRY ALC_APIENTRY +#define ALC_INVALID 0 +/** Supported ALC version? */ +#define ALC_VERSION_0_1 1 -#define ALC_VERSION_0_1 1 - +/** Opaque device handle */ typedef struct ALCdevice_struct ALCdevice; +/** Opaque context handle */ typedef struct ALCcontext_struct ALCcontext; - /** 8-bit boolean */ typedef char ALCboolean; @@ -82,196 +77,158 @@ typedef void ALCvoid; /* Enumerant values begin at column 50. No tabs. */ -/* Boolean False. */ +/** Boolean False. */ #define ALC_FALSE 0 -/* Boolean True. */ +/** Boolean True. */ #define ALC_TRUE 1 -/** - * followed by Hz - */ +/** Context attribute: Hz. */ #define ALC_FREQUENCY 0x1007 -/** - * followed by Hz - */ +/** Context attribute: Hz. */ #define ALC_REFRESH 0x1008 -/** - * followed by AL_TRUE, AL_FALSE - */ +/** Context attribute: AL_TRUE or AL_FALSE. */ #define ALC_SYNC 0x1009 -/** - * followed by Num of requested Mono (3D) Sources - */ +/** Context attribute: requested Mono (3D) Sources. */ #define ALC_MONO_SOURCES 0x1010 -/** - * followed by Num of requested Stereo Sources - */ +/** Context attribute: requested Stereo Sources. */ #define ALC_STEREO_SOURCES 0x1011 -/** - * errors - */ +/** No error. */ +#define ALC_NO_ERROR 0 -/** - * No error - */ -#define ALC_NO_ERROR ALC_FALSE - -/** - * No device - */ +/** Invalid device handle. */ #define ALC_INVALID_DEVICE 0xA001 -/** - * invalid context ID - */ +/** Invalid context handle. */ #define ALC_INVALID_CONTEXT 0xA002 -/** - * bad enum - */ +/** Invalid enum parameter passed to an ALC call. */ #define ALC_INVALID_ENUM 0xA003 -/** - * bad value - */ +/** Invalid value parameter passed to an ALC call. */ #define ALC_INVALID_VALUE 0xA004 -/** - * Out of memory. - */ +/** Out of memory. */ #define ALC_OUT_OF_MEMORY 0xA005 -/** - * The Specifier string for default device - */ -#define ALC_DEFAULT_DEVICE_SPECIFIER 0x1004 -#define ALC_DEVICE_SPECIFIER 0x1005 -#define ALC_EXTENSIONS 0x1006 - +/** Runtime ALC version. */ #define ALC_MAJOR_VERSION 0x1000 #define ALC_MINOR_VERSION 0x1001 +/** Context attribute list properties. */ #define ALC_ATTRIBUTES_SIZE 0x1002 #define ALC_ALL_ATTRIBUTES 0x1003 - +/** String for the default device specifier. */ +#define ALC_DEFAULT_DEVICE_SPECIFIER 0x1004 /** - * Capture extension + * String for the given device's specifier. + * + * If device handle is NULL, it is instead a null-char separated list of + * strings of known device specifiers (list ends with an empty string). */ +#define ALC_DEVICE_SPECIFIER 0x1005 +/** String for space-separated list of ALC extensions. */ +#define ALC_EXTENSIONS 0x1006 + + +/** Capture extension */ #define ALC_EXT_CAPTURE 1 +/** + * String for the given capture device's specifier. + * + * If device handle is NULL, it is instead a null-char separated list of + * strings of known capture device specifiers (list ends with an empty string). + */ #define ALC_CAPTURE_DEVICE_SPECIFIER 0x310 +/** String for the default capture device specifier. */ #define ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER 0x311 +/** Number of sample frames available for capture. */ #define ALC_CAPTURE_SAMPLES 0x312 -/** - * ALC_ENUMERATE_ALL_EXT enums - */ +/** Enumerate All extension */ #define ALC_ENUMERATE_ALL_EXT 1 +/** String for the default extended device specifier. */ #define ALC_DEFAULT_ALL_DEVICES_SPECIFIER 0x1012 +/** + * String for the given extended device's specifier. + * + * If device handle is NULL, it is instead a null-char separated list of + * strings of known extended device specifiers (list ends with an empty string). + */ #define ALC_ALL_DEVICES_SPECIFIER 0x1013 -/* - * Context Management - */ -ALC_API ALCcontext * ALC_APIENTRY alcCreateContext( ALCdevice *device, const ALCint* attrlist ); +/** Context management. */ +ALC_API ALCcontext* ALC_APIENTRY alcCreateContext(ALCdevice *device, const ALCint* attrlist); +ALC_API ALCboolean ALC_APIENTRY alcMakeContextCurrent(ALCcontext *context); +ALC_API void ALC_APIENTRY alcProcessContext(ALCcontext *context); +ALC_API void ALC_APIENTRY alcSuspendContext(ALCcontext *context); +ALC_API void ALC_APIENTRY alcDestroyContext(ALCcontext *context); +ALC_API ALCcontext* ALC_APIENTRY alcGetCurrentContext(void); +ALC_API ALCdevice* ALC_APIENTRY alcGetContextsDevice(ALCcontext *context); -ALC_API ALCboolean ALC_APIENTRY alcMakeContextCurrent( ALCcontext *context ); - -ALC_API void ALC_APIENTRY alcProcessContext( ALCcontext *context ); - -ALC_API void ALC_APIENTRY alcSuspendContext( ALCcontext *context ); - -ALC_API void ALC_APIENTRY alcDestroyContext( ALCcontext *context ); - -ALC_API ALCcontext * ALC_APIENTRY alcGetCurrentContext( void ); - -ALC_API ALCdevice* ALC_APIENTRY alcGetContextsDevice( ALCcontext *context ); +/** Device management. */ +ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *devicename); +ALC_API ALCboolean ALC_APIENTRY alcCloseDevice(ALCdevice *device); -/* - * Device Management - */ -ALC_API ALCdevice * ALC_APIENTRY alcOpenDevice( const ALCchar *devicename ); - -ALC_API ALCboolean ALC_APIENTRY alcCloseDevice( ALCdevice *device ); - - -/* +/** * Error support. - * Obtain the most recent Context error + * + * Obtain the most recent Device error. */ -ALC_API ALCenum ALC_APIENTRY alcGetError( ALCdevice *device ); +ALC_API ALCenum ALC_APIENTRY alcGetError(ALCdevice *device); - -/* +/** * Extension support. + * * Query for the presence of an extension, and obtain any appropriate * function pointers and enum values. */ -ALC_API ALCboolean ALC_APIENTRY alcIsExtensionPresent( ALCdevice *device, const ALCchar *extname ); +ALC_API ALCboolean ALC_APIENTRY alcIsExtensionPresent(ALCdevice *device, const ALCchar *extname); +ALC_API void* ALC_APIENTRY alcGetProcAddress(ALCdevice *device, const ALCchar *funcname); +ALC_API ALCenum ALC_APIENTRY alcGetEnumValue(ALCdevice *device, const ALCchar *enumname); -ALC_API void * ALC_APIENTRY alcGetProcAddress( ALCdevice *device, const ALCchar *funcname ); +/** Query function. */ +ALC_API const ALCchar* ALC_APIENTRY alcGetString(ALCdevice *device, ALCenum param); +ALC_API void ALC_APIENTRY alcGetIntegerv(ALCdevice *device, ALCenum param, ALCsizei size, ALCint *values); -ALC_API ALCenum ALC_APIENTRY alcGetEnumValue( ALCdevice *device, const ALCchar *enumname ); +/** Capture function. */ +ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize); +ALC_API ALCboolean ALC_APIENTRY alcCaptureCloseDevice(ALCdevice *device); +ALC_API void ALC_APIENTRY alcCaptureStart(ALCdevice *device); +ALC_API void ALC_APIENTRY alcCaptureStop(ALCdevice *device); +ALC_API void ALC_APIENTRY alcCaptureSamples(ALCdevice *device, ALCvoid *buffer, ALCsizei samples); - -/* - * Query functions - */ -ALC_API const ALCchar * ALC_APIENTRY alcGetString( ALCdevice *device, ALCenum param ); - -ALC_API void ALC_APIENTRY alcGetIntegerv( ALCdevice *device, ALCenum param, ALCsizei size, ALCint *data ); - - -/* - * Capture functions - */ -ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice( const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize ); - -ALC_API ALCboolean ALC_APIENTRY alcCaptureCloseDevice( ALCdevice *device ); - -ALC_API void ALC_APIENTRY alcCaptureStart( ALCdevice *device ); - -ALC_API void ALC_APIENTRY alcCaptureStop( ALCdevice *device ); - -ALC_API void ALC_APIENTRY alcCaptureSamples( ALCdevice *device, ALCvoid *buffer, ALCsizei samples ); - -/* - * Pointer-to-function types, useful for dynamically getting ALC entry points. - */ -typedef ALCcontext * (ALC_APIENTRY *LPALCCREATECONTEXT) (ALCdevice *device, const ALCint *attrlist); -typedef ALCboolean (ALC_APIENTRY *LPALCMAKECONTEXTCURRENT)( ALCcontext *context ); -typedef void (ALC_APIENTRY *LPALCPROCESSCONTEXT)( ALCcontext *context ); -typedef void (ALC_APIENTRY *LPALCSUSPENDCONTEXT)( ALCcontext *context ); -typedef void (ALC_APIENTRY *LPALCDESTROYCONTEXT)( ALCcontext *context ); -typedef ALCcontext * (ALC_APIENTRY *LPALCGETCURRENTCONTEXT)( void ); -typedef ALCdevice * (ALC_APIENTRY *LPALCGETCONTEXTSDEVICE)( ALCcontext *context ); -typedef ALCdevice * (ALC_APIENTRY *LPALCOPENDEVICE)( const ALCchar *devicename ); -typedef ALCboolean (ALC_APIENTRY *LPALCCLOSEDEVICE)( ALCdevice *device ); -typedef ALCenum (ALC_APIENTRY *LPALCGETERROR)( ALCdevice *device ); -typedef ALCboolean (ALC_APIENTRY *LPALCISEXTENSIONPRESENT)( ALCdevice *device, const ALCchar *extname ); -typedef void * (ALC_APIENTRY *LPALCGETPROCADDRESS)(ALCdevice *device, const ALCchar *funcname ); -typedef ALCenum (ALC_APIENTRY *LPALCGETENUMVALUE)(ALCdevice *device, const ALCchar *enumname ); -typedef const ALCchar* (ALC_APIENTRY *LPALCGETSTRING)( ALCdevice *device, ALCenum param ); -typedef void (ALC_APIENTRY *LPALCGETINTEGERV)( ALCdevice *device, ALCenum param, ALCsizei size, ALCint *dest ); -typedef ALCdevice * (ALC_APIENTRY *LPALCCAPTUREOPENDEVICE)( const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize ); -typedef ALCboolean (ALC_APIENTRY *LPALCCAPTURECLOSEDEVICE)( ALCdevice *device ); -typedef void (ALC_APIENTRY *LPALCCAPTURESTART)( ALCdevice *device ); -typedef void (ALC_APIENTRY *LPALCCAPTURESTOP)( ALCdevice *device ); -typedef void (ALC_APIENTRY *LPALCCAPTURESAMPLES)( ALCdevice *device, ALCvoid *buffer, ALCsizei samples ); - -#if defined(TARGET_OS_MAC) && TARGET_OS_MAC - #pragma export off -#endif +/** Pointer-to-function type, useful for dynamically getting ALC entry points. */ +typedef ALCcontext* (ALC_APIENTRY *LPALCCREATECONTEXT)(ALCdevice *device, const ALCint *attrlist); +typedef ALCboolean (ALC_APIENTRY *LPALCMAKECONTEXTCURRENT)(ALCcontext *context); +typedef void (ALC_APIENTRY *LPALCPROCESSCONTEXT)(ALCcontext *context); +typedef void (ALC_APIENTRY *LPALCSUSPENDCONTEXT)(ALCcontext *context); +typedef void (ALC_APIENTRY *LPALCDESTROYCONTEXT)(ALCcontext *context); +typedef ALCcontext* (ALC_APIENTRY *LPALCGETCURRENTCONTEXT)(void); +typedef ALCdevice* (ALC_APIENTRY *LPALCGETCONTEXTSDEVICE)(ALCcontext *context); +typedef ALCdevice* (ALC_APIENTRY *LPALCOPENDEVICE)(const ALCchar *devicename); +typedef ALCboolean (ALC_APIENTRY *LPALCCLOSEDEVICE)(ALCdevice *device); +typedef ALCenum (ALC_APIENTRY *LPALCGETERROR)(ALCdevice *device); +typedef ALCboolean (ALC_APIENTRY *LPALCISEXTENSIONPRESENT)(ALCdevice *device, const ALCchar *extname); +typedef void* (ALC_APIENTRY *LPALCGETPROCADDRESS)(ALCdevice *device, const ALCchar *funcname); +typedef ALCenum (ALC_APIENTRY *LPALCGETENUMVALUE)(ALCdevice *device, const ALCchar *enumname); +typedef const ALCchar* (ALC_APIENTRY *LPALCGETSTRING)(ALCdevice *device, ALCenum param); +typedef void (ALC_APIENTRY *LPALCGETINTEGERV)(ALCdevice *device, ALCenum param, ALCsizei size, ALCint *values); +typedef ALCdevice* (ALC_APIENTRY *LPALCCAPTUREOPENDEVICE)(const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize); +typedef ALCboolean (ALC_APIENTRY *LPALCCAPTURECLOSEDEVICE)(ALCdevice *device); +typedef void (ALC_APIENTRY *LPALCCAPTURESTART)(ALCdevice *device); +typedef void (ALC_APIENTRY *LPALCCAPTURESTOP)(ALCdevice *device); +typedef void (ALC_APIENTRY *LPALCCAPTURESAMPLES)(ALCdevice *device, ALCvoid *buffer, ALCsizei samples); #if defined(__cplusplus) } diff --git a/templates/android_project/jni/include/AL/alext.h b/templates/android_project/jni/include/AL/alext.h index 745b7653f..50ad10ec1 100644 --- a/templates/android_project/jni/include/AL/alext.h +++ b/templates/android_project/jni/include/AL/alext.h @@ -13,8 +13,8 @@ * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * Or go to http://www.gnu.org/copyleft/lgpl.html */ @@ -22,6 +22,21 @@ #define AL_ALEXT_H #include +/* Define int64_t and uint64_t types */ +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +#include +#elif defined(_WIN32) && defined(__GNUC__) +#include +#elif defined(_WIN32) +typedef __int64 int64_t; +typedef unsigned __int64 uint64_t; +#else +/* Fallback if nothing above works */ +#include +#endif + +#include "alc.h" +#include "al.h" #ifdef __cplusplus extern "C" { @@ -188,6 +203,251 @@ AL_API void AL_APIENTRY alRequestFoldbackStop(void); #define AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT 0x9000 #endif +#ifndef AL_SOFT_buffer_samples +#define AL_SOFT_buffer_samples 1 +/* Channel configurations */ +#define AL_MONO_SOFT 0x1500 +#define AL_STEREO_SOFT 0x1501 +#define AL_REAR_SOFT 0x1502 +#define AL_QUAD_SOFT 0x1503 +#define AL_5POINT1_SOFT 0x1504 +#define AL_6POINT1_SOFT 0x1505 +#define AL_7POINT1_SOFT 0x1506 + +/* Sample types */ +#define AL_BYTE_SOFT 0x1400 +#define AL_UNSIGNED_BYTE_SOFT 0x1401 +#define AL_SHORT_SOFT 0x1402 +#define AL_UNSIGNED_SHORT_SOFT 0x1403 +#define AL_INT_SOFT 0x1404 +#define AL_UNSIGNED_INT_SOFT 0x1405 +#define AL_FLOAT_SOFT 0x1406 +#define AL_DOUBLE_SOFT 0x1407 +#define AL_BYTE3_SOFT 0x1408 +#define AL_UNSIGNED_BYTE3_SOFT 0x1409 + +/* Storage formats */ +#define AL_MONO8_SOFT 0x1100 +#define AL_MONO16_SOFT 0x1101 +#define AL_MONO32F_SOFT 0x10010 +#define AL_STEREO8_SOFT 0x1102 +#define AL_STEREO16_SOFT 0x1103 +#define AL_STEREO32F_SOFT 0x10011 +#define AL_QUAD8_SOFT 0x1204 +#define AL_QUAD16_SOFT 0x1205 +#define AL_QUAD32F_SOFT 0x1206 +#define AL_REAR8_SOFT 0x1207 +#define AL_REAR16_SOFT 0x1208 +#define AL_REAR32F_SOFT 0x1209 +#define AL_5POINT1_8_SOFT 0x120A +#define AL_5POINT1_16_SOFT 0x120B +#define AL_5POINT1_32F_SOFT 0x120C +#define AL_6POINT1_8_SOFT 0x120D +#define AL_6POINT1_16_SOFT 0x120E +#define AL_6POINT1_32F_SOFT 0x120F +#define AL_7POINT1_8_SOFT 0x1210 +#define AL_7POINT1_16_SOFT 0x1211 +#define AL_7POINT1_32F_SOFT 0x1212 + +/* Buffer attributes */ +#define AL_INTERNAL_FORMAT_SOFT 0x2008 +#define AL_BYTE_LENGTH_SOFT 0x2009 +#define AL_SAMPLE_LENGTH_SOFT 0x200A +#define AL_SEC_LENGTH_SOFT 0x200B + +typedef void (AL_APIENTRY*LPALBUFFERSAMPLESSOFT)(ALuint,ALuint,ALenum,ALsizei,ALenum,ALenum,const ALvoid*); +typedef void (AL_APIENTRY*LPALBUFFERSUBSAMPLESSOFT)(ALuint,ALsizei,ALsizei,ALenum,ALenum,const ALvoid*); +typedef void (AL_APIENTRY*LPALGETBUFFERSAMPLESSOFT)(ALuint,ALsizei,ALsizei,ALenum,ALenum,ALvoid*); +typedef ALboolean (AL_APIENTRY*LPALISBUFFERFORMATSUPPORTEDSOFT)(ALenum); +#ifdef AL_ALEXT_PROTOTYPES +AL_API void AL_APIENTRY alBufferSamplesSOFT(ALuint buffer, ALuint samplerate, ALenum internalformat, ALsizei samples, ALenum channels, ALenum type, const ALvoid *data); +AL_API void AL_APIENTRY alBufferSubSamplesSOFT(ALuint buffer, ALsizei offset, ALsizei samples, ALenum channels, ALenum type, const ALvoid *data); +AL_API void AL_APIENTRY alGetBufferSamplesSOFT(ALuint buffer, ALsizei offset, ALsizei samples, ALenum channels, ALenum type, ALvoid *data); +AL_API ALboolean AL_APIENTRY alIsBufferFormatSupportedSOFT(ALenum format); +#endif +#endif + +#ifndef AL_SOFT_direct_channels +#define AL_SOFT_direct_channels 1 +#define AL_DIRECT_CHANNELS_SOFT 0x1033 +#endif + +#ifndef ALC_SOFT_loopback +#define ALC_SOFT_loopback 1 +#define ALC_FORMAT_CHANNELS_SOFT 0x1990 +#define ALC_FORMAT_TYPE_SOFT 0x1991 + +/* Sample types */ +#define ALC_BYTE_SOFT 0x1400 +#define ALC_UNSIGNED_BYTE_SOFT 0x1401 +#define ALC_SHORT_SOFT 0x1402 +#define ALC_UNSIGNED_SHORT_SOFT 0x1403 +#define ALC_INT_SOFT 0x1404 +#define ALC_UNSIGNED_INT_SOFT 0x1405 +#define ALC_FLOAT_SOFT 0x1406 + +/* Channel configurations */ +#define ALC_MONO_SOFT 0x1500 +#define ALC_STEREO_SOFT 0x1501 +#define ALC_QUAD_SOFT 0x1503 +#define ALC_5POINT1_SOFT 0x1504 +#define ALC_6POINT1_SOFT 0x1505 +#define ALC_7POINT1_SOFT 0x1506 + +typedef ALCdevice* (ALC_APIENTRY*LPALCLOOPBACKOPENDEVICESOFT)(const ALCchar*); +typedef ALCboolean (ALC_APIENTRY*LPALCISRENDERFORMATSUPPORTEDSOFT)(ALCdevice*,ALCsizei,ALCenum,ALCenum); +typedef void (ALC_APIENTRY*LPALCRENDERSAMPLESSOFT)(ALCdevice*,ALCvoid*,ALCsizei); +#ifdef AL_ALEXT_PROTOTYPES +ALC_API ALCdevice* ALC_APIENTRY alcLoopbackOpenDeviceSOFT(const ALCchar *deviceName); +ALC_API ALCboolean ALC_APIENTRY alcIsRenderFormatSupportedSOFT(ALCdevice *device, ALCsizei freq, ALCenum channels, ALCenum type); +ALC_API void ALC_APIENTRY alcRenderSamplesSOFT(ALCdevice *device, ALCvoid *buffer, ALCsizei samples); +#endif +#endif + +#ifndef AL_EXT_STEREO_ANGLES +#define AL_EXT_STEREO_ANGLES 1 +#define AL_STEREO_ANGLES 0x1030 +#endif + +#ifndef AL_EXT_SOURCE_RADIUS +#define AL_EXT_SOURCE_RADIUS 1 +#define AL_SOURCE_RADIUS 0x1031 +#endif + +#ifndef AL_SOFT_source_latency +#define AL_SOFT_source_latency 1 +#define AL_SAMPLE_OFFSET_LATENCY_SOFT 0x1200 +#define AL_SEC_OFFSET_LATENCY_SOFT 0x1201 +typedef int64_t ALint64SOFT; +typedef uint64_t ALuint64SOFT; +typedef void (AL_APIENTRY*LPALSOURCEDSOFT)(ALuint,ALenum,ALdouble); +typedef void (AL_APIENTRY*LPALSOURCE3DSOFT)(ALuint,ALenum,ALdouble,ALdouble,ALdouble); +typedef void (AL_APIENTRY*LPALSOURCEDVSOFT)(ALuint,ALenum,const ALdouble*); +typedef void (AL_APIENTRY*LPALGETSOURCEDSOFT)(ALuint,ALenum,ALdouble*); +typedef void (AL_APIENTRY*LPALGETSOURCE3DSOFT)(ALuint,ALenum,ALdouble*,ALdouble*,ALdouble*); +typedef void (AL_APIENTRY*LPALGETSOURCEDVSOFT)(ALuint,ALenum,ALdouble*); +typedef void (AL_APIENTRY*LPALSOURCEI64SOFT)(ALuint,ALenum,ALint64SOFT); +typedef void (AL_APIENTRY*LPALSOURCE3I64SOFT)(ALuint,ALenum,ALint64SOFT,ALint64SOFT,ALint64SOFT); +typedef void (AL_APIENTRY*LPALSOURCEI64VSOFT)(ALuint,ALenum,const ALint64SOFT*); +typedef void (AL_APIENTRY*LPALGETSOURCEI64SOFT)(ALuint,ALenum,ALint64SOFT*); +typedef void (AL_APIENTRY*LPALGETSOURCE3I64SOFT)(ALuint,ALenum,ALint64SOFT*,ALint64SOFT*,ALint64SOFT*); +typedef void (AL_APIENTRY*LPALGETSOURCEI64VSOFT)(ALuint,ALenum,ALint64SOFT*); +#ifdef AL_ALEXT_PROTOTYPES +AL_API void AL_APIENTRY alSourcedSOFT(ALuint source, ALenum param, ALdouble value); +AL_API void AL_APIENTRY alSource3dSOFT(ALuint source, ALenum param, ALdouble value1, ALdouble value2, ALdouble value3); +AL_API void AL_APIENTRY alSourcedvSOFT(ALuint source, ALenum param, const ALdouble *values); +AL_API void AL_APIENTRY alGetSourcedSOFT(ALuint source, ALenum param, ALdouble *value); +AL_API void AL_APIENTRY alGetSource3dSOFT(ALuint source, ALenum param, ALdouble *value1, ALdouble *value2, ALdouble *value3); +AL_API void AL_APIENTRY alGetSourcedvSOFT(ALuint source, ALenum param, ALdouble *values); +AL_API void AL_APIENTRY alSourcei64SOFT(ALuint source, ALenum param, ALint64SOFT value); +AL_API void AL_APIENTRY alSource3i64SOFT(ALuint source, ALenum param, ALint64SOFT value1, ALint64SOFT value2, ALint64SOFT value3); +AL_API void AL_APIENTRY alSourcei64vSOFT(ALuint source, ALenum param, const ALint64SOFT *values); +AL_API void AL_APIENTRY alGetSourcei64SOFT(ALuint source, ALenum param, ALint64SOFT *value); +AL_API void AL_APIENTRY alGetSource3i64SOFT(ALuint source, ALenum param, ALint64SOFT *value1, ALint64SOFT *value2, ALint64SOFT *value3); +AL_API void AL_APIENTRY alGetSourcei64vSOFT(ALuint source, ALenum param, ALint64SOFT *values); +#endif +#endif + +#ifndef ALC_EXT_DEFAULT_FILTER_ORDER +#define ALC_EXT_DEFAULT_FILTER_ORDER 1 +#define ALC_DEFAULT_FILTER_ORDER 0x1100 +#endif + +#ifndef AL_SOFT_deferred_updates +#define AL_SOFT_deferred_updates 1 +#define AL_DEFERRED_UPDATES_SOFT 0xC002 +typedef ALvoid (AL_APIENTRY*LPALDEFERUPDATESSOFT)(void); +typedef ALvoid (AL_APIENTRY*LPALPROCESSUPDATESSOFT)(void); +#ifdef AL_ALEXT_PROTOTYPES +AL_API ALvoid AL_APIENTRY alDeferUpdatesSOFT(void); +AL_API ALvoid AL_APIENTRY alProcessUpdatesSOFT(void); +#endif +#endif + +#ifndef AL_SOFT_block_alignment +#define AL_SOFT_block_alignment 1 +#define AL_UNPACK_BLOCK_ALIGNMENT_SOFT 0x200C +#define AL_PACK_BLOCK_ALIGNMENT_SOFT 0x200D +#endif + +#ifndef AL_SOFT_MSADPCM +#define AL_SOFT_MSADPCM 1 +#define AL_FORMAT_MONO_MSADPCM_SOFT 0x1302 +#define AL_FORMAT_STEREO_MSADPCM_SOFT 0x1303 +#endif + +#ifndef AL_SOFT_source_length +#define AL_SOFT_source_length 1 +/*#define AL_BYTE_LENGTH_SOFT 0x2009*/ +/*#define AL_SAMPLE_LENGTH_SOFT 0x200A*/ +/*#define AL_SEC_LENGTH_SOFT 0x200B*/ +#endif + +#ifndef ALC_SOFT_pause_device +#define ALC_SOFT_pause_device 1 +typedef void (ALC_APIENTRY*LPALCDEVICEPAUSESOFT)(ALCdevice *device); +typedef void (ALC_APIENTRY*LPALCDEVICERESUMESOFT)(ALCdevice *device); +#ifdef AL_ALEXT_PROTOTYPES +ALC_API void ALC_APIENTRY alcDevicePauseSOFT(ALCdevice *device); +ALC_API void ALC_APIENTRY alcDeviceResumeSOFT(ALCdevice *device); +#endif +#endif + +#ifndef AL_EXT_BFORMAT +#define AL_EXT_BFORMAT 1 +#define AL_FORMAT_BFORMAT2D_8 0x20021 +#define AL_FORMAT_BFORMAT2D_16 0x20022 +#define AL_FORMAT_BFORMAT2D_FLOAT32 0x20023 +#define AL_FORMAT_BFORMAT3D_8 0x20031 +#define AL_FORMAT_BFORMAT3D_16 0x20032 +#define AL_FORMAT_BFORMAT3D_FLOAT32 0x20033 +#endif + +#ifndef AL_EXT_MULAW_BFORMAT +#define AL_EXT_MULAW_BFORMAT 1 +#define AL_FORMAT_BFORMAT2D_MULAW 0x10031 +#define AL_FORMAT_BFORMAT3D_MULAW 0x10032 +#endif + +#ifndef ALC_SOFT_HRTF +#define ALC_SOFT_HRTF 1 +#define ALC_HRTF_SOFT 0x1992 +#define ALC_DONT_CARE_SOFT 0x0002 +#define ALC_HRTF_STATUS_SOFT 0x1993 +#define ALC_HRTF_DISABLED_SOFT 0x0000 +#define ALC_HRTF_ENABLED_SOFT 0x0001 +#define ALC_HRTF_DENIED_SOFT 0x0002 +#define ALC_HRTF_REQUIRED_SOFT 0x0003 +#define ALC_HRTF_HEADPHONES_DETECTED_SOFT 0x0004 +#define ALC_HRTF_UNSUPPORTED_FORMAT_SOFT 0x0005 +#define ALC_NUM_HRTF_SPECIFIERS_SOFT 0x1994 +#define ALC_HRTF_SPECIFIER_SOFT 0x1995 +#define ALC_HRTF_ID_SOFT 0x1996 +typedef const ALCchar* (ALC_APIENTRY*LPALCGETSTRINGISOFT)(ALCdevice *device, ALCenum paramName, ALCsizei index); +typedef ALCboolean (ALC_APIENTRY*LPALCRESETDEVICESOFT)(ALCdevice *device, const ALCint *attribs); +#ifdef AL_ALEXT_PROTOTYPES +ALC_API const ALCchar* ALC_APIENTRY alcGetStringiSOFT(ALCdevice *device, ALCenum paramName, ALCsizei index); +ALC_API ALCboolean ALC_APIENTRY alcResetDeviceSOFT(ALCdevice *device, const ALCint *attribs); +#endif +#endif + +#ifndef AL_SOFT_gain_clamp_ex +#define AL_SOFT_gain_clamp_ex 1 +#define AL_GAIN_LIMIT_SOFT 0x200E +#endif + +#ifndef AL_SOFT_source_resampler +#define AL_SOFT_source_resampler +#define AL_NUM_RESAMPLERS_SOFT 0x1210 +#define AL_DEFAULT_RESAMPLER_SOFT 0x1211 +#define AL_SOURCE_RESAMPLER_SOFT 0x1212 +#define AL_RESAMPLER_NAME_SOFT 0x1213 +typedef const ALchar* (AL_APIENTRY*LPALGETSTRINGISOFT)(ALenum pname, ALsizei index); +#ifdef AL_ALEXT_PROTOTYPES +AL_API const ALchar* AL_APIENTRY alGetStringiSOFT(ALenum pname, ALsizei index); +#endif +#endif + #ifdef __cplusplus } #endif diff --git a/templates/android_project/jni/include/AL/efx-presets.h b/templates/android_project/jni/include/AL/efx-presets.h new file mode 100644 index 000000000..8539fd517 --- /dev/null +++ b/templates/android_project/jni/include/AL/efx-presets.h @@ -0,0 +1,402 @@ +/* Reverb presets for EFX */ + +#ifndef EFX_PRESETS_H +#define EFX_PRESETS_H + +#ifndef EFXEAXREVERBPROPERTIES_DEFINED +#define EFXEAXREVERBPROPERTIES_DEFINED +typedef struct { + float flDensity; + float flDiffusion; + float flGain; + float flGainHF; + float flGainLF; + float flDecayTime; + float flDecayHFRatio; + float flDecayLFRatio; + float flReflectionsGain; + float flReflectionsDelay; + float flReflectionsPan[3]; + float flLateReverbGain; + float flLateReverbDelay; + float flLateReverbPan[3]; + float flEchoTime; + float flEchoDepth; + float flModulationTime; + float flModulationDepth; + float flAirAbsorptionGainHF; + float flHFReference; + float flLFReference; + float flRoomRolloffFactor; + int iDecayHFLimit; +} EFXEAXREVERBPROPERTIES, *LPEFXEAXREVERBPROPERTIES; +#endif + +/* Default Presets */ + +#define EFX_REVERB_PRESET_GENERIC \ + { 1.0000f, 1.0000f, 0.3162f, 0.8913f, 1.0000f, 1.4900f, 0.8300f, 1.0000f, 0.0500f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_PADDEDCELL \ + { 0.1715f, 1.0000f, 0.3162f, 0.0010f, 1.0000f, 0.1700f, 0.1000f, 1.0000f, 0.2500f, 0.0010f, { 0.0000f, 0.0000f, 0.0000f }, 1.2691f, 0.0020f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_ROOM \ + { 0.4287f, 1.0000f, 0.3162f, 0.5929f, 1.0000f, 0.4000f, 0.8300f, 1.0000f, 0.1503f, 0.0020f, { 0.0000f, 0.0000f, 0.0000f }, 1.0629f, 0.0030f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_BATHROOM \ + { 0.1715f, 1.0000f, 0.3162f, 0.2512f, 1.0000f, 1.4900f, 0.5400f, 1.0000f, 0.6531f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 3.2734f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_LIVINGROOM \ + { 0.9766f, 1.0000f, 0.3162f, 0.0010f, 1.0000f, 0.5000f, 0.1000f, 1.0000f, 0.2051f, 0.0030f, { 0.0000f, 0.0000f, 0.0000f }, 0.2805f, 0.0040f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_STONEROOM \ + { 1.0000f, 1.0000f, 0.3162f, 0.7079f, 1.0000f, 2.3100f, 0.6400f, 1.0000f, 0.4411f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.1003f, 0.0170f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_AUDITORIUM \ + { 1.0000f, 1.0000f, 0.3162f, 0.5781f, 1.0000f, 4.3200f, 0.5900f, 1.0000f, 0.4032f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.7170f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_CONCERTHALL \ + { 1.0000f, 1.0000f, 0.3162f, 0.5623f, 1.0000f, 3.9200f, 0.7000f, 1.0000f, 0.2427f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.9977f, 0.0290f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_CAVE \ + { 1.0000f, 1.0000f, 0.3162f, 1.0000f, 1.0000f, 2.9100f, 1.3000f, 1.0000f, 0.5000f, 0.0150f, { 0.0000f, 0.0000f, 0.0000f }, 0.7063f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } + +#define EFX_REVERB_PRESET_ARENA \ + { 1.0000f, 1.0000f, 0.3162f, 0.4477f, 1.0000f, 7.2400f, 0.3300f, 1.0000f, 0.2612f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 1.0186f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_HANGAR \ + { 1.0000f, 1.0000f, 0.3162f, 0.3162f, 1.0000f, 10.0500f, 0.2300f, 1.0000f, 0.5000f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 1.2560f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_CARPETEDHALLWAY \ + { 0.4287f, 1.0000f, 0.3162f, 0.0100f, 1.0000f, 0.3000f, 0.1000f, 1.0000f, 0.1215f, 0.0020f, { 0.0000f, 0.0000f, 0.0000f }, 0.1531f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_HALLWAY \ + { 0.3645f, 1.0000f, 0.3162f, 0.7079f, 1.0000f, 1.4900f, 0.5900f, 1.0000f, 0.2458f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.6615f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_STONECORRIDOR \ + { 1.0000f, 1.0000f, 0.3162f, 0.7612f, 1.0000f, 2.7000f, 0.7900f, 1.0000f, 0.2472f, 0.0130f, { 0.0000f, 0.0000f, 0.0000f }, 1.5758f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_ALLEY \ + { 1.0000f, 0.3000f, 0.3162f, 0.7328f, 1.0000f, 1.4900f, 0.8600f, 1.0000f, 0.2500f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 0.9954f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.1250f, 0.9500f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_FOREST \ + { 1.0000f, 0.3000f, 0.3162f, 0.0224f, 1.0000f, 1.4900f, 0.5400f, 1.0000f, 0.0525f, 0.1620f, { 0.0000f, 0.0000f, 0.0000f }, 0.7682f, 0.0880f, { 0.0000f, 0.0000f, 0.0000f }, 0.1250f, 1.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_CITY \ + { 1.0000f, 0.5000f, 0.3162f, 0.3981f, 1.0000f, 1.4900f, 0.6700f, 1.0000f, 0.0730f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 0.1427f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_MOUNTAINS \ + { 1.0000f, 0.2700f, 0.3162f, 0.0562f, 1.0000f, 1.4900f, 0.2100f, 1.0000f, 0.0407f, 0.3000f, { 0.0000f, 0.0000f, 0.0000f }, 0.1919f, 0.1000f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } + +#define EFX_REVERB_PRESET_QUARRY \ + { 1.0000f, 1.0000f, 0.3162f, 0.3162f, 1.0000f, 1.4900f, 0.8300f, 1.0000f, 0.0000f, 0.0610f, { 0.0000f, 0.0000f, 0.0000f }, 1.7783f, 0.0250f, { 0.0000f, 0.0000f, 0.0000f }, 0.1250f, 0.7000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_PLAIN \ + { 1.0000f, 0.2100f, 0.3162f, 0.1000f, 1.0000f, 1.4900f, 0.5000f, 1.0000f, 0.0585f, 0.1790f, { 0.0000f, 0.0000f, 0.0000f }, 0.1089f, 0.1000f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_PARKINGLOT \ + { 1.0000f, 1.0000f, 0.3162f, 1.0000f, 1.0000f, 1.6500f, 1.5000f, 1.0000f, 0.2082f, 0.0080f, { 0.0000f, 0.0000f, 0.0000f }, 0.2652f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } + +#define EFX_REVERB_PRESET_SEWERPIPE \ + { 0.3071f, 0.8000f, 0.3162f, 0.3162f, 1.0000f, 2.8100f, 0.1400f, 1.0000f, 1.6387f, 0.0140f, { 0.0000f, 0.0000f, 0.0000f }, 3.2471f, 0.0210f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_UNDERWATER \ + { 0.3645f, 1.0000f, 0.3162f, 0.0100f, 1.0000f, 1.4900f, 0.1000f, 1.0000f, 0.5963f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 7.0795f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 1.1800f, 0.3480f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_DRUGGED \ + { 0.4287f, 0.5000f, 0.3162f, 1.0000f, 1.0000f, 8.3900f, 1.3900f, 1.0000f, 0.8760f, 0.0020f, { 0.0000f, 0.0000f, 0.0000f }, 3.1081f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 1.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } + +#define EFX_REVERB_PRESET_DIZZY \ + { 0.3645f, 0.6000f, 0.3162f, 0.6310f, 1.0000f, 17.2300f, 0.5600f, 1.0000f, 0.1392f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.4937f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.8100f, 0.3100f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } + +#define EFX_REVERB_PRESET_PSYCHOTIC \ + { 0.0625f, 0.5000f, 0.3162f, 0.8404f, 1.0000f, 7.5600f, 0.9100f, 1.0000f, 0.4864f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 2.4378f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 4.0000f, 1.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } + +/* Castle Presets */ + +#define EFX_REVERB_PRESET_CASTLE_SMALLROOM \ + { 1.0000f, 0.8900f, 0.3162f, 0.3981f, 0.1000f, 1.2200f, 0.8300f, 0.3100f, 0.8913f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 1.9953f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.1380f, 0.0800f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_CASTLE_SHORTPASSAGE \ + { 1.0000f, 0.8900f, 0.3162f, 0.3162f, 0.1000f, 2.3200f, 0.8300f, 0.3100f, 0.8913f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0230f, { 0.0000f, 0.0000f, 0.0000f }, 0.1380f, 0.0800f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_CASTLE_MEDIUMROOM \ + { 1.0000f, 0.9300f, 0.3162f, 0.2818f, 0.1000f, 2.0400f, 0.8300f, 0.4600f, 0.6310f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 1.5849f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.1550f, 0.0300f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_CASTLE_LARGEROOM \ + { 1.0000f, 0.8200f, 0.3162f, 0.2818f, 0.1259f, 2.5300f, 0.8300f, 0.5000f, 0.4467f, 0.0340f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0160f, { 0.0000f, 0.0000f, 0.0000f }, 0.1850f, 0.0700f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_CASTLE_LONGPASSAGE \ + { 1.0000f, 0.8900f, 0.3162f, 0.3981f, 0.1000f, 3.4200f, 0.8300f, 0.3100f, 0.8913f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0230f, { 0.0000f, 0.0000f, 0.0000f }, 0.1380f, 0.0800f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_CASTLE_HALL \ + { 1.0000f, 0.8100f, 0.3162f, 0.2818f, 0.1778f, 3.1400f, 0.7900f, 0.6200f, 0.1778f, 0.0560f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0240f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_CASTLE_CUPBOARD \ + { 1.0000f, 0.8900f, 0.3162f, 0.2818f, 0.1000f, 0.6700f, 0.8700f, 0.3100f, 1.4125f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 3.5481f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 0.1380f, 0.0800f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_CASTLE_COURTYARD \ + { 1.0000f, 0.4200f, 0.3162f, 0.4467f, 0.1995f, 2.1300f, 0.6100f, 0.2300f, 0.2239f, 0.1600f, { 0.0000f, 0.0000f, 0.0000f }, 0.7079f, 0.0360f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.3700f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } + +#define EFX_REVERB_PRESET_CASTLE_ALCOVE \ + { 1.0000f, 0.8900f, 0.3162f, 0.5012f, 0.1000f, 1.6400f, 0.8700f, 0.3100f, 1.0000f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0340f, { 0.0000f, 0.0000f, 0.0000f }, 0.1380f, 0.0800f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 } + +/* Factory Presets */ + +#define EFX_REVERB_PRESET_FACTORY_SMALLROOM \ + { 0.3645f, 0.8200f, 0.3162f, 0.7943f, 0.5012f, 1.7200f, 0.6500f, 1.3100f, 0.7079f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.7783f, 0.0240f, { 0.0000f, 0.0000f, 0.0000f }, 0.1190f, 0.0700f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_FACTORY_SHORTPASSAGE \ + { 0.3645f, 0.6400f, 0.2512f, 0.7943f, 0.5012f, 2.5300f, 0.6500f, 1.3100f, 1.0000f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0380f, { 0.0000f, 0.0000f, 0.0000f }, 0.1350f, 0.2300f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_FACTORY_MEDIUMROOM \ + { 0.4287f, 0.8200f, 0.2512f, 0.7943f, 0.5012f, 2.7600f, 0.6500f, 1.3100f, 0.2818f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0230f, { 0.0000f, 0.0000f, 0.0000f }, 0.1740f, 0.0700f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_FACTORY_LARGEROOM \ + { 0.4287f, 0.7500f, 0.2512f, 0.7079f, 0.6310f, 4.2400f, 0.5100f, 1.3100f, 0.1778f, 0.0390f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0230f, { 0.0000f, 0.0000f, 0.0000f }, 0.2310f, 0.0700f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_FACTORY_LONGPASSAGE \ + { 0.3645f, 0.6400f, 0.2512f, 0.7943f, 0.5012f, 4.0600f, 0.6500f, 1.3100f, 1.0000f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0370f, { 0.0000f, 0.0000f, 0.0000f }, 0.1350f, 0.2300f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_FACTORY_HALL \ + { 0.4287f, 0.7500f, 0.3162f, 0.7079f, 0.6310f, 7.4300f, 0.5100f, 1.3100f, 0.0631f, 0.0730f, { 0.0000f, 0.0000f, 0.0000f }, 0.8913f, 0.0270f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0700f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_FACTORY_CUPBOARD \ + { 0.3071f, 0.6300f, 0.2512f, 0.7943f, 0.5012f, 0.4900f, 0.6500f, 1.3100f, 1.2589f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.9953f, 0.0320f, { 0.0000f, 0.0000f, 0.0000f }, 0.1070f, 0.0700f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_FACTORY_COURTYARD \ + { 0.3071f, 0.5700f, 0.3162f, 0.3162f, 0.6310f, 2.3200f, 0.2900f, 0.5600f, 0.2239f, 0.1400f, { 0.0000f, 0.0000f, 0.0000f }, 0.3981f, 0.0390f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.2900f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_FACTORY_ALCOVE \ + { 0.3645f, 0.5900f, 0.2512f, 0.7943f, 0.5012f, 3.1400f, 0.6500f, 1.3100f, 1.4125f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.0000f, 0.0380f, { 0.0000f, 0.0000f, 0.0000f }, 0.1140f, 0.1000f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 } + +/* Ice Palace Presets */ + +#define EFX_REVERB_PRESET_ICEPALACE_SMALLROOM \ + { 1.0000f, 0.8400f, 0.3162f, 0.5623f, 0.2818f, 1.5100f, 1.5300f, 0.2700f, 0.8913f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.1640f, 0.1400f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_ICEPALACE_SHORTPASSAGE \ + { 1.0000f, 0.7500f, 0.3162f, 0.5623f, 0.2818f, 1.7900f, 1.4600f, 0.2800f, 0.5012f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0190f, { 0.0000f, 0.0000f, 0.0000f }, 0.1770f, 0.0900f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_ICEPALACE_MEDIUMROOM \ + { 1.0000f, 0.8700f, 0.3162f, 0.5623f, 0.4467f, 2.2200f, 1.5300f, 0.3200f, 0.3981f, 0.0390f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0270f, { 0.0000f, 0.0000f, 0.0000f }, 0.1860f, 0.1200f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_ICEPALACE_LARGEROOM \ + { 1.0000f, 0.8100f, 0.3162f, 0.5623f, 0.4467f, 3.1400f, 1.5300f, 0.3200f, 0.2512f, 0.0390f, { 0.0000f, 0.0000f, 0.0000f }, 1.0000f, 0.0270f, { 0.0000f, 0.0000f, 0.0000f }, 0.2140f, 0.1100f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_ICEPALACE_LONGPASSAGE \ + { 1.0000f, 0.7700f, 0.3162f, 0.5623f, 0.3981f, 3.0100f, 1.4600f, 0.2800f, 0.7943f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0250f, { 0.0000f, 0.0000f, 0.0000f }, 0.1860f, 0.0400f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_ICEPALACE_HALL \ + { 1.0000f, 0.7600f, 0.3162f, 0.4467f, 0.5623f, 5.4900f, 1.5300f, 0.3800f, 0.1122f, 0.0540f, { 0.0000f, 0.0000f, 0.0000f }, 0.6310f, 0.0520f, { 0.0000f, 0.0000f, 0.0000f }, 0.2260f, 0.1100f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_ICEPALACE_CUPBOARD \ + { 1.0000f, 0.8300f, 0.3162f, 0.5012f, 0.2239f, 0.7600f, 1.5300f, 0.2600f, 1.1220f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.9953f, 0.0160f, { 0.0000f, 0.0000f, 0.0000f }, 0.1430f, 0.0800f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_ICEPALACE_COURTYARD \ + { 1.0000f, 0.5900f, 0.3162f, 0.2818f, 0.3162f, 2.0400f, 1.2000f, 0.3800f, 0.3162f, 0.1730f, { 0.0000f, 0.0000f, 0.0000f }, 0.3162f, 0.0430f, { 0.0000f, 0.0000f, 0.0000f }, 0.2350f, 0.4800f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_ICEPALACE_ALCOVE \ + { 1.0000f, 0.8400f, 0.3162f, 0.5623f, 0.2818f, 2.7600f, 1.4600f, 0.2800f, 1.1220f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 0.8913f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.1610f, 0.0900f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 } + +/* Space Station Presets */ + +#define EFX_REVERB_PRESET_SPACESTATION_SMALLROOM \ + { 0.2109f, 0.7000f, 0.3162f, 0.7079f, 0.8913f, 1.7200f, 0.8200f, 0.5500f, 0.7943f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0130f, { 0.0000f, 0.0000f, 0.0000f }, 0.1880f, 0.2600f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_SPACESTATION_SHORTPASSAGE \ + { 0.2109f, 0.8700f, 0.3162f, 0.6310f, 0.8913f, 3.5700f, 0.5000f, 0.5500f, 1.0000f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0160f, { 0.0000f, 0.0000f, 0.0000f }, 0.1720f, 0.2000f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_SPACESTATION_MEDIUMROOM \ + { 0.2109f, 0.7500f, 0.3162f, 0.6310f, 0.8913f, 3.0100f, 0.5000f, 0.5500f, 0.3981f, 0.0340f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0350f, { 0.0000f, 0.0000f, 0.0000f }, 0.2090f, 0.3100f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_SPACESTATION_LARGEROOM \ + { 0.3645f, 0.8100f, 0.3162f, 0.6310f, 0.8913f, 3.8900f, 0.3800f, 0.6100f, 0.3162f, 0.0560f, { 0.0000f, 0.0000f, 0.0000f }, 0.8913f, 0.0350f, { 0.0000f, 0.0000f, 0.0000f }, 0.2330f, 0.2800f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_SPACESTATION_LONGPASSAGE \ + { 0.4287f, 0.8200f, 0.3162f, 0.6310f, 0.8913f, 4.6200f, 0.6200f, 0.5500f, 1.0000f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0310f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.2300f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_SPACESTATION_HALL \ + { 0.4287f, 0.8700f, 0.3162f, 0.6310f, 0.8913f, 7.1100f, 0.3800f, 0.6100f, 0.1778f, 0.1000f, { 0.0000f, 0.0000f, 0.0000f }, 0.6310f, 0.0470f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.2500f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_SPACESTATION_CUPBOARD \ + { 0.1715f, 0.5600f, 0.3162f, 0.7079f, 0.8913f, 0.7900f, 0.8100f, 0.5500f, 1.4125f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.7783f, 0.0180f, { 0.0000f, 0.0000f, 0.0000f }, 0.1810f, 0.3100f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_SPACESTATION_ALCOVE \ + { 0.2109f, 0.7800f, 0.3162f, 0.7079f, 0.8913f, 1.1600f, 0.8100f, 0.5500f, 1.4125f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.0000f, 0.0180f, { 0.0000f, 0.0000f, 0.0000f }, 0.1920f, 0.2100f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 } + +/* Wooden Galleon Presets */ + +#define EFX_REVERB_PRESET_WOODEN_SMALLROOM \ + { 1.0000f, 1.0000f, 0.3162f, 0.1122f, 0.3162f, 0.7900f, 0.3200f, 0.8700f, 1.0000f, 0.0320f, { 0.0000f, 0.0000f, 0.0000f }, 0.8913f, 0.0290f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_WOODEN_SHORTPASSAGE \ + { 1.0000f, 1.0000f, 0.3162f, 0.1259f, 0.3162f, 1.7500f, 0.5000f, 0.8700f, 0.8913f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 0.6310f, 0.0240f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_WOODEN_MEDIUMROOM \ + { 1.0000f, 1.0000f, 0.3162f, 0.1000f, 0.2818f, 1.4700f, 0.4200f, 0.8200f, 0.8913f, 0.0490f, { 0.0000f, 0.0000f, 0.0000f }, 0.8913f, 0.0290f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_WOODEN_LARGEROOM \ + { 1.0000f, 1.0000f, 0.3162f, 0.0891f, 0.2818f, 2.6500f, 0.3300f, 0.8200f, 0.8913f, 0.0660f, { 0.0000f, 0.0000f, 0.0000f }, 0.7943f, 0.0490f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_WOODEN_LONGPASSAGE \ + { 1.0000f, 1.0000f, 0.3162f, 0.1000f, 0.3162f, 1.9900f, 0.4000f, 0.7900f, 1.0000f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.4467f, 0.0360f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_WOODEN_HALL \ + { 1.0000f, 1.0000f, 0.3162f, 0.0794f, 0.2818f, 3.4500f, 0.3000f, 0.8200f, 0.8913f, 0.0880f, { 0.0000f, 0.0000f, 0.0000f }, 0.7943f, 0.0630f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_WOODEN_CUPBOARD \ + { 1.0000f, 1.0000f, 0.3162f, 0.1413f, 0.3162f, 0.5600f, 0.4600f, 0.9100f, 1.1220f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0280f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_WOODEN_COURTYARD \ + { 1.0000f, 0.6500f, 0.3162f, 0.0794f, 0.3162f, 1.7900f, 0.3500f, 0.7900f, 0.5623f, 0.1230f, { 0.0000f, 0.0000f, 0.0000f }, 0.1000f, 0.0320f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_WOODEN_ALCOVE \ + { 1.0000f, 1.0000f, 0.3162f, 0.1259f, 0.3162f, 1.2200f, 0.6200f, 0.9100f, 1.1220f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 0.7079f, 0.0240f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 } + +/* Sports Presets */ + +#define EFX_REVERB_PRESET_SPORT_EMPTYSTADIUM \ + { 1.0000f, 1.0000f, 0.3162f, 0.4467f, 0.7943f, 6.2600f, 0.5100f, 1.1000f, 0.0631f, 0.1830f, { 0.0000f, 0.0000f, 0.0000f }, 0.3981f, 0.0380f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_SPORT_SQUASHCOURT \ + { 1.0000f, 0.7500f, 0.3162f, 0.3162f, 0.7943f, 2.2200f, 0.9100f, 1.1600f, 0.4467f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 0.7943f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.1260f, 0.1900f, 0.2500f, 0.0000f, 0.9943f, 7176.8999f, 211.2000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_SPORT_SMALLSWIMMINGPOOL \ + { 1.0000f, 0.7000f, 0.3162f, 0.7943f, 0.8913f, 2.7600f, 1.2500f, 1.1400f, 0.6310f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.7943f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.1790f, 0.1500f, 0.8950f, 0.1900f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } + +#define EFX_REVERB_PRESET_SPORT_LARGESWIMMINGPOOL \ + { 1.0000f, 0.8200f, 0.3162f, 0.7943f, 1.0000f, 5.4900f, 1.3100f, 1.1400f, 0.4467f, 0.0390f, { 0.0000f, 0.0000f, 0.0000f }, 0.5012f, 0.0490f, { 0.0000f, 0.0000f, 0.0000f }, 0.2220f, 0.5500f, 1.1590f, 0.2100f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } + +#define EFX_REVERB_PRESET_SPORT_GYMNASIUM \ + { 1.0000f, 0.8100f, 0.3162f, 0.4467f, 0.8913f, 3.1400f, 1.0600f, 1.3500f, 0.3981f, 0.0290f, { 0.0000f, 0.0000f, 0.0000f }, 0.5623f, 0.0450f, { 0.0000f, 0.0000f, 0.0000f }, 0.1460f, 0.1400f, 0.2500f, 0.0000f, 0.9943f, 7176.8999f, 211.2000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_SPORT_FULLSTADIUM \ + { 1.0000f, 1.0000f, 0.3162f, 0.0708f, 0.7943f, 5.2500f, 0.1700f, 0.8000f, 0.1000f, 0.1880f, { 0.0000f, 0.0000f, 0.0000f }, 0.2818f, 0.0380f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_SPORT_STADIUMTANNOY \ + { 1.0000f, 0.7800f, 0.3162f, 0.5623f, 0.5012f, 2.5300f, 0.8800f, 0.6800f, 0.2818f, 0.2300f, { 0.0000f, 0.0000f, 0.0000f }, 0.5012f, 0.0630f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.2000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } + +/* Prefab Presets */ + +#define EFX_REVERB_PRESET_PREFAB_WORKSHOP \ + { 0.4287f, 1.0000f, 0.3162f, 0.1413f, 0.3981f, 0.7600f, 1.0000f, 1.0000f, 1.0000f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } + +#define EFX_REVERB_PRESET_PREFAB_SCHOOLROOM \ + { 0.4022f, 0.6900f, 0.3162f, 0.6310f, 0.5012f, 0.9800f, 0.4500f, 0.1800f, 1.4125f, 0.0170f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0150f, { 0.0000f, 0.0000f, 0.0000f }, 0.0950f, 0.1400f, 0.2500f, 0.0000f, 0.9943f, 7176.8999f, 211.2000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_PREFAB_PRACTISEROOM \ + { 0.4022f, 0.8700f, 0.3162f, 0.3981f, 0.5012f, 1.1200f, 0.5600f, 0.1800f, 1.2589f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.0950f, 0.1400f, 0.2500f, 0.0000f, 0.9943f, 7176.8999f, 211.2000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_PREFAB_OUTHOUSE \ + { 1.0000f, 0.8200f, 0.3162f, 0.1122f, 0.1585f, 1.3800f, 0.3800f, 0.3500f, 0.8913f, 0.0240f, { 0.0000f, 0.0000f, -0.0000f }, 0.6310f, 0.0440f, { 0.0000f, 0.0000f, 0.0000f }, 0.1210f, 0.1700f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 107.5000f, 0.0000f, 0x0 } + +#define EFX_REVERB_PRESET_PREFAB_CARAVAN \ + { 1.0000f, 1.0000f, 0.3162f, 0.0891f, 0.1259f, 0.4300f, 1.5000f, 1.0000f, 1.0000f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.9953f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } + +/* Dome and Pipe Presets */ + +#define EFX_REVERB_PRESET_DOME_TOMB \ + { 1.0000f, 0.7900f, 0.3162f, 0.3548f, 0.2239f, 4.1800f, 0.2100f, 0.1000f, 0.3868f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 1.6788f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 0.1770f, 0.1900f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 20.0000f, 0.0000f, 0x0 } + +#define EFX_REVERB_PRESET_PIPE_SMALL \ + { 1.0000f, 1.0000f, 0.3162f, 0.3548f, 0.2239f, 5.0400f, 0.1000f, 0.1000f, 0.5012f, 0.0320f, { 0.0000f, 0.0000f, 0.0000f }, 2.5119f, 0.0150f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 20.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_DOME_SAINTPAULS \ + { 1.0000f, 0.8700f, 0.3162f, 0.3548f, 0.2239f, 10.4800f, 0.1900f, 0.1000f, 0.1778f, 0.0900f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0420f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.1200f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 20.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_PIPE_LONGTHIN \ + { 0.2560f, 0.9100f, 0.3162f, 0.4467f, 0.2818f, 9.2100f, 0.1800f, 0.1000f, 0.7079f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 0.7079f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 20.0000f, 0.0000f, 0x0 } + +#define EFX_REVERB_PRESET_PIPE_LARGE \ + { 1.0000f, 1.0000f, 0.3162f, 0.3548f, 0.2239f, 8.4500f, 0.1000f, 0.1000f, 0.3981f, 0.0460f, { 0.0000f, 0.0000f, 0.0000f }, 1.5849f, 0.0320f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 20.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_PIPE_RESONANT \ + { 0.1373f, 0.9100f, 0.3162f, 0.4467f, 0.2818f, 6.8100f, 0.1800f, 0.1000f, 0.7079f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.0000f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 20.0000f, 0.0000f, 0x0 } + +/* Outdoors Presets */ + +#define EFX_REVERB_PRESET_OUTDOORS_BACKYARD \ + { 1.0000f, 0.4500f, 0.3162f, 0.2512f, 0.5012f, 1.1200f, 0.3400f, 0.4600f, 0.4467f, 0.0690f, { 0.0000f, 0.0000f, -0.0000f }, 0.7079f, 0.0230f, { 0.0000f, 0.0000f, 0.0000f }, 0.2180f, 0.3400f, 0.2500f, 0.0000f, 0.9943f, 4399.1001f, 242.9000f, 0.0000f, 0x0 } + +#define EFX_REVERB_PRESET_OUTDOORS_ROLLINGPLAINS \ + { 1.0000f, 0.0000f, 0.3162f, 0.0112f, 0.6310f, 2.1300f, 0.2100f, 0.4600f, 0.1778f, 0.3000f, { 0.0000f, 0.0000f, -0.0000f }, 0.4467f, 0.0190f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.2500f, 0.0000f, 0.9943f, 4399.1001f, 242.9000f, 0.0000f, 0x0 } + +#define EFX_REVERB_PRESET_OUTDOORS_DEEPCANYON \ + { 1.0000f, 0.7400f, 0.3162f, 0.1778f, 0.6310f, 3.8900f, 0.2100f, 0.4600f, 0.3162f, 0.2230f, { 0.0000f, 0.0000f, -0.0000f }, 0.3548f, 0.0190f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.2500f, 0.0000f, 0.9943f, 4399.1001f, 242.9000f, 0.0000f, 0x0 } + +#define EFX_REVERB_PRESET_OUTDOORS_CREEK \ + { 1.0000f, 0.3500f, 0.3162f, 0.1778f, 0.5012f, 2.1300f, 0.2100f, 0.4600f, 0.3981f, 0.1150f, { 0.0000f, 0.0000f, -0.0000f }, 0.1995f, 0.0310f, { 0.0000f, 0.0000f, 0.0000f }, 0.2180f, 0.3400f, 0.2500f, 0.0000f, 0.9943f, 4399.1001f, 242.9000f, 0.0000f, 0x0 } + +#define EFX_REVERB_PRESET_OUTDOORS_VALLEY \ + { 1.0000f, 0.2800f, 0.3162f, 0.0282f, 0.1585f, 2.8800f, 0.2600f, 0.3500f, 0.1413f, 0.2630f, { 0.0000f, 0.0000f, -0.0000f }, 0.3981f, 0.1000f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.3400f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 107.5000f, 0.0000f, 0x0 } + +/* Mood Presets */ + +#define EFX_REVERB_PRESET_MOOD_HEAVEN \ + { 1.0000f, 0.9400f, 0.3162f, 0.7943f, 0.4467f, 5.0400f, 1.1200f, 0.5600f, 0.2427f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0290f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0800f, 2.7420f, 0.0500f, 0.9977f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_MOOD_HELL \ + { 1.0000f, 0.5700f, 0.3162f, 0.3548f, 0.4467f, 3.5700f, 0.4900f, 2.0000f, 0.0000f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.1100f, 0.0400f, 2.1090f, 0.5200f, 0.9943f, 5000.0000f, 139.5000f, 0.0000f, 0x0 } + +#define EFX_REVERB_PRESET_MOOD_MEMORY \ + { 1.0000f, 0.8500f, 0.3162f, 0.6310f, 0.3548f, 4.0600f, 0.8200f, 0.5600f, 0.0398f, 0.0000f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0000f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.4740f, 0.4500f, 0.9886f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } + +/* Driving Presets */ + +#define EFX_REVERB_PRESET_DRIVING_COMMENTATOR \ + { 1.0000f, 0.0000f, 0.3162f, 0.5623f, 0.5012f, 2.4200f, 0.8800f, 0.6800f, 0.1995f, 0.0930f, { 0.0000f, 0.0000f, 0.0000f }, 0.2512f, 0.0170f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.2500f, 0.0000f, 0.9886f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_DRIVING_PITGARAGE \ + { 0.4287f, 0.5900f, 0.3162f, 0.7079f, 0.5623f, 1.7200f, 0.9300f, 0.8700f, 0.5623f, 0.0000f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0160f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.1100f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } + +#define EFX_REVERB_PRESET_DRIVING_INCAR_RACER \ + { 0.0832f, 0.8000f, 0.3162f, 1.0000f, 0.7943f, 0.1700f, 2.0000f, 0.4100f, 1.7783f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 0.7079f, 0.0150f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 10268.2002f, 251.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_DRIVING_INCAR_SPORTS \ + { 0.0832f, 0.8000f, 0.3162f, 0.6310f, 1.0000f, 0.1700f, 0.7500f, 0.4100f, 1.0000f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 0.5623f, 0.0000f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 10268.2002f, 251.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_DRIVING_INCAR_LUXURY \ + { 0.2560f, 1.0000f, 0.3162f, 0.1000f, 0.5012f, 0.1300f, 0.4100f, 0.4600f, 0.7943f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.5849f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 10268.2002f, 251.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_DRIVING_FULLGRANDSTAND \ + { 1.0000f, 1.0000f, 0.3162f, 0.2818f, 0.6310f, 3.0100f, 1.3700f, 1.2800f, 0.3548f, 0.0900f, { 0.0000f, 0.0000f, 0.0000f }, 0.1778f, 0.0490f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 10420.2002f, 250.0000f, 0.0000f, 0x0 } + +#define EFX_REVERB_PRESET_DRIVING_EMPTYGRANDSTAND \ + { 1.0000f, 1.0000f, 0.3162f, 1.0000f, 0.7943f, 4.6200f, 1.7500f, 1.4000f, 0.2082f, 0.0900f, { 0.0000f, 0.0000f, 0.0000f }, 0.2512f, 0.0490f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 10420.2002f, 250.0000f, 0.0000f, 0x0 } + +#define EFX_REVERB_PRESET_DRIVING_TUNNEL \ + { 1.0000f, 0.8100f, 0.3162f, 0.3981f, 0.8913f, 3.4200f, 0.9400f, 1.3100f, 0.7079f, 0.0510f, { 0.0000f, 0.0000f, 0.0000f }, 0.7079f, 0.0470f, { 0.0000f, 0.0000f, 0.0000f }, 0.2140f, 0.0500f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 155.3000f, 0.0000f, 0x1 } + +/* City Presets */ + +#define EFX_REVERB_PRESET_CITY_STREETS \ + { 1.0000f, 0.7800f, 0.3162f, 0.7079f, 0.8913f, 1.7900f, 1.1200f, 0.9100f, 0.2818f, 0.0460f, { 0.0000f, 0.0000f, 0.0000f }, 0.1995f, 0.0280f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.2000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_CITY_SUBWAY \ + { 1.0000f, 0.7400f, 0.3162f, 0.7079f, 0.8913f, 3.0100f, 1.2300f, 0.9100f, 0.7079f, 0.0460f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0280f, { 0.0000f, 0.0000f, 0.0000f }, 0.1250f, 0.2100f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_CITY_MUSEUM \ + { 1.0000f, 0.8200f, 0.3162f, 0.1778f, 0.1778f, 3.2800f, 1.4000f, 0.5700f, 0.2512f, 0.0390f, { 0.0000f, 0.0000f, -0.0000f }, 0.8913f, 0.0340f, { 0.0000f, 0.0000f, 0.0000f }, 0.1300f, 0.1700f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 107.5000f, 0.0000f, 0x0 } + +#define EFX_REVERB_PRESET_CITY_LIBRARY \ + { 1.0000f, 0.8200f, 0.3162f, 0.2818f, 0.0891f, 2.7600f, 0.8900f, 0.4100f, 0.3548f, 0.0290f, { 0.0000f, 0.0000f, -0.0000f }, 0.8913f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.1300f, 0.1700f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 107.5000f, 0.0000f, 0x0 } + +#define EFX_REVERB_PRESET_CITY_UNDERPASS \ + { 1.0000f, 0.8200f, 0.3162f, 0.4467f, 0.8913f, 3.5700f, 1.1200f, 0.9100f, 0.3981f, 0.0590f, { 0.0000f, 0.0000f, 0.0000f }, 0.8913f, 0.0370f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.1400f, 0.2500f, 0.0000f, 0.9920f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_CITY_ABANDONED \ + { 1.0000f, 0.6900f, 0.3162f, 0.7943f, 0.8913f, 3.2800f, 1.1700f, 0.9100f, 0.4467f, 0.0440f, { 0.0000f, 0.0000f, 0.0000f }, 0.2818f, 0.0240f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.2000f, 0.2500f, 0.0000f, 0.9966f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } + +/* Misc. Presets */ + +#define EFX_REVERB_PRESET_DUSTYROOM \ + { 0.3645f, 0.5600f, 0.3162f, 0.7943f, 0.7079f, 1.7900f, 0.3800f, 0.2100f, 0.5012f, 0.0020f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0060f, { 0.0000f, 0.0000f, 0.0000f }, 0.2020f, 0.0500f, 0.2500f, 0.0000f, 0.9886f, 13046.0000f, 163.3000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_CHAPEL \ + { 1.0000f, 0.8400f, 0.3162f, 0.5623f, 1.0000f, 4.6200f, 0.6400f, 1.2300f, 0.4467f, 0.0320f, { 0.0000f, 0.0000f, 0.0000f }, 0.7943f, 0.0490f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.1100f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 } + +#define EFX_REVERB_PRESET_SMALLWATERROOM \ + { 1.0000f, 0.7000f, 0.3162f, 0.4477f, 1.0000f, 1.5100f, 1.2500f, 1.1400f, 0.8913f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.1790f, 0.1500f, 0.8950f, 0.1900f, 0.9920f, 5000.0000f, 250.0000f, 0.0000f, 0x0 } + +#endif /* EFX_PRESETS_H */ diff --git a/templates/android_project/jni/include/AL/efx.h b/templates/android_project/jni/include/AL/efx.h index 978f64a6f..57766983f 100644 --- a/templates/android_project/jni/include/AL/efx.h +++ b/templates/android_project/jni/include/AL/efx.h @@ -2,6 +2,9 @@ #define AL_EFX_H +#include "alc.h" +#include "al.h" + #ifdef __cplusplus extern "C" { #endif diff --git a/templates/android_project/jni/include/raylib.h b/templates/android_project/jni/include/raylib.h index d28b07a35..429c26ca0 100644 --- a/templates/android_project/jni/include/raylib.h +++ b/templates/android_project/jni/include/raylib.h @@ -1,51 +1,51 @@ /********************************************************************************************** * -* raylib 1.6.0 (www.raylib.com) +* raylib v1.7.0 * -* A simple and easy-to-use library to learn videogames programming +* A simple and easy-to-use library to learn videogames programming (www.raylib.com) * -* Features: -* Library written in plain C code (C99) -* Uses PascalCase/camelCase notation -* Hardware accelerated with OpenGL (1.1, 2.1, 3.3 or ES 2.0) -* Unique OpenGL abstraction layer (usable as standalone module): [rlgl] -* Powerful fonts module with SpriteFonts support (XNA bitmap fonts, AngelCode fonts, TTF) -* Multiple textures support, including compressed formats and mipmaps generation -* Basic 3d support for Shapes, Models, Billboards, Heightmaps and Cubicmaps -* Materials (diffuse, normal, specular) and Lighting (point, directional, spot) support -* Powerful math module for Vector, Matrix and Quaternion operations: [raymath] -* Audio loading and playing with streaming support and mixing channels [audio] -* VR stereo rendering support with configurable HMD device parameters -* Multiple platforms support: Windows, Linux, Mac, Android, Raspberry Pi, HTML5 and Oculus Rift CV1 -* Custom color palette for fancy visuals on raywhite background -* Minimal external dependencies (GLFW3, OpenGL, OpenAL) -* Complete binding for LUA [rlua] +* FEATURES: +* - Library written in plain C code (C99) +* - Multiple platforms supported: Windows, Linux, Mac, Android, Raspberry Pi, HTML5. +* - Hardware accelerated with OpenGL (1.1, 2.1, 3.3 or ES 2.0) +* - Unique OpenGL abstraction layer (usable as standalone module): [rlgl] +* - Powerful fonts module with SpriteFonts support (XNA bitmap fonts, AngelCode fonts, TTF) +* - Multiple textures support, including compressed formats and mipmaps generation +* - Basic 3d support for Shapes, Models, Billboards, Heightmaps and Cubicmaps +* - Powerful math module for Vector2, Vector3, Matrix and Quaternion operations: [raymath] +* - Audio loading and playing with streaming support and mixing channels: [audio] +* - VR stereo rendering support with configurable HMD device parameters +* - Minimal external dependencies (GLFW3, OpenGL, OpenAL) +* - Complete bindings for Lua, Go and Pascal * -* External libs: -* GLFW3 (www.glfw.org) for window/context management and input [core] -* GLAD for OpenGL extensions loading (3.3 Core profile, only PLATFORM_DESKTOP) [rlgl] -* stb_image (Sean Barret) for images loading (JPEG, PNG, BMP, TGA) [textures] -* stb_image_write (Sean Barret) for image writting (PNG) [utils] -* stb_truetype (Sean Barret) for ttf fonts loading [text] -* stb_vorbis (Sean Barret) for ogg audio loading [audio] -* jar_xm (Joshua Reisenauer) for XM audio module loading [audio] -* jar_mod (Joshua Reisenauer) for MOD audio module loading [audio] -* dr_flac (David Reid) for FLAC audio file loading [audio] -* OpenAL Soft for audio device/context management [audio] -* tinfl for data decompression (DEFLATE algorithm) [utils] +* NOTES: +* 32bit Colors - Any defined Color is always RGBA (4 byte) +* One custom font is loaded by default when InitWindow() [core] +* If using OpenGL 3.3 or ES2, one default shader is loaded automatically (internally defined) [rlgl] +* If using OpenGL 3.3 or ES2, several vertex buffers (VAO/VBO) are created to manage lines-triangles-quads * -* Some design decisions: -* 32bit Colors - All defined color are always RGBA (struct Color is 4 byte) -* One custom default font could be loaded automatically when InitWindow() [core] -* If using OpenGL 3.3 or ES2, several vertex buffers (VAO/VBO) are created to manage lines-triangles-quads -* If using OpenGL 3.3 or ES2, two default shaders could be loaded automatically (internally defined) +* DEPENDENCIES: +* GLFW3 (www.glfw.org) for window/context management and input [core] +* GLAD for OpenGL extensions loading (3.3 Core profile, only PLATFORM_DESKTOP) [rlgl] +* OpenAL Soft for audio device/context management [audio] * -* -- LICENSE -- +* OPTIONAL DEPENDENCIES: +* stb_image (Sean Barret) for images loading (JPEG, PNG, BMP, TGA) [textures] +* stb_image_write (Sean Barret) for image writting (PNG) [utils] +* stb_truetype (Sean Barret) for ttf fonts loading [text] +* stb_vorbis (Sean Barret) for ogg audio loading [audio] +* jar_xm (Joshua Reisenauer) for XM audio module loading [audio] +* jar_mod (Joshua Reisenauer) for MOD audio module loading [audio] +* dr_flac (David Reid) for FLAC audio file loading [audio] +* tinfl for data decompression (DEFLATE algorithm) [rres] +* +* +* LICENSE: zlib/libpng * * raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified, * BSD-like license that allows static linking with closed source software: * -* Copyright (c) 2013-2016 Ramon Santamaria (@raysan5) +* Copyright (c) 2013-2017 Ramon Santamaria (@raysan5) * * This software is provided "as-is", without any express or implied warranty. In no event * will the authors be held liable for any damages arising from the use of this software. @@ -72,7 +72,6 @@ //#define PLATFORM_ANDROID // Android device //#define PLATFORM_RPI // Raspberry Pi //#define PLATFORM_WEB // HTML5 (emscripten, asm.js) -//#define RLGL_OCULUS_SUPPORT // Oculus Rift CV1 (complementary to PLATFORM_DESKTOP) // Security check in case no PLATFORM_* defined #if !defined(PLATFORM_DESKTOP) && !defined(PLATFORM_ANDROID) && !defined(PLATFORM_RPI) && !defined(PLATFORM_WEB) @@ -98,13 +97,13 @@ #define RAD2DEG (180.0f/PI) // raylib Config Flags -#define FLAG_FULLSCREEN_MODE 1 -#define FLAG_RESIZABLE_WINDOW 2 -#define FLAG_SHOW_LOGO 4 -#define FLAG_SHOW_MOUSE_CURSOR 8 -#define FLAG_CENTERED_MODE 16 -#define FLAG_MSAA_4X_HINT 32 -#define FLAG_VSYNC_HINT 64 +#define FLAG_SHOW_LOGO 1 // Set to show raylib logo at startup +#define FLAG_FULLSCREEN_MODE 2 // Set to run program in fullscreen +#define FLAG_WINDOW_RESIZABLE 4 // Set to allow resizable window +#define FLAG_WINDOW_DECORATED 8 // Set to show window decoration (frame and buttons) +#define FLAG_WINDOW_TRANSPARENT 16 // Set to allow transparent window +#define FLAG_MSAA_4X_HINT 32 // Set to try enabling MSAA 4X +#define FLAG_VSYNC_HINT 64 // Set to try enabling V-Sync on GPU // Keyboard Function Keys #define KEY_SPACE 32 @@ -293,17 +292,13 @@ #define RAYWHITE CLITERAL{ 245, 245, 245, 255 } // My own White (raylib logo) //---------------------------------------------------------------------------------- -// Types and Structures Definition +// Structures Definition //---------------------------------------------------------------------------------- #ifndef __cplusplus // Boolean type - #ifndef __APPLE__ - #if !defined(_STDBOOL_H) - typedef enum { false, true } bool; - #define _STDBOOL_H - #endif - #else - #include + #if !defined(_STDBOOL_H) + typedef enum { false, true } bool; + #define _STDBOOL_H #endif #endif @@ -351,35 +346,41 @@ typedef struct Image { int width; // Image base width int height; // Image base height int mipmaps; // Mipmap levels, 1 by default - int format; // Data format (TextureFormat) + int format; // Data format (TextureFormat type) } Image; -// Texture2D type, bpp always RGBA (32bit) +// Texture2D type // NOTE: Data stored in GPU memory typedef struct Texture2D { unsigned int id; // OpenGL texture id int width; // Texture base width int height; // Texture base height int mipmaps; // Mipmap levels, 1 by default - int format; // Data format (TextureFormat) + int format; // Data format (TextureFormat type) } Texture2D; // RenderTexture2D type, for texture rendering typedef struct RenderTexture2D { - unsigned int id; // Render texture (fbo) id + unsigned int id; // OpenGL Framebuffer Object (FBO) id Texture2D texture; // Color buffer attachment texture Texture2D depth; // Depth buffer attachment texture } RenderTexture2D; +// SpriteFont character info +typedef struct CharInfo { + int value; // Character value (Unicode) + Rectangle rec; // Character rectangle in sprite font + int offsetX; // Character offset X when drawing + int offsetY; // Character offset Y when drawing + int advanceX; // Character advance position X +} CharInfo; + // SpriteFont type, includes texture and charSet array data typedef struct SpriteFont { Texture2D texture; // Font texture - int size; // Base size (default chars height) - int numChars; // Number of characters - int *charValues; // Characters values array - Rectangle *charRecs; // Characters rectangles within the texture - Vector2 *charOffsets; // Characters offsets (on drawing) - int *charAdvanceX; // Characters x advance (on drawing) + int baseSize; // Base size (default chars height) + int charsCount; // Number of characters + CharInfo *chars; // Characters info data } SpriteFont; // Camera type, defines a camera position/orientation in 3d space @@ -466,31 +467,20 @@ typedef struct Model { Material material; // Shader and textures data } Model; -// Light type -typedef struct LightData { - unsigned int id; // Light unique id - bool enabled; // Light enabled - int type; // Light type: LIGHT_POINT, LIGHT_DIRECTIONAL, LIGHT_SPOT - - Vector3 position; // Light position - Vector3 target; // Light direction: LIGHT_DIRECTIONAL and LIGHT_SPOT (cone direction target) - float radius; // Light attenuation radius light intensity reduced with distance (world distance) - - Color diffuse; // Light diffuse color - float intensity; // Light intensity level - - float coneAngle; // Light cone max angle: LIGHT_SPOT -} LightData, *Light; - -// Light types -typedef enum { LIGHT_POINT, LIGHT_DIRECTIONAL, LIGHT_SPOT } LightType; - // Ray type (useful for raycast) typedef struct Ray { Vector3 position; // Ray position (origin) Vector3 direction; // Ray direction } Ray; +// Information returned from a raycast +typedef struct RayHitInfo { + bool hit; // Did the ray hit something? + float distance; // Distance to nearest hit + Vector3 position; // Position of nearest hit + Vector3 normal; // Surface normal of hit +} RayHitInfo; + // Wave type, defines audio wave data typedef struct Wave { unsigned int sampleCount; // Number of samples @@ -523,6 +513,34 @@ typedef struct AudioStream { unsigned int buffers[2]; // OpenAL audio buffers (double buffering) } AudioStream; +// rRES data returned when reading a resource, +// it contains all required data for user (24 byte) +typedef struct RRESData { + unsigned int type; // Resource type (4 byte) + + unsigned int param1; // Resouce parameter 1 (4 byte) + unsigned int param2; // Resouce parameter 2 (4 byte) + unsigned int param3; // Resouce parameter 3 (4 byte) + unsigned int param4; // Resouce parameter 4 (4 byte) + + void *data; // Resource data pointer (4 byte) +} RRESData; + +// RRES type (pointer to RRESData array) +typedef struct RRESData *RRES; + +//---------------------------------------------------------------------------------- +// Enumerators Definition +//---------------------------------------------------------------------------------- +// Trace log type +typedef enum { + INFO = 0, + WARNING, + ERROR, + DEBUG, + OTHER +} LogType; + // Texture formats // NOTE: Support depends on OpenGL version and platform typedef enum { @@ -533,6 +551,7 @@ typedef enum { UNCOMPRESSED_R5G5B5A1, // 16 bpp (1 bit alpha) UNCOMPRESSED_R4G4B4A4, // 16 bpp (4 bit alpha) UNCOMPRESSED_R8G8B8A8, // 32 bpp + UNCOMPRESSED_R32G32B32, // 32 bit per channel (float) - HDR COMPRESSED_DXT1_RGB, // 4 bpp (no alpha) COMPRESSED_DXT1_RGBA, // 4 bpp (1 bit alpha) COMPRESSED_DXT3_RGBA, // 8 bpp @@ -549,7 +568,7 @@ typedef enum { // Texture parameters: filter mode // NOTE 1: Filtering considers mipmaps if available in the texture // NOTE 2: Filter is accordingly set for minification and magnification -typedef enum { +typedef enum { FILTER_POINT = 0, // No filter, just pixel aproximation FILTER_BILINEAR, // Linear filtering FILTER_TRILINEAR, // Trilinear filtering (linear with mipmaps) @@ -559,10 +578,18 @@ typedef enum { } TextureFilterMode; // Texture parameters: wrap mode -typedef enum { WRAP_REPEAT = 0, WRAP_CLAMP, WRAP_MIRROR } TextureWrapMode; +typedef enum { + WRAP_REPEAT = 0, + WRAP_CLAMP, + WRAP_MIRROR +} TextureWrapMode; // Color blending modes (pre-defined) -typedef enum { BLEND_ALPHA = 0, BLEND_ADDITIVE, BLEND_MULTIPLIED } BlendMode; +typedef enum { + BLEND_ALPHA = 0, + BLEND_ADDITIVE, + BLEND_MULTIPLIED +} BlendMode; // Gestures type // NOTE: It could be used as flags to enable only some gestures @@ -581,12 +608,12 @@ typedef enum { } Gestures; // Camera system modes -typedef enum { - CAMERA_CUSTOM = 0, - CAMERA_FREE, - CAMERA_ORBITAL, - CAMERA_FIRST_PERSON, - CAMERA_THIRD_PERSON +typedef enum { + CAMERA_CUSTOM = 0, + CAMERA_FREE, + CAMERA_ORBITAL, + CAMERA_FIRST_PERSON, + CAMERA_THIRD_PERSON } CameraMode; // Head Mounted Display devices @@ -602,6 +629,18 @@ typedef enum { HMD_FOVE_VR, } VrDevice; +// RRESData type +typedef enum { + RRES_TYPE_RAW = 0, + RRES_TYPE_IMAGE, + RRES_TYPE_WAVE, + RRES_TYPE_VERTEX, + RRES_TYPE_TEXT, + RRES_TYPE_FONT_IMAGE, + RRES_TYPE_FONT_CHARDATA, // CharInfo data array + RRES_TYPE_DIRECTORY +} RRESDataType; + #ifdef __cplusplus extern "C" { // Prevents name mangling of functions #endif @@ -615,44 +654,48 @@ extern "C" { // Prevents name mangling of functions // Window and Graphics Device Functions (Module: core) //------------------------------------------------------------------------------------ #if defined(PLATFORM_ANDROID) -RLAPI void InitWindow(int width, int height, void *state); // Init Android Activity and OpenGL Graphics (struct android_app) +RLAPI void InitWindow(int width, int height, void *state); // Initialize Android activity #elif defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI) || defined(PLATFORM_WEB) -RLAPI void InitWindow(int width, int height, const char *title); // Initialize Window and OpenGL Graphics +RLAPI void InitWindow(int width, int height, const char *title); // Initialize window and OpenGL context #endif -RLAPI void CloseWindow(void); // Close Window and Terminate Context -RLAPI bool WindowShouldClose(void); // Detect if KEY_ESCAPE pressed or Close icon pressed -RLAPI bool IsWindowMinimized(void); // Detect if window has been minimized (or lost focus) -RLAPI void ToggleFullscreen(void); // Fullscreen toggle (only PLATFORM_DESKTOP) +RLAPI void CloseWindow(void); // Close window and unload OpenGL context +RLAPI bool WindowShouldClose(void); // Check if KEY_ESCAPE pressed or Close icon pressed +RLAPI bool IsWindowMinimized(void); // Check if window has been minimized (or lost focus) +RLAPI void ToggleFullscreen(void); // Toggle fullscreen mode (only PLATFORM_DESKTOP) +RLAPI void SetWindowIcon(Image image); // Set icon for window (only PLATFORM_DESKTOP) +RLAPI void SetWindowPosition(int x, int y); // Set window position on screen (only PLATFORM_DESKTOP) +RLAPI void SetWindowMonitor(int monitor); // Set monitor for the current window (fullscreen mode) +RLAPI void SetWindowMinSize(int width, int height); // Set window minimum dimensions (for FLAG_WINDOW_RESIZABLE) RLAPI int GetScreenWidth(void); // Get current screen width RLAPI int GetScreenHeight(void); // Get current screen height #if !defined(PLATFORM_ANDROID) RLAPI void ShowCursor(void); // Shows cursor RLAPI void HideCursor(void); // Hides cursor -RLAPI bool IsCursorHidden(void); // Returns true if cursor is not visible -RLAPI void EnableCursor(void); // Enables cursor -RLAPI void DisableCursor(void); // Disables cursor +RLAPI bool IsCursorHidden(void); // Check if cursor is not visible +RLAPI void EnableCursor(void); // Enables cursor (unlock cursor) +RLAPI void DisableCursor(void); // Disables cursor (lock cursor) #endif -RLAPI void ClearBackground(Color color); // Sets Background Color -RLAPI void BeginDrawing(void); // Setup drawing canvas to start drawing -RLAPI void EndDrawing(void); // End canvas drawing and Swap Buffers (Double Buffering) +RLAPI void ClearBackground(Color color); // Set background color (framebuffer clear color) +RLAPI void BeginDrawing(void); // Setup canvas (framebuffer) to start drawing +RLAPI void EndDrawing(void); // End canvas drawing and swap buffers (double buffering) -RLAPI void Begin2dMode(Camera2D camera); // Initialize 2D mode with custom camera -RLAPI void End2dMode(void); // Ends 2D mode custom camera usage -RLAPI void Begin3dMode(Camera camera); // Initializes 3D mode for drawing (Camera setup) +RLAPI void Begin2dMode(Camera2D camera); // Initialize 2D mode with custom camera (2D) +RLAPI void End2dMode(void); // Ends 2D mode with custom camera +RLAPI void Begin3dMode(Camera camera); // Initializes 3D mode with custom camera (3D) RLAPI void End3dMode(void); // Ends 3D mode and returns to default 2D orthographic mode RLAPI void BeginTextureMode(RenderTexture2D target); // Initializes render texture for drawing RLAPI void EndTextureMode(void); // Ends drawing to render texture RLAPI Ray GetMouseRay(Vector2 mousePosition, Camera camera); // Returns a ray trace from mouse position -RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Returns the screen space position from a 3d world space position +RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Returns the screen space position for a 3d world space position RLAPI Matrix GetCameraMatrix(Camera camera); // Returns camera transform matrix (view matrix) RLAPI void SetTargetFPS(int fps); // Set target FPS (maximum) -RLAPI float GetFPS(void); // Returns current FPS -RLAPI float GetFrameTime(void); // Returns time in seconds for one frame +RLAPI int GetFPS(void); // Returns current FPS +RLAPI float GetFrameTime(void); // Returns time in seconds for last frame drawn RLAPI Color GetColor(int hexValue); // Returns a Color struct from hexadecimal value RLAPI int GetHexValue(Color color); // Returns hexadecimal value for a Color @@ -663,15 +706,21 @@ RLAPI float *MatrixToFloat(Matrix mat); // Converts Ma RLAPI int GetRandomValue(int min, int max); // Returns a random value between min and max (both included) RLAPI Color Fade(Color color, float alpha); // Color fade-in or fade-out, alpha goes from 0.0f to 1.0f -RLAPI void SetConfigFlags(char flags); // Setup some window configuration flags -RLAPI void ShowLogo(void); // Activates raylib logo at startup (can be done with flags) +RLAPI void ShowLogo(void); // Activate raylib logo at startup (can be done with flags) +RLAPI void SetConfigFlags(char flags); // Setup window configuration flags (view FLAGS) +RLAPI void TraceLog(int logType, const char *text, ...); // Show trace log messages (INFO, WARNING, ERROR, DEBUG) +RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (saved a .png) -RLAPI bool IsFileDropped(void); // Check if a file have been dropped into window -RLAPI char **GetDroppedFiles(int *count); // Retrieve dropped files into window +RLAPI bool IsFileExtension(const char *fileName, const char *ext);// Check file extension +RLAPI const char *GetDirectoryPath(const char *fileName); // Get directory for a given fileName (with path) +RLAPI const char *GetWorkingDirectory(void); // Get current working directory +RLAPI bool ChangeDirectory(const char *dir); // Change working directory, returns true if success +RLAPI bool IsFileDropped(void); // Check if a file has been dropped into window +RLAPI char **GetDroppedFiles(int *count); // Get dropped files names RLAPI void ClearDroppedFiles(void); // Clear dropped files paths buffer -RLAPI void StorageSaveValue(int position, int value); // Storage save integer value (to defined position) -RLAPI int StorageLoadValue(int position); // Storage load integer value (from defined position) +RLAPI void StorageSaveValue(int position, int value); // Save integer value to storage file (to defined position) +RLAPI int StorageLoadValue(int position); // Load integer value from storage file (from defined position) //------------------------------------------------------------------------------------ // Input Handling Functions (Module: core) @@ -741,12 +790,15 @@ RLAPI void DrawPixel(int posX, int posY, Color color); RLAPI void DrawPixelV(Vector2 position, Color color); // Draw a pixel (Vector version) RLAPI void DrawLine(int startPosX, int startPosY, int endPosX, int endPosY, Color color); // Draw a line RLAPI void DrawLineV(Vector2 startPos, Vector2 endPos, Color color); // Draw a line (Vector version) +RLAPI void DrawLineEx(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line defining thickness +RLAPI void DrawLineBezier(Vector2 startPos, Vector2 endPos, float thick, Color color); // Draw a line using cubic-bezier curves in-out RLAPI void DrawCircle(int centerX, int centerY, float radius, Color color); // Draw a color-filled circle RLAPI void DrawCircleGradient(int centerX, int centerY, float radius, Color color1, Color color2); // Draw a gradient-filled circle RLAPI void DrawCircleV(Vector2 center, float radius, Color color); // Draw a color-filled circle (Vector version) RLAPI void DrawCircleLines(int centerX, int centerY, float radius, Color color); // Draw circle outline RLAPI void DrawRectangle(int posX, int posY, int width, int height, Color color); // Draw a color-filled rectangle RLAPI void DrawRectangleRec(Rectangle rec, Color color); // Draw a color-filled rectangle +RLAPI void DrawRectanglePro(Rectangle rec, Vector2 origin, float rotation, Color color); // Draw a color-filled rectangle with pro parameters RLAPI void DrawRectangleGradient(int posX, int posY, int width, int height, Color color1, Color color2); // Draw a gradient-filled rectangle RLAPI void DrawRectangleV(Vector2 position, Vector2 size, Color color); // Draw a color-filled rectangle (Vector version) RLAPI void DrawRectangleLines(int posX, int posY, int width, int height, Color color); // Draw rectangle outline @@ -767,21 +819,19 @@ RLAPI bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Ve //------------------------------------------------------------------------------------ // Texture Loading and Drawing Functions (Module: textures) //------------------------------------------------------------------------------------ -RLAPI Image LoadImage(const char *fileName); // Load an image into CPU memory (RAM) -RLAPI Image LoadImageEx(Color *pixels, int width, int height); // Load image data from Color array data (RGBA - 32bit) -RLAPI Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize); // Load image data from RAW file -RLAPI Image LoadImageFromRES(const char *rresName, int resId); // Load an image from rRES file (raylib Resource) -RLAPI Texture2D LoadTexture(const char *fileName); // Load an image as texture into GPU memory -RLAPI Texture2D LoadTextureEx(void *data, int width, int height, int textureFormat); // Load a texture from raw data into GPU memory -RLAPI Texture2D LoadTextureFromRES(const char *rresName, int resId); // Load an image as texture from rRES file (raylib Resource) -RLAPI Texture2D LoadTextureFromImage(Image image); // Load a texture from image data -RLAPI RenderTexture2D LoadRenderTexture(int width, int height); // Load a texture to be used for rendering +RLAPI Image LoadImage(const char *fileName); // Load image from file into CPU memory (RAM) +RLAPI Image LoadImageEx(Color *pixels, int width, int height); // Load image from Color array data (RGBA - 32bit) +RLAPI Image LoadImagePro(void *data, int width, int height, int format); // Load image from raw data with parameters +RLAPI Image LoadImageRaw(const char *fileName, int width, int height, int format, int headerSize); // Load image from RAW file data +RLAPI Texture2D LoadTexture(const char *fileName); // Load texture from file into GPU memory (VRAM) +RLAPI Texture2D LoadTextureFromImage(Image image); // Load texture from image data +RLAPI RenderTexture2D LoadRenderTexture(int width, int height); // Load texture for rendering (framebuffer) RLAPI void UnloadImage(Image image); // Unload image from CPU memory (RAM) -RLAPI void UnloadTexture(Texture2D texture); // Unload texture from GPU memory -RLAPI void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory +RLAPI void UnloadTexture(Texture2D texture); // Unload texture from GPU memory (VRAM) +RLAPI void UnloadRenderTexture(RenderTexture2D target); // Unload render texture from GPU memory (VRAM) RLAPI Color *GetImageData(Image image); // Get pixel data from image as a Color struct array RLAPI Image GetTextureData(Texture2D texture); // Get pixel data from GPU texture and return an Image -RLAPI void UpdateTexture(Texture2D texture, void *pixels); // Update GPU texture with new data +RLAPI void UpdateTexture(Texture2D texture, const void *pixels); // Update GPU texture with new data RLAPI void ImageToPOT(Image *image, Color fillColor); // Convert image to POT (power-of-two) RLAPI void ImageFormat(Image *image, int newFormat); // Convert image data to desired format RLAPI void ImageAlphaMask(Image *image, Image alphaMask); // Apply alpha mask to image @@ -794,7 +844,8 @@ RLAPI Image ImageText(const char *text, int fontSize, Color color); RLAPI Image ImageTextEx(SpriteFont font, const char *text, float fontSize, int spacing, Color tint); // Create an image from text (custom sprite font) RLAPI void ImageDraw(Image *dst, Image src, Rectangle srcRec, Rectangle dstRec); // Draw a source image within a destination image RLAPI void ImageDrawText(Image *dst, Vector2 position, const char *text, int fontSize, Color color); // Draw text (default font) within an image (destination) -RLAPI void ImageDrawTextEx(Image *dst, Vector2 position, SpriteFont font, const char *text, float fontSize, int spacing, Color color); // Draw text (custom sprite font) within an image (destination) +RLAPI void ImageDrawTextEx(Image *dst, Vector2 position, SpriteFont font, const char *text, + float fontSize, int spacing, Color color); // Draw text (custom sprite font) within an image (destination) RLAPI void ImageFlipVertical(Image *image); // Flip image vertically RLAPI void ImageFlipHorizontal(Image *image); // Flip image horizontally RLAPI void ImageColorTint(Image *image, Color color); // Modify image color: tint @@ -817,9 +868,9 @@ RLAPI void DrawTexturePro(Texture2D texture, Rectangle sourceRec, Rectangle dest // Font Loading and Text Drawing Functions (Module: text) //------------------------------------------------------------------------------------ RLAPI SpriteFont GetDefaultFont(void); // Get the default SpriteFont -RLAPI SpriteFont LoadSpriteFont(const char *fileName); // Load a SpriteFont image into GPU memory -RLAPI SpriteFont LoadSpriteFontTTF(const char *fileName, int fontSize, int numChars, int *fontChars); // Load a SpriteFont from TTF font with parameters -RLAPI void UnloadSpriteFont(SpriteFont spriteFont); // Unload SpriteFont from GPU memory +RLAPI SpriteFont LoadSpriteFont(const char *fileName); // Load SpriteFont from file into GPU memory (VRAM) +RLAPI SpriteFont LoadSpriteFontEx(const char *fileName, int fontSize, int charsCount, int *fontChars); // Load SpriteFont from file with extended parameters +RLAPI void UnloadSpriteFont(SpriteFont spriteFont); // Unload SpriteFont from GPU memory (VRAM) RLAPI void DrawText(const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font) RLAPI void DrawTextEx(SpriteFont spriteFont, const char* text, Vector2 position, // Draw text using SpriteFont and additional parameters @@ -827,7 +878,7 @@ RLAPI void DrawTextEx(SpriteFont spriteFont, const char* text, Vector2 position, RLAPI int MeasureText(const char *text, int fontSize); // Measure string width for default font RLAPI Vector2 MeasureTextEx(SpriteFont spriteFont, const char *text, float fontSize, int spacing); // Measure string size for SpriteFont -RLAPI void DrawFPS(int posX, int posY); // Shows current FPS on top-left corner +RLAPI void DrawFPS(int posX, int posY); // Shows current FPS RLAPI const char *FormatText(const char *text, ...); // Formatting of text with variables to 'embed' RLAPI const char *SubText(const char *text, int position, int length); // Get a piece of a text string @@ -849,50 +900,57 @@ RLAPI void DrawPlane(Vector3 centerPos, Vector2 size, Color color); RLAPI void DrawRay(Ray ray, Color color); // Draw a ray line RLAPI void DrawGrid(int slices, float spacing); // Draw a grid (centered at (0, 0, 0)) RLAPI void DrawGizmo(Vector3 position); // Draw simple gizmo -RLAPI void DrawLight(Light light); // Draw light in 3D world //DrawTorus(), DrawTeapot() could be useful? //------------------------------------------------------------------------------------ // Model 3d Loading and Drawing Functions (Module: models) //------------------------------------------------------------------------------------ -RLAPI Model LoadModel(const char *fileName); // Load a 3d model (.OBJ) -RLAPI Model LoadModelEx(Mesh data, bool dynamic); // Load a 3d model (from mesh data) -RLAPI Model LoadModelFromRES(const char *rresName, int resId); // Load a 3d model from rRES file (raylib Resource) -RLAPI Model LoadHeightmap(Image heightmap, Vector3 size); // Load a heightmap image as a 3d model -RLAPI Model LoadCubicmap(Image cubicmap); // Load a map image as a 3d model (cubes based) -RLAPI void UnloadModel(Model model); // Unload 3d model from memory +RLAPI Mesh LoadMesh(const char *fileName); // Load mesh from file +RLAPI Mesh LoadMeshEx(int numVertex, float *vData, float *vtData, float *vnData, Color *cData); // Load mesh from vertex data +RLAPI Model LoadModel(const char *fileName); // Load model from file +RLAPI Model LoadModelFromMesh(Mesh data, bool dynamic); // Load model from mesh data +RLAPI Model LoadHeightmap(Image heightmap, Vector3 size); // Load heightmap model from image data +RLAPI Model LoadCubicmap(Image cubicmap); // Load cubes-based map model from image data +RLAPI void UnloadMesh(Mesh *mesh); // Unload mesh from memory (RAM and/or VRAM) +RLAPI void UnloadModel(Model model); // Unload model from memory (RAM and/or VRAM) -RLAPI Material LoadMaterial(const char *fileName); // Load material data (.MTL) -RLAPI Material LoadDefaultMaterial(void); // Load default material (uses default models shader) -RLAPI Material LoadStandardMaterial(void); // Load standard material (uses material attributes and lighting shader) -RLAPI void UnloadMaterial(Material material); // Unload material textures from VRAM +RLAPI Material LoadMaterial(const char *fileName); // Load material from file +RLAPI Material LoadDefaultMaterial(void); // Load default material (uses default models shader) +RLAPI void UnloadMaterial(Material material); // Unload material from GPU memory (VRAM) -RLAPI void DrawModel(Model model, Vector3 position, float scale, Color tint); // Draw a model (with texture if set) -RLAPI void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model with extended parameters +RLAPI void DrawModel(Model model, Vector3 position, float scale, Color tint); // Draw a model (with texture if set) +RLAPI void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, + float rotationAngle, Vector3 scale, Color tint); // Draw a model with extended parameters RLAPI void DrawModelWires(Model model, Vector3 position, float scale, Color tint); // Draw a model wires (with texture if set) -RLAPI void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint); // Draw a model wires (with texture if set) with extended parameters -RLAPI void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires) +RLAPI void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, + float rotationAngle, Vector3 scale, Color tint); // Draw a model wires (with texture if set) with extended parameters +RLAPI void DrawBoundingBox(BoundingBox box, Color color); // Draw bounding box (wires) -RLAPI void DrawBillboard(Camera camera, Texture2D texture, Vector3 center, float size, Color tint); // Draw a billboard texture -RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle sourceRec, Vector3 center, float size, Color tint); // Draw a billboard texture defined by sourceRec +RLAPI void DrawBillboard(Camera camera, Texture2D texture, Vector3 center, float size, Color tint); // Draw a billboard texture +RLAPI void DrawBillboardRec(Camera camera, Texture2D texture, Rectangle sourceRec, + Vector3 center, float size, Color tint); // Draw a billboard texture defined by sourceRec -RLAPI BoundingBox CalculateBoundingBox(Mesh mesh); // Calculate mesh bounding box limits -RLAPI bool CheckCollisionSpheres(Vector3 centerA, float radiusA, Vector3 centerB, float radiusB); // Detect collision between two spheres -RLAPI bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2); // Detect collision between two bounding boxes -RLAPI bool CheckCollisionBoxSphere(BoundingBox box, Vector3 centerSphere, float radiusSphere); // Detect collision between box and sphere -RLAPI bool CheckCollisionRaySphere(Ray ray, Vector3 spherePosition, float sphereRadius); // Detect collision between ray and sphere -RLAPI bool CheckCollisionRaySphereEx(Ray ray, Vector3 spherePosition, float sphereRadius, Vector3 *collisionPoint); // Detect collision between ray and sphere with extended parameters and collision point detection -RLAPI bool CheckCollisionRayBox(Ray ray, BoundingBox box); // Detect collision between ray and box +RLAPI BoundingBox CalculateBoundingBox(Mesh mesh); // Calculate mesh bounding box limits +RLAPI bool CheckCollisionSpheres(Vector3 centerA, float radiusA, Vector3 centerB, float radiusB); // Detect collision between two spheres +RLAPI bool CheckCollisionBoxes(BoundingBox box1, BoundingBox box2); // Detect collision between two bounding boxes +RLAPI bool CheckCollisionBoxSphere(BoundingBox box, Vector3 centerSphere, float radiusSphere); // Detect collision between box and sphere +RLAPI bool CheckCollisionRaySphere(Ray ray, Vector3 spherePosition, float sphereRadius); // Detect collision between ray and sphere +RLAPI bool CheckCollisionRaySphereEx(Ray ray, Vector3 spherePosition, float sphereRadius, + Vector3 *collisionPoint); // Detect collision between ray and sphere, returns collision point +RLAPI bool CheckCollisionRayBox(Ray ray, BoundingBox box); // Detect collision between ray and box +RLAPI RayHitInfo GetCollisionRayMesh(Ray ray, Mesh *mesh); // Get collision info between ray and mesh +RLAPI RayHitInfo GetCollisionRayTriangle(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3); // Get collision info between ray and triangle +RLAPI RayHitInfo GetCollisionRayGround(Ray ray, float groundHeight); // Get collision info between ray and ground plane (Y-normal plane) //------------------------------------------------------------------------------------ // Shaders System Functions (Module: rlgl) // NOTE: This functions are useless when using OpenGL 1.1 //------------------------------------------------------------------------------------ -RLAPI Shader LoadShader(char *vsFileName, char *fsFileName); // Load a custom shader and bind default locations -RLAPI void UnloadShader(Shader shader); // Unload a custom shader from memory +RLAPI char *LoadText(const char *fileName); // Load chars array from text file +RLAPI Shader LoadShader(char *vsFileName, char *fsFileName); // Load shader from files and bind default locations +RLAPI void UnloadShader(Shader shader); // Unload shader from GPU memory (VRAM) RLAPI Shader GetDefaultShader(void); // Get default shader -RLAPI Shader GetStandardShader(void); // Get standard shader RLAPI Texture2D GetDefaultTexture(void); // Get default texture RLAPI int GetShaderLocation(Shader shader, const char *uniformName); // Get shader uniform location @@ -908,19 +966,17 @@ RLAPI void EndShaderMode(void); // End RLAPI void BeginBlendMode(int mode); // Begin blending mode (alpha, additive, multiplied) RLAPI void EndBlendMode(void); // End blending mode (reset to default: alpha blending) -RLAPI Light CreateLight(int type, Vector3 position, Color diffuse); // Create a new light, initialize it and add to pool -RLAPI void DestroyLight(Light light); // Destroy a light and take it out of the list - //------------------------------------------------------------------------------------ // VR experience Functions (Module: rlgl) // NOTE: This functions are useless when using OpenGL 1.1 //------------------------------------------------------------------------------------ -RLAPI void InitVrDevice(int vdDevice); // Init VR device -RLAPI void CloseVrDevice(void); // Close VR device -RLAPI bool IsVrDeviceReady(void); // Detect if VR device is ready -RLAPI bool IsVrSimulator(void); // Detect if VR simulator is running -RLAPI void UpdateVrTracking(Camera *camera); // Update VR tracking (position and orientation) and camera -RLAPI void ToggleVrMode(void); // Enable/Disable VR experience (device or simulator) +RLAPI void InitVrSimulator(int vrDevice); // Init VR simulator for selected device +RLAPI void CloseVrSimulator(void); // Close VR simulator for current device +RLAPI bool IsVrSimulatorReady(void); // Detect if VR device is ready +RLAPI void UpdateVrTracking(Camera *camera); // Update VR tracking (position and orientation) and camera +RLAPI void ToggleVrMode(void); // Enable/Disable VR experience (device or simulator) +RLAPI void BeginVrDrawing(void); // Begin VR simulator stereo rendering +RLAPI void EndVrDrawing(void); // End VR simulator stereo rendering //------------------------------------------------------------------------------------ // Audio Loading and Playing Functions (Module: audio) @@ -928,13 +984,13 @@ RLAPI void ToggleVrMode(void); // Enable/Disable VR experienc RLAPI void InitAudioDevice(void); // Initialize audio device and context RLAPI void CloseAudioDevice(void); // Close the audio device and context RLAPI bool IsAudioDeviceReady(void); // Check if audio device has been initialized successfully +RLAPI void SetMasterVolume(float volume); // Set master volume (listener) -RLAPI Wave LoadWave(const char *fileName); // Load wave data from file into RAM -RLAPI Wave LoadWaveEx(float *data, int sampleCount, int sampleRate, int sampleSize, int channels); // Load wave data from float array data (32bit) -RLAPI Sound LoadSound(const char *fileName); // Load sound to memory -RLAPI Sound LoadSoundFromWave(Wave wave); // Load sound to memory from wave data -RLAPI Sound LoadSoundFromRES(const char *rresName, int resId); // Load sound to memory from rRES file (raylib Resource) -RLAPI void UpdateSound(Sound sound, void *data, int numSamples); // Update sound buffer with new data +RLAPI Wave LoadWave(const char *fileName); // Load wave data from file +RLAPI Wave LoadWaveEx(void *data, int sampleCount, int sampleRate, int sampleSize, int channels); // Load wave data from raw array data +RLAPI Sound LoadSound(const char *fileName); // Load sound from file +RLAPI Sound LoadSoundFromWave(Wave wave); // Load sound from wave data +RLAPI void UpdateSound(Sound sound, const void *data, int samplesCount);// Update sound buffer with new data RLAPI void UnloadWave(Wave wave); // Unload wave data RLAPI void UnloadSound(Sound sound); // Unload sound RLAPI void PlaySound(Sound sound); // Play a sound @@ -958,13 +1014,14 @@ RLAPI void ResumeMusicStream(Music music); // Resume RLAPI bool IsMusicPlaying(Music music); // Check if music is playing RLAPI void SetMusicVolume(Music music, float volume); // Set volume for music (1.0 is max level) RLAPI void SetMusicPitch(Music music, float pitch); // Set pitch for a music (1.0 is base level) +RLAPI void SetMusicLoopCount(Music music, float count); // Set music loop count (loop repeats) RLAPI float GetMusicTimeLength(Music music); // Get music time length (in seconds) RLAPI float GetMusicTimePlayed(Music music); // Get current music time played (in seconds) RLAPI AudioStream InitAudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels); // Init audio stream (to stream raw audio pcm data) -RLAPI void UpdateAudioStream(AudioStream stream, void *data, int numSamples); // Update audio stream buffers with data +RLAPI void UpdateAudioStream(AudioStream stream, const void *data, int samplesCount); // Update audio stream buffers with data RLAPI void CloseAudioStream(AudioStream stream); // Close audio stream and free memory RLAPI bool IsAudioBufferProcessed(AudioStream stream); // Check if any audio stream buffers requires refill RLAPI void PlayAudioStream(AudioStream stream); // Play audio stream diff --git a/templates/android_project/jni/libs/libopenal.a b/templates/android_project/jni/libs/libopenal.a deleted file mode 100644 index d15e50481..000000000 Binary files a/templates/android_project/jni/libs/libopenal.a and /dev/null differ diff --git a/templates/android_project/jni/libs/libopenal.so b/templates/android_project/jni/libs/libopenal.so new file mode 100644 index 000000000..e384d9ad6 Binary files /dev/null and b/templates/android_project/jni/libs/libopenal.so differ diff --git a/templates/android_project/jni/libs/libraylib.a b/templates/android_project/jni/libs/libraylib.a index 39975a6ba..5a9580194 100644 Binary files a/templates/android_project/jni/libs/libraylib.a and b/templates/android_project/jni/libs/libraylib.a differ