Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.acorn.programmer > #162
| From | Martin Wuerthner <spamtrap@mw-software.com> |
|---|---|
| Newsgroups | comp.sys.acorn.programmer |
| Subject | Re: Weird scaling bug - any ideas ? |
| Date | 2011-04-06 14:50 +0200 |
| Organization | MW Software |
| Message-ID | <9881afbf51.martin@bach.planiverse.com> (permalink) |
| References | (2 earlier) <65056d5d-b1f8-4a01-82be-6660a4c7b1d2@v8g2000yqb.googlegroups.com> <4d9bdca5$0$7701$ba4acef3@reader.news.orange.fr> <123615df-90b2-4419-b59a-9e9e87301bfe@m7g2000vbq.googlegroups.com> <51bf9f5c32News03@avisoft.f9.co.uk> <8f897550-9fd7-4bb7-9765-5f0da2c786d4@a26g2000vbo.googlegroups.com> |
In message <8f897550-9fd7-4bb7-9765-5f0da2c786d4@a26g2000vbo.googlegro
ups.com>
Martin Hansen <mhh@shrewsbury.org.uk> wrote:
> Eureeka !
> I think I've sorted it.
> It is to do with that OS-Sprite_Op 60 and the
> save area, as Martin Avison suggests.
> Adopting a minimalist approach, if I add a local variable savearea% as
> follows the problem vanishes.
Yes, that fixes the problem that you did not pass the original
context's save area when switching back, which meant that the original
VDU state could not be restored.
> WHILE more%
> SYS "OS_SpriteOp", 512+60, usa2%, vblue%, 0 TO , , partial% , savearea
> %
> $scof% = "v"+STR$(5*(barlength%+1)
> SYS "OS_SpriteOp", 256+24, usa2%, scof% TO , , addscof%
> SYS "OS_SpriteOp", 512+28, usa2%, addscof%
> SYS "OS_SpriteOp", 512+60, usa2%, partial%, savearea%
> SYS "Wimp_GetRectangle", 0, scrap% TO more%
> ENDWHILE
> This has sorted the problem on the Iyonix.
Maybe, but
a) The above code is still wrong. As has been pointed out you should
pass all three values that are returned to you by OS_SpriteOp 60 into
your call to switch back. You are still passing your own sprite area
pointer in the call that switches back.
b) You should not call any non-X SWIs while output is switched. You
must check for errors and switch back if there is an error, else any
error is likely to crash the machine.
c) It is still completely unclear what the above code is meant to
achieve in the first place. You tell the Wimp you want to update a
window, you go through the redraw loop, but you do not draw anything
to the window, so why go to all the trouble? Inside your "redraw"
loop, all you do is switch output to a sprite and plot some other
sprite into it.
--
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 | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Weird scaling bug - any ideas ? Martin Hansen <mhh@shrewsbury.org.uk> - 2011-04-05 12:28 -0700
Re: Weird scaling bug - any ideas ? Martin Wuerthner <spamtrap@mw-software.com> - 2011-04-05 21:59 +0200
Re: Weird scaling bug - any ideas ? Martin Hansen <mhh@shrewsbury.org.uk> - 2011-04-05 17:30 -0700
Re: Weird scaling bug - any ideas ? Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-04-06 05:23 +0200
Re: Weird scaling bug - any ideas ? Martin Hansen <mhh@shrewsbury.org.uk> - 2011-04-06 02:23 -0700
Re: Weird scaling bug - any ideas ? Martin <News03@avisoft.f9.co.uk> - 2011-04-06 10:53 +0100
Re: Weird scaling bug - any ideas ? Martin Hansen <mhh@shrewsbury.org.uk> - 2011-04-06 03:59 -0700
Re: Weird scaling bug - any ideas ? Martin Wuerthner <spamtrap@mw-software.com> - 2011-04-06 14:50 +0200
Re: Weird scaling bug - any ideas ? Martin Hansen <mhh@shrewsbury.org.uk> - 2011-04-06 09:31 -0700
Re: Weird scaling bug - any ideas ? Steve Fryatt <news@stevefryatt.org.uk> - 2011-04-06 18:19 +0100
Re: Weird scaling bug - any ideas ? Martin Wuerthner <spamtrap@mw-software.com> - 2011-04-07 13:14 +0200
Re: Weird scaling bug - any ideas ? Martin Hansen <mhh@shrewsbury.org.uk> - 2011-04-07 09:49 -0700
Re: Weird scaling bug - any ideas ? Rick Murray <heyrickmail-usenet@yahoo.co.uk> - 2011-04-06 14:23 +0200
Re: Weird scaling bug - any ideas ? Steve Fryatt <news@stevefryatt.org.uk> - 2011-04-06 18:20 +0100
Re: Weird scaling bug - any ideas ? Gerph <gerph@gerph.org> - 2011-04-09 05:06 -0700
csiph-web