Changeset View
Changeset View
Standalone View
Standalone View
source/ps/VisualReplay.h
/* Copyright (C) 2017 Wildfire Games. | /* Copyright (C) 2019 Wildfire Games. | ||||
* This file is part of 0 A.D. | * This file is part of 0 A.D. | ||||
* | * | ||||
* 0 A.D. is free software: you can redistribute it and/or modify | * 0 A.D. is free software: you can redistribute it and/or modify | ||||
* it under the terms of the GNU General Public License as published by | * it under the terms of the GNU General Public License as published by | ||||
* the Free Software Foundation, either version 2 of the License, or | * the Free Software Foundation, either version 2 of the License, or | ||||
* (at your option) any later version. | * (at your option) any later version. | ||||
* | * | ||||
* 0 A.D. is distributed in the hope that it will be useful, | * 0 A.D. is distributed in the hope that it will be useful, | ||||
Show All 14 Lines | |||||
/** | /** | ||||
* Contains functions for visually replaying past games. | * Contains functions for visually replaying past games. | ||||
*/ | */ | ||||
namespace VisualReplay | namespace VisualReplay | ||||
{ | { | ||||
/** | /** | ||||
* Returns the path to the sim-log directory (that contains the directories with the replay files. | * Returns the absolute path to the sim-log directory (that contains the directories with the replay files. | ||||
* | */ | ||||
* @param scriptInterface - the ScriptInterface in which to create the return data. | OsPath GetDirectoryPath(); | ||||
* @return OsPath the absolute file path | |||||
/** | |||||
* Returns the absolute path to the replay cache file. | |||||
*/ | |||||
OsPath GetCacheFilePath(); | |||||
/** | |||||
* Returns the absolute path to the temporary replay cache file used to | |||||
* always have a valid cache file in place even if bad things happen. | |||||
elexis: -scriptInterface
-return (see comment below) | |||||
*/ | */ | ||||
OsPath GetDirectoryName(); | OsPath GetTempCacheFilePath(); | ||||
/** | /** | ||||
* Replays the commands.txt file in the given subdirectory visually. | * Replays the commands.txt file in the given subdirectory visually. | ||||
*/ | */ | ||||
bool StartVisualReplay(const OsPath& directory); | bool StartVisualReplay(const OsPath& directory); | ||||
/** | /** | ||||
* Reads the replay Cache file and parses it into a jsObject | * Reads the replay Cache file and parses it into a jsObject | ||||
* | * | ||||
* @param scriptInterface - the ScriptInterface in which to create the return data. | * @param scriptInterface - the ScriptInterface in which to create the return data. | ||||
* @param cachedReplaysObject - the cached replays. | * @param cachedReplaysObject - the cached replays. | ||||
Done Inline Actions14 years of merkel were pretty bad (ambiguous description) @return lines consist of the same information of the line above and below it, so IMO unnecessary lines elexis: 14 years of merkel were pretty bad (ambiguous description)
@return lines consist of the same… | |||||
Done Inline Actionsyeah, why not. Imarok: yeah, why not. | |||||
* @return true on succes | * @return true on succes | ||||
*/ | */ | ||||
bool ReadCacheFile(const ScriptInterface& scriptInterface, JS::MutableHandleObject cachedReplaysObject); | bool ReadCacheFile(const ScriptInterface& scriptInterface, JS::MutableHandleObject cachedReplaysObject); | ||||
/** | /** | ||||
* Stores the replay list in the replay cache file | * Stores the replay list in the replay cache file | ||||
* | * | ||||
* @param scriptInterface - the ScriptInterface in which to create the return data. | * @param scriptInterface - the ScriptInterface in which to create the return data. | ||||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
-scriptInterface
-return (see comment below)