Download S. Salazar, Adding Functionality to the Hydra Game
Transcript
Salazar PUB getPlayerMax return PLAYER_MAX PUB getPlayerStatus(id) | temp ' checks to see if the player is active temp:=(1 << id) & pStatus return (temp >> id) PUB setPlayerStatus(id, active) if active==1 ' sets the player to be active pStatus:=(%0000_0001 << id) | pStatus else ' set the player to be inactive if id==0 pStatus:= %1111_1110 & pStatus elseif id==1 pStatus:= %1111_1101 & pStatus elseif id==2 pStatus:= %1111_1011 & pStatus elseif id==3 pStatus:= %1111_0111 & pStatus PUB getScreenSizeX return SCREEN_SIZE_X PUB getScreenSizeY return SCREEN_SIZE_Y PUB getScreenCenterX return getScreenSizeX/2 PUB getScreenCenterY return getScreenSizeY/2 76