Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 31 additions & 32 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,52 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master, dev ]
branches: [ master ]
pull_request:
branches: [ master, dev ]
branches: [ master ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'true'
submodules: true

- name: Install deps
run: sudo apt-get install libsdl2-dev
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libsdl2-dev libgtk-3-dev libgl1-mesa-dev

- name: Install Tundra
run: git clone --recursive https://github.com/deplinenoise/tundra.git && cd tundra && make -j4 && sudo make install && cd ..
- name: Configure
run: cmake -B build -S . -DCMAKE_BUILD_TYPE=Release

- name: Build Code
run: |
tundra2 --verbose linux-gcc-release
- name: Build
run: cmake --build build --parallel

# Build macOS
build_macOS:
runs-on: macOS-latest
build_macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Build Code
run: |
bin/macos/tundra2 --verbose macosx-clang-release
submodules: true

- name: Configure
run: cmake -B build -S . -DCMAKE_BUILD_TYPE=Release

- name: Build
run: cmake --build build --parallel

# Build Windows
build_windows:
runs-on: windows-2019
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Build Code
shell: cmd
run: |
bin\win32\tundra2.exe --verbose --unprotected win32-msvc-release
submodules: true

- name: Configure
run: cmake -B build -S . -DCMAKE_BUILD_TYPE=Release

- name: Build
run: cmake --build build --config Release --parallel
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ if (APPLE)
elseif (UNIX)
set(RKT_PROJECT_LIBS ${RKT_PROJECT_LIBS} ${CMAKE_SOURCE_DIR}/external/bass/linux/libbass.so)
elseif (MSVC)
set(RKT_PROJECT_LIBS ${RKT_PROJECT_LIBS} ${CMAKE_SOURCE_DIR}/external/bass/win32/bass.lib)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(RKT_PROJECT_LIBS ${RKT_PROJECT_LIBS} ${CMAKE_SOURCE_DIR}/external/bass/win64/bass.lib)
else()
set(RKT_PROJECT_LIBS ${RKT_PROJECT_LIBS} ${CMAKE_SOURCE_DIR}/external/bass/win32/bass.lib)
endif()
endif ()

##############################################################################
Expand All @@ -92,11 +96,13 @@ target_include_directories(rkt_emgui PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/emgui/sr
if (APPLE)
target_compile_definitions(rkt_emgui PUBLIC -DEMGUI_MACOSX)
target_compile_options(rkt_emgui PUBLIC -Werror -pedantic-errors -Wall -Wno-format-security)
set_source_files_properties(emgui/src/External/stb_image.c PROPERTIES COMPILE_FLAGS "-Wno-unused-but-set-variable")
set_source_files_properties(emgui/src/External/stb_typetype.c PROPERTIES COMPILE_FLAGS "-Wno-unused-but-set-variable")
elseif (UNIX)
target_compile_definitions(rkt_emgui PUBLIC -DEMGUI_UNIX)
target_compile_options(rkt_emgui PUBLIC -Werror -pedantic-errors -Wall -Wno-format-security)
set_source_files_properties(emgui/src/External/stb_image.c PROPERTIES COMPILE_FLAGS "-Wno-misleading-indentation -Wno-unused-but-set-variable")
set_source_files_properties(emgui/src/External/stb_typetype.c PROPERTIES COMPILE_FLAGS -Wno-unused-but-set-variable)
set_source_files_properties(emgui/src/External/stb_typetype.c PROPERTIES COMPILE_FLAGS "-Wno-unused-but-set-variable -Wno-maybe-uninitialized")
elseif (MSVC)
target_compile_definitions(rkt_emgui PUBLIC -DEMGUI_WINDOWS)
set_target_properties(rkt_emgui PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS")
Expand Down
4 changes: 2 additions & 2 deletions basic_example/basic_example.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ int rocket_init(const char* prefix) {

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

static int rocket_update() {
static int rocket_update(void) {
int row = 0;

if (audio_is_playing)
Expand All @@ -124,7 +124,7 @@ static const struct sync_track* s_tracks[sizeof_array(s_trackNames)];

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

int main() {
int main(void) {
int i;

if (!rocket_init("data/sync"))
Expand Down
18 changes: 9 additions & 9 deletions emgui/include/emgui/Emgui.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,21 +80,21 @@ static EMGUI_INLINE uint32_t Emgui_color32_getB(uint32_t color) {
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Creation and state changes the application needs to call

bool Emgui_create();
void Emgui_destroy();
bool Emgui_create(void);
void Emgui_destroy(void);
void Emgui_setMousePos(int posX, int posY);
void Emgui_setMouseLmb(int state);

void Emgui_begin();
void Emgui_end();
void Emgui_begin(void);
void Emgui_end(void);

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

void Emgui_beginVerticalPanelXY(int x, int y);
void Emgui_beginHorizontalPanelXY(int x, int y);

void Emgui_beginVerticalPanel();
void Emgui_beginHorizontalPanel();
void Emgui_beginVerticalPanel(void);
void Emgui_beginHorizontalPanel(void);

void Emgui_setLayer(int layer);
void Emgui_setScissor(int x, int y, int w, int h);
Expand All @@ -103,7 +103,7 @@ void Emgui_setScissor(int x, int y, int w, int h);
// Font functions

void Emgui_setFont(uint32_t fontId);
void Emgui_setDefaultFont();
void Emgui_setDefaultFont(void);
bool Emgui_setFontByName(const char* ttfFontname);

int Emgui_loadFontTTF(const char* ttfFontname, float fontHeight);
Expand Down Expand Up @@ -143,8 +143,8 @@ bool Emgui_buttonCoordsImage(const char* text, int x, int y);
bool Emgui_button(const char* text);
bool Emgui_buttonImage(const char* filename);

void Emgui_setFirstControlFocus();
bool Emgui_hasKeyboardFocus();
void Emgui_setFirstControlFocus(void);
bool Emgui_hasKeyboardFocus(void);

void Emgui_radioButtonImage(void* image0, int size0, void* image1, int size1, enum EmguiMemoryLocation location,
uint32_t color, int x, int y, bool* stateIn);
Expand Down
6 changes: 3 additions & 3 deletions emgui/include/emgui/GFXBackend.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

#include "Types.h"

bool EMGFXBackend_create();
bool EMGFXBackend_destroy();
bool EMGFXBackend_create(void);
bool EMGFXBackend_destroy(void);
void EMGFXBackend_updateViewPort(int width, int height);
void EMGFXBackend_render();
void EMGFXBackend_render(void);

uint64_t EMGFXBackend_createFontTexture(void* imageBuffer, int w, int h);
uint64_t EMGFXBackend_createTexture(void* imageBuffer, int w, int h, int comp);
Expand Down
20 changes: 10 additions & 10 deletions emgui/src/Emgui.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ uint64_t loadImage(int* width, int* height, void* image, int length, enum EmguiM

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

void createDefaultFont() {
static void createDefaultFont(void) {
struct LoadedFont* loadedFont = &g_loadedFonts[0];
uint8_t* tempColorData;
uint8_t* colorData = tempColorData = (uint8_t*)malloc(128 * 128);
Expand Down Expand Up @@ -219,7 +219,7 @@ void createDefaultFont() {

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

void createStipplePattern() {
static void createStipplePattern(void) {
static unsigned char pattern[32 * 34];
static unsigned char tempData[32 * 34] = {0};
int x, y, i, startX = 8, width = 16, t = 0;
Expand Down Expand Up @@ -340,7 +340,7 @@ uint32_t Emgui_getTextSize(const char* text) {

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

bool Emgui_create() {
bool Emgui_create(void) {
const uint32_t size = 10 * 1024 * 1024; /* FIXME: refactor LinearAllocator to be growable */
LinearAllocator_create(&s_allocator, malloc(size), size);
createDefaultFont();
Expand All @@ -351,7 +351,7 @@ bool Emgui_create() {

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

void Emgui_begin() {
void Emgui_begin(void) {
g_controlId = 1;
g_controls[0].type = EMGUI_DRAWTYPE_NONE;

Expand Down Expand Up @@ -390,7 +390,7 @@ static bool Emgui_regionHit(const EmguiControlInfo* control) {

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

void Emgui_reset() {
void Emgui_reset(void) {
g_emguiGuiState.mouse.x = -1;
g_emguiGuiState.mouse.y = -1;
}
Expand Down Expand Up @@ -743,7 +743,7 @@ void Emgui_setFont(uint32_t fontId) {

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

void Emgui_setDefaultFont() {
void Emgui_setDefaultFont(void) {
Emgui_setFont(0);
}

Expand Down Expand Up @@ -919,7 +919,7 @@ void Emgui_radioButtonImage(void* image0, int size0, void* image1, int size1, en

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

void Emgui_end() {
void Emgui_end(void) {
if (g_emguiGuiState.mouse.down == 0) {
g_emguiGuiState.activeItem = 0;
} else {
Expand Down Expand Up @@ -1056,20 +1056,20 @@ void Emgui_setMouseLmb(int state) {

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

bool Emgui_hasKeyboardFocus() {
bool Emgui_hasKeyboardFocus(void) {
return g_emguiGuiState.kbdItem != -1;
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

void Emgui_setFirstControlFocus() {
void Emgui_setFirstControlFocus(void) {
g_emguiGuiState.kbdItem = 1;
g_emguiGuiState.keyCode = 0;
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

void Emgui_resetFocus() {
void Emgui_resetFocus(void) {
g_emguiGuiState.kbdItem = -1;
g_emguiGuiState.keyCode = 0;
}
Expand Down
18 changes: 9 additions & 9 deletions emgui/src/Emgui.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,21 +86,21 @@ static EMGUI_INLINE uint32_t Emgui_color32_getB(uint32_t color)
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Creation and state changes the application needs to call

bool Emgui_create();
void Emgui_destroy();
bool Emgui_create(void);
void Emgui_destroy(void);
void Emgui_setMousePos(int posX, int posY);
void Emgui_setMouseLmb(int state);

void Emgui_begin();
void Emgui_end();
void Emgui_begin(void);
void Emgui_end(void);

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

void Emgui_beginVerticalPanelXY(int x, int y);
void Emgui_beginHorizontalPanelXY(int x, int y);

void Emgui_beginVerticalPanel();
void Emgui_beginHorizontalPanel();
void Emgui_beginVerticalPanel(void);
void Emgui_beginHorizontalPanel(void);

void Emgui_setLayer(int layer);
void Emgui_setScissor(int x, int y, int w, int h);
Expand All @@ -110,7 +110,7 @@ void Emgui_setStipple(int enabled);
// Font functions

void Emgui_setFont(uint32_t fontId);
void Emgui_setDefaultFont();
void Emgui_setDefaultFont(void);
bool Emgui_setFontByName(const char* ttfFontname);

int Emgui_loadFontTTF(const char* ttfFontname, float fontHeight);
Expand Down Expand Up @@ -149,8 +149,8 @@ bool Emgui_buttonCoordsImage(const char* text, int x, int y);
bool Emgui_button(const char* text);
bool Emgui_buttonImage(const char* filename);

void Emgui_setFirstControlFocus();
bool Emgui_hasKeyboardFocus();
void Emgui_setFirstControlFocus(void);
bool Emgui_hasKeyboardFocus(void);

void Emgui_radioButtonImage(void* image0, int size0, void* image1, int size1, enum EmguiMemoryLocation location,
uint32_t color, int x, int y, bool* stateIn);
Expand Down
6 changes: 3 additions & 3 deletions emgui/src/GFXBackend.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

#include "Types.h"

bool EMGFXBackend_create();
bool EMGFXBackend_destroy();
bool EMGFXBackend_create(void);
bool EMGFXBackend_destroy(void);
void EMGFXBackend_updateViewPort(int width, int height);
void EMGFXBackend_render();
void EMGFXBackend_render(void);

uint64_t EMGFXBackend_createFontTexture(void* imageBuffer, int w, int h);
uint64_t EMGFXBackend_createTexture(void* imageBuffer, int w, int h, int comp);
Expand Down
8 changes: 4 additions & 4 deletions emgui/src/GFXBackends/OpenGLBackend.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ static void setColor(uint32_t color)

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

bool EMGFXBackend_create()
bool EMGFXBackend_create(void)
{
// set the background colour
glClearColor(0.0, 0.0, 0.0, 1.0);
Expand All @@ -52,7 +52,7 @@ bool EMGFXBackend_create()

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

bool EMGFXBackend_destroy()
bool EMGFXBackend_destroy(void)
{
return true;
}
Expand Down Expand Up @@ -386,11 +386,11 @@ static void drawImage(struct DrawImageCommand* command)
}

extern struct RenderData s_renderData;
extern void swapBuffers();
extern void swapBuffers(void);

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

void EMGFXBackend_render()
void EMGFXBackend_render(void)
{
int i = 0, layerIter = 0;

Expand Down
2 changes: 1 addition & 1 deletion emgui/src/memory/LinearAllocator.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void LinearAllocator_setScratchPad(void* data, uint32_t size)

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

LinearAllocator* LinearAllocator_getScratchPad()
LinearAllocator* LinearAllocator_getScratchPad(void)
{
return &g_scratchPad;
}
Expand Down
2 changes: 1 addition & 1 deletion emgui/src/memory/LinearAllocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ static EMGUI_INLINE ptrdiff_t LinearAllocator_getCursor(const LinearAllocator* a
// \brief Gets a "scratch" pad that the user can use to allocate temporary memory. Notice that its up to the user
// to rewind the allocator back \linkLinearAllocator_getRewindPoint\endlink and \linkLinearAllocator_rewind\endlink

LinearAllocator* LinearAllocator_getScratchPad();
LinearAllocator* LinearAllocator_getScratchPad(void);
void LinearAllocator_setScratchPad(void* data, uint32_t size);

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down
Loading