home
·
contact
·
privacy
projects
/
plomrogue
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Client: interface config reload also re-sets virtual screen offset to 0.
[plomrogue]
/
src
/
client
/
map_window.c
diff --git
a/src/client/map_window.c
b/src/client/map_window.c
index aace59cdadb54f4b1fd527f99b503f94be378cd8..e9f7ced114a887d74026580cd8625988d55fb4d3 100644
(file)
--- a/
src/client/map_window.c
+++ b/
src/client/map_window.c
@@
-3,8
+3,7
@@
#include "map_window.h"
#include <stdint.h> /* uint16_t */
#include "misc.h" /* center_offset() */
#include "map_window.h"
#include <stdint.h> /* uint16_t */
#include "misc.h" /* center_offset() */
-#include "wincontrol.h" /* get_win_by_id() */
-#include "windows.h" /* struct Win */
+#include "windows.h" /* struct Win, get_win_by_id() */
#include "world.h" /* for global world */
#include "world.h" /* for global world */
@@
-13,11
+12,11
@@
extern void map_scroll(char d)
{
struct Win * win = get_win_by_id('m');
uint16_t offset;
{
struct Win * win = get_win_by_id('m');
uint16_t offset;
- if (('N' == d || 'S' == d) && world.map.size.y > win->framesize.y)
+ if (('N' == d || 'S' == d) && world.map.size.y > win->frame
_
size.y)
{
offset = center_offset(win->center.y,
{
offset = center_offset(win->center.y,
- world.map.size.y, win->framesize.y);
- win->center.y = offset + (win->framesize.y / 2);
+ world.map.size.y, win->frame
_
size.y);
+ win->center.y = offset + (win->frame
_
size.y / 2);
if ('S' == d && win->center.y < world.map.size.y - 1)
{
win->center.y++;
if ('S' == d && win->center.y < world.map.size.y - 1)
{
win->center.y++;
@@
-25,11
+24,11
@@
extern void map_scroll(char d)
}
win->center.y = win->center.y - ('N' == d && win->center.y > 0);
}
}
win->center.y = win->center.y - ('N' == d && win->center.y > 0);
}
- else if (('W' == d || 'E' == d) && world.map.size.x > win->framesize.x)
+ else if (('W' == d || 'E' == d) && world.map.size.x > win->frame
_
size.x)
{
offset = center_offset(win->center.x,
{
offset = center_offset(win->center.x,
- world.map.size.x, win->framesize.x);
- win->center.x = offset + (win->framesize.x / 2);
+ world.map.size.x, win->frame
_
size.x);
+ win->center.x = offset + (win->frame
_
size.x / 2);
if ('E' == d && win->center.x < world.map.size.x - 1)
{
win->center.x++;
if ('E' == d && win->center.x < world.map.size.x - 1)
{
win->center.x++;