Review ALL examples
This commit is contained in:
parent
a43a7980a3
commit
b525039e0a
96 changed files with 1301 additions and 1317 deletions
|
@ -10,7 +10,7 @@
|
|||
* gcc -o $(NAME_PART).exe $(FILE_NAME) -s -static /
|
||||
* -lraylib -lpthread -lglfw3 -lopengl32 -lgdi32 -lopenal32 -lwinmm /
|
||||
* -std=c99 -Wl,--subsystem,windows -Wl,-allow-multiple-definition
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2016-2018 Victor Fisac
|
||||
*
|
||||
********************************************************************************************/
|
||||
|
@ -21,12 +21,12 @@
|
|||
#define PHYSAC_NO_THREADS
|
||||
#include "physac.h"
|
||||
|
||||
int main()
|
||||
int main(void)
|
||||
{
|
||||
// Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
int screenWidth = 800;
|
||||
int screenHeight = 450;
|
||||
const int screenWidth = 800;
|
||||
const int screenHeight = 450;
|
||||
|
||||
SetConfigFlags(FLAG_MSAA_4X_HINT);
|
||||
InitWindow(screenWidth, screenHeight, "Physac [raylib] - Physics restitution");
|
||||
|
@ -50,11 +50,11 @@ int main()
|
|||
circleB->restitution = 0.5f;
|
||||
PhysicsBody circleC = CreatePhysicsBodyCircle((Vector2){ screenWidth*0.75f, screenHeight/2 }, 30, 10);
|
||||
circleC->restitution = 1;
|
||||
|
||||
SetTargetFPS(60);
|
||||
|
||||
// Restitution demo needs a very tiny physics time step for a proper simulation
|
||||
SetPhysicsTimeStep(1.0/60.0/100 * 1000);
|
||||
SetPhysicsTimeStep(1.0/60.0/100*1000);
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
// Main game loop
|
||||
|
@ -119,9 +119,9 @@ int main()
|
|||
}
|
||||
|
||||
// De-Initialization
|
||||
//--------------------------------------------------------------------------------------
|
||||
//--------------------------------------------------------------------------------------
|
||||
ClosePhysics(); // Unitialize physics
|
||||
|
||||
|
||||
CloseWindow(); // Close window and OpenGL context
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue