diff --git a/src/include/font.h b/src/include/font.h index 83716646d..dd3241fca 100644 --- a/src/include/font.h +++ b/src/include/font.h @@ -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 diff --git a/src/sound/sound_server.cpp b/src/sound/sound_server.cpp index bd7469f48..37ddc4b63 100644 --- a/src/sound/sound_server.cpp +++ b/src/sound/sound_server.cpp @@ -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); } diff --git a/src/ui/script_ui.cpp b/src/ui/script_ui.cpp index 4e9cb7a5d..a5bdc6421 100644 --- a/src/ui/script_ui.cpp +++ b/src/ui/script_ui.cpp @@ -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); diff --git a/src/unit/unittype.cpp b/src/unit/unittype.cpp index 28b85bfd2..23386b808 100644 --- a/src/unit/unittype.cpp +++ b/src/unit/unittype.cpp @@ -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 diff --git a/src/video/font.cpp b/src/video/font.cpp index d782e7de5..a52ac7fef 100644 --- a/src/video/font.cpp +++ b/src/video/font.cpp @@ -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.