IRC logs for #opendune on OFTC at 2011-06-23
⏴ go to previous day
00:30:34 *** fjb is now known as Guest5789
14:12:58 <DorpsGek> SVN: glx (r1905) -Fix: remove csip that should be removed
14:44:08 <DorpsGek> SVN: glx (r1906) -Fix (r1830): some ugly hacks were still present
14:45:52 <glx> I haven't notice it but it was modifying hitpoints ;)
15:27:50 <DorpsGek> SVN: glx (r1907) -Fix: removed more csip
15:28:07 <glx> (replaced some with emu_Global_GetCSIP() though)
15:28:32 <glx> but at least csip are only where needed
15:31:45 <TrueBrain> there is one entry we need to keep in mind ..
15:31:52 <TrueBrain> g_global->variable_2<something>[7]
15:31:56 <TrueBrain> it contains 7 static widgets
15:32:01 <TrueBrain> well, pointers to them
15:32:07 <TrueBrain> never set, so I guess it is preallocated
15:32:19 <TrueBrain> otherwise, it seems Widget can change in size now
15:32:24 <TrueBrain> (which means ->parent and ->next :p)
15:33:31 <glx> for me the size doesn't change if I replace with a pointer ;)
15:36:04 <glx> 0x00bf7b05 {s={...} csip=0x353f2859 }
15:36:04 <glx> [0x0]: {s={...} csip=0x353f2859 }
15:36:04 <glx> [0x1]: {s={...} csip=0x353f2895 }
15:36:04 <glx> [0x2]: {s={...} csip=0x353f28d1 }
15:36:06 <glx> [0x3]: {s={...} csip=0x353f290d }
15:36:06 <glx> [0x4]: {s={...} csip=0x353f2949 }
15:36:08 <glx> [0x5]: {s={...} csip=0x353f2985 }
15:36:08 <glx> [0x6]: {s={...} csip=0x353f29c1 }
15:37:35 <glx> let me update global.h :)
15:39:13 <TrueBrain> I couldn't get them out yet, because of the many csip deps still there :P
15:53:30 <DorpsGek> SVN: glx (r1908) -Add: found more widgets in g_global
15:54:35 <TrueBrain> how did it go from 7 to 9?
15:55:00 <glx> there was 2 other widgets after it for arrows in saveload window
15:55:33 <TrueBrain> so this one can grow now with .. 7 * 4 bytes
15:55:41 <TrueBrain> that is ... euh .. 3 bytes each
15:55:46 <TrueBrain> need a tiny bit more :D
15:55:56 <TrueBrain> guess the Desc will have to give :D
15:56:12 <TrueBrain> as I was thinking, if we move this static array (still in 16bit) a bit, so we can change the csip to pointers
15:56:14 <glx> for me a sizeof(void*) == sizeof(csip32)
15:56:17 <TrueBrain> it would make patches more clear
15:56:29 <TrueBrain> for you, yes; but you are not alone :D
15:57:13 <glx> let's try moving the widgets before the WindowDesc (to see what happens)
15:57:48 <TrueBrain> if I am not mistaken, the rest are all sizeof(Widget)
15:57:52 <TrueBrain> so they should just scale with it
15:58:19 <glx> ok moving it inside g_global failed
15:58:55 <glx> looks like there are some default values in them
15:59:06 <TrueBrain> that would be terrible
15:59:19 <TrueBrain> also just realised that my idea won't work; for you sizeof(Widget) is different than for me :P
15:59:32 <glx> arrows not displayed, and assert
15:59:39 <TrueBrain> can you dump the content?
16:06:34 <TrueBrain> guess gdb should understand the structure
16:06:39 <TrueBrain> I am too lazy to boot my linux atm :D
16:10:34 <glx> seems the problem is clickProc
16:10:45 <TrueBrain> so we need to put them in a table :D
16:11:40 <glx> or just peek the important ones and put them at the right place
16:12:07 <TrueBrain> I am surprised the Unknown value has data
16:12:10 <TrueBrain> as clearly it is never used :D
16:13:37 <glx> oh nice even colours are default
16:13:51 <glx> we'll need to printf widgets :(
16:14:51 <TrueBrain> I am out for dinner and a movie
16:14:53 <TrueBrain> back in a few hours
16:15:13 <glx> ok I'll add table/widgets.c then
16:18:15 *** Alberth has joined #openDune
16:18:15 *** ChanServ sets mode: +o Alberth
17:08:21 <DorpsGek> SVN: glx (r1909) -Add: extracted g_global->windowWidgets into table (not used yet)
17:10:28 <Alberth> you seem to make nice progress with the widgets
17:10:50 <TrueBrain> almost ready to put it in 32bit/64bit world
17:11:02 <TrueBrain> which is another HUGE milestone
17:11:13 <TrueBrain> as then I think all big structures are moved from the 16bit world
17:11:39 <TrueBrain> the next best big thing is save/load I think
17:11:46 <TrueBrain> then it starts to run thin :D
17:11:51 <Alberth> yeah, each time I look g_global gets more and more empty :)
17:13:57 <glx> I'm converting w->next now
17:15:35 <TrueBrain> do w->parent too :P
17:15:45 <TrueBrain> well, first I would say, test it by removing the PACK stuff from Widget
17:15:58 <TrueBrain> as that will heavily disalign everything even on your system :D
17:17:46 <glx> ha you mean scrollbar->parent
17:18:07 <Xaroth|Work> that'd be sweet :P
17:19:46 <TrueBrain> glx: I meant all csips left there :D
17:22:55 <glx> I won't do all at the same time :)
17:23:02 <glx> too easy to make a mistake ;)
17:26:07 <TrueBrain> right, now it is time for that movie :D
18:31:02 <Alberth> (as in, I was testing a (I think) good patch)
18:56:54 <DorpsGek> SVN: glx (r1910) -Add: replaced WidgetScrollbar->parent, Widget->next and Widget->scrollbar csip32 with pointers (also renamed scrollbar to data as it's not always a scrollbar)
19:04:36 <glx> grr wanted to do w->clickProc
19:04:52 <glx> but I can't because WidgetClickInfo
19:16:11 <Alberth> bummer, not nicely reproducable :(
19:16:11 <Alberth> I also suddenly had a trike in the middle of enemy territory, and I suddenly got a new harvester. Also not reproducable, of course :(
19:17:15 <Alberth> without, clean trunk, except from a hg mirror, but that is most likely not of influence
19:33:31 <glx> for widgets it's even more fun (drawProc can be a function or a sprite)
19:33:58 <glx> and maybe a text (I need to check that)
19:34:36 <glx> ha yes it can be a text :)
19:59:32 <DorpsGek> SVN: alberth (r1911) -Codechange (r1749): Also remove now unused global data.
20:27:09 <TrueBrain> the bad thing is, that glx is doing what I planned to do tonight :D Now what shall I do then .. hmm ...
20:27:17 <TrueBrain> iene mienie minie mo
20:27:34 <glx> TrueBrain: feel free to do widget->drawProc :)
20:28:13 <TrueBrain> you doing the ClickInfo then
20:28:14 <glx> maybe I should typedef the function pointer type
20:28:35 <DorpsGek> SVN: alberth (r1912) -Add: Remove some write-only global variables.
20:32:01 <Alberth> you can kill src/unknown/emu_2903.c :)
20:34:13 <TrueBrain> I know it doesn't matter for the C side, but I like it more when it reads ScrollbarDrawProc *drawProc, personally
20:34:28 <TrueBrain> same as &GUI_Mentat_Scrollbar_Draw
20:34:40 <TrueBrain> I like to know what are pointers
20:39:37 <DorpsGek> SVN: truebrain (r1913) -Fix (rIamlazy): somehow this file never got committed
20:40:35 <glx> of course I didn't check with gcc (updated again)
20:43:06 <TrueBrain> if you move it you no longer need struct Widget :D
20:44:51 <DorpsGek> SVN: truebrain (r1914) -Fix: remove now useless comments and realign everything
20:44:58 <TrueBrain> shit; sorry glx, this will collide with your patch
20:45:04 <TrueBrain> realised that the moment I hit commit :(
20:47:41 <DorpsGek> SVN: truebrain (r1915) -Fix: comment the WindowDesc
20:47:55 <TrueBrain> I so hate documenting :(
20:48:52 <TrueBrain> DrawProc will need to be an union btw
20:49:16 <TrueBrain> want me to do that now, or will that collide with your work?
20:49:34 <glx> I commit and you can do it :)
20:50:41 <DorpsGek> SVN: glx (r1916) -Add: use a real pointer for WidgetScrollbar->drawProc
20:52:38 <glx> (and clickProc while at it)
21:04:39 <TrueBrain> C is giving me a hard time
21:04:47 <TrueBrain> void (*proc)(struct Widget *)
21:04:52 <TrueBrain> what is wrong with that in an union?
21:05:40 <glx> should be ok (it was when I tried)
21:06:13 <TrueBrain> warning: 'struct Widget' declared inside parameter list its scope is only this definition or declaration, which is probably not what you want
21:06:17 <TrueBrain> wel, it is, but I dislike warnings more
21:07:18 <glx> bool (*proc)(struct Widget *);
21:07:18 <glx> } drawProcNormal; /*!< Draw proc when normal. */
21:07:36 <TrueBrain> but that requires repeating
21:07:57 <glx> you can typedef it I guess
21:08:04 <TrueBrain> and then gcc give above warning
21:08:27 <glx> just add struct Widget; before it
21:08:47 <TrueBrain> owh, it does, if I also keep struct Widget in param list
21:08:49 <TrueBrain> that is just wrong ...
21:10:15 <TrueBrain> ugh, of course table/widget.c now starts to scream
21:11:43 <TrueBrain> ha, that was easy :D
21:11:46 <glx> typedef bool (WidgetDrawProcCustom)(struct Widget *);
21:11:48 <glx> WidgetDrawProcCustom *proc;
21:12:01 <TrueBrain> yeah, you have to repeat the struct, which is silly
21:12:04 <TrueBrain> but okay, I got it :)
21:16:18 <TrueBrain> euh, because the first item is an uint16
21:16:47 <TrueBrain> renamed Proc to Parameter
21:16:49 <TrueBrain> to make more sense :D
21:18:10 <glx> yes it's often not a proc :)
21:19:27 <TrueBrain> did I miss anything?
21:20:53 <glx> drawMode = w->drawModeDown;
21:20:53 <glx> - drawProc = w->drawProcDown;
21:20:53 <glx> + drawParam = w->drawParameterDown;
21:20:53 <glx> fgColour = w->fgColourDown;
21:20:53 <glx> bgColour = w->bgColourDown;
21:21:44 <glx> ho and wrong align in WidgetDrawParameter too
21:22:41 <TrueBrain> ugh, realised I did make one mistake regarding aligning
21:23:50 <glx> in WidgetDrawParameter declaration
21:24:55 <glx> and others are in GUI_Widget_Draw
21:25:55 <DorpsGek> SVN: truebrain (r1917) -Add: introducing WidgetDrawParameter, and realigning some minor stuff (our tab-size is 4 spaces)
21:26:47 <TrueBrain> then wiki needs fixing :P
21:26:50 <TrueBrain> I always had it at 8
21:27:26 <TrueBrain> indeed, wiki says 8
21:27:34 <TrueBrain> (not that it really matters btw :p)
21:27:44 <glx> 8 is way too big for me :)
21:27:59 <TrueBrain> Xaroth|Work: can you edit the wiki? :P (lost my login details)
21:39:54 <DorpsGek> SVN: truebrain (r1918) -Fix: some more csip-moving-to-higher-layer stuff
21:42:50 <glx> src/gui/widget.c:551:22: warning: 'drawParam1.sprite' may be used uninitialized in this function
21:44:11 <DorpsGek> SVN: truebrain (r1919) -Fix: hopefully silent a gcc warning
21:45:22 <TrueBrain> with clickProc you also fix MakeSelect to do what it has to do?
21:46:26 <glx> yes I'll just use w->clickProc(w)
21:46:49 <DorpsGek> SVN: truebrain (r1920) -Fix: one less csip
21:48:07 <glx> ok time to do some printfs
21:48:13 <Xaroth|Work> TrueBrain: I can, I think
21:48:30 <glx> luckily WidgetClickInfo is small
21:48:51 <TrueBrain> glx: if you finish your patch, most emu_ shit is gone; only a few unknown case statements I am not sure what to do with, g_sprite stuff, and raw memory access :)
21:48:55 <TrueBrain> Xaroth|Work: cheers
21:49:43 <TrueBrain> just 166 csip32s left :D
21:50:57 <TrueBrain> of which most is in sound btw
21:53:22 <TrueBrain> all g_sprites have a emu_get_memorycsip around them, or otherwise they are directly related to assignment
21:53:25 <TrueBrain> so we can covert that one too now
22:14:21 <TrueBrain> right ... in input initialization it checks how all keys are etc etc
22:14:27 <TrueBrain> but .. we never set them in the first place :p
22:14:29 <TrueBrain> kinda just want to remove them
22:18:42 <glx> grr there was another hidded WidgetInfo
22:18:55 <DorpsGek> SVN: truebrain (r1921) -Add: C-ified Input_Init and Input_Uninit; we ignored the part where it checks for the initial state of the input, as libemu ensures it is always zero
22:19:59 <glx> the fun is WidgetInfo looks like WidgetClickInfo, just args are in a different order ;)
22:22:47 <DorpsGek> SVN: truebrain (r1922) -Fix: libemu never triggers int23, so why bother initializing anything on it
22:37:32 <TrueBrain> I stopped trying to figure out some of this code; it is triggered on special keycombinations
22:37:35 <TrueBrain> we don't trigger them
22:37:38 <TrueBrain> so I can't be arshed
22:51:59 <TrueBrain> meh .. most keys work
22:52:02 <TrueBrain> rest we can figure out later :P
22:55:49 <TrueBrain> keypad is not correct anymore :D
22:56:20 <TrueBrain> okay, that is not really acceptable
22:56:24 <TrueBrain> bah .. need to retry then :D
23:11:23 <glx> w->clickProc.csip = 0x35200043; <-- nice this one is not decompiled
23:11:34 <TrueBrain> so it never happened :D
23:14:09 <glx> 0x3520003E and 0x35200039 too
23:14:27 <TrueBrain> that would be REALLY small functions
23:15:31 <TrueBrain> so they are decompiled
23:16:23 <TrueBrain> forgot how to translate that :D
23:17:29 <TrueBrain> I think your search powers need an upgrade btw :)
23:17:36 <TrueBrain> 0043 is GUI_Widget_Scrollbar_Click
23:17:52 <TrueBrain> 0039 is Scrollbar_ArrowUp_Click
23:17:57 <TrueBrain> and 003E is ArrowDown
23:18:18 <glx> of course I converted the calls befor searching ;)
23:27:00 <glx> compiles, and almost works :)
23:34:47 <glx> I have a weird glitch when hovering icons in factory
23:37:57 <glx> probably some signed/unsigned
23:38:14 <TrueBrain> how do you mean, hovering?
23:38:40 <TrueBrain> (as in, absolutely nothing)
23:38:57 <glx> here it draws a cursor in the corner of the item
23:39:09 <TrueBrain> in Construction Yard?
23:39:24 <TrueBrain> then it really is your patch :D
23:39:53 <glx> src/table/widgetinfo.c:268:21: warning: overflow in implicit constant conversion
23:39:53 <glx> src/table/widgetinfo.c:281:21: warning: overflow in implicit constant conversion
23:39:53 <glx> src/table/widgetinfo.c:294:21: warning: overflow in implicit constant conversion
23:39:53 <glx> src/table/widgetinfo.c:307:21: warning: overflow in implicit constant conversion
23:40:00 <glx> hmm that could explain it
23:43:12 <glx> related to these warnings ;)
23:45:06 <glx> w->drawParameterNormal.sprite = emu_get_memorycsip(g_sprites[wi->spriteID]);
23:45:06 <glx> w->drawParameterSelected.sprite = emu_get_memorycsip(g_sprites[wi->spriteID + 1]);
23:45:06 <glx> w->drawParameterDown.sprite = emu_get_memorycsip(g_sprites[wi->spriteID + 1]);
23:45:06 <glx> imagine what it does when spriteID is -1 ;)
23:45:37 <glx> (and when the check for -1 is wrong due to the unification
23:48:12 <TrueBrain> I need to remember how important PIC unmasking was
23:49:15 <TrueBrain> even if I don't free the IRQ, it still hits
23:50:38 <TrueBrain> the game should not work :D
23:52:08 <TrueBrain> ah; only for interrupt 7
23:53:54 <TrueBrain> that is btw a huge bug, as it should also prevent more keystrokes etc :D
23:58:44 <TrueBrain> thought we made the F1 keys etc to work?
23:58:52 <TrueBrain> meh .. might be the VM screwing with me
23:58:57 <DorpsGek> SVN: glx (r1923) -Fix: widget->clickProc is no longer a csip
23:59:51 <DorpsGek> SVN: truebrain (r1924) -Add: C-ified Input_EventHandler(). The end of 29E8 is there.
continue to next day ⏵