Underworld Adventures homepage
[01:31:13] <-- vividos has left IRC (Read error: 104 (Connection reset by peer))
[02:19:27] --> MustCat has joined #uwadv
[07:47:29] --> phlask has joined #uwadv
[07:47:29] --- ChanServ gives channel operator status to phlask
[07:54:33] <-- MustCat has left IRC (Read error: 104 (Connection reset by peer))
[08:37:47] <-- phlask has left IRC (Killed (NickServ (Nickname Enforcement)))
[08:38:30] --> phlask has joined #uwadv
[08:38:30] --- ChanServ gives channel operator status to phlask
[08:44:19] <-- phlask has left #uwadv ()
[11:37:36] --> yot has joined #uwadv
[13:22:53] --> phlask has joined #uwadv
[13:22:53] --- ChanServ gives channel operator status to phlask
[13:24:49] <-- phlask has left #uwadv ()
[14:12:12] --> Dark-Star has joined #uwadv
[14:12:16] <-- Dark-Star has left #uwadv ()
[15:16:17] <-- yot has left IRC ()
[15:48:05] --> phlask has joined #uwadv
[15:48:05] --- ChanServ gives channel operator status to phlask
[15:48:10] <-- phlask has left #uwadv ()
[16:37:20] --> wjp has joined #uwadv
[16:37:20] --- ChanServ gives channel operator status to wjp
[17:48:30] --> phlask has joined #uwadv
[17:48:30] --- ChanServ gives channel operator status to phlask
[17:56:29] <phlask> RU there wjp?
[17:59:34] <phlask> guess not, bbl
[17:59:37] <-- phlask has left IRC ()
[18:08:16] --> vividos has joined #uwadv
[18:08:16] --- ChanServ gives channel operator status to vividos
[18:08:16] <wjp> hi
[18:08:16] <vividos> hi there
[18:09:12] <vividos> what's news, corwin eerm wjp? :-)
[18:09:21] <wjp> :-)
[18:09:52] <vividos> btw, I hopefully fixed the bug with garbage on the screen at startup
[18:10:50] <wjp> GlClear in the ::render for the menu screen?
[18:10:59] <wjp> or glClear or something
[18:11:12] <vividos> no, before activating any screens
[18:11:35] * wjp nods; sounds good
[18:12:02] * vividos already has some programming ideas to totally screw up CVS :)
[18:12:12] <wjp> good :-)
[18:12:20] <wjp> a good cvs-breakage is long overdue :-)
[18:12:36] <vividos> hehe
[18:15:23] <vividos> nothing new from exult?
[18:17:07] <wjp> hm, no, exult development is a bit slow currently
[18:17:19] <wjp> Jeff is occupied with other things
[18:17:30] <wjp> and so are the rest of us, judging by the amount of CVS traffic :-)
[18:18:52] <vividos> almost the same with uwadv, I guess
[18:30:10] <vividos> hmm, what does uwadv say for the video driver in the console when you start it?
[18:30:20] <vividos> e.g.: video driver: directx, ram available: 28256 k
[18:39:17] * vividos thinks a -Wall in the Makefile.mingw is enough to nag Dominus :)
[18:39:49] <wjp> video driver: x11, ram available: 0 k
[18:40:15] <vividos> 0 k ? :)
[18:40:23] <wjp> yeah
[18:40:40] <wjp> that's just how SDL works
[18:41:59] <vividos> that means SDL doesn't know how much memory is available on X11?
[18:42:12] <wjp> something like that; I don't know the details
[19:01:54] <vividos> some time I also want to play uwadv in the subway
[19:03:49] <wjp> :-)
[19:04:19] <vividos> even if I have to drive 70 km's to just use a subway :)
[19:30:51] <vividos> we discussed earlier about the savegame folder on linux. what do we want to use? ~/.uwadv/ or ~/.uwadv/uasave/ ?
[19:31:52] <vividos> don't know exactly if a "mkdir ~/.uwadv/uasave/" would work
[19:31:58] <wjp> mkdir -p
[19:32:18] <wjp> I'd use ~/.uwadv/uasave
[19:32:28] <wjp> or maybe ~/.uwadv/savegame
[19:32:35] <vividos> hmm, have to use the ua_mkdir
[19:33:18] <wjp> hm, yes, good point :-)
[19:33:43] <wjp> strip of last part, see if that exists, and recurse if not?
[19:34:06] <vividos> hmm, would be a possibility
[19:36:30] <vividos> what does a "stat" say about ~ ?
[19:36:50] <vividos> hopefully the right thing :)
[19:37:03] <wjp> '~' is handled by a shell
[19:37:41] <wjp> you shouldn't literally put a ~ in the default path, but get the value from the HOME env. variable
[19:38:00] <vividos> hmm ...
[19:38:26] <wjp> or just expand ~ to $HOME manually
[19:38:36] <vividos> it's just a settings value, but we could replace strings like %home% or %uadata%
[19:38:40] <vividos> or do it that way
[19:39:15] <vividos> a ~ is only expected at start of a path string, right?
[19:39:24] <wjp> yeah
[19:40:23] <vividos> a routine for expanding %home% and %uadata% would be still handy, though
[19:40:40] <wjp> yeah
[19:40:51] * vividos sighs ... more work
[19:40:53] <wjp> exult uses a similar mechanism
[19:41:00] <wjp> get_system_path
[19:41:08] <wjp> (it replaces things like <STATIC>)
[19:41:26] <vividos> yes
[19:42:17] <vividos> have you already found a thing to work at in uwadv?
[19:43:20] <vividos> what mode should I pass when I call ua_mkdir? 0600?
[19:44:20] <wjp> 0700
[19:44:43] <vividos> ok
[19:50:15] <wookiee> wjp: I don't think X11 can create 2d hardware surfaces... That is why video memory = 0 in Linux...
[19:50:45] <wjp> ah, that was it :-)
[19:50:46] <wjp> thanks :-)
[19:51:07] <wjp> I've seen that question pass by on the SDL mailing list dozens of times but the answer slipped my mind :-)
[19:51:17] <wookiee> Video memory only reffers to hardware surfaces, as far as I know :)
[19:51:18] <wookiee> heh
[19:51:35] <wookiee> I'm a #SDL cronie :)
[19:51:49] <wjp> I know :-)
[19:52:01] <-- vividos has left IRC (sterling.openprojects.net irc.openprojects.net)
[19:52:05] * wjp was in #sdl for a couple of months too last year
[19:52:11] <wookiee> Ahh
[19:52:32] <wookiee> I seem to remember you :)
[19:54:59] <wjp> I wonder why I stopped going there
[19:55:21] <wookiee> Probably me :)
[19:55:26] <wjp> probably forgot to join after a vacation or something
[19:55:28] <wjp> eh? :-)
[19:55:29] <wookiee> hehe
[19:55:58] <wookiee> I was only joking
[19:56:23] <wjp> I was pretty sure of that, yes ;-)
[19:56:23] * wookiee wanders off to the store
[19:56:27] <wookiee> hehe
[19:56:32] <wookiee> goodbye :)
[19:56:36] <wjp> bye :-)
[19:59:27] --> vividos has joined #uwadv
[19:59:27] --- ChanServ gives channel operator status to vividos
[20:00:08] <vividos> I just added %uadata% and %home% expansion; I couldn't test the %home% one, though
[20:01:34] <vividos> it's sort of annoying to be disconnected since 5 minutes and the client doesn't say a thing :)
[20:01:42] <vividos> bye wookie
[20:03:27] <vividos> what exactly does:
[20:03:28] <vividos> string::size_type pos = name.find_last_not_of('/');
[20:03:28] <vividos> if (pos != string::npos)
[20:03:28] <vividos> name.resize(pos+1);
[20:03:42] <vividos> (in ua_mkdir)
[20:04:10] <wjp> it makes the string one larger if there's no trailing slash
[20:04:40] <wjp> no...
[20:05:03] <wjp> ah... it removes trailing slashes
[20:05:12] <vividos> hmm, using resize()?
[20:05:16] <wjp> pos = the last non-slash
[20:05:40] <wjp> so pos+1 is the length of the string to just before the last non-slash
[20:05:47] <vividos> hmm, we could remove the slash for every platform, couldn't we?
[20:06:02] <wjp> yeah
[20:06:06] <wjp> no need for the #if, I guess
[20:06:36] <vividos> erase() would be cleaner than resize IMHO
[20:11:04] <vividos> how do I stat() a file/folder on linux?
[20:11:15] <wjp> to see if a directory exists?
[20:12:00] <vividos> yes
[20:12:22] <wjp> do you still have exult's utils.cc? :-)
[20:12:26] <vividos> on win32, there is a _stat(struct _stat*) funciton
[20:12:29] <wjp> 'U7exists'
[20:12:32] <vividos> I have the rc2 :)
[20:12:35] <vividos> source
[20:12:55] <wjp> exists = (stat(name, &sbuf) == 0);
[20:13:03] <wjp> (with struct stat sbuf)
[20:13:09] <wjp> according to this that should work in windows too
[20:14:14] <vividos> but what happens when "name" is a file?
[20:15:02] <wjp> checking if it's a directory will take some more work, yes
[20:16:09] <vividos> st_mode == S_IFDIR ?
[20:16:18] <wjp> there should be a S_ISDIR(m) macro, where m is the st_mode field
[20:16:18] <vividos> sbuf.st_mode == S_IFDIR
[20:16:59] <wjp> better use S_ISDIR
[20:17:16] <vividos> ok
[20:17:42] <wjp> you'd have to check that the S_IFDIR bit is set, and the S_IFCHR bit is cleared, and possibly more
[20:17:47] <vividos> hmm, doesn't quite work for win32 :-(
[20:19:36] <vividos> grr, win32's S_ISDIR is _S_IFDIR
[20:21:03] <wjp> hm, or you can just try a mkdir and check the return value
[20:21:39] <wjp> Colourless suggests 'GetFileAttributes' in windows
[20:22:04] <vividos> thanks
[20:27:18] <vividos> ok, hope the code works for you, too :)
[20:50:00] <vividos> on http://reconstruction.voyd.net/: Three more projects made their way to the project graveyard today: Ultima X, Twister's UW2 Remake, and Twister's UW3 remake.
[20:57:56] <vividos> http://bearcity.pwp.blueyonder.co.uk/ <-- the new page for the uw2 map editor by Alistair Brown
[21:00:16] * vividos talks more to the logs, so don't worry :)
[21:41:48] --> phlask has joined #uwadv
[21:41:48] --- ChanServ gives channel operator status to phlask
[21:41:54] <vividos> hi phlask!
[21:42:42] <phlask> hi... it has been a while
[21:43:21] <vividos> yes
[21:43:36] <wjp> hi phlask
[21:43:51] <phlask> hi wjp
[21:43:52] <vividos> btw, I added a simple savegame API in files.hpp (ua_files_manager)
[21:44:05] <phlask> nice
[21:44:27] <vividos> hope that the functions are suitable for the load/save screen
[21:44:48] <phlask> I'll take a peek at them soon
[21:45:39] <phlask> I haven't done any programming on uwadv for the last couple of days... the first thing I want to do now is add the mana stuff to the char creation script and I'll start with the save/load screen after that
[21:45:52] <vividos> ok
[21:46:00] <phlask> well... not *now* now... but soon anyhow :)
[21:46:08] <vividos> ok :)
[21:46:32] <phlask> I still haven't figured out why I am missing that intro midi file in my UW1
[21:47:24] <vividos> don't know either
[21:47:29] <phlask> well... I do have it now (thanks to wjp), but I'm still not sure why it isn't installed in the first place
[21:47:49] <vividos> in the installer you can choose to not install sound files, I think
[21:48:29] <phlask> yeah... but I am only missing 1 file (the intro)
[21:48:48] <phlask> besides... all Adlib files are there
[21:49:37] <phlask> This *might* be a bug in certain UW distributions
[21:49:58] <vividos> might be
[21:50:23] <phlask> UW itself seems to pick the adlib file if the normal midi file isn't there because I can hear the intro play when I run it
[21:51:32] <phlask> What do you think we should do... should we do an auto fallback to the Adlib files (just as the original) or add a config option and let the user decide
[21:54:09] <vividos> the first would probably be better
[21:54:25] <vividos> but it doesn't quite fit in the way the tracklist is currently loaded
[21:56:19] <vividos> we could have a second tracklist with "fallback" files to play
[21:56:47] <vividos> but it's not high priority I think
[21:57:42] <phlask> I think we should just use 2 tracklists on disk... the main and adlib files and 1 major tracklist in the program... the tracklist loader then checks the presence of the main files and if not present loads the one from the adlib list.
[21:58:42] <vividos> ok
[22:00:30] <phlask> I'll just add it to my personal todo list then (yours is already full enough, isn't it?) :)
[22:00:55] <vividos> just added the fallback list in uadata/uw1/audio/, so that we don't forget about it
[22:00:58] <vividos> thanks :)
[22:01:39] <phlask> 'k then...
[22:02:34] <phlask> hmm... I was just thinking... should we also use the selection style mouse cursor in the start menu and create character screen you think?
[22:02:53] <vividos> hmm, we could do that
[22:03:14] <phlask> how have you implemented the cursor in the ingame view?
[22:03:19] <vividos> but as a separate texture :)
[22:03:42] <phlask> oh... yeah absolutely :)
[22:05:21] <vividos> ingame: I just loaded the image and do a paste on the main image (which is to be redone, of course :-)
[22:06:08] <phlask> yes, I just remembered that we already discussed that - sorry for asking you again
[22:06:41] <phlask> I'll add that one (cursor in start/ccscreen) to my todo list too then...
[22:09:44] <vividos> ok
[22:11:27] <phlask> I'm looking at your changes in files.hpp now...
[22:12:09] <phlask> those functions should be sufficient for the basics... thanks :)
[22:12:30] <vividos> don't know how to exactly do saving
[22:12:47] <vividos> or how you want to do saving
[22:12:47] <phlask> what do you mean?
[22:13:05] <vividos> how a new savegame is created and which filename it gets
[22:13:47] <phlask> oh like that... well we can just create a unique filename
[22:14:47] <vividos> of course, but does the user select a "slot" and the slot number is reported to the files manager for creation, or does the user just save to a new and empty slot
[22:15:23] <phlask> I would opt for the latter
[22:15:52] <phlask> there is no reason for using a fixed number of savegames slots
[22:16:02] <phlask> well... hmm, maybe there is
[22:16:24] <wjp> unlimited would be nice, though
[22:16:34] <phlask> if every game is saved to a new file then you could end up with 100 savegame files or so
[22:16:42] <phlask> you must be able to overwrite existing ones
[22:17:12] * wjp has over 300 exult savegames
[22:17:25] <vividos> not bad :)
[22:17:30] <phlask> yeah... but do you ever load numbers 2 to 295 ?
[22:17:38] <wjp> yup
[22:17:39] <wjp> :-)
[22:17:43] <wjp> debugging
[22:17:46] <phlask> well... that isn't fair
[22:17:49] <phlask> :0
[22:17:56] <phlask> anyhow...
[22:17:58] <wjp> I have savegames near pretty much every important event/area by now
[22:18:32] <phlask> I think we should choose for an unlimited number of savegames approach *with* the ability of overwriting existing ones
[22:19:37] <phlask> for the filemanager we could use a function that reserves/creates a new slot and one that saves to an existing slot
[22:20:04] <phlask> and one for removing slots (shifting other slots upwards)
[22:26:04] <vividos> hmm, shifting upwards would require renaming files?
[22:26:38] <phlask> no it wouldn't
[22:26:50] <phlask> filenames are unique right
[22:27:10] <vividos> but slot places not :)
[22:27:31] <phlask> no... they have an index number
[22:28:09] <phlask> the filemanager can just load the savegame files in sequential order
[22:28:10] <phlask> e.g.
[22:28:21] <phlask> savegame files could be playername + a number
[22:28:37] <phlask> vividos001 vividos002 vividos004
[22:28:46] <wjp> ack, forgot that I need to get up early tomorrow
[22:28:49] <wjp> time to go :-)
[22:28:52] <wjp> g'night
[22:28:52] <phlask> 'k bye
[22:28:54] <vividos> bye wjp!
[22:29:05] <-- wjp has left IRC ("Zzzz...")
[22:29:17] <phlask> right... if you add new savegame files to the back and load them in sequential order you have no problem
[22:29:26] <vividos> ok then
[22:29:42] <vividos> we just add it to the big todo list :)
[22:29:50] <phlask> yeah :)
[22:29:57] <vividos> I have to check in that file once
[22:30:28] <phlask> I bet it is over 4kb already :)
[22:31:23] <vividos> it has to be written from my notices yet :)
[22:32:00] <phlask> :)
[22:32:11] <phlask> hmm... now I think of it: I also think the savegame stuff deserves a class of its own... savegames have *nothing* to do with the config or lua files yet they share a single class... another item for the todo list?
[22:32:28] <vividos> a savegame manager?
[22:32:50] <phlask> well... call it what you want...
[22:33:02] <vividos> ok
[22:35:08] <phlask> hmm... I also will need some easy way of extracting info from a savegame on-the-fly
[22:36:01] <phlask> maybe a savegame can have some general infoblock that can be loaded in one go without having to load the entire file
[22:37:38] <phlask> you know... stuff like the player name, current level, health and maybe even a screenshot
[22:38:56] <vividos> yes
[22:40:20] <phlask> hmm, how do you want to handle different players? Should each unqiue player only be able to save/load savegames for that playername or savegames for any playername
[22:40:37] <phlask> I'm talking about a single user OS scenario here
[22:41:41] * vividos is on the phone, be right back
[22:42:11] <phlask> don't bother... I really have to go anyhow :)
[22:42:29] <vividos> ok bye!
[22:42:52] <phlask> bye now
[22:42:56] <-- phlask has left IRC ()
[23:15:34] <-- vividos has left IRC ("Leaving")