Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (vicknick, dr_panther, VoroneTZ), 1,255 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
draw_target #206757
05/15/08 14:40
05/15/08 14:40
Joined: Jul 2006
Posts: 783
London, UK
sheefo Offline OP
User
sheefo  Offline OP
User

Joined: Jul 2006
Posts: 783
London, UK
Is it possible to implement a "draw_target" function which you can pass a BMAP* as a render target, then all calls to 'draw_' functions will be rendered onto the BMAP*. If you pass NULL to the function it resets to normal rendering.

Code:
void draw_target(BMAP*);
//...
draw_target(pRenderTarget); // Set a render target
draw_line(vector(x1,y1,0),NULL,100);
draw_line(vector(x2,y1,0),_vec(0,0,255),100);
draw_line(vector(x2,y2,0),_vec(0,0,255),100);
draw_line(vector(x1,y2,0),_vec(0,0,255),100);
draw_line(vector(x1,y1,0),_vec(0,0,255),100);
draw_target(NULL); // Reset render target


Re: draw_target [Re: sheefo] #206881
05/16/08 10:13
05/16/08 10:13
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Yes, this was already suggested some time ago and is on my list.

Re: draw_target [Re: jcl] #206909
05/16/08 13:19
05/16/08 13:19
Joined: Jul 2006
Posts: 783
London, UK
sheefo Offline OP
User
sheefo  Offline OP
User

Joined: Jul 2006
Posts: 783
London, UK
Cool! Thanks! smile


Moderated by  aztec, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1