- Cleaned out some of the compiler warnings in the scenario editor (removing unused variables mostly).
- Finally removed the grow box in the corner of the scenario editor window. - Changed #include <iostream> in several headers to #include <iosfwd>, since they were only present for the use of the ostream and istream classes, and cout/cin were unneeded. - Changed bool to Boolean in the old structs, since that's what it was originally. - Small changes to graphtool, including an overload of get_custom_rect. - Added gcd function to mathutil; was needed for something in the new dialog engine git-svn-id: http://openexile.googlecode.com/svn/trunk@71 4ebdad44-0ea0-11de-aab3-ff745001d230
This commit is contained in:
@@ -284,11 +284,11 @@ void rect_draw_some_item (GWorldPtr src_gworld,Rect src_rect,GWorldPtr targ_gwor
|
||||
SetPort(cur_port);
|
||||
}
|
||||
|
||||
void char_win_draw_string(WindowPtr dest_window,Rect dest_rect,char *str,short mode,short line_height,bool main_win){
|
||||
void char_win_draw_string(WindowPtr dest_window,Rect dest_rect,const char *str,short mode,short line_height,bool main_win){
|
||||
char_port_draw_string(GetWindowPort(dest_window),dest_rect,str,mode,line_height, main_win);
|
||||
}
|
||||
|
||||
void char_port_draw_string(GrafPtr dest_window,Rect dest_rect,char *str,short mode,short line_height,bool main_win){
|
||||
void char_port_draw_string(GrafPtr dest_window,Rect dest_rect,const char *str,short mode,short line_height,bool main_win){
|
||||
Str255 store_s;
|
||||
|
||||
strcpy((char*) store_s,str);
|
||||
@@ -723,6 +723,15 @@ Rect get_custom_rect (short which_rect){
|
||||
return store_rect;
|
||||
}
|
||||
|
||||
short get_custom_rect (short which_rect, Rect& store_rect){ // returns the number of the sheet to use
|
||||
short sheet = which_rect / 100;
|
||||
which_rect %= 100;
|
||||
SetRect(&store_rect,0,0,28,36);
|
||||
|
||||
OffsetRect(&store_rect,28 * (which_rect % 10),36 * (which_rect / 10));
|
||||
return sheet;
|
||||
}
|
||||
|
||||
void get_str(Str255 str,short i, short j){
|
||||
GetIndString(str, i, j);
|
||||
p2cstr(str);
|
||||
|
@@ -18,14 +18,15 @@ void set_cursor(short which_curs);
|
||||
void restore_cursor();
|
||||
void rect_draw_some_item (GWorldPtr src_gworld,Rect src_rect,GWorldPtr targ_gworld,Rect targ_rect,
|
||||
char masked,short main_win);
|
||||
void char_win_draw_string(WindowPtr dest_window,Rect dest_rect,char *str,short mode,short line_height,bool main_win);
|
||||
void char_port_draw_string(GrafPtr dest_window,Rect dest_rect,char *str,short mode,short line_height,bool main_win);
|
||||
void char_win_draw_string(WindowPtr dest_window,Rect dest_rect,const char *str,short mode,short line_height,bool main_win);
|
||||
void char_port_draw_string(GrafPtr dest_window,Rect dest_rect,const char *str,short mode,short line_height,bool main_win);
|
||||
void win_draw_string(GrafPtr dest_window,Rect dest_rect,Str255 str,short mode,short line_height,bool main_win);
|
||||
short string_length(const char *str);
|
||||
//OSStatus flip_pict(OSType domain, OSType type, short id, void *ptr, UInt32 size, bool isNative, void *refcon);
|
||||
//void draw_terrain();
|
||||
Rect calc_rect(short i, short j);
|
||||
Rect get_custom_rect (short which_rect);
|
||||
short get_custom_rect (short which_rect, Rect& store_rect);
|
||||
void get_str(Str255 str,short i, short j);
|
||||
GWorldPtr importPictureFileToGWorld(const FSSpec *fileSpec);
|
||||
void writeGWorldToPNGFile(GWorldPtr gw, const FSSpec *fileSpec);
|
||||
|
@@ -58,3 +58,13 @@ short move_to_zero(short val){
|
||||
return val - 1;
|
||||
return val;
|
||||
}
|
||||
|
||||
short gcd(short a, short b){ // Grabbed from Wikipedia and translated to C code
|
||||
short t;
|
||||
while(b != 0){
|
||||
t = b;
|
||||
b = a % b;
|
||||
a = t;
|
||||
}
|
||||
return a;
|
||||
}
|
@@ -13,3 +13,4 @@ short max(short a,short b);
|
||||
short min(short a,short b);
|
||||
short minmax(short min,short max,short k);
|
||||
short move_to_zero(short val);
|
||||
short gcd(short a, short b);
|
||||
|
Reference in New Issue
Block a user