Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (TedMar, AndrewAMD), 1,067 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: acknex.exe problem [Re: gamingfan101] #274218
06/26/09 05:41
06/26/09 05:41
Joined: Mar 2009
Posts: 146
USA
P
paracharlie Offline
Member
paracharlie  Offline
Member
P

Joined: Mar 2009
Posts: 146
USA
Try this: Otherwise I dont know either, everything looks fine.

function quit_program()
{
while (key_any) { wait (1); }
sys_exit(NULL);
}

function main()
{
mouse_map = mouse_bmp;
mouse_mode = 4;
quit_program();
}


A8 Commercial
Re: acknex.exe problem [Re: paracharlie] #274220
06/26/09 05:57
06/26/09 05:57
Joined: Jun 2009
Posts: 148
G
gamingfan101 Offline OP
Member
gamingfan101  Offline OP
Member
G

Joined: Jun 2009
Posts: 148
ok, i started over and checked the program as i went. It only messes up once i put in the TEXT. here are the definitions and the text code.

STRING* main_str = "MAIN GAME";
STRING* endu_str = "ENDURANCE MODE";
STRING* cred_str = "CREDITS";
STRING* exit_str = "EXIT";
FONT* header_font = "reprise title#50b";
FONT* options_font = "reprise stamp#10b";

TEXT* main_txt =
{
pos_x = 30;
pos_y = 100;
font = options_font;
string = main_str;
flags = SHOW;
}

EDIT: Ok, i just found out that when i take the * away from the TEXT, everything shows back up again accept for the text. I dont know if that normally happens, but i thought anything could make a difference.


Last edited by gamingfan101; 06/26/09 06:06.

Sorry, im new. I have a tendency to ask really simple questions, so please be patient.
Re: acknex.exe problem [Re: gamingfan101] #274227
06/26/09 07:27
06/26/09 07:27
Joined: Mar 2009
Posts: 146
USA
P
paracharlie Offline
Member
paracharlie  Offline
Member
P

Joined: Mar 2009
Posts: 146
USA
Well this works for sure. Test your font and make sure your main function is capable of displaying it.

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

STRING* main_str = "MAIN GAME";

TEXT* main_txt = {
pos_x = 30;
pos_y = 100;
string = main_str;
flags = SHOW;
}

function main(){
video_mode = 7;
screen_color.blue = 150;
}


A8 Commercial
Re: acknex.exe problem [Re: gamingfan101] #275057
06/29/09 22:19
06/29/09 22:19
Joined: Jun 2009
Posts: 148
G
gamingfan101 Offline OP
Member
gamingfan101  Offline OP
Member
G

Joined: Jun 2009
Posts: 148
well, i've tried everything i can think of but it still doesnt want to work. My whole program including bmaps and buttons will work, but once i add one TEXT, the program will open, but the screen is black, the cursor isnt mine, and it says that the acknex.exe is not responding. Any other ideas? thanks!


Sorry, im new. I have a tendency to ask really simple questions, so please be patient.
Re: acknex.exe problem [Re: gamingfan101] #275279
06/30/09 20:48
06/30/09 20:48
Joined: Mar 2009
Posts: 146
USA
P
paracharlie Offline
Member
paracharlie  Offline
Member
P

Joined: Mar 2009
Posts: 146
USA
I took your example and tested it with some resources that I have. It works fine so Like I said before check your font and bmaps otherwise your code is functional. Here is how I tested it. Couple very small changes overall.
If you want text on a button the easiest way is just to create a button with text already on a button, then you dont have to worry about placing text on a empty button, because it can be twice as much work.
Code:
///////////////////////////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////////////////////////////////////////////////////////

BMAP* mouse_bmp = "cursor.tga";
STRING* header_str = "BOXIE";
STRING* maingame_str = "MAIN GAME";
STRING* endurance_str = "ENDURANCE";
STRING* credits_str = "CREDITS";
STRING* exit_str = "EXIT";
FONT* header_font = "menufont.bmp";
//FONT* option_font = "reprise stamp#20b";


///////////////////////////////////////////////////////////////////////////////////
TEXT* header_txt =
{
pos_x = 300;
pos_y = 20;
string(header_str);
font = header_font;
layer = 1;
flags = SHOW;
}

TEXT* maingame =
{
pos_x = 10;
pos_y = 200;
string(maingame_str);
font = header_font;
layer = 2; //if you want text to appear on top of button you have to layer over the button.
flags = SHOW;
}

PANEL* endurancebutton =
{
pos_x = 10;
pos_y = 200;
layer = 1;
button(0, 0, "forward1.pcx", "forward1.pcx", "forward2.pcx", quit_program, NULL, NULL);
flags = OVERLAY | SHOW;
}

PANEL* creditsbutton =
{
pos_x = 10;
pos_y = 300;
layer = 1;
button(0, 0, "forward1.pcx", "forward1.pcx", "forward2.pcx", quit_program, NULL, NULL);
flags = OVERLAY | SHOW;
}
////////////////////////////////////////////////////////////////////////////////////

function main()
{
mouse_map = mouse_bmp;
mouse_mode = 4;
video_mode = 7; 
screen_color.blue = 150;
}

function quit_program()
{
while (key_any) { wait (1); }
sys_exit(NULL);
}





Last edited by paracharlie; 06/30/09 21:11. Reason: couple more thoughts.

A8 Commercial
Re: acknex.exe problem [Re: paracharlie] #275284
06/30/09 21:28
06/30/09 21:28
Joined: Jun 2009
Posts: 148
G
gamingfan101 Offline OP
Member
gamingfan101  Offline OP
Member
G

Joined: Jun 2009
Posts: 148
so the code should work fine? and i didnt want the text over the button, if that has anything to do with it.


Sorry, im new. I have a tendency to ask really simple questions, so please be patient.
Re: acknex.exe problem [Re: gamingfan101] #275296
06/30/09 22:08
06/30/09 22:08
Joined: Mar 2009
Posts: 146
USA
P
paracharlie Offline
Member
paracharlie  Offline
Member
P

Joined: Mar 2009
Posts: 146
USA
Your code did work fine for me yes using my own resources.


A8 Commercial
Re: acknex.exe problem [Re: paracharlie] #275300
06/30/09 22:37
06/30/09 22:37
Joined: Jun 2009
Posts: 22
Finland
4gottenname Offline
Newbie
4gottenname  Offline
Newbie

Joined: Jun 2009
Posts: 22
Finland
I had a similar problem a day ago. The engine didn't like my SOUNDS* defenition. Gave me a black screen (no panels, buttons or texts showing). Still not sure why but changing the name solved my problem, but seems like you already done that. A bit unclear for me if you got problems with all TEXTs or just the "main" one.
Have you tried to comment // string = main_str;
and see if anything shows up then? (the text wont ofc, its just to test if it has to do with the string and not the *) or using a standard font like others have sugested?


Last edited by 4gottenname; 06/30/09 22:47. Reason: added something
Re: acknex.exe problem [Re: 4gottenname] #275304
06/30/09 23:20
06/30/09 23:20
Joined: Jun 2009
Posts: 148
G
gamingfan101 Offline OP
Member
gamingfan101  Offline OP
Member
G

Joined: Jun 2009
Posts: 148
oh, ok. Apparently the engine first says that the fonts are usable, but i changed the font and it works now. Im really sorry for bugging you all with this considering it was a pretty simple solution.


Sorry, im new. I have a tendency to ask really simple questions, so please be patient.
Page 2 of 2 1 2

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