Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (AndrewAMD, TipmyPip, VoroneTZ, Quad, 1 invisible), 688 guests, and 11 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 1 of 3 1 2 3
Panel below Entities #276862
07/06/09 20:07
07/06/09 20:07
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
I asked for a new function of panels here: Panel.layer = lower than ent => below ent!?

So i tried:

Code:
#include <acknex.h>
#include <default.c>


//========================================================================
BMAP* testbmap = "flatplane.tga";


//========================================================================
PANEL* test =
{
   layer = -1;
   bmap = testbmap;
   flags = SHOW;
}

//========================================================================

function main()
{
   fps_max = 60;
   video_mode = 8;
   level_load(NULL);
   wait(3);
   
   ent_create("cube.mdl", vector(0,0,0), NULL);
   
   camera.tilt = -50;
   camera.pan = 90;
   camera.z = 500;
   camera.x = 0;
   camera.y = -250;
}




but the panel is still shown ABOVE the model...

Do you know any way to show panels i want BELOW Entities?


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Panel below Entities [Re: Espér] #276876
07/06/09 21:10
07/06/09 21:10
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
I'd make screen entities but as Helghast points out negative layers work, perhaps you should wait for an example from him :p.


Click and join the 3dgs irc community!
Room: #3dgs
Re: Panel below Entities [Re: Joozey] #277132
07/07/09 21:57
07/07/09 21:57
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
ok.. while iw ait for the the other topic..

Another question:

How am i able to readout the bitmapname of a panel...?
I need the name to be written into a my.string1
Problem: There´re many Panels.. and i need the filename of every panel ^^.

Sylar said, i should use Structs.. but i´ve no clue how they work...
That´s what i tried at the moment:
Code:
//=================================================================================================================================
//                                                                                                                               //
//                                                     DAS MAINSCRIPT                                                            //
//                                                     ^^^^^^^^^^^^^^                                                            //
//                                                                                                                               //
//=================================================================================================================================
//                                                                                                                               //
//                                          EINBINDEN DER UNTERORDNER UND SCRIPTS                                                //
//                                          """""""""""""""""""""""""""""""""""""                                                //
//                                                                                                                               //
//=================================================================================================================================
#define PRAGMA_PATH "Graphics\Characters"


#include <acknex.h>
#include <default.c>

//=================================================================================================================================
//                                                                                                                               //
//                                                       FUNKTIONEN                                                              //
//                                                       """"""""""                                                              //
//                                                                                                                               //
//=================================================================================================================================
typedef struct 
{
	STRING* name;
	BMAP* bitmap;
} PANELMAP;

PANELMAP* mypanmap;


//=================================================================================================================================
//                                                                                                                               //
//                                                     DAS MAINSCRIPT                                                            //
//                                                     """"""""""""""                                                            //
//                                                                                                                               //
//=================================================================================================================================
function main()
{
	fps_max = 60;
	d3d_antialias = 9;
	video_set(1024,768,32,0);
	video_window(vector(10,10,NULL),NULL,48,"@-´-,-´-,-´-,-  NEVERTOLD  -,-`-,-`-,-`-@ ");
	screen_color.red   = 1;
	screen_color.green = 1;
	screen_color.blue  = 1;
	sky_color.red   = 1;
	sky_color.green = 1;
	sky_color.blue  = 1;
	level_load(NULL);
	wait(3);
	
	str_cpy(mypanmap.name, "Gegner_Weißer Drachenreiter_stehen.png");
	mypanmap.bitmap = bmap_create(mypanmap.name);
	
	
	
	PANEL* test = pan_create("bmap = mypanmap.bitmap; flags = SHOW;", 10);
	
	error(mypanmap.name);
}



But it only gives me an "E1513" Error..

Need help!!!

Last edited by Espér; 07/07/09 23:46.

Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Panel below Entities [Re: Espér] #277150
07/07/09 23:45
07/07/09 23:45
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
You can't read out the bitmap name of dynamically created bitmaps, I've requested this feature before without a positive respond.
For static bitmaps: bmap.link.name (as to read in the public header).


Click and join the 3dgs irc community!
Room: #3dgs
Re: Panel below Entities [Re: Joozey] #277151
07/07/09 23:46
07/07/09 23:46
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Sylar said, i should use Structs.. but i´ve no clue how they work...
That´s what i tried at the moment:
Code:
//=================================================================================================================================
//                                                                                                                               //
//                                                     DAS MAINSCRIPT                                                            //
//                                                     ^^^^^^^^^^^^^^                                                            //
//                                                                                                                               //
//=================================================================================================================================
//                                                                                                                               //
//                                          EINBINDEN DER UNTERORDNER UND SCRIPTS                                                //
//                                          """""""""""""""""""""""""""""""""""""                                                //
//                                                                                                                               //
//=================================================================================================================================
#define PRAGMA_PATH "Graphics\Characters"


#include <acknex.h>
#include <default.c>

//=================================================================================================================================
//                                                                                                                               //
//                                                       FUNKTIONEN                                                              //
//                                                       """"""""""                                                              //
//                                                                                                                               //
//=================================================================================================================================
typedef struct 
{
	STRING* name;
	BMAP* bitmap;
} PANELMAP;

PANELMAP* mypanmap;


//=================================================================================================================================
//                                                                                                                               //
//                                                     DAS MAINSCRIPT                                                            //
//                                                     """"""""""""""                                                            //
//                                                                                                                               //
//=================================================================================================================================
function main()
{
	fps_max = 60;
	d3d_antialias = 9;
	video_set(1024,768,32,0);
	video_window(vector(10,10,NULL),NULL,48,"@-´-,-´-,-´-,-  NEVERTOLD  -,-`-,-`-,-`-@ ");
	screen_color.red   = 1;
	screen_color.green = 1;
	screen_color.blue  = 1;
	sky_color.red   = 1;
	sky_color.green = 1;
	sky_color.blue  = 1;
	level_load(NULL);
	wait(3);
	
	str_cpy(mypanmap.name, "Gegner_Weißer Drachenreiter_stehen.png");
	mypanmap.bitmap = bmap_create(mypanmap.name);
	
	
	
	PANEL* test = pan_create("bmap = mypanmap.bitmap; flags = SHOW;", 10);
	
	error(mypanmap.name);
}



But it only gives me an "E1513" Error..

Need help!!!


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Panel below Entities [Re: Espér] #277152
07/07/09 23:51
07/07/09 23:51
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
You only have a pointer to your struct (PANELMAP* mypanmap;) and not the actual object. So you want to fill a bitmap pointer than doesn't exists (the bitmap pointer only exists in an actual object, not in an empty pointer). Either use PANELMAP mypanmap;, or fill mypanmap with the object in your function (mypanmap = malloc( sizeof(PANELMAP) );)


Also, when referencing pointers, say:
PANELMAP* mypanmap;
mypanmap.bitmap = NULL;

Then always use the arrow notation:
PANELMAP* mypanmap;
mypanmap->bitmap = NULL;

Last edited by Joozey; 07/07/09 23:54.

Click and join the 3dgs irc community!
Room: #3dgs
Re: Panel below Entities [Re: Joozey] #277244
07/08/09 13:37
07/08/09 13:37
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
oh man.. structs are hell of shit to code... and the manual is actually not really good.. a few sentences and many examples wich said nonsense... HWERE THE HELL, are some really examples and a good manual to this..


seems like i use entity definated strings/bitmaps.. because i´ve really no clue how structs work..

Last edited by Espér; 07/08/09 13:42.

Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Panel below Entities [Re: Espér] #277257
07/08/09 14:34
07/08/09 14:34
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Do you really need the REAL filename?
Or would "Gegner_Weißer Drachenreiter_stehen_png" do for "Gegner_Weißer Drachenreiter_stehen.png"?
Try error(mypan->bmap->link.name); (once the panel mypan is created of course)

ALSO: Just tested paanel behind entities. Panel must be negative layer AND sky_color must = 0,0,0

Last edited by EvilSOB; 07/08/09 14:56.

"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Panel below Entities [Re: EvilSOB] #277263
07/08/09 14:59
07/08/09 14:59
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
no.. i need the real filename of the panelbitmap..


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Panel below Entities [Re: Espér] #277265
07/08/09 15:02
07/08/09 15:02
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline OP
Expert
Espér  Offline OP
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
ok..

this is my structcode:
Code:
//=================================================================================================================================
//                                                                                                                               //
//                                                       DIE BITMAPS                                                             //
//                                                       ^^^^^^^^^^^                                                             //
//                                                                                                                               //
//=================================================================================================================================
//=================================================================================================================================
//                                                                                                                               //
//                                                      STRUCKTUREN                                                              //
//                                                      """""""""""                                                              //
//                                                                                                                               //
//=================================================================================================================================
typedef struct 
{
	STRING* name;
	BMAP* bitmap;
} PANELMAP;


//=================================================================================================================================
//                                                                                                                               //
//                                                  STRUCKTURENPOINTER                                                           //
//                                                  """"""""""""""""""                                                           //
//                                                                                                                               //
//=================================================================================================================================
PANELMAP* mypanmap;

//=================================================================================================================================
//                                                                                                                               //
//                                                  STRUCKTURENFUNKTION                                                          //
//                                                  """""""""""""""""""                                                          //
//                                                                                                                               //
//=================================================================================================================================
PANELMAP* panelmapSetup(PANELMAP* inpanel)
{
	str_cpy(inpanel.name, "test");
	inpanel.bitmap = bmap_create(testobjekt);
}

//=================================================================================================================================
//                                                                                                                               //
//                                                   STRUCKTURENMEMORY                                                           //
//                                                   """""""""""""""""                                                           //
//                                                                                                                               //
//=================================================================================================================================
mypanmap = malloc(sizeof(PANELMAP));
panelmapSetup(mypanmap);



and this is called right after level loading in the main function:
Code:
level_load("leer.wmb");
	wait(3);
	
	vec_set(camera.x, vector(0,-250,500));
	vec_set(camera.pan, vector(90,-50,0));
	
	error("str_cpy(mypanmap.name, Weisser_Drachenreiter_1+4.tga);"); ///////////
	str_cpy(mypanmap.name, "Weisser_Drachenreiter_1+4.tga");
	error("mypanmap.bitmap = bmap_create(mypanmap.name);"); /////////////////////////////
	mypanmap.bitmap = bmap_create(mypanmap.name);
	
	error("PANEL* testerpanel erstellen"); //////////////////////////////////////////////
	pan_create("pos_x=300; pos_y=150; bmap = mypanmap.bitmap; flags = SHOW;", -10);
	
	
	error(mypanmap.name);



What i get? a Crash in main right after the first error-message.


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Page 1 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