IRC logs for #opendune on OFTC at 2009-12-12
            
00:02:46 <glx> hmm looking at f__25C4_000E_0019_12FF it seems I made the arrays too big
00:09:41 <DorpsGek> SVN: glx (r736) -Add: C-ified all f__252E_* functions, but their name are still unknown
01:25:06 <TrueBrain> & 0xF times 2
01:25:15 <TrueBrain> does make the array 16 in size, in my calculation .. what is wrong with it?
01:25:57 <TrueBrain> hmm .. times two is for uint16, and you made it [2]
01:26:23 <glx> yes [16] in asm, [8][2] in my code :)
01:26:25 <TrueBrain> so you are right :)
01:26:37 <TrueBrain> but the references in between seem unused
01:26:43 <TrueBrain> or at least the first entry ;)
01:27:24 <glx> http://glx.dnsalias.net:8080/opendune/temp.patch
01:28:07 <glx> the code does a lot of math :)
01:32:57 <TrueBrain> I am not going to check your calculations, but nice work ;)
01:33:07 <TrueBrain> move it to src/unknown, and get it in there :p
01:33:24 <TrueBrain> it is a 'set' or 'switch' function, how do you call those
01:33:32 <TrueBrain> where you set something new
01:34:02 <glx> if I change type of variable_6C70 and variable_6C71 to int8, the 'thopter in my A7 save targets a different structure
01:34:35 <TrueBrain> they are uint8 now, or?
01:34:55 <glx> they are uint8 yes
01:35:15 <TrueBrain> it is a signed division, yes
01:36:05 <glx> with the current version it does exactly the same as clean trunk
01:36:27 <TrueBrain> so it should be fine :)
01:45:09 <glx> indeed even if I still can't name it, it's easier to read like that :)
01:45:27 <TrueBrain> a factor 20 or so
01:45:29 <TrueBrain> ;)
01:45:52 <TrueBrain> k .. going to find my bed now. Nightynight
01:45:57 <TrueBrain> nice job glx ;)
01:46:08 <glx> I like to C-ify :)
01:46:15 <glx> good night
01:46:40 <TrueBrain> as long as the functions don't get too big, and then I mostly mean scope-wise, I like it too ;)
01:46:52 <TrueBrain> but this 1A34 bitch is 4 deep already ... and I am starting to wonder what I am doing :p
01:47:16 <glx> yeah big functions calling each other
01:47:49 <glx> look at 06F7 functions first ;)
01:59:44 <DorpsGek> SVN: glx (r737) -Add: C-ified emu_Unknown_07AE_0000()
03:20:10 *** blathijs has quit IRC
03:20:11 *** TrueBrain has quit IRC
03:20:11 *** glx has quit IRC
03:20:11 *** TinoDidriksen has quit IRC
03:20:11 *** Xaroth has quit IRC
03:20:11 *** planetmaker has quit IRC
03:20:11 *** proyvind has quit IRC
03:20:11 *** boekabart has quit IRC
03:20:11 *** tneo has quit IRC
03:20:11 *** SmatZ has quit IRC
03:22:50 *** glx has joined #openDune
03:22:50 *** TrueBrain has joined #openDune
03:22:50 *** planetmaker has joined #openDune
03:22:50 *** blathijs has joined #openDune
03:22:50 *** charon.oftc.net sets mode: +oovv glx TrueBrain planetmaker blathijs
03:22:50 *** Xaroth has joined #openDune
03:22:50 *** TinoDidriksen has joined #openDune
03:22:50 *** charon.oftc.net sets mode: +ovv Xaroth Xaroth TinoDidriksen
03:23:23 *** SmatZ has joined #openDune
03:23:23 *** tneo has joined #openDune
03:23:23 *** boekabart has joined #openDune
03:23:23 *** proyvind has joined #openDune
03:23:23 *** solenoid.oftc.net sets mode: +vvvv SmatZ tneo boekabart proyvind
03:45:48 *** Yexo_ has joined #openDune
03:45:48 *** ChanServ sets mode: +v Yexo_
03:52:00 *** Yexo has quit IRC
04:38:25 *** glx has quit IRC
08:24:55 *** Xaroth has quit IRC
08:27:15 *** Xaroth has joined #openDune
08:27:15 *** ChanServ sets mode: +o Xaroth
10:53:48 <TrueBrain> morning
10:57:50 <Xaroth> morning
11:15:49 *** proyvind has quit IRC
11:34:32 *** Alberth has joined #openDune
11:35:12 <Alberth> Program Termination: jumped to 3500:0020, which is not decompiled.
11:35:12 <Alberth> The jump was triggered at decompiled/cs__23E1.c:418
11:35:12 <Alberth> The jump appears to originate from 23E1:0344.
11:35:20 <Alberth> http://devs.openttd.org/~alberth/crash.bin
11:35:23 <TrueBrain> oeh, Alberth found one again :)
11:35:33 <Alberth> and I was winning :(
11:35:57 <TrueBrain> aren't you always?
11:36:07 <Alberth> pretty much yeah :)
11:36:18 <TrueBrain> Memory Corrupt!!!
11:36:20 <TrueBrain> sucks ;)
11:36:24 <TrueBrain> (that is the quit-message)
11:40:31 <DorpsGek> SVN: truebrain (r738) [JIT] -Fix: one more problem found by Alberth
11:40:41 <DorpsGek> SVN: truebrain (r739) -Update (r738): update decompiled code
11:43:17 <Alberth> I find it a very coward-ish Ordos tactic to corrupt my memory to prevent defeat
11:43:31 <TrueBrain> it does work ;)
11:44:02 <Alberth> We Atrreides fight as men, with honour
11:44:07 <TrueBrain> fuck fuck fuck fuck .... for some reason my (long) work of yesterday is gone :'(
11:44:26 <Alberth> :(
11:44:50 <TrueBrain> crappythecrap :'(
11:45:27 * planetmaker hugs TrueBrain and gives him a cookie
11:45:35 <planetmaker> and wishes a good morning to all
11:45:39 <TrueBrain> morning planetmaker :)
11:45:51 <TrueBrain> 2 choices: I can either start fishing in my file system, or just start over..
11:49:49 <TrueBrain> or just continue with somthing else :p Ghehe :)
11:51:54 <Alberth> that's just a variant of the 2nd choice (ie it only depends on how long you follow the original path) :)
11:52:43 <TrueBrain> fair point ;)
11:54:35 <TrueBrain> I think I will try another approach today .. I the last 'cs' file, convert it to readable C, and just leave it like that
12:09:16 <DorpsGek> SVN: truebrain (r740) -Add: found another variable
12:09:33 <DorpsGek> SVN: truebrain (r741) -Add: include 'stdio.h' everywhere, to ensure compilability
13:03:36 <TrueBrain> Our firealarm just went off
13:03:39 <TrueBrain> and it WONT SHUT UP!
13:40:34 *** glx has joined #openDune
13:40:34 *** ChanServ sets mode: +o glx
13:40:48 <glx> hello
13:56:27 <DorpsGek> SVN: glx (r742) -Fix (r737): emu_shl != emu_shr
13:56:33 <glx> oups :)
14:33:00 <glx> http://glx.dnsalias.net:8080/opendune/temp.patch <-- is the assert a good idea ?
14:59:04 <TrueBrain> I am doing B53B btw (the last 'cs' file)
14:59:24 <TrueBrain> and that indeed is one way to solve a switch ...
14:59:38 <TrueBrain> well, why not .. I ahve the same issue ...
15:08:05 <TrueBrain> emu_push(emu_get_memory16(emu_ss, emu_sp, 0x4));
15:08:07 <TrueBrain> emu_push(emu_get_memory16(emu_ss, emu_sp, 0x2));
15:08:08 <TrueBrain> wtf ...
15:10:43 <glx> hmm these should be variables (easier to spot params ;) )
15:11:12 <TrueBrain> ss:bp you use for parameters and local variables
15:11:18 <TrueBrain> ss:sp is kind of useless ...
15:12:23 <glx> where is that ?
15:12:35 <TrueBrain> f__B53B_005C_000F_A920
15:13:12 <TrueBrain> variable_6732 and on are accessed via an array like method
15:14:46 <glx> ,...emu_push(emu_get_memory16(emu_ss, emu_bp, 0xA));
15:14:47 <glx> ,...emu_push(emu_get_memory16(emu_ss, emu_bp, 0x8));
15:15:00 <glx> that's the only ressembling stuff I can see :)
15:15:12 <glx> no ss:sp found
15:15:13 <TrueBrain> oh, you are right
15:15:25 <TrueBrain> the fire alamr went off, so I was confused where I left off :p
15:15:36 <TrueBrain> csip32 loc10 = *(((csip32 *)&g_global->variable_672E) + emu_get_memory16(emu_ss, emu_bp, 0x0));
15:15:38 <TrueBrain> not pretty :p
15:15:52 <TrueBrain> the functions turn out to only give errors on disk access and stuff
15:15:56 <TrueBrain> so .... not important at all :p
15:16:25 <glx> but impossible to say before C-ification ;)
15:16:38 <TrueBrain> yeah, but I won't continue my C-ification of that function
15:16:41 <TrueBrain> too big, for too little gain :p
15:16:46 <glx> true
15:19:52 <DorpsGek> SVN: glx (r743) -Add: C-ified all f__07AE_* functions
15:21:55 <DorpsGek> SVN: truebrain (r744) -Add: C-ified or named all f__B53B functions
15:22:59 <TrueBrain> B527 is next
15:24:51 <TrueBrain> hmm .. did I try to compile it :s
15:25:16 <TrueBrain> that is a no ...
15:27:13 <DorpsGek> SVN: truebrain (r745) -Fix (r744): forgot to test my latest few changes ... bad me, bad bad bad me
15:32:39 <glx> emu_get_memory8(emu_cs, emu_bx, 0xA) <-- these are dangerous if we pop(cs) too early ;)
15:33:14 <TrueBrain> yes, but you can mostly rewrite them instantly :p
15:33:32 <TrueBrain> as they are static data, or global variables
15:33:45 <TrueBrain> in all cases, you can fill in the 'cs' ;)
15:34:06 <glx> I hate rcl :)
15:34:28 <TrueBrain> rcl?
15:34:42 <glx> rotate carry left
15:34:45 <TrueBrain> ah
15:34:51 <TrueBrain> emu_negw(&emu_ax, emu_ax);
15:34:52 <TrueBrain> emu_sbbw(&emu_ax, emu_ax);
15:34:54 <TrueBrain> emu_incw(&emu_ax);
15:34:55 <TrueBrain> this puzzles me every time
15:34:59 <glx> ,...emu_shrw(&emu_ax, 0x1);
15:34:59 <glx> ,...emu_cmpw(&emu_cx, emu_ax);
15:34:59 <glx> ,...emu_rclw(&emu_bx, 0x1);
15:35:01 <TrueBrain> emu_ax = (emu_ax == 0) ? 1 : 0
15:35:10 <glx> that's a nice one too
15:35:58 <glx> because I need to remember when carry is set
15:36:56 <glx> f__07C4_001A_0045_DCB4 looked easy to convert until this part ;)
15:47:31 <TrueBrain> I think 'f__22A6_0D31_0015_A4C3' is 'draw rectangle'
15:48:29 <TrueBrain> or at least I have this idea that is handled graphic shit (the whole 22A6)
15:50:30 <TrueBrain> @base 10 16 [calc 0xb2 - 0xa9]
15:50:30 <DorpsGek> TrueBrain: 9
16:03:06 <TrueBrain> hmm .. somethig is wrong with my conversion .. find the wrongness ... search search ... look look ...
16:04:41 <TrueBrain> okay, it is not my patch
16:04:47 <TrueBrain> and I get segfaults on closing ...
16:08:32 <TrueBrain> r743 breaks
16:13:16 <DorpsGek> SVN: truebrain (r746) -Fix (r743): switch 'cs', as it might need local data, when calling a function in another cs
16:13:54 <glx> oh of course
16:13:56 <TrueBrain> 22A6 indeed seems to handle window drawing and shit
16:14:06 <glx> bad me, bad bad bad me :)
16:15:31 <TrueBrain> doing one function can give you TONS of ifnormation :)
16:15:49 <TrueBrain> f__2521_000F_0022_6D87 <- GetFontWidth, or something
16:15:55 <glx> depends on the function :)
16:16:00 <glx> some give really no clue
16:16:13 <TrueBrain> I was refering to a very specific function, no worries ;)
16:17:08 <TrueBrain> f__22A6_0D31_0015_A4C3 indeed draws a rectangle in a given colour
16:19:17 <glx> so emu_Unknown_07AE_0103 is related to drawing too ?
16:19:21 <TrueBrain> yes
16:20:20 <TrueBrain> I know 9931 is the height of the edit box
16:20:24 <TrueBrain> but dunno what it is in general
16:20:36 <TrueBrain> 992D is the top of the edit box, but again, no idea what in general
16:20:45 <glx> and variable_4062 should contain drawing info
16:21:12 <glx> as its data is put in variables passed to f__22A6_0D31_0015_A4C3
16:23:44 <TrueBrain> let me try to clean this up and commit it for you
16:27:37 <glx> hmm ok I'm failing to convert 07C4
16:28:21 <glx> time to put assert to compare computed values
16:31:42 <DorpsGek> SVN: truebrain (r747) -Add: C-ified GUI_EditBox_BlinkCursor(), and found out all kinds of things related to it (function-names and variables)
16:32:01 <TrueBrain> there you go
16:34:07 <glx> I'll wait for missing files before svn up ;)
16:34:36 <DorpsGek> SVN: truebrain (r748) -Fix (r747): MSVC project file update, svn propsets
16:36:37 <TrueBrain> for some reason, 'resetBlink' was inverted from what I expected ...
16:37:39 <TrueBrain> 6D59 is a colour, but it is either a special colour, or just 'background' colour
16:37:42 <TrueBrain> we will have to see and wait :)
16:38:41 <TrueBrain> k, next is edit box handling itself, see if I can figure something out there
16:38:49 <glx> still fighting with 07C4 :)
16:39:11 <glx> it even fails at the begin
16:39:19 <TrueBrain> I am not going to help you with rcl :p It sucks ;)
16:39:35 <TrueBrain> (and mostly is related with a randomizer or crypt :p)
16:39:35 <glx> it's way before that stuff :)
16:39:43 <TrueBrain> ah ;) What are you stuck at then?
16:40:47 <glx> I'm going step by step now to check where I'm wrong
16:41:00 <TrueBrain> k; good luck
16:41:07 <TrueBrain> dont forget to check your emu_cs when doing that trick ;)
16:41:37 <glx> yup :)
16:43:34 <glx> oh stupid me
16:43:48 <glx> wrong offset for params
16:44:08 <glx> I used 0, 2, 4, 8
16:44:14 <glx> it's 0, 2, 4, 6 ;)
16:44:39 <TrueBrain> it is not a power of 2, no :p
16:45:00 <glx> with 6 it works
16:46:17 <glx> brain has weird reflexes ;)
16:52:17 <glx> http://glx.dnsalias.net:8080/opendune/temp.patch <-- working :)
16:52:26 <glx> but not really readable yet
17:15:20 <TrueBrain> stuff to do, stuff to do .. ;)
17:15:45 <TrueBrain> don't forget to bind an array on 07CA:000A :)
17:34:37 <glx> http://glx.dnsalias.net:8080/opendune/temp.patch like that ?
17:39:57 <TrueBrain> if you add a space between uint8 and *, yes :p
17:40:26 <glx> always the space :)
17:40:36 <TrueBrain> at least you are consistant ;)
17:40:46 <TrueBrain> index ++;
17:40:49 <TrueBrain> space too much! :o
17:41:36 <glx> leftover of += something
17:42:08 <TrueBrain> you can now also make this routine much more readable
17:42:15 <TrueBrain> first calculate dx and dy
17:42:29 <TrueBrain> if dy < 0, index = 2, else 0
17:42:33 <TrueBrain> if dx < 0, index += 1
17:43:00 <glx> yes I already did a simplification pass
17:43:13 <TrueBrain> if dx >= dy, index *= 4, and if dx / 2 > dy, index += 1
17:43:26 <TrueBrain> else index *= 4, index += 2, and if dy / 2 > dx, index += 1
17:43:59 <TrueBrain> if I am not wrong, this gives 16 possible values
17:44:13 <TrueBrain> all shifts can be avoided
17:44:24 <glx> yup I calculated the max value and it's 0xF :)
17:44:38 <TrueBrain> if (dy < 0) SetBit(index, 4)
17:44:43 <TrueBrain> if (dx < 0) SetBit(index, 3)
17:45:08 <TrueBrain> if (dx / 2 > y) SetBit(index, 1)
17:45:16 <TrueBrain> if (dy / 2 > dx) SetBit(index, 2), Setbit(index, 1)
17:45:18 <TrueBrain> or something
17:45:47 <TrueBrain> either way, I guess it gives an index in which direction two tiles are
17:45:56 <TrueBrain> ranging from (-1, -1) to (1, 1)
17:46:36 <TrueBrain> so I also think the incoming values are tile32
17:47:39 <glx> they are getX and getY :)
17:47:56 <glx> emu_Tile_GetPackX and emu_Tile_GetPackY
17:48:18 <TrueBrain> oh, it is only called by 0F3F :p That explains ;)
17:48:41 <glx> 0F3F does all math related to tile distances
17:49:20 <TrueBrain> 01 02 01 00 / 07 06 07 00 / 03 02 03 04 / 05 06 05 04
17:49:26 <TrueBrain> I love to be right :)
17:51:11 <TrueBrain> it indeed shows the direction between 2 tiles
17:52:24 <TrueBrain> dx > dy only try if dx = 1, dy = 0
17:52:46 <TrueBrain> hmm ..
17:52:53 <TrueBrain> ah, >=
17:53:01 <TrueBrain> dx >= dy only true if dx = 0,1 and dy = 0
17:53:10 <TrueBrain> dx / 2 > dy only true if dx = 1 and dy = 0
17:53:32 <TrueBrain> first is left, second is left-lower
17:53:43 <TrueBrain> if dx was negative, it is right or right-lower
17:53:46 <TrueBrain> this is nice :)
17:53:57 <TrueBrain> euh, right and left should be the other way around :p
18:01:31 <glx> refreshed
18:01:55 <TrueBrain> ++dx -> (dx + 1)
18:01:58 <TrueBrain> much nicer to read
18:03:23 <TrueBrain> can you add the above sequence of return values hardcoded, and use them?
18:03:29 <TrueBrain> so we no longer depend on the 'cs' info?
18:03:34 <TrueBrain> at least I assume they are constant :)
18:03:52 <TrueBrain> yeah, it is :)
18:04:16 <glx> yes a search for 0x07C4 says it's constant :)
18:10:08 <TrueBrain> knowing the Font_GetWidth does help A LOT :p
18:10:10 <TrueBrain> ghehe
18:10:42 <TrueBrain> I also see nobody took the effort to make a REALLY long savegame name
18:18:03 <glx> refreshed
18:18:31 * TrueBrain likes :)
18:18:50 <TrueBrain> I guess the values can be calculated easier, but lets not go there for now :p
18:18:59 <glx> hehe
18:19:03 <glx> probably yes
18:19:11 <TrueBrain> make sure to test this btw ;) :p
18:19:35 <glx> I tested, and got similar visual result on my A7 save
18:19:43 <TrueBrain> good :)
18:19:48 <glx> ie ordos still destroyin my base :)
18:22:08 <TrueBrain> f__10E4_1EF1_0040_01F8 <- DrawText
18:22:12 <TrueBrain> (my best guess for now :p)
18:22:56 <TrueBrain> params: csip32 text, x, y, colour1, colour2, unknown
18:23:01 <TrueBrain> I love guessing :)
18:23:36 <glx> f__10E4_09AB_0031_5E8E <-- DrawStatusText ;)
18:23:50 <glx> or a wrapper around that
18:24:07 <TrueBrain> yeah
18:24:31 <TrueBrain> k, I only have to rewrite the internals of the edit box, that is: the loop
18:25:49 <DorpsGek> SVN: glx (r749) -Add: C-ified all f__07C4 functions
18:29:39 <TrueBrain> I am so going to fuck up parameters :p
18:30:26 <glx> you still mix their order ?
18:30:47 <TrueBrain> it is just hard ...
18:30:48 <TrueBrain> from bp to sp
18:30:50 <TrueBrain> then to name
18:30:51 <TrueBrain> pff
18:30:55 <TrueBrain> I should learn to mass-rename
18:34:55 <TrueBrain> it seems there is one control type that we never hit in the edit box
18:36:01 <TrueBrain> nu clue which :p But there is an array with 4, and only 3 in the case ...
18:41:13 <TrueBrain> names can't start with a space :p
18:41:31 <glx> where?
18:41:40 <TrueBrain> savegame names
18:41:46 <TrueBrain> (well, any editbox)
18:41:50 *** boekabart has quit IRC
18:41:51 *** boekabart has joined #openDune
18:43:11 <glx> @base 10 16 [calc 0x26 - 0x12]
18:43:11 <DorpsGek> glx: 14
18:46:18 <glx> hmm how to name a function returning script->variables[4] of an object (structure or unit) ?
18:46:50 <TrueBrain> I dunno ... I think those variables are very predefined, but not sure what yet
18:46:54 <TrueBrain> so .. GetVariable4?
18:46:54 <glx> we need C++ and subclassing :)
18:46:57 <TrueBrain> :p
18:51:30 <TrueBrain> somewhere, I made a boo-hoo :p
18:51:32 <TrueBrain> hihi
18:53:19 <Alberth> Program Termination: jumped to 176C:21AD, which is not decompiled.
18:53:19 <Alberth> The jump was triggered at decompiled/cs__176C.c:3417
18:53:19 <Alberth> The jump appears to originate from 176C:21AD.
18:54:01 <Alberth> http://devs.openttd.org/~alberth/crash.bin in case you need it again :)
18:54:07 <TrueBrain> stored
18:56:10 <Alberth> I'd guess somebody has played Atreides 6 before
18:56:58 <TrueBrain> it is the first time someone did something while a structure was expecting something
18:57:16 <TrueBrain> script function
18:57:30 <glx> yes 176C are script ;)
18:59:02 <TrueBrain> clever ... backspace does not remove the char (gfx wise), but the cursor is drawn over it :p
19:02:02 <Alberth> nowadays we simply render the entire window again :p
19:02:24 <TrueBrain> rarely efficient :p
19:02:43 <glx> http://glx.dnsalias.net:8080/opendune/temp.patch <-- maybe naming is too descriptive :)
19:03:04 <TrueBrain> IsGet
19:03:05 <TrueBrain> what is it? :p
19:03:40 <TrueBrain> either IsScriptVariable4NotNull or IsSetScriptVariable4
19:03:52 <TrueBrain> maybe even IsNotNullScriptVariable4
19:04:03 <TrueBrain> but okay, IsGet is silly :p
19:04:21 <glx> fixed
19:04:34 <TrueBrain> fine by me :)
19:06:46 <DorpsGek> SVN: glx (r750) -Add: named two more functions
19:07:24 <TrueBrain> the special keys are: 0x0F (backspace), 0x2B (no clue) and 0x6E (never pressed)
19:18:29 <TrueBrain> hmmm .. saving a game fails for me ... dunno why :p
19:19:00 <TrueBrain> seems to be my patch .. dunno why :(
19:36:46 <TrueBrain> http://devs.opendune.org/~truebrain/temp.patch
19:37:17 <TrueBrain> it works .. I hope I did it correct :)
19:38:56 <TrueBrain> minor update
19:39:15 <TrueBrain> mind reading glx? :)
19:39:21 <TrueBrain> I am back in a few or so :)
19:56:13 <glx> was eating
19:57:55 <glx> hmm big function
20:34:49 *** Alberth has left #openDune
20:53:37 <TrueBrain> there was no rush; it was only a request :)
20:54:04 <glx> I'm around l__0042 :)
20:54:26 <TrueBrain> lol
20:55:49 <glx> hmm l__0142 ;)
21:11:30 <glx> ok done
21:11:34 <glx> looks correct
21:11:44 <glx> hard to follow some stuff though
21:13:08 <TrueBrain> I am most interest if the new C code is good enough :)
21:18:52 <glx> uknown3 is a callback I think
21:19:34 <TrueBrain> yes,b ut I didn't know what kind of callback :(
21:23:04 <glx> anyway the code is good
21:23:12 <TrueBrain> k, tnx
21:26:16 <DorpsGek> SVN: truebrain (r751) -Add: C-ify emu_GUI_EditBox(), and name a few functions
21:26:56 <TrueBrain> this should be enough way into the GUI stuff :)
21:59:50 <glx> is it me or is there some dead code in f__0F78_01B4_0016_23DD() ?
22:00:36 <TrueBrain> I don't see anything weird
22:00:37 <glx> or unneeded test
22:00:38 <TrueBrain> what do you mean?
22:00:56 <TrueBrain> yes, the tests are a bit wierd
22:01:01 <TrueBrain> but that is the compiler :)
22:01:06 <glx> if (a != b) {if (a == b)
22:01:19 <TrueBrain> it is like: for (i = 0; i < a; i++) {} if (i == a) { ... }
22:02:11 <TrueBrain> no, that is not true .. it is like: if (i != a) {} if (i != 0xFFFF && i != a) {}
22:02:32 <TrueBrain> oh, that test .. lol
22:02:36 <TrueBrain> completely looked over it :p
22:02:56 <TrueBrain> still, it is: if (i != a) { if (i != a) {} }
22:04:48 <glx> 3 imbricated tests ;)
22:05:09 <TrueBrain> its a bit silly, yes
22:06:04 <glx> and the called function don't change emu_si :)
22:07:15 <glx> btw some global variables are indeed local static variables
22:09:28 <TrueBrain> it seems drawing is rather simple
22:12:57 <glx> ok I'll convert all 0F78
22:14:28 <TrueBrain> I am trying to figure out the details of 22A6 stuff :p
22:21:40 <TrueBrain> 22A6 has all the data in its own segment, static variables
22:29:32 <TrueBrain> 2 options there: translate the functions, or look at the usage .. hmm ..
22:31:15 <TrueBrain> glx: any idea where 353F:6668 is set?
22:31:28 <glx> it's never set
22:31:34 <glx> looks like static data
22:32:04 <TrueBrain> either a very poor compiler/linker, or something fishy ..
22:34:40 <TrueBrain> so what they had, was an array of function pointers
22:34:46 <TrueBrain> or a struct, doesn't really matter
22:34:59 <TrueBrain> and they used that to call those functions, indirect
22:35:05 <TrueBrain> most likely to keep the GUI modular
22:35:21 <TrueBrain> I can see how that can be useful, but it suprises me for an application from that time
22:36:31 <glx> oh like openttd does for SDL calls on windows
22:36:50 <glx> though we do it because dynamic loading ;)
22:37:00 <TrueBrain> yup; as I said: poor linker ;)
22:38:49 <TrueBrain> but, it makes it easier for us
22:38:54 <TrueBrain> first of, no real need for those asserts
22:38:57 <TrueBrain> it won't change in our case
22:39:14 <TrueBrain> second, we know that all those pointers indicate a GUI thing
22:39:28 <TrueBrain> assuming most are primitives, we can expect: line, text, pixel, ...
22:39:41 <TrueBrain> but okay, something for another day :) Nightynight
22:44:17 <glx> and that may explain why some are never called
22:45:28 *** tneo has quit IRC
22:45:35 *** tneo has joined #openDune
22:45:53 *** SmatZ has quit IRC
22:46:04 *** SmatZ has joined #openDune