- Merged two classes (cPopulation::cCreature and cTown::cCreature)

- Changes some C-strings to STL-strings
- Fixed the problem where the spiderweb logo would not fully appear if ShowStartupSplash is disabled

git-svn-id: http://openexile.googlecode.com/svn/trunk@54 4ebdad44-0ea0-11de-aab3-ff745001d230
This commit is contained in:
2009-05-07 02:50:16 +00:00
parent 68dcf3cdef
commit 4dc75d51c0
46 changed files with 932 additions and 831 deletions

View File

@@ -313,11 +313,11 @@ void cd_get_item_text(short dlog_num, short item_num, char *str){
else sprintf(str,"%s",text_short_str[item_index - 10]);
}
void csit(short dlog_num, short item_num, char *str){
void csit(short dlog_num, short item_num, const char *str){
cd_set_item_text( dlog_num, item_num, str);
}
void cd_set_item_text(short dlog_num, short item_num, char *str){
void cd_set_item_text(short dlog_num, short item_num, const char *str){
short dlg_index,item_index;
if (cd_get_indices(dlog_num,item_num,&dlg_index,&item_index) < 0)
return ;
@@ -367,7 +367,7 @@ short cd_retrieve_text_edit_num(short dlog_num, short item_num){
}
// NOTE!!! Expects a c string
void cd_set_text_edit_str(short dlog_num, short item_num, char *str){
void cd_set_text_edit_str(short dlog_num, short item_num, const char *str){
short dlg_index;
short the_type;
Handle the_handle = NULL;

View File

@@ -93,11 +93,11 @@ void cd_set_pict(short dlog_num, short item_num, short pict_num, short pict_type
void cd_activate_item(short dlog_num, short item_num, short status);
short cd_get_active(short dlog_num, short item_num);
void cd_get_item_text(short dlog_num, short item_num, char *str);
void csit(short dlog_num, short item_num, char *str);
void cd_set_item_text(short dlog_num, short item_num, char *str);
void csit(short dlog_num, short item_num, const char *str);
void cd_set_item_text(short dlog_num, short item_num, const char *str);
void cd_retrieve_text_edit_str(short dlog_num, short item_num, char *str);
short cd_retrieve_text_edit_num(short dlog_num, short item_num);
void cd_set_text_edit_str(short dlog_num, short item_num, char *str);
void cd_set_text_edit_str(short dlog_num, short item_num, const char *str);
void cd_set_text_edit_num(short dlog_num, short item_num, short num);
void cdsin(short dlog_num, short item_num, short num);
void cd_set_item_num(short dlog_num, short item_num, short num);

View File

@@ -417,7 +417,7 @@ void win_draw_string(GrafPtr dest_window,Rect dest_rect,Str255 str,short mode,sh
SetPort(old_port);//printf("String drawn.\n");
}
short string_length(char *str){ // Why not just use strlen?
short string_length(const char *str){ // Why not just use strlen?
short text_len[257];
short total_width = 0,i,len;
Str255 p_str;

View File

@@ -21,7 +21,7 @@ void rect_draw_some_item (GWorldPtr src_gworld,Rect src_rect,GWorldPtr targ_gwor
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 win_draw_string(GrafPtr dest_window,Rect dest_rect,Str255 str,short mode,short line_height,bool main_win);
short string_length(char *str);
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);