IRC logs for #opendune on OFTC at 2011-02-19
            
03:38:16 *** glx has quit IRC
12:40:35 *** fjb is now known as Guest1908
12:40:36 *** fjb has joined #openDune
12:47:22 *** Guest1908 has quit IRC
12:57:07 *** glx has joined #openDune
12:57:07 *** ChanServ sets mode: +o glx
12:57:26 <glx> hello
12:57:50 <TrueBrain> o/
12:58:20 <Xaroth|Work> \o
13:01:20 <glx> http://svn.opendune.org/~glx/temp.patch <-- current stuff (still doesn't compile)
13:05:25 <TrueBrain> nice going
13:25:47 <glx> oh 4 warnings (just svn up)
13:27:22 <glx> indeed all GUI_DrawCredits() calls warn
13:33:15 <glx> http://svn.opendune.org/~glx/temp.patch <-- now compiles
13:37:29 <glx> an it seems to work
13:45:42 <DorpsGek> SVN: glx (r1324) -Add: C-ified Script_Unit_1319_002D(), Script_Unit_1319_02AC() and Script_Unit_1319_03E8(). Segment 1319 is now finished.
13:46:03 <TrueBrain> concratz
13:47:55 <Xaroth|Work> nice
13:48:10 <glx> next f__176C_1F21_001C_8C6C()
14:31:22 <DorpsGek> SVN: glx (r1325) -Add: C-ified Unit_176C_1F21(). Segment 176C is now finished.
14:50:28 <glx> TrueBrain: worklist is not up to date
16:03:14 <TrueBrain> guess I can do the two 0C3As ...
16:14:48 *** glx has quit IRC
17:58:58 <DorpsGek> SVN: truebrain (r1326) -Fix: wrong parameter was ready for 3rd parameter
18:00:04 <DorpsGek> SVN: truebrain (r1327) -Add: C-ified Structure_UpdateMap()
18:17:37 *** glx has joined #openDune
18:17:37 *** ChanServ sets mode: +o glx
18:31:56 <TrueBrain> wb :D
18:33:07 <glx> I was changing some fans
18:33:31 <TrueBrain> a quest for you, as it makes no sense to me:
18:33:38 <TrueBrain> src/map.c, line 793, uses si->o.varaible_1A
18:33:54 <TrueBrain> it seems to change the type of explosion under a certain condition
18:34:13 <TrueBrain> now I am doing this last 0C3A, and it clearly shows that variable_1A is the 'campaign of introduction'
18:34:22 <TrueBrain> there when a structure (or unit) becomes available
18:36:08 <glx> maybe an offset error
18:36:44 <glx> if ((si->o.variable_1A >> 1) > s->o.hitpoints) {
18:36:44 <glx> with a 0xA offset it makes more sense ;)
18:36:56 <glx> variable_10 = hitpoints
18:37:01 <TrueBrain> hahaha
18:37:03 <TrueBrain> lets go for that :D
18:37:43 <glx> so the usual si->o.hitpoints / 2
18:38:29 <glx> (and my usual mistake ;) )
18:38:30 <DorpsGek> SVN: truebrain (r1328) -Fix: sometimes we tend to forget the 0xA offset of StructureInfo ;)
18:38:32 <TrueBrain> tnx glx :)
18:40:45 <TrueBrain> it _writes_ in StructureInfo, haha :D
18:41:05 <glx> nasty
18:42:33 <TrueBrain> variable_21 is read from ObjectInfo, which is set to be an uint16 on variable_20
18:42:36 <TrueBrain> also nasty ...
18:43:53 <TrueBrain> calc 0x20 - 0xa
18:43:55 <TrueBrain> @calc 0x20 - 0xa
18:43:55 <DorpsGek> TrueBrain: 22
18:43:58 <TrueBrain> @base 10 16 22
18:43:58 <DorpsGek> TrueBrain: 16
18:44:21 <DorpsGek> SVN: truebrain (r1329) -Fix (r1178): see r1328 for what went wrong :p
18:44:43 <TrueBrain> all of a sudden it makes sense and stuff :p
18:45:31 <glx> and more will be found I fear
18:57:25 <TrueBrain> how to name a variable which indicates (in a bitmask) which structures it needs before it can be build?
18:57:35 <TrueBrain> buildStructuresNeeded ?
18:57:42 <TrueBrain> structuresNeededBuilt
18:57:48 <TrueBrain> structuresNeedBuilt
18:57:54 <planetmaker> buildRequirements
18:58:21 <planetmaker> with enum STRUCTURE_WINDTURBINE etc
18:58:39 <TrueBrain> it isn't an enum, its a bitmask :p
18:59:05 <TrueBrain> structuresRequired
18:59:50 <TrueBrain> tnx planetmaker :)
19:00:09 <planetmaker> well, but the enum which enumerates the bit elements I meant :-)
19:00:21 <TrueBrain> (1 << STRUCTURE_BARRACKS)
19:00:23 <TrueBrain> works just fine :p
19:00:29 <glx> :)
19:00:47 <TrueBrain> who remembers what was going on with Harkonnen?
19:00:58 <TrueBrain> something with the WOR and LIGHT_VEHICLE
19:01:26 <glx> my memory is not good
19:01:55 <planetmaker> hm... not sure anymore either
19:05:14 <TrueBrain> how I read this piece of code, there is an error in the data files which is corrected inthe code :p
19:05:26 <TrueBrain> namely that WOR depends on Barracks :p
19:05:52 <TrueBrain> but WOR is Harkonnen only, not?
19:06:03 <planetmaker> maybe ordos...
19:06:17 <TrueBrain> meh; I need MrFlibble in this channel :p
19:15:52 <Xaroth|Work> then get him here :P
19:16:50 <TrueBrain> I think that is a job for you :D
19:17:03 <Xaroth|Work> meh :P
19:26:26 <TrueBrain> some funky stuff this is ....
19:26:33 <TrueBrain> global data abused for local scope
19:27:23 <TrueBrain> unitInfo.available, is 1 if you can build it, or 0 otherwise
19:27:26 <TrueBrain> but starport also uses it
19:27:31 <TrueBrain> to indicate how many you ordered etc etc
19:27:38 <TrueBrain> well, never both ar eused, but still
19:27:39 <TrueBrain> funky :p
19:30:12 <glx> global data is often used as local static
19:30:42 <glx> stack and memory usage control
19:31:05 <TrueBrain> yeah, but this time it has 2 functions
19:31:07 <TrueBrain> depending on where you are
19:31:08 <TrueBrain> which is funky
19:39:37 <TrueBrain> oeh, seems my conversion is correct :D
19:43:01 <DorpsGek> SVN: truebrain (r1330) -Add: C-ified Structure_GetBuildable(). Segment 0C3A comes to an end.
19:43:09 <TrueBrain> now we need testers for that :D
19:43:16 <glx> yup
19:43:31 <glx> code 2 days, wait 2 months for bugs ;)
19:43:46 <TrueBrain> glx: I have an issue
19:43:49 <TrueBrain> (talking about bugs)
19:43:56 <TrueBrain> returning harvesters no longer enter the refinery
19:44:21 <Xaroth|Work> :o
19:44:30 <TrueBrain> they approach the refinery
19:44:30 <glx> when did it start
19:44:32 <TrueBrain> but don't enter
19:44:34 <TrueBrain> tracing now
19:44:53 <TrueBrain> it did work a while back
19:45:17 <TrueBrain> I love my fast CPU :D
19:45:18 <TrueBrain> make -j5
19:45:28 <TrueBrain> 20 seconds tops
19:45:52 <Xaroth|Work> doesn't it support hyperthreading?
19:45:56 <Xaroth|Work> i mean.. -j 9
19:46:07 <TrueBrain> who cares :p
19:46:09 <TrueBrain> it is fast enough :p
19:46:17 <Xaroth|Work> compiling is never fast enough :P
19:46:17 <TrueBrain> r1324 is to blame
19:46:27 <TrueBrain> your work glx :p
19:46:48 <glx> arg
19:46:55 <TrueBrain> 22s for a full recompile with -j9
19:46:58 <TrueBrain> 22s for a full recompile with -j5
19:47:01 <Xaroth|Work> heh
19:47:03 <glx> probably a signed/unsigned issue
19:47:12 <TrueBrain> 22s for a full recompile with -j3
19:47:29 <Xaroth|Work> probably not enough to compile to benefit -j >3
19:47:45 <TrueBrain> 22s for a full recompile with -j1
19:47:48 <TrueBrain> I think I took the wrong value :D
19:47:49 <Xaroth|Work> o_O
19:48:09 <glx> TrueBrain: you forgot something
19:48:34 <glx> (in r1330)
19:48:51 <DorpsGek> SVN: truebrain (r1331) -Fix (r1330): it helps to commit all dirs
19:49:22 <TrueBrain> -j1: 24s, -j2: 12s, -j3: 8s, -j5: 6.5s, -j9: 6.5s
19:49:28 <TrueBrain> so no different between -j5 and -j9 :p
19:50:31 <TrueBrain> glx: please commit smaller pieces :)
19:50:57 <glx> I'll search the bug later
19:51:08 <TrueBrain> I found one error at least
19:51:13 <TrueBrain> you forgot a 0x6 offset
19:51:25 <glx> where ?
19:52:08 <TrueBrain> line 1073 of your patch
19:52:23 <TrueBrain> 1078 memcpy(u->variable_72, emu_get_memorycsip(emu_get_csip32(loc08.s.cs, loc08.s.ip, 0x6)), min(emu_get_memory16(loc08.s.cs, loc08.s.ip, 0x4), 14));
19:52:25 <TrueBrain> 1073 memcpy(u->variable_72, emu_get_memorycsip(loc08->buffer_csip), min(loc08->variable_0004, 14));
19:52:45 <glx> that's ok
19:52:52 <glx> offset 6 is buffer
19:53:26 <TrueBrain> ah, yes, lol
19:54:33 <TrueBrain> so it is the pathfinder, those entries you decoded
19:55:42 <TrueBrain> if (loc0A != 0 || loc0A != 0) continue
19:55:49 <TrueBrain> think that is a typo? :)
19:57:39 <DorpsGek> SVN: truebrain (r1332) -Fix (r1324): typo, ignoring the result of one entry
19:57:42 <TrueBrain> doesn't solve it, but okay
19:59:50 <TrueBrain> abs(loc09), where loc09 is unsigned
19:59:52 <TrueBrain> lol
20:00:20 <glx> that could be a porblem
20:01:12 <TrueBrain> nope
20:01:54 <SmatZ> wonder why it doesn't give a "comparison is always true/false" warning
20:02:27 <DorpsGek> SVN: truebrain (r1333) -Fix (r1324): if a variable is signed, make it signed. You no doubt forget a cast, and get statements like: uint8 loc09; (..) abs(loc09) (..) :D
20:02:45 <TrueBrain> SmatZ: because it was abs(loc09) == 1
20:02:58 <TrueBrain> but I would expect a warning like: statement has no effect
20:03:24 <SmatZ> if abs() expands to (x >= 0 ? x : -x), then it is always true :)
20:03:34 <TrueBrain> very true
20:05:22 <TrueBrain> by just reading over this stuff roughly, I have a pretty good idea which PF was used :p
20:05:24 <TrueBrain> haha
20:05:30 <TrueBrain> I did too much PF shit in OpenTTD :p
20:06:05 <SmatZ> :)
20:08:49 <TrueBrain> glx: can't find it 1-2-3, so I leave it up to you :D You know more what the code was and should be etc etc :)
20:08:56 <TrueBrain> you have the savegame of Alberth?
20:09:04 <TrueBrain> when you click Return there on the harvester, you see the problem :)
20:10:32 <TrueBrain> oeh, 45%!
20:11:02 <glx> a8 busy ?
20:11:11 <TrueBrain> yes
20:15:11 <glx> confirmed
23:28:04 <glx> hmm ok it's not in Script_Unit_1319_03E8()