[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus data/ccl/human/units.ccl data/ccl/orc...
From: |
Russell Smith |
Subject: |
[Stratagus-CVS] stratagus data/ccl/human/units.ccl data/ccl/orc... |
Date: |
Sat, 20 Sep 2003 05:03:41 -0400 |
CVSROOT: /cvsroot/stratagus
Module name: stratagus
Branch:
Changes by: Russell Smith <address@hidden> 03/09/20 05:03:41
Modified files:
data/ccl/human : units.ccl
data/ccl/orc : units.ccl
doc : ChangeLog.html
src/action : action_attack.c action_follow.c action_patrol.c
action_still.c
src/clone : unit.c unit_draw.c unit_find.c
src/include : unittype.h
src/ui : mainscr.c
src/unit : ccl_unittype.c unittype.c
Log message:
Removed 'tower CCL directive
Patches:
Index: stratagus/data/ccl/human/units.ccl
diff -u stratagus/data/ccl/human/units.ccl:1.35
stratagus/data/ccl/human/units.ccl:1.36
--- stratagus/data/ccl/human/units.ccl:1.35 Sun Sep 14 02:53:07 2003
+++ stratagus/data/ccl/human/units.ccl Sat Sep 20 05:03:40 2003
@@ -26,7 +26,7 @@
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
;;
-;; $Id: units.ccl,v 1.35 2003/09/14 06:53:07 mr-russ Exp $
+;; $Id: units.ccl,v 1.36 2003/09/20 09:03:40 mr-russ Exp $
;;=============================================================================
;; Define unit-types.
@@ -1362,7 +1362,6 @@
'can-target-land 'can-target-sea 'can-target-air
'building
'detect-cloak
- 'tower
'sounds '(
selected "human-guard-tower-selected"
acknowledge "human-guard-tower-acknowledge"
@@ -1396,7 +1395,6 @@
'can-target-land 'can-target-sea
'building
'detect-cloak
- 'tower
'sounds '(
selected "human-cannon-tower-selected"
acknowledge "human-cannon-tower-acknowledge"
Index: stratagus/data/ccl/orc/units.ccl
diff -u stratagus/data/ccl/orc/units.ccl:1.39
stratagus/data/ccl/orc/units.ccl:1.40
--- stratagus/data/ccl/orc/units.ccl:1.39 Sun Sep 14 02:53:07 2003
+++ stratagus/data/ccl/orc/units.ccl Sat Sep 20 05:03:40 2003
@@ -26,7 +26,7 @@
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
;;
-;; $Id: units.ccl,v 1.39 2003/09/14 06:53:07 mr-russ Exp $
+;; $Id: units.ccl,v 1.40 2003/09/20 09:03:40 mr-russ Exp $
;;=============================================================================
;; Define unit-types.
@@ -1452,7 +1452,6 @@
'can-target-land 'can-target-sea 'can-target-air
'building
'detect-cloak
- 'tower
'sounds '(
selected "orc-guard-tower-selected"
acknowledge "orc-guard-tower-acknowledge"
@@ -1486,7 +1485,6 @@
'can-target-land 'can-target-sea
'building
'detect-cloak
- 'tower
'sounds '(
selected "orc-cannon-tower-selected"
acknowledge "orc-cannon-tower-acknowledge"
Index: stratagus/doc/ChangeLog.html
diff -u stratagus/doc/ChangeLog.html:1.533 stratagus/doc/ChangeLog.html:1.534
--- stratagus/doc/ChangeLog.html:1.533 Fri Sep 19 04:51:56 2003
+++ stratagus/doc/ChangeLog.html Sat Sep 20 05:03:40 2003
@@ -2,7 +2,7 @@
<html>
<head>
<!--
----- $Id: ChangeLog.html,v 1.533 2003/09/19 08:51:56 mr-russ Exp $
+---- $Id: ChangeLog.html,v 1.534 2003/09/20 09:03:40 mr-russ Exp $
---- (c) Copyright 1998-2003 by Lutz Sammer
@@ -36,6 +36,7 @@
<li>Future 1.19 Release<p>
<ul>
<li>++
+ <li>Removed 'tower CCL directive (from Russell Smith).
<li>Fixed Save/Load bug when spaces in race display name (from Russell
Smith).
<li>Updated show-map-location to be more flexible (from Russell Smith).
<li>Merged in magnant changes (from Crestez Leonard).
Index: stratagus/src/action/action_attack.c
diff -u stratagus/src/action/action_attack.c:1.83
stratagus/src/action/action_attack.c:1.84
--- stratagus/src/action/action_attack.c:1.83 Sun Sep 14 00:45:52 2003
+++ stratagus/src/action/action_attack.c Sat Sep 20 05:03:40 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: action_attack.c,v 1.83 2003/09/14 04:45:52 mr-russ Exp $
+// $Id: action_attack.c,v 1.84 2003/09/20 09:03:40 mr-russ Exp $
//@{
@@ -301,7 +301,7 @@
<=unit->Stats->AttackRange ) {
DebugLevel3Fn("Reached another unit, now attacking it.\n");
unit->State=0;
- if( !unit->Type->Tower ) {
+ if( unit->Stats->Speed ) {
UnitHeadingFromDeltaXY(unit,
goal->X+(goal->Type->TileWidth-1)/2-unit->X,
goal->Y+(goal->Type->TileHeight-1)/2-unit->Y);
@@ -320,7 +320,7 @@
<=unit->Stats->AttackRange ) {
DebugLevel3Fn("Reached wall or ground, now attacking it.\n");
unit->State=0;
- if( !unit->Type->Tower ) {
+ if( unit->Stats->Speed ) {
UnitHeadingFromDeltaXY(unit,unit->Orders[0].X-unit->X
,unit->Orders[0].Y-unit->Y);
// FIXME: only if heading changes
@@ -542,7 +542,7 @@
//
// Turn always to target
//
- if( !unit->Type->Tower && goal ) {
+ if( unit->Stats->Speed && goal ) {
UnitHeadingFromDeltaXY(unit,
goal->X+(goal->Type->TileWidth-1)/2-unit->X,
goal->Y+(goal->Type->TileHeight-1)/2-unit->Y);
Index: stratagus/src/action/action_follow.c
diff -u stratagus/src/action/action_follow.c:1.29
stratagus/src/action/action_follow.c:1.30
--- stratagus/src/action/action_follow.c:1.29 Thu Aug 21 03:12:03 2003
+++ stratagus/src/action/action_follow.c Sat Sep 20 05:03:40 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: action_follow.c,v 1.29 2003/08/21 07:12:03 n0body Exp $
+// $Id: action_follow.c,v 1.30 2003/09/20 09:03:40 mr-russ Exp $
//@{
@@ -263,7 +263,7 @@
// If don't set the goal, the unit can than choose a
// better goal if moving nearer to enemy.
//
- if( unit->Type->CanAttack && !unit->Type->Tower
+ if( unit->Type->CanAttack && unit->Stats->Speed
&& (!goal || goal->Orders[0].Action==UnitActionAttack
|| goal->Orders[0].Action==UnitActionStill) ) {
goal=AttackUnitsInReactRange(unit);
Index: stratagus/src/action/action_patrol.c
diff -u stratagus/src/action/action_patrol.c:1.32
stratagus/src/action/action_patrol.c:1.33
--- stratagus/src/action/action_patrol.c:1.32 Fri Jul 11 10:35:29 2003
+++ stratagus/src/action/action_patrol.c Sat Sep 20 05:03:40 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: action_patrol.c,v 1.32 2003/07/11 14:35:29 n0body Exp $
+// $Id: action_patrol.c,v 1.33 2003/09/20 09:03:40 mr-russ Exp $
//@{
@@ -88,7 +88,7 @@
// If don't set the goal, the unit can than choose a
// better goal if moving nearer to enemy.
//
- if( unit->Type->CanAttack && !unit->Type->Tower ) {
+ if( unit->Type->CanAttack && unit->Stats->Speed ) {
goal=AttackUnitsInReactRange(unit);
if( goal ) {
DebugLevel0Fn("Patrol attack %d\n" _C_ UnitNumber(goal));
Index: stratagus/src/action/action_still.c
diff -u stratagus/src/action/action_still.c:1.70
stratagus/src/action/action_still.c:1.71
--- stratagus/src/action/action_still.c:1.70 Thu Sep 18 13:56:03 2003
+++ stratagus/src/action/action_still.c Sat Sep 20 05:03:40 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: action_still.c,v 1.70 2003/09/18 17:56:03 n0body Exp $
+// $Id: action_still.c,v 1.71 2003/09/20 09:03:40 mr-russ Exp $
//@{
@@ -170,7 +170,7 @@
//
// Normal units react in reaction range.
//
- if( !type->Tower && !ground ) {
+ if( unit->Stats->Speed && !ground ) {
if( (goal=AttackUnitsInReactRange(unit)) ) {
// Weak goal, can choose other unit, come back after attack
CommandAttack(unit,goal->X,goal->Y,NULL,FlushCommands);
@@ -214,7 +214,7 @@
unit->Reset=0;
unit->State=0;
unit->SubAction=1; // Mark attacking.
- if( !type->Tower ) {
+ if( type->Stats->Speed ) {
UnitHeadingFromDeltaXY(unit,
goal->X+(goal->Type->TileWidth-1)/2-unit->X,
goal->Y+(goal->Type->TileHeight-1)/2-unit->Y);
Index: stratagus/src/clone/unit.c
diff -u stratagus/src/clone/unit.c:1.297 stratagus/src/clone/unit.c:1.298
--- stratagus/src/clone/unit.c:1.297 Thu Sep 18 13:56:03 2003
+++ stratagus/src/clone/unit.c Sat Sep 20 05:03:40 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: unit.c,v 1.297 2003/09/18 17:56:03 n0body Exp $
+// $Id: unit.c,v 1.298 2003/09/20 09:03:40 mr-russ Exp $
//@{
@@ -3324,7 +3324,7 @@
// Attack units in range (which or the attacker?)
//
if( !type->Coward ) {
- if( type->CanAttack && !type->Tower ) {
+ if( type->CanAttack && target->Stats->Speed ) {
goal=AttackUnitsInReactRange(target);
if( goal ) {
if( target->SavedOrder.Action==UnitActionStill ) {
@@ -3971,7 +3971,7 @@
int InRun, RunStart;
CLprintf(file,"\n;;; -----------------------------------------\n");
- CLprintf(file,";;; MODULE: units $Id: unit.c,v 1.297 2003/09/18 17:56:03
n0body Exp $\n\n");
+ CLprintf(file,";;; MODULE: units $Id: unit.c,v 1.298 2003/09/20 09:03:40
mr-russ Exp $\n\n");
//
// Local variables
Index: stratagus/src/clone/unit_draw.c
diff -u stratagus/src/clone/unit_draw.c:1.160
stratagus/src/clone/unit_draw.c:1.161
--- stratagus/src/clone/unit_draw.c:1.160 Thu Sep 18 07:59:21 2003
+++ stratagus/src/clone/unit_draw.c Sat Sep 20 05:03:40 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: unit_draw.c,v 1.160 2003/09/18 11:59:21 mr-russ Exp $
+// $Id: unit_draw.c,v 1.161 2003/09/20 09:03:40 mr-russ Exp $
//@{
@@ -577,7 +577,7 @@
global void SaveDecorations(CLFile* file)
{
CLprintf(file,"\n;;; -----------------------------------------\n");
- CLprintf(file,";;; MODULE: decorations $Id: unit_draw.c,v 1.160 2003/09/18
11:59:21 mr-russ Exp $\n\n");
+ CLprintf(file,";;; MODULE: decorations $Id: unit_draw.c,v 1.161 2003/09/20
09:03:40 mr-russ Exp $\n\n");
CLprintf(file,"(mana-sprite \"%s\" %d %d %d %d)\n",
ManaSprite.File,ManaSprite.HotX,ManaSprite.HotY,
@@ -1590,7 +1590,7 @@
,(stats->SightRange+(type->TileWidth-1)/2)*TileSizeX*2);
}
}
- if( type->CanAttack || type->Tower ) {
+ if( type->CanAttack ) {
if( ShowReactionRange ) {
r= (unit->Player->Type==PlayerPerson)
? type->ReactRangePerson
Index: stratagus/src/clone/unit_find.c
diff -u stratagus/src/clone/unit_find.c:1.57
stratagus/src/clone/unit_find.c:1.58
--- stratagus/src/clone/unit_find.c:1.57 Thu Sep 18 07:59:21 2003
+++ stratagus/src/clone/unit_find.c Sat Sep 20 05:03:40 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: unit_find.c,v 1.57 2003/09/18 11:59:21 mr-russ Exp $
+// $Id: unit_find.c,v 1.58 2003/09/20 09:03:40 mr-russ Exp $
//@{
@@ -890,7 +890,7 @@
//
IfDebug(
- if( !unit->Type->CanAttack && !unit->Type->Tower ) {
+ if( !unit->Type->CanAttack ) {
DebugLevel0Fn("Should be handled by caller?\n");
abort();
return NoUnitP;
@@ -917,7 +917,7 @@
//
type=unit->Type;
IfDebug(
- if( !type->CanAttack && !type->Tower ) {
+ if( !type->CanAttack ) {
DebugLevel0Fn("Should be handled by caller?\n");
abort();
return NoUnitP;
Index: stratagus/src/include/unittype.h
diff -u stratagus/src/include/unittype.h:1.108
stratagus/src/include/unittype.h:1.109
--- stratagus/src/include/unittype.h:1.108 Thu Sep 18 13:56:04 2003
+++ stratagus/src/include/unittype.h Sat Sep 20 05:03:40 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: unittype.h,v 1.108 2003/09/18 17:56:04 n0body Exp $
+// $Id: unittype.h,v 1.109 2003/09/20 09:03:40 mr-russ Exp $
#ifndef __UNITTYPE_H__
#define __UNITTYPE_H__
@@ -422,11 +422,6 @@
** Only valid for buildings without the BuilderOutside flag.
** The worker is lost when the building is completed.
**
-** UnitType::Tower
-**
-** FIXME: find a way to remove it.
-** Used for towers(attacknig buildings.)
-**
** UnitType::Hero
**
** FIXME: Unit is a hero. Where is this used?
@@ -776,7 +771,6 @@
unsigned BuilderLost : 1; /// The builder is lost after the build.
// FIXME: n0body: AutoBuildRate not implemented.
unsigned AutoBuildRate; /// The rate at which the building
builds itself
- unsigned Tower : 1; /// Unit can attack, but not
move.
unsigned Hero : 1; /// Is hero only used for triggers .
unsigned Volatile : 1; /// Invisiblity/unholy armor kills unit.
unsigned Organic : 1; /// Organic can be healed.
Index: stratagus/src/ui/mainscr.c
diff -u stratagus/src/ui/mainscr.c:1.122 stratagus/src/ui/mainscr.c:1.123
--- stratagus/src/ui/mainscr.c:1.122 Fri Sep 19 15:41:03 2003
+++ stratagus/src/ui/mainscr.c Sat Sep 20 05:03:40 2003
@@ -27,7 +27,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: mainscr.c,v 1.122 2003/09/19 19:41:03 martinxyz Exp $
+// $Id: mainscr.c,v 1.123 2003/09/20 09:03:40 mr-russ Exp $
//@{
@@ -460,7 +460,7 @@
return;
}
- if( type->Building && !type->Tower ) {
+ if( type->Building && !type->CanAttack ) {
if( type->Supply ) { // Supply unit
VideoDrawText(x+16,y+8+63,GameFont,"Food Usage");
VideoDrawText(x+58,y+8+78,GameFont,"Grown:");
Index: stratagus/src/unit/ccl_unittype.c
diff -u stratagus/src/unit/ccl_unittype.c:1.84
stratagus/src/unit/ccl_unittype.c:1.85
--- stratagus/src/unit/ccl_unittype.c:1.84 Thu Sep 18 13:59:01 2003
+++ stratagus/src/unit/ccl_unittype.c Sat Sep 20 05:03:41 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: ccl_unittype.c,v 1.84 2003/09/18 17:59:01 n0body Exp $
+// $Id: ccl_unittype.c,v 1.85 2003/09/20 09:03:41 mr-russ Exp $
//@{
@@ -508,8 +508,6 @@
}
} else if( gh_eq_p(value,gh_symbol2scm("vanishes")) ) {
type->Vanishes=1;
- } else if( gh_eq_p(value,gh_symbol2scm("tower")) ) {
- type->Tower=1;
} else if( gh_eq_p(value,gh_symbol2scm("hero")) ) {
type->Hero=1;
} else if( gh_eq_p(value,gh_symbol2scm("volatile")) ) {
Index: stratagus/src/unit/unittype.c
diff -u stratagus/src/unit/unittype.c:1.97 stratagus/src/unit/unittype.c:1.98
--- stratagus/src/unit/unittype.c:1.97 Thu Sep 18 13:59:01 2003
+++ stratagus/src/unit/unittype.c Sat Sep 20 05:03:41 2003
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: unittype.c,v 1.97 2003/09/18 17:59:01 n0body Exp $
+// $Id: unittype.c,v 1.98 2003/09/20 09:03:41 mr-russ Exp $
//@{
@@ -466,7 +466,6 @@
unittype->CanCastSpell=BIT(17,v);
unittype->CanStore[WoodCost]=BIT(18,v);
unittype->CanAttack=BIT(19,v);
- unittype->Tower=BIT(20,v);
unittype->Hero=BIT(23,v);
unittype->CanStore[OilCost]=BIT(24,v);
unittype->Volatile=BIT(25,v);
@@ -992,9 +991,6 @@
if( type->Vanishes ) {
CLprintf(file," 'vanishes\n");
}
- if( type->Tower ) {
- CLprintf(file," 'tower\n");
- }
if( type->Hero ) {
CLprintf(file," 'hero\n");
}
@@ -1099,7 +1095,7 @@
char **sp;
CLprintf(file,"\n;;; -----------------------------------------\n");
- CLprintf(file,";;; MODULE: unittypes $Id: unittype.c,v 1.97 2003/09/18
17:59:01 n0body Exp $\n\n");
+ CLprintf(file,";;; MODULE: unittypes $Id: unittype.c,v 1.98 2003/09/20
09:03:41 mr-russ Exp $\n\n");
// Original number to internal unit-type name.