# HG changeset patch # User tron # Date 1136462438 0 # Node ID 2b74221ae24cb298aca812e578029bad551e2596 # Parent 2afe3aed98f3d67c64d2166b1c6e0d317329b02d (svn r3364) Remove 3 unused functions (ScrollWindowToTile, AllocateWindowAutoPlace, AllocateWindowAutoPlace2) diff -r 2afe3aed98f3 -r 2b74221ae24c functions.h --- a/functions.h Thu Jan 05 11:18:58 2006 +0000 +++ b/functions.h Thu Jan 05 12:00:38 2006 +0000 @@ -197,7 +197,6 @@ void ResetObjectToPlace(void); -bool ScrollWindowToTile(TileIndex tile, Window * w); bool ScrollWindowTo(int x, int y, Window * w); bool ScrollMainWindowToTile(TileIndex tile); diff -r 2afe3aed98f3 -r 2b74221ae24c viewport.c --- a/viewport.c Thu Jan 05 11:18:58 2006 +0000 +++ b/viewport.c Thu Jan 05 12:00:38 2006 +0000 @@ -1792,13 +1792,6 @@ return true; } -/* scrolls the viewport in a window to a given tile */ -bool ScrollWindowToTile(TileIndex tile, Window* w) -{ - return ScrollWindowTo(TileX(tile) * 16 + 8, TileY(tile) * 16 + 8, w); -} - - bool ScrollMainWindowTo(int x, int y) { diff -r 2afe3aed98f3 -r 2b74221ae24c window.c --- a/window.c Thu Jan 05 11:18:58 2006 +0000 +++ b/window.c Thu Jan 05 12:00:38 2006 +0000 @@ -478,29 +478,6 @@ return w; } -Window *AllocateWindowAutoPlace2( - WindowClass exist_class, - WindowNumber exist_num, - int width, - int height, - WindowProc *proc, - WindowClass cls, - const Widget *widget) -{ - Window *w; - int x; - - w = FindWindowById(exist_class, exist_num); - if (w == NULL || w->left >= (_screen.width-20) || w->left <= -60 || w->top >= (_screen.height-20)) { - return AllocateWindowAutoPlace(width,height,proc,cls,widget); - } - - x = w->left; - if (x > _screen.width - width) x = _screen.width - width - 20; - - return AllocateWindow(x + 10, w->top + 10, width, height, proc, cls, widget); -} - typedef struct SizeRect { int left,top,width,height; @@ -622,16 +599,6 @@ return pt; } -Window *AllocateWindowAutoPlace( - int width, - int height, - WindowProc *proc, - WindowClass cls, - const Widget *widget) { - - Point pt = GetAutoPlacePosition(width, height); - return AllocateWindow(pt.x, pt.y, width, height, proc, cls, widget); -} Window *AllocateWindowDescFront(const WindowDesc *desc, int value) { diff -r 2afe3aed98f3 -r 2b74221ae24c window.h --- a/window.h Thu Jan 05 11:18:58 2006 +0000 +++ b/window.h Thu Jan 05 12:00:38 2006 +0000 @@ -580,22 +580,6 @@ Window *AllocateWindowDesc(const WindowDesc *desc); Window *AllocateWindowDescFront(const WindowDesc *desc, int value); -Window *AllocateWindowAutoPlace( - int width, - int height, - WindowProc *proc, - WindowClass cls, - const Widget *widget); - -Window *AllocateWindowAutoPlace2( - WindowClass exist_class, - WindowNumber exist_num, - int width, - int height, - WindowProc *proc, - WindowClass cls, - const Widget *widget); - void DrawWindowViewport(Window *w); void InitWindowSystem(void);