Mass reformatting (braces from next line)
This commit is contained in:
@@ -680,8 +680,7 @@ bool load_outdoor_str(location which_out, short which_str, char* str){
|
||||
bool tryLoadPictFromResourceFile(fs::path& gpath, sf::Image& graphics_store);
|
||||
#endif
|
||||
|
||||
void load_spec_graphics()
|
||||
{
|
||||
void load_spec_graphics() {
|
||||
static const char*const noGraphics = "The game will still work without the custom graphics, but some things will not look right.";
|
||||
short i;
|
||||
fs::path path(scenario.scen_file);
|
||||
@@ -1099,9 +1098,8 @@ bool load_party_v2(fs::path file_to_load, bool town_restore, bool in_scen, bool
|
||||
return true;
|
||||
}
|
||||
|
||||
bool save_party(fs::path dest_file)
|
||||
//mode; // 0 - normal 1 - save as
|
||||
{
|
||||
bool save_party(fs::path dest_file) {
|
||||
if(!fs::exists(tempDir)) fs::create_directories(tempDir);
|
||||
|
||||
bool in_scen = univ.party.scen_name != "";
|
||||
|
@@ -411,8 +411,7 @@ void draw_terrain(){
|
||||
FrameRect(&terrain_rect);
|
||||
SetPortWindowPort(mainPtr);
|
||||
for(q = 0; q < 9; q++)
|
||||
for(r = 0; r < 9; r++)
|
||||
{
|
||||
for(r = 0; r < 9; r++) {
|
||||
where_draw.x = q; where_draw.y = r;
|
||||
if(editing_town) {
|
||||
t_to_draw = t_d.terrain[cen_x + q - 4][cen_y + r - 4];
|
||||
|
@@ -26,8 +26,7 @@ short s_pow(short x,short y){
|
||||
return (short) pow((double) x, (double) y);
|
||||
}
|
||||
|
||||
short s_sqrt(short val)
|
||||
{
|
||||
short s_sqrt(short val) {
|
||||
return (short) sqrt((double)(val));
|
||||
}
|
||||
|
||||
|
@@ -41,8 +41,7 @@ void port_town(legacy::town_record_type* dummy_town_ptr){
|
||||
|
||||
}
|
||||
|
||||
static void port_dummy_t_d(short size,char *buffer)
|
||||
{
|
||||
static void port_dummy_t_d(short size,char *buffer) {
|
||||
short i;
|
||||
legacy::big_tr_type *d1;
|
||||
legacy::ave_tr_type *d2;
|
||||
@@ -94,8 +93,7 @@ static void port_dummy_t_d(short size,char *buffer)
|
||||
}
|
||||
}
|
||||
|
||||
void port_talk_nodes(legacy::talking_record_type* dummy_talk_ptr)
|
||||
{
|
||||
void port_talk_nodes(legacy::talking_record_type* dummy_talk_ptr) {
|
||||
short i;
|
||||
|
||||
if(cur_scen_is_mac != mac_is_intel)
|
||||
@@ -110,8 +108,7 @@ void port_talk_nodes(legacy::talking_record_type* dummy_talk_ptr)
|
||||
}
|
||||
}
|
||||
|
||||
void port_t_d(legacy::big_tr_type* old)
|
||||
{
|
||||
void port_t_d(legacy::big_tr_type* old) {
|
||||
short i;
|
||||
if(cur_scen_is_mac != mac_is_intel)
|
||||
return;
|
||||
@@ -128,8 +125,7 @@ void port_t_d(legacy::big_tr_type* old)
|
||||
}
|
||||
}
|
||||
|
||||
void port_ave_t(legacy::ave_tr_type* old)
|
||||
{
|
||||
void port_ave_t(legacy::ave_tr_type* old) {
|
||||
short i;
|
||||
if(cur_scen_is_mac != mac_is_intel)
|
||||
return;
|
||||
@@ -146,8 +142,7 @@ void port_ave_t(legacy::ave_tr_type* old)
|
||||
}
|
||||
}
|
||||
|
||||
void port_tiny_t(legacy::tiny_tr_type* old)
|
||||
{
|
||||
void port_tiny_t(legacy::tiny_tr_type* old) {
|
||||
short i;
|
||||
if(cur_scen_is_mac != mac_is_intel)
|
||||
return;
|
||||
@@ -164,8 +159,7 @@ void port_tiny_t(legacy::tiny_tr_type* old)
|
||||
}
|
||||
}
|
||||
|
||||
void port_scenario(legacy::scenario_data_type* temp_scenario)
|
||||
{
|
||||
void port_scenario(legacy::scenario_data_type* temp_scenario) {
|
||||
short i,j;
|
||||
|
||||
if(cur_scen_is_mac != mac_is_intel)
|
||||
@@ -259,8 +253,7 @@ void port_item_list(legacy::scen_item_data_type* old){
|
||||
}
|
||||
}
|
||||
|
||||
void port_out(legacy::outdoor_record_type *out)
|
||||
{
|
||||
void port_out(legacy::outdoor_record_type *out) {
|
||||
short i;
|
||||
|
||||
if(cur_scen_is_mac != mac_is_intel)
|
||||
@@ -428,8 +421,7 @@ void port_c_town(legacy::current_town_type* old){
|
||||
}
|
||||
}
|
||||
|
||||
void flip_spec_node(legacy::special_node_type *spec)
|
||||
{
|
||||
void flip_spec_node(legacy::special_node_type *spec) {
|
||||
flip_short(&(spec->type));
|
||||
flip_short(&(spec->sd1));
|
||||
flip_short(&(spec->sd2));
|
||||
@@ -443,8 +435,7 @@ void flip_spec_node(legacy::special_node_type *spec)
|
||||
flip_short(&(spec->jumpto));
|
||||
}
|
||||
|
||||
void flip_short(int16_t *s)
|
||||
{
|
||||
void flip_short(int16_t *s) {
|
||||
char store,*s1, *s2;
|
||||
|
||||
s1 = (char *) s;
|
||||
@@ -455,8 +446,7 @@ void flip_short(int16_t *s)
|
||||
|
||||
}
|
||||
|
||||
void flip_long(int32_t *s)
|
||||
{
|
||||
void flip_long(int32_t *s){
|
||||
char store,*s1, *s2, *s3, *s4;
|
||||
|
||||
s1 = (char *) s;
|
||||
@@ -473,8 +463,7 @@ void flip_long(int32_t *s)
|
||||
}
|
||||
|
||||
// TODO: This was because Windows stored its rect members in a different order, but since we now have our own rect class, it shouldn't be needed.
|
||||
static void alter_rect(legacy::Rect *r)
|
||||
{
|
||||
static void alter_rect(legacy::Rect *r) {
|
||||
short a;
|
||||
|
||||
a = r->top;
|
||||
@@ -484,8 +473,7 @@ static void alter_rect(legacy::Rect *r)
|
||||
r->bottom = r->right;
|
||||
}
|
||||
|
||||
void flip_rect(legacy::Rect* s)
|
||||
{
|
||||
void flip_rect(legacy::Rect* s) {
|
||||
flip_short((int16_t *) &(s->top));
|
||||
flip_short((int16_t *) &(s->bottom));
|
||||
flip_short((int16_t *) &(s->left));
|
||||
|
@@ -101,8 +101,7 @@ void play_sound(short which, short how_many_times) { // if < 0, play asynch
|
||||
if(always_async.find(which) != always_async.end())
|
||||
which *= -1;
|
||||
|
||||
if(sndhandle)
|
||||
{
|
||||
if(sndhandle) {
|
||||
chan[channel] = sf::Sound(*sndhandle);
|
||||
chan[channel].play();
|
||||
|
||||
@@ -228,22 +227,19 @@ void play_sound(short which, short how_many_times) { // if < 0, play asynch
|
||||
|
||||
for(i = 0; i < NUM_SOUNDS; i++)
|
||||
if((load_when_play[which]) && (sound_handles[which] != NULL)
|
||||
&& (a_sound_did_get_played) && (i != which))
|
||||
{
|
||||
&& (a_sound_did_get_played) && (i != which)) {
|
||||
sound_handles[i] = NULL;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
void kill_sound()
|
||||
{
|
||||
void kill_sound() {
|
||||
sndPlaySound(NULL,0);
|
||||
}
|
||||
#endif
|
||||
|
||||
void one_sound(short which)
|
||||
{
|
||||
void one_sound(short which) {
|
||||
if(which == last_played)
|
||||
return;
|
||||
play_sound(which);
|
||||
@@ -254,8 +250,7 @@ void clear_sound_memory(){
|
||||
last_played = 100;
|
||||
}
|
||||
|
||||
void flip_sound()
|
||||
{
|
||||
void flip_sound() {
|
||||
play_sounds = (play_sounds) ? false : true;
|
||||
}
|
||||
|
||||
@@ -271,8 +266,7 @@ void sound_pause(long len) {
|
||||
}
|
||||
}
|
||||
|
||||
void load_sounds(HMODULE handle)
|
||||
{
|
||||
void load_sounds(HMODULE handle) {
|
||||
short i,t,err;
|
||||
HRSRC h;
|
||||
char snd_name[20];
|
||||
|
Reference in New Issue
Block a user