From cfe3bf070138820ee31b8111c652ec1d70b5325f Mon Sep 17 00:00:00 2001 From: Owen Diamond Date: Sat, 23 Feb 2013 18:38:01 -0700 Subject: [PATCH] Fix for windows adjustable view size --- .gitignore | 2 ++ catacurse.cpp | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 6c73530f6c764..e0974a4012f78 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ debug.log logg.txt bindist/ cataclysmdda-* +objwin/*.* +*.exe diff --git a/catacurse.cpp b/catacurse.cpp index e9e6158e986e7..31030d80afcbc 100644 --- a/catacurse.cpp +++ b/catacurse.cpp @@ -283,8 +283,8 @@ fin.open("data\\FONTDATA"); } halfwidth=fontwidth / 2; halfheight=fontheight / 2; - WindowWidth=80*fontwidth; - WindowHeight=25*fontheight; + WindowWidth=((80*fontwidth) + (OPTIONS[OPT_VIEWPORT_X])); + WindowHeight=((25*fontheight) + (OPTIONS[OPT_VIEWPORT_Y])); WindowX=(GetSystemMetrics(SM_CXSCREEN) / 2)-WindowWidth/2; //center this WindowY=(GetSystemMetrics(SM_CYSCREEN) / 2)-WindowHeight/2; //sucker WinCreate(); //Create the actual window, register it, etc @@ -323,7 +323,7 @@ fin.open("data\\FONTDATA"); // WindowCount=0; delete typeface_c; - mainwin = newwin(25,80,0,0); + mainwin = newwin((25 + OPTIONS[OPT_VIEWPORT_Y]),(80 + OPTIONS[OPT_VIEWPORT_X]),0,0); return mainwin; //create the 'stdscr' window and return its ref };