Eliminate function-scope loop index variables

This makes all loop index variables local to their loop and
fixes some issue arising from the loop variables being present
through the whole function, such as using the wrong index variable.

In addition, there has been some reduction of code duplication in
the scenario editor.
This commit is contained in:
2016-08-21 00:46:40 -04:00
parent d2ec3ff8c5
commit 9363ab2fcf
47 changed files with 1629 additions and 2111 deletions

View File

@@ -1,6 +1,7 @@
#include <string>
#include "pict.hpp" // for ePicType
#include "location.hpp" // for info_rect_t
class cDialog;
enum eStrType {
@@ -30,7 +31,7 @@ void edit_spec_text(eStrMode mode,short *str1,short *str2,cDialog* parent);
void edit_dialog_text(eStrMode mode,short *str1,cDialog* parent);
short edit_special_num(short mode,short what_start);
void edit_scen_intro();
bool edit_area_rect_str(short which_str,short mode);
bool edit_area_rect_str(info_rect_t& r);
void make_cursor_sword() ;
size_t num_strs(eStrMode str_mode);