IRC logs for #opendune on OFTC at 2012-12-25
            
00:00:21 <TrueBrain> and by now it is guessing what some globals are
00:00:26 <TrueBrain> I have no clue :D
00:02:28 <TrueBrain> this mess of an if-statements is incredible
00:04:49 <TrueBrain> ah, found the unknown ... useMouse :D
00:04:51 <TrueBrain> hihi
00:09:07 <glx> it's a huge function
00:09:17 <glx> I often failed on huge functions :)
00:09:54 <TrueBrain> hehe
00:09:57 <TrueBrain> well, I Fail on it too
00:09:59 <TrueBrain> it makes no sense :P
00:12:44 <TrueBrain> I wonder if the original code worked :P
00:14:05 <glx> hmm were did I get !click && !drag
00:14:21 <TrueBrain> it is there; and you only made a small error I see now
00:14:27 <TrueBrain> 01D0 != 01DC
00:14:29 <TrueBrain> basically
00:18:31 <TrueBrain> hmm, I think we handle "click" wrong, it stays true
00:18:33 <TrueBrain> it shouldnt
00:18:46 <TrueBrain> but that is a bug on a different level :)
00:21:05 <glx> I read if ((...+10 >= ... || ... +20 >= ...) & !var06 & !var08) return true
00:21:45 <TrueBrain> that is one part :)
00:21:51 <TrueBrain> I am nearly there, dont worry about it :)
00:23:35 <glx> seems I reordered things incorrectly
00:23:42 <TrueBrain> it is a very tricky one
00:23:51 <TrueBrain> your code seems to be valid, but there are so many side branches
00:23:59 <TrueBrain> I wonder how their code read :P
00:24:22 <glx> yeah invert of 01DC is 01D0
00:24:25 <TrueBrain> funny thing: the SELECTIONTYPE entries are the ones it should NOT auto-scroll on
00:24:26 <TrueBrain> which is silly
00:25:18 <TrueBrain> come to think of it, I understand why
00:25:19 <TrueBrain> funny :)
00:25:56 <glx> if selection type is 4 or 3 it doesn't scroll it seems
00:26:13 <TrueBrain> indeed
00:26:17 <TrueBrain> those are UNIT and STRUCTURE
00:26:49 <TrueBrain> so yeah, your code was correct, with 1 exception: if auto-scroll :D
00:27:14 <TrueBrain> and because of the bug in mouse-click, it appeared to be much worse ;)
00:27:36 <glx> the problem is probably that I moved if (!click && !drag) { outside the other tests
00:28:13 <TrueBrain> the click&drag only happens if the timers are not up yet, OR if the autoscroll is off (and the selection-types are structure or unit)
00:28:31 <TrueBrain> so basically, you auto-scroll on the timers if you have auto-scroll on or are moving/targeting/placing
00:28:36 <TrueBrain> otherwise, you need to either click or drag
00:29:00 <glx> assembly is ..||..&&(!click && !drag) for each test
00:29:25 <glx> meaning it shoud test the stuff before the click&drag
00:29:32 <TrueBrain> yup
00:29:45 <glx> I slightly changed that
00:33:22 <glx> so indeed I reordered too much
00:33:38 <TrueBrain> I did too in my first 2 attempts :P
00:33:43 <TrueBrain> I now have a version that appears to be correct
00:33:49 <TrueBrain> if (+10 >=
00:34:07 <TrueBrain> if (+10 >= || +20 >=) { if (!c&!d) return true; } else {
00:34:37 <TrueBrain> if (!autoscroll && (Selection == structure | unit) { if (!c&!d) return true) }
00:34:42 <TrueBrain> <scroll>
00:35:01 <glx> seems correct yes
00:35:13 <TrueBrain> basically, if (c | d), scroll
00:35:18 <glx> looks more like assembly at least
00:35:21 <TrueBrain> if (timer), scroll
00:35:31 <TrueBrain> well, timer under conditions, but meh
00:35:46 <TrueBrain> maybe I reorder it to reflect that a bit more
00:35:58 <TrueBrain> because if you click, it ALWAYS scrolls :P
00:36:58 <glx> it's easy to fail a conversion when the assembly is that ugly ;)
00:37:03 <TrueBrain> and there your code comes again :D
00:37:05 <TrueBrain> hihihihi
00:37:31 <TrueBrain> your only mistake was that the autoscroll and selection check is an AND
00:37:48 <TrueBrain> this is funny ... 5th time I handle this function ... 5 times different results :P
00:39:49 <glx> right (autoscroll || (mouse & !=3 & !=4) -> scroll
00:39:58 <TrueBrain> yup :D
00:40:22 <glx> I failed on a simple negation again ;)à
00:41:02 <TrueBrain> well, it only took me 5 times to come to that conclusion ... I think it is not us :D
00:41:46 <TrueBrain> okay; now why do our clicks not work correctly :P
00:42:07 <glx> I know I restarted some conversion many times with a different result each time
00:49:48 <glx> hmm maybe because click || drag should be tested after timer test
00:49:57 <glx> as in original assembly
00:50:34 <TrueBrain> why?
00:51:03 <glx> if we click we unconditionally scroll and it can be too fast indeed
00:51:16 <TrueBrain> yes; that is a bug on a different layer :)
00:51:26 <TrueBrain> in original assembly it does the same
00:51:43 <TrueBrain> before it bails out, it always checks: did you click? Then we scroll anyway
00:51:56 <TrueBrain> there is no return path without going via that statement
00:52:51 <TrueBrain> guess I need to install DOSBox now :)
00:53:43 <glx> hmm right, timer check skips autoscroll check
00:54:47 <glx> but if autoscroll test is done and fails it indeed does the click check
00:54:50 <TrueBrain> which DOSBox frontend did Xaroth use .. hmmm
00:55:07 <TrueBrain> with my latest commit, the code is identical, as far as I can tell
00:55:20 <TrueBrain> well, not identical: we always check on click&drag :P
00:55:33 <TrueBrain> so I guess it can be different in CPU-cycles spend :D
00:56:52 <glx> and modern CPU are known to be way faster ;)
00:58:23 <TrueBrain> hmm, drag is not repeating
00:58:28 <TrueBrain> then so why is click :P
00:58:52 <TrueBrain> I need to check the original game :)
01:02:18 <TrueBrain> okay, I see
01:02:20 <TrueBrain> interesting
01:03:31 <TrueBrain> it indeed seems to be limited in speed purely by the slow CPU
01:04:56 <TrueBrain> cool, it waits with autoscroll for a while, before it kicks in
01:04:58 <TrueBrain> that is nice :D
01:05:57 <glx> I hate games relying on cpu speed
01:06:26 <glx> I know some unplayable games due to that
01:06:57 <TrueBrain> kinda weird, none of Dune2 does, except for this :P
01:07:31 <glx> yup dune2 uses the timer except there
01:08:36 <glx> well it uses timer there but not fully :)
01:09:11 <TrueBrain> so .. 1 click every gametick I guess
01:09:35 <TrueBrain> still pretty fast
01:10:57 <TrueBrain> hihi, going to make it an enhancement
01:11:00 <TrueBrain> just, because I can :D
01:14:56 <TrueBrain> there we go
01:15:10 <TrueBrain> one more bug down
01:15:14 <TrueBrain> 5 left for 0/9
01:15:16 <TrueBrain> -.9
01:15:17 <TrueBrain> 0.9
01:15:19 <TrueBrain> dammit
01:20:08 <TrueBrain> hmm, to allow AIs to build over player structures or not ...
01:20:30 <TrueBrain> it avoids the silly solutions like placing silos ones you destroyed a structure of the AI on the place
01:20:35 <TrueBrain> original behavior is: I just build over it
01:20:38 <TrueBrain> current is: I don't
01:20:55 <TrueBrain> I guess it is needed to make the AI have a chance
01:32:07 <TrueBrain> how am I going to call that variable that basically reads: allow cheating
01:47:58 <TrueBrain> the screen can be marked dirty in 10 stripes on the Y-axis
01:48:06 <TrueBrain> where it can say from which X to which X it should redraw
01:48:12 <TrueBrain> nice is-dirty system :)
01:50:52 <TrueBrain> #137, I somehow remember I removed something in relation to that .. hmm
02:10:05 <TrueBrain> hmm ... I am sure the AI just build over your units ...
02:27:13 <TrueBrain> ha, found it
02:27:15 <TrueBrain> damn, that was hiding
02:28:18 <TrueBrain> oops, my click fix seems to be ... too much :
02:29:12 <glx> g_validateStrictIfZero seems to be a smart implementation
02:29:43 <TrueBrain> sadly, see last commit, they didnt always follow it :D
02:32:47 <TrueBrain> hmm .. why is my click patch wrong ....
02:32:48 <TrueBrain> hmmmm
02:35:11 <TrueBrain> oooppps :D
02:36:18 <TrueBrain> there we go
02:37:26 <TrueBrain> 4 bugs left for 0.8, 16 in total ... nice nice :)
02:40:21 <TrueBrain> added 3 to 0.8 ... I want the deadlock and MIDI issues fixed too, if possible :)
02:40:25 <TrueBrain> I have a good idea for the deadlock
02:40:31 <TrueBrain> just need to test it
02:40:35 <TrueBrain> well, guess I could use some sleep now
02:40:36 <TrueBrain> nn
02:44:29 <TrueBrain> owh, one reminder for myself: sync the files used from OpenTTD
02:44:33 <TrueBrain> config etc
02:44:41 <TrueBrain> we are a bit out-of-date with some parts :)
04:08:22 *** glx has quit IRC
11:59:46 <TrueBrain> http://devs.opendune.org/~truebrain/temp.patch
11:59:53 <TrueBrain> damn, that wasnt as easy as I hoped :P
16:23:34 *** glx has joined #openDune
16:23:34 *** ChanServ sets mode: +o glx
16:24:09 <glx> hello
16:25:01 <TrueBrain> hello :)
16:25:13 <TrueBrain> I synced the Makefile system from OpenTTD; if you have time, can you give mingw a try?
16:25:22 <TrueBrain> it should be without problem, but ... well .. its mingw :D
16:25:30 <TrueBrain> owh, and happy xmas ;)
16:26:44 <glx> unknown option --revision ignored
16:27:24 <TrueBrain> yup; removed it :)
16:44:35 <glx> http://devs.opendune.org/~glx/compile.txt
16:44:40 <glx> and linking fails
16:44:49 <glx> need to check the changes :)
16:45:21 <TrueBrain> a shitload more warnings are given now
16:45:30 <TrueBrain> so ... clearly ... __LITTLE_ENDIAN was never defined :D
16:46:39 <TrueBrain> fixed the warning
16:46:42 <TrueBrain> (last one)
16:50:06 <TrueBrain> cannot find any reason why it would fail linking
16:54:22 <TrueBrain> double-checked ...
16:54:26 <TrueBrain> did you do a: make mrproper?
16:55:37 <glx> I did
16:56:19 <TrueBrain> fixed the rest of the warnings
16:56:27 <TrueBrain> what are your CFLAGS and LDFLAGS?
16:56:40 <glx> using LDFLAGS... -lwinmm -lcomctl32 -mno-cygwin -Wl,--subsystem,windows -static <-- current version
16:56:40 <glx> using LDFLAGS... -lwinmm -lcomctl32 -L/usr/local/lib -lmingw32 -lSDLmain -lSDL -mwindows -liconv -lm -luser32 -lgdi32 -lwinmm -mno-cygwin -Wl,--subsystem,windows -static <-- old svn version
16:57:02 <glx> something clearly disappeared :)
16:57:30 <glx> hmm sdl ldflags it seems
16:57:59 <TrueBrain> why do you have SDL ?
16:58:07 <glx> it's detected
16:58:12 <TrueBrain> hmm
16:58:19 <TrueBrain> does: ./configure --without-sdl
16:58:20 <TrueBrain> work?
16:58:59 <glx> same LDFLAGS
16:59:47 <TrueBrain> odd
16:59:50 <glx> hmm without sdl the old svn version gives the same output
17:00:27 <glx> so our system is broken since begining :)
17:01:13 <TrueBrain> hmmmm ... why does it add SDL ...
17:01:17 <TrueBrain> it does work without it, not?
17:01:29 <TrueBrain> owh, lolz
17:01:31 <TrueBrain> misread what you said
17:01:35 <TrueBrain> so SDL is no longer detected
17:01:36 <TrueBrain> good
17:01:45 <glx> SDL is still detected
17:01:55 <glx> but LDFLAGS doesn't reflect it
17:02:06 <TrueBrain> but we want it without SDL, right?
17:02:29 <TrueBrain> ah, I see what is different
17:03:07 <TrueBrain> syncing ...
17:03:15 <TrueBrain> should be solved now
17:05:59 <TrueBrain> I assumed there would be no SDL on mingw ;)
17:06:03 <TrueBrain> but we do allow it :D
17:06:23 <glx> but we should be able to compile without it
17:06:36 <glx> I just never fixed the system I think
17:06:59 <TrueBrain> with --without-sdl, it really should be off, yes
17:07:16 <TrueBrain> if you are going to work on that, please also check OpenTTD; as far as I know it does exactly the same
17:07:23 <TrueBrain> anyway, it works now with latest? WArning free etc?
17:07:46 <glx> linking works
17:08:01 <glx> didn't make clean yet
17:08:44 <glx> dsp_win32 warning still here
17:09:24 <glx> but should be easy to fix in the code
17:09:42 <glx> looks like a missing const somewhere I guess
17:10:18 <TrueBrain> got thatone on linux too; didnt understand it :P
17:10:20 <TrueBrain> hehe
17:10:30 <TrueBrain> but okay .. it is weird that the --without-sdl doesnt work ... code looks good
17:11:13 <glx> openttd config.lib has LIBS="$LIBS -lws2_32 -lwinmm -lgdi32 -ldxguid -lole32"
17:11:38 <glx> hmm I should search for this line I guess
17:11:40 <TrueBrain> wait, I think we are not talking about 2 things
17:11:44 <TrueBrain> if you do: --without-sdl
17:11:50 <TrueBrain> it doesn't add the SDL statements, right?
17:11:55 <TrueBrain> (in CFLAGS mostly)
17:12:03 <glx> found the line
17:12:16 <TrueBrain> as then -lgdi32 is missing there yes
17:12:16 <glx> just missing some libs in it I guess
17:12:22 <TrueBrain> I thought you said it did add SDL to the CFLAGS :P
17:12:32 <TrueBrain> yeah, try to find the smallest subset that works please :)
17:16:11 <glx> fixed
17:16:37 <TrueBrain> tnx :)
17:17:13 <TrueBrain> dont forget to sync :)
17:17:48 <glx> fixing the warning first
17:18:09 <glx> as I can't sync now I started this fix
17:18:15 <TrueBrain> btw, if I read the code right, OpenTTD is broken; it will auto-detect SDL, then set the CFLAGS but not the LDFLAGS
17:18:17 <TrueBrain> kinda weird :P
17:18:27 <TrueBrain> no rush no rush; I just often forget to sync :D
17:18:50 <glx> no it's ok, sdl is loaded at runtime, not a link time for openttd
17:18:59 <TrueBrain> ah! Ofc :)
17:19:16 <TrueBrain> that explains it all :)
17:19:16 <glx> so you can compile with sdl support and run it on a machine without sdl
17:19:43 <TrueBrain> I also started with 'make bundle' btw; not done yet, but it is a start :)
17:20:04 <TrueBrain> now trying to find why the AI sometimes ignore a unit completely
17:20:13 <TrueBrain> but first, I am going to make a nice xmas meal
17:20:19 <TrueBrain> tnx again glx :)
17:22:45 <glx> synced
17:25:35 <glx> anyway I think I just forget to add -lgdi32 when I removed sdl dep
21:01:25 <TrueBrain> I am trying to figure out why sometimes units are not attacked by the AIs
21:01:43 <TrueBrain> ofc it is because seenByHouse is not 0xFF but another value ... I wonder how that comes to be
21:01:44 <TrueBrain> it is weird
21:11:34 <TrueBrain> ah, hmm ...
21:11:41 <TrueBrain> any unit that is delivered by transport seems to suffer this issue
21:17:11 <TrueBrain> conversion error :)
21:17:27 <TrueBrain> 0x80 != 0x8 :D
21:19:50 <TrueBrain> there we go
22:01:46 <Tomaz> anyone in here have experience with ILBM images?
22:03:05 <glx> seems to be a chunk file
22:03:13 <Tomaz> yes
22:03:18 <Tomaz> IFF format
22:03:37 <Tomaz> but i can only find info on how to load the RLE compressed version, not the "regular" non-compressed one :/
22:08:06 <glx> just skip the uncompress step
22:25:04 *** TrueBrain has quit IRC
22:34:22 *** TrueBrain has joined #openDune