summaryrefslogtreecommitdiff
path: root/src/graphic/image.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-02 19:35:53 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2005-01-02 19:35:53 +0000
commit5972b0564a9131de70064ed219cd8351844cf0ab (patch)
tree8cf1eb8f7be80fc5a7d46caa8da1de28edf7fa71 /src/graphic/image.cpp
parente76a6e3d2cc40e382e2ca1c7348e36a4082a221b (diff)
downloadmana-5972b0564a9131de70064ed219cd8351844cf0ab.tar.gz
mana-5972b0564a9131de70064ed219cd8351844cf0ab.tar.bz2
mana-5972b0564a9131de70064ed219cd8351844cf0ab.tar.xz
mana-5972b0564a9131de70064ed219cd8351844cf0ab.zip
Don't try to create video bitmaps, and store whole numbers as whole numbers
in the configuration file.
Diffstat (limited to 'src/graphic/image.cpp')
-rw-r--r--src/graphic/image.cpp37
1 files changed, 11 insertions, 26 deletions
diff --git a/src/graphic/image.cpp b/src/graphic/image.cpp
index 7bbf6a68..9d0d3cac 100644
--- a/src/graphic/image.cpp
+++ b/src/graphic/image.cpp
@@ -61,8 +61,13 @@ VideoImage::~VideoImage() {
destroy_bitmap(src);
}
-void VideoImage::draw(BITMAP *dest, int x, int y) {
- masked_blit(src, dest, 0, 0, x + offset_x, y + offset_y, src->w, src->h);
+void VideoImage::draw(BITMAP *dst, int x, int y) {
+ //SDL_Rect dst_rect;
+ //dst_rect.x = x + offset_x;
+ //dst_rect.y = y + offset_y;
+ //SDL_BlitSurface(src, NULL, dst, &dst_rect);
+
+ masked_blit(src, dst, 0, 0, x + offset_x, y + offset_y, src->w, src->h);
}
@@ -75,30 +80,10 @@ Spriteset::Spriteset(std::string filename)
int i = 0;
while (datafile[i].type != DAT_END) {
Image *temp_image;
- if (gfx_capabilities & GFX_HW_VRAM_BLIT) {
- BITMAP *temp_video_bitmap = create_video_bitmap(
- ((RLE_SPRITE *)datafile[i].dat)->w,
- ((RLE_SPRITE *)datafile[i].dat)->h);
- if (temp_video_bitmap) {
- clear_to_color(temp_video_bitmap, makecol(255, 0, 255));
- draw_rle_sprite(temp_video_bitmap,
- (RLE_SPRITE *)datafile[i].dat, 0, 0);
- temp_image = new VideoImage(temp_video_bitmap,
- getProperty(&datafile[i], DAT_ID('X','C','R','P')),
- getProperty(&datafile[i], DAT_ID('Y','C','R','P')));
- } else {
- warning("You ran out of video memory!");
- temp_image = new RleImage(
- (RLE_SPRITE*)datafile[i].dat,
- getProperty(&datafile[i], DAT_ID('X','C','R','P')),
- getProperty(&datafile[i], DAT_ID('Y','C','R','P')));
- }
- } else {
- temp_image = new RleImage(
- (RLE_SPRITE*)datafile[i].dat,
- getProperty(&datafile[i], DAT_ID('X','C','R','P')),
- getProperty(&datafile[i], DAT_ID('Y','C','R','P')));
- }
+ temp_image = new RleImage(
+ (RLE_SPRITE*)datafile[i].dat,
+ getProperty(&datafile[i], DAT_ID('X','C','R','P')),
+ getProperty(&datafile[i], DAT_ID('Y','C','R','P')));
spriteset.push_back(temp_image);
i++;
}