Bitmap base address??
Harry1
Posts: 29
I am currently implementing a program that uses this method (shown below) from the graphics class and i am wondering what is and what i should put for the bitmap base address. Thanks in advance
PUB setup(x_tiles, y_tiles, x_origin, y_origin, base_ptr) | bases_ptr, slices_ptr
'' Set bitmap parameters
''
''·· x_tiles······· - number of x tiles (tiles are 16x16 pixels each)
''·· y_tiles······· - number of y tiles
''·· x_origin······ - relative-x center pixel
''·· y_origin······ - relative-y center pixel
''·· base_ptr······ - base address of bitmap
· setcommand(_loop, 0)································· 'make sure last command finished
· repeat bases_ptr from 0 to x_tiles - 1 <# 31········· 'write bases
··· bases[noparse][[/noparse]bases_ptr] := base_ptr + bases_ptr * y_tiles << 6
· y_tiles <<= 4········································ 'adjust arguments and do setup command
· y_origin := y_tiles - y_origin - 1
· bases_ptr := @bases
· slices_ptr := @slices
· setcommand(_setup, @x_tiles)
· bitmap_base := base_ptr······························ 'retain high-level bitmap data
· bitmap_longs := x_tiles * y_tiles
PUB setup(x_tiles, y_tiles, x_origin, y_origin, base_ptr) | bases_ptr, slices_ptr
'' Set bitmap parameters
''
''·· x_tiles······· - number of x tiles (tiles are 16x16 pixels each)
''·· y_tiles······· - number of y tiles
''·· x_origin······ - relative-x center pixel
''·· y_origin······ - relative-y center pixel
''·· base_ptr······ - base address of bitmap
· setcommand(_loop, 0)································· 'make sure last command finished
· repeat bases_ptr from 0 to x_tiles - 1 <# 31········· 'write bases
··· bases[noparse][[/noparse]bases_ptr] := base_ptr + bases_ptr * y_tiles << 6
· y_tiles <<= 4········································ 'adjust arguments and do setup command
· y_origin := y_tiles - y_origin - 1
· bases_ptr := @bases
· slices_ptr := @slices
· setcommand(_setup, @x_tiles)
· bitmap_base := base_ptr······························ 'retain high-level bitmap data
· bitmap_longs := x_tiles * y_tiles
Comments