[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus data/ccl/spells.ccl doc/ccl/unittype....
From: |
Crestez Leonard |
Subject: |
[Stratagus-CVS] stratagus data/ccl/spells.ccl doc/ccl/unittype.... |
Date: |
Tue, 28 Oct 2003 07:08:30 -0500 |
CVSROOT: /cvsroot/stratagus
Module name: stratagus
Branch:
Changes by: Crestez Leonard <address@hidden> 03/10/28 07:08:30
Modified files:
data/ccl : spells.ccl
doc/ccl : unittype.html
src/clone : ccl_spell.c spells.c
src/include : spells.h unittype.h
src/unit : ccl_unittype.c unittype.c
Log message:
Made volatile a bool flag.
Patches:
Index: stratagus/data/ccl/spells.ccl
diff -u stratagus/data/ccl/spells.ccl:1.17 stratagus/data/ccl/spells.ccl:1.18
--- stratagus/data/ccl/spells.ccl:1.17 Sun Oct 26 19:36:19 2003
+++ stratagus/data/ccl/spells.ccl Tue Oct 28 07:08:27 2003
@@ -26,11 +26,11 @@
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
;;
-;; $Id: spells.ccl,v 1.17 2003/10/27 00:36:19 n0body Exp $
+;; $Id: spells.ccl,v 1.18 2003/10/28 12:08:27 n0body Exp $
;; For documentation see stratagus/doc/ccl/ccl.html ;; FIXME write and move
doc.
-(define-bool-flags 'isundead 'organic 'hero)
+(define-bool-flags 'isundead 'organic 'hero 'volatile)
;; Declare some unit types used in spells. This is quite accetable, the other
;; way would be to define can-cast-spell outside unit definitions, not much
of an improvement.
Index: stratagus/doc/ccl/unittype.html
diff -u stratagus/doc/ccl/unittype.html:1.38
stratagus/doc/ccl/unittype.html:1.39
--- stratagus/doc/ccl/unittype.html:1.38 Sun Oct 26 19:36:19 2003
+++ stratagus/doc/ccl/unittype.html Tue Oct 28 07:08:27 2003
@@ -426,10 +426,6 @@
behaviour of wc2 oil platforms. It is followed by the building type it must
be built on.
</dd>
-<dt>volatile</dt>
-<dd>This should be true for suicide bombers, a bit of a hack. Available as a
-target check for spells, making those invisible would ruin the game.
-</dd>
<dt>coward</dt>
<dd>Unit will not attack on sight, and will run away instead of retaliating.
Use this for units that can't attack or are next to useless in combat (like
@@ -771,7 +767,7 @@
<h4>Not Used</h4>
<hr>
-Last changed: $Id: unittype.html,v 1.38 2003/10/27 00:36:19 n0body Exp $<br>
+Last changed: $Id: unittype.html,v 1.39 2003/10/28 12:08:27 n0body Exp $<br>
All trademarks and copyrights on this page are owned by their respective
owners.
<address>(c) 2002-2003 by <a href="http://stratagus.org">
The Stratagus Project</a></address></body></html>
Index: stratagus/src/clone/ccl_spell.c
diff -u stratagus/src/clone/ccl_spell.c:1.22
stratagus/src/clone/ccl_spell.c:1.23
--- stratagus/src/clone/ccl_spell.c:1.22 Mon Oct 27 05:49:36 2003
+++ stratagus/src/clone/ccl_spell.c Tue Oct 28 07:08:29 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: ccl_spell.c,v 1.22 2003/10/27 10:49:36 pludov Exp $
+// $Id: ccl_spell.c,v 1.23 2003/10/28 12:08:29 n0body Exp $
//@{
/*----------------------------------------------------------------------------
@@ -366,10 +366,7 @@
while (!gh_null_p(list)) {
value = gh_car(list);
list = gh_cdr(list);
- if (gh_eq_p(value, gh_symbol2scm("volatile"))) {
- condition->Volatile = Scm2Condition(gh_car(list));
- list = gh_cdr(list);
- } else if (gh_eq_p(value, gh_symbol2scm("coward"))) {
+ if (gh_eq_p(value, gh_symbol2scm("coward"))) {
condition->Coward = Scm2Condition(gh_car(list));
list = gh_cdr(list);
} else if (gh_eq_p(value, gh_symbol2scm("alliance"))) {
@@ -725,9 +722,6 @@
// First save data related to flags.
// NOTE: (int) is there to keep compilers happy.
//
- if (condition->Volatile != CONDITION_TRUE) {
- CLprintf(file, "volatile %s ", condstrings[(int)condition->Volatile]);
- }
if (condition->Coward != CONDITION_TRUE) {
CLprintf(file, "coward %s ", condstrings[(int)condition->Coward]);
}
Index: stratagus/src/clone/spells.c
diff -u stratagus/src/clone/spells.c:1.117 stratagus/src/clone/spells.c:1.118
--- stratagus/src/clone/spells.c:1.117 Sun Oct 26 14:46:04 2003
+++ stratagus/src/clone/spells.c Tue Oct 28 07:08:29 2003
@@ -27,7 +27,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: spells.c,v 1.117 2003/10/26 19:46:04 n0body Exp $
+// $Id: spells.c,v 1.118 2003/10/28 12:08:29 n0body Exp $
/*
** And when we cast our final spell
@@ -776,11 +776,6 @@
// Now check conditions regarding the target unit.
//
if (target) {
- if (condition->Volatile != CONDITION_TRUE) {
- if ((condition->Volatile == CONDITION_ONLY) ^
(target->Type->Volatile)) {
- return 0;
- }
- }
if (condition->Building != CONDITION_TRUE) {
if ((condition->Building == CONDITION_ONLY) ^
(target->Type->Building)) {
return 0;
Index: stratagus/src/include/spells.h
diff -u stratagus/src/include/spells.h:1.35 stratagus/src/include/spells.h:1.36
--- stratagus/src/include/spells.h:1.35 Sat Oct 25 14:58:43 2003
+++ stratagus/src/include/spells.h Tue Oct 28 07:08:30 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: spells.h,v 1.35 2003/10/25 18:58:43 n0body Exp $
+// $Id: spells.h,v 1.36 2003/10/28 12:08:30 n0body Exp $
#ifndef __SPELLS_H__
#define __SPELLS_H__
@@ -189,7 +189,6 @@
#define CONDITION_FALSE 1
#define CONDITION_TRUE 0
#define CONDITION_ONLY 2
- char Volatile; /// Target is volatile (suicide bomber).
char Coward; /// Target is coward. Don't bloodlust them.
char Alliance; /// Target is allied.
char Building; /// Target is a building.
Index: stratagus/src/include/unittype.h
diff -u stratagus/src/include/unittype.h:1.123
stratagus/src/include/unittype.h:1.124
--- stratagus/src/include/unittype.h:1.123 Sun Oct 26 14:46:05 2003
+++ stratagus/src/include/unittype.h Tue Oct 28 07:08:30 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: unittype.h,v 1.123 2003/10/26 19:46:05 n0body Exp $
+// $Id: unittype.h,v 1.124 2003/10/28 12:08:30 n0body Exp $
#ifndef __UNITTYPE_H__
#define __UNITTYPE_H__
@@ -408,10 +408,6 @@
** Only valid for buildings without the BuilderOutside flag.
** The worker is lost when the building is completed.
**
-** UnitType::Volatile
-**
-** Unit is a suicide bomber
-**
** UnitType::SelectableByRectangle
**
** Selectable with mouse rectangle
@@ -738,7 +734,6 @@
unsigned CanAttack : 1; /// Unit can attack.
unsigned BuilderOutside : 1; /// The builder stays outside during
the build.
unsigned BuilderLost : 1; /// The builder is lost after the build.
- unsigned Volatile : 1; /// Unit is a suicide bomber.
unsigned CanHarvest : 1; /// Resource can be harvested.
unsigned Harvester : 1; /// unit is a resource harvester.
unsigned char *BoolFlag; /// User defined flag. Used for
(dis)allow target.
Index: stratagus/src/unit/ccl_unittype.c
diff -u stratagus/src/unit/ccl_unittype.c:1.102
stratagus/src/unit/ccl_unittype.c:1.103
--- stratagus/src/unit/ccl_unittype.c:1.102 Sun Oct 26 14:46:05 2003
+++ stratagus/src/unit/ccl_unittype.c Tue Oct 28 07:08:30 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: ccl_unittype.c,v 1.102 2003/10/26 19:46:05 n0body Exp $
+// $Id: ccl_unittype.c,v 1.103 2003/10/28 12:08:30 n0body Exp $
//@{
@@ -516,8 +516,6 @@
}
} else if (gh_eq_p(value, gh_symbol2scm("vanishes"))) {
type->Vanishes = 1;
- } else if (gh_eq_p(value, gh_symbol2scm("volatile"))) {
- type->Volatile = 1;
} else if (gh_eq_p(value, gh_symbol2scm("can-cast-spell"))) {
//
// Warning: can-cast-spell should only be used AFTER all spells
Index: stratagus/src/unit/unittype.c
diff -u stratagus/src/unit/unittype.c:1.119 stratagus/src/unit/unittype.c:1.120
--- stratagus/src/unit/unittype.c:1.119 Sun Oct 26 14:46:05 2003
+++ stratagus/src/unit/unittype.c Tue Oct 28 07:08:30 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: unittype.c,v 1.119 2003/10/26 19:46:05 n0body Exp $
+// $Id: unittype.c,v 1.120 2003/10/28 12:08:30 n0body Exp $
//@{
@@ -490,7 +490,7 @@
unittype->CanAttack = BIT(19, v);
// unittype->Hero = BIT(23, v);
unittype->CanStore[OilCost] = BIT(24, v);
- unittype->Volatile = BIT(25, v);
+// unittype->Volatile = BIT(25, v);
// unittype->Organic = BIT(27, v);
if (BIT(11, v) || BIT(21, v)) {
@@ -1043,9 +1043,6 @@
if (type->Vanishes) {
CLprintf(file, " 'vanishes\n");
}
- if (type->Volatile) {
- CLprintf(file, " 'volatile\n");
- }
if (type->SelectableByRectangle) {
CLprintf(file, " 'selectable-by-rectangle\n");
}
@@ -1171,7 +1168,7 @@
char** sp;
CLprintf(file, "\n;;; -----------------------------------------\n");
- CLprintf(file, ";;; MODULE: unittypes $Id: unittype.c,v 1.119 2003/10/26
19:46:05 n0body Exp $\n\n");
+ CLprintf(file, ";;; MODULE: unittypes $Id: unittype.c,v 1.120 2003/10/28
12:08:30 n0body Exp $\n\n");
// Original number to internal unit-type name.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Stratagus-CVS] stratagus data/ccl/spells.ccl doc/ccl/unittype....,
Crestez Leonard <=