Last change
on this file since 4090 was
4090,
checked in by nico, 19 years ago
|
branches/heightMap: some makefile and include stuff fixed
|
File size:
585 bytes
|
Rev | Line | |
---|
[4090] | 1 | |
---|
| 2 | |
---|
| 3 | #include "heightmap.h" |
---|
| 4 | |
---|
| 5 | #include <stdio.h> |
---|
| 6 | #include <string.h> |
---|
| 7 | #include <stdlib.h> |
---|
| 8 | |
---|
| 9 | #include "debug.h" |
---|
| 10 | #include "compiler.h" |
---|
| 11 | |
---|
| 12 | |
---|
| 13 | Heightmap::Heightmap(const char* fileName, float scaling, int displaylistResolution, int vertexResolution) |
---|
| 14 | { |
---|
| 15 | this->scaleFactor = scaling; |
---|
| 16 | this->setName(fileName); |
---|
| 17 | |
---|
| 18 | this->import(fileName); |
---|
| 19 | |
---|
| 20 | //this->finalize(); |
---|
| 21 | } |
---|
| 22 | |
---|
| 23 | Heightmap::~Heightmap () |
---|
| 24 | { |
---|
| 25 | } |
---|
| 26 | |
---|
| 27 | bool Heightmap::import (const char* fileName) |
---|
| 28 | { |
---|
| 29 | PRINTF(4)("preparing to read in file: %s\n", fileName); |
---|
| 30 | |
---|
| 31 | // using SDL-image to load the bitmap |
---|
| 32 | this->bitmap = IMG_Load(fileName); |
---|
| 33 | |
---|
| 34 | |
---|
| 35 | |
---|
| 36 | |
---|
| 37 | |
---|
| 38 | return true; |
---|
| 39 | } |
---|
| 40 | |
---|
Note: See
TracBrowser
for help on using the repository browser.