Author: jquelin
Date: Thu Oct 4 10:27:15 2007
New Revision: 21842
Modified:
branches/pdd15oo/examples/sdl/tetris/blocks.pir
branches/pdd15oo/examples/sdl/tetris/board.pir
Log:
more find_type removal (i *think* i got it right with the consequences :o) )
Modified: branches/pdd15oo/examples/sdl/tetris/blocks.pir
==============================================================================
--- branches/pdd15oo/examples/sdl/tetris/blocks.pir (original)
+++ branches/pdd15oo/examples/sdl/tetris/blocks.pir Thu Oct 4 10:27:15 2007
@@ -43,20 +43,20 @@
blocks = new IntList
- find_type $I0, "Tetris::Block::0"
- push blocks, $I0
- find_type $I0, "Tetris::Block::1"
- push blocks, $I0
- find_type $I0, "Tetris::Block::2"
- push blocks, $I0
- find_type $I0, "Tetris::Block::3"
- push blocks, $I0
- find_type $I0, "Tetris::Block::4"
- push blocks, $I0
- find_type $I0, "Tetris::Block::5"
- push blocks, $I0
- find_type $I0, "Tetris::Block::6"
- push blocks, $I0
+ $P0 = get_class "Tetris::Block::0"
+ push blocks, $P0
+ $P0 = get_class "Tetris::Block::1"
+ push blocks, $P0
+ $P0 = get_class "Tetris::Block::2"
+ push blocks, $P0
+ $P0 = get_class "Tetris::Block::3"
+ push blocks, $P0
+ $P0 = get_class "Tetris::Block::4"
+ push blocks, $P0
+ $P0 = get_class "Tetris::Block::5"
+ push blocks, $P0
+ $P0 = get_class "Tetris::Block::6"
+ push blocks, $P0
store_global "Tetris::Block", "blocks", blocks
END:
Modified: branches/pdd15oo/examples/sdl/tetris/board.pir
==============================================================================
--- branches/pdd15oo/examples/sdl/tetris/board.pir (original)
+++ branches/pdd15oo/examples/sdl/tetris/board.pir Thu Oct 4 10:27:15 2007
@@ -251,8 +251,8 @@
getprop block, "nextblock", self
# create a new 'next block'
- $I0 = self."blockID"( id )
- temp = new $I0, self
+ $P0 = self."blockID"( id )
+ temp = new $P0, self
setprop self, "nextblock", temp
# new currently falling block created, activate it
@@ -874,7 +874,7 @@
.sub blockID :method
.param int id
.local pmc blocks
- .local int ret
+ .local pmc ret
blocks = find_global "Tetris::Block", "blocks"