Skip to content

Commit

Permalink
Merge branch 'main' into ouruin
Browse files Browse the repository at this point in the history
  • Loading branch information
Timbles committed Dec 1, 2024
2 parents 3ab02c0 + 24eff4a commit 75ac95b
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 16 deletions.
20 changes: 20 additions & 0 deletions Data/GLSL/envobject.vert
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,26 @@ void main() {
//max_dist *= 0.25;
int type = instance_id % 83;

#if defined(HEAVEN_MIASMA)
size *= 80.0;

if(type > 0){
size = 0.0;
}
#elif defined(MED)
size *= 1.25;

if(type > 7){
size = 0.0;
}
#elif defined(LOW)
size *= 1.25;

if(type > 2){
size = 0.0;
}
#endif

#elif defined(SNOW)

speed = 0.1;
Expand Down
19 changes: 9 additions & 10 deletions Libraries/imgui-1.85/imgui.h
Original file line number Diff line number Diff line change
Expand Up @@ -1329,7 +1329,7 @@ enum ImGuiDataType_
ImGuiDataType_U64, // unsigned long long / unsigned __int64
ImGuiDataType_Float, // float
ImGuiDataType_Double, // double
ImGuiDataType_COUNT
ImGuiDataType_COUNT // DO NOT place enum values after this, unless they're just aliases for other earlier enum values. This is used for an array size
};

// A cardinal direction
Expand All @@ -1340,7 +1340,7 @@ enum ImGuiDir_
ImGuiDir_Right = 1,
ImGuiDir_Up = 2,
ImGuiDir_Down = 3,
ImGuiDir_COUNT
ImGuiDir_COUNT // DO NOT place enum values after this, unless they're just aliases for other earlier enum values. This is used for an array size
};

// A sorting direction
Expand Down Expand Up @@ -1376,11 +1376,10 @@ enum ImGuiKey_
ImGuiKey_X, // for text edit CTRL+X: cut
ImGuiKey_Y, // for text edit CTRL+Y: redo
ImGuiKey_Z, // for text edit CTRL+Z: undo
ImGuiKey_COUNT,
ImGuiKey_LShift,
ImGuiKey_RShift,
ImGuiKey_NumEnter

ImGuiKey_NumEnter,
ImGuiKey_COUNT // DO NOT place enum values after this, unless they're just aliases for other earlier enum values. This is used for an array size
};

// To test io.KeyMods (which is a combination of individual fields io.KeyCtrl, io.KeyShift, io.KeyAlt set by user/backend)
Expand Down Expand Up @@ -1423,7 +1422,7 @@ enum ImGuiNavInput_
ImGuiNavInput_KeyRight_, // move right
ImGuiNavInput_KeyUp_, // move up
ImGuiNavInput_KeyDown_, // move down
ImGuiNavInput_COUNT,
ImGuiNavInput_COUNT, // DO NOT place enum values after this, unless they're just aliases for other earlier enum values. This is used for an array size
ImGuiNavInput_InternalStart_ = ImGuiNavInput_KeyLeft_
};

Expand Down Expand Up @@ -1509,7 +1508,7 @@ enum ImGuiCol_
ImGuiCol_NavWindowingHighlight, // Highlight window when using CTRL+TAB
ImGuiCol_NavWindowingDimBg, // Darken/colorize entire screen behind the CTRL+TAB window list, when active
ImGuiCol_ModalWindowDimBg, // Darken/colorize entire screen behind a modal window, when one is active
ImGuiCol_COUNT
ImGuiCol_COUNT // DO NOT place enum values after this, unless they're just aliases for other earlier enum values. This is used for an array size
};

// Enumeration for PushStyleVar() / PopStyleVar() to temporarily modify the ImGuiStyle structure.
Expand Down Expand Up @@ -1547,7 +1546,7 @@ enum ImGuiStyleVar_
ImGuiStyleVar_TabRounding, // float TabRounding
ImGuiStyleVar_ButtonTextAlign, // ImVec2 ButtonTextAlign
ImGuiStyleVar_SelectableTextAlign, // ImVec2 SelectableTextAlign
ImGuiStyleVar_COUNT
ImGuiStyleVar_COUNT // DO NOT place enum values after this, unless they're just aliases for other earlier enum values. This is used for an array size
};

// Flags for InvisibleButton() [extended in imgui_internal.h]
Expand Down Expand Up @@ -1633,7 +1632,7 @@ enum ImGuiMouseButton_
ImGuiMouseButton_Left = 0,
ImGuiMouseButton_Right = 1,
ImGuiMouseButton_Middle = 2,
ImGuiMouseButton_COUNT = 5
ImGuiMouseButton_COUNT = 5 // DO NOT place enum values after this, unless they're just aliases for other earlier enum values. This is used for an array size
};

// Enumeration for GetMouseCursor()
Expand All @@ -1650,7 +1649,7 @@ enum ImGuiMouseCursor_
ImGuiMouseCursor_ResizeNWSE, // When hovering over the bottom-right corner of a window
ImGuiMouseCursor_Hand, // (Unused by Dear ImGui functions. Use for e.g. hyperlinks)
ImGuiMouseCursor_NotAllowed, // When hovering something with disallowed interaction. Usually a crossed circle.
ImGuiMouseCursor_COUNT
ImGuiMouseCursor_COUNT // DO NOT place enum values after this, unless they're just aliases for other earlier enum values. This is used for an array size
};

// Enumeration for ImGui::SetWindow***(), SetNextWindow***(), SetNextItem***() functions
Expand Down
4 changes: 0 additions & 4 deletions Source/Graphics/font_renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,6 @@ FontRenderer::FontRenderer() {
impl_ = new FontRendererImpl();
}

FontRenderer::FontRenderer(const FontRenderer &other) {
*impl_ = *other.impl_;
}

FontRenderer::~FontRenderer() {
delete impl_;
}
Expand Down
4 changes: 3 additions & 1 deletion Source/Graphics/font_renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@ class FontRenderer {
}
void GetKerning(int face_id, char character_a, char character_b, FT_Vector* vec);
FontRenderer();
FontRenderer(const FontRenderer& other);
FontRenderer(const FontRenderer& other) = delete;
~FontRenderer();

FontRenderer& operator=(const FontRenderer& other) = delete;

private:
FontRendererImpl* impl_;
};
1 change: 1 addition & 0 deletions Source/Internal/stopwatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#include <cstdint>
#include <string>
#include <cstdint>

void BusyWaitMilliseconds(uint32_t how_many);

Expand Down
6 changes: 5 additions & 1 deletion Source/Main/engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4429,7 +4429,11 @@ void Engine::Draw() {
{ // Perform per-frame calculations (like character shadows or LOD)
PROFILER_GPU_ZONE(g_profiler_ctx, "Pre-draw frame");
float predraw_time = game_timer.GetRenderTime();
for (auto obj : scenegraph_->objects_) {
// Using an index based for-loop because new items get added inside the angelscript PreDraw function
for (int i = 0; i < scenegraph_->objects_.size(); ++i) {
// TODO: Handle removing an object in angelscript inside PreDraw function? Should all deletes from script be a queued delete?
// May have to modify scripts to make that work right.
Object* obj = scenegraph_->objects_[i];
if (!obj->parent) {
obj->PreDrawFrame(predraw_time);
}
Expand Down
2 changes: 2 additions & 0 deletions Source/Math/vec4.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ class vec4 {
entries[3] = val;
}

inline vec4(const vec4& vec) = default;

inline vec4& operator=(float param) {
entries[0] = param;
entries[1] = param;
Expand Down
1 change: 1 addition & 0 deletions Source/Steam/ugc_item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ void SteamworksUGCItem::OnUGCSteamUGCQueryCompleted(SteamUGCQueryCompleted_t* pR
} else {
has_eresult_error = true;
eresult_error = pResult->m_eResult;
return; // Further API calls may fail and even seem to crash the app. Better to return early
}

SteamUGCDetails_t m_details;
Expand Down

0 comments on commit 75ac95b

Please sign in to comment.