From 3d1b4cbfa12b426cf91efe491ebb74ebb3ea6bd2 Mon Sep 17 00:00:00 2001 From: Sylae Corell Date: Wed, 30 Jul 2014 13:37:24 -0600 Subject: [PATCH] Scenario Editor unused variables --- Win32/scenedit/blscened.cpp | 4 +--- Win32/scenedit/graphics.cpp | 9 +-------- Win32/scenedit/graphutl.cpp | 3 --- Win32/scenedit/tactions.cpp | 6 ------ 4 files changed, 2 insertions(+), 20 deletions(-) diff --git a/Win32/scenedit/blscened.cpp b/Win32/scenedit/blscened.cpp index 73178ce8..c89b008c 100644 --- a/Win32/scenedit/blscened.cpp +++ b/Win32/scenedit/blscened.cpp @@ -255,7 +255,6 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,LPSTR, int nCmd long CALLBACK WndProc (HWND hwnd, UINT message,WPARAM wParam, LPARAM lParam) { -HDC hdc; PAINTSTRUCT ps; //RECT s_rect = {0,0,30,30},d_rect = {0,0,30,30},d2 = {0,0,420,216},s2 = {0,0,420,216}; POINT press; @@ -382,7 +381,7 @@ RECT r; return 0; case WM_PAINT: - hdc = BeginPaint(hwnd,&ps); + BeginPaint(hwnd,&ps); EndPaint(hwnd,&ps); if (hwnd != mainPtr) check_cd_event(hwnd,message,wParam,lParam); @@ -469,7 +468,6 @@ Boolean handle_menu (short item, HMENU menu) short i; Boolean to_return = FALSE; short item_hit; - Boolean need_redraw = FALSE; item_hit = item; switch (item) { diff --git a/Win32/scenedit/graphics.cpp b/Win32/scenedit/graphics.cpp index 17289dd1..84dfe180 100644 --- a/Win32/scenedit/graphics.cpp +++ b/Win32/scenedit/graphics.cpp @@ -475,7 +475,7 @@ void set_up_terrain_buttons() void draw_terrain() { short q,r,x,i,small_i; - location which_pt,where_draw; + location where_draw; RECT draw_rect,clipping_rect = {8,8,260,332}; unsigned char t_to_draw; RECT tiny_to,tiny_to_base = {29,37,36,44},tiny_from,from_rect,to_rect; @@ -527,8 +527,6 @@ void draw_terrain() else t_to_draw = current_terrain.terrain[cen_x + q - 4][cen_y + r - 4]; } draw_one_terrain_spot(q,r,t_to_draw); - which_pt.x = cen_x + q - 4; - which_pt.y =cen_y + r - 4; tiny_to = tiny_to_base; OffsetRect(&tiny_to,28 * q, 36 * r); @@ -892,17 +890,13 @@ void draw_one_terrain_spot (short i,short j,unsigned char terrain_to_draw) void draw_one_tiny_terrain_spot (short i,short j,unsigned char terrain_to_draw,HDC hdc) { - location where_draw; RECT dest_rect = {0,0,5,5},from_rect = {0,0,4,4},orig_draw_rect = {0,0,4,4}; short picture_wanted; - GWorldPtr source_gworld; HBITMAP store_bmp; HBRUSH old_brush; picture_wanted = scenario.ter_types[terrain_to_draw].picture; - where_draw.x = (char) i; - where_draw.y = (char) j; OffsetRect(&dest_rect,8 + 4 * i,8 + 4 * j); store_bmp = (HBITMAP)SelectObject(hdc,ter_draw_gworld); @@ -932,7 +926,6 @@ void draw_one_tiny_terrain_spot (short i,short j,unsigned char terrain_to_draw,H } else if (picture_wanted >= 400) { - source_gworld = anim_gworld; picture_wanted -= 400; if (picture_wanted == 0) { SelectObject(hdc,map_brush[13]); diff --git a/Win32/scenedit/graphutl.cpp b/Win32/scenedit/graphutl.cpp index b7170e90..7a0c32bb 100644 --- a/Win32/scenedit/graphutl.cpp +++ b/Win32/scenedit/graphutl.cpp @@ -59,9 +59,6 @@ short current_pattern = -1; HBITMAP load_pict(short pict_num) { HBITMAP got_bitmap; - HDC model_hdc; - - model_hdc = main_dc; switch(pict_num) { case 700: got_bitmap = ReadBMP("Images/STATAREA.BMP"); break; diff --git a/Win32/scenedit/tactions.cpp b/Win32/scenedit/tactions.cpp index d5f7ccb8..dac04772 100644 --- a/Win32/scenedit/tactions.cpp +++ b/Win32/scenedit/tactions.cpp @@ -1526,12 +1526,10 @@ void set_up_lights() short i,j,rad; location where,l; -short num_lights = 0; Boolean where_lit[64][64]; // Find bonfires, braziers, etc. - num_lights = 0; for (i = 0; i < 64; i++) for (j = 0; j < 64; j++) where_lit[i][j] = 0; @@ -1673,11 +1671,9 @@ Boolean is_erasable_water(short i,short j) { Boolean answer = FALSE; - short pic; unsigned char ter; ter = (editing_town == TRUE) ? t_d.terrain[i][j] : current_terrain.terrain[i][j]; - pic = scenario.ter_types[ter].picture; if ((editing_town == TRUE) && ((i < 0) || (i > max_dim[town_type] - 1) || (j < 0) || (j > max_dim[town_type] - 1))) return FALSE; if ((editing_town == FALSE) && ((i < 0) || (i > 47) || (j < 0) || (j > 47))) @@ -1710,11 +1706,9 @@ Boolean is_water(short i,short j) Boolean is_correctable_water(short i,short j) { Boolean answer = FALSE; - short pic; unsigned char ter; ter = (editing_town == TRUE) ? t_d.terrain[i][j] : current_terrain.terrain[i][j]; - pic = scenario.ter_types[ter].picture; if ((editing_town == TRUE) && ((i < 0) || (i > max_dim[town_type] - 1) || (j < 0) || (j > max_dim[town_type] - 1))) return FALSE; if ((editing_town == FALSE) && ((i < 0) || (i > 47) || (j < 0) || (j > 47)))