IRC logs for #opendune on OFTC at 2011-08-04
            
03:18:52 *** glx has quit IRC
07:52:10 *** Alberth has joined #openDune
07:52:10 *** ChanServ sets mode: +o Alberth
08:51:37 <DorpsGek> SVN: alberth (r2311) -Fix (r2308): Removed a now unused DSP_ProcessBlock() declaration.
09:30:44 <TrueBrain> what to do today ... I dunno ..
09:30:47 <TrueBrain> what do I want to work on :P
09:32:57 <TrueBrain> didn't SmatZ has a method to detect which includes are still required? :)
09:46:29 <Alberth> he did and probably does
09:47:10 <TrueBrain> so where is he .... :P
09:47:31 <Alberth> hiding?
09:48:01 <Alberth> or working, or enjoying his new house
09:48:11 <TrueBrain> all I hear is excuses :p
09:49:30 <TrueBrain> animation 0: structure is clear
09:49:33 <TrueBrain> animation 1: structure is busy
09:49:42 <TrueBrain> animation 2: structure is ready
09:49:45 <TrueBrain> clear: no unit in it
09:49:51 <TrueBrain> busy: working on unit (refinery, ..)
09:49:56 <TrueBrain> ready: wants to be picked up
09:51:09 <Alberth> we have a zillion magic constants, so pick one :)
09:51:28 <TrueBrain> this is used in so many places :p
09:51:48 <Alberth> string constants is another used everywhere :)
09:51:49 <TrueBrain> but so it is not so much 'animation' more 'status'
09:52:08 <TrueBrain> that was more the point of my story :P
09:52:16 <Alberth> I find it quite fun they use sprite numbers for state
09:52:40 <TrueBrain> pretty annoying even
09:52:43 <Alberth> although micropolis does that too, perhaps it is more common than I think
09:52:55 <TrueBrain> okay, a harvest that is picked up by a carry-all will drop the harvester in any spice within 20 tiles
09:53:28 <Alberth> I thought it returned to the previous pickup place
09:53:42 <Alberth> or perhaps I am confused with dune 2k
09:53:52 <TrueBrain> it does
09:53:57 <TrueBrain> let me phrase it better
09:54:04 <TrueBrain> on pickup it checks if within 2 tiles there is spice
09:54:07 <TrueBrain> if there is, it returns there
09:54:10 <TrueBrain> otherwise, it doesn't
09:54:30 <Alberth> ah, almost at the pickup spot, thus :)
09:58:28 <Xaroth|Work> only 2 tiles? pff :/
09:58:48 <Xaroth|Work> no wonder I always found that to be less-than-useful :p
09:58:50 <DorpsGek> SVN: truebrain (r2312) -Add: named Script_Unit_Pickup() and figured out two Unit variables
10:08:52 <TrueBrain> right, you cannot change 'int16' to an enum with negative values :D
10:15:11 <DorpsGek> SVN: truebrain (r2313) -Codechange: Structure->animation is in fact Structure->state; also remove the magic numbers and replace them for enum values with the possible states
10:15:14 <TrueBrain> there :)
10:39:28 <DorpsGek> SVN: truebrain (r2314) -Add: named a few Unit scripting functions
10:45:36 <Alberth> @remove 4
10:45:36 <DorpsGek> Alberth: Error: The command "remove" is available in the Alias, Scheduler, and Topic plugins. Please specify the plugin whose command you wish to call by using its name as a command before "remove".
10:45:52 <Alberth> @topic remove 4
10:45:52 *** DorpsGek changes topic to "0.5 || Websites *.opendune.org: www, forum, bugs, wiki, svn || Update (2009-11-28) your scenarios: http://forum.opendune.org/viewtopic.php?f=9&t=23"
10:46:16 <TrueBrain> lol; didn't you say you were doing that like last week? :P :P :D
10:46:44 <Alberth> no, I said it should be changed, then you said that I had to do that myself
10:47:18 <Alberth> so I just discussed with dorpsgek on how to do that
10:52:15 <TrueBrain> :P
10:52:19 <TrueBrain> you know you have +o, right?
10:52:24 <TrueBrain> so you could just use your client to do that :P
10:56:03 <Alberth> people give me all kinds of things, but so far I have not found how to actually use it, in simpler words than having 'modes' for every letter of the alphabet are attached to rights with other letters of the alphabet.
10:58:35 <Alberth> no doubt all those letters are needed, but I am not that interested in all those details
11:00:07 <TrueBrain> lolz :D
11:00:15 <TrueBrain> and you work with computers?! :P
11:03:35 <TrueBrain> I am just kidding Alberth, but I thought you knew how to operate the topic :) Well, now you know :p hihi :) DorpsGek is such a sweet person
11:05:08 <Alberth> he is very reluctant to explain how to get topics :(
11:05:35 <TrueBrain> too much abuse made him be a bit more silent than he should
11:06:53 <TrueBrain> right; why does OpenDUNE use 100% CPU, and what can we do about it ...
11:07:20 <Alberth> the first part is easy: busy waiting
11:08:08 <TrueBrain> isn't it most of the time in while() sleep(0)?
11:08:08 <Alberth> the second part is much more complicated, as it requires knowledge why it ever stops waiting
11:08:31 <Alberth> probably all 'sleep(0)' s
11:09:54 <Alberth> hmm, and all that polling to see whether a timer has expired is another big CPU spender probably
11:11:31 <TrueBrain> I can greatly reduce the CPU load ingame by adding an usleep(10)
11:16:05 <Alberth> it used to run at 100MHz machines or even slower, so that should be possible :)
11:24:08 <TrueBrain> http://devs.opendune.org/~truebrain/temp.patch
11:24:15 <TrueBrain> reduces the CPU from 100% to 14-30% here
11:25:21 <Xaroth|Work> smarts
11:25:49 *** Tomaz has quit IRC
11:26:08 <TrueBrain> lets check Windows
11:26:11 <TrueBrain> also much better
11:26:18 <Xaroth|Work> a patch I can understand, as well :P
11:26:18 <TrueBrain> lets see if voices still line up etc
11:26:35 <TrueBrain> hmm
11:26:38 <TrueBrain> voices don't work
11:26:41 <Xaroth|Work> doh
11:26:47 <TrueBrain> not sure if it is my patch etc
11:27:29 <TrueBrain> Enemy unit approaching From the North
11:27:31 <TrueBrain> wow ..
11:27:33 <TrueBrain> didnt know it says that
11:27:37 <TrueBrain> MPU is still garbaged, lolz
11:27:51 <TrueBrain> glx hasn't fixed that yet :D
11:28:35 <TrueBrain> second run, voices work
11:28:37 <Xaroth|Work> \o/
11:28:52 *** Tomaz has joined #openDune
11:28:59 <TrueBrain> it just randomly fails
11:29:01 <TrueBrain> lolz
11:34:55 <TrueBrain> I tried to find as many while (true) {} loops as I could :P
11:35:44 <TrueBrain> bah, my patch still screws with voices
11:35:46 <TrueBrain> no clue why thou
11:41:24 <TrueBrain> ha, think I got it :)
11:41:39 <TrueBrain> easy to see if I missed a while(true) {}
11:41:46 <TrueBrain> owh, it missed one voice, fuck :(
11:42:50 <TrueBrain> mentat screen still has an issue :D
11:43:33 <Alberth> good loop detection :)
11:52:37 <TrueBrain> it happens that it misses one single tick
11:52:40 <TrueBrain> because of random delays etc
11:52:44 <TrueBrain> then voices miss to play
11:52:49 <TrueBrain> it only starts to play on THAT tick
11:52:53 <TrueBrain> its funny like that
11:57:41 <Alberth> that explains the very messed up intro that we had, with missing scenes and speech
11:57:58 <TrueBrain> timing is critical :)
11:59:21 <DorpsGek> SVN: truebrain (r2315) -Add: greatly reduce CPU footprint by adding sleeps of 1 millisecond in while (true) {} loops that are all over the place
11:59:36 <TrueBrain> found most I think
12:00:30 <TrueBrain> and it missed the frame for voices again :p
12:00:31 <TrueBrain> lol
12:00:34 <TrueBrain> that needs fixing really :)
12:01:46 <TrueBrain> no, there are still a few
12:05:05 <DorpsGek> SVN: truebrain (r2316) -Fix (r2315): missed 3 cases regarding mentat screen
12:05:06 <TrueBrain> there :)
12:05:17 <TrueBrain> that makes the game a bit ... better :)
12:06:30 <Alberth> rather, it makes the 2nd processor get less used :)
12:06:48 <TrueBrain> MrFlibble might also be able to play it on his single core now :p
12:07:55 <TrueBrain> and now the MPU goes all crazy, it still is playable :p
12:08:01 <TrueBrain> that is a positive thing I guess
12:09:17 <DorpsGek> SVN: truebrain (r2317) -Fix: we can also wait for voices and music in a slightly less CPU hogging way
12:09:26 <TrueBrain> and now I can't even see on which core OpenDUNE is running here :p
12:10:02 <Alberth> nice :D
12:10:06 <TrueBrain> owh, I still can :p
12:10:09 <TrueBrain> WESTWOOD logo is hogging
12:16:34 <DorpsGek> SVN: truebrain (r2318) -Fix: also make the WESTWOOD logo less CPU hogging
12:17:35 <DorpsGek> SVN: truebrain (r2319) -Fix: missing break made you sit out the VIRGIN logo when it showed up
12:20:51 <Alberth> lol
12:21:37 <TrueBrain> tried to make WESTWOOD logo abortable
12:21:39 <TrueBrain> but I kinda like it :p
12:21:42 <TrueBrain> it sucks for developing
12:21:44 <TrueBrain> but that is all
12:22:43 <TrueBrain> yeah, this is much much better
12:22:48 <TrueBrain> CPU wise
12:23:20 <TrueBrain> I want to rerecord the voice of the intro
12:23:32 <TrueBrain> it annoys the crap out of me :p
12:25:22 <TrueBrain> oeh, still one spike somewhere
12:25:48 <TrueBrain> options! :)
12:30:29 <DorpsGek> SVN: truebrain (r2320) -Fix: some more while(true){} places ingame (dialogs)
12:30:32 <TrueBrain> getting there :p
12:31:28 *** glx has joined #openDune
12:31:28 *** ChanServ sets mode: +o glx
12:31:40 <TrueBrain> morning glx :)
12:31:45 <glx> hello
12:31:57 <TrueBrain> I added like .... 20 or so sleepIdle(), which makes the main thread sleep for 1 millisecond
12:32:13 <TrueBrain> decreasing the CPU from 100% to 10-20%
12:32:32 <TrueBrain> when doing so, I noticed that the MPU issues you had when the music changes, is still there, but no longer freezes the game
12:32:35 <glx> nice
12:32:38 <TrueBrain> it just is one annoying noise :p
12:32:46 <TrueBrain> and in the intro sometimes voices don't start
12:32:56 <TrueBrain> the latter happens because voices can only start at one spcific timer value
12:33:02 <TrueBrain> if it misses that for what-ever reason, it never starts
12:33:18 <TrueBrain> this of course is silly, but it is what is happening as far as I can tell
12:35:30 <TrueBrain> I guess I should profile the game now, see where the hogging is ... I would guess in the timer handler
12:37:44 <TrueBrain> Timer_Init comes out as the top function
12:37:45 <TrueBrain> that is odd :p
12:38:54 <TrueBrain> there, that is better
12:38:59 <glx> oh you readded 2 warnings
12:39:04 <TrueBrain> yup
12:39:08 <TrueBrain> noticed them
12:39:14 <TrueBrain> think we should make linkedID 16bit now tbh
12:39:21 <TrueBrain> but I got sidetracked
12:39:32 <TrueBrain> Tools_RandomRange is #3 :p
12:39:34 <TrueBrain> lolz
12:39:46 <glx> not surprising
12:39:48 <TrueBrain> Video_Tick takes 0.87 ms ... omg
12:40:39 <glx> double pixel
12:40:46 <DorpsGek> SVN: truebrain (r2321) -Fix: we no longer _need_ -O1 and optimize-sibling-calls
12:42:11 <TrueBrain> src/map.c:1902 comes back as warning with -O3
12:42:20 <TrueBrain> array subscript is above array bounds
12:43:16 <TrueBrain> he is not wrong
12:43:20 <TrueBrain> loc0A can reach value 8, which is out of bound
12:43:56 <TrueBrain> conversion error or something else .. lets find out
12:45:09 <DorpsGek> SVN: truebrain (r2322) -Fix (r1260): conversion error, causing out of bound addressing
12:45:21 <TrueBrain> euh, no
12:45:26 <TrueBrain> I judged too fast ..
12:45:28 <TrueBrain> value 8 is valid
12:47:18 <TrueBrain> owh well, the warning was valid
12:47:24 <TrueBrain> guess it is a dune2 error then
12:47:26 <TrueBrain> meh
12:47:28 <TrueBrain> do we care? Nah!
12:55:26 <glx> loc0A can be 8 or 9
12:56:03 <TrueBrain> yes, and 9 is invalid
12:56:12 <TrueBrain> euh
12:56:13 <TrueBrain> 8
12:56:15 <TrueBrain> it can't be 9
12:56:27 <TrueBrain> assembly breaks out if value hits 9
12:56:36 <TrueBrain> but [8] is out of bound for an array of 8
12:56:42 <TrueBrain> and the array size is 8 for sure
12:57:12 <DorpsGek> SVN: truebrain (r2323) -Add: by copying the 8bit screen, and only do double pixel when things have changed, massively improve performance of Video_Tick()
12:58:36 <TrueBrain> the function is 3 times as fast now :D
12:58:51 <TrueBrain> Timer_GetUSec is next in line now
13:04:43 <DorpsGek> SVN: truebrain (r2324) -Fix: only query the (expensive, CPU-wise) timer once instead of twice, and unify the precision of the timer between OSes
13:07:05 <TrueBrain> hmm, it now looks like sometimes video doesn't update .. not sure .. looks a bit odd
13:07:08 <glx> <2% when idling in intro menu
13:07:16 <TrueBrain> yup
13:07:41 <TrueBrain> explosions are not cleaned up correctly
13:07:46 <TrueBrain> redrawing fails sometimes
13:07:52 <TrueBrain> I see double vehicles :p
13:11:17 <DorpsGek> SVN: truebrain (r2325) -Revert (r2322): I was wrong, and read wrong; out of bound is intended (?), otherwise graphical glitches show
13:11:35 <TrueBrain> go figure ...
13:14:47 <glx> ha right it access [8] but it's not really used (except when checking for 0 to break
13:15:00 <glx> but it will break anyway as the loop is finished
13:15:13 <TrueBrain> indeed
13:15:41 <glx> weird construct (as often)
13:15:44 <TrueBrain> nice one glx :)
13:16:35 <DorpsGek> SVN: truebrain (r2326) -Fix (r1260, r2322, r2325): retry; the code was fine, as [8] is never really used and the loop aborts directly after that. So now break a bit sooner.
13:17:26 <DorpsGek> SVN: truebrain (r2327) -Fix (r2326): document such weird cases in code
13:17:31 <TrueBrain> is the right solution, not?
13:17:35 <TrueBrain> at least it works fine ingame :)
13:17:51 <glx> it needs a rewrite ;)
13:17:57 <TrueBrain> for now, this should do :)
13:17:58 <glx> like many other functions
13:18:15 <TrueBrain> right, OpenDUNE is now much nicer for the CPU, that makes me really happy
13:18:22 <TrueBrain> good progress for the day :)
13:18:33 <TrueBrain> did you find why the MPU is acting weird when you attack a unit?
13:18:48 <glx> not yet
13:19:36 <TrueBrain> I never knew btw that voices said: approaching from the North
13:19:39 <TrueBrain> was really funny to notice :D
13:20:47 <glx> it's only for first 3 scenarios
13:23:43 <TrueBrain> I love how bullets sound like lasers :P
13:27:53 <DorpsGek> SVN: truebrain (r2328) -Fix (r2276): if you are going to assign negative values to a variable, make it signed
13:28:06 <TrueBrain> doesn't solve the MPU issue, but at least I have a grasp on what is going on :)
13:28:48 <DorpsGek> SVN: truebrain (r2329) -Fix (2328): stop wasting commits to fixes
13:29:25 <TrueBrain> r2329 does solve it
13:29:31 <TrueBrain> music now works as it should
13:30:16 <TrueBrain> it is nice
13:31:47 <DorpsGek> SVN: truebrain (r2330) -Add: now name and document the variable you understand
13:35:37 <TrueBrain> okay ... any other issues we know off?
13:35:41 <TrueBrain> voices dont' always play in intro
13:35:52 <TrueBrain> should be solvable if I can understand what it does :D
13:40:10 <TrueBrain> I really like the music more and more :)
13:45:11 <TrueBrain> okay .. it seems I made a wrong call on the naming, voice <-> subtitle, it seems :)
13:45:24 <TrueBrain> euh
13:45:28 <TrueBrain> no
13:45:29 <TrueBrain> hmm
13:45:31 <TrueBrain> wuth?
13:45:40 <TrueBrain> I am trying to debug that function, and it always returns :p
13:45:45 <TrueBrain> I am a bit lost now :p
13:47:26 <glx> the only voice "problems" I have in intro are for atreides and harkonens screens
13:47:40 <TrueBrain> ah, the voice array is the sound effect, like wind blowing
13:49:00 <glx> g_table_voiceMapping is sound effect mapping to VOC
13:51:09 <glx> yes music works correctly now
13:51:21 <DorpsGek> SVN: truebrain (r2331) -Codechange: g_table_houseAnimation_voice is in fact g_table_houseAnimation_soundEffect, like the wind in the intro
13:52:36 <glx> and the deadlock seems to be fixed too
13:52:46 <TrueBrain> good :)
13:52:56 <glx> I guess it didn't like having 2 musics played at the same time :)
13:53:18 <glx> and in the same channels
13:53:23 <glx> or something like that
13:53:27 <TrueBrain> that got solved by sleepIdle()
13:53:32 <TrueBrain> so I guess it just went too fast
13:53:36 <TrueBrain> as music kept being started
13:53:38 <TrueBrain> over and over and over
13:53:43 <TrueBrain> very soon 100+ musics were playing :P
13:53:52 <glx> that's a lot :)
13:54:13 <TrueBrain> every tick, one more
13:54:41 <DorpsGek> SVN: truebrain (r2332) -Add: named the function that shows the subtitles (and plays the voice) during intro
13:54:53 <glx> when each driver can only handle 4 music/sound at a time
13:55:05 <glx> if I understood the code
13:55:41 <TrueBrain> now lets see about voices in the intro
13:55:49 <TrueBrain> slowly I start to understand Dune :p
13:56:44 <TrueBrain> Sound_Output_Feedback seems to be called just fine
13:56:50 <TrueBrain> it just doesn't do anything
13:57:13 <glx> maybe a voice is already playing
13:57:36 <TrueBrain> so that one isn't finished, and the other is already starting?
13:58:47 <TrueBrain> so let me try something then
13:59:27 <TrueBrain> so far so good
13:59:59 <TrueBrain> lies :(
14:00:30 <TrueBrain> I now added: while (Driver_Voice_IsPlaying()) sleepIdle();
14:00:35 <TrueBrain> before the play functions
14:00:37 <TrueBrain> still .. meh
14:02:07 <glx> not sur it's a good idea
14:02:11 <glx> *sure
14:02:36 <TrueBrain> doesn't change a thing
14:03:42 <TrueBrain> but so I am sure it isn't because something else is playing :D
14:04:50 <TrueBrain> and of course now everything runs smooth
14:04:52 <TrueBrain> lolz
14:04:53 <TrueBrain> annoying
14:10:36 <glx> do the first voice start ?
14:10:53 <TrueBrain> depends what the first is :p
14:11:01 <TrueBrain> the first voiceID (75 I think?) doesn't seem to have anything
14:11:19 <glx> for each intro text there are many voices
14:12:34 <glx> the first part is started via Sound_Output_Feedback(), other are done by GameLoop_PalettePart_Update()
14:13:46 <glx> and Sound_StartSpeech()
14:15:01 <TrueBrain> I see little difference in what happens between a failure and a success
14:15:07 <TrueBrain> trying some wild stuff now
14:21:37 <TrueBrain> hmm
14:21:39 <TrueBrain> I have an idea
14:23:34 <TrueBrain> hmm
14:23:40 <TrueBrain> now I just need to test it 10 times
14:23:41 <TrueBrain> lolz
14:24:06 <TrueBrain> fail
14:24:07 <TrueBrain> bah
14:24:09 <TrueBrain> hmm
14:27:46 <TrueBrain> okay, there is one thing that concerns me a lot, but isn't the issue:
14:27:57 <TrueBrain> g_readBuffer is used in Sound_StartSound to call Driver_Voice_Play
14:28:06 <TrueBrain> this is send to dsp.c, which starts using this as a to-play buffer
14:28:18 <TrueBrain> only, g_readBuffer has NO GARANTEE that is contains the information it does over time
14:28:23 <TrueBrain> in fact, it most likely wont
14:28:29 <TrueBrain> so that is really odd to me
14:28:40 <TrueBrain> even more that a memmove is used to move it in there, but that is not really required
14:29:58 <glx> I can fix that with a malloc I guess
14:30:18 <TrueBrain> I guess the original driver had that
14:30:21 <TrueBrain> or some static buffer
14:30:33 <TrueBrain> but yeah, that can cause problems, surprisingly it doesn't :)
14:31:49 <TrueBrain> when is DSP_Callback called?
14:33:11 <glx> les di,[File]
14:33:11 <glx> mov WORD PTR block_file,di
14:33:11 <glx> mov WORD PTR block_file+2,es
14:33:24 <glx> that's what original driver does
14:33:38 <TrueBrain> so Dune2 handles it 'wrong'
14:33:45 <TrueBrain> most likely readbuffer is not used in the meantime
14:33:47 <glx> DSP_Callback is called when it needs more data
14:33:57 <TrueBrain> I would suggest to make a dual-solution:
14:34:04 <TrueBrain> 1) if a pointer is given, and a bool true, use that pointer
14:34:12 <TrueBrain> (you can use g_variable_3E54, is it malloc'd)
14:34:21 <TrueBrain> 2) if a pointer is given, and a bool is false, malloc yourself
14:34:25 <TrueBrain> or make that bool a length flag
14:34:27 <TrueBrain> ors omething :p
14:35:10 <glx> I can also just malloc s_bufferLen
14:35:25 <TrueBrain> it can change
14:35:35 <glx> not once the sound is started
14:35:54 <TrueBrain> I dunno if s_buffer[0] can ever be != 1
14:36:31 <glx> it can't, but if it is the voice is not started and the malloc is skiped
14:36:39 <glx> let me try something
14:37:11 <TrueBrain> well, if it can't, then why is that check in DSP_Play?
14:37:14 <TrueBrain> should be an assert then :D
14:39:23 <TrueBrain> I start to believe the problem is in SDL
14:44:56 <glx> http://svn.opendune.org/~glx/temp.patch
14:45:04 <glx> that's my idea
14:45:48 <TrueBrain> my only remakr there is that it will often do a malloc which is not perse required
14:45:51 <TrueBrain> but I guess it won't hurt either
14:46:05 <TrueBrain> the other you can do is alloc it the first time, and realloc if it needs to grow
14:46:09 <TrueBrain> but meh ...
14:46:27 <TrueBrain> I think I got the problem fixed btw
14:46:32 <TrueBrain> not 100% sure ... doing some runs
14:46:38 <TrueBrain> hard to proof it works until it fails :D
14:46:45 <TrueBrain> ugh, nevermind :(
14:46:47 <TrueBrain> ffs
14:47:58 <TrueBrain> anyway, in DSP_Play you should really lock and unlock
14:48:05 <TrueBrain> otherwise there is a HUGE race condition potential there
14:48:21 <TrueBrain> euh, no
14:48:22 <TrueBrain> you stop the audio
14:48:24 <TrueBrain> lolz
14:48:26 <TrueBrain> nevermind :D
14:48:36 <TrueBrain> one thing I was trying: SDL_OpenAudio(&spec, &spec);
14:48:41 <TrueBrain> if you specify the seond parameter, the specs might be changed
14:48:47 <TrueBrain> if you make it NULL, SDL will do conversion for you
14:48:50 <TrueBrain> (so documentation says)
14:48:53 <TrueBrain> but it doesn't matter, as it still fails
14:48:55 <TrueBrain> grr
14:49:51 <glx> if only VOC had the same sample rate ;)
14:50:03 <TrueBrain> it doesn't matter
14:50:09 <TrueBrain> the NULL just forces SDL to take care of mismatches
14:50:21 <TrueBrain> where now you are supposenly are in charge of fixing bitrates etc
14:50:21 <glx> would prevent closing/reopening
14:50:31 <TrueBrain> like that, yeah
14:50:49 <TrueBrain> I am just really surprised the callback doesn't want the length returned
14:51:50 <glx> I guess it gives a stream full of 0 and tell you it's size
14:53:06 <TrueBrain> so yeah, OpenDUNE does everything fine
14:53:08 <TrueBrain> it is SDL that fails
14:55:20 <TrueBrain> what I notice every time, is that when I close the app, I hear the sound
14:55:58 <glx> weird
14:59:46 <TrueBrain> its weird how you expect it to be OpenDUNE :P
15:05:39 <glx> http://svn.opendune.org/~glx/temp.patch <-- less allocations
15:06:22 <TrueBrain> s_data = NULL, but not s_adataLen=0? :)
15:06:30 <TrueBrain> btw, I would do: != 1) return
15:06:34 <TrueBrain> less tabbing :)
15:07:01 <TrueBrain> and yeah, I like that much more :)
15:08:34 <TrueBrain> ugh, it keeps working now, while I didn't change anything .. STOP WORKING
15:08:35 <TrueBrain> finally
15:09:22 <glx> hmm it miss a safety check
15:11:00 <TrueBrain> what is the rate btw, minimal/maximum?
15:11:01 <TrueBrain> you know?
15:11:39 <glx> it's between 8000 and 14000 IIRC
15:12:45 <TrueBrain> *stream is 128
15:12:47 <TrueBrain> full of it
15:12:52 <TrueBrain> I guess that is silent :p
15:13:00 <TrueBrain> double checked the stream etc
15:13:27 <TrueBrain> adding context switches
15:13:30 <TrueBrain> all with no gain
15:13:45 <TrueBrain> I tried shutting down the audio when we are at the end of our stream
15:13:48 <TrueBrain> also no luck
15:14:21 <glx> http://svn.opendune.org/~glx/temp.patch <-- safety added, else can be an assert too
15:14:43 <TrueBrain> assume realloc works
15:14:48 <TrueBrain> we don't check for any malloc too
15:15:03 <TrueBrain> not sure if we should ever worry about that tbh
15:15:06 <glx> ok :)
15:15:07 <TrueBrain> best you can do is exit() at that stage
15:16:37 <TrueBrain> okay, indeed, Close/Open screws it up
15:16:48 <TrueBrain> when I just fix it on a random rate, it keeps working, it seems
15:16:56 <TrueBrain> (again, I only know that isn't true when it fails :D)
15:17:04 <glx> refreshed, assuming everything works
15:17:36 <glx> using random rate distord voices IIRC
15:17:43 <TrueBrain> looks nice :)
15:17:49 <TrueBrain> owh, voice is ugly
15:17:54 <TrueBrain> but I wanted to know if it is the problem :p
15:19:38 <DorpsGek> SVN: glx (r2333) -Fix: make sure voice data is not modified while being played
15:19:49 <glx> even if it never happened ;)
15:20:44 <TrueBrain> not _yet_ :P
15:20:54 <TrueBrain> readBuffer needs removing anyway
15:22:09 <DorpsGek> SVN: truebrain (r2334) -Fix: no need to first copy something to a temporary buffer; you are fine yourself too
15:24:10 <DorpsGek> SVN: truebrain (r2335) -Codechange: constantify, to show the outside world we won't change the data
15:24:23 <TrueBrain> what is a very normal frequency?
15:24:25 <TrueBrain> 14400?
15:24:54 <glx> Common values are 11025, 22050 and 44100.
15:25:07 <TrueBrain> 22050, k
15:25:07 <glx> 14400 is old modom ;)
15:25:13 <glx> *modem
15:28:16 <Alberth> 2400 is an old modem :)
15:30:50 <TrueBrain> okay, lets try this ....
15:30:52 <TrueBrain> I wonder I wonder
15:34:04 <glx> http://devs.opendune.org/~glx/read_voc.c.txt <-- refreshed to display sample rate
15:34:24 <TrueBrain> your range was correct you gave me earlier?
15:35:36 <glx> I didn't tested all files but for now I have 11764, 14705 and 11235
15:35:55 <TrueBrain> k
15:36:02 <TrueBrain> lolz, pitch is a bit too high
15:38:49 <TrueBrain> I am trying to use SDL_BuildAudioCVT
15:38:54 <TrueBrain> to just convert the sample
15:38:59 <TrueBrain> but ... it is not being nice to me :p
15:39:00 <glx> I tried that too
15:39:38 <TrueBrain> and it crashes after a few conversions
15:41:34 <glx> Currently (SDL-1.2.11) only rate conversions of 2x and (1/2)x with x > 0 are done, nearing the requested rate conversion. <-- the result will never be optimal
15:41:56 <TrueBrain> and for 1.2.14?
15:41:59 <TrueBrain> any change?
15:42:04 <glx> dunno
15:45:28 <TrueBrain> sucks
15:45:36 <TrueBrain> (that SDL doesn't work)
15:45:45 <TrueBrain> 20ms delays also didn't fix it
15:45:47 <TrueBrain> sadly
16:01:04 <TrueBrain> right ... I can write a very basic upscale algorithm
16:01:06 <TrueBrain> at least see if it helps
16:09:31 <TrueBrain> it is not really bad
16:09:37 <TrueBrain> don't even know if I can hear the difference
16:10:48 <TrueBrain> wow, one with a frequency of 5000
16:10:49 <TrueBrain> lolz
16:12:11 <TrueBrain> so that "solves" the problem :D
16:13:46 <glx> I can test it (I'm used to how voices sound)
16:13:54 <TrueBrain> it does add a bit of noise ... should add a lowpass filter
16:13:56 <TrueBrain> but meh
16:16:52 <TrueBrain> ugh, Vbox doesn't allow me to copy/paste always
16:16:54 <TrueBrain> anoying
16:18:08 <TrueBrain> http://devs.opendune.org/~truebrain/temp.patch
16:18:12 <TrueBrain> let me know
16:21:22 <glx> hmm it doesn't apply cleanly
16:26:50 <glx> noisy for some voices but not bad
16:29:24 <glx> heap corruption detected at exit
16:29:40 <TrueBrain> yeah, I wasn't done, but was off for dinner :D
16:31:32 <TrueBrain> ugh, I hate signed blabla errors
16:33:12 <TrueBrain> and this function must never downscale
16:33:15 <TrueBrain> as it will fail :p
16:33:23 <TrueBrain> the way it goes through the buffer fully assumes upscaling :P
16:39:23 <TrueBrain> new patch
16:39:26 <TrueBrain> should solve all remaining problems
16:42:18 <TrueBrain> hmm, Exit Game 'hangs'
16:42:19 <TrueBrain> hmm
16:43:03 <TrueBrain> midiOutClose()
16:43:04 <TrueBrain> it seems
16:45:13 <DorpsGek> SVN: truebrain (r2336) -Add: because SDL doesn't like it when we close/open Audio often on different frequencies, and its convertor is too primitive to function, introducing our own basic linear upscale algorithm to make all VOC files 22050. Long live SDL?
16:45:14 <glx> I don't get why hunk #4 fails
16:45:41 <TrueBrain> well, now it is in SVN :P
16:46:17 <DorpsGek> SVN: truebrain (r2337) -Fix (2336): GCC warnings
16:46:37 <TrueBrain> Alberth: would you be able to test head with sound etc, without MrFlibbles audio pack?
16:50:43 <glx> speeches are almost correct
16:50:49 <TrueBrain> almost?
16:51:19 <glx> loud parts tend to be noisy
16:51:24 <TrueBrain> ah, yes
16:51:35 <glx> but it's worse for sound effects ;)
16:51:55 <TrueBrain> I guess I now should play the game for more than an hour or so
16:51:56 <glx> like harvester sound and explosions
16:52:00 <TrueBrain> to see if it all really works :)
16:55:20 <glx> I hope most random crashes/hangs are fixed now
17:42:15 <Alberth> wow, sound is timed exactly right now, it became useful to play with sounds :)
17:43:08 <TrueBrain> so it works for you too?
17:43:09 <TrueBrain> awesome!
17:45:33 <Alberth> Xorg server takes twice as much CPU as opendune :)
17:45:56 <TrueBrain> I am playing the game now
17:46:03 <TrueBrain> so much smoother than DOSBox or older versions :p
17:46:24 <Alberth> wow 'Atreides harvester deployed' as one smooth sentence!
17:49:15 <glx> this one was already smooth for me ;)
17:49:15 <Alberth> lol, ordos soldier is hunting my harvester, but it drives away to the refinery faster than the soldier walks :)
17:49:15 <Alberth> every start of sound froze the game for 1-2 seconds for me
17:49:15 <TrueBrain> harvesters are still 'stupid' :(
17:49:18 <glx> even after libemu removal Alberth ?
17:49:35 <Alberth> yes, until now
17:49:51 <glx> strange
17:50:09 <glx> maybe alsa didn't like dune2 sample rates
17:50:47 <TrueBrain> he ... all of a sudden .. it hangs
17:51:00 <TrueBrain> on mpu_send
17:51:04 <glx> but mouse cursor still works
17:51:18 <TrueBrain> no, it hangs
17:51:38 <TrueBrain> mpu_send created a deadlock :(
17:51:51 <TrueBrain> timer and main both doing mpu_send
17:51:59 <glx> yes I know that
17:52:01 <TrueBrain> that really should be a lock
17:52:05 <TrueBrain> so that it never CAN happen
17:53:30 <TrueBrain> http://devs.opendune.org/~truebrain/temp.patch
17:53:32 <TrueBrain> something like that
17:53:43 <Alberth> maybe it had to re-initialize the sound system, start a new program, close down the old one, release the hardware, such things
17:54:25 <glx> but that will drop some commands
17:54:44 <TrueBrain> rather dropped commands than deadlock
17:55:22 <TrueBrain> or, the other solution
17:55:24 <TrueBrain> gimme a sec
17:56:45 <TrueBrain> http://devs.opendune.org/~truebrain/temp.patch
17:56:52 <TrueBrain> basically, I want to make a stable version, one that does not deadlock
17:56:58 <TrueBrain> so any other deadlocks you know about, please do tell :D
17:57:36 <Alberth> my construction yard is detoriating, should that happen?
17:58:00 <TrueBrain> did you deploy it?
17:58:18 <Alberth> no, it's level 2, no deployment yet :)
17:58:28 <TrueBrain> no, it should not get time-damage
17:59:01 <TrueBrain> degrades = false for those structure
17:59:03 <TrueBrain> just double checked :D
17:59:42 <TrueBrain> but do know sometimes someone sneaks through and blows up inside your buildings :p
18:00:56 <DorpsGek> SVN: truebrain (r2338) -Fix: hold off calling the MPU Interrupt when we are doing MPU commands, as it can cause deadlocks
18:01:00 <Alberth> perhaps if you have not enough power?
18:01:12 <TrueBrain> possible
18:01:18 <TrueBrain> I think so yes
18:01:23 <Alberth> enemy sneaking in does not slowly detoriate :)
18:01:42 <Alberth> sounds at least plausible
18:02:44 <TrueBrain> I like what I did with fadein from CY :P
18:02:45 <Alberth> let's blow up a wind trap as test :)
18:02:52 <TrueBrain> it is just long enough to be not annoying
18:03:06 <Alberth> yeah, it is nice
18:03:43 <TrueBrain> we should fix scrolling btw :p
18:04:17 <TrueBrain> Spice bloom located
18:04:19 <Alberth> yep, lack of power
18:04:20 <TrueBrain> and I am one unit less :p
18:06:19 <Alberth> oh, it is all buildings even
18:06:26 <TrueBrain> without power
18:06:29 <TrueBrain> they all get damage, yes
18:06:53 <Alberth> HOF pulls a lot of cpu
18:07:21 <Alberth> euhm, I mean end of scenario
18:07:33 <TrueBrain> so you found another one :p
18:07:36 <TrueBrain> plz try to trac eit :)
18:07:47 <TrueBrain> if you have a debugger attached
18:09:02 <Alberth> not now
18:09:28 <TrueBrain> then don't worry, I will see it in a bit too I Hope :D
18:09:39 <TrueBrain> we need an icon :)
18:09:42 <TrueBrain> is ugly under windows :p
18:11:07 <TrueBrain> lol, my unit it stuck between rocks and buildings :D
18:16:11 <TrueBrain> I See what MrFlibble meant with units not attacking
18:16:43 <TrueBrain> when you are on the direct line
18:16:44 <TrueBrain> it does not move
18:16:46 <TrueBrain> :D
18:23:39 <DorpsGek> SVN: truebrain (r2339) -Fix: some more infinite loops that could use some delay in them (HOF, Strategic map, ..)
18:25:31 <TrueBrain> good you noticed Alberth :D
18:26:44 <Alberth> first time I looked at it :)
18:26:56 <Alberth> but it is useful now too :)
18:27:53 <TrueBrain> hihi, made the game 4x4 double-sized :D
18:36:07 <DorpsGek> SVN: truebrain (r2340) -Fix: underlaying code does not need to know that the screen is twice as big as it should be
18:37:47 <DorpsGek> SVN: truebrain (r2341) -Codechange (r2340): don't use magic numbers, but make a nice const for it
18:54:20 <glx> lol I tried setting this magic number to 4 (just for fun)
19:22:47 *** Alberth has left #openDune
19:49:58 <TrueBrain> yeah, doesn't work :D
19:49:59 <TrueBrain> hihi
19:50:03 <TrueBrain> will fix it soonish :D
20:01:06 <TrueBrain> at this resolution, SDL crashes
20:01:09 <TrueBrain> that is just weird :p
20:01:12 <TrueBrain> SetPalette acts weird :p
20:01:27 <TrueBrain> no clue what palette has to do with screen res :p
20:05:45 <TrueBrain> memory corruption ...
20:05:49 <TrueBrain> I don't know why :(
20:07:49 <glx> maybe related to mouse
20:08:10 <TrueBrain> Mouse_Show to be exact
20:08:52 <TrueBrain> ugh
20:08:52 <glx> crash in GFX_CopyToBuffer() called by Mouse_Show() :)
20:08:54 <TrueBrain> forgot one again
20:09:31 <glx> Video_Mouse_Callback ?
20:10:04 <DorpsGek> SVN: truebrain (r2342) -Fix (r2340): forgot two instances
20:10:06 <TrueBrain> yup
20:11:03 <DorpsGek> SVN: truebrain (r2343) -Add: introducing a slower 'double' pixel algorith, which supports higher values for SCREEN_MAGNIFICATION. 4x4 here I come!
20:11:22 <glx> changing the magic number was a silly idea, with good effects ;)
20:11:33 <TrueBrain> it was the reason I introduced it
20:11:39 <TrueBrain> to play on 4x4 :P
20:11:50 <TrueBrain> although it is REALLY ugly
20:12:36 <TrueBrain> no, that is too much
20:12:38 <TrueBrain> 3x3 then
20:13:55 <glx> yup 3x3 looks good
20:15:26 <planetmaker> he, you added the scale2 algorithm and scale3? :-)
20:15:40 <TrueBrain> 'algorithm'? :D
20:15:46 <planetmaker> not?
20:15:49 <glx> yes yes :)
20:15:56 <TrueBrain> depends what you call an algorithm :D
20:16:01 <TrueBrain> I want to add some smoothing, would be kewl :)
20:16:12 <planetmaker> not that: http://scale2x.sourceforge.net/index.html ?
20:16:53 <planetmaker> if not: you might consider it ;-)
20:16:59 <glx> wow I never noticed the harkonnen weapons in intro are really detailed
20:17:16 <TrueBrain> planetmaker: I don't want depds on random libs ... so we will ahve to write something ourself :p
20:17:20 <glx> shell expulsion and all
20:17:40 <planetmaker> TrueBrain: look at it. It's tiny and iirc needs no lib
20:18:03 <TrueBrain> I am looknig at it :D It is just a 3rdpart lib, kinda want to avoid it if possible
20:18:17 <planetmaker> hm, then I mis-remembered
20:18:45 <planetmaker> though it solves exactly that: zoom for pixel-art
20:18:49 <TrueBrain> they do publish the algorihm
20:18:50 <TrueBrain> so ti is possible
20:19:11 <TrueBrain> will take a shitload of CPU I guess :p
20:20:17 <TrueBrain> ghehe, they use MMX to do it quickly
20:20:19 <TrueBrain> funny
20:21:00 <glx> and SSE4 ?
20:21:04 <glx> ;)
20:21:39 <TrueBrain> only graphical glitches I see btw is the worm
20:21:47 <TrueBrain> it tends to leave a residu
20:22:16 <glx> it's called spice :)
20:23:04 <TrueBrain> but nice idea planetmaker
20:23:09 <TrueBrain> i planned doing it myself, but this is easier :p
20:23:16 <planetmaker> :-)
20:23:44 <planetmaker> no need to re-invent wheels
20:24:05 <planetmaker> I'm actually thinking that this algorithm might be one part of a similar solution to a zoom in OpenTTD...
20:30:02 <TrueBrain> sandworms really are bugged
20:30:05 <TrueBrain> too many glitches
20:31:19 <planetmaker> Do they still disappear at 50%?
20:31:35 <planetmaker> But maybe that's no bug but a healthy concience of them to not die due to rockets
20:31:36 <TrueBrain> yup
20:31:43 <TrueBrain> it is
20:31:48 <planetmaker> :-)
20:31:59 <TrueBrain> it is explicit, so it is intended :)
20:32:29 <TrueBrain> knowing the PF, makes what the tanks do make much more sense :D
20:38:19 <TrueBrain> AI reacts perfeclty (against what it should do)
20:47:12 <TrueBrain> time spend is correct, stats are correct
20:47:30 <TrueBrain> one CPU hog left
20:47:35 <TrueBrain> somewhere during finished
20:47:43 <TrueBrain> and when waiting for selection region
20:47:52 <TrueBrain> thought I had thatone ..
20:58:07 <TrueBrain> I dunno .. scale2x has some funky shit with fonts
20:58:10 <TrueBrain> but it looks pretty :p
21:09:08 <TrueBrain> iek, scale3x takes CPU usage up a lot :D
21:10:09 <TrueBrain> well, it is faster than the stupid slow algorithm of mine :D
21:10:10 <TrueBrain> lolz
21:11:00 <planetmaker> scale sprites prior to usage and cache it?
21:11:11 <TrueBrain> that is very much not possible atm :D
21:11:26 <planetmaker> :-)
21:13:51 <TrueBrain> there, some optimizations later
21:14:12 <TrueBrain> to find out they slow it down
21:14:13 <TrueBrain> hmm
21:14:15 <TrueBrain> that is odd :p
21:14:34 <TrueBrain> owh, kinda depends
21:14:38 <TrueBrain> I should profile this better
21:24:03 <TrueBrain> ugh, it is hard to optimize sometimes :)
21:27:37 <TrueBrain> according to my profile the time doubles when it should not ... lolz
21:34:26 <TrueBrain> 547ms for mag2 most optimized (linear)
21:34:29 <TrueBrain> expensive, but meh
21:34:50 <TrueBrain> euh, 0.547, sorry
21:34:53 <TrueBrain> 1.43ms for mag3
21:35:39 <TrueBrain> 3.14ms for the fallback method in mag3 (before optimized)
21:35:43 <TrueBrain> so I made it 50% faster, nice
21:36:27 <TrueBrain> 870ms for mag2 in other cases
21:39:48 <TrueBrain> scale2x is unoptimized 1.43ms
21:39:54 <TrueBrain> lets see what I can do there ...
21:44:33 <TrueBrain> 1ms ... that is better ... I can do more I think ...
21:45:48 <TrueBrain> 704ms
21:45:53 <TrueBrain> 704us
21:45:55 <TrueBrain> grr
21:51:12 <TrueBrain> got the optimized mag2 linear to 400us
21:51:43 <TrueBrain> 588us for scale2x
21:51:47 <TrueBrain> starts to be acceptable
21:55:14 <TrueBrain> okay, scale3x next
21:57:04 <TrueBrain> optimized mag3 to 300us ... that is a bit weird :D
21:57:31 <TrueBrain> 1.13s ... pfew
21:57:34 <TrueBrain> sometimes profiles fucks up :p
21:58:22 <planetmaker> hm... I think I have a spaceport with a "hung" frigate
21:58:27 <planetmaker> it stays at ETA 1
21:59:40 <glx> starport was working last time I tried
22:00:44 <TrueBrain> 1.29s with scale3x
22:00:45 <planetmaker> I have r2343
22:00:47 <TrueBrain> acceptable loss :D
22:02:49 <planetmaker> uh... something screwed up majorly...
22:03:37 <TrueBrain> what did you do?! :P
22:04:46 <glx> starport works for me
22:06:13 <planetmaker> http://imagebin.org/166432
22:06:33 <TrueBrain> nice!
22:06:41 <glx> oh no a bug :)
22:07:03 <TrueBrain> stupid profiler, do your job correct
22:07:04 <TrueBrain> pfff
22:07:14 <TrueBrain> it now told me it didn't do anything in the draw routine
22:07:16 <TrueBrain> right ... I wish :p
22:07:34 <TrueBrain> 290us for normal drawing in 2x :D
22:07:36 <TrueBrain> hahaha
22:07:39 <TrueBrain> okay, I like that :D
22:07:45 <glx> you profile the intro ?
22:07:58 <TrueBrain> 70 drawing frames
22:08:59 <TrueBrain> valgrind has some complaints
22:09:16 <glx> in clean trunk ?
22:09:33 <TrueBrain> yup
22:09:34 <TrueBrain> don't get why
22:09:36 <TrueBrain> meh
22:09:40 <TrueBrain> Scenarion_Load_Reinforcement
22:09:45 <TrueBrain> uninitialized values, for index
22:10:51 <glx> it's an atoi
22:13:16 <DorpsGek> SVN: truebrain (r2344) -Add: implemented Scale2x and Scale3x as described at http://scale2x.sourceforge.net/algorithm.html
22:13:16 <DorpsGek> SVN: truebrain (r2344) -Add: optimized the 2x and 3x magnification, making it 80% faster
22:13:16 <DorpsGek> SVN: truebrain (r2344) -Note: Scale2x / Scale3x is around 50% slower, and disabled by default
22:13:25 <TrueBrain> go to src/video/sdl.c
22:13:27 <TrueBrain> line 19
22:13:28 <TrueBrain> remove it
22:13:30 <TrueBrain> try it out :P
22:13:32 <TrueBrain> looks really cartoonish
22:13:39 <TrueBrain> far from perfect, lot of minor 'glitches'
22:13:43 <TrueBrain> but it is smoother, and looks fancy
22:14:31 <glx> #define then #undef
22:14:35 <glx> nice ;)
22:14:42 <TrueBrain> / are not ISO-C :)
22:14:46 <DorpsGek> Bugs: http://bugs.opendune.org/view.php?id=80 :: Bug Created :: frigate never arrives, r2343
22:15:13 <planetmaker> btw, you need to update the available versions in the bug tracker...
22:15:13 <TrueBrain> tnx for the link planetmaker
22:15:21 <planetmaker> only 0.5 is available
22:15:26 <planetmaker> you're welcome :-)
22:15:32 <planetmaker> so... it all works w/o lib, right?
22:15:36 <TrueBrain> hmm, 0.6 should be there
22:15:41 <TrueBrain> I just implemented it myself
22:15:44 <planetmaker> :-)
22:16:08 <TrueBrain> 0.6.0 is in the list
22:16:10 <TrueBrain> weird
22:16:32 <TrueBrain> and I can select 0.6
22:16:34 <TrueBrain> so meh
22:16:54 <planetmaker> I only have 0.5 available
22:16:54 <glx> weird if I change SCREEN_MAGNIFIYING I have unresolved symbol
22:16:58 <TrueBrain> scale3x kinda looks awesome, and I would make it default, was it not that it makes fonts slightly harder
22:17:16 <TrueBrain> glx: works here ....
22:17:18 <TrueBrain> which symbol?
22:17:29 <TrueBrain> owh, and you can only have 2 or 3
22:17:32 <TrueBrain> with the SCALE
22:17:34 <planetmaker> how do I actually change zoom?
22:17:39 <TrueBrain> recompile
22:17:42 <TrueBrain> src/video/sdl.c
22:17:58 <glx> Video_DrawScreen
22:18:03 <TrueBrain> glx: yeah, use 2 or 3
22:18:05 <TrueBrain> not 4 :)
22:18:14 <planetmaker> ah, ok, no nice config yet ;-)
22:18:20 <TrueBrain> I made it give a symbol error, as I was too lazy to do .. well .. don't know what to do else :D
22:18:25 <TrueBrain> planetmaker: hell no :P
22:18:29 <TrueBrain> configs are for pussies :)
22:18:32 <planetmaker> there's a dune.cfg ;-)
22:18:43 <TrueBrain> also, the slowdown would be too big I am afraid
22:18:58 <TrueBrain> it does this function 50 times per second
22:19:05 <TrueBrain> so I tried to minimalize it :D
22:21:19 <TrueBrain> I kinda like scale3x, but ... it is not Dune2 :p
22:25:18 <glx> I'm still impressed by machine gun animation
22:25:32 <glx> I noticed it today :)
22:25:45 <TrueBrain> the game is full of amasing shit
22:26:26 <TrueBrain> the details are ... awesome
22:26:53 <glx> I'm not fan of texts with scale2x
22:26:59 <TrueBrain> what I said ;)
22:27:16 <TrueBrain> not sure if I can correct it
22:27:19 <TrueBrain> it only happens with black
22:27:22 <TrueBrain> so it might
22:27:36 <glx> menu is not very clear
22:27:52 <TrueBrain> but play the game for a bit
22:27:55 <TrueBrain> that part is just awesome
22:28:53 <TrueBrain> it is not a lot, but it does give a nice feeling to the game
22:28:57 <TrueBrain> more cartoonish, but ..
22:30:01 <TrueBrain> but yeah, fonts need work for it to be useable
22:30:14 <TrueBrain> or preblitter this, but ... that is a long route :p
22:30:16 <TrueBrain> road
22:30:18 <TrueBrain> what ever :P
22:30:24 <glx> yeah very cartoonish
22:30:41 <TrueBrain> it is better for the eyes tbfh :p
22:30:57 <glx> infantry units look weird
22:31:56 <TrueBrain> everything looks different
22:32:04 <TrueBrain> the concrete mostly annoyed me at start, but it isn't that bad
22:32:09 <TrueBrain> after a while it looks kinda kewl
22:32:16 <TrueBrain> the crosshair is also very funny
22:33:50 <glx> oh I finished A1 faster than ever :)
22:34:21 <glx> 4m, I think my minimum was 6m before
22:34:29 <TrueBrain> game runs smoother ;)
22:36:12 <TrueBrain> I kinda like this style for a 'remake' of an old game :D
22:36:15 <TrueBrain> think I am in love :D
22:37:51 <TrueBrain> harvesters not returning annoys the hell out of me :(
22:37:52 <glx> would be nice to have that togglable at runtime :)
22:38:11 <glx> like in monkey island remakes
22:38:34 <TrueBrain> problem with runtime is that the penalty will be high
22:38:41 <TrueBrain> but yeah ... might be worth it :D
22:38:47 <TrueBrain> we need that config.ini :D :P
22:38:55 <TrueBrain> or we can just modify the ingame settings I guess
22:40:32 <glx> I think I'll merge g_config.musicDrv and g_config.soundDrv
22:40:48 <TrueBrain> I think that should change totally
22:40:51 <TrueBrain> as in: just a boolean
22:45:37 <TrueBrain> walls are wrong
22:45:39 <TrueBrain> walls do not connect
22:45:50 <TrueBrain> they are all just pieces
22:46:59 <DorpsGek> Bugs: http://bugs.opendune.org/view.php?id=81 :: Bug Created :: Walls do not connect
22:47:21 <TrueBrain> you can driver over walls
22:47:22 <TrueBrain> haha
22:48:31 <TrueBrain> and the bug is still there that sometimes the computer doesn't see an unit as enemy
22:48:35 <TrueBrain> and I can just sit in his base
22:48:37 <TrueBrain> but that is Dune2 too
22:50:36 <glx> yes I like this bug ;)
22:50:54 <glx> but it's long to destroy a base with only one tank
22:51:24 <TrueBrain> the rest it works very well
22:51:31 <TrueBrain> well, excepts planetmaker's bug, but I can't build starports yet :D
22:51:55 <planetmaker> :-)
22:52:19 <TrueBrain> I agressed his whole base
22:52:21 <TrueBrain> now I kill them
22:52:23 <TrueBrain> and then his base
22:53:05 <glx> http://svn.opendune.org/~glx/temp.patch <-- something like that ?
22:54:11 <TrueBrain> yeah, for example
22:54:47 <TrueBrain> walls bug is weird
22:54:49 <TrueBrain> like they are not really there
22:55:11 <TrueBrain> and driving over people doesn't give a bloodstain?
22:56:00 <TrueBrain> 10 tanks easily destroy a base
22:56:02 <TrueBrain> lolz
22:57:02 <TrueBrain> I like how the emporer looks with scale3x
22:57:04 <TrueBrain> really nice
22:58:39 <TrueBrain> so ... why was valgrind complaining ...
22:59:52 <DorpsGek> SVN: glx (r2345) -Codechange: moved driver init state out of g_config
23:01:35 <TrueBrain> hmm, I am not using MrFlibbles updaten scenarios, that is a bit meh :p
23:07:13 <DorpsGek> SVN: truebrain (r2346) -Fix: when a category in an ini (read: scenario) was not found, the buffer was not emptied, returning random result of what was already in the buffer from last time
23:07:49 <TrueBrain> that is less complaining
23:07:53 <TrueBrain> now Script_Run iisues ..
23:12:03 <TrueBrain> it says Script_IsLoaded is using uninitialized memory on script->script == NULL
23:12:15 <glx> http://svn.opendune.org/~glx/temp.patch <-- probably not enough
23:12:15 <TrueBrain> but how ever I look at it, that whole unit array has a memset 0 over it
23:12:33 <TrueBrain> 'not enough'?
23:13:03 <glx> 0xFF vs 0xFFFF in some checks I think
23:13:08 <TrueBrain> possible
23:13:11 <TrueBrain> I would make it a constant
23:13:16 <TrueBrain> but then loading the savegame is tricky
23:13:17 <TrueBrain> hmm
23:13:20 <glx> we have a constant
23:13:26 <TrueBrain> lets add & 0xFF for now
23:13:33 <TrueBrain> and try to release a stable 0.6 sunday or something
23:14:05 <TrueBrain> I don't feel comfartable atm doing these tricky changes
23:14:19 <glx> I can just discard it for now :)
23:14:24 <TrueBrain> just add 0xFF
23:14:26 <TrueBrain> it is fine
23:15:25 <glx> another solution is to make index an uint8
23:15:40 <glx> and keep linkedID unchanged
23:15:55 <TrueBrain> owh, and I should fix that when fading in, you shouldn't be seeing what it fades in to really quick :D
23:15:59 <TrueBrain> same story
23:16:01 <TrueBrain> tricky changes
23:16:03 <TrueBrain> lets not do it :)
23:16:07 <TrueBrain> lets stabalize this first
23:18:27 <glx> http://svn.opendune.org/~glx/temp.patch <-- so for now it will be just that ;)
23:18:35 <TrueBrain> yup
23:18:57 <DorpsGek> SVN: glx (r2347) -Fix: MSVC warnings
23:19:51 <TrueBrain> I really would like it if we can finally give a stable release that is stable :D
23:19:57 <TrueBrain> I don't understand valgrind
23:21:23 <TrueBrain> ah, stackPointer is too big
23:21:39 <TrueBrain> it is 17
23:21:40 <TrueBrain> hmm
23:22:53 <glx> that's a problem when the stack is only 15
23:26:28 <TrueBrain> weird that this savegame always does that :p
23:26:36 <TrueBrain> for one specific unit
23:27:05 <TrueBrain> it now makes a printf to the stderr, and cancels the script
23:27:08 <TrueBrain> best I can think to do
23:28:00 <TrueBrain> most savegames have it
23:28:01 <TrueBrain> lol
23:30:16 <glx> hmm is stackPointer initialised ?
23:30:24 <TrueBrain> yup
23:30:28 <TrueBrain> = 15
23:30:30 <TrueBrain> in Init
23:30:53 <glx> framePointer is 17
23:32:08 <glx> but that should be ok
23:37:48 <glx> maybe a broken script
23:38:10 <TrueBrain> would be my guess
23:38:29 <TrueBrain> I now made a 'debugger'
23:38:32 <TrueBrain> which tells me when it happens
23:38:33 <TrueBrain> omg
23:38:35 <TrueBrain> it happens .. well .. a lot?
23:39:08 <TrueBrain> owh, no, I was off by one
23:39:34 <TrueBrain> still valgrind complains
23:39:35 <TrueBrain> hmm
23:39:45 <TrueBrain> I made sure stackPointer is <= 14
23:39:48 <TrueBrain> and it says invalid read
23:40:00 <TrueBrain> owh, no, it says it is not initialized
23:40:03 <TrueBrain> which is nearly impossible
23:40:28 <TrueBrain> unit of type 0
23:40:29 <TrueBrain> hmm
23:40:43 <TrueBrain> carry all
23:44:12 <TrueBrain> http://devs.opendune.org/~truebrain/temp.patch
23:44:14 <TrueBrain> what do you think?
23:45:08 <glx> anyway all unit data is memset 0 at start
23:45:49 <TrueBrain> owh, all script functions should check too
23:49:52 <glx> script functions don't change stack pointer
23:49:52 <glx> maybe we should use an wrapper around stack accesses
23:50:16 <TrueBrain> yes
23:50:21 <TrueBrain> that is the better solution I was looking for :D
23:50:23 <TrueBrain> tnx :)
23:50:30 <TrueBrain> and they don't change the stackpointer
23:50:32 <TrueBrain> but it can be 15
23:50:34 <TrueBrain> which is out of bound
23:52:15 <glx> 2 wrappers indeed, stackGet(script, index) and stackSet(script, index, value)
23:53:20 <glx> how can it be 15 ?
23:53:40 <TrueBrain> it starts with 15
23:53:48 <glx> it's always set(--stackPointer, value) or get(stackpointer++)
23:54:20 <TrueBrain> opcode 14
23:54:38 <TrueBrain> and again carryall, type 0, index 3 ..
23:54:42 <TrueBrain> same savegame saved a few times
23:54:45 <TrueBrain> seems he was corrupting me
23:54:57 <TrueBrain> no otherr avegames have it
23:55:02 <TrueBrain> http://devs.opendune.org/~truebrain/temp.patch
23:55:06 <TrueBrain> does a full check
23:55:06 <glx> opcode 14 or 0x14 ?
23:55:09 <TrueBrain> 14
23:55:13 <TrueBrain> the function call opcode
23:55:17 <TrueBrain> line 361 or something
23:55:20 <TrueBrain> in script.c
23:56:05 <TrueBrain> still leaves one valgrind warning, but okay
23:56:24 <TrueBrain> do you see the flow, of case 14, EXECUTE SUBROUTINE ?
23:56:42 <TrueBrain> it calls these scripts, but it doesn't know how many parameters it will use
23:56:44 <TrueBrain> so no checking is done
23:56:48 <TrueBrain> some even do +2 or +3
23:57:00 <glx> broken scripts ;)
23:57:05 <TrueBrain> most likely
23:57:10 <TrueBrain> possibly caused by earlier corruption
23:57:13 <TrueBrain> time will tell
23:57:16 <TrueBrain> but I like your idea of wrappers
23:57:24 <TrueBrain> avoids any problems, and gives us a script debugger
23:57:40 <TrueBrain> I am off to bed now; will fiddle a bit tomorrow
23:57:48 <TrueBrain> you also want to know the function, so that will be a bit tricky
23:58:00 <TrueBrain> I think a #define which includes __FILE__ or something
23:58:06 <TrueBrain> just to give an idea WHO caused the overflow
23:58:18 <TrueBrain> not sure if you can figure out the classname
23:58:23 <TrueBrain> functionname
23:58:44 <glx> __FILE__:__LINE__ is already good
23:58:52 <TrueBrain> it will have to do
23:58:54 <glx> can be improved later :)
23:58:58 <TrueBrain> otherwise we will need to build a complete debugger :p
23:59:02 <TrueBrain> but so yeah ...
23:59:11 <TrueBrain> I assume the remaining error is related to this broken carryall
23:59:17 <TrueBrain> although I can't understand the error
23:59:31 <TrueBrain> it is in opcode 15, the IF NOT EQUAL JUMP TO
23:59:37 <TrueBrain> (line 376 with my patch)
23:59:48 <TrueBrain> and says: Conditional jump or move depends on uninitialized value(s)