Commit graph

24 commits

Author SHA1 Message Date
Christian Semmler
579ee84049
isle: Improving WinMain and SetupWindow accuracy (#38)
* fix second Tick call, change loop

* add missing parameter to SetupWindow

* add missing include

* reorganize CreateWindowEx

* reorder cursor assignments

* declare SetupWindow as inline

* fix indent

* WinMain 99%

* minor improvement
2023-06-23 11:45:25 -07:00
MS
4f4863af6f
Use bitfield for MxVideoParamFlags (#40)
* Use bitfield for MxVideoParamFlags

Using a bitfield for MxVideoParamFlags results in the same xor/and logic that was partially inlined in the header file. This approach is a lot cleaner and there's a good chance this is what the devs would have landed on.

The code generation is really finicky -- other inlines in the header influence the code just by being there -- so I decided to stub out all of them. This got the match to 100%.

While I was in isle.cpp::SetupVideoFlags, I changed the signature so that the `m_using16bit` parameter is just `using16bit`.

* fix: cast Set16Bit inline arg to byte
2023-06-22 23:00:51 -07:00
Christian Semmler
fa8e4523bd
isle: match Isle::Tick and FindExistingInstance (#32)
* match Isle::Tick and FindExistingInstance

* add offset comments

* inline Isle::Tick

* move inline MxDSObject, remove mx.cpp
2023-06-21 15:18:37 -07:00
Christian Semmler
bfa035ca79
isle: Match Isle::SetupCursor (#28)
* match Isle::SetupCursor

* case
2023-06-21 00:30:59 -07:00
Christian Semmler
124a5ddaa3
isle: Accuracy improvements (#27)
* Isle::Isle 100% accuracy

* Isle::~Isle 100%

* improve accuracy of ReadReg functions

* refactor

* fix Isle::ReadRegBool

* fix Isle::ReadRegInt

* empty commit to reset GH action

* fix Isle::SetupLegoOmni
2023-06-21 00:30:46 -07:00
Christian Semmler
0ab8fc52d2
lego1/isle: Add MxDSObject, implement SetObjectName, adjust MxDSAction (#20)
* add MxDSObject, implement SetObjectName, adjust MxDSAction

* add a TODO

* update project files

* add WIP MxDSObject stuff

* merge

* update project file

* add addresses and SetAtomId

* switch addresses

* remove comment since it's fixed now (?)

* refactor

* update project file

* refactor into separate unit

* refactor into separate unit

* rename unit to avoid NMAKE issue

* rename param

* add last missing piece to Isle::Close

* fix spelling

* merge

* use union hack
2023-06-19 17:18:53 -07:00
ecumber
526c6af1f6
Implement a few Mx* functions / add data types (#25)
* Implement a few Mx* functions / add data types

* added more information, fixed formatting issues

* further cleanup

---------

Co-authored-by: itsmattkc <34096995+itsmattkc@users.noreply.github.com>
2023-06-18 22:36:07 -07:00
itsmattkc
1152feab8d use different naming scheme in ISLE
We now know that ISLE used PascalCase for its function names, so we're using those here now.
2023-06-18 21:51:50 -07:00
itsmattkc
4a41d3fd36 use sizeof in more places where appropriate 2023-06-18 21:51:26 -07:00
Anonymous Maarten
6e18d1b41f
ISLE and mingw32 fixes (#18)
* ci: no need to do a final cd

* MxDSAction has a setAtomId method

* Implement the MxOmniCreateParamBase destructor inline

Because of this, ISLE should no longer have to compile mxomnicreateparambase.obj.
I didn't modify isle.mak, because I don't have the MSVC 4.20 GUI set-up.

* Replace 256 with sizeof(...)

* Format DefWndProc calls in WndProc

* Replace magic mask in WNDPROC with macro's

* Replace magic numbers in main.cpp with macro's

* MOUSEMOVE notification id is 10 instead of 0x10

* Lowercase all windows includes such that mingw32 on Linux can find these

* Convert ISLE/res/isle.rc to utf-8, and add a comma needed by mingw32

* mingw32 cannot use a enum without previous declaration

* minor adjustments

---------

Co-authored-by: itsmattkc <34096995+itsmattkc@users.noreply.github.com>
2023-06-18 21:45:25 -07:00
itsmattkc
319b52f248 added more definitions
Also clarify .exe on script because Wine cares about that
2023-06-18 20:50:32 -07:00
MattKC
5aa7921e90
Add CI script to compare recompiled assembly with original code (#24)
* add test to compare assembly between functions

* ci: use abs path of wget

* ci: fix shell disambiguity

* ci: ensure capstone is installed

* ci: ensure correct filenames

* use better source for lego island files

* give me an idea of what the dir structure looks like

* make wine path function

* improved script and project

* fixed script on windows

* print debug info because now it literally only doesn't work on fucking github actions

* better source path resolving

For some reason, nmake compiles produce different symbols. I wonder if this affects the accuracy of the decomp.
2023-06-18 20:28:18 -07:00
Christian Semmler
30989aec9c
add Lego3DManager and related, fix a function signature 2023-06-18 13:45:39 +02:00
itsmattkc
1c95cbe40e isle: named last global var 2023-06-13 20:25:42 -07:00
itsmattkc
12a90b8730 fixed reg reading bug/inaccuracy 2023-06-12 13:06:10 -07:00
itsmattkc
7a5dc664ac improved accuracy of isle constructor 2023-06-12 13:05:55 -07:00
itsmattkc
dcf37c5244 isle: fix decomp inaccuracy 2023-06-11 18:04:09 -07:00
MattKC
363ebd2077
Merge pull request #4 from mosswg/match-to-original
Match some functions and values to the original binary
2023-06-11 11:17:13 -07:00
Christian Semmler
01845a94ab Use WM_SYSCOMMAND type constants 2023-06-11 16:12:41 +02:00
Moss Gallagher
1244a7a57b isle: Match readReg to Original 2023-06-11 03:29:13 -07:00
Moss Gallagher
4a1ac277f9 isle: Partially Matched setupVideoFlags to Original
For some reason the decomp version is doing the first xor in
EnableFullScreen with the operands swapped. The source code and
the original binary both have m_flags ^ e but the decomp binary has e ^
m_flags. This gives the same result but it is not a 100% match in the
binary. I'm not sure why the compiler is doing this or how to
change it but the other inaccuracy with the function is fixed.
2023-06-11 02:06:28 -07:00
itsmattkc
03fcad0bd2 added some legoomni functions and named some isle global vars 2023-06-10 22:11:05 -07:00
itsmattkc
8ff739c6d3 name some functions in mxticklemanager 2023-05-21 21:45:25 -07:00
itsmattkc
d4e2fb8d8a reorganized repo, implemented mxcore 2023-05-05 02:54:17 -07:00
Renamed from app/isle.cpp (Browse further)