summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-01-05 12:00:38 +0000
committertron <tron@openttd.org>2006-01-05 12:00:38 +0000
commit980e8f525b924491915571c2ed03469bd6751047 (patch)
tree198e1b2652c1c7e46b9cdcf60960e9b7bbaaa860
parent1d88dfd4602de2fce8610ff965aca892c7bfd3ee (diff)
downloadopenttd-980e8f525b924491915571c2ed03469bd6751047.tar.xz
(svn r3364) Remove 3 unused functions (ScrollWindowToTile, AllocateWindowAutoPlace, AllocateWindowAutoPlace2)
-rw-r--r--functions.h1
-rw-r--r--viewport.c7
-rw-r--r--window.c33
-rw-r--r--window.h16
4 files changed, 0 insertions, 57 deletions
diff --git a/functions.h b/functions.h
index b8a09f5a8..731eb0d88 100644
--- a/functions.h
+++ b/functions.h
@@ -197,7 +197,6 @@ void SetObjectToPlace(CursorID icon, byte mode, WindowClass window_class, Window
void ResetObjectToPlace(void);
-bool ScrollWindowToTile(TileIndex tile, Window * w);
bool ScrollWindowTo(int x, int y, Window * w);
bool ScrollMainWindowToTile(TileIndex tile);
diff --git a/viewport.c b/viewport.c
index b8db7ac1b..d0a287985 100644
--- a/viewport.c
+++ b/viewport.c
@@ -1792,13 +1792,6 @@ bool ScrollWindowTo(int x , int y, Window* w)
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 --git a/window.c b/window.c
index f87af6fe3..91fdaca74 100644
--- a/window.c
+++ b/window.c
@@ -478,29 +478,6 @@ Window *AllocateWindow(
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 @@ ok_pos:;
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 --git a/window.h b/window.h
index 1a0bf3e87..e65415994 100644
--- a/window.h
+++ b/window.h
@@ -580,22 +580,6 @@ Window *AllocateWindow(
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);