dougmencken / HeadOverHeels

The free and open source remake of the game “Head over Heels”
GNU General Public License v3.0
30 stars 9 forks source link

need compatibility for OS X #1

Closed dougmencken closed 7 years ago

dougmencken commented 7 years ago

HeadOverHeels remake is not yet compatible with OS X

update° it compiles now but still has some problems

dougmencken commented 7 years ago

head over heels on os x headoverheels on mac ppc worlds head over heels on windows headoverheels on windows x86 worlds

Big endian thingie with graphics ~ exempli gratia in file for background of main menu it is blueish, and little endian platform shows it as in file, but on big endian it is greenish

background

background loads via load_bitmap((path + "gfx/gui/background.bmp").c_str(), 0); and draws via blit(this->backgroundImage, destination, 0, 0, 0, 0, this->backgroundImage->w, this->backgroundImage->h); both of them are from Allegro library

update° unreal colors on big endian is about Windows® Bitmap files where color for pixel is multi byte, exempli gratia files with millions of colors in RGB space. Files with 256 indexed colors where single byte completely defines the color are okay

dougmencken commented 7 years ago

Since adoption of big endian friendly loadpng v1.5 for allegro together with conversion of any Windows® Bitmap file to Portable Network Graphics one and thus use of load_png in places of former load_bitmap the problem of unreal colors is gone

headoverheels okay

so probably the bitmap loader messes up endianness elias @ #allegro @ irc.freenode.net

Meanwhile this conversion reduced the space which pictures need more than twenty times

before

        $ du -csb gamedata/gfx
        15018668  gamedata/gfx
        15018668  total

        $ find . -iname "*.bmp" | wc -l
        347
        $ find . -iname "*.png" | wc -l
        5
        $ find . -iname "*.png"
        ./extras/icons/headoverheels16.png
        ./extras/icons/headoverheels32.png
        ./extras/icons/headoverheels48.png
        ./gamedata/hoh-icon.png
        ./src/loadpng/examples/alpha.png

after

        $ du -csb gamedata/gfx
        707750  gamedata/gfx
        707750  total

        $ find . -iname "*.bmp" | wc -l
        0
        $ find . -iname "*.png" | wc -l
        362
        $ find . -iname "*.png" -type f | wc -l
        352
dougmencken commented 7 years ago

Yet Head over Heels is friend of OS X application bundles

bundle of headoverheels

Yeah just double click on it