raylib-aseprite
raylib-aseprite copied to clipboard
Black Doesn't Render
If I use 0,0,0,255 as a color it doesn't actually render on screen. I change it to a very dark gray and it renders just fine. It may be an issue within the Cute portion, I dunno.
Using this with the latest Raylib 5.5 dev, with the Linux build using Angle as the renderer.
Have some sample code?
My main.c file contents, this was just a test on getting it to draw, nothing serious on this, more for testing:
#include "../include/raylib.h"
#define RAYLIB_ASEPRITE_IMPLEMENTATION
#include "../include/raylib-aseprite.h"
#include "include/lantern.h"
int main(void){
const int width = 800;
const int height = 600;
SetConfigFlags(FLAG_WINDOW_RESIZABLE | FLAG_WINDOW_HIGHDPI);
InitWindow(width,height, "");
Aseprite lantern = LoadAsepriteFromMemory(lantern_aseprite, lantern_aseprite_len);
AsepriteTag flame = LoadAsepriteTag(lantern, "flame");
flame.speed = 1;
InitAudioDevice();
SetTargetFPS(60);
while(!WindowShouldClose()){
UpdateAsepriteTag(&flame);
BeginDrawing();
ClearBackground(WHITE);
DrawAsepriteTag(flame, 200,200, WHITE);
EndDrawing();
}
UnloadAseprite(lantern);
CloseAudioDevice();
CloseWindow();
}
Do the example demos work? Anything appear in the logs? Very strange.
Just tested again, and it's certainly rendering here. I just drew a bunch of black on top of George.
For me, I just get as close as I can to pure black and that seems to work for me. At my age (C is younger), that's good enough for my eyes.
Could it be that black is set as the alpha mask in aseptitr or something?
I finally was able to get back to this and apparently it didn't just affect black, but whatever was at idx-0 in whatever palette was used. In the case of your "george" file, idx-0 was a transparency. That's why it worked.
I was creating an opening splash for a weekend game jam and I was using a gameboy palette and the lightest color actually wasn't rendering, the only thing in common that they had with the palette that I normally used was black and the Game Boy color in question was at idx-0. I added a throwaway color the the current palette at idx-0 and re-compiled it and voila it worked.