IRC logs for #opendune on OFTC at 2009-12-17
            
00:00:01 <TrueBrain> I am starting to wonder if they exist ;)
00:00:04 <TrueBrain> 37A0, sorry
00:00:22 <glx> debugScenario ;)
00:00:24 <TrueBrain> haha
00:00:26 <TrueBrain> oops ..
00:00:38 <glx> 383A is playerhouse
00:00:41 <TrueBrain> that is why I don't trust myself yet ;)
00:00:49 <TrueBrain> I always dubble-check ;)
00:00:58 <glx> 3A38 indeed
00:01:50 <glx> but when I see 8D09 and 3C0E I can't be wrong ;)
00:02:07 <glx> mapInfo[scenario.mapScale]
00:02:35 <glx> .minX ;)
00:03:33 <TrueBrain> okay .. dead end .. I have to continue with other stuff in the widget
00:03:58 <glx> I hate complicated formulas
00:04:07 <glx> ,...,...x = (x + 0xFF00) * (mapScale + 1) + mapInfo->minX;
00:04:17 <glx> more than 10 asm lines
00:04:33 <glx> with push/pop
00:04:42 <TrueBrain> I hate netbeans .. it completely forgot that there is a 'decompiled' directory with code
00:06:22 <glx> oh yeah and in final it's max(complicated, complicated)
00:07:19 <TrueBrain> any problems if I take Draw_PictureButton?
00:07:39 <glx> none for me :)
00:07:47 <glx> I'm still on the same big function
00:08:12 <glx> and now I have a doubt about min or max
00:08:22 <TrueBrain> when in doubt, keep the original ;)
00:11:10 <TrueBrain> one draw function uses 2598_0000 to push a new 6C91 values, and store the old .. others request the 6C91 value directly ..
00:11:12 <TrueBrain> this is stupid
00:12:49 <TrueBrain> hmmm ... I thought 'selectionObject' was either structure or unit
00:12:54 <TrueBrain> now I have code which assumes unit
00:14:41 <SmatZ> :-)
00:14:52 <SmatZ> oops wrong window
00:15:00 <TrueBrain> but we like you say something :)
00:15:27 <SmatZ> ;)
00:17:03 <TrueBrain> @calc 0x1e-0xa
00:17:03 <DorpsGek> TrueBrain: 20
00:17:09 <TrueBrain> @base 10 16 20
00:17:09 <DorpsGek> TrueBrain: 14
00:23:52 <TrueBrain> 2DCE .. hmm
00:30:31 <TrueBrain> wow ... my conversion works :s
00:32:41 <TrueBrain> hmm .. conflicting information ... on one hand it seems 0x0004 in flags means hover, the other code suggests it is 'clicked'
00:33:22 <TrueBrain> @base 16 2 17
00:33:22 <DorpsGek> TrueBrain: 10111
00:33:23 <TrueBrain> @base 16 2 10
00:33:23 <DorpsGek> TrueBrain: 10000
00:33:25 <TrueBrain> @base 16 2 6
00:33:25 <DorpsGek> TrueBrain: 110
00:34:44 <TrueBrain> the image to go to the CY reacts on 'hover', but only when clicked
00:34:46 <TrueBrain> it is very weird
00:37:18 <TrueBrain> the code gives me the strong suggestion there are units where you can also press the icon like you can on a CY
00:37:58 <TrueBrain> I just can't find any unit which has that
00:41:59 <DorpsGek> SVN: truebrain (r787) -Fix: selectionObject can only be a unit
00:42:02 <TrueBrain> you were right after all glx :)
00:42:25 <glx> and structure is another one ?
00:42:30 <TrueBrain> dunno
00:42:32 <TrueBrain> doesn't seem to have one
00:42:37 <TrueBrain> position is used in that case
00:42:42 <glx> ha right
00:42:58 <glx> because a structure can't move :)
00:43:05 <TrueBrain> possible
00:49:03 <TrueBrain> so, in the code there is room for units that can 'build' stuff?
00:50:21 <TrueBrain> no, the place/build button is only for structures
00:50:23 <TrueBrain> still .. weird
00:50:24 <glx> I supposed unit/structure for 38F2, but with the following it's definitely an unit
00:50:24 <glx> ,...,...emu_lfp(&emu_es, &emu_bx, &emu_get_memory16(emu_ds, 0x00, 0x38F2));
00:50:24 <glx> ,...,...emu_get_memory16(emu_es, emu_bx, 0x54) = 0x0;
00:50:24 <glx> ,...,...emu_lfp(&emu_es, &emu_bx, &emu_get_memory16(emu_ds, 0x00, 0x38F2));
00:50:24 <glx> ,...,...emu_get_memory16(emu_es, emu_bx, 0x56) = 0x0;
00:50:25 <glx> ,...,...emu_lfp(&emu_es, &emu_bx, &emu_get_memory16(emu_ds, 0x00, 0x38F2));
00:50:25 <glx> ,...,...emu_get_memory8(emu_es, emu_bx, 0x72) = 0xFF;
00:50:43 <glx> especially the 0x72 ;)
00:50:54 <TrueBrain> it is unit
00:50:59 <TrueBrain> 54 and 56 are target/destination
00:51:03 <glx> yup
00:51:04 <TrueBrain> structures store them differently :p
00:51:36 <TrueBrain> okay, tomorrow I will take care of BuildPlace thingy
00:51:38 <TrueBrain> easy ;)
00:51:47 <TrueBrain> I named normal buttons 'GUI_Widget_TextButton_Draw'
00:51:55 <TrueBrain> and the one for CY and stuff 'GUI_Widget_SpriteButton_Draw'
00:52:17 <TrueBrain> and the BuildPlace will be TextSprite I guess
00:52:23 <TrueBrain> although it also reads data from the structure
00:53:26 <DorpsGek> SVN: truebrain (r788) -Add: C-ified GUI_Widget_SpriteButton_Draw()
00:53:36 <TrueBrain> but okay .. enough for today
00:53:40 <TrueBrain> slowly I start to understand stuff
00:53:58 <TrueBrain> just what is completely weird: SpriteButton_Draw() has code so create a mouse-sensitive region, or something
00:54:02 <TrueBrain> but when not calling the function, it still works :p
00:54:12 <TrueBrain> so I am a bit clueless what it does exactly ...
00:54:21 <TrueBrain> maybe register the hover/click for the widget ..
00:55:10 <TrueBrain> but anyway ... SpriteButtons are not relative to their parent, they have absolute positions
00:55:20 <TrueBrain> a lot of changes will be needed to make the GUI sane
00:55:25 <TrueBrain> where is Alberth? :p
00:59:30 <DorpsGek> SVN: truebrain (r789) -Fix (r788): small codechange with respect to original code. Should avoid weird sprites showing up in situations which should never happen in the first place, so not really an enhancement
01:01:14 <TrueBrain> okay, tomorrow I hope to finish the other 2 GUI_Draw functions
01:01:27 <TrueBrain> I am not sure yet about Mentat_Draw_ScrollBar, as it is used by others too ...
01:03:00 <TrueBrain> I wonder how Draw_CommandButtons differ from TextButton
01:03:24 <TrueBrain> they are identical in that respect .. but okay, we will see :)
01:04:13 <TrueBrain> for now: nightynight
01:04:20 <TrueBrain> good luck glx, with the rest of your function :)
01:27:48 *** TinoDidriksen has quit IRC
01:39:00 *** Yexo_ has joined #openDune
01:39:01 *** ChanServ sets mode: +v Yexo_
01:39:08 *** Yexo has quit IRC
03:09:25 *** TinoDidriksen has joined #openDune
03:54:08 *** Yexo_ has quit IRC
03:54:49 *** Yexo_ has joined #openDune
03:54:49 *** joule.oftc.net sets mode: +v Yexo_
04:19:03 <glx> http://devs.opendune.org/~glx/temp.patch <-- current version, I have a bug in x and y stuff :)
04:25:20 *** glx has quit IRC
08:38:43 *** TinoDidriksen has quit IRC
08:42:26 *** TinoDidriksen has joined #openDune
09:23:49 <Xaroth> I'm going insane :/
09:24:12 <Xaroth> we have a gateway, 3 interfaces, 2 internal networks, 1 external, 2 tunnel interfaces (openvpn)
09:24:42 <TrueBrain> so 5 interfaces
09:24:44 <TrueBrain> ;)
09:24:55 <Xaroth> we also have 2 loadbalancers that do all the loadbalancing for those accessible from the intarwebs
09:25:12 <Xaroth> now from the vpn we can connect to the machines not loadbalanced
09:25:14 <TrueBrain> internet or intranet?
09:25:17 <Xaroth> but not to the machines loadbalanced
09:25:20 <Xaroth> internet
09:25:36 <TrueBrain> (don't try to be funny when saying a word like 'internet', it only works confusing :p)
09:26:30 <Xaroth> so it's internet -> eth0, production eth1, intranet eth2, management vpn and site-to-site vpn
09:26:40 <TrueBrain> either way, I wanna bet the IP used to access the loadbalanced via VPN is in some netmask of either the loadbalanced or the end machine
09:27:11 <Xaroth> the loadbalancers only have two interfaces, 1 internet, 1 production
09:27:36 <TrueBrain> tcpdump will be your new friend ;)
09:27:53 <Xaroth> it already is
09:27:57 <Xaroth> but it's also confusing to boot :P
09:28:06 <TrueBrain> confusing to boot?
09:28:27 <Xaroth> you need to go to england more often :P
09:28:35 <Xaroth> s/boot/fuck/
09:28:42 <Xaroth> s/to/as/
09:29:05 <TrueBrain> no, you should try to keep things English, not some weird kind of in-between :p
09:29:14 <Xaroth> it is english
09:29:40 <Xaroth> it's just that we get taught crappy english on schools
09:29:54 <TrueBrain> I think that is it, yes :p
09:29:55 <TrueBrain> lol
09:29:59 <TrueBrain> either way .....
09:30:09 <TrueBrain> check your routes (route -n)
09:30:30 <TrueBrain> when things work to one machine, not to the other, most of the time it is packets getting lost because of wrongfully rerouting
09:34:48 <TrueBrain> @base 10 16 [calc 0x1E - 0xA]
09:34:48 <DorpsGek> TrueBrain: 14
09:41:01 <TrueBrain> @base 10 16 [calc 0x22 - 0xA]
09:41:01 <DorpsGek> TrueBrain: 18
09:42:36 <TrueBrain> I now know for a fact the repair thing is not how it is now
09:42:52 <TrueBrain> there is lots of code which makes the repair thing like a CY or other things that can produce things
09:42:57 <TrueBrain> you could click the button to stop repairing
09:44:28 <Xaroth> found it
09:44:31 <Xaroth> easily fixed
09:44:34 <Xaroth> MASQUERADE :/
09:44:39 <Xaroth> not exactly what I wanted
09:44:39 <TrueBrain> ghehe
09:44:42 <TrueBrain> I love to be right :)
09:44:49 <Xaroth> I want the damned vpn ip to show up
09:44:52 <Xaroth> not the gateway ip
09:45:35 <TrueBrain> timeLeft = buildTime - (s->countDown + 255) / 256;
09:45:36 <TrueBrain> loc12 = 100 * timeLeft / buildTime;
09:45:38 <TrueBrain> is my math correct?
09:45:59 <TrueBrain> @calc 100 * 50 / 100
09:45:59 <DorpsGek> TrueBrain: 50
09:46:04 <TrueBrain> @calc 100 * 50 / 200
09:46:04 <DorpsGek> TrueBrain: 25
09:46:07 <TrueBrain> seems so ;)
09:46:21 <Xaroth> HAH
09:46:27 <Xaroth> routing line wasn't specified enough
09:49:03 <TrueBrain> @calc 0x64
09:49:03 <DorpsGek> TrueBrain: 100
09:49:42 <TrueBrain> @calc 0x10000 - 0xffed
09:49:42 <DorpsGek> TrueBrain: 19
09:52:06 <TrueBrain> if (a == 0x90) { } else { if (a == 0x90) {}}
09:52:07 <TrueBrain> I love dune2
09:55:20 <TrueBrain> @calc 0x10000 - 0xfff7
09:55:20 <DorpsGek> TrueBrain: 9
10:05:36 <TrueBrain> whoho, another C-ification which works directly on the first try
10:05:38 <TrueBrain> I love that :)
10:13:34 <TrueBrain> @calc (0x4A0 - 0x440) / 4
10:13:34 <DorpsGek> TrueBrain: 24
10:14:01 <TrueBrain> @calc (0x53C - 0x440) / 4
10:14:01 <DorpsGek> TrueBrain: 63
10:17:35 <Xaroth> <@TrueBrain> whoho, another C-ification which works directly on the first try << nice :o
10:19:09 <DorpsGek> SVN: truebrain (r790) -Add: C-ified GUI_Widget_SpriteTextButton_Draw()
10:20:39 <DorpsGek> SVN: truebrain (r791) -Fix (r790): remove compiler warnings
10:20:52 <TrueBrain> sometimes it is easier to still use emu_ functions over non-emu_ :p
10:21:01 <TrueBrain> because some other function is not yet translated ..
10:21:15 <TrueBrain> the GUI is kind of clever, but a lot of custom code, tons of exceptions ..
10:22:13 <TrueBrain> okay .. nextone ..
10:24:36 <DorpsGek> SVN: truebrain (r792) -Fix (r790): make the decompiler happy
10:46:35 <Xaroth> GRRR
10:46:37 <Xaroth> not working anymore
10:46:50 <Xaroth> routes are in place
10:46:58 <Xaroth> masquerading off again
10:47:12 <Xaroth> no go :/
10:47:31 <TrueBrain> conclusion: you suck :p
10:47:33 <TrueBrain> ghehe
10:47:34 <TrueBrain> sorry
10:47:36 * TrueBrain hugs Xaroth
10:48:17 <Xaroth> wth
10:48:40 <Xaroth> traceroute from lb, goes directly to gateway internal ip and then across vpn
10:49:04 <Xaroth> traceroute from loadbalanceD machine, goes to the loadbalancer internal ip, then tries to go to the gateway EXTERNAL ip
10:49:14 <TrueBrain> check your routes :)
10:49:23 <Xaroth> 192.168.170.0 192.168.168.254 255.255.254.0 UG 0 0 0 eth1
10:49:23 <Xaroth> 0.0.0.0 193.42.212.1 0.0.0.0 UG 0 0 0 eth0
10:49:28 <Xaroth> which part of eth1 didn't it get?
10:49:41 <Xaroth> heck, even the 168 route is on Iface eth1
10:49:55 <TrueBrain> but same metric
10:49:57 <TrueBrain> asking for trouble
10:50:20 <TrueBrain> (nah, that is bullshit, but I liked saying it :p)
10:51:00 <TrueBrain> either way, in my experience it is always some dodgy route line at one of the machines, pushing out the packets to the wrong gateway
10:51:29 <DorpsGek> SVN: truebrain (r793) -Add: C-ified GUI_Widget_TextButton2_Draw()
10:59:02 <Xaroth> the hell
10:59:10 <Xaroth> i re-do the firewallbiulder script
10:59:12 <Xaroth> it works again
10:59:52 <Xaroth> still going from outside interface tho
11:21:21 <TrueBrain> and I am slowly packing my bags
11:21:24 <TrueBrain> so much shit to think about ....
11:25:28 *** Yexo has joined #openDune
11:25:28 *** ChanServ sets mode: +v Yexo
11:32:23 *** Yexo_ has quit IRC
11:34:14 <TrueBrain> 12:34
11:34:15 <TrueBrain> woei
11:42:05 <DorpsGek> SVN: truebrain (r794) -Add: named a few more functions related to GUI drawing
11:57:34 *** glx has joined #openDune
11:57:34 *** ChanServ sets mode: +o glx
11:58:31 <TrueBrain> howdie glx
11:58:34 <TrueBrain> about your patch:
11:58:36 <TrueBrain> 2DCE:440 contains Sprites, so var04 is a SpriteID
11:58:37 <TrueBrain> var04 init can be done in the 'default' handler I guess ;)
11:58:39 <TrueBrain> switch (w->variable_04 - 0x27) { <- you forgot to make that 39 ;)
11:58:40 <TrueBrain> around 0x2B you have '* 16'. This should be '/ 16' (idiv)
11:58:42 <TrueBrain> g_global->activeAction = 0xFFFF; <- don't we have INVALID values for that?
11:58:43 <TrueBrain> s/controled/controlled/g
11:58:45 <TrueBrain> Wow, it really handles much more than the function would suggest ... much much more :p
11:58:46 <TrueBrain> I at least expected them to split the Place code in a seperate function ...
11:58:52 <TrueBrain> I named a few functions, expect problems ;)
12:01:02 <glx> hello
12:10:39 <Xaroth> ugh
12:10:43 <Xaroth> fwbuilder is annoying
12:10:54 <Xaroth> if you add 1 route, it clears the ENTIRE routing table, and just adds that one
12:11:23 <Xaroth> that yields interesting effects...
12:13:11 <glx> <@TrueBrain> g_global->activeAction = 0xFFFF; <- don't we have INVALID values for that? <-- we have but it's 8bit not 16bit
12:20:00 <TrueBrain> too bad ;)
12:26:29 <TrueBrain> btw, glx, maybe place the whole viewport thingy in gui/viewport.c? Dunno
12:27:48 <TrueBrain> widget.c is getting a bit busy :p
12:28:23 <TrueBrain> maybe we should rename current widget.c to widget_draw.c
12:28:25 <TrueBrain> and make a widget_click.c
12:29:00 <TrueBrain> either way, I am going to bite myself in f__B4A2_0063_001E_4495() now
12:29:04 <TrueBrain> (the one that calls Viewport :p)
12:30:24 <TrueBrain> about name, I would suggest: GUI_Widget_Viewport_Click
12:30:45 <TrueBrain> maybe there is a GUI_Widget_Viewport_Draw too ;)
12:47:20 <TrueBrain> interesting function, B4A2
12:47:22 <TrueBrain> useful information
12:58:24 <Xaroth> oddness
12:58:30 <Xaroth> I can't ping to my home ip anymore :/
13:09:57 <glx> fixed another bug :) 0x28 != 28
13:20:42 <planetmaker> Xaroth, too much snow? ;-)
13:38:06 <glx> hmm variable_3442 is probably cursor hotspot
13:42:46 <glx> and var04 is more cursorType than spriteID (it's spriteID - 0x110 I think)
13:59:02 <TrueBrain> it really is spriteID
13:59:06 <TrueBrain> but it can be the cursor
13:59:17 <TrueBrain> for SpriteButton is it very clear it is the SpriteID ;)
14:01:13 <TrueBrain> 2DCE:440 is the begin of the sprites ;)
14:01:33 <TrueBrain> (well, pointer to)
14:04:25 <glx> cursorType is mùore clear in this case
14:05:52 <TrueBrain> why?
14:06:13 <TrueBrain> it only is used for f__2B4C_0002_0029_64AF
14:06:18 <TrueBrain> where the second parameter is Sprite *
14:06:39 <Xaroth> planetmaker: nah, just ICMP being filtered i think
14:06:41 <Xaroth> anyhow
14:06:45 <Xaroth> gateway works
14:08:59 <TrueBrain> glx: but the code in your temp.patch of last night doesn't really make sense
14:09:06 <TrueBrain> oh, nevermind, it does :p
14:09:11 <TrueBrain> var04 != variable_04 (in the switch)
14:09:43 <glx> variable_04 seems to be a section of the screen
14:09:58 <TrueBrain> I think it is 'selected index' or something
14:11:12 <glx> 0x27 is move up, 0x28 is move right, 0x29 is move down, 0x30 is move left, 0x31 is viewport, 0x32 is minimap
14:11:17 <TrueBrain> variable_3A34 most likely is cursorSpriteID or something
14:11:26 <glx> the current one yes
14:11:27 <TrueBrain> then it is most likely 'WidgetID'
14:11:43 <glx> and 3A36 is the "default" for viewport and minimap
14:11:49 <glx> can be normal or target
14:12:08 <TrueBrain> btw, it would be nicer if you make that -39 of the switch in the switch cases
14:16:33 <TrueBrain> g_global->variable_7FC4 = ~((emu_dx & 0x4400) >> 1);
14:16:34 <TrueBrain> g_global->variable_7FC4 |= (emu_dx & 0x1100) << 1;
14:16:36 <TrueBrain> emu_si |= g_global->variable_7FC4;
14:16:37 <TrueBrain> emu_si |= (g_global->variable_7FC4 << 2) ^ 0x8800;
14:16:39 <TrueBrain> euuhh ... what ... the ....
14:19:17 <Xaroth> for the changelog browser, just a prev/next, or pagination?
14:19:22 <TrueBrain> prev/next
14:19:40 <Xaroth> both will have the previous and next as link, pagination will just have +2 +3 +4 +5 and -2 -3 -4 -5 as well
14:19:57 <TrueBrain> you will only want to go to +1/-1
14:20:01 <TrueBrain> and if not, you should use the overview ;)
14:20:05 <Xaroth> k
14:23:08 <glx> hmm it seems viewportPosition and minimapPosition are inverted :)
14:24:04 <glx> (their names I mean)
14:26:46 <Xaroth> right, basic layout for this, meh
14:27:20 <TrueBrain> @base 16 2 FFE7
14:27:20 <DorpsGek> TrueBrain: 1111111111100111
14:37:32 <glx> hmm var06 and var08 are mouse button state I think
14:46:26 <glx> oh click and drag
14:46:47 <glx> ,...if ((click || drag) && w->variable_04 == 44) { <-- makes sense :)
14:46:53 <glx> 44 is minimap
14:48:06 <TrueBrain> @base 16 2 9
14:48:06 <DorpsGek> TrueBrain: 1001
14:49:42 <TrueBrain> fuckerthefuck .. pointer problems ..
14:49:47 <TrueBrain> how to fix .. how to fix .. hmm ..
14:56:38 <TrueBrain> I am _completely_ lost in this function .. I am just going to hope it works :p
15:08:46 <glx> http://glx.dnsalias.net:8080/opendune/temp.patch
15:09:14 <glx> I think I'll put it in gui/viewport.c
15:09:42 <TrueBrain> uint16 direction, x, y, spriteID, packed; <- please split it a bit per category
15:09:48 <TrueBrain> I don't mind to have 'x' and 'y' on one line
15:09:53 <TrueBrain> but the other should be on seperate lines
15:09:55 <TrueBrain> easier to read
15:10:17 <TrueBrain> defaultCursorSpriteID <- maybe 'cursorDefaultSpriteID'?
15:10:47 <glx> more consistent yes
15:11:00 <TrueBrain> + } else {
15:11:01 <TrueBrain> + if ((w->flags & 0x2200) != 0 && g_global->variable_37B8 == 0) {
15:11:03 <TrueBrain> so } else if () {
15:11:42 <TrueBrain> g_global->variable_343E = g_global->tickGlobal; <- so 343E is tickMapScroll or what ever
15:12:14 <TrueBrain> + x = g_global->variable_7064;
15:12:15 <TrueBrain> + y = g_global->variable_7066
15:12:17 <TrueBrain> mouseClickX and mouseClickY
15:12:21 <TrueBrain> (I have that in my patch here :p)
15:12:32 <glx> hehe
15:13:48 <glx> and what did you add in global.h for them ?
15:13:56 <TrueBrain> nothing yet
15:15:06 <TrueBrain> emu_push(16); <- HARVESTER
15:15:54 <TrueBrain> + returnValue = emu_dx << 16 | emu_ax; <- () around shift
15:16:46 <TrueBrain> if ((h->structuresBuilt & 0x40000) != 0) { <= (1 << STRUCTURE_OUTPOST) or something?
15:16:58 <glx> true
15:17:41 <TrueBrain> you tested your patch?
15:17:47 <TrueBrain> rest looks fine, and yes, move it to viewport.c please :)
15:18:23 <glx> yes I tested, all seems to work correctly :)
15:18:47 <glx> oh it's snowing again
15:22:34 <TrueBrain> sometimes those if() statements DRIVE ME CRAZY
15:25:21 <glx> mine?
15:25:47 <TrueBrain> mine
15:31:19 <TrueBrain> 170 lines to go before I can test it ...
15:31:21 <TrueBrain> grr
15:46:46 <TrueBrain> k, done ..
15:49:01 <TrueBrain> @base 10 16 [calc 0x90 + 0x1e + 2
15:49:01 <DorpsGek> TrueBrain: Error: Missing "]". You may want to quote your arguments with double quotes in order to prevent extra brackets from being evaluated as nested commands.
15:49:03 <TrueBrain> @base 10 16 [calc 0x90 + 0x1e + 2]
15:49:03 <DorpsGek> TrueBrain: B0
15:49:39 <TrueBrain> by GlobalData asserts :'(
15:50:04 <TrueBrain> 10 != 0x10
15:50:05 <TrueBrain> ghehe
15:58:56 <TrueBrain> yeah, it fails :(
15:59:23 <TrueBrain> glx: my turn: http://devs.opendune.org/~truebrain/temp.patch
15:59:31 <TrueBrain> (hihi :))
15:59:57 <glx> you have an idea about where it's wrong?
16:00:13 <TrueBrain> not a single clue
16:00:17 <TrueBrain> one of the ifs :p
16:00:29 <TrueBrain> there is a lot of magic happening
16:00:42 <TrueBrain> owh
16:00:44 <TrueBrain> hmm
16:00:54 <TrueBrain> I should not pop cs:ip ;)
16:01:03 <TrueBrain> yes, then it doesn't crash :p
16:01:05 <TrueBrain> still, it is flawed
16:02:54 <TrueBrain> patch updated
16:07:19 <glx> http://glx.dnsalias.net:8080/opendune/temp.patch <-- mine should be ready to commit :)
16:07:24 <glx> now looking at yours
16:09:19 <TrueBrain> + /* 343E(4) */ PACK uint32 tickMapScroll; /*!< Stores last time autoscroll ran. */ <- it stores when it next time will run
16:09:48 <TrueBrain> suggest using: "/*!< Indicates next time Viewport runs MapScroll function. */"
16:10:41 <TrueBrain> please add 'viewport.c' to your patch
16:11:03 <glx> ,...,...,...if (g_global->tickMapScroll + 10 >= g_global->tickGlobal || g_global->tickCursor + 20 >= g_global->tickGlobal) return;
16:11:10 <glx> no it stores last :)
16:11:13 <TrueBrain> k, then you are right ;)
16:11:32 <TrueBrain> Still, "Indicates last time Viewport ran MapScroll function. " would be more consistant ;)
16:11:45 <TrueBrain> s/Indicates/Stores/
16:11:48 <TrueBrain> also fine by me :p
16:12:15 <TrueBrain> but okay, very very minor :p
16:14:12 <TrueBrain> the missing viewport.c does make reviewing harder ;)
16:15:40 <glx> fixed that (and emu_viewport.c too)
16:16:06 <glx> hmm still missing main comment for the function
16:17:11 <TrueBrain> I suggest naming: GUI_Widget_Viewport_Click
16:17:24 <TrueBrain> then the comment follows: handle the Click events for the Viewport widget, or something
16:17:43 <TrueBrain> + emu_push(emu_get_memory16(0x2DCE, spriteID * 4, 0x442)); /* CS */
16:17:45 <TrueBrain> + emu_push(emu_get_memory16(0x2DCE, spriteID * 4, 0x440)); /* IP */
16:17:46 <TrueBrain> useless comments
16:18:48 <TrueBrain> rest looks fine
16:29:29 <glx> +,...wcsip = g_global->variable_1902;
16:29:29 <glx> +
16:29:29 <glx> +,...if (g_global->variable_18FE.csip != 0x0) {
16:29:29 <glx> +,...,...wcsip = g_global->variable_18FE;
16:29:29 <glx> +,...,...w = (Widget *)emu_get_memorycsip(wcsip);
16:29:30 <glx> +
16:29:30 <glx> +,...,...if ((w->variable_0E & 0x0008) != 0) {
16:29:32 <glx> +,...,...,...g_global->variable_18FE.csip = 0x0;
16:29:32 <glx> +,...,...}
16:29:34 <glx> +,...}
16:29:41 <glx> isn't there a missing w = (Widget *)emu_get_memorycsip(wcsip); ?
16:29:53 <TrueBrain> no, it is in the for
16:30:11 <TrueBrain> there I only need to access the 'w'
16:30:40 <glx> ha right
16:30:54 <TrueBrain> I think I need to understand to code to find the flaw :p
16:32:51 <TrueBrain> @base 16 2 E7
16:32:51 <DorpsGek> TrueBrain: 11100111
16:34:24 <glx> +,...,...if (w->offsetX < 0) { <-- signed/unsigned mismatch maybe
16:35:26 <glx> oh it's int16 so ok
16:37:59 <glx> +,...,...positionX += g_global->variable_4062[w->parentID][0]; <-- missing << 3
16:38:29 <TrueBrain> nice catch :)
16:38:33 <TrueBrain> I also seem to have fucked up 1906 ..
16:42:05 <TrueBrain> k .. I have to go
16:42:08 <TrueBrain> will check that later :)
16:42:14 <TrueBrain> if you find anything else, please let me konw :)
16:46:20 <Xaroth> WEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEKEND
16:46:23 <Xaroth> har har
17:53:05 <glx> +,...,...if ((locsi & 0x3300) != 0 && (w->variable_0E & 0x4) != 0 && (wcsip.csip == g_global->variable_18FE.csip || g_global->variable_18FE.csip == 0x0)) { <-- missing && widgetOver I think
17:56:13 <Xaroth> o_O
18:00:05 <glx> yes these ifs are a pain :)
18:06:49 <DorpsGek> SVN: glx (r795) -Add: C-ified GUI_Widget_Viewport_Click()
18:14:37 <glx> +,...,...,...,...loc08 = (loc08 & 0x0F00) & ((loc08 & 0xF000) >> 4); <-- | not &
18:24:37 <glx> +,...,...,...,...,...,...returnValue = w->variable_04 & 0x8000; <-- | not &
18:28:59 <glx> +,...,...,...,...,...,...,...returnValue = w->variable_04 & 0x8000; <-- | not & ;)
20:59:05 <Xaroth> there, made some initial design thingies
21:05:29 <glx> +,...,...,...if (widgetOver && (w->variable_0E & 0x04) == 0) { <-- != 0
21:09:03 <Xaroth> o_O
21:09:06 <Xaroth> those 'errors' ?
21:09:14 <Xaroth> or am I just going nuts :P
21:10:17 <glx> most are hard to see :)
21:10:39 <glx> emu_lfp everywhere :)
21:12:20 <glx> and I'm only at l__0672
22:12:42 <glx> done reading, nothing more found
22:58:33 <Xaroth> nn
22:58:35 * Xaroth off to sleep
23:56:37 <TrueBrain> tnx glx
23:58:23 <TrueBrain> it starts to work a tiny bit better
23:58:33 <TrueBrain> hover effect works
23:58:35 <TrueBrain> clicking not