File WfTree.c
FileList > entities > WfTree.c
Go to the source code of this file
#include <string.h>
#include "WfTree.h"
#include "BinarySerializer.h"
#include "Entities.h"
#include "Game2DLayer.h"
#include "Components.h"
#include "Atlas.h"
#include "WfGameLayerData.h"
#include "WfEntities.h"
#include "WfEntityMessages.h"
#include "Log.h"
#include "AssertLib.h"
#include "GameFramework.h"
#include "Maths.h"
#include "ZzFX.h"
#include "WfItemPickup.h"
#include "WfItem.h"
#include "WfPlayer.h"
#include "Audio.h"
Classes
Public Types
Public Attributes
| Type |
Name |
| struct ZZFXSound |
gTreeFallSFX = {1.0,0.05,590.6,0.005,0.28,0.257,1,1.0,0.0,0.0,-196.86,0.159,0.165,0.12,15.624050000000004,0.168,0.0,0.635,0.227,0.421,0.0}
|
| struct ZZFXSound |
gTreeHitSFX = {1.0,0.05,63.14,0.049,0.086,0.203,2,1.0,3.678,-4.693,0.0,0.0,0.261,0.185,0.0,0.699,0.0,0.388,0.108,0.087,0.0}
|
Public Functions
| Type |
Name |
| void |
TreeUpdate (struct Entity2D * pEnt, struct GameFrameworkLayer * pLayer, float deltaT)
|
| HEntity2D |
WfAddTreeBasedAt (float x, float y, struct WfTreeDef * def, struct GameLayer2DData * pGameLayerData)
|
| void |
WfDeSerializeTreeEntity (struct BinarySerializer * bs, struct Entity2D * pOutEnt, struct GameLayer2DData * pData)
|
| void |
WfSerializeTreeEntity (struct BinarySerializer * bs, struct Entity2D * pInEnt, struct GameLayer2DData * pData)
|
| void |
WfTreeGetGroundContactPoint (struct Entity2D * pTreeEnt, vec2 outPos)
|
Public Static Functions
| Type |
Name |
| static |
OBJECT_POOL (struct WfTreeEntityData)
|
| float |
TreeGetPreDrawSortValue (struct Entity2D * pEnt)
|
| void |
TreeHandleEntityMsg (struct Entity2D * pEnt, struct Entity2D * pSender, struct EntityToEntityMessage * pMsg, struct GameFrameworkLayer * pLayer)
|
| void |
TreeOnDestroy (struct Entity2D * pEnt, struct GameFrameworkLayer * pData)
|
| void |
WfMakeEntityIntoTreeBasedAt (struct Entity2D * pEnt, float x, float y, struct WfTreeDef * def, struct GameLayer2DData * pGameLayerData)
|
| void |
WfSpawnWoodAt (vec2 pos, int quant, struct GameLayer2DData * pGameLayerData)
|
Macros
Public Types Documentation
enum WfTreeState
enum WfTreeState {
WfStanding,
WfFalling,
WfFallen,
WfStump
};
Public Attributes Documentation
variable gTreeFallSFX
struct ZZFXSound gTreeFallSFX;
variable gTreeHitSFX
struct ZZFXSound gTreeHitSFX;
Public Functions Documentation
function TreeUpdate
void TreeUpdate (
struct Entity2D * pEnt,
struct GameFrameworkLayer * pLayer,
float deltaT
)
function WfAddTreeBasedAt
HEntity2D WfAddTreeBasedAt (
float x,
float y,
struct WfTreeDef * def,
struct GameLayer2DData * pGameLayerData
)
function WfDeSerializeTreeEntity
void WfDeSerializeTreeEntity (
struct BinarySerializer * bs,
struct Entity2D * pOutEnt,
struct GameLayer2DData * pData
)
function WfSerializeTreeEntity
void WfSerializeTreeEntity (
struct BinarySerializer * bs,
struct Entity2D * pInEnt,
struct GameLayer2DData * pData
)
void WfTreeGetGroundContactPoint (
struct Entity2D * pTreeEnt,
vec2 outPos
)
Public Static Functions Documentation
function OBJECT_POOL
static static OBJECT_POOL (
struct WfTreeEntityData
)
function TreeGetPreDrawSortValue
static float TreeGetPreDrawSortValue (
struct Entity2D * pEnt
)
function TreeHandleEntityMsg
static void TreeHandleEntityMsg (
struct Entity2D * pEnt,
struct Entity2D * pSender,
struct EntityToEntityMessage * pMsg,
struct GameFrameworkLayer * pLayer
)
function TreeOnDestroy
static void TreeOnDestroy (
struct Entity2D * pEnt,
struct GameFrameworkLayer * pData
)
function WfMakeEntityIntoTreeBasedAt
static void WfMakeEntityIntoTreeBasedAt (
struct Entity2D * pEnt,
float x,
float y,
struct WfTreeDef * def,
struct GameLayer2DData * pGameLayerData
)
function WfSpawnWoodAt
static void WfSpawnWoodAt (
vec2 pos,
int quant,
struct GameLayer2DData * pGameLayerData
)
Macro Definition Documentation
define STUMP_HEALTH
#define STUMP_HEALTH `30.0f;`
define STUMP_HEIGHT
#define STUMP_HEIGHT `(50.0f)`
define STUMP_SPITE_INDEX
#define STUMP_SPITE_INDEX `0`
define TOP_SPRITE_INDEX
#define TOP_SPRITE_INDEX `2`
define TREE_FALL_CHANGE_SPEED_PER_SECOND
#define TREE_FALL_CHANGE_SPEED_PER_SECOND `90.0f`
define TREE_FALL_SPEED
#define TREE_FALL_SPEED `60.0f`
define TRUNK_SPRITE_INDEX
#define TRUNK_SPRITE_INDEX `1`
The documentation for this class was generated from the following file /home/runner/work/2DFarmingRPG/2DFarmingRPG/Stardew/game/src/entities/WfTree.c