fix pcedit compilation

This commit is contained in:
2025-05-17 20:36:38 -05:00
parent e089effea4
commit 8915ad3d08
3 changed files with 6 additions and 5 deletions

View File

@@ -16,6 +16,7 @@
extern bool verify_restore_quit(std::string dlog);
extern bool All_Done, party_in_scen, scen_items_loaded;
extern cUniverse univ;
extern cCustomGraphics spec_scen_g;
@interface AppleEventHandler : NSObject<NSApplicationDelegate>
-(BOOL)application:(NSApplication*) app openFile:(NSString*) file;
@@ -39,7 +40,7 @@ void set_up_apple_events() {
std::string fileName;
std::copy(msg.get(), msg.get() + len, std::inserter(fileName, fileName.begin()));
if(load_party(fileName, univ)) {
if(load_party(fileName, univ, spec_scen_g)) {
party_in_scen = !univ.party.scen_name.empty();
if(!party_in_scen) load_base_item_defs();
scen_items_loaded = true;

View File

@@ -51,8 +51,7 @@ short store_which_string_dlog;
short store_page_on,store_num_i;
rectangle ed_buttons_from[2] = {{0,0,57,57},{0,57,57,114}};
short current_pressed_button = -1;
cCustomGraphics spec_scen_g; // not actually needed; just here to silence compiler because it's referenced in fileio.h
// (actually, it WILL be needed eventually)
cCustomGraphics spec_scen_g; // Will be needed if PCs can have custom graphics or we show the inventory
void init_main_buttons() {
rectangle base_rect;

View File

@@ -32,6 +32,7 @@ short menuChoiceId=-1;
#endif
cUniverse univ;
extern cCustomGraphics spec_scen_g;
rectangle pc_area_buttons[6][4] ; // 0 - whole 1 - pic 2 - name 3 - stat strs 4,5 - later
rectangle item_string_rects[24][4]; // 0 - name 1 - drop 2 - id 3 -
@@ -100,7 +101,7 @@ static void process_args(int argc, char* argv[]) {
exit(0);
}
if(!file.empty()) {
if(load_party(file, univ)) {
if(load_party(file, univ, spec_scen_g)) {
party_in_scen = !univ.party.scen_name.empty();
if(!party_in_scen) load_base_item_defs();
scen_items_loaded = true;
@@ -290,7 +291,7 @@ void handle_menu_choice(eMenu item_hit) {
if(result) {
file = item_hit == eMenu::FILE_OPEN ? nav_get_party() : univ.file;
if(!file.empty()) {
if(load_party(file, univ)) {
if(load_party(file, univ, spec_scen_g)) {
party_in_scen = !univ.party.scen_name.empty();
if(!party_in_scen) load_base_item_defs();
scen_items_loaded = true;