- write_uint16_bigendian(world->player->pos.y, file);
- write_uint16_bigendian(world->player->pos.x, file);
- write_uint16_bigendian(world->monster->pos.y, file);
- write_uint16_bigendian(world->monster->pos.x, file);
- write_uint16_bigendian(world->monster->next->pos.y, file);
- write_uint16_bigendian(world->monster->next->pos.x, file);
- write_uint16_bigendian(world->monster->next->next->pos.y, file);
- write_uint16_bigendian(world->monster->next->next->pos.x, file);
+ write_uint16_bigendian(world->player->pos.y + 1, file);
+ write_uint16_bigendian(world->player->pos.x + 1, file);
+ struct Monster * monster;
+ for (monster = world->monster; monster != 0; monster = monster->next) {
+ write_uint16_bigendian(monster->pos.y + 1, file);
+ write_uint16_bigendian(monster->pos.x + 1, file);
+ fputc(monster->name, file); }
+ write_uint16_bigendian(0, file);
+ struct Item * item;
+ for (item = world->item; item != 0; item = item->next) {
+ write_uint16_bigendian(item->pos.y + 1, file);
+ write_uint16_bigendian(item->pos.x + 1, file);
+ fputc(item->name, file); }
+ write_uint16_bigendian(0, file);