IRC logs for #opendune on OFTC at 2011-01-05
            
00:00:11 <TrueBrain> @calc 0x88
00:00:11 <DorpsGek> TrueBrain: 136
00:00:17 <TrueBrain> @calc 0x20
00:00:17 <DorpsGek> TrueBrain: 32
00:00:19 <TrueBrain> ah :)
00:01:02 <TrueBrain> nice work :D
00:04:42 <glx> I don't know what is type D ;)
00:05:24 <TrueBrain> turret, is my guess
00:05:25 <TrueBrain> B walls
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:09:13 <glx> maybe it's not turret :)
00:09:21 <TrueBrain> haha :p
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:41 <glx> hmm no it's ok
00:11:57 <glx> would help to know what 39FA is :)
00:13:03 <TrueBrain> yup :D
00:13:16 <glx> http://www.dune2.dk/icon_map.asp says it's pointer to wall sprites
00:13:25 <glx> g_global->variable_39FA = iconMap[iconMap[6]];
00:14:27 <glx> well base wall sprite
00:14:45 <TrueBrain> 75 walls sprites
00:14:46 <TrueBrain> fits
00:14:53 <TrueBrain> but what does it have to do with fogOfWar?
00:14:59 <glx> dunno
00:16:19 <glx> it's dune2 :)
00:16:31 <glx> you never know what they were thinking
00:16:46 <TrueBrain> isn't it a conversion error? :D
00:16:55 <glx> http://svn.opendune.org/?action=changelog&rev=1206
00:16:59 <glx> looks correct
00:17:24 <glx> around l__07A0
00:20:31 <glx> maybe fogOfWar is an incomplete name
00:20:54 <TrueBrain> maybe
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:23:07 <glx> and map.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:28:06 <TrueBrain> bit-wise
00:28:35 <glx> there are 398 sprites
00:29:15 <glx> 10 bits
00:29:28 <TrueBrain> yet spriteID is 9 ...
00:29:50 <glx> dune2 gets weirder each time you look at it :)
00:29:54 <TrueBrain> :D
00:30:28 <TrueBrain> 34 .. 107 are walls
00:30:30 <TrueBrain> is not 75 ..
00:33:01 <glx> hmm there are duplicates in these images
00:33:17 <glx> 0 and 124 are the same
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:12 <glx> confirmed
00:38:17 * glx is stupid :)
00:38:29 <glx> I renamed a var in house.h
00:38:35 <TrueBrain> :D
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:38 <glx> MSVC build runs
00:42:43 <glx> checking gcc
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:43:17 <glx> slow intro ?
00:43:45 <TrueBrain> recompile fixed it
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:02 <TrueBrain> 39F2 is black
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
00:48:11 <TrueBrain> night
00:48:19 <glx> night
01:24:53 *** Xaroth_ has joined #openDune
01:29:54 *** Xaroth__ has joined #openDune
01:31:27 *** Xaroth has quit IRC
01:34:24 *** Xaroth_ has quit IRC
01:40:05 *** Xaroth has joined #openDune
01:40:05 *** ChanServ sets mode: +o Xaroth
01:46:24 *** Xaroth__ has quit IRC
04:37:27 *** glx has quit IRC
06:53:00 *** Xaroth_ has joined #openDune
06:58:58 *** Xaroth__ has joined #openDune
06:59:32 *** Xaroth has quit IRC
07:04:59 *** Xaroth has joined #openDune
07:04:59 *** ChanServ sets mode: +o Xaroth
07:05:30 *** Xaroth_ has quit IRC
07:10:07 *** Xaroth_ has joined #openDune
07:11:35 *** Xaroth__ has quit IRC
07:14:24 *** Xaroth has quit IRC
07:14:59 *** Xaroth has joined #openDune
07:14:59 *** ChanServ sets mode: +o Xaroth
07:18:49 *** Xaroth_ has quit IRC
07:23:11 *** Xaroth_ has joined #openDune
07:29:30 *** Xaroth has quit IRC
07:32:40 *** Xaroth_ has quit IRC
07:35:56 *** Xaroth has joined #openDune
07:35:56 *** ChanServ sets mode: +o Xaroth
07:44:22 *** Xaroth has quit IRC
07:45:57 *** Xaroth has joined #openDune
07:45:57 *** ChanServ sets mode: +o Xaroth
07:54:19 *** Xaroth has quit IRC
09:32:49 *** olinuxx has quit IRC
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:11:23 *** glx has joined #openDune
13:11:24 *** ChanServ sets mode: +o glx
13:11:42 <glx> hello
13:33:40 <TrueBrain> glx: can it be that spriteID is 'foreground' sprite and fogOfWar is 'background' sprite?
13:33:45 <TrueBrain> (or invsersed :p)
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:55 <glx> dunno
13:34:59 <TrueBrain> also, turrets have a piece of wall below them, don't they?
13:35:30 <glx> it's not a wall
13:36:20 <TrueBrain> if I remember correctly, if you connect a wall to a turret, it connects?
13:36:50 <glx> hmm don't think so
13:36:55 <glx> let's check :)
13:37:22 <TrueBrain> I have to work a bit first, will work on OpenDUNE a bit later :)
13:38:19 <glx> no they don't connect
13:38:46 <TrueBrain> ah ... bah :p
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:03:32 <glx> let's convert accessors
14:05:08 <glx> I already know it's an array of 32 elements, each element is a 20 bytes struct
14:09:57 <TrueBrain> not used a lot ...
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:33:25 *** glevans2 has quit IRC
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:18:59 <TrueBrain> preference?
15:19:10 <glx> no :)
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:15 <glx> one is putpixel
15:27:41 <glx> f__22A6_0F76_002C_45CC() <-- putpixel
15:28:04 <TrueBrain> going to do B60
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:33 <TrueBrain> of course
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 <TrueBrain> hmm, yes
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:37:17 <TrueBrain> @calc 0x90
15:37:17 <DorpsGek> TrueBrain: 144
15:37:27 <TrueBrain> @calc 0xA0
15:37:27 <DorpsGek> TrueBrain: 160
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:31 <glx> yup
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:45 <TrueBrain> :)
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
15:57:28 *** olinuxx has quit IRC
16:03:49 <glx> yup emu_si / 2 ;)
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:04:29 <TrueBrain> how nice
17:13:44 <glx> maybe a conversion error
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:19:42 <glx> well 16bit DOS app
17:47:26 <glx> emu_orw(&emu_ax, emu_ax);
17:47:26 <glx> if (emu_ax == 0) {
17:47:26 <glx> }
17:47:30 <glx> nice ;)
17:59:53 *** Xaroth has joined #openDune
17:59:53 *** ChanServ sets mode: +o Xaroth
18:07:30 <TrueBrain> empty ifs?
18:07:33 <TrueBrain> sounds useful :p
18:26:04 <glx> not the first time I see a useless test in dune2
18:49:44 <TrueBrain> bah, this function is tricky
18:50:32 <glx> most 22A6 are
19:01:31 <TrueBrain> meh ... it became interlazed :(
19:01:45 <TrueBrain> interlized
19:01:49 <TrueBrain> how do you write that :p
19:03:41 <glx> interlaced ?
19:03:55 <TrueBrain> stripes :p
19:04:14 <glx> yes interlaced
19:04:38 <glx> like 480i vs 480p
19:04:47 <TrueBrain> vertical, in this case :p
19:04:53 <TrueBrain> which is weird :p
19:05:52 * glx hates emu_Tile_GetXY() ;)
19:06:19 <glx> and its conversion
19:17:35 *** fjb is now known as Guest3402
19:17:36 *** fjb has joined #openDune
19:20:04 <TrueBrain> I can't find it :(
19:24:20 *** Guest3402 has quit IRC
19:26:18 <TrueBrain> ah, a flag :D
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:24:35 <SmatZ> :-(
20:33:18 <TrueBrain> LOL!
20:33:23 <TrueBrain> 50 lines of decompiled code
20:33:29 <TrueBrain> some weird rcl lines
20:33:37 <glx> good luck
20:33:37 <TrueBrain> and ... I can write it in 4 lines :D
20:50:49 <TrueBrain> http://devs.opendune.org/~truebrain/temp.patch
20:50:50 <TrueBrain> tada! :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:07:27 <glx> undeclared identifier
21:08:54 <DorpsGek> SVN: truebrain (r1230) -Fix (r1229): forgot an include
21:09:56 <glx> (gcc failed too for me)
21:11:15 <glx> MSVC compiled, no warnings
21:12:44 <TrueBrain> :D
23:12:43 <TrueBrain> hmm, what was the bug with IX house and recouloring?
23:12:49 <TrueBrain> recolouring
23:12:50 <TrueBrain> lol
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:17 <TrueBrain> "
23:15:18 <TrueBrain> To fix, search for the bytes (identical in all versions):
23:15:20 <TrueBrain> 90 7C 09 3C A0
23:15:21 <TrueBrain> And replace 3C A0 with 3C 96
23:15:23 <TrueBrain> "
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