#nuvie@irc.freenode.net logs for 15 May 2004 (GMT)

Archive Today Yesterday Tomorrow
Nuvie homepage

[00:30:29] <-- sbx has left IRC (Read error: 60 (Operation timed out))
[01:08:02] --> Kirben has joined #nuvie
[05:00:26] --> Yuv422 has joined #nuvie
[08:46:58] <wjp> hi
[08:54:33] <-- Yuv422 has left IRC (Read error: 60 (Operation timed out))
[10:28:03] --> sbx has joined #nuvie
[11:49:15] --> Yuv422 has joined #nuvie
[11:49:17] <Yuv422> hi
[11:50:48] <sbx> helo
[11:50:50] <sbx> hello
[11:53:31] <Yuv422> I've just added a little GUI_Color class
[11:53:47] <Yuv422> I got sick of passing r,g,b arguments
[11:54:01] <sbx> hmm?
[11:54:04] <sbx> what do you pass now?
[11:54:11] <Yuv422> GUI_Color
[11:55:28] <sbx> how do you construct it?
[11:56:31] <Yuv422> GUI_Color(uint8 red, uint8 green, uint8 blue) { r=red; g=green; b=blue; };
[11:56:31] <Yuv422> GUI_Color() {};
[11:56:31] <Yuv422> void map_color(SDL_Surface *surface) { sdl_color = SDL_MapRGB(surface->format, r, g, b); };
[11:57:39] <sbx> ok :) what kinds of widgets can use it?
[11:58:00] <Yuv422> at the moment only my SaveSlot widget
[11:58:22] <Yuv422> it's basically just a struct for holding the colour data
[12:02:40] <Yuv422> are you any good at picking colors?
[12:03:01] <Yuv422> I need to pick some background colors for the savedialof
[12:03:03] <Yuv422> dialog
[12:05:08] <sbx> probably not
[12:05:28] <sbx> i would just try to use colors from the game
[12:06:04] <sbx> maybe from the character creation/intro screens, to match
[12:55:37] <Yuv422> can you find out if an object is a member of a class at runtime?
[12:56:47] <sbx> I don't know how
[12:56:51] <sbx> wjp?
[13:01:27] <wjp> a member of a class?
[13:01:33] <wjp> you mean an instance of a class?
[13:01:39] <Yuv422> yes
[13:01:44] <wjp> dynamic_cast is one way
[13:02:13] <Yuv422> do you have an example usage?
[13:02:37] <wjp> say you have a class Parent and a subclass Child, and a "Parent* x"
[13:02:55] <wjp> dynamic_cast<Child*>(x) will be zero is x is not a Child and non-zero if it is
[13:03:08] <wjp> Child* y = dynamic_cast<Child*>(x);
[13:03:18] <Yuv422> ah k
[13:03:43] <Yuv422> what is dynamic_cast?
[13:04:08] <wjp> part of the C++ standard
[13:04:12] <Yuv422> right
[13:04:40] <Yuv422> is it safe to use
[13:04:41] <Yuv422> ?
[13:04:48] <wjp> define 'safe' :-)
[13:04:56] <Yuv422> hehe
[13:05:00] <Yuv422> portable?
[13:05:03] <wjp> in exult and pentagram we aren't actually using it
[13:05:22] <wjp> I think because of some issues with embedded VC++
[13:05:32] <wjp> but you'd have to ask Colourless for the specifics
[13:05:43] <Yuv422> righto
[13:06:09] <wjp> other options include having a member variable that identifies the class somehow
[13:06:24] <wjp> or a virtual function
[13:06:32] <Yuv422> yes
[13:09:59] <Yuv422> do you know if there is much overhead on dynamic_cast?
[13:12:03] <wjp> it's probably not really fast
[13:12:28] <Yuv422> yeah you'd think so
[13:14:22] <Yuv422> dynamic_cast worked nicely thanks wjp
[13:14:48] <Yuv422> if(dynamic_cast<SaveSlot*>(caller))
[13:14:48] <Yuv422> {
[13:14:48] <Yuv422> if(msg == SAVESLOT_CB_SELECTED)
[13:14:49] <Yuv422> {
[13:19:08] <sbx> do you check on every message?
[13:19:24] <Yuv422> yes :(
[13:19:40] <Yuv422> but there aren't many messages to the save dialog
[13:19:50] <sbx> ok
[13:19:53] <sbx> hopefully you don't have to for something like a scrollbar
[13:20:11] <Yuv422> want to see a screenshot?
[13:20:18] <sbx> yeah
[13:22:22] <Yuv422> http://nuvie.sourceforge.net/temp/save_manager.png
[13:22:46] <Yuv422> I have a feeling you won't be happy about the max characters
[13:23:07] <Yuv422> at the moment it is about 33 characters wide.
[13:24:06] <sbx> but it's starting to look good!
[13:24:12] <-- Kirben has left IRC ("System Meltdown")
[13:24:18] <sbx> i think thats more characters than fallout
[13:24:31] <sbx> i still don't know what the colors should be
[13:24:58] <sbx> what are the letters and numbers
[13:26:44] <Yuv422> it's hard to pick colors based on the background scroll color. :(
[13:27:20] <Yuv422> I just made up the text on the bottom
[13:27:25] <Yuv422> GT game time
[13:27:29] <Yuv422> RT real time
[13:27:35] <Yuv422> P party members
[13:27:46] <Yuv422> not too sure what we should have there
[13:28:03] <Yuv422> maybe we could have three slots per page
[13:28:13] <Yuv422> and have twice the info per slot?
[13:28:18] <sbx> page?
[13:28:19] <sbx> oh
[13:29:01] <sbx> hmm, if it is that tall maybe you can put a little thumbnail picture on the side? :)
[13:29:10] <sbx> but I won't push it
[13:29:40] <Yuv422> hmm a 40x40 thumbnail would be quite small
[13:29:45] <Yuv422> let me try it
[13:29:48] <sbx> those aren't a very big deal to me anyway
[13:29:51] <sbx> OK
[13:30:01] <sbx> for colors what about blue on black
[13:30:11] <sbx> and fiery orange/red on gray slate
[13:30:16] <sbx> like the start menu
[13:30:29] <sbx> just looked at it again
[13:31:24] <Yuv422> what about MD and SE?
[13:31:36] * sbx still likes the idea of blue and red buttons/scrollbar to match the inventory and command buttons.
[13:31:37] <Yuv422> should we theme the gui for each game?
[13:31:39] <sbx> well
[13:31:40] <sbx> yes
[13:31:56] <sbx> if not, then ignore my suggestions they are U6 specific
[13:32:14] <Yuv422> no that sounds like a good idea
[13:32:35] <sbx> okay you don't have to theme them right away, MD and SE are less supported at this stage
[13:32:53] * Yuv422 tries scaling the mapwindow
[13:35:53] <Yuv422> how about 8x8 tiles
[13:36:00] <Yuv422> scaled to 40x40
[13:37:29] <sbx> it doesnt sound all that small but I don't really know how it looks
[13:37:58] <sbx> 64x64 would be huge
[13:42:08] <Yuv422> I'll make a mock up.
[13:42:08] <Yuv422> give me a sec and I'll have a mock up ready. :-)
[13:55:47] <Yuv422> http://nuvie.sourceforge.net/temp/save_manager_thumbs.png
[14:01:17] <sbx> heh, yeah those screens are visible
[14:02:05] <Yuv422> do you think we should go with that idea?
[14:02:18] <sbx> i'm not sure
[14:02:22] <sbx> do you find those previews helpful?
[14:02:24] <Yuv422> I'll have to find a way of getting the screenshot out of mapwindow
[14:03:04] <Yuv422> It's hard to say as I took the screencaps and know what the full picture looks like
[14:03:16] <sbx> i mean in other games
[14:03:27] <Yuv422> I guess it would be good as a general memory aid
[14:03:43] <Yuv422> other games?
[14:03:52] <sbx> that use screenshots previews of savegames
[14:04:35] <sbx> I'm sure people find them useful but I can't say if I do. Don't do it if there is much work involved, you can save it for later
[14:04:48] <sbx> .
[14:05:55] <Yuv422> I usually just use a descriptive name
[14:06:20] <Yuv422> but I think the icon looks good
[14:06:29] <Yuv422> I'll have a crack at it
[14:06:54] <Yuv422> if it is too hard I'll leave it out.
[14:07:19] <Yuv422> I've just got to find a nice way to extract a screenshot from mapwindow
[14:09:16] <sbx> either mapwindow needs to be able to draw to a surface, or add a copy-to-surface method to screen
[14:11:01] <sbx> and if you go for the latter, why not add a convenient make-screenshot too? :)
[14:11:24] <Yuv422> yeah
[14:11:54] <Yuv422> problem is that mapwindow might be under widgets when we need its data.
[14:15:39] <Yuv422> maybe we could have a method that draws to another surface
[14:15:56] <Yuv422> so we could make a copy of the mapwindow at any time
[14:16:19] <Yuv422> we'll need an image scaler too
[14:16:41] <Yuv422> do you know any nice scaling algorithms?
[14:17:08] <Yuv422> I think it is 1:0.3
[14:18:17] <sbx> drawing occurs in several places in MapWindow
[14:18:30] <Yuv422> yes
[14:18:42] <Yuv422> I'll reorganise it a bit
[14:18:54] <sbx> I don't know anything about scaledown algorithms
[14:19:07] <Yuv422> righto. neither do I.
[14:19:10] <sbx> my image program does the work for me
[14:19:19] <Yuv422> I'll have to do some research
[14:19:27] <Yuv422> I'm off to bed now
[14:19:32] <sbx> ok
[14:19:33] <sbx> cya
[14:19:35] <Yuv422> cya
[14:19:39] <-- Yuv422 has left IRC ("Killed by BlackJac (Requested by panasync)")
[14:19:42] <sbx> bbl
[14:19:44] --- sbx is now known as sbx|afk
[15:52:24] --- sbx|afk is now known as sbx