* Bootstrap decomp of D3DRM rendering code
* This PR kicks off work on decompiling the D3D Retained Mode (D3DRM)
rendering part of the codebase.
* High level overview:
* There is a base IMxDirect3DRMObject class which all of the D3DRM
rendering objects inherit from. Its only virtual method is one to get
the underlying object handle.
* A hierarchy of abstract classes inherits from this base class, which
I've called "IMxDirect3DRM<class>". These classes only have pure
virtual methods on them and don't contain any data.
* Each one of the abstract classes has exactly one concrete
implementation, which I've called "MxDirect3DRM<class>". These classes
have exactly one piece of data, which is a pointer to the underlying
D3D Retained Mode object.
* If the classes need to store additional data, they store it in a
userdata blob which is attached to the D3DRM object rather than the
additional data being stored in the class itself.
* I've worked out about twice this many classes related to D3DRM
rendering so far but the PR was getting large enough as is, so I'm
cutting it here for now.
* I decomped sufficiently many methods of these classe to convince
myself that the above observations are correct. About 60% of the
decomped methods here are perfect matches, including at least one
non-trivial method per class.
* Formatting
* Restructure changes using Tgl naming / details
* Restructure the changes to use the naming that we know from Tgl.
* Fill in some parts of the implementation I couldn't initially figure
out using the details from Tgl (got more 100% matches).
* Move d3drm link requirement
* Fixups FloatMatrix -> FloatMatrix4
* Fix order
* Full fix for ordering problems
* Put back accidentally removed include.
* Fix call which should have been Release
* Use new and delete for DeepClone
* Missing Tgl:: on CreateRenderer
* Revert change to bool return value.
* Rename Something -> Unk
* Return paramter naming convention to what Tgl used
* Add scalar ddtor to verify inline destructor
* Fix order
* Change malloc/free -> new/delete in Tgl
* Remove duplicate destructor.
* Check all inline destructors
* Fix dtor comments
* Third time's the charm
* Alphabetical sort
* Decomp adjustments
* Add d3drm files to clang-format
---------
Co-authored-by: Christian Semmler <mail@csemmler.com>
* Create common print_diff function
* Add pylint and black
* Fix linting, move classes to utils
* Add black/pylint to github actions
* Fix linting
* Move Bin and SymInfo into their own files
* Split out format
* Tidy up workdlows and pip, add readme
* Lint tests, add tests to readme
* First commit of order tool
* More flexible match on module name. Bugfix on blank_or_comment
* Report inexact offset comments in verbose mode. Bugfix for exact regex
* Refactor checkorder into reusable isledecomp module
* Find bad comments in one pass, add awareness of TEMPLATE
* Refactor of state machine to prepare for reccmp integration
* Use isledecomp lib in reccmp
* Build isledecomp in GH actions, fix mypy complaint
* Ensure unit test cpp files will be ignored by reccmp
* Allow multiple offset markers, pep8 cleanup
* Remove unused variable
* Code style, remove unneeded module and TODO
* Final renaming and type hints
* Fix checkorder issues, add GH action and enforce (#2)
* Fix checkorder issues
* Add GH action
* Test error case
* Works
* Fixes
---------
Co-authored-by: Christian Semmler <mail@csemmler.com>
* Implement ViewROI and base classes
* Clean up Orientable header
* Move tgl to tgl subdirectory, and use target_include_directories
* Move classes to submodules
* Fix some missed references
* Fix/match UpdateWorldData
* Renaming / removing MxTypes / refactoring
* Consistent naming for Matrix
* Adjust format action
* Add Vector3/Vector4 to Data vector
* Add TGL comment
* Add a comment about Matrix4Impl
* Add ROI comment
---------
Co-authored-by: Anonymous Maarten <anonymous.maarten@gmail.com>
Co-authored-by: Christian Semmler <mail@csemmler.com>
* add smartheap
* cmake: bump even further
* this seemed to be necessary but now it isn't? ok
* cmake: force include smrtheap.hpp
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
* cmake: force include smrtheap.hpp 2
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
* remove compiler defs - unnecessary if force-including anyway
* cmake: use interface for cleaner code
---------
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
* break build up into steps
* download artifacts
* clone uploadtool
* need env on windows
* just use ubuntu for inkscape
* report went missing
* add inkscape to path
* use ubuntu for compare
* Revert "use ubuntu for compare"
This reverts commit a4ce103d09.
* reinstall after cache
* try different apt cache
* use im
* use rsvg
* change size to avoid downscaling
* remove png
* do not install librsvg anymore
Now we can use our own compiled LEGO1.LIB rather than one generated from the original. Also implements a script that tests them to help ensure future commits don't break them.
* initial cmake implementation
* ci: i guess older cmake doesn't support this
* cmake: add max version to suppress warning
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
---------
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
* Improve reccmp.py
* Now only shows the info for a single function when a specific function
is specified via -v
* Now colors the output by default
* Percentages are shown as green/yellow/red depending on the percentage
completed.
* Diff +/- lines are shown as green/red.
* Includes standard --no-color argument in case we need no color for
some tooling which consumes the output.
* Feedback
Sorry to everyone's muscle memory, but I think this is better. The idea for the name was "recomp compare", but it's too easy to read it as "recomp with a typo". This should fix that, as well as be slightly easier to write since it's shorter.
* recomp.py: use argparse to parse arguments
* Address code revew comments
* reccomp.py: -h/--help for help -H/--htmp for html
* update CI to use new arg
* slight string updates
---------
Co-authored-by: itsmattkc <34096995+itsmattkc@users.noreply.github.com>
* 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>
* 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.