Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (AndrewAMD, TipmyPip), 12,420 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
fONT DEFINITIONS #242176
12/21/08 19:08
12/21/08 19:08
Joined: Apr 2002
Posts: 225
Twickenham,England
kiamonster Offline OP
Member
kiamonster  Offline OP
Member

Joined: Apr 2002
Posts: 225
Twickenham,England
Hi folks
Having trouble declaring fonts,
Suspected my syntav, so created a very simple test level (1 hollow cube).
I tried v6 & v7 - and got -
In v6 - got 'FONT* NOT FOUND'
In v7- got 'eRROR IN MAIN : FONT UNDECLARED IDENTIFIER'
Below are my scripts - any ideas please?
Familiar with scripting (v5) but new to v6/v7
*********************************************************************
V6
*********************************************************************
////////////////////////////////////////////////////////////////////////
// A6 main wdl:
// Created by WED.
////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////
// The PATH keyword gives directories where template files can be found.
path "C:\\Program Files\\GStudio7\\template_6"; // Path to A6 templates directory
path "C:\\Program Files\\GStudio7\\template_6\\code"; // Path to A6 template code subdirectory
path "C:\\Program Files\\GStudio7\\templates\\images"; // Path to template image subdirectory
path "C:\\Program Files\\GStudio7\\templates\\sounds"; // Path to template sound subdirectory
path "C:\\Program Files\\GStudio7\\templates\\models"; // Path to template model subdirectory

/////////////////////////////////////////////////////////////////
// Filename of the starting level.
string level_str = <test.WMB>; // give file names in angular brackets

////////////////////////////////////////////////////////////////////////////
// Included files
include <gid01.wdl>; // global ids
include <display00.wdl>; // basic display settings

font* my_font = "ackfont.pcx";



/////////////////////////////////////////////////////////////////
// Desc: The main() function is started at game start
function main()
{
// set some common flags and variables
// freeze all entity functions
freeze_mode = 1;
// no level has been loaded yet...
gid01_level_state = gid01_level_not_loaded;

// entry: Warning Level (0,1, or 2)
// entry_help: Sets sensitivity to warnings (0 = none, 1 = some, 2 = all).
warn_level = 2; // announce bad texture sizes and bad wdl code


// entry: Starting Mouse Mode (0, 1, or 2)
mouse_mode = 0;

// wait 3 frames (for triple buffering) until it is flipped to the foreground
wait(3);

// now load the level
level_load(level_str);

wait(2); // let level load
// level should be loaded at this point...
gid01_level_state = gid01_level_loaded;

//+++ load starting values


// un-freeze the game
freeze_mode = 0;

// save start of game here
wait(6); // allow time for functions that wait for "gid01_level_loaded" to load
file_delete("start0.SAV"); // remove any old savefile
wait(1);
if( game_save("start",0,SV_ALL) <= 0)
{
diag("\nWARNING! main - Cannot save 'start' of level (ignore on restarts).");
}
else
{
diag("\nWDL: main - Game 'start' saved.");
}


// main game loop
while(1)
{
if(gid01_level_state != gid01_level_loaded)
{
freeze_mode = 1; // pause the game
while(gid01_level_state != gid01_level_loaded) { wait(1); }
freeze_mode = 0; // resume the game
}
wait(1);
}

}

*********************************************************************
V7
*********************************************************************
///////////////////////////////
#define PRAGMA_PATH "%EXE_DIR%\templates\images";
#define PRAGMA_PATH "%EXE_DIR%\templates\models";
#define PRAGMA_PATH "%EXE_DIR%\templates\sounds";

#include <acknex.h>
#include <default.c>
#include "mtlFX.c"
///////////////////////////////
///////////////////////////////
font* my_font = "ackfont.pcx";
///////////////////////////////
function main()
{
level_load("test.WMB");
wait(2);
printf("Press [0] to move the camera!");
}

Re: fONT DEFINITIONS [Re: kiamonster] #242190
12/21/08 19:56
12/21/08 19:56
Joined: Oct 2008
Posts: 67
C
Crypton Offline
Junior Member
Crypton  Offline
Junior Member
C

Joined: Oct 2008
Posts: 67
in A7 (probably A6 too) any pointer needs to be UPPERCASE. font* is not the same as FONT*
That should be the basic problem here. Workshops also cover this topic.



Last edited by Crypton; 12/21/08 19:56. Reason: little add

New into Gamestudio and eager to learn it..
Stuff and games done in 2D: LINK
Re: fONT DEFINITIONS [Re: Crypton] #242333
12/22/08 15:35
12/22/08 15:35
Joined: Apr 2002
Posts: 225
Twickenham,England
kiamonster Offline OP
Member
kiamonster  Offline OP
Member

Joined: Apr 2002
Posts: 225
Twickenham,England
Thanks, but CASE seems to make no difference. Have yried all combinations

Re: fONT DEFINITIONS [Re: kiamonster] #242474
12/23/08 11:15
12/23/08 11:15
Joined: Oct 2008
Posts: 67
C
Crypton Offline
Junior Member
Crypton  Offline
Junior Member
C

Joined: Oct 2008
Posts: 67
I tried your A7 code and replaced font* with FONT* ...worked nicely. (Just be sure you save your A7 script files in .c if using LiteC instructions)
in wdl I'm not sure how fonts are defined so I really can't help here.

Cheers


New into Gamestudio and eager to learn it..
Stuff and games done in 2D: LINK

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