Move hamdata.ini to gamedata (#597)

* Replace atoi by strtol in the config parser

* Move hamdata.ini data to gamedata files

* Reference the new files in master file

* Remove all the parsing code and use config manager to get the offsets

* Remove any hamdata.ini references
This commit is contained in:
Vincent Herbet
2018-09-28 16:51:54 +02:00
committed by GitHub
parent 8717ffe07c
commit f82455dd84
21 changed files with 11856 additions and 5090 deletions

View File

@ -325,16 +325,16 @@ SMCResult CGameConfig::ReadSMC_KeyValue(const SMCStates *states, const char *key
}
else if (!strcmp(key, "size"))
{
TempType.fieldSize = ke::Max<int>(0, atoi(value));
TempType.fieldSize = ke::Max<int>(0, strtol(value, nullptr, 0));
}
else if (!strcmp(key, "unsigned"))
{
TempType.fieldUnsigned = !!atoi(value);
TempType.fieldUnsigned = !!strtol(value, nullptr, 0);
}
else if (g_LibSys.IsPlatformCompatible(key, &m_MatchedPlatform))
{
m_FoundOffset = true;
TempType.fieldOffset = atoi(value);
TempType.fieldOffset = strtol(value, nullptr, 0);
}
break;
}
@ -397,7 +397,7 @@ SMCResult CGameConfig::ReadSMC_KeyValue(const SMCStates *states, const char *key
if (m_AddressReadCount < limit)
{
m_AddressRead[m_AddressReadCount] = atoi(value);
m_AddressRead[m_AddressReadCount] = strtol(value, nullptr, 0);
m_AddressReadCount++;
}
else