Found a useful spritesheet
This commit is contained in:
@@ -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 |
Binary file not shown.
|
After Width: | Height: | Size: 772 B |
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user