Changeset - r873:8376969b1534
[Not reviewed]
master
0 3 0
tron - 19 years ago 2005-01-03 21:29:59
tron@openttd.org
(svn r1354) Use WindowClass/WindowNumber to store/pass window class/number, not some arbitrary data types
3 files changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
functions.h
Show inline comments
 
@@ -200,13 +200,13 @@ void MarkTileDirtyByTile(TileIndex tile)
 
void InvalidateWindow(byte cls, WindowNumber number);
 
void InvalidateWindowWidget(byte cls, WindowNumber number, byte widget_index);
 
void InvalidateWindowClasses(byte cls);
 
void DeleteWindowById(WindowClass cls, WindowNumber number);
 

	
 
void SetObjectToPlaceWnd(int icon, byte mode, Window *w);
 
void SetObjectToPlace(int icon, byte mode, byte window_class, uint16 window_num);
 
void SetObjectToPlace(int icon, byte mode, WindowClass window_class, WindowNumber window_num);
 

	
 
void ResetObjectToPlace();
 

	
 
bool ScrollWindowToTile(TileIndex tile, Window * w);
 
bool ScrollWindowTo(int x, int y, Window * w);
 

	
viewport.c
Show inline comments
 
@@ -2057,13 +2057,13 @@ void SetObjectToPlaceWnd(int icon, byte 
 
{
 
	SetObjectToPlace(icon,mode,w->window_class, w->window_number);
 
}
 

	
 
#include "table/animcursors.h"
 

	
 
void SetObjectToPlace(int icon, byte mode, byte window_class, uint16 window_num)
 
void SetObjectToPlace(int icon, byte mode, WindowClass window_class, WindowNumber window_num)
 
{
 
	TileHighlightData *thd = _thd_ptr;
 
	Window *w;
 

	
 
	if (thd->place_mode != 0) {
 
		thd->place_mode = 0;
viewport.h
Show inline comments
 
@@ -83,15 +83,15 @@ typedef struct TileHighlightData {
 

	
 
	byte drawstyle;
 
	byte new_drawstyle;
 
	byte next_drawstyle;
 

	
 
	byte place_mode;
 
	byte window_class;
 
	bool make_square_red;
 
	uint16 window_number;
 
	WindowClass window_class;
 
	WindowNumber window_number;
 

	
 
	int userdata;
 
	TileIndex redsq;
 
} TileHighlightData;
 

	
 

	
0 comments (0 inline, 0 general)