1#ifndef NANOMMO_TOOLS_CINEMA_FILM_H_
2#define NANOMMO_TOOLS_CINEMA_FILM_H_
9#include "absl/status/statusor.h"
11#include "protocol/nanommo.pb.h"
13#include "tools/cinema/film.pb.h"
18absl::StatusOr<Film>
ReadFilm(
const std::string& path);
21int LandOf(
const Shot& shot);
27float SpeedAt(
const Shot& shot,
float seconds);
33 explicit Clock(
const Shot& shot) : shot_(shot), game_(shot.from()) {}
38 float film()
const {
return film_; }
39 float game()
const {
return game_; }
49Vector3
Place(
const Point& point,
const Terrain& terrain);
53Camera3D
CameraAt(
const Shot& shot,
float seconds,
bool tall,
67 protocol::World
At(
float game);
76 protocol::Motion motion = protocol::MOTION_IDLE;
78 Vector2 pushed_from{};
80 float pushed_at = -1.0f;
93 Blow BlowOf(
const Player& player,
const Cast& cast)
const;
96 Vector2 PlayerAt(
int player,
float game)
const;
98 void Step(
float from,
float to);
99 void Land(
int player,
const Cast& cast,
float game);
103 std::vector<Foe> foes_;
float Advance(float seconds)
Moves the film on by the seconds, and gives how far the game moved.
Stage(const Shot &shot, const Content &content)
protocol::World At(float game)
Camera3D CameraAt(const Shot &shot, float seconds, bool tall, const Terrain &terrain)
Vector3 Place(const Point &point, const Terrain &terrain)
float SpeedAt(const Shot &shot, float seconds)
How fast the game runs at that second of the shot.
int LandOf(const Shot &shot)
The land a shot is in, by its place in kLands.
Terrain TerrainOf(int land)
The land's terrain, as the server builds it for the first world.
absl::StatusOr< Film > ReadFilm(const std::string &path)
The shots in a text file, as the content files are written.