Opened 13 years ago

Closed 7 years ago

Last modified 7 years ago

#427 closed bug (fixed (in master))

When screen is above a certain length, text is limited to 15 characters

Reported by: ballenj@… Owned by:
Milestone: 3.5.0 Keywords: display

Description (last modified by fizzix)

Windows XP Professional, SP2, Nvidia GeForce? 8500GT at 2560x1024

Just upgraded to a dual monitor setup. Started 3.0.9, enlarged the main window to take most of the screen (minus monster list window and Windows taskbar on right side) and opened a saved game. Saw error message "screen width too small" error, and the game died. Started Angband again, loaded up the saved game, and then enlarged the main window. At a certain point, after the full dungeon can be seen, the display suddenly resets to only show the first 15 characters on the left side. I can't tell how much it is in characters, but it looks like it happens roughly at the 2000 pixel size. After shrinking the screen below that point, it displays properly again.

Angband actually sees the screen at 15 characters - I cast a spell, and all the messages were chopped off at 15 characters, so I had to hit "space" multiple times.

Attachments (2)

good.jpeg (232.4 KB) - added by takkaria 13 years ago.
bad.jpeg (57.3 KB) - added by takkaria 13 years ago.

Download all attachments as: .zip

Change History (13)

Changed 13 years ago by takkaria

Changed 13 years ago by takkaria

comment:1 Changed 13 years ago by takkaria

from email: "This is after hitting control-r to redraw the screen - before that, it just showed the first 2 characters on the left side. "

comment:2 Changed 12 years ago by takkaria

  • Milestone changed from 3.1.0 to 3.1.1

bumping to 3.1.1, not critical

comment:3 Changed 11 years ago by takkaria

  • Keywords windows added; windows, display, large removed
  • Milestone changed from 3.1.1 beta to 3.1.2 beta

bumping 3.1.2 with all the other windows bugs

comment:4 Changed 11 years ago by RogerN

Assuming 8x13 font is being used, a console width of 255 characters would be 2040 pixels. Since the problem is occurring when window size exceeds approximately 2000 pixels, my first guess would be that part of the code is using an 8-bit value for holding either a terminal position or terminal width, and can't handle a terminal with more than 255 columns.

comment:5 Changed 11 years ago by MarbleDice

  • Keywords display added; windows removed
  • Status changed from new to confirmed

It would seen RogerN is correct, as this is a stated limitation of the term struct (and possibly term_win) in z-term.h, which uses a byte to store the width and height of the terminals.

comment:6 Changed 10 years ago by magnate

  • Milestone changed from 3.2.0 to 3.3.0

Punting to 3.3: non-urgent bug or change.

comment:7 Changed 9 years ago by takkaria

  • Milestone changed from 3.3.0 to 3.4.0


comment:8 Changed 8 years ago by fizzix

  • Description modified (diff)
  • Milestone changed from 3.4.0 to 3.5.0

Punting, no owner

comment:9 Changed 7 years ago by takkaria

  • Resolution set to fixed (in master)
  • Status changed from confirmed to closed

Fixed in a412a06

comment:10 Changed 7 years ago by PowerWyrm

I don't know if the game can handle screens wider than 255 columns. What's the point of that anyway? You can display the left panel and the full dungeon map with 255 columns, so I assume everything else would be a black area.

I had the same problem for my variant and I simply fixed it by limiting the number of columns to 255. In the main-xxx.c files, just ensure that any "cols = ..." and "rows = ..." are replaced by "cols = min(..., 255)" and "rows = min(..., 255)".

comment:11 Changed 7 years ago by takkaria

My brief testing seemed to indicate there wasn't a problem with >255 columns. My fix seemed to require less work in the code than adding limits everywhere so unless there's problems reported I'm going to stick with it I think.

Note: See TracTickets for help on using tickets.