IRC logs for #opendune on OFTC at 2011-05-23
            
00:25:56 <DorpsGek> SVN: glx (r1600) -Add: C-ified GUI_FactoryWindow_Sorter(). Au revoir B495.
01:52:33 <DorpsGek> SVN: glx (r1601) -Fix: replace 01F7:286D with memchr
02:03:34 <glx> I think emu_Tools_Var79E4_Update() is rand() and emu_Tools_Var79E4_Init() is srand()
02:08:23 *** Xaroth has quit IRC
02:31:35 *** Xaroth has joined #openDune
02:31:35 *** ChanServ sets mode: +o Xaroth
02:35:21 <glx> http://svn.opendune.org/~glx/temp.patch <-- is it a good idea ?
03:09:07 *** glx has quit IRC
12:14:27 *** glx has joined #openDune
12:14:27 *** ChanServ sets mode: +o glx
12:14:54 <glx> hello
12:32:43 <Xaroth|Work> o>
12:33:34 <Xaroth|Work> that patch you showed was to replace some emu stuff with rand() and time()?
12:42:29 <glx> yes
13:30:59 <Xaroth|Work> then it looks good to me :P
13:31:29 <TrueBrain> are they identical, or a 'good enough' replacement?
13:31:36 <TrueBrain> in other words, how much does it change the random part?
13:46:22 <glx> hmm it seems there are small differences in random
13:47:25 <TrueBrain> I ask as I wonder how far it influences the game
13:47:31 <TrueBrain> if not a lot, go for it :)
13:52:40 <glx> for now the "major" difference I see is prices in starport
13:53:04 <glx> but they are still random ;)
13:53:30 <TrueBrain> yup
13:53:32 <TrueBrain> so go for it
13:53:37 <glx> map generation uses the other random
13:56:01 <glx> btw I have some lag after loading a game
13:56:06 <TrueBrain> yup
13:56:08 <TrueBrain> animation
13:56:12 <TrueBrain> it is just broken in original dune
13:56:14 <TrueBrain> so it is a bit meh :D
13:57:57 <glx> that explains the lag I have when closing factory window in a game with some 'thopter
13:58:30 <TrueBrain> :D
13:58:48 <TrueBrain> but at least the Quit Game animation now is visible :D
13:59:23 <glx> the functions I renamed last night (related to factory list) have no visible effect ;)
13:59:44 <glx> though with some sleep(1) in them it's a little better :)
13:59:57 <glx> the game is just too fast
14:00:00 <TrueBrain> yup
14:00:14 <TrueBrain> mark the places if you find them ... we need to fix it some day ...
14:03:02 <DorpsGek> SVN: glx (r1602) -Fix: replace 01F7:103F with time and XXX_Var79E4_XXX with rand/srand
14:04:52 <glx> the XXX_Screen_Copy calls are hard to read with /8 versions
14:06:16 <glx> hmm seems I can name variable_7FC0 top
14:06:37 <glx> *too
14:06:53 <glx> and the values it can have
14:06:58 <TrueBrain> yeah, we should replace all the /8 versions :p
14:30:05 <TrueBrain> not yet tho .. we have some more functions to convert :D
14:32:25 * glx is naming some stuff :)
14:34:36 <glx> res = GUI_DisplayFactoryWindow(g_global->variable_8BE8, s->o.type == STRUCTURE_STARPORT ? 1 : 0, upgradeCost);
14:34:37 <glx> and
14:34:37 <glx> g_global->variable_8BE8 = var06;
14:35:03 <glx> funny :)
14:52:00 <DorpsGek> SVN: glx (r1603) -Fix: renamed many variables
14:52:49 <glx> now the code makes is easier to understand :)
14:54:30 <glx> if ((i == 8 || i == 9 || i == 10 || i == 12) && g_global->factoryWindowStarport == 0) continue;
14:54:31 <glx> if (i == 11 && g_global->factoryWindowStarport != 0) continue;
14:54:31 <glx> if (i == 7 && g_global->factoryWindowUpgradeCost == 0) continue;
14:54:31 <glx> ^^ even this starts to make sense :)
14:55:02 <TrueBrain> i is structuretype?
14:55:07 <glx> 8, 9, 10, 12 should be +, -, invoice and send order (maybe not in this order)
14:55:18 <TrueBrain> ah, widgets :P
14:55:18 <glx> widget indexes
14:55:44 <glx> 11 is build this, 7 is upgrade
14:56:32 <Xaroth|Work> o_O
14:56:58 <glx> naming is not optimal but it's better than variable_XXXX
14:57:15 <TrueBrain> yup
14:57:23 <TrueBrain> most will be moved out there anyway, so :)
14:57:48 <glx> indeed globlal.h will not stay
15:13:49 * glx is now on f__B503_0586_0017_050A()
15:31:55 <glx> emu_push(emu_cs); emu_push(0x061D); emu_cs = 0x34FC; overlay(0x34FC, 0); emu_Ini_GetString();
15:31:55 <glx> /* Check if this overlay should be reloaded */
15:31:55 <glx> if (emu_cs == 0x3503) { overlay(0x3503, 1); }
15:31:55 <glx> l__061D:
15:31:55 <glx> emu_addw(&emu_sp, 0x16);
15:31:57 <glx> emu_orw(&emu_ax, emu_dx);
15:31:57 <glx> if (emu_ax != 0) goto l__0627;
15:32:11 <glx> looks like a Ini conversion is incorrect
15:32:35 <glx> where is the return value ?
15:33:55 <TrueBrain> ugh, all converted things didn't use the return value :p
15:33:59 <TrueBrain> as return value == input buffer
15:34:01 <TrueBrain> so it was a bit mute :p
15:34:21 <TrueBrain> or was it passed the last readed thing ..
15:34:25 <TrueBrain> can't remember, it was something silly :)
15:34:32 <TrueBrain> but ... what ini-file does this read?
15:34:50 <glx> the one for select scenario
15:35:06 * glx checks if it still works
15:37:17 <TrueBrain> yeah, it ignores ax:dx for the rest
15:37:21 <TrueBrain> so it will still work I guess
15:37:55 <TrueBrain> guess that checks if there was a match
15:38:02 <TrueBrain> guess it returns NULL if it couldn't find anything matching
15:38:12 <TrueBrain> would make sense I guess
15:39:05 <TrueBrain> GROUP%d
15:39:08 <TrueBrain> ah .. right .. hmm ..
15:39:11 <TrueBrain> yeah .. well ... BUG! :D
15:39:32 <glx> seems I got a crash
15:42:22 <glx> Program Termination: jumped to 01F7:0DF2, which is not decompiled.
15:42:22 <glx> The jump was triggered at d:\developpement\opendune\trunk2\decompiled\cs__01f7.c:2176
15:42:22 <glx> The jump appears to originate from 01F7:0D7F.
15:42:34 <DorpsGek> SVN: truebrain (r1604) -Fix: seems some parts do use the return value of Ini_GetString, so fake a return value in emu_ layer, and return a boolean in C version
15:42:47 <TrueBrain> that should at least fix GetString enough to still work as expected in the code I have seen
15:43:06 <TrueBrain> emu_dx:emu_ax is not a pointer, but a boolean :
15:43:08 <TrueBrain> p
15:43:34 <glx> updating and retrying
15:43:35 <TrueBrain> and GetString returns true if it found a match; oterhwise false
15:44:46 <glx> I guess the crash is because dx:ax is not 0 when it should
15:44:55 <glx> crash is gone :)
15:45:36 <glx> now I can return on my function
15:54:29 <TrueBrain> :D
15:54:32 <TrueBrain> means I guess right :)
15:54:46 <glx> yes with a bool it makes sense :)
15:55:03 <glx> I guess sscanf failed when ran on unexpected data
15:55:21 <TrueBrain> :D
15:55:26 <glx> well no failed but triggered unresolved jump
15:55:34 <TrueBrain> guess it didn't check on *buffer == '\0' :D
15:55:57 <TrueBrain> but this is nicer, so meh :)
16:03:19 <glx> grr accessing a [][4] in emu stack is hard
16:03:33 <glx> guess I'll need a struct for now
17:27:19 <glx> src/gui/gui.c:2981:3: warning: format '%d' expects type 'int *', but argument 3 has type 'uint16 *'
17:27:28 <glx> MSVC doesn't complain
17:50:13 <glx> stupid gcc
19:10:12 <DorpsGek> SVN: glx (r1605) -Add: C-ified GUI_StrategicMap_ScenarioSelection()
20:14:51 <DorpsGek> SVN: glx (r1606) -Add: C-ified GUI_StrategicMap_AnimateSelected()
21:20:01 <DorpsGek> SVN: glx (r1607) -Add: C-ified GUI_StrategicMap_Var2AF4_[SG]et()
21:20:32 * glx doesn't clearly understand the usage of g_global->variable_2AF4
21:21:07 <glx> but it should be important as it's stored in the savegame :)
21:30:37 <TrueBrain> :D
21:39:37 <Xaroth|Work> hm
21:39:45 <Xaroth|Work> doing a -full checkout- might not have been the best idea
21:40:12 <Xaroth|Work> 22k files..
21:41:35 * Xaroth|Work checks out trunk instead
21:44:47 <TrueBrain> smart :D
22:23:02 <DorpsGek> SVN: glx (r1608) -Add: C-ified GUI_StrategicMap_ClickedRegion()
22:46:04 <DorpsGek> SVN: glx (r1609) -Add: C-ified GUI_StrategicMap_AnimateArrows()