24 |
#ifndef MAP_COLORS_H |
#ifndef MAP_COLORS_H |
25 |
#define MAP_COLORS_H |
#define MAP_COLORS_H |
26 |
|
|
27 |
|
@class NSData; |
28 |
|
|
29 |
#include "Common/Color.h" |
#include "Common/Color.h" |
30 |
#include "Map/MapTerrain.h" |
#include "Map/MapTerrain.h" |
31 |
|
|
|
#define COLORS_SIZE 256 |
|
|
|
|
32 |
@class MapShadows; |
@class MapShadows; |
33 |
|
|
34 |
|
#define COLORS_SIZE 256 |
35 |
|
|
36 |
@interface MapColors : MapTerrain |
@interface MapColors : MapTerrain |
37 |
{ |
{ |
38 |
@private |
@private |
39 |
color_t _colors[COLORS_SIZE]; |
color_t _colors[COLORS_SIZE]; |
40 |
MapShadows *_shadows; |
MapShadows *_shadows; |
41 |
|
NSData *_normalsData; |
42 |
} |
} |
43 |
|
|
44 |
- (id) initWithTerrain: (NSString *)terrainPath |
- (id) initWithTerrain: (NSString *)terrainPath |
47 |
|
|
48 |
- (void) setColors: (NSString *)colorsPath; |
- (void) setColors: (NSString *)colorsPath; |
49 |
|
|
50 |
|
- (void) precalculateNormals; |
51 |
|
- (void) discardPrecalculatedNormals; |
52 |
|
|
53 |
- (coord_t) normalAtPosition: (map_coord_t)position; |
- (coord_t) normalAtPosition: (map_coord_t)position; |
54 |
- (color_t) colorForHeight: (int)height; |
- (color_t) colorForHeight: (int)height; |
55 |
- (color_t) colorAtPosition: (map_coord_t)position; |
- (color_t) colorAtPosition: (map_coord_t)position; |