From 297eae6a944af7c00aa718bc2932c8b66947e6af Mon Sep 17 00:00:00 2001 From: Sylae Corell Date: Wed, 30 Jul 2014 11:55:31 -0600 Subject: [PATCH] our friend Deprecated conversion is no more :) --- Win32/game/boe.dlgutil.cpp | 6 +++--- Win32/game/boe.graphics.cpp | 13 +++--------- Win32/game/boe.graphutil.cpp | 4 ++-- Win32/game/boe.graphutil.h | 4 ++-- Win32/game/boe.infodlg.cpp | 10 ++++----- Win32/game/boe.infodlg.h | 2 +- Win32/game/boe.monster.cpp | 3 +-- Win32/game/boe.newgraph.cpp | 8 +++---- Win32/game/boe.newgraph.h | 6 +++--- Win32/game/boe.party.cpp | 12 +++++------ Win32/game/boe.text.cpp | 4 ++-- Win32/game/boe.text.h | 2 +- Win32/game/global.cpp | 2 +- Win32/game/global.h | 2 +- Win32/game/globvar.cpp | 18 ++++++++-------- Win32/game/globvar.h | 40 +++++++++++++++++------------------ Win32/game/tools/dlogtool.cpp | 2 +- Win32/game/tools/dlogtool.h | 2 +- 18 files changed, 64 insertions(+), 76 deletions(-) diff --git a/Win32/game/boe.dlgutil.cpp b/Win32/game/boe.dlgutil.cpp index bac89047..f2b96d82 100644 --- a/Win32/game/boe.dlgutil.cpp +++ b/Win32/game/boe.dlgutil.cpp @@ -90,7 +90,7 @@ void end_shop_mode() sprintf(one_back2,""); strnum1 = strnum2 = oldstrnum1 = oldstrnum2 = 0; - place_talk_str((char *)old_str1,"",0,dummy_rect); + place_talk_str(old_str1,"",0,dummy_rect); } else { DeleteObject(talk_gworld); @@ -1433,8 +1433,8 @@ void put_scen_info() { short i; char place_str[256]; - char *ratings[] = {"G","PG","R","NC-17"}; - char *difficulty[] = {"Low","Medium","High","Very High"}; + char const *ratings[] = {"G","PG","R","NC-17"}; + char const *difficulty[] = {"Low","Medium","High","Very High"}; for (i = 0; i < 3; i++) if(store_scen_page_on * 3 + i < store_num_scen){ diff --git a/Win32/game/boe.graphics.cpp b/Win32/game/boe.graphics.cpp index 488bcef0..d091ea93 100644 --- a/Win32/game/boe.graphics.cpp +++ b/Win32/game/boe.graphics.cpp @@ -288,7 +288,7 @@ void draw_startup_anim() void draw_start_button(short which_position,short which_button) { RECT from_rect,to_rect; - char *button_labels[] = + char const *button_labels[] = { "Load Game", "Make New Party", @@ -734,7 +734,6 @@ void draw_buttons(short mode) //mode; // 0 - regular 1 - button action { RECT source_rect = {0,0,258,37}, dest_rec; /**/ - HBITMAP buttons_to_draw; Boolean spec_draw = false; if (mode == 1) { @@ -742,8 +741,6 @@ void draw_buttons(short mode) mode -= 100; } - buttons_to_draw = buttons_gworld; - source_rect = win_to_rects[1]; OffsetRect(&source_rect,-1 * source_rect.left, -1 * source_rect.top); if (is_combat()) { @@ -960,7 +957,7 @@ void draw_terrain(short mode) location sector_p_in,view_loc; char can_draw; unsigned char spec_terrain; - Boolean off_terrain = false,draw_trim = true; + Boolean draw_trim = true; short i,j,short_spec_terrain; if (mode == 2) { @@ -1020,7 +1017,6 @@ void draw_terrain(short mode) where_draw = (is_out()) ? party.p_loc : center; where_draw.x += q - 4; where_draw.y += r - 4; - off_terrain = false; draw_trim = true; if ((is_out() == false) && ((where_draw.x < 0) || (where_draw.x > town_size[town_type] - 1) @@ -1555,11 +1551,9 @@ void pre_boom_space(location where,short mode,short type,short damage,short soun // 3 - pole 4 - club 5 - fireball hit 6 - squish 7 - cold // 8 - acid 9 - claw 10 - bite 11 - slime 12 - zap 13 - missile hit { - short sound_key; short sound_to_play[20] = {97,69,70,71,72, 73,55,75,42,86, 87,88,89,98,0, 0,0,0,0,0}; - sound_key = type / 10; type = type % 10; if ((mode != 100) && (party_can_see(where) == 6)) @@ -1602,7 +1596,7 @@ void pre_boom_space(location where,short mode,short type,short damage,short soun /**/ RECT terrain_from; long dummy; - short del_len,sound_key; + short del_len; char dam_str[20]; short x_adj = 0,y_adj = 0,which_m; // RECT mixed_square = {353,169,381,205}; @@ -1610,7 +1604,6 @@ void pre_boom_space(location where,short mode,short type,short damage,short soun short sound_to_play[20] = {97,69,70,71,72, 73,55,75,42,86, 87,88,89,98,0, 0,0,0,0,0}; - sound_key = type / 10; type = type % 10; where_draw.x = where.x - center.x + 4; diff --git a/Win32/game/boe.graphutil.cpp b/Win32/game/boe.graphutil.cpp index 7799ae64..f5b3a834 100644 --- a/Win32/game/boe.graphutil.cpp +++ b/Win32/game/boe.graphutil.cpp @@ -359,12 +359,12 @@ HBITMAP load_pict(short pict_num,HDC) /* GK */ -HBITMAP ReadBMP(char * fileName) +HBITMAP ReadBMP(char const * fileName) { return (HBITMAP) LoadImage(0, fileName, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE); } -HBITMAP ReadScenFile(char* filename){ //like ReadBMP but in the current scenario folder only. +HBITMAP ReadScenFile(char const* filename){ //like ReadBMP but in the current scenario folder only. short store_val; char str[256]= "scenarios/"; diff --git a/Win32/game/boe.graphutil.h b/Win32/game/boe.graphutil.h index b59f99ea..a39624fe 100644 --- a/Win32/game/boe.graphutil.h +++ b/Win32/game/boe.graphutil.h @@ -41,7 +41,7 @@ HBITMAP load_pict(short pict_num,HDC); void paint_pattern(HBITMAP dest,short which_mode,RECT dest_rect,short which_pattern); /* GK */ -extern HBITMAP ReadBMP(char * fileName); -extern HBITMAP ReadScenFile(char* filename); +extern HBITMAP ReadBMP(char const * fileName); +extern HBITMAP ReadScenFile(char const* filename); #endif diff --git a/Win32/game/boe.infodlg.cpp b/Win32/game/boe.infodlg.cpp index 4d17a1fa..f3140543 100644 --- a/Win32/game/boe.infodlg.cpp +++ b/Win32/game/boe.infodlg.cpp @@ -236,7 +236,7 @@ void put_item_info() char desc_str[256]; short i; item_record_type s_i; - char *item_types[] = {"","1-Handed weapon","2-Handed weapon","","Bow","Arrows","Thrown missile", + char const *item_types[] = {"","1-Handed weapon","2-Handed weapon","","Bow","Arrows","Thrown missile", "Potion/Magic Item","Scroll/Magic Item","Wand","Tool","","Shield","Armor","Helm", "Gloves","Shield","Boots","Ring","Necklace", "Weapon Poison","Gem, Stone, Etc.","Pants","Crossbow","Bolts","Missile Weapon"}; @@ -610,7 +610,7 @@ Boolean display_alchemy_event_filter (short item_hit) void display_alchemy() { short i; - char *alch_names[] = + char const *alch_names[] = { "Weak Curing Potion (1)", "Weak Healing Potion (1)", @@ -710,8 +710,8 @@ void pick_race_abil_event_filter(short item_hit) void pick_race_abil(pc_record_type *pc,short mode,short parent_num) //mode; // 0 - edit 1 - just display 2 - can't change race { - char *start_str1 = "Click on button by name for description."; - char *start_str2 = "Click on advantage button to add/remove."; + char const *start_str1 = "Click on button by name for description."; + char const *start_str2 = "Click on advantage button to add/remove."; store_trait_mode = mode; store_pc = pc; @@ -1249,7 +1249,7 @@ 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) + char const *title,short sound_num,short graphic_num,short parent_num) { char str1[256] = "", str2[256] = ""; diff --git a/Win32/game/boe.infodlg.h b/Win32/game/boe.infodlg.h index 43f88a53..f7d8277c 100644 --- a/Win32/game/boe.infodlg.h +++ b/Win32/game/boe.infodlg.h @@ -43,6 +43,6 @@ void display_strings(char const *text1, char const *text2,short str_label_1,shor 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); + char const *title,short sound_num,short graphic_num,short parent_num); #endif diff --git a/Win32/game/boe.monster.cpp b/Win32/game/boe.monster.cpp index 6fa74c48..34910fbd 100644 --- a/Win32/game/boe.monster.cpp +++ b/Win32/game/boe.monster.cpp @@ -1284,11 +1284,10 @@ Boolean summon_monster(unsigned char which,location where,short duration,short g // to put monster { location loc; - short which_m,spot; + short spot; if ((is_town()) || (monsters_going)) { // Ooooh ... mondo kludge. Need to find caster's attitude to give it to monst. - which_m = monst_there(where); loc = find_clear_spot(where,0); if (loc.x == 0) return false; diff --git a/Win32/game/boe.newgraph.cpp b/Win32/game/boe.newgraph.cpp index f16ff31f..7bd54a1c 100644 --- a/Win32/game/boe.newgraph.cpp +++ b/Win32/game/boe.newgraph.cpp @@ -110,7 +110,6 @@ void apply_light_mask() HDC hdc; HBITMAP store_bmp; - HBRUSH old_brush; if (PSD[SDF_NO_FRILLS] > 0) return; @@ -155,7 +154,6 @@ void apply_light_mask() hdc = CreateCompatibleDC(main_dc); SetBkMode(hdc,TRANSPARENT); store_bmp = (HBITMAP) SelectObject(hdc,terrain_screen_gworld); - old_brush = (HBRUSH) SelectObject(hdc,GetStockObject(BLACK_BRUSH)); for (i = 2; i < 11; i++) for (j = 2; j < 11; j++) { @@ -684,7 +682,7 @@ void draw_shop_graphics(short draw_mode,RECT clip_area_rect) short cur_cost,what_magic_shop,what_magic_shop_item; char cur_name[256]; char cur_info_str[256]; - char *cost_strs[] = + char const *cost_strs[] = { "Extremely Cheap", "Very Reasonable", "Pretty Average", @@ -871,7 +869,7 @@ void refresh_shopping() } } -void click_talk_rect(char *str_to_place,char *str_to_place2,RECT c_rect) +void click_talk_rect(char const *str_to_place,char const *str_to_place2,RECT c_rect) { long dum; @@ -988,7 +986,7 @@ void get_item_interesting_string(item_record_type item,char *message) } -void place_talk_str(char *str_to_place,char *str_to_place2,short color,RECT c_rect) +void place_talk_str(char const *str_to_place,char const *str_to_place2,short color,RECT c_rect) // color 0 - regular 1 - darker { RECT area_rect; diff --git a/Win32/game/boe.newgraph.h b/Win32/game/boe.newgraph.h index 7697cb69..fdf0b392 100644 --- a/Win32/game/boe.newgraph.h +++ b/Win32/game/boe.newgraph.h @@ -1,6 +1,6 @@ #ifndef _NEWGRAPH_H #define _NEWGRAPH_H - + typedef struct { char word[15]; RECT word_rect; @@ -26,8 +26,8 @@ item_record_type store_mage_spells(short which_s) ; item_record_type store_priest_spells(short which_s); item_record_type store_alchemy(short which_s); void get_item_interesting_string(item_record_type item,char *message); -void click_talk_rect(char *str_to_place,char *str_to_place2,RECT c_rect); -void place_talk_str(char *str_to_place,char *str_to_place2,short color,RECT c_rect); +void click_talk_rect(char const *str_to_place,char const *str_to_place2,RECT c_rect); +void place_talk_str(char const *str_to_place,char const *str_to_place2,short color,RECT c_rect); short scan_for_response(char *str); void refresh_talking(); diff --git a/Win32/game/boe.party.cpp b/Win32/game/boe.party.cpp index d8442979..0786ccf7 100644 --- a/Win32/game/boe.party.cpp +++ b/Win32/game/boe.party.cpp @@ -2029,11 +2029,11 @@ void put_spell_list() void pick_spell_event_filter (short item_hit) { - char *choose_target = " Now pick a target."; - char *no_target = " No target needed."; - char *bad_target = " Can't cast on him/her."; - char *got_target = " Target selected."; - char *bad_spell = " Spell not available."; + char const *choose_target = " Now pick a target."; + char const *no_target = " No target needed."; + char const *bad_target = " Can't cast on him/her."; + char const *got_target = " Target selected."; + char const *bad_spell = " Spell not available."; Boolean spell_toast = false,dialog_done = false; switch (item_hit) { @@ -2423,12 +2423,10 @@ void alch_choice_event_filter (short item_hit) short alch_choice(short pc_num) { short difficulty[20] = {1,1,1,3,3, 4,5,5,7,9, 9,10,12,12,9, 14,19,10,16,20}; - short store_alchemy_pc; char get_text[256]; SetCursor(sword_curs); - store_alchemy_pc = pc_num; cd_create_dialog(1047,mainPtr); for (i = 0; i < 20; i++) { diff --git a/Win32/game/boe.text.cpp b/Win32/game/boe.text.cpp index 2a99948e..4215c22b 100644 --- a/Win32/game/boe.text.cpp +++ b/Win32/game/boe.text.cpp @@ -282,7 +282,7 @@ void put_item_screen(short screen_num,short suppress_buttons) break; case 7: // On jobs page SelectObject(hdc,bold_font); - win_draw_string(hdc,upper_frame_rect,"Your current jobs:",0,10); + win_draw_string(hdc,upper_frame_rect,(char *)"Your current jobs:",0,10); /* SelectObject(hdc,font); SetTextColor(hdc,colors[0]); win_draw_string(hdc,item_buttons[0][0],"Test",0,10);*/ @@ -1350,7 +1350,7 @@ short string_length(char *str,HDC hdc) } -void char_win_draw_string(HDC dest_window,RECT dest_rect,char *str,short mode,short line_height) +void char_win_draw_string(HDC dest_window,RECT dest_rect,char const *str,short mode,short line_height) { char store_s[256]; diff --git a/Win32/game/boe.text.h b/Win32/game/boe.text.h index 139fbcdc..b3405a56 100644 --- a/Win32/game/boe.text.h +++ b/Win32/game/boe.text.h @@ -50,7 +50,7 @@ RECT coord_to_rect(short i,short j); void c2p(char *str) ; void p2c(char *str); short string_length(char *str,HDC hdc); -void char_win_draw_string(HDC dest_window,RECT dest_rect,char *str,short mode,short line_height); +void char_win_draw_string(HDC dest_window,RECT dest_rect,char const *str,short mode,short line_height); void win_draw_string(HDC dest_window,RECT dest_rect,char *str,short mode,short line_height); short calc_day(); Boolean day_reached(unsigned char which_day, unsigned char which_event); diff --git a/Win32/game/global.cpp b/Win32/game/global.cpp index 9c2467ba..45cb7f31 100644 --- a/Win32/game/global.cpp +++ b/Win32/game/global.cpp @@ -41,7 +41,7 @@ POINT MAKEPOINT(LONG lParam) return point; } -void DebugQuit(char * msg) +void DebugQuit(char const * msg) { MessageBox(0, msg, "DebugQuit", MB_OK); PostQuitMessage(EXIT_FAILURE); diff --git a/Win32/game/global.h b/Win32/game/global.h index c1980d30..8f5bf55c 100644 --- a/Win32/game/global.h +++ b/Win32/game/global.h @@ -20,7 +20,7 @@ typedef unsigned char BYTE; POINT MAKEPOINT(LONG lparam); extern HINSTANCE store_hInstance; -void DebugQuit(char * msg); +void DebugQuit(char const * msg); struct RECT16 { diff --git a/Win32/game/globvar.cpp b/Win32/game/globvar.cpp index cc7b43ca..4c31086f 100644 --- a/Win32/game/globvar.cpp +++ b/Win32/game/globvar.cpp @@ -42,7 +42,7 @@ out_wandering_type store_wandering_special; short store_shop_type; short debug_ok = 0; short store_selling_values[8] = {0,0,0,0,0,0,0,0}; -char *dir_string[] = {"North", "NorthEast", "East", "SouthEast", "South", "SouthWest", "West", "NorthWest"}; +char const *dir_string[] = {"North", "NorthEast", "East", "SouthEast", "South", "SouthWest", "West", "NorthWest"}; char get_new_terrain(); item_record_type start_items[6] = { @@ -182,7 +182,7 @@ short monst_mage_cost[27] = {1,1,1,1,2, 2,2,2,2,4, 2,4,4,3,4, 4,4,5,5,5, 5,6,6,6 short monst_mage_area_effect[27] = {0,0,0,0,0, 0,0,0,1,0, 1,1,0,1,0, 0,0,0,1,0, 1,0,0,0,0, 0,0}; short monst_priest_cost[26] = {1,1,1,1,2, 2,2,4,2,3, 3,3,4,4,4, 5,5,5,10,6, 6,10,8,8,8, 8}; short monst_priest_area_effect[26] = {0,0,0,0,0, 0,0,0,0,0, 0,0,0,0,0, 0,0,1,0,0, 0,0,0,0,0, 1}; -char *d_string[] = +char const *d_string[] = { "North", "NorthEast", @@ -372,7 +372,7 @@ char store_store_name[256]; RECT bottom_help_rects[4] = {{6,356,250,368},{6,374,270,386},{6,386,250,398},{6,398,250,410}}; RECT shop_frame = {10,62,269,352}; RECT shop_done_rect = {212,388,275,411}; /**/ -char *heal_types[] = {"Heal Damage","Cure Poison","Cure Disease","Cure Paralysis", +char const *heal_types[] = {"Heal Damage","Cure Poison","Cure Disease","Cure Paralysis", "Uncurse Items","Cure Stoned Character","Raise Dead","Resurrection","Cure Dumbfounding"}; short heal_costs[9] = {50,30,80,100,250,500,1000,3000,100}; long cost_mult[7] = {5,7,10,13,16,20,25}; @@ -417,7 +417,7 @@ short button_type[150] = {1,1,4,5,1,1,0,0,1,1, 2,2,2,2,2,2,2,2,1,1, 1,1,1,1,1,1,1,1,0,0, 0,0,0,0,0,0,0,0,0,0}; -char *button_strs[150] = {"Done ","Ask"," "," ","Keep", "Cancel","+","-","Buy","Leave", +char const *button_strs[150] = {"Done ","Ask"," "," ","Keep", "Cancel","+","-","Buy","Leave", "Get","1","2","3","4","5","6","Cast"," "," ", " "," "," ","Buy","Sell","Other Spells","Buy x10"," "," ","Save", "Race","Train","Items","Spells","Heal Party","1","2","3","4","5", @@ -764,7 +764,7 @@ const char *mage_s_name[] = "Force Barrier", "Quickfire", "Death Arrows"}; -char *priest_s_name[] = {"Minor Bless","Minor Heal","Weaken Poison","Turn Undead","Location", +char const *priest_s_name[] = {"Minor Bless","Minor Heal","Weaken Poison","Turn Undead","Location", "Sanctuary","Symbiosis","Minor Manna","Ritual - Sanctify","Stumble", "Bless","Cure Poison","Curse","Light","Wound", "Summon Spirit","Move Mountains","Charm Foe","Disease","Awaken", @@ -778,7 +778,7 @@ char *priest_s_name[] = {"Minor Bless","Minor Heal","Weaken Poison","Turn Undead "Guardian","Mass Charm","Protective Circle","Pestilence", "Revive All","Ravage Spirit","Resurrect","Divine Thud", "Avatar","Wall of Blades","Word of Recall","Major Cleansing"}; -char *alch_names[] = {"Weak Curing Potion (1)","Weak Healing Potion (1)","Weak Poison (1)", +char const *alch_names[] = {"Weak Curing Potion (1)","Weak Healing Potion (1)","Weak Poison (1)", "Weak Speed Potion (3)","Medium Poison (3)", "Medium Heal Potion (4)","Strong Curing (5)","Medium Speed Potion (5)", "Graymold Salve (7)","Weak Energy Potion (9)", @@ -786,7 +786,7 @@ char *alch_names[] = {"Weak Curing Potion (1)","Weak Healing Potion (1)","Weak P "Resurrection Balm (9)","Medium Energy Ptn. (14)","Knowledge Brew (19)" , "Strong Strength (10)","Bliss (16)","Strong Energy Ptn. (20)" }; -char *alch_names_short[] = {"Weak Curing Potion","Weak Healing Potion","Weak Poison", +char const *alch_names_short[] = {"Weak Curing Potion","Weak Healing Potion","Weak Poison", "Weak Speed Potion","Medium Poison", "Medium Heal Potion","Strong Curing","Medium Speed Potion", "Graymold Salve","Weak Energy Potion", @@ -866,13 +866,13 @@ Boolean string_added = false; short store_text_x = 0, store_text_y = 0; short current_item_button[6] = {-1,-1,-1,-1,-1,-1}; short pc_button_state[6] = {-1,-1,-1,-1,-1,-1}; -char *m_mage_sp[] = {"Spark","Minor Haste","Strength","Flame Cloud","Flame", +char const *m_mage_sp[] = {"Spark","Minor Haste","Strength","Flame Cloud","Flame", "Minor Poison","Slow","Dumbfound","Stinking Cloud","Summon Beast", "Conflagration","Fireball","Weak Summoning","Web","Poison", "Ice Bolt","Slow Group","Major Haste","Firestorm","Summoning", "Shockstorm","Major Poison","Kill","Daemon","Major Blessing", "Major Summoning","Shockwave"}; -char *m_priest_sp[] = {"Minor Bless","Light Heal","Wrack","Stumble","Bless", +char const *m_priest_sp[] = {"Minor Bless","Light Heal","Wrack","Stumble","Bless", "Curse","Wound","Summon Spirit","Disease","Heal", "Holy Scourge","Smite","Curse All","Sticks to Snakes","Martyr's Shield", "Bless All","Major Heal","Flamestrike","Summon Host","Revive Self", diff --git a/Win32/game/globvar.h b/Win32/game/globvar.h index f6554901..73c000ab 100644 --- a/Win32/game/globvar.h +++ b/Win32/game/globvar.h @@ -1,6 +1,6 @@ #ifndef _GLOBVAR_H #define _GLOBVAR_H - + #include #include "global.h" #include "boe.newgraph.h" @@ -37,7 +37,7 @@ extern short store_shop_type; extern short debug_ok; extern short store_selling_values[8]; -extern char *dir_string[8]; +extern char const *dir_string[8]; extern char get_new_terrain(); extern creature_start_type save_monster_type; @@ -177,7 +177,7 @@ extern short hit_chance[51]; extern short abil_range[40]; extern short abil_odds[40]; extern short s_cost[2][62] ; - + extern short mage_range[80]; extern short priest_range[62]; extern short monst_mage_spell[55]; @@ -187,7 +187,7 @@ extern short monst_mage_area_effect[27]; extern short monst_priest_cost[26]; extern short monst_priest_area_effect[26]; -extern char *d_string[8]; +extern char const *d_string[8]; extern short pc_marked_damage[6]; extern short monst_marked_damage[T_M]; @@ -209,7 +209,7 @@ extern effect_pat_type single; extern effect_pat_type t; extern effect_pat_type small_square; extern effect_pat_type square; - + extern effect_pat_type open_square; extern effect_pat_type radius2; extern effect_pat_type radius3; @@ -228,7 +228,7 @@ extern Boolean talk_end_forced; extern char old_str1[256]; extern char old_str2[256]; extern char one_back1[256]; -extern char one_back2[256]; +extern char one_back2[256]; extern RECT talk_area_rect, word_place_rect,talk_help_rect; /**/ extern char title_string[50]; @@ -246,12 +246,12 @@ extern RECT bottom_help_rects[4]; extern RECT shop_frame; extern RECT shop_done_rect; /**/ -extern char *heal_types[9]; +extern char const *heal_types[9]; extern short heal_costs[9]; extern long cost_mult[7]; extern short cur_display_mode; -extern short terrain_pic[256]; +extern short terrain_pic[256]; extern short store_scen_page_on,store_num_scen; @@ -275,7 +275,7 @@ extern HWND store_parent; extern short available_dlog_buttons[NUM_DLOG_B]; extern short button_type[150]; -extern char *button_strs[150]; +extern char const *button_strs[150]; extern short button_left_adj[150]; extern char button_def_key[150]; @@ -337,7 +337,7 @@ extern HBITMAP startup_button_orig,startup_button_g,anim_mess ; extern Boolean done_fancy_startup_once ; -extern short terrain_there[9][9]; +extern short terrain_there[9][9]; extern RECT win_from_rects[6]; extern RECT win_to_rects[6]; @@ -472,7 +472,7 @@ extern location light_locs[40]; extern short num_lights; extern char d_s[60]; -extern short charm_odds[20]; +extern short charm_odds[20]; extern creature_start_type null_start_type; @@ -487,10 +487,10 @@ extern short skill_bonus[21]; extern short spell_level[62]; extern short spell_cost[2][62]; extern const char *mage_s_name[]; - -extern char *priest_s_name[]; -extern char *alch_names[]; -extern char *alch_names_short[]; + +extern char const *priest_s_name[]; +extern char const *alch_names[]; +extern char const *alch_names_short[]; extern short spell_w_cast[2][62]; // 0 - everywhere 1 - combat only 2 - town only 3 - town & outdoor only 4 - town & combat only 5 - outdoor only extern Boolean get_mage[30]; @@ -520,7 +520,7 @@ extern Boolean keep_change ; extern short store_skills[20],store_h,store_sp,i,store_skp,which_skill; extern long store_g; extern short store_train_mode,store_train_pc; - + extern HBITMAP pcs_gworld; // Dialog vars @@ -545,7 +545,7 @@ extern short boom_gr[8] ; extern short skill_max[20]; extern short abil_chart[200]; - + extern RECT startup_button[6]; extern short buf_pointer , lines_to_print, num_added_since_stop ; @@ -568,8 +568,8 @@ extern short store_text_x , store_text_y ; extern short current_item_button[6]; extern short pc_button_state[6]; -extern char *m_mage_sp[]; -extern char *m_priest_sp[]; +extern char const *m_mage_sp[]; +extern char const *m_priest_sp[]; // extra devices for maps extern HBRUSH hbrush[6]; @@ -585,7 +585,7 @@ extern HBITMAP map_bitmap[25]; extern unsigned char map_pats[256];// 250 extern unsigned char anim_map_pats[18]; - + extern location town_map_adj ; extern short town_force,store_min,store_max,store_shop; extern location town_force_loc; diff --git a/Win32/game/tools/dlogtool.cpp b/Win32/game/tools/dlogtool.cpp index 18dcbe9d..d99aee28 100644 --- a/Win32/game/tools/dlogtool.cpp +++ b/Win32/game/tools/dlogtool.cpp @@ -1067,7 +1067,7 @@ void cd_text_frame(short dlog_num,short item_num,short frame) cd_draw_item(dlog_num,item_num); } -void cd_add_label(short dlog_num, short item_num, char *label, short label_flag) +void cd_add_label(short dlog_num, short item_num, char const *label, short label_flag) { short dlg_index,item_index,label_loc = -1; short i; diff --git a/Win32/game/tools/dlogtool.h b/Win32/game/tools/dlogtool.h index 5d6fd564..e6096622 100644 --- a/Win32/game/tools/dlogtool.h +++ b/Win32/game/tools/dlogtool.h @@ -24,7 +24,7 @@ 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); -void cd_add_label(short dlog_num, short item_num, char *label, short label_flag); +void cd_add_label(short dlog_num, short item_num, char const *label, short label_flag); void cd_key_label(short dlog_num, short item_num,short loc); void cd_draw_item(short dlog_num,short item_num); void cd_initial_draw(short dlog_num);