[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] demogame/ccl buttons.ccl alliance/units.ccl myt...
From: |
Martin Renold |
Subject: |
[Stratagus-CVS] demogame/ccl buttons.ccl alliance/units.ccl myt... |
Date: |
Wed, 03 Sep 2003 09:16:46 -0400 |
CVSROOT: /cvsroot/stratagus
Module name: demogame
Branch:
Changes by: Martin Renold <address@hidden> 03/09/03 09:16:46
Modified files:
ccl : buttons.ccl
ccl/alliance : units.ccl
ccl/mythical : units.ccl
Log message:
changed lambda to list
Patches:
Index: demogame/ccl/alliance/units.ccl
diff -u demogame/ccl/alliance/units.ccl:1.5 demogame/ccl/alliance/units.ccl:1.6
--- demogame/ccl/alliance/units.ccl:1.5 Wed Sep 3 07:23:07 2003
+++ demogame/ccl/alliance/units.ccl Wed Sep 3 09:16:46 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.5 2003/09/03 11:23:07 martinxyz Exp $
+;; $Id: units.ccl,v 1.6 2003/09/03 13:16:46 martinxyz Exp $
;;=============================================================================
;; Define unit-types.
@@ -57,7 +57,7 @@
'land-unit
'organic
'selectable-by-rectangle
- 'add-buttons (lambda () (generic-combat-buttons))
+ 'add-buttons '(generic-combat-buttons)
'sounds '(
selected "footman-selected"
acknowledge "footman-acknowledge"
@@ -149,7 +149,7 @@
'resource-step 10 'wait-at-resource 150 'wait-at-depot 150
'transform-when-loaded 'unit-peasant-with-gold
'coward
- 'add-buttons (lambda () (peasant-buttons nil))
+ 'add-buttons '(peasant-buttons nil)
) peasant-common-args))
(apply define-unit-type (append (list
@@ -160,7 +160,7 @@
'resource-step 10 'wait-at-resource 150 'wait-at-depot 150
'transform-when-empty 'unit-peasant
'coward
- 'add-buttons (lambda () (peasant-buttons 't))
+ 'add-buttons '(peasant-buttons 't)
) peasant-common-args))
(apply define-unit-type (append (list
@@ -168,7 +168,7 @@
'files '(tileset-summer "alliance/units/peasant-with-wood.png")
'right-harvest
'coward
- 'add-buttons (lambda () (peasant-buttons 't))
+ 'add-buttons '(peasant-buttons 't)
) peasant-common-args))
(apply define-unit-type (append (list
@@ -176,7 +176,7 @@
'use 'unit-peasant
'right-attack
; FIXME: this one will need special buttons
- 'add-buttons (lambda () (peasant-buttons nil))
+ 'add-buttons '(peasant-buttons nil)
) peasant-common-args))
(define-unit-type 'unit-ballista 'name "Ballista"
@@ -202,7 +202,7 @@
'can-attack
'can-target-land 'can-target-sea
'selectable-by-rectangle
- 'add-buttons (lambda () (generic-combat-buttons))
+ 'add-buttons '(generic-combat-buttons)
'sounds '(
selected "ballista-selected"
acknowledge "ballista-acknowledge"
@@ -267,7 +267,7 @@
'land-unit
'organic
'selectable-by-rectangle
- 'add-buttons (lambda () (generic-combat-buttons))
+ 'add-buttons '(generic-combat-buttons)
'sounds '(
selected "archer-selected"
acknowledge "archer-acknowledge"
@@ -400,7 +400,7 @@
'land-unit
'organic
'selectable-by-rectangle
- 'add-buttons (lambda () (generic-combat-buttons))
+ 'add-buttons '(generic-combat-buttons)
'sounds '(
selected "ranger-selected"
acknowledge "ranger-acknowledge"
@@ -944,7 +944,7 @@
'corpse '(unit-destroyed-3x3-place 0)
'type-land
'building
- 'add-buttons (lambda ()
+ 'add-buttons '(begin
(train-button 'footman 1 "f" "TRAIN ~!FOOTMAN")
(train-button 'archer 2 "a" "TRAIN ~!ARCHER")
; demonstrates button-overwrite
@@ -1152,7 +1152,7 @@
'type-land
'building
'can-store '(wood)
- 'add-buttons (lambda ()
+ 'add-buttons '(begin
(if (check-allowed 'upgrade-ranger)
(add-button 'pos 4
'icon 'icon-ranger
@@ -1217,7 +1217,7 @@
'type-land
'building
'can-store '(wood gold)
- 'add-buttons (lambda ()
+ 'add-buttons '(begin
; just a test
(train-button 'peasant 1 "p" "Train a test peasant")
(if (check-allowed 'unit-keep)
Index: demogame/ccl/buttons.ccl
diff -u demogame/ccl/buttons.ccl:1.1 demogame/ccl/buttons.ccl:1.2
--- demogame/ccl/buttons.ccl:1.1 Sat Jul 26 09:39:14 2003
+++ demogame/ccl/buttons.ccl Wed Sep 3 09:16:46 2003
@@ -26,7 +26,10 @@
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA
;;
-;; $Id: buttons.ccl,v 1.1 2003/07/26 13:39:14 martinxyz Exp $
+;; $Id: buttons.ccl,v 1.2 2003/09/03 13:16:46 martinxyz Exp $
+
+; Shortcut scripts for common button types, as well as some central
+; hooks
; FIXME: this is most likely a very ugly hack to scheme
(define (set-global symbol value)
@@ -120,21 +123,21 @@
; This hook catches all kind of upgrades. There might be new buttons
; available, or an icon needs to be changed, etc.
-(set-selected-unit-changed-hook (lambda ()
+(set-selected-unit-changed-hook '(begin
(rebuild-buttons)))
; The player selected an other set of units.
-(set-selection-changed-hook (lambda ()
+(set-selection-changed-hook '(begin
(set-global 'button-level 0)
(rebuild-buttons)))
; When doing a target selection, only draw a cancel button.
; If you leave them both empty, you can choose another building while
; setting the destination and such things.
-(set-choose-target-begin-hook (lambda ()
+(set-choose-target-begin-hook '(begin
(set-global 'button-level 9)
(rebuild-buttons)))
-(set-choose-target-finish-hook (lambda ()
+(set-choose-target-finish-hook '(begin
(set-global 'button-level 0)
(rebuild-buttons)))
Index: demogame/ccl/mythical/units.ccl
diff -u demogame/ccl/mythical/units.ccl:1.4 demogame/ccl/mythical/units.ccl:1.5
--- demogame/ccl/mythical/units.ccl:1.4 Wed Sep 3 07:23:07 2003
+++ demogame/ccl/mythical/units.ccl Wed Sep 3 09:16:46 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.4 2003/09/03 11:23:07 martinxyz Exp $
+;; $Id: units.ccl,v 1.5 2003/09/03 13:16:46 martinxyz Exp $
;;=============================================================================
;; Define unit-types.
@@ -111,7 +111,7 @@
'wait-at-resource 150 'wait-at-depot 150
'transform-when-loaded 'unit-peon-with-gold
'coward
- 'add-buttons (lambda () (faun-buttons nil))
+ 'add-buttons '(faun-buttons nil)
) faun-common-args))
(apply define-unit-type (append (list
@@ -122,7 +122,7 @@
'wait-at-resource 150 'wait-at-depot 150
'transform-when-empty 'unit-peon
'coward
- 'add-buttons (lambda () (faun-buttons 't))
+ 'add-buttons '(faun-buttons 't)
) faun-common-args))
(apply define-unit-type (append (list
@@ -130,7 +130,7 @@
'files '(tileset-summer "mythical/units/faun-with-wood.png")
'right-harvest
'coward
- 'add-buttons (lambda () (faun-buttons 't))
+ 'add-buttons '(faun-buttons 't)
) faun-common-args))
(apply define-unit-type (append (list
@@ -138,7 +138,7 @@
'use 'unit-peon
'right-attack
; FIXME: this one will need special buttons
- 'add-buttons (lambda () (faun-buttons nil))
+ 'add-buttons '(faun-buttons nil)
) faun-common-args))
(define-unit-type 'unit-catapult 'name "Catapult"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Stratagus-CVS] demogame/ccl buttons.ccl alliance/units.ccl myt...,
Martin Renold <=