Gamestudio Links
Zorro Links
Newest Posts
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
Trading Journey
by howardR. 04/24/24 20:04
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, EternallyCurious, Petra, 1 invisible), 764 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: Colourful TEXT [Re: lemming] #423301
05/27/13 18:19
05/27/13 18:19
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
if you have a two-digit hex value the maximum number is (16 * 16 + 16);
So if you divide 'h' by this value, you have it in range [0-1].

The I just added a '* 256' to get to the default [0-255] range.

...and the '/ 2' is somehow necessary, I don't know why.

Edit: make sure you read Wiseguy's post, we wrote something at the same time.

Last edited by Kartoffel; 05/27/13 18:20.

POTATO-MAN saves the day! - Random
Re: Colourful TEXT [Re: Kartoffel] #423306
05/27/13 18:38
05/27/13 18:38
Joined: Nov 2011
Posts: 274
de
lemming Offline OP
Member
lemming  Offline OP
Member

Joined: Nov 2011
Posts: 274
de
I have to carefully read and think about your posts. This kinda throws an unhandled exception in my brain. What you say make sense, but at the same time not. Because I sure have 16 values, but F is 15, so if I have two F (maximum) it's 15*16+15=255. If I have to zeros (minimum) it's 0*16+0=0.

For the code, I'd be happy if you send it to me, then I can update it. This whole Open-Source-Process is still new to me. laugh

Re: Colourful TEXT [Re: lemming] #423309
05/27/13 18:57
05/27/13 18:57
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
now I don't understand it either crazy

I think the problem is the way 3dgs colors texts... and I just made a little workaround for that


POTATO-MAN saves the day! - Random
Re: Colourful TEXT [Re: Kartoffel] #423364
05/28/13 14:44
05/28/13 14:44
Joined: Nov 2011
Posts: 274
de
lemming Offline OP
Member
lemming  Offline OP
Member

Joined: Nov 2011
Posts: 274
de
So, I did a test with my unchanged original hextovar function and the following string:
Code:
"[clff0000]ff0000 [cl00ff00]00ff00 [cl0000ff]0000ff [clffffff]ffffff [cl22ff33]22ff33 [cl123456]123456 [cl2234dc]2234dc [cldcf1ac]dcf1ac [cl103004]103004"



I made a screenshot and loaded it into gimp to check all the colours. And they were all correct.



So I donno what's happening in your script, Kartoffel. Can you also do a test like that?

Re: Colourful TEXT [Re: lemming] #423370
05/28/13 19:38
05/28/13 19:38
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
umm, I used a bitmap-font, maybe thats it? (just use a completely white image)


POTATO-MAN saves the day! - Random
Re: Colourful TEXT [Re: Kartoffel] #423379
05/28/13 20:51
05/28/13 20:51
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
That's the result I had with this bmap-font I made:




(I'm always increasing like: 11, 22, 33, 44, ...)


POTATO-MAN saves the day! - Random
Re: Colourful TEXT [Re: Kartoffel] #423380
05/28/13 21:46
05/28/13 21:46
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
The color of the bitmap font should be 0x808080. Then it will work.


Always learn from history, to be sure you make the same mistakes again...
Re: Colourful TEXT [Re: Uhrwerk] #423381
05/28/13 21:48
05/28/13 21:48
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
oh, well I guess that's the problem smirk
(should be in the manual...)


POTATO-MAN saves the day! - Random
Re: Colourful TEXT [Re: Kartoffel] #423455
05/30/13 08:10
05/30/13 08:10
Joined: Nov 2011
Posts: 274
de
lemming Offline OP
Member
lemming  Offline OP
Member

Joined: Nov 2011
Posts: 274
de
Okay, thank you. I will also add this to the readme.

@Kartoffel, I'm still interested in your functions. wink

Re: Colourful TEXT [Re: lemming] #428058
08/17/13 06:19
08/17/13 06:19
Joined: May 2008
Posts: 257
D
djfeeler Offline
Member
djfeeler  Offline
Member
D

Joined: May 2008
Posts: 257
Thanks for this contribution ^^

I made this function just to not display the text. You can display it in the code.

Code:
void cltext_reset(CLTEXT* cltext)
{
	CLLIST* current = cltext.texts;
	
	do
	{
		reset(current.element, SHOW | LIGHT | TRANSLUCENT);
		if (current.next != NULL) current = current.next;
	}while (current.next != NULL);	
}


Last edited by djfeeler; 08/21/13 04:35.
Page 2 of 3 1 2 3

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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