Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.acorn.programmer > #834

Re: Sprite Loading / Plotting SWIs and lotting in any colour depth

From Martin Wuerthner <spamtrap@mw-software.com>
Newsgroups comp.sys.acorn.programmer
Subject Re: Sprite Loading / Plotting SWIs and lotting in any colour depth
Date 2011-10-04 12:36 +0200
Organization MW Software
Message-ID <e78fd91c52.martin@bach.planiverse.com> (permalink)
References <23903224.727.1317553440459.JavaMail.geo-discussion-forums@yqcr11> <6868509.667.1317554148688.JavaMail.geo-discussion-forums@yqbr29> <18723939.3923.1317668986907.JavaMail.geo-discussion-forums@yqlb4> <4e8a1091$0$290$14726298@news.sunsite.dk>

Show all headers | View raw


In message <4e8a1091$0$290$14726298@news.sunsite.dk>
          Alex Macfarlane Smith <nospam@archifishal.co.uk> wrote:

> On 03/10/2011 20:09, Michael wrote:
>> (Edit Snip)
>>
>>>> How do I plot a sprite of 16M Colours in a lower screen colour depth?
>>>> (256, 32K, 64K)

> [...]
> I'm pretty sure OS_SpriteOp's only work on the modes of the sprites they
> were originally created in, so you can't (sensibly) plot a 32K colour
> sprite in a 16M colour mode. But I don't have access to any useful
> documentation at the moment to confirm that.

No, that is incorrect. The modern SpriteOp reason codes (most notably 
SpriteOp 56) work in all screen modes. There are some outdated 
SpriteOp reason codes that only work if you are in the same screen 
mode (e.g., SpriteOp 34, which Michael was using), but they are of 
little use in a desktop Wimp program.

Plotting a sprite to any screen mode requires using ColourTrans to 
generate a pixel translation table. SpriteOp reason codes that do not 
take a pixel translation table do not support plotting to arbitrary 
screen modes.

It is a mystery to me why there is no "plot this sprite to the screen" 
SWI call in RISC OS. There is one for Drawfiles, which are a hundred 
times more complex (and encompass sprites). So, ironically, the 
easiest way to plot a given sprite to any mode is to prepend a 
Drawfile header plus a Drawfile sprite object header and call 
"Drawfile_Render".

On Select systems, there is the ImageFileRender API, which is even 
easier to use, but means the program only runs on Select.

-- 
Martin
---------------------------------------------------------------------
Martin Wuerthner         MW Software      http://www.mw-software.com/
        RISC OS Software for Design, Printing and Publishing
---------------------------------------------------------------------

Back to comp.sys.acorn.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Sprite Loading / Plotting SWIs and lotting in any colour depth Michael <michaelremerton@gmail.com> - 2011-10-02 04:04 -0700
  Re: Sprite Loading / Plotting SWIs and lotting in any colour depth Michael <michaelremerton@gmail.com> - 2011-10-02 04:15 -0700
    Re: Sprite Loading / Plotting SWIs and lotting in any colour depth Michael <michaelremerton@gmail.com> - 2011-10-03 12:09 -0700
      Re: Sprite Loading / Plotting SWIs and lotting in any colour depth Alex Macfarlane Smith <nospam@archifishal.co.uk> - 2011-10-03 20:44 +0100
        Re: Sprite Loading / Plotting SWIs and lotting in any colour depth Michael <michaelremerton@gmail.com> - 2011-10-03 13:24 -0700
          Re: Sprite Loading / Plotting SWIs and lotting in any colour depth Martin Bazley <martin.bazley@blueyonder.co.uk> - 2011-10-03 21:45 +0100
        Re: Sprite Loading / Plotting SWIs and lotting in any colour depth Martin Wuerthner <spamtrap@mw-software.com> - 2011-10-04 12:36 +0200
          Re: Sprite Loading / Plotting SWIs and lotting in any colour depth Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-10-04 18:33 +0200
            Re: Sprite Loading / Plotting SWIs and lotting in any colour depth Martin Wuerthner <spamtrap@mw-software.com> - 2011-10-04 20:25 +0200
            Re: Sprite Loading / Plotting SWIs and lotting in any colour depth "Ste (news)" <steve@revi11.plus.com> - 2011-11-02 00:25 +0000
              Re: Sprite Loading / Plotting SWIs and lotting in any colour depth Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-11-02 19:05 +0100
                Re: Sprite Loading / Plotting SWIs and lotting in any colour depth druck <news@druck.freeuk.com> - 2011-11-02 21:21 +0000
      Re: Sprite Loading / Plotting SWIs and lotting in any colour depth Martin Bazley <martin.bazley@blueyonder.co.uk> - 2011-10-03 21:41 +0100
        Re: Sprite Loading / Plotting SWIs and lotting in any colour depth Michael <michaelremerton@gmail.com> - 2011-10-03 18:22 -0700
          Re: Sprite Loading / Plotting SWIs and lotting in any colour depth Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-10-04 20:07 +0200
    Re: Sprite Loading / Plotting SWIs and lotting in any colour depth chrisbazley@bigfoot.com - 2011-10-06 21:03 -0700
      Re: Sprite Loading / Plotting SWIs and lotting in any colour depth Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-10-07 07:04 +0200

csiph-web