Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/WolfireGames/overgrowth.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorredruin1 <tfschaefer222@gmail.com>2022-10-24 13:48:07 +0300
committerredruin1 <tfschaefer222@gmail.com>2022-10-24 13:48:07 +0300
commit111453eed480589c30fbf3e3cd27d3de50554595 (patch)
treec9d05b394cbb269431d573644ff7579645210609
parentf98639fc7d78f1636bd1967c9c03523aa3b9d921 (diff)
formatting fixes
-rw-r--r--Source/AI/navmesh.cpp14
-rw-r--r--Source/Asset/Asset/image_sampler.cpp2
-rw-r--r--Source/Internal/assetpreload.cpp2
-rw-r--r--Source/Internal/zip_util.cpp4
-rw-r--r--Source/Objects/object.cpp2
5 files changed, 12 insertions, 12 deletions
diff --git a/Source/AI/navmesh.cpp b/Source/AI/navmesh.cpp
index 2f0d2e95..751e3c89 100644
--- a/Source/AI/navmesh.cpp
+++ b/Source/AI/navmesh.cpp
@@ -566,15 +566,15 @@ void NavMesh::Save(const string& level_name, const Path& level_path) {
string nav_path = GenerateParallelPath("Data/Levels", "Data/LevelNavmeshes", ".nav", level_path);
- if (config["allow_game_dir_save"].toBool() == false) { // change save location to user directory
+ if (config["allow_game_dir_save"].toBool() == false) { // change save location to user directory
nav_path = AssemblePath(GetWritePath(level_path.GetModsource()), nav_path);
}
- char zip_path[kPathSize]; // Path of the outermost file
+ char zip_path[kPathSize]; // Path of the outermost file
FormatString(zip_path, kPathSize, "%s.zip", nav_path.c_str());
- char in_zip_file_name[kPathSize]; // Name of the file inside the outermost zip file
- FormatString(in_zip_file_name, kPathSize, "%s.nav", level_name.c_str()); // used to be .zip
+ char in_zip_file_name[kPathSize]; // Name of the file inside the outermost zip file
+ FormatString(in_zip_file_name, kPathSize, "%s.nav", level_name.c_str()); // used to be .zip
LOGI << "Saving nav mesh to " << zip_path << endl;
@@ -840,11 +840,11 @@ bool NavMesh::LoadFromAbs(const Path& level_path, const char* abs_meta_path, con
PROFILER_ZONE(g_profiler_ctx, "handleMeshChanged");
sample_tile_mesh_.handleMeshChanged(&geom_);
}
-
+
{
- if (has_zip) { // Attempt to load data from the zip file
+ if (has_zip) { // Attempt to load data from the zip file
ExpandedZipFile ezf;
- UnZip(abs_zip_path, ezf);
+ UnZip(abs_zip_path, ezf);
LOGI << "success!" << std::endl;
diff --git a/Source/Asset/Asset/image_sampler.cpp b/Source/Asset/Asset/image_sampler.cpp
index 19cc5007..f8c6cec7 100644
--- a/Source/Asset/Asset/image_sampler.cpp
+++ b/Source/Asset/Asset/image_sampler.cpp
@@ -119,7 +119,7 @@ int ImageSampler::Load(const std::string& path, uint32_t load_flags) {
// stbi will always ensure that the total output channels will match the specified (4); 'n' will contain the source images' channels
// So we only need to throw an error if the data doesn't exist, it's format is guaranteed
- if (data == nullptr) { // || n != 4
+ if (data == nullptr) { // || n != 4
return kLoadErrorGeneralFileError;
}
diff --git a/Source/Internal/assetpreload.cpp b/Source/Internal/assetpreload.cpp
index 9d661f71..42818bd0 100644
--- a/Source/Internal/assetpreload.cpp
+++ b/Source/Internal/assetpreload.cpp
@@ -49,7 +49,7 @@ void AssetPreload::Initialize() {
// Before we load any assets (in preload or otherwise):
// We set stb_image to flip images vertically to load them how Overgrowth expects (positive Y)
stbi_set_flip_vertically_on_load(true);
-
+
// Now we can finish preloading
Reload();
}
diff --git a/Source/Internal/zip_util.cpp b/Source/Internal/zip_util.cpp
index 4b4623c3..a4722931 100644
--- a/Source/Internal/zip_util.cpp
+++ b/Source/Internal/zip_util.cpp
@@ -416,7 +416,7 @@ void UnZipFile::ExtractAll(ExpandedZipFile& expanded_zip_file) {
unsigned entry_id = 0;
unsigned data_offset = 0;
unsigned filename_offset = 0;
- ScopedBuffer scoped_buf(size_buf); // Raw malloc temp data scoped to be less dangerous
+ ScopedBuffer scoped_buf(size_buf); // Raw malloc temp data scoped to be less dangerous
err = unzGoToFirstFile(uf);
if (err != UNZ_OK) {
@@ -458,7 +458,7 @@ void UnZipFile::ExtractAll(ExpandedZipFile& expanded_zip_file) {
char zero = '\0';
expanded_zip_file.SetData(data_offset, &zero, 1);
++data_offset;
-
+
err = unzCloseCurrentFile(uf);
if (err != UNZ_OK) {
FatalError("Unzip Error", "Unable to close current file (Error Code: %d)", err);
diff --git a/Source/Objects/object.cpp b/Source/Objects/object.cpp
index 60d1c37e..11dfbf9d 100644
--- a/Source/Objects/object.cpp
+++ b/Source/Objects/object.cpp
@@ -312,7 +312,7 @@ void Object::GetDesc(EntityDescription &desc) const {
void Object::ReceiveObjectMessage(OBJECT_MSG::Type type, ...) {
va_list args;
- va_start(args, type); // FIXME: this is kinda grotesque; there's gotta be a better way!
+ va_start(args, type);
ReceiveObjectMessageVAList(type, args);
va_end(args);
}