samegame.pp 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606
  1. {
  2. $Id$
  3. This program is both available in XTDFPC as in the FPC demoes.
  4. Copyright (C) 1999 by Marco van de Voort
  5. SameGame is a standard game in GNOME and KDE. I liked it, and I
  6. automatically brainstormed how I would implement it.
  7. It turned out to be really easy, and is basically only 100 lines or so,
  8. the rest is scorekeeping, helptext, menu etc.
  9. The game demonstrates some features of the MSMOUSE unit, and some of
  10. the Crt and Graph units. (depending whether it is compiled with
  11. UseGraphics or not)
  12. See the file COPYING.FPC, included in this distribution,
  13. for details about the copyright.
  14. This program is distributed in the hope that it will be useful,
  15. but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  17. **********************************************************************}
  18. PROGRAM SameGame;
  19. {$ifdef UseGraphics}
  20. {$ifdef Win32}
  21. {$define Win32Graph}
  22. {$apptype GUI}
  23. {$endif}
  24. {$endif}
  25. Uses
  26. {$ifdef Win32}
  27. Windows,
  28. {$endif}
  29. {$ifdef Win32Graph}
  30. WinCrt,
  31. {$else}
  32. Crt,
  33. {$endif}
  34. Dos,
  35. {$IFDEF UseGraphics}
  36. Graph,
  37. {$INFO GRAPH}
  38. {$ENDIF}
  39. GameUnit;
  40. CONST
  41. {$IFDEF UseGraphics}
  42. GrFieldX = 10; {X topleft of playfield}
  43. GrFieldY = 70; {Y topleft of playfield}
  44. ScalerX = 22; {ScalerX x Scaler y dots
  45. must be approx a square}
  46. ScalerY = 20;
  47. {$ENDIF}
  48. FieldX = 10; {Top left playfield
  49. coordinates in squares(textmode)}
  50. FieldY = 3; {Top left playfield coordinates}
  51. PlayFieldXDimension = 20; {Dimensions of playfield}
  52. PlayFieldYDimension = 15;
  53. {$IFDEF UseGraphics}
  54. RowDispl = 15;
  55. MenuX = 480;
  56. MenuY = 120;
  57. grNewGameLine = 'NEW GAME';
  58. grHelpLine = 'HELP';
  59. grEndGame = 'END GAME';
  60. {$ENDIF}
  61. {Used colors. Colors[0..2] are the colors used on the playfield, Colors[3]
  62. is the background and Colors[4] is the color used to mark the pieces}
  63. Colors : ARRAY [0..4] OF LONGINT = (White,Blue,Red,Black,LightMagenta);
  64. TYPE PlayFieldType=ARRAY[0..PlayFieldXDimension-1,0..PlayFieldYDimension-1] OF BYTE;
  65. {$IFDEF UseGraphics}
  66. PROCEDURE DisplayPlayField(CONST PlayField:PlayFieldType);
  67. {Screen routine, simply puts the array Playfield on screen.
  68. Both used for displaying the normal grid as the grid with a certain area marked}
  69. VAR X,Y : LONGINT;
  70. LastOne,
  71. NumbLast : LONGINT;
  72. BEGIN
  73. HideMouse;
  74. FOR Y:=0 TO PlayFieldYDimension-1 DO
  75. BEGIN
  76. X:=0;
  77. REPEAT
  78. LastOne:=PlayField[X,Y];
  79. NumbLast:=X;
  80. WHILE (PlayField[X,Y]=LastOne) AND (X<(PlayFieldXDimension-1))DO
  81. INC(X);
  82. SetFillStyle(SolidFill,Colors[LastOne]);
  83. Bar(GrFieldX+NumbLast*ScalerX,GrFieldY+Y*ScalerY,GrFieldX+X*ScalerX-1,GrFieldY+(Y+1)*ScalerY-1);
  84. UNTIL X>=(PlayFieldXDimension-1);
  85. END;
  86. ShowMouse;
  87. END;
  88. {$ELSE}
  89. PROCEDURE DisplayPlayField(CONST PlayField:PlayFieldType);
  90. {Screen routine, simply puts the array Playfield on screen.
  91. Both used for displaying the normal grid as the grid with a certain area marked}
  92. VAR X,Y : LONGINT;
  93. BEGIN
  94. FOR Y:=0 TO PlayFieldYDimension-1 DO
  95. BEGIN
  96. GotoXY(FieldX,Y+FieldY);
  97. FOR X:=0 TO PlayFieldXDimension-1 DO
  98. BEGIN
  99. TextColor(Colors[PlayField[X,Y]]);
  100. Write(#219#219);
  101. END;
  102. END;
  103. END;
  104. {$ENDIF}
  105. PROCEDURE ShowHelp;
  106. {Shows some explanation of the game and waits for a key}
  107. {$ifndef UseGraphics}
  108. VAR I : LONGINT;
  109. {$endif}
  110. BEGIN
  111. {$IFDEF UseGraphics}
  112. HideMouse;
  113. SetbkColor(black);
  114. SetViewPort(0,0,getmaxx,getmaxy,clipoff);
  115. ClearViewPort;
  116. SetTextStyle(0,Horizdir,2);
  117. OutTextXY(220,10,'SAMEGAME');
  118. SetTextStyle(0,Horizdir,1);
  119. OutTextXY(5,40+1*LineDistY,' is a small game, with a principle copied from some KDE game');
  120. OutTextXY(5,40+3*LineDistY,'I tried to implement it under Go32V2 to demonstrate the MsMouse unit');
  121. OutTextXY(5,40+4*LineDistY,'When it worked, I tried to get it running under Linux. I succeeded,');
  122. OutTextXY(5,40+5*LineDistY,'but the mouse unit of the API doesn'#39't work with GPM 1.17');
  123. OutTextXY(5,40+7*LineDistY,'If you move over the playfield, aggregates of one color will be marked');
  124. OutTextXY(5,40+8*LineDistY,'in purple. If you then press the left mouse button, that aggregate will');
  125. OutTextXY(5,40+9*LineDistY,'disappear, and the playfield will collapse to the bottom-left. Please');
  126. OutTextXY(5,40+10*LineDistY,'keep in mind that only an aggregate of two blocks or more will disappear.');
  127. OutTextXY(5,40+12*LineDistY,'For every aggregate you let disappear you get points, but the score is');
  128. OutTextXY(5,40+13*LineDistY,'quadratic proportional to the number of blocks killed. So 4 times killing');
  129. OutTextXY(5,40+14*LineDistY,' a 4 block aggregate scores 4 points, and one time 16 blocks will score 64');
  130. OutTextXY(5,40+15*LineDistY,'blocks. The purpose of the game is obtaining the highscore');
  131. OutTextXY(5,40+17*LineDistY,'If you manage to empty the entire playfield, you'#39'll get a bonus');
  132. OutTextXY(5,40+19*LineDistY,'Press any key to get back to the game');
  133. ShowMouse;
  134. {$ELSE}
  135. FOR I:=2 TO 24 DO
  136. BEGIN
  137. GotoXY(1,I);
  138. ClrEol;
  139. END;
  140. GotoXY(1,3); TextColor(White);
  141. Write('SAMEGAME');
  142. SetDefaultColor;
  143. WriteLn(' is a small game, with a principle copied from some KDE game');
  144. WriteLn;
  145. WriteLn('I tried to implement it under Go32V2 to demonstrate the MsMouse unit');
  146. Writeln('When it worked, I tried to get it running under Linux. I succeeded,');
  147. Writeln('but the mouse unit of the API doesn'#39't work with GPM 1.17');
  148. Writeln;
  149. WriteLn('If you move over the playfield, aggregates of one color will be marked');
  150. Writeln('in purple. If you then press the left mouse button, that aggregate will');
  151. Writeln('disappear, and the playfield will collapse to the bottom-left. Please');
  152. Writeln('keep in mind that only an aggregate of two blocks or more will disappear.');
  153. Writeln;
  154. Writeln('For every aggregate you let disappear you get points, but the score is');
  155. Writeln('quadratic proportional to the number of blocks killed. So 4 times killing');
  156. Writeln(' a 4 block aggregate scores 4 points, and one time 16 blocks will score 64');
  157. Writeln('blocks. The purpose of the game is obtaining the highscore');
  158. Writeln;
  159. Writeln('If you manage to empty the entire playfield, you'#39'll get a bonus');
  160. Writeln;
  161. WriteLn('Press any key to get back to the game');
  162. {$ENDIF}
  163. GetKey;
  164. END;
  165. VAR MarkField,PlayField : PlayFieldType; {The playfield, and the marked form}
  166. CubesMarked : LONGINT; {Cubes currently marked}
  167. Score : LONGINT; {The current score}
  168. LastScore : LONGINT;
  169. PROCEDURE ShowButtons;
  170. {Shows the clickable buttons}
  171. BEGIN
  172. {$IFNDEF UseGraphics}
  173. TextColor(Yellow); TextBackGround(Blue);
  174. GotoXY(60,5); Write('NEW game');
  175. GotoXY(60,6); Write('HELP');
  176. GotoXY(60,7); Write('END game');
  177. {$IFDEF Unix}
  178. GotoXY(60,8); Write('Force IBM charset');
  179. {$ENDIF}
  180. SetDefaultColor;
  181. {$ELSE}
  182. SetTextStyle(0,Horizdir,1);
  183. OutTextXY(MenuX,MenuY,grNewGameLine);
  184. OutTextXY(MenuX,MenuY+RowDispl,grHelpLine);
  185. OutTextXY(MenuX,MenuY+2*RowDispl,grEndGame);
  186. {$ENDIF}
  187. END;
  188. FUNCTION PlayFieldPiecesLeft:LONGINT;
  189. {Counts pieces/cubes/blocks left on the playfield}
  190. VAR I,J,K : LONGINT;
  191. BEGIN
  192. K:=0;
  193. FOR I:=0 TO PlayFieldXDimension-1 DO
  194. FOR J:=0 TO PlayFieldYDimension-1 DO
  195. IF PlayField[I,J]<>3 THEN
  196. INC(K);
  197. PlayFieldPiecesLeft:=K;
  198. END;
  199. PROCEDURE ShowScore;
  200. {Simply procedure to update the score}
  201. {$IFDEF UseGraphics}
  202. VAR S : String;
  203. {$ENDIF}
  204. BEGIN
  205. {$IFDEF UseGraphics}
  206. Str(Score:5,S);
  207. SetFillStyle(SolidFill,0);
  208. Bar(300,440,450,458);
  209. OutTextXY(300,440,'Score :'+S);
  210. {$ELSE}
  211. TextColor(White);
  212. GotoXY(20,23); Write(' ':20);
  213. GotoXY(20,23); Write('Score : ',Score);
  214. SetDefaultColor;
  215. {$ENDIF}
  216. END;
  217. FUNCTION CubesToScore : LONGINT;
  218. {Function to calculate score from the number of cubes. Should have a higher
  219. order than linear, or the purpose of the game disappears}
  220. BEGIN
  221. CubesToScore:=(CubesMarked*CubesMarked) DIV 4;
  222. END;
  223. PROCEDURE MarkAfield(X,Y:LONGINT);
  224. {Recursively marks the area adjacent to (X,Y);}
  225. VAR TargetColor : LONGINT;
  226. PROCEDURE MarkRecur(X1,Y1:LONGINT);
  227. {Marks X1,Y1, checks if neighbours (horizontally or vertically) are the
  228. same color}
  229. BEGIN
  230. IF (PlayField[X1,Y1]=TargetColor) AND (MarkField[X1,Y1]<>4) THEN
  231. BEGIN
  232. MarkField[X1,Y1]:=4;
  233. INC(CubesMarked);
  234. IF X1>0 THEN
  235. MarkRecur(X1-1,Y1);
  236. IF Y1>0 THEN
  237. MarkRecur(X1,Y1-1);
  238. IF X1<(PlayFieldXDimension-1) THEN
  239. MarkRecur(X1+1,Y1);
  240. IF Y1<(PlayFieldYDimension-1) THEN
  241. MarkRecur(X1,Y1+1);
  242. END;
  243. END;
  244. BEGIN
  245. CubesMarked:=0;
  246. TargetColor:=PlayField[X,Y];
  247. IF TargetColor<>3 THEN {Can't mark black space}
  248. MarkRecur(X,Y);
  249. END;
  250. PROCEDURE FillPlayfield;
  251. {Initial version, probably not nice to play with.
  252. Some Life'ish algoritm would be better I think. (so that more aggregates exist)}
  253. VAR X,Y,Last,Now : LONGINT;
  254. BEGIN
  255. Last:=0;
  256. FOR X:=0 TO PlayFieldXDimension-1 DO
  257. FOR Y:=0 TO PlayFieldYDimension-1 DO
  258. BEGIN
  259. Now:=RANDOM(4);
  260. IF Now=3 THEN
  261. Now:=Last;
  262. PlayField[X,Y]:=Now;
  263. Last:=Now;
  264. END;
  265. MarkField:=PlayField;
  266. END;
  267. PROCEDURE Colapse;
  268. {Processes the playfield if the mouse button is used.
  269. First the procedure deletes the marked area, and let gravity do its work
  270. Second the procedure uses as if some gravity existed on the left of the
  271. playfield }
  272. VAR X, Y,J :LONGINT;
  273. BEGIN
  274. {Vertical colapse: All marked pieces are deleted, and let gravity do it's work}
  275. IF CubesMarked>1 THEN
  276. BEGIN
  277. FOR X:=0 TO PlayFieldXDimension-1 DO
  278. BEGIN
  279. Y:=PlayFieldYDimension-1; J:=Y;
  280. REPEAT
  281. IF MarkField[X,Y]<>4 THEN
  282. BEGIN
  283. PlayField[X,J]:=PlayField[X,Y];
  284. DEC(J);
  285. END;
  286. DEC(Y);
  287. UNTIL Y<0;
  288. FOR Y:=0 TO J DO
  289. PlayField[X,Y]:=3;
  290. END;
  291. J:=0;
  292. FOR X:=PlayFieldXDimension-2 DOWNTO 0 DO
  293. BEGIN
  294. IF PlayfIeld[X,PlayFieldYDimension-1]=3 THEN
  295. BEGIN
  296. Move(PlayfIeld[X+1,0],PlayField[X,0],PlayFieldYDimension*(PlayFieldXDimension-X-1));
  297. INC(J);
  298. END;
  299. END;
  300. IF J<>0 THEN
  301. FillChar(PlayField[PlayFieldXDimension-J,0],J*PlayFieldYDimension,#3);
  302. INC(Score,CubesToScore);
  303. ShowScore;
  304. END;
  305. END;
  306. PROCEDURE BuildScreen;
  307. {Some procedures that build the screen}
  308. var s : String;
  309. BEGIN
  310. {$IFDEF UseGraphics}
  311. setbkcolor(black);
  312. setviewport(0,0,getmaxx,getmaxy,clipoff);
  313. clearviewport;
  314. {$ELSE}
  315. ClrScr;
  316. {$ENDIF}
  317. Score:=0;
  318. ShowScore;
  319. ShowButtons;
  320. ShowHighScore;
  321. ShowMouse;
  322. {$IFDEF UseGraphics}
  323. SetTextStyle(0,Horizdir,2);
  324. OuttextXY(10,10,'SameGame v0.03, (C) by Marco v/d Voort. ');
  325. SetTextStyle(0,Horizdir,1);
  326. OuttextXY(50,40,'A demo for the FPC RTL and API units Crt,(MS)Mouse and Graph');
  327. {$ELSE}
  328. GotoXY(1,1);
  329. TextColor(Yellow);
  330. Write('SameGame v0.02');
  331. TextColor(White);
  332. Write(' A demo for the ');
  333. TextColor(Yellow); Write('FPC');
  334. TextColor(White); Write(' API or MsMouse unit. By Marco van de Voort');
  335. SetDefaultColor;
  336. {$ENDIF}
  337. IF LastScore<>0 THEN
  338. BEGIN
  339. {$Ifdef UseGraphics}
  340. SetTextStyle(0,Horizdir,1);
  341. Str(LastScore,S);
  342. OuttextXY(50,40,'The Score in the last game was :'+S);
  343. {$else}
  344. GotoXY(10,20);
  345. Write('The score in the last game was :',LastScore);
  346. {$endif}
  347. END;
  348. DisplayPlayField(PlayField);
  349. MarkField:=PlayField;
  350. END;
  351. PROCEDURE DoMainLoopMouse;
  352. {The main game loop. The entire game runs in this procedure, the rest is
  353. initialisation/finalisation (like loading and saving highscores etc etc)}
  354. VAR X,Y,
  355. MX,MY,MState,Dummy : LONGINT;
  356. EndOfGame : LONGINT;
  357. S : String;
  358. BEGIN
  359. RANDOMIZE;
  360. REPEAT
  361. FillPlayField;
  362. BuildScreen;
  363. EndOfGame:=0;
  364. REPEAT
  365. GetMouseState(MX,MY,MState);
  366. {$IFDEF UseGraphics}
  367. X:=2*((MX-GrFieldX) DIV ScalerX) +FieldX;
  368. Y:=((MY-GrFieldY) DIV ScalerY) +FieldY-1;
  369. {$ELSE}
  370. X:=MX SHR 3;
  371. Y:=MY SHR 3;
  372. {$ENDIF}
  373. IF PlayFieldPiecesLeft=0 THEN
  374. BEGIN
  375. INC(Score,1000);
  376. EndOfGame:=1;
  377. END
  378. ELSE
  379. BEGIN
  380. {$IFDEF UseGraphics}
  381. IF (MX>=MenuX) AND (MX<(MenuX+16*Length(GrNewGameLine))) THEN
  382. BEGIN {X in clickable area}
  383. IF (MY>=MenuY) AND (MY<(MenuY+RowDispl*3+2)) THEN
  384. BEGIN
  385. X:=65; {X doesn't matter as long as it is 60..69}
  386. Y:=((MY-MenuY) DIV RowDispl)+4;
  387. END;
  388. END;
  389. {$ENDIF}
  390. IF (X>=60) AND (X<=69) THEN
  391. BEGIN
  392. IF (MState AND LButton) <>0 THEN {If leftbutton pressed,}
  393. BEGIN
  394. IF Y=4 THEN
  395. EndOfGame:=1;
  396. IF Y=6 THEN
  397. EndOfGame:=2;
  398. IF (EndOfGame>0) AND (PlayFieldPiecesLeft=0) THEN
  399. INC(Score,1000);
  400. IF Y=5 THEN
  401. BEGIN
  402. ShowHelp;
  403. BuildScreen;
  404. END;
  405. {$IFDEF Unix}
  406. IF Y=7 THEN
  407. BEGIN
  408. write(#27+'(K');
  409. BuildScreen;
  410. END;
  411. {$ENDIF}
  412. END;
  413. END;
  414. IF (X>=(FieldX-2)) AND (Y>=(FieldY-2)) THEN
  415. BEGIN
  416. DEC(X,FieldX-1);
  417. DEC(Y,FieldY-1);
  418. X:=X SHR 1;
  419. IF (X<PlayFieldXDimension) AND (Y<PlayFieldYDimension) THEN
  420. BEGIN
  421. IF MarkField[X,Y]<>4 THEN
  422. BEGIN
  423. MarkField:=PlayField;
  424. MarkAfield(X,Y);
  425. DisplayPlayField(MarkField);
  426. {$ifdef UseGraphics}
  427. SetFillStyle(SolidFill,black);
  428. Bar(420,440,540,460);
  429. SetTextStyle(0,Horizdir,1);
  430. Str(CubesToScore,S);
  431. OuttextXY(420,440,'Marked : '+S);
  432. {$else}
  433. TextColor(White);
  434. GotoXY(20,22);
  435. Write(' ':20);
  436. GotoXY(20,22);
  437. Write('Marked :',CubesToScore);
  438. {$endif}
  439. END;
  440. IF (MarkField[X,Y]=4) AND ((MState AND LButton) <>0) THEN
  441. {If leftbutton pressed,}
  442. BEGIN
  443. REPEAT {wait untill it's released.
  444. The moment of pressing counts}
  445. GetMouseState(X,Y,Dummy);
  446. UNTIL (Dummy AND LButton)=0;
  447. Colapse;
  448. MarkField:=PlayField;
  449. DisplayPlayField(MarkField);
  450. END
  451. END
  452. END;
  453. IF KeyPressed THEN
  454. BEGIN
  455. X:=GetKey;
  456. IF (CHR(X) IN ['X','x','Q','q']) OR (X=27) THEN
  457. EndOfGame:=2;
  458. END;
  459. END;
  460. UNTIL EndOfGame>0;
  461. ShowScore;
  462. X:=SlipInScore(Score);
  463. IF X<>0 THEN
  464. BEGIN
  465. HideMouse;
  466. ShowHighScore;
  467. {$IFDEF UseGraphics}
  468. Str(Score:5,S);
  469. OutTextXY(HighX+150,HighY+LineDistY*(10-X),S);
  470. GrInputStr(S,HighX,HighY+LineDistY*(10-X),16,12,10,FALSE,AlfaBeta);
  471. {$ELSE}
  472. InputStr(S,HighX,HighY+12-X,10,FALSE,AlfaBeta);
  473. {$ENDIF}
  474. HighScore[X-1].Name:=S;
  475. ShowMouse;
  476. END;
  477. LastScore:=Score;
  478. UNTIL EndOFGame=2;
  479. END;
  480. CONST FileName='samegame.scr';
  481. VAR I : LONGINT;
  482. {$IFDEF UseGraphics}
  483. gd,gm : INTEGER;
  484. Pal : PaletteType;
  485. {$ENDIF}
  486. BEGIN
  487. {$IFDEF UseGraphics}
  488. {$ifdef Win32}
  489. ShowWindow(GetActiveWindow,0);
  490. {$endif}
  491. gm:=vgahi;
  492. gd:=vga;
  493. InitGraph(gd,gm,'');
  494. if GraphResult <> grOk then
  495. begin
  496. Writeln('Graph driver ',gd,' graph mode ',gm,' not supported');
  497. Halt(1);
  498. end;
  499. SetFillStyle(SolidFill,1);
  500. GetDefaultPalette(Pal);
  501. SetAllPalette(Pal);
  502. {$ENDIF}
  503. IF NOT MousePresent THEN
  504. BEGIN
  505. Writeln('No mouse found. A mouse is required!');
  506. HALT;
  507. END;
  508. FOR I:=0 TO 9 DO
  509. HighScore[I].Score:=I*1500;
  510. LoadHighScore(FileName);
  511. InitMouse;
  512. {$ifndef Win32Graph}
  513. CursorOff;
  514. {$endif}
  515. {$IFDEF UseGraphics}
  516. HighX:=450; HighY:=220; {the position of the highscore table}
  517. {$else}
  518. HighX:=52; HighY:=10; {the position of the highscore table}
  519. {$endif}
  520. DoMainLoopMouse;
  521. HideMouse;
  522. DoneMouse;
  523. {$ifndef Win32Graph}
  524. CursorOn;
  525. {$endif}
  526. SaveHighScore;
  527. {$IFDEF UseGraphics}
  528. CloseGraph;
  529. {$ENDIF}
  530. {$ifndef Win32Graph}
  531. ClrScr;
  532. Writeln;
  533. Writeln('Last games'#39' score was : ',Score);
  534. {$endif}
  535. END.
  536. {
  537. $Log$
  538. Revision 1.5 2002-09-07 15:06:35 peter
  539. * old logs removed and tabs fixed
  540. Revision 1.4 2002/06/02 09:49:17 marco
  541. * Renamefest
  542. Revision 1.3 2002/02/22 21:41:22 carl
  543. * range check error fix
  544. }