IRC logs for #opendune on OFTC at 2011-02-18
⏴ go to previous day
07:33:22 *** Xaroth_ has joined #openDune
12:40:23 *** fjb is now known as Guest1815
12:56:59 <TrueBrain> FYI, working on 10E4 functions :)
13:03:43 <glx> like the one taking that gives the actionType ?
13:04:54 <TrueBrain> not thatone atm, but I want to do all 10E4s :)
13:05:02 <TrueBrain> so if you are working on any, please let me know now :D
13:05:18 <TrueBrain> (doing Widget_DrawBorder2 atm)
13:05:26 <glx> so you are not on f__10E4_1BE0_002F_1A76()
13:05:40 <TrueBrain> #$@%^&$#$@$%# youtube with 'advertisement'
13:07:04 <TrueBrain> and no, I am not on that function :p
13:07:31 <glx> it seems to do nice things
13:08:49 <TrueBrain> DrawBorder2 does exactly what you would expect :p
13:09:21 <glx> as in not draw a border ?
13:09:32 <TrueBrain> no, it draws a border, with 4 lines
13:09:36 <TrueBrain> just .. exactly what you expect :)
13:35:24 <DorpsGek> SVN: truebrain (r1311) -Add: C-ified GUI_Widget_DrawBorder2()
13:38:52 <DorpsGek> SVN: truebrain (r1312) -Fix (r1311): rename GUI_Widget_DrawBorder2 to GUI_DrawBorder, as that is what it does. Has nothing to do with widgets.
14:02:25 <DorpsGek> SVN: truebrain (r1313) -Add: C-ified GUI_Widget_DrawBorder()
14:17:13 <TrueBrain> hmm, we don't have uint64? :(
14:36:35 <glx> having uint32 is already nice ;)
14:36:42 <TrueBrain> yet I have an uint64 here ;)
14:37:16 <glx> btw I needed to split Object.flags
14:38:08 <DorpsGek> SVN: truebrain (r1314) -Add: C-ified GUI_DisplayHint()
14:38:22 <TrueBrain> or maybe a better question: in what?
14:38:45 <glx> just added that in the union
14:38:49 <TrueBrain> yeah, now the why comes back :)
14:39:31 <glx> || s->o.flags.half.high != g_global->variable_3766
14:39:31 <glx> || s->o.flags.half.low != g_global->variable_375C) {
14:40:01 <TrueBrain> you sure you picked the right var? That it isn't StructureInfo it was trying to compare? :)
14:40:25 <TrueBrain> wouldn't make much sense, but neither does this :p
14:43:26 <TrueBrain> if you say so, I bleieve you :)
14:43:29 <TrueBrain> it is just weird :p
14:47:39 <glx> oh a switch (emu_ip), it's time to decompile :)
15:03:43 <TrueBrain> owh, lol, found the glitch
15:03:46 <TrueBrain> now someone to proofread :)
15:13:20 <DorpsGek> SVN: truebrain (r1315) -Change: move Widget.state into a struct
15:22:43 <TrueBrain> lol, this is a new one ... a parameter (which is always 0) which is used to lookup something in an array of 22 bytes long
15:22:54 <TrueBrain> the only remaining place in g_global for that allows such array of just 1
15:23:09 <TrueBrain> like ... useful? If that parameter is every anything else than 0, it breaks :p
15:24:09 <TrueBrain> sometimes I think I have seen it all
15:25:02 <glx> conversion done, time to test it :)
15:42:57 <TrueBrain> forceDraw or something
15:43:14 <TrueBrain> as all that shit seems to be to see if something changed
15:43:35 <glx> and for the function name ?
15:43:47 <TrueBrain> + unknown06 = emu_get_memory16(emu_ss, emu_sp, 0x0) != 0;
15:43:49 <TrueBrain> please don't do that
15:43:52 <TrueBrain> do what we do at other places
15:53:11 <DorpsGek> SVN: glx (r1316) -Add: C-ified GUI_Widget_ActionPanel_GetActionType()
15:54:00 <TrueBrain> doing 0D58 atm, almost done I think
15:54:08 <TrueBrain> its a nasty function :)
15:54:17 <TrueBrain> as I know what it does, but I have to translate it 1-on-1 first :p
15:54:22 <TrueBrain> but 32bit operators :p
15:54:43 <glx> do you want the full asm ?
15:54:54 <glx> (for the unresolved jumps)
15:55:45 <TrueBrain> they all jump inside existing code, or are very predicatable :)
15:56:49 <glx> it's between goto l__0E3D; l__0E3D: I think
15:56:59 <TrueBrain> don't worry, I have them all
16:02:59 <TrueBrain> lol, for some reason the paramters of this DrawProgressbar are signed
16:03:02 <TrueBrain> makes little sense :D
16:04:38 <TrueBrain> ha, works, flawless :D WOEI!
16:06:21 <TrueBrain> parts of the function can handle vertical progress bar
16:06:23 <TrueBrain> other parts can't :D
16:11:58 <TrueBrain> owh, it can, that is one clever way ....
16:13:56 <DorpsGek> SVN: truebrain (r1317) -Add: C-ified GUI_DrawProgressbar()
16:14:20 <TrueBrain> two relative long functions left ...
16:15:24 <TrueBrain> first one has something to do with House
16:16:40 <TrueBrain> other is DrawMentat or something
16:17:28 <TrueBrain> I am going to do thatone :)
16:19:56 <glx> I see credits and sound there too
16:20:20 <glx> so it also handles "ticks" on credit counter update
16:23:43 <glx> 2099 do something with screen.cps
16:37:35 <TrueBrain> right, this for sure was another function than I expected to get :D
16:40:33 <TrueBrain> if the game crashes, it is always a emu_sp += I did wrong :D
16:42:37 <TrueBrain> right, it now just crashes :p
16:43:08 <TrueBrain> well, 2099 is almost done :p
17:51:32 <TrueBrain> right, emu_sp is damaged
17:55:53 <TrueBrain> Unit_B4CD_01BF is the same as emu_Structure_UpdateMap
17:57:43 <TrueBrain> but I have no clue how to name this function ...
17:59:06 <TrueBrain> GUI_DrawInterfaceAndRadar
17:59:08 <TrueBrain> will have to do for now :p
18:02:30 <DorpsGek> SVN: truebrain (r1318) -Add: C-ified GUI_DrawInterfaceAndRadar()
18:05:06 <DorpsGek> SVN: truebrain (r1319) -Fix (r1318): math failure - please replace ALU
18:12:53 <glx> trying f__1319_002D_0023_320C()
18:13:36 <DorpsGek> SVN: truebrain (r1320) -Add: C-ified GFX_PutPixel()
18:14:41 <TrueBrain> guess I should do the last 10E4 ... but it is 400 lines long :(
18:29:52 <glx> Avertissement 13 warning C4244: '=' : conversion de 'uint16' en 'uint8', perte possible de données d:\developpement\opendune\trunk\src\gfx.c 180
18:30:25 <SmatZ> glx: is openttd compiled with that level of warnings?
18:30:42 <SmatZ> I would wonder MSVC wouldn't warn about that :)
18:31:34 <TrueBrain> in C++ it is allowed I guess
18:31:55 <TrueBrain> although I would also think it is disabled in OpenTTD :)
18:32:58 <DorpsGek> SVN: truebrain (r1321) -Fix (r1320): colour is only 8bits, not 16bit
18:33:06 <TrueBrain> this commit will most likely result in even more warnings for you glx :)
18:38:27 <TrueBrain> only if there is more than 7 credits difference you hear a sound
18:46:12 <DorpsGek> SVN: glx (r1322) -Fix (r1321): MSVC uint16 to uint8 warnings
18:51:20 <TrueBrain> @calc 0xFFFF - 0xFFDE
18:56:34 <TrueBrain> I love how during conversion you start to understand it :D
19:15:17 <TrueBrain> what does: -12 & 7 do?
19:15:25 <TrueBrain> not -5 I would guess :p
19:19:55 <TrueBrain> lol, at a very weird place the whole border of the game is drawn .. namelijk in credits update code :D
19:24:49 <TrueBrain> the animation is really nicely programmed
19:25:02 <TrueBrain> it still amased me how many 'cool' stuff Dune has
19:25:04 <TrueBrain> just because they can, I guess
19:54:13 <TrueBrain> I fixed it with: -((-a) & 7)
19:54:17 <TrueBrain> better solutions are welcome :D
19:55:31 <TrueBrain> there seems to be a bug in my stuff, as when money goes up, it hangs with the last credit ...
20:02:02 <TrueBrain> lol, nasty problem :D
20:07:14 <TrueBrain> euh, sorry, -4 / 4 = 0
20:07:34 <TrueBrain> I give bad examples
20:08:18 <TrueBrain> and the algorithm in fact corrects for this, which made it go do weird stuff in converted state :D
20:08:25 <glx> sar(-1, 2) should be 0 too
20:09:06 <glx> 11111 >> 2 is still full of 1*
20:09:07 <TrueBrain> sar can't make positive values of negative :)
20:09:15 <TrueBrain> which feels weird :)
20:09:32 <TrueBrain> well, 11111 >> 2 has 0s of course, but sar(11111, 2) doesn't :)
20:10:04 <DorpsGek> SVN: truebrain (r1323) -Add: C-ified GUI_DrawCredits(). Segment 10E4 is now finished.
20:10:29 <glx> it's nice when file disapear
20:11:02 <TrueBrain> right, enough for today :)
20:46:09 <glx> emu_cmpw(&locsi, packedDest);
20:46:09 <glx> if (locsi != packedDest) goto l__00E2;
20:46:10 <glx> emu_cmpw(&locsi, packedDest);
20:46:10 <glx> if (locsi != packedDest) goto l__00E9;
20:46:51 <TrueBrain> you can't check it often enough
20:47:29 <glx> oh it's some kind of loop indeed
20:47:51 <glx> l__00E2 is jumped to many times
20:48:28 <glx> but still one useless check I think
22:06:15 <SmatZ> compilers were not that good in '92 :)
22:07:09 <TrueBrain> nowedays they are too good for their own good ;)
22:15:15 <glx> well it seems I need some redundant checks anyway
22:19:12 <glx> I can't convert all local variables without converting more functions
continue to next day ⏵