Fish Fillets - Next Generation (4e47409, 1.0.1) for fredygames.com (GPL-2.0-or-later, like the game): the game was written for SDL 1.2, and this browser build runs it on SDL2 (Emscripten's port) with compat/SDL.h and compat/sdl12shim.cpp (published next to this patch), which provide the few SDL 1.2 calls the game uses. What changes in the game itself: - effect/*, level/ShapeBuilder.cpp: SDL_Color's fourth member is called "a" in SDL2 (it was "unused"); - effect/Outline.cpp, effect/PixelIterator.cpp: the colour key of a surface is read with fy_GetColorKey() (SDL2 has no format->colorkey); - gengine/KeyStroke.cpp: the typed character (keysym.unicode in SDL 1.2) comes from fy_Unicode(). diff -ruN a/src/effect/Color.h b/src/effect/Color.h --- a/src/effect/Color.h 2011-09-08 15:21:47.000000000 -0300 +++ b/src/effect/Color.h 2026-11-01 20:20:06.131271128 -0300 @@ -13,7 +13,7 @@ this->r = red; this->g = green; this->b = blue; - this->unused = alpha; + this->a = alpha; } }; diff -ruN a/src/effect/EffectDisintegrate.cpp b/src/effect/EffectDisintegrate.cpp --- a/src/effect/EffectDisintegrate.cpp 2011-09-08 15:21:47.000000000 -0300 +++ b/src/effect/EffectDisintegrate.cpp 2026-11-01 20:20:06.130824177 -0300 @@ -63,7 +63,7 @@ for (int px = 0; px < surface->w; ++px) { if (Random::aByte(py * surface->w + px) < m_disint) { SDL_Color pixel = PixelTool::getColor(surface, px, py); - if (pixel.unused == 255) { + if (pixel.a == 255) { PixelTool::putColor(screen, x + px, y + py, pixel); } } diff -ruN a/src/effect/EffectMirror.cpp b/src/effect/EffectMirror.cpp --- a/src/effect/EffectMirror.cpp 2011-09-08 15:21:47.000000000 -0300 +++ b/src/effect/EffectMirror.cpp 2026-11-01 20:20:06.131924826 -0300 @@ -36,7 +36,7 @@ PixelTool::putColor(screen, x + px, y + py, sample); } else { - if (pixel.unused == 255) { + if (pixel.a == 255) { PixelTool::putColor(screen, x + px, y + py, pixel); } } diff -ruN a/src/effect/EffectReverse.cpp b/src/effect/EffectReverse.cpp --- a/src/effect/EffectReverse.cpp 2011-09-08 15:21:47.000000000 -0300 +++ b/src/effect/EffectReverse.cpp 2026-11-01 20:20:06.132352361 -0300 @@ -25,7 +25,7 @@ for (int py = 0; py < surface->h; ++py) { for (int px = 0; px < surface->w; ++px) { SDL_Color pixel = PixelTool::getColor(surface, px, py); - if (pixel.unused == 255) { + if (pixel.a == 255) { PixelTool::putColor(screen, x + surface->w - 1 - px, y + py, pixel); } diff -ruN a/src/effect/LayeredPicture.cpp b/src/effect/LayeredPicture.cpp --- a/src/effect/LayeredPicture.cpp 2011-09-08 15:21:47.000000000 -0300 +++ b/src/effect/LayeredPicture.cpp 2026-11-01 20:20:06.131603789 -0300 @@ -98,7 +98,7 @@ if (sample == m_activeColor) { SDL_Color lower = PixelTool::getColor(m_lowerLayer, px, py); - if (lower.unused == 255) { + if (lower.a == 255) { PixelTool::putColor(screen, m_loc.getX() + px, world_y, lower); } diff -ruN a/src/effect/Outline.cpp b/src/effect/Outline.cpp --- a/src/effect/Outline.cpp 2011-09-08 15:21:47.000000000 -0300 +++ b/src/effect/Outline.cpp 2026-11-01 20:19:49.490709826 -0300 @@ -27,7 +27,7 @@ void Outline::drawOnColorKey(SDL_Surface *surface) { - Uint32 bgKey = surface->format->colorkey; + Uint32 bgKey = fy_GetColorKey(surface); drawOn(surface, bgKey); } //----------------------------------------------------------------- diff -ruN a/src/effect/PixelIterator.cpp b/src/effect/PixelIterator.cpp --- a/src/effect/PixelIterator.cpp 2011-09-08 15:21:47.000000000 -0300 +++ b/src/effect/PixelIterator.cpp 2026-11-01 20:20:06.133538466 -0300 @@ -49,7 +49,7 @@ bool PixelIterator::isTransparent() const { - return getPixel() == m_surface->format->colorkey; + return getPixel() == fy_GetColorKey(m_surface); } //----------------------------------------------------------------- SDL_Color @@ -57,7 +57,7 @@ { SDL_Color color; SDL_GetRGBA(getPixel(), m_surface->format, - &color.r, &color.g, &color.b, &color.unused); + &color.r, &color.g, &color.b, &color.a); return color; } //----------------------------------------------------------------- @@ -71,7 +71,7 @@ PixelIterator::putColor(const SDL_Color &color) { Uint32 pixel = SDL_MapRGBA(m_surface->format, - color.r, color.g, color.b, color.unused); + color.r, color.g, color.b, color.a); putPixel(pixel); } //----------------------------------------------------------------- diff -ruN a/src/effect/PixelTool.cpp b/src/effect/PixelTool.cpp --- a/src/effect/PixelTool.cpp 2011-09-08 15:21:47.000000000 -0300 +++ b/src/effect/PixelTool.cpp 2026-11-01 20:20:06.132789937 -0300 @@ -41,7 +41,7 @@ { SDL_Color color; SDL_GetRGBA(getPixel(surface, x, y), surface->format, - &color.r, &color.g, &color.b, &color.unused); + &color.r, &color.g, &color.b, &color.a); return color; } //----------------------------------------------------------------- @@ -55,7 +55,7 @@ const SDL_Color &color) { Uint32 pixel = SDL_MapRGBA(surface->format, - color.r, color.g, color.b, color.unused); + color.r, color.g, color.b, color.a); putPixel(surface, x, y, pixel); } //----------------------------------------------------------------- diff -ruN a/src/effect/SurfaceTool.cpp b/src/effect/SurfaceTool.cpp --- a/src/effect/SurfaceTool.cpp 2011-09-08 15:21:47.000000000 -0300 +++ b/src/effect/SurfaceTool.cpp 2026-11-01 20:20:06.133192347 -0300 @@ -98,7 +98,7 @@ SDL_Surface *canvas = createEmpty(surface, w, h); Uint32 pixel = SDL_MapRGB(canvas->format, color.r, color.g, color.b); SDL_FillRect(canvas, NULL, pixel); - SDL_SetAlpha(canvas, SDL_SRCALPHA|SDL_RLEACCEL, color.unused); + SDL_SetAlpha(canvas, SDL_SRCALPHA|SDL_RLEACCEL, color.a); SDL_BlitSurface(canvas, NULL, surface, dstrect); SDL_FreeSurface(canvas); diff -ruN a/src/gengine/KeyStroke.cpp b/src/gengine/KeyStroke.cpp --- a/src/gengine/KeyStroke.cpp 2011-09-08 15:21:47.000000000 -0300 +++ b/src/gengine/KeyStroke.cpp 2026-11-01 20:19:49.494672595 -0300 @@ -18,7 +18,7 @@ { m_sym = keysym.sym; m_mod = modStrip(keysym.mod); - m_unicode = keysym.unicode; + m_unicode = fy_Unicode(keysym.sym, keysym.mod); } //----------------------------------------------------------------- /** diff -ruN a/src/level/ShapeBuilder.cpp b/src/level/ShapeBuilder.cpp --- a/src/level/ShapeBuilder.cpp 2011-09-08 15:21:47.000000000 -0300 +++ b/src/level/ShapeBuilder.cpp 2026-11-01 20:20:06.133912669 -0300 @@ -28,7 +28,7 @@ color->r = 0; color->g = 0; color->b = 0; - color->unused = 255; + color->a = 255; switch (weight) { case Cube::LIGHT: