diff --git a/README.md b/README.md index fc9982e..6f24c49 100644 --- a/README.md +++ b/README.md @@ -11,4 +11,8 @@ See https://toylang.com/ for details. cmake -B build -DPLATFORM=SDL -DOPENGL_VERSION=Software cmake --build build cd build && sudo make install -``` \ No newline at end of file +``` + +## Asset Sources + +https://www.spriters-resource.com/arcade/pacman/asset/52631/ \ No newline at end of file diff --git a/Toy b/Toy index 6ebbcc4..eb33775 160000 --- a/Toy +++ b/Toy @@ -1 +1 @@ -Subproject commit 6ebbcc45a3db8190b97ccf37923dd5a137a72604 +Subproject commit eb33775314810e19eeac6ec176ef0b1746a7fead diff --git a/assets/Arcade - Pac-Man - Miscellaneous - General Sprites.png b/assets/Arcade - Pac-Man - Miscellaneous - General Sprites.png new file mode 100644 index 0000000..cf01851 Binary files /dev/null and b/assets/Arcade - Pac-Man - Miscellaneous - General Sprites.png differ diff --git a/assets/pacman.png b/assets/pacman.png new file mode 100644 index 0000000..06eee39 Binary files /dev/null and b/assets/pacman.png differ diff --git a/source/main.c b/source/main.c index b727cd1..0ccd4a2 100644 --- a/source/main.c +++ b/source/main.c @@ -76,6 +76,7 @@ int main() { unsigned char* code = makeCodeFromSource(source); + //build and run the VM Toy_VM vm; Toy_initVM(&vm); 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; const char* screenCaption = screenCaptionPtr != NULL && TOY_VALUE_IS_STRING(*screenCaptionPtr) ? TOY_VALUE_AS_STRING(*screenCaptionPtr)->leaf.data : ""; + //setup raylib InitWindow(screenWidth, screenHeight, screenCaption); SetTargetFPS(60); + //load a sprite + Image sprite = LoadImage("assets/pacman.png"); + while (!WindowShouldClose()) { //drawing BeginDrawing();