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

Archive Today Yesterday Tomorrow
Nuvie homepage


[00:25:06] --> EsBee-Eks has joined #nuvie
[00:43:16] <-- sbx has left IRC (Read error: 110 (Connection timed out))
[01:12:55] --> Kirben has joined #nuvie
[02:15:39] --> Yuv422 has joined #nuvie
[02:15:45] <Yuv422> hello
[02:15:49] <EsBee-Eks> hi
[02:15:56] <EsBee-Eks> glad to see you
[02:16:01] <Yuv422> :)
[02:16:04] <EsBee-Eks> im trying to get nuvie to work
[02:16:15] <EsBee-Eks> wjp says it works so I must have introduced conflicts during the mergre
[02:16:34] <EsBee-Eks> looking through the cvs diff now
[02:16:35] <Yuv422> what is happening?
[02:16:48] <EsBee-Eks> I printed the error earlier today
[02:16:51] <EsBee-Eks> ?logs
[02:16:51] <exultbot> Logs are available at http://www.math.leidenuniv.nl/~wpalenst/nuvielog.php
[02:16:52] <Yuv422> ah k
[02:17:28] <Yuv422> looks like it is overflowing the index
[02:17:41] <Yuv422> while reading the number of objects in the chunk
[02:18:00] <Yuv422> make sure you don;t have a nuvie01.sav file siting around
[02:18:06] <EsBee-Eks> we both fixed the NuvieIO bug at the same time :) but that isn't what caused it, I removed the duplicate lines
[02:18:10] <EsBee-Eks> hmm I do
[02:18:14] <EsBee-Eks> is that important?
[02:18:16] <EsBee-Eks> it's empty
[02:18:24] <Yuv422> yes
[02:18:40] <Yuv422> just delete it
[02:18:41] <EsBee-Eks> haha
[02:18:45] <EsBee-Eks> gee thanks
[02:18:49] <Yuv422> hehe
[02:18:50] <Yuv422> np
[02:18:50] <EsBee-Eks> wish I'd known about that
[02:19:00] <EsBee-Eks> loading is fast noiw
[02:19:01] <EsBee-Eks> now*
[02:19:09] <Yuv422> :)
[02:19:25] <Yuv422> because I forgot to put the startobjs back in I think
[02:19:31] <Yuv422> you might want to check that actually
[02:19:45] <EsBee-Eks> nah it doesn't do anything yet
[02:19:58] <Yuv422> righto
[02:19:59] <EsBee-Eks> I don't know if it will
[02:20:16] <Yuv422> nuvie will try to load the nuvie01.sav file first
[02:20:28] <EsBee-Eks> when does it write it?
[02:20:30] <Yuv422> if that fails it tries the original savegame/
[02:20:40] <Yuv422> when you hit save
[02:20:42] <EsBee-Eks> it should be obvious somewhere that it is "converting your savefile"
[02:20:44] <EsBee-Eks> oh
[02:20:46] <EsBee-Eks> I never did that
[02:20:51] <Yuv422> strange
[02:21:05] <Yuv422> oh
[02:21:15] <Yuv422> I might be opening the file in write mode?
[02:21:21] <Yuv422> let me check.
[02:21:28] <EsBee-Eks> its gone now
[02:21:30] <EsBee-Eks> maybe I did and forgot
[02:21:49] <EsBee-Eks> I was also going to compliment you on the savegame dialog
[02:22:03] <EsBee-Eks> you did a lot work on that
[02:22:05] <EsBee-Eks> of
[02:22:08] <Yuv422> hehe yes
[02:22:24] <Yuv422> and it's not finished yet.
[02:22:31] <EsBee-Eks> it was crashing when I pressed ESC but that seems to have gone away
[02:23:07] <EsBee-Eks> everything slows down when its open
[02:23:11] <EsBee-Eks> must be redrawing
[02:23:13] <Yuv422> I've still got to track down the object leak when saving
[02:23:21] <EsBee-Eks> in SaveGame?
[02:23:25] <Yuv422> yes it redraws everything. :-(
[02:23:44] <Yuv422> well that's Obj
[02:23:59] <Yuv422> it seems to be losing some objects when you save then load
[02:24:28] <EsBee-Eks> erp I broke GUI_callback
[02:24:39] <Yuv422> how so?
[02:25:13] <EsBee-Eks> I made a CallBack and thought to make GUI_callback inherit it
[02:25:31] <EsBee-Eks> and its not calling the virtual function for dialogs
[02:25:37] <EsBee-Eks> Warning! Unhandled callback. msg (1)
[02:26:15] <EsBee-Eks> might be better if CallBack & GUI_CallBack stay seperate, they need different return values anyway
[02:26:27] <EsBee-Eks> CallBack->callback returns uint16 not GUI_status
[02:26:36] <Yuv422> righto
[02:26:37] <EsBee-Eks> because GUI_status doesn't make sense for most things
[02:28:39] <Yuv422> here's a funny bug
[02:28:43] <Yuv422> http://sourceforge.net/tracker/index.php?func=detail&aid=960650&group_id=76419&atid=547063
[02:29:57] <EsBee-Eks> lol
[02:30:01] <EsBee-Eks> That's a feature!
[02:30:14] <EsBee-Eks> we probably couldn't get away with that
[02:30:56] <Yuv422> hehe "Game Enhancement"
[02:31:40] <EsBee-Eks> On that note, I did add an actual die() function to Actor/U6Actor. It was required to test various pyrotechnic effects on actor subjects. Feel free to replace the function with your own or add to it.
[02:32:18] <Yuv422> cool
[02:32:44] <Yuv422> wjp: Thanks for fixing all my include case issues.
[02:32:59] <Yuv422> I really should get a case sensitive filesystem
[02:33:13] <EsBee-Eks> I thought you considered them inferior :)
[02:33:33] <Yuv422> no case sensitivity is better
[02:33:49] <Yuv422> then you can have Nuvie.txt and nuvie.txt
[02:33:58] <Yuv422> in the same directory. :-)
[02:34:25] <EsBee-Eks> how confusing
[02:34:43] <Yuv422> quite
[02:35:22] <Yuv422> what do you think of my save logic?
[02:36:11] <EsBee-Eks> I havn't looked at it
[02:37:07] <EsBee-Eks> it makes sense
[02:37:16] <EsBee-Eks> you just store objlist and play time?
[02:37:26] <EsBee-Eks> and num saves
[02:37:48] <EsBee-Eks> num_saves wouldn't be reliable would it? people go back and forth between savegame files
[02:37:57] <Yuv422> true
[02:38:31] <Yuv422> I got to add the description and image in too
[02:38:35] <EsBee-Eks> I mean because of the multiple slots. But it isn't too important.
[02:38:37] <EsBee-Eks> yeah
[02:39:00] <EsBee-Eks> doesn't anything save to objblk?
[02:39:18] <EsBee-Eks> non-temp objects
[02:39:35] <Yuv422> yes
[02:39:38] <Yuv422> and temp objects
[02:40:23] <EsBee-Eks> oops, that's right
[02:40:58] <Yuv422> eggs and inventory
[02:40:59] <Yuv422> too
[02:41:14] <Yuv422> in the nuvie file
[02:41:20] <Yuv422> they have their own chunks
[02:41:25] <EsBee-Eks> NUVIE_SAVE_VERSION :)
[02:41:33] <Yuv422> hehe
[02:41:44] <Yuv422> it's going to change a bit for awhile
[02:41:45] <EsBee-Eks> why having to point to so many classes in load_objlist()
[02:42:13] <Yuv422> so they can load all their data
[02:42:40] <EsBee-Eks> I see now
[02:42:44] <EsBee-Eks> how long is a SaveGame in memory?
[02:42:55] <EsBee-Eks> is the entire objlist buffer in memory at all times?
[02:43:04] <Yuv422> yes
[02:43:06] <Yuv422> :(
[02:43:16] <Yuv422> because we don't know what some stuff does
[02:43:29] <Yuv422> I guess we could reload it when go to save
[02:43:36] <Yuv422> but this logic is simpler
[02:43:57] <Yuv422> I can change it if memory is an issue
[02:44:01] <EsBee-Eks> its not really
[02:44:05] <EsBee-Eks> not for me anyway
[02:44:06] <EsBee-Eks> we should figure that stuff out :)
[02:44:17] <Yuv422> yes
[02:44:59] <Yuv422> if you replace the line in load_latest_save
[02:45:09] <Yuv422> you can load from a completely new savegame
[02:46:04] <Yuv422> from the lzobjblk lzdngblk files
[02:47:35] <EsBee-Eks> is the latest_save whats in savegame/ ?
[02:48:15] <Yuv422> if(savegame->load("nuvie01.sav") == false) //try to load the savegame nuvie01.sav
[02:48:16] <Yuv422> return savegame->load_original(); // fall back to savegame/ if nuvie01.sav doesn't exist.
[02:48:37] <EsBee-Eks> oh, SaveManager
[02:48:41] <EsBee-Eks> I was looking at SaveGame
[02:48:49] <Yuv422> if you use savegame->load_new()
[02:48:53] <Yuv422> instead
[02:48:59] <EsBee-Eks> what do you get then?
[02:49:09] <Yuv422> a completely new game
[02:49:15] <EsBee-Eks> well
[02:49:18] <EsBee-Eks> what's your name?
[02:49:22] <Yuv422> avatar
[02:49:22] <EsBee-Eks> we don't have character creation :)
[02:49:34] <EsBee-Eks> ah
[02:49:40] <Yuv422> and your stats will be a bit weird
[02:49:53] <EsBee-Eks> not that they do much yet
[02:50:20] <EsBee-Eks> somebody should make the character creation screen
[02:50:37] <EsBee-Eks> but don't look at me
[02:51:06] <Yuv422> hehe
[02:51:39] <Yuv422> be back in a little bit
[02:51:45] <Yuv422> just getting some lunch
[02:52:12] <Yuv422> after lunch I'll try to crack this object leak
[02:52:24] <EsBee-Eks> ok
[02:58:17] * EsBee-Eks wonders if the lack of cursor cleanup when closing dialogs is because they are calling GUI::Display(), which doesn't clear or redraw the cursor. That is currently done only when Game calls GUI::Display().
[02:59:17] <EsBee-Eks> no that's not it
[02:59:41] <EsBee-Eks> heh, that didn't make much sense
[04:06:15] <Yuv422> back
[04:08:50] <EsBee-Eks> wb
[04:09:23] <EsBee-Eks> my effects aren't working now
[04:09:46] <Yuv422> :(
[04:15:31] <EsBee-Eks> how long do you think it will be until we can have status effects?
[04:15:34] <EsBee-Eks> on actors
[04:15:53] <EsBee-Eks> poison, invisible
[04:15:53] <Yuv422> like poisoned?
[04:15:58] <Yuv422> not too sure
[04:16:22] <Yuv422> I'm focued on load/save at the moment
[04:16:52] <EsBee-Eks> hmm, yes of course
[04:17:08] <EsBee-Eks> do you know how to put a lightglobe over an actor?
[04:17:26] <EsBee-Eks> and keep it on them
[04:17:40] <Yuv422> hmm
[04:17:57] <Yuv422> we could have a light level in Actor
[04:18:20] <Yuv422> then add the globe when drawing the actor onto the mapwindow
[04:19:19] <Yuv422> it would be interesting to see if carrying a lit torch effected objlist
[04:19:38] <EsBee-Eks> it wouldn't have to, but it might
[04:19:56] <EsBee-Eks> lightglobes on actors is almost all we need to have torches working
[04:20:26] <Yuv422> cool
[04:21:51] <EsBee-Eks> odd, explosions are getting stuck on their originating space and not "exploding"
[04:21:59] <EsBee-Eks> I broke something in the last few hours
[04:23:03] <Yuv422> a cvs diff will tell you what you've changed
[04:23:22] <EsBee-Eks> it only changed locally :)
[04:23:45] <Yuv422> that could be a little harder to track down then
[04:24:07] <EsBee-Eks> some little fix I did while preparing to commit recent changes
[04:24:12] <EsBee-Eks> my cvs diff is 104k btw
[04:24:29] <Yuv422> Ouch!
[04:28:07] <Yuv422> I'm going to have to reboot my machine in a minute
[04:28:17] <Yuv422> just installing an OS update
[04:40:25] <Yuv422> brb rebooting
[04:40:27] <-- Yuv422 has left IRC ("Read error: 69 (Excessive tongue)")
[04:44:56] --> Yuv422 has joined #nuvie
[04:45:47] <EsBee-Eks> hey wb
[04:45:53] <EsBee-Eks> save/load works!
[04:46:15] <Yuv422> did it not work for you before?
[04:46:19] <EsBee-Eks> and I am still able to save/load a game while the party is on a boat, impressive
[04:46:29] <EsBee-Eks> I hadn't tested it because the GUI_callback was broken :)
[04:46:34] <Yuv422> ah k
[04:46:50] <EsBee-Eks> but it doesnt print anything on the save screen, is that not done yet?
[04:46:54] <Yuv422> I've just got to figure out why we are losing some objects
[04:47:02] <Yuv422> I think it might be when loading
[04:47:22] <Yuv422> maybe some dodgy data is saved causing the load to miss smoe stuff
[04:47:24] <Yuv422> some
[04:47:42] <EsBee-Eks> could it have anything to do with containers?
[04:47:50] <Yuv422> most probably
[04:48:18] <EsBee-Eks> the only change I made to ObjManager load code recently is to do with objblks
[04:48:24] <Yuv422> if you load and save you should see the first two chunk values go down.
[04:48:38] <Yuv422> when was that?
[04:48:43] <EsBee-Eks> yeah
[04:48:51] <EsBee-Eks> well it was before you started savegame
[04:48:56] <Yuv422> ah k
[04:49:02] <EsBee-Eks> and it was to fix container objects
[04:49:12] <Yuv422> ah yes I remember now
[04:49:19] <EsBee-Eks> for some objects the "container" list is allocated even if its empty
[04:49:36] <EsBee-Eks> I dont see any problem there.
[04:50:02] <Yuv422> I'm going to do a side by side print out of all objects
[04:50:10] <Yuv422> to see how it changes
[04:50:24] <Yuv422> then I'll set through the loading with a debugger
[04:55:38] <Yuv422> yup looks like containers are losing some objects
[04:56:17] <EsBee-Eks> know why?
[04:59:11] <Yuv422> just looking into it now
[05:13:06] <Yuv422> ok that's fixed now
[05:13:34] <Yuv422> it was an issue with the y carry bit
[05:13:57] <Yuv422> for objects that reference a container with an index over 1024
[05:14:08] <EsBee-Eks> oh, great
[05:14:11] <EsBee-Eks> what was the issue?
[05:14:31] <Yuv422> I wasn't unsetting it when saving
[05:14:51] <Yuv422> so when loading I was trying to put the object into a container that didn't exist
[05:14:55] <EsBee-Eks> no more leak?
[05:15:12] <Yuv422> no leak now
[05:15:20] <Yuv422> I'll clean up my testing and commit
[05:15:25] <EsBee-Eks> good
[05:15:26] <EsBee-Eks> my effects are working now
[05:15:30] <Yuv422> cool
[05:15:49] <EsBee-Eks> an issue with the new CallBack, something I forgot to resolve when adding it
[05:15:51] <EsBee-Eks> but its OK now
[05:16:12] <EsBee-Eks> if you put multiple powder kegs next to eachother you will get the prompt "name:>" more than once
[05:16:26] <EsBee-Eks> but I'm not ready to fix that
[05:16:57] <EsBee-Eks> just consider powder keg chains as incomplete
[05:17:05] <EsBee-Eks> uncompleted feature
[05:17:06] <EsBee-Eks> but still fun
[05:18:02] <EsBee-Eks> now just have to fix inventory cursor... its displaying on top of the MapWindow
[05:18:24] <EsBee-Eks> until you press the right arrow
[05:18:58] <Yuv422> ontop of the border?
[05:19:07] <EsBee-Eks> no all the way on top of the map
[05:24:36] <Yuv422> ok that change is in cvs now
[05:24:41] <Yuv422> it's only one line
[05:27:25] <EsBee-Eks> ObjManager.cpp?
[05:27:31] <Yuv422> yes
[05:27:34] <EsBee-Eks> ok
[05:28:10] <Yuv422> diff -r1.76 ObjManager.cpp
[05:28:15] <Yuv422> 313a314
[05:28:15] <Yuv422> > obj->y &= (0xff ^ 0x1); //clean zeroth bit in y which is used for objblk_n
[05:28:15] <Yuv422> > 1024
[05:31:02] <EsBee-Eks> updated
[05:31:16] <EsBee-Eks> somewhere the inventory cursor position is being set incorrectly
[05:32:31] <Yuv422> I played around with the views a bit
[05:32:44] <Yuv422> when re working the load sequence
[05:35:04] <EsBee-Eks> InventoryView::update_cursor()?
[05:35:06] <EsBee-Eks> that might be it
[05:36:39] <Yuv422> when does the cursor draw onto the mapwindow?
[05:37:24] <EsBee-Eks> just pressing TAB
[05:37:28] <EsBee-Eks> or D for drop
[05:37:40] <EsBee-Eks> but if I press an arrow it displays correctly
[05:37:44] <EsBee-Eks> ...from then on
[05:37:51] <Yuv422> yup
[05:37:55] <Yuv422> does that on mine too
[05:38:07] <EsBee-Eks> is InventoryView::area set on init?
[05:38:29] <EsBee-Eks> the coordinates look like the coordinates within the inventoryview
[05:38:41] <EsBee-Eks> but its treating them as absolute
[05:38:51] <Yuv422> ah yes
[05:39:02] <Yuv422> I changed the way area is propagated
[05:39:17] <Yuv422> when adding the save dialog
[05:39:55] <EsBee-Eks> when is it set
[05:40:23] <EsBee-Eks> in some place it is set but not initially
[05:40:35] <Yuv422> area is set PlaceOnScreen
[05:41:07] <Yuv422> offset_x
[05:41:10] <Yuv422> and offset_y
[05:41:17] <Yuv422> are now used instead of area
[05:41:25] <Yuv422> for holding the initial offset
[05:41:37] <Yuv422> or I should say offset to parent widget
[05:41:42] <EsBee-Eks> hmm
[05:41:48] <EsBee-Eks> or offset to screen?
[05:41:59] <Yuv422> yes
[05:42:19] <EsBee-Eks> I'd better continue to use area, for when we start moving the view around
[05:44:14] <EsBee-Eks> i see PlaceOnScreen is virtual
[05:44:39] <Yuv422> :)
[05:45:05] <EsBee-Eks> I'll give InventoryView one, and move the first update_cursor() from init() to there.
[05:45:14] <EsBee-Eks> similiar to GUI_Scroller.cpp
[05:45:39] <Yuv422> sounds good
[05:45:51] * Yuv422 is writing a cleanup method for Actormanager
[05:47:34] <EsBee-Eks> did you get a chance to listen to the C64 U6 sounds? or the FM-TOWNS?
[05:48:47] <Yuv422> I've listened to the FM-Towns sfx
[05:49:04] <Yuv422> they have sounds bytes for the mantras and magic words
[05:49:12] <Yuv422> some combat sfx too
[05:49:43] <EsBee-Eks> are they good?
[05:50:16] <Yuv422> it's hard to tell when listening to them outside the context of the game
[05:52:30] <EsBee-Eks> maybe we can copy sounds from snes U6 without getting into trouble
[05:52:52] <Yuv422> or make our own?
[05:53:10] <EsBee-Eks> well thats a sure way not to get in trouble
[05:53:18] <Yuv422> :)
[05:53:50] <EsBee-Eks> but the best I could do is record myself going "Boom!" for explosions and "hiya!" for attacks
[05:54:05] <Yuv422> yeah me too
[05:54:15] <EsBee-Eks> heh I don't think that's what you had in mind
[05:54:22] <Yuv422> I think we need help from an audio expert. :-)
[05:54:47] <EsBee-Eks> but Exult just uses public sfx, and U9 sfx
[05:55:16] * EsBee-Eks looks for his keyboard's left-arrow key.
[05:55:41] <Yuv422> it's not on your keyboard?
[06:08:29] <EsBee-Eks> no
[06:09:00] <EsBee-Eks> the InventoryView fix works, thanks
[06:12:37] <Yuv422> np
[06:12:56] * EsBee-Eks writes ChangeLog message without a left-arrow key.
[06:13:25] <Yuv422> I'm just fixing things so we can load over another game
[06:13:39] <Yuv422> then I'll hook up the load button
[06:13:50] <Yuv422> and maybe add a "New Game" button
[06:13:56] <EsBee-Eks> okay, heh
[06:14:09] <EsBee-Eks> and I'm accurate in assuming there isnt supposed to be any text on the dialog now?
[06:14:32] <Yuv422> well it is just junk text at the moment
[06:15:00] <EsBee-Eks> i don't get any
[06:15:05] <EsBee-Eks> :|
[06:15:19] <EsBee-Eks> i don't get any Quit Dialog text either! what happened
[06:15:23] <Yuv422> really
[06:15:30] <Yuv422> oh no
[06:15:34] <EsBee-Eks> I remember telling you about something like that, but it fixed itself
[06:15:45] <EsBee-Eks> i think
[06:15:52] <EsBee-Eks> one of my object files could be very old
[06:16:25] <Yuv422> I guess you could try a complete recompile
[06:17:03] <EsBee-Eks> yeah time for a make clean, if I see no differences after this commit
[06:17:17] <EsBee-Eks> prepare for my commit upcoming
[06:17:21] <Yuv422> well better update first
[06:17:32] <EsBee-Eks> and perhaps an onslaught of bugs
[06:17:33] <Yuv422> because the text works for me
[06:17:35] <EsBee-Eks> my tree is updated
[06:17:48] <Yuv422> better try the recompile first then
[06:17:55] <Yuv422> just to be on the safe side
[06:18:10] <EsBee-Eks> last time I commited when there was no text and it still worke dfine for you
[06:18:13] <EsBee-Eks> safe but time consuming :)
[06:18:14] <EsBee-Eks> but OK
[06:18:23] <EsBee-Eks> I'll write the changelog while its compiling
[06:18:41] <Yuv422> sounds good
[06:21:45] <Yuv422> do you think we should clean the scroll when loading a game
[06:25:32] <EsBee-Eks> no I don't see any reason to do that
[06:25:55] <EsBee-Eks> and sometimes in Fallout it was annoying when that happened
[06:26:11] <EsBee-Eks> I might want to compare some text in the buffer to something that happens after the load
[06:26:41] <EsBee-Eks> Fallout would clear the buffer and print Game Loaded
[06:30:12] <Yuv422> maybe we could just print "Game Loaded"
[06:31:21] <EsBee-Eks> or nothing
[06:31:23] <EsBee-Eks> lets see what U6 does
[06:32:14] <EsBee-Eks> wait can you load in U6?
[06:32:31] <EsBee-Eks> I don't remember the key
[06:35:44] <EsBee-Eks> heh heh, after a clean make the dialog text displays
[06:36:07] * EsBee-Eks really needs to find that left-arrow key.
[06:38:35] * Yuv422 looks forward to effects
[06:42:26] --> sbx has joined #nuvie
[06:42:55] <sbx> woo! found the left-arrow key
[06:43:03] <Yuv422> hehe
[06:43:09] <sbx> (lodged between some game jewel cases)
[06:43:19] <-- EsBee-Eks has left IRC (Read error: 60 (Operation timed out))
[06:43:20] <sbx> typing without one of the arrow keys is a bitch
[06:44:45] <sbx> there aren't many new effects
[06:44:50] <sbx> but we can add more easily
[06:54:22] <sbx> how did .xvpics get in cvs?
[06:54:52] <Yuv422> not too sure
[06:56:37] <Yuv422> Yay I can load nuvie01.sav from the savedialog
[06:57:29] <sbx> heh
[06:57:32] <sbx> wow
[06:57:40] <sbx> oh I thought you said save
[06:57:49] <sbx> but it can already save
[06:58:14] <Yuv422> Now I've got to get it loading and saving using the save slots
[06:58:46] <sbx> Hmm
[06:58:54] <sbx> Oh, the SAVE button always writes to nuvie01.sav?
[06:59:05] <Yuv422> yes
[07:01:24] <sbx> limited to 12 saves?
[07:01:44] <Yuv422> nope
[07:02:03] <Yuv422> I think we'll limit it to 1000 saves
[07:02:19] <Yuv422> nuvie001.sav
[07:02:54] <Yuv422> or should we make that 10,000 saves?
[07:02:56] <sbx> the first will be nuvie000.sav?
[07:03:09] <sbx> heh
[07:03:09] <sbx> I dont even need 1000
[07:03:09] <sbx> but there are 12 slots
[07:03:14] <Yuv422> if we want 1000 not 999 then yes. ;)
[07:03:41] <Yuv422> there will be as many slots as there are saves in the save directory
[07:03:54] <Yuv422> +1 empty slot
[07:04:49] <sbx> they should probably be listed in descending order
[07:05:02] <sbx> with the top one being the empty slot
[07:05:09] <Yuv422> yes
[07:05:44] <sbx> now that I think about it, it wouldnt hurt to put the # or filename as part of the info
[07:06:08] <sbx> wouldn't need to be saved with the data
[07:14:02] <sbx> committing
[07:15:17] <sbx> um, the ChangeLog message is kind of big
[07:15:24] <sbx> hope that's not a problem
[07:15:41] <Yuv422> hehe not a problem
[07:15:51] <Yuv422> as long as it relates to what you are commiting. :)
[07:20:39] <sbx> whew, files committed
[07:21:11] <sbx> I hope there aren't many bugs
[07:21:19] <sbx> one thing... you can drop objects anywhere
[07:21:30] <Yuv422> I'll check out your changes now
[07:21:40] <sbx> good! you can test it for me
[07:22:24] <sbx> if it compiles, and if the animations are timed correctly (I never know if they will look different on a faster computer)
[07:22:39] <sbx> but they should look the same, close to the original U6
[07:23:05] <Yuv422> I'm just saving my workspace before updating
[07:24:58] <Yuv422> hehe my nuvie/ directory is 18 meg when compressed with bzip
[07:25:11] <sbx> ahem
[07:25:24] <sbx> what makes it that big?
[07:25:36] <Yuv422> junk
[07:25:37] <Yuv422> ;)
[07:25:46] <sbx> oh
[07:26:58] <Yuv422> there were some conflicts
[07:27:22] <sbx> uh oh
[07:27:26] <sbx> its clean here
[07:27:38] <sbx> maybe I overwrote something
[07:27:38] <Yuv422> just my load anytime changes
[07:27:44] <sbx> but I'd blame CVS
[07:28:41] <sbx> brb
[07:32:09] * Yuv422 starts compiling
[07:40:50] <sbx> back
[07:45:01] <Yuv422> working through the issues
[07:45:08] <sbx> what are they?
[07:45:14] <Yuv422> where is PositionedTile defined?
[07:45:21] <sbx> AnimManager.h
[07:45:37] <sbx> after NuvieAnim
[07:45:48] <Yuv422> ah k
[07:46:35] <sbx> just realized the TOSS_TO flags for TossAnim don't do anything
[07:46:56] <Yuv422> it doesn't seem to like this line
[07:47:04] <Yuv422> vector<PositionedTile*>::iterator ti = &tiles[i];
[07:47:34] <Yuv422> is tiles a vector?
[07:47:50] <sbx> yeah
[07:48:00] <sbx> should that work?
[07:48:16] <sbx> I wasnt sure when writing it, but it works here
[07:50:11] <sbx> "Return an iterator pointing to the i'th element"
[07:50:37] <sbx> if not, then we need a new function for that
[07:50:40] <Yuv422> I get the following error
[07:51:02] <Yuv422> /Users/eric/Projects/Ultima6/nuvie/AnimManager.cpp:344: error: conversion from `PositionedTile**' to non-scalar type `__gnu_cxx::__normal_iterator<PositionedTile**, std::vector<PositionedTile*, std::allocator<PositionedTile*> > >' requested
[07:51:24] <sbx> right :\
[07:51:37] <sbx> that sounds like what I thought
[07:51:46] <sbx> sort of :)
[07:52:16] <sbx> replace with something like vector<PositionedTile*>::iterator TileAnim::get_tile_iterator(uint32 i); ?
[07:53:35] <sbx> vector<PositionedTile*>::iterator TileAnim::get_tile_iterator(uint32 id)
[07:53:35] <sbx> {
[07:53:35] <sbx> vector<PositionedTile*>::iterator ti = tiles.begin();
[07:53:35] <sbx> for(uint32 i = 0; i < id; i++)
[07:53:35] <sbx> ++ti;
[07:53:36] <sbx> return(ti);
[07:53:37] <sbx> }
[07:54:04] <sbx> unless there is a Vector function to do it already
[07:54:12] <sbx> you could just put that code in the original method as well
[07:54:27] <Yuv422> vector::at returns a reference
[07:56:04] <sbx> you want an iterator
[07:56:26] <Yuv422> erase calls delete on the reference
[07:56:32] <Yuv422> at iterator
[07:56:46] <Yuv422> you probably don't need that
[07:57:01] <Yuv422> you can just delete the reference as it is a vector
[07:57:32] <sbx> line 344?
[07:57:43] <sbx> ok i see what I was doing
[07:58:03] <Yuv422> in TileAnim::remove_tile
[07:58:42] <Yuv422> I don't think size will go down when you erase an item in the middle of the vector
[07:58:48] <Yuv422> tiles.size()
[07:58:50] <Yuv422> that is
[07:59:20] <sbx> I thought that was its purpose
[07:59:34] <sbx> I didn't know it would accept a reference
[07:59:41] <Yuv422> my reference isn't too clear on that point
[07:59:52] <Yuv422> erase doesn't
[08:00:04] <sbx> so far remove_tile() is not used much
[08:00:21] <Yuv422> how can I test an effect?
[08:01:00] <sbx> nothing explicitly for that, go find a powder keg
[08:01:11] <sbx> go to trinsic there are powder kegs and cannons
[08:01:37] <sbx> if you dont want double-prompt, move powder kegs away from eachother first
[08:02:02] <sbx> and you can use get & drop to move them, you can test drop that way
[08:02:08] <sbx> drop uses an effect
[08:02:22] <sbx> just drop anything
[08:02:23] <Yuv422> it locks up whenever I do an effect
[08:02:35] <Yuv422> maybe I need to erase that tiles[i]
[08:02:40] <Yuv422> let me try that.
[08:02:56] <sbx> erase the iterator
[08:03:28] <sbx> i don't know why that would affect it... so it already compiled, any more errors?
[08:04:14] <Yuv422> that fixed it
[08:04:30] <Yuv422> some non virtual destructor warnings
[08:04:35] <Yuv422> and a string
[08:04:38] <Yuv422> without a std::
[08:04:43] <Yuv422> in MsgScroll
[08:05:33] <sbx> MsgScroll? that should already be using std
[08:05:35] <sbx> std:;string
[08:06:07] <sbx> I'm surprised that fixed it. :) do the effects work?
[08:06:30] <sbx> timing is what I'd be concerned about
[08:06:49] <Yuv422> it is a little quick
[08:07:08] <Yuv422> when dropping
[08:07:17] <Yuv422> it is almost instantanious
[08:07:48] <Yuv422> weird no it is slower
[08:07:59] <sbx> does it depend on location?
[08:08:08] <sbx> I can try to duplicate it
[08:08:32] <Yuv422> hmm
[08:08:40] <Yuv422> now it seems to be working fine
[08:08:59] <sbx> maybe some background app was working
[08:09:04] <sbx> or the OS
[08:09:08] <Yuv422> if I drop my orb of moons onto the steps in LB's castle I can't get it again
[08:09:32] <sbx> he has steps?
[08:09:48] <Yuv422> in his throne room
[08:10:24] <Yuv422> lots of double frees
[08:10:30] <Yuv422> when I use the cannon
[08:10:43] <sbx> how do you detect that?
[08:10:47] <Yuv422> epp sigsegv
[08:11:08] <Yuv422> my malloc library has double free detection
[08:11:22] <sbx> does it give locations?
[08:11:28] <Yuv422> UseCode: Use object 221:0 (133,159,0)
[08:11:28] <Yuv422> hit object 273 at 133,158,0
[08:11:28] <Yuv422> UseCode: Internal message sent to object 221:0 (133,159,0)
[08:11:28] <Yuv422> *** malloc[1572]: Deallocation of a pointer not malloced: 0x7e273d0; This could be a double free(), or free() called with the middle of an allocated block; Try setting environment variable MallocHelp to see tools to help debug
[08:13:00] <sbx> nothing is free'd in use_cannon(), maybe in CannonBallEffect
[08:13:16] <Yuv422> let me step through
[08:13:48] --> servus has joined #nuvie
[08:13:58] <Yuv422> where is CannonBallEffect?
[08:14:03] <Yuv422> hi servus
[08:14:08] <servus> Hi
[08:14:23] <sbx> hi
[08:14:27] <sbx> Yuv422: Effect.cpp
[08:14:32] <sbx> CannonballEffect sorry
[08:14:36] <sbx> nothing is free'd there
[08:15:01] <sbx> it could be TossAnim, ExplosiveEffect, ExplosiveAnim
[08:16:20] <sbx> UseCodeExplosiveEffect::hit_object() deletes an object
[08:17:16] <sbx> TossAnim deletes two MapCoords
[08:17:42] <sbx> ExplosiveAnim deletes PositionedTiles in that vector we were talking about
[08:17:56] <sbx> well, Tiles referenced by PositionedTiles
[08:19:35] <sbx> finally, AnimMgr::destroy_anim() deletes anims when they are through, using the "delete *i; erase(i);" method
[08:20:27] <sbx> obviously those last two look suspicious
[08:20:29] <Yuv422> erase deletes too
[08:21:16] <Yuv422> if((*i)->safe_to_delete)
[08:21:17] <Yuv422> delete *i;
[08:21:30] <Yuv422> how is that set?
[08:22:06] <sbx> its initialized to true in NuvieAnim ctor
[08:22:36] <Yuv422> should we always erase?
[08:22:48] <Yuv422> even if not safe_to_delete
[08:23:18] <sbx> yeah I think so
[08:23:27] <Yuv422> erase calls the destructor on the reference pointed to by the itterator I believe
[08:23:33] <sbx> something else would only set safe_to_delete if it was taking responsibility for deleting it
[08:23:45] <sbx> I never knew that!
[08:24:00] <sbx> I need it to just remove it from the list
[08:24:12] <Yuv422> http://www.dinkumware.com/manuals/reader.aspx?b=p/&h=vector.html#vector::erase
[08:24:47] <Yuv422> bbl
[08:24:49] <Yuv422> dinner
[08:41:04] <Yuv422> back
[08:41:43] <Yuv422> maybe a list would be better than a vector?
[08:42:25] <sbx> maybe
[08:42:56] <sbx> I notice you use list for eggs
[08:45:03] <Yuv422> yeah I find a list easier to work with
[08:45:22] <sbx> I did not know of any differences in the methods
[08:45:28] <sbx> or operators
[08:45:45] <sbx> I need to replace erase with a function that removes the item from the list and resizes the list, but does not delete the referenced object
[08:46:00] <sbx> that is all
[08:46:07] <wjp> hi
[08:46:08] <Yuv422> remove
[08:46:15] <Yuv422> works for std::list
[08:46:17] <Yuv422> hi wjp
[08:46:28] <Yuv422> wjp: any thoughts
[08:46:30] <Yuv422> ./
[08:46:31] <Yuv422> ?
[08:46:31] <wjp> hm, 6 1/2 hours of conversation to read up on :-)
[08:46:39] <Yuv422> hehe
[08:47:45] <sbx> void remove(const T& val);
[08:47:58] <Yuv422> yes
[08:48:08] <Yuv422> it removes but doesn't delete
[08:48:09] <sbx> it says it finds anything equal to that, so I cant have duplicates in the list?
[08:49:12] <sbx> Anims are already in a std::list :) just need to change it to use remove()
[08:49:24] <Yuv422> ah k
[08:49:59] <sbx> in AnimManager::destroy_anim()
[08:52:22] <sbx> EffectManager::effects, and TileAnim::tiles are the only vectors
[08:53:13] <Yuv422> I replaced anim_list.erase(i) with anim_list.remove(*i)
[08:53:23] <Yuv422> I still get the double delete
[08:54:10] <wjp> what's the difference between those two?
[08:54:21] <wjp> other than that the latter might remove multiple items?
[08:54:42] <Yuv422> I thought remove didn't call the objects destructor
[08:54:48] <Yuv422> but erase did
[08:54:53] <wjp> is it a list of objects or a list of pointers?
[08:54:58] <sbx> pointers
[08:55:08] <wjp> then neither calls the destructor
[08:55:14] <sbx> !
[08:55:20] <wjp> it wouldn't make any sense...
[08:55:32] <wjp> the container classes don't care what's in them; they just store it
[08:56:13] <sbx> then there's no telling where the delete errors are coming from :)
[08:57:40] <sbx> but erase() doesn't resize the list does it?
[08:57:49] <wjp> it does
[08:57:52] <sbx> or does it in a std:list
[08:57:57] <sbx> but not in a std::vector?
[08:57:58] <wjp> you can't not resize a list
[08:58:19] <wjp> hm, I think it also resizes a vector
[08:58:22] <sbx> right, because one points to the next
[09:00:01] <wjp> hm, current cvs doesn't compile for me right now
[09:00:15] <sbx> Yuv422 had to make some changes
[09:00:17] <wjp> pointer/iterator mismatch
[09:00:23] <sbx> yeah
[09:00:48] <Yuv422> are you sure erase resizes a vector
[09:00:48] <Yuv422> ?
[09:00:56] <wjp> fairly sure, but I'll look it up
[09:01:40] <sbx> always or just for pointers? because it has no assignment operator for a pointer?
[09:02:07] <Yuv422> ah yes it looks like it does
[09:02:13] <sbx> hmph
[09:02:19] <sbx> where is the delete then :)
[09:02:21] <wjp> behaviour doesn't depend on contents
[09:02:28] <sbx> maybe its just invalid delete, not multiple deletes
[09:02:38] <sbx> ok
[09:05:34] <wjp> hm, you're deleting a malloc-ed area in ObjManager
[09:06:01] <wjp> why is malloc used in the first place? (ObjManager::add_obj)
[09:06:52] <sbx> let me see
[09:07:14] <sbx> wait I didn't write that, I don't know :)
[09:07:43] <Yuv422> hehe
[09:07:50] <Yuv422> that's my fault
[09:08:06] <Yuv422> malloc/delete probably isn't a good idea
[09:08:22] <Yuv422> but I don't think that is the cause of the double delete I'm seeing
[09:08:51] <Yuv422> wjp: did you try using the cannon?
[09:09:11] <sbx> i dont know if he got it compilde
[09:09:18] <wjp> yeah, it's compiled now
[09:09:30] <sbx> ok
[09:09:40] <wjp> where's a cannon?
[09:09:45] <sbx> trinsic
[09:09:47] <sbx> alt-314
[09:10:34] <wjp> hm, I get an invalid read when doing that
[09:11:10] <sbx> using a cannon or alt-314?
[09:11:15] <wjp> cannon
[09:11:18] <sbx> oh
[09:11:30] <sbx> do you get a location?
[09:11:31] <wjp> in the destructor, incidentally
[09:11:41] <wjp> let me try something
[09:11:43] <sbx> whose destructor?
[09:11:52] <wjp> oh, sorry, TimedEvent
[09:12:18] <sbx> Yuv422: oh I forgot about TimedEvent, theres some deletes there :)
[09:12:52] <sbx> well not IN TimedEvent, but TimeQueue
[09:13:33] <sbx> the destructor is empty, so it must be an extra delete
[09:14:43] <wjp> the destructor should probably be virtual, btw
[09:15:02] <Yuv422> I've fixed the virtual destructors in my copy
[09:17:11] <sbx> looks like that fixes a leak
[09:17:25] <sbx> not deleting some things
[09:17:59] <Yuv422> I get alot of the following warnings
[09:18:01] <Yuv422> Effect.h:153: `UseCodeExplosiveEffect::original_obj' will be initialized after
[09:18:13] <Yuv422> base ExplosiveEffect
[09:20:23] <sbx> thats fine
[09:20:35] <sbx> you can reorder them to get rid of the warning
[09:26:24] <Yuv422> no lunk
[09:26:27] <Yuv422> luck
[09:26:52] <sbx> i'm eating chicken
[09:27:21] <wjp> gcc wants you to list the initializers in the order the variables appear in the class definition
[09:27:37] <wjp> to avoid any seemingly weird initialization order problems
[09:28:13] <wjp> (members are always initialized in the order that they appear in the class definition, but you may expect them to be initialized in the order of the initializers)
[09:28:37] <wjp> so gcc warns if the two orders are different
[09:29:22] <Yuv422> ah k
[09:29:26] <Yuv422> thanks wjp
[09:30:02] <Yuv422> bbl
[09:31:59] <sbx> ok
[09:32:03] <sbx> what about the extra delete?
[09:32:24] <sbx> i dont have any errors here
[09:59:06] * sbx yawns.
[10:28:29] <Yuv422> back
[10:29:52] <sbx> wb
[10:29:56] <sbx> im still here
[10:30:09] <Yuv422> it doesn't happen while dropping objects
[10:30:37] <Yuv422> can I test the quake effect?
[10:30:46] <sbx> yeah go to stonegate
[10:30:50] <sbx> and walk around or pass
[10:31:10] <sbx> one of the cyclops has to be on the screen, but dont stand right next to a wall
[10:32:02] <Yuv422> hehe nice
[10:32:41] <sbx> you get it? good
[10:32:46] <sbx> there will be a rumble sound with it
[10:32:54] <Yuv422> :)
[10:33:58] <Yuv422> are there any other effects that can be tested?
[10:36:41] <sbx> well if it crashes no
[10:37:00] <sbx> the only other implemented one is Hit actor
[10:37:05] <sbx> if you stand in front of the cannon
[10:37:09] <sbx> or in an explosion
[10:37:53] <Yuv422> just recompiling
[10:38:59] <Yuv422> U6UseCode::message_obj doen't seem to return a value.
[10:40:31] <sbx> oops
[10:40:33] <sbx> can you fix it?
[10:40:41] <sbx> wrap the uc_event() call in return()
[10:42:29] <Yuv422> righto
[10:42:41] <sbx> thanks
[10:42:56] <Yuv422> there are some unhandled values in the switch too
[10:43:00] <Yuv422> is that ok?
[10:43:26] <sbx> what do you mean?
[10:44:09] <Yuv422> in the switch statement
[10:45:33] <sbx> i dont see anything unhandled
[10:46:34] <Yuv422> ANIM_CB_DONE
[10:46:37] <Yuv422> and
[10:46:44] <Yuv422> EFFECT_CB_COMPLETE
[10:46:53] <sbx> oh
[10:47:00] <sbx> yeah thats ok
[10:47:06] <Yuv422> righto
[10:47:17] <sbx> that only handles certain messages
[10:47:18] <Yuv422> I'll just add a default : break;
[10:47:25] <sbx> ok
[10:47:35] <Yuv422> or should that be default : return false;
[10:48:03] <Yuv422> ?
[10:48:10] <sbx> hey, good eye
[10:48:16] <sbx> but better let the usecode function handle it
[10:48:20] <sbx> now that I think about it
[10:48:26] <Yuv422> righto
[10:49:05] <sbx> oh, heh... yeah we must let it go to the usefunc, because the EFFECT one is handled in some places
[10:49:06] <Yuv422> Effect *effect = new UseCodeExplosiveEffect(obj, x, y, 3, 16);
[10:49:21] <sbx> ?
[10:49:24] <Yuv422> this isn't used anywhere
[10:49:35] <Yuv422> from use_powder_keg()
[10:49:50] <sbx> hey I thought I deleted that
[10:49:53] <sbx> thanks for noticing
[10:50:08] <sbx> it was used when I was testing
[10:56:08] <Yuv422> where do defunct effects get removed?
[10:56:33] <Yuv422> ah i see
[10:56:41] <sbx> EffectMgr
[10:56:44] <Yuv422> EffectManager::update_effects
[11:02:18] <Yuv422> why do you set ei back to effects.begin()
[11:02:28] <Yuv422> after erasing an entry?
[11:02:58] <sbx> because I thought the iterator would be invalid
[11:03:05] <sbx> and made sure it isnt
[11:03:28] <Yuv422> doesn't erase return the next itterater?
[11:03:50] <sbx> yeah thats how you used it
[11:03:56] <sbx> for a std::list
[11:04:06] <sbx> i noticed in eggmgr
[11:04:40] <Yuv422> want me to change it?
[11:05:26] <sbx> i have no preference right now
[11:05:27] <sbx> if you like
[11:05:44] <sbx> i did that in some other places
[11:06:01] <sbx> it could be slow
[11:06:13] <sbx> ...now that you mention it
[11:12:00] <Yuv422> it doesn't seem to be the cannon ball that is double freeing
[11:12:45] <Yuv422> hmm
[11:13:11] <Yuv422> it seems to be happening between the explosion callback and the update_effects() method
[11:14:33] <sbx> it wouldnt be UseCodeExplosiveEffect::hit_object() would it?
[11:14:47] <sbx> (where there is a delete)
[11:14:52] <Yuv422> lets have a look
[11:15:58] <Yuv422> this code looks a little strange
[11:16:50] <sbx> :\
[11:17:04] <Yuv422> it always returns false
[11:17:19] <sbx> yeah
[11:17:23] <Yuv422> and these objects are stored anyware
[11:17:29] <Yuv422> if(obj) // pass our source obj on to next effect as original_obj
[11:17:29] <Yuv422> new UseCodeExplosiveEffect(NULL, x, y, 2, hit_damage, obj);
[11:17:29] <Yuv422> else // pass original_obj on to next effect
[11:17:29] <Yuv422> new UseCodeExplosiveEffect(NULL, x, y, 2, hit_damage, original_obj);
[11:17:39] <sbx> are?
[11:18:06] <Yuv422> hehe aren't
[11:18:09] <sbx> they are set in the initialization
[11:18:36] <Yuv422> ah k
[11:19:04] <sbx> obj is set in the first explosion
[11:19:18] <sbx> secondary explosion sets original_obj
[11:19:50] <sbx> so the original cant be hit twice
[11:20:12] <Yuv422> I think I've found the problem
[11:21:08] <sbx> i hope so
[11:21:18] <Yuv422> actualy I haven't :(
[11:21:40] <-- servus has left IRC ("Leaving")
[11:21:54] <sbx> i thought it might be deleting hit_obj again, but once it removes from the map it cant get hit again
[11:22:31] <sbx> i hope
[11:22:36] <Yuv422> we have two delete_obj
[11:22:45] <Yuv422> things
[11:22:53] <Yuv422> one method and one function. ;)
[11:24:10] <sbx> forgot about that
[11:24:21] <sbx> wjp will be gone most of the weekend
[11:24:37] <Yuv422> ah k
[11:29:41] <sbx> need sleep
[11:29:46] <sbx> bbl
[11:29:51] <Yuv422> righto
[11:29:55] <Yuv422> I'll kepp looking
[11:29:59] <Yuv422> keep
[11:30:26] <sbx> ok thanks
[11:30:27] --- sbx is now known as sbx|afk
[13:03:13] <Yuv422> ExplosiveAnim::~ExplosiveAnim()
[13:03:18] <Yuv422> seems to be double freeing
[13:18:17] <Yuv422> yup tiles are being double freed
[13:18:43] <Yuv422> first in ~ExplosiveAnim()
[13:18:55] <Yuv422> then in ~TileAnim()
[14:09:20] <-- Kirben has left IRC ("System Meltdown")
[15:05:17] <Yuv422> Nuvie segfaults when dropping an object onto an inaccesable map square
[15:35:07] <Yuv422> ok my changes are in cvs now
[15:35:12] <Yuv422> time for bed
[15:35:20] <Yuv422> cya
[15:35:23] <-- Yuv422 has left IRC ("BitchX: the cure for the common client")
[21:02:07] --- sbx|afk is now known as sbx
[22:29:00] --- sbx is now known as sbx|afk