Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old July 3, 2015, 19:25   #1
nppangband
NPPAngband Maintainer
 
Join Date: Dec 2008
Location: Stat Gain, Angband
Posts: 926
nppangband is on a distinguished road
Handling Shockbolts in Angband 4.0.0

I promise I tried to unsuccessfully sourcedive to get the answers before asking these questions.

Shockbolt is almost done with his NPPAngband tileset (NPPMoria tileset to follow). I have yet to work out a good way to display the tiles that are twice as high as they are wide.

How does Angband handle Shockbolt's 128x64 tiles? I recall a comment from Nick in a post a couple months ago that they are handled by an ugly hack, but I could not find it.

I am assuming that, if a tile is2x1 in height, it simply occupies the square the monster is in, as well as the one above it? What if there is a monster right above the monster where the tile is a 2x1 ratio? How does the player know to attack or target a monster displayed with a 2x1 tile?

If anyone can point me to the code in Angband 4.0.0 that handles this, I thank you in advance.
__________________
NPPAngband current home page: http://nppangband.bitshepherd.net/
Source code repository:
https://github.com/nppangband/NPPAngband_QT
Downloads:
https://app.box.com/s/1x7k65ghsmc31usmj329pb8415n1ux57
nppangband is offline   Reply With Quote
Old July 4, 2015, 01:01   #2
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,849
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by nppangband View Post
How does Angband handle Shockbolt's 128x64 tiles? I recall a comment from Nick in a post a couple months ago that they are handled by an ugly hack, but I could not find it.
Look for any variable called or containing "overdraw" - it's handled in grafmode.c, and in main-win.c, main-sdl.c and main-cocoa.m.

My main complaint is actually the way we draw multi-size tiles by putting something too big in the bottom right-hand corner and crossing our fingers.

Quote:
Originally Posted by nppangband View Post
I am assuming that, if a tile is2x1 in height, it simply occupies the square the monster is in, as well as the one above it? What if there is a monster right above the monster where the tile is a 2x1 ratio? How does the player know to attack or target a monster displayed with a 2x1 tile?
In practice it actually works OK - Shockbolt has carefully drawn the double-height tiles so the top half is gappy enough that you can see if there's something else on the grid above. Targeting temporarily blanks out the top half if you're on the monster above.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old July 4, 2015, 17:39   #3
nppangband
NPPAngband Maintainer
 
Join Date: Dec 2008
Location: Stat Gain, Angband
Posts: 926
nppangband is on a distinguished road
Quote:
Originally Posted by Nick View Post
Look for any variable called or containing "overdraw" - it's handled in grafmode.c, and in main-win.c, main-sdl.c and main-cocoa.m.

My main complaint is actually the way we draw multi-size tiles by putting something too big in the bottom right-hand corner and crossing our fingers.

Many thanks!

How about adding a flag in cave_info called CAVE_OVERDRAW or something like that, so the game remembers where the double-height tiles are? That might solve the crossing your fingers complaint.
__________________
NPPAngband current home page: http://nppangband.bitshepherd.net/
Source code repository:
https://github.com/nppangband/NPPAngband_QT
Downloads:
https://app.box.com/s/1x7k65ghsmc31usmj329pb8415n1ux57
nppangband is offline   Reply With Quote
Old July 5, 2015, 01:16   #4
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,849
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by nppangband View Post
How about adding a flag in cave_info called CAVE_OVERDRAW or something like that, so the game remembers where the double-height tiles are? That might solve the crossing your fingers complaint.
I'm afraid that violates core-UI split dogma. Also it's not just the double height tiles - it's whenever tiles are using multiple font grids. I suspect it's not a problem for your Qt port.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick 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
[sil] Request for better handling of throwing weapons andrey Sil 13 January 29, 2017 18:37
Reviving Iso-Angband, an isometric view addon for Angband Hajo Development 111 August 3, 2014 20:44
Message handling patch for Angband 3.1.2r1980 Twilight Development 6 August 12, 2010 15:12
Bug or not in handling object.txt info? ewert Development 14 July 9, 2010 19:38
Pref file handling PaulBlay Development 9 February 24, 2009 18:40


All times are GMT +1. The time now is 14:34.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.