#pentagram@irc.freenode.net logs for 18 Dec 2003 (GMT)

Archive Today Yesterday Tomorrow
Pentagram homepage


[00:00:17] --> Kirben has joined #pentagram
[00:00:31] --- ChanServ gives channel operator status to Kirben
[00:59:22] --> Knight has joined #pentagram
[00:59:57] <Knight> hey guys, can you tell me what do you use to show the logs of this chat on your site?
[01:08:31] <Knight> cric.. cric..
[01:09:59] <-- Knight has left IRC (" HydraIRC -> http://www.hydrairc.com <- The dawn of a new age")
[01:39:47] <-- Fingolfin has left IRC ("42")
[03:23:38] <watt> YAY... case insensitive string insanity!
[03:58:27] <watt> right.. so.. HIDBindings are now in a map...
[04:00:44] <watt> probably just comments and the the patch is final... (whether it's acceptable is another story)
[04:03:57] <watt> hmm.. and istring.h won't work on pre 3.0 gcc .... at least I don't think it will... they called the char_traits - string_char_traits back then.
[06:33:26] --> Colourless has joined #Pentagram
[06:33:26] --- ChanServ gives channel operator status to Colourless
[06:33:55] <Colourless> what's istring.h?
[06:34:04] <Colourless> why we don't particularly care about gcc pre 3.0
[06:34:12] <Colourless> we do care about other compilers.
[06:34:21] <Colourless> if it is something that is gcc 3.0 specific, it's got to go
[06:34:28] <Colourless> i don't see that header in msvc
[06:34:29] <-- Colourless has left IRC (Client Quit)
[06:57:39] <watt> istring.h is the case insensitive string that I'll be adding in the next version of the input patch. It should be the way all STL implementations handle strings (using basic_string<char, char_traits> )
[06:59:12] <watt> but I'm not sure how many name their string associated structures to proper STL spec.
[07:00:17] <watt> gcc pre 3.0 changed the name... but name changes should be easy to handle with macros and typedefs.
[07:03:53] <watt> a normal string in STL is actually a typedef of basic_string<char, char_traits<char>>
[07:06:08] <watt> we simply inherit from std::char_traits<char> change 3 methods to be case insensitive, typedef a new basic_string, and presto ! case insensitive strings!
[07:06:30] <watt> for comparative purposes of course.
[07:19:36] <watt> appears to be part of ansi STL
[08:10:18] <watt> and it appears to be in msvc 6. It looks safe.
[08:11:25] <Darke> Don't bother supporting msvc6 or gcc2.95 or lower. Most of the rest of pentagram won't compile on either due to template stuff.
[08:12:12] <watt> cool. Then I'm sure this stuff is safe.
[08:12:58] <watt> hmm.. and could be quite useful elsewhere.
[08:13:55] * watt points to XMLNodes. it would be nice to have case insensitive keys.
[08:16:34] <Darke> Hrm... one thing to check is that we already have a case insensitive string comparison function floating around somewhere. You might want to make sure your implementation has identical effects too, especially if you're going to go around replacing things. *grin*
[08:16:43] <watt> and the istring compares are only a slight variation of the Q_strncasecmp to deal with a difference between L.T and G.T.
[08:17:03] <watt> I did.
[08:17:07] <Darke> Coolth.
[08:17:53] <watt> Q_strncasecmp:
[08:18:00] <watt> if (c1 != c2)
[08:18:01] <watt> {
[08:18:01] <watt> if (c1 >= 'a' && c1 <= 'z')
[08:18:01] <watt> c1 -= ('a' - 'A');
[08:18:02] <watt> if (c2 >= 'a' && c2 <= 'z')
[08:18:02] <watt> c2 -= ('a' - 'A');
[08:18:03] <watt> if (c1 != c2)
[08:18:05] <watt> return -1; // strings not equal
[08:18:07] <watt> }
[08:18:24] <watt> ichar_traits::compare:
[08:18:36] <watt> if (c1 != c2)
[08:18:37] <watt> {
[08:18:37] <watt> if (c1 >= 'a' && c1 <= 'z')
[08:18:37] <watt> c1 -= ('a' - 'A');
[08:18:38] <watt> if (c2 >= 'a' && c2 <= 'z')
[08:18:38] <watt> c2 -= ('a' - 'A');
[08:18:39] <watt> if (c1 != c2)
[08:18:41] <watt> return (c1 < c2) ? -1 : 1; // strings not equal
[08:18:43] <watt> }
[08:28:33] <watt> ^_^
[08:44:54] * Darke guesses extreme amounts of cut&paste effort went into that code. *grin*
[08:59:57] <watt> well.
[09:00:45] <watt> anyway... I got it doco'ed (I think properly) and I think I'll submit the final patch/
[09:16:31] <watt> And it up!
[09:18:02] <watt> I sincerely hope you guys will want to use the istrings. Of course, I'd like to se it all get in :-)
[09:32:44] --> wjp has joined #pentagram
[09:32:44] --- ChanServ gives channel operator status to wjp
[09:32:57] <wjp> hi
[09:36:43] <Darke> Nanoo.
[09:39:38] <wjp> hm, one thing just occured to me
[09:39:53] <wjp> what would SDL_GetKeyName return for international keys?
[09:42:20] <watt> ?? good question
[09:43:28] <watt> I'd assume the ascii representation of the key..
[09:45:29] <wjp> pity I'm not at home right now or I could start a second X with a german keymap
[09:47:16] <watt> world and then the number
[09:49:45] <watt> there's "world 0" to "world 95"
[09:49:56] <watt> not very friendly name IMO
[09:55:49] <watt> hmm.. you know.. it wouldn't be too hard to make a "l33t_char_traits" that allow for all l33t strings to be comparable - hehehhe or not.
[09:57:45] <watt> <c>t00G13c0mb4t</c> would be valid --- ugh this is a horrible idea - someone slap me.
[10:01:00] * wjp slaps watt
[10:01:02] * Darke awaits for Colourless to arrive with the Trout of Slapping +4.
[10:01:15] <watt> thanks. I needed that
[10:01:21] <wjp> you're welcome :-)
[10:02:13] <watt> the sad part is that wouldn't be hard to do.
[10:13:33] <watt> holy crap - linux 2.6
[10:20:40] --> Colourless has joined #Pentagram
[10:20:40] --- ChanServ gives channel operator status to Colourless
[10:21:07] <Colourless> hi
[10:21:23] <wjp> hi
[10:22:29] <Darke> Greetings.
[10:29:54] <-- Colourless has left IRC (Read error: 54 (Connection reset by peer))
[10:30:38] <Darke> Hrm... that was quick. I didn't expect him to die of shock from the l33t comments. *grin*
[10:30:39] --> Colourless has joined #Pentagram
[10:30:39] --- ChanServ gives channel operator status to Colourless
[10:32:52] <watt> hiya
[10:36:21] <watt> and... I'm tired.. time to sleep.
[10:36:26] <watt> night.
[10:36:32] <Colourless> cya
[11:36:27] <wjp> well, input patch looks pretty good
[11:37:07] <wjp> is avatarinstasis really u8-specific?
[11:37:13] <wjp> (apart from the name, that is)
[11:37:56] <Darke> I'd give good odds on 'no' myself.
[11:38:06] <Colourless> i don't think it would be u8 specific
[11:38:27] <Darke> There's always a need to stop the player from stuffing around with a carefully placed avatar when a script is running. *grin*
[11:38:31] <Colourless> the 1025 class in Remorse was even called Avatar :-)
[11:38:50] <Colourless> though in Regret they renamed it to Crusader
[11:39:17] <Colourless> the binding itself will likely be nuked when pentagram is more stable :-)
[11:41:41] <Darke> I don't know why they bothered. If they just lowercased the 'a', suddenly it would be correct again. *grin*
[11:41:59] <Colourless> :-)
[12:53:44] <wjp> or keep it uppercased because of the class-names-start-with-capitals convention :-)
[12:54:33] <Colourless> if i'm not mistaken, all the class names were entirely in capitals
[13:01:07] <wjp> we should also probably change Q_strcasecmp to return -1 if s1<s2 and +1 if s1>s2
[13:01:16] <wjp> that way ichar_traits::compare can just call Q_strcasecmp
[13:01:37] <Colourless> i thought it already did. If it doesn't yes change it
[13:02:24] * wjp notices Q_strcasecmp has a string length limit of 99999 chars :-)
[13:04:06] <Colourless> changing that might be a nice idea. Though if we ever have a string that is larger than 99999 chars we are doing something wrong :-)
[13:04:50] <wjp> maybe when reading text files into memory
[13:05:04] <Colourless> a 100k text file is massive :-)
[13:05:11] <wjp> yeah...
[13:06:15] <Colourless> other instance is this. Why would be attmepting to case insensitive compare 2 100k strings anyway
[13:06:42] <wjp> I have no idea :-)
[13:06:44] <Colourless> s/instance/(insert something here but I can't think of it right now/
[13:13:58] <wjp> our link-commandline is getting quite large
[13:14:03] <wjp> about 3000 characters currently
[13:14:15] * wjp wonders what the limit on that is :-)
[13:15:01] <Colourless> i would imagine it would start to break at around the 32k or 65k limits
[13:15:13] <Colourless> s/65/64/
[13:15:14] <wjp> could be 4k
[13:15:48] <Colourless> so why is it so long?
[13:16:03] <Colourless> full path names?
[13:16:15] <wjp> no, only relative
[13:16:30] <wjp> we just have a lot of object files
[13:16:46] <wjp> about 136, it seems
[13:17:00] <Colourless> your operating system is opensource, yout compiler is opensource. You can find it all out :-)
[13:17:08] <Colourless> s/yout/your/
[13:17:21] <wjp> well, sure
[13:17:38] <wjp> probably not the most useful thing to be doing now, though :-)
[13:21:31] <wjp> ok, committed the minor change to Q_strcasecmp
[13:33:15] <wjp> we'll need to decide about the input/ directory
[13:37:04] <Colourless> yes we will
[13:37:25] <Colourless> we 'could' put it in kernel
[13:39:07] <Darke> Colourless: Question. Do you want the posix max (which is minimum) or the effective 'max'? *grin*
[13:39:22] <wjp> eh?
[13:39:50] <Darke> Max number of characters in a command line. *grin*
[13:39:58] <Colourless> Darke: it doesn't concern me :-)
[13:40:53] <wjp> Darke: I want both :-)
[13:40:56] <Darke> For reference it's in the limits.h and posix_lim.h header files sitting in an include dir near you. 4096 for POSIX and 131072 for the linux one. *grin*
[13:42:08] <wjp> looks like that if we increase our number of objects files much more we'll need to create some .a files before fully linking :-)
[13:42:15] <Darke> The only reason I remembered that is that djgpp had a neat trick documented to get around the rather pitiful dos commandline limits and bump it up to something a little more reasonable. *grin*
[13:42:33] <Darke> Only if we want to be purely posix compliant, and excessivly paranoid. *grin*
[13:43:06] <Colourless> well how many args can we have :-)
[13:43:15] <Darke> From memory, IRIX allows you to alter this by frobbing a kernel parameter in it's equilivant of the proc dir, ncargs or something I think.
[13:43:42] <Darke> Provided you stay under the max character limits above, essentially as many as you like. *grin*
[13:44:11] <Darke> (So the theoritical limit would be half of both, assuming that one has single characters followed by spaces as all the arguments. *grin*)
[13:44:13] <Colourless> you know that for sure?
[13:44:53] <Darke> Yes, it's documented, so it must be true. *grin*
[13:45:09] <Colourless> :-)
[13:46:20] <Darke> Given that turning a command line into an argv is almost as simple as a `s/ /\0/` (assuming no quoted or escaped spaces) it shouldn't be *too* hard to implement. *grin*
[13:46:59] <Colourless> considering that you also need to create a pointer array
[13:47:13] <Colourless> there could be further restrictions
[13:47:24] <Colourless> but if you say there isn't, i guess there isn't
[13:47:52] <Colourless> that I guess though is something for the CRT to deal with
[13:48:01] <Colourless> s/though is/though that is/
[13:48:31] <Darke> That particular restriction is documented under SGI's implementation of xargs, but it doesn't appear in any of the GNU tools under linux that it should, so I would guess that it's not an issue.
[13:52:07] <wjp> IIRC, an autoconf-generated configure script tries to determine the max. commandline length
[13:52:34] <wjp> (which triggered a really really weird bug in msys in windows)
[13:54:02] <Colourless> really really weird?
[13:54:34] <wjp> yes :-)
[13:55:01] <Colourless> care to tell me what this bug was?
[13:55:38] <wjp> I'm looking it up in the logs
[13:56:49] <wjp> http://www.math.leidenuniv.nl/~wpalenst/uwadvlog.php?log=24Sep2003
[13:57:12] <wjp> starting at 21:19:57
[13:58:22] <wjp> seems the bug about this in the mingw tracker is still open and unresolved
[14:00:15] <Colourless> not really my definition of 'really really weird', but whatever does it for you :-)
[14:04:00] <Darke> #undef COLOURLESS_REALLYREALLYWEIRD
[14:04:01] <Darke> #define COLOURLESS_REALLYREALLYWEIRD WJP_REALLYREALLYWEIRD
[14:04:06] * Darke hopes that fixes it!
[14:04:50] <Colourless> #undef COLOURLESS_REALLYREALLYWEIRD
[14:04:58] <Colourless> #define COLOURLESS_REALLYREALLYWEIRD DARKE_NORMAL
[14:05:07] <wjp> hehe :-)
[14:05:58] <Darke> #define COLOURLESS_NORMAL DARKE_SANE too?
[14:06:34] <Darke> Or is DARKE_SANE defined as `sqrt(-1)` so you'd have problems?
[14:07:29] <Colourless> that would depends on if i had floating point exceptions enabled
[14:12:02] * wjp has no problems with sqrt(-1)
[14:12:28] <wjp> other than maybe the fact that you'd have to pick one of the two roots
[14:12:30] <Colourless> imaginary number :-)
[14:12:59] <wjp> primitive fourth root of unity
[14:14:54] <Darke> But that's not punny, thus it's unimportant. *grin*
[14:16:50] <Colourless> :-)
[14:18:01] * Darke retires to sleep. Since it's apparently important he gets some. *noddle* Night!
[14:18:32] <Colourless> night
[14:18:41] <wjp> night
[14:18:43] * Darke does honestly think Colourless is almost as nuts as he is, though Colourless is just better at hiding it. *grin*
[14:19:25] <Colourless> perhaps perhaps :-)
[14:21:53] * Darke balances a petunia in a yellow pot on Colourless' head, and disappears off to sleep. *poof!*
[14:22:11] <Colourless> oh yay
[14:34:23] --> exultbot has joined #pentagram
[14:34:23] --- Topic for #pentagram is: http://pentagram.sf.net/ - We are missing an anvil. If you find one please let us know
[14:34:23] --- Topic for #pentagram set by Colourless at Fri Oct 17 14:59:04 2003
[14:34:44] --- exultbot is now known as not_exultbot
[14:34:56] --- not_exultbot is now known as exultbot
[14:35:00] <wjp> seems to work :-)
[14:43:48] <Colourless> as far as I can tell, it doesn't seem that windows imposes any limits to command line args
[14:45:31] <Colourless> O cam
[14:45:43] <Colourless> i can't find any details either way
[14:45:58] <Colourless> i can tell at least there are no limits to the number of args :-)
[15:52:05] <wjp> how many files are we expecting to have in input/ (if we decide to make it)?
[15:52:11] <wjp> about 4?
[15:52:19] <wjp> well, 4 .cpp files, that is
[15:52:39] <Colourless> no idea. It wont be many though
[15:53:15] <Colourless> just depends if we want pentagram to be flexible enough so it doesn't require sdl
[15:53:31] <Colourless> but i don't think that is likely :-)
[15:54:30] <wjp> very unlikely :-)
[15:55:33] <wjp> there's something to be said for stdbindings, u8bindings not fitting in kernel/
[15:56:58] <Colourless> i originally speculated that we might want input. The reason was obvious enough. Doesn't seem to fit anywhere else
[15:57:27] * wjp nods
[15:57:35] <wjp> maybe we should just create it
[15:57:38] <wjp> won't really hurt
[15:57:49] <Colourless> look at conf
[15:57:53] <Colourless> not many files there :-)
[15:58:10] <wjp> but conf is very independant of the rest
[15:58:18] <Colourless> true
[16:00:02] <wjp> random idea: we could also make the keybindings a bit more like intrinsics, in the sense that they're static members of the class they 'belong to'
[16:00:23] <wjp> that might complicate things unnecessarily, though
[16:01:04] <Colourless> we 'could' shove key binds into the GameMapGump :-)
[16:01:20] <Colourless> and then have separate Ultima8GameMapGump and CrusaderGameMapGumps :-)
[16:01:46] <Colourless> or they could be shoved into the generic 'game' class that we are yet to define
[16:02:36] <wjp> that might be a sensible spot
[16:02:50] <wjp> depending on how exactly we do that
[16:03:10] <wjp> and that game class (or those game classes) need to be put somewhere too
[16:03:39] <wjp> (I assume that would contain things like intro, endgame, ...?)
[16:03:54] <Colourless> yes things like that
[16:04:01] <wjp> we could have a games/ directory
[16:04:07] <Colourless> game setup functions (i.e. initialize the world and stuff)
[16:04:29] <wjp> then we could put HIDManager into kernel/, and stdbindings, u8bindings into games/
[16:04:31] <Colourless> would have various game constants, whatever the constants would be
[16:04:41] <Colourless> yeah that would probably work
[16:21:03] --> Knight has joined #pentagram
[16:21:10] <Knight> Hi
[16:22:09] <Colourless> hi
[16:25:48] <Knight> hey colourless, what script do you use to mantain the logs of this chat on the web?
[16:28:04] <Colourless> i used this script called W.J.P. :-)
[16:28:20] <Knight> lol
[16:28:23] <Knight> I want it..
[16:28:25] <Knight> i want it :D
[16:29:17] <Colourless> ask wjp if you want answers :-)
[16:29:52] <Knight> wjp,...you there?
[16:31:32] <-- Kirben has left IRC ("System Meltdown")
[16:32:36] <wjp> Colourless: lol
[16:32:51] <wjp> Knight: well, maybe :-)
[16:42:45] <Knight> Cool
[16:42:46] <Knight> :D
[16:42:56] <Knight> It's really a very nice scripts
[16:43:12] <Knight> script, exultbot is an eggdrop right?
[16:43:59] <wjp> no
[16:44:13] <Knight> what is it then?
[16:44:18] <wjp> home-made from scratch
[16:44:31] <Knight> oh..
[16:44:31] <Knight> cool
[16:45:01] <Knight> !help
[16:45:04] <Knight> ?
[16:45:04] <Knight> hehe
[16:45:22] <Colourless> try a question mark
[16:45:25] <Colourless> ?help
[16:45:29] <Knight> ?help
[16:45:47] <Knight> I thought eggdrops where cool until i got one..
[16:48:43] <Knight> If i had a dog, i would name it perl...
[16:48:46] <Knight> dunno why..
[16:49:03] <Knight> lol.. that sounded funny in my head..
[16:49:05] <Knight> duh...
[17:15:48] <wjp> going home; bbl
[17:15:50] <-- wjp has left IRC ("bbl")
[17:35:14] --> wjp has joined #pentagram
[17:35:15] --- ChanServ gives channel operator status to wjp
[17:43:55] <Colourless> wb
[17:46:51] <wjp> thanks
[18:01:45] <wjp> bbl again :-) (dinner)
[18:01:53] <Colourless> k
[18:23:37] <wjp> so... last chance to object to the creation of a 'games' directory :-)
[18:23:47] <-- Knight has left IRC (" I love my HydraIRC -> http://www.hydrairc.com <-")
[18:24:03] <Colourless> maybe you should wait for darke's input? *evilgrin*
[18:24:21] * wjp waits for Darke's input (for 5 seconds)
[18:24:53] <Colourless> wow, all of 5 seconds. :-)
[18:27:50] <wjp> also... HIDManager? Does it manage anything other than keyboard events? :-)
[18:28:10] <Colourless> eventually it probably will
[18:28:30] <Colourless> you know, joystick/gamepad stuff
[18:28:49] <wjp> hm
[18:28:54] <wjp> crusader?
[18:29:00] <Colourless> yes
[18:29:16] <wjp> how did that use a joystick/gamepad?
[18:29:39] <Colourless> if you've ever tried playing with a mouse, you'll know why :-)
[18:29:48] <Colourless> it's controls are nothing like U8s
[18:29:56] <wjp> never played crusader...
[18:31:31] <Colourless> pretty much it would have worked like this. The D-Pad/Joystick is used to control what direction you move it. Buttons would be used to fire your weapon and all the various other things you could do
[18:32:08] <wjp> did it have 8 directions?
[18:33:24] <Colourless> says here up moves forwards, back steps back. left and right turn
[18:33:50] <Colourless> however if you were playing with the numpad, you could move in any of the 8 directions just by pressing the key
[18:34:17] <wjp> how did aiming work?
[18:34:56] <Colourless> sort of autoaimish
[18:36:39] <Colourless> Targeting: Whever the Silencer has a weapon readied, a red crosshair will appear a short distance infront of him. When he's lined up with an enemy or targetable object, a targeing reticle will appear and zero in on that object
[18:40:36] * watt awakens.
[18:40:52] <wjp> so... this class would be handling keys and gamepad/joystick buttons
[18:41:14] <Colourless> and perhaps mouse button functions too.
[18:41:19] <watt> eventually...
[18:41:31] <watt> that's all what I was thinking
[18:42:51] <Colourless> with crusader and mouse moving, how it worked was mouse left and right would rotate you around. As things currently are we don't support that :-)
[18:43:09] <Colourless> pressing a mouse button would move you forward
[18:43:24] <watt> .. crazy..
[18:43:27] <wjp> oh yuck :-)
[18:43:35] <wjp> I can see how a joystick would be better :-)
[18:44:17] <Colourless> with mouse though you did have finer aiming control
[18:44:36] <wjp> could you aim with the mouse cursor?
[18:44:43] <wjp> (did it have a mouse cursor?)
[18:44:51] <Colourless> no mouse cursor
[18:45:05] <watt> fps .. ha
[18:45:27] <Colourless> you could just aim the red crosshair more towards a specific enemy
[18:46:04] <wjp> how?
[18:46:18] <Colourless> actually, thinking about it that might not be true
[18:46:33] <Colourless> i can't remember how fast the crosshair rotates around when you press the left or right keys
[18:47:24] <Colourless> The controls are really sort of like a FPS, except you have a fixed third person viewpoint
[18:48:01] * wjp hmms
[18:48:16] <wjp> what about items?
[18:48:25] <wjp> picking up stuff?
[18:48:41] <Colourless> ok, when you wanted to interact with an item you would press a 'search button' which would highlight an item
[18:48:54] <Colourless> pressing the button again would highligh a different item
[18:49:08] <Colourless> you then had a use key which would use the selected item
[18:49:21] <Colourless> the items it selects are things you are close to
[18:49:32] <wjp> and that would pick up items you could pick up and use others?
[18:49:50] <Colourless> yes
[18:50:12] <Colourless> when using containers you will take everything in them that you could pick up
[18:52:26] <wjp> which would mostly (only?) be weapons and ammo?
[18:53:01] <Colourless> medikits, energy cells and various other misc items
[18:53:36] <Colourless> s/cells/cubes/
[19:37:17] --> Fingolfin has joined #pentagram
[19:37:17] --- ChanServ gives channel operator status to Fingolfin
[19:50:19] <wjp> hi Fingolfin
[19:56:18] --> Dominus has joined #pentagram
[19:56:20] --- ChanServ gives channel operator status to Dominus
[19:56:49] <Dominus> hi
[19:56:51] <wjp> hi
[19:56:57] <Colourless> hi
[19:57:59] <Dominus> you were talking about the interface of Crusader.... I cannot say I was satisfied with either mouse/and/orkeyboard/and/or/joystick
[20:08:01] <Dominus> most of the time I cannot move precisely
[20:09:14] <Dominus> something I definitely want to change with custom keybindings
[20:28:31] <-- Colourless has left IRC ("casts invisibility")
[20:33:45] <-- Dominus has left IRC ("a pooka invited me to Charlie's")
[21:05:45] <-- Fingolfin has left IRC ("42")
[23:22:09] <-- wjp has left IRC ("Zzzz...")