Replaced tab by 4 spaces and adjust text
This commit is contained in:
parent
7635e9c79f
commit
ccf2608091
17 changed files with 2733 additions and 2731 deletions
|
@ -18,7 +18,7 @@ int main()
|
||||||
|
|
||||||
// Initialization
|
// Initialization
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
InitWindow(screenWidth, screenHeight, "raylib example 01a - basic window"); // Window and context initialization
|
InitWindow(screenWidth, screenHeight, "raylib example 01a - basic window");
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
|
|
||||||
// Main game loop
|
// Main game loop
|
||||||
|
|
|
@ -18,7 +18,7 @@ int main()
|
||||||
|
|
||||||
// Initialization
|
// Initialization
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
InitWindow(screenWidth, screenHeight, "raylib example 02b - basic shapes drawing"); // Window and context initialization
|
InitWindow(screenWidth, screenHeight, "raylib example 02b - basic shapes drawing");
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
|
|
||||||
// Main game loop
|
// Main game loop
|
||||||
|
|
|
@ -18,7 +18,7 @@ int main()
|
||||||
|
|
||||||
// Initialization
|
// Initialization
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
InitWindow(screenWidth, screenHeight, "raylib example 02c - raylib color palette"); // Window and context initialization
|
InitWindow(screenWidth, screenHeight, "raylib example 02c - raylib color palette");
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
|
|
||||||
// Main game loop
|
// Main game loop
|
||||||
|
|
|
@ -20,7 +20,7 @@ int main()
|
||||||
|
|
||||||
// Initialization
|
// Initialization
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
InitWindow(screenWidth, screenHeight, "raylib example 05 - keyboard input"); // Window and context initialization
|
InitWindow(screenWidth, screenHeight, "raylib example 05 - keyboard input");
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
|
|
||||||
// Main game loop
|
// Main game loop
|
||||||
|
|
|
@ -22,7 +22,7 @@ int main()
|
||||||
|
|
||||||
// Initialization
|
// Initialization
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
InitWindow(screenWidth, screenHeight, "raylib example 06 - mouse input"); // Window and context initialization
|
InitWindow(screenWidth, screenHeight, "raylib example 06 - mouse input");
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
|
|
||||||
// Main game loop
|
// Main game loop
|
||||||
|
|
|
@ -21,7 +21,7 @@ int main()
|
||||||
|
|
||||||
// Initialization
|
// Initialization
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
InitWindow(screenWidth, screenHeight, "raylib example 01 - gamepad input"); // Window and context initialization
|
InitWindow(screenWidth, screenHeight, "raylib example 01 - gamepad input");
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
|
|
||||||
// Main game loop
|
// Main game loop
|
||||||
|
|
|
@ -18,7 +18,7 @@ int main()
|
||||||
|
|
||||||
// Initialization
|
// Initialization
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
InitWindow(screenWidth, screenHeight, "raylib example 04a - texture loading and drawing"); // Window and context initialization
|
InitWindow(screenWidth, screenHeight, "raylib example 04a - texture loading and drawing");
|
||||||
|
|
||||||
// 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 texture = LoadTexture("resources/raylib_logo.png"); // Texture loading
|
Texture2D texture = LoadTexture("resources/raylib_logo.png"); // Texture loading
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*********************************************************************************************
|
/*********************************************************************************************
|
||||||
*
|
*
|
||||||
* raylib 1.0 (www.raylib.com)
|
* raylib 1.0.0 (www.raylib.com)
|
||||||
*
|
*
|
||||||
* A simple and easy-to-use library to learn C videogames programming
|
* A simple and easy-to-use library to learn C videogames programming
|
||||||
*
|
*
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
#ifndef RAYLIB_H
|
#ifndef RAYLIB_H
|
||||||
#define RAYLIB_H
|
#define RAYLIB_H
|
||||||
|
|
||||||
//#define NO_AUDIO // Audio is still being tested, deactivated by default
|
#define NO_AUDIO // Audio is still being tested, deactivated by default
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Some basic Defines
|
// Some basic Defines
|
||||||
|
|
|
@ -66,7 +66,8 @@ Image LoadImage(const char *fileName)
|
||||||
int imgBpp;
|
int imgBpp;
|
||||||
|
|
||||||
// NOTE: Using stb_image to load images (Supports: BMP, TGA, PNG, JPG, ...)
|
// NOTE: Using stb_image to load images (Supports: BMP, TGA, PNG, JPG, ...)
|
||||||
byte *imgData = stbi_load(fileName, &imgWidth, &imgHeight, &imgBpp, 4); // Force loading to 4 components (RGBA)
|
// Force loading to 4 components (RGBA)
|
||||||
|
byte *imgData = stbi_load(fileName, &imgWidth, &imgHeight, &imgBpp, 4);
|
||||||
|
|
||||||
// Convert array to pixel array for working convenience
|
// Convert array to pixel array for working convenience
|
||||||
image.pixels = (Color *)malloc(imgWidth * imgHeight * sizeof(Color));
|
image.pixels = (Color *)malloc(imgWidth * imgHeight * sizeof(Color));
|
||||||
|
@ -110,7 +111,8 @@ Texture2D LoadTexture(const char *fileName)
|
||||||
int imgBpp;
|
int imgBpp;
|
||||||
|
|
||||||
// NOTE: Using stb_image to load images (Supports: BMP, TGA, PNG, JPG, ...)
|
// NOTE: Using stb_image to load images (Supports: BMP, TGA, PNG, JPG, ...)
|
||||||
byte *imgData = stbi_load(fileName, &imgWidth, &imgHeight, &imgBpp, 4); // Force loading to 4 components (RGBA)
|
// Force loading to 4 components (RGBA)
|
||||||
|
byte *imgData = stbi_load(fileName, &imgWidth, &imgHeight, &imgBpp, 4);
|
||||||
|
|
||||||
// Convert loaded data to OpenGL texture
|
// Convert loaded data to OpenGL texture
|
||||||
//----------------------------------------
|
//----------------------------------------
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue