#nuvie@irc.freenode.net logs for 25 May 2003 (GMT)

Archive Today Yesterday Tomorrow
Nuvie homepage


[00:39:17] --> Yuv422 has joined #nuvie
[00:43:22] <Yuv422> sbx: I'm going to put the objects into a AVL tree today
[00:43:33] <Yuv422> a/an
[00:44:24] <Yuv422> this should speed things up a bit
[00:55:03] <wjp> hi
[01:06:18] <-- wjp has left IRC ("Zzzz...")
[01:22:05] <sbx> hi
[01:22:25] <Yuv422> hey
[01:22:37] <sbx> im checking out how LB heals
[01:22:47] <sbx> it has two tests and two commands
[01:22:52] <sbx> i think thats to cure and heal
[01:22:59] <Yuv422> ah k
[01:23:06] <sbx> "if poisoned, cure" and "if wounded, heal"
[01:23:10] <sbx> just have to find which is which
[01:23:18] <Yuv422> yeah lots of unknown commands scroll by when I say heal
[01:23:27] <sbx> two for each npc
[01:23:34] <sbx> it should be that anyway
[01:23:57] <Yuv422> just find an actor that can heal but not cure
[01:24:05] <Yuv422> then you'll know
[01:24:08] <sbx> oh
[01:24:09] <sbx> right
[01:24:17] <sbx> or ill just look at the actors that do either
[01:24:21] <sbx> depending on what you request
[01:24:26] <Yuv422> hehe yes
[01:24:27] <sbx> thanks
[01:24:41] <Yuv422> http://freshmeat.net/projects/avl/?topic_id=809
[01:24:57] <Yuv422> I was thinking of using this for the tree.
[01:28:42] <sbx> i guess theres nothing in STL to do that :)
[01:28:47] <Yuv422> did you see the new bugs on SF?
[01:28:51] <Yuv422> probably not
[01:29:23] <Yuv422> there was one about names in converse mode
[01:29:34] <Yuv422> it always prints the actors name
[01:29:40] <Yuv422> even when you first met.
[01:31:00] <sbx> i havnt looked at the tracker
[01:31:23] <sbx> it always prints it below the portrait i noticed that
[01:31:32] <sbx> but it doesnt in the scroller
[02:00:32] <sbx> yuv how do we get max hp from an actor, and set/unset poison status?
[02:01:25] <Yuv422> max hp is a problem
[02:01:33] <Yuv422> it isn't stored in objlist
[02:01:44] <sbx> so its calculated?
[02:01:50] <Yuv422> it must be based on level/exp/character class in some way :(
[02:01:53] <Yuv422> yes
[02:02:09] <sbx> yeah i notice when you raise level it changes max hp
[02:02:11] <sbx> ill check
[02:02:14] <sbx> what about poison?
[02:02:25] <Yuv422> poision is in the npc_flags
[02:02:38] <Yuv422> I don;t remember if I'm loading that yet
[02:02:41] <Yuv422> let me check
[02:03:33] <sbx> npc_flags that is different from flags?
[02:03:41] <Yuv422> yes
[02:03:46] <Yuv422> there are two sets of flags
[02:04:08] <Yuv422> your converse ones and the flags for poision, dead, angry etc.
[02:04:41] <sbx> right
[02:04:41] <sbx> ok
[02:04:50] <Yuv422> they start from 0x800
[02:04:53] <Yuv422> in objlist
[02:05:16] <Yuv422> converse flags start from 0x17f1
[02:05:34] <Yuv422> neither appear to be loaded. ;)
[02:05:55] <Yuv422> wait converse flags are loaded
[02:06:07] <Yuv422> what should we call the other flags
[02:06:12] <Yuv422> status_flags
[02:06:15] <Yuv422> npc_flags
[02:06:40] <sbx> status
[02:07:05] <sbx> whats the nearest person to britain that will join your party?
[02:07:06] <Yuv422> maybe we should rename the others to conv_flags
[02:07:23] <Yuv422> teleport to minoc
[02:07:26] <sbx> they effect how the name is shown when you look at them too
[02:07:29] <Yuv422> 27f 55 0
[02:07:34] <sbx> and flag 1 may do something else to im not sure
[02:07:38] <sbx> i dont think of them as conv flags
[02:07:42] <sbx> ok
[02:07:44] <sbx> ill have to walk
[02:07:47] <Yuv422> gwenno and julia
[02:07:48] <sbx> i cant get teleport to work in dos box
[02:07:53] <sbx> thanks
[02:07:54] <Yuv422> ah k
[02:08:10] <Yuv422> is serpents hold closer
[02:08:19] <sbx> cant walk to it
[02:08:31] <sbx> probably about the same distance
[02:08:36] <Yuv422> ah yes hehe
[02:21:17] <sbx> well
[02:21:20] <sbx> finally got to minoc
[02:22:39] <sbx> the max hp is 30*level
[02:22:45] <sbx> i think
[02:23:33] <sbx> 255 max
[02:33:35] <Yuv422> ah k
[02:34:14] <Yuv422> did you try changing your level
[02:34:28] <sbx> yeah
[02:34:29] <sbx> yeah that is it, even if i change the other stats
[02:34:40] <sbx> i forgot to type that last sentence a couple minutes ago
[02:34:49] <Yuv422> np
[02:35:09] <sbx> but i only tested julia and jaana
[02:35:22] <sbx> i dont know if theres something else that might be different on the others
[02:35:59] <Yuv422> what about sherry?
[02:37:31] <sbx> forgot i had the orb
[02:38:41] <sbx> *finds some cheese*
[02:39:21] <sbx> *finds sherry*
[02:39:53] <sbx> that egg-created guard in the center of castle british seems to just wander around aimlessly
[02:41:37] <sbx> sherry's max hp is the same
[02:49:00] <Yuv422> same with the guard outside the castle
[03:11:50] <sbx> i added set_hp and get_maxhp to Actor
[03:16:44] <Yuv422> righto
[03:16:59] <Yuv422> I'm just working on the obj tree stuff
[03:17:05] <sbx> great
[03:17:18] <Yuv422> there will be one tree for the surface
[03:17:24] <Yuv422> which should make things cleaner
[03:17:42] <Yuv422> /there/which
[03:19:02] <Yuv422> argh, inline if's evil ;)
[03:32:35] <Yuv422> hmm looks like I'm going to need a temp linked list while loading the objects
[03:36:40] <sbx> there are problems with the add/delete object funcs
[03:36:57] <Yuv422> in ObjManager?
[03:37:03] <sbx> hmm
[03:37:12] <Yuv422> I'll be changing them soon
[03:37:13] <sbx> Actor
[03:37:16] <Yuv422> ah k
[03:37:18] <sbx> that is, shouldnt they group objects
[03:37:24] <sbx> when you add objects that can be grouped
[03:37:36] <sbx> and it doesnt show the count of objects in the inventory
[03:37:40] <Yuv422> what happens if you have over 255 gold coins?
[03:37:52] <sbx> divides them
[03:38:01] <sbx> i think its over 127
[03:38:21] <Yuv422> into seperate gold objects?
[03:38:30] <sbx> yeah
[03:38:34] <Yuv422> hmm
[03:38:35] <sbx> so i need to change the counting method too
[03:38:44] <sbx> to allow for multiple objects
[03:38:48] <sbx> forgot about that
[03:39:08] <Yuv422> I'll finish what Im doing here first
[03:39:21] <Yuv422> or my brain will explode
[03:39:22] <Yuv422> ;)
[03:40:43] <sbx> oh
[03:40:50] <sbx> careful then
[03:41:28] <sbx> take your time
[03:41:29] <sbx> brb
[04:01:09] <sbx> im back
[04:13:27] <sbx> ok inventory counting should work now
[04:13:35] <Yuv422> cool
[04:13:42] <sbx> it counts all objects with the requested num and quality
[04:13:47] <sbx> and it checks containers
[04:24:47] * sbx still tries to get object transferring down right.
[04:25:02] <sbx> its giving everyone free gold and items
[04:25:03] <Yuv422> how's it going?
[04:25:09] <Yuv422> hehe cool
[04:28:29] --> maku has joined #nuvie
[04:28:38] <Yuv422> hi maku
[04:28:48] <maku> hello guys
[04:29:16] <maku> so is there happened any progress lately?
[04:29:46] <Yuv422> I'm converting ObjManager to a AVL tree structure
[04:30:02] <Yuv422> and sbx is working on object transactions in converse
[04:31:15] <maku> I got the beginnings of files/U6Shape.cpp
[04:31:48] <Yuv422> nice
[04:31:59] <Yuv422> are the .shp files as expected?
[04:33:27] <maku> I haven't got any output yet. it's today's task. I suppose the shapes files are U6 libraries.
[04:33:53] <maku> I have little problems with the class as I cannot get it compile into nuvie.
[04:34:11] <Yuv422> hmm what is it saying?
[04:34:34] <maku> no rule for making U6Shape.o
[04:34:54] <maku> I now disabled dependecy tracking - gonna see if this helps
[04:35:09] <Yuv422> did you put U6Shape.cpp/h in Makefile.common?
[04:39:04] <maku> yes
[04:39:16] <maku> I am now tweaking Makefile.in
[04:42:33] <sbx> should the obj_weight's be greater than uint8?
[04:42:52] <sbx> is there anything heavier
[04:43:07] <Yuv422> there are lighter objects
[04:43:14] <Yuv422> which aren't implemented yet
[04:43:22] <sbx> lighter?
[04:43:27] <Yuv422> like gold
[04:44:01] <Yuv422> and reagents
[04:44:34] <sbx> gold is 1
[04:44:51] <Yuv422> it should be .1
[04:44:55] <sbx> er
[04:44:59] <sbx> so obj_weight isnt *10?
[04:45:08] <Yuv422> wait hehe
[04:45:10] <Yuv422> hmm
[04:45:17] <Yuv422> have a look at pu6e
[04:45:23] <sbx> i dont have it
[04:45:27] <Yuv422> that's where I got the weight handling stuff from :)
[04:45:31] <Yuv422> ah k
[04:45:38] <sbx> i was going to get it eventually :)
[04:45:55] <sbx> why dont we store everything internally *10?
[04:46:03] <sbx> and just /10 when printed
[04:46:10] <Yuv422> sure
[04:46:41] <maku> okay now I have Makefile.in Makefile.common which provide working rules for U6Shape.cpp
[04:47:37] <Yuv422> what was the problem
[04:48:23] <Yuv422> you shouldn't have to touch Makefile.in
[04:48:40] <Yuv422> as it is automatically generated from Makefile.am
[04:49:47] <maku> I used configure to generate Makefile from Makefile.in
[04:50:00] <maku> I just didn't notice Makefile.am
[04:50:09] <Yuv422> when you change Makefile.common
[04:50:18] <Yuv422> you need to rerun the autogen.sh
[04:50:20] <Yuv422> script
[04:50:34] <Yuv422> that's probably where you went wrong. ;)
[04:50:41] <maku> any way... I didn't notice that there was a make rule for each invidual source
[04:51:41] <Yuv422> all you should have to o when adding new files is list them in Makefile.common then re run autogen.sh then configure
[04:51:44] <Yuv422> then make
[04:51:44] <Yuv422> :)
[04:51:59] <maku> :) It works now
[04:54:05] <Yuv422> cool
[04:55:02] <sbx> the inventory list is backwards
[04:55:08] <Yuv422> yeah I know
[04:55:15] <sbx> heh
[04:55:15] <sbx> ok
[04:55:23] <maku> now I am getting a wierd error: files/U6Shape.cpp:8: ISO C++ forbids defining types within return type
[04:55:25] <Yuv422> that's not hard to fix
[04:55:42] <sbx> maybe a parse error from earlier
[04:55:50] <Yuv422> what's on line 8?
[04:56:04] <maku> 7: U6Shape::U6Shape()
[04:56:10] <maku> 8: {
[04:56:19] <maku> 9: lib = new U6Lib_n();
[04:56:23] <maku> 10: }
[04:56:56] <Yuv422> have you put a ; after your class definition in .h
[04:56:57] <Yuv422> file
[04:58:03] <maku> I hadn't. that fixed the problem. thanks :)
[04:59:24] <Yuv422> np
[05:03:14] <Yuv422> who put in ObjManager::move?
[05:03:16] <Yuv422> was it me?
[05:03:21] <Yuv422> I can't remember doing it.
[05:06:06] <sbx> not i
[05:06:57] <Yuv422> nearly ready for the first test
[05:14:08] <sbx> is there a font for the little numbers that show up in the inventory display?
[05:14:23] <Yuv422> hopefully it is in the standard font
[05:14:23] <-- Eclair has left IRC (Read error: 110 (Connection timed out))
[05:14:27] <Yuv422> I can't remember
[05:14:53] <sbx> nearly everything has to be recompiled if Actor.h changes
[05:15:15] --> Eclair has joined #nuvie
[05:15:24] <sbx> well maybe not
[05:15:28] <sbx> but quite a few things
[05:17:17] <sbx> adding objects to inventory correctly combines them now
[05:17:38] <sbx> but does not combine with objects in containers(the original didnt do that either)
[05:20:32] <Yuv422> I'm stepping out for a bit
[05:20:46] <Yuv422> I'll be back later
[05:20:54] <sbx> ok
[05:21:19] <Yuv422> this new tree should clean up ObjManager a bit.
[05:21:22] <Yuv422> bbl
[06:15:16] <sbx> deleting_objects should work correctly now for multiple stacks of varying quantities but it is untested
[06:15:33] <sbx> it does look in containers
[06:18:43] <maku> I have now decoded the file format of intro.shp. the file it self is lzw compressed lib_32 which contains objects of shape format descriped in http://www.geocities.com/nodling/ultima/text/u6tech.txt
[06:20:17] <sbx> woo
[06:20:35] <sbx> is that the intro scene with titles?
[06:21:04] <sbx> i wonder where the character-creation-quiz stuff is
[06:21:23] <maku> probably. I have no output yet. U6Lib doesn't seem to work
[06:21:42] <maku> character-creation questions are stored in file u.exe
[06:22:00] <maku> I have fetched them and placed them in a text file
[06:22:21] <sbx> what about the graphics?
[06:22:34] <maku> wait! intro texts can also be found in u.exe
[06:22:44] <sbx> heh
[06:22:44] <sbx> neat
[06:23:08] <sbx> U6Lib_n is broken atm in that the input and output can not both be used for the same lib
[06:23:13] <sbx> but if your just reading then it should work
[06:23:37] <maku> I have decoded the file intro.shp -> test.shp
[06:23:55] <maku> then I use lib->open("test.shp", 4) to open the file
[06:24:50] <maku> but the U6Lib_n->get_num_items() says that there is 21151 items in the file!
[06:25:18] <maku> that cannot be true. the first objects starts at 0x38
[06:25:39] <maku> am I using this lib wrong?
[06:26:07] <sbx> do you call parse_lib?
[06:26:19] <sbx> oh
[06:26:21] <sbx> you dont need that
[06:26:23] <sbx> just open
[06:26:35] <maku> yes so it seems to be
[06:27:38] <maku> when call lib->item(1) to get data from one shape and try to use pointer method returns, it causes SIGSEGV
[06:28:37] <sbx> is it all offsets before 0x38?
[06:29:29] <sbx> so that would be 14 offsets?
[06:29:40] <sbx> or 14 items
[06:29:55] <Yuv422> are you sure it is a lib?
[06:30:06] <maku> yes
[06:30:23] <maku> file starts with dword which contains the size of the file
[06:30:47] <maku> then this is followed by dwords which point to valid shape structs
[06:31:11] <maku> this all matches documentation
[06:31:30] <sbx> i dont think U6Lib_n handles the first dword being filesize
[06:31:33] <sbx> it calculates it
[06:31:45] <Yuv422> yes
[06:32:10] <maku> that would explain a lot
[06:32:25] <maku> but why it doesn't use or skip the file size?
[06:32:39] <sbx> the libs we encountered so far didnt have it
[06:33:01] <sbx> we can add it as argument to open
[06:34:15] <maku> what you suggest me to do
[06:34:23] <sbx> wait a moment
[06:34:26] <maku> ok
[06:36:06] <maku> how do you normally handle compressed libs?
[06:36:36] <sbx> in the converse each entry is compressed
[06:36:40] <sbx> but the whole file isnt
[06:37:03] <maku> these whole shape files are compressed
[06:37:25] <maku> U6Lib doesn't handle memory structures
[06:38:05] <sbx> on the read side it just reads the data from the offset to the next offset when you request it
[06:38:18] <sbx> on the write side it puts it in a void* until writing
[06:39:09] <Yuv422> the shape file is probably compressed
[06:39:29] <Yuv422> does it look like a lib after decompression?
[06:39:48] <maku> yes. it's a lib after decompression
[06:40:32] <Yuv422> hmm looks like we'll need a memory version of U6Lib then
[06:41:12] <maku> yep. and lib should handle this file size dword in the beginning of a file
[06:41:23] <sbx> i just added the latter
[06:41:35] <sbx> maku update U6Lib_n.cpp and U6Lib_n.h and try it
[06:41:47] <sbx> call open with "true" at the end
[06:41:54] <maku> okay. wait a moment
[06:41:57] <sbx> lib->open("test.shp", 4, true)
[06:43:18] <maku> it's compiling
[06:43:26] <sbx> argh
[06:43:32] <sbx> heh sorry wait i forgot another seekStart
[06:44:50] <sbx> now update the cpp and try
[06:45:30] <maku> ...
[06:48:38] <sbx> if that doesnt work update it again because i made another change
[06:48:54] <sbx> revision 1.9
[06:49:34] <maku> my computer is too slow...
[06:49:47] <sbx> mine too
[06:50:02] <sbx> nuvie is a lot faster than running u6 in dosbox
[06:50:03] <maku> a 166mHz Pentium MMX laptop
[06:50:12] <maku> yes it is
[06:50:32] <maku> altough I haven't got UVI working under dosbox
[06:51:02] <sbx> its not very playable for me but i can run it
[06:52:13] <maku> dosbox just keeps saying "illegal command"
[06:52:42] <maku> and dosbox has problems with my Finnish keyboard layout
[06:53:07] <maku> I can't get : / or \
[06:55:51] <maku> now lib says 14 items, the offset of the first item is 56 and size 5136
[06:56:47] <maku> what kind of interface should I create?
[06:57:06] <maku> should U6Shape return SDL_Surface or just raw data?
[07:03:16] <sbx> Portrait returns unsigned char *
[07:04:56] <maku> I'll make shape return unsigned char * too
[07:09:47] <Yuv422> the intro shapes have a different pallette
[07:10:02] <maku> I know. it's stored in palette.int
[07:10:08] <maku> or they are stored
[07:10:37] <maku> there are many palettes (for bootup, intro, character creation etc...)
[07:10:51] <Yuv422> :)
[07:13:30] <maku> we could create a special palette class which can load palettes from palette.int and apply them to SDL_Surfaces
[07:14:31] <Yuv422> have a look at the classes in screen/
[07:15:42] <maku> whenever I try to access data provided by lib->get_item my attempt causes SIGSEGV
[07:16:06] <maku> annoying. even testing if this pointer is null is enough to hang
[07:16:15] <maku> or better: crash
[07:16:37] <Yuv422> it's probably faulting deeper in the program
[07:17:45] <maku> gdb says: U6Shape::load(std::string) (this=0x8302b70) at stl_vector.h:289
[07:18:09] <Yuv422> have a look at the backtrace
[07:19:06] <maku> before U6Shape::load was #1 0x0807044e in Event::update() (this=0x809c700) at stl_alloc.h:664 and then Game::play()
[07:19:36] <maku> the place of this fault is not in our code
[07:20:02] <maku> I think the pointer returned by lib->get_item() is somehow corrupted
[07:20:59] <Yuv422> does lib_n handle the new dword?
[07:21:22] <sbx> what revision of the file U6Lib_n.cpp do you have?
[07:22:05] <sbx> well anyway the newest one was changed
[07:22:12] <sbx> not sure if i changed it after you updated it again
[07:22:16] <maku> 1.9
[07:22:36] <sbx> ok thats right
[07:25:55] --- Eclair is now known as animeloe
[07:26:04] <-- animeloe has left IRC ("Who turned out the lights?")
[07:26:57] <maku> now I got it working. good me: I had forget to pass pointer to get_item()
[07:32:43] --> animeloe has joined #nuvie
[07:40:49] <maku> GamePalette.cpp doesn't handle palettes.int format
[07:40:56] <Yuv422> yes
[07:41:09] <Yuv422> it's only designed to handle the gamepalette
[07:41:15] <maku> I could add this functionality if nobody has objections
[07:42:29] <Yuv422> hmm
[07:43:27] <Yuv422> maybe we could have a palette class then subclass for the different palettes
[07:44:01] <maku> that sounds reasonable
[07:44:32] <maku> http://www.geocities.com/nodling/ultima/text/u6tech.txt has ready code for palettes.int
[07:49:51] <sbx> actor names don't always display now when you talk to them
[07:49:59] <Yuv422> cool
[07:50:41] <sbx> i added a method to ActorManager that gets the look-string
[07:50:58] <sbx> that seemed like an appropriate place that is already referenced by Converse
[07:51:56] <sbx> ive got to go now
[07:51:57] <sbx> cya
[07:52:05] <Yuv422> cya
[07:52:12] <-- sbx has left IRC ("X-Chat [1.6.4]")
[08:50:55] <Yuv422> gotta go now.
[08:50:56] <Yuv422> cya
[08:51:01] <-- Yuv422 has left IRC ("[BX] Terminated.")
[09:00:09] <-- maku has left IRC ("Jo riittää.. Vain järjestys takaa tulevaisuuden!")
[11:26:39] --> wjp has joined #nuvie
[14:25:50] --> maku has joined #nuvie
[14:26:17] <-- maku has left IRC (Client Quit)
[16:18:12] <-- Kirben has left IRC (Read error: 104 (Connection reset by peer))
[18:17:03] --> maku has joined #nuvie
[18:17:53] <-- maku has left IRC (Client Quit)
[23:37:10] <-- wjp has left IRC ("Zzzz...")