载入中...
搜索中...
未找到
Presentation.h 文件参考

Presentation intents derived from the battle event stream, with an explicit undo. 更多...

#include "common/Result.h"
#include "tactics/TacticsTypes.h"
#include <cstdint>
#include <map>
#include <string_view>
#include <vector>

浏览源代码.

类

struct  eve::tactics::PresentationIntent
 One presentation instruction: what to show, where, and until when. 更多...
 
struct  eve::tactics::PresentationRevert
 The explicit undo contract for one intent. 更多...
 
struct  eve::tactics::PresentationCommand
 One intent together with the way to take it back. 更多...
 
struct  eve::tactics::PresentationFrame
 What the projector knows about the battle beyond the event itself. 更多...
 
class  eve::tactics::PresentationProjector
 Projects authoritative events into bounded, revertible presentation intents. 更多...
 

命名空间

namespace  eve
 Build metadata (engine git commit, build time, third-party version).
 
namespace  eve::tactics
 

枚举

enum class  eve::tactics::UnitVisualState : std::uint8_t {
  eve::tactics::Idle , eve::tactics::Friendly , eve::tactics::Selected , eve::tactics::Finished ,
  eve::tactics::Targetable , eve::tactics::Attacking , eve::tactics::Defending , eve::tactics::Moving ,
  eve::tactics::Destroyed
}
 How a consumer should draw one unit. 更多...
 
enum class  eve::tactics::PresentationRevertTrigger : std::uint8_t { eve::tactics::Never , eve::tactics::OnExpiry , eve::tactics::OnNextTurn , eve::tactics::OnRoundStart }
 What makes a presentation intent stop being true. 更多...
 

函数

std::string_view eve::tactics::unitVisualStateName (UnitVisualState state) noexcept
 Human-readable stable spelling of a visual state (protocol text).
 
std::string_view eve::tactics::presentationRevertTriggerName (PresentationRevertTrigger trigger) noexcept
 Human-readable stable spelling of a revert trigger (protocol text).
 

详细描述

Presentation intents derived from the battle event stream, with an explicit undo.

The gap this closes: a turn-based framework normally drives highlights and animations by mutating view objects (MarkAsSelected, MarkAsAttacking, MarkAsDestroyed, …) with no statement of when that state stops being true. The result is the classic stale highlight: a unit stays "selected" or "targetable" after the world moved on, because nothing owned the transition back.

Here presentation is data: a projection of the authoritative event stream into PresentationIntent values, each carrying the revision it came from, a tick after which it is stale, and a PresentationRevert that says — explicitly — how and when to take it back. Nothing in this header touches graphics, so the tactics module stays render-free and a renderer (or a test) is just another consumer.

在文件 Presentation.h 中定义.