Documentation ¶
Index ¶
- Constants
- Variables
- func PathExists(path string) (bool, error)
- func ValidateFilesExist()
- type GameDef
- func (gameDef *GameDef) ChangeCamera(newCamera int)
- func (g *GameDef) GetBackgroundImageNumber() int
- func (g *GameDef) GetRoomFilename(playerNum int) string
- func (gameDef *GameDef) HandleCameraSwitch(position mgl32.Vec3)
- func (gameDef *GameDef) HandlePlayerActionButton(collisionEntities []fileio.CollisionEntity)
- func (gameDef *GameDef) HandleRoomSwitch(position mgl32.Vec3)
- func (gameDef *GameDef) NewRoomScript(rdtOutput *fileio.RDTOutput) RoomScript
- func (gameDef *GameDef) NextRoom()
- func (gameDef *GameDef) PrevRoom()
- type Player
- func (p *Player) GetModelMatrix() mgl32.Mat4
- func (player *Player) HandlePlayerInputBackward(collisionEntities []fileio.CollisionEntity, timeElapsedSeconds float64)
- func (player *Player) HandlePlayerInputForward(collisionEntities []fileio.CollisionEntity, timeElapsedSeconds float64)
- func (player *Player) PredictPositionBackward(timeElapsedSeconds float64) mgl32.Vec3
- func (player *Player) PredictPositionBackwardSlope(slopedEntity *fileio.CollisionEntity, timeElapsedSeconds float64) mgl32.Vec3
- func (player *Player) PredictPositionClimbBox() mgl32.Vec3
- func (player *Player) PredictPositionForward(timeElapsedSeconds float64) mgl32.Vec3
- func (player *Player) PredictPositionForwardSlope(slopedEntity *fileio.CollisionEntity, timeElapsedSeconds float64) mgl32.Vec3
- func (player *Player) PredictPositionSlope(predictPositionFlat mgl32.Vec3, slopedEntity *fileio.CollisionEntity) mgl32.Vec3
- func (player *Player) RotatePlayerLeft(timeElapsedSeconds float64)
- func (player *Player) RotatePlayerRight(timeElapsedSeconds float64)
- type RoomMapKey
- type RoomScript
Constants ¶
View Source
const ( PLAYER_LEON = 0 PLAYER_CLAIRE = 1 DIFFICULTY_EASY = 0 DIFFICULTY_NORMAL = 1 GAME_LOAD_ROOM = 0 GAME_LOAD_CAMERA = 1 GAME_LOOP = 2 )
View Source
const ( PLAYER_FORWARD_SPEED = 4000 PLAYER_BACKWARD_SPEED = 1000 )
View Source
const ( BASE_FOLDER = "data/" COMMON_FOLDER = BASE_FOLDER + "Common/" COMMON_BIN_FOLDER = COMMON_FOLDER + "bin/" ROOMCUT_FILE = COMMON_BIN_FOLDER + "roomcut.bin" ITEMDATA_FILE = COMMON_BIN_FOLDER + "itemdata.bin" ESPDATA1_FILE = COMMON_BIN_FOLDER + "espdat1.bin" ESPDATA2_FILE = COMMON_BIN_FOLDER + "espdat2.bin" COMMON_DOOR_FOLDER = COMMON_FOLDER + "Door/" DOOR_FILE = COMMON_DOOR_FOLDER + "Door%02x.DO2" PL_FOLDER = BASE_FOLDER + "Pl0/" LEON_MODEL_FILE = PL_FOLDER + "PLD/PL00.PLD" ENEMY_FILE = PL_FOLDER + "Emd0/EM%03x.EMD" RDT_FOLDER = PL_FOLDER + "RDP/" RDT_FILE = RDT_FOLDER + "ROOM%01d%02x%01d.RDT" COMMON_DATA_FOLDER = COMMON_FOLDER + "DATP/" CORE_SPRITE_FILE = COMMON_DATA_FOLDER + "CORE00.ESP" INVENTORY_FILE = COMMON_DATA_FOLDER + "st0_pl.tim" MENU_IMAGE_FILE = COMMON_DATA_FOLDER + "Tit_bg.adt" MENU_TEXT_FILE = COMMON_DATA_FOLDER + "tmojipal.bin" ITEMALL_FILE = COMMON_DATA_FOLDER + "itemall.bin" SAVE_SCREEN_FILE = COMMON_DATA_FOLDER + "type00.adt" COMMON_SOUND_FOLDER = BASE_FOLDER + "Common/Sound/" )
Variables ¶
View Source
var ( // Jump to other rooms directly DebugLocations = map[RoomMapKey]mgl32.Vec3{ RoomMapKey{1, 0x00}: mgl32.Vec3{18800, 0, -3160}, RoomMapKey{1, 0x01}: mgl32.Vec3{-15047, 0, -11799}, RoomMapKey{1, 0x02}: mgl32.Vec3{-25059, 0, 20944}, RoomMapKey{1, 0x18}: mgl32.Vec3{-9212, 0, 2520}, RoomMapKey{1, 0x19}: mgl32.Vec3{-6168, 0, -15445}, RoomMapKey{1, 0x1a}: mgl32.Vec3{-7250, 0, -550}, RoomMapKey{1, 0x1b}: mgl32.Vec3{-8353, 0, -20638}, } )
Functions ¶
func PathExists ¶
func ValidateFilesExist ¶
func ValidateFilesExist()
Types ¶
type GameDef ¶
type GameDef struct { StageId int RoomId int CameraId int StateStatus int RoomScript RoomScript GameWorld *world.GameWorld Player *Player }
func (*GameDef) ChangeCamera ¶
func (*GameDef) GetBackgroundImageNumber ¶
func (*GameDef) GetRoomFilename ¶
stage starts from 1 room number is a hex from 0 player number is 0 or 1
func (*GameDef) HandleCameraSwitch ¶
func (*GameDef) HandlePlayerActionButton ¶
func (gameDef *GameDef) HandlePlayerActionButton(collisionEntities []fileio.CollisionEntity)
func (*GameDef) HandleRoomSwitch ¶
func (*GameDef) NewRoomScript ¶
func (gameDef *GameDef) NewRoomScript(rdtOutput *fileio.RDTOutput) RoomScript
type Player ¶
func (*Player) GetModelMatrix ¶
func (*Player) HandlePlayerInputBackward ¶
func (player *Player) HandlePlayerInputBackward(collisionEntities []fileio.CollisionEntity, timeElapsedSeconds float64)
func (*Player) HandlePlayerInputForward ¶
func (player *Player) HandlePlayerInputForward(collisionEntities []fileio.CollisionEntity, timeElapsedSeconds float64)
func (*Player) PredictPositionBackward ¶
func (*Player) PredictPositionBackwardSlope ¶
func (*Player) PredictPositionClimbBox ¶
func (*Player) PredictPositionForward ¶
func (*Player) PredictPositionForwardSlope ¶
func (*Player) PredictPositionSlope ¶
func (player *Player) PredictPositionSlope(predictPositionFlat mgl32.Vec3, slopedEntity *fileio.CollisionEntity) mgl32.Vec3
Player walks up or down the stairs or ramp
func (*Player) RotatePlayerLeft ¶
func (*Player) RotatePlayerRight ¶
type RoomMapKey ¶
type RoomScript ¶
type RoomScript struct { InitScriptData fileio.ScriptFunction RoomScriptData fileio.ScriptFunction }
Click to show internal directories.
Click to hide internal directories.