BMP loading code, corruption?

You must understand the Game Editor concepts, before post here.

BMP loading code, corruption?

Postby Game A Gogo » Tue Feb 19, 2008 1:45 am

I have a problem, I made a code to load bitmaps. It worked PERFECTLY! no bugs or anything, then I try it again, after writing a code 370 lines long. The file seems corrupted... Like if "fgetc(import);" suddenly stopped advancing in the FILE correctly...

PLEASE!!! HELP ME!!!

The loading code is in the actor Text=>Create Actor=>Script Editor.

to the person who helps me, he gets two scores. but one for sure.
Attachments
CFW.zip
Custom Font Witdh
(27.06 KiB) Downloaded 131 times
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: BMP loading code, corruption?

Postby Fuzzy » Tue Feb 19, 2008 2:53 am

I cannot quite spot it, but it looks like your reading of the rgb is off. Double check where you start reading rgb from. The image is only 2 colors, but when I run the example I see yellow. That tells me that its using the wrong values for RGB.
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Re: BMP loading code, corruption?

Postby Game A Gogo » Tue Feb 19, 2008 3:03 am

I will try to see if anything can work, I still wonder why it used to work before and bam, now it doesn't I haven't edited the code at all.
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: BMP loading code, corruption?

Postby Fuzzy » Tue Feb 19, 2008 3:06 am

Game A Gogo wrote:I will try to see if anything can work, I still wonder why it used to work before and bam, now it doesn't I haven't edited the code at all.


I'm in various chats if you want to catch me to talk it over. I've had strangeness like that happen. I have some ideas for simplifying your code too.

From what I am reading the bmp format changes from windows version to windows version. If you edited it with a different program, even if you didnt change the bit depth and compression, it may be different.
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score


Return to Advanced Topics

Who is online

Users browsing this forum: No registered users and 1 guest