mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-05 19:31:04 +00:00
45 lines
935 B
C++
45 lines
935 B
C++
// Luanti
|
|
// SPDX-License-Identifier: LGPL-2.1-or-later
|
|
// Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
|
|
|
#pragma once
|
|
|
|
#include "irrlichttypes.h"
|
|
#include "config.h"
|
|
#include <string>
|
|
|
|
#if !IS_CLIENT_BUILD
|
|
#error Do not include in server builds
|
|
#endif
|
|
|
|
class InputHandler;
|
|
class ChatBackend;
|
|
class RenderingEngine;
|
|
struct SubgameSpec;
|
|
struct GameStartData;
|
|
|
|
struct Jitter {
|
|
f32 max, min, avg, counter, max_sample, min_sample, max_fraction;
|
|
};
|
|
|
|
struct RunStats {
|
|
u64 drawtime; // (us)
|
|
|
|
Jitter dtime_jitter, busy_time_jitter;
|
|
};
|
|
|
|
struct CameraOrientation {
|
|
f32 camera_yaw; // "right/left"
|
|
f32 camera_pitch; // "up/down"
|
|
};
|
|
|
|
#define GAME_FALLBACK_TIMEOUT 1.8f
|
|
#define GAME_CONNECTION_TIMEOUT 10.0f
|
|
|
|
void the_game(bool *kill,
|
|
InputHandler *input,
|
|
RenderingEngine *rendering_engine,
|
|
const GameStartData &start_data,
|
|
std::string &error_message,
|
|
ChatBackend &chat_backend,
|
|
bool *reconnect_requested);
|