mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r3364) Remove 3 unused functions (ScrollWindowToTile, AllocateWindowAutoPlace, AllocateWindowAutoPlace2)
This commit is contained in:
parent
1d88dfd460
commit
980e8f525b
@ -197,7 +197,6 @@ void SetObjectToPlace(CursorID icon, byte mode, WindowClass window_class, Window
|
|||||||
|
|
||||||
void ResetObjectToPlace(void);
|
void ResetObjectToPlace(void);
|
||||||
|
|
||||||
bool ScrollWindowToTile(TileIndex tile, Window * w);
|
|
||||||
bool ScrollWindowTo(int x, int y, Window * w);
|
bool ScrollWindowTo(int x, int y, Window * w);
|
||||||
|
|
||||||
bool ScrollMainWindowToTile(TileIndex tile);
|
bool ScrollMainWindowToTile(TileIndex tile);
|
||||||
|
@ -1792,13 +1792,6 @@ bool ScrollWindowTo(int x , int y, Window* w)
|
|||||||
return true;
|
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)
|
bool ScrollMainWindowTo(int x, int y)
|
||||||
{
|
{
|
||||||
|
33
window.c
33
window.c
@ -478,29 +478,6 @@ Window *AllocateWindow(
|
|||||||
return w;
|
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 {
|
typedef struct SizeRect {
|
||||||
int left,top,width,height;
|
int left,top,width,height;
|
||||||
@ -622,16 +599,6 @@ ok_pos:;
|
|||||||
return pt;
|
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)
|
Window *AllocateWindowDescFront(const WindowDesc *desc, int value)
|
||||||
{
|
{
|
||||||
|
16
window.h
16
window.h
@ -580,22 +580,6 @@ Window *AllocateWindow(
|
|||||||
Window *AllocateWindowDesc(const WindowDesc *desc);
|
Window *AllocateWindowDesc(const WindowDesc *desc);
|
||||||
Window *AllocateWindowDescFront(const WindowDesc *desc, int value);
|
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 DrawWindowViewport(Window *w);
|
||||||
|
|
||||||
void InitWindowSystem(void);
|
void InitWindowSystem(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user