File WfItemHelpers.h

FileList > game > include > WfItemHelpers.h

Go to the source code of this file

  • #include "TimerPool.h"
  • #include <cglm/cglm.h>
  • #include "IntTypes.h"
  • #include "HandleDefs.h"

Classes

Type Name
struct WfSearchFan

Public Types

Type Name
enum WfEntitySearchType

Public Attributes

Type Name
struct GameFrameworkLayer struct GameLayer2DData * pData
struct GameFrameworkLayer * pLayer

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 * 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)

Macros

Type Name
define VECTOR (a) a\*

Public Types Documentation

enum WfEntitySearchType

enum WfEntitySearchType {
    WfDynamicEntities = 1,
    WfStaticEntities = 2
};

Public Attributes Documentation

variable pData

struct GameFrameworkLayer struct GameLayer2DData* pData;

variable pLayer

struct GameFrameworkLayer* pLayer;

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:

  • tileX
  • tileY
  • tilemap
  • layer
  • indices An array of indicies that count as an occupied tile
  • numIndices

Returns:


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
) 

Macro Definition Documentation

define VECTOR

#define VECTOR (
    a
) `a*`


The documentation for this class was generated from the following file /home/runner/work/2DFarmingRPG/2DFarmingRPG/Stardew/game/include/WfItemHelpers.h