The picker is used in the special node dialog and also in monster abilities. Some changes were made to the game as well: * If the rotatable wall is used for a field missile or touch ability, there's no longer an option for the designer to pick an orientation. Instead, it behaves like the rotatable wall in a radiate field ability, selecting an orientation based on the creature's facing direction. * The magic values sent to place_spell_pattern for direct damage were rearranged to match the order of the eDamageType enum. This should have no effect, since the core place_spell_pattern function is only called by the various wrapper overloads. It also simplifies the code quite a bit. * The Protective Circle spell pattern is now exposed to the place patten special nodes. It can be used as just a radius 4 circle, but the effect of different layers of fields can also be obtained by specifying a field type or damage type of -1. There is also a change to the dialog engine: * Calling setText() also implicitly calls recalcRect()
60 lines
1.7 KiB
C++
60 lines
1.7 KiB
C++
|
|
|
|
#ifndef BOE_GAME_GLOBAL_H
|
|
#define BOE_GAME_GLOBAL_H
|
|
|
|
#include <vector>
|
|
#include <string>
|
|
#include <sstream>
|
|
#include <map>
|
|
#include "boe.consts.hpp"
|
|
#include "universe/universe.hpp"
|
|
|
|
#define ASB add_string_to_buf
|
|
#define PSD univ.party.stuff_done
|
|
|
|
const int NUM_MONST_G = 173;
|
|
const int NUM_TER_G = 251;
|
|
const int NUM_ITEM_G = 120;
|
|
const int NUM_FACE_G = 80;
|
|
const int NUM_DLOG_G = 28;
|
|
|
|
const int MAX_AUTOSAVE_DEFAULT = 5;
|
|
|
|
struct scen_header_type{
|
|
int intro_pic;
|
|
eContentRating rating;
|
|
int difficulty, ver[3], prog_make_ver[3];
|
|
std::string name, teaser1, teaser2, file;
|
|
};
|
|
|
|
extern std::map<std::string, int> startup_button_indices;
|
|
extern std::map<int, std::string> startup_button_names;
|
|
extern std::map<int, std::string> startup_button_names_v1;
|
|
|
|
extern cUniverse univ;
|
|
extern std::map<std::string, std::vector<std::string>> feature_flags;
|
|
|
|
inline bool has_feature_flag(std::string flag, std::string version) {
|
|
auto iter = feature_flags.find(flag);
|
|
if(iter == feature_flags.end()) return false;
|
|
std::vector<std::string> versions = iter->second;
|
|
return std::find(versions.begin(), versions.end(), version) != versions.end();
|
|
}
|
|
|
|
// Return the version of a feature that SHOULD BE USED in the currently running game.
|
|
inline std::string get_feature_version(std::string flag) {
|
|
// If a scenario is loaded and specifies the flag, use that version.
|
|
if(!univ.party.scen_name.empty()){
|
|
std::string scenario_flag = univ.scenario.get_feature_flag(flag);
|
|
if(!scenario_flag.empty()) return scenario_flag;
|
|
}
|
|
// Otherwise, use the most recent version of the feature supported by this build,
|
|
// or by the build that recorded the current replay.
|
|
auto iter = feature_flags.find(flag);
|
|
if(iter == feature_flags.end()) return "";
|
|
return iter->second.back();
|
|
}
|
|
|
|
#endif
|