IRC logs for #opendune on OFTC at 2013-01-19
            
00:24:30 *** glx has joined #openDune
00:24:30 *** ChanServ sets mode: +o glx
00:25:23 <glx> hello
03:13:27 *** glx has quit IRC
14:07:42 <TrueBrain> @base 16 10 78
14:07:42 <DorpsGek> TrueBrain: 120
17:05:52 <TrueBrain> @base 16 10 fde8
17:05:52 <DorpsGek> TrueBrain: 65000
17:22:30 <TrueBrain> there; fixed most of the outstanding OpenDUNE bugs
17:22:43 <TrueBrain> down to 12, of which 2 are related to threading issues
17:22:55 <TrueBrain> 3 have a solution, but I have to validate them ... which is annoying, at best
17:23:07 <TrueBrain> 3 more are enhancements
17:23:12 <TrueBrain> 1 is under review, should be solved
17:23:36 <TrueBrain> 2 need a patch
17:23:54 <TrueBrain> and 1 need a patch that ... isnt as bad as its current :P
18:47:00 *** glx has joined #openDune
18:47:00 *** ChanServ sets mode: +o glx
18:47:38 <glx> hello
18:51:02 <TrueBrain> morning
19:41:22 <TrueBrain> seems once again he totally fails to grasp the basic concept of programming, or OpenDUNE in general; it is no longer fun .. it isjust painfully annoying :P
19:41:42 <TrueBrain> he made a member of a struct that is stored to disk "uint" without doing any work on the part that stores or loads it from disk
19:42:02 <TrueBrain> not the mention that "uint" is bad programming for a member of a struct that is stored to disk due to its lack of bit-size identifier :P
19:42:28 <TrueBrain> but ... I am not going to explain that to him anymore .. kinda sick and tired of his offensive statements and way of communicating
19:42:55 <TrueBrain> that said; glx, how did your attempt on threading stuff for Windows go?
20:32:05 <glx> all my tries were worst than current behavior
20:33:36 <glx> in current code we have 2 threads: main and timer
20:35:50 <glx> as event loop is in Video_Tick(), which is called via timer, the window must be created in the timer thread
20:37:34 <glx> but dsp is still in main thread and I don't see any way to move it to timer thread
20:42:43 <TrueBrain> :(
20:45:08 <glx> really the only solution is the very hard one: removing timer
20:46:27 <TrueBrain> meh
20:50:39 <glx> but it's not easy because the game is a succession of infinite loops
20:50:57 <glx> like the menu loop going into the game loop
20:51:49 <glx> first step would be to find a way to have only one infinite loop
20:55:57 <glx> hmm looking at GameLoop_Main() it seems we only need to find how to merge GameLoop_GameIntroAnimationMenu() in the main loop
21:00:59 <TrueBrain> I guess an easy fix would be
21:01:07 <TrueBrain> to put all while (true) content in different functions
21:01:10 <TrueBrain> and make 1 big switc
21:01:14 <TrueBrain> to call the right one to loop
21:01:22 <TrueBrain> means we only have to clean local variables
21:04:22 <glx> handling intro and menu in main loop should be enough I think
21:04:32 <TrueBrain> many small subloops
21:04:45 <TrueBrain> I would rather solve them all
21:04:48 <TrueBrain> so we can remove threading in general
21:04:59 <TrueBrain> else we just keep pushing the issue to other layers
21:05:13 <glx> but it can be done step by step
21:05:31 <TrueBrain> yup
21:05:38 <TrueBrain> would my switch idea work you think?
21:07:06 <glx> you mean Team, Unit, Structure and House loops ?
21:07:17 <TrueBrain> no
21:07:23 <TrueBrain> we have like 14+ while (true) {} loops
21:07:36 <TrueBrain> if we put the body of those ina function
21:07:40 <TrueBrain> make 1 while (true) {} loop
21:07:45 <TrueBrain> where there is a switch to say which to call
21:07:47 <TrueBrain> would that work?
21:08:57 <glx> that should work too
21:08:59 <TrueBrain> guess I will try in a bit :D
21:09:27 <TrueBrain> only risk is adding more globals
21:09:39 <TrueBrain> most conversion errors seem to be removed
21:09:44 <TrueBrain> so it should be fine to do massive code changes
21:11:37 <glx> I'll try my idea (which is basically addind GM_MENU and merge GameLoop_GameIntroAnimationMenu() in GameLoop_Main())
21:11:56 <TrueBrain> but how does that solve things like mentat window?
21:12:58 <TrueBrain> I mean, we still cannot remove the timer then, can we?
21:13:17 <glx> doesn't solve the problem, but it's a first step
21:13:50 <glx> then we can add more GM_ stuff
21:15:36 <glx> so all things like windows or mentat can go into main loop
21:16:54 <TrueBrain> dont have the code atm, but it seems as good as any other loop
21:18:38 <glx> there are too many GUI_Widget_HandleEvents() loops ;)
21:19:39 <glx> editbox, pickhouse, factory, ...
21:19:49 <TrueBrain> yeah .. we will have to find a solution
21:20:40 <Xaroth|Work> ooh, activity
21:23:58 <glx> oh GameLoop_Main() already calls GUI_Widget_HandleEvents()
21:25:02 <glx> of course the problem would be to pass the right widget list
21:31:46 <TrueBrain> right, let me get the code ..
21:32:09 <TrueBrain> 57 references to sleepIdle ... wow
21:32:26 <TrueBrain> well, this is not trivial, nor easy :s
21:32:44 <TrueBrain> we will have to split the function into Pre, Loop and Post
21:45:01 <glx> lol @ gui.c:810
21:45:16 <glx> ret & 0x800 test is useless
22:46:04 <TrueBrain> so many cases ....
22:46:17 <TrueBrain> so yeah, I guess we have to start moving them one by one
22:46:19 <TrueBrain> and see where we end up
22:46:24 <TrueBrain> push them higher and higher up the chain
22:47:26 <TrueBrain> right; I have been drinking too much to understand this code :P
22:55:52 <glx> :)