mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-22 09:01:57 -05:00
remove old String typedef completely
This commit is contained in:
parent
88d1d9513a
commit
13fda4c626
4 changed files with 4 additions and 4 deletions
|
@ -49,7 +49,7 @@ Here's the idea for a basic plugin that shows "Hello world" in chat when the gam
|
|||
#endif
|
||||
|
||||
static void TestPlugin_Init(void) {
|
||||
String msg = String_FromConst("Hello world!");
|
||||
cc_string msg = String_FromConst("Hello world!");
|
||||
Chat_Add(&msg);
|
||||
}
|
||||
|
||||
|
|
|
@ -139,12 +139,11 @@ typedef cc_uint64 TimeMS;
|
|||
typedef struct Rect2D_ { int X, Y, Width, Height; } Rect2D;
|
||||
typedef struct TextureRec_ { float U1, V1, U2, V2; } TextureRec;
|
||||
|
||||
typedef struct String_ {
|
||||
typedef struct cc_string_ {
|
||||
char* buffer; /* Pointer to characters, NOT NULL TERMINATED */
|
||||
cc_uint16 length; /* Number of characters used */
|
||||
cc_uint16 capacity; /* Max number of characters */
|
||||
} cc_string;
|
||||
typedef cc_string String;
|
||||
/* Indicates that a reference to the buffer in a string argument is persisted after the function has completed.
|
||||
Thus it is **NOT SAFE** to allocate a string on the stack. */
|
||||
#define STRING_REF
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
Copyright 2014-2020 ClassiCube | Licensed under BSD-3
|
||||
*/
|
||||
struct IGameComponent;
|
||||
struct StringsBuffer;
|
||||
extern struct IGameComponent Input_Component;
|
||||
|
||||
enum Key {
|
||||
|
@ -159,6 +160,5 @@ void StoredHotkeys_Add(int trigger, cc_uint8 modifiers, cc_bool moreInput, const
|
|||
|
||||
cc_bool InputHandler_SetFOV(int fov);
|
||||
void InputHandler_PickBlocks(void);
|
||||
void InputHandler_Init(void);
|
||||
void InputHandler_OnScreensChanged(void);
|
||||
#endif
|
||||
|
|
|
@ -69,6 +69,7 @@
|
|||
#define OPT_CAMERA_MASS "cameramass"
|
||||
#define OPT_GRAB_CURSOR "win-grab-cursor"
|
||||
|
||||
struct StringsBuffer;
|
||||
extern struct StringsBuffer Options;
|
||||
/* Frees any memory allocated in storing options. */
|
||||
void Options_Free(void);
|
||||
|
|
Loading…
Reference in a new issue