File: ccl_unittype.c

package info (click to toggle)
ale-clone 1.15pre16.3-1
  • links: PTS
  • area: contrib
  • in suites: potato
  • size: 2,432 kB
  • ctags: 3,217
  • sloc: ansic: 37,483; sh: 1,105; makefile: 343
file content (84 lines) | stat: -rw-r--r-- 1,402 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*
**	A clone of a famous game.
*/
/**@name ccl_unittype.c	-	The unit-type ccl functions. */
/*
**	(c) Copyright 1999 by Lutz Sammer
**
**	$Id: ccl_unittype.c,v 1.4 1999/03/01 00:21:42 root Exp $
*/

//@{

#include <stdio.h>

#include "clone.h"

#ifdef USE_CCL	// {

#include "video.h"
#include "tileset.h"
#include "map.h"
#include "sound_id.h"
#include "unitsound.h"
#include "unittype.h"
#include "icons.h"
#include "ccl.h"

#include <guile/gh.h>			// I use guile for a quick hack

extern SCM gh_new_procedureN(char* proc_name, SCM (*fn) ());

/**
**	Parse unit-type.
**
**	@param list	List describing missile.
*/
local SCM CclUnitType(SCM list)
{
    SCM value;
    int type;

    return list;

    //	Slot
    value=gh_car(list);
    type=gh_scm2int(value);
    list=gh_cdr(list);
    DebugLevel3("UnitType: %d\n",type);

    //	Name
    value=gh_car(list);
    UnitTypes[type].Name=gh_scm2newstr(value,NULL);
    list=gh_cdr(list);

    //	Graphics
    value=gh_car(list);

    //	FIXME: more ...

    return list;
}

/**
**	Generate C - table for UnitTypes.
*/
local SCM CclPrintUnitTypeTable(void)
{
    PrintUnitTypeTable();

    return SCM_UNSPECIFIED;
}

/**
**	Register CCL features for unit-type.
*/
global void UnitTypeCclRegister(void)
{
    gh_new_procedureN("unit-type",CclUnitType);
    gh_new_procedure0_0("print-unit-type-table",CclPrintUnitTypeTable);
}

#endif	// } USE_CCL

//@}