IRC logs for #opendune on OFTC at 2010-10-26
            
01:22:58 *** Xaroth has quit IRC
01:56:07 *** Xaroth has joined #openDune
01:56:07 *** ChanServ sets mode: +o Xaroth
02:39:30 *** Xaroth_ has joined #openDune
02:42:05 *** Xaroth has quit IRC
03:05:48 *** glx has quit IRC
09:31:12 <Xaroth|Work> @calc 1042407 / 1024
09:31:12 <DorpsGek> Xaroth|Work: 1017.97558594
12:17:10 *** glx has joined #openDune
12:17:10 *** ChanServ sets mode: +o glx
12:18:26 <glx> hello
12:21:03 <Xaroth|Work> o/
12:26:43 <glx> http://svn.opendune.org/~glx/temp.patch <-- my current work
12:29:49 <TrueBrain> nice :D
12:31:25 <glx> my problem is the comments :)
12:34:48 <glx> loc02 += emu_get_memory16(0x2DCE, u->variable_6C * 4, 0x0);
12:34:48 <glx> loc04 += emu_get_memory16(0x2DCE, u->variable_6C * 4, 0x2);
12:34:48 <glx> these 2 0x2DCE accesses are weird
12:35:07 <TrueBrain> why?
12:36:26 <glx> sprites are at 2DCE:0440, but these accesses are on 2DCE:0000 and are the only accesses I can find in all the source
12:36:41 <TrueBrain> so most likely there is a table there of some kind?
12:37:52 <TrueBrain> otherwise: conversion error?
12:37:54 <TrueBrain> dune2 bug?
12:40:30 <glx> it's not a conversion error for sure :)
12:40:37 <glx> I double checked it ;)
12:40:56 <TrueBrain> check where it is called from, and see what the values are?
12:41:01 <TrueBrain> (runtime)
12:41:29 <glx> well loc02 and loc04 are X,Y pos in viewport
12:41:40 <TrueBrain> so icons width/height?
12:42:12 <glx> and u->variable_6C was 0 each time I checked in debugger
12:42:25 <TrueBrain> also for harvester?
12:43:30 <glx> if ((ui->variable_36 & 0x10) != 0 && unit->o.flags.s.unknown_4_0080) {
12:43:30 <glx> unit->variable_6C = Tools_Random_256() & 7;
12:43:30 <glx> }
12:43:30 <glx> but it seems it can be a random value between 0 and 7 :)
12:43:44 <TrueBrain> force the value to 1 or 2 or something
12:43:46 <TrueBrain> and see what it does
12:45:12 <TrueBrain> don't forget to rename 'unknown_4 to variable ;)
12:45:29 <glx> where ?
12:45:39 <TrueBrain> everywhere
12:45:42 <TrueBrain> the s.unknown_4_0080
12:45:49 <glx> oh
12:45:50 <TrueBrain> unknowns mean we haven't found a read/write yet
12:45:52 <TrueBrain> clearly you did :D
12:46:04 <glx> not related to my current work
12:46:19 <TrueBrain> fair enough :)
12:53:18 <glx> 0000 0000 0000 ffff 0001 0000 0000 ffff 0001 0000 0000 0000 0001 0000 0000 0000 <-- should indeed be a static table of (x,y) offsets (0,0) (0,-1) (1,0) (0,-1) (1,0) (0,0) (1,0) (0,0)
12:53:28 <glx> but no real clue
13:05:24 <TrueBrain> it draws units slightly off their real position?
13:06:59 <glx> yes
13:09:00 <TrueBrain> flying units maybe?
13:09:02 <TrueBrain> dunno ..
13:09:03 <TrueBrain> sounds weird :p
15:01:54 <DorpsGek> SVN: glx (r1161) -Add: C-ified Sprites_Load() and its callees, also introduce g_sprites and use it where needed
15:14:02 <DorpsGek> SVN: glx (r1162) -Fix (r1132): rename used unknown object flags to variable
15:23:30 <TrueBrain> I love how Dune uses a buffer before checking if it is NULL
15:29:54 <TrueBrain> @calc 0x140
15:29:54 <DorpsGek> TrueBrain: 320
15:35:41 <TrueBrain> if (!(emu_flags.sf != emu_flags.of)) goto l__05B8;
15:35:44 <TrueBrain> eeeeeeeeeuuuuuuuhhhhhhhhhh
15:36:00 <glx> >= 0 ?
15:36:17 <TrueBrain> so < 0
15:36:22 <TrueBrain> or not
15:36:24 <TrueBrain> euhm
15:36:25 <TrueBrain> no, you are right
15:36:27 <TrueBrain> >= 0 :)
15:36:43 <glx> sf != of is <0
15:37:07 <TrueBrain> if (A - B < 0) .. is identival to .... if (A < B) ?
15:37:10 <TrueBrain> argh, my brain hurts :p
15:37:15 <TrueBrain> yes, it should be
15:38:05 <TrueBrain> int16 loc08 = header->frameCurrent - var0A;
15:38:06 <TrueBrain> if (loc08 < 0) {
15:38:08 <TrueBrain> loc08 = -loc08;
15:38:09 <TrueBrain> }
15:38:11 <TrueBrain> serious clueless what is going on here
15:38:31 <glx> abs(header->frameCurrent - var0A)
15:38:42 <glx> but that's all I can tell :)
15:38:42 <TrueBrain> yeah, but what does it due
15:42:05 <TrueBrain> if ((int16)var0A > (int16)header->frameCurrent) {
15:42:07 <TrueBrain> loc0C = header->frames - var0A + header->frameCurrent;
15:42:08 <TrueBrain> right ...
15:42:10 <TrueBrain> no sense
15:42:11 <TrueBrain> no sense at all
15:45:24 <TrueBrain> if ((int16)header->frames <= var0A) return <- how the function starts
15:45:27 <TrueBrain> really .. weird ...
15:46:35 * glx returns to GUI_DrawSprite
15:46:38 <TrueBrain> and something that appears to be a bug ... euhm ... this is very odd ...
15:46:51 <glx> maybe I'll rename it Sprites_Draw ;)
15:47:05 <TrueBrain> if it really draws, GUI_ is nicer :)
15:47:30 <glx> for now I convert it in sprites.c, but it can be moved later
15:53:07 <TrueBrain> http://pastebin.com/8Bvazkfv
15:53:14 <TrueBrain> anyone mind .... telling me ... what the ... fuck?
15:54:24 <TrueBrain> ah, no
15:54:25 <TrueBrain> my mistake
15:54:27 <TrueBrain> pfew
15:57:24 <TrueBrain> ah! 'var0A' is 'animate to frame'
15:57:25 <TrueBrain> :)
15:57:35 <TrueBrain> which can be in the past :p
15:57:46 <TrueBrain> still the first return makes no sense :p
15:59:52 <TrueBrain> emu_ax = (var12 & 0xFF00) >> 14; <- Lol :D
16:02:31 <Xaroth|Work> thar
16:02:33 <Xaroth|Work> progress today
16:04:53 <TrueBrain> argh, this makes no sense :(
16:04:56 <TrueBrain> and it doesn't work :(
16:05:45 <TrueBrain> argh, it does, but I just need to think straight...
16:05:47 <TrueBrain> GRR
16:05:53 <Xaroth|Work> hehe
16:06:04 <Xaroth|Work> TrueBrain: constructive criticism on what I made is welcome :)
16:06:10 <TrueBrain> not atm :p
16:06:13 <TrueBrain> tonight maybe
16:06:20 <Xaroth|Work> no rush :)
16:07:05 <TrueBrain> I have a conversion error ... somewhere
16:07:10 <TrueBrain> much more important :p
16:09:21 <TrueBrain> WOEI!
16:09:23 <TrueBrain> I rule :D
16:09:25 <TrueBrain> segfault
16:09:27 <TrueBrain> lol
16:09:28 <TrueBrain> nevermind that :p
16:12:00 <TrueBrain> fixed :D
16:12:01 <TrueBrain> yippie
16:12:03 <TrueBrain> trallalaaaaaaa
16:14:07 <glx> grr I hate static variables
16:14:44 <TrueBrain> I have one WSA function left, which most likely does some decoding or xoring or what ever
16:14:51 <glx> especially when they are used by more than one function
16:15:14 <glx> (means I can't just put a static in my function)
16:16:31 <TrueBrain> :(
16:16:32 <TrueBrain> sucks indeed
16:16:39 <glx> hmm idea, a struct
16:17:03 <glx> like the g_global one
16:17:13 <glx> but local
16:17:17 <TrueBrain> ah, I think I understand this .. things can be looping ..
16:17:22 <TrueBrain> and it finds the quickest way to go to a certain frame
16:18:20 <glx> indeed there are animation loops (for sure there's one in startport description in mentat)
16:18:50 <TrueBrain> the mentat screen with the planet and stuff ;)
16:18:59 <glx> that too
16:19:01 <TrueBrain> but that it checks for the quickest route, that surprises me
16:19:12 <TrueBrain> then it just applies screen after screen
16:19:14 <TrueBrain> I believe in an xor
16:19:25 <TrueBrain> so: current frame <---> next frame
16:19:28 <TrueBrain> and it just xors till it is there
16:19:31 <TrueBrain> pretty nice
16:23:34 <TrueBrain> woei, I can name most of the flags :D
16:23:35 <TrueBrain> that is nice :)
16:24:01 <TrueBrain> tomorrow or tonight the last functio
16:24:03 <TrueBrain> n
16:24:05 <TrueBrain> for now: good evening :D
17:45:00 *** fjb is now known as Guest728
17:45:01 *** fjb has joined #openDune
17:52:33 *** Guest728 has quit IRC