develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r35072 - trunk/examples/sdl/tetris

From:
kjs
Date:
January 6, 2009 11:14
Subject:
[svn:parrot] r35072 - trunk/examples/sdl/tetris
Message ID:
20090106191428.CC61FCB9F9@x12.develooper.com
Author: kjs
Date: Tue Jan  6 11:14:28 2009
New Revision: 35072

Modified:
   trunk/examples/sdl/tetris/app.pir
   trunk/examples/sdl/tetris/block.pir
   trunk/examples/sdl/tetris/board.pir

Log:
[examples] fix old PIR syntax

Modified: trunk/examples/sdl/tetris/app.pir
==============================================================================
--- trunk/examples/sdl/tetris/app.pir	(original)
+++ trunk/examples/sdl/tetris/app.pir	Tue Jan  6 11:14:28 2009
@@ -188,7 +188,7 @@
 =cut
 
 .sub initTimer :method
-    $P0 = new SArray
+    $P0 = new "Array"
     $P1 = find_global "Tetris::App", "_app_timer"
     $P0 = 8
     $P0[0] = .PARROT_TIMER_NSEC

Modified: trunk/examples/sdl/tetris/block.pir
==============================================================================
--- trunk/examples/sdl/tetris/block.pir	(original)
+++ trunk/examples/sdl/tetris/block.pir	Tue Jan  6 11:14:28 2009
@@ -406,8 +406,8 @@
     add $I0, 9 # +1 = make first block id blue; +8 = make it bright
     # lookup the color value
     color = app."color"( $I0 )
-    $I0 = typeof color
-    if $I0 == .Undef goto END
+    $S0 = typeof color
+    if $S0 == "Undef" goto END
 
     # get the x/y position in board coordinates
     (xp, yp) = self."position"()

Modified: trunk/examples/sdl/tetris/board.pir
==============================================================================
--- trunk/examples/sdl/tetris/board.pir	(original)
+++ trunk/examples/sdl/tetris/board.pir	Tue Jan  6 11:14:28 2009
@@ -191,8 +191,8 @@
     .local int width
     .local int size
 
-    $I0 = typeof block
-    if $I0 == .Undef goto END
+    $S0 = typeof block
+    if $S0 == "Undef" goto END
 
     # assign the board to the block
     block."setBoard"( self )



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About