Review comments
This commit is contained in:
parent
35ee4e52c8
commit
8b7ca8b670
2 changed files with 20 additions and 19 deletions
20
src/raylib.h
20
src/raylib.h
|
@ -1,6 +1,6 @@
|
||||||
/**********************************************************************************************
|
/**********************************************************************************************
|
||||||
*
|
*
|
||||||
* raylib 1.4.0 (www.raylib.com)
|
* raylib 1.5.0 (www.raylib.com)
|
||||||
*
|
*
|
||||||
* A simple and easy-to-use library to learn videogames programming
|
* A simple and easy-to-use library to learn videogames programming
|
||||||
*
|
*
|
||||||
|
@ -345,8 +345,8 @@ typedef struct Camera {
|
||||||
|
|
||||||
// Camera2D type, defines a 2d camera
|
// Camera2D type, defines a 2d camera
|
||||||
typedef struct Camera2D {
|
typedef struct Camera2D {
|
||||||
Vector2 position; // Camera position
|
Vector2 offset; // Camera offset (displacement from target)
|
||||||
Vector2 origin; // Camera origin (for rotation and zoom)
|
Vector2 target; // Camera target (for rotation and zoom)
|
||||||
float rotation; // Camera rotation in degrees
|
float rotation; // Camera rotation in degrees
|
||||||
float zoom; // Camera zoom (scaling), should be 1.0f by default
|
float zoom; // Camera zoom (scaling), should be 1.0f by default
|
||||||
} Camera2D;
|
} Camera2D;
|
||||||
|
@ -375,7 +375,7 @@ typedef struct Mesh {
|
||||||
|
|
||||||
// Shader type (generic shader)
|
// Shader type (generic shader)
|
||||||
typedef struct Shader {
|
typedef struct Shader {
|
||||||
unsigned int id; // Shader program id
|
unsigned int id; // Shader program id
|
||||||
|
|
||||||
// Variable attributes
|
// Variable attributes
|
||||||
int vertexLoc; // Vertex attribute location point (vertex shader)
|
int vertexLoc; // Vertex attribute location point (vertex shader)
|
||||||
|
@ -411,9 +411,9 @@ typedef struct Material {
|
||||||
// 3d Model type
|
// 3d Model type
|
||||||
// TODO: Replace shader/testure by material
|
// TODO: Replace shader/testure by material
|
||||||
typedef struct Model {
|
typedef struct Model {
|
||||||
Mesh mesh;
|
Mesh mesh; // Vertex data buffers (RAM and VRAM)
|
||||||
Matrix transform;
|
Matrix transform; // Local transform matrix
|
||||||
Material material;
|
Material material; // Shader and textures data
|
||||||
} Model;
|
} Model;
|
||||||
|
|
||||||
// Ray type (useful for raycast)
|
// Ray type (useful for raycast)
|
||||||
|
@ -432,8 +432,8 @@ typedef struct Sound {
|
||||||
typedef struct Wave {
|
typedef struct Wave {
|
||||||
void *data; // Buffer data pointer
|
void *data; // Buffer data pointer
|
||||||
unsigned int dataSize; // Data size in bytes
|
unsigned int dataSize; // Data size in bytes
|
||||||
unsigned int sampleRate;
|
unsigned int sampleRate; // Samples per second to be played
|
||||||
short bitsPerSample;
|
short bitsPerSample; // Sample size in bits
|
||||||
short channels;
|
short channels;
|
||||||
} Wave;
|
} Wave;
|
||||||
|
|
||||||
|
@ -484,7 +484,7 @@ typedef enum { TOUCH_UP, TOUCH_DOWN, TOUCH_MOVE } TouchAction;
|
||||||
|
|
||||||
// Gesture events
|
// Gesture events
|
||||||
// NOTE: MAX_TOUCH_POINTS fixed to 2
|
// NOTE: MAX_TOUCH_POINTS fixed to 2
|
||||||
typedef struct {
|
typedef struct GestureEvent {
|
||||||
int touchAction;
|
int touchAction;
|
||||||
int pointCount;
|
int pointCount;
|
||||||
int pointerId[MAX_TOUCH_POINTS];
|
int pointerId[MAX_TOUCH_POINTS];
|
||||||
|
|
|
@ -29,21 +29,21 @@
|
||||||
|
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
|
|
||||||
#include <stdlib.h> // Declares malloc() and free() for memory management
|
#include <stdlib.h> // Declares malloc() and free() for memory management
|
||||||
#include <string.h> // Required for strcmp(), strrchr(), strncmp()
|
#include <string.h> // Required for strcmp(), strrchr(), strncmp()
|
||||||
|
|
||||||
#include "rlgl.h" // raylib OpenGL abstraction layer to OpenGL 1.1, 3.3 or ES2
|
#include "rlgl.h" // raylib OpenGL abstraction layer to OpenGL 1.1, 3.3 or ES2
|
||||||
// Required: rlglLoadTexture() rlDeleteTextures(),
|
// Required: rlglLoadTexture() rlDeleteTextures(),
|
||||||
// rlglGenerateMipmaps(), some funcs for DrawTexturePro()
|
// rlglGenerateMipmaps(), some funcs for DrawTexturePro()
|
||||||
|
|
||||||
#include "utils.h" // rRES data decompression utility function
|
#include "utils.h" // rRES data decompression utility function
|
||||||
// NOTE: Includes Android fopen function map
|
// NOTE: Includes Android fopen function map
|
||||||
|
|
||||||
#define STB_IMAGE_IMPLEMENTATION
|
#define STB_IMAGE_IMPLEMENTATION
|
||||||
#include "stb_image.h" // Used to read image data (multiple formats support)
|
#include "stb_image.h" // Used to read image data (multiple formats support)
|
||||||
|
|
||||||
#define STB_IMAGE_RESIZE_IMPLEMENTATION
|
#define STB_IMAGE_RESIZE_IMPLEMENTATION
|
||||||
#include "stb_image_resize.h"
|
#include "stb_image_resize.h" // Used on image scaling function: ImageResize()
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
// Defines and Macros
|
// Defines and Macros
|
||||||
|
@ -130,6 +130,7 @@ Image LoadImage(const char *fileName)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load image data from Color array data (RGBA - 32bit)
|
// Load image data from Color array data (RGBA - 32bit)
|
||||||
|
// NOTE: Creates a copy of pixels data array
|
||||||
Image LoadImageEx(Color *pixels, int width, int height)
|
Image LoadImageEx(Color *pixels, int width, int height)
|
||||||
{
|
{
|
||||||
Image image;
|
Image image;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue