IRC logs for #opendune on OFTC at 2010-10-26
⏴ go to previous day
01:56:07 *** Xaroth has joined #openDune
01:56:07 *** ChanServ sets mode: +o Xaroth
02:39:30 *** Xaroth_ has joined #openDune
09:31:12 <Xaroth|Work> @calc 1042407 / 1024
09:31:12 <DorpsGek> Xaroth|Work: 1017.97558594
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: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:40:30 <glx> it's not a conversion error for sure :)
12:40:56 <TrueBrain> check where it is called from, and see what the values are?
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> 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:42 <TrueBrain> the s.unknown_4_0080
12:45:50 <TrueBrain> unknowns mean we haven't found a read/write yet
12:46:04 <glx> not related to my current work
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)
13:05:24 <TrueBrain> it draws units slightly off their real position?
13:09:00 <TrueBrain> flying units maybe?
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:35:41 <TrueBrain> if (!(emu_flags.sf != emu_flags.of)) goto l__05B8;
15:35:44 <TrueBrain> eeeeeeeeeuuuuuuuhhhhhhhhhh
15:37:07 <TrueBrain> if (A - B < 0) .. is identival to .... if (A < B) ?
15:37:10 <TrueBrain> argh, my brain hurts :p
15:38:05 <TrueBrain> int16 loc08 = header->frameCurrent - var0A;
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: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:14 <TrueBrain> anyone mind .... telling me ... what the ... fuck?
15:57:24 <TrueBrain> ah! 'var0A' is 'animate to frame'
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: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:06:04 <Xaroth|Work> TrueBrain: constructive criticism on what I made is welcome :)
16:07:05 <TrueBrain> I have a conversion error ... somewhere
16:07:10 <TrueBrain> much more important :p
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: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: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:23:34 <TrueBrain> woei, I can name most of the flags :D
16:24:01 <TrueBrain> tomorrow or tonight the last functio
16:24:05 <TrueBrain> for now: good evening :D
17:45:00 *** fjb is now known as Guest728
continue to next day ⏵