|
Bug Squashing... Displaying 1-9 of 9 total.
1
allan-mouse-menefee
|
Okay, I DLed TT64's gradient textbox demo, and hacked out a few pieces that should work together. I cut+pasted the relevant parts where they go, and I'm not getting any errors...
But nothing's happening...
The log shows the log messages I included in the code every so often, so its not 'bailing' before its done. Its just not displaying the box! I borrowed the Entitystop and Entitystart functions from Sully, and put the textbox call in an entity activation function.
The entity stops, then starts again without displaying the stupid box.
I'm not familiar enough yet to know the special tools for finding what's up. Nothing error-like shows in the log, or in the verbose log. It runs fine, but nothing seems to be working.
Weird...any help?
Posted on 2006-07-19 23:24:10
|
Overkill
|
This sounds like a classic case of not calling ShowPage(); after drawing something. Render() draws the map to screen, and ShowPage() actually updates the screen. Maybe you do this, but even then, do you have a looping structure of some sort to make the box show until you're done?
// Stop entities before.
while(!done)
{
Render();
// Whatever Tom's weird gradient box thing is.
ShowPage();
// Exit when button 1 (enter by default) is pressed
if (b1)
{
Unpress(1);
done = 1;
}
}
// Start entities after.
Alternatively, perhaps it's something to do with the way that Tom's gradient stuff works, a step that you possibly omitted.
What kind of gradient box are you trying, anyway? If you just need a horizontal or vertical blending box, the Code Vault (see docs page) has the functions RectVGrad and RectHGrad.
Posted on 2006-07-20 00:42:34
|
allan-mouse-menefee
|
Yeah, I guessed I might want to try something simpler instead of diving in to that first. I just didn't want to get something all working, only to have to change things drastically when I 'upgrade'.
I think you are probably right, I'll scan through the code again and see, in the morning, after some sleep. :)
Basically, I was most interested in his auto-wrap stuff, I didn't want to have to define line breaks every time I had some dialogue to write, and I have a bunch.
I'm learning...
Posted on 2006-07-20 01:24:03
|
mcgrue
|
The Sully textboxes also have autowrap, actually!
"What", you say, "But I see those three-line things right there!"
Aha, but we did that for backward compatibility! It's all got a autowrap parser in the backed. Aaaand there's a direct access to it: AutoText() defined in /vc/v1_rpg/v1_textbox.vc
Here's the inline documentation for it:
// Takes a single string of text and does as many TextBoxM()'s and a
// final TextBox() as needed.
//
// | and/or TAB will force a newline.
// ~ and/or NEWLINE will force an entirely new box.
//
// VERGEDev doesn't advocate the use of Autotext for most cases because it
// ruins the dramatic effect of well-plotted out textboxes. Done correctly,
// your game is awesomely poetic and quotable. However, having massive boxes
// of text that don't have complete thoughts in one screen ruins the
// illusion.
//
// Ask vec for a more in-depth explaination sometime. ;)
//
// However, autotext is very useful if you're dynamically resizing your boxes,
// or pulling dynamic content from somewhere, etc etc, so here's the function anyways.
//
void AutoText( int sp, string master_text )
That first int is a sully style speech portrait reference.
As an aside, I made the SotS/Astrad textboxes completely by altering the variables of the Sully textbox system:
Posted on 2006-07-20 04:37:13 (last edited on 2006-07-20 04:38:53)
|
relaxis
|
I had problems too editing this code.
Posted on 2006-07-20 07:39:21
|
allan-mouse-menefee
|
Okay, I'll look at the sully code, I kinda got lost in it the first few times.
Good points, though, on not using autotext.
I discovered that (after adding a ShowPage();) it still looks like its skipping the render. BUT
Its not.
The box is vanishing before the next frame is rendered!
If I nag the activation enough times, it will show it for just a split second before vanishing.
Posted on 2006-07-20 12:25:52
|
allan-mouse-menefee
|
Okay, double post time...
I'll figure it out either way, so don't take too much trouble, but...
Any suggestions on the easiest way to borrow the code from Sully? It looks like it will do fine, now that I understand it a bit better. Just putting the textbox VC file (don't remember the proper name) as an #include generates errors, any ideas on co-dependency?
Otherwise, I'll hack away until it works, I'm persistent that way. :)
EDIT
Or maybe not. I assumed it should be pretty much plug+play, but I keep getting errors about resolving identifiers and such. Argh.
Mostly, the comments are just confusing me, I guess. I'm gonna keep trying, but I'm not at all sure what I'm doing.
EDIT
Never mind. I had to comment out a bunch of the save menu stuff, since I don't have the actual saveable stuff there yet! Duh.
I'll keep you apprized. :)
Posted on 2006-07-20 17:14:07 (last edited on 2006-07-20 23:55:59)
|
allan-mouse-menefee
|
Okay, not intending to post boost, but I wanted to start a new one after all that crapola above.
After mucking with the code for a while, realizing I was editing _menu_system.vc instead of the *real* menu_system.vc (that had me confused beyond belief!) and figuring out I had to call the menuinitcolors() function to get the colors set, then realizing its spelled colours, its working...sorta.
Anything that needs multiple boxes in succession (autotext or not) is giving me an error pointing to the completely wrong place. It says:
<code>
ImageForHandle() - Null image reference, probably an uninitialized image handle:
TextBoxDirect - vc/util/targetting.vc(28)
</code>
Only problem is that there are no image handles in targetting.vc! The engine is apparently not realizing its confused until somewhat later than the error occurs. I understand that this is somewhat common, but frustrating.
I think I'm going to bed for now.
Oh, what I ended up doing was plopping the whole VC and RES folders from Sully's package into the new game folder, then #include ing the includes.vc. There were a few messy errors to clean up, mostly the engine complaining that I wasn't actually using Sully at all!
EDIT
Okay, this morning I was a bit clearer in the head. I looked through the TextBoxDirect code, and found the problem. When I commented out the bit where it draws the little bobbing arrow, it stopped giving an error. Which means... I have to figure out a solution now. :)
Sorry if I seem to be posting too much, but I'm hoping that maybe my troubles and solutions might help someone else later. Or at least I might get some help! I'm gradually getting the idea though.
Are there any suggestions for drawing a 'status bar' for each character, somewhat like the ones in Ultima 7? I like that style and want to have the option to use a similar design. It would need to be updated pretty regularly, since its more of a stamina meter.
Thanks!
Posted on 2006-07-21 01:02:54 (last edited on 2006-07-21 11:58:54)
|
Code
|
I've never played Ultima, but I'm certainly familiar with stamina meters and such. :) Here's the code I threw together for my battle system:
void DrawATBGauge(int x,int y,int battle_char)
{
//meter fills up
RectFill(x,y,x+(master_characters[party[battle_char]].atb_progress/2),y+3,RGB(0,50,200),screen);
//shading
Line(x,y,x+(master_characters[party[battle_char]].atb_progress/2),y,RGB(0,100,250),screen);
//shading
Line(x,y+3,x+(master_characters[party[battle_char]].atb_progress/2),y+3,RGB(0,0,150),screen);
//empty meter
RectFill(x+(master_characters[party[battle_char]].atb_progress/2)+1,y,x+51,y+3,RGB(50,50,50),screen);
//border
Rect(x-2,y-2,x+52,y+5,RGB(200,200,200),screen);
//border
Rect(x-1,y-1,x+51,y+4,RGB(50,50,50),screen);
}
It's nothing special, but maybe it will get you on the right track. atb_progress is a variable in the master_characters struct, but you can replace that with anything. atb_progress is "out of" 100, but the actual meter it displays is only 50 pixels long, hence the "/2." My battle system calls this function everytime it draws the screen, (along with everything else) but the characters only get their ATB increased every battle tick, far less frequently. Hope it helps you! Somehow... :?
Posted on 2006-07-21 20:06:40
|
Displaying 1-9 of 9 total.
1
|
|