From c0c336500955a23e344651e5412c9d9d441ef4ee Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Wed, 28 Jun 2023 22:22:32 +0100 Subject: first pass of T2DLL --- src/T2DLL/T2PoolDef.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/T2DLL/T2PoolDef.cpp') diff --git a/src/T2DLL/T2PoolDef.cpp b/src/T2DLL/T2PoolDef.cpp index 8dba974..c60afbb 100644 --- a/src/T2DLL/T2PoolDef.cpp +++ b/src/T2DLL/T2PoolDef.cpp @@ -1,5 +1,6 @@ #include "CResFile.h" #include "T2PoolDef.h" +#include "T2WorldPlugin.h" T2PoolTimeZoneDef::T2PoolTimeZoneDef(CResFile &resFile) { Initialize(); @@ -132,8 +133,7 @@ T2PoolDef::~T2PoolDef() { } HINSTANCE T2PoolDef::GetModuleHandle() { - // TODO T2WorldPlugin - return 0; + return mWorldPlugin->mModuleHandle; } DemandInfo *T2PoolDef::GetDemandInfo(unsigned int index) const { @@ -143,10 +143,10 @@ DemandInfo *T2PoolDef::GetDemandInfo(unsigned int index) const { return info; } -int T2PoolDef::GetGradeDefResID(unsigned int index) const { - int resID = 0; - int index0 = index - 1; - if (index0 < 5) - resID = mGradeDefResID[index0]; - return resID; +int T2PoolDef::GetGradeDefResID(unsigned int inIndex) const { + int theResID = 0; + unsigned int index = inIndex - 1; + if (index < 5) + theResID = mGradeDefResID[index]; + return theResID; } -- cgit v1.2.3