#nuvie@irc.freenode.net logs for 18 May 2004 (GMT)

Archive Today Yesterday Tomorrow
Nuvie homepage

[00:35:23] --> Kirben has joined #nuvie
[04:50:44] <-- sbx has left IRC (vinge.freenode.net irc.freenode.net)
[04:52:27] --> sbx has joined #nuvie
[06:11:22] --- sbx is now known as sbx|afk
[09:58:34] --> Yuv422 has joined #nuvie
[10:07:31] * Yuv422 starts cleaning the objmanager in readiness for saving
[10:07:48] <wjp> hi Yuv422
[10:07:59] <Kirben> Should 's' key currently crash nuvie ?
[10:08:20] <Yuv422> hi
[10:08:31] <Yuv422> Kirben: I don't think so
[10:08:45] <Yuv422> can you tell me where it crashes?
[10:08:52] <Kirben> 0x004157ff in GUI_Button::GUI_Button(void*, int, int, SDL_Surface*, SDL_Surface*, GUI_CallBack*) (
[10:08:52] <Kirben> this=0x2413b08, data=0x0, x=0, y=0, image=<incomplete type>, image2=<incomplete type>,
[10:08:53] <Kirben> callback=0x2413848) at GUI/GUI_button.cpp:42
[10:08:53] <Kirben> 42 {
[10:09:23] * Yuv422 looks
[10:09:56] <Yuv422> do you have the scrollbar images?
[10:10:44] <Kirben> No, will add them now.
[10:10:49] <Yuv422> :-)
[10:11:08] <Yuv422> maybe I should add some error checking in there.
[10:11:41] <Kirben> ah, works now.
[10:11:48] <Yuv422> excellent
[10:11:50] <Kirben> Yes error would be better than crash.
[10:13:22] <Kirben> hmm any idea what could cause this crash at startup (Under gdb only) ?
[10:13:24] <Kirben> 0x77f57bd2 in ntdll!RtlAppendStringToString () from ntdll.dll
[10:13:43] <Yuv422> strange
[10:13:44] <Kirben> Unfortunately won't give me any further back trace
[10:14:01] <Yuv422> does it do that other mingw compiled apps?
[10:14:11] <Yuv422> if ntdll.dll a system dll?
[10:15:10] <Kirben> Yes it is a system dll.
[10:15:49] <Kirben> Might be some mingw issue, occurs under Exult too but not ScummVM
[10:18:21] <Kirben> Odd, occurs in exult/pentagram/nuvie/xu4 but not dosbox/scummvm.
[10:19:10] <Yuv422> maybe they don't use string append in dosbox/scummvm
[10:19:17] <wjp> what's the "signal" that gdb gets? SIGSEGV?
[10:19:39] <Kirben> Yes SIGSEGV
[10:22:45] <wjp> no further backtrace is a bit odd
[10:22:53] <wjp> are there any other threads?
[10:23:40] <wjp> ("info threads")
[10:23:57] <Kirben> (gdb) info threads
[10:23:57] <Kirben> (gdb) No registers
[10:24:49] <Kirben> oops program
[10:24:51] <Kirben> (gdb) info threads
[10:24:51] <Kirben> * 1 thread 1268.0xecc 0x77f57bd2 in ntdll!RtlAppendStringToString () from ntdll.dll
[11:53:24] <Yuv422> brb
[11:53:26] <-- Yuv422 has left IRC ("[BX] I theenk I need a beeger box!")
[11:56:38] --> Yuv422 has joined #nuvie
[11:57:01] <Yuv422> I was wondering why my machine was running slowly
[11:57:24] <Yuv422> it turns out that I had to detached tcsh shells spinning out of comtrol
[11:57:27] <Yuv422> control
[11:57:57] <Yuv422> It propbably started the other day when Apple X11 crashed.
[12:02:12] --- sbx|afk is now known as sbx
[12:02:28] <Yuv422> hi sbx
[12:02:50] <Yuv422> I'm splitting the obj indexes into chunks
[12:02:55] <Yuv422> in objmanager
[12:03:10] <Yuv422> so it will be easier to save the data baxk to disk
[12:03:17] <Yuv422> back
[12:03:52] <Yuv422> yay it all compiles and works after the conversion
[12:04:28] <sbx> hi
[12:05:45] <Yuv422> bbl
[12:05:54] <sbx> i'm going to update my cvs tree and try to merge with my old changes, and change the callbacks to the new callbacks
[12:05:54] <sbx> ok
[12:36:55] <Yuv422> back
[13:27:38] <sbx> ah me too
[13:27:57] <Yuv422> I'm just about to commit my changes
[13:30:18] <sbx> what do you mean splitting the obj indexes into chunks?
[13:30:54] <Yuv422> iAVLTree *surface[64];
[13:31:08] <Yuv422> instead of iAVLTree surface;
[13:31:13] <Yuv422> instead of iAVLTree *surface;
[13:31:25] <sbx> oh
[13:31:31] <sbx> are you still saving it all at once?
[13:31:42] <Yuv422> so I can write them back into their objblk chunks
[13:32:59] <Yuv422> all at once?
[13:34:33] <sbx> are you talking about when saving the game or when the chunk is cached out?
[13:34:51] <Yuv422> just for saving
[13:35:12] <Yuv422> during the game the whole lot is in memory
[13:35:42] <Yuv422> it is just easier to save them to their blocks if they are in separate index trees
[13:36:12] <sbx> oh okay, I havn't read up on iAVL :)
[13:37:20] <Yuv422> I'll have to insert the eggs back into the objmanager during saving
[13:37:39] <Yuv422> or at least make them available
[13:38:51] <Yuv422> If the user asks for a new game. Should we ask the gypsy questions?
[13:39:01] <sbx> oh yes
[13:39:18] <sbx> that's a definite future development, along with the intro screens
[13:39:38] <sbx> there is a webpage somewhere that explains how the answers figure into your stats
[13:39:46] <Yuv422> really?
[13:39:47] <Yuv422> cool
[13:40:12] <sbx> someone spent time researching it with new characters
[13:40:27] <sbx> not that I know if it's at all accurate
[13:40:28] * Yuv422 tries to find it
[13:45:45] <sbx> I found it on my HD
[13:45:50] <Yuv422> cool
[13:46:41] <Yuv422> Is it complete?
[13:46:53] <sbx> I think you've seen it...
[13:46:56] <sbx> http://www.cs.ucsd.edu/~jcsorens/ultima6.html
[13:47:26] <sbx> 1st half is character advancement, 2nd half is character creation
[13:48:47] <Yuv422> nice
[13:49:41] <Yuv422> I'm not too sure if I have seen that page before
[13:56:35] <Yuv422> ok my changes are in cvs now
[14:00:36] <sbx> for your general callback stuff is there a Callback or MessageServer class that handles sending of messages to a CallbackTarget, or do you just use the target's callback method directly from any type of class sending a msg?
[14:01:18] <sbx> because the way I had it any class that wanted to send messages had to inherit Callback to get its "message()"
[14:01:42] <sbx> (which would send to all predefined targets)
[14:02:16] <Yuv422> there is a base class with a virtual callback method
[14:02:30] <Yuv422> classes inherit from that
[14:02:44] <Yuv422> you then just call the callback method directly
[14:04:18] <sbx> for classes receiving messages (including pseudosingletons like UseCode) do you prefer that they inherit the callbacktarget, or have a callback target client that they can check on each update to see if it received anything?
[14:07:42] <Yuv422> inherit
[14:07:51] <Yuv422> it is only a single method
[14:08:15] <Yuv422> in the callback class
[14:08:32] <Yuv422> it is GUI related though
[14:08:42] <Yuv422> GUI_CallBack
[14:08:52] <sbx> I was thinking for the target
[14:09:13] <sbx> or is that the target?
[14:09:21] <Yuv422> yes that is the target
[14:09:28] <sbx> what args does the callback method accept?
[14:09:32] <sbx> I know about msg, and sender
[14:09:43] <sbx> it needs msg_data and probably user_data
[14:09:53] <sbx> but maybe sender replaces user_data
[14:10:00] <Yuv422> class GUI_CallBack
[14:10:00] <Yuv422> {
[14:10:00] <Yuv422>
[14:10:00] <Yuv422> public:
[14:10:00] <Yuv422>
[14:10:00] <Yuv422> GUI_CallBack() { return; }
[14:10:02] <Yuv422>
[14:10:04] <Yuv422> virtual GUI_status callback(uint16 msg, GUI_CallBack *caller, void *data) { printf("Warning! Unhandled callback. msg (%x)\n", msg); return GUI_PASS; }
[14:10:07] <Yuv422>
[14:10:09] <Yuv422> };
[14:10:40] <Yuv422> GUI_Status is an int from memory
[14:11:51] <sbx> ah ok then
[14:12:05] <sbx> U6UseCode determines what obj is being sent a message from the user_data
[14:12:55] <Yuv422> right
[14:13:20] <sbx> then you call the usecode function with USEEVENT_MESSAGE
[14:13:50] <sbx> and the appropriate itemrefs are set from msg_data
[14:14:14] <sbx> which itemrefs are set depends on the message
[14:14:54] <Yuv422> so you need two data arguments?
[14:14:59] <sbx> (itemrefs are just arguments for a usecode call remember)
[14:15:01] <sbx> yeah
[14:15:29] <sbx> OR the callback could have a callbak_user_data field which can be set before sending the message
[14:15:42] <sbx> not necessarily sent in the callback() method
[14:15:49] <sbx> but either way
[14:16:08] <Yuv422> how about sending a struct with two fields?
[14:16:12] <Yuv422> in the userdata
[14:16:23] <sbx> what would the fields be?
[14:16:37] <-- Kirben has left IRC ("System Meltdown")
[14:16:43] <Yuv422> the data you need to recieve in the callback target
[14:16:54] <sbx> only msg & data can conceivably be in a struct together imo
[14:17:02] <sbx> user_data is not part of the message
[14:17:15] <sbx> its just something "agreed upon" by sender and target at some point
[14:18:04] <sbx> I could figure a better way than user_data to do this for Timers and Effects.
[14:20:32] <sbx> for example, certain Effects might call UseCode manually with a u6usecode::message_obj(Obj*), where the Obj* is the one causing the effect
[14:21:03] <sbx> I don't know why I'm not using that now, and depending on u6usecode::callback() to determine the Obj* from user_data.
[14:21:51] <sbx> that should be "I don't know why I'm requiring u6usecode::callback() to determine the Obj* from user_data now, rather than have a useusecode::message_obj()."
[14:22:57] <Yuv422> do you have an example effect?
[14:23:00] <sbx> In case you don't know why I'm messaging usecode/objects... when usecode initated Effects complete they can send a message to the usecode function allowing it to resume or print the prompt.
[14:23:39] <sbx> if(ev == USE_EVENT_USE)
[14:23:39] <sbx> {
[14:23:39] <sbx> scroll->display_string("\nFire!\n");
[14:23:39] <sbx> CannonballEffect *effect = new CannonballEffect(obj);
[14:23:39] <sbx> effect->add_client(this);
[14:23:40] <sbx> return(false);
[14:23:42] <sbx> }
[14:23:44] <sbx> else if(ev == USE_EVENT_MESSAGE)
[14:23:46] <sbx> {
[14:23:48] <sbx> if(*items.msg_ref == MESG_EFFECT_COMPLETE)
[14:23:50] <sbx> {
[14:23:52] <sbx> scroll->display_string("\n");
[14:23:54] <sbx> scroll->display_prompt();
[14:23:56] <sbx> }
[14:23:58] <sbx> return(true);
[14:24:00] <sbx> }
[14:25:19] <sbx> hmm... Instead of that I could just set Event to WAIT_MODE and have it print the prompt when effect is complete
[14:25:43] <Yuv422> so the effect is the cannonball animation?
[14:26:02] <sbx> Anyway, instead of effect->add_client(this), that particular effect could just do "usecode->message_obj(obj, complete)"
[14:26:08] <sbx> Yeah, the animation and sound.
[14:26:38] <sbx> though I don't have any sounds for it at this time :)
[14:27:12] <Yuv422> sound shouldn't require a callback
[14:27:24] <Yuv422> it should finish and deallocate ok
[14:27:40] <sbx> the Effect just starts the sound
[14:27:43] <sbx> it doesn't wait for it
[14:27:50] <Yuv422> yes
[14:28:00] <sbx> otoh it waits for the animation
[14:28:06] <sbx> which is a TossAnim
[14:28:10] <sbx> with tile set to the cannonball tile
[14:28:35] <sbx> and it will hit boundaries, blocking map tiles, or actors
[14:28:41] <Yuv422> can we have a multi-turn animation?
[14:29:05] <sbx> no what's that?
[14:29:29] <Yuv422> I can't think of any myself
[14:29:42] <Yuv422> maybe rain
[14:30:52] <sbx> oh
[14:30:59] <sbx> I guess you just wouldn't set Event to WAIT_MODE
[14:31:23] <Yuv422> hehe yeah. ;)
[14:31:54] <Yuv422> I'm off to bed now
[14:31:59] <sbx> Hmm okay
[14:32:03] <sbx> talk to you later
[14:32:08] <Yuv422> righto
[14:32:10] <Yuv422> cya
[14:32:14] <-- Yuv422 has left IRC ("[BX] Reserve your copy of BitchX-1.0c19 for the Atari 2600 today!")
[14:32:19] <sbx> bbl
[14:32:22] <-- sbx has left IRC ()
[22:07:37] --> sbx has joined #nuvie