27 #ifndef ICB_SURFACE_MANAGER 28 #define ICB_SURFACE_MANAGER 30 #include "engines/icb/p4_generic.h" 31 #include "engines/icb/common/px_array.h" 32 #include "engines/icb/common/px_types.h" 34 #include "graphics/surface.h" 38 #define SURFACE_MANAGER_LOG "surface_manager_log.txt" 41 #define SURFACE_MANAGER_USE_BACKBUFFER 0xffffffff 43 #define EITHER 0x00000002 // Surface can be in vram or system 44 #define SYSTEM 0x00000000 // Surface is in system 45 #define VIDEO 0x00000001 // Surface must be in vram 47 extern uint32 effect_time;
48 extern uint32 working_buffer_id;
49 extern uint32 bg_buffer_id;
52 #define DDBLT_KEYSRC 0x00008000l 81 uint32 Init_direct_draw();
86 uint32 Create_new_surface(
const char *name, uint32 width, uint32 height, uint32 type);
87 void Kill_surface(uint32 s_id);
89 uint8 *Lock_surface(uint32 s_id);
90 void Unlock_surface(uint32 s_id);
92 void PrintDebugLabel(
const char *mess, uint32 c);
93 void PrintTimer(
char label, uint32 time, uint32 limit);
95 int32 Get_pitch(uint32 s_id);
96 inline uint32 Get_width(uint32 nSurfaceID)
const;
97 inline uint32 Get_height(uint32 nSurfaceID)
const;
98 inline uint32 Get_BytesPP(uint32 nSurfaceID)
const;
99 void Clear_surface(uint32 s_id) { Fill_surface(s_id, 0x00000000); }
100 void Fill_surface(uint32 s_id, uint32 rgb_value);
101 void Blit_fillfx(uint32 surface_id,
LRECT *rect, uint32 col);
102 void Blit_surface_to_surface(uint32 from_id, uint32 to_id,
LRECT *rect_from,
LRECT *rect_to, uint32 nFlags = 0);
103 void Set_transparent_colour_key(uint32 nSurfaceID, uint32 nKey);
104 bool8 &HasMMX() {
return m_hasMMX; }
105 void RecordFrame(
const char *path);
106 void Unlock_all_surfaces();
109 void DrawEffects(uint32 surface_id);
111 LRECT &BorderRect() {
117 uint8 &BorderGreen() {
118 return m_borderGreen;
120 uint8 &BorderBlue() {
123 uint8 &BorderAlpha() {
124 return m_borderAlpha;
126 uint32 &BorderMode() {
return m_borderMode; }
146 uint8 &FadeToGreen() {
147 return m_fadeToGreen;
149 uint8 &FadeToBlue() {
152 uint8 &FadeFromRed() {
153 return m_fadeFromRed;
155 uint8 &FadeFromGreen() {
156 return m_fadeFromGreen;
158 uint8 &FadeFromBlue() {
159 return m_fadeFromBlue;
171 uint8 m_fadeFromGreen;
172 uint8 m_fadeFromBlue;
177 friend int32 DrawMouse();
184 inline uint32 _surface_manager::Get_width(uint32 nSurfaceID)
const {
185 assert(nSurfaceID < m_Surfaces.GetNoItems());
187 return (m_Surfaces[nSurfaceID]->m_width);
190 inline uint32 _surface_manager::Get_height(uint32 nSurfaceID)
const {
191 assert(nSurfaceID < m_Surfaces.GetNoItems());
193 return (m_Surfaces[nSurfaceID]->m_height);
196 inline uint32 _surface_manager::Get_BytesPP(uint32 nSurfaceID)
const {
197 assert(nSurfaceID < m_Surfaces.GetNoItems());
199 return ((m_Surfaces[nSurfaceID]->m_dds->format.bytesPerPixel));
Definition: px_string.h:34
Definition: px_array.h:153
Definition: px_types.h:32
Definition: surface_manager.h:67
Definition: surface_manager.h:54