Some more gcc deprecation cleanups
This commit is contained in:
@@ -76,7 +76,7 @@ path[i+1]='\0'; // close the argument string after the last '\'
|
||||
|
||||
void file_initialize()
|
||||
{
|
||||
static char * szFilter[] =
|
||||
static char const * szFilter[] =
|
||||
{
|
||||
"Classic BoE Save Files (*.SAV)\0*.sav\0"
|
||||
"Experimental BoE Save Files (*.savx)\0*.savx\0"
|
||||
@@ -702,7 +702,6 @@ void save_file(short mode) //mode 0 - normal 1 - save as
|
||||
party_record_type *party_ptr;
|
||||
setup_save_type *setup_ptr;
|
||||
pc_record_type *pc_ptr;
|
||||
current_town_type *town_ptr;
|
||||
|
||||
char *party_encryptor;
|
||||
|
||||
@@ -1004,14 +1003,6 @@ void save_file(short mode) //mode 0 - normal 1 - save as
|
||||
}
|
||||
|
||||
if (town_save == true) {
|
||||
town_ptr = &c_town;
|
||||
/*
|
||||
len = sizeof(current_town_type);
|
||||
if (WriteFile(file_id, town_ptr, sizeof(current_town_type), &bytes, NULL) == false)
|
||||
{
|
||||
CloseHandle(file_id);
|
||||
return;
|
||||
}*/
|
||||
|
||||
/** saving c_town **/
|
||||
|
||||
@@ -1888,7 +1879,7 @@ void oops_error(short error)
|
||||
}
|
||||
|
||||
//called recursively if a sub-directory is founded
|
||||
void ListFiles(char *path, HWND listbox){
|
||||
void ListFiles(char const *path, HWND listbox){
|
||||
|
||||
short len;
|
||||
HANDLE find_file_id;
|
||||
|
@@ -1205,9 +1205,9 @@ void display_strings_event_filter (short item_hit)
|
||||
|
||||
// str_label_1 & str_label_2 used for saving button for journal
|
||||
// 1000 + x scen 2000 + x out 3000 + x town
|
||||
void display_strings(char *text1, char *text2,short str_label_1,short str_label_2,short str_label_1b,
|
||||
void display_strings(char const *text1, char const *text2,short str_label_1,short str_label_2,short str_label_1b,
|
||||
short str_label_2b,
|
||||
char *title,short sound_num,short graphic_num,short parent_num)
|
||||
char const *title,short sound_num,short graphic_num,short parent_num)
|
||||
{
|
||||
|
||||
SetCursor(sword_curs);
|
||||
@@ -1226,9 +1226,9 @@ void display_strings(char *text1, char *text2,short str_label_1,short str_label_
|
||||
|
||||
csp(store_which_string_dlog,store_which_string_dlog,graphic_num);
|
||||
|
||||
csit(store_which_string_dlog,4,(char *) text1);
|
||||
csit(store_which_string_dlog,4,text1);
|
||||
if (text2 != NULL) {
|
||||
csit(store_which_string_dlog,5,(char *) text2);
|
||||
csit(store_which_string_dlog,5,text2);
|
||||
}
|
||||
if (strlen(title) > 0)
|
||||
csit(store_which_string_dlog,6,title);
|
||||
@@ -1243,7 +1243,7 @@ void display_strings(char *text1, char *text2,short str_label_1,short str_label_
|
||||
final_process_dialog(store_which_string_dlog);
|
||||
}
|
||||
|
||||
void give_error(char *text1, char *text2,short parent_num)
|
||||
void give_error(char const *text1, char const *text2,short parent_num)
|
||||
{
|
||||
display_strings(text1,text2,-1,-1,-1,-1,"Error!",57,716,parent_num);
|
||||
}
|
||||
@@ -1257,6 +1257,6 @@ void display_strings_with_nums(short a1,short a2, short b1, short b2,
|
||||
GetIndString(str1,a1,a2);
|
||||
if ((b1 > 0) && (b2 > 0))
|
||||
GetIndString(str2,b1,b2);
|
||||
display_strings((char *) str1,(char *) str2,-1,-1,-1,-1,
|
||||
display_strings(str1, str2,-1,-1,-1,-1,
|
||||
title, sound_num, graphic_num, parent_num);
|
||||
}
|
||||
|
@@ -38,10 +38,10 @@ void anax_string(short val1,short val2);
|
||||
void give_help(short help1,short help2,short parent_num);
|
||||
void put_spec_item_info (short which_i);
|
||||
void display_strings_event_filter (short item_hit);
|
||||
void display_strings(char *text1, char *text2,short str_label_1,short str_label_2,short str_label_1b,
|
||||
void display_strings(char const *text1, char const *text2,short str_label_1,short str_label_2,short str_label_1b,
|
||||
short str_label_2b,
|
||||
char *title,short sound_num,short graphic_num,short parent_num);
|
||||
void give_error(char *text1, char *text2,short parent_num);
|
||||
char const *title,short sound_num,short graphic_num,short parent_num);
|
||||
void give_error(char const *text1, char const *text2,short parent_num);
|
||||
void display_strings_with_nums(short a1,short a2, short b1, short b2,
|
||||
char *title,short sound_num,short graphic_num,short parent_num);
|
||||
|
||||
|
@@ -89,7 +89,6 @@ item_record_type get_weapon(short loot)
|
||||
|
||||
item_record_type get_armor(short loot)
|
||||
{
|
||||
short r1;
|
||||
item_record_type armor;
|
||||
|
||||
if (loot == 0)
|
||||
|
@@ -1185,13 +1185,13 @@ short print_terrain(location space)
|
||||
if (is_combat()) which_terrain = combat_terrain[space.x][space.y];
|
||||
get_ter_name(store_string2,which_terrain);
|
||||
sprintf((char *) store_string, " %s", store_string2);
|
||||
add_string_to_buf((char *) store_string);
|
||||
add_string_to_buf( store_string);
|
||||
|
||||
return (short) which_terrain;
|
||||
}
|
||||
|
||||
|
||||
void add_string_to_buf(char *string)
|
||||
void add_string_to_buf(char const *string)
|
||||
{
|
||||
if(strcmp(string,"") == 0)
|
||||
return;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#ifndef _TEXT_H
|
||||
#define _TEXT_H
|
||||
|
||||
|
||||
#include <windows.h> // RECT, HDC etc.
|
||||
#include "classes/location.h" // location
|
||||
#include "classes/pc.h" // pc_record_type
|
||||
@@ -42,7 +42,7 @@ void monst_damaged_mes(short which_m,short how_much,short how_much_spec);
|
||||
void monst_killed_mes(short which_m);
|
||||
void print_nums(short a,short b,short c);
|
||||
short print_terrain(location space);
|
||||
void add_string_to_buf(char *string);
|
||||
void add_string_to_buf(char const *string);
|
||||
void print_buf () ;
|
||||
void through_sending();
|
||||
void Display_String(char *str);
|
||||
|
@@ -1,24 +1,24 @@
|
||||
#ifndef _LOCATION_H
|
||||
#define _LOCATION_H
|
||||
|
||||
|
||||
struct location
|
||||
{
|
||||
char x, y;
|
||||
|
||||
unsigned char x, y;
|
||||
|
||||
/* functions */
|
||||
location() : x(0), y(0) { }
|
||||
location(int ix, int iy) { x = ix; y = iy; }
|
||||
location toGlobal(); /* convert local coordinates to global*/
|
||||
location toLocal(); /* convert global coordinates to local*/
|
||||
location randomShift();
|
||||
|
||||
|
||||
short countWalls() const; /* count number of walls around */
|
||||
short handleLever(); /* call dialog and eventually pull lever */
|
||||
void crumbleWall();
|
||||
bool isDoor() const;
|
||||
|
||||
|
||||
void pickLock(short pcNum);
|
||||
void bashDoor(short pcNum);
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
@@ -968,7 +968,7 @@ void cd_get_text_edit_str(short, char *str)
|
||||
else str[0] = 0;
|
||||
}
|
||||
|
||||
void cd_set_item_text(short dlog_num, short item_num, char *str)
|
||||
void cd_set_item_text(short dlog_num, short item_num, char const *str)
|
||||
{
|
||||
short k,dlg_index,item_index;
|
||||
if (cd_get_indices(dlog_num,item_num,&dlg_index,&item_index) < 0)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#ifndef _DLOGTOOL_H
|
||||
#define _DLOGTOOL_H
|
||||
|
||||
|
||||
#include "../globvar.h"
|
||||
//#include "boe.graphutil.h"
|
||||
|
||||
@@ -20,7 +20,7 @@ short cd_process_keystroke(HWND window,WPARAM wparam, LPARAM lparam,short *item)
|
||||
void cd_attach_key(short dlog_num,short item_num,char key);
|
||||
void cd_set_pict(short dlog_num, short item_num, short pict_num);
|
||||
void cd_activate_item(short dlog_num, short item_num, short status);
|
||||
void cd_set_item_text(short dlog_num, short item_num, char *str);
|
||||
void cd_set_item_text(short dlog_num, short item_num, char const *str);
|
||||
void cd_set_item_num(short dlog_num, short item_num, short num);
|
||||
void cd_set_led(short dlog_num,short item_num,short state);
|
||||
void cd_text_frame(short dlog_num,short item_num,short frame);
|
||||
@@ -50,7 +50,7 @@ inline void cd_set_text_edit_str(short, char *str)
|
||||
{ if (edit_box != NULL) SetWindowText(edit_box,str); }
|
||||
inline void cdsin(short dlog_num, short item_num, short num)
|
||||
{ cd_set_item_num(dlog_num, item_num, num); }
|
||||
inline void csit(short dlog_num, short item_num, char *str)
|
||||
inline void csit(short dlog_num, short item_num, char const *str)
|
||||
{ cd_set_item_text( dlog_num, item_num, str); }
|
||||
inline void csp(short dlog_num, short item_num, short pict_num)
|
||||
{ cd_set_pict( dlog_num, item_num, pict_num); }
|
||||
|
Reference in New Issue
Block a user