| Description: The castle demo documented by Cod2Doc! This is a very basic example to show how to comment your code. Some Piece of code are commented (by RepeatUntil, sorry Mark ;), some are not (just to show that even without comment, nice documentation is produced). You can also see the bb source file from which the documentation was created. |
| Author: Mark Sibly |
| FPS |
| Constant value: 30 |
| n_trees |
| Description: Numbers of trees |
| Constant value: 100 |
| TYPE_PLAYER |
| Constant value: 1 |
| TYPE_BULLET |
| Constant value: 2 |
| TYPE_TARGET |
| Constant value: 3 |
| TYPE_SCENERY |
| Description: Variable used for the collision |
| Constant value: 10 |
| TYPE_TERRAIN |
| Description: Variable used for the collision |
| Constant value: 11 |
| ATYPE_PLAYER |
| Default value: 1 |
| AATYPE_BULLET |
| Default value: 2 |
| AAATYPE_TARGET |
| Default value: 3 |
| info1$ |
| Default value: "Castle Demo" |
| info2$ |
| Default value: "Featuring dynamic terrain, sliding collisions," |
| info3$ |
| Default value: "transparency effects and an intelligent camera" |
| info4$ |
| Default value: "Arrow keys/A/Z to move, Space to jump, Left-Alt to fire" |
| shoot |
| Description: The sound when Marios fire |
| Default value: Load3DSound( "sounds\shoot.wav" ) |
| boom |
| Description: The sound when the bullet hit something |
| Default value: Load3DSound( "sounds\boom.wav" ) |
| water_level |
| Default value: -98 |
| light,castle,land,ground,water,sky |
| spark_sprite,bull_sprite,player_model,hole_sprite,tree_sprite |
| Description: Some sprites!! |
| bull_x# |
| Default value: 1.5 |
| Player |
| Field description: entity,model = Entity stuff anim_speed#,player_y#,roll# = Parameters of the entity |
| Bullet |
| Description: Type describing the bullet fired by Marios |
| Field description: rot# = The rotation! sprite = The sprite! time_out = The time after which the bullet disappears |
| Hole |
| Description: Damage created by the bullet |
| Field description: alpha#,sprite = The sprite and the alpha (yes, really!) |
| UpdateGame() |
| Description: This function is the main one of this demo It calls UpdateHole(), UpdateBullet(), UpdateSpark() and UpdatePlayer() at each loop |
| Return value: None |
| UpdateHole(h.Hole) |
| Parameters: h.Hole |
| Return value: None |
| CreatePlayer(x#,y#,z#) |
| Description: Function used to create Marios |
| Parameters: x# = the x location of the new entity y# = the y location of the new entity z# = the z location of the new entity |
| Return value: the new type handle, See also: Player |
| Example: Type Player Field entity,model ; Entity stuff Field anim_speed#,player_y#,roll# ; Parameters of the entity End Type ; How to use this function: player1.Player = CreatePlayer(0,10,0) |
| CreateBullet(p.Player) |
| Parameters: p.Player |
| Return value: - |
| UpdateBullet(b.Bullet) |
| Description: Function updating the bullet. |
| Parameters: b.Bullet |
| Return value: None |
| CreateSpark(b.Bullet) |
| Parameters: b.Bullet |
| Return value: - |
| UpdateSpark(s.Spark) |
| Parameters: s.Spark |
| Return value: None |
| UpdatePlayer(p.Player) |
| Description: Function to update the player Handle the movement of Marios as well as the shot! |
| Parameters: p.Player = the handle of the player type |
| Return value: None |
| CreateChaseCam(entity) |
| Parameters: entity |
| Return value: - |
| UpdateChaseCam(c.ChaseCam) |
| Parameters: c.ChaseCam |
| Return value: None |
| LoadEnviron(land_tex$,water_tex$,sky_tex$,height_map$) |
| Description: Function creating the environ |
| Parameters: land_tex$ = The texture of the land water_tex$ = The texture of the water sky_tex$ = Guess what? The texture of the sky height_map$ = The image file representing the height map |
| Return value: None |
| LoadSkyBox(file$) |
| Parameters: file$ |
| Return value: - |
| Setup() |
| Description: Function creating the whole world!! |
| Return value: None |
on 26 Jan 2004.