File WfItem.h

FileList > game > include > WfItem.h

Go to the source code of this file

  • #include "HandleDefs.h"
  • #include <stdbool.h>
  • #include "WfEnums.h"
  • #include "ZzFX.h"
  • #include "DrawContext.h"
  • #include "InputContext.h"

Classes

Type Name
struct WfItemDef

Public Types

Type Name
typedef void(* OnMakeItemCurrentFn
typedef void(* OnPopGameLayerItemFnItemFn
called when the game layer is popped
typedef void(* OnPushGameLayerItemFnItemFn
called when the game layer is pushed.
typedef void(* OnStopBeingCurrentItemFn
typedef bool(* OnUseItemFn
typedef bool(* TryEquipFn
enum WfEquipSlot
enum WfItemIndices

Public Functions

Type Name
void WfAddBuiltinItems ()
void WfAddItemDef (struct WfItemDef * pDef)
const struct WfItemDef * WfGetItemDef (int itemIndex)
struct WfItemDef * WfGetItemDefs (int * numDefs)
void WfInitItems ()
void WfRegisterItemScriptFunctions ()

Macros

Type Name
define UI_SPRITE_DIMS_PXLS 32

Public Types Documentation

typedef OnMakeItemCurrentFn

typedef void(* OnMakeItemCurrentFn) (struct Entity2D *pPlayer, struct GameFrameworkLayer *pLayer);

typedef OnPopGameLayerItemFnItemFn

called when the game layer is popped

typedef void(* OnPopGameLayerItemFnItemFn) (struct WfItemDef *pDef, struct GameFrameworkLayer *pLayer, DrawContext *drawContext, InputContext *inputContext);

typedef OnPushGameLayerItemFnItemFn

called when the game layer is pushed.

typedef void(* OnPushGameLayerItemFnItemFn) (struct WfItemDef *pDef, struct GameFrameworkLayer *pLayer, DrawContext *drawContext, InputContext *inputContext);

typedef OnStopBeingCurrentItemFn

typedef void(* OnStopBeingCurrentItemFn) (struct Entity2D *pPlayer, struct GameFrameworkLayer *pLayer);

typedef OnUseItemFn

typedef bool(* OnUseItemFn) (struct Entity2D *pPlayer, struct GameFrameworkLayer *pLayer);

typedef TryEquipFn

typedef bool(* TryEquipFn) (struct Entity2D *pPlayer, struct GameFrameworkLayer *pLayer, enum WfEquipSlot slot);

enum WfEquipSlot

enum WfEquipSlot {
    Ring1,
    Ring2,
    Head,
    Torso,
    Legs,
    Arms
};

enum WfItemIndices

enum WfItemIndices {
    WfBasicAxe,
    WfBasicSword,
    WfBasicPickAxe,
    WfBasicScythe,
    WfBasicFishingRod,
    WfBasicHoe,
    WfBasicBow,
    WfWoodItem,
    WfNumBuiltinItems
};

Public Functions Documentation

function WfAddBuiltinItems

void WfAddBuiltinItems () 

function WfAddItemDef

void WfAddItemDef (
    struct WfItemDef * pDef
) 

function WfGetItemDef

const struct WfItemDef * WfGetItemDef (
    int itemIndex
) 

function WfGetItemDefs

struct WfItemDef * WfGetItemDefs (
    int * numDefs
) 

function WfInitItems

void WfInitItems () 

function WfRegisterItemScriptFunctions

void WfRegisterItemScriptFunctions () 

Macro Definition Documentation

define UI_SPRITE_DIMS_PXLS

#define UI_SPRITE_DIMS_PXLS `32`


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