IRC logs for #opendune on OFTC at 2010-12-19
            
04:47:48 *** glx has quit IRC
10:56:45 *** fjb is now known as Guest1710
10:56:46 *** fjb has joined #openDune
11:03:38 *** Guest1710 has quit IRC
13:01:09 *** Yexo has quit IRC
13:37:15 *** glx has joined #openDune
13:37:15 *** ChanServ sets mode: +o glx
13:37:46 <glx> hello
13:52:08 <fjb> Moin glx
14:32:27 <DorpsGek> SVN: glx (r1194) -Add: C-ified GUI_Widget_Name_Click()
15:18:01 <DorpsGek> SVN: glx (r1195) -Add: C-ified GUI_Widget_Cancel_Click()
15:43:11 <DorpsGek> SVN: glx (r1196) -Add: C-ified GUI_Widget_Picture_Click()
16:05:25 <DorpsGek> SVN: glx (r1197) -Add: C-ified GUI_Widget_RepairUpgrade_Click()
16:08:29 <Xaroth|Work> glx is on a spree again
16:08:37 <glx> happens :)
16:08:47 <glx> 1 less file to do ;)
18:08:15 <TrueBrain> nice :D
18:19:40 <TrueBrain> took the debug&trace method to find a few names of functions
18:19:44 <TrueBrain> variable_62 is rotation
18:19:57 <TrueBrain> [0] and [1] being the unit/structure and turret
18:21:04 <TrueBrain> only the second index is a bit puzzling to me ...
18:24:10 <TrueBrain> owh ... [1] is target, [2] is current, [0] is speed I guess :)
18:24:20 <TrueBrain> 0 is top, 64 is right, 128 is bottom, 196 is left
18:25:11 <TrueBrain> suggestions for name? 'direction'?
18:25:18 <TrueBrain> unit->direction, that is
18:25:25 <TrueBrain> unit->rotation
18:30:43 <glx> orientation ?
18:31:06 <TrueBrain> sounds good
18:31:11 <TrueBrain> I need a new struct for this ...
18:31:13 <TrueBrain> dir48?
18:47:02 <TrueBrain> http://devs.opendune.org/~truebrain/temp.patch <- find the bug :(
18:50:24 <TrueBrain> I see nothing wrong
18:50:27 <TrueBrain> yet it doesnt work anymore :(
18:50:59 <TrueBrain> or .. hmm ..
18:51:02 <TrueBrain> did I break the array?
18:51:17 <TrueBrain> [2][3] ... is that A1 B1 A2 B2 A3 B3 or A1 A2 A3 B1 B2 B3
18:51:25 <TrueBrain> lol, I have been away from C so long, I don't know :D
18:52:05 <Xaroth> A1 A2 A3 B1 B2 B3 sounds more sane
18:52:14 <glx> I sometimes have problems with that ;)
18:52:37 <glx> but it's easy to check in debugger
18:52:58 <TrueBrain> found the bug ...
18:53:00 <TrueBrain> had int8
18:53:02 <TrueBrain> as they are signed
18:53:04 <TrueBrain> but then things break :p
18:53:24 <TrueBrain> because it compares signed to shit
18:53:30 <TrueBrain> euh, unsigned
18:53:36 <TrueBrain> well, depends how you look at it
18:53:50 <glx> yes signed/unsigned comparison are fun too
18:57:07 <TrueBrain> OpenDUNE atm hangs randomly for me
18:57:09 <TrueBrain> and feels very slow
18:57:11 <TrueBrain> can be sound ...
19:28:30 <TrueBrain> http://devs.opendune.org/~truebrain/temp.patch <- suggestions? (mostly regarding naming)
19:50:53 <glx> naming is ok for me
20:33:14 <TrueBrain> was very unsure about the boolean in SetOrientation
21:08:01 <glx> http://svn.opendune.org/~glx/temp.patch <-- not sure about the function name
21:08:57 <TrueBrain> sounds fine to me
21:25:01 <DorpsGek> SVN: truebrain (r1198) -Add: named Unit->variable_62. It indicates the orientation and speed of that, of both the unit and the turret on top
21:25:24 <TrueBrain> I wonder if Windows likes my commit
21:25:28 <TrueBrain> named some nice functions with it :)
21:26:32 <glx> 2 more C4244 ;)
21:26:56 <TrueBrain> can you fix?
21:27:19 <glx> uint16 to uint8 conversion, possible data loss
21:27:21 <TrueBrain> or tell me which :)
21:28:08 <glx> there's already some of them in emu_wsa.c, no hurry to fix ;)
21:29:08 <TrueBrain> gimme a list, and I fix them :)
21:29:15 <TrueBrain> but I can;t see them, so I cant fix them :p
21:29:41 <TrueBrain> SmatZ: do you know how ot make GCC tell me when I do silent conversion with possible dataloss?
21:29:50 <glx> http://paste.openttdcoop.org/show/10/
21:30:07 <TrueBrain> nice lsit :p
21:31:42 <glx> -Wsign-compare can be useful (MSVC warns for that IIRC)
21:32:21 <DorpsGek> SVN: truebrain (r1199) -Fix: fileno is just 8 bits
21:32:37 <DorpsGek> SVN: truebrain (r1200) -Fix: some silent uint16->int8 conversions (dataloss)
21:32:40 <TrueBrain> this should fix most (if not all)
21:32:42 <TrueBrain> 1200!
21:32:46 <glx> -Wtype-limits maybe (html doc is not clear)
21:33:31 <TrueBrain> nope, neither warns for C4244
21:34:47 <glx> hmm those are included in -Wextra anyway ;)
21:35:49 <TrueBrain> but just tell me if MSVC stopped complaining :D
21:38:01 <glx> -Wdeclaration-after-statement <-- this one is not in Wall nor Wextra and MSVC errors in this case ;)
21:38:29 <glx> warnings gone
21:38:49 <TrueBrain> great :D
21:39:50 <glx> -Wconversion
21:39:50 <glx> Warn for implicit conversions that may alter a value. This includes conversions between real and integer, like abs (x) when x is double; conversions between signed and unsigned, like unsigned ui = -1; and conversions to smaller types, like sqrtf (M_PI). Do not warn for explicit casts like abs ((int) x) and ui = (unsigned) -1, or if the value is not changed by the conversion like in abs (2.0). Warnings about conversions between signed a
21:39:50 <glx> nd unsigned integers can be disabled by using -Wno-sign-conversion.
21:40:11 <glx> something to test I guess
21:40:52 <TrueBrain> many many MANY warnings
21:40:57 <TrueBrain> and then I mean: many
21:41:01 <TrueBrain> uint16 -> int
21:41:20 <glx> hmm that's too much then
21:41:22 <TrueBrain> unsigned char:3 -> uint
21:41:25 <TrueBrain> lol
21:41:37 <TrueBrain> I wouldn't know how it alters the value
21:41:38 <glx> maybe with -Wno-sign-conversion then
21:41:41 <TrueBrain> but fine .. it things it does :p
21:42:01 <TrueBrain> then only the uint16 -> int remain :)
21:42:15 <TrueBrain> less errors .. but still :D
21:42:23 <TrueBrain> and in theory they are 'right' .. just bogus :D
21:45:47 <DorpsGek> SVN: glx (r1201) -Add: C-ified GUI_Widget_Update()
22:13:19 <TrueBrain> UnitInfo->variable_42 is what appears turning speed
22:13:29 <TrueBrain> but there are a few other references to a 0x42 .. not sure if they ar related
23:36:08 <DorpsGek> SVN: truebrain (r1202) -Add: named UnitInfo->flags.variable_0040 to hasTurret
23:37:42 <glx> hehe I tried to commit at the exact same time :)
23:37:48 <TrueBrain> LOL!
23:37:53 <TrueBrain> those odds are kind of small :D
23:38:44 <DorpsGek> SVN: glx (r1203) -Add: C-ified Tile_RemoveFogInRadius() and Structure_RemoveFog()
23:39:21 <TrueBrain> nice work :D
23:42:10 <glx> next one will be f__B4CD_0750_0027_7BA5()
23:42:17 <glx> used in a lot of places :)
23:42:24 <TrueBrain> best of luck :D
23:42:53 <Xaroth|Work> :o
23:42:54 <Xaroth|Work> nice work
23:46:06 <DorpsGek> SVN: truebrain (r1204) -Fix: somehow header didn't get renamed with CTRL+R in Netbeans :(