#pentagram@irc.freenode.net logs for 17 Mar 2004 (GMT)

Archive Today Yesterday Tomorrow
Pentagram homepage


[04:06:37] <-- shinji-kun has left IRC (""Hai..." - Shinji-kun")
[08:52:13] --> Jett has joined #pentagram
[09:10:18] <-- Ember has left IRC (Read error: 110 (Connection timed out))
[11:36:28] --> Quester has joined #pentagram
[11:36:29] <-- Quester has left #pentagram ()
[13:15:39] --> Colourless has joined #Pentagram
[13:15:39] --- ChanServ gives channel operator status to Colourless
[13:16:02] <Colourless> hi
[13:24:34] <-- Kirben has left IRC ("System Meltdown")
[13:26:21] <wjp> hi
[15:02:32] --> shinji-kun has joined #pentagram
[17:34:40] <wjp> heh, someone on the SDL mailing list is suggestion appending binary data at the end of an .exe file (to store images without the need for a separate data file)
[17:35:02] <Colourless> :-)
[17:35:10] <wjp> maybe I should point him at the FindResource/LockResource/LoadResource functions we discussed last year? :-)
[17:35:20] <Colourless> :-)
[17:35:28] <Colourless> needs to know how to add a resource :-)
[17:35:45] <Colourless> oh wait, that's not difficult :-)
[17:35:58] <wjp> isn't that a matter of a simple .rc file?
[17:36:03] <Colourless> yeah
[17:37:06] <Colourless> jsut need lines like
[17:37:07] <Colourless> IDR_FIXED_FONT_CFG Rcdata "../../data/fixedfont.cfg"
[17:37:07] <Colourless> IDR_FIXED_FONT_TGA Rcdata "../../data/fixedfont.tga"
[17:37:39] <Colourless> where the IDR_ bits are #define'd numbers from resource.cfg to identify the resource
[17:37:58] <wjp> I'll let him figure it out :-)
[17:38:09] <wjp> just knowing the option exists should help
[17:38:47] <Colourless> as you can see from this line:
[17:38:47] <Colourless> HRSRC res = FindResource(NULL, MAKEINTRESOURCE(IDR_FIXED_FONT_TGA), RT_RCDATA);
[17:38:55] <Colourless> Rcdata is essential
[17:39:04] <wjp> that's the type, right?
[17:39:22] <Colourless> yeah
[17:39:27] <Colourless> RT_RCDATA Application-defined resource (raw data)
[17:39:40] <Colourless> though bitmaps can have RT_BITMAP Bitmap resource
[17:39:51] <Colourless> assuming it's a bmp :-)
[17:41:25] <wjp> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/resources/introductiontoresources.asp
[17:41:33] <wjp> that sounds useful
[17:41:57] <Colourless> it's what i used :-)
[17:43:06] <Colourless> though it barely mentions the Rcdata type :-)
[17:43:50] <wjp> RT_RCDATA Application-defined resource (raw data).
[17:45:44] <Colourless> you know, stdio is quite lacking as far as handling files in excess of 4 gb on a 32 bit platform
[17:48:11] <wjp> there might be an 'fseeko' function that can accept 64 bit off_t's
[17:49:53] <wjp> although off_t is 32 bit here
[17:51:58] <wjp> I do have an __off64_t, apparently
[17:52:36] <Colourless> for me fpos_t is a 64 bit type
[17:53:01] <Colourless> which is used by fsetpos and fgetpos
[17:53:06] <wjp> yeah
[17:53:25] <wjp> fpos_t is 12 bytes here
[17:53:36] * wjp looks up the struct def
[17:54:57] <wjp> 32 bits
[17:55:07] <wjp> but there is a bunch of #define's that affect it
[17:55:36] <Colourless> system specific
[17:55:45] <Colourless> you are not meant to 'modify' it :-)
[17:56:21] <wjp> well, both the 32 bit and the 64 bit fpos structs are defined
[17:57:55] <Colourless> i have the following:
[17:58:00] <Colourless> #if defined (_POSIX_)
[17:58:00] <Colourless> typedef long fpos_t;
[17:58:00] <Colourless> #define _FPOSOFF(fp) ((long)(fp))
[17:58:00] <Colourless> #else /* _POSIX_ */
[17:58:12] <Colourless> #if !__STDC__ && _INTEGRAL_MAX_BITS >= 64
[17:58:12] <Colourless> typedef __int64 fpos_t;
[17:58:12] <Colourless> #define _FPOSOFF(fp) ((long)(fp))
[17:58:12] <Colourless> #else
[17:58:16] <Colourless> typedef struct fpos_t {
[17:58:17] <Colourless> unsigned int lopart;
[17:58:17] <Colourless> int hipart;
[17:58:17] <Colourless> } fpos_t;
[17:58:19] <Colourless> #define _FPOSOFF(fp) ((long)(fp).lopart)
[17:58:21] <Colourless> #endif
[17:58:23] <Colourless> #endif /* _POSIX_ */
[17:58:51] <wjp> apparently I have to #define _FILE_OFFSET_BITS=N Select default filesystem interface.
[17:59:06] <wjp> (setting that to 64 makes fpos_t 64 bits)
[18:00:05] * wjp makes 8Gb file
[18:06:27] <wjp> hm, not much luck so far
[18:06:34] * wjp might look at it some more after dinner
[18:37:40] <wjp> back
[18:37:54] <Colourless> wb :-)
[19:55:28] <-- Colourless has left IRC ("casts invisibility")
[21:25:54] --> Kirben has joined #pentagram
[21:25:54] --- ChanServ gives channel operator status to Kirben
[23:30:48] --> Fingolfin has joined #pentagram
[23:30:48] --- ChanServ gives channel operator status to Fingolfin