Angband.oook.cz
Angband.oook.cz
AboutDownloadVariantsLadderForumCompetitionSpoilersComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old June 15, 2012, 19:05   #1
bron
Swordsman
 
Join Date: May 2008
Location: Saratoga, California (in the midst of Silicon Valley)
Posts: 356
bron is on a distinguished road
Silly minor problem with extra-large window

Since my utf-8 problem seems to have been overcome, I wanted to try out my snazzy new ultra-huge monitor. So I open a max-sized window, run "./angband -- -b" and ... it fails. Complains that the "main window is too small" ?!?! It didn't take me long to figure out that the problem is that Term->wid (and also Term->hgt) are stored as *bytes*, which meant that my huge window (with >256 columns) wrapped the available range.

Once I understood this, it was easy enough to create a window with "only" 254 columns, and everything works great. I think it would be nice if "hgt" and "wid" could be made shorts rather than bytes, but perhaps an easier change/fix would be to just limit the value to 255 (e.g. use something like:
Term->wid = min(COLS,255);
when assigning a value to "wid").
bron is offline   Reply With Quote
Old June 15, 2012, 20:12   #2
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 6,037
Derakon is on a distinguished road
...we're actually using bytes for anything other than ASCII chars? That's really rather sad.
Derakon is online now   Reply With Quote
Old June 15, 2012, 23:56   #3
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,008
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate Send a message via Skype™ to Magnate
Quote:
Originally Posted by Derakon View Post
...we're actually using bytes for anything other than ASCII chars? That's really rather sad.
Er ... don't forget that when Angband was written the average RAM on a PC was about 1MB. Every byte counted - so yes, we have all of byte, s16b and u16b to save memory over using 4-byte integers ...
__________________
"3.4 is much better than 3.1, 3.2 or 3.3. It still is easier than 3.0.9, but it is more convenient to play without being ridiculously easy, so it is my new favorite of the versions." - Timo Pietila
Magnate is offline   Reply With Quote
Old June 16, 2012, 00:56   #4
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 6,037
Derakon is on a distinguished road
Okay, let me rephrase.

We're still using bytes for anything other than ASCII chars? That's really rather sad.
Derakon is online now   Reply With Quote
Old June 16, 2012, 04:56   #5
buzzkill
Prophet
 
buzzkill's Avatar
 
Join Date: May 2008
Location: Indiana, USA
Posts: 2,911
Donated: $8
buzzkill is on a distinguished road
Quote:
Originally Posted by bron View Post
Complains that the "main window is too small" ?!?! It didn't take me long to figure out that the problem is that Term->wid (and also Term->hgt) are stored as *bytes*, which meant that my huge window (with >256 columns) wrapped the available range.
I get this error with tiles too, before I learned to avoid it. If I maximize the screen during character creation, it would crash upon arrival in town, or just before that happened, or at least I used to. I don't recall the circumstances exactly but it's probably worth fixing (in variants too, you crazy variant maintainers).
__________________
www.mediafire.com/buzzkill - Get your 32x32 tiles here. UT32 now compatible Ironband and Quickband 9/6/2012.
My banding life on Buzzkill's ladder.
buzzkill is offline   Reply With Quote
Old June 16, 2012, 19:22   #6
PowerWyrm
Knight
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 769
PowerWyrm is on a distinguished road
For my variant I've limited row/col size to 255. I've tried to change them to short ints, but this would have meant rewriting half of the code, since those bytes are spreading all over the place in the code
__________________
PWMAngband variant maintainer - check http://www.mangband.org/forum/viewforum.php?f=9 to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
minor problem with 3.4RC1 bron Vanilla 1 June 11, 2012 22:30
How to use large screen size? kicker Vanilla 13 May 23, 2012 03:22
[3.3.x] Minor problem with randart activations PowerWyrm Vanilla 1 January 10, 2012 13:27
Probably a silly question Mr Mushroom Vanilla 4 May 31, 2011 06:55
Request for enhancement (Large monitor support) K.I.L.E.R Vanilla 13 March 31, 2008 09:08


All times are GMT +1. The time now is 23:50.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.