(svn r7202) -Codechange: Move _viewports and _active_viewports local to viewport.c and have them

called from the appropiate places in window.c
This commit is contained in:
Darkvater
2006-11-18 13:54:33 +00:00
parent a448474f21
commit 62a9d7fdf3
3 changed files with 24 additions and 14 deletions

View File

@@ -16,6 +16,8 @@ struct ViewPort {
void SetSelectionRed(bool);
/* viewport.c */
void InitViewports(void);
void DeleteWindowViewport(Window *w);
void AssignWindowViewport(Window *w, int x, int y,
int width, int height, uint32 follow_flags, byte zoom);
ViewPort *IsPtInWindowViewport(const Window *w, int x, int y);
@@ -139,11 +141,6 @@ typedef struct TileHighlightData {
// common button handler
bool HandlePlacePushButton(Window *w, int widget, uint32 cursor, int mode, PlaceProc *placeproc);
/* viewport.c */
// XXX - maximum viewports is maximum windows - 2 (main toolbar + status bar)
VARDEF ViewPort _viewports[25 - 2];
VARDEF uint32 _active_viewports;
VARDEF Point _tile_fract_coords;
extern TileHighlightData _thd;