Re: [hatari-devel] Screenshots in NEO format

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Okay, I've made those changes here:

https://github.com/hatari/hatari/pull/35
https://github.com/hatari/hatari/pull/35.diff

Using static arrays, using be_swap16, consolidating duplicate code.
Added XIMG to GUI and the new --screenshot-format command line option.
Added documentation of command line option.

-- Brad Smith

On Thu, Jan 25, 2024 at 6:44 PM Eero Tamminen <oak@xxxxxxxxxxxxxx> wrote:
Hi,

Looking at this and earlier merged original code, I have some objections.

* Instead of StoreNEO(), code should use be_swap16() like rest of the
Hatari code (or SDL macros, or ntohs())
* There's no need for static NEOHeader array, it can be just local stack
variable in function using it
* There's no need for small "png_pal" & "palbuf" arrays in
ScreenSnapShot_SavePNG_ToFile() to be static either, those can be in
stack too
* There's some duplicate code in ScreenSnapShot_SaveNEO() and
ScreenSnapShot_SaveXIMG() which could be put to a common helper function


Some update to Hatari manual would also be nice, which mentions that
unlike PNG & BMP formats, borders are not saved to these formats
although user would have them enabled [1].



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/