IRC logs for #opendune on OFTC at 2009-11-23
            
05:12:29 *** glx has quit IRC
08:31:30 <Xaroth> Morning
08:33:37 <Xaroth> I see my patch was a bit bumpy?
08:35:17 <Xaroth> <@TrueBrain> glx: it was something Xaroth could have no idea about, and we should know by hearth ;)
08:35:20 <Xaroth> it doesn't?
08:35:22 <Xaroth> 'tile32 tile' doesn't mean tile.tile == 0 ;)
08:40:02 <Xaroth> heh @ changelog btw :P
08:40:37 <Xaroth> you changing emu_ax = tile.s.x; to emu_ax = Tile_GetX(tile);, glx reverting it :P
08:44:21 <Xaroth> what strikes me as odd though,is that when I test my changes running an O6 or O7 game (not sure which one it is), everything ran fine, i could build, move units, destroy buildings, harvest, and return harvesters by carry-all
08:44:25 <Xaroth> without error :o
08:45:57 <Xaroth> adding multiple printfs to make sure that the code I changed actually got called (then testing without them as that hangs the app)
10:03:22 <TrueBrain> Xaroth: it only happened in this one function, and only when the memory was not yet initialized
10:03:48 <TrueBrain> as it is only 4 bits which could be affected, it is no suprise a current game works
10:04:29 <TrueBrain> and I have no idea why glx reverted my changes
10:05:34 <DorpsGek> SVN: truebrain (r587) -Revert (r586): the changes in emu_tile.c were fine
10:05:51 <TrueBrain> lucky he did not revert the important piece ;)
10:06:06 <TrueBrain> I am getting more and more annoyed by webSVN
10:17:28 <Xaroth> how so?
10:17:51 <Xaroth> and that explains why my tests were running fine :P
10:17:53 <TrueBrain> it is annoying :p
10:18:10 <TrueBrain> you would have noticed the problem when you would have build a refinery
10:18:16 <TrueBrain> but you would have been completely clueless why it fails :p
10:18:21 <TrueBrain> as were we for the good first hour :)
10:18:52 <TrueBrain> WebSVN: it shows diffs in one STUPID format (where does it go to another file?!), it shows revisions in one annoying way, it is hard to walk the trees ...
10:18:59 <TrueBrain> with trac at least you can just browse revisions
10:50:08 <Xaroth> it adds another 'header' for the table with the filename
10:50:59 <Xaroth> which, i might add, is not the most clear part :P
10:55:38 <Xaroth> css change to make the path line more noticable
10:55:44 <Xaroth> 150% font size
10:56:42 <Xaroth> and left-alligned
10:57:56 <TrueBrain> doesn't change the fact that browsing revisions is fucked
10:57:58 <TrueBrain> :p
10:58:03 <Xaroth> no
10:58:11 <Xaroth> but it makes it at least a bit better to read
10:58:24 <Xaroth> note the 'a bit' part :P
10:58:41 <TrueBrain> I likehow trac makes it transparent, the linenumbers
11:03:31 <Xaroth> the trac browser is quite nice, though trac is a bit bloated :P
11:05:40 <Xaroth> haha, just noticed your stab against nyer :P
11:05:55 <TrueBrain> yeah, he can be rather annoying
11:06:25 <Xaroth> nyer even registered!
11:06:30 <Xaroth> on the forums*
11:06:38 <TrueBrain> you really do miss things :p
11:06:45 <Xaroth> I was out all weekend with the missus
11:06:53 <TrueBrain> :p :p
11:10:55 <Xaroth> nice work :)
11:13:41 <Xaroth> now just to get more people in irc :)
11:14:02 <Xaroth> without attracting more PeterT-esque people :P
11:17:14 <boekabart> Afternoon
11:17:25 <Xaroth> o/
11:17:38 <Xaroth> almost lunchtime \o/
11:29:45 <boekabart> it's about time work got less busy
11:55:49 <TrueBrain> ghehe :)
11:55:51 <TrueBrain> poor boekabart
11:59:33 <boekabart> well it _is_ why they pay me the big bucks...
11:59:42 <TrueBrain> fair point :)
12:03:31 <TrueBrain> I now have to redesign an existing system ...
12:03:40 <TrueBrain> which is, short said, difficult
12:05:58 <Xaroth> o_O
12:10:35 <TrueBrain> it is very hard to find a balance in rewriting and keeping the old .. or at least making it possible to easy copy/paste ;)
12:55:17 *** glx has joined #openDune
12:55:17 *** ChanServ sets mode: +v glx
12:55:21 <Xaroth> o/ glx
12:55:25 <glx> hello
12:57:02 <TrueBrain> morning
12:57:07 <TrueBrain> waiting for my boss to return from lunch .. lalala ..
12:57:36 *** glx has quit IRC
12:57:47 *** glx has joined #openDune
12:57:47 *** ChanServ sets mode: +v glx
12:59:48 <glx> oh new ssl cert ?
13:01:41 <TrueBrain> yuppers
13:01:44 <TrueBrain> that time of the year
13:01:47 <glx> nice thunderbird no longer complains :)
13:02:04 <TrueBrain> yeah, I added opendune to the cert :)
13:06:05 <glx> hmm svn played with me for r586 ;)
13:06:14 <TrueBrain> we noticed :p
13:06:26 <TrueBrain> lucky you didn't revert the real fix ;)
13:32:04 <boekabart> aaaah working from home after I got my flushot
13:32:28 <boekabart> glx: r586 huh... Pentium Bug?
13:40:23 <TrueBrain> hahahaha :)
13:40:36 <TrueBrain> boekabart: why you need a flushot?
13:55:39 <glx> http://glx.dnsalias.net:8080/opendune/generate.diff <-- finding the right file was annoying due to "duplicate" names
13:56:14 <TrueBrain> if you say it is okay, it is fine by me :)
13:56:17 <TrueBrain> zero knowledge of MSVC :P
13:57:24 <DorpsGek> SVN: glx (r588) -Change: add filters for each subdir in MSVC project file
15:12:01 <Xaroth> TrueBrain: what -was- actually happening with the glitch in my patch?
15:12:11 <TrueBrain> uninitalized variable
15:12:20 <TrueBrain> so ux/uy were not always 0
15:12:22 <Xaroth> yeh, but what happens with that, as obviously it doesn't crash
15:12:33 <Xaroth> it uses random memory data?
15:12:34 <TrueBrain> so IsValid said false to such tiles
15:12:36 <TrueBrain> yup
15:12:41 <TrueBrain> from the heap, most likely
15:12:45 <TrueBrain> so that is pretty randomized
15:12:49 <Xaroth> aha
15:13:06 <Xaroth> that explains a bit
15:14:12 <Xaroth> so in other words, it's best practice to set it to a 0-state in those cases
15:14:12 <glx> <@Xaroth> yeh, but what happens with that, as obviously it doesn't crash <-- it did with msvc (triggered unresolved jump)
15:14:24 <Xaroth> glx: not during my tests :P
15:17:06 <Xaroth> Prodigy in HmH tonight :o
15:17:20 <boekabart> TrueBrain: I got a flushot because our baby is too going to get one (<6months) so we need to be protected so we can't infect him
15:17:29 <boekabart> *too young*
15:17:33 <TrueBrain> boekabart: of course :)
15:17:45 <Xaroth> :o still tickets available for jeff dunham
15:17:55 <TrueBrain> Jeff Dunham is cool :)
15:18:05 <Xaroth> De voorverkoop voor de show van 16 april begint woensdag 25 november om 10.00 uur.
15:18:07 <boekabart> so is the weather
15:18:10 <Xaroth> 2 days already sold out..
15:19:46 <Xaroth> oh god
15:19:54 <Xaroth> marilynn manson ...
15:20:00 <Xaroth> 4 feb machine head tho :o
15:20:16 <Xaroth> went to their concert in the melkweg a few years ago
15:21:18 <glx> http://glx.dnsalias.net:8080/opendune/House_CompareHouseID.diff <-- not totally sure about the name
15:22:12 <TrueBrain> haha
15:22:16 <TrueBrain> cool function :)
15:22:40 <TrueBrain> the houseID1 == houseID2 is useless, but okay :p
15:22:46 <TrueBrain> no, not true :)
15:22:48 <TrueBrain> nevermind
15:22:58 <TrueBrain> I like that atriedes and fremen are that close related ;)
15:23:07 <TrueBrain> explains why they don't attack the sandworm
15:23:12 <glx> hmm I have a doubt in this area :)
15:24:35 <TrueBrain> your code doesn't seem to fully reflect the function btw ..
15:24:44 <glx> hmm no, after reading the asm again and again it seems correct
15:24:47 <TrueBrain> if one of the two is freemen, it doesn't do the playerHouseID check
15:25:05 * glx rereads
15:26:27 <glx> if one is fremen it checks the other to be atreide
15:26:33 <TrueBrain> of course your version seems more correct in the idea of allowing you to play Fremen ;)
15:26:47 <TrueBrain> yes, which returns either 'true' or 'false'
15:26:52 <TrueBrain> it can never go to F69
15:27:09 <TrueBrain> so if one is fremen, the other ordos, it returns false
15:27:20 <TrueBrain> (even if you play ordos, or not)
15:27:37 <TrueBrain> else I guess fremen never attack the enemy :p
15:27:50 <TrueBrain> btw, a better name would be: AreAllies
15:27:56 <glx> and the last test is strange too :)
15:28:01 <TrueBrain> or how ever you write that last word :p
15:28:19 <Xaroth> Allied
15:28:28 <TrueBrain> why is that last test strange glx?
15:28:48 <TrueBrain> this function returns 'false' if two houses should attack eachother, if I read it correctly
15:29:17 <Xaroth> er, the last test is odd
15:29:18 <glx> hmm right, if we are one of the checked house, the other is our enemy
15:29:40 <Xaroth> it means everything not already captured before is hostile to the player?
15:29:50 <TrueBrain> Xaroth: sorry?
15:29:55 <TrueBrain> "already captured before"?
15:30:04 <Xaroth> checked for*
15:30:18 <glx> but that also means ordos and harkonnen are allied against the atreide player (if the test is used for that case)
15:30:25 <Xaroth> nevermind, glx already confirmed it tho :)
15:30:40 <TrueBrain> Xaroth: I don't follow, sorry :p
15:30:48 <Xaroth> TrueBrain: no need, question was answered :)
15:30:53 <TrueBrain> glx: yes .. if you are atreides, harkonnen and ordos are allied
15:31:09 <Xaroth> would be funny as hell if they weren't allied :P
15:31:31 <glx> and if you are harkonnen, ordos and atreides are allied too ?
15:31:43 <Xaroth> if you are X, Y and Z are allied
15:32:02 <glx> ha the game is "unfair" ;)
15:32:03 <TrueBrain> glx: of course not
15:32:06 <TrueBrain> that is why that check is there
15:32:20 <TrueBrain> euh, 'true' means allied :p
15:32:22 <TrueBrain> ghehe
15:32:35 <TrueBrain> yes, I said that already
15:32:36 <TrueBrain> lol
15:32:39 <glx> so it's allways 2 against 1
15:32:41 <Xaroth> glx: It means that the AI will not shoot eachother :P
15:32:47 <TrueBrain> glx: did you play the game? :p
15:32:47 <glx> yup
15:32:49 <Xaroth> 3 against 1 :)
15:32:54 <Xaroth> you're forgetting Sardukar :)
15:33:02 <TrueBrain> well, depends on if you are atreides, as then you have fremen on your side :)
15:33:21 <Xaroth> Sardaukar, even
15:33:21 <TrueBrain> if house1 and house2 are equal, they are allied
15:33:31 <TrueBrain> if house1 or house2 is current player, they are enemies
15:33:36 <TrueBrain> so it is you against the whole world
15:33:57 <glx> let me rename the function :)
15:34:18 <TrueBrain> but the fremen check is a bit weird ... if one of the houses is fremen, it will only be friends with atreides
15:34:26 <Xaroth> not per se
15:34:38 <TrueBrain> so if you would make an AI that is fremen, it will attack all other houses too
15:34:42 <Xaroth> it makes sure that if YOU are the atreides, the fremen are friendly
15:34:49 <Xaroth> TrueBrain: nope
15:34:53 <TrueBrain> Xaroth: no, you are wrong
15:34:56 <TrueBrain> (read the original code)
15:35:05 <glx> fremen don't like other houses btw
15:35:05 <Xaroth> ah, original :P
15:35:15 <glx> they can't be allied with them
15:35:16 <TrueBrain> Xaroth: that was what we are talking about; not the code glx made out of it :)
15:35:21 <glx> it's in their blood
15:35:26 <TrueBrain> hehehehe :)
15:35:52 <Xaroth> this calls for a devblog from glx ? :P
15:36:04 <TrueBrain> ghehe :)
15:36:08 <glx> don't expect it too much ;)
15:36:13 <glx> I don't like to write
15:36:26 <TrueBrain> besides C :p
15:38:55 <glx> The Fremen are native to Dune. Elite fighters, the Fremens' familiarity with the hostile terrain makes them a difficult adversary. Informed sources say they may soon forge an alliance with the Atreides.
15:39:01 <glx> the manual is clear :)
15:39:33 <TrueBrain> yup; the original code reflects it perfeclty :)
15:42:34 <glx> hmm something is wrong
15:42:50 <TrueBrain> oeh, a guessing game
15:42:57 <TrueBrain> eeuuuhhh ... your .... hand is on your head?
15:43:02 <glx> I loaded my atreide7 game
15:43:03 <TrueBrain> sorry, I have been working too long today :)
15:43:09 <glx> ordos are now my friends
15:43:15 <TrueBrain> what is your latest patch?
15:43:18 <glx> yup
15:43:26 <TrueBrain> as the fremen problem still aint fixed ;)
16:23:42 <glx> grrrr I don't get what's wrong
16:24:58 <TrueBrain> you uploaded your latest?
16:25:02 <glx> yes
16:25:31 <glx> I don't where is the error
16:25:37 <glx> +see
16:25:38 <TrueBrain> I would reverse the last 2 returns btw
16:27:22 <TrueBrain> + houseID1 = emu_get_memory16(emu_ss, emu_bp, 0x0);
16:27:23 <TrueBrain> + houseID2 = emu_get_memory16(emu_ss, emu_bp, 0x2);
16:27:25 <TrueBrain> s/bp/sp/g
16:27:39 <glx> oh
16:28:10 <Xaroth> heh, last time i did that on a tile function i messed up the entire display :P
16:28:31 <glx> I'm stupid :)
16:28:36 <TrueBrain> nah, common mistake
16:28:44 <Xaroth> french, yes, stupid, no
16:28:57 <glx> now I can rewrite the function again :)
16:29:05 <glx> the first version looks cleaner
16:29:13 <TrueBrain> Xaroth: this you will know: in PHP, I have $tag = "[1]", and $data = array(...)
16:29:20 <TrueBrain> how to get $data[$tag] (where that of course is invalid)
16:29:25 <TrueBrain> $tag can also be [1][2]
16:29:33 <Xaroth> eh?
16:29:42 <Xaroth> array( "tag" => value ) ?
16:29:57 <TrueBrain> no, array is a normal array
16:30:00 <TrueBrain> like $data[1] = "aa"
16:30:03 <TrueBrain> $data[2] = "bb"
16:30:19 <glx> you need to split $tag I think
16:30:19 <Xaroth> and what's $tag's purpose?
16:30:30 <TrueBrain> to indicate which element of $data I want to have
16:30:33 <TrueBrain> but it comes via a string
16:30:36 <TrueBrain> glx: I was hoping to avoid that
16:30:38 <Xaroth> ah
16:30:55 <Xaroth> if tag is [1][2] it should return both?
16:31:04 <TrueBrain> no, it should return $data[1][2]
16:31:04 <Xaroth> if so, splitting/parsing/whatever :/
16:31:08 <Xaroth> O_O
16:31:16 <Xaroth> er, splitting/parsing/whatever :P
16:31:23 <TrueBrain> things like ${data."[1]"} should work I was hoping
16:31:25 <Xaroth> preg_match ?
16:31:33 <Xaroth> yes, eval() could work
16:31:42 <Xaroth> but that's a pit of filth you don't want to go into
16:32:21 <TrueBrain> eval indeed works
16:32:27 <TrueBrain> but I was hoping for a cleaner solution with ${} stuff
16:32:44 <TrueBrain> splitting/parsing/whatever is no option, as that only increases the complexity for nothing
16:32:45 <Xaroth> not to my knowledge
16:33:00 <Xaroth> but as i said, eval is dangerous stuff
16:33:01 <glx> ok last version available
16:33:10 <glx> now ordos attacks me
16:33:15 <TrueBrain> glx: but wrong again
16:33:18 <glx> I hate 'thopter
16:33:24 <TrueBrain> freman code is glitched now
16:33:56 <TrueBrain> if (houseID1 == FREMEN || houseID2 == FREMEN) return (houseID1 == ATREIDES || houseID2 == ATREIDES);
16:34:00 <TrueBrain> most likely the cleanest
16:36:17 <glx> yup that's what I have now :)
16:38:18 <glx> small functions can be bitches ;)
16:40:16 <Xaroth> like Tile_GetX :P
16:41:30 <DorpsGek> SVN: glx (r589) -Add: named and C-ified one more function
16:42:42 <Xaroth> hm, should have turned on my pc when i left to work
16:42:50 <Xaroth> was wondering why i couldn't rdp to it
16:42:58 <Xaroth> ... to start the download of the last top gear.
16:43:16 <TrueBrain> whoho, Nuon called AGAIN
16:43:26 <Xaroth> again?
16:43:30 <Xaroth> they want your monies?
16:43:46 <TrueBrain> somehow I keep popping back up in their system
16:44:28 <Xaroth> what did you hack now :P
16:46:17 <TrueBrain> how to check if an object is part of a class ...
16:46:41 <Xaroth> php?
16:46:50 <TrueBrain> yup
16:46:54 <TrueBrain> get_class only gets the most recent class
16:46:56 <TrueBrain> oh well
16:46:59 <Xaroth> http://nl2.php.net/manual/en/function.is-a.php
16:47:04 <Xaroth> :)
16:47:23 <TrueBrain> is_subclass_of :)
16:47:40 <Xaroth> Checks if the given object is of this class or has this class as one of its parents.
16:47:53 <TrueBrain> Checks if the given object has the class class_name as one of its parents.
16:47:55 <TrueBrain> ;)
16:47:55 <Xaroth> so that also does is_subclass_of
16:48:01 <TrueBrain> one by name, other by object
16:48:05 <Xaroth> true
16:48:13 <TrueBrain> no, not true
16:48:15 <TrueBrain> hmm
16:48:17 <TrueBrain> what the ...
16:48:22 <Xaroth> is_subclass_of is either object, or name
16:48:27 <Xaroth> object
16:48:27 <Xaroth> A class name or an object instance
16:48:36 <TrueBrain> they both have that :p
16:48:45 <TrueBrain> instanceof is what I want :)
16:48:50 <Xaroth> no, is_a requires object + name
16:48:58 <Xaroth> is_subclass_of requires name/object + name
16:49:27 <TrueBrain> yippie, works :)
16:49:29 <TrueBrain> tnx Xaroth
16:49:31 <Xaroth> :)
16:49:58 <Xaroth> time to go home
16:50:10 <TrueBrain> enjoy
16:50:17 <TrueBrain> I am going to make dinner
17:24:13 <glx> http://glx.dnsalias.net:8080/opendune/cleanup.diff <-- some cleanup :)
17:52:19 *** Xaroth sets mode: +vvvv tneo TinoDidriksen SmatZ planetmaker
17:52:21 *** Xaroth sets mode: +vv nsz boekabart
17:59:13 <TrueBrain> glx: I am glad you looked into the Adjust thingy, and noticed 0 was true ;)
17:59:20 <TrueBrain> looks good, nice job :)
18:02:35 <DorpsGek> Bugs: http://bugs.opendune.org/view.php?id=20 :: Bug Created :: crash playing map 3
18:03:39 <glx> yes this function is unnatural ;)
18:03:44 <glx> inverted is inverted
18:03:59 <TrueBrain> my C variant?
18:04:31 <glx> I didn't check your version
18:04:40 <glx> only the emu_ one
18:04:41 <TrueBrain> ah :) I inverted the invert they were using :)
18:04:45 <TrueBrain> thought it would make more sense ;)
18:05:10 <Xaroth> midfreak is a mate of mine btw.
18:05:14 <Xaroth> @bug20
18:06:09 <TrueBrain> Xaroth: when is 0.2 scheduled?
18:06:28 <DorpsGek> Bugs: http://bugs.opendune.org/view.php?id=20 :: New Status: closed (duplicate)
18:06:36 <Xaroth> Feb 1
18:06:45 <TrueBrain> k .. I guess we should consider releasing nightlies :)
18:11:57 <DorpsGek> SVN: glx (r590) -Codechange: don't use wrapper when we can use the real function and removed unneeded wrappers
18:17:02 <TrueBrain> split(".", "test") acts WEIRD in PHP ..
18:17:11 <TrueBrain> it uses regexp ....
18:17:16 <TrueBrain> FOR A SPLIT?
18:44:15 <Xaroth> yeh
18:44:17 <Xaroth> preg_split :)
18:44:41 <TrueBrain> useless
18:44:49 <Xaroth> yep
18:44:57 <Xaroth> -can- be useful
18:45:00 <Xaroth> most often not
19:09:51 <TrueBrain> okay, I am going to do GameLoop_Unit() now
19:19:39 <TrueBrain> @base 16 10 1e
19:19:39 <DorpsGek> TrueBrain: 30
19:19:40 <TrueBrain> @base 16 10 f
19:19:40 <DorpsGek> TrueBrain: 15
19:19:42 <TrueBrain> @base 16 10 3c
19:19:42 <DorpsGek> TrueBrain: 60
19:19:57 <TrueBrain> @base 16 10 2a30
19:19:57 <DorpsGek> TrueBrain: 10800
19:19:59 <TrueBrain> @base 16 10 1518
19:19:59 <DorpsGek> TrueBrain: 5400
19:20:02 <TrueBrain> @base 16 10 5460
19:20:02 <DorpsGek> TrueBrain: 21600
19:22:31 <DorpsGek> SVN: truebrain (r591) -Codechange: removed a few magic hex numbers, and replaced them with decimal numbers
19:30:50 *** TrueBrain_ has joined #openDune
19:30:55 *** TrueBrain has quit IRC
19:35:04 *** TrueBrain_ is now known as TrueBrain
19:37:56 <TrueBrain> whoho, sillyness again ... overflow of checks for debugScenario
19:38:00 <TrueBrain> they considered it very important :p
19:42:01 <DorpsGek> SVN: truebrain (r592) -Codechange: an inconsistancy between GameLoops
19:58:38 <TrueBrain> @base 10 16 [ calc 0x3c - 0x12 ]
19:58:38 <DorpsGek> TrueBrain: 2A
20:26:29 <TrueBrain> emu_get_memory16(emu_ss, emu_bp, -0x12) = 0x8;
20:26:31 <TrueBrain> emu_ax = emu_get_memory16(emu_ss, emu_bp, -0x12);
20:26:32 <TrueBrain> emu_bx = 0x5;
20:26:34 <TrueBrain> emu_xorw(&emu_dx, emu_dx);
20:26:35 <TrueBrain> emu_divw(&emu_ax, emu_bx);
20:26:37 <TrueBrain> useful! :)
20:26:51 <Xaroth> divide by 0?
20:27:03 <TrueBrain> you always read the lovely things in this code, I can't seem to find :p
20:27:26 <glx> where do you see a div/0 ?
20:27:48 <glx> it's just 8/5 in a weird way :)
20:28:21 <Xaroth> i read the last bx as a dx
20:28:59 <TrueBrain> ghehe :)
20:31:05 <TrueBrain> there is exception code for 'thopters and harvesters
20:31:13 <TrueBrain> but so far I have written 200 lines, of which I don't understand any :p
20:31:27 <glx> happens often
20:31:41 <glx> especially when called functions are not named yet
20:31:42 <TrueBrain> well, I didn't had it this bad
20:34:21 <glx> what are you converting ?
20:34:34 <TrueBrain> GameLoop_Unit, as I said an hour ago :p
20:34:37 <TrueBrain> damn big function .....
20:35:33 <glx> I'll do GameLoop_AirUnit then :)
20:36:05 <TrueBrain> or, if you like, you can read over my patch in like 20 minutes or something
20:37:04 <glx> watching tv right now :)
20:37:41 <TrueBrain> @base 10 16 [ 0x24 - 0x12 ]
20:37:41 <DorpsGek> TrueBrain: Error: Invalid <number> for base 10: [0x24 - 0x12]
20:37:44 <TrueBrain> @base 10 16 [ calc 0x24 - 0x12 ]
20:37:44 <DorpsGek> TrueBrain: 12
20:37:54 <TrueBrain> @base 10 16 [ calc 0x12 - 0xc ]
20:37:54 <DorpsGek> TrueBrain: 6
20:38:21 <TrueBrain> variables[3] for Units is always the current player house :p
20:41:31 <TrueBrain> @base 10 16 [ calc 0x1d - 0x12 ]
20:41:31 <DorpsGek> TrueBrain: B
20:44:16 <TrueBrain> the strange code which is a debug statement in structures is in fact normal code in units ..
20:50:39 <TrueBrain> @base 10 16 [calc 0x62EA - 0x628A]
20:50:39 <DorpsGek> TrueBrain: 60
20:54:35 <TrueBrain> k .. failure ... :p
20:54:52 <TrueBrain> http://devs.opendune.org/~truebrain/temp.patch
21:03:33 <glx> oh it used di and si as local variables?
21:04:37 <TrueBrain> yup
21:04:42 <TrueBrain> I have a bug somewhere ... no idea where ...
21:04:44 <TrueBrain> units don't move
21:06:18 <DorpsGek> SVN: truebrain (r593) -Codechange: another minor coding inconsistancy
21:06:29 <TrueBrain> I want to reach r1024 before the end of the month :p :p
21:07:46 <glx> oh nice it checks debugScenario at the begining of the function and in the loop
21:09:19 <TrueBrain> in case it changed :p :p
21:18:06 <TrueBrain> lol, mixed up a div with a mul .. oops!
21:22:33 <Xaroth> heh
21:23:54 <TrueBrain> glx: please start naming which function you C-ify in the logs
21:23:58 <TrueBrain> (also for myself btw :p)
21:24:05 <TrueBrain> I try to find back a function, and that is kind of hard now :)
21:35:00 <TrueBrain> haha, found a nasty mistake ...
21:35:28 <TrueBrain> still a no-go :(
21:42:14 <TrueBrain> I double checked it ... no clue :(
21:45:48 <glx> I'm on the loop start
21:45:58 <glx> (all current stuff setting)
21:46:27 <TrueBrain> I uploaded a new patch
21:46:31 <TrueBrain> which fixes a few minor shit
21:47:57 <TrueBrain> damn it, copy/paste error :(
21:48:34 <TrueBrain> okay ... now it seems to work :)
21:50:29 <TrueBrain> a burning harvester looks weird
21:51:14 <TrueBrain> not my patch ;)
21:56:25 *** Xaroth sets mode: +o TrueBrain
21:57:26 <TrueBrain> I fail to identify any of the other times .. I know the first 2 handle the movement, but that is all
22:00:06 <DorpsGek> SVN: truebrain (r594) -Documentation: I no longer have any doubt about a few variables
22:00:31 <TrueBrain> newer patch uploaded
22:01:07 <TrueBrain> btw, glx, AirUnits only runs scripts :p
22:01:20 <TrueBrain> there is a very very high change our 'airunits' are in fact 'teams'
22:02:03 <glx> I only added an empty airunit.c :)
22:02:11 <glx> I'm reading your patch
22:02:27 <TrueBrain> yeah .. let me know the result of that reading ;)
22:03:10 <glx> was easier to "read" with locXX ;)
22:03:23 <TrueBrain> they are still in that order :)
22:03:34 <TrueBrain> but I have those right ;) No doubt about that :)
22:03:43 <glx> but it was easy to see them in asm
22:03:47 <TrueBrain> true
22:07:27 <glx> emu_Tile_PackTile can be replaced by real function
22:09:20 <TrueBrain> ah, yes :)
22:09:56 <TrueBrain> done
22:12:15 <glx> +,...,...,...,...,...if (u->variable_6D >= 0) {
22:12:26 <glx> maybe a && !=0xFF
22:12:48 <TrueBrain> why?
22:13:01 <TrueBrain> 6D is a signed value
22:13:20 <glx> ha ok then :)
22:13:42 <TrueBrain> else that value would always yield true :p
22:13:47 <glx> memories of some converted functions ;)
22:25:33 <glx> +,...,...,...,...,...g_global->scriptUnitLeft = g_global->scriptUnitSpeed * 5;
22:25:33 <glx> +,...,...,...,...,...if ((ui->variable_0C & 0x0800) == 0) {
22:25:41 <glx> seems wrong
22:28:58 <glx> can be a problem if f__07D4_196B_0073_56C1() uses g_global->scriptUnitLeft
22:30:35 <TrueBrain> it doesn't :)
22:34:54 <TrueBrain> but in reality it is a : if (0c & 0x0800 && !SomeFunction(u->position)) unitLeft = 1; else unitLeft = unitSpeed * 5;
22:34:58 <TrueBrain> but I can't do that just yet ;)
22:37:04 <glx> hmm you added a safety check for stackPointer ;)
22:37:11 <TrueBrain> yes and no
22:37:15 <TrueBrain> the check runs on a int16
22:37:21 <TrueBrain> so if it comes below 0, it doesn't execute
22:37:30 <TrueBrain> so it is easier to check if that would happen, before doing the sub
22:37:33 <TrueBrain> avoiding a signed cast
22:38:34 <SmatZ> (0c & 0x0800 && !SomeFunction(u->position)) <== beware of operator precedence :)
22:38:38 <SmatZ> good evening :)
22:38:44 <TrueBrain> SmatZ: I was being lazy, no worries :)
22:38:47 <TrueBrain> and hello to you too :)
22:41:40 <SmatZ> ah, so it wasn't exactly this case... just something like "if (a == b & c)" can have unexpected behaviour :)
22:41:53 <TrueBrain> always put () around & :p
22:41:57 <TrueBrain> that is my slogon :)
22:42:08 <SmatZ> indeed ;)
22:45:01 <TrueBrain> so glx, what is the verdict? :p
22:46:49 <glx> no errors spotted :)
22:46:55 <TrueBrain> whoho!
22:47:09 <DorpsGek> SVN: truebrain (r595) -Add: C-ified GameLoop_Unit()
22:47:48 <glx> now I can continue my GameLoop conversion :)
22:52:43 <DorpsGek> Bugs: http://bugs.opendune.org/view.php?id=21 :: Bug Created :: crash in the Mentat screen
22:58:22 <DorpsGek> SVN: truebrain (r596) -Add: name all variables related to tickers in global.h
22:58:28 <TrueBrain> tnx btw, glx, for proofreading :)
23:00:47 <DorpsGek> SVN: truebrain (r597) [JIT] -Fix (#21): one more problem found by SmatZ
23:00:57 <DorpsGek> SVN: truebrain (r598) -Update (r597, #21): update decompiled code
23:01:05 <DorpsGek> Bugs: http://bugs.opendune.org/view.php?id=21 :: New Status: closed (fixed)
23:01:18 <SmatZ> hmm, I saw an image corruption in the "Choose your house" screen, but I can't reproduce it :(
23:01:23 <SmatZ> that was fast, TrueBrain ;)
23:01:37 <TrueBrain> my ex said the same :p
23:01:44 <SmatZ> I deleted the highscore table before that
23:01:45 <SmatZ> hehe :)
23:02:25 <TrueBrain> yes, it corrupts fast
23:02:36 <TrueBrain> am Free Error! Press any key to exit to DOS.
23:02:41 <TrueBrain> Ram Free Error! Press any key to exit to DOS.
23:02:43 <SmatZ> :-D
23:03:08 <SmatZ> the image was just broken - "random" pixels in area ~20x50 pixels
23:05:20 <DorpsGek> SVN: truebrain (r599) [JIT] -Add: mapped another 2 functions (randomly playing around in mentat screen)
23:05:29 <DorpsGek> SVN: truebrain (r600) -Update (r599): update decompiled code
23:05:32 <TrueBrain> r600 :)
23:05:41 <Xaroth> gz
23:05:48 <Xaroth> you really do want to reach 1024 before december :P
23:05:54 <TrueBrain> :p
23:06:03 <TrueBrain> I will not make any commit with that goal in mind
23:06:08 <Xaroth> ofc
23:06:14 <TrueBrain> I just love committing a lot :)
23:06:32 <Xaroth> I recall somebody in #openttd admiring rubidium for comitting 5 times in 1h15m
23:06:42 <Xaroth> you just did 6, in... 20?
23:06:47 <TrueBrain> SmatZ: do you have any suggestions how to supress the warning: src/script_structure.c:33: warning: unused parameter 'script', in such way most compilers accept it, and not ignoring it in general?
23:07:07 <TrueBrain> Xaroth: in OpenTTD it was never much appreciated to commit a lot, while I strongly believe a trunk should be used like that
23:07:14 <TrueBrain> when you have something, how ever minor, commit it
23:07:18 <Xaroth> true
23:07:25 <TrueBrain> as you might have noticed, my commit messages are rarely more than one line
23:07:31 <TrueBrain> because the description always fits in one line
23:07:42 <TrueBrain> I am not "afraid" of high revision numbers :p
23:07:51 <Xaroth> means more parties, no? :P
23:07:55 <TrueBrain> haha
23:08:06 <TrueBrain> it just means you use a VCS for what it is created :)
23:08:14 <Xaroth> and more parties.
23:08:15 <TrueBrain> to track code .. and not 'stable revisions' :p
23:08:59 <TrueBrain> but okay .. I am also a person who spends more time in seperating patches into many :p
23:10:31 <TrueBrain> damn, tcc can no longer compile OpenDUNE
23:10:45 <Xaroth> ?
23:11:27 <SmatZ> TrueBrain: http://paste.openttd.org/218252 something like this could work
23:11:49 <TrueBrain> SmatZ: LOL! That is silly :)
23:11:56 <TrueBrain> k, I am going to make a NOT_USED() macro :)
23:12:03 <SmatZ> hehe
23:12:04 <TrueBrain> I believe gcc has a 'nice' solution, not?
23:12:20 <SmatZ> int f __attribute__((unused))
23:12:25 <SmatZ> if that is 'nice' ;)
23:13:09 <TrueBrain> works on functions
23:13:10 <TrueBrain> bah
23:13:52 <TrueBrain> ah, there is a variable version
23:13:56 <TrueBrain> but it has to be in the decleration
23:13:59 <TrueBrain> so your solution will do :p
23:14:10 <SmatZ> :)
23:18:28 <TrueBrain> glx: if you have the time, can you give http://devs.opendune.org/~truebrain/temp.patch a spin in MSVC?
23:26:05 <TrueBrain> (or of course Xaroth if he is still here)
23:30:20 <DorpsGek> SVN: truebrain (r601) -Fix: use 'uint32' in structs where possible, as some compilers appreciate this more
23:31:48 <SmatZ> /* For Tiny C Compiler to pack the content of a struct, it needs the
23:31:56 * SmatZ wonders how many compilers are out there :)
23:32:11 <TrueBrain> what do you mean, sorry?
23:32:21 <SmatZ> oh, tcc
23:32:23 <SmatZ> :-x
23:32:26 <TrueBrain> :)
23:32:26 <SmatZ> my apologies
23:32:31 <TrueBrain> no apologies needed :)
23:34:10 <TrueBrain> tcc needs stdio.h ...
23:34:26 <TrueBrain> else it fails to give structs the right size
23:34:53 <TrueBrain> which is weird as everything is size-checked
23:36:01 <SmatZ> make CC=gcc-3.3.6 CXX=gcc-3.3.6
23:36:06 <SmatZ> cc1: error: unrecognized option `-Wextra'
23:36:08 <SmatZ> do you care?
23:36:13 <Xaroth> last top gear is funneh
23:36:13 <TrueBrain> remove it for now
23:36:20 <TrueBrain> in Makefile
23:36:27 <SmatZ> ok :)
23:36:29 <TrueBrain> there is no configure script yet, so no detection of what is available and what not
23:36:38 <TrueBrain> slowly I should start writing a configure
23:36:43 <SmatZ> you can use -W instead though
23:36:56 <glx> http://glx.dnsalias.net:8080/opendune/gameloop_airunit.diff
23:38:17 <TrueBrain> if (!Script_Run(&a->script)) break; <- make that break a continue please
23:38:26 <TrueBrain> and if that break as in the Dune2 code, please make it a g_dune2_enhanced
23:38:44 <TrueBrain> btw, you have a double newline
23:39:17 <TrueBrain> k, indeed, dune2 does a break, which is stupid
23:40:01 <TrueBrain> so something like: if (!Script_Run(&a->script)) { /* ENHANCEMENT -- Dune2 aborts all other airunits if one gives a script error. This doesn't seem correct */ if (g_dune2_enhanced) continue; break; }
23:40:13 <TrueBrain> and of course the enhancement.txt ;)
23:41:55 <TrueBrain> wow, TCC compiles FAST!
23:42:42 <TrueBrain> shit .. libemu.so with tcc fails to work, libemu.so with gcc gives a problem .. (most likely parameter-order or what ever)
23:43:33 <TrueBrain> SmatZ: please let me know how those compiles go
23:44:41 <SmatZ> TrueBrain: gratz, it compiles even with gcc2.95 when I remove some switches :)
23:44:54 <glx> refreshed
23:45:07 <glx> +,...,...if (a->scriptDelay != 0) {
23:45:07 <glx> +,...,...,...a->scriptDelay--;
23:45:07 <glx> +,...,...,...continue;
23:45:07 <glx> +,...,...}
23:45:29 <glx> maybe I can use if (a->scriptDelay-- != 0) continue;
23:45:37 <SmatZ> -foptimize-sibling-calls -Wextra -Wno-unused-label
23:45:39 <TrueBrain> please don't glx :)
23:45:44 <SmatZ> these needed removing for 2.95
23:45:55 <TrueBrain> SmatZ: the -f can be a problem
23:45:57 <TrueBrain> it is for tcc :p
23:46:10 <SmatZ> gcc knows it too :)
23:46:24 <TrueBrain> glx: seems fine to me :)
23:46:30 <glx> he meant it is a problem for tcc ;)
23:46:37 <SmatZ> ah
23:46:39 <SmatZ> :)
23:47:08 * Xaroth prefers the corvette over the audi.
23:47:09 <glx> now testing
23:47:12 <Xaroth> (watching top gear)
23:47:45 <TrueBrain> or at least I think tcc has a stack overflow, as else I wouldn't know how to explain the problem :)
23:48:10 <TrueBrain> still, it compiles in 4 seconds
23:49:43 <TrueBrain> gcc takes 23 seconds
23:50:07 <SmatZ> TrueBrain: it miscompiles the binary?
23:50:14 <TrueBrain> SmatZ: how do you mean?
23:50:35 <SmatZ> [00:47:46] <TrueBrain> or at least I think tcc has a stack overflow, as else I wouldn't know how to explain the problem :) <== what problem?
23:50:54 <SmatZ> that libemu compiled with tcc doesn't cooperate with opendune compiled with gcc?
23:50:54 <TrueBrain> well, with tcc, OpenDUNE just crashes when trying to paly a game (either loading or starting a new one)
23:51:07 <TrueBrain> in the beginning this was mostly due to stack overflow, because of endless loops
23:51:13 <TrueBrain> most should be resolved though
23:51:38 <TrueBrain> and gcc4 no longer requires the -foptimize-sibling-calls
23:52:06 <TrueBrain> in fact, it even works now in -O0
23:52:10 <SmatZ> :)
23:52:17 <SmatZ> ah, interesting
23:52:18 <TrueBrain> so why does tcc fuck up
23:52:32 <TrueBrain> and why does libemu.so compiled with tcc fuck up even worse :p (black screen, nothing happens)
23:52:41 <SmatZ> now I understand the need for -foptimize-sibling-calls :)
23:52:48 <glx> yeah jumps were calls in the begining :)
23:52:53 <SmatZ> hehe
23:52:56 <TrueBrain> # We need -O1 and optimize-sibling-calls to avoid infinite loops we are
23:52:58 <TrueBrain> # currently having. When all those cases are resolved, this can be removed.
23:52:59 <TrueBrain> ;)
23:53:06 <glx> and MSVC didn't like that at all :)
23:53:11 <SmatZ> comments are for noobs :-p
23:53:14 <SmatZ> ;)
23:53:27 <TrueBrain> glx: how does my patch do on MSVC?
23:53:29 <TrueBrain> fixes the warnings?
23:56:52 <glx> doesn't apply cleanly
23:57:07 <TrueBrain> oh, remove that chunk about Tiny C :p
23:57:48 <glx> it's skiped anyway
23:58:26 <TrueBrain> okay, so TCC 'kind of' works .. it shows the whole intro :p
23:58:35 <SmatZ> :)
23:58:46 <glx> MSVC was not able to do that in the begining
23:58:52 <TrueBrain> exactly :p
23:59:21 <TrueBrain> I wonder how gcc-2 does :p
23:59:34 <glx> no more, no less warnings for MSVC with your patch