IRC logs for #opendune on OFTC at 2011-07-05
            
01:19:30 *** fjb has quit IRC
03:04:13 *** glx has quit IRC
13:00:52 *** glx has joined #openDune
13:00:52 *** ChanServ sets mode: +o glx
13:01:14 <glx> hello
13:01:49 <TrueBrain> hello mister glx
13:03:27 <Xaroth|Work> o/
13:11:27 <TrueBrain> glx / SmatZ: do either of you know if it is possible in MSVC to force a parameter to go over the register instead of stack?
13:11:43 <glx> hmm
13:12:50 <TrueBrain> fastcall maybe ..
13:14:03 <TrueBrain> does the first 2 ... I only want the first :D
13:14:05 <TrueBrain> hihi
13:16:30 <glx> first 2 or smaller
13:17:00 <TrueBrain> faked it now by adding a second dummy parameter
13:17:01 <TrueBrain> lol
14:15:37 * glx doesn't see how to do Map_Load() and Map_Save()
14:16:41 <glx> saving is easy, but loading is another story
14:24:13 <TrueBrain> without looking: what is the issue with loading?
14:28:14 <glx> the format is UINT16 index, UINT32 Tile
14:28:40 <glx> only useful tiles are saved
14:30:10 <glx> on save it does for all tiles if not useful continue else save index and tile[index]
14:30:27 <glx> can be easily done with callbacks
14:30:46 <glx> but on load it's read index, check index, read tile[index]
14:35:09 <TrueBrain> so just loop over the chunk till it ends?
14:35:20 <TrueBrain> Units etc are stored in the same way
14:35:28 <TrueBrain> we could unify it, but the method is identical
14:35:44 <TrueBrain> well, for units etc we cheat
14:35:54 <TrueBrain> we read the whole sturct, then get the index .. but index is also the first 2 bytes
14:35:55 <glx> my problem is the index
14:36:17 <glx> it's a temp variable
14:36:39 <TrueBrain> for now I would just read it manually
14:36:43 <TrueBrain> and not worry about it too much :)
14:36:57 <glx> ok so I don't touch it then :)
14:37:23 <TrueBrain> btw, the register problem: it is a __thiscall, class member :D
14:37:38 <TrueBrain> sadly, you can't manually define it
14:38:18 <glx> thiscall is C++ only
14:38:43 <TrueBrain> yes
14:38:52 <TrueBrain> was hoping to capture it with a C function
14:38:54 <TrueBrain> but MSVC refuses
14:38:58 <TrueBrain> for no real reason, tbh
15:49:39 <TrueBrain> grom @ MSVC :(
15:49:47 <TrueBrain> mov self, ecx; printf(..)
15:49:55 <TrueBrain> and it manges to corrupt ecx because of the printf
15:49:56 <TrueBrain> go figure :P
15:50:02 <Xaroth|Work> o_O
15:50:58 <TrueBrain> and you can't cast a pointer to a member typedef (ClassMember::*name)
16:26:49 <TrueBrain> lol; MSVC IDE tells me this syntax is invalid, the compiler accepts it just fine :D
16:26:51 <TrueBrain> hihihih
17:20:38 <Xaroth|Work> glx: if i want to link something to an app, like, embedding python to a C app, I only need the .h file(s), the .lib(s) and the dll correct?
17:21:02 <glx> dll if you link dynamically
17:24:02 <Xaroth|Work> hrnf, 2.7 source thing has no libs
17:24:19 <glx> source never has libs :)
17:25:17 <Xaroth|Work> ooh i actually -do- have a python 2.6 install on this machine
17:25:20 <Xaroth|Work> that'll do!
18:08:01 <TrueBrain> hmm .. is there a 'cat' for windows?
18:08:32 <Xaroth|Work> more ?
18:09:07 <TrueBrain> type
18:09:12 <TrueBrain> to make it sensible etc
18:09:14 <Xaroth|Work> ah
18:09:17 <Xaroth|Work> good enough
18:36:31 <Xaroth|Work> glx: you happen to know how to make MSVC shut up about warning LNK4099
18:53:51 <glx> what is this warning ?
18:54:12 * glx doesn't know all the codes
18:54:54 <Xaroth|Work> 1>distorm_dbg.lib(decoder.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with 'distorm_dbg.lib(decoder.obj)' or at 'D:\Documents\Projects\bottuum\trunk\src\bottuum\Debug\vc90.pdb'; linking object as if no debug info
18:55:12 <Xaroth|Work> doing /ignore:4099 does nothign :/
18:56:10 <glx> you compiled the lib ?
18:58:21 <Xaroth|Work> nope
18:58:49 <Xaroth|Work> part of another lib, that lib, however, I am compiling
18:59:17 <Xaroth|Work> all i could find for it was a pragma to ignore it, which doesn't work, or a /ignore:4099... which also does not work
19:00:37 <glx> /ignore:4099 in linker options should work
19:01:32 <Xaroth|Work> doesn't do anything tho :P
19:01:39 * Xaroth|Work shrugs
19:01:44 <Xaroth|Work> I'll just mentally ignore it
19:02:41 <glx> pdb are important for debugging
19:02:50 <glx> contains symbols
19:03:29 <Xaroth|Work> yeh
19:11:10 <Tomaz> i dont think you can silence that one
19:11:16 <Tomaz> its not a compiler warnings
19:11:47 <Tomaz> that pragma and that /ignore there silences warning C4099, not LNK4099
19:13:31 <Tomaz> and the only way to stop that warning is to get the pdb or use a release version of the lib
19:15:50 *** Tomaz has quit IRC
19:18:25 *** Tomaz has joined #openDune
19:31:06 <Xaroth|Work> ok, now to get the hang of va_list ...
19:34:28 <Tomaz> need help with that?
19:34:49 <Xaroth|Work> trying to pass a variable amount of arguments to a python function
19:35:02 <Tomaz> oh python, no idea then
19:35:05 <Xaroth|Work> so it's like CallFunction(char* funcName, <stuff>)
19:35:08 <Tomaz> i know va_list in C
19:35:14 <Xaroth|Work> well i'm building the C part
19:35:18 <Xaroth|Work> python part is easy :P
19:35:18 <Tomaz> maybe python has the same?
19:35:25 <Tomaz> va_list is easy ;)
19:35:30 <Tomaz> vsnprintf
19:36:44 <TrueBrain> Xaroth|Work: g o o g l e . n l :D
19:36:50 <Xaroth|Work> TrueBrain: I K N O W
19:36:56 <TrueBrain> you missed a space :P
19:37:09 <Xaroth|Work> irssi probably merged those together.
19:37:17 <Xaroth|Work> and in that case I should have missed 2.
19:37:48 <TrueBrain> you fail in typing in wchar_t format, pff
19:37:49 <Tomaz> http://codepad.org/olsHwqSx
19:37:51 <Tomaz> roughly
19:37:54 <Tomaz> typing from memory
19:38:41 <TrueBrain> line 9 is not required for all libcs, sadly for some; so more safe to have it :D silly stuff :P
19:38:54 <Tomaz> i work in windows where it is needed
19:39:20 <Tomaz> so yes, id rather have it and be safe
19:39:26 <TrueBrain> of course Microsoft 'solved' it by introducing a _ version, which does work ... sometimes :P
19:39:34 <Tomaz> well
19:39:37 <Tomaz> no
19:39:42 <Tomaz> they only have the _ version
19:39:50 <Tomaz> which doesnt work
19:39:54 <TrueBrain> then they introduced the w version, which ... doesn't work under all conditions ..
19:40:00 <TrueBrain> I just love Microsoft :D
19:40:05 <Tomaz> and is highly not portable!
19:40:23 <TrueBrain> GNU at least did a better job .. they just fixed vsnprintf (and friends)
19:40:30 <Tomaz> yes
19:40:37 <TrueBrain> but then again ... Microsoft does have a point: what works on version N, might not work in version M, with M < N
19:40:43 <TrueBrain> at least Micorsoft is 'consistently bad'
19:40:44 <TrueBrain> :D
19:46:36 <Tomaz> its not that bad once you learn the parts they ignored to code
19:46:42 <Tomaz> youd just fix it yourself and be happy
19:47:11 <Tomaz> and I don't have much choice as long as DirectX is Windows only
19:52:30 <Xaroth|Work> now to figure out the trick when you don't know the types of the args.. hrnf
19:52:37 <Xaroth|Work> silly python
19:55:28 <Tomaz> don't know the types?
19:56:39 <glx> you're supposed to know
19:59:04 <TrueBrain> kinda essential, with lengths of arguments and shit :D
20:00:05 <Xaroth|Work> found a detour
20:03:27 <Xaroth|Work> testing will be ... 'fun' ...
20:07:27 <Xaroth|Work> http://pastebin.com/r6gh3ZNr
20:07:30 <Xaroth|Work> should be it
21:01:55 *** fjb has joined #openDune
23:39:37 *** fjb has quit IRC