Commit Graph

40 Commits

Author SHA1 Message Date
Christian Semmler
e5822de1da Implement/match Bike (#1036) 2024-06-25 08:59:37 -07:00
Anonymous Maarten
e7fb67bb9f
Fix mingw build + copy d3drm from wine (#25)
* Fix engineConfig declaration crossing jump

This fixes the following error:
```
/src/isle-portable/LEGO1/omni/src/audio/mxsoundmanager.cpp: In member function 'virtual MxResult MxSoundManager::Create(MxU32, MxBool)':
/src/isle-portable/LEGO1/omni/src/audio/mxsoundmanager.cpp:119:1: error: jump to label 'done'
  119 | done:
      | ^~~~
/src/isle-portable/LEGO1/omni/src/audio/mxsoundmanager.cpp:78:22: note:   from here
   78 |                 goto done;
      |                      ^~~~
/src/isle-portable/LEGO1/omni/src/audio/mxsoundmanager.cpp:84:26: note:   crosses initialization of 'ma_engine_config engineConfig'
   84 |         ma_engine_config engineConfig = ma_engine_config_init();
      |                          ^~~~~~~~~~~~
```

* Fix 'invalid conversion from 'SDL_FunctionPointer' {aka 'void (*)()'} to 'void*'

* /SAFESEH:NO is a VC thing

* SDL3 is still instable

* Cannot forward declare and use enum

* Remove MusicManager from public LEGO1.DLL interface

* Copy d3d from wine git 6c5d17af07a318d754c0c21023b2d162a0d3725d

* Build d3drm-wine with 32-bit mingw

* cmake: move 3rd party targets to cmake script in 3rdparty directory

* cmake: bump minimum required CMake version to 3.25 to allow adding a subproject with SYSTEM automatically applied

An alternative would be to use SYSTEM in target_include_directories in the 3rd party cmake script.

* Add a minimal Findiniparser.cmake (not all distributions carry the upstream iniparser-config.cmake files)

* Add wine's d3drm headers

* cmake: merge ISLE_USE_DX5_LIBS into ISLE_USE_DX5

* cmake: Build all shared libraries in the binary output directory (to avoid PATH issues)

* ci: enable msys2 mingw32 build

* Disable clang-tidy on d3drm wine

* Thread functions must have SDLCALL call convention

* cmake: disable clang-tidy for miniaudio and libsmacker as well

* Hopefully fix c++ format and skip ncc naming violation

* clang-format violations keep up popping out of nowhere

* No need for lego/legoomni/include

* ncc: define SDLCALL as empty instead
2024-06-24 07:25:51 -07:00
Christian Semmler
07e65a2f4c
Update README.md 2024-06-16 15:30:16 +02:00
Christian Semmler
8a802bcf85
Replace DirectSound with miniaudio (#21)
* Add miniaudio

* WIP

* static const

* Fix missing looping

* Fix volume

* Implement 3D sound, WIP

* Remove unused WinMM code

* Update README.md

* Fixes

* Fix naming

* Fix naming

* disable ma threading

* Invert Z axis for OpenGL system

* Update comment

* Set rolloff

* Fix minimize/maximize suspension

* Rename function

* SDL3: changed macro name
2024-06-16 15:26:04 +02:00
Christian Semmler
419bc2a44e
Updates from isledecomp/isle (#23)
* Fix remaining vtordisp issues (#1016)

* Fix LegoRaceActor

* Fix LegoRaceMap

* Fix LegoCarRaceActor

* Fix LegoJetskiRaceActor

* Fix LegoJetski

* Fix LegoRaceCar

* Downgrade orig addr unique message to debug

* Implement/match Ambulance::HandleEndAction (#1018)

* Implement/match Ambulance::HandleClick (#1019)

* Implement/match Ambulance::HandleClick

* Remove junk

* Add Ambulance::FUN_10036e60

* Implement/match Ambulance::Tickle (#1021)

* Match LegoMeterPresenter::ParseExtra (#1022)

* Match LegoMeterPresenter::ParseExtra

* Add LegoMeterPresenter to factory

* Add call to parent

* Add missing TODO

* Implement/match Ambulance::ActivateSceneActions (#1023)

* Fix CaveEntity class (#1024)

* Fix CaveEntity class

* Rename function

* Implement/match JailEntity::HandleClick and CaveEntity::HandleClick (#1025)

* Implement/match JailEntity::HandleClick and CaveEntity::HandleClick

* Fix

* Add remaining classes, implement/match LegoObjectFactory (#1026)

* Add missing classes

* Match LegoObjectFactory

* Remove semicolon

* Add symbol

* Fix

* Implement/match Ambulance::VTable0x70 (#1027)

* Implement/match Ambulance::HandleButtonDown (#1028)

* Implement/match Ambulance::HandlePathStruct (#1029)

* Implement/match Ambulance::HandlePathStruct

* Add annotation

* Implement/match remaining Ambulance functions (#1030)

* Fix camera glitch (#1031)

* Implement LegoAnimScene::FUN_1009f490 (#1032)

* Implement LegoAnimScene::FUN_1009f490

* Update legoanim.cpp

* Update legoanim.cpp

* Update legoanim.cpp

* Bugfix for LegoMeterPresenter::DrawMeter (#1033)

* feat: Implement several ::Serialize functions (#1017)

* feat: Implement many ::Serialize functions

* address review comments, part 1 [skip ci]

* address review comments, part 2 [skip ci]

* review comments (final part)

* refactor: Remove Read/Write duplication

* fix merge conflict

* Match PizzeriaState::Serialize again

* Remove unused variable, add LegoVehicleBuildState::Serialize

* Implement AnimState::Serialize

* fix: Conform with naming scheme

* refactor: change names back

* refactor: int to MxS32

---------

Co-authored-by: jonschz <jonschz@users.noreply.github.com>

---------

Co-authored-by: MS <disinvite@users.noreply.github.com>
Co-authored-by: jonschz <17198703+jonschz@users.noreply.github.com>
Co-authored-by: jonschz <jonschz@users.noreply.github.com>
2024-06-16 15:15:03 +02:00
Christian Semmler
b945993ee3
Updates from isledecomp/isle (#22)
* Act2PoliceStation::Notify (#1002)

* Act2PoliceStation::Notify

* Match code

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>

* Match Ambulance::StopScriptOnAmbulance and StopScriptOnEntity (#1003)

* Match Ambulance::StopScriptOnAmbulance and StopScriptOnEntity

* Rename for consistency

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>

* TowTrack and LegoAct2 destructors (#1005)

* Add some missing dtors

* Add missing 'override'

* Rename Start/StopTimer to Pause/Resume (#1007)

* Rename Start/StopTimer to Pause/Resume

* Fix

* Begin LegoRace class (#1014)

* Begin LegoRace

* Match functions

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>

* Implement/match LegoFlcTexturePresenter (#1015)

* Implement/match LegoFlcTexturePresenter

* Move files

* Fix

* Fix

---------

Co-authored-by: Joshua Peisach <itzswirlz2020@outlook.com>
Co-authored-by: MS <disinvite@users.noreply.github.com>
Co-authored-by: Mikhail Thompson <mishakeys20@gmail.com>
2024-06-10 17:57:20 +02:00
Christian Semmler
f7dca7a4fe
Rename InitPresenters to Create, remove this keyword (#1000) (#20) 2024-06-07 22:17:20 +02:00
Christian Semmler
e0af725fb6
Updates from isledecomp/isle (#19)
* Refactor JukeBox, add enum for music (#988)

* Refactor JukeBox, add enum for music

* add BETA annotation

* Fix BETA annotation

* Fix BETA annotation

* Fix

* Consolidate state and building entity classes (#989)

* Match LegoCacheSoundManager::FindSoundByKey (#991)

* Match LegoCacheSoundManager::FindSoundByKey

* Remove space

* Implement/match LegoActor::Mute (#992)

* Add more annotations to ISLE (#990)

* Minor improvements in ISLE.EXE

* Add more annotations

* Fix

* Comment out

* Fix lint

* Add enum for actor IDs (#993)

* Implement/match LegoEntity::ClickAnimation (#994)

* Implement/match LegoEntity::VTable0x38

* Update names

* Implement/match LegoEntity::SwitchSound / SwitchMove / SwitchColor / SwitchMood (#995)

* Implement/match LegoEntity::SwitchSound

* Name

* Name

* Implement/match LegoEntity::SwitchMove

* Mood

* Implement/match LegoCharacterManager::SwitchColor (#996)

* Implement/match IslePathActor::Exit (#997)

* Implement/match IslePathActor::Exit

* Name

* Name

* Partially fix vector interface

* Revert "Partially fix vector interface"

This reverts commit 6e7a1e2b08fd82012b28be3054eeff65428eb4d1.

* Revert "Revert "Partially fix vector interface""

This reverts commit e3860e3c9fa1f8937b702d6c81d6e3bb4dadecc6.

* Fix

* Remove some COMPAT_MODE

* Implement/match Ambulance::Notify (#998)

* Update isleapp.cpp

* Streamline MxVideoParamFlags (#999)

* Streamline MxVideoParamFlags

* Remove this-> from MxOmniCreateFlags

---------

Co-authored-by: MS <disinvite@users.noreply.github.com>
2024-06-07 21:32:27 +02:00
Christian Semmler
c038d8d46e
Updates from isledecomp/isle (#18)
* Implement/match Lego3DSound::Create (#981)

* Implement/match Lego3DSound::Create

* Add space

* Naming

* Changes

* Name/rename functions in LegoCharacterManager (#982)

* Name/rename functions in LegoCharacterManager

* Name flag

* Implement/match Lego3DSound::UpdatePosition (#983)

* Implement/match Lego3DSound::SetDistance and Reset (#984)

* Implement/match LegoSoundManager::UpdateListener (#985)

* Implement/match LegoCacheSound::Create and LegoLoadCacheSoundPresenter::StreamingTickle (#986)

* Implement/match LegoCacheSound::Create

* Naming

* Fix naming

* Fix parens

* Implement/match LegoCacheSound::Play and Lego3DSound::FUN_10011a60 (#987)

* Implement/match LegoCacheSound::Play and Lego3DSound::FUN_10011a60

* Update names

* Update
2024-06-02 17:26:15 +02:00
Christian Semmler
3502c3f912
Fix cursors (#17) 2024-06-02 17:20:41 +02:00
Christian Semmler
20cfd57e35
Add SDL cursors (#16)
* Add SDL cursors

* Fix naming
2024-06-01 16:54:17 +02:00
Christian Semmler
9409a5641f
Define cursor enum and custom cursor window message (#980) (#15)
* Define cursor enum and custom cursor window message

* Fix param name

* Remove unused header
2024-06-01 16:10:17 +02:00
Christian Semmler
ea0ca98292 Use SDL macros for return values 2024-05-31 23:20:14 -04:00
Christian Semmler
a3f408d6be
Remove dependency on dinput, use SDL keyboard state for navigation (#14)
* WIP

* Use SDL kb state for navigational keys

* Remove linking against dinput
2024-06-01 05:13:27 +02:00
Christian Semmler
1d136ab2bb
Improve naming, use virtual key constants (#979) (#13) 2024-06-01 04:48:41 +02:00
Christian Semmler
0b6c220b4f Fix missing return 2024-05-31 18:05:05 -04:00
Christian Semmler
fd5ca4c4dc
Use SDL window instead of Win32 window (#12)
* Use SDL window

* Fixes

* Update README

* Remove unused decl

* Consistent use

* Add comment about fullscreen
2024-05-31 23:56:00 +02:00
Christian Semmler
bb6228ad34
Updates from isledecomp/isle (#11)
* Rename LegoEdge::GetOpposingPoint to LegoEdge::CWVertex (#977)

* Fix Radio::HandleControl COMPAT_MODE branch (#978)

---------

Co-authored-by: DmitriLeon2000 <dmitryaveron2000@gmail.com>
2024-05-31 23:20:32 +02:00
Christian Semmler
75e767200b
Replace Windows registry with .ini file (#10)
* Replace Windows registry with .ini file

* Update README.md

* Update CMakeLists.txt

* comment

* set CMake policy

* Try this

* Try this

* Adjust comments
2024-05-31 20:04:00 +02:00
Christian Semmler
e38d877131
Add SDL callbacks to isleapp (#9)
* Add SDL callbacks to isleapp

* Update README.md

* Update README.md
2024-05-31 16:45:51 +02:00
Christian Semmler
9c83acb3b1
Replace Windows threads with SDL threads (#8)
* Replace Windows threads with SDL threads

* Wait for thread in dtor
2024-05-30 22:56:44 +02:00
Christian Semmler
c24221a674
Replace Windows CriticalSection with SDL Mutex (#7)
* Replace Windows CriticalSection with SDL Mutex

* Update README.md
2024-05-30 22:38:42 +02:00
Christian Semmler
1365bf0e2b
Use USHRT_MAX instead of MAXWORD (#975) (#6) 2024-05-30 22:04:55 +02:00
Christian Semmler
7d36abda90
Updates from isledecomp/isle (#5)
* Style refactor omni/system components (#974)

* Style refactor omni/system components

* Fix

* Fix

* Update
2024-05-30 21:23:21 +02:00
Christian Semmler
47997da1e9
Add SDL3 and replace Windows semaphores (#4)
* Add SDL3 and replace Windows semaphores

* Try this

* Change for now
2024-05-30 20:41:20 +02:00
Christian Semmler
6ddd86dcbe
Updates from isledecomp/isle (#3)
* Implement/match LegoPathActor::ParseAction (#946)

* Implement/match LegoPathActor::ParseAction

* Fix naming

* Space

* Implement/match Isle::UpdateGlobe (#947)

* Implement/match Isle::UpdateGlobe

* Change function access

* Implement/match Isle::CreateState and related (#948)

* Implement/match actor Create functions (#949)

* Implement/match Isle::Escape (#950)

* Implement/match Isle::FUN_10033350 (#951)

* Implement/match Isle::HandleType19Notification (#952)

* Implement/match Isle::HandleType19Notification

* Fix

* Implement/match LegoAnimationManager::FUN_10063b90 (#953)

* Implement/match LegoAnimationManager::FUN_100648f0 (#954)

* Implement LegoROI::FUN_100a9410 (#955)

* WIP

* WIP

* Remove space

* Fix

* Implement/match LegoExtraActor::VTable0x6c (#956)

* Match LegoUnknown::FUN_1009a1e0 (#957)

* Fix extra actor collisions (#958)

* Implement/match IslePathActor::FUN_1001b660 (#960)

* Refactor MxBitmap (again) (#961)

* Remove this

* Starting list of beta addrs

* Static for height-specific abs, fix StrechBits

* MxBitmap refactor

* Implement/match LegoPathBoundary::FUN_100586e0 and FUN_10057fe0 (#962)

* Implement/match LegoAnimPresenter::FUN_1006b140 (#963)

* Implement LegoMeterPresenter::DrawMeter (#964)

* Implement LegoMeterPresenter::DrawMeter

* New MxRect16 header, offsets and size annotations

* Missing mxtypes include

* Implement/match LegoAnimationManager::FUN_10063270 (#965)

* Implement/match LegoAnimMMPresenter::FUN_1004b840 (#966)

* Implement/match LegoAnimationManager::FUN_10062e20 (#967)

* Beta match MxPalette (#968)

* Beta match MxPalette

* Modern compiler fix

* Implement/match LegoCameraController::FUN_10012290 and FUN_10012320 (#969)

* Implement/match LegoControlManager::FUN_100293c0 (#970)

* Implement/match Pizzeria::HandleClick (#971)

* Implement/match Lego3DWavePresenter::StartingTickle (#972)

* Implement/match Lego3DWavePresenter::StartingTickle

* Fix annotation

* Add StreamingTickle

* Rename

* Add static HandlerClassName function (#973)

* Add static HandlerClassName function

* Use method in PresenterNameDispatch

---------

Co-authored-by: disinvite@users.noreply.github.com <disinvite@users.noreply.github.com>
2024-05-30 19:20:36 +02:00
Christian Semmler
bc4d74c7b1
Add back some stuff from decomp (#2)
* Add ncc script

* add requirements.txt

* Add other builds

* Add with submodules

* Comment out for now

* Add
2024-05-23 20:09:57 +02:00
Christian Semmler
8036f53ba4
Update CONTRIBUTING.md 2024-05-23 19:33:28 +02:00
Christian Semmler
92fe302ffe
Update README.md 2024-05-23 19:15:16 +02:00
Christian Semmler
8c957af14a Update TODO comments 2024-05-23 12:28:03 -04:00
Christian Semmler
d62054db2e
Updates from isledecomp/isle (#1)
* Implement/match LegoAnimationManager::FUN_10064b50 (#926)

* Implement/match LegoAnimationManager::FUN_10063d10 (#927)

* Implement/match LegoAnimationManager::FUN_10064380 (#928)

* Implement/match LegoAnimationManager::FUN_10064380

* Fix naming

* Revert

* Implement/matche LegoAnimationManager::FUN_10064740 and FUN_10064670 (#929)

* Implement/match FUN_1003ef00 and related (#931)

* Implement/match LegoAnimationManager::FUN_10064120 (#932)

* Implement/match LegoAnimationManager::FUN_10064120

* Fix naming

* Fix parentheses

* Implement LegoAnimationManager::FUN_10064010 (#933)

* Implement/match ViewManager::FUN_100a6150 (#934)

* Implement/match PlayCamAnim and CameraTriggerFire (#935)

* Implement/match PlayCamAnim and CameraTriggerFire

* Fix type

* Name var

* Implement/match LegoAnimationManager::FUN_10063fb0 (#936)

* basic name improvements (#930)

* basic name improvements

* clang-format

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>

* Implement/match LegoPathBoundary::Intersect (#937)

* Implement LegoPathActor::VTable0x68 (#938)

* Implement LegoPathActor::VTable0x68

* Fix naming

* Implement/match LegoPathBoundary::FUN_100575b0 (#939)

* Implement LegoUnknown::FUN_1009a1e0 (#940)

* Implement/match LegoPathController::FUN_1004a240 (#941)

* Implement LegoPathActor::VTable0x9c (#942)

* Implement LegoPathActor::VTable0x9c

* Add annotation

* Implement/match LegoPathActor::SwitchBoundary (#943)

* Implement/match LegoPathActor::SwitchBoundary

* Rename var

* Implement/match LegoPathStruct (#944)

* Implement/match LegoPathStruct

* Rename some nums

* Consistent naming

* Naming

* relax regex

* Name some functions

* Improve naming

* Rename

* Implement/match LegoPathActor::VTable0xa4 and VTable0xa8 (#945)

* Implement/match LegoPathActor::VTable0xa4

* Implement/match LegoPathActor::VTable0xa8

* Name enum constants

---------

Co-authored-by: Cameron <25990062+crtdll@users.noreply.github.com>
2024-05-23 18:09:49 +02:00
Christian Semmler
f9de91e686 Remove SmartHeap 2024-05-16 22:36:17 -04:00
Christian Semmler
ee944867bb Remove naming script (for now) 2024-05-16 22:32:24 -04:00
Christian Semmler
fb39449845 Check out submodules 2024-05-16 22:27:52 -04:00
Christian Semmler
0c35d21b99 Update README 2024-05-16 22:24:17 -04:00
Christian Semmler
546ebec6a0 Adjust GH actions 2024-05-16 22:22:52 -04:00
Christian Semmler
ad8a8ece9f Add rudimentary README 2024-05-16 22:20:55 -04:00
Christian Semmler
1284d3da9e Remove decomp tools 2024-05-16 22:20:47 -04:00
Christian Semmler
2328853d60 Add libsmacker to replace smack.lib 2024-05-16 22:11:33 -04:00
Christian Semmler
681c69c4ac initial commit 2024-05-16 19:42:54 -04:00