2020-11-06 14:56:32 +01:00
|
|
|
#pragma once
|
2020-12-12 14:36:20 +01:00
|
|
|
#include "high_score.h"
|
2020-11-29 16:50:49 +01:00
|
|
|
#include "partman.h"
|
2020-11-06 14:56:32 +01:00
|
|
|
#include "TPinballTable.h"
|
|
|
|
|
2021-01-06 15:06:13 +01:00
|
|
|
class TBall;
|
|
|
|
|
2020-11-06 14:56:32 +01:00
|
|
|
class pb
|
|
|
|
{
|
|
|
|
public:
|
2020-11-29 16:50:49 +01:00
|
|
|
static int time_ticks;
|
2021-01-18 16:30:19 +01:00
|
|
|
static float ball_speed_limit, time_now, time_next;
|
2020-12-02 18:12:34 +01:00
|
|
|
static int cheat_mode, game_mode;
|
2020-11-29 16:50:49 +01:00
|
|
|
static datFileStruct* record_table;
|
|
|
|
static TPinballTable* MainTable;
|
2021-01-20 15:28:48 +01:00
|
|
|
static high_score_struct highscore_table[5];
|
2021-02-06 14:53:47 +01:00
|
|
|
static bool FullTiltMode;
|
2020-11-29 16:50:49 +01:00
|
|
|
|
2021-08-27 12:29:41 +02:00
|
|
|
static int init(SDL_Renderer* render);
|
2020-12-04 16:35:47 +01:00
|
|
|
static int uninit();
|
2020-11-06 14:56:32 +01:00
|
|
|
static void reset_table();
|
|
|
|
static void firsttime_setup();
|
2020-11-07 16:41:14 +01:00
|
|
|
static void paint();
|
2020-11-29 16:50:49 +01:00
|
|
|
static void mode_change(int mode);
|
|
|
|
static void toggle_demo();
|
|
|
|
static void replay_level(int demoMode);
|
|
|
|
static void ballset(int x, int y);
|
|
|
|
static int frame(int time);
|
2021-01-06 15:06:13 +01:00
|
|
|
static void timed_frame(float timeNow, float timeDelta, bool drawBalls);
|
2020-12-02 18:12:34 +01:00
|
|
|
static void window_size(int* width, int* height);
|
|
|
|
static void pause_continue();
|
|
|
|
static void loose_focus();
|
|
|
|
static void keyup(int key);
|
|
|
|
static void keydown(int key);
|
|
|
|
static int mode_countdown(int time);
|
|
|
|
static void launch_ball();
|
2021-01-06 15:06:13 +01:00
|
|
|
static void end_game();
|
2020-12-02 18:12:34 +01:00
|
|
|
static void high_scores();
|
2020-12-27 16:19:36 +01:00
|
|
|
static void tilt_no_more();
|
|
|
|
static bool chk_highscore();
|
2021-01-06 15:06:13 +01:00
|
|
|
static float collide(float timeNow, float timeDelta, TBall* ball);
|
2021-02-06 14:53:47 +01:00
|
|
|
private:
|
2020-12-02 18:12:34 +01:00
|
|
|
static int demo_mode, mode_countdown_;
|
2020-12-06 14:21:56 +01:00
|
|
|
static int state;
|
2020-11-06 14:56:32 +01:00
|
|
|
};
|