mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-25 00:58:30 -05:00
Using language compliant header guards.
This commit is contained in:
parent
fce9692557
commit
fab2ef534c
18 changed files with 54 additions and 54 deletions
6
3rdparty/edtaa3/edtaa3func.h
vendored
6
3rdparty/edtaa3/edtaa3func.h
vendored
|
@ -1,7 +1,7 @@
|
||||||
#ifndef __EDTAA3_H__
|
#ifndef EDTAA3_H_HEADER_GUARD
|
||||||
#define __EDTAA3_H__
|
#define EDTAA3_H_HEADER_GUARD
|
||||||
|
|
||||||
extern void computegradient(double *img, int w, int h, double *gx, double *gy);
|
extern void computegradient(double *img, int w, int h, double *gx, double *gy);
|
||||||
extern void edtaa3(double *img, double *gx, double *gy, int w, int h, short *distx, short *disty, double *dist);
|
extern void edtaa3(double *img, double *gx, double *gy, int w, int h, short *distx, short *disty, double *dist);
|
||||||
|
|
||||||
#endif // __EDTAA3_H__
|
#endif // EDTAA3_H_HEADER_GUARD
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __AVIWRITER_H__
|
#ifndef AVIWRITER_H_HEADER_GUARD
|
||||||
#define __AVIWRITER_H__
|
#define AVIWRITER_H_HEADER_GUARD
|
||||||
|
|
||||||
#include <bx/readerwriter.h>
|
#include <bx/readerwriter.h>
|
||||||
|
|
||||||
|
@ -226,4 +226,4 @@ struct AviWriter
|
||||||
bool m_yflip;
|
bool m_yflip;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __AVIWRITER_H__
|
#endif // AVIWRITER_H_HEADER_GUARD
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __CUBE_ATLAS_H__
|
#ifndef CUBE_ATLAS_H_HEADER_GUARD
|
||||||
#define __CUBE_ATLAS_H__
|
#define CUBE_ATLAS_H_HEADER_GUARD
|
||||||
|
|
||||||
/// Inspired from texture-atlas from freetype-gl (http://code.google.com/p/freetype-gl/)
|
/// Inspired from texture-atlas from freetype-gl (http://code.google.com/p/freetype-gl/)
|
||||||
/// by Nicolas Rougier (Nicolas.Rougier@inria.fr)
|
/// by Nicolas Rougier (Nicolas.Rougier@inria.fr)
|
||||||
|
@ -166,4 +166,4 @@ private:
|
||||||
uint16_t m_maxRegionCount;
|
uint16_t m_maxRegionCount;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __CUBE_ATLAS_H__
|
#endif // CUBE_ATLAS_H_HEADER_GUARD
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __CMD_H__
|
#ifndef CMD_H_HEADER_GUARD
|
||||||
#define __CMD_H__
|
#define CMD_H_HEADER_GUARD
|
||||||
|
|
||||||
struct CmdContext;
|
struct CmdContext;
|
||||||
typedef int (*ConsoleFn)(CmdContext* _context, void* _userData, int _argc, char const* const* _argv);
|
typedef int (*ConsoleFn)(CmdContext* _context, void* _userData, int _argc, char const* const* _argv);
|
||||||
|
@ -12,4 +12,4 @@ typedef int (*ConsoleFn)(CmdContext* _context, void* _userData, int _argc, char
|
||||||
void cmdAdd(const char* _name, ConsoleFn _fn, void* _userData = NULL);
|
void cmdAdd(const char* _name, ConsoleFn _fn, void* _userData = NULL);
|
||||||
void cmdExec(const char* _cmd);
|
void cmdExec(const char* _cmd);
|
||||||
|
|
||||||
#endif // __CMD_H__
|
#endif // CMD_H_HEADER_GUARD
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __DBG_H__
|
#ifndef DBG_H_HEADER_GUARD
|
||||||
#define __DBG_H__
|
#define DBG_H_HEADER_GUARD
|
||||||
|
|
||||||
#include <stdarg.h> // va_list
|
#include <stdarg.h> // va_list
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
@ -18,4 +18,4 @@ extern void dbgPrintfVargs(const char* _format, va_list _argList);
|
||||||
extern void dbgPrintf(const char* _format, ...);
|
extern void dbgPrintf(const char* _format, ...);
|
||||||
extern void dbgPrintfData(const void* _data, uint32_t _size, const char* _format, ...);
|
extern void dbgPrintfData(const void* _data, uint32_t _size, const char* _format, ...);
|
||||||
|
|
||||||
#endif // __DBG_H__
|
#endif // DBG_H_HEADER_GUARD
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __ENTRY_H__
|
#ifndef ENTRY_H_HEADER_GUARD
|
||||||
#define __ENTRY_H__
|
#define ENTRY_H_HEADER_GUARD
|
||||||
|
|
||||||
#include "dbg.h"
|
#include "dbg.h"
|
||||||
|
|
||||||
|
@ -144,4 +144,4 @@ namespace entry
|
||||||
|
|
||||||
} // namespace entry
|
} // namespace entry
|
||||||
|
|
||||||
#endif // __ENTRY_H__
|
#endif // ENTRY_H_HEADER_GUARD
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __ENTRY_PRIVATE_H__
|
#ifndef ENTRY_PRIVATE_H_HEADER_GUARD
|
||||||
#define __ENTRY_PRIVATE_H__
|
#define ENTRY_PRIVATE_H_HEADER_GUARD
|
||||||
|
|
||||||
#include <bx/spscqueue.h>
|
#include <bx/spscqueue.h>
|
||||||
|
|
||||||
|
@ -140,4 +140,4 @@ namespace entry
|
||||||
|
|
||||||
} // namespace entry
|
} // namespace entry
|
||||||
|
|
||||||
#endif // __ENTRY_PRIVATE_H__
|
#endif // ENTRY_PRIVATE_H_HEADER_GUARD
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __INPUT_H__
|
#ifndef INPUT_H_HEADER_GUARD
|
||||||
#define __INPUT_H__
|
#define INPUT_H_HEADER_GUARD
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "entry.h"
|
#include "entry.h"
|
||||||
|
@ -52,4 +52,4 @@ void inputGetMouse(float _mouse[2]);
|
||||||
///
|
///
|
||||||
bool inputIsMouseLocked();
|
bool inputIsMouseLocked();
|
||||||
|
|
||||||
#endif // __INPUT_H__
|
#endif // INPUT_H_HEADER_GUARD
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __FONT_MANAGER_H__
|
#ifndef FONT_MANAGER_H_HEADER_GUARD
|
||||||
#define __FONT_MANAGER_H__
|
#define FONT_MANAGER_H_HEADER_GUARD
|
||||||
|
|
||||||
#include <bx/handlealloc.h>
|
#include <bx/handlealloc.h>
|
||||||
#include <bgfx.h>
|
#include <bgfx.h>
|
||||||
|
@ -203,4 +203,4 @@ private:
|
||||||
uint8_t* m_buffer;
|
uint8_t* m_buffer;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __FONT_MANAGER_H__
|
#endif // FONT_MANAGER_H_HEADER_GUARD
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __TEXT_BUFFER_MANAGER_H__
|
#ifndef TEXT_BUFFER_MANAGER_H_HEADER_GUARD
|
||||||
#define __TEXT_BUFFER_MANAGER_H__
|
#define TEXT_BUFFER_MANAGER_H_HEADER_GUARD
|
||||||
|
|
||||||
#include "font_manager.h"
|
#include "font_manager.h"
|
||||||
|
|
||||||
|
@ -94,4 +94,4 @@ private:
|
||||||
bgfx::ProgramHandle m_distanceSubpixelProgram;
|
bgfx::ProgramHandle m_distanceSubpixelProgram;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __TEXT_BUFFER_MANAGER_H__
|
#endif // TEXT_BUFFER_MANAGER_H_HEADER_GUARD
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __TEXT_METRICS_H__
|
#ifndef TEXT_METRICS_H_HEADER_GUARD
|
||||||
#define __TEXT_METRICS_H__
|
#define TEXT_METRICS_H_HEADER_GUARD
|
||||||
|
|
||||||
#include "font_manager.h"
|
#include "font_manager.h"
|
||||||
|
|
||||||
|
@ -65,4 +65,4 @@ private:
|
||||||
float m_lineHeight;
|
float m_lineHeight;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __TEXT_METRICS_H__
|
#endif // TEXT_METRICS_H_HEADER_GUARD
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
// Copyright (c) 2008-2009 Bjoern Hoehrmann <bjoern@hoehrmann.de>
|
// Copyright (c) 2008-2009 Bjoern Hoehrmann <bjoern@hoehrmann.de>
|
||||||
// See http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ for details.
|
// See http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ for details.
|
||||||
|
|
||||||
#ifndef __UTF8_H__
|
#ifndef UTF8_H_HEADER_GUARD
|
||||||
#define __UTF8_H__
|
#define UTF8_H_HEADER_GUARD
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
@ -11,4 +11,4 @@
|
||||||
|
|
||||||
uint32_t utf8_decode(uint32_t* _state, uint32_t* _codep, uint8_t _ch);
|
uint32_t utf8_decode(uint32_t* _state, uint32_t* _codep, uint8_t _ch);
|
||||||
|
|
||||||
#endif // __UTF8_H_
|
#endif // UTF8_H_HEADER_GUARD
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
|
|
||||||
// FPU math lib
|
// FPU math lib
|
||||||
|
|
||||||
#ifndef __FPU_MATH_H__
|
#ifndef FPU_MATH_H_HEADER_GUARD
|
||||||
#define __FPU_MATH_H__
|
#define FPU_MATH_H_HEADER_GUARD
|
||||||
|
|
||||||
#define _USE_MATH_DEFINES
|
#define _USE_MATH_DEFINES
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
@ -517,4 +517,4 @@ inline void calcPlane(float _result[4], float _va[3], float _vb[3], float _vc[3]
|
||||||
_result[3] = -vec3Dot(normal, _va);
|
_result[3] = -vec3Dot(normal, _va);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __FPU_MATH_H__
|
#endif // FPU_MATH_H_HEADER_GUARD
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
//
|
//
|
||||||
// Source altered and distributed from https://github.com/AdrienHerubel/imgui
|
// Source altered and distributed from https://github.com/AdrienHerubel/imgui
|
||||||
|
|
||||||
#ifndef __IMGUI_H__
|
#ifndef IMGUI_H_HEADER_GUARD
|
||||||
#define __IMGUI_H__
|
#define IMGUI_H_HEADER_GUARD
|
||||||
|
|
||||||
#define IMGUI_MBUT_LEFT 0x01
|
#define IMGUI_MBUT_LEFT 0x01
|
||||||
#define IMGUI_MBUT_RIGHT 0x02
|
#define IMGUI_MBUT_RIGHT 0x02
|
||||||
|
@ -76,4 +76,4 @@ void imguiDrawLine(float _x0, float _y0, float _x1, float _y1, float _r, uint32_
|
||||||
void imguiDrawRoundedRect(float _x, float _y, float _w, float _h, float _r, uint32_t _argb);
|
void imguiDrawRoundedRect(float _x, float _y, float _w, float _h, float _r, uint32_t _argb);
|
||||||
void imguiDrawRect(float _x, float _y, float _w, float _h, uint32_t _argb);
|
void imguiDrawRect(float _x, float _y, float _w, float _h, uint32_t _argb);
|
||||||
|
|
||||||
#endif // __IMGUI_H__
|
#endif // IMGUI_H_HEADER_GUARD
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __RECTPACK_H__
|
#ifndef RECTPACK_H_HEADER_GUARD
|
||||||
#define __RECTPACK_H__
|
#define RECTPACK_H_HEADER_GUARD
|
||||||
|
|
||||||
#include <bx/uint32_t.h>
|
#include <bx/uint32_t.h>
|
||||||
|
|
||||||
|
@ -174,4 +174,4 @@ private:
|
||||||
uint8_t m_mru[6];
|
uint8_t m_mru[6];
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // __RECTPACK_H__
|
#endif // RECTPACK_H_HEADER_GUARD
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __BOUNDS_H__
|
#ifndef BOUNDS_H_HEADER_GUARD
|
||||||
#define __BOUNDS_H__
|
#define BOUNDS_H_HEADER_GUARD
|
||||||
|
|
||||||
struct Aabb
|
struct Aabb
|
||||||
{
|
{
|
||||||
|
@ -44,4 +44,4 @@ void calcMaxBoundingSphere(Sphere& _sphere, const void* _vertices, uint32_t _num
|
||||||
/// Calculate minimum bounding sphere.
|
/// Calculate minimum bounding sphere.
|
||||||
void calcMinBoundingSphere(Sphere& _sphere, const void* _vertices, uint32_t _numVertices, uint32_t _stride, float _step = 0.01f);
|
void calcMinBoundingSphere(Sphere& _sphere, const void* _vertices, uint32_t _numVertices, uint32_t _stride, float _step = 0.01f);
|
||||||
|
|
||||||
#endif // __BOUNDS_H__
|
#endif // BOUNDS_H_HEADER_GUARD
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
|
|
||||||
// FPU math lib
|
// FPU math lib
|
||||||
|
|
||||||
#ifndef __FPU_MATH_H__
|
#ifndef FPU_MATH_H_HEADER_GUARD
|
||||||
#define __FPU_MATH_H__
|
#define FPU_MATH_H_HEADER_GUARD
|
||||||
|
|
||||||
#define _USE_MATH_DEFINES
|
#define _USE_MATH_DEFINES
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
@ -346,4 +346,4 @@ inline void mtxInverse(float* __restrict _result, const float* __restrict _a)
|
||||||
_result[15] = +(xx*(yy*zz - zy*yz) - xy*(yx*zz - zx*yz) + xz*(yx*zy - zx*yy) ) * invDet;
|
_result[15] = +(xx*(yy*zz - zy*yz) - xy*(yx*zz - zx*yz) + xz*(yx*zy - zx*yy) ) * invDet;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __FPU_MATH_H__
|
#endif // FPU_MATH_H_HEADER_GUARD
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __TOKENIZE_CMD_H__
|
#ifndef TOKENIZE_CMD_H_HEADER_GUARD
|
||||||
#define __TOKENIZE_CMD_H__
|
#define TOKENIZE_CMD_H_HEADER_GUARD
|
||||||
|
|
||||||
const char* tokenizeCommandLine(const char* _commandLine, char* _buffer, uint32_t& _bufferSize, int& _argc, char* _argv[], int _maxArgvs, char _term = '\0');
|
const char* tokenizeCommandLine(const char* _commandLine, char* _buffer, uint32_t& _bufferSize, int& _argc, char* _argv[], int _maxArgvs, char _term = '\0');
|
||||||
|
|
||||||
#endif // __TOKENIZE_CMD_H__
|
#endif // TOKENIZE_CMD_H_HEADER_GUARD
|
||||||
|
|
Loading…
Reference in a new issue