[Fixed for V0.42] maximum bitmap height reached

Messages are moved here (should anyone ever want to see them again) once they are no longer applicable to the current version (e.g. suggestions that have been implemented or bugs that have been fixed).

Moderator: George Gilbert

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
linflas
My other avatar is gay
Posts: 2445
Joined: Tue Nov 04, 2003 9:58 pm
Location: Lille, France
Contact:

[Fixed for V0.42] maximum bitmap height reached

Post by linflas »

It seems that a 400px+ height custom bitmap makes RTC engine crash.

RTC (V0.41) Diagnostic file - Wed Aug 09 17:42:43 2006

Error:
an access violation exception.

Stack Dump:
RTCMediaGraphics.ScaleBitmapAntiAliasA(pointer 0x0B502F20, pointer 0x00A70EA8, pointer 0x0A03DFB0, int 0, int 0, double 0.676923, double 0.679545, int 0, int 0, int 88, int 299);
RTCMediaGraphics.ScaleBitmap(pointer 0x0B502F20, pointer 0x0A03DFB0, int 0, int 0, int 130, int 440, int 0, int 0, int 88, int 299, int 51, int 51, int 12698553, bool FALSE, bool TRUE);
RTC.AutoScaleSingleFloorBitmap(pointer 0x0B734900, pointer 0x0A03DEB0, int 6);
RTC.AddAutoScaleFloorBitmap(pointer 0x0B70DD82, int 6);
RTC.DrawDungeonItem(int 621, int 6, int 8);
RTC.DrawDungeonTile(int 6, char 5, char 36, char 0);
RTC.DrawDungeonView(char 7, char 35, char 0, char 3);
RTC.ProgStateInDungeon();
RTC.DoFrame(int 50);
RTC.WinMain();
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post by George Gilbert »

Are you *sure* that that is the root cause of the problem? Ie, if you used a different bitmap, but kept everything else the same it doesn't crash?

If so, can you send me the compiled RTC file that you're using with instructions on how to get to the place that causes the crash (or even better, a tiny test dungeon with just one object in it that causes the crash).
User avatar
linflas
My other avatar is gay
Posts: 2445
Joined: Tue Nov 04, 2003 9:58 pm
Location: Lille, France
Contact:

Post by linflas »

Yes, sure about it. The bitmap was 440 px height, i resized it to 400 and it works fine.
I sent you an example by mail.
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post by George Gilbert »

Thats great thanks - what's happening is that it's not actually crashing in RTC, but instead in DirectX because your bitmap is bigger than the maximum screen size specified in the config.txt file (as opposed to the 400 being hard-coded into RTC).

I've fixed this in V0.42 so that your huge image is still displayed properly, even in a 640x400 resolution game.
User avatar
linflas
My other avatar is gay
Posts: 2445
Joined: Tue Nov 04, 2003 9:58 pm
Location: Lille, France
Contact:

Post by linflas »

excellent ! avoiding crashes is cool, even if these huge bitmaps are finally not necessary : i will have to crop them to gain some kilo(mega?)bytes in the RTC file ! :oops:
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

Out of interest Linflas, are you creating all your bitmaps as 24-bit? Because if you are, you can save a lot of disk space by dithering most down to 8-bit adaptive palettes -- these are usually more than adequate for most images. You only really need 24-bit for very complex imagery with lots of subtle shading that wouldn't translate well in a dither.

Of course, you may know all this, in which case I'll shut up.
User avatar
linflas
My other avatar is gay
Posts: 2445
Joined: Tue Nov 04, 2003 9:58 pm
Location: Lille, France
Contact:

Post by linflas »

nope, i'm not a compression specialist, so... thanks for your remarks :)

oh btw, i crop the parts that will never be displayed by the engine of course
Post Reply