Gamestudio Links
Zorro Links
Newest Posts
Lapsa's very own thread
by Lapsa. 06/08/26 22:41
Stooq now requires an API key
by VHX. 06/08/26 20:14
ZorroGPT
by TipmyPip. 06/06/26 12:36
Zorro 3.01 recoded MMI function issue
by TipmyPip. 06/04/26 05:44
SGT_FW
by Aku_Aku. 05/31/26 11:05
Issues resuming trades on Demo account
by Martin_HH. 05/22/26 13:31
XTB
by pr0logic. 05/18/26 12:27
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (AndrewAMD), 2,372 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Seraphinang, Koti, curry, DeepxKalsi, Samed
19219 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: view backgroundpicture possible? [Re: Rei_Ayanami] #392815
01/28/12 00:32
01/28/12 00:32
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
I just tried it. Works like a charm on my end.
Code:
#include <acknex.h>

PANEL* background =
{
	bmap = "background.bmp";
	flags = SHOW | FILTER;
	layer = -1;
}

void main()
{
	wait(1);
	level_load(NULL);	
	wait(1);
	vec_fill(&sky_color,0);
	ent_create(SPHERE_MDL,vector(128,0,0),NULL);
	background->scale_x = screen_size.x / background.size_x;
	background->scale_y = screen_size.y / background.size_y;
}




Always learn from history, to be sure you make the same mistakes again...
Re: view backgroundpicture possible? [Re: Uhrwerk] #392826
01/28/12 12:49
01/28/12 12:49
Joined: Oct 2004
Posts: 900
Lgh
rojart Offline
User
rojart  Offline
User

Joined: Oct 2004
Posts: 900
Lgh
Here is another code, if you need a dynamic backgrounds.

Code:
#include <acknex.h>

#define PRAGMA_PATH "%EXE_DIR%\samples"
#define PRAGMA_PATH "%EXE_DIR%\templates\images\"

ENTITY* eBackgroundH =
{
	type = "horizon.pcx";
	layer = 3;
	scale_x = .4;
	tilt = -5;
	flags2 = SKY | CYLINDER | SHOW;
}

ENTITY* eBackgroundW =
{
	type = "wald2.tga";
	layer = 4;
	scale_x = .15;
	tilt = -5;
	flags2 = SKY | CYLINDER | SHOW;
}

function main()
{
	camera.arc = 100;
	video_set(800, 600, 32, 2);
	level_load("small.hmp");
	while(1)
	{	
		camera.pan -= .2 * time_frame;
		wait(1);
	}
}




Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P
Re: view backgroundpicture possible? [Re: rojart] #392888
01/29/12 11:29
01/29/12 11:29
Joined: Aug 2008
Posts: 394
Germany
Benni003 Offline OP
Senior Member
Benni003  Offline OP
Senior Member

Joined: Aug 2008
Posts: 394
Germany
thank's for your answer's, but this is not what I want to do.
I uploaded an example:



Re: view backgroundpicture possible? [Re: Benni003] #393050
01/30/12 22:01
01/30/12 22:01
Joined: Oct 2004
Posts: 900
Lgh
rojart Offline
User
rojart  Offline
User

Joined: Oct 2004
Posts: 900
Lgh
ok, something like this?

Code:
#include <default.c>

#define PRAGMA_PATH "%EXE_DIR%\templates\images"

#define COLOR_YELLOW vec_add(COLOR_GREEN,COLOR_RED)

ENTITY* eView =
{
	type = "schaden.tga";
	layer = 3;
	scale_x = 2;
	scale_y = 2;
	x = 400;
	flags2 = SHOW;
}

function main()
{
	vec_set(sky_color,COLOR_RED);	video_set(720, 480, 32, 2);
	
	level_load("");

	PANEL* p1 = pan_create(NULL,2);
	pan_setstring(p1,0,30,30,font_create("Arial#20b"),str_create("PANEL 1"));	
	pan_setwindow(p1,0,20,20,330,440, bmap_fill(bmap_createblack(64,64,32),COLOR_BLUE,100), 0, 0);
	pan_setcolor(p1,1,1,COLOR_BLACK); set(p1,SHOW); 
	
	PANEL* p2 = pan_create(NULL,4);
	pan_setstring(p2,0,410,30,font_create("Arial#20b"),str_create("PANEL 2"));	
	pan_setwindow(p2,0,400,20,300,440, bmap_fill(bmap_createblack(64,64,32),COLOR_YELLOW,100), 0, 0);
	pan_setcolor(p2,1,1,COLOR_BLACK); set(p2,SHOW);

}




Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P
Re: view backgroundpicture possible? [Re: rojart] #393054
01/30/12 22:41
01/30/12 22:41
Joined: Aug 2008
Posts: 394
Germany
Benni003 Offline OP
Senior Member
Benni003  Offline OP
Senior Member

Joined: Aug 2008
Posts: 394
Germany
Thank you guys a lot! I'm working now for some years with 3dgs, but I didn't know that it's possible to set a Entity wich is no sky in other layer than the camera.

Page 2 of 2 1 2

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

Gamestudio download | 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