Added loader for Full Tilt .dat files, v1.

Works with some data hacks in lowest resolution.
Seems to work ok, even though BL is still 3DPB.
This commit is contained in:
Muzychenko Andrey
2021-01-31 17:29:53 +03:00
parent 6ff457eb68
commit 49f6132d23
18 changed files with 205 additions and 48 deletions
+7 -2
View File
@@ -37,8 +37,9 @@ int pb::init()
++memory::critical_allocation;
lstrcpyA(datFileName, winmain::DatFileName);
//lstrcpyA(datFileName, "cadet.dat");
pinball::make_path_name(dataFilePath, datFileName, 300);
record_table = partman::load_records(dataFilePath);
record_table = partman::load_records(dataFilePath, 0, strstr(datFileName, "cadet"));
auto useBmpFont = 0;
pinball::get_rc_int(158, &useBmpFont);
@@ -55,6 +56,10 @@ int pb::init()
auto backgroundBmp = (gdrv_bitmap8*)partman::field_labeled(record_table, "background", datFieldTypes::Bitmap8bit);
auto cameraInfo = (float*)partman::field_labeled(record_table, "camera_info", datFieldTypes::FloatArray);
/*Full tilt hack - table size is hardcoded*/
if (!tableSize)
tableSize = new short[2]{600, 800};
if (cameraInfo)
{
memcpy(&projMat, cameraInfo, sizeof(float) * 4 * 3);
@@ -545,7 +550,7 @@ void pb::end_game()
scores[j] = scores[i];
scores[i] = score;
int index = scoreIndex[j];
int index = scoreIndex[j];
scoreIndex[j] = scoreIndex[i];
scoreIndex[i] = index;
}