IRC logs for #opendune on OFTC at 2011-06-19
            
00:34:32 *** fjb has quit IRC
00:59:30 *** fjb has joined #openDune
01:05:15 *** glx has quit IRC
01:49:59 *** Tomaz has joined #openDune
07:52:50 *** Alberth has joined #openDune
07:52:50 *** ChanServ sets mode: +o Alberth
07:53:03 <Alberth> good morning
09:29:42 <Alberth> TrueBrain: http://paste.openttdcoop.org/show/296/ ?
09:34:17 <Alberth> in svn r1337
09:53:27 <DorpsGek> SVN: alberth (r1819) -Fix (r1815): Correct spelling error.
09:58:29 <DorpsGek> SVN: alberth (r1820) -Add: Use landscape type constants in first variable_3A3E index.
10:59:09 <Xaroth> isn't line 16/17 on that diff 2 identical lines?
11:10:15 <Alberth> nope, s/\t/ / :)
11:11:16 <Alberth> my gvim displays tabs, that's why I found it
11:28:38 <Xaroth> ah
11:28:55 <Xaroth> in the paste it's rendered as a \t
11:29:07 <Xaroth> hence my confusion
11:29:18 <Xaroth> in the raw as well o_O
11:39:19 <Alberth> 'g_global' and 'variable_XXXX' texts were carefully designed to allow for very good hiding of such mistakes
11:50:18 <Xaroth|Work> heh
11:56:21 <TrueBrain> Alberth: if you double checked it with the source, go for it
11:57:18 <DorpsGek> SVN: alberth (r1821) -Add: Rename Map_B4CD_08E7 to Map_SearchSpice.
11:58:44 <Alberth> I'd like confirmation that the offset is really correct
11:59:22 <TrueBrain> that for sure I didn't check :D Should have asked that explicitly :D Hihi :)
11:59:49 <TrueBrain> offset is 0x40 - 0xA
11:59:58 <TrueBrain> so .. that is ...0x35?
12:00:35 <TrueBrain> 0x36
12:00:38 <TrueBrain> si->creditStorage
12:00:54 <TrueBrain> guess the si-> felt off :D
12:01:11 *** glx has joined #openDune
12:01:11 *** ChanServ sets mode: +o glx
12:01:19 <TrueBrain> Alberth: the structureInfo start at 0xA. This has given us many many many MANY problems in the past. Its so fucking annoying :P
12:01:46 <glx> hello
12:07:31 <Alberth> hello glx
12:08:12 <glx> TrueBrain: so true :)
12:15:13 <DorpsGek> SVN: alberth (r1822) -Fix (r1337): Sum creditsStorage of the found structures, and fix a whitespace error.
12:15:52 <TrueBrain> nice find ;)
12:16:47 <glx> oups :)
12:16:52 <glx> was not me
12:17:32 <Alberth> variable_38BC brought me there :)
12:17:38 <glx> there should be mistakes in pathfinders too I think
12:18:58 <Alberth> yeah, units route very weirdly around obstacles.
12:19:13 <glx> when they move :)
12:19:22 <glx> sometimes they just don't want to move
12:19:38 <Alberth> indeed
12:20:07 <Alberth> just like clockwise checking fails or so
12:20:23 <glx> signed/unisgned maybe
12:22:08 <Alberth> Structure_0C3A_247A() (src/structure.c, line 1327) looks like a routine to place units around a structure
12:24:30 <glx> probable yes
12:24:38 <Alberth> in case of checkForSpice==1, and no spice nearby, the position is closest to 0, ie top-left
12:25:12 <Alberth> which is what happens with refineries after unloading spice :)
12:25:53 <Alberth> ie it defeats the random starting point
12:27:30 <glx> Script_Structure_Unknown0C5A seems related to heavy factory
12:31:35 <Alberth> perhaps more generic, MOVEMENT_WINGER seems hi-tech factory, and STRUCTURE_REPAIR is repair thingie
12:32:54 <glx> hmm type 04 03 0C and 0A at least
12:33:36 <glx> so something like units going out
12:34:01 * Alberth thinks that too
12:35:00 <glx> AFC seems refinery only
12:35:24 <Alberth> /* Find a spot next to the structure */ <-- someone already figured out what the function does at line 1017 :)
12:35:24 <Alberth> position = Structure_0C3A_247A(s, false);
12:35:38 <glx> lets find some info about scripts on the internet
12:40:23 <glx> http://minniatian.republika.pl/Dune2/Append.htm#Part2 <-- miss some info, like function index
12:49:47 <glx> http://xhp.xwis.net/cgi-bin/forum.cgi?a=26;mid=6143 <-- better
12:49:58 <Alberth> Script_Structure_Unknown0AFC pickup by a carry-all?
12:51:48 <glx> AFC is attach
12:55:27 <DorpsGek> SVN: alberth (r1823) -Add: Rename Structure_0C3A_247A to Structure_FindFreePosition.
14:37:07 <Alberth> is the map 64 wide?
14:43:47 <glx> there are 3 sizes IIRC
14:44:48 <glx> ./* 000C(2) */ PACK uint16 mapScale; /*!< BASIC/MapScale. 0 is 62x62, 1 is 32x32, 2 is 21x21. */
14:45:31 <glx> but at least 1 is not used in dune2
14:46:15 <Alberth> 64 with two void-like tiles seems a reasonable assumption for now :)
14:46:40 <glx> g_global->scenario.mapScale + 1 == 0 <-- dune2 is silly :)
14:46:58 <Alberth> or the compiler was :)
14:47:48 <Alberth> checking for FF is more difficult than 0
14:51:57 <Alberth> @calc 384 / 8.0
14:51:57 <DorpsGek> Alberth: 48
14:52:19 <Alberth> @calc 384 / 64.0
14:52:19 <DorpsGek> Alberth: 6
15:23:24 <DorpsGek> SVN: glx (r1824) -Fix: do the same as r1797 for gameSpeed, this removes 2 global variables
15:44:35 <DorpsGek> SVN: glx (r1825) -Fix: moved config and gameConfig outside g_global
15:49:03 <DorpsGek> SVN: alberth (r1826) -Add: Renamed three viewport message variables, and a local variable.
15:51:08 <glx> happens only when voices are disabled IIRC
15:51:18 * Alberth nods
15:52:43 <Alberth> if (g_global->config.voiceDrv == 0 || g_global->soundsEnabled == 0) { <-- to be precise :)
15:53:07 <glx> :)
15:53:52 <Alberth> time for cooking some food
17:00:43 <Xaroth|Work> glx: for what msvc version are the projects created, 2k7?
17:00:59 <glx> 2008
17:01:14 <Xaroth|Work> ah
17:01:24 <glx> there's no 2007 version :)
17:01:26 <Xaroth|Work> that explains why my new 2010 install wants to 'upgrade' the project
17:25:03 *** TigerP has left #openDune
17:52:54 <Xaroth|Work> o_O
18:07:36 <SmatZ> ^_^
18:14:20 <DorpsGek> SVN: alberth (r1827) -Codechange: Extract mapInfo from global data.
18:38:40 <Xaroth|Work> cs__AB01 has some strange functions
18:40:49 <Alberth> where to put constant tables such as const SoundData _voices[NUM_VOICES] (130+ lines) ?
18:42:13 <Xaroth|Work> er, constants.c/h/whatever?
18:42:18 * Xaroth|Work eyes TrueBrain/glx
18:43:15 <glx> Xaroth: nothing strange in AB01 :)
18:44:01 <Xaroth|Work> f__AB01_07AF_0045_BDCD pushes a lot of stuff... then calls 1 thing
18:44:42 <Alberth> wrapper function :)
18:45:32 <Alberth> Xaroth|Work: but we will have several such tables with different types of data
18:45:52 <Alberth> ie all constant data in g_global :)
18:45:53 <Xaroth|Work> hrnf, valid point
18:46:12 <Xaroth|Work> constants/stuff.c/h is also a bit odd
18:47:45 <Alberth> openttd uses tables/stuff.h which is also somewhat weird
18:48:19 <glx> Xaroth: http://www.thegleam.com/ke5fx/misc/AIL2.ZIP original source is there
18:48:42 <Alberth> :)
18:49:31 <Xaroth|Work> drivers :o
19:50:56 <TrueBrain> Alberth: tables/ :D:D :P
19:51:28 <Alberth> I feared as much :)
19:51:43 <TrueBrain> it is tbh the only sane thing to do
19:59:06 <Alberth> the only sane alternative is to have tables/sound.c , but that makes static table inclusion impossible.
20:13:55 <glx> we'll need tables for unitInfo and structureInfo
20:15:59 <glx> makes me think I should fix ReadProfileIni() so it really writes data :)
20:33:36 <TrueBrain> would solve hard-coded tables
20:34:57 <glx> but it reads/write only some variables
20:35:04 <TrueBrain> bah :P
20:40:25 <DorpsGek> SVN: alberth (r1828) -Codechange: Extract voices and musics tables from global data.
20:41:42 <Alberth> can someone try to compile? if that works, I can log off without having some needed data here locally
20:44:03 <TrueBrain> euh .. local changes .. one sec :D
20:44:15 <glx> I'm compiling
20:44:42 <Xaroth|Work> I think i'm compiling
20:44:50 <TrueBrain> it compiles; all I can test :D
20:44:58 <DorpsGek> SVN: glx (r1829) -Fix (r1828): MSVC project
20:45:03 <Xaroth|Work> ah bah, it moans about libemu :P
20:45:17 <glx> Alberth: like openttd :) don't forget project/generate
20:45:25 <Alberth> glx: oh, I forgot to run generate :(
20:45:27 <Xaroth|Work> need to go figure that out as well -_-
20:45:33 <glx> minor for a .h
20:45:50 <glx> but for .c compile fails
20:45:59 <TrueBrain> were we going to make globals like g_?
20:46:02 <Alberth> glx: the trouble is that with openttd I need to run it to make it work at my machine
20:46:05 <TrueBrain> as now _ is used?
20:46:11 <TrueBrain> (I forgot what we decided)
20:46:27 <glx> I used both IIRC
20:46:37 <Alberth> make a code-style wiki page :p
20:46:46 <TrueBrain> I think g_ is nicer, personally
20:46:56 <TrueBrain> Alberth: we have one, exactly
20:47:07 <Alberth> a code-style wiki page?
20:47:14 <TrueBrain> http://wiki.opendune.org/Development/Coding_Style
20:47:19 <Alberth> wow :)
20:47:25 <TrueBrain> its how we started
20:47:34 <TrueBrain> Start with _ for local static variables
20:47:42 <TrueBrain> so yeah, g_ for global, as _ is taken :D
20:48:26 <glx> ha yes that's why I used both :)
20:49:13 <glx> oh silly, different musics are the same
20:49:48 <Alberth> but with different indices, no idea what that means
20:49:48 <glx> _music_duneXX are correct ;)
20:50:37 <TrueBrain> http://devs.opendune.org/~truebrain/temp.patch
20:50:42 <TrueBrain> what do you guys think?
20:50:44 <glx> ha yes different variable_04
20:51:04 <TrueBrain> removes two hacks
20:52:24 <glx> nice
20:52:26 <Alberth> x.script.delay ?
20:52:42 <Alberth> ie why repeat 'script'
20:53:00 <TrueBrain> because I copy pasted it :D
20:53:13 <TrueBrain> but how about the principle of the patch?
20:53:15 <glx> he has a point :)
20:53:25 <glx> but yes makes sense
20:53:34 <Alberth> the idea is fine :)
20:53:47 <glx> as now we don't play with offsets
20:53:54 <DorpsGek> SVN: truebrain (r1830) -Fix: move scriptDelay into ScriptEngine to avoid ugly hacks
20:55:14 <Alberth> the wiki account is coupled to the ssh account?
20:55:32 <TrueBrain> nope
20:55:34 <TrueBrain> no OpenLDAP
20:56:31 <Alberth> hmm, too much work at this time :p
20:56:35 <Alberth> good night
21:00:43 *** Alberth has left #openDune
21:59:08 <Xaroth|Work> hrnf
21:59:19 <Xaroth|Work> no project file for libemu :P
21:59:22 <Xaroth|Work> this'll be fun!
21:59:30 <glx> there's one
21:59:39 <Xaroth|Work> I don't see it :o
22:00:03 <glx> projects\libemu.sln
22:00:56 <Xaroth|Work> i see no projects folder in the libemu repo
22:01:12 <glx> svn+ssh://glx@secure.opendune.org/var/repos/svn/opendune/extra/libemu
22:01:30 <Xaroth|Work> ah
22:01:36 <Xaroth|Work> i was using repos/svn/libemu/ :P
22:02:01 <glx> that's a very old version
22:02:38 <glx> oh and use only debug version
22:03:12 <Xaroth|Work> ah right, i forgot about this
22:03:14 <Xaroth|Work> sdl!
22:03:27 <glx> yes you'll need sdl too :)
22:03:40 <Xaroth|Work> I shouldn't have wiped my old pc -that-thorough...
22:04:01 <glx> http://www.libsdl.org/release/SDL-devel-1.2.14-VC8.zip should be enough
22:11:46 <Xaroth|Work> hah, worked.. i think
22:25:08 <Xaroth|Work> hm
22:25:12 <Xaroth|Work> error.log remains empty
22:25:27 <Xaroth|Work> ah, output.log
22:25:31 <glx> [PCM] [022C] Not Yet Implemented D1
22:25:31 <glx> [EMU] SDL window closed
22:25:41 <glx> that's error.log for me
22:25:51 <Xaroth|Work> win!
22:27:26 <Xaroth|Work> hm, no voices or subs
22:27:47 <Xaroth|Work> love the ancient old music tho :P
22:28:52 <Xaroth|Work> huh, voices only enabled if you focus the window
22:29:00 <glx> weird
22:29:16 <glx> vista ?
22:29:28 <Xaroth|Work> 7
22:29:36 <Xaroth|Work> if i focus the window, i get voices + music
22:29:42 <Xaroth|Work> else only music
22:29:48 <glx> strange
22:30:01 <Xaroth|Work> hah, that 'now' at the end still gives me goosebumps
22:31:03 <glx> I have voices without focus
22:33:45 <Xaroth|Work> nope, still same issue after a recompile
22:34:41 <Xaroth|Work> heh 'and no rules of engagement' plays twice
22:34:57 <Xaroth|Work> animation of his lips are also lightly slower than the sound of the voice
22:49:06 <glx> yes timing issues
22:49:58 <Xaroth|Work> ooh loving the neatness of main.c :P