Posts: 1,774
Threads: 62
Joined: Aug 2003
What is it that we're all interested in around here, programming? That, in itself is a form of art to me. I'd call anything that a man does to create something that doesn't destroy something else, a form of art. Hopefully those aren't plans for a nuke or something because I don't understand shit about it! :rotfl:
Posts: 719
Threads: 42
Joined: Oct 2005
Quote:@ Nec: http://www.stereophile.com/amplification...299manley/
/\ Is that what that scimatic is for? :lol:
That's very possible.
\__/)
(='.'=) Copy bunny into your signature to
(")_(") help him gain world domination.
Posts: 140
Threads: 13
Joined: Apr 2005
Piccaso (1912)
sorry about my english
[syntax="qbasic"]Function Tru_walk ( o As _char_type, dirtemp As Integer, layout As Integer Ptr Ptr, x2 As uInteger, y2 As uInteger, psfing As Byte = 0 )
Dim As Integer layercheck, x_offset, y_offset, x_tile, y_tile, mx, my, x, y
Dim As Byte layerscan( 2 ) => { 1, 1, 1 }
unpack_1x3 ( x2, mx, x )
unpack_1x3 ( y2, my, y )
x_tile_8 = o.x \ ( mx \ 2 )
y_tile_8 = o.y \ ( my \ 2 )
x_offset_8 = o.x Mod ( mx \ 2 )
y_offset_8 = o.y Mod ( my \ 2 )
walk_grids_x = o.real_x \ 8
walk_grids_y = o.real_y \ 8
If x_offset_8 <> 0 Then walk_grids_x += 1 Else x_jmp = 1
If y_offset_8 <> 0 Then walk_grids_y += 1 Else y_jmp = 1
For layercheck = 0 To 2
Select Case dirtemp
Case 0
For crawl = 0 To walk_grids_x - 1
crawltile = ((( y_tile_8 - y_jmp ) * 8) \ 16 ) * x + ((( x_tile_8 + crawl ) * 8 ) \ 16 )
walk_index = ((( y_tile_8 - y_jmp ) Mod 2) * 2 ) + (( x_tile_8 + crawl ) Mod 2 ) + 1
layerscan( layercheck ) = layerscan( layercheck ) And _
Not Bit( layout[layercheck][crawltile], 16 - walk_index )
Next
Case 1
For crawl = 0 To walk_grids_y - 1
crawltile = ((( y_tile_8 + crawl ) * 8 ) \ 16 ) * x + ((( x_tile_8 + x_jmp + ( walk_grids_x - 1 )) * 8 ) \ 16 )
walk_index = ((( y_tile_8 + crawl ) Mod 2 ) * 2 ) + ((( x_tile_8 + x_jmp + ( walk_grids_x - 1 )) Mod 2 )) + 1
layerscan( layercheck ) = layerscan( layercheck ) And _
Not Bit( layout[layercheck][crawltile], 16 - walk_index )
Next
Case 2
For crawl = 0 To walk_grids_x - 1
crawltile = ((( y_tile_8 + y_jmp + ( walk_grids_y - 1 )) * 8) \ 16 ) * x + ((( x_tile_8 + crawl ) * 8 ) \ 16 )
walk_index = ((( y_tile_8 + y_jmp + ( walk_grids_y - 1 )) Mod 2 ) * 2) + (( x_tile_8 + crawl ) Mod 2 ) + 1
layerscan( layercheck ) = layerscan( layercheck ) And _
Not Bit( layout[layercheck][crawltile], 16 - walk_index )
Next
Case 3
For crawl = 0 To walk_grids_y - 1
crawltile = ((( y_tile_8 + crawl ) * 8 ) \ 16 ) * x + ((( x_tile_8 - x_jmp ) * 8 ) \ 16 )
walk_index = ((( y_tile_8 + crawl ) Mod 2 ) * 2 ) + (( x_tile_8 - x_jmp ) Mod 2 ) + 1
layerscan( layercheck ) = layerscan( layercheck ) And _
Not Bit( layout[layercheck][crawltile], 16 - walk_index )
Next
End Select
Next
Dim As Integer tile_free = layerscan( 0 ) And layerscan( 1 ) And layerscan( 2 )
Function = tile_free
End Function[/syntax]
~cha0s (2005) :p
Posts: 1,774
Threads: 62
Joined: Aug 2003
Missing char_type type def.