This topic applies to my game described in this thread:
Deep Platformer — looking for people for cross-platform testing. I have a big problem with its adaptation to Unix. That's why I prepared a small test application.
This test program contains copied game code that applies to copying and painting bitmaps using
TBitmap.ScanLine, using or without scaling, as well as transparency support in the form of skipping pixels in the color of
clFuchsia. For the test uses bitmaps borrowed from the game (which are originally contained within binary files).
After running this application, the content of the window should look
exactly like in screenshot and do not cause any leaks, which should inform the window caused by using the
HeapTrc unit (second screenshot).
Under Windows, my game and this test application work perfectly, but the game crashes under Linux. Probably the problem is
TBitmap.ScanLine, so I am asking you to test the test program (under different platforms, if you want under Windows too), which sources I add to the attachments of this post.
The structure describing a single pixel and a pixels row are in the
CustomUtils unit:
type
TBitmapPixel = record
B, G, R {$IFNDEF WINDOWS}, A {$ENDIF}: UInt8;
end;
type
PBitmapLine = ^TBitmapLine;
TBitmapLine = array [UInt16] of TBitmapPixel;
The
CustomUtils unit contains all the procedures for copying and painting bitmaps.
If anyone knows if the problem is the type declarations used in conjunction with
ScanLine, or the way iterated by pixels, or something else, I would ask for directions. I hope that this application will allow to reproduce existing errors in the game.
Thank you for help.