26 |
|
|
27 |
#include <sys/types.h> |
#include <sys/types.h> |
28 |
#include <Foundation/NSObject.h> |
#include <Foundation/NSObject.h> |
29 |
|
|
30 |
|
#include "Common/Coord.h" |
31 |
#include "Common/Camera.h" |
#include "Common/Camera.h" |
32 |
|
|
33 |
@class NSBitmapImageRep; |
@class NSBitmapImageRep; |
34 |
|
|
35 |
@class Camera; |
@class Camera; |
36 |
|
|
|
/* 2D position for the MapTerrain */ |
|
|
typedef struct { |
|
|
int x, z; |
|
|
} map_coord_t; |
|
|
|
|
|
static inline map_coord_t |
|
|
MakeMapCoord (int x, int z) |
|
|
{ |
|
|
map_coord_t coord; |
|
|
|
|
|
coord.x = x; |
|
|
coord.z = z; |
|
|
|
|
|
return coord; |
|
|
} |
|
|
|
|
|
int aroundTheWorld (int n, int max); |
|
|
|
|
|
@class Camera; |
|
|
|
|
37 |
@interface MapTerrain: NSObject |
@interface MapTerrain: NSObject |
38 |
{ |
{ |
39 |
@protected |
@protected |
54 |
- (int) xLength; |
- (int) xLength; |
55 |
- (int) zLength; |
- (int) zLength; |
56 |
|
|
57 |
- (u_int8_t) heightAtPosition: (map_coord_t)position; |
- (u_int8_t) heightAtPosition: (coord2DInt_t)position; |
58 |
- (void) setHeightAtPosition: (map_coord_t)position |
- (void) setHeightAtPosition: (coord2DInt_t)position |
59 |
toHeight: (u_int8_t) height; |
toHeight: (u_int8_t) height; |
60 |
|
|
61 |
- (u_int8_t) seaLevel; |
- (u_int8_t) seaLevel; |