IRC logs for #opendune on OFTC at 2011-05-25
⏴ go to previous day
00:00:24 <glx> - emu_addw(&emu_dx, emu_bx);
00:00:34 <TrueBrain> I know ... but that code is meh .. and never happens :p
00:01:30 <TrueBrain> because of SDL, you can never get negative values :D
00:02:04 <TrueBrain> hmm ... no, because of the cursor :p
00:03:24 <TrueBrain> I can go to the bottom left, top right
00:03:27 <TrueBrain> but not bottm right
00:03:45 <TrueBrain> new patch if you like
00:05:02 <TrueBrain> tiny bit more specific?
00:05:04 <glx> 7074 7076 7078 707A are NOT g_global->mouseSpriteXXX
00:05:58 <TrueBrain> but then again, I don't adress them as such
00:10:09 <glx> - if (emu_get_memory16(emu_ds, 0x00, 0x708C) == 0x0) { /* Unresolved jump */ emu_ip = 0x010D; emu_last_cs = 0x2B6C; emu_last_ip = 0x00F2; emu_last_length = 0x0025; emu_last_crc = 0x3C9F; emu_call(); return; }
00:10:09 <glx> you converted with if (g_global->mouseSpriteBuffer.csip == 0) return;
00:10:09 <glx> but 0x010D is the drawsprite
00:11:22 <TrueBrain> so I couldn't care less tbfh
00:11:45 <TrueBrain> but if it makes you happy :p
00:11:48 <TrueBrain> still doesn't fix my bug :(
00:13:59 <TrueBrain> I now forced which piece it should copy, it is weird :p
00:14:05 <TrueBrain> I think it should be left/top/width/height :p
00:17:25 <TrueBrain> with the +2 btw, the area is WAY too big, but I don't care :p (in width)
00:18:53 <DorpsGek> SVN: truebrain (r1627) -Add: C-ified GUI_Mouse_Show() and GUI_Mouse_Hide()
00:19:11 <TrueBrain> ugh, this has to be the longest error-hunt vs lines of code in the history of OpenDUNE
00:19:19 <TrueBrain> right, glx, do your DrawSprite magic :D
00:22:37 <glx> oh of course left top right bottom cause the overflow
00:28:34 <TrueBrain> it didn't rename all functions
00:28:36 <TrueBrain> so back to manual work
00:28:54 <glx> sometimes it renames too much for me :)
00:30:19 <DorpsGek> SVN: glx (r1628) -Fix: remove now unused emu_GUI_DrawSprite() monster
00:30:31 <glx> because this wrapper was a monster :)
00:31:24 <TrueBrain> too many instances of this function
00:34:03 <glx> what's your next target ?
00:34:19 <TrueBrain> doing the ... 2B6C thingy still
00:35:54 <glx> I'll go on CopyFrom and CopyTo
00:41:47 <TrueBrain> if not, remember this commit :D
00:42:15 <DorpsGek> SVN: truebrain (r1629) -Add: C-ified GUI_Mouse_Hide_Safe() and GUI_Mouse_Show_Safe(). That removes a lot of emu_ calls :D
00:42:59 <TrueBrain> src/emu_gfx.c: emu_Unknown_22A6_0E1A no longer used
00:43:00 <TrueBrain> src/emu_gfx.c: emu_GFX_PutPixel no longer used
00:43:02 <TrueBrain> src/emu_tools.c: emu_Tools_Free_IfNotNull no longer used
00:43:03 <TrueBrain> src/emu_tools.c: emu_Tools_RandomRange no longer used
00:43:05 <TrueBrain> those make me happy :D
00:44:38 <DorpsGek> SVN: truebrain (r1630) -Fix: some cleanup of unused emu_ and wrong names
00:44:59 <TrueBrain> the other two 2B6C are Show_WhenIn...
00:45:12 <TrueBrain> one is Hide_WhenInRange
00:45:16 <TrueBrain> other is Show_WhenInRang
00:46:24 <glx> though the mouse can't go outside the map ;)
00:49:16 <glx> hmm it's for animated parts
00:49:36 <glx> I guess it's some kind of optimisation
00:50:16 <glx> and it's buggy in the proceed/cancel mantat window
00:50:33 <glx> cursor is blinking above the buttons
00:50:50 <TrueBrain> ah, this function doesn't show the mouse for N ticks or something
00:51:08 <glx> maybe the blinking was caused by my bug though
00:53:35 <TrueBrain> A only hides when params indicate mouse is inside the region
00:54:07 <TrueBrain> it doesn't always store
00:54:59 <glx> ConditionnalHide and Show
01:19:16 <TrueBrain> meh; I should go to bed :(
01:31:01 <TrueBrain> regionFlags should be split, and more of that ... but not for now :D
01:32:31 <TrueBrain> cant find anything obvious :)
01:32:57 <DorpsGek> SVN: truebrain (r1631) -Add: C-ified GUI_Mouse_[Hide|Show]_InRegion. With this, 2B6C dies.
01:34:28 <DorpsGek> SVN: truebrain (r1632) -Add: name two function
01:34:37 <TrueBrain> the functions are easy to C-ify, but I am going to bed :D Night!
02:46:12 <DorpsGek> SVN: glx (r1633) -Add: C-ified GFX_Copy[To|From]Buffer()
02:47:51 <glx> there was a bug in r1627, mouse buffer CS and IP were inverted :)
08:01:29 <Xaroth|Work> wow, things are going fast
11:17:47 *** Xaroth_ has joined #openDune
12:37:26 <glx> ok let's try converting emu_GUI_Mentat_List
13:38:53 <DorpsGek> SVN: glx (r1634) -Add: C-ified GUI_Mentat_List_Click()
13:59:56 <DorpsGek> SVN: truebrain (r1635) -Add: C-ified GUI_Mouse_Show_InWidget() and GUI_Mouse_Hide_InWidget(). Be gone 2642
14:00:08 <TrueBrain> iek, they almost fit on one screen
14:03:25 <TrueBrain> lets kill 2995 next ..
14:15:01 <TrueBrain> LOL! Height with 320 comparing
14:21:35 <TrueBrain> I don't think this function does anything .....
14:22:18 <TrueBrain> owh, it does, nevermind
14:31:43 <TrueBrain> I think it is a fill routine
14:41:34 <glx> stupid code playing with pointers
14:42:22 <TrueBrain> @calc 320 * 42 + 256
14:42:32 <TrueBrain> so 66EC is just to get offsets faster
14:44:20 <glx> it's an array lineindex -> lineindex * 320
14:45:05 <TrueBrain> 66EC has a pointer pointing to it maybe
14:45:10 <TrueBrain> but that pointer points to such a list
14:45:37 <glx> btw I replaced 22a6:017d to direct calculation
14:46:30 <glx> easier to read, and CPU are fast enough now ;)
14:48:24 <glx> anyway when looking at asm used to access the array, I'm not sure it's faster than using mul
14:51:25 <TrueBrain> hmm ... somehow the memory gets corrupted :D
14:51:31 <TrueBrain> parameter values explode
14:54:54 <TrueBrain> cant produce a normal case where the function is called
14:56:51 <TrueBrain> happens when widget is invisible, and some flag is on
15:02:15 <TrueBrain> hmm, there already is a GUI_DrawFilledRectangle
15:02:20 <TrueBrain> as far as I can see, this does exactly the same
15:02:28 <TrueBrain> owh ... hmm ... lol ...
15:02:51 <TrueBrain> now I understand it :D hihi
15:16:03 <DorpsGek> SVN: truebrain (r1636) -Add: C-ified GUI_DrawBlockedRectangle(). 2995 is now done.
15:50:49 * glx starts to understand how all these pointers are used
15:51:24 <TrueBrain> scary idea aint it? :D
15:51:26 <glx> (for now it's readBuffer, readBuffer2 and readBuffer3 ;) )
15:52:12 <glx> but I think one is pictureFilename, another one is description
15:52:40 <glx> I'm on f__B4E0_059B_001B_5C8D()
15:54:25 <TrueBrain> 2B1E seems logging of some kind
15:56:11 <TrueBrain> think in fact a printf to stderr
15:56:22 <TrueBrain> I suggest we remove them?
15:56:48 <TrueBrain> yeah, this is the stuff you see on a second display in Dune
16:01:41 <DorpsGek> SVN: truebrain (r1637) -Add: name a function
16:49:02 <DorpsGek> SVN: truebrain (r1638) -Add: remove PrintDebug functions, as we don't really care. This ends 2B1E.
17:00:59 <TrueBrain> meh; computer crashed :(
17:03:34 <glx> you added a warning again ;)
17:07:31 <TrueBrain> then I am doing well
17:07:56 <DorpsGek> SVN: glx (r1639) -Add: C-ified GUI_Mentat_ShowHelp()
17:08:06 <TrueBrain> I was committing :p
17:08:26 <DorpsGek> SVN: truebrain (r1640) -Add: C-ified GUI_Mouse_SetPosition(). Goodbye 2B99.
17:08:54 <TrueBrain> they shall all die!!!!
17:09:22 <DorpsGek> SVN: truebrain (r1641) -Fix: no lnoger needed defines in function_names
17:10:53 <DorpsGek> SVN: truebrain (r1642) -Fix: remove unused emu_ wrappers
17:12:15 <TrueBrain> starting to run low on non-overlay code :p
17:13:03 <glx> soon overlays will be unneeded
17:15:04 <TrueBrain> 2BD1 is a timer interrupt
17:15:27 <glx> hmm I see not call for B536 functions outside B536
17:16:04 <TrueBrain> those 2 are your entries :)
17:17:18 <glx> ok I see 0148 now, from B53B
17:17:34 <glx> so we can ignore this one too
17:18:11 <TrueBrain> then wtf does it do? LOL!
17:18:14 <TrueBrain> so much code for an error?
17:21:21 <DorpsGek> SVN: glx (r1643) -Fix (r1636): MSVC warning
17:23:12 <TrueBrain> hmm ... think a conversion bug in a Tools thingy about 76B8
17:23:15 <TrueBrain> I know what it does now
17:23:21 <TrueBrain> but it had first: ret = <bla>
17:23:27 <TrueBrain> which makes it pick the wrong value for 'ret'
17:24:59 <TrueBrain> wasn';t used, so no real issue :)
17:31:27 <DorpsGek> SVN: truebrain (r1644) -Add: C-ified Game_Timer_Interrupt() and name Game_Timer_SetState(). This removes the need for 2BD1 to be here
17:32:08 <TrueBrain> 2BF2 does something with XMS :P
17:32:15 <TrueBrain> will name it, but doubt I can be arshed to convert it :p
17:32:38 <TrueBrain> its is a wrapper around XMS interrupts, which checks for errors etc
17:38:32 <TrueBrain> 2649 seems to be a collection of small wrappers
18:02:32 <TrueBrain> you are at least awake :D
18:09:14 <TrueBrain> what can it be .... I would expect malloc or something
18:16:17 *** Alberth has joined #openDune
18:36:45 <TrueBrain> seems alloc is not doing what it should
18:42:38 <DorpsGek> SVN: truebrain (r1645) -Add: named and simplified 2BF2. All XMS related, all wrappers around interrupts
18:43:20 <DorpsGek> SVN: truebrain (r1646) -Fix: remove a now unused function
18:43:43 <TrueBrain> the assumption now is XMS doesn't fail
18:43:46 <TrueBrain> which is very reasonable ;)
18:49:43 <DorpsGek> SVN: truebrain (r1647) -Fix (r1645): they are still emu_ routines
18:52:45 <Alberth> everything ok here? :)
18:52:59 <Alberth> 25+ commits a day is a lot :)
18:53:36 <TrueBrain> it becomes easier and easier
18:54:17 <glx> now doing f__B4E0_041D_0017_C8A5()
18:55:26 <TrueBrain> not real conversions again, but just enough to show what they do
19:03:02 <TrueBrain> 9A18 contains the XMS info
19:10:33 <TrueBrain> 2649 is also all XMS handlers
19:10:47 <TrueBrain> don't really fancy converting them, but I guess I do need to name them
19:11:09 <TrueBrain> but that leaves 4 functions < B4 unnamed
19:21:57 <TrueBrain> 10,000 lines or so to go?
19:24:34 <TrueBrain> I can almost touch it :D
19:25:38 <TrueBrain> if (type != 1) {} if (type != 3) {} <code>
19:35:31 <TrueBrain> Tools_Memmove does much more than we thought :D
19:35:59 <DorpsGek> SVN: truebrain (r1648) -Fix: refactored Tools_Memmove a bit
20:01:07 <DorpsGek> SVN: truebrain (r1649) -Add: named all called functions in 2649
20:02:29 <DorpsGek> SVN: truebrain (r1650) -Fix (r1649): save before commit
20:03:45 <TrueBrain> really don't feel like converting it
20:06:18 <DorpsGek> SVN: truebrain (r1651) -Add: named rest of 2649 to indicate where they belong to
20:12:35 <DorpsGek> SVN: truebrain (r1652) -Fix: minor typo
20:12:56 <DorpsGek> SVN: truebrain (r1653) -Add: named all overlay functions that are static as Overlay_Internal
20:13:03 <TrueBrain> I am naming functions to get us some idea what is left
20:17:23 <TrueBrain> only 2BB6 left, basically
20:21:58 <DorpsGek> SVN: glx (r1654) -Add: C-ified GUI_Mentat_LoadHelpSubjects()
20:39:51 <TrueBrain> glx: did you remove the entry from decompiled.h?
20:39:56 <TrueBrain> (it had no updates, hence the question)
20:41:43 <DorpsGek> SVN: truebrain (r1655) -Add: C-ified GUI_Palette_RemapScreen(). This ends 2BB6.
20:41:47 <TrueBrain> hmm .. there is a bug ...
20:41:56 <TrueBrain> when moving around in starport, it leaves a white mark
20:50:38 <glx> confirmed, but it used to work
20:52:19 <glx> 2839 emu_push(emu_cs); emu_push(0x154A); emu_cs = 0x22A6; f__22A6_0E34_002B_E39A();
20:52:19 <glx> 2836 GUI_DrawFilledRectangle(64, 0, 112, SCREEN_HEIGHT - 1, GFX_GetPixel(72, 32));
20:53:24 <glx> my fingers often invert 3 and 2
20:53:52 <DorpsGek> SVN: glx (r1656) -Add: C-ified GUI_Mentat_ScrollBar_Draw()
20:54:47 <TrueBrain> I only confirmed it was 1621
20:58:47 <DorpsGek> SVN: glx (r1657) -Fix (r1621): 32 != 23
21:01:27 <TrueBrain> right ... that starts to wrap it up a bit
21:03:55 <DorpsGek> SVN: truebrain (r1658) -Add: named GUI_Widget_Free_WithScrollbar, and renamed his partner to match up
21:06:32 <TrueBrain> B518 are halloffame?
21:06:41 <TrueBrain> 2 entries. 14F2 is a counter entry
21:11:57 <TrueBrain> k, naming some stuff now :D
21:12:48 <TrueBrain> some of my assumptions seems too bold
21:12:50 <TrueBrain> but I don't care :p
21:13:16 <DorpsGek> SVN: truebrain (r1659) -Add: named most of B518
21:15:21 <glx> scrollbar related I think
21:15:25 <DorpsGek> SVN: truebrain (r1660) -Fix: minor renaming
21:24:39 <DorpsGek> SVN: truebrain (r1661) -Add: named B4DA (Mentat / Security related)
21:25:05 <TrueBrain> that is all I can name and do
21:25:19 <TrueBrain> 160 functions missing ..
21:28:40 <glx> hmm we already have a GUI_Mentat_Loop
21:29:04 <TrueBrain> it gave no errors :(
21:29:54 <TrueBrain> dunno exact what kind of loop it is ... hmm ..
21:31:05 <glx> B4DA is the loop showing a picture, with possible text on the picture and mentat text displayed on top
21:31:34 <DorpsGek> SVN: truebrain (r1662) -Fix (r1661): naming conflict
21:31:37 <TrueBrain> well, solved it for now :D
21:32:13 <TrueBrain> so many names are fucked anyway :)
21:32:16 <TrueBrain> lot of cleaning up to do :)
21:32:32 <glx> and many functions are not where they should
21:32:34 <TrueBrain> lets first convert everything; then remove libemu
21:32:36 <TrueBrain> then we will see :D
21:56:49 <Xaroth|Work> that sounds like a good plan to me
21:58:08 <TrueBrain> get ride of all emu_ :D
22:11:13 *** fjb is now known as Guest2207
continue to next day ⏵