Some other tweaks and fixes got pulled in along the way. Details: - Improved const-correctness - The scenario is now part of the universe, so now there's no global scenario object in the game or the PC editor. (Of course, the scenario editor has no universe, so it still has a global scenario object.) - Towns and outdoors now store a reference to the scenario; the party, current town, and current outdoors store a reference to the universe. Altogether this means that the data module has no need for global scenario or universe objects. - The fileio routines now take a scenario or universe reference as a parameter, so they don't need the global scenario or universe objects either. - cCurOut now has an arrow operator for accessing the current outdoor section, instead of a 2x2 subset of the outdoors; this replaces using i_w_c to index the 2x2 subset. (And it's much less verbose!) - cCurTown no longer stores a pointer to the town record, since it can simply access it through the universe instance which it stores a reference to. - Tweaked how the monster roster menu works (it now caches up to 60 monsters) - The operator= functions that convert from legacy to new scenario/save format are now ordinary functions rather than operators. - The bizarre use of assigning a cCreature to itself to populate certain fields has been nuked. - When at the corner of an outdoor sector, the scenario editor now shows the cornermost terrain in the diagonally adjacent sector. - There was a missing check to prevent horses entering dangerous terrain (eg, swamp) while in town. - Fix cancelling load party dialog causing a party to appear
67 lines
2.0 KiB
C++
67 lines
2.0 KiB
C++
|
|
#ifndef BOE_GAME_FILEIO_H
|
|
#define BOE_GAME_FILEIO_H
|
|
|
|
#include <boost/filesystem/path.hpp>
|
|
#include "location.h"
|
|
#include "simpletypes.h"
|
|
|
|
namespace fs = boost::filesystem; // TODO: Centralize this alias!
|
|
|
|
//void load_file();
|
|
//void save_file(short mode);
|
|
void finish_load_party();
|
|
void change_rect_terrain(rectangle r,ter_num_t terrain_type,short probability,bool hollow);
|
|
void swap_val(unsigned char *val,short a,short b);
|
|
void change_val_4 (unsigned char *val,short a,short b,short c,short d);
|
|
void change_val (unsigned char *val,short a,short b);
|
|
void form_template_terrain() ;
|
|
//void load_town(short town_num,short mode,short extra,char *str);
|
|
void shift_universe_left();
|
|
void shift_universe_right();
|
|
void shift_universe_up();
|
|
void shift_universe_down();
|
|
void position_party(short out_x,short out_y,short pc_pos_x,short pc_pos_y);
|
|
void build_outdoors();
|
|
void save_outdoor_maps();
|
|
void add_outdoor_maps();
|
|
void fix_boats();
|
|
//void load_outdoors(short to_create_x, short to_create_y, short targ_x, short targ_y, short mode,short extra,char *str);
|
|
// long get_reg_data();
|
|
long do_waterfall(long flag);
|
|
short init_data(short flag);
|
|
void import_template_terrain();
|
|
void import_anim_terrain(short mode);
|
|
void start_data_dump();
|
|
void end_data_dump();
|
|
//void oops_error(short error);
|
|
//void set_up_ter_pics();
|
|
//bool load_scenario();
|
|
short onm(char x_sector,char y_sector);
|
|
void build_scen_headers();
|
|
bool load_scenario_header(fs::path filename/*,short header_entry*/);
|
|
//void load_spec_graphics();
|
|
//bool check_p (short pword);
|
|
//void build_scen_file_name (Str255 file_n);
|
|
//short town_s(short flag);
|
|
//short out_s(short flag);
|
|
//short str_size_1(short flag);
|
|
//short str_size_2(short flag);
|
|
//short str_size_3(short flag);
|
|
//short get_buf_ptr(short flag);
|
|
//bool check_p (short pword);
|
|
|
|
//void port_talk_nodes();
|
|
//void port_town();
|
|
//void port_t_d();
|
|
//void port_scenario();
|
|
//void port_item_list();
|
|
//void port_out(outdoor_record_type *out);
|
|
//void flip_spec_node(cSpecial *spec);
|
|
//void flip_short(short *s);
|
|
//void flip_rect(rectangle *s);
|
|
|
|
void alter_rect(rectangle *r);
|
|
|
|
#endif
|