Worked on NEW_NAMES.

This commit is contained in:
johns 2001-03-11 04:32:55 +00:00
parent 24dcd13a3b
commit cfbd5e4e08
5 changed files with 43 additions and 19 deletions

View file

@ -9,11 +9,10 @@
// FreeCraft - A free fantasy real time strategy game engine
//
/**@name font.h - The font headerfile. */
/*
** (c) Copyright 1998-2000 by Lutz Sammer
**
** $Id$
*/
//
// (c) Copyright 1998-2001 by Lutz Sammer
//
// $Id$
#ifndef __FONT_H__
#define __FONT_H__
@ -49,6 +48,7 @@ enum _game_font_ {
LargeFont, /// Large font used in menus
// ... more to come
MaxFonts, /// Number of fonts supported.
};
/**
@ -78,7 +78,7 @@ enum _font_color {
-- Variables
----------------------------------------------------------------------------*/
// extern ColorFont Fonts[];
// extern ColorFont Fonts[];
/*----------------------------------------------------------------------------
-- Functions

View file

@ -757,13 +757,23 @@ local void ClipMixToStereo16(int* mix,int size,short* output)
-- Other
----------------------------------------------------------------------------*/
/*
/**
** Load one sample
**
** @param name File name of sample (short version).
**
** @return Wav sample loaded from file.
*/
local Sample* LoadSample(const char* name)
{
Sample* sample;
char* buf = strdcat3(FreeCraftLibPath, "/sound/", name);
char* buf;
#ifdef NEW_NAMES
buf = strdcat3(FreeCraftLibPath, "/sounds/", name);
#else
buf = strdcat3(FreeCraftLibPath, "/sound/", name);
#endif
if( !(sample=LoadWav(buf)) ) {
printf("Can't load the sound `%s'\n",name);
}

View file

@ -161,6 +161,7 @@ local SCM CclDisplayPicture(SCM file)
char* name;
name=gh_scm2newstr(file,NULL);
SetClipping(0,0,VideoWidth-1,VideoHeight-1);
DisplayPicture(name);
Invalidate();
free(name);

View file

@ -205,12 +205,11 @@ local hashtable(UnitType*,61) UnitTypeHash;
#ifdef DEBUG // {
#if !defined(USE_CCL)
/**
** Table unit-type enums -> string.
**
** Used to build C tables.
** Default without CCL support.
*/
local const char* UnitTypeNames[] = {
local char* DefaultUnitTypeNames[] = {
"Footman",
"Grunt",
"Peasant",
@ -329,6 +328,18 @@ local const char* UnitTypeNames[] = {
"TankerOrcFull",
NULL
};
#endif
/**
** Table unit-type enums -> string.
**
** Used to build C tables.
*/
local char** UnitTypeNames
#if !defined(USE_CCL)
=DefaultUnitTypeNames
#endif
;
/*----------------------------------------------------------------------------
-- Functions

View file

@ -35,17 +35,19 @@
**
** Define the font files, sizes.
*/
global ColorFont Fonts[] = {
local ColorFont Fonts[MaxFonts]
#ifndef USE_CCL
#ifdef NEW_NAMES
{ "graphic/ui/fonts/game.png", 13,14 },
{ "graphic/ui/fonts/small.png", 7, 6 },
{ "graphic/ui/fonts/large.png", 17,17 },
={ { "graphics/ui/fonts/game.png", 13,14 },
{ "graphics/ui/fonts/small.png", 7, 6 },
{ "graphics/ui/fonts/large.png", 17,17 }, }
#else
{ "graphic/small font.png", 13,14 },
={ { "graphic/small font.png", 13,14 },
{ "graphic/game font.png", 7, 6 },
{ "graphic/large font.png", 17,17 },
{ "graphic/large font.png", 17,17 }, }
#endif
};
#endif
;
/**
** Font color table.