IRC logs for #opendune on OFTC at 2010-10-31
            
00:33:40 *** glevans2 has quit IRC
00:42:12 *** glevans2 has joined #openDune
02:11:28 *** glx has quit IRC
13:12:20 *** glx has joined #openDune
13:12:20 *** ChanServ sets mode: +o glx
13:12:29 <TrueBrain> morning :)
13:12:42 <TrueBrain> going to convert 2AE1 .. only used by WSA, so can't wait to see what it does :p
13:12:43 <TrueBrain> lol
13:13:01 <glx> hello
13:47:42 <glx> something useful would be to find g_global->variable_4062 exact data :)
13:48:40 <glx> I think its x, y, width, height
13:49:44 <TrueBrain> g_global->variable_4062[13][1] = 160 - ((g_global->variable_41B8 * g_global->variable_6C71) >> 1);
13:49:52 <TrueBrain> 160 ... clearly it is either y or height :p
13:50:27 <TrueBrain> g_global->variable_4062[13][0] = 19 - (maxWidth >> 4); <- I still wonder why all thoes values are divided by 16 ..
13:50:30 <TrueBrain> @calc 19 * 16
13:50:30 <DorpsGek> TrueBrain: 304
13:50:42 <TrueBrain> euh, [1] is x or width :D
13:51:06 <glx> memBlock.s.ip = g_global->variable_4062[windowID][0] << 3;
13:51:06 <glx> buf = emu_get_memorycsip(memBlock);
13:51:06 <glx> if ((flags & 0x4000) == 0) posX -= g_global->variable_4062[windowID][0] << 3;
13:51:06 <glx> loc0E = g_global->variable_4062[windowID][2] << 3;
13:51:06 <glx> loc0A = g_global->variable_4062[windowID][1];
13:51:08 <glx> if ((flags & 0x4000) != 0) posY += g_global->variable_4062[windowID][1];
13:51:08 <glx> loc0C = g_global->variable_4062[windowID][1] + g_global->variable_4062[windowID][3];
13:51:40 <glx> for me it's x, y, width, height (based on the code I have)
13:53:16 <glx> and *8 because pixel is 8bit :)
13:53:33 <TrueBrain> somehow the windows are restricted in their position, it seems ..
13:54:11 <TrueBrain> lol, that is a far fetched assumption :)
13:54:20 <TrueBrain> the windows values are all divided by 16 in the x orientation
13:54:25 <TrueBrain> but mouse sensitivity is twice as much
13:54:36 <TrueBrain> so possible you are atm working with mouse coordinates? Dunno ...
13:55:03 <glx> well mouse cursor is a sprite too
13:55:19 <glx> but drawsprite is for all sprites
13:55:51 <TrueBrain> just all very weird :)
13:56:13 <glx> there should be something about the flags ;)
13:56:37 <TrueBrain> either way, 4062 holds information about window positions, yes :)
13:57:14 <TrueBrain> src/gui/*.c shows that enough times :)
13:57:16 <glx> oh and DrawSprite uses va_list :)
13:57:33 <TrueBrain> how nice ......
13:57:34 <glx> with values' type depending on flags
13:58:52 <glx> and I still have a "corruption" somewhere :(
13:59:03 <TrueBrain> :(
13:59:04 <TrueBrain> FIX IT!
14:00:00 <glx> I know what's wrong, I don't know why it is
14:01:17 <TrueBrain> had the same issue a few days ago :D
14:01:20 <TrueBrain> but you will find it, I am sure :)
14:02:27 <glx> I had corruption with ES:DI, became segfault when I converted ES:DI to uint8* ;)
14:02:52 <glx> and now I have asserts so I know when it happens
14:19:52 <TrueBrain> emu_subb(&emu_al, 0x80);
14:19:57 <TrueBrain> weird .. why not & 0x7F ..
14:54:20 <TrueBrain> if ((emu_flags.zf || emu_flags.sf != emu_flags.of)) goto l__0101;
14:55:05 <glx> <=0
15:36:59 <glx> I think I found my bug
15:37:13 <TrueBrain> me 2 :D
15:37:23 <glx> 16bit arithmetic can wrap on 32bit :)
15:38:45 <TrueBrain> I wonder why those decodes are called Format80 and Format40
15:38:49 <TrueBrain> see no reason for those names
15:38:59 <TrueBrain> but lets not fight it :)
15:39:07 <TrueBrain> enough confusion already
15:42:17 <glx> I think it's because "format" byte are 0x80, 0x40
15:44:18 <TrueBrain> which format bytes?
15:44:23 <TrueBrain> both use 0x40 and 0x80 ..
15:45:49 <glx> yeah, no crash \o/
15:48:57 <glx> hmm crash is back :(
15:52:45 <glx> ok fixed :)
16:58:44 <TrueBrain> what I really do not like, is when my code fails, but when I look at the code from libeastwood, it is identical .. well ... minus the fact my code is more readable :p
17:23:27 <TrueBrain> I don't see my mistake :(
17:46:22 *** fjb is now known as Guest1369
17:46:23 *** fjb has joined #openDune
17:53:13 *** Guest1369 has quit IRC
17:55:01 <glx> http://devs.opendune.org/~glx/temp.patch <-- for now it works
17:55:34 <TrueBrain> what are those non-static vars doing outside a scope?
17:58:14 <glx> subfunctions
17:59:29 <TrueBrain> make them static?
17:59:40 <TrueBrain> as now they are global, which I find a bit scary :)
18:00:02 <glx> cleaning is not finished :)
18:00:10 <TrueBrain> still completely puzzled why my new function doesn't work
18:00:12 <TrueBrain> I have no clue ...
18:00:56 <TrueBrain> ffss .....
18:01:00 <TrueBrain> I did everything correct
18:01:02 <TrueBrain> but ...
18:01:10 <TrueBrain> I had: if ((flag & 0x80) == 0) {} if (flag == 0) {}
18:01:15 <TrueBrain> forgot the first already avoids the second
18:01:44 <TrueBrain> its pretty :)
18:17:27 <TrueBrain> @calc 0x140
18:17:27 <DorpsGek> TrueBrain: 320
18:17:39 <TrueBrain> right ...
18:17:48 <TrueBrain> there is 1 algorithm which handles an image when there is a displaybuffer
18:17:55 <TrueBrain> but when it is drawn directly on the screen, special code is needed
18:18:04 <TrueBrain> as then it needs to go to the right lines
18:18:11 <TrueBrain> they made in total 3 functions to handle the decoding and do that
18:18:13 <TrueBrain> sigh ..
18:23:51 <TrueBrain> k .. 1 version for when there is a buffer, 2 for when there isn't, and a third which initializees the screen ... but when ther eis a buffer, it is never used .. weird ..
18:24:00 <TrueBrain> owh, maybe makes sense .. hmm .. this algorithm assumes a black underground
18:24:02 <TrueBrain> so yeah ..
18:24:18 <TrueBrain> but to reduce code, and increase readability, it might be an idea to just make a black box first
18:26:16 <TrueBrain> easiest is to avoid having WSAs without buffer ..
18:31:35 <TrueBrain> lets see if that is any problem ...
18:33:43 <TrueBrain> hahahahahaha
18:33:44 <TrueBrain> yes :D
18:33:46 <TrueBrain> lol
18:34:00 <TrueBrain> some WSAs follow images already existing :D
18:36:50 <TrueBrain> right, that is a bit of a nag then .. hmm ..
18:36:59 <TrueBrain> really don't feel like making 3 functions which are near-identical
18:37:08 <TrueBrain> but also don't feel like adding code to the function which makes it very slow
18:41:43 <DorpsGek> SVN: truebrain (r1169) -Add: C-ified Format40_Decode()
18:41:44 <TrueBrain> glx: please change the first and second parameter for your Format80_Decode() call. It was: source, dest. It is: dest, source. To make more sense :)
18:42:04 <TrueBrain> (you have one call of that function in your patch)
18:53:35 <glx> http://devs.opendune.org/~glx/temp.patch <-- subfunctions are now in the main function
18:53:50 <glx> (and it still works :) )
19:26:02 <Xaroth|Work> nice work, glx
21:07:21 *** Yexo has joined #openDune
21:07:21 *** ChanServ sets mode: +v Yexo