Review and recompile web examples

This commit is contained in:
raysan5 2017-04-17 16:42:01 +02:00
parent 3e082f1d62
commit 881f134f4d
194 changed files with 272938 additions and 52659 deletions

View file

@ -25,6 +25,7 @@ $(document).ready(function() {
'shapes_basic_shapes', 'shapes_basic_shapes',
'shapes_colors_palette', 'shapes_colors_palette',
'shapes_logo_raylib_anim', 'shapes_logo_raylib_anim',
'shapes_lines_bezier',
'textures_logo_raylib', 'textures_logo_raylib',
'textures_image_loading', 'textures_image_loading',
'textures_rectangle', 'textures_rectangle',
@ -35,18 +36,19 @@ $(document).ready(function() {
'textures_image_drawing', 'textures_image_drawing',
'text_sprite_fonts', 'text_sprite_fonts',
'text_bmfont_ttf', 'text_bmfont_ttf',
'text_rbmf_fonts', 'text_raylib_fonts',
'text_format_text', 'text_format_text',
'text_writing_anim', 'text_writing_anim',
'text_ttf_loading', 'text_ttf_loading',
'text_bmfont_unordered', 'text_bmfont_unordered',
'text_input_box',
'models_geometric_shapes', 'models_geometric_shapes',
'models_box_collisions', 'models_box_collisions',
'models_billboard', 'models_billboard',
'models_obj_loading', 'models_obj_loading',
'models_heightmap', 'models_heightmap',
'models_cubicmap', 'models_cubicmap',
'models_ray_picking', 'models_mesh_picking',
'shaders_model_shader', 'shaders_model_shader',
'shaders_shapes_textures', 'shaders_shapes_textures',
'shaders_custom_uniform', 'shaders_custom_uniform',
@ -56,68 +58,16 @@ $(document).ready(function() {
'audio_module_playing', 'audio_module_playing',
'audio_raw_stream']; 'audio_raw_stream'];
var exampleDesc = [
'basic window',
'input keys',
'input mouse',
'mouse wheel',
'input gamepad',
'random values',
'color select',
'drop files',
'storage values',
'gestures detection',
'3d mode',
'3d picking',
'3d camera free',
'3d camera first person',
'2d camera',
'world screen',
'vr simulator',
'logo raylib shapes',
'basic shapes',
'colors palette',
'logo raylib anim',
'logo raylib texture',
'image loading',
'texture rectangle',
'src-dest. rectangles',
'texture to image',
'raw data loading',
'image processing',
'image drawing',
'sprite fonts',
'bmfonts ttf',
'rbmf fonts',
'text formatting',
'writing animation',
'ttf loading',
'bmfont unordered',
'geometric shapes',
'box collisions',
'billboard drawing',
'obj loading',
'heightmap loading',
'cubesmap loading',
'mesh ray picking',
'model shader',
'shapes textures shader',
'custom uniform in shaders',
'postprocessing shaders',
'standard lighting',
'sound loading',
'music streaming',
'module playing',
'raw stream'];
for (var i = 0; i < exampleName.length; i++) for (var i = 0; i < exampleName.length; i++)
{ {
var filterType = exampleName[i].substring(0, exampleName[i].indexOf("_")); var filterType = exampleName[i].substring(0, exampleName[i].indexOf("_"));
var exampleBase = exampleName[i].slice(exampleName[i].indexOf('_') + 1);
var exampleDesc = exampleBase.replace('_', ' ');
$('#container').append( $('#container').append(
'<div class="mix f' + filterType + '">' + '<div class="mix f' + filterType + '">' +
'<a class="fancybox fancybox.iframe" href="examples/web/loader.html?name=' + filterType + '/' + exampleName[i] + '" title="' + exampleDesc[i] + '">' + '<a class="fancybox fancybox.iframe" href="examples/web/' + filterType + '/' + 'loader.html?name=' + exampleName[i] + '" title="' + exampleDesc + '">' +
'<img width="400" height="225" src="../examples/img/' + filterType + '/' + exampleName[i] + '.png"><div class="extext"><p>' + exampleDesc[i] + '</p></div></a>' + '<img width="400" height="225" src="../examples/web/' + filterType + '/' + exampleName[i] + '.png"><div class="extext"><p>' + exampleDesc + '</p></div></a>' +
'</div>'); '</div>');
$('#container a .extext').hide(); $('#container a .extext').hide();

View file

@ -16,7 +16,6 @@ $(document).ready(function() {
'sample_tetris', 'sample_tetris',
'sample_gold_fever', 'sample_gold_fever',
'sample_doom', 'sample_doom',
'game_raylib_features',
'game_drturtle', 'game_drturtle',
'game_just_do', 'game_just_do',
'game_skully_escape', 'game_skully_escape',
@ -42,7 +41,6 @@ $(document).ready(function() {
'tetris', 'tetris',
'gold fever', 'gold fever',
'doom', 'doom',
'raylib Features DEMO',
'Dr Turtle & Mr Gamera', 'Dr Turtle & Mr Gamera',
'JUST DO', 'JUST DO',
'Skully Escape', 'Skully Escape',
@ -83,8 +81,6 @@ $(document).ready(function() {
*/ */
} }
if (exampleName[i] == 'game_koala_seasons') linkTag = '<a target="_blank" href="http://www.koalaseasons.com" title="' + exampleDesc[i] + '">';
$('#container').append( $('#container').append(
'<div class="mix f' + filterType + '">' + linkTag + '<div class="mix f' + filterType + '">' + linkTag +
'<img width="400" height="225" src="../games/img/' + exampleName[i] + '.png"><div class="extext"><p>' + exampleDesc[i] + '</p></div></a>' + '<img width="400" height="225" src="../games/img/' + exampleName[i] + '.png"><div class="extext"><p>' + exampleDesc[i] + '</p></div></a>' +

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 403 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 252 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 232 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

View file

@ -52,7 +52,7 @@ int main()
circles[i].color = colors[GetRandomValue(0, 13)]; circles[i].color = colors[GetRandomValue(0, 13)];
} }
Music xm = LoadMusicStream("resources/audio/mini1111.xm"); Music xm = LoadMusicStream("resources/mini1111.xm");
PlayMusicStream(xm); PlayMusicStream(xm);
@ -86,7 +86,7 @@ int main()
} }
// Get timePlayed scaled to bar dimensions // Get timePlayed scaled to bar dimensions
timePlayed = (GetMusicTimePlayed(xm)/GetMusicTimeLength(xm)*(screenWidth - 40))*2; timePlayed = GetMusicTimePlayed(xm)/GetMusicTimeLength(xm)*(screenWidth - 40);
// Color circles animation // Color circles animation
for (int i = MAX_CIRCLES - 1; (i >= 0) && !pause; i--) for (int i = MAX_CIRCLES - 1; (i >= 0) && !pause; i--)
@ -112,7 +112,7 @@ int main()
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
BeginDrawing(); BeginDrawing();
ClearBackground(WHITE); ClearBackground(RAYWHITE);
for (int i = MAX_CIRCLES - 1; i >= 0; i--) for (int i = MAX_CIRCLES - 1; i >= 0; i--)
{ {

View file

@ -24,7 +24,7 @@ int main()
InitAudioDevice(); // Initialize audio device InitAudioDevice(); // Initialize audio device
Music music = LoadMusicStream("resources/audio/guitar_noodling.ogg"); Music music = LoadMusicStream("resources/guitar_noodling.ogg");
PlayMusicStream(music); PlayMusicStream(music);
@ -58,7 +58,7 @@ int main()
} }
// Get timePlayed scaled to bar dimensions (400 pixels) // Get timePlayed scaled to bar dimensions (400 pixels)
timePlayed = GetMusicTimePlayed(music)/GetMusicTimeLength(music)*100*4; timePlayed = GetMusicTimePlayed(music)/GetMusicTimeLength(music)*400;
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Draw // Draw

View file

@ -16,7 +16,8 @@
#include <stdlib.h> // Required for: malloc(), free() #include <stdlib.h> // Required for: malloc(), free()
#include <math.h> // Required for: sinf() #include <math.h> // Required for: sinf()
#define MAX_SAMPLES 20000 #define MAX_SAMPLES 22050
#define MAX_SAMPLES_PER_UPDATE 4096
int main() int main()
{ {
@ -29,21 +30,20 @@ int main()
InitAudioDevice(); // Initialize audio device InitAudioDevice(); // Initialize audio device
// Init raw audio stream (sample rate: 22050, sample size: 32bit-float, channels: 1-mono) // Init raw audio stream (sample rate: 22050, sample size: 16bit-short, channels: 1-mono)
AudioStream stream = InitAudioStream(22050, 32, 1); AudioStream stream = InitAudioStream(22050, 16, 1);
// Fill audio stream with some samples (sine wave) // Generate samples data from sine wave
float *data = (float *)malloc(sizeof(float)*MAX_SAMPLES); short *data = (short *)malloc(sizeof(short)*MAX_SAMPLES);
// TODO: Review data generation, it seems data is discontinued for loop,
// for that reason, there is a clip everytime audio stream is looped...
for (int i = 0; i < MAX_SAMPLES; i++) for (int i = 0; i < MAX_SAMPLES; i++)
{ {
data[i] = sinf(((2*PI*(float)i)/2)*DEG2RAD); data[i] = (short)(sinf(((2*PI*(float)i)/2)*DEG2RAD)*32000);
} }
// NOTE: The generated MAX_SAMPLES do not fit to close a perfect loop PlayAudioStream(stream); // Start processing stream buffer (no data loaded currently)
// for that reason, there is a clip everytime audio stream is looped
PlayAudioStream(stream);
int totalSamples = MAX_SAMPLES; int totalSamples = MAX_SAMPLES;
int samplesLeft = totalSamples; int samplesLeft = totalSamples;
@ -60,10 +60,13 @@ int main()
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Refill audio stream if required // Refill audio stream if required
// NOTE: Every update we check if stream data has been already consumed and we update
// buffer with new data from the generated samples, we upload data at a rate (MAX_SAMPLES_PER_UPDATE),
// but notice that at some point we update < MAX_SAMPLES_PER_UPDATE data...
if (IsAudioBufferProcessed(stream)) if (IsAudioBufferProcessed(stream))
{ {
int numSamples = 0; int numSamples = 0;
if (samplesLeft >= 4096) numSamples = 4096; if (samplesLeft >= MAX_SAMPLES_PER_UPDATE) numSamples = MAX_SAMPLES_PER_UPDATE;
else numSamples = samplesLeft; else numSamples = samplesLeft;
UpdateAudioStream(stream, data + (totalSamples - samplesLeft), numSamples); UpdateAudioStream(stream, data + (totalSamples - samplesLeft), numSamples);
@ -83,11 +86,11 @@ int main()
DrawText("SINE WAVE SHOULD BE PLAYING!", 240, 140, 20, LIGHTGRAY); DrawText("SINE WAVE SHOULD BE PLAYING!", 240, 140, 20, LIGHTGRAY);
// NOTE: Draw a part of the sine wave (only screen width) // NOTE: Draw a part of the sine wave (only screen width, proportional values)
for (int i = 0; i < GetScreenWidth(); i++) for (int i = 0; i < GetScreenWidth(); i++)
{ {
position.x = i; position.x = i;
position.y = 250 + 50*data[i]; position.y = 250 + 50*data[i]/32000;
DrawPixelV(position, RED); DrawPixelV(position, RED);
} }

View file

@ -24,8 +24,8 @@ int main()
InitAudioDevice(); // Initialize audio device InitAudioDevice(); // Initialize audio device
Sound fxWav = LoadSound("resources/audio/weird.wav"); // Load WAV audio file Sound fxWav = LoadSound("resources/sound.wav"); // Load WAV audio file
Sound fxOgg = LoadSound("resources/audio/tanatana.ogg"); // Load OGG audio file Sound fxOgg = LoadSound("resources/tanatana.ogg"); // Load OGG audio file
SetTargetFPS(60); SetTargetFPS(60);
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------

View file

@ -4,8 +4,8 @@
* *
* NOTE: This example requires a Gamepad connected to the system * NOTE: This example requires a Gamepad connected to the system
* raylib is configured to work with the following gamepads: * raylib is configured to work with the following gamepads:
* Xbox 360 Controller (Xbox 360, Xbox One) * - Xbox 360 Controller (Xbox 360, Xbox One)
* PLAYSTATION(R)3 Controller * - PLAYSTATION(R)3 Controller
* Check raylib.h for buttons configuration * Check raylib.h for buttons configuration
* *
* This example has been created using raylib 1.6 (www.raylib.com) * This example has been created using raylib 1.6 (www.raylib.com)

View file

@ -1,14 +1,11 @@
/******************************************************************************************* /*******************************************************************************************
* *
* raylib [core] example - Oculus Rift CV1 * raylib [core] example - VR Simulator (Oculus Rift CV1 parameters)
* *
* Compile example using: * This example has been created using raylib 1.7 (www.raylib.com)
* gcc -o $(NAME_PART).exe $(FILE_NAME) -L. -L..\src\external\OculusSDK\LibOVR -lLibOVRRT32_1 -lraylib -lglfw3 -lopengl32 -lgdi32 -std=c99
*
* This example has been created using raylib 1.5 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) * raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
* *
* Copyright (c) 2016 Ramon Santamaria (@raysan5) * Copyright (c) 2017 Ramon Santamaria (@raysan5)
* *
********************************************************************************************/ ********************************************************************************************/
@ -23,10 +20,9 @@ int main()
// NOTE: screenWidth/screenHeight should match VR device aspect ratio // NOTE: screenWidth/screenHeight should match VR device aspect ratio
InitWindow(screenWidth, screenHeight, "raylib [core] example - oculus rift"); InitWindow(screenWidth, screenHeight, "raylib [core] example - vr simulator");
// NOTE: If device is not available, it fallbacks to default device (simulator) InitVrSimulator(HMD_OCULUS_RIFT_CV1); // Init VR simulator (Oculus Rift CV1 parameters)
InitVrDevice(HMD_OCULUS_RIFT_CV1); // Init VR device (Oculus Rift CV1)
// Define the camera to look into our 3d world // Define the camera to look into our 3d world
Camera camera; Camera camera;
@ -47,8 +43,7 @@ int main()
{ {
// Update // Update
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
if (IsVrSimulator()) UpdateCamera(&camera); // Update camera (simulator mode) UpdateCamera(&camera); // Update camera (simulator mode)
else if (IsVrDeviceReady()) UpdateVrTracking(&camera); // Update camera with device tracking data
if (IsKeyPressed(KEY_SPACE)) ToggleVrMode(); // Toggle VR mode if (IsKeyPressed(KEY_SPACE)) ToggleVrMode(); // Toggle VR mode
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
@ -59,6 +54,8 @@ int main()
ClearBackground(RAYWHITE); ClearBackground(RAYWHITE);
BeginVrDrawing();
Begin3dMode(camera); Begin3dMode(camera);
DrawCube(cubePosition, 2.0f, 2.0f, 2.0f, RED); DrawCube(cubePosition, 2.0f, 2.0f, 2.0f, RED);
@ -68,6 +65,8 @@ int main()
End3dMode(); End3dMode();
EndVrDrawing();
DrawFPS(10, 10); DrawFPS(10, 10);
EndDrawing(); EndDrawing();
@ -76,7 +75,7 @@ int main()
// De-Initialization // De-Initialization
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
CloseVrDevice(); // Close VR device CloseVrSimulator(); // Close VR simulator
CloseWindow(); // Close window and OpenGL context CloseWindow(); // Close window and OpenGL context
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------

View file

@ -0,0 +1,195 @@
/*******************************************************************************************
*
* raylib [models] example - Mesh picking in 3d mode, ground plane, triangle, mesh
*
* This example has been created using raylib 1.7 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
*
* Copyright (c) 2015 Ramon Santamaria (@raysan5)
* Example contributed by Joel Davis (@joeld42)
*
********************************************************************************************/
#include "raylib.h"
#include "raymath.h"
#define FLT_MAX 3.40282347E+38F // Maximum value of a float, defined in <float.h>
int main()
{
// Initialization
//--------------------------------------------------------------------------------------
int screenWidth = 800;
int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [models] example - mesh picking");
// Define the camera to look into our 3d world
Camera camera;
camera.position = (Vector3){ 10.0f, 8.0f, 10.0f }; // Camera position
camera.target = (Vector3){ 0.0f, 2.3f, 0.0f }; // Camera looking at point
camera.up = (Vector3){ 0.0f, 1.6f, 0.0f }; // Camera up vector (rotation towards target)
camera.fovy = 45.0f; // Camera field-of-view Y
Ray ray; // Picking ray
Model tower = LoadModel("resources/tower.obj"); // Load OBJ model
Texture2D texture = LoadTexture("resources/tower.png"); // Load model texture
tower.material.texDiffuse = texture; // Set model diffuse texture
Vector3 towerPos = { 0.0f, 0.0f, 0.0f }; // Set model position
BoundingBox towerBBox = CalculateBoundingBox(tower.mesh);
bool hitMeshBBox = false;
bool hitTriangle = false;
// Test triangle
Vector3 ta = (Vector3){ -25.0, 0.5, 0.0 };
Vector3 tb = (Vector3){ -4.0, 2.5, 1.0 };
Vector3 tc = (Vector3){ -8.0, 6.5, 0.0 };
Vector3 bary = { 0.0f, 0.0f, 0.0f };
SetCameraMode(camera, CAMERA_FREE); // Set a free camera mode
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
// Update
//----------------------------------------------------------------------------------
UpdateCamera(&camera); // Update camera
// Display information about closest hit
RayHitInfo nearestHit;
char *hitObjectName = "None";
nearestHit.distance = FLT_MAX;
nearestHit.hit = false;
Color cursorColor = WHITE;
// Get ray and test against ground, triangle, and mesh
ray = GetMouseRay(GetMousePosition(), camera);
// Check ray collision aginst ground plane
RayHitInfo groundHitInfo = GetCollisionRayGround(ray, 0.0f);
if ((groundHitInfo.hit) && (groundHitInfo.distance < nearestHit.distance))
{
nearestHit = groundHitInfo;
cursorColor = GREEN;
hitObjectName = "Ground";
}
// Check ray collision against test triangle
RayHitInfo triHitInfo = GetCollisionRayTriangle(ray, ta, tb, tc);
if ((triHitInfo.hit) && (triHitInfo.distance < nearestHit.distance))
{
nearestHit = triHitInfo;
cursorColor = PURPLE;
hitObjectName = "Triangle";
bary = VectorBarycenter(nearestHit.hitPosition, ta, tb, tc);
hitTriangle = true;
}
else hitTriangle = false;
RayHitInfo meshHitInfo;
// Check ray collision against bounding box first, before trying the full ray-mesh test
if (CheckCollisionRayBox(ray, towerBBox))
{
hitMeshBBox = true;
// Check ray collision against mesh
meshHitInfo = GetCollisionRayMesh(ray, &tower.mesh);
if ((meshHitInfo.hit) && (meshHitInfo.distance < nearestHit.distance))
{
nearestHit = meshHitInfo;
cursorColor = ORANGE;
hitObjectName = "Mesh";
}
} hitMeshBBox = false;
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
Begin3dMode(camera);
// Draw the tower
DrawModel(tower, towerPos, 1.0, WHITE);
// Draw the test triangle
DrawLine3D(ta, tb, PURPLE);
DrawLine3D(tb, tc, PURPLE);
DrawLine3D(tc, ta, PURPLE);
// Draw the mesh bbox if we hit it
if (hitMeshBBox) DrawBoundingBox(towerBBox, LIME);
// If we hit something, draw the cursor at the hit point
if (nearestHit.hit)
{
DrawCube(nearestHit.hitPosition, 0.3, 0.3, 0.3, cursorColor);
DrawCubeWires(nearestHit.hitPosition, 0.3, 0.3, 0.3, RED);
Vector3 normalEnd;
normalEnd.x = nearestHit.hitPosition.x + nearestHit.hitNormal.x;
normalEnd.y = nearestHit.hitPosition.y + nearestHit.hitNormal.y;
normalEnd.z = nearestHit.hitPosition.z + nearestHit.hitNormal.z;
DrawLine3D(nearestHit.hitPosition, normalEnd, RED);
}
DrawRay(ray, MAROON);
DrawGrid(100, 1.0f);
End3dMode();
// Draw some debug GUI text
DrawText(FormatText("Hit Object: %s", hitObjectName), 10, 50, 10, BLACK);
if (nearestHit.hit)
{
int ypos = 70;
DrawText(FormatText("Distance: %3.2f", nearestHit.distance), 10, ypos, 10, BLACK);
DrawText(FormatText("Hit Pos: %3.2f %3.2f %3.2f",
nearestHit.hitPosition.x,
nearestHit.hitPosition.y,
nearestHit.hitPosition.z), 10, ypos + 15, 10, BLACK);
DrawText(FormatText("Hit Norm: %3.2f %3.2f %3.2f",
nearestHit.hitNormal.x,
nearestHit.hitNormal.y,
nearestHit.hitNormal.z), 10, ypos + 30, 10, BLACK);
if (hitTriangle) DrawText(FormatText("Barycenter: %3.2f %3.2f %3.2f", bary.x, bary.y, bary.z), 10, ypos + 45, 10, BLACK);
}
DrawText("Use Mouse to Move Camera", 10, 430, 10, GRAY);
DrawFPS(10, 10);
EndDrawing();
//----------------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
UnloadModel(tower); // Unload model
UnloadTexture(texture); // Unload texture
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}

View file

@ -2,17 +2,22 @@
* *
* Physac - Physics demo * Physac - Physics demo
* *
* NOTE: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations. * NOTE 1: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations.
* The file pthreadGC2.dll is required to run the program; you can find it in 'src\external' * NOTE 2: Physac requires static C library linkage to avoid dependency on MinGW DLL (-static -lpthread)
* *
* Copyright (c) 2016 Victor Fisac * Use the following line to compile:
*
* gcc -o $(NAME_PART).exe $(FILE_NAME) -s $(RAYLIB_DIR)\raylib\raylib_icon -static -lraylib -lpthread
* -lglfw3 -lopengl32 -lgdi32 -lopenal32 -lwinmm -std=c99 -Wl,--subsystem,windows -Wl,-allow-multiple-definition
*
* Copyright (c) 2017 Victor Fisac
* *
********************************************************************************************/ ********************************************************************************************/
#include "raylib.h" #include "raylib.h"
#define PHYSAC_IMPLEMENTATION #define PHYSAC_IMPLEMENTATION
#include "..\src\physac.h" #include "physac.h"
int main() int main()
{ {
@ -120,3 +125,4 @@ int main()
return 0; return 0;
} }

View file

@ -2,17 +2,22 @@
* *
* Physac - Physics friction * Physac - Physics friction
* *
* NOTE: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations. * NOTE 1: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations.
* The file pthreadGC2.dll is required to run the program; you can find it in 'src\external' * NOTE 2: Physac requires static C library linkage to avoid dependency on MinGW DLL (-static -lpthread)
* *
* Copyright (c) 2016 Victor Fisac * Use the following line to compile:
*
* gcc -o $(NAME_PART).exe $(FILE_NAME) -s $(RAYLIB_DIR)\raylib\raylib_icon -static -lraylib -lpthread
* -lglfw3 -lopengl32 -lgdi32 -lopenal32 -lwinmm -std=c99 -Wl,--subsystem,windows -Wl,-allow-multiple-definition
*
* Copyright (c) 2017 Victor Fisac
* *
********************************************************************************************/ ********************************************************************************************/
#include "raylib.h" #include "raylib.h"
#define PHYSAC_IMPLEMENTATION #define PHYSAC_IMPLEMENTATION
#include "..\src\physac.h" #include "physac.h"
int main() int main()
{ {
@ -129,8 +134,10 @@ int main()
// De-Initialization // De-Initialization
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
ClosePhysics(); // Unitialize physics ClosePhysics(); // Unitialize physics
CloseWindow(); // Close window and OpenGL context CloseWindow(); // Close window and OpenGL context
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
return 0; return 0;
} }

View file

@ -2,17 +2,22 @@
* *
* Physac - Physics movement * Physac - Physics movement
* *
* NOTE: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations. * NOTE 1: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations.
* The file pthreadGC2.dll is required to run the program; you can find it in 'src\external' * NOTE 2: Physac requires static C library linkage to avoid dependency on MinGW DLL (-static -lpthread)
* *
* Copyright (c) 2016 Victor Fisac * Use the following line to compile:
*
* gcc -o $(NAME_PART).exe $(FILE_NAME) -s $(RAYLIB_DIR)\raylib\raylib_icon -static -lraylib -lpthread
* -lglfw3 -lopengl32 -lgdi32 -lopenal32 -lwinmm -std=c99 -Wl,--subsystem,windows -Wl,-allow-multiple-definition
*
* Copyright (c) 2017 Victor Fisac
* *
********************************************************************************************/ ********************************************************************************************/
#include "raylib.h" #include "raylib.h"
#define PHYSAC_IMPLEMENTATION #define PHYSAC_IMPLEMENTATION
#include "..\src\physac.h" #include "physac.h"
#define VELOCITY 0.5f #define VELOCITY 0.5f
@ -115,8 +120,10 @@ int main()
// De-Initialization // De-Initialization
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
ClosePhysics(); // Unitialize physics ClosePhysics(); // Unitialize physics
CloseWindow(); // Close window and OpenGL context CloseWindow(); // Close window and OpenGL context
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
return 0; return 0;
} }

View file

@ -2,17 +2,22 @@
* *
* Physac - Physics restitution * Physac - Physics restitution
* *
* NOTE: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations. * NOTE 1: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations.
* The file pthreadGC2.dll is required to run the program; you can find it in 'src\external' * NOTE 2: Physac requires static C library linkage to avoid dependency on MinGW DLL (-static -lpthread)
* *
* Copyright (c) 2016 Victor Fisac * Use the following line to compile:
*
* gcc -o $(NAME_PART).exe $(FILE_NAME) -s $(RAYLIB_DIR)\raylib\raylib_icon -static -lraylib -lpthread
* -lglfw3 -lopengl32 -lgdi32 -lopenal32 -lwinmm -std=c99 -Wl,--subsystem,windows -Wl,-allow-multiple-definition
*
* Copyright (c) 2017 Victor Fisac
* *
********************************************************************************************/ ********************************************************************************************/
#include "raylib.h" #include "raylib.h"
#define PHYSAC_IMPLEMENTATION #define PHYSAC_IMPLEMENTATION
#include "..\src\physac.h" #include "physac.h"
int main() int main()
{ {
@ -108,8 +113,10 @@ int main()
// De-Initialization // De-Initialization
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
ClosePhysics(); // Unitialize physics ClosePhysics(); // Unitialize physics
CloseWindow(); // Close window and OpenGL context CloseWindow(); // Close window and OpenGL context
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
return 0; return 0;
} }

View file

@ -2,17 +2,22 @@
* *
* Physac - Body shatter * Physac - Body shatter
* *
* NOTE: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations. * NOTE 1: Physac requires multi-threading, when InitPhysics() a second thread is created to manage physics calculations.
* The file pthreadGC2.dll is required to run the program; you can find it in 'src\external' * NOTE 2: Physac requires static C library linkage to avoid dependency on MinGW DLL (-static -lpthread)
* *
* Copyright (c) 2016 Victor Fisac * Use the following line to compile:
*
* gcc -o $(NAME_PART).exe $(FILE_NAME) -s $(RAYLIB_DIR)\raylib\raylib_icon -static -lraylib -lpthread
* -lglfw3 -lopengl32 -lgdi32 -lopenal32 -lwinmm -std=c99 -Wl,--subsystem,windows -Wl,-allow-multiple-definition
*
* Copyright (c) 2017 Victor Fisac
* *
********************************************************************************************/ ********************************************************************************************/
#include "raylib.h" #include "raylib.h"
#define PHYSAC_IMPLEMENTATION #define PHYSAC_IMPLEMENTATION
#include "..\src\physac.h" #include "physac.h"
int main() int main()
{ {
@ -100,8 +105,10 @@ int main()
// De-Initialization // De-Initialization
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
ClosePhysics(); // Unitialize physics ClosePhysics(); // Unitialize physics
CloseWindow(); // Close window and OpenGL context CloseWindow(); // Close window and OpenGL context
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
return 0; return 0;
} }

View file

@ -9,7 +9,7 @@
* on OpenGL ES 2.0 platforms (Android, Raspberry Pi, HTML5), use #version 100 shaders * on OpenGL ES 2.0 platforms (Android, Raspberry Pi, HTML5), use #version 100 shaders
* raylib comes with shaders ready for both versions, check raylib/shaders install folder * raylib comes with shaders ready for both versions, check raylib/shaders install folder
* *
* This example has been created using raylib 1.3 (www.raylib.com) * This example has been created using raylib 1.7 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) * raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
* *
* Copyright (c) 2015 Ramon Santamaria (@raysan5) * Copyright (c) 2015 Ramon Santamaria (@raysan5)
@ -18,9 +18,6 @@
#include "raylib.h" #include "raylib.h"
#include <stdio.h>
#include <stdlib.h>
int main() int main()
{ {
// Initialization // Initialization
@ -30,14 +27,12 @@ int main()
InitWindow(screenWidth, screenHeight, "raylib [shaders] example - shapes and texture shaders"); InitWindow(screenWidth, screenHeight, "raylib [shaders] example - shapes and texture shaders");
Texture2D sonic = LoadTexture("resources/texture_formats/sonic.png"); Texture2D fudesumi = LoadTexture("resources/fudesumi.png");
// NOTE: Using GLSL 330 shader version, on OpenGL ES 2.0 use GLSL 100 shader version // NOTE: Using GLSL 330 shader version, on OpenGL ES 2.0 use GLSL 100 shader version
Shader shader = LoadShader("resources/shaders/glsl330/base.vs", Shader shader = LoadShader("resources/shaders/glsl330/base.vs",
"resources/shaders/glsl330/grayscale.fs"); "resources/shaders/glsl330/grayscale.fs");
// Shader usage is also different than models/postprocessing, shader is just activated when required
SetTargetFPS(60); SetTargetFPS(60);
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
@ -91,11 +86,13 @@ int main()
// Activate our custom shader to be applied on next shapes/textures drawings // Activate our custom shader to be applied on next shapes/textures drawings
BeginShaderMode(shader); BeginShaderMode(shader);
DrawTexture(sonic, 380, -10, WHITE); // Using custom shader DrawTexture(fudesumi, 500, -30, WHITE); // Using custom shader
// Activate our default shader for next drawings // Activate our default shader for next drawings
EndShaderMode(); EndShaderMode();
DrawText("(c) Fudesumi sprite by Eiden Marsal", 380, screenHeight - 20, 10, GRAY);
EndDrawing(); EndDrawing();
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
} }
@ -103,7 +100,7 @@ int main()
// De-Initialization // De-Initialization
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
UnloadShader(shader); // Unload shader UnloadShader(shader); // Unload shader
UnloadTexture(sonic); // Unload texture UnloadTexture(fudesumi); // Unload texture
CloseWindow(); // Close window and OpenGL context CloseWindow(); // Close window and OpenGL context
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------

View file

@ -0,0 +1,59 @@
/*******************************************************************************************
*
* raylib [shapes] example - Cubic-bezier lines
*
* This example has been created using raylib 1.7 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
*
* Copyright (c) 2017 Ramon Santamaria (@raysan5)
*
********************************************************************************************/
#include "raylib.h"
int main()
{
// Initialization
//--------------------------------------------------------------------------------------
int screenWidth = 800;
int screenHeight = 450;
SetConfigFlags(FLAG_MSAA_4X_HINT);
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - cubic-bezier lines");
Vector2 start = { 0, 0 };
Vector2 end = { screenWidth, screenHeight };
SetTargetFPS(60);
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
// Update
//----------------------------------------------------------------------------------
if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) start = GetMousePosition();
else if (IsMouseButtonDown(MOUSE_RIGHT_BUTTON)) end = GetMousePosition();
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
DrawText("USE MOUSE LEFT-RIGHT CLICK to DEFINE LINE START and END POINTS", 15, 20, 20, GRAY);
DrawLineBezier(start, end, 2.0f, RED);
EndDrawing();
//----------------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}

View file

@ -24,13 +24,13 @@ int main()
const char msgTtf[64] = "THIS SPRITE FONT has been GENERATED from a TTF"; const char msgTtf[64] = "THIS SPRITE FONT has been GENERATED from a TTF";
// NOTE: Textures/Fonts MUST be loaded after Window initialization (OpenGL context is required) // NOTE: Textures/Fonts MUST be loaded after Window initialization (OpenGL context is required)
SpriteFont fontBm = LoadSpriteFont("resources/fonts/bmfont.fnt"); // BMFont (AngelCode) SpriteFont fontBm = LoadSpriteFont("resources/bmfont.fnt"); // BMFont (AngelCode)
SpriteFont fontTtf = LoadSpriteFont("resources/fonts/pixantiqua.ttf"); // TTF font SpriteFont fontTtf = LoadSpriteFont("resources/pixantiqua.ttf"); // TTF font
Vector2 fontPosition; Vector2 fontPosition;
fontPosition.x = screenWidth/2 - MeasureTextEx(fontBm, msgBm, fontBm.size, 0).x/2; fontPosition.x = screenWidth/2 - MeasureTextEx(fontBm, msgBm, fontBm.baseSize, 0).x/2;
fontPosition.y = screenHeight/2 - fontBm.size/2 - 80; fontPosition.y = screenHeight/2 - fontBm.baseSize/2 - 80;
SetTargetFPS(60); SetTargetFPS(60);
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
@ -49,8 +49,8 @@ int main()
ClearBackground(RAYWHITE); ClearBackground(RAYWHITE);
DrawTextEx(fontBm, msgBm, fontPosition, fontBm.size, 0, MAROON); DrawTextEx(fontBm, msgBm, fontPosition, fontBm.baseSize, 0, MAROON);
DrawTextEx(fontTtf, msgTtf, (Vector2){ 75.0f, 240.0f }, fontTtf.size*0.8f, 2, LIME); DrawTextEx(fontTtf, msgTtf, (Vector2){ 75.0f, 240.0f }, fontTtf.baseSize*0.8f, 2, LIME);
EndDrawing(); EndDrawing();
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------

View file

@ -25,7 +25,7 @@ int main()
const char msg[256] = "ASCII extended characters:\n¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆ\nÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæ\nçèéêëìíîïðñòóôõö÷øùúûüýþÿ"; const char msg[256] = "ASCII extended characters:\n¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆ\nÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæ\nçèéêëìíîïðñòóôõö÷øùúûüýþÿ";
// NOTE: Loaded font has an unordered list of characters (chars in the range 32..255) // NOTE: Loaded font has an unordered list of characters (chars in the range 32..255)
SpriteFont font = LoadSpriteFont("resources/fonts/pixantiqua.fnt"); // BMFont (AngelCode) SpriteFont font = LoadSpriteFont("resources/pixantiqua.fnt"); // BMFont (AngelCode)
SetTargetFPS(60); SetTargetFPS(60);
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
@ -45,10 +45,10 @@ int main()
ClearBackground(RAYWHITE); ClearBackground(RAYWHITE);
DrawText("Font name: PixAntiqua", 40, 50, 20, GRAY); DrawText("Font name: PixAntiqua", 40, 50, 20, GRAY);
DrawText(FormatText("Font base size: %i", font.size), 40, 80, 20, GRAY); DrawText(FormatText("Font base size: %i", font.baseSize), 40, 80, 20, GRAY);
DrawText(FormatText("Font chars number: %i", font.numChars), 40, 110, 20, GRAY); DrawText(FormatText("Font chars number: %i", font.charsCount), 40, 110, 20, GRAY);
DrawTextEx(font, msg, (Vector2){ 40, 180 }, font.size, 0, MAROON); DrawTextEx(font, msg, (Vector2){ 40, 180 }, font.baseSize, 0, MAROON);
EndDrawing(); EndDrawing();
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------

View file

@ -0,0 +1,116 @@
/*******************************************************************************************
*
* raylib [text] example - Input Box
*
* This example has been created using raylib 1.7 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
*
* Copyright (c) 2017 Ramon Santamaria (@raysan5)
*
********************************************************************************************/
#include "raylib.h"
#define MAX_INPUT_CHARS 9
int main()
{
// Initialization
//--------------------------------------------------------------------------------------
int screenWidth = 800;
int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [text] example - input box");
char name[MAX_INPUT_CHARS + 1] = "\0"; // NOTE: One extra space required for line ending char '\0'
int letterCount = 0;
Rectangle textBox = { screenWidth/2 - 100, 180, 225, 50 };
bool mouseOnText = false;
int framesCounter = 0;
SetTargetFPS(60);
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
// Update
//----------------------------------------------------------------------------------
if (CheckCollisionPointRec(GetMousePosition(), textBox)) mouseOnText = true;
else mouseOnText = false;
if (mouseOnText)
{
int key = GetKeyPressed();
// NOTE: Only allow keys in range [32..125]
if ((key >= 32) && (key <= 125) && (letterCount < MAX_INPUT_CHARS))
{
name[letterCount] = (char)key;
letterCount++;
}
if (key == KEY_BACKSPACE)
{
letterCount--;
name[letterCount] = '\0';
if (letterCount < 0) letterCount = 0;
}
}
if (mouseOnText) framesCounter++;
else framesCounter = 0;
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
DrawText("PLACE MOUSE OVER INPUT BOX!", 240, 140, 20, GRAY);
DrawRectangleRec(textBox, LIGHTGRAY);
if (mouseOnText) DrawRectangleLines(textBox.x, textBox.y, textBox.width, textBox.height, RED);
else DrawRectangleLines(textBox.x, textBox.y, textBox.width, textBox.height, DARKGRAY);
DrawText(name, textBox.x + 5, textBox.y + 8, 40, MAROON);
DrawText(FormatText("INPUT CHARS: %i/%i", letterCount, MAX_INPUT_CHARS), 315, 250, 20, DARKGRAY);
if (mouseOnText)
{
if (letterCount < MAX_INPUT_CHARS)
{
// Draw blinking underscore char
if (((framesCounter/20)%2) == 0) DrawText("_", textBox.x + 8 + MeasureText(name, 40), textBox.y + 12, 40, MAROON);
}
else DrawText("Press BACKSPACE to delete chars...", 230, 300, 20, GRAY);
}
EndDrawing();
//----------------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}
// Check if any key is pressed
// NOTE: We limit keys check to keys between 32 (KEY_SPACE) and 126
bool IsAnyKeyPressed()
{
bool keyPressed = false;
int key = GetKeyPressed();
if ((key >= 32) && (key <= 126)) keyPressed = true;
return keyPressed;
}

View file

@ -1,19 +1,21 @@
/******************************************************************************************* /*******************************************************************************************
* *
* raylib [text] example - raylib bitmap font (rbmf) loading and usage * raylib [text] example - raylib font loading and usage
* *
* NOTE: raylib is distributed with some free to use fonts (even for commercial pourposes!) * NOTE: raylib is distributed with some free to use fonts (even for commercial pourposes!)
* To view details and credits for those fonts, check raylib license file * To view details and credits for those fonts, check raylib license file
* *
* This example has been created using raylib 1.3 (www.raylib.com) * This example has been created using raylib 1.7 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) * raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
* *
* Copyright (c) 2015 Ramon Santamaria (@raysan5) * Copyright (c) 2017 Ramon Santamaria (@raysan5)
* *
********************************************************************************************/ ********************************************************************************************/
#include "raylib.h" #include "raylib.h"
#define MAX_FONTS 8
int main() int main()
{ {
// Initialization // Initialization
@ -21,21 +23,21 @@ int main()
int screenWidth = 800; int screenWidth = 800;
int screenHeight = 450; int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [text] example - rBMF fonts"); InitWindow(screenWidth, screenHeight, "raylib [text] example - raylib fonts");
// NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required) // NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required)
SpriteFont fonts[8]; SpriteFont fonts[MAX_FONTS];
fonts[0] = LoadSpriteFont("resources/fonts/alagard.rbmf"); // rBMF font loading fonts[0] = LoadSpriteFont("resources/fonts/alagard.png");
fonts[1] = LoadSpriteFont("resources/fonts/pixelplay.rbmf"); // rBMF font loading fonts[1] = LoadSpriteFont("resources/fonts/pixelplay.png");
fonts[2] = LoadSpriteFont("resources/fonts/mecha.rbmf"); // rBMF font loading fonts[2] = LoadSpriteFont("resources/fonts/mecha.png");
fonts[3] = LoadSpriteFont("resources/fonts/setback.rbmf"); // rBMF font loading fonts[3] = LoadSpriteFont("resources/fonts/setback.png");
fonts[4] = LoadSpriteFont("resources/fonts/romulus.rbmf"); // rBMF font loading fonts[4] = LoadSpriteFont("resources/fonts/romulus.png");
fonts[5] = LoadSpriteFont("resources/fonts/pixantiqua.rbmf"); // rBMF font loading fonts[5] = LoadSpriteFont("resources/fonts/pixantiqua.png");
fonts[6] = LoadSpriteFont("resources/fonts/alpha_beta.rbmf"); // rBMF font loading fonts[6] = LoadSpriteFont("resources/fonts/alpha_beta.png");
fonts[7] = LoadSpriteFont("resources/fonts/jupiter_crash.rbmf"); // rBMF font loading fonts[7] = LoadSpriteFont("resources/fonts/jupiter_crash.png");
const char *messages[8] = { "ALAGARD FONT designed by Hewett Tsoi", const char *messages[MAX_FONTS] = { "ALAGARD FONT designed by Hewett Tsoi",
"PIXELPLAY FONT designed by Aleksander Shevchuk", "PIXELPLAY FONT designed by Aleksander Shevchuk",
"MECHA FONT designed by Captain Falcon", "MECHA FONT designed by Captain Falcon",
"SETBACK FONT designed by Brian Kent (AEnigma)", "SETBACK FONT designed by Brian Kent (AEnigma)",
@ -44,17 +46,22 @@ int main()
"ALPHA_BETA FONT designed by Brian Kent (AEnigma)", "ALPHA_BETA FONT designed by Brian Kent (AEnigma)",
"JUPITER_CRASH FONT designed by Brian Kent (AEnigma)" }; "JUPITER_CRASH FONT designed by Brian Kent (AEnigma)" };
const int spacings[8] = { 2, 4, 8, 4, 3, 4, 4, 1 }; const int spacings[MAX_FONTS] = { 2, 4, 8, 4, 3, 4, 4, 1 };
Vector2 positions[8]; Vector2 positions[MAX_FONTS];
for (int i = 0; i < 8; i++) for (int i = 0; i < MAX_FONTS; i++)
{ {
positions[i].x = screenWidth/2 - MeasureTextEx(fonts[i], messages[i], fonts[i].size*2, spacings[i]).x/2; positions[i].x = screenWidth/2 - MeasureTextEx(fonts[i], messages[i], fonts[i].baseSize*2, spacings[i]).x/2;
positions[i].y = 60 + fonts[i].size + 50*i; positions[i].y = 60 + fonts[i].baseSize + 45*i;
} }
Color colors[8] = { MAROON, ORANGE, DARKGREEN, DARKBLUE, DARKPURPLE, LIME, GOLD }; // Small Y position corrections
positions[3].y += 8;
positions[4].y += 2;
positions[7].y -= 8;
Color colors[MAX_FONTS] = { MAROON, ORANGE, DARKGREEN, DARKBLUE, DARKPURPLE, LIME, GOLD, RED };
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
// Main game loop // Main game loop
@ -74,9 +81,9 @@ int main()
DrawText("free fonts included with raylib", 250, 20, 20, DARKGRAY); DrawText("free fonts included with raylib", 250, 20, 20, DARKGRAY);
DrawLine(220, 50, 590, 50, DARKGRAY); DrawLine(220, 50, 590, 50, DARKGRAY);
for (int i = 0; i < 8; i++) for (int i = 0; i < MAX_FONTS; i++)
{ {
DrawTextEx(fonts[i], messages[i], positions[i], fonts[i].size*2, spacings[i], colors[i]); DrawTextEx(fonts[i], messages[i], positions[i], fonts[i].baseSize*2, spacings[i], colors[i]);
} }
EndDrawing(); EndDrawing();
@ -85,10 +92,9 @@ int main()
// De-Initialization // De-Initialization
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
for (int i = 0; i < 8; i++)
{ // SpriteFonts unloading
UnloadSpriteFont(fonts[i]); // SpriteFont unloading for (int i = 0; i < MAX_FONTS; i++) UnloadSpriteFont(fonts[i]);
}
CloseWindow(); // Close window and OpenGL context CloseWindow(); // Close window and OpenGL context
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------

View file

@ -25,20 +25,20 @@ int main()
const char msg3[50] = "...and a THIRD one! GREAT! :D"; const char msg3[50] = "...and a THIRD one! GREAT! :D";
// NOTE: Textures/Fonts MUST be loaded after Window initialization (OpenGL context is required) // NOTE: Textures/Fonts MUST be loaded after Window initialization (OpenGL context is required)
SpriteFont font1 = LoadSpriteFont("resources/fonts/custom_mecha.png"); // SpriteFont loading SpriteFont font1 = LoadSpriteFont("resources/custom_mecha.png"); // SpriteFont loading
SpriteFont font2 = LoadSpriteFont("resources/fonts/custom_alagard.png"); // SpriteFont loading SpriteFont font2 = LoadSpriteFont("resources/custom_alagard.png"); // SpriteFont loading
SpriteFont font3 = LoadSpriteFont("resources/fonts/custom_jupiter_crash.png"); // SpriteFont loading SpriteFont font3 = LoadSpriteFont("resources/custom_jupiter_crash.png"); // SpriteFont loading
Vector2 fontPosition1, fontPosition2, fontPosition3; Vector2 fontPosition1, fontPosition2, fontPosition3;
fontPosition1.x = screenWidth/2 - MeasureTextEx(font1, msg1, font1.size, -3).x/2; fontPosition1.x = screenWidth/2 - MeasureTextEx(font1, msg1, font1.baseSize, -3).x/2;
fontPosition1.y = screenHeight/2 - font1.size/2 - 80; fontPosition1.y = screenHeight/2 - font1.baseSize/2 - 80;
fontPosition2.x = screenWidth/2 - MeasureTextEx(font2, msg2, font2.size, -2).x/2; fontPosition2.x = screenWidth/2 - MeasureTextEx(font2, msg2, font2.baseSize, -2).x/2;
fontPosition2.y = screenHeight/2 - font2.size/2 - 10; fontPosition2.y = screenHeight/2 - font2.baseSize/2 - 10;
fontPosition3.x = screenWidth/2 - MeasureTextEx(font3, msg3, font3.size, 2).x/2; fontPosition3.x = screenWidth/2 - MeasureTextEx(font3, msg3, font3.baseSize, 2).x/2;
fontPosition3.y = screenHeight/2 - font3.size/2 + 50; fontPosition3.y = screenHeight/2 - font3.baseSize/2 + 50;
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
@ -56,9 +56,9 @@ int main()
ClearBackground(RAYWHITE); ClearBackground(RAYWHITE);
DrawTextEx(font1, msg1, fontPosition1, font1.size, -3, WHITE); DrawTextEx(font1, msg1, fontPosition1, font1.baseSize, -3, WHITE);
DrawTextEx(font2, msg2, fontPosition2, font2.size, -2, WHITE); DrawTextEx(font2, msg2, fontPosition2, font2.baseSize, -2, WHITE);
DrawTextEx(font3, msg3, fontPosition3, font3.size, 2, WHITE); DrawTextEx(font3, msg3, fontPosition3, font3.baseSize, 2, WHITE);
EndDrawing(); EndDrawing();
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------

View file

@ -25,13 +25,13 @@ int main()
// NOTE: Textures/Fonts MUST be loaded after Window initialization (OpenGL context is required) // NOTE: Textures/Fonts MUST be loaded after Window initialization (OpenGL context is required)
// TTF SpriteFont loading with custom generation parameters // TTF SpriteFont loading with custom generation parameters
SpriteFont font = LoadSpriteFontTTF("resources/fonts/KAISG.ttf", 96, 0, 0); SpriteFont font = LoadSpriteFontTTF("resources/KAISG.ttf", 96, 0, 0);
// Generate mipmap levels to use trilinear filtering // Generate mipmap levels to use trilinear filtering
// NOTE: On 2D drawing it won't be noticeable, it looks like FILTER_BILINEAR // NOTE: On 2D drawing it won't be noticeable, it looks like FILTER_BILINEAR
GenTextureMipmaps(&font.texture); GenTextureMipmaps(&font.texture);
float fontSize = font.size; float fontSize = font.baseSize;
Vector2 fontPosition = { 40, screenHeight/2 + 50 }; Vector2 fontPosition = { 40, screenHeight/2 + 50 };
Vector2 textSize; Vector2 textSize;

View file

@ -0,0 +1,135 @@
/*******************************************************************************************
*
* raylib example - particles blending
*
* This example has been created using raylib 1.7 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
*
* Copyright (c) 2017 Ramon Santamaria (@raysan5)
*
********************************************************************************************/
#include "raylib.h"
#define MAX_PARTICLES 200
// Particle structure with basic data
typedef struct {
Vector2 position;
Color color;
float alpha;
float size;
float rotation;
bool active; // NOTE: Use it to activate/deactive particle
} Particle;
int main()
{
// Initialization
//--------------------------------------------------------------------------------------
int screenWidth = 800;
int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [textures] example - particles blending");
// Particles pool, reuse them!
Particle mouseTail[MAX_PARTICLES];
// Initialize particles
for (int i = 0; i < MAX_PARTICLES; i++)
{
mouseTail[i].position = (Vector2){ 0, 0 };
mouseTail[i].color = (Color){ GetRandomValue(0, 255), GetRandomValue(0, 255), GetRandomValue(0, 255), 255 };
mouseTail[i].alpha = 1.0f;
mouseTail[i].size = (float)GetRandomValue(1, 30)/20.0f;
mouseTail[i].rotation = GetRandomValue(0, 360);
mouseTail[i].active = false;
}
float gravity = 3.0f;
Texture2D smoke = LoadTexture("resources/smoke.png");
int blending = BLEND_ALPHA;
SetTargetFPS(60);
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
// Update
//----------------------------------------------------------------------------------
// Activate one particle every frame and Update active particles
// NOTE: Particles initial position should be mouse position when activated
// NOTE: Particles fall down with gravity and rotation... and disappear after 2 seconds (alpha = 0)
// NOTE: When a particle disappears, active = false and it can be reused.
for (int i = 0; i < MAX_PARTICLES; i++)
{
if (!mouseTail[i].active)
{
mouseTail[i].active = true;
mouseTail[i].alpha = 1.0f;
mouseTail[i].position = GetMousePosition();
i = MAX_PARTICLES;
}
}
for (int i = 0; i < MAX_PARTICLES; i++)
{
if (mouseTail[i].active)
{
mouseTail[i].position.y += gravity;
mouseTail[i].alpha -= 0.01f;
if (mouseTail[i].alpha <= 0.0f) mouseTail[i].active = false;
mouseTail[i].rotation += 5.0f;
}
}
if (IsKeyPressed(KEY_SPACE))
{
if (blending == BLEND_ALPHA) blending = BLEND_ADDITIVE;
else blending = BLEND_ALPHA;
}
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(DARKGRAY);
BeginBlendMode(blending);
// Draw active particles
for (int i = 0; i < MAX_PARTICLES; i++)
{
if (mouseTail[i].active) DrawTexturePro(smoke, (Rectangle){ 0, 0, smoke.width, smoke.height },
(Rectangle){ mouseTail[i].position.x, mouseTail[i].position.y, smoke.width*mouseTail[i].size, smoke.height*mouseTail[i].size },
(Vector2){ smoke.width*mouseTail[i].size/2, smoke.height*mouseTail[i].size/2 }, mouseTail[i].rotation,
Fade(mouseTail[i].color, mouseTail[i].alpha));
}
EndBlendMode();
DrawText("PRESS SPACE to CHANGE BLENDING MODE", 180, 20, 20, BLACK);
if (blending == BLEND_ALPHA) DrawText("ALPHA BLENDING", 290, screenHeight - 40, 20, BLACK);
else DrawText("ADDITIVE BLENDING", 280, screenHeight - 40, 20, RAYWHITE);
EndDrawing();
//----------------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
UnloadTexture(smoke);
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}

View file

@ -27,9 +27,9 @@ int main()
// NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required) // NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required)
// Load RAW image data (512x512, 32bit RGBA, no file header) // Load RAW image data (512x512, 32bit RGBA, no file header)
Image sonicRaw = LoadImageRaw("resources/texture_formats/sonic_R8G8B8A8.raw", 512, 512, UNCOMPRESSED_R8G8B8A8, 0); Image fudesumiRaw = LoadImageRaw("resources/fudesumi.raw", 384, 512, UNCOMPRESSED_R8G8B8A8, 0);
Texture2D sonic = LoadTextureFromImage(sonicRaw); // Upload CPU (RAM) image to GPU (VRAM) Texture2D fudesumi = LoadTextureFromImage(fudesumiRaw); // Upload CPU (RAM) image to GPU (VRAM)
UnloadImage(sonicRaw); // Unload CPU (RAM) image data UnloadImage(fudesumiRaw); // Unload CPU (RAM) image data
// Generate a checked texture by code (1024x1024 pixels) // Generate a checked texture by code (1024x1024 pixels)
int width = 1024; int width = 1024;
@ -42,8 +42,8 @@ int main()
{ {
for (int x = 0; x < width; x++) for (int x = 0; x < width; x++)
{ {
if (((x/32+y/32)/1)%2 == 0) pixels[y*height + x] = DARKBLUE; if (((x/32+y/32)/1)%2 == 0) pixels[y*height + x] = ORANGE;
else pixels[y*height + x] = SKYBLUE; else pixels[y*height + x] = GOLD;
} }
} }
@ -70,12 +70,14 @@ int main()
ClearBackground(RAYWHITE); ClearBackground(RAYWHITE);
DrawTexture(checked, screenWidth/2 - checked.width/2, screenHeight/2 - checked.height/2, Fade(WHITE, 0.3f)); DrawTexture(checked, screenWidth/2 - checked.width/2, screenHeight/2 - checked.height/2, Fade(WHITE, 0.5f));
DrawTexture(sonic, 330, -20, WHITE); DrawTexture(fudesumi, 430, -30, WHITE);
DrawText("CHECKED TEXTURE ", 84, 100, 30, DARKBLUE); DrawText("CHECKED TEXTURE ", 84, 100, 30, BROWN);
DrawText("GENERATED by CODE", 72, 164, 30, DARKBLUE); DrawText("GENERATED by CODE", 72, 164, 30, BROWN);
DrawText("and RAW IMAGE LOADING", 46, 226, 30, DARKBLUE); DrawText("and RAW IMAGE LOADING", 46, 226, 30, BROWN);
DrawText("(c) Fudesumi sprite by Eiden Marsal", 310, screenHeight - 20, 10, BROWN);
EndDrawing(); EndDrawing();
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
@ -83,7 +85,7 @@ int main()
// De-Initialization // De-Initialization
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
UnloadTexture(sonic); // Texture unloading UnloadTexture(fudesumi); // Texture unloading
UnloadTexture(checked); // Texture unloading UnloadTexture(checked); // Texture unloading
CloseWindow(); // Close window and OpenGL context CloseWindow(); // Close window and OpenGL context

View file

@ -11,6 +11,9 @@
#include "raylib.h" #include "raylib.h"
#define MAX_FRAME_SPEED 15
#define MIN_FRAME_SPEED 1
int main() int main()
{ {
// Initialization // Initialization
@ -21,11 +24,16 @@ int main()
InitWindow(screenWidth, screenHeight, "raylib [texture] example - texture rectangle"); InitWindow(screenWidth, screenHeight, "raylib [texture] example - texture rectangle");
// NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required) // NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required)
Texture2D guybrush = LoadTexture("resources/guybrush.png"); // Texture loading Texture2D scarfy = LoadTexture("resources/scarfy.png"); // Texture loading
Vector2 position = { 350.0f, 240.0f }; Vector2 position = { 350.0f, 280.0f };
Rectangle frameRec = { 0, 0, guybrush.width/7, guybrush.height }; Rectangle frameRec = { 0, 0, scarfy.width/6, scarfy.height };
int currentFrame = 0; int currentFrame = 0;
int framesCounter = 0;
int framesSpeed = 8; // Number of spritesheet frames shown by second
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
// Main game loop // Main game loop
@ -33,14 +41,23 @@ int main()
{ {
// Update // Update
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
if (IsKeyPressed(KEY_RIGHT)) framesCounter++;
if (framesCounter >= (60/framesSpeed))
{ {
framesCounter = 0;
currentFrame++; currentFrame++;
if (currentFrame > 6) currentFrame = 0; if (currentFrame > 5) currentFrame = 0;
frameRec.x = currentFrame*guybrush.width/7; frameRec.x = currentFrame*scarfy.width/6;
} }
if (IsKeyPressed(KEY_RIGHT)) framesSpeed++;
else if (IsKeyPressed(KEY_LEFT)) framesSpeed--;
if (framesSpeed > MAX_FRAME_SPEED) framesSpeed = MAX_FRAME_SPEED;
else if (framesSpeed < MIN_FRAME_SPEED) framesSpeed = MIN_FRAME_SPEED;
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Draw // Draw
@ -49,19 +66,23 @@ int main()
ClearBackground(RAYWHITE); ClearBackground(RAYWHITE);
DrawTexture(guybrush, 35, 40, WHITE); DrawTexture(scarfy, 15, 40, WHITE);
DrawRectangleLines(35, 40, guybrush.width, guybrush.height, LIME); DrawRectangleLines(15, 40, scarfy.width, scarfy.height, LIME);
DrawRectangleLines(15 + frameRec.x, 40 + frameRec.y, frameRec.width, frameRec.height, RED);
DrawTextureRec(guybrush, frameRec, position, WHITE); // Draw part of the texture DrawText("FRAME SPEED: ", 165, 210, 10, DARKGRAY);
DrawText(FormatText("%02i FPS", framesSpeed), 575, 210, 10, DARKGRAY);
DrawText("PRESS RIGHT/LEFT KEYS to CHANGE SPEED!", 290, 240, 10, DARKGRAY);
DrawRectangleLines(35 + frameRec.x, 40 + frameRec.y, frameRec.width, frameRec.height, RED); for (int i = 0; i < MAX_FRAME_SPEED; i++)
{
if (i < framesSpeed) DrawRectangle(250 + 21*i, 205, 20, 20, RED);
DrawRectangleLines(250 + 21*i, 205, 20, 20, MAROON);
}
DrawText("PRESS RIGHT KEY to", 540, 310, 10, GRAY); DrawTextureRec(scarfy, frameRec, position, WHITE); // Draw part of the texture
DrawText("CHANGE DRAWING RECTANGLE", 520, 330, 10, GRAY);
DrawText("Guybrush Ulysses Threepwood,", 100, 300, 10, GRAY); DrawText("(c) Scarfy sprite by Eiden Marsal", screenWidth - 200, screenHeight - 20, 10, GRAY);
DrawText("main character of the Monkey Island series", 80, 320, 10, GRAY);
DrawText("of computer adventure games by LucasArts.", 80, 340, 10, GRAY);
EndDrawing(); EndDrawing();
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
@ -69,7 +90,7 @@ int main()
// De-Initialization // De-Initialization
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
UnloadTexture(guybrush); // Texture unloading UnloadTexture(scarfy); // Texture unloading
CloseWindow(); // Close window and OpenGL context CloseWindow(); // Close window and OpenGL context
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------

View file

@ -21,10 +21,10 @@ int main()
InitWindow(screenWidth, screenHeight, "raylib [textures] examples - texture source and destination rectangles"); InitWindow(screenWidth, screenHeight, "raylib [textures] examples - texture source and destination rectangles");
// NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required) // NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required)
Texture2D guybrush = LoadTexture("resources/guybrush.png"); // Texture loading Texture2D scarfy = LoadTexture("resources/scarfy.png"); // Texture loading
int frameWidth = guybrush.width/7; int frameWidth = scarfy.width/6;
int frameHeight = guybrush.height; int frameHeight = scarfy.height;
// NOTE: Source rectangle (part of the texture to use for drawing) // NOTE: Source rectangle (part of the texture to use for drawing)
Rectangle sourceRec = { 0, 0, frameWidth, frameHeight }; Rectangle sourceRec = { 0, 0, frameWidth, frameHeight };
@ -59,18 +59,20 @@ int main()
// destRec defines the rectangle where our texture part will fit (scaling it to fit) // destRec defines the rectangle where our texture part will fit (scaling it to fit)
// origin defines the point of the texture used as reference for rotation and scaling // origin defines the point of the texture used as reference for rotation and scaling
// rotation defines the texture rotation (using origin as rotation point) // rotation defines the texture rotation (using origin as rotation point)
DrawTexturePro(guybrush, sourceRec, destRec, origin, rotation, WHITE); DrawTexturePro(scarfy, sourceRec, destRec, origin, rotation, WHITE);
DrawLine(destRec.x, 0, destRec.x, screenHeight, GRAY); DrawLine(destRec.x, 0, destRec.x, screenHeight, GRAY);
DrawLine(0, destRec.y, screenWidth, destRec.y, GRAY); DrawLine(0, destRec.y, screenWidth, destRec.y, GRAY);
DrawText("(c) Scarfy sprite by Eiden Marsal", screenWidth - 200, screenHeight - 20, 10, GRAY);
EndDrawing(); EndDrawing();
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
} }
// De-Initialization // De-Initialization
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
UnloadTexture(guybrush); // Texture unloading UnloadTexture(scarfy); // Texture unloading
CloseWindow(); // Close window and OpenGL context CloseWindow(); // Close window and OpenGL context
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

View file

@ -7541,6 +7541,56 @@ function _UpdateDrawFrame() {
_EndDrawing(); _EndDrawing();
STACKTOP = sp;return; 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 _VectorLength($0) { function _VectorLength($0) {
$0 = $0|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; 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;
@ -7640,13 +7690,6 @@ function _VectorTransform($0,$1) {
HEAPF32[$5>>2] = $47; HEAPF32[$5>>2] = $47;
return; return;
} }
function _VectorZero($0) {
$0 = $0|0;
var label = 0, sp = 0;
sp = STACKTOP;
;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;
return;
}
function _MatrixTranspose($0) { function _MatrixTranspose($0) {
$0 = $0|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 $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;
@ -8597,45 +8640,6 @@ function _ProcessGestureEvent($0) {
} }
} }
} }
function _Vector2Distance($0,$1) {
$0 = $0|0;
$1 = $1|0;
var $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $sqrtf = 0.0, label = 0, sp = 0;
sp = STACKTOP;
$2 = +HEAPF32[$1>>2];
$3 = +HEAPF32[$0>>2];
$4 = $2 - $3;
$5 = ((($1)) + 4|0);
$6 = +HEAPF32[$5>>2];
$7 = ((($0)) + 4|0);
$8 = +HEAPF32[$7>>2];
$9 = $6 - $8;
$10 = $4 * $4;
$11 = $9 * $9;
$12 = $10 + $11;
$sqrtf = (+Math_sqrt((+$12)));
return (+$sqrtf);
}
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 _UpdateGestures() { 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; 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; sp = STACKTOP;

View file

@ -7407,30 +7407,80 @@ function _UpdateDrawFrame() {
_EndDrawing(); _EndDrawing();
STACKTOP = sp;return; 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) { function _VectorSubtract($0,$1,$2) {
$0 = $0|0; $0 = $0|0;
$1 = $1|0; $1 = $1|0;
$2 = $2|0; $2 = $2|0;
var $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 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; 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; sp = STACKTOP;
$3 = +HEAPF32[$1>>2]; $3 = +HEAPF32[$1>>2];
$4 = +HEAPF32[$2>>2]; $4 = +HEAPF32[$2>>2];
$5 = $3 - $4; $5 = $3 - $4;
$6 = ((($1)) + 4|0);
$7 = +HEAPF32[$6>>2];
$8 = ((($2)) + 4|0);
$9 = +HEAPF32[$8>>2];
$10 = $7 - $9;
$11 = ((($1)) + 8|0);
$12 = +HEAPF32[$11>>2];
$13 = ((($2)) + 8|0);
$14 = +HEAPF32[$13>>2];
$15 = $12 - $14;
HEAPF32[$0>>2] = $5; HEAPF32[$0>>2] = $5;
$$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); $6 = ((($0)) + 4|0);
HEAPF32[$$sroa$4$0$$sroa_idx2>>2] = $10; $7 = ((($1)) + 4|0);
$$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0); $8 = +HEAPF32[$7>>2];
HEAPF32[$$sroa$5$0$$sroa_idx4>>2] = $15; $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; return;
} }
function _VectorCrossProduct($0,$1,$2) { function _VectorCrossProduct($0,$1,$2) {
@ -7565,13 +7615,6 @@ function _VectorTransform($0,$1) {
HEAPF32[$5>>2] = $47; HEAPF32[$5>>2] = $47;
return; return;
} }
function _VectorZero($0) {
$0 = $0|0;
var label = 0, sp = 0;
sp = STACKTOP;
;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;
return;
}
function _MatrixTranspose($0) { function _MatrixTranspose($0) {
$0 = $0|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 $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;
@ -8694,45 +8737,6 @@ function _ProcessGestureEvent($0) {
} }
} }
} }
function _Vector2Distance($0,$1) {
$0 = $0|0;
$1 = $1|0;
var $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $sqrtf = 0.0, label = 0, sp = 0;
sp = STACKTOP;
$2 = +HEAPF32[$1>>2];
$3 = +HEAPF32[$0>>2];
$4 = $2 - $3;
$5 = ((($1)) + 4|0);
$6 = +HEAPF32[$5>>2];
$7 = ((($0)) + 4|0);
$8 = +HEAPF32[$7>>2];
$9 = $6 - $8;
$10 = $4 * $4;
$11 = $9 * $9;
$12 = $10 + $11;
$sqrtf = (+Math_sqrt((+$12)));
return (+$sqrtf);
}
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 _UpdateGestures() { 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; 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; sp = STACKTOP;

View file

@ -7319,30 +7319,80 @@ function _UpdateDrawFrame() {
_EndDrawing(); _EndDrawing();
STACKTOP = sp;return; 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) { function _VectorSubtract($0,$1,$2) {
$0 = $0|0; $0 = $0|0;
$1 = $1|0; $1 = $1|0;
$2 = $2|0; $2 = $2|0;
var $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 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; 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; sp = STACKTOP;
$3 = +HEAPF32[$1>>2]; $3 = +HEAPF32[$1>>2];
$4 = +HEAPF32[$2>>2]; $4 = +HEAPF32[$2>>2];
$5 = $3 - $4; $5 = $3 - $4;
$6 = ((($1)) + 4|0);
$7 = +HEAPF32[$6>>2];
$8 = ((($2)) + 4|0);
$9 = +HEAPF32[$8>>2];
$10 = $7 - $9;
$11 = ((($1)) + 8|0);
$12 = +HEAPF32[$11>>2];
$13 = ((($2)) + 8|0);
$14 = +HEAPF32[$13>>2];
$15 = $12 - $14;
HEAPF32[$0>>2] = $5; HEAPF32[$0>>2] = $5;
$$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); $6 = ((($0)) + 4|0);
HEAPF32[$$sroa$4$0$$sroa_idx2>>2] = $10; $7 = ((($1)) + 4|0);
$$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0); $8 = +HEAPF32[$7>>2];
HEAPF32[$$sroa$5$0$$sroa_idx4>>2] = $15; $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; return;
} }
function _VectorCrossProduct($0,$1,$2) { function _VectorCrossProduct($0,$1,$2) {
@ -7477,13 +7527,6 @@ function _VectorTransform($0,$1) {
HEAPF32[$5>>2] = $47; HEAPF32[$5>>2] = $47;
return; return;
} }
function _VectorZero($0) {
$0 = $0|0;
var label = 0, sp = 0;
sp = STACKTOP;
;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;
return;
}
function _MatrixTranspose($0) { function _MatrixTranspose($0) {
$0 = $0|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 $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;
@ -8606,45 +8649,6 @@ function _ProcessGestureEvent($0) {
} }
} }
} }
function _Vector2Distance($0,$1) {
$0 = $0|0;
$1 = $1|0;
var $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $sqrtf = 0.0, label = 0, sp = 0;
sp = STACKTOP;
$2 = +HEAPF32[$1>>2];
$3 = +HEAPF32[$0>>2];
$4 = $2 - $3;
$5 = ((($1)) + 4|0);
$6 = +HEAPF32[$5>>2];
$7 = ((($0)) + 4|0);
$8 = +HEAPF32[$7>>2];
$9 = $6 - $8;
$10 = $4 * $4;
$11 = $9 * $9;
$12 = $10 + $11;
$sqrtf = (+Math_sqrt((+$12)));
return (+$sqrtf);
}
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 _UpdateGestures() { 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; 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; sp = STACKTOP;

View file

@ -7226,30 +7226,80 @@ function _UpdateDrawFrame() {
_EndDrawing(); _EndDrawing();
STACKTOP = sp;return; 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) { function _VectorSubtract($0,$1,$2) {
$0 = $0|0; $0 = $0|0;
$1 = $1|0; $1 = $1|0;
$2 = $2|0; $2 = $2|0;
var $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 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; 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; sp = STACKTOP;
$3 = +HEAPF32[$1>>2]; $3 = +HEAPF32[$1>>2];
$4 = +HEAPF32[$2>>2]; $4 = +HEAPF32[$2>>2];
$5 = $3 - $4; $5 = $3 - $4;
$6 = ((($1)) + 4|0);
$7 = +HEAPF32[$6>>2];
$8 = ((($2)) + 4|0);
$9 = +HEAPF32[$8>>2];
$10 = $7 - $9;
$11 = ((($1)) + 8|0);
$12 = +HEAPF32[$11>>2];
$13 = ((($2)) + 8|0);
$14 = +HEAPF32[$13>>2];
$15 = $12 - $14;
HEAPF32[$0>>2] = $5; HEAPF32[$0>>2] = $5;
$$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); $6 = ((($0)) + 4|0);
HEAPF32[$$sroa$4$0$$sroa_idx2>>2] = $10; $7 = ((($1)) + 4|0);
$$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0); $8 = +HEAPF32[$7>>2];
HEAPF32[$$sroa$5$0$$sroa_idx4>>2] = $15; $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; return;
} }
function _VectorCrossProduct($0,$1,$2) { function _VectorCrossProduct($0,$1,$2) {
@ -7384,13 +7434,6 @@ function _VectorTransform($0,$1) {
HEAPF32[$5>>2] = $47; HEAPF32[$5>>2] = $47;
return; return;
} }
function _VectorZero($0) {
$0 = $0|0;
var label = 0, sp = 0;
sp = STACKTOP;
;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;
return;
}
function _MatrixTranspose($0) { function _MatrixTranspose($0) {
$0 = $0|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 $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;
@ -8513,45 +8556,6 @@ function _ProcessGestureEvent($0) {
} }
} }
} }
function _Vector2Distance($0,$1) {
$0 = $0|0;
$1 = $1|0;
var $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $sqrtf = 0.0, label = 0, sp = 0;
sp = STACKTOP;
$2 = +HEAPF32[$1>>2];
$3 = +HEAPF32[$0>>2];
$4 = $2 - $3;
$5 = ((($1)) + 4|0);
$6 = +HEAPF32[$5>>2];
$7 = ((($0)) + 4|0);
$8 = +HEAPF32[$7>>2];
$9 = $6 - $8;
$10 = $4 * $4;
$11 = $9 * $9;
$12 = $10 + $11;
$sqrtf = (+Math_sqrt((+$12)));
return (+$sqrtf);
}
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 _UpdateGestures() { 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; 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; sp = STACKTOP;

View file

@ -7390,30 +7390,80 @@ function _UpdateDrawFrame() {
_EndDrawing(); _EndDrawing();
STACKTOP = sp;return; 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) { function _VectorSubtract($0,$1,$2) {
$0 = $0|0; $0 = $0|0;
$1 = $1|0; $1 = $1|0;
$2 = $2|0; $2 = $2|0;
var $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 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; 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; sp = STACKTOP;
$3 = +HEAPF32[$1>>2]; $3 = +HEAPF32[$1>>2];
$4 = +HEAPF32[$2>>2]; $4 = +HEAPF32[$2>>2];
$5 = $3 - $4; $5 = $3 - $4;
$6 = ((($1)) + 4|0);
$7 = +HEAPF32[$6>>2];
$8 = ((($2)) + 4|0);
$9 = +HEAPF32[$8>>2];
$10 = $7 - $9;
$11 = ((($1)) + 8|0);
$12 = +HEAPF32[$11>>2];
$13 = ((($2)) + 8|0);
$14 = +HEAPF32[$13>>2];
$15 = $12 - $14;
HEAPF32[$0>>2] = $5; HEAPF32[$0>>2] = $5;
$$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); $6 = ((($0)) + 4|0);
HEAPF32[$$sroa$4$0$$sroa_idx2>>2] = $10; $7 = ((($1)) + 4|0);
$$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0); $8 = +HEAPF32[$7>>2];
HEAPF32[$$sroa$5$0$$sroa_idx4>>2] = $15; $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; return;
} }
function _VectorCrossProduct($0,$1,$2) { function _VectorCrossProduct($0,$1,$2) {
@ -7548,13 +7598,6 @@ function _VectorTransform($0,$1) {
HEAPF32[$5>>2] = $47; HEAPF32[$5>>2] = $47;
return; return;
} }
function _VectorZero($0) {
$0 = $0|0;
var label = 0, sp = 0;
sp = STACKTOP;
;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;
return;
}
function _MatrixTranspose($0) { function _MatrixTranspose($0) {
$0 = $0|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 $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;
@ -8982,45 +9025,6 @@ function _ProcessGestureEvent($0) {
} }
} }
} }
function _Vector2Distance($0,$1) {
$0 = $0|0;
$1 = $1|0;
var $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $sqrtf = 0.0, label = 0, sp = 0;
sp = STACKTOP;
$2 = +HEAPF32[$1>>2];
$3 = +HEAPF32[$0>>2];
$4 = $2 - $3;
$5 = ((($1)) + 4|0);
$6 = +HEAPF32[$5>>2];
$7 = ((($0)) + 4|0);
$8 = +HEAPF32[$7>>2];
$9 = $6 - $8;
$10 = $4 * $4;
$11 = $9 * $9;
$12 = $10 + $11;
$sqrtf = (+Math_sqrt((+$12)));
return (+$sqrtf);
}
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 _UpdateGestures() { 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; 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; sp = STACKTOP;

View file

@ -7190,6 +7190,56 @@ function _UpdateDrawFrame() {
_EndDrawing(); _EndDrawing();
STACKTOP = sp;return; 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 _VectorLength($0) { function _VectorLength($0) {
$0 = $0|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; 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;
@ -7289,13 +7339,6 @@ function _VectorTransform($0,$1) {
HEAPF32[$5>>2] = $47; HEAPF32[$5>>2] = $47;
return; return;
} }
function _VectorZero($0) {
$0 = $0|0;
var label = 0, sp = 0;
sp = STACKTOP;
;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;
return;
}
function _MatrixTranspose($0) { function _MatrixTranspose($0) {
$0 = $0|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 $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;
@ -8246,45 +8289,6 @@ function _ProcessGestureEvent($0) {
} }
} }
} }
function _Vector2Distance($0,$1) {
$0 = $0|0;
$1 = $1|0;
var $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $sqrtf = 0.0, label = 0, sp = 0;
sp = STACKTOP;
$2 = +HEAPF32[$1>>2];
$3 = +HEAPF32[$0>>2];
$4 = $2 - $3;
$5 = ((($1)) + 4|0);
$6 = +HEAPF32[$5>>2];
$7 = ((($0)) + 4|0);
$8 = +HEAPF32[$7>>2];
$9 = $6 - $8;
$10 = $4 * $4;
$11 = $9 * $9;
$12 = $10 + $11;
$sqrtf = (+Math_sqrt((+$12)));
return (+$sqrtf);
}
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 _UpdateGestures() { 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; 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; sp = STACKTOP;

View file

@ -7327,6 +7327,56 @@ function _UpdateDrawFrame() {
_EndDrawing(); _EndDrawing();
STACKTOP = sp;return; 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 _VectorTransform($0,$1) { function _VectorTransform($0,$1) {
$0 = $0|0; $0 = $0|0;
$1 = $1|0; $1 = $1|0;
@ -7385,13 +7435,6 @@ function _VectorTransform($0,$1) {
HEAPF32[$5>>2] = $47; HEAPF32[$5>>2] = $47;
return; return;
} }
function _VectorZero($0) {
$0 = $0|0;
var label = 0, sp = 0;
sp = STACKTOP;
;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;
return;
}
function _MatrixTranspose($0) { function _MatrixTranspose($0) {
$0 = $0|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 $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;
@ -8126,45 +8169,6 @@ function _ProcessGestureEvent($0) {
} }
} }
} }
function _Vector2Distance($0,$1) {
$0 = $0|0;
$1 = $1|0;
var $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $sqrtf = 0.0, label = 0, sp = 0;
sp = STACKTOP;
$2 = +HEAPF32[$1>>2];
$3 = +HEAPF32[$0>>2];
$4 = $2 - $3;
$5 = ((($1)) + 4|0);
$6 = +HEAPF32[$5>>2];
$7 = ((($0)) + 4|0);
$8 = +HEAPF32[$7>>2];
$9 = $6 - $8;
$10 = $4 * $4;
$11 = $9 * $9;
$12 = $10 + $11;
$sqrtf = (+Math_sqrt((+$12)));
return (+$sqrtf);
}
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 _UpdateGestures() { 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; 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; sp = STACKTOP;

View file

@ -7477,6 +7477,56 @@ function _UpdateDrawFrame() {
_EndDrawing(); _EndDrawing();
STACKTOP = sp;return; 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 _VectorLength($0) { function _VectorLength($0) {
$0 = $0|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; 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;
@ -7576,13 +7626,6 @@ function _VectorTransform($0,$1) {
HEAPF32[$5>>2] = $47; HEAPF32[$5>>2] = $47;
return; return;
} }
function _VectorZero($0) {
$0 = $0|0;
var label = 0, sp = 0;
sp = STACKTOP;
;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;
return;
}
function _MatrixTranspose($0) { function _MatrixTranspose($0) {
$0 = $0|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 $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;
@ -8533,45 +8576,6 @@ function _ProcessGestureEvent($0) {
} }
} }
} }
function _Vector2Distance($0,$1) {
$0 = $0|0;
$1 = $1|0;
var $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $sqrtf = 0.0, label = 0, sp = 0;
sp = STACKTOP;
$2 = +HEAPF32[$1>>2];
$3 = +HEAPF32[$0>>2];
$4 = $2 - $3;
$5 = ((($1)) + 4|0);
$6 = +HEAPF32[$5>>2];
$7 = ((($0)) + 4|0);
$8 = +HEAPF32[$7>>2];
$9 = $6 - $8;
$10 = $4 * $4;
$11 = $9 * $9;
$12 = $10 + $11;
$sqrtf = (+Math_sqrt((+$12)));
return (+$sqrtf);
}
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 _UpdateGestures() { 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; 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; sp = STACKTOP;

File diff suppressed because one or more lines are too long

View file

@ -7244,6 +7244,56 @@ function _UpdateDrawFrame() {
_EndDrawing(); _EndDrawing();
STACKTOP = sp;return; 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 _VectorLength($0) { function _VectorLength($0) {
$0 = $0|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; 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;
@ -7343,13 +7393,6 @@ function _VectorTransform($0,$1) {
HEAPF32[$5>>2] = $47; HEAPF32[$5>>2] = $47;
return; return;
} }
function _VectorZero($0) {
$0 = $0|0;
var label = 0, sp = 0;
sp = STACKTOP;
;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;
return;
}
function _MatrixTranspose($0) { function _MatrixTranspose($0) {
$0 = $0|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 $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;
@ -8300,45 +8343,6 @@ function _ProcessGestureEvent($0) {
} }
} }
} }
function _Vector2Distance($0,$1) {
$0 = $0|0;
$1 = $1|0;
var $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $sqrtf = 0.0, label = 0, sp = 0;
sp = STACKTOP;
$2 = +HEAPF32[$1>>2];
$3 = +HEAPF32[$0>>2];
$4 = $2 - $3;
$5 = ((($1)) + 4|0);
$6 = +HEAPF32[$5>>2];
$7 = ((($0)) + 4|0);
$8 = +HEAPF32[$7>>2];
$9 = $6 - $8;
$10 = $4 * $4;
$11 = $9 * $9;
$12 = $10 + $11;
$sqrtf = (+Math_sqrt((+$12)));
return (+$sqrtf);
}
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 _UpdateGestures() { 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; 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; sp = STACKTOP;

View file

@ -7235,6 +7235,56 @@ function _UpdateDrawFrame() {
_EndDrawing(); _EndDrawing();
STACKTOP = sp;return; 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 _VectorLength($0) { function _VectorLength($0) {
$0 = $0|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; 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;
@ -7334,13 +7384,6 @@ function _VectorTransform($0,$1) {
HEAPF32[$5>>2] = $47; HEAPF32[$5>>2] = $47;
return; return;
} }
function _VectorZero($0) {
$0 = $0|0;
var label = 0, sp = 0;
sp = STACKTOP;
;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;
return;
}
function _MatrixTranspose($0) { function _MatrixTranspose($0) {
$0 = $0|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 $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;
@ -8291,45 +8334,6 @@ function _ProcessGestureEvent($0) {
} }
} }
} }
function _Vector2Distance($0,$1) {
$0 = $0|0;
$1 = $1|0;
var $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $sqrtf = 0.0, label = 0, sp = 0;
sp = STACKTOP;
$2 = +HEAPF32[$1>>2];
$3 = +HEAPF32[$0>>2];
$4 = $2 - $3;
$5 = ((($1)) + 4|0);
$6 = +HEAPF32[$5>>2];
$7 = ((($0)) + 4|0);
$8 = +HEAPF32[$7>>2];
$9 = $6 - $8;
$10 = $4 * $4;
$11 = $9 * $9;
$12 = $10 + $11;
$sqrtf = (+Math_sqrt((+$12)));
return (+$sqrtf);
}
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 _UpdateGestures() { 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; 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; sp = STACKTOP;

View file

@ -7229,6 +7229,56 @@ function _UpdateDrawFrame() {
_EndDrawing(); _EndDrawing();
STACKTOP = sp;return; 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 _VectorLength($0) { function _VectorLength($0) {
$0 = $0|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; 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;
@ -7328,13 +7378,6 @@ function _VectorTransform($0,$1) {
HEAPF32[$5>>2] = $47; HEAPF32[$5>>2] = $47;
return; return;
} }
function _VectorZero($0) {
$0 = $0|0;
var label = 0, sp = 0;
sp = STACKTOP;
;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;
return;
}
function _MatrixTranspose($0) { function _MatrixTranspose($0) {
$0 = $0|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 $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;
@ -8285,45 +8328,6 @@ function _ProcessGestureEvent($0) {
} }
} }
} }
function _Vector2Distance($0,$1) {
$0 = $0|0;
$1 = $1|0;
var $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $sqrtf = 0.0, label = 0, sp = 0;
sp = STACKTOP;
$2 = +HEAPF32[$1>>2];
$3 = +HEAPF32[$0>>2];
$4 = $2 - $3;
$5 = ((($1)) + 4|0);
$6 = +HEAPF32[$5>>2];
$7 = ((($0)) + 4|0);
$8 = +HEAPF32[$7>>2];
$9 = $6 - $8;
$10 = $4 * $4;
$11 = $9 * $9;
$12 = $10 + $11;
$sqrtf = (+Math_sqrt((+$12)));
return (+$sqrtf);
}
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 _UpdateGestures() { 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; 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; sp = STACKTOP;

View file

@ -7223,6 +7223,56 @@ function _UpdateDrawFrame() {
_EndDrawing(); _EndDrawing();
STACKTOP = sp;return; 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 _VectorLength($0) { function _VectorLength($0) {
$0 = $0|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; 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;
@ -7322,13 +7372,6 @@ function _VectorTransform($0,$1) {
HEAPF32[$5>>2] = $47; HEAPF32[$5>>2] = $47;
return; return;
} }
function _VectorZero($0) {
$0 = $0|0;
var label = 0, sp = 0;
sp = STACKTOP;
;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;
return;
}
function _MatrixTranspose($0) { function _MatrixTranspose($0) {
$0 = $0|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 $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;
@ -8279,45 +8322,6 @@ function _ProcessGestureEvent($0) {
} }
} }
} }
function _Vector2Distance($0,$1) {
$0 = $0|0;
$1 = $1|0;
var $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $sqrtf = 0.0, label = 0, sp = 0;
sp = STACKTOP;
$2 = +HEAPF32[$1>>2];
$3 = +HEAPF32[$0>>2];
$4 = $2 - $3;
$5 = ((($1)) + 4|0);
$6 = +HEAPF32[$5>>2];
$7 = ((($0)) + 4|0);
$8 = +HEAPF32[$7>>2];
$9 = $6 - $8;
$10 = $4 * $4;
$11 = $9 * $9;
$12 = $10 + $11;
$sqrtf = (+Math_sqrt((+$12)));
return (+$sqrtf);
}
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 _UpdateGestures() { 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; 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; sp = STACKTOP;

View file

@ -7391,30 +7391,80 @@ function _UpdateDrawFrame() {
_EndDrawing(); _EndDrawing();
STACKTOP = sp;return; 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) { function _VectorSubtract($0,$1,$2) {
$0 = $0|0; $0 = $0|0;
$1 = $1|0; $1 = $1|0;
$2 = $2|0; $2 = $2|0;
var $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 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; 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; sp = STACKTOP;
$3 = +HEAPF32[$1>>2]; $3 = +HEAPF32[$1>>2];
$4 = +HEAPF32[$2>>2]; $4 = +HEAPF32[$2>>2];
$5 = $3 - $4; $5 = $3 - $4;
$6 = ((($1)) + 4|0);
$7 = +HEAPF32[$6>>2];
$8 = ((($2)) + 4|0);
$9 = +HEAPF32[$8>>2];
$10 = $7 - $9;
$11 = ((($1)) + 8|0);
$12 = +HEAPF32[$11>>2];
$13 = ((($2)) + 8|0);
$14 = +HEAPF32[$13>>2];
$15 = $12 - $14;
HEAPF32[$0>>2] = $5; HEAPF32[$0>>2] = $5;
$$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); $6 = ((($0)) + 4|0);
HEAPF32[$$sroa$4$0$$sroa_idx2>>2] = $10; $7 = ((($1)) + 4|0);
$$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0); $8 = +HEAPF32[$7>>2];
HEAPF32[$$sroa$5$0$$sroa_idx4>>2] = $15; $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; return;
} }
function _VectorCrossProduct($0,$1,$2) { function _VectorCrossProduct($0,$1,$2) {
@ -7549,13 +7599,6 @@ function _VectorTransform($0,$1) {
HEAPF32[$5>>2] = $47; HEAPF32[$5>>2] = $47;
return; return;
} }
function _VectorZero($0) {
$0 = $0|0;
var label = 0, sp = 0;
sp = STACKTOP;
;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;
return;
}
function _MatrixTranspose($0) { function _MatrixTranspose($0) {
$0 = $0|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 $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;
@ -8696,45 +8739,6 @@ function _ProcessGestureEvent($0) {
} }
} }
} }
function _Vector2Distance($0,$1) {
$0 = $0|0;
$1 = $1|0;
var $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $sqrtf = 0.0, label = 0, sp = 0;
sp = STACKTOP;
$2 = +HEAPF32[$1>>2];
$3 = +HEAPF32[$0>>2];
$4 = $2 - $3;
$5 = ((($1)) + 4|0);
$6 = +HEAPF32[$5>>2];
$7 = ((($0)) + 4|0);
$8 = +HEAPF32[$7>>2];
$9 = $6 - $8;
$10 = $4 * $4;
$11 = $9 * $9;
$12 = $10 + $11;
$sqrtf = (+Math_sqrt((+$12)));
return (+$sqrtf);
}
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 _UpdateGestures() { 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; 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; sp = STACKTOP;

View file

@ -7287,30 +7287,80 @@ function _UpdateDrawFrame() {
_EndDrawing(); _EndDrawing();
STACKTOP = sp;return; 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) { function _VectorSubtract($0,$1,$2) {
$0 = $0|0; $0 = $0|0;
$1 = $1|0; $1 = $1|0;
$2 = $2|0; $2 = $2|0;
var $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 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; 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; sp = STACKTOP;
$3 = +HEAPF32[$1>>2]; $3 = +HEAPF32[$1>>2];
$4 = +HEAPF32[$2>>2]; $4 = +HEAPF32[$2>>2];
$5 = $3 - $4; $5 = $3 - $4;
$6 = ((($1)) + 4|0);
$7 = +HEAPF32[$6>>2];
$8 = ((($2)) + 4|0);
$9 = +HEAPF32[$8>>2];
$10 = $7 - $9;
$11 = ((($1)) + 8|0);
$12 = +HEAPF32[$11>>2];
$13 = ((($2)) + 8|0);
$14 = +HEAPF32[$13>>2];
$15 = $12 - $14;
HEAPF32[$0>>2] = $5; HEAPF32[$0>>2] = $5;
$$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); $6 = ((($0)) + 4|0);
HEAPF32[$$sroa$4$0$$sroa_idx2>>2] = $10; $7 = ((($1)) + 4|0);
$$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0); $8 = +HEAPF32[$7>>2];
HEAPF32[$$sroa$5$0$$sroa_idx4>>2] = $15; $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; return;
} }
function _VectorCrossProduct($0,$1,$2) { function _VectorCrossProduct($0,$1,$2) {
@ -7445,13 +7495,6 @@ function _VectorTransform($0,$1) {
HEAPF32[$5>>2] = $47; HEAPF32[$5>>2] = $47;
return; return;
} }
function _VectorZero($0) {
$0 = $0|0;
var label = 0, sp = 0;
sp = STACKTOP;
;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;
return;
}
function _MatrixTranspose($0) { function _MatrixTranspose($0) {
$0 = $0|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 $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;
@ -8672,45 +8715,6 @@ function _ProcessGestureEvent($0) {
} }
} }
} }
function _Vector2Distance($0,$1) {
$0 = $0|0;
$1 = $1|0;
var $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $sqrtf = 0.0, label = 0, sp = 0;
sp = STACKTOP;
$2 = +HEAPF32[$1>>2];
$3 = +HEAPF32[$0>>2];
$4 = $2 - $3;
$5 = ((($1)) + 4|0);
$6 = +HEAPF32[$5>>2];
$7 = ((($0)) + 4|0);
$8 = +HEAPF32[$7>>2];
$9 = $6 - $8;
$10 = $4 * $4;
$11 = $9 * $9;
$12 = $10 + $11;
$sqrtf = (+Math_sqrt((+$12)));
return (+$sqrtf);
}
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 _UpdateGestures() { 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; 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; sp = STACKTOP;

View file

@ -1,209 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>loading...</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="title" content="raylib - example">
<meta name="description" content="raylib is a simple and easy-to-use library to learn videogames programming. This a small example of what you can do.">
<meta name="keywords" content="raylib, videogames, programming, C, C++, library, learn, study, simple, easy, free, open source, raysan">
<meta name="viewport" content="width=device-width">
<!-- Facebook metatags for sharing -->
<meta property="og:title" content="raylib - example"/>
<meta property="og:image" content="http://www.raylib.com/common/img/fb_raylib_logo.png"/>
<meta property="og:url" content="http://www.raylib.com" />
<meta property="og:site_name" content="raylib"/>
<meta property="og:description" content="This a small example of what you can do with raylib"/>
<!-- Add jQuery library -->
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<!-- hightlight.js - Syntax highlighting for the Web -->
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.1/styles/default.min.css">
<script src="http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.1/highlight.min.js"></script>
<style type="text/css">
@font-face {
font-family: 'grixel_acme_7_wide_xtnd';
src: url('../../font/acme_7_wide_xtnd.eot');
src: url('../../font/acme_7_wide_xtnd.eot?#iefix') format('embedded-opentype'),
url('../../font/acme_7_wide_xtnd.woff') format('woff'),
url('../../font/acme_7_wide_xtnd.ttf') format('truetype');
font-weight: normal;
font-style: normal;
font-size-adjust:0.49;
}
#eximage { width: 802px; height: 452px; text-align: center; }
#eximage img { margin: 0 auto; border: 1px solid; border-color: black; }
#eximage canvas { position: relative; top: 1px; left: 1px; border: 1px solid red; }
pre { width: 802px!important;}
pre code{ border: 1px solid; border-color:#b0b0b0; height:auto; }
.exdownbtn{ margin-right: 20px; width:220px; height:30px; float:left; position: relative; cursor:pointer; font-weight:bold; font-size:10px;
line-height:30px; text-align: center; border-width:5px; background-color:#e1e1e1; color:#5c5a5a;
border:4px solid #898888; font-family: grixel_acme_7_wide_xtnd, Courier New, Verdana, Arial;}
#exdowncode .exdownbtn:hover{background-color:#f0d6d6; color:#c55757; border:4px solid #e66666;}
#exdownexec .exdownbtn:hover{background-color:#bedce8; color:#417794; border:4px solid #5d9cbd;}
.fancybox-wrap fancybox-desktop fancybox-type-iframe fancybox-opened { width: 860px!important;}
.fancybox-inner { width: 850px!important; }
.fancybox-iframe { width: 830px!important; }
</style>
<script type="text/javascript">
$(document).ready(function() {
var mainUrl = $(location).attr('href');
var name = mainUrl.slice(mainUrl.indexOf('=') + 1);
document.title = "raylib - " + name.replace('_', ' ');
var srcUrl = '../src/' + name + '.c';
var imgUrl = '../img/' + name + '.png';
$('#eximage img').attr('src', imgUrl);
$.get(srcUrl, function(data) {
$('pre code').text(data);
$('pre code').each(function(i, e) {hljs.highlightBlock(e)});
}, 'text');
// Quick hack for some examples not working on web
if ((name == "core/core_drop_files") ||
(name == "core/core_storage_values"))
{
$('#eximage').append('<img src="' + imgUrl + '" alt=" ">');
}
else
{
// #eximage filling code: canvas sample and image
$('#eximage').append(
'<canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()">' +
'<img src="' + imgUrl + '" alt=" ">' +
'</canvas>');
Module.canvas = document.getElementById('canvas');
Module.canvas.addEventListener("webglcontextlost", function(e) { alert('WebGL context lost. You will need to reload the page.'); e.preventDefault(); }, false);
var jsUrl = '../web/' + name + '.js';
// Run emscripten example
$.getScript(jsUrl, function() {});
}
});
</script>
</head>
<body>
<div class="emscripten">
<progress value="0" max="100" id="progress" hidden=1></progress>
</div>
<!-- Canvas example or image, filled on loading -->
<div id="eximage"></div>
<!--<textarea id="output" rows="8"></textarea>-->
<pre><code class="cpp"></code></pre>
<script type='text/javascript'>
//var statusElement = document.getElementById('status');
//var progressElement = document.getElementById('progress');
//var spinnerElement = document.getElementById('spinner');
var Module = {
preRun: [],
postRun: [],
print: (function() {
var element = document.getElementById('output');
if (element) element.value = ''; // clear browser cache
return function(text) {
text = Array.prototype.slice.call(arguments).join(' ');
// These replacements are necessary if you render to raw HTML
//text = text.replace(/&/g, "&amp;");
//text = text.replace(/</g, "&lt;");
//text = text.replace(/>/g, "&gt;");
//text = text.replace('\n', '<br>', 'g');
console.log(text);
if (element) {
element.value += text + "\n";
element.scrollTop = element.scrollHeight; // focus on bottom
}
};
})(),
printErr: function(text) {
text = Array.prototype.slice.call(arguments).join(' ');
if (0) { // XXX disabled for safety typeof dump == 'function') {
dump(text + '\n'); // fast, straight to the real console
} else {
console.error(text);
}
},
canvas: (function() {
// NOTE: canvas element eventListener is added after appending!
//var canvas = document.getElementById('canvas');
// As a default initial behavior, pop up an alert when webgl context is lost. To make your
// application robust, you may want to override this behavior before shipping!
// See http://www.khronos.org/registry/webgl/specs/latest/1.0/#5.15.2
//canvas.addEventListener("webglcontextlost", function(e) { alert('WebGL context lost. You will need to reload the page.'); e.preventDefault(); }, false);
//return canvas;
})(),
setStatus: function(text) {
if (!Module.setStatus.last) Module.setStatus.last = { time: Date.now(), text: '' };
if (text === Module.setStatus.text) return;
var m = text.match(/([^(]+)\((\d+(\.\d+)?)\/(\d+)\)/);
var now = Date.now();
if (m && now - Date.now() < 30) return; // if this is a progress update, skip it if too soon
if (m) {
text = m[1];
//progressElement.value = parseInt(m[2])*100;
//progressElement.max = parseInt(m[4])*100;
//progressElement.hidden = false;
//spinnerElement.hidden = false;
} else {
//progressElement.value = null;
//progressElement.max = null;
//progressElement.hidden = true;
//if (!text) spinnerElement.style.display = 'none';
}
//statusElement.innerHTML = text;
},
totalDependencies: 0,
monitorRunDependencies: function(left) {
this.totalDependencies = Math.max(this.totalDependencies, left);
Module.setStatus(left ? 'Preparing... (' + (this.totalDependencies-left) + '/' + this.totalDependencies + ')' : 'All downloads complete.');
}
};
Module.setStatus('Downloading...');
window.onerror = function(event) {
// TODO: do not warn on ok events like simulating an infinite loop or exitStatus
Module.setStatus('Exception thrown, see JavaScript console');
//spinnerElement.style.display = 'none';
Module.setStatus = function(text) {
if (text) Module.printErr('[post-exception status] ' + text);
};
};
</script>
<!--<script async type="text/javascript" src="../examples/web/core_basic_window.js"></script>-->
<!-- Google Analytics tracking code -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','http://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-45733555-1', 'raylib.com');
ga('require', 'linkid', 'linkid.js');
ga('send', 'pageview');
</script>
</body>
</html>

View file

@ -29,10 +29,14 @@
PLATFORM ?= PLATFORM_DESKTOP PLATFORM ?= PLATFORM_DESKTOP
# define NO to use OpenAL Soft as static library (shared by default) # define NO to use OpenAL Soft as static library (shared by default)
SHARED_OPENAL ?= NO SHARED_OPENAL ?= YES
ifeq ($(PLATFORM),PLATFORM_WEB)
SHARED_OPENAL = NO
endif
# define raylib directory for include and library # define raylib directory for include and library
RAYLIB_PATH = C:\GitHub\raylib RAYLIB_PATH = D:\GitHub\raylib
# determine PLATFORM_OS in case PLATFORM_DESKTOP selected # determine PLATFORM_OS in case PLATFORM_DESKTOP selected
ifeq ($(PLATFORM),PLATFORM_DESKTOP) ifeq ($(PLATFORM),PLATFORM_DESKTOP)
@ -77,7 +81,7 @@ endif
# -std=gnu99 defines C language mode (GNU C from 1999 revision) # -std=gnu99 defines C language mode (GNU C from 1999 revision)
# -fgnu89-inline declaring inline functions support (GCC optimized) # -fgnu89-inline declaring inline functions support (GCC optimized)
# -Wno-missing-braces ignore invalid warning (GCC bug 53119) # -Wno-missing-braces ignore invalid warning (GCC bug 53119)
# -D_DEFAULT_SOURCE use with -std=c99 on Linux to enable timespec and drflac # -D_DEFAULT_SOURCE use with -std=c99 on Linux and PLATFORM_WEB, required for timespec
ifeq ($(PLATFORM),PLATFORM_DESKTOP) ifeq ($(PLATFORM),PLATFORM_DESKTOP)
ifeq ($(PLATFORM_OS),WINDOWS) ifeq ($(PLATFORM_OS),WINDOWS)
CFLAGS = -O2 -s -Wall -std=c99 CFLAGS = -O2 -s -Wall -std=c99
@ -90,11 +94,12 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
endif endif
endif endif
ifeq ($(PLATFORM),PLATFORM_WEB) ifeq ($(PLATFORM),PLATFORM_WEB)
CFLAGS = -O1 -Wall -std=c99 -s USE_GLFW=3 -s ASSERTIONS=1 --profiling CFLAGS = -O1 -Wall -std=c99 -D_DEFAULT_SOURCE -s USE_GLFW=3 -s ASSERTIONS=1 --profiling
# -O2 # if used, also set --memory-init-file 0 # -O2 # if used, also set --memory-init-file 0
# --memory-init-file 0 # to avoid an external memory initialization code file (.mem) # --memory-init-file 0 # to avoid an external memory initialization code file (.mem)
# -s ALLOW_MEMORY_GROWTH=1 # to allow memory resizing # -s ALLOW_MEMORY_GROWTH=1 # to allow memory resizing
# -s TOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB) # -s TOTAL_MEMORY=16777216 # to specify heap memory size (default = 16MB)
# -preload-file file.res # embbed file.res resource into .data file
endif endif
ifeq ($(PLATFORM),PLATFORM_RPI) ifeq ($(PLATFORM),PLATFORM_RPI)
CFLAGS = -O2 -s -Wall -std=gnu99 -fgnu89-inline CFLAGS = -O2 -s -Wall -std=gnu99 -fgnu89-inline
@ -236,28 +241,31 @@ EXAMPLES = \
shapes/shapes_basic_shapes \ shapes/shapes_basic_shapes \
shapes/shapes_colors_palette \ shapes/shapes_colors_palette \
shapes/shapes_logo_raylib_anim \ shapes/shapes_logo_raylib_anim \
shapes/shapes_lines_bezier \
textures/textures_logo_raylib \ textures/textures_logo_raylib \
textures/textures_image_loading \ textures/textures_image_loading \
textures/textures_rectangle \ textures/textures_rectangle \
textures/textures_srcrec_dstrec \ textures/textures_srcrec_dstrec \
textures/textures_to_image \ textures/textures_to_image \
textures/textures_raw_data \ textures/textures_raw_data \
textures/textures_particles_blending \
textures/textures_image_processing \ textures/textures_image_processing \
textures/textures_image_drawing \ textures/textures_image_drawing \
text/text_sprite_fonts \ text/text_sprite_fonts \
text/text_bmfont_ttf \ text/text_bmfont_ttf \
text/text_rbmf_fonts \ text/text_raylib_fonts \
text/text_format_text \ text/text_format_text \
text/text_writing_anim \ text/text_writing_anim \
text/text_ttf_loading \ text/text_ttf_loading \
text/text_bmfont_unordered \ text/text_bmfont_unordered \
text/text_input_box \
models/models_geometric_shapes \ models/models_geometric_shapes \
models/models_box_collisions \ models/models_box_collisions \
models/models_billboard \ models/models_billboard \
models/models_obj_loading \ models/models_obj_loading \
models/models_heightmap \ models/models_heightmap \
models/models_cubicmap \ models/models_cubicmap \
models/models_ray_picking \ models/models_mesh_picking \
shaders/shaders_model_shader \ shaders/shaders_model_shader \
shaders/shaders_shapes_textures \ shaders/shaders_shapes_textures \
shaders/shaders_custom_uniform \ shaders/shaders_custom_uniform \
@ -266,6 +274,11 @@ EXAMPLES = \
audio/audio_music_stream \ audio/audio_music_stream \
audio/audio_module_playing \ audio/audio_module_playing \
audio/audio_raw_stream \ audio/audio_raw_stream \
physac/physics_demo \
physac/physics_friction \
physac/physics_movement \
physac/physics_restitution \
physac/physics_shatter \
# typing 'make' will invoke the default target entry called 'all', # typing 'make' will invoke the default target entry called 'all',
@ -373,6 +386,10 @@ shapes/shapes_colors_palette: shapes/shapes_colors_palette.c
shapes/shapes_logo_raylib_anim: shapes/shapes_logo_raylib_anim.c shapes/shapes_logo_raylib_anim: shapes/shapes_logo_raylib_anim.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL)
# compile [shapes] example - lines bezier
shapes/shapes_lines_bezier: shapes/shapes_lines_bezier.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL)
# compile [textures] example - raylib logo texture loading # compile [textures] example - raylib logo texture loading
textures/textures_logo_raylib: textures/textures_logo_raylib.c textures/textures_logo_raylib: textures/textures_logo_raylib.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL)
@ -399,7 +416,13 @@ textures/textures_to_image: textures/textures_to_image.c
# compile [textures] example - texture raw data # compile [textures] example - texture raw data
textures/textures_raw_data: textures/textures_raw_data.c textures/textures_raw_data: textures/textures_raw_data.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) \
--preload-file textures/resources/fudesumi.raw@resources/fudesumi.raw
# compile [textures] example - texture particles blending
textures/textures_particles_blending: textures/textures_particles_blending.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) \
--preload-file textures/resources/smoke.png@resources/smoke.png
# compile [textures] example - texture image processing # compile [textures] example - texture image processing
textures/textures_image_processing: textures/textures_image_processing.c textures/textures_image_processing: textures/textures_image_processing.c
@ -426,17 +449,17 @@ text/text_bmfont_ttf: text/text_bmfont_ttf.c
--preload-file text/resources/bmfont.png@resources/bmfont.png \ --preload-file text/resources/bmfont.png@resources/bmfont.png \
--preload-file text/resources/pixantiqua.ttf@resources/pixantiqua.ttf --preload-file text/resources/pixantiqua.ttf@resources/pixantiqua.ttf
# compile [text] example - raylib bitmap fonts (rBMF) # compile [text] example - raylib fonts
text/text_rbmf_fonts: text/text_rbmf_fonts.c text/text_raylib_fonts: text/text_raylib_fonts.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) \ $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) \
--preload-file text/resources/fonts/alagard.rbmf \ --preload-file text/resources/fonts/alagard.png@resources/fonts/alagard.png \
--preload-file text/resources/fonts/pixelplay.rbmf \ --preload-file text/resources/fonts/pixelplay.png@resources/fonts/pixelplay.png \
--preload-file text/resources/fonts/mecha.rbmf \ --preload-file text/resources/fonts/mecha.png@resources/fonts/mecha.png \
--preload-file text/resources/fonts/setback.rbmf \ --preload-file text/resources/fonts/setback.png@resources/fonts/setback.png \
--preload-file text/resources/fonts/romulus.rbmf \ --preload-file text/resources/fonts/romulus.png@resources/fonts/romulus.png \
--preload-file text/resources/fonts/pixantiqua.rbmf \ --preload-file text/resources/fonts/pixantiqua.png@resources/fonts/pixantiqua.png \
--preload-file text/resources/fonts/alpha_beta.rbmf \ --preload-file text/resources/fonts/alpha_beta.png@resources/fonts/alpha_beta.png \
--preload-file text/resources/fonts/jupiter_crash.rbmf --preload-file text/resources/fonts/jupiter_crash.png@resources/fonts/jupiter_crash.png
# compile [text] example - text formatting # compile [text] example - text formatting
text/text_format_text: text/text_format_text.c text/text_format_text: text/text_format_text.c
@ -457,6 +480,10 @@ text/text_bmfont_unordered: text/text_bmfont_unordered.c
--preload-file text/resources/pixantiqua.fnt@resources/pixantiqua.fnt \ --preload-file text/resources/pixantiqua.fnt@resources/pixantiqua.fnt \
--preload-file text/resources/pixantiqua_0.png@resources/pixantiqua_0.png --preload-file text/resources/pixantiqua_0.png@resources/pixantiqua_0.png
# compile [text] example - text input box
text/text_input_box: text/text_input_box.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL)
# compile [models] example - basic geometric 3d shapes # compile [models] example - basic geometric 3d shapes
models/models_geometric_shapes: models/models_geometric_shapes.c models/models_geometric_shapes: models/models_geometric_shapes.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL)
@ -491,8 +518,8 @@ models/models_cubicmap: models/models_cubicmap.c
--preload-file models/resources/cubicmap.png@resources/cubicmap.png \ --preload-file models/resources/cubicmap.png@resources/cubicmap.png \
--preload-file models/resources/cubicmap_atlas.png@resources/cubicmap_atlas.png --preload-file models/resources/cubicmap_atlas.png@resources/cubicmap_atlas.png
# compile [models] example - model ray picking # compile [models] example - model mesh picking
models/models_ray_picking: models/models_ray_picking.c models/models_mesh_picking: models/models_mesh_picking.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) \ $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) \
--preload-file models/resources/tower.obj@resources/tower.obj \ --preload-file models/resources/tower.obj@resources/tower.obj \
--preload-file models/resources/tower.png@resources/tower.png --preload-file models/resources/tower.png@resources/tower.png
@ -508,7 +535,7 @@ shaders/shaders_model_shader: shaders/shaders_model_shader.c
# compile [shaders] example - shapes texture shader # compile [shaders] example - shapes texture shader
shaders/shaders_shapes_textures: shaders/shaders_shapes_textures.c shaders/shaders_shapes_textures: shaders/shaders_shapes_textures.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) \ $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) \
--preload-file shaders/resources/sonic.png@resources/sonic.png \ --preload-file shaders/resources/fudesumi.png@resources/fudesumi.png \
--preload-file shaders/resources/shaders/glsl100/base.vs@resources/shaders/glsl100/base.vs \ --preload-file shaders/resources/shaders/glsl100/base.vs@resources/shaders/glsl100/base.vs \
--preload-file shaders/resources/shaders/glsl100/grayscale.fs@resources/shaders/glsl100/grayscale.fs --preload-file shaders/resources/shaders/glsl100/grayscale.fs@resources/shaders/glsl100/grayscale.fs
@ -529,25 +556,44 @@ shaders/shaders_postprocessing: shaders/shaders_postprocessing.c
--preload-file shaders/resources/shaders/glsl100/bloom.fs@resources/shaders/glsl100/bloom.fs --preload-file shaders/resources/shaders/glsl100/bloom.fs@resources/shaders/glsl100/bloom.fs
# compile [audio] example - sound loading and playing (WAV and OGG) # compile [audio] example - sound loading and playing (WAV and OGG)
audio_sound_loading: audio_sound_loading.c audio/audio_sound_loading: audio/audio_sound_loading.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) \ $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) \
--preload-file audio/resources/weird.wav@resources/weird.wav \ --preload-file audio/resources/weird.wav@resources/weird.wav \
--preload-file audio/resources/tanatana.ogg@resources/tanatana.ogg --preload-file audio/resources/tanatana.ogg@resources/tanatana.ogg
# compile [audio] example - music stream playing (OGG) # compile [audio] example - music stream playing (OGG)
audio_music_stream: audio_music_stream.c audio/audio_music_stream: audio/audio_music_stream.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) \ $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) \
--preload-file audio/resources/guitar_noodling.ogg@resources/guitar_noodling.ogg --preload-file audio/resources/guitar_noodling.ogg@resources/guitar_noodling.ogg
# compile [audio] example - music stream playing (OGG) # compile [audio] example - module playing (XM)
audio_module_playing: audio_module_playing.c audio/audio_module_playing: audio/audio_module_playing.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) \ $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) \
--preload-file audio/resources/mini1111.xm@resources/mini1111.xm --preload-file audio/resources/mini1111.xm@resources/mini1111.xm
# compile [audio] example - music stream playing (OGG) # compile [audio] example - raw audio streaming
audio_raw_stream: audio_raw_stream.c audio/audio_raw_stream: audio/audio_raw_stream.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) -s ALLOW_MEMORY_GROWTH=1 $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL) -s ALLOW_MEMORY_GROWTH=1
# compile [physac] example - physics demo
physac/physics_demo: physac/physics_demo.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -static -lpthread -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL)
# compile [physac] example - physics friction
physac/physics_friction: physac/physics_friction.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -static -lpthread -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL)
# compile [physac] example - physics movement
physac/physics_movement: physac/physics_movement.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -static -lpthread -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL)
# compile [physac] example - physics restitution
physac/physics_restitution: physac/physics_restitution.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -static -lpthread -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL)
# compile [physac] example - physics shatter
physac/physics_shatter: physac/physics_shatter.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -static -lpthread -D$(PLATFORM) $(WINFLAGS) $(WEB_SHELL)
# fix dylib install path name for each executable (MAC) # fix dylib install path name for each executable (MAC)
fix_dylib: fix_dylib:
@ -565,7 +611,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
ifeq ($(PLATFORM_OS),LINUX) ifeq ($(PLATFORM_OS),LINUX)
find -type f -executable | xargs file -i | grep -E 'x-object|x-archive|x-sharedlib|x-executable' | rev | cut -d ':' -f 2- | rev | xargs rm -f find -type f -executable | xargs file -i | grep -E 'x-object|x-archive|x-sharedlib|x-executable' | rev | cut -d ':' -f 2- | rev | xargs rm -f
else else
del *.o *.exe del *.o *.exe /s
endif endif
endif endif
endif endif
@ -574,6 +620,7 @@ ifeq ($(PLATFORM),PLATFORM_RPI)
rm -f *.o rm -f *.o
endif endif
ifeq ($(PLATFORM),PLATFORM_WEB) ifeq ($(PLATFORM),PLATFORM_WEB)
del *.o *.html *.js # TODO: Remove all generated files in all folders... avoid deleting loader.html!
del *.o *.html *.js *.data
endif endif
@echo Cleaning done @echo Cleaning done

File diff suppressed because one or more lines are too long

View file

@ -7406,30 +7406,80 @@ function _UpdateDrawFrame() {
_EndDrawing(); _EndDrawing();
STACKTOP = sp;return; 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) { function _VectorSubtract($0,$1,$2) {
$0 = $0|0; $0 = $0|0;
$1 = $1|0; $1 = $1|0;
$2 = $2|0; $2 = $2|0;
var $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 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; 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; sp = STACKTOP;
$3 = +HEAPF32[$1>>2]; $3 = +HEAPF32[$1>>2];
$4 = +HEAPF32[$2>>2]; $4 = +HEAPF32[$2>>2];
$5 = $3 - $4; $5 = $3 - $4;
$6 = ((($1)) + 4|0);
$7 = +HEAPF32[$6>>2];
$8 = ((($2)) + 4|0);
$9 = +HEAPF32[$8>>2];
$10 = $7 - $9;
$11 = ((($1)) + 8|0);
$12 = +HEAPF32[$11>>2];
$13 = ((($2)) + 8|0);
$14 = +HEAPF32[$13>>2];
$15 = $12 - $14;
HEAPF32[$0>>2] = $5; HEAPF32[$0>>2] = $5;
$$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); $6 = ((($0)) + 4|0);
HEAPF32[$$sroa$4$0$$sroa_idx2>>2] = $10; $7 = ((($1)) + 4|0);
$$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0); $8 = +HEAPF32[$7>>2];
HEAPF32[$$sroa$5$0$$sroa_idx4>>2] = $15; $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; return;
} }
function _VectorCrossProduct($0,$1,$2) { function _VectorCrossProduct($0,$1,$2) {
@ -7564,13 +7614,6 @@ function _VectorTransform($0,$1) {
HEAPF32[$5>>2] = $47; HEAPF32[$5>>2] = $47;
return; return;
} }
function _VectorZero($0) {
$0 = $0|0;
var label = 0, sp = 0;
sp = STACKTOP;
;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;
return;
}
function _MatrixTranspose($0) { function _MatrixTranspose($0) {
$0 = $0|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 $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;
@ -8693,45 +8736,6 @@ function _ProcessGestureEvent($0) {
} }
} }
} }
function _Vector2Distance($0,$1) {
$0 = $0|0;
$1 = $1|0;
var $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $sqrtf = 0.0, label = 0, sp = 0;
sp = STACKTOP;
$2 = +HEAPF32[$1>>2];
$3 = +HEAPF32[$0>>2];
$4 = $2 - $3;
$5 = ((($1)) + 4|0);
$6 = +HEAPF32[$5>>2];
$7 = ((($0)) + 4|0);
$8 = +HEAPF32[$7>>2];
$9 = $6 - $8;
$10 = $4 * $4;
$11 = $9 * $9;
$12 = $10 + $11;
$sqrtf = (+Math_sqrt((+$12)));
return (+$sqrtf);
}
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 _UpdateGestures() { 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; 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; sp = STACKTOP;

File diff suppressed because one or more lines are too long

View file

@ -7360,30 +7360,80 @@ function _UpdateDrawFrame() {
_EndDrawing(); _EndDrawing();
STACKTOP = sp;return; 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) { function _VectorSubtract($0,$1,$2) {
$0 = $0|0; $0 = $0|0;
$1 = $1|0; $1 = $1|0;
$2 = $2|0; $2 = $2|0;
var $$sroa$4$0$$sroa_idx2 = 0, $$sroa$5$0$$sroa_idx4 = 0, $10 = 0.0, $11 = 0, $12 = 0.0, $13 = 0, $14 = 0.0, $15 = 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; 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; sp = STACKTOP;
$3 = +HEAPF32[$1>>2]; $3 = +HEAPF32[$1>>2];
$4 = +HEAPF32[$2>>2]; $4 = +HEAPF32[$2>>2];
$5 = $3 - $4; $5 = $3 - $4;
$6 = ((($1)) + 4|0);
$7 = +HEAPF32[$6>>2];
$8 = ((($2)) + 4|0);
$9 = +HEAPF32[$8>>2];
$10 = $7 - $9;
$11 = ((($1)) + 8|0);
$12 = +HEAPF32[$11>>2];
$13 = ((($2)) + 8|0);
$14 = +HEAPF32[$13>>2];
$15 = $12 - $14;
HEAPF32[$0>>2] = $5; HEAPF32[$0>>2] = $5;
$$sroa$4$0$$sroa_idx2 = ((($0)) + 4|0); $6 = ((($0)) + 4|0);
HEAPF32[$$sroa$4$0$$sroa_idx2>>2] = $10; $7 = ((($1)) + 4|0);
$$sroa$5$0$$sroa_idx4 = ((($0)) + 8|0); $8 = +HEAPF32[$7>>2];
HEAPF32[$$sroa$5$0$$sroa_idx4>>2] = $15; $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; return;
} }
function _VectorCrossProduct($0,$1,$2) { function _VectorCrossProduct($0,$1,$2) {
@ -7518,13 +7568,6 @@ function _VectorTransform($0,$1) {
HEAPF32[$5>>2] = $47; HEAPF32[$5>>2] = $47;
return; return;
} }
function _VectorZero($0) {
$0 = $0|0;
var label = 0, sp = 0;
sp = STACKTOP;
;HEAP32[$0>>2]=0|0;HEAP32[$0+4>>2]=0|0;HEAP32[$0+8>>2]=0|0;
return;
}
function _MatrixTranspose($0) { function _MatrixTranspose($0) {
$0 = $0|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 $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;
@ -8647,45 +8690,6 @@ function _ProcessGestureEvent($0) {
} }
} }
} }
function _Vector2Distance($0,$1) {
$0 = $0|0;
$1 = $1|0;
var $10 = 0.0, $11 = 0.0, $12 = 0.0, $2 = 0.0, $3 = 0.0, $4 = 0.0, $5 = 0, $6 = 0.0, $7 = 0, $8 = 0.0, $9 = 0.0, $sqrtf = 0.0, label = 0, sp = 0;
sp = STACKTOP;
$2 = +HEAPF32[$1>>2];
$3 = +HEAPF32[$0>>2];
$4 = $2 - $3;
$5 = ((($1)) + 4|0);
$6 = +HEAPF32[$5>>2];
$7 = ((($0)) + 4|0);
$8 = +HEAPF32[$7>>2];
$9 = $6 - $8;
$10 = $4 * $4;
$11 = $9 * $9;
$12 = $10 + $11;
$sqrtf = (+Math_sqrt((+$12)));
return (+$sqrtf);
}
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 _UpdateGestures() { 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; 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; sp = STACKTOP;

File diff suppressed because one or more lines are too long

View file

@ -1,6 +1,6 @@
/******************************************************************************************* /*******************************************************************************************
* *
* raylib [models] example - Ray picking in 3d mode, ground plane, triangle, mesh * raylib [models] example - Mesh picking in 3d mode, ground plane, triangle, mesh
* *
* This example has been created using raylib 1.7 (www.raylib.com) * This example has been created using raylib 1.7 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) * raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
@ -13,8 +13,7 @@
#include "raylib.h" #include "raylib.h"
#include "raymath.h" #include "raymath.h"
#include <stdio.h> #define FLT_MAX 3.40282347E+38F // Maximum value of a float, defined in <float.h>
#include <float.h>
#if defined(PLATFORM_WEB) #if defined(PLATFORM_WEB)
#include <emscripten/emscripten.h> #include <emscripten/emscripten.h>
@ -63,7 +62,7 @@ int main()
int screenWidth = 800; int screenWidth = 800;
int screenHeight = 450; int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [models] example - 3d ray picking"); InitWindow(screenWidth, screenHeight, "raylib [models] example - 3d mesh picking");
// Define the camera to look into our 3d world // Define the camera to look into our 3d world
camera.position = (Vector3){ 10.0f, 8.0f, 10.0f }; // Camera position camera.position = (Vector3){ 10.0f, 8.0f, 10.0f }; // Camera position
@ -144,7 +143,7 @@ void UpdateDrawFrame(void)
cursorColor = PURPLE; cursorColor = PURPLE;
hitObjectName = "Triangle"; hitObjectName = "Triangle";
bary = Barycenter(nearestHit.hitPosition, ta, tb, tc); bary = VectorBarycenter(nearestHit.hitPosition, ta, tb, tc);
hitTriangle = true; hitTriangle = true;
} }
else hitTriangle = false; else hitTriangle = false;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Before After
Before After

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show more