Skip to content

Commit

Permalink
v4.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
RobLoach committed Oct 4, 2022
1 parent df53cae commit 54f2877
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.11)
project (raylib-physfs
VERSION 4.2.1
VERSION 4.2.2
DESCRIPTION "raylib-physfs"
HOMEPAGE_URL "https://github.com/robloach/raylib-physfs"
LANGUAGES C
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

Load [raylib](https://www.raylib.com/) images, sounds, music, fonts and shaders from data archives, like `.zip` files, through [PhysicsFS](https://github.com/icculus/physfs).

[![Screenshot of textures_image_loading example](examples/textures/textures_image_loading.png)](examples/textures/textures_image_loading.c)

## Features

- Load various assets from data archives, including Images, Textures, Music, Waves, Fonts, Text, Data and Shaders
Expand Down
Binary file removed examples/textures/resources/raylib_logo.png
Binary file not shown.
Binary file added examples/textures/resources/resources.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions examples/textures/textures_image_loading.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ int main(void)

// Initialize the file system, and mount a directory.
InitPhysFS();
MountPhysFS("resources", "res");
MountPhysFS("resources/resources.zip", "res");

// Load the image directly into a texture through PhysFS.
Texture2D texture = LoadTextureFromPhysFS("res/raylib_logo.png");
Expand All @@ -49,7 +49,7 @@ int main(void)

DrawTexture(texture, screenWidth/2 - texture.width/2, screenHeight/2 - texture.height/2, WHITE);

DrawText("this IS a texture loaded from an image!", 300, 370, 10, GRAY);
DrawText("this IS a texture loaded from a .zip file!", 300, 370, 10, GRAY);

EndDrawing();
//----------------------------------------------------------------------------------
Expand Down
Binary file added examples/textures/textures_image_loading.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 54f2877

Please sign in to comment.