aboutsummaryrefslogtreecommitdiff
path: root/Source/Gfx.h
diff options
context:
space:
mode:
authorXaviDCR92 <xavi.dcr@gmail.com>2017-05-01 23:05:51 +0200
committerXaviDCR92 <xavi.dcr@gmail.com>2017-05-01 23:05:51 +0200
commit83b4684d7cb9934371909b522d6daa0f16cc0396 (patch)
tree39fa1ca99061b12203dae50898a2b3dec3b5f276 /Source/Gfx.h
parent8629c228db1fe1f206d409356ad75995060a0ca8 (diff)
downloadairport-83b4684d7cb9934371909b522d6daa0f16cc0396.tar.gz
* Added some comments on System.
* New routine PadOneKeySinglePress() and PadTwoKeySinglePress(). * Temp waypoints now turn red when colliding with an aircraft or with a previously existing waypoint. * When loading files, GPU operation is finishedbefore calling fopen. Also, I_MASK is disabled just in case. * For PLT files, actual tile needs to be set instead of parking number.
Diffstat (limited to 'Source/Gfx.h')
-rw-r--r--Source/Gfx.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/Source/Gfx.h b/Source/Gfx.h
index b9984ee..68c0f5b 100644
--- a/Source/Gfx.h
+++ b/Source/Gfx.h
@@ -32,43 +32,73 @@
void GfxInitDrawEnv(void);
void GfxInitDispEnv(void);
void GfxSetPrimitiveList(void);
+
// Renders new scene. Use this function unless you know what you are doing!
void GfxDrawScene(void);
+
// Blocking version. Calls GfxDrawScene() and then adds a while(GfxIsBusy() )
// after it.
void GfxDrawScene_Slow(void);
+
// Only renders screen and does not update any pad data or timer data.
// To be used in ISR!
void GfxDrawScene_Fast(void);
+
+// Repotedly, tells is GPU is ready for a DMA transfer.
+bool GfxReadyForDMATransfer(void);
+
// Fills a GsSprite structure with information from a TIM file.
bool GfxSpriteFromFile(char * fname, GsSprite * spr);
+
// Reportedly, loads CLUT data from a TIM image (image data is discarded)
bool GfxCLUTFromFile(char * fname);
+
// Returns true if current object is within screen limits, false otherwise.
bool GfxIsInsideScreenArea(short x, short y, short w, short h);
+
// Function overload for GsSprite structures.
bool GfxIsSpriteInsideScreenArea(GsSprite * spr);
+
// Used to know whether GPU operation can be done.
bool GfxIsGPUBusy(void);
+
+// Draws a sprite on screen. First, it checks whether sprite is inside
+// screen limits.
void GfxSortSprite(GsSprite * spr);
+
uint8_t GfxGetGlobalLuminance(void);
+
void GfxSetGlobalLuminance(uint8_t value);
+
void GfxIncreaseGlobalLuminance(int8_t step);
+
int GfxRotateFromDegrees(int deg);
+
void GfxDrawButton(short x, short y, unsigned short btn);
+
// Sends current display data on a specific VRAM section and fills
// sprite structure pointed to by "spr".
void GfxSaveDisplayData(GsSprite *spr);
+
TYPE_CARTESIAN_POS GfxIsometricToCartesian(TYPE_ISOMETRIC_POS * ptrIsoPos);
// Function overload for fixed-point 16.16 data type.
+
TYPE_CARTESIAN_POS GfxIsometricFix16ToCartesian(TYPE_ISOMETRIC_FIX16_POS * ptrIso16Pos);
+
// Transforms cartesian position to isometric position. Z axis is assumed to be zero!
TYPE_ISOMETRIC_POS GfxCartesianToIsometric(TYPE_CARTESIAN_POS * ptrCartPos);
+
// Fills GsSprite structure pointed to by "spr" with texture page and U/V
// offset data given a position in VRAM.
bool GfxTPageOffsetFromVRAMPosition(GsSprite * spr, short x, short y);
+
+void GfxSetSplitScreen(uint8_t playerIndex);
+
+void GfxDisableSplitScreen(void);
+
// Switches between true and false every 1 exact second (used for flashing effects)
bool Gfx1HzFlash(void);
+
// Switches between true and false every 500 milliseconds (used for flashing effects)
bool Gfx2HzFlash(void);