#include <helianthus.h>
#include "common.h"
#include "phisics.h"
#include "sprites.h"
#include "font.h"
#include "drawing.h"
#include "framebuffer.h"
void init() {
commonInit();
phisicsInit();
spritesInit();
fontInit();
drawingInit();
framebufferInit();
}
void draw() {
commonDraw();
framebufferDraw();
drawingDraw();
phisicsDraw();
spritesDraw();
fontDraw();
drawSprites();
saveState();
stroke(colorByName("red"));
strokeWidth(20);
point(mouseX(), mouseY());
restoreState();
if (keyDown("p")) {
viewportSave("screenshot.png");
messageBox("screenshot saved to file: screenshot.png");
}
}
int main() {
worldSetHeight(512);
worldSetWidth(1024);
worldSetResizable(TRUE);
worldSetFrameRateEx(1, 100);
worldSetInit(&init);
worldSetDraw(&draw);
worldRun();
return 0;
}