10 Commits

Author SHA1 Message Date
1fac99f882 Release build squashed
Some checks failed
/ release (Debug, map[deps:macos-universal flag:arm64 name:macos scons-script:./.github/workflows/scripts/mac/scons-build.sh suffix:-silicon version:14]) (push) Has been cancelled
/ release (Debug, map[deps:macos-universal flag:x86_64 name:macos scons-script:./.github/workflows/scripts/mac/scons-build.sh suffix:-intel version:13]) (push) Has been cancelled
/ release (Debug, map[name:windows scons-script:./.github/workflows/scripts/win/scons-build.bat suffix: version:2019]) (push) Has been cancelled
/ release (Release, map[deps:macos-universal flag:arm64 name:macos scons-script:./.github/workflows/scripts/mac/scons-build.sh suffix:-silicon version:14]) (push) Has been cancelled
/ release (Release, map[deps:macos-universal flag:x86_64 name:macos scons-script:./.github/workflows/scripts/mac/scons-build.sh suffix:-intel version:13]) (push) Has been cancelled
/ release (Release, map[name:windows scons-script:./.github/workflows/scripts/win/scons-build.bat suffix: version:2019]) (push) Has been cancelled
2025-05-24 16:33:59 -05:00
dddae03915 Add button to open scenario folder & refresh list 2025-05-24 16:32:06 -05:00
dee6d988a6 Fix out-of-range access check for legacy town entrance
Fix #745
2025-05-24 15:16:24 -05:00
e7bf5847d0 add conveyor belts flag to game. fix #747 2025-05-24 14:30:34 -05:00
e846540ebd remove out-of-range node in VoDT outdoors (fix #741) 2025-05-23 14:28:41 -05:00
4ed73bf72d Update src/dialogxml/dialogs/dialog.cpp
Co-authored-by: Celtic Minstrel <CelticMinstrel@users.noreply.github.com>
2025-05-23 14:02:50 -05:00
1084f26a88 Count preferences dialog when detecting max UI scale to fit (Fix #740) 2025-05-23 09:11:27 -05:00
b7c1089508 Fix save file dialog with first party. (#740) 2025-05-23 08:55:14 -05:00
1734e7b055 Fix Load screen with no parties in save folder (#740) 2025-05-23 08:48:31 -05:00
42cffb6704 fix itch build when itch client apps folder doesn't exist 2025-05-21 15:21:58 -05:00
9 changed files with 60 additions and 25 deletions

View File

@@ -12,7 +12,7 @@ elif [ "$BUILD_OS" = "windows" ]; then
butler_exe=butler.exe
release_dir="windows"
elif [ "$BUILD_OS" = "macos" ]; then
butler_channel=mac-universal
butler_channel=darwin-amd64
butler_exe=butler
release_dir="macos"
fi
@@ -25,4 +25,4 @@ unzip butler.zip
chmod +x ${butler_exe}
# just a sanity check run (and also helpful in case you're sharing CI logs)
./${butler_exe} -V
./${butler_exe} push "build/Blades of Exile/" nqn/blades-of-exile:${butler_channel}
./${butler_exe} push "build/Blades of Exile/" nqn/blades-of-exile:${release_dir}

View File

@@ -46,7 +46,9 @@
<text outline='double' name='start3' top='205' left='59' width='342' height='84'/>
</page>
</stack>
<button name='prev' type='left' def-key='left' top='294' left='62'/>
<button name='next' type='right' def-key='right' top='294' left='125'/>
<button name='cancel' type='regular' top='294' left='337'>Cancel</button>
<button name='cancel' type='regular' top='294' left='5'>Cancel</button>
<button name='prev' type='left' def-key='left' relative='pos pos-in' rel-anchor='prev' top='0' left='14'/>
<button name='next' type='right' def-key='right' relative='pos pos-in' rel-anchor='prev' top='0' left='0'/>
<button name='folder' type='large' relative='pos pos-in' rel-anchor='prev' top='0' left='14'>Show Folder</button>
<button name='refresh' type='regular' relative='pos pos-in' rel-anchor='prev' top='0' left='7'>Refresh</button>
</dialog>

View File

@@ -39,7 +39,7 @@
2,111,2,2,2,3,2,58,51,59,61,54,31,32,22,22,22,35,25,49,39,4,3,3,43,42,42,47,36,49,38,38,39,2,87,2,44,30,26,36,36,30,23,23,22,22,22,22
4,2,3,111,3,111,3,2,2,57,50,61,54,30,35,240@5,32,26,49,39,3,2,2,2,44,36,37,37,37,40,2,3,2,3,2,4,44,30,34,27,36,31,32,23,23,22,22,22
4,3,2,3,2,3,111,3,2,58,59,50,53,31,25,36,31,25,40,3,4,2,3,2,45,46,36,36,37,48,41,2,2,2,2,2,44,30,22,26,36,36,30,23,23,22,22,22
2,2,4,111,2,2,111,3,2:22,2,57,50,53,45,38,38,38,38,39,2,3,4,3,2,2,45*1,38,38,46,36,40,3,2,2,2,2,44,31,32,34,27,36,30,23,23,23,22,22
2,2,4,111,2,2,111,3,2,2,57,50,53,45,38,38,38,38,39,2,3,4,3,2,2,45*1,38,38,46,36,40,3,2,2,2,2,44,31,32,34,27,36,30,23,23,23,22,22
2,2,3,2,2,2,2,111,111,2,57,50,53,3,111,2,4,113,2,2,4,2,4,2,87,2,2,3,45,46,48,41,2,2,3,2,45,46,31,32,26,36,30,23,23,23,22,22
111,3,3,2,111,111,2,111,2,2,57,50,53,2&9:1,111,112,4,2,2,2,3,2,3,43,41,2,2,2,87,44,37,40,2,2,2,4,3,45,46,30:17,26:17,36,30,22,23,23,22,22
3,2,110,110:20,110,4,111,111,111,3,57,50,53,3,112,3,3,2,111,112,2,2,2,44,40,2,2,2,2,45,38,39,2,2,2,2,3,2,44,30,34,28,33,22,23,22,22,22

View File

@@ -445,6 +445,12 @@ void cDialog::recalcRect(){
winRect.right *= get_ui_scale();
winRect.bottom *= get_ui_scale();
// Uncomment if you need to measure any dialogs.
/*
LOG_VALUE(fname);
LOG_VALUE(winRect.right);
LOG_VALUE(winRect.bottom);
//*/
}
bool cDialog::initCalled = false;

View File

@@ -93,16 +93,19 @@ std::vector<fs::path> all_scen_dirs() {
// and Itch meta files
// (designers might want to ship a README.txt)
fs::path itch_apps_path = scenDir/".."/".."/"itch"/"apps";
for(fs::directory_iterator app_iter(itch_apps_path); app_iter != fs::directory_iterator(); app_iter++){
fs::path app = *app_iter;
for(fs::directory_iterator file_iter(app); file_iter != fs::directory_iterator(); file_iter++){
fs::path file = *file_iter;
if(file.extension() == ".boes"){
scen_dirs.push_back(*app_iter);
break;
}else if(file.extension() == ".itch"){
}else if(file.extension() != ".txt"){
break;
if(fs::is_directory(itch_apps_path)){
for(fs::directory_iterator app_iter(itch_apps_path); app_iter != fs::directory_iterator(); app_iter++){
fs::path app = *app_iter;
if(!fs::is_directory(app)) continue;
for(fs::directory_iterator file_iter(app); file_iter != fs::directory_iterator(); file_iter++){
fs::path file = *file_iter;
if(file.extension() == ".boes"){
scen_dirs.push_back(*app_iter);
break;
}else if(file.extension() == ".itch"){
}else if(file.extension() != ".txt"){
break;
}
}
}
}

View File

@@ -1810,11 +1810,28 @@ class cChooseScenario {
me.toast(true);
return true;
}
// Show the custom scenario folder
bool showFolder() {
extern fs::path scenDir;
launchURL("file://" + scenDir.string());
return true;
}
// Refresh the scenario list (check if custom scenarios added/removed)
bool refreshList() {
scen_headers = build_scen_headers();
auto& stk = dynamic_cast<cStack&>(me["list"]);
short page = stk.getPage();
// Redo the stack
put_scen_info();
// Put the viewer to the same page it was (clamped in case the list got shorter)
stk.setPage(min(page, stk.getPageCount() - 1));
return true;
}
public:
cChooseScenario() {
// TODO: Add a button to jump to the scenarios folder
// Note: if the player jumps to the scenarios folder and adds scenarios, build_scen_headers() must be called again
scen_headers = build_scen_headers(); // TODO: Either make this local to this class, or make it take scen_headers by reference
scen_headers = build_scen_headers();
}
scen_header_type run() {
using namespace std::placeholders;
@@ -1831,6 +1848,8 @@ public:
me["scen1"].attachClickHandler(std::bind(&cChooseScenario::doSelectScenario, this, 0));
me["scen2"].attachClickHandler(std::bind(&cChooseScenario::doSelectScenario, this, 1));
me["scen3"].attachClickHandler(std::bind(&cChooseScenario::doSelectScenario, this, 2));
me["folder"].attachClickHandler(std::bind(&cChooseScenario::showFolder, this));
me["refresh"].attachClickHandler(std::bind(&cChooseScenario::refreshList, this));
put_scen_info();
@@ -1889,7 +1908,7 @@ class cFilePicker {
save_files.resize(save_file_mtimes.size());
cStack& stk = get_stack();
int num_pages = ceil((float)save_file_mtimes.size() / parties_per_page);
int num_pages = max(1, ceil((float)save_file_mtimes.size() / parties_per_page));
stk.setPageCount(num_pages);
// HACK: For some reason which should be fixed, the buttons and labels on subsequent pages
// aren't getting text on the static buttons and labels
@@ -2098,7 +2117,7 @@ class cFilePicker {
if(party_idx < parties_needed)
populate_slot(slot_idx, save_file_mtimes[party_idx].first, save_file_mtimes[party_idx].second, save_files[party_idx]);
else
empty_slot(party_idx - start_idx);
empty_slot(slot_idx);
}
++pages_populated;

View File

@@ -102,6 +102,7 @@ std::string help_text_rsrc = "help";
std::map<std::string,std::vector<std::string>> feature_flags = {
// Legacy scenario flags
{"resurrection-balm", {"required"}}, // This means it CAN be supported, if the scenario has the flag.
{"conveyor-belts", {"V2"}}, // Diagonal conveyor belts and big monster physics
// Legacy behavior of the T debug action (used by some replays)
// does not change the party's outdoors location
{"debug-enter-town", {"move-outdoors"}},
@@ -1079,6 +1080,7 @@ void init_boe(int argc, char* argv[]) {
init_tiling();
init_snd_tool();
// see fallback_scale() in winutil.cpp for where the default UI scale is calculated based on screen size
adjust_window_mode();
init_ui();
// If we don't do this now it'll flash white to start with

View File

@@ -1244,8 +1244,8 @@ void erase_hidden_towns(cOutdoors& sector, int quadrant_x, int quadrant_y) {
for(short tile_index = 0; tile_index < sector.city_locs.size(); tile_index++) {
auto city_loc = sector.city_locs[tile_index];
if(!univ.scenario.is_town_entrance_valid(city_loc) ||
!does_location_have_special(sector, city_loc, eTerSpec::TOWN_ENTRANCE) ||
!sector.is_on_map(city_loc)) {
!sector.is_on_map(city_loc) ||
!does_location_have_special(sector, city_loc, eTerSpec::TOWN_ENTRANCE)) {
continue;
}
auto town_pos_x = AREA_MEDIUM * quadrant_x + sector.city_locs[tile_index].x;

View File

@@ -3,8 +3,11 @@
#include <boost/filesystem/operations.hpp>
#include "keymods.hpp"
// Measured on 5/23/25. For now, must be re-measured at 1x UI scale whenever preferences change (unless making the window smaller, maybe).
short prefs_height = 529;
// The default scale should be the largest that the user's screen can fit all three
// BoE application windows (because they should probably default to match each other).
// BoE application windows and core dialogs of the main game (because they should probably default to match each other).
double fallback_scale() {
static double scale = 0;
// Suppress the float comparison warning.
@@ -17,7 +20,7 @@ double fallback_scale() {
sf::VideoMode desktop = sf::VideoMode::getDesktopMode();
short max_width = max(boe_width, max(pc_width, scen_width));
short max_height = max(boe_height, max(pc_height, scen_height)) + getMenubarHeight();
short max_height = max(prefs_height, max(boe_height, max(pc_height, scen_height))) + getMenubarHeight();
std::vector<double> scale_options = {1.0, 1.5, 2.0, 3.0, 4.0};
for(auto it = scale_options.rbegin(); it != scale_options.rend(); ++it){