Skip to content

Commit

Permalink
-Fix: fix GUI_Widget_Viewport_RedrawMap() prototype
Browse files Browse the repository at this point in the history
use Screen enum instead of uint16
  • Loading branch information
miniupnp committed Jan 3, 2017
1 parent b7e0085 commit 837c089
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/gui/viewport.c
Expand Up @@ -926,9 +926,9 @@ void GUI_Widget_Viewport_DrawTile(uint16 packed)
/**
* Redraw the whole map.
*
* @param screenID To which screen we should draw the map. Can only be 0 or 2. Any non-zero is forced to 2.
* @param screenID To which screen we should draw the map. Can only be SCREEN_0 or SCREEN_1. Any non-zero is forced to SCREEN_1.
*/
void GUI_Widget_Viewport_RedrawMap(uint16 screenID)
void GUI_Widget_Viewport_RedrawMap(Screen screenID)
{
Screen oldScreenID = SCREEN_1;
uint16 i;
Expand Down
4 changes: 3 additions & 1 deletion src/gui/widget.h
Expand Up @@ -3,6 +3,8 @@
#ifndef GUI_WIDGET_H
#define GUI_WIDGET_H

#include "../gfx.h"

/**
* Types of WidgetClick available in the game.
*/
Expand Down Expand Up @@ -234,7 +236,7 @@ extern void Widget_PaintCurrentWidget(void);
extern bool GUI_Widget_Viewport_Click(Widget *w);
extern void GUI_Widget_Viewport_Draw(bool forceRedraw, bool hasScrolled, bool drawToMainScreen);
extern void GUI_Widget_Viewport_DrawTile(uint16 packed);
extern void GUI_Widget_Viewport_RedrawMap(uint16 screenID);
extern void GUI_Widget_Viewport_RedrawMap(Screen screenID);

/* widget_click.c */
extern bool GUI_Widget_SpriteTextButton_Click(Widget *w);
Expand Down
2 changes: 1 addition & 1 deletion src/house.c
Expand Up @@ -421,7 +421,7 @@ bool House_UpdateRadarState(House *h)

GUI_Mouse_Show_Safe();

GUI_Widget_Viewport_RedrawMap(0);
GUI_Widget_Viewport_RedrawMap(SCREEN_0);

return activate;
}
Expand Down

0 comments on commit 837c089

Please sign in to comment.