1
0
Fork 0
mirror of https://github.com/k4zmu2a/SpaceCadetPinball.git synced 2025-09-06 08:20:15 +02:00

Added table resolution support.

Only works with FT .dat file.
FT music does not work - different format.
This commit is contained in:
Muzychenko Andrey 2021-02-06 16:53:47 +03:00
parent d594f5fdb7
commit 1c5256a4c6
20 changed files with 353 additions and 64 deletions

View file

@ -2,9 +2,11 @@
#include "TBall.h"
#include "fullscrn.h"
#include "loader.h"
#include "maths.h"
#include "objlist_class.h"
#include "pb.h"
#include "proj.h"
#include "render.h"
#include "TPinballTable.h"
@ -12,6 +14,7 @@
TBall::TBall(TPinballTable* table) : TPinballComponent(table, -1, false)
{
visualStruct visual{};
char ballGroupName[10]{"ball"};
TimeNow = 0.0;
RayMaxDistance = 0.0;
@ -30,11 +33,12 @@ TBall::TBall(TPinballTable* table) : TPinballComponent(table, -1, false)
Position.Y = 0.0;
ListBitmap = new objlist_class<gdrv_bitmap8>(0, 4);
auto groupIndex = loader::query_handle("ball");
/*Full tilt hack - ball is ball0*/
if (groupIndex < 0)
groupIndex = loader::query_handle("ball0");
/*Full tilt: ball is ballN, where N[0,2] resolution*/
if (pb::FullTiltMode)
ballGroupName[4] = '0' + fullscrn::GetResolution();
auto groupIndex = loader::query_handle(ballGroupName);
Offset = *loader::query_float_attribute(groupIndex, 0, 500);
auto visualCount = loader::query_visual_states(groupIndex);
auto index = 0;