Skip to content

Commit

Permalink
Add support for 1080p and fix index out of bounds for LOD
Browse files Browse the repository at this point in the history
  • Loading branch information
dbierek committed Jul 31, 2024
1 parent ef97e50 commit 3a0ed42
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ endif()

project(
NavKit
VERSION 0.7
VERSION 0.7.1
DESCRIPTION "An app to create NAVP and AIRG files for use with Hitman"
LANGUAGES CXX)

Expand Down
2 changes: 1 addition & 1 deletion bin/glacier2obj.py
Original file line number Diff line number Diff line change
Expand Up @@ -2089,7 +2089,7 @@ def load_scenario(context, collection, path_to_prims_json, path_to_pf_boxes_json
print("Error Loading prim:", flush=True)
print(prim_hash, flush=True)
return 1
lowest_lod = 9
lowest_lod = 7
for obj in objects:
for j in range(0, 8):
if obj.data['prim_properties']['lod'][j] == 1 and lowest_lod > j:
Expand Down
1 change: 1 addition & 0 deletions include/NavKit/NavKitConfig.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#define NavKit_VERSION_MAJOR "0"
#define NavKit_VERSION_MINOR "7"
#define NavKit_VERSION_PATCH "1"
3 changes: 2 additions & 1 deletion include/NavKit/NavKitConfig.h.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#define NavKit_VERSION_MAJOR "@NavKit_VERSION_MAJOR@"
#define NavKit_VERSION_MINOR "@NavKit_VERSION_MINOR@"
#define NavKit_VERSION_MINOR "@NavKit_VERSION_MINOR@"
#define NavKit_VERSION_PATCH "@NavKit_VERSION_PATCH@"
10 changes: 8 additions & 2 deletions src/Navp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,14 @@ void Navp::buildNavp(Navp* navp) {
}

void Navp::drawMenu() {
if (imguiBeginScrollArea("Navp menu", 10, navKit->renderer->height - 1140 - 10, 250, 1140, &navpScroll))
navKit->gui->mouseOverMenu = true;
if (navKit->renderer->height > 1080) {
if (imguiBeginScrollArea("Navp menu", 10, navKit->renderer->height - 1140 - 10, 250, 1140, &navpScroll))
navKit->gui->mouseOverMenu = true;
}
else {
if (imguiBeginScrollArea("Navp menu", 10, navKit->renderer->height - 950 - 10, 250, 950, &navpScroll))
navKit->gui->mouseOverMenu = true;
}
if (imguiCheck("Show Navp", showNavp))
showNavp = !showNavp;
imguiLabel("Load Navp from file");
Expand Down
2 changes: 1 addition & 1 deletion src/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ bool Renderer::initWindowAndRenderer() {
}

SDL_SetWindowPosition(window, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED);
std::string navKitVersion = NavKit_VERSION_MAJOR "." NavKit_VERSION_MINOR;
std::string navKitVersion = NavKit_VERSION_MAJOR "." NavKit_VERSION_MINOR "." NavKit_VERSION_PATCH;
std::string title = "NavKit v";
title += navKitVersion;
SDL_SetWindowTitle(window, title.data());
Expand Down

0 comments on commit 3a0ed42

Please sign in to comment.