Cavestory Mod API
CaveNet_EnumData.h
Go to the documentation of this file.
1 /*
2  Cavestory Multiplayer API
3  Copyright (C) 2021 Johnny Ledger
4 
5  This software is provided 'as-is', without any express or implied
6  warranty. In no event will the authors be held liable for any damages
7  arising from the use of this software.
8 
9  Permission is granted to anyone to use this software for any purpose,
10  including commercial applications, and to alter it and redistribute it
11  freely, subject to the following restrictions:
12 
13  1. The origin of this software must not be misrepresented; you must not
14  claim that you wrote the original software. If you use this software
15  in a product, an acknowledgment in the product documentation would be
16  appreciated but is not required.
17  2. Altered source versions must be plainly marked as such, and must not be
18  misrepresented as being the original software.
19  3. This notice may not be removed or altered from any source distribution.
20 */
21 
26 #pragma once
27 
28 namespace CaveNet
29 {
34  {
37 
40 
43 
46 
49 
52 
55 
58 
61  };
62 
66  {
68  NET_INPUT_FLAG_JUMP = 0b000000001,
70  NET_INPUT_FLAG_SHOOT = 0b000000010,
72  NET_INPUT_FLAG_LEFT = 0b000000100,
74  NET_INPUT_FLAG_RIGHT = 0b000001000,
76  NET_INPUT_FLAG_UP = 0b000010000,
78  NET_INPUT_FLAG_DOWN = 0b000100000,
80  NET_INPUT_FLAG_ARMS_NEXT = 0b001000000,
82  NET_INPUT_FLAG_ARMS_PREV = 0b010000000,
84  NET_INPUT_FLAG_COUNT = 0b100000000
85 
86  // Please update this to equal the last enum
87  };
88 
91  enum UpdateInventoryFlags : unsigned char
92  {
93  // Everything is included
94  UPDATE_INV_ALL = (0x01 | 0x02 | 0x04 | 0x08),
95  // Weapons are included (BIT FLAG)
96  UPDATE_INV_WEAPONS = 0x01,
97  // Items are included (BIT FLAG)
98  UPDATE_INV_ITEM = 0x02,
99  // Permit stages are included (BIT FLAG)
100  UPDATE_INV_PERMIT_STAGES = 0x04,
101  // Collectables are included (BIT FLAG)
102  UPDATE_INV_COLLECTABLES = 0x08,
103  };
104 
108  {
109  // Release Mode
110  RELEASE = 0,
111  // Debug Mode
112  DEBUG = 1
113  };
114 
117  enum HostServerLoadType : unsigned char
118  {
119  // Load into the savegame like normal.
120  Normal,
121  // Load into tutorial.
122  Tutorial,
123  // Load into Boss Rush.
124  BossRush
125  };
126 
127  // Table of version identifier strings to go along with VersionIdentifier.
128  // @see CaveNet::VersionIdentifier
129  static const char* VersionIdentStrings[] =
130  {
131  "", "_d", "_qa"
132  };
133 };
NetDisconnectReason
Disconnect reasons for CaveNet clients.
Definition: CaveNet_EnumData.h:34
@ NET_DISCONNECT_REASON_SERVER_CLOSING
Sent to all clients when the server hosts closes the server.
Definition: CaveNet_EnumData.h:54
@ NET_DISCONNECT_REASON_UNKNOWN
Only used in unhandled client disconnection situations.
Definition: CaveNet_EnumData.h:36
@ NET_DISCONNECT_REASON_KICKED
Sent to kicked clients.
Definition: CaveNet_EnumData.h:42
@ NET_DISCONNECT_REASON_MOD_CHANGED
Sent to all clients except for the host when the server's loaded mod changes.
Definition: CaveNet_EnumData.h:51
@ NET_DISCONNECT_REASON_USER_LEFT
The user left the server.
Definition: CaveNet_EnumData.h:39
@ _NET_DISCONNECT_REASON_COUNT_
The number of disconnect reasons.
Definition: CaveNet_EnumData.h:60
@ NET_DISCONNECT_REASON_BANNED
Sent to banned clients.
Definition: CaveNet_EnumData.h:45
@ NET_DISCONNECT_REASON_TIMED_OUT
Sent to clients when they time out.
Definition: CaveNet_EnumData.h:48
@ NET_DISCONNECT_REASON_CUSTOM
Custom disconnect reason.
Definition: CaveNet_EnumData.h:57
HostServerLoadType
The stuff we can do when loading into a game.
Definition: CaveNet_EnumData.h:118
NetInputFlag
Net Input Flags.
Definition: CaveNet_EnumData.h:66
@ NET_INPUT_FLAG_ARMS_NEXT
Next Weapon.
Definition: CaveNet_EnumData.h:80
@ NET_INPUT_FLAG_SHOOT
Shoot.
Definition: CaveNet_EnumData.h:70
@ NET_INPUT_FLAG_RIGHT
Move Right.
Definition: CaveNet_EnumData.h:74
@ NET_INPUT_FLAG_UP
Look Up.
Definition: CaveNet_EnumData.h:76
@ NET_INPUT_FLAG_DOWN
Look Down / Search.
Definition: CaveNet_EnumData.h:78
@ NET_INPUT_FLAG_JUMP
Jump.
Definition: CaveNet_EnumData.h:68
@ NET_INPUT_FLAG_ARMS_PREV
Previous Weapon.
Definition: CaveNet_EnumData.h:82
@ NET_INPUT_FLAG_COUNT
Max flags.
Definition: CaveNet_EnumData.h:84
@ NET_INPUT_FLAG_LEFT
Move Left.
Definition: CaveNet_EnumData.h:72
VersionIdentifier
The release identifier for CSMP.
Definition: CaveNet_EnumData.h:108
UpdateInventoryFlags
Sent alongside 'CPACKET_TYPE_UPDATE_INVENTORY' packets to determine what data is included.
Definition: CaveNet_EnumData.h:92