Angband Forums

Angband Forums (http://angband.oook.cz/forum/index.php)
-   Development (http://angband.oook.cz/forum/forumdisplay.php?f=10)
-   -   Handling Shockbolts in Angband 4.0.0 (http://angband.oook.cz/forum/showthread.php?t=7384)

nppangband July 3, 2015 19:25

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.

Nick July 4, 2015 01:01

Quote:

Originally Posted by nppangband (Post 103002)
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 (Post 103002)
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.

nppangband July 4, 2015 17:39

Quote:

Originally Posted by Nick (Post 103008)
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.

Nick July 5, 2015 01:16

Quote:

Originally Posted by nppangband (Post 103019)
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.


All times are GMT +1. The time now is 21:42.

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