IRC logs for #opendune on OFTC at 2011-01-05
⏴ go to previous day
00:04:42 <glx> I don't know what is type D ;)
00:05:24 <TrueBrain> turret, is my guess
00:05:30 <TrueBrain> only thing that kind-of makes sense
00:07:51 <glx> but indeed the isTypeD check then the switch can seem strange
00:09:01 <glx> if (t->fogOfWar == g_global->variable_39FA) return 13;
00:10:07 <glx> if (t->spriteID > g_global->variable_39FA && t->spriteID < (uint16)(g_global->variable_39FA + 75)) return 11;
00:10:32 * glx checks the conversion, something looks strange
00:11:57 <glx> would help to know what 39FA is :)
00:13:25 <glx> g_global->variable_39FA = iconMap[iconMap[6]];
00:14:53 <TrueBrain> but what does it have to do with fogOfWar?
00:16:31 <glx> you never know what they were thinking
00:16:46 <TrueBrain> isn't it a conversion error? :D
00:20:31 <glx> maybe fogOfWar is an incomplete name
00:20:58 <TrueBrain> it was after all just a guess
00:21:35 <TrueBrain> spriteID is 9 bits, fogOfWar just 7 ..
00:21:40 <TrueBrain> so the comparison is weird
00:22:02 <glx> the only assignation converted for now set it to 0 or are in scenario.c and save.c
00:25:14 <TrueBrain> why did we conclude it is fogOfWar I wonder ...
00:25:51 <glx> using 39F2 & 0x7F, and 39F2 is the sprite after the latest fogofwar sprite
00:26:41 <glx> I'd say it's more related to concrete slab
00:27:20 <TrueBrain> but why the difference in sprite-size
00:29:28 <TrueBrain> yet spriteID is 9 ...
00:29:50 <glx> dune2 gets weirder each time you look at it :)
00:30:28 <TrueBrain> 34 .. 107 are walls
00:33:01 <glx> hmm there are duplicates in these images
00:33:59 <glx> 151 155 158 159 seems similar too
00:34:24 <glx> I guess we'll get more info with more conversions
00:34:53 <glx> (we then will be able to draw any sprite where we want ;) )
00:35:20 <glx> and find out the spriteIDs
00:37:33 <TrueBrain> HEAD doesn't compile :(
00:38:29 <glx> I renamed a var in house.h
00:40:43 <DorpsGek> SVN: glx (r1225) -Fix (r1224): rename every references when you rename one (and compile before commit)
00:41:48 <TrueBrain> it no longer runs here ......
00:42:47 <TrueBrain> it either animates REALLY slow
00:42:49 <TrueBrain> or nothing happens :p
00:43:05 <TrueBrain> ah, I need to click something else before it interacts
00:44:53 <glx> gcc build runs for me (after trying 10 times as always)
00:45:35 <glx> because I forgot to redirect output to a file ;)
00:45:46 <TrueBrain> right ... some trial and error
00:45:53 <TrueBrain> fogOfWar is the sprite shown to the user
00:46:13 <TrueBrain> spriteID is the sprite it should be, or something
00:47:57 <TrueBrain> right, already too late here
00:48:10 <TrueBrain> tomorrow I will fiddle a bit more :D
01:24:53 *** Xaroth_ has joined #openDune
01:29:54 *** Xaroth__ has joined #openDune
01:40:05 *** Xaroth has joined #openDune
01:40:05 *** ChanServ sets mode: +o Xaroth
06:53:00 *** Xaroth_ has joined #openDune
06:58:58 *** Xaroth__ has joined #openDune
07:04:59 *** Xaroth has joined #openDune
07:04:59 *** ChanServ sets mode: +o Xaroth
07:10:07 *** Xaroth_ has joined #openDune
07:14:59 *** Xaroth has joined #openDune
07:14:59 *** ChanServ sets mode: +o Xaroth
07:23:11 *** Xaroth_ has joined #openDune
07:35:56 *** Xaroth has joined #openDune
07:35:56 *** ChanServ sets mode: +o Xaroth
07:45:57 *** Xaroth has joined #openDune
07:45:57 *** ChanServ sets mode: +o Xaroth
11:27:48 *** planetmaker is now known as TheGreatConfusor
11:29:39 *** TheGreatConfusor is now known as planetmaker
12:24:13 *** olinuxx has joined #openDune
13:33:40 <TrueBrain> glx: can it be that spriteID is 'foreground' sprite and fogOfWar is 'background' sprite?
13:34:01 <glx> that's another possibility
13:34:02 <TrueBrain> as I was thinking how they do the fog of war stuff
13:34:12 <TrueBrain> if spriteID is what it should be, and fogOfWar is what comes over it
13:34:27 <TrueBrain> isn't there a bug with walls, that a piece of wall doesn't have fog of war stuff over it?
13:34:32 <TrueBrain> that you always see it completely?
13:34:49 <TrueBrain> I remember something like that vaguely ...
13:34:59 <TrueBrain> also, turrets have a piece of wall below them, don't they?
13:36:20 <TrueBrain> if I remember correctly, if you connect a wall to a turret, it connects?
13:37:22 <TrueBrain> I have to work a bit first, will work on OpenDUNE a bit later :)
13:55:24 <DorpsGek> SVN: glx (r1226) -Fix (r1142): another conversion error
13:55:34 <glx> without visible effect it seems
13:56:25 <glx> maybe because my tests were done with atreides only
14:03:24 * glx wants to know what is in 0x395A :)
14:05:08 <glx> I already know it's an array of 32 elements, each element is a 20 bytes struct
14:11:47 <glx> used in map functions it seems
14:12:38 <glx> I know there is houseID at offset 0x6(1), a position at offset 0x10(4)
14:13:44 <glx> a bool at offset 0x7(1), a csip32 ? at offset 0xC(4), and an "index" at offset 0xA(2)
14:14:15 <TrueBrain> so make it a struct, and name them :p
14:14:36 <glx> converting Map_DeviateArea() for now
14:44:43 *** glevans2 has joined #openDune
15:14:23 <TrueBrain> 07D4_034D draws the screen :p
15:15:23 <TrueBrain> and indeed, spriteID is drawn first, then fogOfWar over it
15:15:39 <TrueBrain> so ... spriteID1 and spriteID2?
15:15:54 <TrueBrain> spriteID and overlayID?
15:16:15 <TrueBrain> groundSpriteID and overlaySpriteID
15:18:42 <DorpsGek> SVN: glx (r1227) -Add: C-ified Map_DeviateArea(), Map_06F7_0493() and Map_06F7_057C()
15:21:47 <DorpsGek> SVN: truebrain (r1228) -Fix: we misunderstood 'fogOfWar'. It in reality is an overlay sprite drawn on top of the original sprite, which causes fogOfWar (among other things)
15:23:42 <glx> ok 2 0x395A references left
15:23:56 <glx> one is a memset, so not important ;)
15:24:57 <glx> f__B511_0A8F_000E_EE64() init everything ;)
15:26:07 <glx> hmm more like reset everything indeed
15:26:48 <TrueBrain> going to do a few 22A6 functions I tihnk ...
15:27:41 <glx> f__22A6_0F76_002C_45CC() <-- putpixel
15:28:07 <TrueBrain> which draws a sprite
15:28:56 <glx> and used in C-ified functions only ;)
15:29:21 <glx> be careful with static variables
15:29:31 <TrueBrain> lol, didn't notice that yet ;) (only used in C-ified functions)
15:29:50 <TrueBrain> in this case a static is used as a local, it seems ... weird ...
15:30:45 <glx> third party lib, same happens in drivers IIRC
15:31:20 <glx> dune2 code uses globals for that ;)
15:31:38 <TrueBrain> you can make room in the stack, or use static space for it
15:34:29 <glx> let's continue to C-ify 06F7
15:38:00 <TrueBrain> colours 144 to 160 are house-colours I guess ..
15:38:52 <TrueBrain> well, should be only 6 ...
15:38:57 <TrueBrain> but okay .. guess it is 'good enough' ...
15:42:09 <TrueBrain> glx: can you look for me at ... ehu .. hmm ... 22A6:BD6 (or around) .. there is a switch lookup table there, and I have 2 values: 0x0BDC and 0x0BE4 .. I would like to know if there are any others :)
15:42:17 <TrueBrain> (I don't have DOSBox or anything installed :p)
15:42:34 <glx> that's an easy one (no overlay)
15:44:53 <glx> oh fuck there are functions inside the function
15:45:05 <TrueBrain> ah, found an old printout
15:45:08 <TrueBrain> nevermind, I got it :)
15:45:14 <TrueBrain> 0BDC, 0BDC, 0BE4 :D
15:46:50 <glx> but third party libs are weird, the table is in the middle of the code
15:47:10 <glx> luckily we don't do static decompilation ;)
15:47:58 <TrueBrain> argh, this function is kind of annoying :p
15:51:23 <TrueBrain> right ... it turns out that the switch can also contain value 4 ...
15:51:51 <TrueBrain> which is really weird :p
15:53:31 <TrueBrain> owh .. value 4 .. word .. so number 2 :D
16:12:32 <TrueBrain> argh, hard to convert :p
17:04:25 <TrueBrain> lol ..... 0B60 accepts 4 params
17:04:28 <TrueBrain> and 1 function only sends 3 ..
17:15:29 <glx> ha no the conversion is ok
17:15:57 <glx> looks like C++ with default value
17:17:54 <TrueBrain> it uses the value from the stack
17:18:00 <TrueBrain> so it just uses a random value I guess
17:18:52 <TrueBrain> lol, this routine is not thread safe :D
17:19:29 <glx> not surprising for a 16bit app
17:47:26 <glx> emu_orw(&emu_ax, emu_ax);
17:59:53 *** Xaroth has joined #openDune
17:59:53 *** ChanServ sets mode: +o Xaroth
18:26:04 <glx> not the first time I see a useless test in dune2
18:49:44 <TrueBrain> bah, this function is tricky
19:01:31 <TrueBrain> meh ... it became interlazed :(
19:01:49 <TrueBrain> how do you write that :p
19:04:47 <TrueBrain> vertical, in this case :p
19:05:52 * glx hates emu_Tile_GetXY() ;)
19:17:35 *** fjb is now known as Guest3402
20:22:19 <TrueBrain> grrr ... every C-ification I do, something breaks :p
20:22:50 <TrueBrain> and I don't understand why :p
20:33:23 <TrueBrain> 50 lines of decompiled code
20:33:29 <TrueBrain> some weird rcl lines
20:33:37 <TrueBrain> and ... I can write it in 4 lines :D
20:55:01 <DorpsGek> SVN: truebrain (r1229) -Add: C-ified GFX_DrawSprite()
20:55:05 <TrueBrain> I wonder what MSVC is going to say
21:02:50 <TrueBrain> at least it is a start at 22a6 :D
21:05:34 <glx> IIRC some 22A6 are already converted
21:07:12 <glx> Erreur 1 error C2065: 'HOUSE_HARKONNEN' : identificateur non déclaré d:\developpement\opendune\trunk2\src\gui\widget.c 163
21:08:54 <DorpsGek> SVN: truebrain (r1230) -Fix (r1229): forgot an include
21:11:15 <glx> MSVC compiled, no warnings
23:12:43 <TrueBrain> hmm, what was the bug with IX house and recouloring?
23:15:11 <TrueBrain> "With the help of Segra's database I've been able to track down and fix the notorious Ix remap bug :lol: "
23:15:18 <TrueBrain> To fix, search for the bytes (identical in all versions):
23:15:21 <TrueBrain> And replace 3C A0 with 3C 96
23:15:26 <TrueBrain> I think that is around the function I did
23:23:14 <DorpsGek> SVN: truebrain (r1231) -Fix: Dune2 maps too many colours for house colours, causing graphical issues with the IX building (tnx to MrFlibble for confirming what I thought was flawed too ;))
23:23:20 <TrueBrain> there, addressed that problem immediatly :)
23:43:43 <DorpsGek> SVN: glx (r1232) -Add: C-ified all f__06F7 functions
continue to next day ⏵