Skip to content

Commit

Permalink
Make Gothic 1 build compile
Browse files Browse the repository at this point in the history
  • Loading branch information
kirides committed Dec 16, 2019
1 parent c671c04 commit 6070c10
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions D3D11Engine/GothicAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,11 +482,11 @@ void GothicAPI::OnGeometryLoaded(zCPolygon * *polys, unsigned int numPolygons) {
WorldConverter::ConvertWorldMesh(polys, numPolygons, &WorldSections, LoadedWorldInfo.get(), &WrappedWorldMesh);
#else
if (Toolbox::FileExists(worldStr)) {
WorldConverter::LoadWorldMeshFromFile(worldStr, &WorldSections, LoadedWorldInfo, &WrappedWorldMesh);
WorldConverter::LoadWorldMeshFromFile(worldStr, &WorldSections, LoadedWorldInfo.get(), &WrappedWorldMesh);
LoadedWorldInfo->CustomWorldLoaded = true;
}
else {
WorldConverter::ConvertWorldMesh(polys, numPolygons, &WorldSections, LoadedWorldInfo, &WrappedWorldMesh);
WorldConverter::ConvertWorldMesh(polys, numPolygons, &WorldSections, LoadedWorldInfo.get(), &WrappedWorldMesh);
}
#endif
LogInfo() << "Done extracting world!";
Expand Down Expand Up @@ -2446,8 +2446,8 @@ void GothicAPI::CollectVisibleVobs(std::vector<VobInfo*> & vobs, std::vector<Vob
if (it->VisualInfo && ((dist < vobIndoorDist && it->IsIndoorVob) || (dist < vobOutdoorSmallDist && it->VisualInfo->MeshSize < vobSmallSize) || (dist < vobOutdoorDist))) {
#ifdef BUILD_GOTHIC_1_08k
// TODO: This is sometimes nullptr, suggesting that the Vob is invalid. Why does this happen?
if (!(*it)->VobConstantBuffer) {
removeList.push_back((*it));
if (!it->VobConstantBuffer) {
removeList.push_back(it);
continue;
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion D3D11Engine/zCModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ class zCModel : public zCVisual
DirectX::SimpleMath::Vector3 GetModelScale()
{
#ifdef BUILD_GOTHIC_1_08k
return D3DXVECTOR3(1, 1, 1);
return DirectX::SimpleMath::Vector3::One;
#endif

return *(DirectX::SimpleMath::Vector3 *)THISPTR_OFFSET(GothicMemoryLocations::zCModel::Offset_ModelScale);
Expand Down

0 comments on commit 6070c10

Please sign in to comment.