jak-project/goalc/make/Tool.h
ManDude af447aeab7
[game] subtitles support (tools + goal + text file). (#1174)
* add subtitles support (tools + goal + text file).

* add to build system proper

* better handling of line speakers

* billy test subtitles

* adjust timings

* better handling of subtitle timing + citadel subs

* press square to toggle cutscene subtitles

* improve DirectRenderer performance

* clang

* dont error out if there's no user files

* make system supports multiple inputs for subtitles

* clang

* oh no typo!!

* avoid future issues

* fix warp gate crash

* remove no longer necessary code in DirectRenderer

* remove temp prints

* delete triplicate code

* i found a better way

* fix make issues with subtitles

* force avx compilation
2022-02-19 13:10:10 -05:00

28 lines
730 B
C++

#pragma once
#include <optional>
#include <string>
#include <vector>
#include "common/goos/Object.h"
struct ToolInput {
std::vector<std::string>& input; // the input file
std::vector<std::string>& deps; // explicit dependencies
std::vector<std::string>& output; // produced output files.
goos::Object arg; // optional argument
};
class Tool {
public:
Tool(const std::string& name);
virtual bool run(const ToolInput& task) = 0;
virtual std::vector<std::string> get_additional_dependencies(const ToolInput&) { return {}; }
virtual bool needs_run(const ToolInput& task);
virtual ~Tool() = default;
const std::string& name() const { return m_name; }
private:
std::string m_name;
};