isle/LEGO1
disinvite a7b510386a Implementation of MXIOINFO. Not a 100% match, but we are very close. I don't wanna wrangle with this one any more, so I figured I would open it up for review in case anyone else has ideas.
**Known problems:**
- The Open function uses a `movzx` instruction on the value of parameter `fdwOpen` before pushing to OpenFile from the kernel. You can force this to appear by casting to `unsigned short`, but this disturbs the instructions for the rest of the file. To get the "best" overall match I decided to leave this out.
- Flush, Advance, and Descend differ only in the order of operands on a `cmp` instruction.
- This entire file is honestly pretty ugly. The main reason is all the nested ifs; we are constrained by returning a result value from each function, but only at the very end instead of bailing out with a `return`. By far the worst offender is the do/while loop in the Descend function.

**Design considerations:**
- We are casting the file handle from MMIOINFO to `HFILE` everywhere it is used, so I decided to just change the type. While doing that, I figured I might as well just pull out the members from the struct so we don't have `m_info` all over the place.
- Without using a struct member, we have the issue of the obvious `memset` used to zero out the values in the constructor. I changed this to work on the object itself, which would not be valid in most cases, but seems fine here since we have no virtual methods.

There is a lot of repeated code here, namely the call to `_llseek` to reset `m_lDiskOffset` based on the current file position. You could move this to an inline function, but maybe that's not appropriate.

There are probably strides to be made on code clarity and comments (if needed or wanted) here. I'm open to any suggestions.
2023-07-01 13:23:39 -04:00
..
dllmain.cpp rename GetClassName/IsClass, declare mxtypes 2023-06-27 19:04:07 -07:00
lego3dmanager.h lego1/isle: Add MxDSObject, implement SetObjectName, adjust MxDSAction (#20) 2023-06-19 17:18:53 -07:00
lego3dview.h lego1/isle: Add MxDSObject, implement SetObjectName, adjust MxDSAction (#20) 2023-06-19 17:18:53 -07:00
legoanimationmanager.h reorganized repo, implemented mxcore 2023-05-05 02:54:17 -07:00
legobackgroundcolor.h remove execute bits on files 2023-06-12 18:05:43 +02:00
legobuildingmanager.h reorganized repo, implemented mxcore 2023-05-05 02:54:17 -07:00
legoentity.h remove execute bits on files 2023-06-12 18:05:43 +02:00
legogamestate.h remove execute bits on files 2023-06-12 18:05:43 +02:00
legoinputmanager.h isle: Improving WinMain and SetupWindow accuracy (#38) 2023-06-23 11:45:25 -07:00
legomodelpresenter.h reorganized repo, implemented mxcore 2023-05-05 02:54:17 -07:00
legonavcontroller.cpp rename GetClassName/IsClass, declare mxtypes 2023-06-27 19:04:07 -07:00
legonavcontroller.h rename GetClassName/IsClass, declare mxtypes 2023-06-27 19:04:07 -07:00
legoomni.cpp rename GetClassName/IsClass, declare mxtypes 2023-06-27 19:04:07 -07:00
legoomni.h rename GetClassName/IsClass, declare mxtypes 2023-06-27 19:04:07 -07:00
legopartpresenter.h reorganized repo, implemented mxcore 2023-05-05 02:54:17 -07:00
legoroi.h import all functions from lego1 exports 2023-06-11 18:03:54 -07:00
legoutil.h lego1: implement more of LegoNavController (#16) 2023-06-19 01:34:58 -07:00
legovideomanager.h lego: implement SetControlMax and related partials (MxVideoManager, MxPalette, MxUnknown100dc6b0) (#42) 2023-06-24 10:09:46 -07:00
legoworld.h remove execute bits on files 2023-06-12 18:05:43 +02:00
legoworldpresenter.h reorganized repo, implemented mxcore 2023-05-05 02:54:17 -07:00
mxatomid.cpp lego1/isle: Add MxDSObject, implement SetObjectName, adjust MxDSAction (#20) 2023-06-19 17:18:53 -07:00
mxatomid.h lego1/isle: Add MxDSObject, implement SetObjectName, adjust MxDSAction (#20) 2023-06-19 17:18:53 -07:00
mxautolocker.cpp Convert all sources eol's to nl (#41) 2023-06-23 09:17:41 -07:00
mxautolocker.h match MxAutoLocker ctor/dtor (#52) 2023-06-26 09:48:19 -07:00
mxbackgroundaudiomanager.h reorganized repo, implemented mxcore 2023-05-05 02:54:17 -07:00
mxbitmap.h import all functions from lego1 exports 2023-06-11 18:03:54 -07:00
mxcore.cpp lego: match GetClassName/IsClass (#48) 2023-06-25 18:34:13 -07:00
mxcore.h rename GetClassName/IsClass, declare mxtypes 2023-06-27 19:04:07 -07:00
mxcriticalsection.cpp added even more definitions 2023-06-18 20:56:55 -07:00
mxcriticalsection.h rename GetClassName/IsClass, declare mxtypes 2023-06-27 19:04:07 -07:00
mxdirectdraw.h import all functions from lego1 exports 2023-06-11 18:03:54 -07:00
mxdsaction.h lego1/isle: Add MxDSObject, implement SetObjectName, adjust MxDSAction (#20) 2023-06-19 17:18:53 -07:00
mxdsfile.cpp 100% Match of MxDSFile (#51) 2023-06-27 11:44:02 -07:00
mxdsfile.h rename GetClassName/IsClass, declare mxtypes 2023-06-27 19:04:07 -07:00
mxdsobject.cpp move inlined MxDSObject::SetAtomId to main header 2023-06-22 00:45:56 -07:00
mxdsobject.h move inlined MxDSObject::SetAtomId to main header 2023-06-22 00:45:56 -07:00
mxdssource.cpp 100% Match of MxDSFile (#51) 2023-06-27 11:44:02 -07:00
mxdssource.h 100% Match of MxDSFile (#51) 2023-06-27 11:44:02 -07:00
mxeventmanager.h Implement a few Mx* functions / add data types (#25) 2023-06-18 22:36:07 -07:00
mxioinfo.cpp Implementation of MXIOINFO. Not a 100% match, but we are very close. I don't wanna wrangle with this one any more, so I figured I would open it up for review in case anyone else has ideas. 2023-07-01 13:23:39 -04:00
mxioinfo.h Implementation of MXIOINFO. Not a 100% match, but we are very close. I don't wanna wrangle with this one any more, so I figured I would open it up for review in case anyone else has ideas. 2023-07-01 13:23:39 -04:00
mxmusicmanager.h Implement a few Mx* functions / add data types (#25) 2023-06-18 22:36:07 -07:00
mxnotificationmanager.h Implement a few Mx* functions / add data types (#25) 2023-06-18 22:36:07 -07:00
mxobjectfactory.h Implement a few Mx* functions / add data types (#25) 2023-06-18 22:36:07 -07:00
mxomni.cpp mxomni: fixed minor inaccuracy 2023-06-19 10:56:53 -07:00
mxomni.h mxomni: fixed minor inaccuracy 2023-06-19 10:56:53 -07:00
mxomnicreateflags.cpp rename GetClassName/IsClass, declare mxtypes 2023-06-27 19:04:07 -07:00
mxomnicreateflags.h rename GetClassName/IsClass, declare mxtypes 2023-06-27 19:04:07 -07:00
mxomnicreateparam.cpp Convert all sources eol's to nl (#41) 2023-06-23 09:17:41 -07:00
mxomnicreateparam.h rename GetClassName/IsClass, declare mxtypes 2023-06-27 19:04:07 -07:00
mxomnicreateparambase.cpp cleaned up mxomnicreateparambase 2023-06-18 21:29:25 -07:00
mxomnicreateparambase.h cleaned up mxomnicreateparambase 2023-06-18 21:29:25 -07:00
mxpalette.cpp isle: match WndProc and re-arrange functions in ISLE.EXE (#45) 2023-06-27 13:07:29 -07:00
mxpalette.h lego: implement SetControlMax and related partials (MxVideoManager, MxPalette, MxUnknown100dc6b0) (#42) 2023-06-24 10:09:46 -07:00
mxpresenter.h remove execute bits on files 2023-06-12 18:05:43 +02:00
mxrect32.h lego: implement/match MxVideoParam exported functions (#36) 2023-06-22 09:19:48 -07:00
mxresult.h reorganized repo, implemented mxcore 2023-05-05 02:54:17 -07:00
mxscheduler.h remove execute bits on files 2023-06-12 18:05:43 +02:00
mxsoundmanager.h Implement a few Mx* functions / add data types (#25) 2023-06-18 22:36:07 -07:00
mxstreamcontroller.h Implement a few Mx* functions / add data types (#25) 2023-06-18 22:36:07 -07:00
mxstreamer.h reorganized repo, implemented mxcore 2023-05-05 02:54:17 -07:00
mxstring.cpp Convert all sources eol's to nl (#41) 2023-06-23 09:17:41 -07:00
mxstring.h 100% Match of MxDSFile (#51) 2023-06-27 11:44:02 -07:00
mxticklemanager.h rename GetClassName/IsClass, declare mxtypes 2023-06-27 19:04:07 -07:00
mxtimer.cpp rename GetClassName/IsClass, declare mxtypes 2023-06-27 19:04:07 -07:00
mxtimer.h lego1: implement MxTimer + dependencies 2023-06-14 01:22:42 +01:00
mxtransitionmanager.h import all functions from lego1 exports 2023-06-11 18:03:54 -07:00
mxtypes.h rename GetClassName/IsClass, declare mxtypes 2023-06-27 19:04:07 -07:00
mxunknown100dc6b0.cpp isle: match WndProc and re-arrange functions in ISLE.EXE (#45) 2023-06-27 13:07:29 -07:00
mxunknown100dc6b0.h isle: match WndProc and re-arrange functions in ISLE.EXE (#45) 2023-06-27 13:07:29 -07:00
mxvariabletable.h import all functions from lego1 exports 2023-06-11 18:03:54 -07:00
mxvideomanager.cpp rename GetClassName/IsClass, declare mxtypes 2023-06-27 19:04:07 -07:00
mxvideomanager.h lego: implement SetControlMax and related partials (MxVideoManager, MxPalette, MxUnknown100dc6b0) (#42) 2023-06-24 10:09:46 -07:00
mxvideoparam.cpp Convert all sources eol's to nl (#41) 2023-06-23 09:17:41 -07:00
mxvideoparam.h rename GetClassName/IsClass, declare mxtypes 2023-06-27 19:04:07 -07:00
mxvideoparamflags.cpp Convert all sources eol's to nl (#41) 2023-06-23 09:17:41 -07:00
mxvideoparamflags.h rename GetClassName/IsClass, declare mxtypes 2023-06-27 19:04:07 -07:00
realtimeview.h remove execute bits on files 2023-06-12 18:05:43 +02:00
viewmanager.h forgot updated viewmanager.h 2023-06-18 14:02:16 +02:00