Reverse-engineered reimplementation of 3D Pinball for Windows - Space Cadet from k4zmu2a/SpaceCadetPinball (MIT), upstream cb9b7b8, vendored rather than submoduled so local patches are just edits. - CMakeLists: stop hard-setting CMAKE_OSX_ARCHITECTURES so the documented -D override works; brew's SDL2 is arm64-only and universal linking failed. - gitignore original .DAT/.MID assets, which are not ours to redistribute. - CLAUDE.md: build line, upstream deviation, and where game data goes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
47 lines
1.0 KiB
C++
47 lines
1.0 KiB
C++
#pragma once
|
|
#include "TPinballComponent.h"
|
|
|
|
struct TLight_player_backup
|
|
{
|
|
int MessageField;
|
|
bool LightOnFlag;
|
|
int LightOnBmpIndex;
|
|
bool FlasherOnFlag;
|
|
};
|
|
|
|
|
|
class TLight :
|
|
public TPinballComponent
|
|
{
|
|
public:
|
|
TLight(TPinballTable* table, int groupIndex);
|
|
int Message(MessageCode code, float value) override;
|
|
void Reset();
|
|
void schedule_timeout(float time);
|
|
void flasher_stop(int bmpIndex);
|
|
void flasher_start(bool bmpIndex);
|
|
void SetSpriteBmp(int index);
|
|
bool light_on() const;
|
|
|
|
static void TimerExpired(int timerId, void* caller);
|
|
static void flasher_callback(int timerId, void* caller);
|
|
static void UndoTmpOverride(int timerId, void* caller);
|
|
|
|
int BmpArr[2]{-1};
|
|
float FlashDelay[2]{};
|
|
int FlashTimer;
|
|
bool FlashLightOnFlag{};
|
|
bool LightOnFlag{};
|
|
bool FlasherOnFlag;
|
|
bool ToggledOffFlag{};
|
|
bool ToggledOnFlag{};
|
|
bool TurnOffAfterFlashingFg{};
|
|
int LightOnBmpIndex{};
|
|
float SourceDelay[2]{};
|
|
int TimeoutTimer;
|
|
int UndoOverrideTimer;
|
|
bool TemporaryOverrideFlag{};
|
|
int PreviousBitmap = -1;
|
|
TLight_player_backup PlayerData[4]{};
|
|
};
|