RISC OS Open
A fast and easily customised operating system for ARM devices
ROOL
Home | News | Downloads | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account

ColourTrans_SelectTable (changes)

Showing changes from revision #7 to #8: Added | Removed | Changed

ColourTrans
» SWI Calls
» ColourTrans_SelectTable

ColourTrans_SelectTable

(SWI &40740)
Entry
R0 Source mode / sprite area
R1 Source palette pointer / sprite
R2 Destination mode, or -1 for current mode
R3 Destination palette pointer, or
  -1 for current palette, or
  0 for default for the mode
R4 Pointer to buffer, or 0 to return length
R5 Select Table Flags (only used if R0 & R1 indicate a sprite)
R6 Pointer to transfer workspace (R12) (if R5 valid and bit 2 of R5 is set)
R7 Pointer to transfer function (if R5 valid and bit 2 of R5 is set)
Exit
R0 Preserved
R1 Preserved
R2 Preserved
R3 Preserved
R4 Required size of buffer (if R4=0 on entry), or preserved
R5 Preserved
R6 Preserved
R7 Preserved

Use

The purpose of this call is to set up a translation table in a buffer that is used by scaled sprite plotting.

Notes

Unlike ColourTrans_GenerateTable this SWI call only uses R5-R7 if R0 & R1 describe a sprite. For mode numbers, mode descriptors, sprite mode words, and the current mode (-1), R5-R7 are ignored and the flags word is treated as 0.

R6 and R7 are only used if R5 is used and bit 2 of R5 is set.

Sometimes ColourTrans may decide that no translation table is necessary (e.g. source and dest have the same pixel format and palette), in which case the “measure table size” form of the call will return with R4=0. Take care to check for this before allocating memory and asking for the table to be filled in.

See also

  • ColourTrans_GenerateTable
  • Select Table Flags
  • ColourTrans mode identification
Revised on April 13, 2017 14:15:57 by Jeffrey Lee (213) (85.255.232.59)
Edit | Back in time (7 revisions) | Hide changes | History | Views: Print | Source | Linked from: Select Table Flags, ColourTrans_GenerateTable, ColourTrans Miscellaneous, ColourTrans SWI Calls, OS_SpriteOp 36, ColourTrans Transfer Function, ColourTrans mode identification, OS_SpriteOp Scaled/Transformed Plot Flags, OS_SpriteOp 56, OS_SpriteOp 52, Colour Vector SWI Numbers

Search the Wiki

Social

Follow us on and

ROOL Store

Buy RISC OS Open merchandise here, including SD cards for Raspberry Pi and more.

Donate! Why?

Help ROOL make things happen – please consider donating!

RISC OS IPR

RISC OS is an Open Source operating system owned by RISC OS Developments Ltd and licensed primarily under the Apache 2.0 license.

Navigation

  • Home Page
  • All Pages
  • Recently Revised
  • Authors
  • Feeds
Site design © RISC OS Open Limited 2018 except where indicated
The RISC OS Open Instiki theme is based on Insitki's default layout

Valid XHTML 1.0  |  Valid CSS

Instiki 0.19.1(MML+)
This site runs on Rails

Hosted by Arachsys