[Ohrrpgce] SVN: teeemcee/11931 8-bit Surfaces now can have masks too; implement 8->32 bit blits with ma

Ralph Versteegen teeemcee at gmail.com
Wed Jul 22 20:17:41 PDT 2020


As of this commit, 24 bit mode in games should now be complete, although
most of Custom still runs at 8-bit for now. (8-bit uses less CPU, so seems
worth keeping. The sprite editor, which draws scaled sprites, is the only
thing that needs to be 8-bit. We actually have two different ways of
drawing a scaled sprite, one of which (DrawOptions.scaled) isn't supported
by Surfaces yet)

Now I just need to allow importing 24bit backdrops (keeping the original
jpg and png files)
I said before that I was trying to avoid using png by looking for
alternatives, partially because I wanted to avoid depending on a png
library, since png is complex.
I found that I can beat png compression by typically about (only) 10% using
simple filtering + gzip/zlib compression (which is builtin into lodepng).
However the advantage of using png is that it's good enough for lossless
compression of any image type and really flexible, while I would have to
try multiple different compression methods to be consistently as good or
better. And 10% isn't impressive. I might still implement it at some future
time (eg. for the html5 port).

On Thu, 23 Jul 2020 at 14:03, <subversion at hamsterrepublic.com> wrote:

> teeemcee
> 2020-07-22 17:44:58 -0700 (Wed, 22 Jul 2020)
> 344
> 8-bit Surfaces now can have masks too; implement 8->32 bit blits with masks
>
> This fixes many sprite dissolves not working in 32-bit mode
>
> Normally it would be necessary to recompile gfx_directx.dll after changing
> Surface, but I appended the new field to the end and gfx_directx doesn't
> use
> Surfaces for anything except one function which is OK.
> ---
> U   wip/allmodex.bas
> U   wip/blit.c
> U   wip/surface.bi
> U   wip/surface.cpp
> U   wip/surface.h
> _______________________________________________
> Ohrrpgce mailing list
> ohrrpgce at lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20200723/f8ee75fb/attachment.html>


More information about the Ohrrpgce mailing list