Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/20/24 06:09
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (henrybane, flink, Edgar_Herrera), 726 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Stupid question about one strange thing #283731
08/09/09 18:12
08/09/09 18:12
Joined: Jul 2009
Posts: 19
Poland
V
Varen Offline OP
Newbie
Varen  Offline OP
Newbie
V

Joined: Jul 2009
Posts: 19
Poland
Im making hp bar atm using "window" command. Thats how it looks:

Code:
var altitude = 0; 

PANEL* first_pan =
{
  layer=1;
window (0, 55, 64, 64, "hp.tga", 0, altitude);
flags = SHOW;
}

PANEL* hh =
{
 bmap = "Dc_02Lion.tga";
 flags= SHOW;
 layer=2;
}

PANEL* srodek =
{
	bmap="srodek.tga";
	pos_x=7;
	pos_y=57;
	flags=SHOW;
	layer=0;
}



Height.tga is health image, Dc_02Lion.tga is a kind of frame over it and srodek.tga is the background. The code looks ok and everythings is ok as long as im using height.pcx instead of hp.tga (i mean the example from workshop). If i place hp.tga at there and changing dx and dy for it, the altitude var stops reacting for its change. I change it for 20, -20, 50, 0, and hp.tga bitmap is still at the same place. What am i doing wrong? Why height.pcx works and my image doesnt? (i tried hp.pcx too)

Re: Stupid question about one strange thing [Re: Varen] #283732
08/09/09 18:18
08/09/09 18:18
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
I suspect that your file does not have the right format.
Would you please be so kind to post both images here? (hp.tga and height.pcx)

Re: Stupid question about one strange thing [Re: Xarthor] #283734
08/09/09 18:26
08/09/09 18:26
Joined: Jul 2009
Posts: 19
Poland
V
Varen Offline OP
Newbie
Varen  Offline OP
Newbie
V

Joined: Jul 2009
Posts: 19
Poland

Height.pcx





hp.tga

Re: Stupid question about one strange thing [Re: Varen] #283736
08/09/09 18:44
08/09/09 18:44
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Well you got a 64x64 graphic and want to display a cutout of it which is what size?
That it works with the height.pcx file has this reason:
- The cutout is smaller than the actual image file and thus you can display a small part of it and "scroll" over the image.

Here is the important quote from the workshop:
Quote:

Conclusion: When you create a window, you will only see a small part of the bitmap used for it. Change variable_x or variable_y (altitude in our script) and the long bitmap will be shifted along the x or y axis, displaying other parts of the bitmap on the screen. The size of the cutout window in pixels (the visible part of the bitmap) is given by size_x and size_y.


Using window you cannot make the cutout larger or smaller but only move its position about the background image (height.pcx for example)

Re: Stupid question about one strange thing [Re: Xarthor] #283738
08/09/09 18:52
08/09/09 18:52
Joined: Jul 2009
Posts: 19
Poland
V
Varen Offline OP
Newbie
Varen  Offline OP
Newbie
V

Joined: Jul 2009
Posts: 19
Poland
U mean such image should work?



It doesnt

Re: Stupid question about one strange thing [Re: Varen] #283740
08/09/09 18:58
08/09/09 18:58
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Well yes it _should_ work. Its easy saying "it doesn't", so could you please tell us which values you used to get it to work?

Re: Stupid question about one strange thing [Re: Xarthor] #283743
08/09/09 19:24
08/09/09 19:24
Joined: Jul 2009
Posts: 19
Poland
V
Varen Offline OP
Newbie
Varen  Offline OP
Newbie
V

Joined: Jul 2009
Posts: 19
Poland
Code:
var altitude =0; 


PANEL* first_pan =
{
  layer=1;
window (0, 55, 64, 400, "hp3.jpg", 0, altitude);
flags = SHOW;
}



Effect:




________________________________________
________________________________________

Code:
var altitude =60; 


PANEL* first_pan =
{
  layer=1;
window (0, 55, 64, 400, "hp3.jpg", 0, altitude);
flags = SHOW;
}



Effect:




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