Brightsign BrightScript 3.0 Reference Manual Manual de usuario Pagina 66

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 75
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 65
61
End Function
REM
REM gbInit() is a member function of the game_board BrightScript Object.
REM When it is called, the "this" pointer "m" is set to the appropriate instance by
REM the BrightScript bytecode interpreter
REM
Function gbInit() As Void
REM
REM button presses go to this message port
REM
m.buttons = CreateObject("roMessagePort")
m.gpio = CreateObject("roGpioControlPort")
m.gpio.SetPort(m.buttons)
REM
REM determine optimal size and position for the snake gameboard
REM
CELLWID=16 ' each cell on game in pixels width
CELLHI=16 ' each cell in pix height
MAXWIDE=30 ' max width (in cells) of game board
MAXHI=30 ' max height (in cells) of game board
vidmode=CreateObject("roVideoMode")
w=cint(vidmode.GetResX()/CELLWID)
if w>MAXWIDE then w = MAXWIDE
h=cint(vidmode.GetResY()/CELLHI)
Vista de pagina 65
1 2 ... 61 62 63 64 65 66 67 68 69 70 71 ... 74 75

Comentarios a estos manuales

Sin comentarios