[04:11:12] --> sbx has joined #pentagram
[04:12:20] --- sbx is now known as SB-X
[05:00:05] --> servus has joined #pentagram
[08:16:30] --> Darke has joined #pentagram
[08:17:36] * Darke disco's! "One! Two! One two three four! Macho, macho bun..." *ahem* Sorry.
[08:17:50] <servus> macho bun?
[08:18:05] <Darke> Bunny. Don't ask. *grin*
[08:18:52] * Darke apologises to all and sundry for daring to Disco. He didn't want to be a disco dancer... *must...resist...temptation...* all he ever really wanted to be was a lumberjack!
[08:20:15] <-- Ember has left IRC (Read error: 110 (Connection timed out))
[08:22:27] <servus> you can dance, i see what bun- is short for now, even though you get *quite* upset when i call you a bunny :-)
[08:22:48] <servus> you can go ahead and "must...reach...bunnybelt...!" anytime you want :-p
[09:08:01] <servus> What about Bunnarella?
[09:21:47] <Darke> Bunnarella?
[09:23:23] <servus> Maybe not? :)
[09:33:55] <servus> Sorry, General Woundwort *ducks* :-)
[09:50:35] * Darke snickers.
[09:52:41] * Darke is a little unresponsive atm. Head in code, trying to detangle flex problems. *grin*
[09:59:16] <servus> I am obsessing over armpits.
[09:59:29] <servus> (3dmax)... Got to make it just right! :)
[10:02:39] <-- SB-X has left IRC ("yawn")
[10:03:02] <Darke> Heh.
[10:04:26] <servus> there! good enough
[10:08:06] --> CashZzz has joined #pentagram
[10:08:11] --- CashZzz is now known as Cashman
[10:09:35] <servus> Shake it, baby? *cringe*
[10:18:57] <servus> an "underworld" face? smooth and shiny with no detail, then? :-)
[11:42:40] <-- Cashman has left IRC ()
[12:30:25] <Darke> Wow. Despite the fact there's a AC_PROG_AWK, there's not equlivant AC_PROG_SED. This seems vaguely weird. *grin*
[12:44:13] --> Cashman has joined #pentagram
[12:46:15] <Cashman> disco disco seven eight nine ten!
[12:46:20] * Cashman does the funky movies!!
[12:50:24] <Cashman> l8er Darke!
[12:50:34] * Cashman Disco's away into sleep
[12:50:41] --- Cashman is now known as CashDiscoZzz
[12:50:52] <CashDiscoZzz> :)
[12:51:08] <CashDiscoZzz> nite!
[12:51:12] <-- CashDiscoZzz has left IRC ()
[12:53:14] --- Darke is now known as DarkeZzz
[12:53:17] <DarkeZzz> ?date
[12:53:17] <exultbot> It is now Wed May 28 12:53:17 2003 (GMT).
[13:54:12] --> Colourless has joined #Pentagram
[13:54:13] --- ChanServ gives channel operator status to Colourless
[14:01:20] <Colourless> hi
[15:08:22] <-- Kirben has left IRC (Read error: 104 (Connection reset by peer))
[15:32:35] --> wjp has joined #pentagram
[15:32:35] --- ChanServ gives channel operator status to wjp
[15:42:24] <wjp> hm, a configure check for sed? configure itself uses sed extensively
[15:44:38] <Colourless> crazy idea. Eventually we are going to want some sort of installer. Well, i had a crazy idea. We should create an installer using pentagram itself. The installer would then be able to be used on any platform that is supported by pentagram :-)
[15:45:25] <Colourless> the data files (compressed as a zip) would be embedded into the installer (easy on windows, just use a program resource, or they could be converted into a header *shudder*)
[15:46:08] <Colourless> here i've been playing around with mounting files in memory to the virtual file system :-)
[15:47:36] <Colourless> example sillyness:
[15:47:37] <Colourless> HRSRC res = FindResource(NULL, MAKEINTRESOURCE(IDR_FIXED_FONT_TGA), RT_RCDATA);
[15:47:37] <Colourless> filesystem->MountFileInMemory("@data/fixedfont.tga", static_cast<uint8*>(LockResource(LoadResource(NULL, res))), SizeofResource(NULL, res));
[15:47:57] <Colourless> that does what you'd expect :-)
[15:55:20] --> Dark-Star has joined #pentagram
[15:55:30] <wjp> I wonder if there's any "standard" way on unix/linux to link resources into a binary
[15:58:40] <wjp> you know, we could use this to remove the entire need for installation
[16:00:08] <Colourless> um, how? there are certain data files that are required by pentagram and an installer is pretty much expected for windows users
[16:00:23] <wjp> required data files could be included as resources :-)
[16:00:37] <Colourless> yes, that is true :-)
[16:00:47] <Colourless> and it's what i was playing with, as you can see :-)
[16:02:07] <Colourless> conf needed a few modifications as it expects a ifstream, which obviously as you'd expect doesn't work with memory pointer :-)
[16:03:27] <Dark-Star> there's a quite simple way to get an ifstream from a memory address, you only need a custom streambuffer...
[16:03:35] <Colourless> i made a few modifications so for a file in memory it would use a strstream
[16:04:09] <wjp> conf basically just needs a string
[16:04:32] <Colourless> yes, without line feeds
[16:04:39] <Colourless> if i'm not mistaken
[16:04:46] <wjp> you'd have to ask Darke :-)
[16:04:59] <Colourless> openraw() i do not like :-)
[16:05:11] <Colourless> s/openraw/rawopen/
[16:06:11] <wjp> I think only conf uses it
[16:06:26] <Colourless> yes, it appears so :-)
[16:07:00] <wjp> (and it's hardly a fundamental part of conf, luckily :-) )
[16:07:27] <Colourless> the only reason the streams are even used there is to use getline
[16:08:02] <wjp> yeah
[16:08:07] <wjp> convenience :-)
[16:10:17] <Dark-Star> if interested, look at http://dark-star.homeftp.org/memory_streambuf.h ... it might have one or two 'off-by-one' bugs though, but it works :-)
[16:14:21] <Colourless> getline really does nothing special at all
[16:14:42] <Colourless> like, absolutely nothing special :-)
[16:15:23] <Colourless> does this
[16:15:31] <Colourless> for every character in the stream
[16:15:35] <Colourless> if it's eof, stop
[16:15:39] <Colourless> if it's
[16:15:44] <Colourless> '\n' stop
[16:15:52] <Colourless> if there isn't enough space, stop
[16:16:00] <Colourless> else add character to stream
[16:16:33] <Colourless> i think that a get line should be added to IDataSource :-)
[16:18:38] <wjp> yes :-)
[16:18:47] * Colourless adds one
[16:18:55] <Colourless> which wont die on MSDOS line ends :-)
[16:43:51] <Colourless> well, everything seems to be fine with rawopen made private :-)
[17:24:43] <wjp> yay :-)
[17:25:31] <wjp> oh, I finished F2 yesterday, btw. (at level 29)
[17:25:41] <Colourless> :-)
[17:27:52] <wjp> bbl, dinner
[18:08:13] <wjp> back
[18:37:51] <Colourless> wjp, the gnu binary tool obj conv can convert arbitrary binary files into objects
[18:38:16] <Colourless> s/obj conv/objconv/
[18:39:32] <Colourless> not exactly the same as a resource, but in the end, serves the same function,
[18:39:53] <wjp> are you sure that's the name? google returns very few hits on it
[18:40:13] <Colourless> uh, i meant objcopy
[18:40:22] <Colourless> no idea where i got 'conv' from
[18:40:22] <wjp> ah, that I do have
[18:40:59] <Colourless> getting it to work correctly though, i hear can be a bit of a pain
[18:43:59] <Colourless> example:
[18:44:03] <Colourless> objcopy -O pe-i386 -B i386 -I binary fixedfont.cfg fixedfont.o
[18:44:22] <Colourless> (pe-i386 is the output format)
[18:44:49] <Colourless> which may not need to be specified
[18:45:31] <Colourless> actually it does. you need to specify the correct format for your target
[18:47:11] <Colourless> according to the docs, GNUTARGET should contain the correct target for the output
[18:47:44] <wjp> no, that's a way to set it
[18:51:06] <Colourless> does autoconf output that info?
[18:51:33] <wjp> the autoconf info page doesn't contain the words gnutarget or objcopy
[18:52:28] <wjp> it sounds very platform-dependant, somehow :-)
[18:53:24] <Colourless> the thing is, it shouldn't be. there should be a way to get gcc's architechture and object format
[19:10:14] <wjp> hm, "objcopy -O elf32-little -B i386 -I binary" produces an object file that apparently has an "unknown architecture"
[19:10:47] <Colourless> objcopy -O elf32-little -B i386 -I binary fixedfont.cfg fixedfont.o
[19:10:54] <Colourless> worked for me :-)
[19:11:09] <wjp> what does 'objdump -x fixedfont.o' say?
[19:11:23] <wjp> (and can you link it into something?)
[19:11:36] <Colourless> architecture: UNKNOWN!
[19:11:39] <Colourless> :-)
[19:11:42] <wjp> right :-)
[19:11:46] <wjp> gcc complains about that here
[19:12:51] <wjp> if I pass a different (bogus) -B option, objcopy fails, though
[19:13:33] <wjp> ah, -O elf32-i386 -B i386 does seem to work
[19:22:37] <wjp> ok, managed to actually get the data from inside a C program too :-)
[19:22:47] <Colourless> :-)
[19:23:38] <wjp> it creates symbols _binary_something_start, _binary_something_end, _binary_something_size
[19:23:47] <Colourless> yes
[19:23:48] <wjp> but I'm not sure what the cleanest way to get their values is
[19:23:55] <Colourless> something is the filename
[19:23:58] <wjp> yeah
[19:24:12] <wjp> I do an 'extern int _binary_something_start;' now
[19:24:22] <wjp> and then the pointer to the data is &_binary_something_start
[19:24:42] <wjp> the length is weirder...
[19:24:52] <wjp> int size = &_binary_something_size
[19:24:57] <wjp> (i.e., the address is the size)
[19:25:11] <Colourless> most strange :-)
[19:25:21] <wjp> it kind of makes sense
[19:25:35] <Colourless> but it it still strange :-)
[19:25:47] <wjp> that's why I was wondering if this was the right way to do it :-)
[19:28:10] <Colourless> actually, i think i know a way it would work , easily
[19:28:29] <Colourless> but then again, thinking about it, it may not work
[19:28:40] <Colourless> if you make the vars references in a C++ program
[19:28:59] <wjp> isn't that just the same as a pointer internally?
[19:29:38] <wjp> hm, but it does work, it seems
[19:29:55] <wjp> oops, except for that segfault
[19:30:10] <Colourless> crashed here too
[19:30:21] * Colourless thinks
[19:30:38] <Colourless> no, that wouldn't have worked
[19:30:48] <Colourless> a reference does * automatically, when we want &
[19:30:58] <wjp> yes
[19:31:06] <wjp> I don't think there's a way
[19:31:16] <wjp> (not using extern, anyway)
[19:31:22] <Colourless> most strange
[19:33:39] <wjp> objdump does indeed show the size is encoded as an absolute (non-relocatable) pointer
[19:33:47] <wjp> kind of a hack :-)
[19:37:00] <wjp> nice how you get an instant segfault if you try the access the variable itself instead of its address
[19:38:06] <Colourless> accessing _binary_*_start is like accessing a null pointer :-)
[19:38:12] <wjp> yes :-)
[19:38:31] <wjp> you could use the output from 'objdump -f pentagram.o' to get the format/arch
[19:39:01] <Colourless> yes
[19:41:46] <wjp> I wonder if anybody ever wrote an autoconf script to check for that
[20:14:50] <wjp> objdump -f test.o | sed -e '/file format/!d' -e 's/.*format \(.*\)/\1/'
[20:14:55] <wjp> isn't sed nice? *cough*
[20:15:13] <Colourless> uh
[20:15:47] <wjp> (that gets the file format, in theory)
[20:16:37] <wjp> of course it depends rather a lot on objdump's output format
[20:20:43] <Colourless> should be the same.
[20:25:51] <wjp> objdump -f test.o | sed -e '/architecture/!d' -e 's/.*architecture: \(.*\),.*/\1/'
[20:36:39] <wjp> anyway, doing this should definitely be possible on windows/linux/macosx
[20:45:11] <wjp> hm, come to think of it, I should clean up this whole 'WINDOWING_SYSTEM' mess in configure
[20:48:50] <Colourless> it's going to be 'really' nice to have code that absoutely is not compatible between any os :-)
[20:49:13] <wjp> it'll only take a very small wrapper, luckily :-)
[20:49:35] <Colourless> yeah
[20:52:05] <Colourless> i'm thinking, there would be a function that would be passed a filename, which then returns the pointer to the data and the size of the data.
[20:52:28] <wjp> that would be one big hack in Linux :-)
[20:52:43] <Colourless> the platform specific implementation of it might include a std::map<std::string, SomePlatformSpecificType>
[20:53:10] <wjp> yeah, something like that
[20:54:41] <Colourless> there would obviously need to be an initialization step, but that could be handled by the implementations
[20:55:13] --> Dominus has joined #pentagram
[20:56:16] <wjp> hi
[20:56:22] <Colourless> hi
[20:56:32] <Dominus> hi
[20:56:59] <Dominus> I started playing u9 again with the dialog patch
[21:06:25] <wjp> how's the speed? :-)
[21:06:58] <Dominus> very nice
[21:07:10] <wjp> and how's the dialogue?
[21:07:22] <Dominus> I like it
[21:07:31] <wjp> did they change a lot?
[21:07:35] <Dominus> not everything is changed
[21:08:15] <Dominus> but the main one is that it is shamino from the outset who does the introduction
[21:22:19] <wjp> instead of the time lord?
[21:22:32] <Dominus> yeah
[21:34:11] <Colourless> got to g
[21:34:13] <Colourless> o
[21:34:17] <-- Colourless has left IRC ("casts invisibility")
[21:42:56] <-- Dominus has left IRC ("enough for now")
[21:47:50] * DarkeZzz thought the 'standard' method of imbedding arbitary binary data files into an executable was writing a quick program that converted the binary into a .h or .c file which included the binary as a char *, all tokens escaped as '\???' codes, and a unsigned int of the length of it.
[21:48:28] <wjp> where's the fun in that? :-)
[21:48:47] <DarkeZzz> Or at least that's what I seen lots of these old rogue-like games do, since they were being exceedingly, painfully portable. *grin*
[21:49:43] <DarkeZzz> Umm... it takes you about 10-15 minutes to code/debug/integrate into the system, rather then screwing around with a non-portable solution for every platform in existance? *grin*
[21:50:53] <wjp> well, we can always fallback on this :-)
[21:51:11] <wjp> (or even use *shock* actual non-embedded data files)
[21:52:28] * DarkeZzz gasps!
[23:30:28] --> Kirben has joined #pentagram
[23:30:28] --- ChanServ gives channel operator status to Kirben