11; ; variables definitions
2- (in-package :org.xzpeter.game. starwar )
2+ (in-package :starwar )
33
44(defparameter *debug-string* " " )
55
66(defvar color-grey (sdl :color :r 80 :g 80 :b 80 ))
77
88(defparameter screen-width 800 )
9- (defparameter screen-height 600 )
9+ (defparameter screen-height 600 )
1010(defparameter bg-color sdl :*black* )
1111(defparameter game-frame-color sdl :*white* )
1212
@@ -68,16 +68,16 @@ generateing the map. ")
6868 " how far can a star moves away from its owner" )
6969
7070; ; when the mouse moves to the edge of the screen, we should move the screen
71- ; ; position on the worldmap.
72- ; ; these are the margin place, outside which the moving is activated.
71+ ; ; position on the worldmap.
72+ ; ; these are the margin place, outside which the moving is activated.
7373(defparameter margin-left 10 )
7474(defparameter margin-top 10 )
7575
7676; ; defines the background
7777(defparameter bg-star-size-max 2 )
7878(defparameter bg-star-size-min 1 )
7979(defparameter bg-star-n 50 )
80-
80+
8181(defparameter *star-color-selected* sdl :*yellow* )
8282
8383(defparameter star-safe-distance 40 )
@@ -103,15 +103,15 @@ generateing the map. ")
103103(defun load-file-set-parameters (filename)
104104 " read one file and load all the parameters"
105105 ; ; here, we MUST make sure that we are in the RIGHT package (that is the
106- ; ; starwar package. or the parameters will not be set!
106+ ; ; starwar package. or the parameters will not be set!
107107 (with-open-file (s filename)
108108 (do ((form (read s) (read s nil ' eof)))
109109 ((eq form ' eof) nil )
110110 (if (not (= (length form) 2 ))
111111 (error " configure file format not right!" ))
112112 (setq form (cons ' defparameter form))
113113 (format t " eval: ~a~% " form)
114- (eval form))))
114+ (eval form))))
115115
116116(defun auto-generate-planets (amount)
117117 " auto generate planets and normally set the *planet-list* var.
@@ -190,10 +190,10 @@ INIT-AMOUNT is how many planets one player own at the beginning of game"
190190 *bg-stars* (generate-bg-stars bg-star-n)
191191 *planet-list* (planet-sort-by-size
192192 (auto-generate-planets planet-total)))
193-
193+
194194 (setf (player (fifth *planet-list* )) *player1* )
195195 (setf (player (sixth *planet-list* )) *player2* )
196-
196+
197197 ; ; load all the configure file
198198 (load-file-set-parameters " starwar.conf" )
199199
0 commit comments