File WfItemHelpers.c
FileList > game > src > items > WfItemHelpers.c
Go to the source code of this file
#include "WfItemHelpers.h"#include "GameFramework.h"#include "Game2DLayer.h"#include <cglm/cglm.h>#include "Entities.h"#include "WfEntities.h"#include <stdbool.h>#include "AssertLib.h"#include "WfTree.h"#include "WfPlayer.h"#include "Geometry.h"#include "EntityQuadTree.h"
Public Functions
| Type | Name |
|---|---|
| VECTOR (struct Entity2D *) |
|
| struct Entity2D * | WfFindClosestEntity (vec2 pointClosestTo, VECTOR(struct Entity2D *) pEnt) |
| void | WfGetDirectionVector (enum WfDirection dir, vec2 outVec) |
| bool | WfGetEntityGroundContactPoint (struct Entity2D * pEnt, vec2 outPoint) |
| u8 | WfGetTerrainLUTIndex (int tileX, int tileY, struct TileMap * tilemap, int layer, TileIndex * indices, int numIndices) |
| TileIndex * | WfGetTileAtPoint (vec2 pt, struct GameLayer2DData * pData, int tileLayer, int * pXOut, int * pYOut) |
| TileIndex * | WfGetTileAtXY (struct TileMapLayer * pLayer, int x, int y) |
| TileIndex * | WfGetTileInFrontOfPlayer (struct GameLayer2DData * pData, struct WfPlayerEntData * pPlayerData, float distanceInFront, HEntity2D hEntPlayer, int tileLayer, int * pXOut, int * pYOut) |
| HTimer | WfScheduleCallbackOnAnimation (struct Entity2D * pPlayer, struct GameFrameworkLayer * pLayer, TimerCallbackFn callback, float percentageIntoAnimation, char * anim_name, void * pCallbackUserData) |
Public Static Functions
| Type | Name |
|---|---|
| bool | IsIndexInSet (TileIndex index, TileIndex * indices, int numIndices) |
Public Functions Documentation
function VECTOR
VECTOR (
struct Entity2D *
)
function WfFindClosestEntity
struct Entity2D * WfFindClosestEntity (
vec2 pointClosestTo,
VECTOR(struct Entity2D *) pEnt
)
function WfGetDirectionVector
void WfGetDirectionVector (
enum WfDirection dir,
vec2 outVec
)
function WfGetEntityGroundContactPoint
bool WfGetEntityGroundContactPoint (
struct Entity2D * pEnt,
vec2 outPoint
)
function WfGetTerrainLUTIndex
u8 WfGetTerrainLUTIndex (
int tileX,
int tileY,
struct TileMap * tilemap,
int layer,
TileIndex * indices,
int numIndices
)
Parameters:
tileXtileYtilemaplayerindicesAn array of indicies that count as an occupied tilenumIndices
Returns:
function WfGetTileAtPoint
TileIndex * WfGetTileAtPoint (
vec2 pt,
struct GameLayer2DData * pData,
int tileLayer,
int * pXOut,
int * pYOut
)
function WfGetTileAtXY
TileIndex * WfGetTileAtXY (
struct TileMapLayer * pLayer,
int x,
int y
)
function WfGetTileInFrontOfPlayer
TileIndex * WfGetTileInFrontOfPlayer (
struct GameLayer2DData * pData,
struct WfPlayerEntData * pPlayerData,
float distanceInFront,
HEntity2D hEntPlayer,
int tileLayer,
int * pXOut,
int * pYOut
)
function WfScheduleCallbackOnAnimation
HTimer WfScheduleCallbackOnAnimation (
struct Entity2D * pPlayer,
struct GameFrameworkLayer * pLayer,
TimerCallbackFn callback,
float percentageIntoAnimation,
char * anim_name,
void * pCallbackUserData
)
Public Static Functions Documentation
function IsIndexInSet
static bool IsIndexInSet (
TileIndex index,
TileIndex * indices,
int numIndices
)
The documentation for this class was generated from the following file /home/runner/work/2DFarmingRPG/2DFarmingRPG/Stardew/game/src/items/WfItemHelpers.c