File WfPersistantGameData.c

FileList > game > src > nonEntityGameData > WfPersistantGameData.c

Go to the source code of this file

  • #include "WfPersistantGameData.h"
  • #include "DynArray.h"
  • #include "WfItem.h"
  • #include "BinarySerializer.h"
  • #include "AssertLib.h"
  • #include <string.h>
  • #include <stdio.h>
  • #include <stdlib.h>

Public Static Attributes

Type Name
struct WfPersistantData gNetworkPlayersPersistantData
int gOccupiedSpots = 0
struct WfPersistantData gPersistantData

Public Functions

Type Name
bool WfAddToInventory (struct WfInventory * pInv, int item, int quantity)
struct WfInventory * WfGetInventory ()
struct WfPersistantData * WfGetLocalPlayerPersistantGameData ()
struct WfPersistantData * WfGetNetworkPlayerPersistantGameData (int playerNum)
struct WfInventory * WfGetNetworkPlayersInventory (int player)
int WfGetNumNetworkPlayerPersistentDataSlots ()
struct WfPlayerPreferences * WfGetPreferences ()
void WfLoadPersistantDataFile (const char * path)
void WfLoadPersistantDataFileInternal (struct BinarySerializer * pBS, struct WfPersistantData * pData)
void WfLoadPersistantDataFileV1 (struct BinarySerializer * pBS, struct WfPersistantData * pData)
void WfNewSavePersistantData ()
void WfPersistantDataInit ()
void WfSavePersistantDataFile (const char * path)
void WfSavePersistantDataFileInternal (struct BinarySerializer * pBS, struct WfPersistantData * pGameData)
void WfSetNumNetworkPlayerPersistentDataSlots (int num)

Public Static Functions

Type Name
static VECTOR (int)
search for existing stacks of the item

Public Static Attributes Documentation

variable gNetworkPlayersPersistantData

struct WfPersistantData gNetworkPlayersPersistantData[3];

variable gOccupiedSpots

int gOccupiedSpots;

variable gPersistantData

struct WfPersistantData gPersistantData;

Public Functions Documentation

function WfAddToInventory

bool WfAddToInventory (
    struct WfInventory * pInv,
    int item,
    int quantity
) 

function WfGetInventory

struct WfInventory * WfGetInventory () 

function WfGetLocalPlayerPersistantGameData

struct WfPersistantData * WfGetLocalPlayerPersistantGameData () 

function WfGetNetworkPlayerPersistantGameData

struct WfPersistantData * WfGetNetworkPlayerPersistantGameData (
    int playerNum
) 

function WfGetNetworkPlayersInventory

struct WfInventory * WfGetNetworkPlayersInventory (
    int player
) 

function WfGetNumNetworkPlayerPersistentDataSlots

int WfGetNumNetworkPlayerPersistentDataSlots () 

function WfGetPreferences

struct WfPlayerPreferences * WfGetPreferences () 

function WfLoadPersistantDataFile

void WfLoadPersistantDataFile (
    const char * path
) 

function WfLoadPersistantDataFileInternal

void WfLoadPersistantDataFileInternal (
    struct BinarySerializer * pBS,
    struct WfPersistantData * pData
) 

function WfLoadPersistantDataFileV1

void WfLoadPersistantDataFileV1 (
    struct BinarySerializer * pBS,
    struct WfPersistantData * pData
) 

function WfNewSavePersistantData

void WfNewSavePersistantData () 

function WfPersistantDataInit

void WfPersistantDataInit () 

function WfSavePersistantDataFile

void WfSavePersistantDataFile (
    const char * path
) 

function WfSavePersistantDataFileInternal

void WfSavePersistantDataFileInternal (
    struct BinarySerializer * pBS,
    struct WfPersistantData * pGameData
) 

function WfSetNumNetworkPlayerPersistentDataSlots

void WfSetNumNetworkPlayerPersistentDataSlots (
    int num
) 

Public Static Functions Documentation

function VECTOR

search for existing stacks of the item

static static VECTOR (
    int
) 

Parameters:

  • pInv
  • item

Returns:

the indices in the inventory of stacks or empty it none



The documentation for this class was generated from the following file /home/runner/work/2DFarmingRPG/2DFarmingRPG/Stardew/game/src/nonEntityGameData/WfPersistantGameData.c