Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by M_D. 04/26/24 20:22
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (PeroPero), 788 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Draw var on texture #387878
11/24/11 22:48
11/24/11 22:48
Joined: Sep 2009
Posts: 496
P
Progger Offline OP
Senior Member
Progger  Offline OP
Senior Member
P

Joined: Sep 2009
Posts: 496
To make a speedometer i want to draw a var on a texture but how to do it is there some function to do it. Or do i have to write the function on my own?
Thanks for reading and answering laugh
PS:I also know some workarounds like changing the texture
But i want to learn something new so is there a function for it

WFG Progger

Last edited by Progger; 11/24/11 22:53.

asking is the best Way to get help laugh laugh laugh
Re: Draw var on texture [Re: Progger] #387879
11/24/11 23:00
11/24/11 23:00
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
May be adding additional view with panel, which will be visible only on it? Just a quick tought laugh


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Draw var on texture [Re: 3run] #387881
11/24/11 23:11
11/24/11 23:11
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
You can use a panel (with digits) and panel.target_map = texture_pointer;


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Draw var on texture [Re: Superku] #388026
11/27/11 10:59
11/27/11 10:59
Joined: Sep 2009
Posts: 496
P
Progger Offline OP
Senior Member
Progger  Offline OP
Senior Member
P

Joined: Sep 2009
Posts: 496
Thank you Ssuperku i tried it but when i used it the skin of the model i used moved to the right side


asking is the best Way to get help laugh laugh laugh
Re: Draw var on texture [Re: Progger] #388073
11/27/11 22:36
11/27/11 22:36
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
I'm sorry, I don't understand your problem. Try the following code (tested) with your own model:
Code:
///////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////

PANEL* panel =
{
	digits(20,20,"Frames: %f",*,1,total_frames);
	flags = SHOW | SHADOW;
}

void main()
{
	fps_max = 60;
	video_mode = 9;
	level_load(NULL);
	you = ent_create("object.mdl",vector(200,0,0),NULL);
	panel.target_map = bmap_for_entity(you,0);
}



The panel is updated and painted every frame but the entity's texture won't be cleared/ reloaded automatically, thus you will see old values "below" the current value. You can either reload the texture every frame (could be slow, I guess), render a background panel (again with target_map, lower layer value) into the same bitmap or simply set panel's bmap to a background image.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Draw var on texture [Re: Superku] #388738
12/07/11 08:17
12/07/11 08:17
Joined: Dec 2011
Posts: 1
S
sukseed Offline
Guest
sukseed  Offline
Guest
S

Joined: Dec 2011
Posts: 1

Last edited by sukseed; 12/08/11 23:00.

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