36 std::vector<File> files;
38 for (
auto& f : files) {
43 auto i =
images.size() - 1;
46 paths.emplace_back(path);
47 auto p =
paths.size() - 1;
49 if (
scripts.at(s).load(f.getPath()) != 0) {
55 std::vector<File> texFiles;
56 paths.at(p).findRecursiveFilesEndingWith(texFiles,
".pcx");
57 paths.at(p).findRecursiveFilesEndingWith(texFiles,
".bmp");
58 paths.at(p).findRecursiveFilesEndingWith(texFiles,
".png");
59 paths.at(p).findRecursiveFilesEndingWith(texFiles,
".tga");
60 paths.at(p).findRecursiveFilesEndingWith(texFiles,
".jpg");
62 if (texFiles.size() > 0) {
101 headingSize.x *= 3.0f; headingSize.y *= 3.0f;
108 const bool browseButtonPressed =
ImGui::Button(
"Select Level File");
109 if (browseButtonPressed) {
110 if (dialog !=
nullptr)
118 if (selectedFile.length() > 0) {
137 static bool offsets =
false;
145 for (
int i = 0; i <
scripts.size(); i++) {
165 std::vector<File> levelFiles;
166 paths.at(i).findRecursiveFilesEndingWith(levelFiles,
168 if (levelFiles.size() == 0) {
224 ImGui::TextWrapped(
"OpenRaiders built-in TombRaider-Script detection mechanism could not find any suitable TR2/TR3 script files (called \"TOMBPC.DAT\") in your PAK folder \"%s\"! Use the \"Select Level File\" Button to load a single level without starting the entire game.",
static void setVisible(bool v)
unsigned int titleCount()
const char * chooseFileDialog(bool dialogTriggerButton, const char *directory=NULL, const char *fileFilterExtensionString=NULL, const char *windowTitle=NULL, const ImVec2 &windowSize=ImVec2(-1,-1), const ImVec2 &windowPos=ImVec2(-1,-1), const float windowAlpha=0.875f)
std::string convertPathDelimiter(std::string s)
String handling utilities.
IMGUI_API void SetWindowPos(const ImVec2 &pos, ImGuiSetCond cond=0)
int randomInteger(int max, int min=0)
IMGUI_API void NextColumn()
std::string getTitleFilename(unsigned int i)
IMGUI_API void SetColumnOffset(int column_index, float offset_x)
static std::string getPakDir()
IMGUI_API void TextWrapped(const char *fmt,...)
IMGUI_API ImVec2 GetMousePos()
std::string getLevelFilename(unsigned int i)
std::string getLevelName(unsigned int i)
static LogLevel & get(int level)
static int loadImage(std::string filename, TextureStorage s=TextureStorage::GAME, int slot=-1)
const char * getChosenPath() const
IMGUI_API void TextColored(const ImVec4 &col, const char *fmt,...)
IMGUI_API bool Button(const char *label, const ImVec2 &size=ImVec2(0, 0), bool repeat_when_held=false)
unsigned int pictureCount()
IMGUI_API void SetWindowFontScale(float scale)
static BufferManager * getBufferManager(int tex, TextureStorage store)
void findRecursiveFilesEndingWith(std::vector< File > &found, std::string end, bool casesensitive=false)
Runtime Configuration Storage.
std::string removeLastPathElement(std::string s)
IMGUI_API void Columns(int count=1, const char *id=NULL, bool border=true)
IMGUI_API void SameLine(int column_x=0, int spacing_w=-1)
unsigned int videoCount()
std::string getLanguage()
std::string getDescription()
IMGUI_API ImVec2 CalcTextSize(const char *text, const char *text_end=NULL, bool hide_text_after_double_hash=false, float wrap_width=-1.0f)
IMGUI_API void SetWindowSize(const ImVec2 &size, ImGuiSetCond cond=0)
IMGUI_API void Separator()
IMGUI_API void Image(ImTextureID user_texture_id, const ImVec2 &size, const ImVec2 &uv0=ImVec2(0, 0), const ImVec2 &uv1=ImVec2(1, 1), const ImVec4 &tint_col=ImVec4(1, 1, 1, 1), const ImVec4 &border_col=ImVec4(0, 0, 0, 0))
unsigned int cutsceneCount()
std::string getPictureFilename(unsigned int i)
static int loadLevel(std::string level)
unsigned int levelCount()
Random number generation.
static void setVisible(bool v)
std::string getCutsceneFilename(unsigned int i)
IMGUI_API bool Begin(const char *name="Debug", bool *p_opened=NULL, const ImVec2 &initial_size=ImVec2(0, 0), float bg_alpha=-1.0f, ImGuiWindowFlags flags=0)
std::string getLastPathElement(std::string s)
std::string getVideoFilename(unsigned int i)
static glm::i32vec2 getSize()
IMGUI_API bool TreeNode(const char *str_label_id)
IMGUI_API void PushID(const char *str_id)