00001 /* 00002 * gamerend.h - Rendering methods. 00003 * 00004 * Copyright (C) 1998-1999 Jeffrey S. Freedman 00005 * Copyright (C) 2000-2002 The Exult Team 00006 * 00007 * This program is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 2 of the License, or 00010 * (at your option) any later version. 00011 * 00012 * This program is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, write to the Free Software 00019 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00020 */ 00021 00022 #ifndef GAMEREND_H 00023 #define GAMEREND_H 1 00024 00025 /* 00026 * A helper-class for rendering. 00027 */ 00028 class Game_render 00029 { 00030 unsigned long render_seq; // For marking rendered objects. 00031 int skip; // Set for each render. We skip 00032 // painting at or above this. 00033 public: 00034 Game_render() : render_seq(0), skip(31) 00035 { } 00036 void paint_terrain_only(int start_chunkx, int start_chunky, 00037 int stop_chunkx, int stop_chunky); 00038 // Render the map & objects. 00039 int paint_map(int x, int y, int w, int h); 00040 // Paint "flat" scenery in a chunk. 00041 void paint_chunk_flats(int cx, int cy, int xoff, int yoff); 00042 void paint_chunk_flat_rles(int cx, int cy, int xoff, int yoff); 00043 // // Paint blackness in a dungeon 00044 //void paint_dungeon_black(int cx, int cy, int xoff, int yoff, int index=0); 00045 // Paint objects in given chunk at 00046 // given lift. 00047 int paint_chunk_objects(int cx, int cy); 00048 // Paint an obj. after dependencies. 00049 void paint_object(Game_object *obj); 00050 // Render dungeon blackness 00051 void paint_blackness(int cx, int cy, int stop_chunkx, int stop_chunky, 00052 int index=0); 00053 }; 00054 00055 #endif
1.5.1