• Welcome to PiBoSo Official Forum. Please login or sign up.
 
April 24, 2019, 04:14:24 pm

News:

World Racing Series beta13 available! :)


draw a number on the scree

Started by sdecorme, December 16, 2016, 06:42:08 am

Previous topic - Next topic

sdecorme

Hi,
I need to draw a number on the screen during playing. In the dll I've found the draw function, where can I find informations about it ?
Thanks you

HornetMaX

Everything you need is in the example code (gpb_example.c).
Look ad DrawInit(), Draw() plus the structures SPluginString_t and SPluginQuad_t.
You can find one font file in one of GPB's .pkz (can't rememebr wich one exactly, but somewhere there's a main.fnt) or in my plugin data directory.

sdecorme

Hi,
I've found all the function in the sample, and the font in your code.
I've never made code with graphic parameters and I don't understand how to use the differrent structure.
I just need to write 10 in big in red  in the middle of the screen.

HornetMaX

Either you create a quad and add a sprite to it (it's just a .tga file) or you use a string and sprintf.

sdecorme

I will look to g??gle to see what is a quad or a sprite.

HornetMaX

Quote from: sdecorme on December 16, 2016, 12:48:18 pm
I will look to g??gle to see what is a quad or a sprite.

A quad is "a rectangle on the screen": you can fill it with a fixed color, or put a sprite (a .tga image) on it.

For GPB, a quad is SPluginQuad_t and a (graphical) string is SPluginString_t.

You don't need google.

sdecorme

Ok I will look at it tonight.
Thanks you