#pentagram@irc.freenode.net logs for 25 Jan 2004 (GMT)

Archive Today Yesterday Tomorrow
Pentagram homepage

[00:18:05] <-- static has left IRC ()
[00:23:48] <-- Knight has left IRC (" HydraIRC -> http://www.hydrairc.com <- :P")
[00:52:01] <wjp> well, vertical spacing is still badly broken and there's currently no clean way to load TTFonts, but other than that the new font system seem to be working
[00:52:42] <wjp> oh, and SimpleTextWidget currently always left-aligns to a fixed 180 pixels wide rectangle, which looks kind of bad when looking at items :-)
[00:53:33] <wjp> oh, and I'm completely disregarding any shading/AA when drawing borders
[00:53:38] <wjp> ...and...and...and... ;-)
[00:56:49] --> Kirben has joined #pentagram
[00:56:49] --- ChanServ gives channel operator status to Kirben
[00:56:57] <wjp> hi Kirben
[00:57:09] <Kirben> Hi
[01:36:08] <-- Kirben has left IRC ("System Meltdown")
[01:40:07] --> Kirben has joined #pentagram
[01:40:07] --- ChanServ gives channel operator status to Kirben
[01:58:51] --> ragzter has joined #pentagram
[08:15:30] --> Cashman has joined #pentagram
[08:15:33] <Cashman> Meep Meep
[08:15:38] <Cashman> sup?
[08:25:01] <-- Kirben has left IRC (Read error: 104 (Connection reset by peer))
[08:27:35] --> Kirben has joined #pentagram
[08:27:35] --- ChanServ gives channel operator status to Kirben
[08:49:34] <Cashman> Helllllooooo there arnt enough spoons in my house
[08:54:35] <-- Cashman has left IRC ()
[10:35:56] <-- Kirben has left IRC ("System Meltdown")
[10:44:27] --> Colourless has joined #Pentagram
[10:44:32] --- ChanServ gives channel operator status to Colourless
[10:45:18] <Colourless> hi
[11:05:40] <wjp> hi
[11:06:24] <wjp> saw the screenshot from the logs? :-)
[11:07:11] <Colourless> yeah i saw it. so, where is it? :-)
[11:07:46] <Colourless> i don't see no commit emails :-)
[11:08:00] * wjp wonders if the commit mails are broken *cough* ;-)
[11:10:11] <wjp> but seriously, it's not quite committable yet
[11:10:29] <Colourless> you tease
[11:13:38] <wjp> the two main things are vertical spacing/positioning and getting SimpleTextWidget to call things properly
[11:14:30] <wjp> IIRC, a ShapeRenderedText's "origin" is on the baseline of the top line of text
[11:16:12] <wjp> (and a TTFRenderedText currently has its origin at the top-left pixel)
[11:17:15] <wjp> ...and I need to figure out the right way to do vertical spacing with SDL_ttf
[11:17:21] <wjp> (and then actually do it, too :-) )
[11:17:42] <Colourless> :-)
[11:18:30] <wjp> brb, breakfast
[11:28:07] <wjp> oh, and before I forget, I also need to FileSystem-ize the TTF loading
[11:28:47] <wjp> and FontManager is still non-existant, but that can wait
[11:29:17] <Colourless> can you FileSystem-ize it?
[11:29:53] <wjp> yes
[11:30:18] <wjp> extern DECLSPEC TTF_Font * SDLCALL TTF_OpenFontRW(SDL_RWops *src, int freesrc, int ptsize);
[11:33:12] <Colourless> neat
[11:34:27] <wjp> now the question is if I want to properly wrap IDataSource into SDL_RWops, or just use a memory buffer
[11:34:53] <Colourless> the proper way would be to wrap IDataSource
[11:36:01] <wjp> yeah :-)
[11:37:01] <wjp> it does mean we'll need somewhere to put the fonts, since FileSystem can't just get files from anywhere
[11:37:17] * Colourless points at data dir
[11:37:21] <wjp> (currently I'm just using verdanab.ttf straight from my w2k dir :-) )
[11:37:28] <Colourless> :-)
[11:37:32] <wjp> well, yes, that would be the obvious place :-)
[11:37:50] <wjp> although I want to allow somewhere in ~/.pentagram too
[11:43:40] <wjp> ok, let's see: height = 17, ascent = 12, descent = -2, lineskip = 17
[11:43:51] <wjp> sounds like lineskip is the distance between two baselines, as expected
[11:47:49] <wjp> should I keep the 'convention' from ShapeFont to have the origin on the top basline?
[11:47:54] <wjp> s/basline/baseline/
[11:48:13] <wjp> (if we want to change that, now's the time :-) )
[11:48:40] <Colourless> well, it doesn't really matter, but knowing the baseline is useful
[11:55:03] <wjp> ok, I'll add a getHeight, getBaseline, getBaselineSkip to font; that should cover it
[11:56:32] <wjp> hm, how high is the baselineskip of a ShapeFont? :-)
[11:56:52] <Colourless> you need to 'work' it out :-)
[11:57:09] <Colourless> from the baseline to the top of the highest char is generally how it works :-)
[11:57:49] <wjp> hm, getHeight() - vlead ?
[11:58:08] <Colourless> yes
[11:58:26] <Colourless> err, make that just vlead :-)
[11:58:41] <wjp> hm?
[11:59:04] <wjp> isn't vlead something like 0 usually?
[11:59:12] <Colourless> shapes origin is top left. vlead pushes the origin down towards the bottom
[12:00:24] <Colourless> i think you should find most of the shapes infact have a vlead almost as large as the shapes height itself
[12:00:55] <wjp> hm, that's not how vlead was used in the old Font class
[12:01:56] --> Kirben has joined #pentagram
[12:01:56] --- ChanServ gives channel operator status to Kirben
[12:02:59] <Colourless> sint32 Font::getBaseline()
[12:02:59] <Colourless> {
[12:02:59] <Colourless> if (baseline == 0)
[12:02:59] <Colourless> {
[12:02:59] <Colourless> for (uint32 i = 0; i < frameCount(); i++)
[12:03:00] <Colourless> {
[12:03:02] <Colourless> int b = getFrame(i)->yoff;
[12:03:04] <Colourless>
[12:03:06] <Colourless> if (b > baseline) baseline = b;
[12:03:08] <Colourless> }
[12:03:10] <Colourless> }
[12:03:12] <Colourless> return baseline;
[12:03:14] <Colourless> }
[12:03:37] <wjp> hm, I'm starting to get the idea we're not talking about the same thing :-)
[12:03:39] <Colourless> you looking at?
[12:03:40] <Colourless> y = vlead + lines * (getHeight()-vlead);
[12:04:19] <wjp> actually at y += f->getHeight()-f->getVlead();, but that's close enough
[12:04:50] <Colourless> ok, i have to remember what exactly that was doing...
[12:05:23] <Colourless> first thing, it starts of at vlead pixels down (the baseline)
[12:07:09] <Colourless> then it adds the height of the text, minus the base line for each extra line down
[12:07:18] <Colourless> now, vlead afaik is not the base line :-)
[12:07:41] <Colourless> yes, it's not :-)
[12:08:13] <Colourless> vlead is the number of pixels to reduce the height by so text text formats better vertically
[12:10:08] <Colourless> having it as 1 (which it is set to) makes the top and bottom rows overlap when drawing. Since they are both just always going to be the black borders it is find
[12:10:14] <Colourless> s/find/fine/
[12:15:19] <wjp> ok, let's see if I make this work without losing a few rows of pixels somewhere
[12:15:22] <wjp> :-)
[12:15:25] <wjp> s/make/can make/
[12:34:50] <wjp> ok, this should fix the vertical spacing
[12:35:20] <wjp> gah, this old font is painful after getting used to Verdana :-)
[12:37:08] <Colourless> bah, the colours in your screenshot were all wrong :-)
[12:37:18] <wjp> I know :-)
[12:37:33] <wjp> there's a big "TODO: colours" around somewhere :-)
[12:38:29] <Colourless> but hey, black and white was looking good
[12:41:39] <Colourless> there are a number of different macros in Texture.h that would help with colourizing the text, but unless you know how to use them properly, (which you would be able to see, they are totally undocumented), then it's not so easy :-)
[12:42:10] <wjp> I haven't even implemented shaded white yet :-)
[12:42:58] <Colourless> if you leave things half implemented, i could finish them off :-)
[12:43:21] <wjp> I was hoping you'd offer that ;-) thanks
[12:44:37] <wjp> anyway, getting closer to something committable :-)
[12:44:44] <Colourless> :-)
[12:45:11] <Colourless> how were you thinking of handling choosing font colours?
[12:45:31] <wjp> I was thinking of having an xml file in which you could override specific font numbers
[12:45:50] <Colourless> yes, not a bad idea
[12:45:54] <wjp> each 'override' would consist of a .ttf file, pointsize, colour (and maybe some other stuff)
[12:46:52] <Colourless> somehow that would probably need to 'fit' into the (non existant) game structure
[12:47:06] <wjp> yes :-)
[12:47:39] <Colourless> anyone check the font encodings for Non english u8?
[12:47:48] * wjp pokes Darke
[12:48:04] <wjp> I didn't, anyway
[12:49:13] * wjp hexdumps fusecode.flx
[12:49:31] <wjp> e-acute is 0x82
[12:49:35] <Colourless> you know we can disassemble fusecode.flx :-)
[12:49:44] <wjp> hexdump is quicker :-)
[12:49:57] <wjp> and I get the hex for free in case it's some weird encoding
[12:50:11] <wjp> hm, could also take a look at the font instead of at the usecode
[12:50:50] <wjp> or maybe 0x82 is e-grave.. can never keep those two apart :-)
[12:50:57] <Colourless> it be using DOS encoding
[12:51:16] <Colourless> 0x82 is e acute in DOS
[12:52:23] <Colourless> of course for unicode that needs to be 0xE9
[12:52:49] <Colourless> s/0xE9/U+00E9/
[12:53:52] <wjp> unsurprisingly it doesn't currently work properly when selecting u8french
[12:56:02] <wjp> ok, main (visible) issue: when to use a fixed-width rendering rectangle
[12:56:41] <Colourless> what exactly do you mean, 'when to use?'
[12:57:05] <wjp> currently it renders everything into a rectangle of 180 pixels wide
[12:57:19] <wjp> including things like item descriptions
[12:57:36] <Colourless> the 180 pixel limit was intended for bark gumps
[12:57:40] <wjp> yes
[12:57:51] <wjp> well
[12:57:55] <wjp> some of them
[12:58:14] <Colourless> the idea is they are supposed to be about 180 pixels wide and about 5 lines high IIRC
[12:58:39] <wjp> the alignment is totally wrong currently for simple item descriptions
[12:58:53] <wjp> e.g., it displays "man" about 180 pixels left of Devon
[12:59:30] <wjp> maybe I should crop the width to the actual text width when only one line is used
[12:59:39] <Colourless> yes
[13:00:11] <Colourless> you'll notice that the old Font::getTextSize() was used
[13:00:46] <wjp> I still have getTextSize
[13:00:47] <Colourless> and it measured the text size (surprise surprise) but would only allow a max width of 160, and would go over multiple lines
[13:01:02] <wjp> both it and renderText call a back-end function typesetText
[13:01:20] <wjp> typesetText returns a std::list<PositionedText>
[13:01:23] <Colourless> that was then used to position the bark gump text
[13:01:36] <wjp> PositionedText is a struct containing an offset and a string
[13:03:29] <Colourless> i hope your formatted text stuff is flexible enough so 'book' formatting can be added in
[13:03:43] <wjp> I hope so too :-)
[13:03:47] <Colourless> i don't know the requirements for them yet
[13:04:13] <Colourless> afaik some sort of paragraph break and a page break
[13:04:56] <wjp> hm, that'll need some adjusting, but it should 'fit' in
[13:05:46] <wjp> paragraph break should just add some empty space while a page break should probably just return as if it reached the end of the target rectangle
[13:05:56] <Colourless> yes
[13:06:29] <Colourless> the exact amout of space i'll need to check on
[13:08:04] <wjp> luckily there's a scroll very near the start :-)
[13:08:19] <wjp> ok, that was the horizontal aligning
[13:08:22] <Colourless> scrolls may not have all the foramtting marks
[13:09:13] <wjp> one other thing to think about is the character used in front of conversation choices
[13:09:28] <wjp> it's the @
[13:09:32] <Colourless> yes
[13:09:43] <wjp> which looks just a bit weird
[13:10:37] <Colourless> in the 'windows' character set character 0x95 would be ok
[13:10:47] <Colourless> that is U+2022 :-)
[13:10:59] <Colourless> it's a rather large dot
[13:11:41] <Colourless> that would appear to be the unicode 'Bullet' character
[13:11:43] <wjp> technically it's a "BULLET"
[13:11:45] <wjp> yes :-)
[13:12:17] <wjp> I'm not currently using unicode yet, btw
[13:12:51] <Colourless> i didn't think so
[13:13:11] <wjp> but it wouldn't be that hard to switch to utf-8 encoding
[13:13:32] <wjp> mainly the 'skip spaces' and 'find end of word' functions need to be changed
[13:13:34] <Colourless> don't switch yet :-)
[13:13:48] <wjp> I wasn't planning to :-)
[13:14:00] <wjp> would need too much supporting infrastructure before we'd actually be able to use it again :-)
[13:14:33] * wjp carefully pokes CVS to see if it's up
[13:14:52] <Colourless> we would pretty much require that any uscode string pushing would autmatically translate from ASCII to UTF-8
[13:15:05] <wjp> yes
[13:15:17] <Colourless> it's 'almost
[13:15:24] <Colourless> ' easier to go to full unicode
[13:15:33] <Colourless> almost :-)
[13:15:39] <wjp> 'full'?
[13:15:47] <Colourless> that is wide chars
[13:16:03] <Colourless> a lookup table could be used for usecode
[13:16:08] <wjp> hm, I'd really prefer utf-8 encoding
[13:16:20] <wjp> no accidental 0 characters that way
[13:16:25] <Colourless> :-)
[13:16:41] <Colourless> and no having to worry about, did i remember to make that string constant wide
[13:17:36] <Colourless> of course with wide chars pentagram could support unicode filenames in windows :-)
[13:17:36] <wjp> ok, I think I might as well commit things now
[13:18:10] * wjp writes ChangeLog essay
[13:20:17] <wjp> btw, I didn't do the filesystem-izing yet, so currently it looks for verdanab.ttf in the current directory
[13:20:37] <wjp> I have no idea what happens if it can't find it, but expect it to explode spectacularly :-)
[13:21:52] <Colourless> i would have thought it would just explode unspectacularly
[13:22:15] <wjp> actually it might not explode at all
[13:22:26] <wjp> no, it will
[13:22:59] * Darke prefers Earth Shattering Kaboooms! himself.
[13:23:00] <Colourless> so are you going to bother assigning a bug report to yourself after you commit?
[13:23:28] <Colourless> Darke don't you know the Earh Shattering Kabooms never work
[13:23:41] <wjp> something like "bug: there's currently a rather large hack in place to load verdanab.ttf" ?
[13:24:46] <wjp> oh, right
[13:24:57] <wjp> syncmail needs updating
[13:25:25] <Darke> Colourless: Sure. But they would be fun if they did!
[13:33:40] <wjp> cvs is really really really slow currently
[13:36:16] <wjp> (don't update just yet, btw; still need to commit a few files :-) )
[13:38:25] <Colourless> yay for sourceforge :-)
[13:39:00] <wjp> ok, that should do it
[13:39:08] <wjp> you'll want to define USE_SDLTTF somewhere
[13:40:21] <Colourless> that would require that I have sdlttf
[13:40:33] <wjp> yes, you want that too ;-)
[13:41:00] <wjp> strangely, SDL_ttf isn't part of Fedora
[13:42:25] * wjp hopes he properly #ifdef-ed all the ttf code
[13:42:49] <wjp> I'll start wrapping IDataSource in an SDL_RWops after lunch
[13:42:59] <wjp> (bbl)
[13:45:03] <Colourless> my god cvs is slow
[13:45:24] <Colourless> i started updating 5 minutes ago and it still isn't done
[13:46:55] <Colourless> you hath forgotten something
[13:47:07] <Colourless> fonts dir maybe? :-)
[13:48:03] <Colourless> odd email says it's there, cvs didn't get it
[13:48:16] * Colourless tries again
[13:48:42] <wjp> forgot the -d flag?
[13:49:18] <Colourless> yeah :-)
[13:50:31] <wjp> s/hath/hast/, btw :-)
[13:50:47] <Colourless> ah yes
[13:51:50] --> shinji-kun has joined #pentagram
[13:54:37] <Colourless> d:\Pentagram\graphics\fonts\RenderedText.cpp(25): error C2888: 'bool RenderedText::IsOfType(const RunTimeClassType &)' : symbol cannot be defined within namespace 'Pentagram'
[13:54:55] <Colourless> you know, the class definition needs to be in the pentagram namespace too :-)
[13:55:14] <wjp> RenderedText shouldn't be in that namespace at all
[13:55:25] <Colourless> #include "RenderedText.h"
[13:55:25] <Colourless> namespace Pentagram {
[13:55:25] <Colourless> DEFINE_RUNTIME_CLASSTYPE_CODE_BASE_CLASS(RenderedText)
[13:55:25] <Colourless> RenderedText::RenderedText()
[13:55:43] <wjp> I wonder why on earth that worked here
[13:56:39] <wjp> just remove the namespace from RenderedText.cpp
[13:57:09] <Colourless> ooh, no errors now oddly enough
[13:57:12] <Colourless> :-)
[14:02:00] <wjp> awww... and after I tried so hard to introduce msvc-only errors :-)
[14:05:06] <Colourless> so in this case, whose compiler had the compliant behaviour?
[14:05:43] <Colourless> mine giving an error, or yours seemingly silently succeeding?
[14:06:04] <wjp> yes, I'm rather confused at that working
[14:38:19] <wjp> it looks like U2022 is in verdana.ttf
[14:38:53] <wjp> if it's too big, U00B7 is possible too
[14:38:55] <Colourless> well, i would think so :-)
[14:39:13] <Colourless> they should be the same character
[14:39:36] <wjp> U2022 is bigger than U00B7
[14:40:27] <wjp> but it's probably not too big; U2022 is slightly smaller than a lowercase o
[14:40:30] <Colourless> ah yes, differnt char
[14:40:43] <Colourless> B7 is called 'middle dot'
[14:40:51] <Colourless> here it looks more square than round :-)
[14:41:09] <wjp> yes, here too; too small to be round, I guess :-)
[14:42:05] <wjp> I wonder how you'd get that character without any unicode
[14:42:14] <wjp> (if at all possible)
[14:42:30] <Colourless> well you can get it using windows char mapping
[14:42:43] <Colourless> does SDLttf support char mapping ?
[14:43:22] <wjp> I don't see anything like it in the header
[14:44:08] <Colourless> 'try' using 0x95 as a char
[14:44:18] <Colourless> it should be the same as U2022 if it works
[14:45:40] * wjp gets a big open square
[14:45:46] <Colourless> :-)
[14:45:54] <Colourless> obviously it's just using unicode :-)
[14:45:57] <wjp> (which I think is used as 'invalid character')
[14:49:54] <wjp> yes, it maps the text straight to unicode
[14:50:10] <wjp> (looking at the SDL_ttf sources)
[14:52:08] <wjp> the SDL_ttf sources are about 1Mb. 600Kb of that is PBProjects.tar.gz. 300Kb in VisualC.zip. 200Kb in configure&co. 40Kb in actual sources :-)
[14:52:38] <wjp> (yes, I know it doesn't add up; blame it on compression :-) )
[14:53:13] <Colourless> that's crazy
[14:53:15] <wjp> ah... that PBProjects.tar.gz contains a binary libfreetype
[14:53:26] <Colourless> yeah it would have to
[14:53:34] <wjp> as does VisualC.zip
[14:53:44] <Colourless> dll or just lib?
[14:53:57] <wjp> lib
[14:55:10] <Colourless> not that it matters
[14:55:28] <wjp> :-)
[14:55:55] <wjp> hm, oh right, I was going to do that rwops stuff
[14:58:41] * Colourless is actually doing stuff on pentagram
[14:58:53] * Colourless is getting some sort of keyboard -> gump input working
[14:58:58] <wjp> ah, cool
[14:59:49] <Colourless> of course i may have to rethink the focus gump idea since it's kind of annoying to be tying something for a 'barkgump' to steal focus :-)
[14:59:58] <Colourless> s/tying/typing/
[15:00:01] <wjp> :-)
[15:00:19] <wjp> focus gump may not be necessary at all
[15:00:47] <wjp> I think being able to 'lock' the keyboard to a specific gump may be enough
[15:00:55] <Colourless> yeah
[15:01:16] <Colourless> a stack of gumps in guiapp might be enough
[15:01:29] * wjp nods
[15:02:39] <wjp> ok, that RWops stuff should be fairly easy
[15:03:00] <wjp> I guess it should go straight into FileSystem
[15:03:17] <wjp> hm, or into IDataSource
[15:07:30] <Colourless> just needs to be a set of function pointers
[15:07:36] <Colourless> and an init function
[15:07:39] * wjp nods
[15:33:08] <wjp> ok, that's working
[15:36:27] <wjp> and committed
[15:36:34] <wjp> it now expects verdanab.ttf in @data :-)
[15:37:03] <Colourless> oh no, you're... going to cause me no problems :-)
[15:37:13] <wjp> drat, foiled again :-)
[16:55:11] <wjp> well, building from outside of the source directory seems to be working now too
[16:55:39] <wjp> (so you can for example build both a debug and release version from the same source tree)
[16:55:40] --> Dominus has joined #pentagram
[16:55:42] --- ChanServ gives channel operator status to Dominus
[16:55:49] <wjp> hi
[16:55:50] <Colourless> wow :-)
[16:56:00] <Colourless> you know, i could already do that :-)
[16:56:07] <Colourless> hi Dominus
[16:56:09] <wjp> yeah, it isn't really impressive :-)
[16:56:13] <Dominus> hi
[16:56:34] <wjp> a couple of paths in the Makefile were just wrong, so it didn't work
[16:56:46] <wjp> never got around to fixing it
[16:57:12] <wjp> Dominus: http://www.math.leidenuniv.nl/~wpalenst/pentagramfont.png :-)
[16:57:23] <Dominus> yeah I saw the log
[16:57:28] <Dominus> looks great!
[17:01:04] <Dominus> I'll wait for Kirben to make adjustments to Pentagram's makefiles... :-)
[17:01:43] <wjp> I wasn't planning on enabling it by default anywhere
[17:02:08] <wjp> if you have SDL_ttf, it should be a trivial adjustment to Makefile.mingw, though
[17:02:25] <Dominus> I guess so
[17:02:36] <Dominus> first ned to grab sdl_ttf though
[17:02:42] <wjp> add an "-lSDL_tff" to SDL_LIBS, and a -DUSE_SDLDDF to CPPFLAGS
[17:02:45] <wjp> uh
[17:02:50] <wjp> -DUSE_SDLTTF
[17:03:26] * wjp kicks CVS
[17:07:45] * Dominus kicks it as well
[17:10:13] <wjp> whee, committing every single module.mk file :-)
[17:10:22] <wjp> this should produce quite a few commit-mails :-)
[17:14:31] <Dominus> tell me when your comit is done so I can retry getting the stuff :-)
[17:14:41] <wjp> well, it is
[17:15:03] <Dominus> :-)
[17:15:07] <wjp> although I got a python exception from syncmail at the end
[17:15:54] <wjp> it still sent an appropriate amount of junk, though :-)
[17:16:18] <-- Darke has left IRC (Read error: 60 (Operation timed out))
[17:17:33] <wjp> seems like Kirben squeezed in a commit too :-)
[17:35:59] <Dominus> now let's see
[17:38:23] --> Darke has joined #pentagram
[17:39:39] <-- Colourless has left IRC ("brb")
[17:42:43] --> Colourless has joined #Pentagram
[17:42:49] --- ChanServ gives channel operator status to Colourless
[17:44:18] * Dominus smacks himself. wjp did correct his <wjp> add an "-lSDL_tff" to SDL_LIBS, and a -DUSE_SDLDDF to CPPFLAGS and I still used this instead of <wjp> -DUSE_SDLTTF
[17:44:41] <wjp> :-)
[17:44:44] <wjp> have fun recompiling ;-)
[17:45:04] <Dominus> very stupid...
[17:45:54] <wjp> you need kernel/GUIApp.o, gumps/widgets/SimpleTextWidget.o, and graphics/fonts/TTF*.o
[17:56:39] <wjp> hm, anoncvs isn't slow at all
[18:02:49] * Dominus smacks himslef some more: "add an "-lSDL_tff" to SDL_LIBS" - can you se the obvious mistake?
[18:03:18] * wjp is impressed by the typo-count in that line :-)
[18:03:21] <Colourless> :-)
[18:03:35] <wjp> Dominus: that won't require a rebuild, luckily :-)
[18:03:42] <Dominus> :-)
[18:04:08] <Colourless> is there an easy way of comparing 2 string and finding out how many chars at the front are the same?
[18:05:03] <wjp> hm, I don't know any function that does that, I think
[18:05:18] <wjp> so it's probably easiest to just loop over the chars
[18:05:34] <Colourless> i 'think' that strspn does it
[18:05:58] <wjp> no, that disregards order
[18:06:04] <Colourless> does it>
[18:06:29] <wjp> you can use that to find the prefix consisting only of digits, for example
[18:06:38] <wjp> s/prefix/longest prefix/
[18:08:29] <Dominus> ok, got it working now :-)
[18:08:32] <Dominus> looks nice
[18:09:06] <Dominus> nice is the wrong word
[18:09:32] <wjp> 'acceptable'? :-)
[18:09:43] <Dominus> nope, really really useful!
[18:10:02] <wjp> ah, 'readable' :-)
[18:10:11] <wjp> (as opposed to, say, the original font :-) )
[18:11:33] <wjp> bbl, dinner
[18:30:12] --- Dominus is now known as Dominus|away
[18:37:11] <-- Kirben has left IRC (Read error: 104 (Connection reset by peer))
[18:45:12] <Colourless> this is so unbelievably slow
[18:45:56] <-- shinji-kun has left IRC (Remote closed the connection)
[18:47:48] --- Dominus|away is now known as Dominus
[18:55:00] <wjp> Colourless: slow? does that mean you're going to commit something? :-)
[18:56:44] <-- Dominus has left IRC ("a pooka invited me to Charlie's")
[18:57:52] <Colourless> i was considering it
[18:58:08] <Colourless> that is *was* considering it
[18:58:15] <Colourless> i have decided not too
[18:58:17] <Colourless> for 2 reasons
[18:58:36] <Colourless> 1) It is too damn slow
[18:59:01] <Colourless> 2) I think is probably a good idea to remove a hack that i put in
[19:03:39] <wjp> how much did you do on keyboard input?
[19:03:50] <Colourless> well, it works :-)
[19:04:08] <Colourless> SDL's unicode mode makes things easy :-)
[19:04:14] <Colourless> even handles modifiers for you :-)
[19:11:42] <wjp> yeah, it works quite well for text input
[19:30:19] <wjp> hm, let's see if I can get BarkGump to display 4-5 lines of text at a time
[19:31:42] <Colourless> :-)
[19:31:57] <wjp> that can't be that hard anymore now
[19:32:09] <Colourless> no it shouldn't
[19:32:27] <Colourless> every click should 'turn' to the next page
[19:32:32] <Colourless> until there are no more pages
[19:32:50] <Colourless> but it will also 'time' out too
[19:33:08] <wjp> yes, in the same way that it currently does the full text
[19:33:40] <Colourless> the little forumla that i've got there should be fine if for the 5 line timeout
[19:38:14] * wjp is mainly considering the "interaction" between SimpleTextWidget and BarkGump
[19:38:31] <wjp> SimpleTextWidget has to tell BarkGump that not all text fit, somehow
[19:39:42] <Colourless> actually that was the point of the 'special' text widgets :-)
[19:39:52] <wjp> yes, which we don't have :-)
[19:40:01] <wjp> I guess I could add one :-)
[19:40:23] <Colourless> // For word wrapping multipage text widgets (such as used by BarkGump) use
[19:40:24] <Colourless> // WrappingTextWidget
[19:40:43] <Colourless> of course use any name you actually want :-)
[19:43:30] <wjp> it isn't really necessary to have multiple widgets, though
[19:44:18] <wjp> just add width,height parameters and a scrollText method and SimpleTextWidget would support what's needed for BarkGump
[19:44:19] <Colourless> no probably not. One widget that's flexible enough should be ok
[19:44:49] <Colourless> though that wont be suitable for a facing page boox
[19:44:53] <Colourless> s/boox/book/
[19:45:19] <wjp> that's probably the only reaon then that it could still be called "Simple" :-)
[19:45:54] <wjp> the text widget for a book would have to report how much text didn't fit
[19:46:18] <Colourless> and that would be put into another widget
[19:46:34] <wjp> doesn't have to be, though... :-)
[19:46:46] <Colourless> well, no it doesn't
[19:47:16] <wjp> we would really have to rename it to TextWidget then :-)
[19:47:51] <Colourless> grr, cvs isn't even working at all for me now
[19:47:58] <Colourless> cvs.exe [update aborted]: end of file from server (consult above messages if any)
[19:48:57] <wjp> the interface would then be: Input: string, font, width, height, align. Methods: bool scrollText() to display any remaining text. int remainingText() to get the start index of any remaining text
[19:49:18] <Colourless> sounds fine to me
[19:52:50] <wjp> rename it to TextWidget?
[19:52:52] <Colourless> my pentagram dir is 829 MB, and i don't even have ultima 8 in that dir!
[19:52:57] <wjp> ?!
[19:52:58] <Colourless> yes
[19:53:14] <wjp> mine's "only" 160Mb
[19:53:34] <Colourless> you know, i don't really know why it's that big
[19:53:55] <wjp> my pentagram-related dirs get up to 940Mb
[19:53:57] <Colourless> the MSVC dir is 415 mb
[19:54:07] <wjp> but that's including the crusaders and various U8s
[19:54:22] <Colourless> that contains all of the object files
[19:55:08] <Colourless> looks like it's mostly just object files taking up all the space
[19:55:32] <Colourless> the other msvc dir with pentagram old is 171 mb
[19:58:46] <wjp> how many built copies does that include?
[19:58:53] <wjp> just one? or several?
[19:59:07] <Colourless> quite a few :-)
[19:59:38] * wjp pokes and prods cvs
[19:59:55] * wjp wanted to commit that rename before doing anything else on it
[20:00:08] <wjp> (to preserve at least some history)
[20:00:17] <Colourless> :-)
[20:00:41] <Colourless> :-)
[20:01:17] <Colourless> if you didn't rename it, you would have gotten rid of 50% of the uses of the new font interface
[20:01:47] <wjp> hm?
[20:02:07] <Colourless> you said Font painting was done in 2 places,
[20:02:12] <wjp> it is
[20:03:20] <Colourless> and if you didn't rename SimpleTextWidget, you would be getting rid of 1 of the 2 uses
[20:03:50] * wjp still doesn't get it
[20:03:57] <Colourless> nm :-)
[20:24:20] <wjp> yay, that's working :-)
[20:42:47] <wjp> speaking of working, CVS speed is fine again
[20:43:33] <wjp> committed TextWidget
[20:43:39] <wjp> savegames are broken again and all that
[20:44:02] <wjp> (if you had any BarkGumps open at the time)
[20:44:45] <Colourless> yes speed is good again
[20:44:59] * Colourless can now commit
[20:50:40] * wjp whistles innocently and commits ButtonWidget.cpp while nobody's looking
[20:51:06] <Colourless> you!
[20:51:15] <wjp> (in case you were wondering why things weren't compiling :-) )
[20:53:54] <wjp> hm, cvs mails are sent from a different email address since today
[20:54:08] <wjp> (totally irrelevant, but I just noticed :-) )
[20:54:21] <wjp> (username@projets.sourceforge.net)
[20:54:32] <Colourless> odd
[20:54:58] <Colourless> even i know they ususally come from users.sourceforge.net, the actual forwarding email address
[20:55:21] <wjp> I wonder if @projects.sf.net also 'works' as a forwarding email
[20:56:01] * wjp tries
[20:56:25] <Colourless> different ip address
[20:57:09] <wjp> same MX record
[21:01:03] <Colourless> ok committed my stuff. See changelog/commit message for detail. I broke savegames too
[21:01:38] <wjp> oooh, console commands :-)
[21:04:28] <Colourless> one is a hack, and i don't think it will take you long to figure out which one :-)
[21:04:35] <wjp> avatarname?
[21:04:43] <Colourless> :-)
[21:05:32] <wjp> (and that's even without actually updating)
[21:06:15] <Colourless> yeah well, it does have HACK written in big letters in the header file :-)
[21:06:36] <wjp> cvs is slowing down again :/
[21:07:06] <wjp> I wonder if it's slow from "normal" use, or from some form of maintenance
[21:07:19] <wjp> (like regenerating cvs stats, or something)
[21:11:20] <wjp> UCMachine.h needs to have istring declared
[21:12:07] <Colourless> it 'shouldn't'...
[21:12:34] <wjp> same for GUIApp.h
[21:12:43] <Colourless> i missed a dir when committing :-)
[21:12:51] <wjp> misc?
[21:12:52] <Colourless> (misc)
[21:13:04] <Colourless> done
[21:13:53] <wjp> that mail to @projects bounced
[21:14:12] <wjp> "Reason: Remote SMTP server has rejected address. Diagnostic code: smtp;550 Unrouteable address"
[21:18:30] <Colourless> you know, it's probably not a good thing to have a retun email address being invalid
[21:23:06] <wjp> no, not at all
[21:23:15] <wjp> gumps/ConsoleGump.cpp:135: `GUIApp' undeclared
[21:23:26] <Colourless> oh no
[21:23:41] * wjp includes GUIApp.h
[21:30:30] <wjp> I like the load/save commands
[21:30:40] <Colourless> i:-)
[21:30:45] <Colourless> s/i//
[21:33:48] <Colourless> a lot better than just having Quicksave
[21:34:07] <Colourless> but of course with how often that we break savegames, it's only 'so' useful
[21:34:32] <wjp> :-)
[21:41:58] <wjp> 51 commit mails today; not bad :-)
[21:42:10] <wjp> scummvm only had one today :-)
[21:43:08] <Colourless> :-)
[21:44:43] <wjp> let's see if this fixes the From address
[21:47:12] * Colourless waits for 'fixed' mail
[21:47:16] <wjp> better
[21:47:32] <Colourless> ooh
[21:47:37] <Colourless> it is worked around
[21:47:45] <wjp> except that I just introduced a typo in quotes.txt
[21:48:22] <Colourless> yes i noticed :-)
[21:48:39] <wjp> well, this is arguably not a workaround but actually correct
[21:49:01] <Colourless> oh come on, you are getting rid of all the authentic spelling errors of mine :-)
[21:49:26] <wjp> can't have you misspelling "pentagram" in the quotes :-)
[21:50:07] <Colourless> hey, it is just showing who i am
[21:50:14] <Colourless> penatagram or not :-)
[21:50:28] <wjp> feel free to put the typo's in the actual quotes back :-)
[21:51:16] * Colourless looks at time and decides to disappear
[21:51:17] <Colourless> cya
[21:51:50] <-- Colourless has left IRC ("casts invisibility")
[22:25:38] --> shinji-kun has joined #pentagram
[22:27:29] <-- shinji-kun has left IRC (Remote closed the connection)
[22:51:45] <wjp> heh, interesting... you can drag buttons around in an AskGump currently :-)
[22:57:45] --> shinji-kun has joined #pentagram