Commit graph

26 commits

Author SHA1 Message Date
vMidz
23b9d47e8a
implement EndAction (#196)
* implement EndAction

implement EndAction
+offsets commenets

* Refactor MxParam/MxNotificationParam

* Add correct address for destructor

* Make MxNoticiationParam more concise

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-10 13:05:04 -04:00
Misha
625ee52fe0
implement a few mxomni/legoomni functions (#193) 2023-10-09 12:31:36 +02:00
Misha
62b97b8f1f
Implement MxOmni::Create (#182)
* implement mxomni::create, and match MxStreamController::Open

* Use enum for mxparam type

* Fix return type

* Match MxOmni::Notify

* Remove unused variable

* Added override keywords

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
2023-10-07 20:05:45 +02:00
Misha
8281e195f7
Implement MxOmni Start/stop timer (#181)
* Implement start/stop timer

* Mark StartDirectSound as stub

* remove accidently committed files
2023-10-07 19:12:59 +02:00
Christian Semmler
5164ef1a54
Refactor MxOmni/LegoOmni headers to use forward declarations (#148)
* Refactor MxOmni/LegoOmni headers to use forward declarations

* Fixes

* Fix build

* Fix deps
2023-10-07 17:30:04 +02:00
Misha
50b9a6dea5
Implement Start() (#176)
* Implement Start()

* Undo isleapp changes

* Implement LegoOmni::Start

* fix vtable0x20

* Address review

* fix build
2023-10-07 09:05:44 -04:00
Christian Semmler
dc869c441c
Relocate SetAppCursor to legoutil (#144) 2023-09-29 12:42:15 -04:00
Ramen2X
44c3ae478b
implement some of MxTransitionManager (#143)
* implement some of MxTransitionManager

start working on MxTransitionManager::StartTransition
add TransitionType enum
implement/match MxTransitionManager::GetDDrawSurfaceFromVideoManager
implement/match global function SetAppCursor

* remove offset comment from mxomni.h

* remove misc offset comments from mxtransitionmanager.h

* address feedback

* merge m_unk20-24 into pad
2023-09-29 18:09:46 +02:00
MattKC
3f6e3af8ca
Fix LegoOmni vtable (#140) 2023-09-25 13:28:25 -07:00
MS
89f66e4e0e
MxPresenter::ParseExtra (#123)
* MxPresenter::ParseExtra and surrounding functions

* Named extra data is MxDSAction, added Parsed flag to enum
2023-09-13 09:44:03 +02:00
Christian Semmler
2233da39d8
Implement/match MxDisplaySurface::Create (#115) 2023-08-28 02:49:15 -07:00
MS
bb0d5be921
Implement MxAtomId and reference counter (stl set) (#109)
* Implement MxAtomId and reference counter (stl set)
* Partial success in hiding 4786 warning spam.
* Build out most of MxOmni::Destroy since it also touches the set

* Add some size asserts
2023-08-16 10:09:44 -07:00
Joshua Peisach
f8b1995a83
LEGO1: MxPalette (#56)
* MxPalette - add missing member variables, Detach function

* mb

* MxPalette: give bob the builder his constructor

* push progress, gn

* avoid hexadecimal

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>

* fix MxPalette::GetDefaultPalette

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>

* aaaaaaaaaaaaaa

* Revert "fix MxPalette::GetDefaultPalette"

This reverts commit 63f2215737d3bcd286f67dcf1a04fdf8a234d41b.

* Implement MxPalette::Clone (doesn't match)

* fix MxPalette structure and match ctor/dtor

* Matching progress for MxPalette::GetDefaultPalette

* Implement ApplySystemEntriesToPalette except the memcpy calls

* implement SetSkyColor (doesn't match)

* Use MxTypes instead of generics

* prefer decimal values than hex for m_entries

* Update mxpalette.cpp

* Push MxPalette progress - read comments in code.

* improved MxPalette::operator==, will be 100% when MSVC feels like making it so

* improved MxPalette::SetSkyColor, will be 100% when MSVC feels like making it so

* improved MxPalette::Clone, will be 100% when MSVC feels like making it so

* Fixes

- reordered the functions in order of where they are in the hex because recmp.py sometimes kept saying it couldn't find the symbol (??)
- clone returns a pointer, not a ref
- worked a bit on setpalette/applysysentriestopalette

* Match GetDefaultPalette a bit more

* fix: MxPalette::GetDefaultPalette is now 100% matching

* fix: MxPalette::ApplySystemEntriesToPalette is now 100% matching

* tidy: rename `DC` var in GetDefaultPalette to `hdc`

* fix: MxPalette::SetPalette is now functionally matching

Not assembly matching yet because of MSVC weirdness.
At some point it will probably start matching, because
the structure seems to be accurate.

* fix: MxPalette rgbquad ctor functionally matches

Not quite ASM matching yet because of weird
register allocation mismatches.

* fix: I forgot to commit mxpalette.h...

* tidy: use Mx* primitives instead of builtins

* refactor: remove MxPalette::FromBitmapPalette

* fix: call ApplySystemEntriesToPalette from MxPalette(const RGBQUAD *)

* rename MxPalette::SetPalette to MxPalette::SetEntries

* fix: I once again forgot to commit mxpalette.h...

* feat: add/match MxPalette::Reset [0x100BF490]

* fix: add MVideoManager() to mxomni header

* refactor: change unk50 in MxVideoManager to LPDIRECTDRAW

* feat: add/match MxPalette::CreateNativePalette [0x100BF000]

* fix: MxPalette::SetSkyColor is 100% matching

* Annotate MxPalette members' offsets

* Annotate the global default aplette

* use hex size

* remove unnecessary variable offset listing

* Update LEGO1/mxpalette.cpp

---------

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
Co-authored-by: Christian Semmler <mail@csemmler.com>
Co-authored-by: ktkaufman03 <ktkaufman@wpi.edu>
Co-authored-by: MattKC <34096995+itsmattkc@users.noreply.github.com>
2023-07-15 22:51:24 -07:00
MattKC
e16249b672
Define MxLong/MxULong (#71)
* define MxLong/MxULong

The "long" type has different sizes on different platforms, and this may cause issues.

* use DWORD to match RegQueryValueExA arg
2023-07-02 01:05:49 -07:00
Anonymous Maarten
302b3f66f0
Get Isle building on MinGW32 (#63)
* Add MxUnknown100dc6b0::~MxUnknown100dc6b0 stub

* Declare destructor of MxOmni and MxTransitionManager in class

* inline attribute must go first

* Stub LegoState::Vtable0x14 for Act3State

* MxStreamer::VTable0x14 is not an override

* Stub MxEntity::Destroy for LegoState::Destroy

* Stub MxUnknown100dc6e0 for MxSoundManager

* ::ClassName and ::IsA are const methods

* methods in the class body don't need a namespace

* MxSoundManager subclasses MxUnknown100dc6e0

* LegoInputManager subclasses MxPresenter

* NotificationId is an enum, and does not need __declspec(dllexport)

* Fix final #endif of legoomni.h and mxobjectfactory.h

* Add const alternative for LegoOmni::Create and MxVideoParam, only available for MinGW

* Alternative approach to MinGW compatibility

* MinGW on Linux is case sensitve

* Don't delete a member variable. C++ automatically destructs member variables

---------

Co-authored-by: MattKC <34096995+itsmattkc@users.noreply.github.com>
2023-07-01 23:53:54 -07:00
itsmattkc
4c9e138cbf implement all DLL exports (as TODOs)
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.
2023-06-30 11:34:39 -07:00
MishaProductions
88c18c76ed
lego1: match LegoOmni::GetInstance and deconstructor and add a few methods (#58)
* add GetInstance fix

* Implement a few methods

* Move get* helpers to their correct locations

* rename m_instance

* add TransitionManager
2023-06-29 10:02:47 -07:00
Cydra
07912eb05a
Class layout for LEGO1 classes (#43)
* Stubbed a bunch of classes and annotated them for later use. Heavily wip and more of pseudocode right now.

* Converted pseudocode into real code!

* Created a bunch more classes and added more information to exisiting ones
Did not error check, this was pushed just for reference

* More classes and implementation details. Still not checked for any errors

* Fixed code and decided on a way to handle virtual table stubs

* Some additional fixes

* More smaller fixes

* Added classes to project and made it compile

* Fixed function adresses that caused the python script to fail

* More classes and virtual function resolves. Builds and compares fine.

* Again more classes and virtual function resolves. Builds and compares fine.

* No clue, I guess forced update for line endings

* Finished up some work, compiles fine. All functions are STUB annotated to not pollute reccmp.py output.

* line ending change

* rename GetClassName/IsClass

Mirroring recent changes from master

* further conform to current master

* update project

* cleanup

* project only updates when you close msdev

---------

Co-authored-by: Cydra <cydra95@gmail.com>
Co-authored-by: itsmattkc <34096995+itsmattkc@users.noreply.github.com>
2023-06-29 01:10:08 -07:00
itsmattkc
dafe66191c mxomni: fixed minor inaccuracy 2023-06-19 10:56:53 -07:00
Christian Semmler
5c440b5878
lego1: implement more of LegoNavController (#16)
* implement more of LegoNavController

* merge

* use MX_FALSE

* file file perms

* added Timer(), GetTime to LegoNavController

* add a comment about SetControlMax

* remove colon

* add commented out dtor

* revert inheritance for now so we don't accidentally break the interface to ISLE.exe later

* add missing include

* update project files

* update project files

* fix main.cpp

* add offsets

* update project files

* fix line endings

* fix a bug thanks to ASM checker

* add addr for Timer()

* updated project file
2023-06-19 01:34:58 -07:00
itsmattkc
f8263a3ef8 implemented some parts of MxOmni and LegoOmni 2023-06-18 23:19:40 -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
Thomas May
a925aec046 lego1: implement MxTimer + dependencies 2023-06-14 01:22:42 +01:00
Christian Semmler
7ff3acebb3
remove execute bits on files 2023-06-12 18:05:43 +02:00
itsmattkc
279d626279 import all functions from lego1 exports
This declares a bunch of classes and functions for us, as well as fixes some declarations that were slightly incorrect (e.g. missing "virtual", etc)
2023-06-11 18:03:54 -07:00
itsmattkc
d4e2fb8d8a reorganized repo, implemented mxcore 2023-05-05 02:54:17 -07:00
Renamed from lib/mxomni.h (Browse further)