diff options
Diffstat (limited to '')
-rw-r--r-- | src/worldmap.cpp | 43 |
1 files changed, 3 insertions, 40 deletions
diff --git a/src/worldmap.cpp b/src/worldmap.cpp index cd43a47..dd027f0 100644 --- a/src/worldmap.cpp +++ b/src/worldmap.cpp @@ -174,6 +174,9 @@ bool WMInit_SetupExtra(void *ptr) { wm->player->modelHandler->mdlClass->startAnimation(0, 1.2f, 10.0f, 0.0f);
wm->player->pos = wm->currentPoint->position;
+ // is last param correct? must check :/
+ wm->map = (dWMMap_c*)CreateParentedObject(WM_MAP, wm, 0, 0);
+
return true;
}
@@ -299,8 +302,6 @@ int dScNewerWorldMap_c::onCreate() { levelInfoFile.open("/NewerRes/LevelInfo.bin");
levelInfo.load(levelInfoFile.ptr());
- LoadModel();
-
return true;
}
@@ -753,45 +754,7 @@ int dScNewerWorldMap_c::onExecute() { return true;
}
-int dScNewerWorldMap_c::onDraw() {
- this->model.scheduleForDrawing();
-
- return true;
-}
-
-
-
-// Todo: move to .LZ files and dDvd::loader_c and WM_MAP
-
-void dScNewerWorldMap_c::LoadModel() {
- MapReport("Loading Goldwood model...\n");
- modelFile.openCompressed("/Maps/SMGoldwood_bLZ.brres");
- nw4r::g3d::ResFile resfile(modelFile.ptr());
-
- if (!resfile.CheckRevision())
- MapReport("Warning: Revision check failed!\n");
-
- resfile.Init();
-
- if (!resfile.Bind(resfile))
- MapReport("Warning: ResFile bind failed!\n");
-
- void *mdl = resfile.GetResMdl("GoldwoodBase");
- MapReport("Obtained ResMdl: %p\n", mdl);
-
- MapReport(this->allocator.link(-1, GameHeaps[0], 0, 0x20) ? "Success\n" : "Fail\n");
- MapReport(this->model.setup(&mdl, &this->allocator, 0, 1, 0) ? "Success\n" : "Fail\n");
-
- SetupTextures_Map(&model, 1);
-
- this->allocator.unlink();
- MapReport("Done loading model!\n");
-
- Mtx asdf;
- MTXIdentity(asdf);
- this->model.setDrawMatrix(asdf);
-}
void dScNewerWorldMap_c::HandleMovement() {
|