Advanced Strategic Command
Public Member Functions | List of all members
collategraphicoperations Class Reference

Collects all graphic operations and updates the screen on destruction When porting ASC from DOS to SDL, the problem arose that under DOS all graphic operations directly modified the graphics memory and were directly visible without any overhead. More...

#include <basegfx.h>

Public Member Functions

 collategraphicoperations (void)
 
 collategraphicoperations (int _x1, int _y1, int _x2, int _y2)
 
 ~collategraphicoperations ()
 
void on (void)
 
void off (void)
 

Detailed Description

Collects all graphic operations and updates the screen on destruction When porting ASC from DOS to SDL, the problem arose that under DOS all graphic operations directly modified the graphics memory and were directly visible without any overhead.

Using SDL, the operations operated on a buffer that had to be copied to display memory in a seperate operation, which was costly. Updating the screen after every basic graphic operation was too expensive, so I wrote this class that suspended all updates until it was destructed.

Definition at line 406 of file basegfx.h.

Constructor & Destructor Documentation

collategraphicoperations::collategraphicoperations ( void  )

Definition at line 1155 of file basegfx.cpp.

References tgraphmodeparameters::directscreenaccess.

collategraphicoperations::collategraphicoperations ( int  _x1,
int  _y1,
int  _x2,
int  _y2 
)

Definition at line 1166 of file basegfx.cpp.

References tgraphmodeparameters::directscreenaccess.

collategraphicoperations::~collategraphicoperations ( )

Definition at line 1197 of file basegfx.cpp.

References copy2screen(), and tgraphmodeparameters::directscreenaccess.

Member Function Documentation

void collategraphicoperations::off ( void  )
void collategraphicoperations::on ( void  )

Definition at line 1178 of file basegfx.cpp.

References tgraphmodeparameters::directscreenaccess.

Referenced by tdialogbox::enablebutton().


The documentation for this class was generated from the following files: