Files
Dreierpack-Manager/src/game/reality_setup.hpp
T
ClaudeandClaude Sonnet 5.5 287b5a9251 Add header comments to the source files
Every source file in ui, app, game, formats, cli, audio and launch that had none
now starts with a short English comment: what it implements, what state it owns
and how it relates to its neighbours (request/acknowledge flow, pairs of files,
random generator use). Comment lines only; the full build and the runnable
tests are unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-06 09:15:23 +01:00

40 lines
1.6 KiB
C++

// SPDX-License-Identifier: GPL-3.0-only
// Interface of the Reality scene setup: formations, placement and RealitySetup types and the
// functions implemented in reality_setup.cpp.
#pragma once
#include "game/reality_motion.hpp"
#include "game/state.hpp"
#include <optional>
namespace bmh {
using RealityFormations = std::array<std::array<std::pair<int,int>,11>,2>;
struct RealityPlacement {
int player = 0, squad_slot = -1, card_value = 0;
int center_x = 0, center_y = 0;
int min_x = 0, max_x = 0, min_y = 0, max_y = 0;
};
struct RealitySetup {
RealityGrid grid;
RealityMotionInput motion;
std::array<RealityPlacement,22> players{};
std::array<std::array<uint8_t,7>,2> tactics{};
std::array<int,2> teams{};
int attacking_side = 0;
bool ready = false;
};
// RealityMarkedPosition, shared by initialization and subsequent defensive movement.
std::optional<std::pair<int,int>> reality_marked_position(const GameState&, const RealitySetup&, int figure);
// Int2's interleaved prepared positions, supplied separately to the scene.
RealityFormations reality_formations(const GameState&, const std::array<int,2>& teams);
// RealityReporterPanel profile preparation + FormatError4 + initial sprite phases. This is a
// simulation operation: it consumes the real RNGs and can update board fatigue.
// It is not called by a renderer and is not yet connected to MatchEngine::side.
void initialize_reality(GameState&, const std::array<int,2>& teams, int attacking_side,
const RealityFormations&, const LeImage&, WatcomRandom&, GameRandom&, RealitySetup&);
} // namespace bmh