/* * Copyright (C) 2002-2007 The Warp Rogue Team * Part of the Warp Rogue Project * * This software is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License. * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY. * * See the license.txt file for more details. */ /* * Module Name: World * Description: - */ #define WORLD_HEIGHT 33 #define WORLD_WIDTH 69 #define WORLD_SURFACE_Z 0 #define WORLD_NAME_SIZE 20 /* * number of levels */ typedef int N_LEVELS; /* * world tile */ typedef BOX_ITEM_INDEX WORLD_TILE; /* * world tile data structure */ typedef struct { char name[AREA_NAME_SIZE]; SYMBOL symbol; SYMBOL screen_symbol; COLOUR colour; N_LEVELS n_levels; char script[FILE_NAME_SIZE]; } WORLD_TILE_DATA; /* * world structure */ typedef struct { char name[WORLD_NAME_SIZE]; char description[DESCRIPTION_SIZE]; WORLD_TILE map[WORLD_HEIGHT][WORLD_WIDTH]; WORLD_POINT starting_position; DIRECTION starting_direction; } WORLD; void world_init(void); void world_clean_up(void); WORLD * world(void); WORLD_TILE * world_tile(const WORLD_POINT *); WORLD_TILE_DATA * world_tile_data(const WORLD_POINT *); WORLD_TILE_DATA * world_tile_box_new_tile(void); void world_tile_box_optimize(void); bool world_points_equal(const WORLD_POINT *, const WORLD_POINT * ); void move_world_point(WORLD_POINT *, DIRECTION); bool out_of_world_bounds(const WORLD_POINT *); void world_map_screen(CHARACTER *); WORLD_TILE symbol_to_world_tile(SYMBOL symbol);