03-28-2024, 07:29 AM
Hi!
I found 2 bugs in Tilengine.
The first one is about the CRT filter. When I set a bitmap as background and a tilemap as layer, I have a strange glitch with the CRT enabled (nothing special if disabled) :
Here is the code :
The second is when I change the FPS, seems the animations of the flowers are always at the same speed. Is that normal? Shouldn't it be slower (or faster if above screen refresh rate)?
Thanks for your answer!
I found 2 bugs in Tilengine.
The first one is about the CRT filter. When I set a bitmap as background and a tilemap as layer, I have a strange glitch with the CRT enabled (nothing special if disabled) :
Here is the code :
Code:
#include "Tilengine.h"
#include <SDL2/SDL.h>
int main(void) {
TLN_Tilemap foreground;
TLN_Init (400, 240, 1, 0, 0);
TLN_Bitmap bm = TLN_LoadBitmap("elis.bmp");
TLN_Tilemap tm = TLN_LoadTilemap("assets/sonic/Sonic_md_fg1.tmx", NULL);
TLN_SetBGBitmap(bm);
TLN_SetLayerTilemap(0, tm);
TLN_CreateWindow (NULL, CWF_S3|CWF_NOVSYNC);
int fps = 60;
TLN_SetTargetFps(10);
int average_fps = 0;
while (TLN_ProcessWindow()) {
/* adjust game logic pacing to target fps */
uint32_t begin = SDL_GetTicks();
TLN_DrawFrame(0);
uint32_t end = SDL_GetTicks();
uint32_t delta = end - begin;
printf("FPS = %f\n", 1000.0 / (float)delta);
}
TLN_Deinit ();
}
The second is when I change the FPS, seems the animations of the flowers are always at the same speed. Is that normal? Shouldn't it be slower (or faster if above screen refresh rate)?
Thanks for your answer!