From 8d6e30ef0efbe8411fc05db34fb15ffb360397e1 Mon Sep 17 00:00:00 2001 From: Japa Mala Illo Date: Fri, 12 Jan 2018 11:50:40 +0530 Subject: [PATCH] Fix whitespace issues --- plugins/proto/AdventureControl.proto | 6 +- .../adventure_control.cpp | 68 +++++++++---------- .../remotefortressreader.cpp | 20 +++--- 3 files changed, 47 insertions(+), 47 deletions(-) diff --git a/plugins/proto/AdventureControl.proto b/plugins/proto/AdventureControl.proto index a5785d7a3..7d3d128d6 100644 --- a/plugins/proto/AdventureControl.proto +++ b/plugins/proto/AdventureControl.proto @@ -58,7 +58,7 @@ enum AdvmodeMenu enum CarefulMovementType { - DEFAULT_MOVEMENT = 0; + DEFAULT_MOVEMENT = 0; RELEASE_ITEM_HOLD = 1; RELEASE_TILE_HOLD = 2; ATTACK_CREATURE = 3; @@ -95,8 +95,8 @@ message MovementOption message MenuContents { - optional AdvmodeMenu current_menu = 1; - repeated MovementOption movements = 2; + optional AdvmodeMenu current_menu = 1; + repeated MovementOption movements = 2; } message MiscMoveParams diff --git a/plugins/remotefortressreader/adventure_control.cpp b/plugins/remotefortressreader/adventure_control.cpp index 1e1f26452..acb4becac 100644 --- a/plugins/remotefortressreader/adventure_control.cpp +++ b/plugins/remotefortressreader/adventure_control.cpp @@ -90,7 +90,7 @@ command_result MoveCommand(DFHack::color_ostream &stream, const MoveCommandParam case 1: viewScreen->feed_key(interface_key::A_MOVE_SW_UP); break; - } + } break; } break; @@ -240,28 +240,28 @@ command_result MenuQuery(DFHack::color_ostream &stream, const EmptyMessage *in, out->set_current_menu((AdvmodeMenu)advUi->menu); -// /$$$$$$$$ /$$$$$$ /$$ /$$ /$$ /$$ /$$$$$$$$ -//| $$_____/|_ $$_/| $$ / $$| $$$ /$$$| $$_____/ -//| $$ | $$ | $$/ $$/| $$$$ /$$$$| $$ -//| $$$$$ | $$ \ $$$$/ | $$ $$/$$ $$| $$$$$ -//| $$__/ | $$ >$$ $$ | $$ $$$| $$| $$__/ -//| $$ | $$ /$$/\ $$| $$\ $ | $$| $$ -//| $$ /$$$$$$| $$ \ $$| $$ \/ | $$| $$$$$$$$ -//|__/ |______/|__/ |__/|__/ |__/|________/ -// -// -// -// /$$$$$$$$ /$$ /$$ /$$ /$$ /$$ /$$ /$$ /$$ -//|__ $$__/| $$ |__/ |__/ | $$ |__/ | $$ | $$ | $$ -// | $$ | $$$$$$$ /$$ /$$$$$$$ /$$ /$$$$$$$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$ /$$ /$$$$$$ /$$ /$$$$$$$ | $$$$$$$ /$$$$$$ /$$$$$$$| $$ /$$ -// | $$ | $$__ $$| $$ /$$_____/ | $$ /$$_____/ |____ $$ /$$_____/|_ $$_/ | $$ | $$ /$$__ $$| $$ /$$__ $$ | $$__ $$ |____ $$ /$$_____/| $$ /$$/ -// | $$ | $$ \ $$| $$| $$$$$$ | $$| $$$$$$ /$$$$$$$ | $$$$$$ | $$ | $$ | $$| $$ \ $$| $$| $$ | $$ | $$ \ $$ /$$$$$$$| $$ | $$$$$$/ -// | $$ | $$ | $$| $$ \____ $$ | $$ \____ $$ /$$__ $$ \____ $$ | $$ /$$| $$ | $$| $$ | $$| $$| $$ | $$ | $$ | $$ /$$__ $$| $$ | $$_ $$ -// | $$ | $$ | $$| $$ /$$$$$$$/ | $$ /$$$$$$$/ | $$$$$$$ /$$$$$$$/ | $$$$/| $$$$$$/| $$$$$$$/| $$| $$$$$$$ | $$ | $$| $$$$$$$| $$$$$$$| $$ \ $$ -// |__/ |__/ |__/|__/|_______/ |__/|_______/ \_______/ |_______/ \___/ \______/ | $$____/ |__/ \_______/ |__/ |__/ \_______/ \_______/|__/ \__/ -// | $$ -// | $$ -// |__/ + // /$$$$$$$$ /$$$$$$ /$$ /$$ /$$ /$$ /$$$$$$$$ + //| $$_____/|_ $$_/| $$ / $$| $$$ /$$$| $$_____/ + //| $$ | $$ | $$/ $$/| $$$$ /$$$$| $$ + //| $$$$$ | $$ \ $$$$/ | $$ $$/$$ $$| $$$$$ + //| $$__/ | $$ >$$ $$ | $$ $$$| $$| $$__/ + //| $$ | $$ /$$/\ $$| $$\ $ | $$| $$ + //| $$ /$$$$$$| $$ \ $$| $$ \/ | $$| $$$$$$$$ + //|__/ |______/|__/ |__/|__/ |__/|________/ + // + // + // + // /$$$$$$$$ /$$ /$$ /$$ /$$ /$$ /$$ /$$ /$$ + //|__ $$__/| $$ |__/ |__/ | $$ |__/ | $$ | $$ | $$ + // | $$ | $$$$$$$ /$$ /$$$$$$$ /$$ /$$$$$$$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$ /$$ /$$$$$$ /$$ /$$$$$$$ | $$$$$$$ /$$$$$$ /$$$$$$$| $$ /$$ + // | $$ | $$__ $$| $$ /$$_____/ | $$ /$$_____/ |____ $$ /$$_____/|_ $$_/ | $$ | $$ /$$__ $$| $$ /$$__ $$ | $$__ $$ |____ $$ /$$_____/| $$ /$$/ + // | $$ | $$ \ $$| $$| $$$$$$ | $$| $$$$$$ /$$$$$$$ | $$$$$$ | $$ | $$ | $$| $$ \ $$| $$| $$ | $$ | $$ \ $$ /$$$$$$$| $$ | $$$$$$/ + // | $$ | $$ | $$| $$ \____ $$ | $$ \____ $$ /$$__ $$ \____ $$ | $$ /$$| $$ | $$| $$ | $$| $$| $$ | $$ | $$ | $$ /$$__ $$| $$ | $$_ $$ + // | $$ | $$ | $$| $$ /$$$$$$$/ | $$ /$$$$$$$/ | $$$$$$$ /$$$$$$$/ | $$$$/| $$$$$$/| $$$$$$$/| $$| $$$$$$$ | $$ | $$| $$$$$$$| $$$$$$$| $$ \ $$ + // |__/ |__/ |__/|__/|_______/ |__/|_______/ \_______/ |_______/ \___/ \______/ | $$____/ |__/ \_______/ |__/ |__/ \_______/ \_______/|__/ \__/ + // | $$ + // | $$ + // |__/ if (advUi->menu == ui_advmode_menu::FallAction) { getCurViewscreen()->feed_key(interface_key::OPTION1); @@ -299,17 +299,17 @@ command_result MenuQuery(DFHack::color_ostream &stream, const EmptyMessage *in, command_result MovementSelectCommand(DFHack::color_ostream &stream, const dfproto::IntMessage *in) { - if (!(df::global::ui_advmode->menu == ui_advmode_menu::MoveCarefully)) - return CR_OK; - int choice = in->value(); - int page = choice / 5; - int select = choice % 5; - for (int i = 0; i < page; i++) - { - keyQueue.push(interface_key::SECONDSCROLL_PAGEDOWN); - } - keyQueue.push((interface_key::interface_key)(interface_key::OPTION1 + select)); - return CR_OK; + if (!(df::global::ui_advmode->menu == ui_advmode_menu::MoveCarefully)) + return CR_OK; + int choice = in->value(); + int page = choice / 5; + int select = choice % 5; + for (int i = 0; i < page; i++) + { + keyQueue.push(interface_key::SECONDSCROLL_PAGEDOWN); + } + keyQueue.push((interface_key::interface_key)(interface_key::OPTION1 + select)); + return CR_OK; } command_result MiscMoveCommand(DFHack::color_ostream &stream, const MiscMoveParams *in) diff --git a/plugins/remotefortressreader/remotefortressreader.cpp b/plugins/remotefortressreader/remotefortressreader.cpp index da4121057..b13e56289 100644 --- a/plugins/remotefortressreader/remotefortressreader.cpp +++ b/plugins/remotefortressreader/remotefortressreader.cpp @@ -258,8 +258,8 @@ DFhackCExport command_result plugin_init(color_ostream &out, std::vector addFunction("GetPauseState", GetPauseState, SF_ALLOW_REMOTE); svc->addFunction("GetVersionInfo", GetVersionInfo, SF_ALLOW_REMOTE); svc->addFunction("GetReports", GetReports, SF_ALLOW_REMOTE); - svc->addFunction("MoveCommand", MoveCommand, SF_ALLOW_REMOTE); + svc->addFunction("MoveCommand", MoveCommand, SF_ALLOW_REMOTE); svc->addFunction("JumpCommand", JumpCommand, SF_ALLOW_REMOTE); - svc->addFunction("MenuQuery", MenuQuery, SF_ALLOW_REMOTE); + svc->addFunction("MenuQuery", MenuQuery, SF_ALLOW_REMOTE); svc->addFunction("MovementSelectCommand", MovementSelectCommand, SF_ALLOW_REMOTE); svc->addFunction("MiscMoveCommand", MiscMoveCommand, SF_ALLOW_REMOTE); svc->addFunction("GetLanguage", GetLanguage, SF_ALLOW_REMOTE); @@ -318,10 +318,10 @@ DFhackCExport command_result plugin_shutdown(color_ostream &out) DFhackCExport command_result plugin_onupdate(color_ostream &out) { - if (!enableUpdates) - return CR_OK; - KeyUpdate(); - return CR_OK; + if (!enableUpdates) + return CR_OK; + KeyUpdate(); + return CR_OK; } uint16_t fletcher16(uint8_t const *data, size_t bytes) @@ -1698,7 +1698,7 @@ static command_result GetBlockList(color_ostream &stream, const BlockRequest *in if (in->has_blocks_needed()) blocks_needed = in->blocks_needed(); else - blocks_needed = NUMBER_OF_POINTS*(in->max_z() - in->min_z()); + blocks_needed = NUMBER_OF_POINTS * (in->max_z() - in->min_z()); int blocks_sent = 0; int min_x = in->min_x(); int min_y = in->min_y(); @@ -2660,7 +2660,7 @@ static void CopyLocalMap(df::world_data * worldData, df::world_region_details* w int region_min_x = pos_x * 16; int region_min_y = pos_y * 16; - if ((site->global_min_x >(region_min_x + 16)) || + if ((site->global_min_x > (region_min_x + 16)) || (site->global_min_y > (region_min_y + 16)) || (site->global_max_x < (region_min_x)) || (site->global_max_y < (region_min_y)))