Skip to content

Commit 7609395

Browse files
committed
Improve text about sdl sprite example
1 parent 46a5177 commit 7609395

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

basic_programs.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ More documentation on SDL can be found <a href="http://wiki.libsdl.org/FrontPage
253253

254254
![](images/sprite.png)
255255

256-
SDL image is a library which adds support for multiple image formats to SDL. This example results in the same image as the sprite example using libgu above. Here the limitation of the image width being a power 2 does not apply.
256+
SDL support loading BMP and PNG image files out of the box. This example results in the same image as the sprite example using libgu above. Here the limitation of the image width being a power 2 does not apply.
257257

258258
Despite this example adding an option to close by pressing the start button, the code is much shorter. It can even be build for Linux without any further modifications.
259259

@@ -285,15 +285,17 @@ make
285285

286286
This will result in an EBOOT.PBP file in the build directory. Put it in a directory in ms0:/PSP/GAME/ and add the grass image file, download it from <a href="/resources/grass.png">here</a>, to be able to run it on the PSP.
287287

288-
If you have sdl sdl-image dev packages and a compiler installed this code will also build on Linux for Linux by running:
288+
If you have the sdl dev package and a compiler installed this code will also build on Linux for Linux by running:
289289

290290
```shell
291291
mkdir build && cd build
292292
cmake ..
293293
make
294294
```
295295

296-
Documentation for SDL_image can be found <a href="https://wiki.libsdl.org/SDL3_image/FrontPage">here</a>.
296+
If you want support for more image formats than just PNG and BMP, you can use the SDL image library ins addition to SDL. This adds the `IMG_Load` function, which can be used in place of `SDL_LoadPNG` to load any image format. This would require adding an include and linking to SDL image. Documentation for SDL image can be found <a href="https://wiki.libsdl.org/SDL3_image/FrontPage">here</a>.
297+
298+
More documentation on SDL can be found <a href="http://wiki.libsdl.org/FrontPage">here</a>.
297299

298300
</details>
299301

0 commit comments

Comments
 (0)