Skip to content

Commit

Permalink
we sillied a little too hard
Browse files Browse the repository at this point in the history
  • Loading branch information
counter185 committed May 17, 2024
1 parent dcacca6 commit a156e73
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions freesprite/Layer.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ class Layer
w = width;
h = height;
pixelData = (uint8_t*)malloc(width * height * 4);
tex = SDL_CreateTexture(g_rd, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, w, h);
SDL_SetTextureBlendMode(tex, SDL_BLENDMODE_BLEND);
if (pixelData != NULL) {
memset(pixelData, 0, width * height * 4);
tex = SDL_CreateTexture(g_rd, SDL_PIXELFORMAT_ARGB8888, SDL_TEXTUREACCESS_STREAMING, w, h);
SDL_SetTextureBlendMode(tex, SDL_BLENDMODE_BLEND);
}
}
Layer(SDL_Surface* from) : Layer(from->w, from->h) {
//pixelData = (uint8_t*)malloc(w * h * 4);
Expand Down
2 changes: 1 addition & 1 deletion freesprite/StartScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ void StartScreen::render()
{
SDL_Rect logoRect = SDL_Rect{ 4, g_windowH - 4 - 40 * 4, 128 * 4, 40 * 4 };
SDL_RenderCopy(g_rd, g_mainlogo, NULL, &logoRect);
g_fnt->RenderString("alpha16.05.2024", 2, g_windowH - 20 - 20, SDL_Color{255,255,255,0x50});
g_fnt->RenderString("alpha17.05.2024", 2, g_windowH - 20 - 20, SDL_Color{255,255,255,0x50});

SDL_Rect bgr = SDL_Rect{ 0, 35, 560, 300 };
SDL_SetRenderDrawColor(g_rd, 0x20, 0x20, 0x20, 0xa0);
Expand Down

0 comments on commit a156e73

Please sign in to comment.