[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus/src/clone ccl_spell.c
From: |
Russell Smith |
Subject: |
[Stratagus-CVS] stratagus/src/clone ccl_spell.c |
Date: |
Tue, 23 Sep 2003 20:56:29 -0400 |
CVSROOT: /cvsroot/stratagus
Module name: stratagus
Branch:
Changes by: Russell Smith <address@hidden> 03/09/23 20:56:29
Modified files:
src/clone : ccl_spell.c
Log message:
Fixes to compile on win32
Patches:
Index: stratagus/src/clone/ccl_spell.c
diff -u stratagus/src/clone/ccl_spell.c:1.2 stratagus/src/clone/ccl_spell.c:1.3
--- stratagus/src/clone/ccl_spell.c:1.2 Mon Sep 22 15:13:08 2003
+++ stratagus/src/clone/ccl_spell.c Tue Sep 23 20:56:29 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: ccl_spell.c,v 1.2 2003/09/22 19:13:08 n0body Exp $
+// $Id: ccl_spell.c,v 1.3 2003/09/24 00:56:29 mr-russ Exp $
//@{
/*----------------------------------------------------------------------------
@@ -164,11 +164,11 @@
{
char *missilewhencastname = NULL;
- assert (id != NULL);
- assert (spell != NULL);
+
MissileType *missile = spell->Missile;
-
+ assert (id != NULL);
+ assert (spell != NULL);
missilewhencastname = gh_scm2newstr(list, NULL);
spell->Missile = MissileTypeByIdent(missilewhencastname);
if (missile != NULL && spell->Missile != missile) {
@@ -393,12 +393,12 @@
*/
local char ccl_spell_action_healing(const char *SpellName, SCM list,
SpellActionType *spellaction)
{
- assert(SpellName);
- assert(spellaction != NULL);
+
SCM value;
int HP = 0;
-
+ assert(SpellName);
+ assert(spellaction != NULL);
for (; !gh_null_p(list); list = gh_cdr(list)) {
value = gh_car(list);
list = gh_cdr(list);
@@ -514,12 +514,14 @@
*/
local char ccl_spell_action_summon(const char *SpellName, SCM list,
SpellActionType *spellaction)
{
- assert(SpellName);
- assert(spellaction != NULL);
+
char *str;
UnitType *unittype;
+ assert(SpellName);
+ assert(spellaction != NULL);
+
str = gh_scm2newstr(list, NULL);
unittype = UnitTypeByIdent(str);
spellaction->summon.unittype = unittype;
@@ -621,11 +623,13 @@
*/
local void pushback_condition(t_Conditions **begin, t_Conditions *cond)
{
- assert(begin != NULL);
- assert(cond != NULL);
+
t_Conditions *next;
+ assert(begin != NULL);
+ assert(cond != NULL);
+
if (*begin == NULL) {
*begin = cond;
return ;
@@ -680,13 +684,13 @@
local void ccl_UnitTypeFlag(const char *SpellName, const char *id, SCM list,
t_Conditions **generic, t_Conditions **specific)
{
- assert(id != NULL);
- assert(SpellName != NULL);
- assert(generic != NULL);
- assert(specific != NULL);
+
SCM value;
t_Conditions *cond;
+
+
+
struct {
const char *id;
int flag;
@@ -700,6 +704,12 @@
};
int i;
+ assert(id != NULL);
+ assert(SpellName != NULL);
+ assert(generic != NULL);
+ assert(specific != NULL);
+
+
cond = malloc(sizeof(*cond));
memset(cond, 0, sizeof(*cond));
value = gh_car(list);
@@ -731,10 +741,7 @@
local void ccl_DurationEffect(const char *SpellName, const char *id, SCM
list,
t_Conditions **generic, t_Conditions **specific)
{
- assert(id != NULL);
- assert(SpellName != NULL);
- assert(generic != NULL);
- assert(specific != NULL);
+
SCM value;
t_Conditions *cond;
@@ -756,6 +763,11 @@
};
int i;
+ assert(id != NULL);
+ assert(SpellName != NULL);
+ assert(generic != NULL);
+ assert(specific != NULL);
+
cond = malloc(sizeof(*cond));
memset(cond, 0, sizeof(*cond));
value = gh_car(list);
@@ -805,14 +817,15 @@
void ccl_enemy_presence(const char *SpellName, const char *id, SCM list,
t_Conditions **generic, t_Conditions **specific)
{
- assert(id != NULL);
+
+ SCM value;
+ t_Conditions *cond;
+
+ assert(id != NULL);
assert(SpellName != NULL);
assert(generic != NULL);
assert(specific != NULL);
- SCM value;
- t_Conditions *cond;
-
cond = malloc(sizeof(*cond));
memset(cond, 0, sizeof(*cond));
value = gh_car(list);
@@ -847,14 +860,16 @@
void ccl_alliance(const char *SpellName, const char *id, SCM list,
t_Conditions **generic, t_Conditions **specific)
{
+
+
+ SCM value;
+ t_Conditions *cond;
+
assert(id != NULL);
assert(SpellName != NULL);
assert(generic != NULL);
assert(specific != NULL);
- SCM value;
- t_Conditions *cond;
-
cond = malloc(sizeof(*cond));
memset(cond, 0, sizeof(*cond));
value = /*gh_car(*/list/*)*/;
@@ -872,10 +887,7 @@
local void ccl_spell_all_condition(const char*SpellName, const char *id, SCM
list,
t_Conditions **generic, t_Conditions **specific)
{
- assert(id != NULL);
- assert(SpellName != NULL);
- assert(generic != NULL);
- assert(specific != NULL);
+
int i;
struct {
@@ -890,6 +902,13 @@
};
SCM value;
+
+ assert(id != NULL);
+ assert(SpellName != NULL);
+ assert(generic != NULL);
+ assert(specific != NULL);
+
+
for (; !gh_null_p(list); list = gh_cdr(list)) {
value = gh_car(list);
for (i = 0; parser[i].id != NULL; i++) {
@@ -917,11 +936,13 @@
local void ccl_spell_autocast(const char *id, SCM list, SpellType *spell)
{
- assert(id != NULL);
- assert(spell != NULL);
+
SCM value;
int range;
+
+ assert(id != NULL);
+ assert(spell != NULL);
value = gh_car(list);
if (!gh_eq_p(value, gh_symbol2scm("range"))) {