This commit is contained in:
n0ffie 2025-02-12 23:24:58 +01:00
parent 2dbfa1b99e
commit b1230534c5
22 changed files with 547 additions and 429 deletions

View file

@ -1,11 +1,50 @@
#include <colysis.h>
#define RAYLIB_BACKEND
#include <alyson.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <raylib.h>
#include <raymath.h>
#include <rlyson.h>
#include <animation/sprite.h>
int main(int argc, char** argv)
{
ALArgs args = al_args_create(argc, argv);
InitWindow(900, 600, "Colysis");
SetConfigFlags(FLAG_WINDOW_RESIZABLE | FLAG_WINDOW_UNDECORATED);
Texture2D gery = LoadTexture(ASSETS_PATH "/gery_hand.png");
SpriteAnimation geryanim = CreateSpriteAnimation(gery, (Vector2){64*5,64}, (Vector2){64,64}, 0.f, 1.f, 5, 0.2f);
while (!WindowShouldClose()) {
ClearBackground((Color){ 0x00, 0x6d, 0xfb });
float dt = GetFrameTime();
UpdateSpriteAnimation(geryanim, dt);
BeginDrawing();
{
DrawTextFull(GetFontDefault(), "Darling, I'm Home!", (Vector2){20,20}, TEXT_ORIENTATION_RIGHT, 0, 24, 5, 5, RAYWHITE);
DrawSpriteAnimation(geryanim, (Vector2){GetScreenWidth()/2.f, GetScreenHeight()/2.f});
}
EndDrawing();
}
DestroySpriteAnimation(geryanim);
UnloadTexture(gery);
return 0;
}