Found a useful spritesheet

This commit is contained in:
2026-04-28 22:04:27 +10:00
parent d35ccc1765
commit 9cb8b4c3df
5 changed files with 11 additions and 2 deletions
+5 -1
View File
@@ -11,4 +11,8 @@ See https://toylang.com/ for details.
cmake -B build -DPLATFORM=SDL -DOPENGL_VERSION=Software cmake -B build -DPLATFORM=SDL -DOPENGL_VERSION=Software
cmake --build build cmake --build build
cd build && sudo make install cd build && sudo make install
``` ```
## Asset Sources
https://www.spriters-resource.com/arcade/pacman/asset/52631/
+1 -1
Submodule Toy updated: 6ebbcc45a3...eb33775314
Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 772 B

+5
View File
@@ -76,6 +76,7 @@ int main() {
unsigned char* code = makeCodeFromSource(source); unsigned char* code = makeCodeFromSource(source);
//build and run the VM
Toy_VM vm; Toy_VM vm;
Toy_initVM(&vm); Toy_initVM(&vm);
Toy_bindVM(&vm, code, NULL); Toy_bindVM(&vm, code, NULL);
@@ -90,9 +91,13 @@ int main() {
int screenHeight = screenHeightPtr != NULL && TOY_VALUE_IS_INTEGER(*screenHeightPtr) ? TOY_VALUE_AS_INTEGER(*screenHeightPtr) : 480; int screenHeight = screenHeightPtr != NULL && TOY_VALUE_IS_INTEGER(*screenHeightPtr) ? TOY_VALUE_AS_INTEGER(*screenHeightPtr) : 480;
const char* screenCaption = screenCaptionPtr != NULL && TOY_VALUE_IS_STRING(*screenCaptionPtr) ? TOY_VALUE_AS_STRING(*screenCaptionPtr)->leaf.data : ""; const char* screenCaption = screenCaptionPtr != NULL && TOY_VALUE_IS_STRING(*screenCaptionPtr) ? TOY_VALUE_AS_STRING(*screenCaptionPtr)->leaf.data : "";
//setup raylib
InitWindow(screenWidth, screenHeight, screenCaption); InitWindow(screenWidth, screenHeight, screenCaption);
SetTargetFPS(60); SetTargetFPS(60);
//load a sprite
Image sprite = LoadImage("assets/pacman.png");
while (!WindowShouldClose()) { while (!WindowShouldClose()) {
//drawing //drawing
BeginDrawing(); BeginDrawing();