2020-11-01 15:45:29 +00:00
|
|
|
#pragma once
|
|
|
|
#include "TPinballComponent.h"
|
2021-01-01 13:14:11 +00:00
|
|
|
|
|
|
|
struct gdrv_bitmap8;
|
|
|
|
|
2021-01-29 13:42:05 +00:00
|
|
|
struct flasher_type
|
2021-01-01 13:14:11 +00:00
|
|
|
{
|
|
|
|
render_sprite_type_struct* Sprite;
|
|
|
|
gdrv_bitmap8* BmpArr[2];
|
|
|
|
int Unknown3;
|
|
|
|
int Unknown4;
|
|
|
|
float TimerDelay[2];
|
|
|
|
int Timer;
|
|
|
|
int BmpIndex;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2021-01-29 13:42:05 +00:00
|
|
|
struct TLight_player_backup
|
2021-01-01 13:14:11 +00:00
|
|
|
{
|
|
|
|
int MessageField;
|
|
|
|
int BmpIndex1;
|
|
|
|
int FlasherActive;
|
|
|
|
int Unknown3;
|
|
|
|
int Unknown4;
|
|
|
|
int BmpIndex2;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2020-11-01 15:45:29 +00:00
|
|
|
class TLight :
|
2021-01-01 13:14:11 +00:00
|
|
|
public TPinballComponent
|
2020-11-01 15:45:29 +00:00
|
|
|
{
|
|
|
|
public:
|
2021-01-01 13:14:11 +00:00
|
|
|
TLight(TPinballTable* table, int groupIndex);
|
|
|
|
int Message(int code, float value) override;
|
|
|
|
void Reset();
|
|
|
|
void schedule_timeout(float time);
|
|
|
|
|
|
|
|
static void TimerExpired(int timerId, void* caller);
|
|
|
|
static void flasher_stop(flasher_type* flash, int bmpIndex);
|
|
|
|
static void flasher_start(struct flasher_type* flash, int bmpIndex);
|
|
|
|
static void flasher_callback(int timerId, void* caller);
|
2020-11-01 15:45:29 +00:00
|
|
|
|
2021-01-01 13:14:11 +00:00
|
|
|
flasher_type Flasher;
|
|
|
|
int BmpIndex1;
|
|
|
|
int FlasherActive;
|
|
|
|
int FlasherFlag1;
|
|
|
|
int FlasherFlag2;
|
2021-01-28 15:01:26 +00:00
|
|
|
int TurnOffAfterFlashingFg;
|
2021-01-01 13:14:11 +00:00
|
|
|
int BmpIndex2;
|
|
|
|
float FlasherDelay[2];
|
|
|
|
int Timer1;
|
|
|
|
int Timer2;
|
|
|
|
int Unknown19;
|
|
|
|
float Unknown20F;
|
|
|
|
TLight_player_backup PlayerData[4];
|
|
|
|
};
|