Skip to content

Commit 4668afc

Browse files
committed
Revert "Need to use RETRO_BEGIN_DECLS/RETRO_END_DECL for MSVC C++"
This reverts commit 81555b9.
1 parent 81555b9 commit 4668afc

3 files changed

Lines changed: 55 additions & 52 deletions

File tree

deps/dr/dr_flac.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ GitHub: https://github.com/mackron/dr_libs
1010
#ifndef DR_FLAC_H
1111
#define DR_FLAC_H
1212

13+
#ifdef __cplusplus
14+
extern "C" {
15+
#endif
16+
1317
#include <stdint.h>
1418
#include <stddef.h> /* For size_t. */
15-
#include <retro_common_api.h>
16-
#include <retro_inline.h>
17-
18-
RETRO_BEGIN_DECLS
1919

2020
#define DRFLAC_STRINGIFY(x) #x
2121
#define DRFLAC_XSTRINGIFY(x) DRFLAC_STRINGIFY(x)
@@ -814,6 +814,8 @@ Set pAllocationCallbacks to the same object that was passed to drflac_open_*_and
814814
*/
815815
void drflac_free(void* p, const drflac_allocation_callbacks* pAllocationCallbacks);
816816

817-
RETRO_END_DECLS
817+
#ifdef __cplusplus
818+
}
819+
#endif
818820

819821
#endif /* DR_FLAC_H */

deps/stb/stb_rect_pack.h

Lines changed: 42 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,11 @@
3131
* [your name could be here]
3232
*/
3333

34-
#include <stdint.h>
35-
#include <retro_common_api.h>
36-
#include <retro_inline.h>
37-
38-
RETRO_BEGIN_DECLS
39-
4034
#ifndef STB_INCLUDE_STB_RECT_PACK_H
4135
#define STB_INCLUDE_STB_RECT_PACK_H
4236

37+
#include <stdint.h>
38+
4339
#define STB_RECT_PACK_VERSION 1
4440

4541
#ifdef __cplusplus
@@ -50,6 +46,43 @@ typedef struct stbrp_context stbrp_context;
5046
typedef struct stbrp_node stbrp_node;
5147
typedef struct stbrp_rect stbrp_rect;
5248

49+
void stbrp_pack_rects (stbrp_context *context,
50+
stbrp_rect *rects, int num_rects);
51+
52+
/* Assign packed locations to rectangles. The rectangles are of type
53+
* 'stbrp_rect' defined below, stored in the array 'rects', and there
54+
* are 'num_rects' many of them.
55+
*
56+
* Rectangles which are successfully packed have the 'was_packed' flag
57+
* set to a non-zero value and 'x' and 'y' store the minimum location
58+
* on each axis (i.e. bottom-left in cartesian coordinates, top-left
59+
* if you imagine y increasing downwards). Rectangles which do not fit
60+
* have the 'was_packed' flag set to 0.
61+
*
62+
* You should not try to access the 'rects' array from another thread
63+
* while this function is running, as the function temporarily reorders
64+
* the array while it executes.
65+
*
66+
* To pack into another rectangle, you need to call stbrp_init_target
67+
* again. To continue packing into the same rectangle, you can call
68+
* this function again. Calling this multiple times with multiple rect
69+
* arrays will probably produce worse packing results than calling it
70+
* a single time with the full rectangle array, but the option is
71+
* available.
72+
*/
73+
74+
struct stbrp_rect
75+
{
76+
int id; /* reserved for your use: */
77+
uint16_t w, h; /* input: */
78+
uint16_t x, y; /* output: */
79+
int was_packed; /* non-zero if valid packing */
80+
}; /* 16 bytes, nominally */
81+
82+
83+
void stbrp_init_target (stbrp_context *context,
84+
int width, int height, stbrp_node *nodes, int num_nodes);
85+
5386
/* Initialize a rectangle packer to:
5487
* pack a rectangle that is 'width' by 'height' in dimensions
5588
* using temporary storage provided by the array 'nodes', which is 'num_nodes' long
@@ -101,42 +134,8 @@ struct stbrp_context
101134
stbrp_node extra[2]; /* we allocate two extra nodes so optimal user-node-count is 'width' not 'width+2' */
102135
};
103136

104-
/* Assign packed locations to rectangles. The rectangles are of type
105-
* 'stbrp_rect' defined below, stored in the array 'rects', and there
106-
* are 'num_rects' many of them.
107-
*
108-
* Rectangles which are successfully packed have the 'was_packed' flag
109-
* set to a non-zero value and 'x' and 'y' store the minimum location
110-
* on each axis (i.e. bottom-left in cartesian coordinates, top-left
111-
* if you imagine y increasing downwards). Rectangles which do not fit
112-
* have the 'was_packed' flag set to 0.
113-
*
114-
* You should not try to access the 'rects' array from another thread
115-
* while this function is running, as the function temporarily reorders
116-
* the array while it executes.
117-
*
118-
* To pack into another rectangle, you need to call stbrp_init_target
119-
* again. To continue packing into the same rectangle, you can call
120-
* this function again. Calling this multiple times with multiple rect
121-
* arrays will probably produce worse packing results than calling it
122-
* a single time with the full rectangle array, but the option is
123-
* available.
124-
*/
125-
126-
struct stbrp_rect
127-
{
128-
int id; /* reserved for your use: */
129-
uint16_t w, h; /* input: */
130-
uint16_t x, y; /* output: */
131-
int was_packed; /* non-zero if valid packing */
132-
}; /* 16 bytes, nominally */
133-
134-
void stbrp_pack_rects (stbrp_context *context,
135-
stbrp_rect *rects, int num_rects);
136-
137-
void stbrp_init_target (stbrp_context *context,
138-
int width, int height, stbrp_node *nodes, int num_nodes);
139-
140-
RETRO_END_DECLS
137+
#ifdef __cplusplus
138+
}
139+
#endif
141140

142141
#endif

deps/stb/stb_truetype.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@
5555
#include <math.h>
5656
#include <stdlib.h>
5757
#include <string.h>
58-
#include <retro_common_api.h>
59-
#include <retro_inline.h>
6058

6159
/* INTERFACE */
6260

6361
#ifndef __STB_INCLUDE_STB_TRUETYPE_H__
6462
#define __STB_INCLUDE_STB_TRUETYPE_H__
6563

66-
RETRO_BEGIN_DECLS
64+
#ifdef __cplusplus
65+
extern "C" {
66+
#endif
6767

6868
/* NEW TEXTURE BAKING API */
6969

@@ -339,6 +339,8 @@ enum
339339
STBTT_MS_EID_UNICODE_FULL =10
340340
};
341341

342-
RETRO_END_DECLS
342+
#ifdef __cplusplus
343+
}
344+
#endif
343345

344346
#endif /* __STB_INCLUDE_STB_TRUETYPE_H__ */

0 commit comments

Comments
 (0)