Brightsign BrightScript 3.0 Reference Manual Manuel d'utilisateur Page 66

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 75
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 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)
Vue de la page 65
1 2 ... 61 62 63 64 65 66 67 68 69 70 71 ... 74 75

Commentaires sur ces manuels

Pas de commentaire