IRC logs for #opendune on OFTC at 2011-06-26
            
00:30:15 *** fjb is now known as Guest6230
00:30:19 *** fjb has joined #openDune
00:37:50 *** Guest6230 has quit IRC
01:53:55 <DorpsGek> SVN: glx (r1957) -Fix: renamed Script_Unknown044C() to Script_LoadAsSubroutine(), renamed ScriptEngine variable_34 to isSubroutine and fixed a conversion error
03:06:27 *** glx has quit IRC
07:54:34 *** Alberth has joined #openDune
07:54:35 *** ChanServ sets mode: +o Alberth
08:36:14 *** Xaroth has quit IRC
08:36:14 *** tneo has quit IRC
08:36:14 *** TrueBrain has quit IRC
08:36:14 *** SmatZ has quit IRC
08:36:14 *** TinoDidriksen has quit IRC
08:36:15 *** Alberth has quit IRC
08:36:15 *** planetmaker has quit IRC
08:36:21 *** Alberth has joined #openDune
08:36:21 *** SmatZ has joined #openDune
08:36:21 *** TrueBrain has joined #openDune
08:36:21 *** tneo has joined #openDune
08:36:21 *** Xaroth has joined #openDune
08:36:21 *** TinoDidriksen has joined #openDune
08:36:21 *** planetmaker has joined #openDune
08:36:21 *** reticulum.oftc.net sets mode: +oovv Alberth Xaroth Xaroth planetmaker
09:14:01 <DorpsGek> SVN: alberth (r1958) -Add: Remove global constant arrays 23DA 23E2 62D8.
09:20:15 <DorpsGek> SVN: alberth (r1959) -Fix (r1814): Forgot to rename the removed global variable.
09:30:26 <Alberth> http://svn.opendune.org/~alberth/diffs/25E6.patch <-- such simplifications ok?
09:57:50 <DorpsGek> SVN: alberth (r1960) -Add: Removed constant string delimiter from global.
10:09:38 <Alberth> @calc 273 / 16.0
10:09:38 <DorpsGek> Alberth: 17.0625
10:10:13 <Alberth> @calc 17*16
10:10:13 <DorpsGek> Alberth: 272
10:14:31 <DorpsGek> SVN: alberth (r1961) -Add: Removed global variable_2006.
10:30:18 <DorpsGek> SVN: alberth (r1962) -Add: Removed global variable_1857.
10:30:44 <Alberth> bleh, too many constant globals
11:14:43 <DorpsGek> SVN: alberth (r1963) -Fix(r1962): Don't forget to add a type.
11:17:10 <DorpsGek> SVN: alberth (r1964) -Add: Removed global variables 1836 and 1838.
11:29:48 *** TinoDidriksen has quit IRC
11:33:34 *** TinoDidriksen has joined #openDune
12:09:36 *** glx has joined #openDune
12:09:37 *** ChanServ sets mode: +o glx
12:10:10 <glx> hello
12:16:12 <Alberth> hello
13:01:24 <TrueBrain> hello
13:11:34 <glx> hmm seems Tile->groundSpriteID is indeed landscapeType
13:14:47 <glx> ha no it's abused on map generation
13:15:32 <DorpsGek> SVN: truebrain (r1965) -Fix: remove a warning by const-ifying parameters
13:16:20 <DorpsGek> SVN: truebrain (r1966) -Fix: cleanup the ScriptEngine struct. It no longer is limited to its size
13:22:26 <TrueBrain> doing a horrible attempt to understand how to fix script shit
13:23:08 <TrueBrain> Alberth: http://svn.opendune.org/~alberth/diffs/25E6.patch <- those things are often 'debug' settings of some kind
13:23:11 <TrueBrain> not really important indeed
13:23:15 <TrueBrain> I just wonder what they do :P
13:31:22 <DorpsGek> SVN: alberth (r1967) -Add: Removed global variable 25E6.
13:37:26 <DorpsGek> SVN: truebrain (r1968) -Fix: some minor cleanup in the script department
13:38:22 <DorpsGek> SVN: glx (r1969) -Fix: use LandscapeType enum where appropriate in map generation
13:39:33 <glx> minor change to simplify regex TrueBrain ?
13:40:10 <TrueBrain> I don't do regex :P
13:40:16 <TrueBrain> just trying to isolate stuff
13:45:25 <TrueBrain> glx: what I don't understand about the subroutine stuff
13:45:29 <TrueBrain> the return for it is never called
13:45:36 <TrueBrain> so once in a subroutine .. it never gets out?
13:45:47 <glx> the subroutine is never called either :)
13:45:59 <glx> actionInfo use 0 or 1 only
13:47:17 <DorpsGek> SVN: truebrain (r1970) -Fix: remove silly non-contributing comment
14:03:50 <DorpsGek> SVN: truebrain (r1971) -Add: change ScriptEngine->scriptInfo to a real pointer
14:04:12 <TrueBrain> that was the easy part :D
14:15:56 <glx> but it's still loaded in g_global I guess
14:16:02 <TrueBrain> for now
14:16:05 <TrueBrain> doing saveload changes first
14:23:46 <TrueBrain> hmm
14:23:49 <TrueBrain> something feels wrong again :D
14:26:29 <TrueBrain> dunno .. unit turrets are action weird in my opinion
14:27:10 <TrueBrain> yeah, there really is something wrong there
14:28:14 <DorpsGek> SVN: alberth (r1972) -Add: Removed unused variables from global data.
14:28:51 <TrueBrain> lol
14:28:52 <TrueBrain> of course
14:28:56 <TrueBrain> SLD in array kinda fails :D
14:29:11 <glx> again my fault ?
14:29:18 <TrueBrain> haha, kinda :D
14:29:24 <TrueBrain> you do: object + offset + i
14:29:30 <TrueBrain> to send in array form to recursion
14:29:35 <TrueBrain> i should be i * length
14:29:38 <TrueBrain> but length .. hmm ...
14:29:40 <TrueBrain> that is a tricky one
14:29:58 <glx> memory length
14:30:03 <TrueBrain> yup
14:30:12 <TrueBrain> but something about alignment :P
14:30:26 <TrueBrain> dir24[2] does not have to be 6 bytes
14:30:28 <TrueBrain> I think it is 8
14:31:05 <glx> hmm and with (object + offset)[i] ?
14:32:08 <TrueBrain> object type is not known
14:32:39 <TrueBrain> http://devs.opendune.org/~truebrain/temp.patch
14:32:41 <TrueBrain> how about that?
14:33:51 <glx> should work
14:34:49 <DorpsGek> SVN: truebrain (r1973) -Fix (r1953): disallow arrays of SLDs, as we don't know the object length in memory
14:37:22 <TrueBrain> http://devs.opendune.org/~truebrain/temp.patch
14:37:23 <TrueBrain> comments?
14:37:23 <DorpsGek> SVN: glx (r1974) -Fix: moved some global variables out of g_global
14:41:22 <glx> looks good
14:41:32 <glx> can be useful for INFO too
14:41:45 <TrueBrain> ScriptInfo is NULL in savegames
14:41:48 <TrueBrain> I don't even read it anymore
14:42:00 <glx> I mean INFO chunk
14:42:03 <TrueBrain> owh
14:42:05 <TrueBrain> lol
14:42:20 <glx> if (g_structureActiveType != 0xFFFF) {
14:42:20 <glx> if (fwrite(&g_structureActive->o.index, sizeof(uint16), 1, fp) != 1) return false;
14:42:20 <glx> } else {
14:42:20 <glx> uint16 invalid = 0xFFFF;
14:42:20 <glx> if (fwrite(&invalid, sizeof(uint16), 1, fp) != 1) return false;
14:42:21 <glx> }
14:42:25 <glx> things like that ;)
14:42:46 <DorpsGek> SVN: truebrain (r1975) -Add: add SLD_CALLB, which allows you to custom write how information should go from and to the memory for saveload
14:43:08 <TrueBrain> yeah .. lot of custom procs :D
14:45:34 <glx> and it's loaded as if (fread(&g_global->variable_38E8, sizeof(uint16), 1, fp) != 1) return false;
14:46:23 <glx> and g_structureActive is set outside Load function
14:47:54 <glx> based on 38E8
15:02:59 <TrueBrain> http://devs.opendune.org/~truebrain/temp.patch
15:10:25 <Alberth> (size_t)sl.o.script.script <-- I would expect .csip after it and dividing by 2
15:10:48 <TrueBrain> I think you missed something Alberth ;)
15:10:56 <TrueBrain> I doubt size_t type has .csip as member :D
15:11:39 <TrueBrain> script.script in this case temporary stores the line number it is at (the pointer is abused)
15:14:24 <glx> they like to abuse things in dune2 :)
15:14:46 <TrueBrain> in this case it is also the only sane solution I can find :)
15:14:56 <glx> just look how Tile->groundSpriteID is abused in map generation
15:15:03 <TrueBrain> the other solution would be to assign the script-to-use already before loading
15:15:17 <glx> openttd used to do similar things
15:15:24 <glx> (and maybe still do)
15:16:31 <TrueBrain> hard to test if scripts work over save/load
15:17:02 <glx> just check refinery works
15:17:19 <glx> IIRC spice transformation is handled by script
15:17:21 <TrueBrain> it would even if script starts at 0?
15:17:32 <DorpsGek> SVN: truebrain (r1976) -Add: move script->script to a real pointer
15:17:42 <TrueBrain> well, I tested what I could, couldn't find a glitch
15:21:43 <TrueBrain> I wonder if I can now move ScriptInfo
15:28:10 <TrueBrain> http://devs.opendune.org/~truebrain/temp.patch <- is that s_ g_ trick a nice idea?
15:34:05 <DorpsGek> SVN: truebrain (r1977) -Add: moved scriptUnit, scriptStructure and scriptTeam out from g_global
15:35:17 <planetmaker> :-P Add: Move... ;-)
15:38:22 <glx> planetmaker: we use -Add: remove too
15:38:40 <planetmaker> yes. Similarily stupid, if you asked me
15:39:07 <TrueBrain> lucky we didn't then :D
15:39:09 * TrueBrain hugs planetmaker
15:39:29 <TrueBrain> (sorry, thatone was too easy :P)
15:39:46 <planetmaker> I asked for it. And I knew. I was actually waiting for that reply :-P
15:39:53 <TrueBrain> :D Good ;)
15:39:54 * planetmaker hugs TrueBrain
15:40:04 <TrueBrain> and planetmaker, you are not the first to comment on it, and I am pretty sure you aren't the last :)
15:40:21 <planetmaker> well... but what's the point to use "Add" for everything?
15:40:32 <TrueBrain> because it are in fact additions still
15:40:43 <TrueBrain> OpenDUNE is not like OpenTTD, where the game is finished and things are added, removed, modified
15:41:06 <TrueBrain> -Add for me just means "progress towards our goal"
15:41:15 <TrueBrain> where -Fix is fixing something we already expect to be at that goal
15:44:16 <Alberth> planetmaker: TrueBrain likes to use "Add" for "Codechange" :p
15:44:33 <planetmaker> obviously
15:44:43 <TrueBrain> it all depends on your point of view :)
15:44:59 <planetmaker> TrueBrain: I'm afraid I really can't follow yours ;-)
15:45:00 <TrueBrain> else _all_ commits we had done the last 1977 commit should have been Codechange
15:45:01 <TrueBrain> bi boring :D
15:45:09 <planetmaker> now all are "add"?
15:45:13 <TrueBrain> not really
15:45:18 <TrueBrain> planetmaker: you look at it from the game point of view
15:45:21 <TrueBrain> I from the code point of view :)
15:45:29 <TrueBrain> code-wise, these are additions :)
15:45:49 <DorpsGek> SVN: truebrain (r1978) -Add: transform ScriptInfo->functions to a ScriptFunction pointer
15:46:15 <planetmaker> TrueBrain: hardly. They're changes from <whatever de-compiled> to <something nicer>
15:46:35 <planetmaker> but well... what do I care? ;-)
15:46:44 <TrueBrain> most likely as much as I do
15:46:59 <TrueBrain> in reality, -Add is just PR related
15:47:36 <planetmaker> my POV is: when I read a commit log I want to know what's going on. And then all these 'add' are mis-leading from my POV
15:48:24 <TrueBrain> yup; that is where our POV differ :D
15:48:27 <Xaroth|Work> it's added to the converted code :)
15:49:07 <planetmaker> so yes, it's talking big-mouthed marketing bullshit :-P
15:49:36 <planetmaker> yes, every codechange adds code... except those which should read "Remove" in the first place
15:50:49 <Xaroth|Work> there's a difference, we have 2 codebases
15:51:00 <Xaroth|Work> the decompiled base, and our converted, working base
15:51:12 <Xaroth|Work> so when it goes from decompiled to converted, it's an add
15:51:18 <Xaroth|Work> because we add to the converted base
15:52:34 <Alberth> Xaroth|Work: but removed vars from global go from src to src
15:52:43 <Alberth> yet they get Add
15:53:01 <Alberth> or more confusing, Fix
15:53:06 <Xaroth|Work> yep
15:53:11 <Xaroth|Work> confusing++
16:04:18 <TrueBrain> I need to test the text parts .. hmm .. how do I do that ..
16:04:22 <TrueBrain> what triggers a text dispaly via script
16:04:24 <TrueBrain> I have no clue :D
16:05:47 <DorpsGek> SVN: truebrain (r1979) -Add: made 3 more csips into pointers, moving the 16bit stuff to higher levels
16:06:07 <TrueBrain> Script and ScriptInfo are now csip free .. that is good :D
16:08:13 <DorpsGek> SVN: truebrain (r1980) -Fix: remove unneeded includes
16:09:55 <DorpsGek> SVN: truebrain (r1981) -Fix: wrong comments (or rather, obsolete)
16:10:08 <DorpsGek> SVN: alberth (r1982) -Add: Removed 8056, 805A, 805E and 8062 from global, replaced some constant addresses by the variables they point to.
16:21:37 <glx> http://svn.opendune.org/~glx/temp.patch <-- maybe a solution for SLD arrays
16:36:09 <TrueBrain> sizeof(c.m) not enough btw?
16:36:16 <TrueBrain> (I don't know if that is valid C)
16:36:19 <TrueBrain> but yeah, go for it ;)
16:38:54 <glx> sizeof is a macro
16:39:35 <glx> c.m is like Unit.orientation, compiler doesn't like ;)
16:43:52 <TrueBrain> fair enough
16:46:20 <DorpsGek> SVN: glx (r1983) -Add: reintroduce support for arrays of SLDs
16:47:31 <glx> and this time I tested many things ;)
16:47:48 <glx> like adding an uint32 inside the dir24 struct
16:48:03 <glx> just to check the right things were loaded
16:48:25 <TrueBrain> ;)
16:48:59 <glx> with uint32 the size is 12, without it it's 3
16:50:12 <glx> alignement is funny ;)
16:52:27 <TrueBrain> yup :)
16:55:47 <glx> of course I forced this silly alignment : 1 1 4 1
17:00:41 <glx> let's try to put INFO in new saveload system
17:17:03 <Alberth> @calc 144 / 3
17:17:03 <DorpsGek> Alberth: 48
17:35:38 <DorpsGek> SVN: alberth (r1984) -Add: Removed global non-useful variables 38D6, 8054, 80B0.
18:16:29 <DorpsGek> SVN: truebrain (r1985) -Add: introducing: free/calloc instead of Tools_Malloc/Tools_Free
18:24:52 <DorpsGek> SVN: truebrain (r1986) -Fix: one less include == win
18:34:18 <DorpsGek> SVN: truebrain (r1987) -Add: another trade: I take a Tools_Malloc, I give you a malloc
18:34:28 <TrueBrain> I am getting so bored of the same commit message over and over :(
18:50:11 <Alberth> it still better than "removed global variable XYZ" ;)
18:52:45 <DorpsGek> SVN: truebrain (r1988) -Add: understand 2 variables, and get them away from g_global
18:53:06 <DorpsGek> SVN: truebrain (r1989) -Fix (r1988): save before commit
19:02:41 <DorpsGek> SVN: truebrain (r1990) -Add: another real malloc
19:19:09 <TrueBrain> ran valgrind for the first time
19:19:12 <TrueBrain> some minor warnings
19:19:43 <Alberth> lack of major disasters is good :p
19:20:17 <TrueBrain> k, now lets check non-freed memory
19:20:32 <TrueBrain> sdl sdl sdl sdl
19:20:33 <TrueBrain> sound
19:20:35 <TrueBrain> Font_LoadFile .. hmm
19:21:14 <TrueBrain> Script_LoadFromFile
19:21:35 <DorpsGek> SVN: truebrain (r1991) -Add: make malloc for Widgets real mallocs. finally.
19:21:38 <TrueBrain> but this commit is safe :D
19:22:04 <Alberth> it's a nice symmetric number :)
19:22:52 <TrueBrain> :D
19:24:26 <TrueBrain> 372 bytes definitely lost
19:24:29 <TrueBrain> 60k possibly
19:24:33 <TrueBrain> 1M still reachable
19:24:38 <TrueBrain> well, was to be expected :D
19:24:48 <Alberth> :D
19:39:56 <glx> http://svn.opendune.org/~glx/temp.patch <-- useful or not ?
19:41:32 <TrueBrain> sure, why not
19:41:50 <TrueBrain> we should move Scenario also out of g_global :p
19:42:11 <glx> true, but after it's loading is handled ;)
19:42:24 <glx> *its
19:48:18 *** fjb has quit IRC
19:49:24 <DorpsGek> SVN: glx (r1992) -Change: refactored Load_Main()
19:55:29 <DorpsGek> SVN: alberth (r1993) -Codechange: Unduplicate code in both branches of an if.
20:18:43 *** fjb has joined #openDune
20:50:51 <DorpsGek> SVN: glx (r1994) -Add: moved scenario out of g_global and to new SaveLoad method
21:04:29 <DorpsGek> SVN: alberth (r1995) -Add: Removed global variables animationTick 8076 8088 809A 80AC 80AE, named GameLoop_B4ED_0AA5 function.
21:07:37 <glx> hmm we need macro for non member variables
21:14:52 <Alberth> just 1 revision for 30 commits today :)
21:14:58 <Alberth> good night
21:18:48 *** Alberth has left #openDune
22:42:02 <glx> http://svn.opendune.org/~glx/temp.patch <-- works but the defines are ugly