Skip to content

Commit

Permalink
Updated raylib to version 1.0.4
Browse files Browse the repository at this point in the history
Lots of changes added, check CHANGELOG for detailed description
  • Loading branch information
raysan5 committed Jan 23, 2014
1 parent 762befb commit 2cf5fa7
Show file tree
Hide file tree
Showing 15 changed files with 1,283 additions and 114 deletions.
23 changes: 22 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,11 +1,32 @@
changelog
---------

Current Release: raylib 1.0.3 (December 2013)
Current Release: raylib 1.0.4 (January 2014)

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

-----------------------------------------------
Release: raylib 1.0.4 (23 January 2014)
-----------------------------------------------
[tool] Published a first alpha version of rREM tool (raylib Resource Embedder)
[core] GetRandomValue() - Bug corrected, now works right
[core] Fade() - Added, fades a color to an alpha percentadge
[core] WriteBitmap() - Moved to new module: utils.c, not used anymore
[core] TakeScreenshot() - Now uses WritePNG() (utils.c)
[utils] New module created with utility functions
[utils] WritePNG() - Write a PNG file (used by TakeScreenshot() on core)
[utils] DecompressData() - Added, used for rRES resource data decompresion
[textures] LoadImageFromRES() - Added, load an image from a rRES resource file
[textures] LoadTextureFromRES() - Added, load a texture from a rRES resource file
[audio] LoadSoundFromRES() - Added, load a sound from a rRES resource file
[audio] IsPlaying() - Added, check if a sound is currently playing
[audio] SetVolume() - Added, set the volume for a sound
[audio] SetPitch() - Added, set the pitch for a sound
[examples] ex06a_color_select completed
[examples] ex06b_logo_anim completed
[examples] ex06c_font select completed

-----------------------------------------------
Release: raylib 1.0.3 (19 December 2013)
-----------------------------------------------
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
about
-----

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

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

To compile examples, make sure raylib.h is placed in include path and libraries raylib (libraylib.a) and glfw3 (libglfw3.a)
are placed in the libraries path. It's also recommended to link with file icon.o for fancy raylib icon usage.
Expand Down
2 changes: 1 addition & 1 deletion ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Around the source code there are some TODO points with pending revisions/bugs an
raylib v1.x

- Review Billboard Drawing functions
- Review Heightmap Loading and Drawing functions
- Review Heightmap Loading and Drawing functions - Load Heightmap directly as a Model
- Lighting support (only 3d mode) - CreateLight()
- [DONE] Simple Collision Detection functions
- Default scene Camera controls (zoom, pan, rotate)
Expand Down
66 changes: 39 additions & 27 deletions release/win32-mingw/include/raylib.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*********************************************************************************************
*
* raylib 1.0.3 (www.raylib.com)
* raylib 1.0.4 (www.raylib.com)
*
* A simple and easy-to-use library to learn C videogames programming
* A simple and easy-to-use library to learn videogames programming
*
* Features:
* Library written in plain C code (C99)
Expand All @@ -16,13 +16,14 @@
* GLFW3 (www.glfw.org) for window/context management and input
* stb_image (Sean Barret) for images loading (JPEG, PNG, BMP, TGA, PSD, GIF, HDR, PIC)
* OpenAL Soft for audio device/context management
* tinfl for data decompression (DEFLATE algorithm)
*
* Some design decisions:
* 32bit Colors - All defined color are always RGBA
* 32bit Textures - All loaded images are converted automatically to RGBA textures
* SpriteFonts - All loaded sprite-font images are converted to RGBA and POT textures
* One custom default font is loaded automatically when InitWindow()
*
*
* -- LICENSE (raylib v1.0, November 2013) --
*
* raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
Expand Down Expand Up @@ -236,29 +237,31 @@ extern "C" { // Prevents name mangling of functions
//------------------------------------------------------------------------------------
// Window and Graphics Device Functions (Module: core)
//------------------------------------------------------------------------------------
void InitWindow(int width, int height, const char *title); // Initialize Window and Graphics Context (OpenGL)
void InitWindowEx(int width, int height, const char* title, bool resizable, const char *cursorImage);
void CloseWindow(); // Close Window and Terminate Context
bool WindowShouldClose(); // Detect if KEY_ESCAPE pressed or Close icon pressed
void ToggleFullscreen(); // Fullscreen toggle (by default F11)
void SetCustomCursor(const char *cursorImage); // Set a custom cursor icon/image
void SetExitKey(int key); // Set a custom key to exit program (default is ESC)
void InitWindow(int width, int height, const char *title); // Initialize Window and Graphics Context (OpenGL)
void InitWindowEx(int width, int height, const char* title, // Initialize Window and Graphics Context (OpenGL),...
bool resizable, const char *cursorImage); // ...define if windows-resizable and custom cursor
void CloseWindow(); // Close Window and Terminate Context
bool WindowShouldClose(); // Detect if KEY_ESCAPE pressed or Close icon pressed
void ToggleFullscreen(); // Fullscreen toggle (by default F11)
void SetCustomCursor(const char *cursorImage); // Set a custom cursor icon/image
void SetExitKey(int key); // Set a custom key to exit program (default is ESC)

void ClearBackground(Color color); // Sets Background Color
void BeginDrawing(); // Setup drawing canvas to start drawing
void EndDrawing(); // End canvas drawing and Swap Buffers (Double Buffering)
void ClearBackground(Color color); // Sets Background Color
void BeginDrawing(); // Setup drawing canvas to start drawing
void EndDrawing(); // End canvas drawing and Swap Buffers (Double Buffering)

void Begin3dMode(Camera cam); // Initializes 3D mode for drawing (Camera setup)
void End3dMode(); // Ends 3D mode and returns to default 2D orthographic mode
void Begin3dMode(Camera cam); // Initializes 3D mode for drawing (Camera setup)
void End3dMode(); // Ends 3D mode and returns to default 2D orthographic mode

void SetTargetFPS(int fps); // Set target FPS (maximum)
float GetFPS(); // Returns current FPS
float GetFrameTime(); // Returns time in seconds for one frame
void SetTargetFPS(int fps); // Set target FPS (maximum)
float GetFPS(); // Returns current FPS
float GetFrameTime(); // Returns time in seconds for one frame

Color GetColor(int hexValue); // Returns a Color struct from hexadecimal value
int GetHexValue(Color color); // Returns hexadecimal value for a Color
Color GetColor(int hexValue); // Returns a Color struct from hexadecimal value
int GetHexValue(Color color); // Returns hexadecimal value for a Color

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

//------------------------------------------------------------------------------------
// Input Handling Functions (Module: core)
Expand Down Expand Up @@ -317,15 +320,18 @@ bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2
// Texture Loading and Drawing Functions (Module: textures)
//------------------------------------------------------------------------------------
Image LoadImage(const char *fileName); // Load an image into CPU memory (RAM)
void UnloadImage(Image image); // Unload image from CPU memory (RAM)
Image LoadImageFromRES(const char *rresName, int resId); // Load an image from rRES file (raylib Resource)
Texture2D LoadTexture(const char *fileName); // Load an image as texture into GPU memory
//Texture2D LoadTextureEx(const char *fileName, bool createPOT, bool mipmaps); // Load an image as texture (and convert to POT with mipmaps) (raylib 1.x)
Texture2D LoadTextureFromRES(const char *rresName, int resId); // Load an image as texture from rRES file (raylib Resource)
Texture2D CreateTexture2D(Image image); // Create a Texture2D from Image data
void UnloadImage(Image image); // Unload image from CPU memory (RAM)
void UnloadTexture(Texture2D texture); // Unload texture from GPU memory

void DrawTexture(Texture2D texture, int posX, int posY, Color tint); // Draw a Texture2D
void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint); // Draw a Texture2D with extended parameters
void DrawTextureRec(Texture2D texture, Rectangle sourceRec, Vector2 position, Color tint); // Draw a part of a texture defined by a rectangle
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
Texture2D CreateTexture2D(Image image); // Create a Texture2D from Image data
void DrawTexturePro(Texture2D texture, Rectangle sourceRec, Rectangle destRec, Vector2 origin, // Draw a part of a texture defined by a rectangle with 'pro' parameters
float rotation, Color tint);

//------------------------------------------------------------------------------------
// Font Loading and Text Drawing Functions (Module: text)
Expand All @@ -334,7 +340,8 @@ SpriteFont GetDefaultFont();
SpriteFont LoadSpriteFont(const char *fileName); // Load a SpriteFont image into GPU memory
void UnloadSpriteFont(SpriteFont spriteFont); // Unload SpriteFont from GPU memory
void DrawText(const char *text, int posX, int posY, int fontSize, Color color); // Draw text (using default font)
void DrawTextEx(SpriteFont spriteFont, const char* text, Vector2 position, int fontSize, int spacing, Color tint); // Draw text using SpriteFont
void DrawTextEx(SpriteFont spriteFont, const char* text, Vector2 position, // Draw text using SpriteFont and additional parameters
int fontSize, int spacing, Color tint);
int MeasureText(const char *text, int fontSize); // Measure string width for default font
Vector2 MeasureTextEx(SpriteFont spriteFont, const char *text, int fontSize, int spacing); // Measure string size for SpriteFont
int GetFontBaseSize(SpriteFont spriteFont); // Returns the base size for a SpriteFont (chars height)
Expand Down Expand Up @@ -362,6 +369,7 @@ void DrawGizmo(Vector3 position, bool orbits);
// Model 3d Loading and Drawing Functions (Module: models)
//------------------------------------------------------------------------------------
Model LoadModel(const char *fileName); // Load a 3d model (.OBJ)
//Model LoadModelFromRES(const char *rresName, int resId); // TODO: Load a 3d model from rRES file (raylib Resource)
void UnloadModel(Model model); // Unload 3d model from memory
void DrawModel(Model model, Vector3 position, float scale, Color color); // Draw a model
void DrawModelEx(Model model, Texture2D texture, Vector3 position, float scale, Color tint); // Draw a textured model
Expand All @@ -380,11 +388,15 @@ void DrawHeightmapEx(Image heightmap, Texture2D texture, Vector3 centerPos, Vect
void InitAudioDevice(); // Initialize audio device and context
void CloseAudioDevice(); // Close the audio device and context
Sound LoadSound(char *fileName); // Load sound to memory
Sound LoadSoundFromRES(const char *rresName, int resId); // Load sound to memory from rRES file (raylib Resource)
void UnloadSound(Sound sound); // Unload sound

void PlaySound(Sound sound); // Play a sound
void PlaySoundEx(Sound sound, float timePosition, bool loop); // Play a sound with extended parameters
void PauseSound(Sound sound); // Pause a sound
void StopSound(Sound sound); // Stop playing a sound
bool IsPlaying(Sound sound); // Check if a sound is currently playing
void SetVolume(Sound sound, float volume); // Set volume for a sound (1.0 is base level)
void SetPitch(Sound sound, float pitch); // Set pitch for a sound (1.0 is base level)

#ifdef __cplusplus
}
Expand Down
Binary file modified release/win32-mingw/lib/libraylib.a
Binary file not shown.
Loading

0 comments on commit 2cf5fa7

Please sign in to comment.