-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from ufrshubham/cmake_support
Added cmake support
- Loading branch information
Showing
156 changed files
with
32,423 additions
and
273 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -403,3 +403,6 @@ FodyWeavers.xsd | |
|
||
# Local History for Visual Studio Code | ||
.history/ | ||
|
||
# cmake | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
cmake_minimum_required(VERSION 3.0.0) | ||
project(Brick-Buster VERSION 0.1.0) | ||
|
||
# Makes sure custom settings from incldue/b2_user_settings.h are used by box2d. | ||
add_compile_definitions(B2_USER_SETTINGS) | ||
|
||
add_subdirectory(src) | ||
|
||
# Copies assets and its contents to build directory. | ||
file(COPY assets DESTINATION ${CMAKE_BINARY_DIR}) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#pragma once | ||
|
||
#include <SFML/Graphics/Shape.hpp> | ||
|
||
#include <stdarg.h> | ||
#include <stdint.h> | ||
|
||
// Tunable Constants | ||
|
||
/// You can use this to change the length scale used by your game. | ||
/// For example for inches you could use 39.4. | ||
#define b2_lengthUnitsPerMeter 1.0f | ||
|
||
/// The maximum number of vertices on a convex polygon. You cannot increase | ||
/// this too much because b2BlockAllocator has a maximum object size. | ||
#define b2_maxPolygonVertices 8 | ||
|
||
using b2BodyUserData = sf::Shape*; | ||
|
||
/// You can define this to inject whatever data you want in b2Fixture | ||
struct b2FixtureUserData | ||
{ | ||
b2FixtureUserData() | ||
{ | ||
pointer = 0; | ||
} | ||
|
||
/// For legacy compatibility | ||
uintptr_t pointer; | ||
}; | ||
|
||
/// You can define this to inject whatever data you want in b2Joint | ||
struct b2JointUserData | ||
{ | ||
b2JointUserData() | ||
{ | ||
pointer = 0; | ||
} | ||
|
||
/// For legacy compatibility | ||
uintptr_t pointer; | ||
}; | ||
|
||
// Memory Allocation | ||
|
||
/// Default allocation functions | ||
void* b2Alloc_Default(int32 size); | ||
void b2Free_Default(void* mem); | ||
|
||
/// Implement this function to use your own memory allocator. | ||
inline void* b2Alloc(int32 size) | ||
{ | ||
return b2Alloc_Default(size); | ||
} | ||
|
||
/// If you implement b2Alloc, you should also implement this function. | ||
inline void b2Free(void* mem) | ||
{ | ||
b2Free_Default(mem); | ||
} | ||
|
||
/// Default logging function | ||
void b2Log_Default(const char* string, va_list args); | ||
|
||
/// Implement this to use your own logging. | ||
inline void b2Log(const char* string, ...) | ||
{ | ||
va_list args; | ||
va_start(args, string); | ||
b2Log_Default(string, args); | ||
va_end(args); | ||
} |
Oops, something went wrong.