mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-20 14:51:15 +00:00
merge master
This commit is contained in:
commit
6e15e9f524
7
.editorconfig
Normal file
7
.editorconfig
Normal file
@ -0,0 +1,7 @@
|
||||
root = true
|
||||
[*.{cpp,h,py,txt,editorconfig}]
|
||||
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
74
.github/workflows/build.yml
vendored
74
.github/workflows/build.yml
vendored
@ -1,10 +1,6 @@
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master" ]
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@ -61,6 +57,27 @@ jobs:
|
||||
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -G "NMake Makefiles"
|
||||
cmake --build .
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: Win32
|
||||
path: |
|
||||
build/ISLE.EXE
|
||||
build/ISLE.PDB
|
||||
build/LEGO1.DLL
|
||||
build/LEGO1.PDB
|
||||
|
||||
compare:
|
||||
needs: build
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
|
||||
- uses: actions/download-artifact@master
|
||||
with:
|
||||
name: Win32
|
||||
path: build
|
||||
|
||||
- name: Restore cached original binaries
|
||||
id: cache-original-binaries
|
||||
uses: actions/cache/restore@v3
|
||||
@ -97,15 +114,12 @@ jobs:
|
||||
|
||||
diff -u ISLEPROGRESS-OLD.TXT ISLEPROGRESS.TXT || true
|
||||
diff -u LEGO1PROGRESS-OLD.TXT LEGO1PROGRESS.TXT || true
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: Win32
|
||||
path: |
|
||||
build/ISLE.EXE
|
||||
build/LEGO1.DLL
|
||||
|
||||
- name: Test Exports
|
||||
shell: bash
|
||||
run: |
|
||||
python3 tools/verexp/verexp.py legobin/LEGO1.DLL build/LEGO1.DLL
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
@ -113,23 +127,35 @@ jobs:
|
||||
path: |
|
||||
ISLEPROGRESS.*
|
||||
LEGO1PROGRESS.*
|
||||
|
||||
|
||||
upload:
|
||||
needs: [build, compare]
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
repository: 'probonopd/uploadtool'
|
||||
|
||||
- uses: actions/download-artifact@master
|
||||
with:
|
||||
name: Win32
|
||||
path: build
|
||||
|
||||
- uses: actions/download-artifact@master
|
||||
with:
|
||||
name: Accuracy Report
|
||||
|
||||
- name: Upload Continuous Release
|
||||
shell: bash
|
||||
if: github.event_name == 'push'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
UPLOAD_KEY: ${{ secrets.UPLOAD_KEY }}
|
||||
run: |
|
||||
# Convert SVGs to PNG
|
||||
INKSCAPE_DIR=inkscape-1.2.2_2022-12-09_732a01da63-x64
|
||||
curl -fLOSs https://inkscape.org/gallery/item/37364/$INKSCAPE_DIR.7z
|
||||
7z x $INKSCAPE_DIR.7z
|
||||
$INKSCAPE_DIR/bin/inkscape -w 512 ISLEPROGRESS.SVG -o ISLEPROGRESS.PNG
|
||||
$INKSCAPE_DIR/bin/inkscape -w 512 LEGO1PROGRESS.SVG -o LEGO1PROGRESS.PNG
|
||||
|
||||
curl -fLOSs https://raw.githubusercontent.com/probonopd/uploadtool/master/upload.sh
|
||||
./upload.sh \
|
||||
build/ISLE.EXE \
|
||||
build/LEGO1.DLL \
|
||||
ISLEPROGRESS.* \
|
||||
LEGO1PROGRESS.*
|
||||
|
||||
curl -X POST -F key=$UPLOAD_KEY -F 'file=@ISLEPROGRESS.SVG' https://legoisland.org/progress/
|
||||
curl -X POST -F key=$UPLOAD_KEY -F 'file=@LEGO1PROGRESS.SVG' https://legoisland.org/progress/
|
||||
|
||||
345
CMakeLists.txt
345
CMakeLists.txt
@ -3,7 +3,183 @@ cmake_minimum_required(VERSION 2.8...3.5 FATAL_ERROR)
|
||||
project(isle CXX)
|
||||
|
||||
option(ISLE_BUILD_APP "Build ISLE.EXE application" ON)
|
||||
option(ISLE_BUILD_LIB "Build LEGO1.DLL library" ON)
|
||||
|
||||
add_library(lego1 SHARED
|
||||
LEGO1/act1state.cpp
|
||||
LEGO1/act2brick.cpp
|
||||
LEGO1/act2policestation.cpp
|
||||
LEGO1/act3.cpp
|
||||
LEGO1/act3shark.cpp
|
||||
LEGO1/act3state.cpp
|
||||
LEGO1/ambulance.cpp
|
||||
LEGO1/ambulancemissionstate.cpp
|
||||
LEGO1/animstate.cpp
|
||||
LEGO1/beachhouseentity.cpp
|
||||
LEGO1/bike.cpp
|
||||
LEGO1/buildingentity.cpp
|
||||
LEGO1/bumpbouy.cpp
|
||||
LEGO1/carrace.cpp
|
||||
LEGO1/dllmain.cpp
|
||||
LEGO1/dunebuggy.cpp
|
||||
LEGO1/elevatorbottom.cpp
|
||||
LEGO1/gasstation.cpp
|
||||
LEGO1/gasstationentity.cpp
|
||||
LEGO1/gasstationstate.cpp
|
||||
LEGO1/helicopter.cpp
|
||||
LEGO1/helicopterstate.cpp
|
||||
LEGO1/historybook.cpp
|
||||
LEGO1/hospital.cpp
|
||||
LEGO1/hospitalentity.cpp
|
||||
LEGO1/hospitalstate.cpp
|
||||
LEGO1/infocenter.cpp
|
||||
LEGO1/infocenterdoor.cpp
|
||||
LEGO1/infocenterentity.cpp
|
||||
LEGO1/infocenterstate.cpp
|
||||
LEGO1/isle.cpp
|
||||
LEGO1/isleactor.cpp
|
||||
LEGO1/islepathactor.cpp
|
||||
LEGO1/jetski.cpp
|
||||
LEGO1/jetskirace.cpp
|
||||
LEGO1/jukebox.cpp
|
||||
LEGO1/jukeboxentity.cpp
|
||||
LEGO1/jukeboxstate.cpp
|
||||
LEGO1/legoact2state.cpp
|
||||
LEGO1/legoactioncontrolpresenter.cpp
|
||||
LEGO1/legoanimactor.cpp
|
||||
LEGO1/legoanimationmanager.cpp
|
||||
LEGO1/legoanimmmpresenter.cpp
|
||||
LEGO1/legoanimpresenter.cpp
|
||||
LEGO1/legobackgroundcolor.cpp
|
||||
LEGO1/legobackgroundcolor.cpp
|
||||
LEGO1/legobuildingmanager.cpp
|
||||
LEGO1/legocachesound.cpp
|
||||
LEGO1/legocameracontroller.cpp
|
||||
LEGO1/legocarbuild.cpp
|
||||
LEGO1/legocarbuildanimpresenter.cpp
|
||||
LEGO1/legocontrolmanager.cpp
|
||||
LEGO1/legoentity.cpp
|
||||
LEGO1/legoentitypresenter.cpp
|
||||
LEGO1/legoflctexturepresenter.cpp
|
||||
LEGO1/legogamestate.cpp
|
||||
LEGO1/legohideanimpresenter.cpp
|
||||
LEGO1/legoinputmanager.cpp
|
||||
LEGO1/legojetski.cpp
|
||||
LEGO1/legoloadcachesoundpresenter.cpp
|
||||
LEGO1/legolocomotionanimpresenter.cpp
|
||||
LEGO1/legomodelpresenter.cpp
|
||||
LEGO1/legonavcontroller.cpp
|
||||
LEGO1/legoomni.cpp
|
||||
LEGO1/legopalettepresenter.cpp
|
||||
LEGO1/legopartpresenter.cpp
|
||||
LEGO1/legopathactor.cpp
|
||||
LEGO1/legopathcontroller.cpp
|
||||
LEGO1/legopathpresenter.cpp
|
||||
LEGO1/legophonemepresenter.cpp
|
||||
LEGO1/legoplantmanager.cpp
|
||||
LEGO1/legorace.cpp
|
||||
LEGO1/legoroi.cpp
|
||||
LEGO1/legosoundmanager.cpp
|
||||
LEGO1/legostate.cpp
|
||||
LEGO1/legotexturepresenter.cpp
|
||||
LEGO1/legoutil.cpp
|
||||
LEGO1/legovideomanager.cpp
|
||||
LEGO1/legoworld.cpp
|
||||
LEGO1/legoworldpresenter.cpp
|
||||
LEGO1/motorcycle.cpp
|
||||
LEGO1/mxatomid.cpp
|
||||
LEGO1/mxaudiopresenter.cpp
|
||||
LEGO1/mxautolocker.cpp
|
||||
LEGO1/mxbackgroundaudiomanager.cpp
|
||||
LEGO1/mxbitmap.cpp
|
||||
LEGO1/mxcompositemediapresenter.cpp
|
||||
LEGO1/mxcompositepresenter.cpp
|
||||
LEGO1/mxcontrolpresenter.cpp
|
||||
LEGO1/mxcore.cpp
|
||||
LEGO1/mxcriticalsection.cpp
|
||||
LEGO1/mxdirectdraw.cpp
|
||||
LEGO1/mxdiskstreamcontroller.cpp
|
||||
LEGO1/mxdiskstreamprovider.cpp
|
||||
LEGO1/mxdsaction.cpp
|
||||
LEGO1/mxdsanim.cpp
|
||||
LEGO1/mxdschunk.cpp
|
||||
LEGO1/mxdsevent.cpp
|
||||
LEGO1/mxdsfile.cpp
|
||||
LEGO1/mxdsmediaaction.cpp
|
||||
LEGO1/mxdsmultiaction.cpp
|
||||
LEGO1/mxdsobject.cpp
|
||||
LEGO1/mxdsobjectaction.cpp
|
||||
LEGO1/mxdsparallelaction.cpp
|
||||
LEGO1/mxdsselectaction.cpp
|
||||
LEGO1/mxdsserialaction.cpp
|
||||
LEGO1/mxdssound.cpp
|
||||
LEGO1/mxdssource.cpp
|
||||
LEGO1/mxdsstill.cpp
|
||||
LEGO1/mxdssubscriber.cpp
|
||||
LEGO1/mxentity.cpp
|
||||
LEGO1/mxeventmanager.cpp
|
||||
LEGO1/mxeventpresenter.cpp
|
||||
LEGO1/mxflcpresenter.cpp
|
||||
LEGO1/mxioinfo.cpp
|
||||
LEGO1/mxloopingflcpresenter.cpp
|
||||
LEGO1/mxloopingmidipresenter.cpp
|
||||
LEGO1/mxloopingsmkpresenter.cpp
|
||||
LEGO1/mxmediapresenter.cpp
|
||||
LEGO1/mxmidipresenter.cpp
|
||||
LEGO1/mxmusicpresenter.cpp
|
||||
LEGO1/mxnotificationmanager.cpp
|
||||
LEGO1/mxobjectfactory.cpp
|
||||
LEGO1/mxomni.cpp
|
||||
LEGO1/mxomnicreateflags.cpp
|
||||
LEGO1/mxomnicreateparam.cpp
|
||||
LEGO1/mxomnicreateparambase.cpp
|
||||
LEGO1/mxpalette.cpp
|
||||
LEGO1/mxpresenter.cpp
|
||||
LEGO1/mxscheduler.cpp
|
||||
LEGO1/mxsmkpresenter.cpp
|
||||
LEGO1/mxsoundmanager.cpp
|
||||
LEGO1/mxsoundpresenter.cpp
|
||||
LEGO1/mxstillpresenter.cpp
|
||||
LEGO1/mxstreamer.cpp
|
||||
LEGO1/mxstring.cpp
|
||||
LEGO1/mxstringvariable.cpp
|
||||
LEGO1/mxtimer.cpp
|
||||
LEGO1/mxtransitionmanager.cpp
|
||||
LEGO1/mxunknown100dc6b0.cpp
|
||||
LEGO1/mxunknown100dc6e0.cpp
|
||||
LEGO1/mxvariabletable.cpp
|
||||
LEGO1/mxvideomanager.cpp
|
||||
LEGO1/mxvideoparam.cpp
|
||||
LEGO1/mxvideoparamflags.cpp
|
||||
LEGO1/mxvideopresenter.cpp
|
||||
LEGO1/mxwavepresenter.cpp
|
||||
LEGO1/pizza.cpp
|
||||
LEGO1/pizzamissionstate.cpp
|
||||
LEGO1/pizzeria.cpp
|
||||
LEGO1/pizzeriastate.cpp
|
||||
LEGO1/police.cpp
|
||||
LEGO1/policeentity.cpp
|
||||
LEGO1/policestate.cpp
|
||||
LEGO1/racecar.cpp
|
||||
LEGO1/racestandsentity.cpp
|
||||
LEGO1/racestate.cpp
|
||||
LEGO1/radio.cpp
|
||||
LEGO1/radiostate.cpp
|
||||
LEGO1/realtimeview.cpp
|
||||
LEGO1/registrationbook.cpp
|
||||
LEGO1/score.cpp
|
||||
LEGO1/scorestate.cpp
|
||||
LEGO1/skateboard.cpp
|
||||
LEGO1/towtrack.cpp
|
||||
LEGO1/towtrackmissionstate.cpp
|
||||
LEGO1/viewmanager.cpp
|
||||
)
|
||||
|
||||
# Link libraries
|
||||
target_link_libraries(lego1 PRIVATE ddraw dsound winmm)
|
||||
|
||||
# Make sure filenames are ALL CAPS
|
||||
set_property(TARGET lego1 PROPERTY OUTPUT_NAME LEGO1)
|
||||
set_property(TARGET lego1 PROPERTY SUFFIX ".DLL")
|
||||
|
||||
if (ISLE_BUILD_APP)
|
||||
add_executable(isle WIN32
|
||||
@ -15,177 +191,14 @@ if (ISLE_BUILD_APP)
|
||||
# Include LEGO1 headers in ISLE
|
||||
target_include_directories(isle PRIVATE "${CMAKE_SOURCE_DIR}/LEGO1")
|
||||
|
||||
# Link DSOUND, WINMM, and our fake LEGO1 lib (TODO: replace with real once all exports are implemented)
|
||||
target_link_libraries(isle PRIVATE dsound winmm "${CMAKE_SOURCE_DIR}/ISLE/ext/lego1.lib")
|
||||
# Link DSOUND, WINMM, and LEGO1
|
||||
target_link_libraries(isle PRIVATE dsound winmm lego1)
|
||||
|
||||
# Make sure filenames are ALL CAPS
|
||||
set_property(TARGET isle PROPERTY OUTPUT_NAME ISLE)
|
||||
set_property(TARGET isle PROPERTY SUFFIX ".EXE")
|
||||
endif()
|
||||
|
||||
if (ISLE_BUILD_LIB)
|
||||
add_library(lego1 SHARED
|
||||
LEGO1/act1state.cpp
|
||||
LEGO1/act2brick.cpp
|
||||
LEGO1/act2policestation.cpp
|
||||
LEGO1/act3.cpp
|
||||
LEGO1/act3shark.cpp
|
||||
LEGO1/act3state.cpp
|
||||
LEGO1/ambulance.cpp
|
||||
LEGO1/ambulancemissionstate.cpp
|
||||
LEGO1/animstate.cpp
|
||||
LEGO1/beachhouseentity.cpp
|
||||
LEGO1/bike.cpp
|
||||
LEGO1/buildingentity.cpp
|
||||
LEGO1/bumpbouy.cpp
|
||||
LEGO1/carrace.cpp
|
||||
LEGO1/dllmain.cpp
|
||||
LEGO1/dunebuggy.cpp
|
||||
LEGO1/elevatorbottom.cpp
|
||||
LEGO1/gasstation.cpp
|
||||
LEGO1/gasstationentity.cpp
|
||||
LEGO1/gasstationstate.cpp
|
||||
LEGO1/helicopter.cpp
|
||||
LEGO1/helicopterstate.cpp
|
||||
LEGO1/historybook.cpp
|
||||
LEGO1/hospital.cpp
|
||||
LEGO1/hospitalentity.cpp
|
||||
LEGO1/hospitalstate.cpp
|
||||
LEGO1/infocenter.cpp
|
||||
LEGO1/infocenterdoor.cpp
|
||||
LEGO1/infocenterentity.cpp
|
||||
LEGO1/infocenterstate.cpp
|
||||
LEGO1/isle.cpp
|
||||
LEGO1/isleactor.cpp
|
||||
LEGO1/islepathactor.cpp
|
||||
LEGO1/jetski.cpp
|
||||
LEGO1/jetskirace.cpp
|
||||
LEGO1/jukebox.cpp
|
||||
LEGO1/jukeboxentity.cpp
|
||||
LEGO1/jukeboxstate.cpp
|
||||
LEGO1/legoact2state.cpp
|
||||
LEGO1/legoactioncontrolpresenter.cpp
|
||||
LEGO1/legoanimactor.cpp
|
||||
LEGO1/legoanimationmanager.cpp
|
||||
LEGO1/legoanimmmpresenter.cpp
|
||||
LEGO1/legoanimpresenter.cpp
|
||||
LEGO1/legobuildingmanager.cpp
|
||||
LEGO1/legocachesound.cpp
|
||||
LEGO1/legocameracontroller.cpp
|
||||
LEGO1/legocarbuild.cpp
|
||||
LEGO1/legocarbuildanimpresenter.cpp
|
||||
LEGO1/legocontrolmanager.cpp
|
||||
LEGO1/legoentity.cpp
|
||||
LEGO1/legoentitypresenter.cpp
|
||||
LEGO1/legoflctexturepresenter.cpp
|
||||
LEGO1/legohideanimpresenter.cpp
|
||||
LEGO1/legoinputmanager.cpp
|
||||
LEGO1/legojetski.cpp
|
||||
LEGO1/legoloadcachesoundpresenter.cpp
|
||||
LEGO1/legolocomotionanimpresenter.cpp
|
||||
LEGO1/legonavcontroller.cpp
|
||||
LEGO1/legoomni.cpp
|
||||
LEGO1/legopalettepresenter.cpp
|
||||
LEGO1/legopathactor.cpp
|
||||
LEGO1/legopathcontroller.cpp
|
||||
LEGO1/legopathpresenter.cpp
|
||||
LEGO1/legophonemepresenter.cpp
|
||||
LEGO1/legoplantmanager.cpp
|
||||
LEGO1/legorace.cpp
|
||||
LEGO1/legosoundmanager.cpp
|
||||
LEGO1/legostate.cpp
|
||||
LEGO1/legotexturepresenter.cpp
|
||||
LEGO1/legovideomanager.cpp
|
||||
LEGO1/legoworld.cpp
|
||||
LEGO1/legoworldpresenter.cpp
|
||||
LEGO1/motorcycle.cpp
|
||||
LEGO1/mxatomid.cpp
|
||||
LEGO1/mxaudiopresenter.cpp
|
||||
LEGO1/mxautolocker.cpp
|
||||
LEGO1/mxbackgroundaudiomanager.cpp
|
||||
LEGO1/mxcompositemediapresenter.cpp
|
||||
LEGO1/mxcompositepresenter.cpp
|
||||
LEGO1/mxcontrolpresenter.cpp
|
||||
LEGO1/mxcore.cpp
|
||||
LEGO1/mxcriticalsection.cpp
|
||||
LEGO1/mxdirect3d.cpp
|
||||
LEGO1/mxdirectdraw.cpp
|
||||
LEGO1/mxdiskstreamcontroller.cpp
|
||||
LEGO1/mxdiskstreamprovider.cpp
|
||||
LEGO1/mxdsaction.cpp
|
||||
LEGO1/mxdsanim.cpp
|
||||
LEGO1/mxdschunk.cpp
|
||||
LEGO1/mxdsevent.cpp
|
||||
LEGO1/mxdsfile.cpp
|
||||
LEGO1/mxdsmediaaction.cpp
|
||||
LEGO1/mxdsmultiaction.cpp
|
||||
LEGO1/mxdsobject.cpp
|
||||
LEGO1/mxdsobjectaction.cpp
|
||||
LEGO1/mxdsparallelaction.cpp
|
||||
LEGO1/mxdsselectaction.cpp
|
||||
LEGO1/mxdsserialaction.cpp
|
||||
LEGO1/mxdssound.cpp
|
||||
LEGO1/mxdssource.cpp
|
||||
LEGO1/mxdsstill.cpp
|
||||
LEGO1/mxdssubscriber.cpp
|
||||
LEGO1/mxentity.cpp
|
||||
LEGO1/mxeventmanager.cpp
|
||||
LEGO1/mxeventpresenter.cpp
|
||||
LEGO1/mxflcpresenter.cpp
|
||||
LEGO1/mxioinfo.cpp
|
||||
LEGO1/mxloopingflcpresenter.cpp
|
||||
LEGO1/mxloopingsmkpresenter.cpp
|
||||
LEGO1/mxmediapresenter.cpp
|
||||
LEGO1/mxmusicpresenter.cpp
|
||||
LEGO1/mxnotificationmanager.cpp
|
||||
LEGO1/mxomni.cpp
|
||||
LEGO1/mxomnicreateflags.cpp
|
||||
LEGO1/mxomnicreateparam.cpp
|
||||
LEGO1/mxomnicreateparambase.cpp
|
||||
LEGO1/mxpalette.cpp
|
||||
LEGO1/mxpresenter.cpp
|
||||
LEGO1/mxsmkpresenter.cpp
|
||||
LEGO1/mxsoundmanager.cpp
|
||||
LEGO1/mxsoundpresenter.cpp
|
||||
LEGO1/mxstillpresenter.cpp
|
||||
LEGO1/mxstreamer.cpp
|
||||
LEGO1/mxstring.cpp
|
||||
LEGO1/mxtimer.cpp
|
||||
LEGO1/mxtransitionmanager.cpp
|
||||
LEGO1/mxunknown100dc6b0.cpp
|
||||
LEGO1/mxvideomanager.cpp
|
||||
LEGO1/mxvideoparam.cpp
|
||||
LEGO1/mxvideoparamflags.cpp
|
||||
LEGO1/mxvideopresenter.cpp
|
||||
LEGO1/mxwavepresenter.cpp
|
||||
LEGO1/pizza.cpp
|
||||
LEGO1/pizzamissionstate.cpp
|
||||
LEGO1/pizzeria.cpp
|
||||
LEGO1/pizzeriastate.cpp
|
||||
LEGO1/police.cpp
|
||||
LEGO1/policeentity.cpp
|
||||
LEGO1/policestate.cpp
|
||||
LEGO1/racecar.cpp
|
||||
LEGO1/racestandsentity.cpp
|
||||
LEGO1/racestate.cpp
|
||||
LEGO1/radio.cpp
|
||||
LEGO1/radiostate.cpp
|
||||
LEGO1/registrationbook.cpp
|
||||
LEGO1/score.cpp
|
||||
LEGO1/scorestate.cpp
|
||||
LEGO1/skateboard.cpp
|
||||
LEGO1/towtrack.cpp
|
||||
LEGO1/towtrackmissionstate.cpp
|
||||
)
|
||||
|
||||
# Link libraries
|
||||
target_link_libraries(lego1 PRIVATE ddraw dsound winmm)
|
||||
|
||||
# Make sure filenames are ALL CAPS
|
||||
set_property(TARGET lego1 PROPERTY OUTPUT_NAME LEGO1)
|
||||
set_property(TARGET lego1 PROPERTY SUFFIX ".DLL")
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
# These flags have been taken from the defaults for a Visual C++ 4.20 project (the compiler the
|
||||
# game was originally built with) and tweaked slightly to produce more debugging info for reccmp.
|
||||
|
||||
@ -30,6 +30,7 @@ In general, we're not exhaustively strict about coding style, but there are some
|
||||
- `m_camelCase` for member variables.
|
||||
- `g_camelCase` for global variables.
|
||||
- `p_camelCase` for function parameters.
|
||||
- Instead of C++ primitives (e.g. `int`, `long`, etc.), use types in `mxtypes.h` instead. This will help us ensure that variables will be the correct size regardless of the underlying compiler/platform/architecture.
|
||||
|
||||
## Questions?
|
||||
|
||||
|
||||
@ -37,4 +37,4 @@ int g_reqEnableRMDevice = 0;
|
||||
int g_startupDelay = 200;
|
||||
|
||||
// 0x4101c0
|
||||
long g_lastFrameTime = 0;
|
||||
MxLong g_lastFrameTime = 0;
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
#ifndef DEFINE_H
|
||||
#define DEFINE_H
|
||||
|
||||
#include <mxtypes.h>
|
||||
#include <windows.h>
|
||||
|
||||
class IsleApp;
|
||||
@ -21,6 +22,6 @@ extern int g_targetHeight;
|
||||
extern int g_targetDepth;
|
||||
extern int g_reqEnableRMDevice;
|
||||
extern int g_startupDelay;
|
||||
extern long g_lastFrameTime;
|
||||
extern MxLong g_lastFrameTime;
|
||||
|
||||
#endif // DEFINE_H
|
||||
|
||||
@ -1,137 +0,0 @@
|
||||
;
|
||||
; Definition file of Lego1.dll
|
||||
; Automatic generated by gendef
|
||||
; written by Kai Tietz 2008
|
||||
;
|
||||
LIBRARY "Lego1.dll"
|
||||
EXPORTS
|
||||
??0LegoBackgroundColor@@QAE@PBD0@Z ; has WINAPI (@8)
|
||||
??0LegoGameState@@QAE@XZ
|
||||
??0LegoWorld@@QAE@XZ
|
||||
??0MxAtomId@@QAE@PBDW4LookupMode@@@Z ; has WINAPI (@8)
|
||||
??0MxBitmap@@QAE@XZ
|
||||
??0MxCore@@QAE@XZ
|
||||
??0MxCriticalSection@@QAE@XZ
|
||||
??0MxDSAction@@QAE@XZ
|
||||
??0MxDSFile@@QAE@PBDK@Z ; has WINAPI (@8)
|
||||
??0MxOmniCreateFlags@@QAE@XZ
|
||||
??0MxOmniCreateParam@@QAE@PBDPAUHWND__@@AAVMxVideoParam@@VMxOmniCreateFlags@@@Z ; has WINAPI (@16)
|
||||
??0MxString@@QAE@ABV0@@Z ; has WINAPI (@4)
|
||||
??0MxVideoParam@@QAE@AAV0@@Z ; has WINAPI (@4)
|
||||
??0MxVideoParam@@QAE@AAVMxRect32@@PAVMxPalette@@KAAVMxVideoParamFlags@@@Z ; has WINAPI (@16)
|
||||
??0MxVideoParam@@QAE@XZ
|
||||
??0MxVideoParamFlags@@QAE@XZ
|
||||
??1LegoEntity@@UAE@XZ
|
||||
??1LegoGameState@@QAE@XZ
|
||||
??1LegoWorld@@UAE@XZ
|
||||
??1MXIOINFO@@QAE@XZ
|
||||
??1MxAtomId@@QAE@XZ
|
||||
??1MxBitmap@@UAE@XZ
|
||||
??1MxCore@@UAE@XZ
|
||||
??1MxCriticalSection@@QAE@XZ
|
||||
??1MxDSAction@@UAE@XZ
|
||||
??1MxDSFile@@UAE@XZ
|
||||
??1MxPresenter@@UAE@XZ
|
||||
??1MxString@@UAE@XZ
|
||||
??1MxVideoParam@@QAE@XZ
|
||||
??4MxAtomId@@QAEAAV0@ABV0@@Z ; has WINAPI (@4)
|
||||
??4MxString@@QAEABV0@PBD@Z ; has WINAPI (@4)
|
||||
??4MxVideoParam@@QAEAAV0@ABV0@@Z ; has WINAPI (@4)
|
||||
??8MxPalette@@QAEEAAV0@@Z ; has WINAPI (@4)
|
||||
?BackgroundAudioManager@@YAPAVMxBackgroundAudioManager@@XZ
|
||||
?Close@MxDSFile@@UAEJXZ
|
||||
?Close@MxStreamer@@QAEJPBD@Z ; has WINAPI (@4)
|
||||
?CreateBackgroundAudio@LegoOmni@@QAEXXZ
|
||||
?CreateInstance@LegoOmni@@SAXXZ
|
||||
?CreatePalette@MxBitmap@@UAEPAVMxPalette@@XZ
|
||||
?CreateStreamObject@@YAPAVMxDSObject@@PAVMxDSFile@@F@Z
|
||||
?DestroyInstance@MxOmni@@SAXXZ
|
||||
?Detach@MxPalette@@QAEXXZ
|
||||
?DisableRMDevice@LegoVideoManager@@QAEHXZ
|
||||
?DoneTickle@MxPresenter@@MAEXXZ
|
||||
?Enable@MxBackgroundAudioManager@@QAEXE@Z ; has WINAPI (@4)
|
||||
?Enable@MxPresenter@@UAEXE@Z ; has WINAPI (@4)
|
||||
?EnableFullScreenMovie@LegoVideoManager@@QAEXEE@Z ; has WINAPI (@8)
|
||||
?EnableRMDevice@LegoVideoManager@@QAEHXZ
|
||||
?EndAction@MxPresenter@@UAEXXZ
|
||||
?EventManager@@YAPAVMxEventManager@@XZ
|
||||
?FlipToGDISurface@MxDirectDraw@@QAEHXZ
|
||||
?GameState@@YAPAVLegoGameState@@XZ
|
||||
?GetBufferSize@MxDSFile@@UAEKXZ
|
||||
?GetCD@MxOmni@@SAPBDXZ
|
||||
?GetCurrPathInfo@LegoOmni@@SAHPAPAVLegoPathBoundary@@AAH@Z
|
||||
?GetDefaults@LegoNavController@@SAXPAHPAM11111111PAE@Z
|
||||
?GetHD@MxOmni@@SAPBDXZ
|
||||
?GetInstance@LegoOmni@@SAPAV1@XZ
|
||||
?GetInstance@MxOmni@@SAPAV1@XZ
|
||||
?GetInstance@MxScheduler@@SAPAV1@XZ
|
||||
?GetNoCD_SourceName@@YAPBDXZ
|
||||
?GetPartsThreshold@RealtimeView@@SAMXZ
|
||||
?GetPrimaryBitDepth@MxDirectDraw@@SAHXZ
|
||||
?GetRealTime@MxTimer@@QAEJXZ
|
||||
?GetStreamBuffersNum@MxDSFile@@UAEKXZ
|
||||
?GetUserMaxLOD@RealtimeView@@SAMXZ
|
||||
?GetVariable@MxVariableTable@@QAEPBDPBD@Z ; has WINAPI (@4)
|
||||
?Init@MxPresenter@@IAEXXZ
|
||||
?InputManager@@YAPAVLegoInputManager@@XZ
|
||||
?InvalidateRect@MxVideoManager@@QAEXAAVMxRect32@@@Z ; has WINAPI (@4)
|
||||
?IsSound3D@MxOmni@@SAEXZ
|
||||
?Lego@@YAPAVLegoOmni@@XZ
|
||||
?Load@LegoGameState@@QAEJK@Z ; has WINAPI (@4)
|
||||
?MSoundManager@@YAPAVMxSoundManager@@XZ
|
||||
?MakeSourceName@@YAXPADPBD@Z
|
||||
?MoveCursor@LegoVideoManager@@QAEXHH@Z ; has WINAPI (@8)
|
||||
?MusicManager@@YAPAVMxMusicManager@@XZ
|
||||
?NotificationManager@@YAPAVMxNotificationManager@@XZ
|
||||
?Notify@MxCore@@UAEJAAVMxParam@@@Z ; has WINAPI (@4)
|
||||
?Open@MxDSFile@@UAEJK@Z ; has WINAPI (@4)
|
||||
?Open@MxStreamer@@QAEPAVMxStreamController@@PBDG@Z ; has WINAPI (@8)
|
||||
?ParseExtra@MxPresenter@@MAEXXZ
|
||||
?Pause@MxDirectDraw@@QAEHH@Z ; has WINAPI (@4)
|
||||
?PickEntity@@YAPAVLegoEntity@@JJ@Z
|
||||
?PickROI@@YAPAVLegoROI@@JJ@Z
|
||||
?QueueEvent@LegoInputManager@@QAEXW4NotificationId@@EJJE@Z ; has WINAPI (@20)
|
||||
?Read@MxBitmap@@UAEJPBD@Z ; has WINAPI (@4)
|
||||
?Read@MxDSFile@@UAEJPAEK@Z ; has WINAPI (@8)
|
||||
?RealizePalette@MxVideoManager@@UAEJPAVMxPalette@@@Z ; has WINAPI (@4)
|
||||
?Register@LegoInputManager@@QAEXPAVMxCore@@@Z ; has WINAPI (@4)
|
||||
?RemoveAll@ViewManager@@QAEXPAVViewROI@@@Z ; has WINAPI (@4)
|
||||
?RemoveWorld@LegoOmni@@QAEXABVMxAtomId@@J@Z ; has WINAPI (@8)
|
||||
?Save@LegoGameState@@QAEJK@Z ; has WINAPI (@4)
|
||||
?Seek@MxDSFile@@UAEJJH@Z ; has WINAPI (@8)
|
||||
?SerializePlayersInfo@LegoGameState@@QAEXF@Z ; has WINAPI (@4)
|
||||
?SerializeScoreHistory@LegoGameState@@QAEXF@Z ; has WINAPI (@4)
|
||||
?SetCD@MxOmni@@SAXPBD@Z
|
||||
?SetDefaults@LegoNavController@@SAXHMMMMMMMMME@Z
|
||||
?SetDeviceName@MxVideoParam@@QAEXPAD@Z ; has WINAPI (@4)
|
||||
?SetDisplayBB@LegoROI@@QAEXH@Z ; has WINAPI (@4)
|
||||
?SetDoMutex@MxCriticalSection@@SAXXZ
|
||||
?SetHD@MxOmni@@SAXPBD@Z
|
||||
?SetObjectName@MxDSObject@@QAEXPBD@Z ; has WINAPI (@4)
|
||||
?SetOmniUserMessage@@YAXP6AXPBDH@Z@Z
|
||||
?SetPartsThreshold@RealtimeView@@SAXM@Z
|
||||
?SetSavePath@LegoGameState@@QAEXPAD@Z ; has WINAPI (@4)
|
||||
?SetSound3D@MxOmni@@SAXE@Z
|
||||
?SetUserMaxLOD@RealtimeView@@SAXM@Z
|
||||
?SetVariable@MxVariableTable@@QAEXPAVMxVariable@@@Z ; has WINAPI (@4)
|
||||
?SetVariable@MxVariableTable@@QAEXPBD0@Z ; has WINAPI (@8)
|
||||
?SetWaitIndicator@MxTransitionManager@@QAEXPAVMxVideoPresenter@@@Z ; has WINAPI (@4)
|
||||
?SoundManager@@YAPAVLegoSoundManager@@XZ
|
||||
?Start@@YAJPAVMxDSAction@@@Z
|
||||
?StartAction@MxPresenter@@UAEJPAVMxStreamController@@PAVMxDSAction@@@Z ; has WINAPI (@8)
|
||||
?StartMultiTasking@MxScheduler@@QAEXK@Z ; has WINAPI (@4)
|
||||
?Streamer@@YAPAVMxStreamer@@XZ
|
||||
?Tickle@MxPresenter@@UAEJXZ
|
||||
?TickleManager@@YAPAVMxTickleManager@@XZ
|
||||
?Timer@@YAPAVMxTimer@@XZ
|
||||
?TransitionManager@@YAPAVMxTransitionManager@@XZ
|
||||
?UnRegister@LegoInputManager@@QAEXPAVMxCore@@@Z ; has WINAPI (@4)
|
||||
?VariableTable@@YAPAVMxVariableTable@@XZ
|
||||
?VideoManager@@YAPAVLegoVideoManager@@XZ
|
||||
?configureLegoAnimationManager@LegoAnimationManager@@SAXH@Z
|
||||
?configureLegoBuildingManager@LegoBuildingManager@@SAXH@Z
|
||||
?configureLegoModelPresenter@LegoModelPresenter@@SAXH@Z
|
||||
?configureLegoPartPresenter@LegoPartPresenter@@SAXHH@Z
|
||||
?configureLegoROI@LegoROI@@SAXH@Z
|
||||
?configureLegoWorldPresenter@LegoWorldPresenter@@SAXH@Z
|
||||
_DllMain@12@12
|
||||
Binary file not shown.
Binary file not shown.
@ -95,7 +95,7 @@ void IsleApp::Close()
|
||||
TransitionManager()->SetWaitIndicator(NULL);
|
||||
Lego()->vtable3c();
|
||||
|
||||
long lVar8;
|
||||
MxLong lVar8;
|
||||
do {
|
||||
lVar8 = Streamer()->Close(NULL);
|
||||
} while (lVar8 == 0);
|
||||
@ -571,7 +571,7 @@ BOOL IsleApp::ReadReg(LPCSTR name, LPSTR outValue, DWORD outSize)
|
||||
DWORD valueType;
|
||||
|
||||
BOOL out = FALSE;
|
||||
unsigned long size = outSize;
|
||||
DWORD size = outSize;
|
||||
if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, "SOFTWARE\\Mindscape\\LEGO Island", 0, KEY_READ, &hKey) == ERROR_SUCCESS) {
|
||||
if (RegQueryValueExA(hKey, name, NULL, &valueType, (LPBYTE) outValue, &size) == ERROR_SUCCESS) {
|
||||
if (RegCloseKey(hKey) == ERROR_SUCCESS) {
|
||||
@ -695,7 +695,7 @@ inline void IsleApp::Tick(BOOL sleepIfNotNextFrame)
|
||||
if (!TickleManager()) return;
|
||||
if (!Timer()) return;
|
||||
|
||||
long currentTime = Timer()->GetRealTime();
|
||||
MxLong currentTime = Timer()->GetRealTime();
|
||||
if (currentTime < g_lastFrameTime) {
|
||||
g_lastFrameTime = -this->m_frameDelta;
|
||||
}
|
||||
|
||||
@ -56,7 +56,7 @@ class IsleApp
|
||||
// 40
|
||||
int m_islandTexture;
|
||||
int m_gameStarted;
|
||||
long m_frameDelta;
|
||||
MxLong m_frameDelta;
|
||||
|
||||
// 4c
|
||||
MxVideoParam m_videoParam;
|
||||
|
||||
@ -13,7 +13,7 @@ Act2Brick::~Act2Brick()
|
||||
}
|
||||
|
||||
// STUB OFFSET: LEGO1 0x1007a8c0 STUB
|
||||
long Act2Brick::Notify(MxParam &p)
|
||||
MxLong Act2Brick::Notify(MxParam &p)
|
||||
{
|
||||
// TODO
|
||||
|
||||
@ -21,7 +21,7 @@ long Act2Brick::Notify(MxParam &p)
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1007a7f0 STUB
|
||||
long Act2Brick::Tickle()
|
||||
MxLong Act2Brick::Tickle()
|
||||
{
|
||||
// TODO
|
||||
|
||||
|
||||
@ -8,21 +8,21 @@
|
||||
class Act2Brick : public LegoPathActor
|
||||
{
|
||||
public:
|
||||
Act2Brick();
|
||||
Act2Brick();
|
||||
virtual ~Act2Brick() override; // vtable+0x0
|
||||
|
||||
virtual long Notify(MxParam &p) override; // vtable+0x4
|
||||
virtual long Tickle() override; // vtable+0x08
|
||||
virtual MxLong Notify(MxParam &p) override; // vtable+0x4
|
||||
virtual MxLong Tickle() override; // vtable+0x08
|
||||
|
||||
// OFFSET: LEGO1 0x1007a360
|
||||
inline virtual const char *ClassName() override // vtable+0x0c
|
||||
inline virtual const char *ClassName() const override // vtable+0x0c
|
||||
{
|
||||
// 0x100f0438
|
||||
return "Act2Brick";
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1007a370
|
||||
inline virtual MxBool IsA(const char *name) override // vtable+0x10
|
||||
inline virtual MxBool IsA(const char *name) const override // vtable+0x10
|
||||
{
|
||||
return !strcmp(Act2Brick::ClassName(), name) || LegoEntity::IsA(name);
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#include "act2policestation.h"
|
||||
|
||||
// OFFSET: LEGO1 0x1004e0e0 STUB
|
||||
long Act2PoliceStation::Notify(MxParam &p)
|
||||
MxLong Act2PoliceStation::Notify(MxParam &p)
|
||||
{
|
||||
// TODO
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
class Act2PoliceStation : public LegoEntity
|
||||
{
|
||||
public:
|
||||
virtual long Notify(MxParam &p) override; // vtable+0x4
|
||||
virtual MxLong Notify(MxParam &p) override; // vtable+0x4
|
||||
|
||||
// OFFSET: LEGO1 0x1000e200
|
||||
inline virtual const char *ClassName() const override // vtable+0x0c
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#include "beachhouseentity.h"
|
||||
|
||||
// OFFSET: LEGO1 0x100150a0 STUB
|
||||
long BeachHouseEntity::Notify(MxParam &p)
|
||||
MxLong BeachHouseEntity::Notify(MxParam &p)
|
||||
{
|
||||
// TODO
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
class BeachHouseEntity : public BuildingEntity
|
||||
{
|
||||
public:
|
||||
virtual long Notify(MxParam &p) override; // vtable+04
|
||||
virtual MxLong Notify(MxParam &p) override; // vtable+04
|
||||
|
||||
// OFFSET: LEGO1 0x1000ee80
|
||||
inline virtual const char *ClassName() const override // vtable+0x0c
|
||||
|
||||
14
LEGO1/compat.h
Normal file
14
LEGO1/compat.h
Normal file
@ -0,0 +1,14 @@
|
||||
#ifndef ISLECOMPAT_H
|
||||
#define ISLECOMPAT_H
|
||||
|
||||
// Various macros to enable compiling with other/newer compilers.
|
||||
|
||||
// Use `COMPAT_CONST` where something ought to be 'const', and a newer compiler would complain if it
|
||||
// wasn't, but we know it isn't 'const' in the original code.
|
||||
#ifdef __MINGW32__
|
||||
#define COMPAT_CONST const
|
||||
#else
|
||||
#define COMPAT_CONST
|
||||
#endif
|
||||
|
||||
#endif // ISLECOMPAT_H
|
||||
11
LEGO1/decomp.h
Normal file
11
LEGO1/decomp.h
Normal file
@ -0,0 +1,11 @@
|
||||
#ifndef DECOMP_H
|
||||
#define DECOMP_H
|
||||
|
||||
#define DECOMP_STATIC_ASSERT(V) namespace { typedef int foo[(V)?1:-1]; }
|
||||
#define DECOMP_SIZE_ASSERT(T, S) DECOMP_STATIC_ASSERT(sizeof(T) == S)
|
||||
|
||||
typedef unsigned char undefined;
|
||||
typedef unsigned short undefined2;
|
||||
typedef unsigned int undefined4;
|
||||
|
||||
#endif // DECOMP_H
|
||||
@ -1,7 +1,7 @@
|
||||
#include <windows.h>
|
||||
|
||||
// OFFSET: LEGO1 0x10091ee0
|
||||
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||
__declspec(dllexport) BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@ ElevatorBottom::~ElevatorBottom()
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10018150 STUB
|
||||
long ElevatorBottom::Notify(MxParam &p)
|
||||
MxLong ElevatorBottom::Notify(MxParam &p)
|
||||
{
|
||||
// TODO
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ class ElevatorBottom : public LegoWorld
|
||||
ElevatorBottom();
|
||||
virtual ~ElevatorBottom() override; // vtable+0x0
|
||||
|
||||
virtual long Notify(MxParam &p) override; // vtable+0x4
|
||||
virtual MxLong Notify(MxParam &p) override; // vtable+0x4
|
||||
|
||||
// OFFSET: LEGO1 0x10017f20
|
||||
inline virtual const char *ClassName() const override // vtable+0x0c
|
||||
|
||||
@ -13,7 +13,7 @@ GasStation::~GasStation()
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10004a60 STUB
|
||||
long GasStation::Notify(MxParam &p)
|
||||
MxLong GasStation::Notify(MxParam &p)
|
||||
{
|
||||
// TODO
|
||||
|
||||
@ -21,7 +21,7 @@ long GasStation::Notify(MxParam &p)
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10005c90 STUB
|
||||
long GasStation::Tickle()
|
||||
MxLong GasStation::Tickle()
|
||||
{
|
||||
// TODO
|
||||
|
||||
|
||||
@ -12,8 +12,8 @@ class GasStation : public LegoWorld
|
||||
GasStation();
|
||||
virtual ~GasStation() override; // vtable+0x0
|
||||
|
||||
virtual long Notify(MxParam &p) override; // vtable+0x4
|
||||
virtual long Tickle() override; // vtable+0x8
|
||||
virtual MxLong Notify(MxParam &p) override; // vtable+0x4
|
||||
virtual MxLong Tickle() override; // vtable+0x8
|
||||
|
||||
// OFFSET: LEGO1 0x10004780
|
||||
inline virtual const char *ClassName() const override // vtable+0x0c
|
||||
|
||||
@ -13,7 +13,7 @@ HistoryBook::~HistoryBook()
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10082680 STUB
|
||||
long HistoryBook::Notify(MxParam &p)
|
||||
MxLong HistoryBook::Notify(MxParam &p)
|
||||
{
|
||||
// TODO
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ class HistoryBook : public LegoWorld
|
||||
HistoryBook();
|
||||
virtual ~HistoryBook() override; // vtable+0x0
|
||||
|
||||
virtual long Notify(MxParam &p) override; // vtable+0x4
|
||||
virtual MxLong Notify(MxParam &p) override; // vtable+0x4
|
||||
|
||||
// OFFSET: LEGO1 0x10082390
|
||||
inline virtual const char *ClassName() const override // vtable+0x0c
|
||||
|
||||
@ -13,7 +13,7 @@ Hospital::~Hospital()
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10074990 STUB
|
||||
long Hospital::Notify(MxParam &p)
|
||||
MxLong Hospital::Notify(MxParam &p)
|
||||
{
|
||||
// TODO
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ class Hospital : public LegoWorld
|
||||
Hospital();
|
||||
virtual ~Hospital() override; // vtable+0x0
|
||||
|
||||
virtual long Notify(MxParam &p) override; // vtable+0x04
|
||||
virtual MxLong Notify(MxParam &p) override; // vtable+0x04
|
||||
|
||||
// OFFSET: LEGO1 0x100746b0
|
||||
inline virtual const char *ClassName() const override // vtable+0x0c
|
||||
|
||||
@ -13,7 +13,7 @@ Infocenter::~Infocenter()
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1006ef10 STUB
|
||||
long Infocenter::Notify(MxParam &p)
|
||||
MxLong Infocenter::Notify(MxParam &p)
|
||||
{
|
||||
// TODO
|
||||
|
||||
@ -21,7 +21,7 @@ long Infocenter::Notify(MxParam &p)
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10070af0 STUB
|
||||
long Infocenter::Tickle()
|
||||
MxLong Infocenter::Tickle()
|
||||
{
|
||||
// TODO
|
||||
|
||||
|
||||
@ -11,8 +11,8 @@ class Infocenter : public LegoWorld
|
||||
Infocenter();
|
||||
virtual ~Infocenter() override;
|
||||
|
||||
virtual long Notify(MxParam &p) override; // vtable+0x4
|
||||
virtual long Tickle() override; // vtable+0x8
|
||||
virtual MxLong Notify(MxParam &p) override; // vtable+0x4
|
||||
virtual MxLong Tickle() override; // vtable+0x8
|
||||
|
||||
// OFFSET: LEGO1 0x1006eb40
|
||||
inline virtual const char *ClassName() const override // vtable+0x0c
|
||||
|
||||
@ -13,7 +13,7 @@ InfocenterDoor::~InfocenterDoor()
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100379e0 STUB
|
||||
long InfocenterDoor::Notify(MxParam &p)
|
||||
MxLong InfocenterDoor::Notify(MxParam &p)
|
||||
{
|
||||
// TODO
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ class InfocenterDoor : public LegoWorld
|
||||
InfocenterDoor();
|
||||
virtual ~InfocenterDoor(); // vtable+0x0
|
||||
|
||||
virtual long Notify(MxParam &p) override; // vtable+0x4
|
||||
virtual MxLong Notify(MxParam &p) override; // vtable+0x4
|
||||
|
||||
// OFFSET: LEGO1 0x100377b0
|
||||
inline virtual const char *ClassName() const override // vtable+0x0c
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
#include "legoanimationmanager.h"
|
||||
|
||||
// 0x100f74f8
|
||||
int g_legoAnimationManagerConfig = 1;
|
||||
|
||||
// OFFSET: LEGO1 0x1005eb60 STUB
|
||||
LegoAnimationManager::LegoAnimationManager()
|
||||
{
|
||||
@ -12,7 +15,7 @@ LegoAnimationManager::~LegoAnimationManager()
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100619f0 STUB
|
||||
long LegoAnimationManager::Notify(MxParam &p)
|
||||
MxLong LegoAnimationManager::Notify(MxParam &p)
|
||||
{
|
||||
// TODO
|
||||
|
||||
@ -20,7 +23,7 @@ long LegoAnimationManager::Notify(MxParam &p)
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10061cc0 STUB
|
||||
long LegoAnimationManager::Tickle()
|
||||
MxLong LegoAnimationManager::Tickle()
|
||||
{
|
||||
// TODO
|
||||
|
||||
@ -32,3 +35,9 @@ void LegoAnimationManager::Init()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1005eb50
|
||||
void LegoAnimationManager::configureLegoAnimationManager(int param_1)
|
||||
{
|
||||
g_legoAnimationManagerConfig = param_1;
|
||||
}
|
||||
|
||||
@ -11,8 +11,8 @@ class LegoAnimationManager : public MxCore
|
||||
LegoAnimationManager();
|
||||
virtual ~LegoAnimationManager() override; // vtable+0x0
|
||||
|
||||
virtual long Notify(MxParam &p) override; // vtable+0x4
|
||||
virtual long Tickle() override; // vtable+0x8
|
||||
virtual MxLong Notify(MxParam &p) override; // vtable+0x4
|
||||
virtual MxLong Tickle() override; // vtable+0x8
|
||||
|
||||
// OFFSET: LEGO1 0x1005ec80
|
||||
inline virtual const char *ClassName() const override // vtable+0x0c
|
||||
|
||||
53
LEGO1/legobackgroundcolor.cpp
Normal file
53
LEGO1/legobackgroundcolor.cpp
Normal file
@ -0,0 +1,53 @@
|
||||
#include "legobackgroundcolor.h"
|
||||
|
||||
#include "legoomni.h"
|
||||
#include "legoutil.h"
|
||||
#include "legovideomanager.h"
|
||||
|
||||
const char *g_delimiter = "\t";
|
||||
const char *g_set = "set";
|
||||
const char *g_reset = "reset";
|
||||
|
||||
// OFFSET: LEGO1 0x1003bfb0
|
||||
LegoBackgroundColor::LegoBackgroundColor(const char *p_name, const char *p_colorString)
|
||||
{
|
||||
m_name = p_name;
|
||||
m_name.ToUpperCase();
|
||||
SetColorString(p_colorString);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1003c070
|
||||
void LegoBackgroundColor::SetColorString(const char *p_colorString)
|
||||
{
|
||||
m_string = p_colorString;
|
||||
m_string.ToLowerCase();
|
||||
|
||||
LegoVideoManager *videomanager = VideoManager();
|
||||
if (!videomanager || !p_colorString)
|
||||
return;
|
||||
|
||||
float converted_r, converted_g, converted_b;
|
||||
char *colorStringCopy = strcpy(new char[strlen(p_colorString) + 1], p_colorString);
|
||||
char *colorStringSplit = strtok(colorStringCopy, g_delimiter);
|
||||
|
||||
if (!strcmp(colorStringSplit, g_set)) {
|
||||
colorStringSplit = strtok(0, g_delimiter);
|
||||
if (colorStringSplit)
|
||||
h = (float) (atoi(colorStringSplit) * 0.01);
|
||||
colorStringSplit = strtok(0, g_delimiter);
|
||||
if (colorStringSplit)
|
||||
s = (float) (atoi(colorStringSplit) * 0.01);
|
||||
colorStringSplit = strtok(0, g_delimiter);
|
||||
if (colorStringSplit)
|
||||
v = (float) (atoi(colorStringSplit) * 0.01);
|
||||
|
||||
ConvertHSVToRGB(this->h, this->s, this->v, &converted_r, &converted_g, &converted_b);
|
||||
videomanager->SetSkyColor(converted_r, converted_g, converted_b);
|
||||
}
|
||||
else if (!strcmp(colorStringSplit, g_reset)) {
|
||||
ConvertHSVToRGB(this->h, this->s, this->v, &converted_r, &converted_g, &converted_b);
|
||||
videomanager->SetSkyColor(converted_r, converted_g, converted_b);
|
||||
}
|
||||
|
||||
delete[] colorStringCopy;
|
||||
}
|
||||
@ -1,10 +1,18 @@
|
||||
#ifndef LEGOBACKGROUNDCOLOR_H
|
||||
#define LEGOBACKGROUNDCOLOR_H
|
||||
|
||||
class LegoBackgroundColor
|
||||
#include "mxstringvariable.h"
|
||||
|
||||
class LegoBackgroundColor : public MxStringVariable
|
||||
{
|
||||
public:
|
||||
__declspec(dllexport) LegoBackgroundColor(const char *, const char *);
|
||||
__declspec(dllexport) LegoBackgroundColor(const char *p_name, const char *p_colorString);
|
||||
void SetColorString(const char *p_colorString);
|
||||
|
||||
private:
|
||||
float h;
|
||||
float s;
|
||||
float v;
|
||||
};
|
||||
|
||||
#endif // LEGOBACKGROUNDCOLOR_H
|
||||
|
||||
@ -1,13 +1,18 @@
|
||||
#include "legobuildingmanager.h"
|
||||
|
||||
// 0x100f37cc
|
||||
int g_buildingManagerConfig = 1;
|
||||
|
||||
// OFFSET: LEGO1 0x1002f8c0 STUB
|
||||
LegoBuildingManager::LegoBuildingManager()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1002f960 STUB
|
||||
LegoBuildingManager::~LegoBuildingManager()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1002f9d0 STUB
|
||||
@ -15,3 +20,9 @@ void LegoBuildingManager::Init()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1002f8b0
|
||||
void LegoBuildingManager::configureLegoBuildingManager(int param_1)
|
||||
{
|
||||
g_buildingManagerConfig = param_1;
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@ LegoCarBuild::~LegoCarBuild()
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10024050 STUB
|
||||
long LegoCarBuild::Notify(MxParam &p)
|
||||
MxLong LegoCarBuild::Notify(MxParam &p)
|
||||
{
|
||||
// TODO
|
||||
|
||||
@ -21,7 +21,7 @@ long LegoCarBuild::Notify(MxParam &p)
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100238b0 STUB
|
||||
long LegoCarBuild::Tickle()
|
||||
MxLong LegoCarBuild::Tickle()
|
||||
{
|
||||
// TODO
|
||||
|
||||
|
||||
@ -11,8 +11,8 @@ class LegoCarBuild : public LegoWorld
|
||||
LegoCarBuild();
|
||||
virtual ~LegoCarBuild() override;
|
||||
|
||||
virtual long Notify(MxParam &p) override; // vtable+0x4
|
||||
virtual long Tickle() override; // vtable+0x8
|
||||
virtual MxLong Notify(MxParam &p) override; // vtable+0x4
|
||||
virtual MxLong Tickle() override; // vtable+0x8
|
||||
|
||||
// OFFSET: LEGO1 0x10022940
|
||||
inline virtual const char *ClassName() const override // vtable+0x0c
|
||||
|
||||
@ -13,7 +13,7 @@ LegoControlManager::~LegoControlManager()
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10029600 STUB
|
||||
long LegoControlManager::Tickle()
|
||||
MxLong LegoControlManager::Tickle()
|
||||
{
|
||||
// TODO
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ class LegoControlManager : public MxCore
|
||||
LegoControlManager();
|
||||
virtual ~LegoControlManager() override; // vtable+0x0
|
||||
|
||||
virtual long Tickle() override; // vtable+0x8
|
||||
virtual MxLong Tickle() override; // vtable+0x8
|
||||
|
||||
// OFFSET: LEGO1 0x10028cb0
|
||||
inline virtual const char *ClassName() const override // vtable+0x0c
|
||||
|
||||
@ -7,7 +7,7 @@ LegoEntity::~LegoEntity()
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100114f0 STUB
|
||||
long LegoEntity::Notify(MxParam &p)
|
||||
MxLong LegoEntity::Notify(MxParam &p)
|
||||
{
|
||||
// TODO
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ class LegoEntity : public MxEntity
|
||||
|
||||
__declspec(dllexport) virtual ~LegoEntity() override; // vtable+0x0
|
||||
|
||||
virtual long Notify(MxParam &p) override; // vtable+0x4
|
||||
virtual MxLong Notify(MxParam &p) override; // vtable+0x4
|
||||
|
||||
// OFFSET: LEGO1 0x1000c2f0
|
||||
inline const char *ClassName() const override // vtable+0xc
|
||||
|
||||
58
LEGO1/legogamestate.cpp
Normal file
58
LEGO1/legogamestate.cpp
Normal file
@ -0,0 +1,58 @@
|
||||
#include "legogamestate.h"
|
||||
#include "legoomni.h"
|
||||
|
||||
// OFFSET: LEGO1 0x10039550
|
||||
LegoGameState::LegoGameState()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10039720
|
||||
LegoGameState::~LegoGameState()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10039c60
|
||||
MxResult LegoGameState::Load(MxULong)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10039980
|
||||
MxResult LegoGameState::Save(MxULong p)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1003a2e0
|
||||
void LegoGameState::SerializePlayersInfo(MxS16 p)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1003cdd0
|
||||
void LegoGameState::SerializeScoreHistory(MxS16 p)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10039f00
|
||||
void LegoGameState::SetSavePath(char *p_savePath)
|
||||
{
|
||||
if (m_savePath != NULL)
|
||||
{
|
||||
delete[] m_savePath;
|
||||
}
|
||||
if (p_savePath)
|
||||
{
|
||||
m_savePath = new char[strlen(p_savePath) + 1];
|
||||
strcpy(m_savePath, p_savePath);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_savePath = NULL;
|
||||
}
|
||||
}
|
||||
@ -1,16 +1,21 @@
|
||||
#ifndef LEGOGAMESTATE_H
|
||||
#define LEGOGAMESTATE_H
|
||||
|
||||
#include "mxtypes.h"
|
||||
|
||||
class LegoGameState
|
||||
{
|
||||
public:
|
||||
__declspec(dllexport) LegoGameState();
|
||||
__declspec(dllexport) ~LegoGameState();
|
||||
__declspec(dllexport) long Load(unsigned long);
|
||||
__declspec(dllexport) long Save(unsigned long p);
|
||||
__declspec(dllexport) void SerializePlayersInfo(short p);
|
||||
__declspec(dllexport) void SerializeScoreHistory(short p);
|
||||
__declspec(dllexport) MxResult Load(MxULong);
|
||||
__declspec(dllexport) MxResult Save(MxULong p);
|
||||
__declspec(dllexport) void SerializePlayersInfo(MxS16 p);
|
||||
__declspec(dllexport) void SerializeScoreHistory(MxS16 p);
|
||||
__declspec(dllexport) void SetSavePath(char *p);
|
||||
|
||||
private:
|
||||
char *m_savePath;
|
||||
};
|
||||
|
||||
#endif // LEGOGAMESTATE_H
|
||||
|
||||
@ -1,5 +1,9 @@
|
||||
#include "legoinputmanager.h"
|
||||
|
||||
#include "decomp.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(LegoInputManager, 0x338); // 0x10059085
|
||||
|
||||
// OFFSET: LEGO1 0x1005b790 STUB
|
||||
LegoInputManager::LegoInputManager()
|
||||
{
|
||||
@ -12,8 +16,26 @@ LegoInputManager::~LegoInputManager()
|
||||
// TODO
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1005c740 STUB
|
||||
void LegoInputManager::QueueEvent(NotificationId id, unsigned char p2, MxLong p3, MxLong p4, unsigned char p5)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1005c470 STUB
|
||||
void LegoInputManager::Register(MxCore *)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1005c5c0 STUB
|
||||
void LegoInputManager::UnRegister(MxCore *)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1005b8b0 STUB
|
||||
long LegoInputManager::Tickle()
|
||||
MxLong LegoInputManager::Tickle()
|
||||
{
|
||||
// TODO
|
||||
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
#ifndef LEGOINPUTMANAGER_H
|
||||
#define LEGOINPUTMANAGER_H
|
||||
|
||||
#include "mxcore.h"
|
||||
#include "decomp.h"
|
||||
#include "mxpresenter.h"
|
||||
|
||||
__declspec(dllexport) enum NotificationId
|
||||
enum NotificationId
|
||||
{
|
||||
NONE = 0,
|
||||
KEYDOWN = 7,
|
||||
@ -15,21 +16,21 @@ __declspec(dllexport) enum NotificationId
|
||||
|
||||
// VTABLE 0x100d8760
|
||||
// SIZE 0x338
|
||||
class LegoInputManager
|
||||
class LegoInputManager : public MxPresenter
|
||||
{
|
||||
public:
|
||||
LegoInputManager();
|
||||
virtual ~LegoInputManager() override;
|
||||
|
||||
__declspec(dllexport) void QueueEvent(NotificationId id, unsigned char p2, long p3, long p4, unsigned char p5);
|
||||
__declspec(dllexport) void QueueEvent(NotificationId id, unsigned char p2, MxLong p3, MxLong p4, unsigned char p5);
|
||||
__declspec(dllexport) void Register(MxCore *);
|
||||
__declspec(dllexport) void UnRegister(MxCore *);
|
||||
|
||||
virtual long Tickle() override; // vtable+0x8
|
||||
virtual MxLong Tickle() override; // vtable+0x8
|
||||
|
||||
char m_pad00[0x19C];
|
||||
undefined m_pad40[0x15c];
|
||||
int m_joystickIndex;
|
||||
char m_pad200[0x194];
|
||||
undefined m_pad200[0x194];
|
||||
MxBool m_useJoystick;
|
||||
};
|
||||
|
||||
|
||||
10
LEGO1/legomodelpresenter.cpp
Normal file
10
LEGO1/legomodelpresenter.cpp
Normal file
@ -0,0 +1,10 @@
|
||||
#include "legomodelpresenter.h"
|
||||
|
||||
// 0x100f7ae0
|
||||
int g_modelPresenterConfig = 1;
|
||||
|
||||
// OFFSET: LEGO1 0x1007f660
|
||||
void LegoModelPresenter::configureLegoModelPresenter(int param_1)
|
||||
{
|
||||
g_modelPresenterConfig = param_1;
|
||||
}
|
||||
@ -106,8 +106,7 @@ void LegoNavController::SetControlMax(int p_hMax, int p_vMax)
|
||||
this->m_hMax = p_hMax;
|
||||
this->m_vMax = p_vMax;
|
||||
|
||||
if (VideoManager()->GetVideoParam().flags().GetFullScreen())
|
||||
{
|
||||
if (VideoManager()->GetVideoParam().flags().GetFullScreen()) {
|
||||
this->m_hMax = 640;
|
||||
this->m_vMax = 480;
|
||||
}
|
||||
@ -134,19 +133,15 @@ void LegoNavController::ResetToDefault()
|
||||
void LegoNavController::SetTargets(int p_hPos, int p_vPos, MxBool p_accel)
|
||||
{
|
||||
if (this->m_trackDefault != FALSE)
|
||||
{
|
||||
ResetToDefault();
|
||||
}
|
||||
|
||||
if (p_accel != FALSE)
|
||||
{
|
||||
if (p_accel != FALSE) {
|
||||
this->m_targetTurnSpeed = CalculateNewTargetSpeed(p_hPos, this->m_hMax / 2, this->m_turnMaxSpeed);
|
||||
this->m_targetMovementSpeed = CalculateNewTargetSpeed(this->m_vMax - p_vPos, this->m_vMax / 2, this->m_movementMaxSpeed);
|
||||
this->m_turnAccel = CalculateNewAccel(p_hPos, this->m_hMax / 2, this->m_turnMaxAccel, (int)this->m_turnMinAccel);
|
||||
this->m_movementAccel = CalculateNewAccel(this->m_vMax - p_vPos, this->m_vMax / 2, this->m_movementMaxAccel, (int)this->m_movementMinAccel);
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
this->m_targetTurnSpeed = 0.0f;
|
||||
this->m_targetMovementSpeed = 0.0f;
|
||||
this->m_movementAccel = this->m_movementDecel;
|
||||
@ -179,9 +174,28 @@ float LegoNavController::CalculateNewAccel(int p_pos, int p_center, float p_maxA
|
||||
result = Abs(diff) * p_maxAccel / p_center;
|
||||
|
||||
if (result < p_minAccel)
|
||||
{
|
||||
result = (float)p_minAccel;
|
||||
}
|
||||
result = (float) p_minAccel;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10054fe0
|
||||
float LegoNavController::CalculateNewVel(float p_targetVel, float p_currentVel, float p_accel, float p_time)
|
||||
{
|
||||
float newVel = p_currentVel;
|
||||
|
||||
float velDiff = p_targetVel - p_currentVel;
|
||||
int vSign = velDiff > 0 ? 1 : -1;
|
||||
|
||||
if (Abs(velDiff) > this->m_zeroThreshold) {
|
||||
float deltaVel = p_accel * p_time;
|
||||
newVel = p_currentVel + (deltaVel * vSign);
|
||||
|
||||
if (vSign > 0)
|
||||
newVel = Min(newVel, p_targetVel);
|
||||
else
|
||||
newVel = Max(newVel, p_targetVel);
|
||||
}
|
||||
|
||||
return newVel;
|
||||
}
|
||||
@ -40,6 +40,7 @@ class LegoNavController : public MxCore
|
||||
void SetTargets(int p_hPos, int p_vPos, MxBool p_accel);
|
||||
float CalculateNewTargetSpeed(int p_pos, int p_center, float p_maxSpeed);
|
||||
float CalculateNewAccel(int p_pos, int p_center, float p_maxAccel, int p_minAccel);
|
||||
float CalculateNewVel(float p_targetVel, float p_currentVel, float p_accel, float p_time);
|
||||
|
||||
private:
|
||||
int m_hMax;
|
||||
|
||||
@ -1,5 +1,11 @@
|
||||
#include "legoomni.h"
|
||||
|
||||
// 0x100f4588
|
||||
char *g_nocdSourceName = NULL;
|
||||
|
||||
// 0x101020e8
|
||||
void (*g_omniUserMessage)(const char *,int);
|
||||
|
||||
// OFFSET: LEGO1 0x10058a00
|
||||
LegoOmni::LegoOmni()
|
||||
{
|
||||
@ -12,6 +18,44 @@ LegoOmni::~LegoOmni()
|
||||
Destroy();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1005b560 STUB
|
||||
void LegoOmni::CreateBackgroundAudio()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1005af10 STUB
|
||||
void LegoOmni::RemoveWorld(const MxAtomId &p1, MxLong p2)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1005b400 STUB
|
||||
int LegoOmni::GetCurrPathInfo(LegoPathBoundary **,int &)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100b6ff0 STUB
|
||||
void MakeSourceName(char *, const char *)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100b7210
|
||||
void SetOmniUserMessage(void (*p_userMsg)(const char *,int))
|
||||
{
|
||||
g_omniUserMessage = p_userMsg;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100acf50 STUB
|
||||
MxLong Start(MxDSAction *)
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1005ad10
|
||||
LegoOmni *LegoOmni::GetInstance()
|
||||
{
|
||||
@ -67,6 +111,13 @@ MxBackgroundAudioManager *BackgroundAudioManager()
|
||||
return LegoOmni::GetInstance()->GetBackgroundAudioManager();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100c0280 STUB
|
||||
MxDSObject *CreateStreamObject(MxDSFile *,MxS16)
|
||||
{
|
||||
// TODO
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10015740
|
||||
LegoInputManager *InputManager()
|
||||
{
|
||||
@ -91,14 +142,33 @@ MxTransitionManager *TransitionManager()
|
||||
return LegoOmni::GetInstance()->GetTransitionManager();
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10053430
|
||||
const char *GetNoCD_SourceName()
|
||||
{
|
||||
return g_nocdSourceName;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1005b5f0
|
||||
long LegoOmni::Notify(MxParam &p)
|
||||
MxLong LegoOmni::Notify(MxParam &p)
|
||||
{
|
||||
// FIXME: Stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1003dd70 STUB
|
||||
LegoROI *PickROI(MxLong,MxLong)
|
||||
{
|
||||
// TODO
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1003ddc0 STUB
|
||||
LegoEntity *PickEntity(MxLong,MxLong)
|
||||
{
|
||||
// TODO
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10058bd0
|
||||
void LegoOmni::Init()
|
||||
{
|
||||
@ -106,7 +176,7 @@ void LegoOmni::Init()
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10058e70
|
||||
MxResult LegoOmni::Create(MxOmniCreateParam &p)
|
||||
MxResult LegoOmni::Create(COMPAT_CONST MxOmniCreateParam &p)
|
||||
{
|
||||
// FIXME: Stub
|
||||
return SUCCESS;
|
||||
|
||||
@ -1,10 +1,12 @@
|
||||
#ifndef LEGOOMNI_H
|
||||
#define LEGOOMNI_H
|
||||
|
||||
#include "compat.h"
|
||||
#include "legoentity.h"
|
||||
#include "legoinputmanager.h"
|
||||
#include "legogamestate.h"
|
||||
#include "legonavcontroller.h"
|
||||
#include "legopathboundary.h"
|
||||
#include "legoroi.h"
|
||||
#include "legovideomanager.h"
|
||||
#include "mxatomid.h"
|
||||
@ -26,15 +28,15 @@ class LegoOmni : public MxOmni
|
||||
{
|
||||
public:
|
||||
__declspec(dllexport) void CreateBackgroundAudio();
|
||||
__declspec(dllexport) void RemoveWorld(const MxAtomId &p1, long p2);
|
||||
__declspec(dllexport) static int GetCurrPathInfo(class LegoPathBoundary * *,int &);
|
||||
__declspec(dllexport) void RemoveWorld(const MxAtomId &p1, MxLong p2);
|
||||
__declspec(dllexport) static int GetCurrPathInfo(LegoPathBoundary **,int &);
|
||||
__declspec(dllexport) static void CreateInstance();
|
||||
__declspec(dllexport) static LegoOmni *GetInstance();
|
||||
|
||||
LegoOmni();
|
||||
virtual ~LegoOmni(); // vtable+00
|
||||
|
||||
virtual long Notify(MxParam &p); // vtable+04
|
||||
virtual MxLong Notify(MxParam &p); // vtable+04
|
||||
|
||||
// OFFSET: LEGO1 0x10058aa0
|
||||
inline virtual const char *ClassName() const // vtable+0c
|
||||
@ -50,7 +52,7 @@ class LegoOmni : public MxOmni
|
||||
}
|
||||
|
||||
virtual void Init(); // vtable+14
|
||||
virtual MxResult Create(MxOmniCreateParam &p); // vtable+18
|
||||
virtual MxResult Create(COMPAT_CONST MxOmniCreateParam &p); // vtable+18
|
||||
virtual void Destroy(); // vtable+1c
|
||||
virtual void vtable20();
|
||||
virtual void vtable24(MxDSAction &ds);
|
||||
@ -93,21 +95,20 @@ class LegoOmni : public MxOmni
|
||||
};
|
||||
|
||||
__declspec(dllexport) MxBackgroundAudioManager * BackgroundAudioManager();
|
||||
__declspec(dllexport) MxDSObject * CreateStreamObject(MxDSFile *,short);
|
||||
__declspec(dllexport) MxDSObject * CreateStreamObject(MxDSFile *,MxS16);
|
||||
__declspec(dllexport) LegoGameState * GameState();
|
||||
__declspec(dllexport) const char * GetNoCD_SourceName();
|
||||
__declspec(dllexport) LegoInputManager * InputManager();
|
||||
__declspec(dllexport) LegoOmni * Lego();
|
||||
__declspec(dllexport) void MakeSourceName(char *, const char *);
|
||||
__declspec(dllexport) MxNotificationManager * NotificationManager();
|
||||
__declspec(dllexport) LegoEntity * PickEntity(long,long);
|
||||
__declspec(dllexport) LegoROI * PickROI(long,long);
|
||||
__declspec(dllexport) LegoEntity * PickEntity(MxLong,MxLong);
|
||||
__declspec(dllexport) LegoROI * PickROI(MxLong,MxLong);
|
||||
__declspec(dllexport) void SetOmniUserMessage(void (*)(const char *,int));
|
||||
__declspec(dllexport) LegoSoundManager * SoundManager();
|
||||
__declspec(dllexport) long Start(MxDSAction *);
|
||||
__declspec(dllexport) MxLong Start(MxDSAction *);
|
||||
__declspec(dllexport) MxTransitionManager * TransitionManager();
|
||||
__declspec(dllexport) LegoVideoManager * VideoManager();
|
||||
__declspec(dllexport) long Start(MxDSAction *a);
|
||||
__declspec(dllexport) MxLong Start(MxDSAction *a);
|
||||
|
||||
LegoBuildingManager* BuildingManager();
|
||||
Isle* GetIsle();
|
||||
|
||||
14
LEGO1/legopartpresenter.cpp
Normal file
14
LEGO1/legopartpresenter.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
#include "legopartpresenter.h"
|
||||
|
||||
// 0x100f7aa0
|
||||
int g_partPresenterConfig1 = 1;
|
||||
|
||||
// 0x100f7aa4
|
||||
int g_partPresenterConfig2 = 100;
|
||||
|
||||
// OFFSET: LEGO1 0x1007c990
|
||||
void LegoPartPresenter::configureLegoPartPresenter(int param_1, int param_2)
|
||||
{
|
||||
g_partPresenterConfig1 = param_1;
|
||||
g_partPresenterConfig2 = param_2;
|
||||
}
|
||||
@ -1,6 +1,8 @@
|
||||
#ifndef LEGOPARTPRESENTER_H
|
||||
#define LEGOPARTPRESENTER_H
|
||||
|
||||
#include "mxmediapresenter.h"
|
||||
|
||||
// VTABLE 0x100d4df0
|
||||
// SIZE 0x54 (from inlined construction at 0x10009fac)
|
||||
class LegoPartPresenter : public MxMediaPresenter
|
||||
|
||||
9
LEGO1/legopathboundary.h
Normal file
9
LEGO1/legopathboundary.h
Normal file
@ -0,0 +1,9 @@
|
||||
#ifndef LEGOPATHBOUNDARH_H
|
||||
#define LEGOPATHBOUNDARH_H
|
||||
|
||||
class LegoPathBoundary
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
#endif // LEGOPATHBOUNDARH_H
|
||||
@ -13,7 +13,7 @@ LegoPathController::~LegoPathController()
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10045c10 STUB
|
||||
long LegoPathController::Tickle()
|
||||
MxLong LegoPathController::Tickle()
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
|
||||
@ -11,7 +11,7 @@ class LegoPathController : public MxCore
|
||||
LegoPathController();
|
||||
virtual ~LegoPathController() override;
|
||||
|
||||
virtual long Tickle() override; // vtable+08
|
||||
virtual MxLong Tickle() override; // vtable+08
|
||||
|
||||
// OFFSET: LEGO1 0x10045110
|
||||
inline const char *ClassName() const override // vtable+0xc
|
||||
|
||||
@ -13,7 +13,7 @@ LegoPlantManager::~LegoPlantManager()
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10026e00 STUB
|
||||
long LegoPlantManager::Tickle()
|
||||
MxLong LegoPlantManager::Tickle()
|
||||
{
|
||||
// TODO
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ class LegoPlantManager : public MxCore
|
||||
LegoPlantManager();
|
||||
virtual ~LegoPlantManager() override; // vtable+0x0
|
||||
|
||||
virtual long Tickle() override; // vtable+0x8
|
||||
virtual MxLong Tickle() override; // vtable+0x8
|
||||
|
||||
// OFFSET: LEGO1 0x10026290
|
||||
inline const char *ClassName() const override // vtable+0xc
|
||||
|
||||
@ -13,7 +13,7 @@ LegoRace::~LegoRace()
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10015e00 STUB
|
||||
long LegoRace::Notify(MxParam &p)
|
||||
MxLong LegoRace::Notify(MxParam &p)
|
||||
{
|
||||
// TODO
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ class LegoRace : public LegoWorld
|
||||
LegoRace();
|
||||
virtual ~LegoRace() override; // vtable+0x0
|
||||
|
||||
virtual long Notify(MxParam &p) override; // vtable+0x4
|
||||
virtual MxLong Notify(MxParam &p) override; // vtable+0x4
|
||||
|
||||
// OFFSET: LEGO1 0x10015ba0
|
||||
inline const char *ClassName() const override // vtable+0xc
|
||||
|
||||
17
LEGO1/legoroi.cpp
Normal file
17
LEGO1/legoroi.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include "legoroi.h"
|
||||
|
||||
// 0x10101368
|
||||
int g_roiConfig = 100;
|
||||
|
||||
// OFFSET: LEGO1 0x100a9e10
|
||||
void LegoROI::SetDisplayBB(int p_displayBB)
|
||||
{
|
||||
// Intentionally empty function
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100a81c0
|
||||
void LegoROI::configureLegoROI(int p_roi)
|
||||
{
|
||||
g_roiConfig = p_roi;
|
||||
}
|
||||
|
||||
@ -4,8 +4,8 @@
|
||||
class LegoROI
|
||||
{
|
||||
public:
|
||||
__declspec(dllexport) void SetDisplayBB(int);
|
||||
__declspec(dllexport) static void configureLegoROI(int param_1);
|
||||
__declspec(dllexport) void SetDisplayBB(int p_displayBB);
|
||||
__declspec(dllexport) static void configureLegoROI(int p_roi);
|
||||
};
|
||||
|
||||
#endif // LEGOROI_H
|
||||
|
||||
@ -13,7 +13,7 @@ LegoSoundManager::~LegoSoundManager()
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1002a3a0 STUB
|
||||
long LegoSoundManager::Tickle()
|
||||
MxLong LegoSoundManager::Tickle()
|
||||
{
|
||||
// TODO
|
||||
return 0;
|
||||
|
||||
@ -10,7 +10,7 @@ class LegoSoundManager : public MxSoundManager
|
||||
public:
|
||||
LegoSoundManager();
|
||||
virtual ~LegoSoundManager() override;
|
||||
virtual long Tickle() override; // vtable+08
|
||||
virtual MxLong Tickle() override; // vtable+08
|
||||
|
||||
private:
|
||||
void Init();
|
||||
|
||||
@ -4,3 +4,8 @@
|
||||
LegoState::~LegoState()
|
||||
{
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10005f90
|
||||
MxBool LegoState::VTable0x14() {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ class LegoState : public MxCore
|
||||
|
||||
// OFFSET: LEGO1 0x100060d0
|
||||
inline virtual const char *ClassName() const override // vtable+0x0c
|
||||
{
|
||||
{
|
||||
// 0x100f01b8
|
||||
return "LegoState";
|
||||
}
|
||||
@ -22,6 +22,8 @@ class LegoState : public MxCore
|
||||
return !strcmp(name, LegoState::ClassName()) || MxCore::IsA(name);
|
||||
}
|
||||
|
||||
virtual MxBool VTable0x14();
|
||||
|
||||
};
|
||||
|
||||
#endif // LEGOSTATE_H
|
||||
|
||||
73
LEGO1/legoutil.cpp
Normal file
73
LEGO1/legoutil.cpp
Normal file
@ -0,0 +1,73 @@
|
||||
#include "legoutil.h"
|
||||
|
||||
#include "mxtypes.h"
|
||||
|
||||
// OFFSET: LEGO1 0x1003eae0
|
||||
void ConvertHSVToRGB(float h, float s, float v, float *r_out, float *b_out, float *g_out)
|
||||
{
|
||||
double calc;
|
||||
double p;
|
||||
MxLong hue_index;
|
||||
double v9;
|
||||
double v12;
|
||||
double v13;
|
||||
|
||||
double s_dbl = s;
|
||||
|
||||
if (s > 0.5f)
|
||||
calc = (1.0f - v) * s + v;
|
||||
else
|
||||
calc = (v + 1.0) * s_dbl;
|
||||
if (calc <= 0.0)
|
||||
{
|
||||
*g_out = 0.0f;
|
||||
*b_out = 0.0f;
|
||||
*r_out = 0.0f;
|
||||
return;
|
||||
}
|
||||
p = s * 2.0f - calc;
|
||||
hue_index = h * 6.0;
|
||||
v9 = (h * 6.0 - (float)hue_index) * ((calc - p) / calc) * calc;
|
||||
v12 = p + v9;
|
||||
v13 = calc - v9;
|
||||
switch (hue_index)
|
||||
{
|
||||
case 0:
|
||||
*r_out = calc;
|
||||
*b_out = v12;
|
||||
*g_out = p;
|
||||
break;
|
||||
case 1:
|
||||
*r_out = v13;
|
||||
*b_out = calc;
|
||||
*g_out = p;
|
||||
break;
|
||||
case 2:
|
||||
*r_out = p;
|
||||
*b_out = calc;
|
||||
*g_out = v12;
|
||||
break;
|
||||
case 3:
|
||||
*r_out = p;
|
||||
*b_out = v13;
|
||||
*g_out = calc;
|
||||
break;
|
||||
case 4:
|
||||
*r_out = v12;
|
||||
*b_out = p;
|
||||
*g_out = calc;
|
||||
break;
|
||||
case 5:
|
||||
*r_out = calc;
|
||||
*b_out = p;
|
||||
*g_out = v13;
|
||||
break;
|
||||
case 6:
|
||||
*r_out = calc;
|
||||
*b_out = p;
|
||||
*g_out = v13;
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -7,4 +7,18 @@ inline T Abs(T p_t)
|
||||
return p_t < 0 ? -p_t : p_t;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline T Min(T p_t1, T p_t2)
|
||||
{
|
||||
return p_t1 < p_t2 ? p_t1 : p_t2;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline T Max(T p_t1, T p_t2)
|
||||
{
|
||||
return p_t1 > p_t2 ? p_t1 : p_t2;
|
||||
}
|
||||
|
||||
void ConvertHSVToRGB(float r, float g, float b, float* out_r, float* out_g, float* out_b);
|
||||
|
||||
#endif // LEGOUTIL_H
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
#include "legovideomanager.h"
|
||||
#include <ddraw.h>
|
||||
|
||||
// OFFSET: LEGO1 0x1007aa20 STUB
|
||||
LegoVideoManager::LegoVideoManager()
|
||||
@ -37,3 +38,15 @@ void LegoVideoManager::MoveCursor(int x, int y)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1007c440
|
||||
void LegoVideoManager::SetSkyColor(float red, float green, float blue)
|
||||
{
|
||||
PALETTEENTRY colorStrucure; // [esp+0h] [ebp-4h] BYREF
|
||||
|
||||
colorStrucure.peRed = (red* 255.0);
|
||||
colorStrucure.peGreen = (green * 255.0);
|
||||
colorStrucure.peBlue = (blue * 255.0);
|
||||
colorStrucure.peFlags = -124;
|
||||
// TODO
|
||||
}
|
||||
|
||||
@ -18,6 +18,7 @@ class LegoVideoManager : public MxVideoManager
|
||||
__declspec(dllexport) void MoveCursor(int x, int y);
|
||||
|
||||
inline Lego3DManager *Get3DManager() { return this->m_3dManager; }
|
||||
void SetSkyColor(float r, float g, float b);
|
||||
|
||||
int m_unk64;
|
||||
Lego3DManager *m_3dManager;
|
||||
|
||||
@ -1,8 +1,14 @@
|
||||
#ifndef MXATOMID_H
|
||||
#define MXATOMID_H
|
||||
|
||||
#include "mxtypes.h"
|
||||
|
||||
enum LookupMode
|
||||
{
|
||||
LookupMode_Exact = 0,
|
||||
LookupMode_LowerCase = 1,
|
||||
LookupMode_UpperCase = 2,
|
||||
LookupMode_LowerCase2 = 3
|
||||
};
|
||||
|
||||
class MxAtomId
|
||||
@ -17,6 +23,11 @@ class MxAtomId
|
||||
this->m_internal = 0;
|
||||
}
|
||||
|
||||
inline MxBool operator ==(const MxAtomId &other) const
|
||||
{
|
||||
return this->m_internal == other.m_internal;
|
||||
}
|
||||
|
||||
private:
|
||||
char *m_internal;
|
||||
};
|
||||
|
||||
@ -1 +1,5 @@
|
||||
#include "mxaudiopresenter.h"
|
||||
|
||||
#include "decomp.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(MxAudioPresenter, 0x54);
|
||||
|
||||
@ -7,9 +7,13 @@
|
||||
class MxAudioPresenter : public MxMediaPresenter
|
||||
{
|
||||
public:
|
||||
MxAudioPresenter() {
|
||||
m_unk50 = 100;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1000d280
|
||||
inline virtual const char *ClassName() const override // vtable+0x0c
|
||||
{
|
||||
{
|
||||
// 0x100f078c
|
||||
return "MxAudioPresenter";
|
||||
}
|
||||
@ -19,6 +23,8 @@ class MxAudioPresenter : public MxMediaPresenter
|
||||
{
|
||||
return !strcmp(name, MxAudioPresenter::ClassName()) || MxMediaPresenter::IsA(name);
|
||||
}
|
||||
|
||||
int m_unk50;
|
||||
};
|
||||
|
||||
#endif // MXAUDIOPRESENTER_H
|
||||
|
||||
129
LEGO1/mxbitmap.cpp
Normal file
129
LEGO1/mxbitmap.cpp
Normal file
@ -0,0 +1,129 @@
|
||||
#include "mxbitmap.h"
|
||||
|
||||
// OFFSET: LEGO1 0x100bc980
|
||||
MxBitmap::MxBitmap()
|
||||
{
|
||||
this->m_info = NULL;
|
||||
this->m_bmiHeader = NULL;
|
||||
this->m_paletteData = NULL;
|
||||
this->m_data = NULL;
|
||||
this->m_unk18 = FALSE;
|
||||
this->m_palette = NULL;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bca10
|
||||
MxBitmap::~MxBitmap()
|
||||
{
|
||||
if (this->m_info != NULL)
|
||||
delete m_info;
|
||||
if (this->m_data != NULL)
|
||||
delete m_data;
|
||||
if (this->m_palette != NULL)
|
||||
delete m_palette;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bcc40 STUB
|
||||
int MxBitmap::vtable14(int)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bcba0 STUB
|
||||
int MxBitmap::vtable18(BITMAPINFOHEADER *p_bmiHeader)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bcaa0 STUB
|
||||
int MxBitmap::vtable1c(int p_width, int p_height, MxPalette *p_palette, int)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bcd60 STUB
|
||||
MxResult MxBitmap::LoadFile(HANDLE p_handle)
|
||||
{
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bcd10
|
||||
MxLong MxBitmap::Read(const char *p_filename)
|
||||
{
|
||||
MxResult result = FAILURE;
|
||||
HANDLE handle = CreateFileA(
|
||||
p_filename,
|
||||
GENERIC_READ,
|
||||
FILE_SHARE_READ,
|
||||
NULL,
|
||||
OPEN_EXISTING,
|
||||
FILE_ATTRIBUTE_NORMAL,
|
||||
NULL
|
||||
);
|
||||
|
||||
if (handle != INVALID_HANDLE_VALUE && !LoadFile(handle))
|
||||
result = SUCCESS;
|
||||
|
||||
if (handle)
|
||||
CloseHandle(handle);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x1004e0d0
|
||||
int MxBitmap::vtable28(int)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100ce70 STUB
|
||||
void MxBitmap::vtable2c(int, int, int, int, int, int, int)
|
||||
{
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100d020 STUB
|
||||
void MxBitmap::vtable30(int, int, int, int, int, int, int)
|
||||
{
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bd1c0
|
||||
MxPalette *MxBitmap::CreatePalette()
|
||||
{
|
||||
// FIXME: This function needs MxPalette to be completed. Also INFERRING usage of MxBool
|
||||
MxPalette *pal = NULL;
|
||||
MxPalette *ppal;
|
||||
MxBool success = FALSE;
|
||||
|
||||
if(this->m_unk18 == FALSE) {
|
||||
// ppal = MxPalette::FromBitmapPalette(this->m_paletteData);
|
||||
} else {
|
||||
if(this->m_unk18 != TRUE) {
|
||||
if(!success && pal != NULL) {
|
||||
delete pal;
|
||||
pal = NULL;
|
||||
}
|
||||
}
|
||||
//.pal = MxPalette::Clone(this->m_palette);
|
||||
}
|
||||
if(pal != NULL) {
|
||||
success = TRUE;
|
||||
}
|
||||
|
||||
return pal;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bd280 STUB
|
||||
void MxBitmap::vtable38(void*)
|
||||
{
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bd2d0 STUB
|
||||
int MxBitmap::vtable3c(MxBool)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bd3e0 STUB
|
||||
int MxBitmap::vtable40(HDC p_hdc, int p_xSrc, int p_ySrc, int p_xDest, int p_yDest, int p_destWidth, int p_destHeight)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -1,13 +1,38 @@
|
||||
#ifndef MXBITMAP_H
|
||||
#define MXBITMAP_H
|
||||
|
||||
class MxBitmap
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "mxcore.h"
|
||||
#include "mxpalette.h"
|
||||
#include "mxtypes.h"
|
||||
|
||||
class MxBitmap : public MxCore
|
||||
{
|
||||
public:
|
||||
__declspec(dllexport) MxBitmap();
|
||||
__declspec(dllexport) virtual ~MxBitmap();
|
||||
__declspec(dllexport) virtual MxPalette *CreatePalette();
|
||||
__declspec(dllexport) virtual long Read(const char *);
|
||||
__declspec(dllexport) virtual ~MxBitmap(); // vtable+00
|
||||
|
||||
virtual int vtable14(int);
|
||||
virtual int vtable18(BITMAPINFOHEADER *p_bmiHeader);
|
||||
virtual int vtable1c(int p_width, int p_height, MxPalette *p_palette, int);
|
||||
virtual MxResult LoadFile(HANDLE p_handle);
|
||||
__declspec(dllexport) virtual MxLong Read(const char *p_filename); // vtable+24
|
||||
virtual int vtable28(int);
|
||||
virtual void vtable2c(int, int, int, int, int, int, int);
|
||||
virtual void vtable30(int, int, int, int, int, int, int);
|
||||
__declspec(dllexport) virtual MxPalette *CreatePalette(); // vtable+34
|
||||
virtual void vtable38(void*);
|
||||
virtual int vtable3c(MxBool);
|
||||
virtual int vtable40(HDC p_hdc, int p_xSrc, int p_ySrc, int p_xDest, int p_yDest, int p_destWidth, int p_destHeight);
|
||||
|
||||
private:
|
||||
BITMAPINFO *m_info;
|
||||
BITMAPINFOHEADER *m_bmiHeader;
|
||||
RGBQUAD *m_paletteData;
|
||||
LPVOID *m_data;
|
||||
MxBool m_unk18;
|
||||
MxPalette *m_palette;
|
||||
};
|
||||
|
||||
#endif // MXBITMAP_H
|
||||
|
||||
@ -1,5 +1,9 @@
|
||||
#include "mxcompositepresenter.h"
|
||||
|
||||
#include "decomp.h"
|
||||
|
||||
DECOMP_SIZE_ASSERT(MxCompositePresenter, 0x4c);
|
||||
|
||||
// OFFSET: LEGO1 0x100b60b0 STUB
|
||||
MxCompositePresenter::MxCompositePresenter()
|
||||
{
|
||||
|
||||
@ -13,7 +13,7 @@ class MxCompositePresenter : public MxPresenter
|
||||
|
||||
// OFFSET: LEGO1 0x100b6210
|
||||
inline virtual const char *ClassName() const override // vtable+0x0c
|
||||
{
|
||||
{
|
||||
// 0x100f0774
|
||||
return "MxCompositePresenter";
|
||||
}
|
||||
@ -24,6 +24,9 @@ class MxCompositePresenter : public MxPresenter
|
||||
return !strcmp(name, MxCompositePresenter::ClassName()) || MxPresenter::IsA(name);
|
||||
}
|
||||
|
||||
undefined m_unk40;
|
||||
undefined4 *m_unk44;
|
||||
undefined4 m_unk48;
|
||||
};
|
||||
|
||||
#endif // MXCOMPOSITEPRESENTER_H
|
||||
|
||||
@ -16,13 +16,13 @@ MxCore::~MxCore()
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100ae1f0
|
||||
long MxCore::Notify(MxParam &p)
|
||||
MxLong MxCore::Notify(MxParam &p)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x10001f70
|
||||
long MxCore::Tickle()
|
||||
MxLong MxCore::Tickle()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -14,8 +14,8 @@ class MxCore
|
||||
public:
|
||||
__declspec(dllexport) MxCore();
|
||||
__declspec(dllexport) virtual ~MxCore(); // vtable+00
|
||||
__declspec(dllexport) virtual long Notify(MxParam &p); // vtable+04
|
||||
virtual long Tickle(); // vtable+08
|
||||
__declspec(dllexport) virtual MxLong Notify(MxParam &p); // vtable+04
|
||||
virtual MxLong Tickle(); // vtable+08
|
||||
|
||||
// OFFSET: LEGO1 0x100144c0
|
||||
inline virtual const char *ClassName() const // vtable+0c
|
||||
|
||||
@ -24,7 +24,7 @@ void EnableResizing(HWND hwnd, BOOL flag)
|
||||
if (dwStyle & WS_THICKFRAME)
|
||||
{
|
||||
SetWindowLong(hwnd, GWL_STYLE, GetWindowLong(hwnd, GWL_STYLE) ^ WS_THICKFRAME);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -89,7 +89,7 @@ int MxDirectDraw::GetPrimaryBitDepth()
|
||||
dwRGBBitCount = ddsd.ddpfPixelFormat.dwRGBBitCount;
|
||||
g_is_PALETTEINDEXED8 = (ddsd.ddpfPixelFormat.dwFlags & DDPF_PALETTEINDEXED8) != 0;
|
||||
pDDraw->Release();
|
||||
}
|
||||
}
|
||||
|
||||
return dwRGBBitCount;
|
||||
}
|
||||
@ -832,10 +832,10 @@ BOOL MxDirectDraw::DDSetMode(int width, int height, int bpp)
|
||||
&m_pPalette,
|
||||
NULL);
|
||||
if (result != DD_OK)
|
||||
{
|
||||
{
|
||||
Error("CreatePalette failed", result);
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
result = m_pBackBuffer->SetPalette(m_pPalette); // TODO: add FIX_BUGS define and fix this
|
||||
result = m_pFrontBuffer->SetPalette(m_pPalette);
|
||||
if (result != DD_OK)
|
||||
|
||||
@ -13,7 +13,7 @@ MxDiskStreamController::~MxDiskStreamController()
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100c8640 STUB
|
||||
long MxDiskStreamController::Tickle()
|
||||
MxLong MxDiskStreamController::Tickle()
|
||||
{
|
||||
// TODO
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ class MxDiskStreamController : public MxStreamController
|
||||
MxDiskStreamController();
|
||||
virtual ~MxDiskStreamController() override;
|
||||
|
||||
virtual long Tickle() override; // vtable+0x8
|
||||
virtual MxLong Tickle() override; // vtable+0x8
|
||||
|
||||
// OFFSET: LEGO1 0x100c7360
|
||||
inline virtual const char *ClassName() const override // vtable+0x0c
|
||||
|
||||
@ -4,9 +4,10 @@
|
||||
MxDSAction::MxDSAction()
|
||||
{
|
||||
// TODO
|
||||
this->SetType(MxDSType_Action);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100ada80
|
||||
// OFFSET: LEGO1 0x100ada80 STUB
|
||||
MxDSAction::~MxDSAction()
|
||||
{
|
||||
// TODO
|
||||
|
||||
@ -3,11 +3,10 @@
|
||||
// OFFSET: LEGO1 0x100c8ff0
|
||||
MxDSAnim::MxDSAnim()
|
||||
{
|
||||
// TODO
|
||||
this->SetType(MxDSType_Anim);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100c91a0
|
||||
MxDSAnim::~MxDSAnim()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
@ -1,13 +1,12 @@
|
||||
#include "mxdsevent.h"
|
||||
|
||||
// OFFSET: LEGO1 0x100c95f0 STUB
|
||||
// OFFSET: LEGO1 0x100c95f0
|
||||
MxDSEvent::MxDSEvent()
|
||||
{
|
||||
// TODO
|
||||
this->SetType(MxDSType_Event);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100c97a0 STUB
|
||||
// OFFSET: LEGO1 0x100c97a0
|
||||
MxDSEvent::~MxDSEvent()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
#define FOURCC(a, b, c, d) (((a) << 0) | ((b) << 8) | ((c) << 16) | ((d) << 24))
|
||||
|
||||
// OFFSET: LEGO1 0x100cc4b0
|
||||
MxDSFile::MxDSFile(const char *filename, unsigned long skipReadingChunks)
|
||||
MxDSFile::MxDSFile(const char *filename, MxULong skipReadingChunks)
|
||||
{
|
||||
m_filename = filename;
|
||||
m_skipReadingChunks = skipReadingChunks;
|
||||
@ -21,18 +21,17 @@ MxDSFile::~MxDSFile()
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100cc590
|
||||
long MxDSFile::Open(unsigned long uStyle)
|
||||
MxLong MxDSFile::Open(MxULong uStyle)
|
||||
{
|
||||
// No idea what's stopping this one matching, but I'm pretty
|
||||
// confident it has the correct behavior.
|
||||
long longResult = 1;
|
||||
memset(&m_io, 0, sizeof(MXIOINFO));
|
||||
MXIOINFO& io = m_io;
|
||||
MxLong longResult = 1;
|
||||
memset(&io, 0, sizeof(MXIOINFO));
|
||||
|
||||
if (m_io.Open(m_filename.GetData(), uStyle) != 0) {
|
||||
if (io.Open(m_filename.GetData(), uStyle) != 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
m_io.SetBuffer(NULL, 0, 0);
|
||||
io.SetBuffer(NULL, 0, 0);
|
||||
m_position = 0;
|
||||
|
||||
if (m_skipReadingChunks == 0) {
|
||||
@ -50,7 +49,7 @@ long MxDSFile::Open(unsigned long uStyle)
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100cc780
|
||||
long MxDSFile::Read(unsigned char *pch, unsigned long cch)
|
||||
MxLong MxDSFile::Read(unsigned char *pch, MxULong cch)
|
||||
{
|
||||
if (m_io.Read((char*)pch, cch) != cch)
|
||||
return -1;
|
||||
@ -60,7 +59,7 @@ long MxDSFile::Read(unsigned char *pch, unsigned long cch)
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100cc620
|
||||
long MxDSFile::ReadChunks()
|
||||
MxLong MxDSFile::ReadChunks()
|
||||
{
|
||||
_MMCKINFO topChunk;
|
||||
_MMCKINFO childChunk;
|
||||
@ -82,7 +81,7 @@ long MxDSFile::ReadChunks()
|
||||
if (m_io.Descend(&childChunk, &topChunk, 0) != 0) {
|
||||
return -1;
|
||||
}
|
||||
unsigned long* pLengthInDWords = &m_lengthInDWords;
|
||||
MxULong* pLengthInDWords = &m_lengthInDWords;
|
||||
m_io.Read((char *)pLengthInDWords, 4);
|
||||
m_pBuffer = malloc(*pLengthInDWords * 4);
|
||||
m_io.Read((char*)m_pBuffer, *pLengthInDWords * 4);
|
||||
@ -97,25 +96,25 @@ long MxDSFile::ReadChunks()
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100cc7b0
|
||||
long MxDSFile::Seek(long lOffset, int iOrigin)
|
||||
MxLong MxDSFile::Seek(MxLong lOffset, int iOrigin)
|
||||
{
|
||||
return (m_position = m_io.Seek(lOffset, iOrigin)) == -1 ? -1 : 0;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100cc7e0
|
||||
unsigned long MxDSFile::GetBufferSize()
|
||||
MxULong MxDSFile::GetBufferSize()
|
||||
{
|
||||
return m_header.bufferSize;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100cc7f0
|
||||
unsigned long MxDSFile::GetStreamBuffersNum()
|
||||
MxULong MxDSFile::GetStreamBuffersNum()
|
||||
{
|
||||
return m_header.streamBuffersNum;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100cc740
|
||||
long MxDSFile::Close()
|
||||
MxLong MxDSFile::Close()
|
||||
{
|
||||
m_io.Close(0);
|
||||
m_position = -1;
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
class MxDSFile : public MxDSSource
|
||||
{
|
||||
public:
|
||||
__declspec(dllexport) MxDSFile(const char *filename, unsigned long skipReadingChunks);
|
||||
__declspec(dllexport) MxDSFile(const char *filename, MxULong skipReadingChunks);
|
||||
__declspec(dllexport) virtual ~MxDSFile(); // vtable+0x0
|
||||
|
||||
// OFFSET: LEGO1 0x100c0120
|
||||
@ -25,14 +25,14 @@ class MxDSFile : public MxDSSource
|
||||
return !strcmp(name, MxDSFile::ClassName()) || MxDSSource::IsA(name);
|
||||
}
|
||||
|
||||
__declspec(dllexport) virtual long Open(unsigned long); // vtable+0x14
|
||||
__declspec(dllexport) virtual long Close(); // vtable+0x18
|
||||
__declspec(dllexport) virtual long Read(unsigned char *,unsigned long); // vtable+0x20
|
||||
__declspec(dllexport) virtual long Seek(long,int); // vtable+0x24
|
||||
__declspec(dllexport) virtual unsigned long GetBufferSize(); // vtable+0x28
|
||||
__declspec(dllexport) virtual unsigned long GetStreamBuffersNum(); // vtable+0x2c
|
||||
__declspec(dllexport) virtual MxLong Open(MxULong); // vtable+0x14
|
||||
__declspec(dllexport) virtual MxLong Close(); // vtable+0x18
|
||||
__declspec(dllexport) virtual MxLong Read(unsigned char *,MxULong); // vtable+0x20
|
||||
__declspec(dllexport) virtual MxLong Seek(MxLong,int); // vtable+0x24
|
||||
__declspec(dllexport) virtual MxULong GetBufferSize(); // vtable+0x28
|
||||
__declspec(dllexport) virtual MxULong GetStreamBuffersNum(); // vtable+0x2c
|
||||
private:
|
||||
long ReadChunks();
|
||||
MxLong ReadChunks();
|
||||
struct ChunkHeader {
|
||||
ChunkHeader()
|
||||
: majorVersion(0)
|
||||
@ -41,11 +41,11 @@ class MxDSFile : public MxDSSource
|
||||
, streamBuffersNum(0)
|
||||
{}
|
||||
|
||||
unsigned short majorVersion;
|
||||
unsigned short minorVersion;
|
||||
unsigned long bufferSize;
|
||||
short streamBuffersNum;
|
||||
short reserved;
|
||||
MxU16 majorVersion;
|
||||
MxU16 minorVersion;
|
||||
MxULong bufferSize;
|
||||
MxS16 streamBuffersNum;
|
||||
MxS16 reserved;
|
||||
};
|
||||
|
||||
MxString m_filename;
|
||||
@ -54,7 +54,7 @@ class MxDSFile : public MxDSSource
|
||||
|
||||
// If false, read chunks immediately on open, otherwise
|
||||
// skip reading chunks until ReadChunks is explicitly called.
|
||||
unsigned long m_skipReadingChunks;
|
||||
MxULong m_skipReadingChunks;
|
||||
};
|
||||
|
||||
#endif // MXDSFILE_H
|
||||
|
||||
@ -4,9 +4,10 @@
|
||||
MxDSMediaAction::MxDSMediaAction()
|
||||
{
|
||||
// TODO
|
||||
this->SetType(MxDSType_MediaAction);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100c8cf0
|
||||
// OFFSET: LEGO1 0x100c8cf0 STUB
|
||||
MxDSMediaAction::~MxDSMediaAction()
|
||||
{
|
||||
// TODO
|
||||
|
||||
@ -3,11 +3,12 @@
|
||||
// OFFSET: LEGO1 0x100c9b90
|
||||
MxDSMultiAction::MxDSMultiAction()
|
||||
{
|
||||
|
||||
// TODO
|
||||
this->SetType(MxDSType_MultiAction);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100ca060
|
||||
// OFFSET: LEGO1 0x100ca060 STUB
|
||||
MxDSMultiAction::~MxDSMultiAction()
|
||||
{
|
||||
|
||||
// TODO
|
||||
}
|
||||
|
||||
@ -3,10 +3,12 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
DECOMP_SIZE_ASSERT(MxDSObject, 0x2c);
|
||||
|
||||
// OFFSET: LEGO1 0x100bf6a0
|
||||
MxDSObject::MxDSObject()
|
||||
{
|
||||
this->m_unk0c = 0;
|
||||
this->SetType(MxDSType_Object);
|
||||
this->m_sourceName = NULL;
|
||||
this->m_unk14 = 0;
|
||||
this->m_objectName = NULL;
|
||||
@ -45,16 +47,16 @@ MxDSObject &MxDSObject::operator=(MxDSObject &p_dsObject)
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bf8e0
|
||||
void MxDSObject::SetObjectName(const char *p_name)
|
||||
void MxDSObject::SetObjectName(const char *p_objectName)
|
||||
{
|
||||
if (p_name != this->m_objectName) {
|
||||
if (p_objectName != this->m_objectName) {
|
||||
delete[] this->m_objectName;
|
||||
|
||||
if (p_name) {
|
||||
this->m_objectName = new char[strlen(p_name) + 1];
|
||||
if (p_objectName) {
|
||||
this->m_objectName = new char[strlen(p_objectName) + 1];
|
||||
|
||||
if (this->m_objectName) {
|
||||
strcpy(this->m_objectName, p_name);
|
||||
strcpy(this->m_objectName, p_objectName);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -83,15 +85,15 @@ void MxDSObject::SetSourceName(const char *p_sourceName)
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bf9c0
|
||||
int MxDSObject::unk14()
|
||||
undefined4 MxDSObject::unk14()
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bf9d0
|
||||
unsigned int MxDSObject::CalculateUnk08()
|
||||
MxU32 MxDSObject::CalculateUnk08()
|
||||
{
|
||||
unsigned int unk08;
|
||||
MxU32 unk08;
|
||||
|
||||
if (this->m_sourceName)
|
||||
unk08 = strlen(this->m_sourceName) + 3;
|
||||
@ -111,16 +113,16 @@ unsigned int MxDSObject::CalculateUnk08()
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bfa20
|
||||
void MxDSObject::Parse(char **p_source, unsigned short p_unk24)
|
||||
void MxDSObject::Parse(char **p_source, MxS16 p_unk24)
|
||||
{
|
||||
this->SetSourceName(*p_source);
|
||||
*p_source += strlen(this->m_sourceName) + 1;
|
||||
this->m_unk14 = *(int*) *p_source;
|
||||
this->m_unk14 = *(undefined4*) *p_source;
|
||||
*p_source += 4;
|
||||
|
||||
this->SetObjectName(*p_source);
|
||||
*p_source += strlen(this->m_objectName) + 1;
|
||||
this->m_unk1c = *(int*) *p_source;
|
||||
this->m_unk1c = *(undefined4*) *p_source;
|
||||
*p_source += 4;
|
||||
|
||||
this->m_unk24 = p_unk24;
|
||||
|
||||
@ -1,55 +1,59 @@
|
||||
#ifndef MXDSOBJECT_H
|
||||
#define MXDSOBJECT_H
|
||||
|
||||
#include "decomp.h"
|
||||
|
||||
#include "mxcore.h"
|
||||
#include "mxatomid.h"
|
||||
#include "mxdstypes.h"
|
||||
|
||||
// VTABLE 0x100dc868
|
||||
// SIZE 0x2c
|
||||
class MxDSObject : public MxCore
|
||||
{
|
||||
public:
|
||||
__declspec(dllexport) void SetObjectName(const char *p_objectName);
|
||||
|
||||
MxDSObject();
|
||||
virtual ~MxDSObject() override;
|
||||
|
||||
MxDSObject &operator=(MxDSObject &p_dsObject);
|
||||
void CopyFrom(MxDSObject &p_dsObject);
|
||||
MxDSObject &operator=(MxDSObject &p_dsObject);
|
||||
|
||||
// OFFSET: LEGO1 0x100bf730
|
||||
__declspec(dllexport) void SetObjectName(const char *p_objectName);
|
||||
void SetSourceName(const char *p_sourceName);
|
||||
|
||||
// OFFSET: LEGO1 0x100bf730
|
||||
inline virtual const char *ClassName() const override { return "MxDSObject"; }; // vtable+0c
|
||||
|
||||
// OFFSET: LEGO1 0x100bf740
|
||||
inline virtual MxBool IsA(const char *name) const override { return !strcmp(name, MxDSObject::ClassName()) || MxCore::IsA(name); }; // vtable+10;
|
||||
|
||||
virtual int unk14(); // vtable+14;
|
||||
virtual unsigned int CalculateUnk08(); // vtable+18;
|
||||
virtual void Parse(char **p_source, unsigned short p_unk24); // vtable+1c;
|
||||
|
||||
void SetSourceName(const char *p_sourceName);
|
||||
virtual undefined4 unk14(); // vtable+14;
|
||||
virtual MxU32 CalculateUnk08(); // vtable+18;
|
||||
virtual void Parse(char **p_source, MxS16 p_unk24); // vtable+1c;
|
||||
|
||||
inline const MxAtomId& GetAtomId() { return this->m_atomId; }
|
||||
inline int GetUnknown1c() { return this->m_unk1c; }
|
||||
inline undefined4 GetUnknown1c() { return this->m_unk1c; }
|
||||
|
||||
inline void SetUnknown1c(int p_unk1c) { this->m_unk1c = p_unk1c; }
|
||||
inline void SetUnknown24(short p_unk24) { this->m_unk24 = p_unk24; }
|
||||
inline void SetUnknown1c(undefined4 p_unk1c) { this->m_unk1c = p_unk1c; }
|
||||
inline void SetUnknown24(MxS16 p_unk24) { this->m_unk24 = p_unk24; }
|
||||
|
||||
// OFFSET: ISLE 0x401c40
|
||||
// OFFSET: LEGO1 0x10005530
|
||||
inline void SetAtomId(MxAtomId p_atomId) { this->m_atomId = p_atomId; }
|
||||
|
||||
protected:
|
||||
inline void SetType(MxDSType p_type) { this->m_type = p_type; }
|
||||
|
||||
private:
|
||||
unsigned int m_unk08;
|
||||
short m_unk0c;
|
||||
MxU32 m_unk08;
|
||||
MxU16 m_type;
|
||||
char* m_sourceName;
|
||||
int m_unk14;
|
||||
undefined4 m_unk14;
|
||||
char *m_objectName;
|
||||
int m_unk1c;
|
||||
undefined4 m_unk1c;
|
||||
MxAtomId m_atomId;
|
||||
short m_unk24;
|
||||
unsigned short m_unk26;
|
||||
int m_unk28;
|
||||
MxS16 m_unk24;
|
||||
undefined4 m_unk28;
|
||||
};
|
||||
|
||||
#endif // MXDSOBJECT_H
|
||||
|
||||
@ -3,11 +3,10 @@
|
||||
// OFFSET: LEGO1 0x100c8870
|
||||
MxDSObjectAction::MxDSObjectAction()
|
||||
{
|
||||
// TODO
|
||||
this->SetType(MxDSType_ObjectAction);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100c8a20
|
||||
MxDSObjectAction::~MxDSObjectAction()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
@ -3,11 +3,10 @@
|
||||
// OFFSET: LEGO1 0x100cae80
|
||||
MxDSParallelAction::MxDSParallelAction()
|
||||
{
|
||||
|
||||
this->SetType(MxDSType_ParallelAction);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100cb040
|
||||
MxDSParallelAction::~MxDSParallelAction()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@ -3,11 +3,12 @@
|
||||
// OFFSET: LEGO1 0x100cb2b0
|
||||
MxDSSelectAction::MxDSSelectAction()
|
||||
{
|
||||
|
||||
// TODO
|
||||
this->SetType(MxDSType_SelectAction);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100cb8d0
|
||||
// OFFSET: LEGO1 0x100cb8d0 STUB
|
||||
MxDSSelectAction::~MxDSSelectAction()
|
||||
{
|
||||
|
||||
// TODO
|
||||
}
|
||||
|
||||
@ -3,11 +3,12 @@
|
||||
// OFFSET: LEGO1 0x100ca9d0
|
||||
MxDSSerialAction::MxDSSerialAction()
|
||||
{
|
||||
|
||||
// TODO
|
||||
this->SetType(MxDSType_SerialAction);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100cac10
|
||||
// OFFSET: LEGO1 0x100cac10 STUB
|
||||
MxDSSerialAction::~MxDSSerialAction()
|
||||
{
|
||||
|
||||
// TODO
|
||||
}
|
||||
|
||||
@ -4,10 +4,10 @@
|
||||
MxDSSound::MxDSSound()
|
||||
{
|
||||
// TODO
|
||||
this->SetType(MxDSType_Sound);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100c9470
|
||||
MxDSSound::~MxDSSound()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@ void MxDSSource::SomethingWhichCallsRead(void* pUnknownObject)
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100bfff0
|
||||
long MxDSSource::GetLengthInDWords()
|
||||
MxLong MxDSSource::GetLengthInDWords()
|
||||
{
|
||||
return m_lengthInDWords;
|
||||
}
|
||||
@ -26,19 +26,19 @@ class MxDSSource : public MxCore
|
||||
return !strcmp(name, MxDSSource::ClassName()) || MxCore::IsA(name);
|
||||
}
|
||||
|
||||
virtual long Open(unsigned long) = 0;
|
||||
virtual long Close() = 0;
|
||||
virtual MxLong Open(MxULong) = 0;
|
||||
virtual MxLong Close() = 0;
|
||||
virtual void SomethingWhichCallsRead(void* pUnknownObject);
|
||||
virtual long Read(unsigned char *, unsigned long) = 0;
|
||||
virtual long Seek(long, int) = 0;
|
||||
virtual unsigned long GetBufferSize() = 0;
|
||||
virtual unsigned long GetStreamBuffersNum() = 0;
|
||||
virtual long GetLengthInDWords();
|
||||
virtual MxLong Read(unsigned char *, MxULong) = 0;
|
||||
virtual MxLong Seek(MxLong, int) = 0;
|
||||
virtual MxULong GetBufferSize() = 0;
|
||||
virtual MxULong GetStreamBuffersNum() = 0;
|
||||
virtual MxLong GetLengthInDWords();
|
||||
|
||||
protected:
|
||||
unsigned long m_lengthInDWords;
|
||||
MxULong m_lengthInDWords;
|
||||
void* m_pBuffer;
|
||||
long m_position;
|
||||
MxLong m_position;
|
||||
};
|
||||
|
||||
#endif // MXDSSOURCE_H
|
||||
|
||||
@ -3,11 +3,10 @@
|
||||
// OFFSET: LEGO1 0x100c98c0
|
||||
MxDSStill::MxDSStill()
|
||||
{
|
||||
// TODO
|
||||
this->SetType(MxDSType_Still);
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100c9a70
|
||||
MxDSStill::~MxDSStill()
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user