View Single Post
Old April 8, 2019, 13:58   #1
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,900
PowerWyrm is on a distinguished road
Game cannot handle more than 255 terrain types

Reported by Tangar in this post: http://angband.oook.cz/forum/showpos...32&postcount=7

This is PWMAngband so I checked why this happened. The reason is obvious: the terrain "floor d hills" is exactly number 256 in the f_info feature array. This means there is somewhere where feature is coded on a "byte" and doesn't allow more than 255 terrain types. And I found the culprit:

Code:
struct square {
	byte feat;
	bitflag *info;
	int light;
	s16b mon;
	struct object *obj;
	struct trap *trap;
};
Everywhere else, feature index is coded on an integer. Vanilla code has the same "struct square", so it must also happen in V.
__________________
PWMAngband variant maintainer - check http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote