Description
Hello, i was testing a bit your engine, and it seems that im not able to load a bitmap and draw it on the screen, i got this error message:
here is my code:
``#define PUNITY_IMPLEMENTATION
#include "punity.h"
Bitmap image;
typedef struct Game_
{
Bitmap font;
}
Game;
static Game *GAME = 0;
int
init()
{
GAME = bank_push_t(CORE->storage, Game, 1);
font_load_resource(&GAME->font, "font.png", 4, 7);
CORE->canvas.font = &GAME->font;
Bitmap* imagee = ℑ
bitmap_load_resource(imagee, "image.png", 0);
return 1;
}
void
step()
{
canvas_clear(1);
Bitmap* imagee = ℑ
Rect oho = rect_make(60, 100, 40, 140);
Rect* oo = &oho;
bitmap_draw(imagee, 60, 10, 0, 0, oo);
if (key_down(KEY_ESCAPE)) {
CORE->running = 0;
}
}
I tried changing Assert(comp == 4) to Assert(comp = 4), this seems to work, but it fills the rest of the screen with the main colour of the image.
i just dont know what's happening
PS: i do have image.png declared in the main.rc