orx  1.10
Portable Game Engine
orxDisplay.h
Go to the documentation of this file.
1 /* Orx - Portable Game Engine
2  *
3  * Copyright (c) 2008-2019 Orx-Project
4  *
5  * This software is provided 'as-is', without any express or implied
6  * warranty. In no event will the authors be held liable for any damages
7  * arising from the use of this software.
8  *
9  * Permission is granted to anyone to use this software for any purpose,
10  * including commercial applications, and to alter it and redistribute it
11  * freely, subject to the following restrictions:
12  *
13  * 1. The origin of this software must not be misrepresented; you must not
14  * claim that you wrote the original software. If you use this software
15  * in a product, an acknowledgment in the product documentation would be
16  * appreciated but is not required.
17  *
18  * 2. Altered source versions must be plainly marked as such, and must not be
19  * misrepresented as being the original software.
20  *
21  * 3. This notice may not be removed or altered from any source
22  * distribution.
23  */
24 
43 #ifndef _orxDISPLAY_H_
44 #define _orxDISPLAY_H_
45 
46 #include "orxInclude.h"
47 #include "plugin/orxPluginCore.h"
48 
49 #include "math/orxVector.h"
50 #include "math/orxOBox.h"
51 #include "memory/orxBank.h"
52 #include "utils/orxHashTable.h"
53 #include "utils/orxString.h"
54 #include "utils/orxLinkList.h"
55 
56 
59 typedef struct __orxRGBA_t
60 {
61  union
62  {
63  struct
64  {
65  orxU8 u8R, u8G, u8B, u8A;
66  };
67 
68  orxU32 u32RGBA;
69  };
70 
71 } orxRGBA;
72 
73 #define orx2RGBA(R, G, B, A) orxRGBA_Set((orxU8)(R), (orxU8)(G), (orxU8)(B), (orxU8)(A))
74 #define orxRGBA_R(RGBA) RGBA.u8R
75 #define orxRGBA_G(RGBA) RGBA.u8G
76 #define orxRGBA_B(RGBA) RGBA.u8B
77 #define orxRGBA_A(RGBA) RGBA.u8A
78 
79 #define orxCOLOR_NORMALIZER (orx2F(1.0f / 255.0f))
80 #define orxCOLOR_DENORMALIZER (orx2F(255.0f))
81 
82 typedef struct __orxBITMAP_t orxBITMAP;
83 
84 
87 typedef struct __orxDISPLAY_VERTEX_t
88 {
89  orxFLOAT fX, fY;
90  orxFLOAT fU, fV;
92 
94 
97 typedef struct __orxDISPLAY_TRANSFORM_t
98 {
99  orxFLOAT fSrcX, fSrcY, fDstX, fDstY;
100  orxFLOAT fRepeatX, fRepeatY;
101  orxFLOAT fScaleX;
102  orxFLOAT fScaleY;
103  orxFLOAT fRotation;
104 
106 
109 typedef enum __orxDISPLAY_PRIMITIVE_t
110 {
118 
120 
122 
124 
127 typedef struct __orxDISPLAY_MESH_t
128 {
130  const orxU16 * au16IndexList;
134 
136 
139 typedef struct __orxDISPLAY_VIDEO_MODE_t
140 {
141  orxU32 u32Width, u32Height, u32Depth, u32RefreshRate;
142  orxBOOL bFullScreen;
143 
145 
148 typedef struct __orxCHARACTER_GLYPH_t
149 {
150  orxFLOAT fX, fY, fWidth;
151 
153 
156 typedef struct __orxCHARACTER_MAP_t
157 {
159 
162 
164 
167 typedef enum __orxDISPLAY_SMOOTHING_t
168 {
172 
174 
176 
178 
181 typedef enum __orxDISPLAY_BLEND_MODE_t
182 {
187 
189 
191 
193 
196 typedef struct __orxCOLOR_t
197 {
198  union
199  {
203  };
204  orxFLOAT fAlpha;
206 } orxCOLOR;
207 
208 
211 #define orxDISPLAY_KZ_CONFIG_SECTION "Display"
212 #define orxDISPLAY_KZ_CONFIG_WIDTH "ScreenWidth"
213 #define orxDISPLAY_KZ_CONFIG_HEIGHT "ScreenHeight"
214 #define orxDISPLAY_KZ_CONFIG_DEPTH "ScreenDepth"
215 #define orxDISPLAY_KZ_CONFIG_POSITION "ScreenPosition"
216 #define orxDISPLAY_KZ_CONFIG_REFRESH_RATE "RefreshRate"
217 #define orxDISPLAY_KZ_CONFIG_FULLSCREEN "FullScreen"
218 #define orxDISPLAY_KZ_CONFIG_ALLOW_RESIZE "AllowResize"
219 #define orxDISPLAY_KZ_CONFIG_DECORATION "Decoration"
220 #define orxDISPLAY_KZ_CONFIG_TITLE "Title"
221 #define orxDISPLAY_KZ_CONFIG_SMOOTH "Smoothing"
222 #define orxDISPLAY_KZ_CONFIG_VSYNC "VSync"
223 #define orxDISPLAY_KZ_CONFIG_DEPTHBUFFER "DepthBuffer"
224 #define orxDISPLAY_KZ_CONFIG_SHADER_VERSION "ShaderVersion"
225 #define orxDISPLAY_KZ_CONFIG_SHADER_EXTENSION_LIST "ShaderExtensionList"
226 #define orxDISPLAY_KZ_CONFIG_MONITOR "Monitor"
227 #define orxDISPLAY_KZ_CONFIG_CURSOR "Cursor"
228 #define orxDISPLAY_KZ_CONFIG_ICON_LIST "IconList"
229 
230 
233 #define orxDISPLAY_KZ_SHADER_SUFFIX_TOP "_top"
234 #define orxDISPLAY_KZ_SHADER_SUFFIX_LEFT "_left"
235 #define orxDISPLAY_KZ_SHADER_SUFFIX_BOTTOM "_bottom"
236 #define orxDISPLAY_KZ_SHADER_SUFFIX_RIGHT "_right"
237 
238 
241 #define orxDISPLAY_KC_SHADER_EXTENSION_ADD '+'
242 #define orxDISPLAY_KC_SHADER_EXTENSION_REMOVE '-'
243 
244 
247 typedef enum __orxDISPLAY_EVENT_t
248 {
251 
253 
254  orxDISPLAY_EVENT_NONE = orxENUM_NONE
255 
257 
260 typedef struct __orxDISPLAY_EVENT_PAYLOAD_t
261 {
262  union
263  {
264  struct
265  {
266  orxU32 u32Width;
267  orxU32 u32Height;
268  orxU32 u32Depth;
269  orxU32 u32RefreshRate;
274  orxBOOL bFullScreen;
276  } stVideoMode;
277 
278  struct
279  {
280  const orxSTRING zLocation;
281  orxSTRINGID stFilenameID;
282  orxU32 u32ID;
284  } stBitmap;
285  };
286 
288 
289 
290 /***************************************************************************
291  * Functions directly implemented by orx core
292  ***************************************************************************/
293 
294 #if defined(__orxIOS__) && defined(__orxOBJC__)
295 
296 #import <UIKit/UIKit.h>
297 #import <OpenGLES/EAGL.h>
298 #import <OpenGLES/ES1/gl.h>
299 #import <OpenGLES/ES1/glext.h>
300 #import <OpenGLES/ES2/gl.h>
301 #import <OpenGLES/ES2/glext.h>
302 
305 @interface orxViewController : UIViewController
306 {
307 @private
308  UIInterfaceOrientation eOrientation;
309 }
310 
311 @property UIInterfaceOrientation eOrientation;
312 
313 @end
314 
317 @interface orxView : UIView
318 {
319 @private
320  EAGLContext *poMainContext, *poThreadContext;
321  GLuint uiRenderBuffer, uiDepthBuffer, uiScreenFrameBuffer, uiTextureFrameBuffer;
322  BOOL bShaderSupport, bCompressedTextureSupport;
323 }
324 
325 + (orxView *) GetInstance;
326 
327 - (void) QueueEvent:(orxENUM)_eID WithPayload:(orxSYSTEM_EVENT_PAYLOAD *)_pstPayload;
328 - (void) NotifyAcceleration:(UIAcceleration *)_poAcceleration;
329 
330 @property (nonatomic, retain) EAGLContext *poMainContext;
331 @property (nonatomic, retain) EAGLContext *poThreadContext;
332 @property BOOL bShaderSupport;
333 @property BOOL bCompressedTextureSupport;
334 
335 @end
336 
337 #endif /* __orxIOS__ && __orxOBJC__ */
338 
339 
342 extern orxDLLAPI void orxFASTCALL orxDisplay_Setup();
343 
351 static orxINLINE orxRGBA orxRGBA_Set(orxU8 _u8R, orxU8 _u8G, orxU8 _u8B, orxU8 _u8A)
352 {
353  orxRGBA stResult;
354 
355  /* Updates result */
356  stResult.u8R = _u8R;
357  stResult.u8G = _u8G;
358  stResult.u8B = _u8B;
359  stResult.u8A = _u8A;
360 
361  /* Done! */
362  return stResult;
363 }
364 
365 
371 static orxINLINE orxCOLOR * orxColor_SetRGBA(orxCOLOR *_pstColor, orxRGBA _stRGBA)
372 {
373  orxCOLOR *pstResult = _pstColor;
374 
375  /* Checks */
376  orxASSERT(_pstColor != orxNULL);
377 
378  /* Stores RGB */
380 
381  /* Stores alpha */
382  _pstColor->fAlpha = orxCOLOR_NORMALIZER * orxRGBA_A(_stRGBA);
383 
384  /* Done! */
385  return pstResult;
386 }
387 
394 static orxINLINE orxCOLOR * orxColor_Set(orxCOLOR *_pstColor, const orxVECTOR *_pvRGB, orxFLOAT _fAlpha)
395 {
396  orxCOLOR *pstResult = _pstColor;
397 
398  /* Checks */
399  orxASSERT(_pstColor != orxNULL);
400 
401  /* Stores RGB */
402  orxVector_Copy(&(_pstColor->vRGB), _pvRGB);
403 
404  /* Stores alpha */
405  _pstColor->fAlpha = _fAlpha;
406 
407  /* Done! */
408  return pstResult;
409 }
410 
416 static orxINLINE orxCOLOR * orxColor_SetRGB(orxCOLOR *_pstColor, const orxVECTOR *_pvRGB)
417 {
418  orxCOLOR *pstResult = _pstColor;
419 
420  /* Checks */
421  orxASSERT(_pstColor != orxNULL);
422  orxASSERT(_pvRGB != orxNULL);
423 
424  /* Stores components */
425  orxVector_Copy(&(_pstColor->vRGB), _pvRGB);
426 
427  /* Done! */
428  return pstResult;
429 }
430 
436 static orxINLINE orxCOLOR * orxColor_SetAlpha(orxCOLOR *_pstColor, orxFLOAT _fAlpha)
437 {
438  orxCOLOR *pstResult = _pstColor;
439 
440  /* Checks */
441  orxASSERT(_pstColor != orxNULL);
442 
443  /* Stores it */
444  _pstColor->fAlpha = _fAlpha;
445 
446  /* Done! */
447  return pstResult;
448 }
449 
454 static orxINLINE orxRGBA orxColor_ToRGBA(const orxCOLOR *_pstColor)
455 {
456  orxRGBA stResult;
457  orxVECTOR vColor;
458  orxFLOAT fAlpha;
459 
460  /* Checks */
461  orxASSERT(_pstColor != orxNULL);
462 
463  /* Clamps RGB components */
464  orxVector_Clamp(&vColor, &(_pstColor->vRGB), &orxVECTOR_0, &orxVECTOR_WHITE);
465 
466  /* De-normalizes vector */
467  orxVector_Mulf(&vColor, &vColor, orxCOLOR_DENORMALIZER);
468 
469  /* Clamps alpha */
470  fAlpha = orxCLAMP(_pstColor->fAlpha, orxFLOAT_0, orxFLOAT_1);
471 
472  /* Updates result */
473  stResult = orx2RGBA(orxF2U(vColor.fR), orxF2U(vColor.fG), orxF2U(vColor.fB), orxF2U(orxCOLOR_DENORMALIZER * fAlpha));
474 
475  /* Done! */
476  return stResult;
477 }
478 
484 static orxINLINE orxCOLOR * orxColor_Copy(orxCOLOR *_pstDst, const orxCOLOR *_pstSrc)
485 {
486  /* Checks */
487  orxASSERT(_pstDst != orxNULL);
488  orxASSERT(_pstSrc != orxNULL);
489 
490  /* Copies it */
491  orxMemory_Copy(_pstDst, _pstSrc, sizeof(orxCOLOR));
492 
493  /* Done! */
494  return _pstDst;
495 }
496 
502 static orxCOLOR *orxFASTCALL orxColor_FromRGBToHSL(orxCOLOR *_pstDst, const orxCOLOR *_pstSrc)
503 {
504  orxCOLOR *pstResult = _pstDst;
505  orxFLOAT fMin, fMax, fDelta, fR, fG, fB;
506 
507  /* Checks */
508  orxASSERT(_pstDst != orxNULL);
509  orxASSERT(_pstSrc != orxNULL);
510 
511  /* Gets source red, blue and green components */
512  fR = _pstSrc->vRGB.fR;
513  fG = _pstSrc->vRGB.fG;
514  fB = _pstSrc->vRGB.fB;
515 
516  /* Gets min, max & delta values */
517  fMin = orxMIN(fR, orxMIN(fG, fB));
518  fMax = orxMAX(fR, orxMAX(fG, fB));
519  fDelta = fMax - fMin;
520 
521  /* Stores lightness */
522  pstResult->vHSL.fL = orx2F(0.5f) * (fMax + fMin);
523 
524  /* Gray? */
525  if(fDelta == orxFLOAT_0)
526  {
527  /* Gets hue & saturation */
528  pstResult->vHSL.fH = pstResult->vHSL.fS = orxFLOAT_0;
529  }
530  else
531  {
532  /* Updates saturation */
533  pstResult->vHSL.fS = (pstResult->vHSL.fL < orx2F(0.5f))
534  ? fDelta / (fMax + fMin)
535  : fDelta / (orx2F(2.0f) - fMax - fMin);
536 
537  /* Red tone? */
538  if(fR == fMax)
539  {
540  /* Updates hue */
541  pstResult->vHSL.fH = orx2F(1.0f / 6.0f) * (fG - fB) / fDelta;
542  }
543  /* Green tone? */
544  else if(fG == fMax)
545  {
546  /* Updates hue */
547  pstResult->vHSL.fH = orx2F(1.0f / 3.0f) + (orx2F(1.0f / 6.0f) * (fB - fR) / fDelta);
548  }
549  /* Blue tone */
550  else
551  {
552  /* Updates hue */
553  pstResult->vHSL.fH = orx2F(2.0f / 3.0f) + (orx2F(1.0f / 6.0f) * (fR - fG) / fDelta);
554  }
555 
556  /* Clamps hue */
557  if(pstResult->vHSL.fH < orxFLOAT_0)
558  {
559  pstResult->vHSL.fH += orxFLOAT_1;
560  }
561  else if(pstResult->vHSL.fH > orxFLOAT_1)
562  {
563  pstResult->vHSL.fH -= orxFLOAT_1;
564  }
565  }
566 
567  /* Updates alpha */
568  pstResult->fAlpha = _pstSrc->fAlpha;
569 
570  /* Done! */
571  return pstResult;
572 }
573 
579 static orxCOLOR *orxFASTCALL orxColor_FromHSLToRGB(orxCOLOR *_pstDst, const orxCOLOR *_pstSrc)
580 {
581  orxCOLOR *pstResult = _pstDst;
582  orxFLOAT fH, fS, fL;
583 
584 #define orxCOLOR_GET_RGB_COMPONENT(RESULT, ALT, CHROMA, HUE) \
585 do \
586 { \
587  if(HUE < orx2F(1.0f / 6.0f)) \
588  { \
589  RESULT = ALT + (orx2F(6.0f) * HUE * (CHROMA - ALT)); \
590  } \
591  else if(HUE < orx2F(1.0f / 2.0f)) \
592  { \
593  RESULT = CHROMA; \
594  } \
595  else if(HUE < orx2F(2.0f / 3.0f)) \
596  { \
597  RESULT = ALT + (orx2F(6.0f) * (CHROMA - ALT) * (orx2F(2.0f / 3.0f) - HUE)); \
598  } \
599  else \
600  { \
601  RESULT = ALT; \
602  } \
603  if(RESULT < orxMATH_KF_EPSILON) \
604  { \
605  RESULT = orxFLOAT_0; \
606  } \
607  else if(RESULT > orxFLOAT_1 - orxMATH_KF_EPSILON) \
608  { \
609  RESULT = orxFLOAT_1; \
610  } \
611 } \
612 while(orxFALSE)
613 
614  /* Checks */
615  orxASSERT(_pstDst != orxNULL);
616  orxASSERT(_pstSrc != orxNULL);
617 
618  /* Gets source hue, saturation and lightness components */
619  fH = _pstSrc->vRGB.fH;
620  fS = _pstSrc->vRGB.fS;
621  fL = _pstSrc->vRGB.fL;
622 
623  /* Gray? */
624  if(fS == orxFLOAT_0)
625  {
626  /* Updates result */
627  orxVector_SetAll(&(pstResult->vRGB), fL);
628  }
629  else
630  {
631  orxFLOAT fChroma, fIntermediate;
632 
633  /* Gets chroma */
634  fChroma = (fL < orx2F(0.5f))
635  ? fL + (fL * fS)
636  : fL + fS - (fL * fS);
637 
638  /* Gets intermediate value */
639  fIntermediate = (orx2F(2.0f) * fL) - fChroma;
640 
641  /* Gets RGB components */
642  if(fH > orx2F(2.0f / 3.0f))
643  {
644  orxCOLOR_GET_RGB_COMPONENT(pstResult->vRGB.fR, fIntermediate, fChroma, (fH - orx2F(2.0f / 3.0f)));
645  }
646  else
647  {
648  orxCOLOR_GET_RGB_COMPONENT(pstResult->vRGB.fR, fIntermediate, fChroma, (fH + orx2F(1.0f / 3.0f)));
649  }
650  orxCOLOR_GET_RGB_COMPONENT(pstResult->vRGB.fG, fIntermediate, fChroma, fH);
651  if(fH < orx2F(1.0f / 3.0f))
652  {
653  orxCOLOR_GET_RGB_COMPONENT(pstResult->vRGB.fB, fIntermediate, fChroma, (fH + orx2F(2.0f / 3.0f)));
654  }
655  else
656  {
657  orxCOLOR_GET_RGB_COMPONENT(pstResult->vRGB.fB, fIntermediate, fChroma, (fH - orx2F(1.0f / 3.0f)));
658  }
659  }
660 
661  /* Updates alpha */
662  pstResult->fAlpha = _pstSrc->fAlpha;
663 
664  /* Done! */
665  return pstResult;
666 }
667 
673 static orxCOLOR *orxFASTCALL orxColor_FromRGBToHSV(orxCOLOR *_pstDst, const orxCOLOR *_pstSrc)
674 {
675  orxCOLOR *pstResult = _pstDst;
676  orxFLOAT fMin, fMax, fDelta, fR, fG, fB;
677 
678  /* Checks */
679  orxASSERT(_pstDst != orxNULL);
680  orxASSERT(_pstSrc != orxNULL);
681 
682  /* Gets source red, blue and green components */
683  fR = _pstSrc->vRGB.fR;
684  fG = _pstSrc->vRGB.fG;
685  fB = _pstSrc->vRGB.fB;
686 
687  /* Gets min, max & delta values */
688  fMin = orxMIN(fR, orxMIN(fG, fB));
689  fMax = orxMAX(fR, orxMAX(fG, fB));
690  fDelta = fMax - fMin;
691 
692  /* Stores value */
693  pstResult->vHSL.fV = fMax;
694 
695  /* Gray? */
696  if(fDelta == orxFLOAT_0)
697  {
698  /* Gets hue & saturation */
699  pstResult->vHSL.fH = pstResult->vHSL.fS = orxFLOAT_0;
700  }
701  else
702  {
703  /* Updates saturation */
704  pstResult->vHSL.fS = fDelta / fMax;
705 
706  /* Red tone? */
707  if(fR == fMax)
708  {
709  /* Updates hue */
710  pstResult->vHSL.fH = orx2F(1.0f / 6.0f) * (fG - fB) / fDelta;
711  }
712  /* Green tone? */
713  else if(fG == fMax)
714  {
715  /* Updates hue */
716  pstResult->vHSL.fH = orx2F(1.0f / 3.0f) + (orx2F(1.0f / 6.0f) * (fB - fR) / fDelta);
717  }
718  /* Blue tone */
719  else
720  {
721  /* Updates hue */
722  pstResult->vHSL.fH = orx2F(2.0f / 3.0f) + (orx2F(1.0f / 6.0f) * (fR - fG) / fDelta);
723  }
724 
725  /* Clamps hue */
726  if(pstResult->vHSL.fH < orxFLOAT_0)
727  {
728  pstResult->vHSL.fH += orxFLOAT_1;
729  }
730  else if(pstResult->vHSL.fH > orxFLOAT_1)
731  {
732  pstResult->vHSL.fH -= orxFLOAT_1;
733  }
734  }
735 
736  /* Updates alpha */
737  pstResult->fAlpha = _pstSrc->fAlpha;
738 
739  /* Done! */
740  return pstResult;
741 }
742 
748 static orxCOLOR *orxFASTCALL orxColor_FromHSVToRGB(orxCOLOR *_pstDst, const orxCOLOR *_pstSrc)
749 {
750  orxCOLOR *pstResult = _pstDst;
751  orxFLOAT fH, fS, fV;
752 
753  /* Checks */
754  orxASSERT(_pstDst != orxNULL);
755  orxASSERT(_pstSrc != orxNULL);
756 
757  /* Gets source hue, saturation and value components */
758  fH = _pstSrc->vRGB.fH;
759  fS = _pstSrc->vRGB.fS;
760  fV = _pstSrc->vRGB.fV;
761 
762  /* Gray? */
763  if(fS == orxFLOAT_0)
764  {
765  /* Updates result */
766  orxVector_SetAll(&(pstResult->vRGB), fV);
767  }
768  else
769  {
770  orxFLOAT fFullHue, fSector, fIntermediate;
771 
772  /* Gets intermediate value */
773  fIntermediate = fV * fS;
774 
775  /* Gets full hue & sector */
776  fFullHue = orx2F(6.0f) * fH;
777  fSector = orxMath_Floor(fFullHue);
778 
779  /* Depending on sector */
780  switch(orxF2U(fSector))
781  {
782  default:
783  case 0:
784  {
785  /* Updates RGB components */
786  pstResult->vRGB.fR = fV;
787  pstResult->vRGB.fG = fV - (fIntermediate - (fIntermediate * (fFullHue - fSector)));
788  pstResult->vRGB.fB = fV - fIntermediate;
789 
790  break;
791  }
792 
793  case 1:
794  {
795  /* Updates RGB components */
796  pstResult->vRGB.fR = fV - (fIntermediate * (fFullHue - fSector));
797  pstResult->vRGB.fG = fV;
798  pstResult->vRGB.fB = fV - fIntermediate;
799 
800  break;
801  }
802 
803  case 2:
804  {
805  /* Updates RGB components */
806  pstResult->vRGB.fR = fV - fIntermediate;
807  pstResult->vRGB.fG = fV;
808  pstResult->vRGB.fB = fV - (fIntermediate - (fIntermediate * (fFullHue - fSector)));
809 
810  break;
811  }
812 
813  case 3:
814  {
815  /* Updates RGB components */
816  pstResult->vRGB.fR = fV - fIntermediate;
817  pstResult->vRGB.fG = fV - (fIntermediate * (fFullHue - fSector));
818  pstResult->vRGB.fB = fV;
819 
820  break;
821  }
822 
823  case 4:
824  {
825  /* Updates RGB components */
826  pstResult->vRGB.fR = fV - (fIntermediate - (fIntermediate * (fFullHue - fSector)));
827  pstResult->vRGB.fG = fV - fIntermediate;
828  pstResult->vRGB.fB = fV;
829 
830  break;
831  }
832 
833  case 5:
834  {
835  /* Updates RGB components */
836  pstResult->vRGB.fR = fV;
837  pstResult->vRGB.fG = fV - fIntermediate;
838  pstResult->vRGB.fB = fV - (fIntermediate * (fFullHue - fSector));
839 
840  break;
841  }
842  }
843  }
844 
845  /* Updates alpha */
846  pstResult->fAlpha = _pstSrc->fAlpha;
847 
848  /* Done! */
849  return pstResult;
850 }
851 
856 extern orxDLLAPI orxDISPLAY_BLEND_MODE orxFASTCALL orxDisplay_GetBlendModeFromString(const orxSTRING _zBlendMode);
857 
858 
859 /***************************************************************************
860  * Functions extended by plugins
861  ***************************************************************************/
862 
866 extern orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_Init();
867 
870 extern orxDLLAPI void orxFASTCALL orxDisplay_Exit();
871 
872 
876 extern orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_Swap();
877 
878 
882 extern orxDLLAPI orxBITMAP *orxFASTCALL orxDisplay_GetScreenBitmap();
883 
889 extern orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_GetScreenSize(orxFLOAT *_pfWidth, orxFLOAT *_pfHeight);
890 
891 
897 extern orxDLLAPI orxBITMAP *orxFASTCALL orxDisplay_CreateBitmap(orxU32 _u32Width, orxU32 _u32Height);
898 
902 extern orxDLLAPI void orxFASTCALL orxDisplay_DeleteBitmap(orxBITMAP *_pstBitmap);
903 
904 
909 extern orxDLLAPI orxBITMAP *orxFASTCALL orxDisplay_LoadBitmap(const orxSTRING _zFileName);
910 
916 extern orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_SaveBitmap(const orxBITMAP *_pstBitmap, const orxSTRING _zFileName);
917 
918 
923 extern orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_SetTempBitmap(const orxBITMAP *_pstBitmap);
924 
928 extern orxDLLAPI const orxBITMAP *orxFASTCALL orxDisplay_GetTempBitmap();
929 
930 
936 extern orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_SetDestinationBitmaps(orxBITMAP **_apstBitmapList, orxU32 _u32Number);
937 
943 extern orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_ClearBitmap(orxBITMAP *_pstBitmap, orxRGBA _stColor);
944 
949 extern orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_SetBlendMode(orxDISPLAY_BLEND_MODE _eBlendMode);
950 
959 extern orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_SetBitmapClipping(orxBITMAP *_pstBitmap, orxU32 _u32TLX, orxU32 _u32TLY, orxU32 _u32BRX, orxU32 _u32BRY);
960 
967 extern orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_SetBitmapColorKey(orxBITMAP *_pstBitmap, orxRGBA _stColor, orxBOOL _bEnable);
968 
975 extern orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_SetBitmapData(orxBITMAP *_pstBitmap, const orxU8 *_au8Data, orxU32 _u32ByteNumber);
976 
983 extern orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_GetBitmapData(const orxBITMAP *_pstBitmap, orxU8 *_au8Data, orxU32 _u32ByteNumber);
984 
990 extern orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_SetBitmapColor(orxBITMAP *_pstBitmap, orxRGBA _stColor);
991 
996 extern orxDLLAPI orxRGBA orxFASTCALL orxDisplay_GetBitmapColor(const orxBITMAP *_pstBitmap);
997 
1004 extern orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_GetBitmapSize(const orxBITMAP *_pstBitmap, orxFLOAT *_pfWidth, orxFLOAT *_pfHeight);
1005 
1006 
1011 extern orxDLLAPI orxU32 orxFASTCALL orxDisplay_GetBitmapID(const orxBITMAP *_pstBitmap);
1012 
1020 extern orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_TransformBitmap(const orxBITMAP *_pstSrc, const orxDISPLAY_TRANSFORM *_pstTransform, orxDISPLAY_SMOOTHING _eSmoothing, orxDISPLAY_BLEND_MODE _eBlendMode);
1021 
1031 extern orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_TransformText(const orxSTRING _zString, const orxBITMAP *_pstFont, const orxCHARACTER_MAP *_pstMap, const orxDISPLAY_TRANSFORM *_pstTransform, orxDISPLAY_SMOOTHING _eSmoothing, orxDISPLAY_BLEND_MODE _eBlendMode);
1032 
1033 
1040 extern orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_DrawLine(const orxVECTOR *_pvStart, const orxVECTOR *_pvEnd, orxRGBA _stColor);
1041 
1048 extern orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_DrawPolyline(const orxVECTOR *_avVertexList, orxU32 _u32VertexNumber, orxRGBA _stColor);
1049 
1057 extern orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_DrawPolygon(const orxVECTOR *_avVertexList, orxU32 _u32VertexNumber, orxRGBA _stColor, orxBOOL _bFill);
1058 
1066 extern orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_DrawCircle(const orxVECTOR *_pvCenter, orxFLOAT _fRadius, orxRGBA _stColor, orxBOOL _bFill);
1067 
1074 extern orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_DrawOBox(const orxOBOX *_pstBox, orxRGBA _stColor, orxBOOL _bFill);
1075 
1083 extern orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_DrawMesh(const orxDISPLAY_MESH *_pstMesh, const orxBITMAP *_pstBitmap, orxDISPLAY_SMOOTHING _eSmoothing, orxDISPLAY_BLEND_MODE _eBlendMode);
1084 
1088 extern orxDLLAPI orxBOOL orxFASTCALL orxDisplay_HasShaderSupport();
1089 
1097 extern orxDLLAPI orxHANDLE orxFASTCALL orxDisplay_CreateShader(const orxSTRING *_azCodeList, orxU32 _u32Size, const orxLINKLIST *_pstParamList, orxBOOL _bUseCustomParam);
1098 
1102 extern orxDLLAPI void orxFASTCALL orxDisplay_DeleteShader(orxHANDLE _hShader);
1103 
1108 extern orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_StartShader(const orxHANDLE _hShader);
1109 
1114 extern orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_StopShader(const orxHANDLE _hShader);
1115 
1123 extern orxDLLAPI orxS32 orxFASTCALL orxDisplay_GetParameterID(orxHANDLE _hShader, const orxSTRING _zParam, orxS32 _s32Index, orxBOOL _bIsTexture);
1124 
1131 extern orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_SetShaderBitmap(orxHANDLE _hShader, orxS32 _s32ID, const orxBITMAP *_pstValue);
1132 
1139 extern orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_SetShaderFloat(orxHANDLE _hShader, orxS32 _s32ID, orxFLOAT _fValue);
1140 
1147 extern orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_SetShaderVector(orxHANDLE _hShader, orxS32 _s32ID, const orxVECTOR *_pvValue);
1148 
1149 
1154 extern orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_EnableVSync(orxBOOL _bEnable);
1155 
1159 extern orxDLLAPI orxBOOL orxFASTCALL orxDisplay_IsVSyncEnabled();
1160 
1161 
1166 extern orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_SetFullScreen(orxBOOL _bFullScreen);
1167 
1171 extern orxDLLAPI orxBOOL orxFASTCALL orxDisplay_IsFullScreen();
1172 
1173 
1177 extern orxDLLAPI orxU32 orxFASTCALL orxDisplay_GetVideoModeCount();
1178 
1184 extern orxDLLAPI orxDISPLAY_VIDEO_MODE *orxFASTCALL orxDisplay_GetVideoMode(orxU32 _u32Index, orxDISPLAY_VIDEO_MODE *_pstVideoMode);
1185 
1190 extern orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_SetVideoMode(const orxDISPLAY_VIDEO_MODE *_pstVideoMode);
1191 
1196 extern orxDLLAPI orxBOOL orxFASTCALL orxDisplay_IsVideoModeAvailable(const orxDISPLAY_VIDEO_MODE *_pstVideoMode);
1197 
1198 
1199 #endif /* _orxDISPLAY_H_ */
1200 
orxU32 u32RGBA
Definition: orxDisplay.h:68
orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_StopShader(const orxHANDLE _hShader)
#define orxCOLOR_GET_RGB_COMPONENT(RESULT, ALT, CHROMA, HUE)
struct __orxHASHTABLE_t orxHASHTABLE
Definition: orxHashTable.h:50
orxDISPLAY_SMOOTHING
Definition: orxDisplay.h:167
orxFLOAT fB
Definition: orxVector.h:87
static orxINLINE orxVECTOR * orxVector_Mulf(orxVECTOR *_pvRes, const orxVECTOR *_pvOp1, orxFLOAT _fOp2)
Definition: orxVector.h:198
static orxCOLOR *orxFASTCALL orxColor_FromHSVToRGB(orxCOLOR *_pstDst, const orxCOLOR *_pstSrc)
Definition: orxDisplay.h:748
orxDISPLAY_EVENT
Definition: orxDisplay.h:247
orxVECTOR vHSV
Definition: orxDisplay.h:202
orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_DrawMesh(const orxDISPLAY_MESH *_pstMesh, const orxBITMAP *_pstBitmap, orxDISPLAY_SMOOTHING _eSmoothing, orxDISPLAY_BLEND_MODE _eBlendMode)
orxU32 u32VertexNumber
Definition: orxDisplay.h:131
orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_ClearBitmap(orxBITMAP *_pstBitmap, orxRGBA _stColor)
struct __orxBITMAP_t orxBITMAP
Definition: orxDisplay.h:82
#define orxRGBA_R(RGBA)
Definition: orxDisplay.h:74
#define orxF2U(V)
Definition: orxMath.h:95
orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_SetShaderVector(orxHANDLE _hShader, orxS32 _s32ID, const orxVECTOR *_pvValue)
orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_SetBitmapColor(orxBITMAP *_pstBitmap, orxRGBA _stColor)
orxDLLAPI void orxFASTCALL orxDisplay_DeleteShader(orxHANDLE _hShader)
static const orxFLOAT orxFLOAT_1
Definition: orxType.h:193
orxDLLAPI orxBOOL orxFASTCALL orxDisplay_IsFullScreen()
static orxINLINE orxRGBA orxColor_ToRGBA(const orxCOLOR *_pstColor)
Definition: orxDisplay.h:454
orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_GetBitmapSize(const orxBITMAP *_pstBitmap, orxFLOAT *_pfWidth, orxFLOAT *_pfHeight)
orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_SetBitmapData(orxBITMAP *_pstBitmap, const orxU8 *_au8Data, orxU32 _u32ByteNumber)
orxDLLAPI const orxBITMAP *orxFASTCALL orxDisplay_GetTempBitmap()
#define orxMIN(A, B)
Definition: orxMath.h:74
orxDLLAPI void orxFASTCALL orxDisplay_Setup()
orxFLOAT fAlpha
Definition: orxDisplay.h:204
orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_SetShaderFloat(orxHANDLE _hShader, orxS32 _s32ID, orxFLOAT _fValue)
orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_Init()
orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_GetScreenSize(orxFLOAT *_pfWidth, orxFLOAT *_pfHeight)
orxDLLAPI orxU32 orxFASTCALL orxDisplay_GetVideoModeCount()
#define orxCLAMP(V, MIN, MAX)
Definition: orxMath.h:89
orxDLLAPI orxBOOL orxFASTCALL orxDisplay_IsVSyncEnabled()
orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_StartShader(const orxHANDLE _hShader)
static orxCOLOR *orxFASTCALL orxColor_FromRGBToHSL(orxCOLOR *_pstDst, const orxCOLOR *_pstSrc)
Definition: orxDisplay.h:502
static orxCOLOR *orxFASTCALL orxColor_FromRGBToHSV(orxCOLOR *_pstDst, const orxCOLOR *_pstSrc)
Definition: orxDisplay.h:673
static orxINLINE orxCOLOR * orxColor_SetRGB(orxCOLOR *_pstColor, const orxVECTOR *_pvRGB)
Definition: orxDisplay.h:416
orxDLLAPI orxU32 orxFASTCALL orxDisplay_GetBitmapID(const orxBITMAP *_pstBitmap)
orxSTRINGID stFilenameID
Definition: orxDisplay.h:281
orxFLOAT fS
Definition: orxVector.h:80
static orxINLINE orxFLOAT orxMath_Floor(orxFLOAT _fOp)
Definition: orxMath.h:514
orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_SaveBitmap(const orxBITMAP *_pstBitmap, const orxSTRING _zFileName)
orxDLLAPI orxRGBA orxFASTCALL orxDisplay_GetBitmapColor(const orxBITMAP *_pstBitmap)
static orxINLINE orxVECTOR * orxVector_Set(orxVECTOR *_pvVec, orxFLOAT _fX, orxFLOAT _fY, orxFLOAT _fZ)
Definition: orxVector.h:105
orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_Swap()
orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_TransformText(const orxSTRING _zString, const orxBITMAP *_pstFont, const orxCHARACTER_MAP *_pstMap, const orxDISPLAY_TRANSFORM *_pstTransform, orxDISPLAY_SMOOTHING _eSmoothing, orxDISPLAY_BLEND_MODE _eBlendMode)
orxHASHTABLE * pstCharacterTable
Definition: orxDisplay.h:161
#define orxRGBA_B(RGBA)
Definition: orxDisplay.h:76
#define orxCOLOR_DENORMALIZER
Definition: orxDisplay.h:80
static orxCOLOR *orxFASTCALL orxColor_FromHSLToRGB(orxCOLOR *_pstDst, const orxCOLOR *_pstSrc)
Definition: orxDisplay.h:579
orxBANK * pstCharacterBank
Definition: orxDisplay.h:160
orxDLLAPI orxDISPLAY_VIDEO_MODE *orxFASTCALL orxDisplay_GetVideoMode(orxU32 _u32Index, orxDISPLAY_VIDEO_MODE *_pstVideoMode)
orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_DrawLine(const orxVECTOR *_pvStart, const orxVECTOR *_pvEnd, orxRGBA _stColor)
orxDISPLAY_PRIMITIVE ePrimitive
Definition: orxDisplay.h:133
#define orxCOLOR_NORMALIZER
Definition: orxDisplay.h:79
const orxDISPLAY_VERTEX * astVertexList
Definition: orxDisplay.h:129
#define orxU2F(V)
Definition: orxMath.h:107
static orxINLINE orxCOLOR * orxColor_Set(orxCOLOR *_pstColor, const orxVECTOR *_pvRGB, orxFLOAT _fAlpha)
Definition: orxDisplay.h:394
orxFLOAT fG
Definition: orxVector.h:79
#define orxMAX(A, B)
Definition: orxMath.h:81
orxU32 u32IndexNumber
Definition: orxDisplay.h:132
static orxINLINE orxVECTOR * orxVector_Clamp(orxVECTOR *_pvRes, const orxVECTOR *_pvOp, const orxVECTOR *_pvMin, const orxVECTOR *_pvMax)
Definition: orxVector.h:359
orxVECTOR vHSL
Definition: orxDisplay.h:201
orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_SetBitmapColorKey(orxBITMAP *_pstBitmap, orxRGBA _stColor, orxBOOL _bEnable)
orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_SetBlendMode(orxDISPLAY_BLEND_MODE _eBlendMode)
orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_SetVideoMode(const orxDISPLAY_VIDEO_MODE *_pstVideoMode)
orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_DrawOBox(const orxOBOX *_pstBox, orxRGBA _stColor, orxBOOL _bFill)
orxVECTOR vRGB
Definition: orxDisplay.h:200
orxFLOAT fR
Definition: orxVector.h:71
orxSTATUS
Definition: orxType.h:246
orxDISPLAY_PRIMITIVE
Definition: orxDisplay.h:109
orxDLLAPI orxS32 orxFASTCALL orxDisplay_GetParameterID(orxHANDLE _hShader, const orxSTRING _zParam, orxS32 _s32Index, orxBOOL _bIsTexture)
orxDLLAPI orxBITMAP *orxFASTCALL orxDisplay_LoadBitmap(const orxSTRING _zFileName)
const orxU16 * au16IndexList
Definition: orxDisplay.h:130
orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_TransformBitmap(const orxBITMAP *_pstSrc, const orxDISPLAY_TRANSFORM *_pstTransform, orxDISPLAY_SMOOTHING _eSmoothing, orxDISPLAY_BLEND_MODE _eBlendMode)
orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_SetBitmapClipping(orxBITMAP *_pstBitmap, orxU32 _u32TLX, orxU32 _u32TLY, orxU32 _u32BRX, orxU32 _u32BRY)
orxU8 u8B
Definition: orxDisplay.h:65
orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_SetFullScreen(orxBOOL _bFullScreen)
orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_GetBitmapData(const orxBITMAP *_pstBitmap, orxU8 *_au8Data, orxU32 _u32ByteNumber)
#define orxRGBA_A(RGBA)
Definition: orxDisplay.h:77
#define orx2RGBA(R, G, B, A)
Definition: orxDisplay.h:73
orxU8 u8G
Definition: orxDisplay.h:65
orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_EnableVSync(orxBOOL _bEnable)
typedef void(orxFASTCALL *orxMODULE_EXIT_FUNCTION)()
static orxINLINE orxCOLOR * orxColor_SetRGBA(orxCOLOR *_pstColor, orxRGBA _stRGBA)
Definition: orxDisplay.h:371
#define orxDLLAPI
Definition: orxDecl.h:381
orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_SetDestinationBitmaps(orxBITMAP **_apstBitmapList, orxU32 _u32Number)
#define orxRGBA_G(RGBA)
Definition: orxDisplay.h:75
orxDLLAPI orxBITMAP *orxFASTCALL orxDisplay_CreateBitmap(orxU32 _u32Width, orxU32 _u32Height)
orxDLLAPI orxBITMAP *orxFASTCALL orxDisplay_GetScreenBitmap()
static orxINLINE orxRGBA orxRGBA_Set(orxU8 _u8R, orxU8 _u8G, orxU8 _u8B, orxU8 _u8A)
Definition: orxDisplay.h:351
orxFLOAT fV
Definition: orxVector.h:89
orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_DrawCircle(const orxVECTOR *_pvCenter, orxFLOAT _fRadius, orxRGBA _stColor, orxBOOL _bFill)
orxDISPLAY_BLEND_MODE
Definition: orxDisplay.h:181
orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_DrawPolygon(const orxVECTOR *_avVertexList, orxU32 _u32VertexNumber, orxRGBA _stColor, orxBOOL _bFill)
orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_SetShaderBitmap(orxHANDLE _hShader, orxS32 _s32ID, const orxBITMAP *_pstValue)
static orxINLINE orxVECTOR * orxVector_SetAll(orxVECTOR *_pvVec, orxFLOAT _fValue)
Definition: orxVector.h:124
orxU8 u8A
Definition: orxDisplay.h:65
orxDLLAPI const orxVECTOR orxVECTOR_WHITE
static const orxFLOAT orxFLOAT_0
Definition: orxType.h:192
struct __orxBANK_t orxBANK
Definition: orxBank.h:56
orxDLLAPI orxHANDLE orxFASTCALL orxDisplay_CreateShader(const orxSTRING *_azCodeList, orxU32 _u32Size, const orxLINKLIST *_pstParamList, orxBOOL _bUseCustomParam)
orxU8 u8R
Definition: orxDisplay.h:65
orxDLLAPI const orxVECTOR orxVECTOR_0
orxDLLAPI orxBOOL orxFASTCALL orxDisplay_HasShaderSupport()
orxDLLAPI orxBOOL orxFASTCALL orxDisplay_IsVideoModeAvailable(const orxDISPLAY_VIDEO_MODE *_pstVideoMode)
orxFLOAT fCharacterHeight
Definition: orxDisplay.h:158
static orxINLINE void * orxMemory_Copy(void *_pDest, const void *_pSrc, orxU32 _u32Size)
Definition: orxMemory.h:148
orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_SetTempBitmap(const orxBITMAP *_pstBitmap)
static orxINLINE orxCOLOR * orxColor_Copy(orxCOLOR *_pstDst, const orxCOLOR *_pstSrc)
Definition: orxDisplay.h:484
orxFLOAT fL
Definition: orxVector.h:88
#define orxASSERT(TEST,...)
Definition: orxDebug.h:353
static orxINLINE orxCOLOR * orxColor_SetAlpha(orxCOLOR *_pstColor, orxFLOAT _fAlpha)
Definition: orxDisplay.h:436
orxDLLAPI void orxFASTCALL orxDisplay_DeleteBitmap(orxBITMAP *_pstBitmap)
static orxINLINE orxVECTOR * orxVector_Copy(orxVECTOR *_pvDst, const orxVECTOR *_pvSrc)
Definition: orxVector.h:135
const orxSTRING zLocation
Definition: orxDisplay.h:280
orxDLLAPI orxSTATUS orxFASTCALL orxDisplay_DrawPolyline(const orxVECTOR *_avVertexList, orxU32 _u32VertexNumber, orxRGBA _stColor)
orxFLOAT fH
Definition: orxVector.h:72
orxDLLAPI orxDISPLAY_BLEND_MODE orxFASTCALL orxDisplay_GetBlendModeFromString(const orxSTRING _zBlendMode)
orxDLLAPI void orxFASTCALL orxDisplay_Exit()

Generated for orx by doxygen 1.8.11