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
@JeffM2501
JeffM2501 / gist:6e4630a0e34c0c7dddf066f7192e342d
Created March 7, 2021 17:32
Raylib fullscreen toggle example
/*******************************************************************************************
*
* raylib [core] example - fullscreen toggle
*
* 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
#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)
{
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;
/*******************************************************************************************
*
* 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
/*******************************************************************************************
*
* 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 / RLAssets.cpp
Last active May 13, 2024 06:05
Basic platform independent asset folder management for raylib.
/*******************************************************************************************
* Welcome to RLAssets!*
* RLAssets is licensed under an unmodified zlib/libpng license (View raylib.h for details)
*
* Copyright (c) 2020 Jeffery Myers
*
********************************************************************************************/
#include "RLAssets.h"
#include "raylib.h"
/*******************************************************************************************
*
* 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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.