WOWCube Docs logo
WOWCube Docs
Mission Control
Section Shortcuts
APIExamplesSourceWOWConnectChangelog
Filters
SDK and language defaults persist in cookies.
SDK version
Navigation Tree
Collapsed by default, focused on the active path.
Made byMcKay Seamons
GitHub
  1. Home
  2. Docs
  3. Source
  4. graphics.inc
Mission NodeSDK 6.1Pawngraphics.inc

graphics.inc

SDK Source File: graphics.inc

Source / SDK 6.1 / Pawn / Core

graphics.inc

graphics.inc
CPP
1/****h* PawnLibs/graphics
2 * Description
3 * TBD: explain basic principles and underlying hardware limitations
4 ******/
5
6/****s* PawnLibs/graphics/GFX_POINT
7 * Summary
8 * Array with named fields which represents a point on a screen.
9 * Synopsis
10 */
11#define GFX_POINT [ .x, .y ]
12/*
13 * Description
14 * Fields:
15 * * x, y - coordinates of the point
16 ******/
17
18/****s* PawnLibs/graphics/GFX_RECTANGLE
19 * Summary
20 * Array with named fields which represents a rectangle.
21 * Synopsis
22 */
23#define GFX_RECTANGLE [ .x, .y, .w, .h ]
24/*
25 * Description
26 * Fields:
27 * * x, y - top left coordinates of the rectangle
28 * * w - width of the rectangle
29 * * h - height of the rectangle
30 ******/
31
32/****s* PawnLibs/graphics/GFX_PARTICLE
33 * Summary
34 * Array with named fields with a single particle description.
35 * Synopsis
36 */
37#define GFX_PARTICLE [ .ttl, .vx, .vy, .ax, .ay, bool:.explosion, .velocity ]
38/*
39 * Description
40 * Fields:
41 * * ttl - a particles lifetime in ms
42 * * vx, vy - an initial particles velocity in px/ms
43 * * ax, ay - a particles acceleration in px/ms^2
44 * * explosion - an explosion emulation flag
45 * * velocity - an explosion velocity
46 * See also
47 * * GFX_EMISSION
48 * * GFX_drawParticles()
49 * * GFX_drawParticlesXY()
50 ******/
51
52/****s* PawnLibs/graphics/GFX_EMISSION
53 * Summary
54 * Array with named fields with particles emission description.
55 * Synopsis
56 */
57#define GFX_EMISSION [ .duration, .frequency, .max, bool:.loop ]
58/*
59 * Description
60 * Fields:
61 * * duration - how long particles emit in ms
62 * * frequency - how frequently new particles emit in Hz
63 * * max - how many particles can emit
64 * * loop - keep emission TBD: check?
65 * See also
66 * * GFX_PARTICLE
67 * * GFX_drawParticles()
68 * * GFX_drawParticlesXY()
69 ******/
70
71/****c* PawnLibs/graphics/GFX_text_align
72 * Summary
73 * Enumeration of a text align variants.
74 * Synopsis
75 */
76const GFX_text_align: {
77 TEXT_ALIGN_CENTER = 0,
78 TEXT_ALIGN_TOP_CENTER,
79 TEXT_ALIGN_BOTTOM_CENTER,
80 TEXT_ALIGN_LEFT_CORNER,
81 TEXT_ALIGN_LEFT_TOP_CORNER,
82 TEXT_ALIGN_LEFT_BOTTOM_CORNER,
83 TEXT_ALIGN_RIGHT_CORNER,
84 TEXT_ALIGN_RIGHT_TOP_CORNER,
85 TEXT_ALIGN_RIGHT_BOTTOM_CORNER,
86};
87/******/
88
89/****c* PawnLibs/graphics/GFX_mirror
90 * Summary
91 * Enumeration of an image mirror variants.
92 * Synopsis
93 */
94const GFX_mirror: {
95 MIRROR_BLANK = 0,
96 MIRROR_X,
97 MIRROR_Y,
98 MIRROR_XY,
99};
100/******/
101
102/****c* PawnLibs/graphics/GFX_format
103 * Summary
104 * Enumeration of a pixel color formats.
105 * Synopsis
106 */
107const GFX_format: {
108 FORMAT_RGB565 = 0,
109 FORMAT_ARGB6666,
110 FORMAT_ARGB8888,
111};
112/******/
113
114/****e* PawnLibs/graphics/ON_Render
115 * Summary
116 * Render handler.
117 * Synopsis
118 */
119forward ON_Render();
120/*
121 * Description
122 * Public function with such signature will be called at the end of an
123 * application loop. Useful to logically divide the application and rendering
124 * logic. There is no limitations to render entire scene in the ON_Tick()
125 * handler.
126 ******/
127
128/****n* PawnLibs/graphics/GFX_getAssetId
129 * Summary
130 * Get an image ID by the filename.
131 * Synopsis
132 */
133native GFX_getAssetId(const name[]);
134/*
135 * Description
136 * Usually an application uses image IDs to draw sprites and backgrounds. But
137 * sometimes IDs are unknown, e.g. in common libraries, or they change rapidly
138 * during development. This interface can be used to get an ID of the image by
139 * its filename in the runtime. Maximum asset name length is 15 characters,
140 * remaining symbols are truncated during lookup.
141 * Inputs
142 * * name - an image filename for which ID is requested
143 * Return value
144 * The ID of image with a given filename or -1 in case of error.
145 * See also
146 * * ON_Init()
147 * History
148 * * v5.0 - renamed from GFX_getId() to GFX_getAssetId()
149 * * v6.0 - truncate asset name in WASM API
150 ******/
151
152/****n* PawnLibs/graphics/GFX_clear
153 * Summary
154 * Clear a layer with a given color.
155 * Synopsis
156 */
157native GFX_clear(const color);
158/*
159 * Inputs
160 * * color - a color in RGB888 format to clear a layer with
161 * History
162 * * v6.0 - changed color format
163 ******/
164
165/****n* PawnLibs/graphics/GFX_drawPoint
166 * Summary
167 * Draw a point specified by its coordinates with a given color.
168 * Synopsis
169 */
170native GFX_drawPoint(const point[GFX_POINT], color);
171native GFX_drawPointXY(x, y, color);
172/*
173 * Inputs
174 * * point or (x, y) - coordinates of point to draw
175 * * color - a color in ARGB8888 format to draw point with
176 * See also
177 * * GFX_POINT
178 * History
179 * * v5.0 - added GFX_drawPointXY() alias
180 ******/
181
182/****n* PawnLibs/graphics/GFX_drawCircle
183 * Summary
184 * Draw a circle at the given point with given radius, color and line width.
185 * Synopsis
186 */
187native GFX_drawCircle(const center[GFX_POINT], radius, width, color);
188native GFX_drawCircleXY(x, y, radius, width, color);
189/*
190 * Inputs
191 * * center or (x, y) - coordinates of the circle center
192 * * radius - radius of the circle
193 * * width - line width used to draw the circle
194 * * color - a color in ARGB8888 format to draw circle with
195 * See also
196 * * GFX_POINT
197 * History
198 * * v5.0 - added GFX_drawCircleXY() alias
199 ******/
200
201/****o* PawnLibs/graphics/GFX_drawSolidCircle
202 * Summary
203 * Draw a solid circle at the given point with given radius and color.
204 * Synopsis
205 */
206native GFX_drawSolidCircle(const center[GFX_POINT], radius, color);
207native GFX_drawSolidCircleXY(x, y, radius, color);
208/*
209 * Inputs
210 * * center or (x, y) - coordinates of the circle center
211 * * radius - radius of the circle
212 * * color - a color in ARGB8888 format to draw circle with
213 * See also
214 * * GFX_POINT
215 * * GFX_setFillShader()
216 * * GFX_setLinearGradientShader()
217 * * GFX_setRadialGradientShader()
218 * History
219 * * v5.0 - added GFX_drawSolidCircleXY() alias
220 * * v6.0 - DEPRECATED, use GFX_setFillShader() instead
221 ******/
222
223/****n* PawnLibs/graphics/GFX_drawArc
224 * Summary
225 * Draw an arc at the given point with given radius, line width, color and
226 * angles.
227 * Synopsis
228 */
229native GFX_drawArc(const center[GFX_POINT], radius, width, from, to, color);
230native GFX_drawArcXY(x, y, radius, width, from, to, color);
231/*
232 * Inputs
233 * * center or (x, y) - coordinates of the arc center
234 * * radius - radius of the arc
235 * * width - line width used to draw the arc
236 * * from - starting angle of the arc TBD: in - ? from - ?
237 * * to - ending angle of the arc TBD: in - ? from - ?
238 * * color - a color in ARGB8888 format to draw arc with
239 * See also
240 * * GFX_POINT
241 * History
242 * * v5.0 - added GFX_drawArcXY() alias
243 ******/
244
245/****n* PawnLibs/graphics/GFX_drawSector
246 * Summary
247 * Draw a filled circular sector, connecting the arc to the circle's center
248 * like a piece of pie.
249 * Synopsis
250 */
251native GFX_drawSector(const center[GFX_POINT], radius, from, to, color);
252native GFX_drawSectorXY(x, y, radius, from, to, color);
253/*
254 * Inputs
255 * * center or (x, y) - coordinates of the circle's center
256 * * radius - radius of the circle
257 * * from - starting angle of the sector TBD: in - ? from - ?
258 * * to - ending angle of the sector TBD: in - ? from - ?
259 * * color - a color in ARGB8888 format to draw arc with
260 * See also
261 * * GFX_POINT
262 * History
263 * * v5.1 - created
264 ******/
265
266/****n* PawnLibs/graphics/GFX_drawLine
267 * Summary
268 * Draw a line with from a given point to another one and given width and
269 * color.
270 * Synopsis
271 */
272native GFX_drawLine(const start[GFX_POINT], const end[GFX_POINT], width, color);
273native GFX_drawLineXY(xs, ys, xe, ye, width, color);
274/*
275 * Inputs
276 * * start or (xs, ys) - coordinates of the line starting point
277 * * end or (xe, ye) - coordinates of the line ending point
278 * * width - line width to draw
279 * * color - a color in ARGB8888 format to draw line with
280 * See also
281 * * GFX_POINT
282 * History
283 * * v5.0 - added GFX_drawLineXY() alias
284 ******/
285
286/****n* PawnLibs/graphics/GFX_drawRectangle
287 * Summary
288 * Draw a solid rectangle at a given position with specified dimensions and a
289 * color.
290 * Synopsis
291 */
292native GFX_drawRectangle(const rectangle[GFX_RECTANGLE], color);
293native GFX_drawRectangleXY(x, y, w, h, color);
294/*
295 * Inputs
296 * * rectangle or (x, y, w, h) - top left corner coordinates and dimensions of
297 * the rectangle to draw
298 * * color - a color in ARGB8888 format to draw rectangle with
299 * See also
300 * * GFX_RECTANGLE
301 * History
302 * * v5.0 - added GFX_drawRectangleXY() alias
303 ******/
304
305/****n* PawnLibs/graphics/GFX_drawText
306 * Summary
307 * Draw a formatted text by the specified coordinates with a given color,
308 * scale, text align and a rotation angle.
309 * Synopsis
310 */
311native GFX_drawText(const center[GFX_POINT], scale, angle, fontId, GFX_text_align: align, color, const format[], {Float,Fixed,_}:...);
312native GFX_drawTextXY(x, y, scale, angle, fontId, GFX_text_align: align, color, const format[], {Float,Fixed,_}:...);
313/*
314 * Inputs
315 * * center or (x, y) - coordinates of the text center
316 * * scale - percentage scale, max font size is 200x200px (100%)
317 * * angle - clockwise rotation angle in degrees
318 * * fontId - not applicable, reserved for future use
319 * * align - text align (TBD: double check)
320 * * color - a color in ARGB8888 format to draw text with
321 * * format - format string, see log.inc for specification
322 * * ... - variable values to insert in the resulting string
323 * See also
324 * * GFX_POINT
325 * * GFX_text_align
326 * * PawnLibs/log
327 * History
328 * * v5.0 - clarified documentation, added GFX_drawTextXY() alias
329 ******/
330
331/****n* PawnLibs/graphics/GFX_bakeImage
332 * Summary
333 * Set an ID of a memory buffer to save next rendering result.
334 * Synopsis
335 */
336native GFX_bakeImage(const id, const width, const height, const GFX_format: format, bool: overwrite = true);
337/*
338 * Description
339 * Specifies the image that will be created by combining the group of
340 * graphical primitives used between GFX_bakeImage() and GFS_render()
341 * according their order and taking into account alpha channel in images. HW
342 * has a limitation and can combine no more than 4 layers simultaneously, so
343 * if there are more primitives then they will be combined in a cascade.
344 * Useful for creating complex images like backgrounds for later usage.
345 * Inputs
346 * * id - an ID of image to access later
347 * * width, height - image dimensions
348 * * format - color format of baked image
349 * * overwrite - true to overwrite previously baked image, false to append on
350 * top of it
351 * See also
352 * * GFX_format
353 * * GFX_render()
354 * * GFX_removeBakedImage()
355 * History
356 * * v6.0 - added overwrite parameter
357 ******/
358
359/****n* PawnLibs/graphics/GFX_setRenderTarget
360 * Summary
361 * Set a screen which will be used to display next rendering result.
362 * Synopsis
363 */
364native GFX_setRenderTarget(const screen);
365/*
366 * Description
367 * Cube module is a special device which has 3 independent screens to display
368 * graphics. GFX_setRenderTarget() specifies a screen number which will be
369 * used to display a next rendering result. Graphics primitives used in
370 * between GFX_setRenderTarget() and GFX_render() calls will be combined
371 * together according their order and taking into account alpha channel in
372 * images. Resulting image will be immediately flushed onto the given screen.
373 * HW has a limitation and can combine no more than 4 layers simultaneously,
374 * so if there are more primitives then they will be combined in a cascade. To
375 * display anything on the screen GFX_setRenderTarget() has to be always
376 * called.
377 * Inputs
378 * * screen - a screen number to render the resulting image on
379 * See also
380 * * GFX_render()
381 * * GFX_bakeImage()
382 * History
383 * * v5.0 - renamed from GFX_updateDisplay() to GFX_setRenderTarget()
384 ******/
385
386/****n* PawnLibs/graphics/GFX_drawImage
387 * Summary
388 * Draw an image from application assets at a specified position and with
389 * given transformations.
390 * Synopsis
391 */
392native GFX_drawImage(const center[GFX_POINT], opacity, colorKey, scaleX, scaleY, angle, GFX_mirror: mirror, id);
393native GFX_drawImageXY(x, y, opacity, colorKey, scaleX, scaleY, angle, GFX_mirror: mirror, id);
394/*
395 * Inputs
396 * * center or (x, y) - coordinates of the image center to draw
397 * * opacity - opacity of the entire image, 0 is fully transparent
398 * * colorKey - transparent background color, pixels of that color will not be
399 * used for rendering, it is useful for image with color format without
400 * alpha channel, e.g. RGB565
401 * * (scaleX, scaleY) - scale in percent from 1 to 100 along the corresponding
402 * axis
403 * * angle - clockwise rotation angle in degrees
404 * * mirror - mirroring variant
405 * * id - an ID of assets image to draw
406 * See also
407 * * GFX_POINT
408 * * GFX_mirror
409 * * GFX_cacheImages()
410 * History
411 * * v5.0 - added GFX_drawImageXY() alias, color argument clarified
412 * * v6.0 - added scale parameters
413 ******/
414
415/****n* PawnLibs/graphics/GFX_drawBakedImage
416 * Summary
417 * Draw a previously baked image at a specified position and with given
418 * transformations.
419 * Synopsis
420 */
421native GFX_drawBakedImage(const center[GFX_POINT], opacity, colorKey, scaleX, scaleY, angle, GFX_mirror: mirror, id);
422native GFX_drawBakedImageXY(x, y, opacity, colorKey, scaleX, scaleY, angle, GFX_mirror: mirror, id);
423/*
424 * Inputs
425 * * center or (x, y) - coordinates of the image center to draw
426 * * opacity - opacity of the entire image, 0 is fully transparent
427 * * colorKey - transparent background color, pixels of that color will not be
428 * used for rendering, it is useful for image with color format without
429 * alpha channel, e.g. RGB565
430 * * (scaleX, scaleY) - scale in percent from 1 to 100 along the corresponding
431 * axis
432 * * angle - clockwise rotation angle in degrees
433 * * mirror - mirroring variants
434 * * id - an ID of the baked image to draw
435 * See also
436 * * GFX_POINT
437 * * GFX_mirror
438 * History
439 * * v5.0 - added GFX_drawBakedImageXY() alias, color argument clarified
440 * * v6.0 - added scale parameters
441 ******/
442
443/****n* PawnLibs/graphics/GFX_setFillShader
444 * Summary
445 * Fill next primitives with specified color.
446 * Synopsis
447 */
448native GFX_setFillShader(color);
449/*
450 * Inputs
451 * * color - a color in ARGB8888 format to fill with
452 * History
453 * * v6.0 - added primitives shading
454 ******/
455
456 /****n* PawnLibs/graphics/GFX_setLinearGradientShader
457 * Summary
458 * Fill next primitives with linear gradient from a given point / color to
459 * another one.
460 * Synopsis
461 */
462native GFX_setLinearGradientShader(const start[GFX_POINT], const end[GFX_POINT], color0, color1);
463native GFX_setLinearGradientShaderXY(x0, y0, x1, y1, color0, color1);
464/*
465 * Inputs
466 * * start or (xs, ys) - coordinates of the fill starting point
467 * * end or (xe, ye) - coordinates of the fill ending point
468 * * color0 - a color in ARGB8888 format to start fill with
469 * * color1 - a color in ARGB8888 format to end fill with
470 * History
471 * * v6.0 - added primitives shading
472 ******/
473
474 /****n* PawnLibs/graphics/GFX_setRadialGradientShader
475 * Summary
476 * Fill next primitives with radial gradient from a given point with radius
477 * and from a given color to another one.
478 * Synopsis
479 */
480native GFX_setRadialGradientShader(const center[GFX_POINT], radius, color0, color1);
481native GFX_setRadialGradientShaderXY(x, y, radius, color0, color1);
482/*
483 * Inputs
484 * * center or (x, y) - coordinates of the fill center
485 * * radius - radius of the fill
486 * * color0 - a color in ARGB8888 format to start fill with
487 * * color1 - a color in ARGB8888 format to end fill with
488 * History
489 * * v6.0 - added primitives shading
490 ******/
491
492/****n* PawnLibs/graphics/GFX_removeShader
493 * Summary
494 * Do not use shading in next primitives.
495 * Synopsis
496 */
497native GFX_removeShader();
498/*
499 * Inputs
500 * History
501 * * v6.0 - added primitives shading
502 ******/
503
504/****n* PawnLibs/graphics/GFX_drawParticles
505 * Summary
506 * Draw particle system with given parameters.
507 * Synopsis
508 */
509native GFX_drawParticles(const center[GFX_POINT], opacity, colorKey, angle, id, const particle[GFX_PARTICLE], const emission[GFX_EMISSION], time);
510native GFX_drawParticlesXY(x, y, opacity, colorKey, angle, id, const particle[GFX_PARTICLE], const emission[GFX_EMISSION], time);
511/*
512 * Description
513 * TBD: create extended description how to use a particle system.
514 * Inputs
515 * * center or (x, y) - coordinates of the (TBD: clarify which center) center
516 * to draw
517 * * opacity - opacity of the entire particle system, 0 is fully transparent
518 * * colorKey - transparent background color, pixels of that color will not be
519 * used for rendering, it is useful for image with color format without
520 * alpha channel, e.g. RGB565
521 * * angle - clockwise rotation angle in degrees
522 * * id - an ID of the assets image to use as a particle
523 * * particle - a particle parameters
524 * * emission - a particle emission parameters
525 * * time - TBD: check
526 * See also
527 * * GFX_POINT
528 * * GFX_PARTICLE
529 * * GFX_EMISSION
530 * History
531 * * v5.0 - added GFX_drawParticlesXY() alias, color argument clarified
532 ******/
533
534/****n* PawnLibs/graphics/GFX_drawQrCode
535 * Summary
536 * Generate and draw QR-code for a given text string.
537 * Synopsis
538 */
539native GFX_drawQrCode(const center[GFX_POINT], size, color0, color1, angle, id, const text[]);
540native GFX_drawQrCodeXY(x, y, size, color0, color1, angle, id, const text[]);
541/*
542 * Description
543 * Supported version 2 which is limited by 32 characters of input.
544 * Inputs
545 * * center or (x, y) - coordinates of the resulting image of the QR-code to
546 * draw
547 * * size - size of the individual square representing a single bit in the
548 * encodeded text string
549 * * color0 - color of squares representing zeroes in the ARGB8888 format
550 * * color1 - color of squares representing ones in the ARGB8888 format
551 * * angle - clockwise rotation angle in degrees
552 * * id - an ID of resulting image to distinguish different codes on the same
553 scene, starts from 0
554 * * text - text string to encode and draw, maximum size is 256 characters
555 * See also
556 * * GFX_POINT
557 * History
558 * * v6.0 - added
559 ******/
560
561/****n* PawnLibs/graphics/GFX_render
562 * Summary
563 * Start rendering process.
564 * Synopsis
565 */
566native GFX_render();
567/*
568 * See also
569 * * GFX_setRenderTarget()
570 * * GFX_bakeImage()
571 ******/
572
573/****n* PawnLibs/graphics/GFX_cacheImages
574 * Summary
575 * Force platform to cache application images.
576 * Synopsis
577 */
578native GFX_cacheImages(imageList[], size = sizeof(imageList));
579/*
580 * Description
581 * Platform automatically reads and caches images from flash when the
582 * application draws an image. Flash operations are synchronous and may cause
583 * delays especially when reading large portions of data. To prevent the
584 * application from lags it is possible to cache image data in advance.
585 * However if application requests to draw a non-cached image and there is not
586 * enough memory then oldest accessed images will be removed from cache. Also
587 * there is a limit of 256 for a total number of cached images.
588 * Inputs
589 * * imageList - array with IDs of images to cache
590 * * size - size of imageList array
591 * Return value
592 * Number of cached images or negative value if an error happened. Error
593 * codes:
594 * * -1 invalid function arguments count
595 * * -2 invalid imageList array
596 * See also
597 * * GFX_clearCache()
598 * History
599 * * v5.0 - moved from appCtrl module to graphics
600 ******/
601
602/****n* PawnLibs/graphics/GFX_clearCache
603 * Summary
604 * Clear all cached images.
605 * Synopsis
606 */
607native GFX_clearCache();
608/*
609 * Description
610 * Oldest accessed image cache will be automatically freed if there is not
611 * enough memory to cache a new image. This function forces this process, e.g.
612 * when switch game levels.
613 * See also
614 * * GFX_cacheImages()
615 * * GFX_removeBakedImage()
616 ******/
617
618/****n* PawnLibs/graphics/GFX_removeBakedImage
619 * Summary
620 * Remove specified baked image from cache.
621 * Synopsis
622 */
623native GFX_removeBakedImage(id);
624/*
625 * Description
626 * Baked images do not automatically invalidate. This function allows to
627 * remove any baked image from cache to save some space.
628 * Inputs
629 * * id - an ID of the baked image to remove from cache
630 * See also
631 * * GFX_clearCache()
632 * * GFX_bakeImage()
633 * History
634 * * v6.0 - added
635 ******/
636
637/****n* PawnLibs/graphics/GFX_getAssetsCount
638 * Summary
639 * Get the total count of graphic assets.
640 * Synopsis
641 */
642native GFX_getAssetsCount();
643/*
644 * Return value
645 * Number of graphic assets.
646 * History
647 * * v6.0 - added
648 ******/
649
650/****f* PawnLibs/graphics/GFX_fromARGB8888
651 * Summary
652 * Returns a hexadecimal value of a color constructed from the channel
653 * components.
654 * Synopsis
655 */
656stock GFX_fromARGB8888(a, r, g, b)
657/*
658 * Inputs
659 * * a - the alpha channel, valid values are 0 through 255
660 * * r - the red channel, valid values are 0 through 255
661 * * g - the green channel, valid values are 0 through 255
662 * * b - the blue channel, valid values are 0 through 255
663 * Return value
664 * The hexadecimal value of a color constructed from the channel components.
665 * See also
666 * * GFX_toARGB8888()
667 * History
668 * * v5.0 - created
669 * Source
670 */
671{
672 return (a & 0xFF) << 24 | (r & 0xFF) << 16 | (g & 0xFF) << 8 | (b & 0xFF);
673}
674/******/
675
676/****f* PawnLibs/graphics/GFX_toARGB8888
677 * Summary
678 * Returns channel values of a color in the hexadecimal format.
679 * Synopsis
680 */
681stock GFX_toARGB8888(value, &a, &r, &g, &b)
682/*
683 * Inputs
684 * * value - the hexadecimal value of the color
685 * Outputs
686 * * a - the alpha channel
687 * * r - the red channel
688 * * g - the green channel
689 * * b - the blue channel
690 * See also
691 * * GFX_fromARGB8888
692 * History
693 * * v5.0 - created
694 * Source
695 */
696{
697 a = value & 0xFF000000;
698 r = value & 0x00FF0000;
699 g = value & 0x0000FF00;
700 b = value & 0x000000FF;
701}
702/******/
703
704
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.
Context Rail

Related nodes

fixed.inc
Source / SDK 6.1 / Pawn / Core
leaderboard.inc
Source / SDK 6.1 / Pawn / Core
log.inc
Source / SDK 6.1 / Pawn / Core
math.inc
Source / SDK 6.1 / Pawn / Core
Previous Node
fixed.inc
Source / SDK 6.1 / Pawn / Core
Next Node
leaderboard.inc
Source / SDK 6.1 / Pawn / Core