Skip to content

Commit 2cf5fa7

Browse files
committed
Updated raylib to version 1.0.4
Lots of changes added, check CHANGELOG for detailed description
1 parent 762befb commit 2cf5fa7

File tree

15 files changed

+1283
-114
lines changed

15 files changed

+1283
-114
lines changed

CHANGELOG

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,32 @@
11
changelog
22
---------
33

4-
Current Release: raylib 1.0.3 (December 2013)
4+
Current Release: raylib 1.0.4 (January 2014)
55

66
NOTE: Only versions marked as 'Release' are available on release folder, updates are only available as source.
77
NOTE: Current Release includes all previous updates.
88

9+
-----------------------------------------------
10+
Release: raylib 1.0.4 (23 January 2014)
11+
-----------------------------------------------
12+
[tool] Published a first alpha version of rREM tool (raylib Resource Embedder)
13+
[core] GetRandomValue() - Bug corrected, now works right
14+
[core] Fade() - Added, fades a color to an alpha percentadge
15+
[core] WriteBitmap() - Moved to new module: utils.c, not used anymore
16+
[core] TakeScreenshot() - Now uses WritePNG() (utils.c)
17+
[utils] New module created with utility functions
18+
[utils] WritePNG() - Write a PNG file (used by TakeScreenshot() on core)
19+
[utils] DecompressData() - Added, used for rRES resource data decompresion
20+
[textures] LoadImageFromRES() - Added, load an image from a rRES resource file
21+
[textures] LoadTextureFromRES() - Added, load a texture from a rRES resource file
22+
[audio] LoadSoundFromRES() - Added, load a sound from a rRES resource file
23+
[audio] IsPlaying() - Added, check if a sound is currently playing
24+
[audio] SetVolume() - Added, set the volume for a sound
25+
[audio] SetPitch() - Added, set the pitch for a sound
26+
[examples] ex06a_color_select completed
27+
[examples] ex06b_logo_anim completed
28+
[examples] ex06c_font select completed
29+
930
-----------------------------------------------
1031
Release: raylib 1.0.3 (19 December 2013)
1132
-----------------------------------------------

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
about
44
-----
55

6-
raylib is a simple and easy-to-use library to learn C videogames programming.
6+
raylib is a simple and easy-to-use library to learn videogames programming.
77

88
raylib is highly inspired by Borland BGI graphics lib (more specifically WinBGI) and by XNA framework.
99
Allegro and SDL have also been analyzed for reference.
@@ -80,7 +80,8 @@ raylib could be build with the following command lines (Using GCC compiler):
8080
gcc -c models.c -std=c99 -Wall
8181
gcc -c vector3.c -std=c99 -Wall
8282
gcc -c audio.c -std=c99 -Wall
83-
ar rcs raylib.a core.o shapes.o textures.o stb_image.o text.o models.o vector3.o audio.o
83+
gcc -c utils.c -std=c99 -Wall
84+
ar rcs raylib.a core.o shapes.o textures.o stb_image.o text.o models.o vector3.o utils.o audio.o
8485

8586
To compile examples, make sure raylib.h is placed in include path and libraries raylib (libraylib.a) and glfw3 (libglfw3.a)
8687
are placed in the libraries path. It's also recommended to link with file icon.o for fancy raylib icon usage.

ROADMAP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Around the source code there are some TODO points with pending revisions/bugs an
99
raylib v1.x
1010

1111
- Review Billboard Drawing functions
12-
- Review Heightmap Loading and Drawing functions
12+
- Review Heightmap Loading and Drawing functions - Load Heightmap directly as a Model
1313
- Lighting support (only 3d mode) - CreateLight()
1414
- [DONE] Simple Collision Detection functions
1515
- Default scene Camera controls (zoom, pan, rotate)

release/win32-mingw/include/raylib.h

Lines changed: 39 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/*********************************************************************************************
22
*
3-
* raylib 1.0.3 (www.raylib.com)
3+
* raylib 1.0.4 (www.raylib.com)
44
*
5-
* A simple and easy-to-use library to learn C videogames programming
5+
* A simple and easy-to-use library to learn videogames programming
66
*
77
* Features:
88
* Library written in plain C code (C99)
@@ -16,13 +16,14 @@
1616
* GLFW3 (www.glfw.org) for window/context management and input
1717
* stb_image (Sean Barret) for images loading (JPEG, PNG, BMP, TGA, PSD, GIF, HDR, PIC)
1818
* OpenAL Soft for audio device/context management
19+
* tinfl for data decompression (DEFLATE algorithm)
1920
*
2021
* Some design decisions:
2122
* 32bit Colors - All defined color are always RGBA
2223
* 32bit Textures - All loaded images are converted automatically to RGBA textures
2324
* SpriteFonts - All loaded sprite-font images are converted to RGBA and POT textures
2425
* One custom default font is loaded automatically when InitWindow()
25-
*
26+
*
2627
* -- LICENSE (raylib v1.0, November 2013) --
2728
*
2829
* raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
@@ -236,29 +237,31 @@ extern "C" { // Prevents name mangling of functions
236237
//------------------------------------------------------------------------------------
237238
// Window and Graphics Device Functions (Module: core)
238239
//------------------------------------------------------------------------------------
239-
void InitWindow(int width, int height, const char *title); // Initialize Window and Graphics Context (OpenGL)
240-
void InitWindowEx(int width, int height, const char* title, bool resizable, const char *cursorImage);
241-
void CloseWindow(); // Close Window and Terminate Context
242-
bool WindowShouldClose(); // Detect if KEY_ESCAPE pressed or Close icon pressed
243-
void ToggleFullscreen(); // Fullscreen toggle (by default F11)
244-
void SetCustomCursor(const char *cursorImage); // Set a custom cursor icon/image
245-
void SetExitKey(int key); // Set a custom key to exit program (default is ESC)
240+
void InitWindow(int width, int height, const char *title); // Initialize Window and Graphics Context (OpenGL)
241+
void InitWindowEx(int width, int height, const char* title, // Initialize Window and Graphics Context (OpenGL),...
242+
bool resizable, const char *cursorImage); // ...define if windows-resizable and custom cursor
243+
void CloseWindow(); // Close Window and Terminate Context
244+
bool WindowShouldClose(); // Detect if KEY_ESCAPE pressed or Close icon pressed
245+
void ToggleFullscreen(); // Fullscreen toggle (by default F11)
246+
void SetCustomCursor(const char *cursorImage); // Set a custom cursor icon/image
247+
void SetExitKey(int key); // Set a custom key to exit program (default is ESC)
246248

247-
void ClearBackground(Color color); // Sets Background Color
248-
void BeginDrawing(); // Setup drawing canvas to start drawing
249-
void EndDrawing(); // End canvas drawing and Swap Buffers (Double Buffering)
249+
void ClearBackground(Color color); // Sets Background Color
250+
void BeginDrawing(); // Setup drawing canvas to start drawing
251+
void EndDrawing(); // End canvas drawing and Swap Buffers (Double Buffering)
250252

251-
void Begin3dMode(Camera cam); // Initializes 3D mode for drawing (Camera setup)
252-
void End3dMode(); // Ends 3D mode and returns to default 2D orthographic mode
253+
void Begin3dMode(Camera cam); // Initializes 3D mode for drawing (Camera setup)
254+
void End3dMode(); // Ends 3D mode and returns to default 2D orthographic mode
253255

254-
void SetTargetFPS(int fps); // Set target FPS (maximum)
255-
float GetFPS(); // Returns current FPS
256-
float GetFrameTime(); // Returns time in seconds for one frame
256+
void SetTargetFPS(int fps); // Set target FPS (maximum)
257+
float GetFPS(); // Returns current FPS
258+
float GetFrameTime(); // Returns time in seconds for one frame
257259

258-
Color GetColor(int hexValue); // Returns a Color struct from hexadecimal value
259-
int GetHexValue(Color color); // Returns hexadecimal value for a Color
260+
Color GetColor(int hexValue); // Returns a Color struct from hexadecimal value
261+
int GetHexValue(Color color); // Returns hexadecimal value for a Color
260262

261-
int GetRandomValue(int min, int max); // Returns a random value between min and max (both included)
263+
int GetRandomValue(int min, int max); // Returns a random value between min and max (both included)
264+
Color Fade(Color color, float alpha); // Color fade-in or fade-out, alpha goes from 0.0 to 1.0
262265

263266
//------------------------------------------------------------------------------------
264267
// Input Handling Functions (Module: core)
@@ -317,15 +320,18 @@ bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2
317320
// Texture Loading and Drawing Functions (Module: textures)
318321
//------------------------------------------------------------------------------------
319322
Image LoadImage(const char *fileName); // Load an image into CPU memory (RAM)
320-
void UnloadImage(Image image); // Unload image from CPU memory (RAM)
323+
Image LoadImageFromRES(const char *rresName, int resId); // Load an image from rRES file (raylib Resource)
321324
Texture2D LoadTexture(const char *fileName); // Load an image as texture into GPU memory
322-
//Texture2D LoadTextureEx(const char *fileName, bool createPOT, bool mipmaps); // Load an image as texture (and convert to POT with mipmaps) (raylib 1.x)
325+
Texture2D LoadTextureFromRES(const char *rresName, int resId); // Load an image as texture from rRES file (raylib Resource)
326+
Texture2D CreateTexture2D(Image image); // Create a Texture2D from Image data
327+
void UnloadImage(Image image); // Unload image from CPU memory (RAM)
323328
void UnloadTexture(Texture2D texture); // Unload texture from GPU memory
329+
324330
void DrawTexture(Texture2D texture, int posX, int posY, Color tint); // Draw a Texture2D
325331
void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint); // Draw a Texture2D with extended parameters
326332
void DrawTextureRec(Texture2D texture, Rectangle sourceRec, Vector2 position, Color tint); // Draw a part of a texture defined by a rectangle
327-
void DrawTexturePro(Texture2D texture, Rectangle sourceRec, Rectangle destRec, Vector2 origin, float rotation, Color tint); // Draw a part of a texture defined by a rectangle with 'pro' parameters
328-
Texture2D CreateTexture2D(Image image); // Create a Texture2D from Image data
333+
void DrawTexturePro(Texture2D texture, Rectangle sourceRec, Rectangle destRec, Vector2 origin, // Draw a part of a texture defined by a rectangle with 'pro' parameters
334+
float rotation, Color tint);
329335

330336
//------------------------------------------------------------------------------------
331337
// Font Loading and Text Drawing Functions (Module: text)
@@ -334,7 +340,8 @@ SpriteFont GetDefaultFont();
334340
SpriteFont LoadSpriteFont(const char *fileName); // Load a SpriteFont image into GPU memory
335341
void UnloadSpriteFont(SpriteFont spriteFont); // Unload SpriteFont from GPU memory
336342
void DrawText(const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font)
337-
void DrawTextEx(SpriteFont spriteFont, const char* text, Vector2 position, int fontSize, int spacing, Color tint); // Draw text using SpriteFont
343+
void DrawTextEx(SpriteFont spriteFont, const char* text, Vector2 position, // Draw text using SpriteFont and additional parameters
344+
int fontSize, int spacing, Color tint);
338345
int MeasureText(const char *text, int fontSize); // Measure string width for default font
339346
Vector2 MeasureTextEx(SpriteFont spriteFont, const char *text, int fontSize, int spacing); // Measure string size for SpriteFont
340347
int GetFontBaseSize(SpriteFont spriteFont); // Returns the base size for a SpriteFont (chars height)
@@ -362,6 +369,7 @@ void DrawGizmo(Vector3 position, bool orbits);
362369
// Model 3d Loading and Drawing Functions (Module: models)
363370
//------------------------------------------------------------------------------------
364371
Model LoadModel(const char *fileName); // Load a 3d model (.OBJ)
372+
//Model LoadModelFromRES(const char *rresName, int resId); // TODO: Load a 3d model from rRES file (raylib Resource)
365373
void UnloadModel(Model model); // Unload 3d model from memory
366374
void DrawModel(Model model, Vector3 position, float scale, Color color); // Draw a model
367375
void DrawModelEx(Model model, Texture2D texture, Vector3 position, float scale, Color tint); // Draw a textured model
@@ -380,11 +388,15 @@ void DrawHeightmapEx(Image heightmap, Texture2D texture, Vector3 centerPos, Vect
380388
void InitAudioDevice(); // Initialize audio device and context
381389
void CloseAudioDevice(); // Close the audio device and context
382390
Sound LoadSound(char *fileName); // Load sound to memory
391+
Sound LoadSoundFromRES(const char *rresName, int resId); // Load sound to memory from rRES file (raylib Resource)
383392
void UnloadSound(Sound sound); // Unload sound
393+
384394
void PlaySound(Sound sound); // Play a sound
385-
void PlaySoundEx(Sound sound, float timePosition, bool loop); // Play a sound with extended parameters
386395
void PauseSound(Sound sound); // Pause a sound
387396
void StopSound(Sound sound); // Stop playing a sound
397+
bool IsPlaying(Sound sound); // Check if a sound is currently playing
398+
void SetVolume(Sound sound, float volume); // Set volume for a sound (1.0 is base level)
399+
void SetPitch(Sound sound, float pitch); // Set pitch for a sound (1.0 is base level)
388400

389401
#ifdef __cplusplus
390402
}
29.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)