Skip to content

Instantly share code, notes, and snippets.

View JeffM2501's full-sized avatar

Jeffery Myers JeffM2501

  • Unspecified Game Studio
  • CA, US, Terra, Sol
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
/*******************************************************************************************
*
* raylib [core] example - Basic window
*
* Welcome to raylib!
*
* To test examples, just press F6 and execute raylib_compile_execute script
* Note that compiled executable is placed in the same folder as .c file
*
* You can find all basic examples on C:\raylib\raylib\examples folder or
@JeffM2501
JeffM2501 / gist:a6eb14d734f88a065a73adb729eed1f7
Created January 8, 2021 21:37
Basic Shot Animation Raylib
/*******************************************************************************************
*
* raylib [core] example - Basic window
*
* Welcome to raylib!
*
* To test examples, just press F6 and execute raylib_compile_execute script
* Note that compiled executable is placed in the same folder as .c file
*
* You can find all basic examples on C:\raylib\raylib\examples folder or
void game::loop()
{
pField = new unsigned char[nFieldWidth*nFieldHeight];
for (int x =0; x < nFieldWidth; x++)
{
for (int y = 0; y < nFieldHeight; y++)
{
pField[y*nFieldWidth + x] = (x == 0 || x == nFieldWidth - 1 || y == nFieldHeight - 1) ? 9 : 0;
void game::loop()
{
pField = new unsigned char[nFieldWidth*nFieldHeight];
for (int x =0; x < nFieldWidth; x++)
{
for (int y = 0; y < nFieldHeight; y++)
{
pField[y*nFieldWidth + x] = (x == 0 || x == nFieldWidth - 1 || y == nFieldHeight - 1) ? 9 : 0;
}
#include "raylib.h"
#include "rlgl.h"
// Draw a part of a texture (defined by a rectangle) with 'pro' parameters
// NOTE: origin is relative to destination rectangle size
void DrawTextureProZ(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float depth, float rotation, Color tint)
{
// Check if texture is valid
if (texture.id > 0)
{
/*******************************************************************************************
*
* raylib [core] example - Basic window
*
* Welcome to raylib!
*
* To test examples, just press F6 and execute raylib_compile_execute script
* Note that compiled executable is placed in the same folder as .c file
*
* You can find all basic examples on C:\raylib\raylib\examples folder or
/*******************************************************************************************
*
* raylib [2D] example - world space panning
*
* Welcome to raylib!
*
* To test examples, just press F6 and execute raylib_compile_execute script
* Note that compiled executable is placed in the same folder as .c file
*
* You can find all basic examples on C:\raylib\raylib\examples folder or
@JeffM2501
JeffM2501 / varfps.c
Created April 2, 2021 14:10
test showing how frame based motion can be problematic
/*******************************************************************************************
*
* raylib [core] example - Basic window
*
* Welcome to raylib!
*
* To test examples, just press F6 and execute raylib_compile_execute script
* Note that compiled executable is placed in the same folder as .c file
*
* You can find all basic examples on C:\raylib\raylib\examples folder or