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

Reported by Tangar in this post:

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:

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 (or to learn more about this new variant!
PowerWyrm is offline   Reply With Quote