|
header datei und bmps aus ordner laden
#456500
11/25/15 13:17
11/25/15 13:17
|
Joined: Oct 2008
Posts: 341
ratz
OP
Senior Member
|
OP
Senior Member
Joined: Oct 2008
Posts: 341
|
Hallo ich suche die Möglichkeit, wie man einer Include Datei sagt dass, bmps aus ein Ordner öffnet werden sollen ... -> da gabs mal sowas wie "progma path" oder so.. einmal einfügen und die Header Datei kann auf den gesammten Ordner zugreifen ohne immer wieder //...data//... bei jedem einzelnen Entity eingeben zu müssen aber ich weis nicht mehr wie das Funktioniert im Manuel steht: #define PRAGMA_PATH "%EXE_DIR%\Map-Editor\Scripts"; und meine include:
#include "main.c"
#define PRAGMA_PATH "%EXE_DIR%\Peeriodensystem";
///////////////////////////////////
PANEL* hwnd_element=
{
//bmap = hWnd_win_console;
pos_x = 400;
pos_y = 100;
button(234,1,"hwnd_h2_down.bmp","hwnd_h2_up.bmp","hwnd_h2_down.bmp",NULL,NULL,NULL);
}
error: cant open hwnd_h2_down.bmp ...
|
|
|
Re: header datei und bmps aus ordner laden
[Re: ratz]
#456501
11/25/15 13:22
11/25/15 13:22
|
Joined: Oct 2008
Posts: 341
ratz
OP
Senior Member
|
OP
Senior Member
Joined: Oct 2008
Posts: 341
|
habs:
#include "main.c"
#define PRAGMA_PATH "Peeriodensystem";
///////////////////////////////////
PANEL* hwnd_element=
{
//bmap = hWnd_win_console;
pos_x = 400;
pos_y = 100;
button(234,1,"hwnd_h2_down.bmp","hwnd_h2_up.bmp","hwnd_h2_down.bmp",NULL,NULL,NULL);
flags = SHOW;
}
Last edited by ratz; 11/25/15 13:22.
|
|
|
Re: header datei und bmps aus ordner laden
[Re: ratz]
#456509
11/26/15 12:02
11/26/15 12:02
|
Joined: Oct 2008
Posts: 341
ratz
OP
Senior Member
|
OP
Senior Member
Joined: Oct 2008
Posts: 341
|
häääää warum tuts das heute nicht mehr ??????????????????????? ich hab jetz folgendes gemacht: MAIN:
#define PRAGMA_PATH "data";
#include <acknex.h>
#include "AtomX.c"
#include "AtomX_GUI.c"
/////////////////////////////////////////
/////////////////////////////////////////
function main()
{
vec_set(screen_size,vector(1600,768,0)); // FENSTERGRÖSSE
vec_set(screen_color,vector(50,1,1));
vec_set(sky_color,vector(50,1,1));
video_window(NULL,NULL,0,"Console");
d3d_antialias = 1;
shadow_stencil = 3;
video_mode = 8; // Auflösung
mouse_map = arrow;
mouse_mode = 4;
level_load(NULL);
create_console();
}
atomX_gui.c
#include "main.c"
#define PRAGMA_PATH "Peeriodensystem";
///////////////////////////////////
PANEL* hwnd_elements=
{
...
}
atomx.c
//#include "main.c"
#define PRAGMA_PATH "data";
#define PRAGMA_PATH "Peeriodensystem";
///////////////////////////////////
var i_1 = 0; // when you make more than one panel...
STRING* input_c = "#80";
STRING* text_a = "show elements";
STRING* text_b = "testb";
BMAP* arrow = "cursor.png";
BMAP* hWnd_win_console = "hwnd_fill_256.bmp";
BMAP* hWnd_but_2_up = "hWnd_but_2_up.bmp";
BMAP* hWnd_but_2_down = "hWnd_but_2_down.bmp";
PANEL* hWnd_win_console_pan[100]; // for example..
function move_hWnd_win_console();
function kill_hWnd_win_console();
TEXT* def_ctxt =
{
string("Befehl: ",input_c);
layer = 999;
}
TEXT* show_txt =
{
pos_x = 400;
pos_y = 10;
flags = SHOW;
layer = 999;
}
function create_console()
{
hWnd_win_console_pan[i_1] = pan_create
(
"bmap = hWnd_win_console;
pos_x = 400;
pos_y = 100;
button(234,1,hWnd_but_2_down,hWnd_but_2_up,hWnd_but_2_down,kill_hWnd_win_console,NULL,NULL);
button(218,1,hWnd_but_2_down,hWnd_but_2_up,hWnd_but_2_down,move_hWnd_win_console,NULL,NULL);
flags = SHOW | TRANSLUCENT ",10
);
toggle (def_ctxt,SHOW);
def_ctxt.pos_x = hWnd_win_console_pan[i_1].pos_x + 10;
def_ctxt.pos_y = hWnd_win_console_pan[i_1].pos_y + 20;
while is(def_ctxt ,SHOW)
{
inkey((def_ctxt ->pstring)[1]); // write ...
//input a //
if (str_cmp(input_c,text_a))
{
(show_txt.pstring)[0] = "Input A Okey";
set(hwnd_elements,SHOW);
}
else
//input b //
if (str_cmp(input_c,text_b))
{
(show_txt.pstring)[0] = "Input B Okey";
}
else
{
(show_txt.pstring)[0] = "Error";
}
wait(-2);
str_cpy(input_c," ");
(show_txt.pstring)[0] = " ";
}
}
function move_hWnd_win_console()
{
var mouse_offset_x = mouse_panel.pos_x - mouse_pos.x;
var mouse_offset_y = mouse_panel.pos_y - mouse_pos.y;
while(mouse_left) // während die maustaste gehalten wird:
{
mouse_panel.pos_x = mouse_pos.x + mouse_offset_x;
mouse_panel.pos_y = mouse_pos.y + mouse_offset_y;
mouse_panel.pos_x = clamp(mouse_panel.pos_x, 0, screen_size.x - mouse_panel.size_x);
mouse_panel.pos_y = clamp(mouse_panel.pos_y, 0, screen_size.y - mouse_panel.size_y);
def_ctxt.pos_x = hWnd_win_console_pan[i_1].pos_x + 10;
def_ctxt.pos_y = hWnd_win_console_pan[i_1].pos_y + 20;
wait(1);
}
}
function kill_hWnd_win_console()
{
reset(mouse_panel,SHOW);
toggle(def_ctxt,SHOW);
}
////////////////////////////////////
ich möchte gerne in der console: Show element eingeben und es soll sich das hwnd_elemnt pan öffnen ... aber: error: cant find hwnd_elements in atomx.c oder mantchmal kommt aufenmal: error: cant find Var i_1 ... oder error: create_console not found oder error: arrow not found //////////////////////// was ist falsch ????????????????
Last edited by ratz; 11/26/15 12:49.
|
|
|
Re: header datei und bmps aus ordner laden
[Re: ratz]
#456510
11/26/15 12:47
11/26/15 12:47
|
Joined: Oct 2008
Posts: 341
ratz
OP
Senior Member
|
OP
Senior Member
Joined: Oct 2008
Posts: 341
|
so jetz ... main:
#include <acknex.h>
#include "AtomX.c"
#include "AtomX_GUI.c"
atomx:
#define PRAGMA_PATH "data";
#define PRAGMA_PATH "Peeriodensystem";
#include "atomx_gui.c"
atomx_gui:
#include "atomx.c"
#define PRAGMA_PATH "Peeriodensystem";
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|