src/gfxinit.cpp
changeset 8928 b3c4a8968fe1
parent 8907 5104ad700e31
child 10429 1b99254f9607
equal deleted inserted replaced
8927:8c38efc3987a 8928:b3c4a8968fe1
    68 {
    68 {
    69 	uint start;
    69 	uint start;
    70 	while ((start = *index_tbl++) != END) {
    70 	while ((start = *index_tbl++) != END) {
    71 		uint end = *index_tbl++;
    71 		uint end = *index_tbl++;
    72 
    72 
    73 		if (start == SKIP) { // skip sprites (amount in second var)
    73 		do {
    74 			SkipSprites(end);
    74 		#ifdef NDEBUG
    75 			(*sprite_id) += end;
    75 			LoadNextSprite(start, file_index, *sprite_id);
    76 		} else { // load sprites and use indexes from start to end
    76 		#else
    77 			do {
    77 			bool b = LoadNextSprite(start, file_index, *sprite_id);
    78 			#ifdef NDEBUG
    78 			assert(b);
    79 				LoadNextSprite(start, file_index, *sprite_id);
    79 		#endif
    80 			#else
    80 			(*sprite_id)++;
    81 				bool b = LoadNextSprite(start, file_index, *sprite_id);
    81 		} while (++start <= end);
    82 				assert(b);
       
    83 			#endif
       
    84 				(*sprite_id)++;
       
    85 			} while (++start <= end);
       
    86 		}
       
    87 	}
    82 	}
    88 }
    83 }
    89 
    84 
    90 static void LoadGrfIndexed(const char* filename, const SpriteID* index_tbl, int file_index)
    85 static void LoadGrfIndexed(const char* filename, const SpriteID* index_tbl, int file_index)
    91 {
    86 {