Cavestory Mod API
Classes | Public Member Functions | Public Attributes | List of all members
MAP_ZONE Class Reference

A map zone to be used for network optimization. More...

#include <CSMAPI_types.h>

Classes

struct  MAP_ZONE_RECT_STRUCT
 The rect for this zone. More...
 

Public Member Functions

 MAP_ZONE ()
 Constructor.
 
 ~MAP_ZONE ()
 Deconstructor.
 
void Init ()
 Initialize this object.
 
void Free ()
 Free all memory associated with this object.
 
void AddNpChar (NPCHAR *npc)
 Add an NPCHAR to the list. More...
 
void RemoveNpChar (NPCHAR *npc)
 Remove an NPCHAR from the list. More...
 
void DeleteAllNpChar ()
 Delete all NPCs that are inside of this zone.
 
void ActNpChar ()
 Think tick all npcs.
 
void PutNpChar (int frame_x, int frame_y)
 Draw npcs.
 
bool HasNpChar (NPCHAR *npc)
 Check if this zone has an npc in it. More...
 
void AddBoss (NPCHAR *npc)
 Add a boss to the list. More...
 
void RemoveBoss (NPCHAR *npc)
 Remove a boss from the list. More...
 
void DeleteAllBoss ()
 Delete all bosses that are inside of this zone.
 
void ActBoss ()
 Think tick all npcs.
 
void PutBoss (int frame_x, int frame_y)
 Draw npcs.
 
bool HasBoss (NPCHAR *npc)
 Check if this zone has a boss npc in it. More...
 

Public Attributes

int id
 The ID for this zone.
 
struct MAP_ZONE::MAP_ZONE_RECT_STRUCT rect
 
int used
 'Use' count for this zone
 
int soft_npc_count
 deprectated
 

Detailed Description

A map zone to be used for network optimization.

Optimizes multiplayer games by only transmitting the NPCs within zones to the players who are also within the same zone.

Member Function Documentation

◆ AddBoss()

void MAP_ZONE::AddBoss ( NPCHAR npc)

Add a boss to the list.

Parameters
npcThe boss npc to add.

◆ AddNpChar()

void MAP_ZONE::AddNpChar ( NPCHAR npc)

Add an NPCHAR to the list.

Parameters
npcThe NPC to add.

◆ HasBoss()

bool MAP_ZONE::HasBoss ( NPCHAR npc)

Check if this zone has a boss npc in it.

Parameters
npcThe NPCHAR to find.
Returns
bool Returns true if the boss was found, false if otherwise.

◆ HasNpChar()

bool MAP_ZONE::HasNpChar ( NPCHAR npc)

Check if this zone has an npc in it.

Parameters
npcThe NPCHAR to find.
Returns
bool Returns true if the npc was found, false if otherwise.

◆ RemoveBoss()

void MAP_ZONE::RemoveBoss ( NPCHAR npc)

Remove a boss from the list.

Parameters
npcThe boss npc to add.

◆ RemoveNpChar()

void MAP_ZONE::RemoveNpChar ( NPCHAR npc)

Remove an NPCHAR from the list.

Parameters
npcThe NPC to add.

The documentation for this class was generated from the following file: