IRC logs for #opendune on OFTC at 2010-10-25
⏴ go to previous day
01:26:48 <DorpsGek> SVN: glx (r1154) -Add: C-ified Gameloop_IntroMenu()
02:50:04 <DorpsGek> SVN: glx (r1155) -Add: C-ified Font_LoadFile()
05:59:58 *** tolbin has joined #openDune
06:45:03 *** TinoDid|znc has joined #openDune
06:47:33 *** TinoDid|znc is now known as TinoDidriksen
09:26:16 *** gotodeb1 has joined #openDune
09:27:32 *** gotodeb1 has left #openDune
10:26:23 <TrueBrain> right, glx introduced the UTF-8 issues again :D
10:32:15 <DorpsGek> SVN: truebrain (r1156) -Fix (r1154): lets not kill our UTF-8 strings
11:27:25 <TrueBrain> if (var10 < 0) goto l__015A;
11:27:27 <TrueBrain> if (var10 == 0 && var0E <= 1) goto l__015A;
11:27:28 <TrueBrain> if (var10 > (loc18 >> 16)) goto l__015A;
11:27:30 <TrueBrain> if (var10 < (loc18 >> 16)) {} /* ?? */
11:27:31 <TrueBrain> if (var0E >= (loc18 & 0xFFFF)) goto l__015A;
11:44:02 <SmatZ> [13:27:26] <TrueBrain> if (var10 < (loc18 >> 16)) {} /* ?? */
11:44:19 <SmatZ> it looks like comparing two dwords
11:44:23 <TrueBrain> if (var0E > 1 && var0E < loc18) return 0;
11:44:26 <SmatZ> but this breaks the idea :)
11:44:27 <TrueBrain> is what those 5 lines really do :)
11:44:59 <TrueBrain> (where var0E and loc18 are dwords :)
11:45:17 <SmatZ> [13:27:26] <TrueBrain> if (var10 < (loc18 >> 16)) {} /* ?? */
11:45:19 <SmatZ> [13:27:28] <TrueBrain> if (var0E >= (loc18 & 0xFFFF)) goto l__015A;
11:45:29 <SmatZ> these are not executed after each other?
11:45:45 <SmatZ> is there some code missing?
11:45:46 <TrueBrain> the ?? goes to 'return 0'
11:45:58 <TrueBrain> gotos continue after the return 0
11:46:11 <TrueBrain> and yes, there was code missing from my snippet :D
11:46:34 <TrueBrain> it seems to compare if there is enough memory
11:46:40 <TrueBrain> which makes me totally clueless why it is <= 1
11:46:48 <TrueBrain> if there is 1 byte available, it no longer cares ..
12:20:34 <TrueBrain> when 2 channels light up green, glx is alive :D
12:20:40 <TrueBrain> glx: you killed the UTF-8 strings again :(
12:21:02 <TrueBrain> compiling fucked up terrible :p
12:21:06 <TrueBrain> was complaining about \0 :p
12:21:30 <glx> and I didn't check the diff correctly
12:21:32 <TrueBrain> but why do you use unix2dos?
12:21:54 <glx> sometimes I have different EOL style in files
12:22:33 <glx> it's MSVC, nothing I can do ;)
12:23:58 <glx> usually I use notepad++ to fix EOL when I have this problem, but this time I tried unix2dos, was a bad idea
12:24:25 <TrueBrain> well, I fixed it :p
12:24:37 <TrueBrain> was not simple, as vim doesn't understand UTF-8 here :p
12:44:17 <TrueBrain> hehe ... my latest patch makes sure I can't load a savegame
12:44:21 <TrueBrain> or is it my patch .. hmm ..
12:45:45 <glx> hmm I broke something again ?
12:45:50 <TrueBrain> loading no longer works :(
12:46:08 <glx> it worked last time I tried
12:46:24 <TrueBrain> it just goes back to the load menu
12:46:45 <glx> maybe the cleanup cleaned too much then
12:47:24 <TrueBrain> hitting 'cancel' also doesn't work
12:47:44 <TrueBrain> starting a new game doesn't work either
12:47:51 <TrueBrain> hangs on introduction .. that is, I select a house
12:47:56 <TrueBrain> I see the initial screen
12:49:03 <TrueBrain> intro also hangs in the middle of it
12:49:15 <glx> well cancel works if you don't try to load ;)
12:50:43 <TrueBrain> but it seems my WSA loader 'just' works
12:51:04 <TrueBrain> owh, no .. intro failure is due to a bug in there :D
12:53:37 <TrueBrain> ah, not that strange ...
12:53:43 <TrueBrain> I still have emu_bp calls :D
12:55:47 <glx> yeah I used a hack for those in my function
12:57:12 <TrueBrain> works perfect, in fact .. which is scary ...
12:58:14 <TrueBrain> ah, also fixes starting a new game :D
13:02:30 <TrueBrain> and I have to start making sense out of this function now :D
13:02:38 <TrueBrain> WSA has an option that is never used
13:02:41 <TrueBrain> I wonder what we should do with it ..
13:03:24 <TrueBrain> 1 is a type of file
13:03:30 <TrueBrain> the other is when you load a WSA without giving a buffer
13:03:37 <TrueBrain> I guess the latter is easy to fix
13:03:41 <TrueBrain> the first .. well .. it is never used :p
13:04:09 <DorpsGek> SVN: glx (r1157) -Fix (r1154): too much infinity in an infinite loop
13:04:47 <TrueBrain> tnx for the quick fix :D
13:05:41 <glx> it's so easy to miss a break in asm
13:06:12 <TrueBrain> ./* Unresolved jump */ emu_ip = 0x0060; emu_last_cs = 0xB52A; emu_last_ip = 0x0060; emu_last_length = 0x0030; emu_last_crc = 0x5D25; emu_call();
13:06:17 <TrueBrain> blegh ... how to resolve ... euuhh ..
13:06:35 <TrueBrain> it is in an overlay :(
13:07:09 <glx> I can use my skills to find the base for my script :)
13:08:31 <TrueBrain> well, if you can give any insight on it, please :)
13:09:35 <TrueBrain> there is one route where it might be used
13:09:41 <TrueBrain> it just never is .. but so it would be more safe to compile it :)
13:18:25 <TrueBrain> now via the decompiler :D :p :p
13:18:39 <glx> no need to use the decompiler ;)
13:22:47 <TrueBrain> emu_push(0); emu_push(0x300);
13:22:49 <TrueBrain> emu_push(var14.s.cs); emu_push(var14.s.ip);
13:22:52 <TrueBrain> emu_push(emu_cs); emu_push(0x0071); emu_cs = 0x1FB5; emu_File_Read();
13:22:53 <TrueBrain> /* Check if this overlay should be reloaded */
13:22:55 <TrueBrain> if (emu_cs == 0x352A) { overlay(0x352A, 1); }
13:23:34 <glx> the next line is } else { ;)
13:24:01 <TrueBrain> yeah, but not really :)
13:24:06 <TrueBrain> loc02 is set to 0 in that else{}
13:24:13 <TrueBrain> and loc02 is set to 0x300 in the if itself
13:24:18 <TrueBrain> so it is easier to do: uint16 loc02 = 0;
13:24:22 <TrueBrain> avoids the silly if :D
13:25:53 <TrueBrain> so now I need to decypher the file-header ...
13:26:15 <glx> I was just looking at this part of the code, not globally
13:48:42 <glx> dunno if it's a good idea
13:49:29 <TrueBrain> I tend to believe there is a reason there are wrappers
13:50:52 <TrueBrain> but your code looks nicer like this :p
13:57:40 <TrueBrain> the header is 18 bytes long, but the filelength is only corrected for 10 .. weird
14:07:04 <TrueBrain> glx: can you also dump 0x165 of the same function?
14:07:44 <glx> already done (I dumped the complete function)
14:08:09 <TrueBrain> oops, missed that :D
14:09:55 <glx> refreshed my patch, I think it's a better version
14:11:09 <TrueBrain> omg, the missing piece is HUGE
14:12:00 <glx> and there are calls in it
14:12:43 <glx> with no 0x140 calls outside the missing piece
14:14:04 <glx> only part with functions at 0004 and 0334 :)
14:16:52 <glx> f__23E1_0334_000B_CF65() is available memory check
14:17:36 <TrueBrain> } else if (var0E == 1) {
14:17:39 <TrueBrain> } else if (var0E >= loc14) {
14:18:28 <TrueBrain> and 0004 is malloc, I guess
14:18:42 <TrueBrain> was what I expected from this function
14:18:51 <glx> but keep the 23E1 calls for now :)
14:18:51 <TrueBrain> don't want to convert it completely, just wantd to make sure it does what I was assuming :p
14:19:09 <glx> because XMS is allocated there too IIRC
14:19:16 <TrueBrain> yeah, not going to implement it at all
14:31:21 <TrueBrain> fuck, my conversion is wrong :(
14:33:12 <TrueBrain> the endless question what I did wrong .. :p
14:37:37 <TrueBrain> I should have saved my in-between version :(
14:44:32 <zear> i see a couple of new commits in the recent days :)
14:44:52 <glx> and many are fixes for recent commits ;)
14:45:08 <Xaroth|Work> so they had to fix it :P
14:46:41 <zear> does "-Add: C-ified Gameloop_IntroMenu()" mean intro is finally handled by the game rather than by libemu?
14:50:32 <DorpsGek> SVN: glx (r1158) -Add: C-ification and unification of wrappers around g_global->variable_76B8
15:07:05 <TrueBrain> right, I flipped LSB and MSB :(
15:26:38 <TrueBrain> right ... naming vars is HARD
15:52:06 <TrueBrain> right, the documentation on WSA format is faulty
15:54:30 <DorpsGek> SVN: glx (r1159) -Add: C-ification of Input_Flags_[Clear|Set]Bits()
15:58:16 <TrueBrain> nevermind, found your source
15:58:18 <TrueBrain> I don't agree with it :D
15:58:48 <TrueBrain> it assigns bytes to a 'delta' value, which indicates the 'speed'
15:58:54 <TrueBrain> but .. it is used as size-to-read
16:20:59 <DorpsGek> SVN: glx (r1160) -Add: named 2 more functions
16:21:16 <glx> I should have done that a long time ago :)
17:06:31 <TrueBrain> right, I am going to continue with WSA before committing this
17:06:40 <TrueBrain> it does work, but so many unknown .. dunno :)
17:15:27 <TrueBrain> only thing f__B52A_07A5_0010_C5C7() does, is add 2 csips in a safe way ..
17:15:34 <TrueBrain> fucking annoying to translate it nicely :)
17:44:50 *** fjb is now known as Guest594
19:26:28 <TrueBrain> 2 (big) functions left
19:51:08 <glx> it seems BTTN.ENG contains sprites
19:51:37 <glx> at least it is loaded like .shp files
19:54:17 <glx> 2DCE:0440 is an array of csip
19:54:55 <glx> we somehow already knew that :)
continue to next day ⏵