Fixed many warnings, could be compiled with gcc272-gcc300.

This commit is contained in:
johns 2001-06-20 23:02:40 +00:00
parent d6f0263716
commit 1a3a498789
42 changed files with 246 additions and 191 deletions

View file

@ -1,4 +1,5 @@
#include <stdlib.h>
#include <string.h>
#include "etlib/generic.h"
#include "etlib/xmalloc.h"
#include "etlib/hash.h"

View file

@ -50,6 +50,7 @@
#include "tileset.h"
#include "map.h"
#include "spells.h"
#include "interface.h"
/*----------------------------------------------------------------------------
-- Functions

View file

@ -32,6 +32,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "freecraft.h"

View file

@ -629,7 +629,8 @@ global void CommandBuildBuilding(Unit* unit,int x,int y
** @param unit pointer to unit.
** @param worker pointer to unit.
*/
global void CommandCancelBuilding(Unit* unit,Unit* worker)
global void CommandCancelBuilding(Unit* unit,
Unit* worker __attribute__((unused)))
{
//
// Check if building is still under construction? (NETWORK!)
@ -835,7 +836,8 @@ global void CommandReturnGoods(Unit* unit,Unit* goal,int flush)
** @param type unit type to train.
** @param flush if true, flush command queue.
*/
global void CommandTrainUnit(Unit* unit,UnitType* type,int flush)
global void CommandTrainUnit(Unit* unit,UnitType* type,
int flush __attribute__((unused)))
{
//
// Check if enough resources remains? (NETWORK!)

View file

@ -680,7 +680,7 @@ global void AiResearchComplete(Unit* unit,const Upgrade* what)
**
** @param player The player structure pointer.
*/
global void AiEachFrame(Player* player)
global void AiEachFrame(Player* player __attribute__((unused)))
{
}

View file

@ -582,7 +582,8 @@ local void AiCheckingWork(void)
** Or we could do a flood fill search starting from x.y. The
** first found gold mine is it.
*/
global Unit* AiFindGoldMine(const Unit* source,int x,int y)
global Unit* AiFindGoldMine(const Unit* source,
int x __attribute__((unused)),int y __attribute__((unused)))
{
Unit** table;
Unit* unit;

View file

@ -78,7 +78,8 @@ global int lcm_prevent_recurse = 0; /// prevent recursion through LoadGameMap
** @param filename map filename
** @param map map loaded
*/
local void LoadFreeCraftMap(const char* filename,WorldMap* map)
local void LoadFreeCraftMap(const char* filename,
WorldMap* map __attribute__((unused)))
{
DebugLevel3Fn("%p \n",map);
@ -282,7 +283,7 @@ global void CreateGame(char* filename, WorldMap* map)
MapColorCycle(); // Setup color cycle
CleanUserInterface();
InitUserInterface(ThisPlayer->RaceName); // Setup the user interface.
InitUserInterface(ThisPlayer->RaceName); // Setup the user interface
LoadUserInterface(); // Load the user interface grafics
//

View file

@ -93,42 +93,42 @@
/**
** Print debug information of level 0.
*/
#define DebugLevel0(fmt...) printf(fmt##)
#define DebugLevel0(fmt,args...) printf(fmt,##args)
/**
** Print debug information of level 1.
*/
#define DebugLevel1(fmt...) printf(fmt##)
#define DebugLevel1(fmt,args...) printf(fmt,##args)
/**
** Print debug information of level 2.
*/
#define DebugLevel2(fmt...) printf(fmt##)
#define DebugLevel2(fmt,args...) printf(fmt,##args)
/**
** Print debug information of level 3.
*/
#define DebugLevel3(fmt...) /* TURNED OFF: printf(fmt##) */
#define DebugLevel3(fmt,args...) /* TURNED OFF: printf(fmt,##args) */
/**
** Print debug information of level 0 with function name.
*/
#define DebugLevel0Fn(fmt...) printf(__FUNCTION__": "fmt##)
#define DebugLevel0Fn(fmt,args...) printf(__FUNCTION__": "fmt,##args)
/**
** Print debug information of level 1 with function name.
*/
#define DebugLevel1Fn(fmt...) printf(__FUNCTION__": "fmt##)
#define DebugLevel1Fn(fmt,args...) printf(__FUNCTION__": "fmt,##args)
/**
** Print debug information of level 2 with function name.
*/
#define DebugLevel2Fn(fmt...) printf(__FUNCTION__": "fmt##)
#define DebugLevel2Fn(fmt,args...) printf(__FUNCTION__": "fmt,##args)
/**
** Print debug information of level 3 with function name.
*/
#define DebugLevel3Fn(fmt...) /* TURNED OFF: printf(__FUNCTION__": "fmt##) */
#define DebugLevel3Fn(fmt,args...) /* TURNED OFF: printf(__FUNCTION__": "fmt,##args) */
#else // }{ DEBUG
@ -302,7 +302,7 @@ enum MustRedraw_e {
** Show load progress.
** FIXME: Some time this should be shown in tile screen.
*/
#define ShowLoadProgress(fmt...) //printf(fmt##)
#define ShowLoadProgress(fmt...) //printf(fmt,##args)
/// mainscreen width (default 640)
extern int VideoWidth;
@ -343,7 +343,6 @@ extern int Map2ScreenY(int y); /// Convert map tile to screen pixel
*/
#define MyRand() rand()
extern int FlagRevealMap; /// Reveal map immediately
extern char* TitleScreen; /// file for title screen
extern char* FreeCraftLibPath; /// location of freecraft data
@ -372,13 +371,6 @@ extern int SyncRand(void);
extern int main1(int argc,char* argv[]);/// init freecraft.
extern volatile void Exit(int err); /// exit freecraft.
extern void SetMessage( char* fmt, ... );
extern void SetMessage2( int x, int y, char* fmt, ... );
extern void SetMessageDup(const char* message);
extern void SetMessageDupCat(const char* message);
extern void CenterOnMessage();
extern void SetStatusLine(char* status);
extern void ClearStatusLine(void);
extern void UpdateDisplay(void);
extern void GameMainLoop(void); /// game main loop

View file

@ -202,8 +202,6 @@ extern char GamePaused;
extern enum _mouse_buttons_ MouseButtons;
/// current active modifiers
extern enum _key_modifiers_ KeyModifiers;
/// current cursor state
extern enum _cursor_state_ CursorState;
/// current interface state
extern enum _iface_state_ InterfaceState;
/// current scroll state of keyboard
@ -297,7 +295,18 @@ extern void DrawMessage(void);
/// Draw the player resource in resource line
extern void DrawResources(void);
/// Set message to display
extern void SetMessage( char* fmt, ... );
extern void SetMessage( const char* fmt, ... );
/// Set message to display with event point
extern void SetMessage2( int x, int y, const char* fmt, ... );
/// Set message to display, saving the message
extern void SetMessageDup(const char* message);
/// Center view-point on last message
extern void CenterOnMessage();
/// Set status line to show this information
extern void SetStatusLine(char* status);
/// Clear the content of the message line
extern void ClearStatusLine(void);
/// Draw status line
extern void DrawStatusLine(void);
/// Draw costs in status line
@ -306,6 +315,7 @@ extern void DrawCosts(void);
extern void SetCosts(int,const int* costs);
/// Clear the costs displayed in status line (undisplay!)
extern void ClearCosts(void);
/// Draw the unit info panel
extern void DrawInfoPanel(void);
/// Draw the unit button panel

View file

@ -328,8 +328,6 @@ char *safe_strcat(char *s1,size_t size1,const char *s2);
size_t safe_strlen(const char *s,size_t size);
LISP memq(LISP x,LISP il);
LISP lstrbreakup(LISP,LISP);
LISP lstrbreakup(LISP,LISP);
LISP nth(LISP,LISP);
LISP butlast(LISP);
LISP last(LISP);

View file

@ -95,7 +95,6 @@ void handle_sigint(int sig SIG_restargs);
void err_ctrl_c(void);
double myruntime(void);
void fput_st(FILE *f,char *st);
void put_st(char *st);
void grepl_puts(char *,void (*)(char *));
void gc_fatal_error(void);
LISP gen_intern(char *name,long copyp);
@ -118,7 +117,6 @@ void gc_sweep(void);
LISP leval_args(LISP l,LISP env);
LISP extend_env(LISP actuals,LISP formals,LISP env);
LISP envlookup(LISP var,LISP env);
LISP setvar(LISP var,LISP val,LISP env);
LISP leval_setq(LISP args,LISP env);
LISP syntax_define(LISP args);
LISP leval_define(LISP args,LISP env);

View file

@ -227,7 +227,7 @@ extern char FancyBuildings; /// Mirror buildings 1 yes, 0 now.
-- Functions
----------------------------------------------------------------------------*/
extern void InitUserInterface(char*); /// initialize the ui
extern void InitUserInterface(const char*); /// initialize the ui
extern void LoadUserInterface(void); /// load ui graphics
extern void SaveUserInterface(FILE*); /// save the ui state
extern void CleanUserInterface(void); /// clean up the ui

View file

@ -279,7 +279,7 @@ global void MapMarkSight(int tx,int ty,int range)
** @param range Radius to mark.
*/
global void MapMarkNewSight(int tx,int ty,int range
,int dx,int dy)
,int dx __attribute__((unused)),int dy __attribute__((unused)))
{
// FIXME: must write this
MapMarkSight(tx,ty,range);
@ -519,7 +519,7 @@ global void VideoDraw8Fog32Solid(const GraphicData* data,int x,int y)
** @param x X position into video memory
** @param y Y position into video memory
*/
global void VideoDraw8OnlyFog32Solid(const GraphicData* data,int x,int y)
global void VideoDraw8OnlyFog32Solid(const GraphicData* data __attribute__((unused)),int x,int y)
{
const VMemType8* gp;
VMemType8* dp;
@ -642,7 +642,7 @@ global void VideoDraw16Fog32Solid(const GraphicData* data,int x,int y)
** @param x X position into video memory
** @param y Y position into video memory
*/
global void VideoDraw16OnlyFog32Solid(const GraphicData* data,int x,int y)
global void VideoDraw16OnlyFog32Solid(const GraphicData* data __attribute__((unused)),int x,int y)
{
const VMemType16* gp;
VMemType16* dp;
@ -764,7 +764,7 @@ global void VideoDraw24Fog32Solid(const GraphicData* data,int x,int y)
** @param x X position into video memory
** @param y Y position into video memory
*/
global void VideoDraw24OnlyFog32Solid(const GraphicData* data,int x,int y)
global void VideoDraw24OnlyFog32Solid(const GraphicData* data __attribute__((unused)),int x,int y)
{
const VMemType24* gp;
VMemType24* dp;
@ -886,7 +886,7 @@ global void VideoDraw32Fog32Solid(const GraphicData* data,int x,int y)
** @param x X position into video memory
** @param y Y position into video memory
*/
global void VideoDraw32OnlyFog32Solid(const GraphicData* data,int x,int y)
global void VideoDraw32OnlyFog32Solid(const GraphicData* data __attribute__((unused)),int x,int y)
{
const VMemType32* gp;
VMemType32* dp;
@ -1011,7 +1011,7 @@ global void VideoDraw8Fog32Alpha(const GraphicData* data,int x,int y)
**
** The random effect is commented out
*/
global void VideoDraw8OnlyFog32Alpha(const GraphicData* data,int x,int y)
global void VideoDraw8OnlyFog32Alpha(const GraphicData* data __attribute__((unused)),int x,int y)
{
const VMemType8* gp;
VMemType8* dp;
@ -1098,7 +1098,7 @@ global void VideoDraw16Fog32Alpha(const GraphicData* data,int x,int y)
**
** The random effect is commented out
*/
global void VideoDraw16OnlyFog32Alpha(const GraphicData* data,int x,int y)
global void VideoDraw16OnlyFog32Alpha(const GraphicData* data __attribute__((unused)),int x,int y)
{
const VMemType16* gp;
VMemType16* dp;
@ -1199,7 +1199,7 @@ global void VideoDraw24Fog32Alpha(const GraphicData* data,int x,int y)
** @param x X position into video memory
** @param y Y position into video memory
*/
global void VideoDraw24OnlyFog32Alpha(const GraphicData* data,int x,int y)
global void VideoDraw24OnlyFog32Alpha(const GraphicData* data __attribute__((unused)),int x,int y)
{
const VMemType24* gp;
VMemType24* dp;
@ -1317,7 +1317,7 @@ global void VideoDraw32Fog32Alpha(const GraphicData* data,int x,int y)
** @param x X position into video memory
** @param y Y position into video memory
*/
global void VideoDraw32OnlyFog32Alpha(const GraphicData* data,int x,int y)
global void VideoDraw32OnlyFog32Alpha(const GraphicData* data __attribute__((unused)),int x,int y)
{
const VMemType32* gp;
VMemType32* dp;

View file

@ -216,7 +216,7 @@ global void DestroyMinimap(void)
**
** @note This one of the hot-points in the program optimize and optimize!
*/
global void DrawMinimap(int vx,int vy)
global void DrawMinimap(int vx __attribute__((unused)),int vy __attribute__((unused)))
{
static int RedPhase;
int mx;

View file

@ -31,6 +31,7 @@
//----------------------------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "freecraft.h"

View file

@ -51,7 +51,7 @@
#include "network.h"
#include "netconnect.h"
#include "commands.h"
#include "interface.h"
#define BASE_OF(type, elem, p) ((type *)((char *)(p) - offsetof(type, elem)))

View file

@ -68,18 +68,18 @@ global GameSound GameSounds
#ifndef laterUSE_CCL
// FIXME: Must make this configurable through CCL.
={
{ "placement error" },
{ "placement success" },
{ "click" },
{ "tree chopping"},
{ "transport docking"},
{ "building construction"},
{ "basic human voices work complete" },
{ "peasant work complete" },
{ "basic orc voices work complete" },
{ "repair" },
{ "rescue (human)" },
{ "rescue (orc)" },
{ "placement error" , NULL },
{ "placement success" , NULL },
{ "click" , NULL },
{ "tree chopping", NULL },
{ "transport docking", NULL },
{ "building construction", NULL },
{ "basic human voices work complete" , NULL },
{ "peasant work complete" , NULL },
{ "basic orc voices work complete" , NULL },
{ "repair" , NULL },
{ "rescue (human)" , NULL },
{ "rescue (orc)" , NULL },
}
#endif
;

View file

@ -475,7 +475,8 @@ local int KeepRequest(SoundRequest* sr) {
/*
** Register the source of a request in the selection handling hash table.
*/
local void RegisterSource(SoundRequest* sr,int channel) {
local void RegisterSource(SoundRequest* sr,int channel)
{
// always keep the last registered channel
// use channel+1 to avoid inserting null values
//FIXME: we should use here the unique identifier of the source, not only
@ -484,7 +485,12 @@ local void RegisterSource(SoundRequest* sr,int channel) {
g_hash_table_insert(UnitToChannel,(gpointer)(long)(sr->Source.Base),
(gpointer)(channel+1));
#else
DebugLevel3Fn("FIXME: must write\n");
int i;
void* p;
i=channel;
p=sr;
DebugLevel3Fn("FIXME: must write %p -> %d\n",sr,channel);
#endif
DebugLevel3("Registering %p (channel %d)\n",sr->Source.Base,channel);
}
@ -501,7 +507,10 @@ local void UnRegisterSource(int channel) {
(gpointer)(long)(Channels[channel].Source.Base));
}
#else
DebugLevel3Fn("FIXME: must write\n");
int i;
i=channel;
DebugLevel3Fn("FIXME: must write %d\n", channel);
#endif
DebugLevel3("Removing %p (channel %d)\n",Channels[channel].Source.Base,
channel);
@ -936,10 +945,10 @@ global void WriteSound(void)
{
}
/*
/**
** Fill buffer for the sound card.
*/
local void FillAudio(void* udata,Uint8* stream,int len)
local void FillAudio(void* udata __attribute__((unused)),Uint8* stream,int len)
{
int mixer_buffer[len];
int dummy1,dummy2;
@ -1127,8 +1136,9 @@ global int InitSound(void)
// ARI: the following must be done here to allow sound to work in pre-start menus!
// initialize channels
for(dummy=0;dummy<MaxChannels;)
Channels[dummy].Point=++dummy;
for(dummy=0;dummy<MaxChannels; ++dummy) {
Channels[dummy].Point=dummy+1;
}
// initialize volume (neutral point)
GlobalVolume=128;

View file

@ -31,6 +31,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "freecraft.h"
#include "video.h"

View file

@ -100,7 +100,7 @@ local void gzseek(CLFile* file,unsigned offset,int whence)
** @param offset Seek position
** @param whence How to seek
*/
local void bzseek(BZFILE* file,unsigned offset,int whence)
local void bzseek(BZFILE* file,unsigned offset,int whence __attribute__((unused)))
{
char buf[32];

View file

@ -45,6 +45,7 @@
#include "ai.h"
#include "network.h"
#include "netconnect.h"
#include "interface.h"
/*----------------------------------------------------------------------------
-- Variables
@ -534,7 +535,8 @@ global int PlayerCheckLimits(const Player* player,const UnitType* type)
**
** @note The return values of the PlayerCheck functions are inconsistent.
*/
global int PlayerCheckFood(const Player* player,const UnitType* type)
global int PlayerCheckFood(const Player* player,
const UnitType* type __attribute__((unused)))
{
// FIXME: currently all units costs 1 food

View file

@ -48,6 +48,7 @@
#include "pud.h"
#include "ccl_sound.h"
#include "ui.h"
#include "interface.h"
#include "font.h"
#include "pathfinder.h"
#include "ai.h"
@ -68,7 +69,7 @@ global int CclInConfigFile; /// True while config file parsing
**
** @param ptr Pointer into heap.
*/
global void CclFree(void* ptr)
global void CclFree(void* ptr __attribute__((unused)))
{
#if 0
#ifndef __MINGW32__

View file

@ -173,7 +173,7 @@ local SCM CclDefineMissileTypeWcNames(SCM list)
*/
local SCM CclMissile(SCM list)
{
DebugLevel0Fn("FIXME: not written\n");
DebugLevel0Fn("FIXME: not written %p\n",list);
return SCM_UNSPECIFIED;
}

View file

@ -32,6 +32,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "freecraft.h"
#include "video.h"

View file

@ -42,6 +42,12 @@
-- Includes
----------------------------------------------------------------------------*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "freecraft.h"
#include "spells.h"
#include "sound.h"
#include "missile.h"
@ -81,36 +87,41 @@
/**
** Define the names and effects of all im play available spells.
*/
global SpellType SpellTypeTable[] = {
global SpellType SpellTypeTable[]
#ifndef laterUSE_CCL
= {
//TTL's below are in ticks: approx: 500=13sec, 1000=25sec, 2000=50sec
// ident, name, range,mana,ttl, spell action, sound config
// ---human paladins---
{ "spell-holy-vision", "holy vison", 0x7F, 70, -1, SpellActionHolyVision , { "holy vision" } },
{ "spell-healing", "healing", 6, 6, -1, SpellActionHealing , { "healing" } },
{ "spell-exorcism", "exorcism", 10, 4, -1, SpellActionExorcism , { "exorcism" } },
{ "spell-holy-vision", "holy vison", 0x7F, 70, -1, SpellActionHolyVision , { "holy vision", NULL } , { NULL, NULL} },
{ "spell-healing", "healing", 6, 6, -1, SpellActionHealing , { "healing", NULL } , { NULL, NULL} },
{ "spell-exorcism", "exorcism", 10, 4, -1, SpellActionExorcism , { "exorcism", NULL } , { NULL, NULL} },
// ---human mages--- ---human mages---
{ "spell-fireball", "fireball", 8, 100,1000, SpellActionFireball , { "fireball throw" } },
{ "spell-slow", "slow", 10, 50,1000, SpellActionSlow , { "slow" } },
{ "spell-flame-shield", "flame shield", 6, 80, 600, SpellActionFlameShield , { "flame shield" }, { "missile-flame-shield" } },
{ "spell-invisibility", "invisibility", 6, 200,2000, SpellActionInvisibility , { "invisibility" } },
{ "spell-polymorph", "polymorph", 10, 200, -1, SpellActionPolymorph , { "polymorph" } },
{ "spell-blizzard", "blizzard", 12, 25, -1, SpellActionBlizzard , { "blizzard" } },
{ "spell-fireball", "fireball", 8, 100,1000, SpellActionFireball , { "fireball throw", NULL } , { NULL, NULL} },
{ "spell-slow", "slow", 10, 50,1000, SpellActionSlow , { "slow", NULL } , { NULL, NULL} },
{ "spell-flame-shield", "flame shield", 6, 80, 600, SpellActionFlameShield , { "flame shield", NULL } , { "missile-flame-shield", NULL } },
{ "spell-invisibility", "invisibility", 6, 200,2000, SpellActionInvisibility , { "invisibility", NULL } , { NULL, NULL} },
{ "spell-polymorph", "polymorph", 10, 200, -1, SpellActionPolymorph , { "polymorph", NULL } , { NULL, NULL} },
{ "spell-blizzard", "blizzard", 12, 25, -1, SpellActionBlizzard , { "blizzard", NULL } , { NULL, NULL} },
// ---orc ogres--- ---orc ogres---
{ "spell-eye-of-kilrogg", "eye of kilrogg", 6, 70, -1, SpellActionEyeOfKilrogg , { "eye of kilrogg" } },
{ "spell-bloodlust", "bloodlust", 6, 50,1000, SpellActionBloodlust , { "bloodlust" } },
{ "spell-runes", "runes", 10, 200,2000, SpellActionRunes , { "runes" } },
{ "spell-eye-of-kilrogg", "eye of kilrogg", 6, 70, -1, SpellActionEyeOfKilrogg , { "eye of kilrogg", NULL } , { NULL, NULL} },
{ "spell-bloodlust", "bloodlust", 6, 50,1000, SpellActionBloodlust , { "bloodlust", NULL } , { NULL, NULL} },
{ "spell-runes", "runes", 10, 200,2000, SpellActionRunes , { "runes", NULL } , { NULL, NULL} },
// ---orc death knights--- ---orc death knights-
{ "spell-death-coil", "death coil", 10, 100, -1, SpellActionDeathCoil , { "death coil" } },
{ "spell-haste", "haste", 6, 50,1000, SpellActionHaste , { "haste" } },
{ "spell-raise-dead", "raise dead", 6, 50, -1, SpellActionRaiseDead , { "raise dead" } },
{ "spell-whirlwind", "whirlwind", 12, 100, 801, SpellActionWhirlwind , { "whirlwind" } },
{ "spell-unholy-armor", "unholy armor", 6, 100, 500, SpellActionUnholyArmor , { "unholy armour" } },
{ "spell-death-and-decay", "death and decay", 12, 25, -1, SpellActionDeathAndDecay, { "death and decay" }},
{ "spell-death-coil", "death coil", 10, 100, -1, SpellActionDeathCoil , { "death coil", NULL } , { NULL, NULL} },
{ "spell-haste", "haste", 6, 50,1000, SpellActionHaste , { "haste", NULL } , { NULL, NULL} },
{ "spell-raise-dead", "raise dead", 6, 50, -1, SpellActionRaiseDead , { "raise dead", NULL } , { NULL, NULL} },
{ "spell-whirlwind", "whirlwind", 12, 100, 801, SpellActionWhirlwind , { "whirlwind", NULL } , { NULL, NULL} },
{ "spell-unholy-armor", "unholy armor", 6, 100, 500, SpellActionUnholyArmor , { "unholy armour", NULL } , { NULL, NULL} },
{ "spell-death-and-decay", "death and decay", 12, 25, -1, SpellActionDeathAndDecay, { "death and decay", NULL }, { NULL, NULL} },
// ---eot marker--- ---eot marker---
{ NULL }
{ NULL, NULL, 0, 0, 0, 0 , { NULL, NULL} , { NULL, NULL} }
};
#else
;
#endif
/// How many spell-types are available
local int SpellTypeCount;
@ -499,7 +510,8 @@ global SpellType *SpellTypeById(int id)
** @return =!0 if spell should/can casted, 0 if not
*/
global int CanCastSpell(const Unit* unit, const SpellType* spell,
const Unit* target, int x, int y)
const Unit* target, int x __attribute__((unused)),
int y __attribute__((unused)))
{
DebugCheck(spell == NULL);
DebugCheck(!unit->Type->CanCastSpell); // NOTE: this must not happen

View file

@ -244,7 +244,7 @@ local int WaitNoEvent; /// Flag got an event.
/**
** Callback for input.
*/
local void WaitCallbackKey(unsigned dummy)
local void WaitCallbackKey(unsigned dummy __attribute__((unused)))
{
DebugLevel3Fn("Pressed %8x %8x\n",MouseButtons,dummy);
WaitNoEvent=0;
@ -253,7 +253,8 @@ local void WaitCallbackKey(unsigned dummy)
/**
** Callback for input.
*/
local void WaitCallbackKey2(unsigned dummy1,unsigned dummy2)
local void WaitCallbackKey2(unsigned dummy1 __attribute__((unused)),
unsigned dummy2 __attribute__((unused)))
{
DebugLevel3Fn("Pressed %8x %8x %8x\n",MouseButtons,dummy1,dummy2);
WaitNoEvent=0;
@ -262,7 +263,8 @@ local void WaitCallbackKey2(unsigned dummy1,unsigned dummy2)
/**
** Callback for input.
*/
local void WaitCallbackMouse(int dummy_x,int dummy_y)
local void WaitCallbackMouse(int dummy_x __attribute__((unused)),
int dummy_y __attribute__((unused)))
{
DebugLevel3Fn("Moved %d,%d\n",dummy_x,dummy_y);
}
@ -324,7 +326,8 @@ local void WaitForInput(int timeout)
*/
local void PrintHeader(void)
{
printf("%s\n written by Lutz Sammer, Fabrice Rossi, Vladi Shabanski, Patrice Fortier,\n Jon Gabrielson, Andreas Arens and others. (http://FreeCraft.Org)"
// vvv---- looks wired, but is needed for GNU brain damage
fprintf(stdout,"%s\n written by Lutz Sammer, Fabrice Rossi, Vladi Shabanski, Patrice Fortier,\n Jon Gabrielson, Andreas Arens and others. (http://FreeCraft.Org)"
"\n SIOD Copyright by George J. Carrette."
#ifdef USE_SDL
"\n SDL Copyright by Sam Lantinga."
@ -491,13 +494,13 @@ global volatile void Exit(int err)
ExitNetwork1();
IfDebug(
DebugLevel0("Frames %d, Slow frames %d = %d%%\n"
,FrameCounter,SlowFrameCounter
,(SlowFrameCounter*100)/(FrameCounter ? : 1));
DebugLevel0( "Frames %d, Slow frames %d = %d%%\n"
_C_ FrameCounter _C_ SlowFrameCounter
_C_ (SlowFrameCounter*100)/(FrameCounter ? : 1) );
UnitCacheStatistic();
DebugLevel0("Path: Error: %u Unreachable: %u OK: %u Depth: %u\n"
,PfCounterFail,PfCounterNotReachable
,PfCounterOk,PfCounterDepth);
_C_ PfCounterFail _C_ PfCounterNotReachable
_C_ PfCounterOk _C_ PfCounterDepth);
);
#ifdef DEBUG
CclUnits();

View file

@ -33,6 +33,7 @@
----------------------------------------------------------------------------*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "freecraft.h"
@ -65,7 +66,7 @@
** @param button Pointer to button to check/enable.
** @return True if enabled.
*/
global int ButtonCheckTrue(const Unit* unit,const ButtonAction* button)
global int ButtonCheckTrue(const Unit* unit __attribute__((unused)),const ButtonAction* button __attribute__((unused)))
{
return 1;
}
@ -78,7 +79,7 @@ global int ButtonCheckTrue(const Unit* unit,const ButtonAction* button)
** @param button Pointer to button to check/enable.
** @return True if enabled.
*/
global int ButtonCheckFalse(const Unit* unit,const ButtonAction* button)
global int ButtonCheckFalse(const Unit* unit __attribute__((unused)),const ButtonAction* button __attribute__((unused)))
{
return 0;
}
@ -141,7 +142,7 @@ global int ButtonCheckUnits(const Unit* unit,const ButtonAction* button)
**
** NOTE: this check could also be moved into intialisation.
*/
global int ButtonCheckNetwork(const Unit* unit,const ButtonAction* button)
global int ButtonCheckNetwork(const Unit* unit __attribute__((unused)),const ButtonAction* button __attribute__((unused)))
{
return NetworkFildes!=-1;
}
@ -154,7 +155,7 @@ global int ButtonCheckNetwork(const Unit* unit,const ButtonAction* button)
** @param button Pointer to button to check/enable.
** @return True if enabled.
*/
global int ButtonCheckNoWork(const Unit* unit,const ButtonAction* button)
global int ButtonCheckNoWork(const Unit* unit,const ButtonAction* button __attribute__((unused)))
{
return unit->Type->Building
&& unit->Orders[0].Action != UnitActionTrain
@ -169,7 +170,7 @@ global int ButtonCheckNoWork(const Unit* unit,const ButtonAction* button)
** @param button Pointer to button to check/enable.
** @return True if enabled.
*/
global int ButtonCheckNoResearch(const Unit* unit,const ButtonAction* button)
global int ButtonCheckNoResearch(const Unit* unit,const ButtonAction* button __attribute__((unused)))
{
return unit->Type->Building
&& unit->Orders[0].Action != UnitActionUpgradeTo
@ -199,7 +200,7 @@ global int ButtonCheckUpgradeTo(const Unit* unit,const ButtonAction* button)
** @param button Pointer to button to check/enable.
** @return True if enabled.
*/
global int ButtonCheckAttack(const Unit* unit,const ButtonAction* button)
global int ButtonCheckAttack(const Unit* unit,const ButtonAction* button __attribute__((unused)))
{
return unit->Type->CanAttack;
}

View file

@ -760,7 +760,7 @@ global void HandleKeyDown(unsigned key,unsigned keychar)
**
** @param key Key scancode.
*/
global void HandleKeyUp(unsigned key,unsigned keychar)
global void HandleKeyUp(unsigned key,unsigned keychar __attribute__((unused)))
{
switch( key ) {
case KeyCodeShift:

View file

@ -647,12 +647,13 @@ global int CheckRepeatMessage( const char* msg )
**
** @param fmt To be displayed in text overlay.
*/
global void SetMessage( char* fmt, ... )
global void SetMessage( const char* fmt, ... )
{
char temp[128];
va_list va;
va_start( va, fmt );
vsprintf( temp, fmt, va );
vsprintf( temp, fmt, va ); // BUG ALERT: buffer overrun
va_end( va );
if ( CheckRepeatMessage( temp ) )
return;
@ -670,7 +671,7 @@ global void SetMessage( char* fmt, ... )
** @param y Message Y map origin.
** @param fmt To be displayed in text overlay.
*/
global void SetMessage2( int x, int y, char* fmt, ... )
global void SetMessage2( int x, int y, const char* fmt, ... )
{
//FIXME: vladi: I know this can be just separated func w/o msg but
// it is handy to stick all in one call, someone?
@ -714,23 +715,6 @@ global void SetMessageDup(const char* message)
SetMessage(MessageBuffer);
}
/**
** Append message to display.
**
** @param message To be displayed in text overlay.
*/
global void SetMessageDupCat(const char* message)
{
//FIXME: is this function correct now?
// it was, before multi-messages support done
// JOHNS: this is wrong it should append to the last message.
strncat(MessageBuffer,message,sizeof(MessageBuffer)-strlen(MessageBuffer));
MessageBuffer[sizeof(MessageBuffer)-1]='\0';
SetMessage(MessageBuffer);
}
/**
** Goto message origin.
*/

View file

@ -144,7 +144,9 @@ local struct {
#else
{ "interface/buttons 1.png" ,"interface/buttons 2.png" },
#endif
300, 7632
300, 7632,
NULL
};
/**
@ -1982,7 +1984,7 @@ local void MultiGameSetupInit(Menuitem *mi)
NetworkInitServerConnect();
}
local void MultiGameSetupExit(Menuitem *mi)
local void MultiGameSetupExit(Menuitem *mi __attribute__((unused)))
{
// FIXME : Not called yet
NetworkExitServerConnect();
@ -2019,7 +2021,7 @@ local void NetMultiPlayerDrawFunc(Menuitem *mi)
}
local void MultiGameClientInit(Menuitem *mi)
local void MultiGameClientInit(Menuitem *mi __attribute__((unused)))
{
// GameSetupInit(mi);
MultiGameClientUpdate(1);
@ -2509,7 +2511,7 @@ global void MenuHandleMouseMove(int x,int y)
**
** @param b button code
*/
global void MenuHandleButtonDown(int b)
global void MenuHandleButtonDown(int b __attribute__((unused)))
{
Menuitem *mi;
Menu *menu = Menus + CurrentMenu;

View file

@ -31,6 +31,7 @@
----------------------------------------------------------------------------*/
#include <stdio.h>
#include <stdlib.h>
#include "freecraft.h"
#include "tileset.h"
@ -941,7 +942,7 @@ local void SendCommand(int x,int y)
** @param num Button number.
** @param button Mouse Button pressed.
*/
local void DoSelectionButtons(unsigned num,unsigned button)
local void DoSelectionButtons(unsigned num,unsigned button __attribute__((unused)))
{
Unit* unit;
@ -971,7 +972,7 @@ local void DoSelectionButtons(unsigned num,unsigned button)
**
** @param button Button pressed down.
*/
local void UISelectStateButtonDown(unsigned button)
local void UISelectStateButtonDown(unsigned button __attribute__((unused)))
{
int mx;
int my;

View file

@ -372,6 +372,7 @@ local SCM CclDefineUI(SCM list)
//
// Some value defaults
//
#if 1
ui->Contrast=TheUI.Contrast;
ui->Brightness=TheUI.Brightness;
ui->Saturation=TheUI.Saturation;
@ -386,6 +387,22 @@ local SCM CclDefineUI(SCM list)
ui->MouseScale=TheUI.MouseScale;
ui->OriginalResources=TheUI.OriginalResources;
#else
ui->Contrast=100;
ui->Brightness=0;
ui->Saturation=100;
ui->MouseScroll=1;
ui->ReverseMouseMove=0;
ui->WarpX=-1;
ui->WarpY=-1;
ui->MouseAdjust=MOUSEADJUST;
ui->MouseScale=MOUSESCALE;
ui->OriginalResources=0;
#endif
//
// Now the real values.
@ -726,8 +743,8 @@ local SCM CclDefineUI(SCM list)
//StephanR: note that the bottom-right point is one pixel off
ui->MapEndX=x - 1;
ui->MapEndY=y - 1;
if ( ui->MapEndX < 0 || ui->MapEndY < 0 ||
ui->MapEndX < ui->MapX || ui->MapEndY < ui->MapY ) {
if ( x < 1 || y < 1 ||
ui->MapEndX < ui->MapX || ui->MapEndY < ui->MapY ) {
fprintf(stderr,"map bottom-right point expected\n");
return SCM_UNSPECIFIED;
}

View file

@ -51,7 +51,9 @@ global char FancyBuildings; /// Mirror buildings 1 yes, 0 now.
**
** @todo FIXME: check if everything is initialized from ccl.
*/
global UI TheUI = {
global UI TheUI
#if 1
= {
"default", 640, 480, // interface selector
100, 0, 100, // contrast, brightness, saturation
@ -62,6 +64,9 @@ global UI TheUI = {
MOUSEADJUST, // mouse speed
MOUSESCALE, // mouse scale
};
#else
;
#endif
/**
** The available user interfaces.
@ -74,7 +79,7 @@ global UI** UI_Table;
/**
** Initialize the user interface.
*/
global void InitUserInterface(char *RaceName)
global void InitUserInterface(const char *RaceName)
{
int i;
int best;

View file

@ -417,7 +417,7 @@ local SCM CclDefineDependency(SCM list)
*/
local SCM CclGetDependency(SCM target)
{
DebugLevel0Fn("FIXME: write this\n");
DebugLevel0Fn("FIXME: write this %p\n",target);
return SCM_UNSPECIFIED;
}
@ -431,7 +431,7 @@ local SCM CclGetDependency(SCM target)
*/
local SCM CclCheckDependency(SCM target)
{
DebugLevel0Fn("FIXME: write this\n");
DebugLevel0Fn("FIXME: write this %p\n",target);
return SCM_UNSPECIFIED;
}

View file

@ -630,9 +630,9 @@ global void UnitLost(const Unit* unit)
player->UnitTypesCount[type->Type]--;
DebugCheck( player->NumFoodUnits < 0 );
DebugCheck( player->NumBuildings < 0 );
DebugCheck( player->UnitTypesCount[type->Type] < 0 );
DebugCheck( player->NumFoodUnits > UnitMax);
DebugCheck( player->NumBuildings > UnitMax);
DebugCheck( player->UnitTypesCount[type->Type] > UnitMax);
}
/**
@ -1968,7 +1968,8 @@ global int CanBuildUnitType(const Unit* unit,const UnitType* type,int x,int y)
**
** @return Pointer to the nearest gold mine.
*/
global Unit* FindGoldMine(const Unit* source,int x,int y)
global Unit* FindGoldMine(const Unit* source __attribute__((unused)),
int x,int y)
{
Unit** table;
Unit* unit;

View file

@ -286,9 +286,9 @@ global Decoration ShadowSprite
#ifndef laterUSE_CCL
// FIXME: Must make this configurable through CCL.
#ifdef NEW_NAMES
= { "graphics/missiles/unit shadow.png", 0,42, 32,32 };
= { "graphics/missiles/unit shadow.png", 0,42, 32,32, 0 };
#else
= { "graphic/unit shadow.png", 0,42, 32,32 };
= { "graphic/unit shadow.png", 0,42, 32,32, 0 };
#endif
#endif
;
@ -780,7 +780,8 @@ local void DrawDecoration(const Unit* unit,const UnitType* type,int x,int y)
** @param x Screen X position of the unit.
** @param y Screen Y position of the unit.
*/
local void DrawShadow(const Unit* unit,const UnitType* type,int x,int y)
local void DrawShadow(const Unit* unit __attribute__((unused)),
const UnitType* type,int x,int y)
{
int i;

View file

@ -31,6 +31,7 @@
----------------------------------------------------------------------------*/
#include <stdio.h>
#include <stdlib.h>
#include "freecraft.h"
#include "video.h"

View file

@ -52,11 +52,6 @@ extern int ClipY1; /// current clipping top left
extern int ClipX2; /// current clipping bottom right
extern int ClipY2; /// current clipping bottom right
#ifdef DEBUG
extern unsigned AllocatedGraphicMemory;
extern unsigned CompressedGraphicMemory;
#endif
/*----------------------------------------------------------------------------
-- Variables
----------------------------------------------------------------------------*/

View file

@ -916,9 +916,9 @@ local void DrawTransPixel8(SysColors color,int x,int y
** @param alpha alpha value of pixel.
*/
local void DrawNoTransPixel8(SysColors color,int x,int y
,unsigned char alpha)
,unsigned char alpha __attribute__((unused)))
{
DrawPixel8(color,x,y);
DrawPixel8(color,x,y);
}
/**
@ -995,7 +995,7 @@ local void DrawTransPixel16(SysColors color,int x,int y
** @param alpha alpha value of pixel.
*/
local void DrawTransPixel24(SysColors color,int x,int y
,unsigned char alpha)
,unsigned char alpha __attribute__((unused)))
{
//FIXME: does 24bpp represents R|G|B?
VideoMemory24[x+y*VideoWidth]=Pixels24[color];
@ -1302,7 +1302,8 @@ local void Draw25TransHLine8(SysColors color,int x,int y,unsigned width)
c=Pixels8[color]<<8;
while( p<e ) {
*p++ = lookup25trans8[ c | *p ];
*p = lookup25trans8[ c | *p ];
++p;
}
}
@ -1437,7 +1438,8 @@ local void Draw50TransHLine8(SysColors color,int x,int y,unsigned width)
c=Pixels8[color]<<8;
while( p<e ) {
*p++ = lookup50trans8[ c | *p ];
*p = lookup50trans8[ c | *p ];
++p;
}
}
@ -1569,7 +1571,8 @@ local void Draw75TransHLine8(SysColors color,int x,int y,unsigned width)
c=Pixels8[color];
while( p<e ) {
*p++ = lookup25trans8[ (*p<<8) | c ];
*p = lookup25trans8[ (*p<<8) | c ];
++p;
}
}
@ -1711,19 +1714,22 @@ local void DrawTransHLine8(SysColors color,int x,int y,unsigned width
break;
case 1:
while( p<e ) {
*p++ = lookup25trans8[ (*p<<8) | c ];
*p = lookup25trans8[ (*p<<8) | c ];
++p;
}
break;
case 2:
c<<=8;
while( p<e ) {
*p++ = lookup50trans8[ c | *p ];
*p = lookup50trans8[ c | *p ];
++p;
}
break;
case 3:
c<<=8;
while( p<e ) {
*p++ = lookup25trans8[ c | *p ];
*p = lookup25trans8[ c | *p ];
++p;
}
break;
default:
@ -1740,9 +1746,9 @@ local void DrawTransHLine8(SysColors color,int x,int y,unsigned width
** @param alpha alpha value of pixel.
*/
local void DrawNoTransHLine8(SysColors color,int x,int y,unsigned width
,unsigned char alpha)
,unsigned char alpha __attribute__((unused)))
{
DrawHLine8(color,x,y,width);
DrawHLine8(color,x,y,width);
}
/**
@ -2548,9 +2554,9 @@ local void DrawTransVLine8(SysColors color,int x,int y,unsigned height
** @param alpha alpha value of pixel.
*/
local void DrawNoTransVLine8(SysColors color,int x,int y,unsigned height
,unsigned char alpha)
,unsigned char alpha __attribute__((unused)))
{
DrawVLine8(color,x,y,height);
DrawVLine8(color,x,y,height);
}
/**
@ -2631,10 +2637,10 @@ local void DrawTransVLine16(SysColors color,int x,int y,unsigned height
** @param alpha alpha value of pixels.
*/
local void DrawTransVLine24(SysColors color,int x,int y,unsigned height
,unsigned char alpha)
,unsigned char alpha __attribute__((unused)))
{
// FIXME: does 24bpp holds R|G|B ?
DrawVLine24(color,x,y,height); // no trans functionaility for the moment :(
DrawVLine24(color,x,y,height); // no trans functionaility for the moment :(
}
/**
@ -3413,7 +3419,8 @@ local void Draw25TransRectangle8(SysColors color,int x,int y
c=Pixels8[color]<<8;
if ( h && (ofs=w) ) {
do { // Draw top horizontal line
*p++ = lookup25trans8[ c | *p ];
*p = lookup25trans8[ c | *p ];
++p;
} while( --ofs );
if ( --h ) {
@ -3431,7 +3438,8 @@ local void Draw25TransRectangle8(SysColors color,int x,int y
}
do { // Draw bottom horizontal line
*p++ = lookup25trans8[ c | *p ];
*p = lookup25trans8[ c | *p ];
++p;
} while( ofs-- );
}
}
@ -3677,7 +3685,8 @@ local void Draw50TransRectangle8(SysColors color,int x,int y
c=Pixels8[color]<<8;
if ( h && (ofs=w) ) {
do { // Draw top horizontal line
*p++ = lookup50trans8[ c | *p ];
*p = lookup50trans8[ c | *p ];
++p;
} while( --ofs );
if ( --h ) {
@ -3695,7 +3704,8 @@ local void Draw50TransRectangle8(SysColors color,int x,int y
}
do { // Draw bottom horizontal line
*p++ = lookup50trans8[ c | *p ];
*p = lookup50trans8[ c | *p ];
++p;
} while( ofs-- );
}
}
@ -3939,7 +3949,8 @@ local void Draw75TransRectangle8(SysColors color,int x,int y
c=Pixels8[color];
if ( h && (ofs=w) ) {
do { // Draw top horizontal line
*p++ = lookup25trans8[ (*p<<8) | c ];
*p = lookup25trans8[ (*p<<8) | c ];
++p;
} while( --ofs );
if ( --h ) {
@ -3957,7 +3968,8 @@ local void Draw75TransRectangle8(SysColors color,int x,int y
}
do { // Draw bottom horizontal line
*p++ = lookup25trans8[ (*p<<8) | c ];
*p = lookup25trans8[ (*p<<8) | c ];
++p;
} while( ofs-- );
}
}
@ -4222,9 +4234,9 @@ local void DrawTransRectangle8(SysColors color,int x,int y
** @param alpha alpha value of pixel.
*/
local void DrawNoTransRectangle8(SysColors color,int x,int y
,unsigned w,unsigned h,unsigned char alpha)
,unsigned w,unsigned h,unsigned char alpha __attribute__((unused)))
{
DrawRectangle8(color,x,y,w,h);
DrawRectangle8(color,x,y,w,h);
}
/**
@ -4370,10 +4382,10 @@ local void DrawTransRectangle16(SysColors color,int x,int y
** @param alpha alpha value of pixel.
*/
local void DrawTransRectangle24(SysColors color,int x,int y
,unsigned w,unsigned h,unsigned char alpha)
,unsigned w,unsigned h,unsigned char alpha __attribute__((unused)))
{
//FIXME: does 24bpp represents R|G|B?
DrawRectangle24(color,x,y,w,h); // no trans functionaility for the moment :(
DrawRectangle24(color,x,y,w,h); // no trans functionaility for the moment :(
}
/**
@ -4831,7 +4843,8 @@ local void DrawFill25TransRectangle8(SysColors color,int x,int y
while( h-- ) {
i=w;
do {
*p++ = lookup25trans8[ c | *p ];
*p = lookup25trans8[ c | *p ];
++p;
} while ( --i );
p+=swidth;
}
@ -4992,7 +5005,8 @@ local void DrawFill50TransRectangle8(SysColors color,int x,int y
while( h-- ) {
i=w;
do {
*p++ = lookup50trans8[ c | *p ];
*p = lookup50trans8[ c | *p ];
++p;
} while ( --i );
p+=swidth;
}
@ -5150,7 +5164,8 @@ local void DrawFill75TransRectangle8(SysColors color,int x,int y
while( h-- ) {
i=w;
do {
*p++ = lookup25trans8[ (*p<<8) | c ];
*p = lookup25trans8[ (*p<<8) | c ];
++p;
} while ( --i );
p+=swidth;
}
@ -5312,7 +5327,8 @@ local void DrawFillTransRectangle8(SysColors color,int x,int y
while( h-- ) {
i=w;
do {
*p++ = c;
*p = c;
++p;
} while ( --i );
p+=swidth;
}
@ -5322,7 +5338,8 @@ local void DrawFillTransRectangle8(SysColors color,int x,int y
while( h-- ) {
i=w;
do {
*p++ = lookup25trans8[ *p | c ];
*p = lookup25trans8[ *p | c ];
++p;
} while ( --i );
p+=swidth;
}
@ -5332,7 +5349,8 @@ local void DrawFillTransRectangle8(SysColors color,int x,int y
while( h-- ) {
i=w;
do {
*p++ = lookup50trans8[ *p | c ];
*p = lookup50trans8[ *p | c ];
++p;
} while ( --i );
p+=swidth;
}
@ -5341,7 +5359,8 @@ local void DrawFillTransRectangle8(SysColors color,int x,int y
while( h-- ) {
i=w;
do {
*p++ = lookup25trans8[ (*p<<8) | c ];
*p = lookup25trans8[ (*p<<8) | c ];
++p;
} while ( --i );
p+=swidth;
}
@ -5362,9 +5381,9 @@ local void DrawFillTransRectangle8(SysColors color,int x,int y
** @param alpha alpha value of pixel.
*/
local void DrawFillNoTransRectangle8(SysColors color,int x,int y
,unsigned w,unsigned h,unsigned char alpha)
,unsigned w,unsigned h,unsigned char alpha __attribute__((unused)))
{
DrawFillRectangle8(color,x,y,w,h);
DrawFillRectangle8(color,x,y,w,h);
}
/**
@ -5452,10 +5471,10 @@ local void DrawFillTransRectangle16(SysColors color,int x,int y
** @param alpha alpha value of pixel.
*/
local void DrawFillTransRectangle24(SysColors color,int x,int y
,unsigned w,unsigned h,unsigned char alpha)
,unsigned w,unsigned h,unsigned char alpha __attribute__((unused)))
{
//FIXME: does 24bpp represents R|G|B?
DrawFillRectangle24(color,x,y,w,h); // no trans functionaility :(
DrawFillRectangle24(color,x,y,w,h); // no trans functionaility :(
}
/**

View file

@ -42,10 +42,6 @@
-- Variables
----------------------------------------------------------------------------*/
#ifdef DEBUG
extern unsigned AllocatedGraphicMemory; /// counter for allocated video memory
#endif
/*----------------------------------------------------------------------------
-- Functions
----------------------------------------------------------------------------*/

View file

@ -49,11 +49,6 @@ extern int ClipY1; /// current clipping top left
extern int ClipX2; /// current clipping bottom right
extern int ClipY2; /// current clipping bottom right
#ifdef DEBUG
extern unsigned AllocatedGraphicMemory;
extern unsigned CompressedGraphicMemory;
#endif
/*----------------------------------------------------------------------------
-- Variables
----------------------------------------------------------------------------*/

View file

@ -17,6 +17,7 @@
//
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#undef main