dear VERGE...
Displaying 1-8 of 8 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
resident

why you done gotta bust my balls bitch? why?

I've been trying to get back into the VC thing after entirely too long an absence from the world of any kind of programming, but it's just not having it. Lines of code i'd swear should work are making things break and I can't tell why for the life of me.

I was working through Rysen's tutorial and this causes Verge to crash whenever it's called.

void TextBox(string text)
{
int TextBg = LoadImage('res/textbox.gif');
// int TextBg = NewImage( 320, 62 );
int MyFont = LoadFont( 'res/smlfnt1.gif');

while(!b1)
{
Render();
Blit( 0, 178, TextBg, screen);
PrintString( 10, 185, screen, MyFont, text);
ShowPage();
}

Unpress(1);
FreeImage(TextBg);
FreeFont(MyFont);

}

I have tracked it down to the loading of the textbox image, because if I simply create a new image with the same name (the commented out line) it works. And yes, the image is in the right folder, and I know it's looking in the right place because it's loading the font from the same folder. I even tried making a new image and using it instead incase I'd broken something, but no, still no luck.

Posted on 2005-09-27 10:30:55

RageCage

well... your slash is going in the wrong direction. It should be LoadImage('res\textbox.gif');

I imagine that's the problem right there.

EDIT:
hmm, it appears verge doesnt care about the slashes, but it will crash on me if I use 'myimage.jpg' instead of ''myimage.jpg''. Use the double quotes and it should fix it, I think.

EDIT:
It also appears that when posting a message, v-rpg will turn '' into '... so you could have '' and I wouldnt know it... if such is the case, I have no idea why it is crashing verge.

EDIT:
perhaps the gif is currupted or is set to something un-gify like and verge doesn't like it. Try resaving the gif as a png.

Posted on 2005-09-27 11:46:16 (last edited on 2005-09-27 11:55:46)

resident

yeah, it's already a double quote, sadly.

The image file is the obvious candidate, but the fact it's quite happily loading and using the font is confusing the hell out of me.

One thing that did occur to me was the potential multiple loading and unloading of the image every time the textbox is called, but unless I'm wrong the while loop should be holding up the execution of the program.

Thinking about it, it was the textbox that was included with Rysens basic package (with the latest version of VERGE dropped on top), converted into a GIF with The Gimp. I've just tried it with the original PCX version, and it works!

Now I'm more confused than ever: Is there something odd about the gifs that The Gimp creates that means they won't work with VERGE?

Pheh, at least it works!

edit: it won't seem to load those gifs from anywhere, the folder doesn't matter, so there goes the only way I can think of VERGE itself could possibly be at fault. Which means it's pretty much going to be a case of The Gimp having some filetype option I didn't toggle that I was supposed to.

Posted on 2005-09-27 12:10:42 (last edited on 2005-09-27 12:21:04)

fox_astron

I haven't played enough with verge to know if this would affect it or not, but... Maybe the Gifs are interlaced?

Posted on 2005-09-27 12:52:52

Code

I'm under the impression that VERGE only likes .pcx and .png image files. Will VERGE load a .gif file that's saved from some program other than the Gimp? I'm still a newb, so please correct me if I'm wrong.

Posted on 2005-09-27 14:02:54

resident

I would swear it has in the past, but maybe that's just the onset of old age.

Posted on 2005-09-27 14:08:56

Kildorf

Verge loads pretty much any of the standard, not-fancy image formats. You're fine for gifs, pngs, bmps, etc. etc, but (as far as I know) it doesn't support psds or rifs or anything like that.

Posted on 2005-09-27 17:32:08

mcgrue

I load gifs, jpgs, pcxs, and pngs just fine. However, certain gif and png subformats will cause grief. Low-color gifs for example aren't particularly friendly.

Posted on 2005-09-27 20:47:13


Displaying 1-8 of 8 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.