Skip to content

Commit

Permalink
Update all references of hosae to new name.
Browse files Browse the repository at this point in the history
  • Loading branch information
hogsy committed Dec 3, 2023
1 parent d68c558 commit 85c221f
Show file tree
Hide file tree
Showing 37 changed files with 132 additions and 134 deletions.
16 changes: 7 additions & 9 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
# Generated from CLion C/C++ Code Style settings
BasedOnStyle: LLVM
BasedOnStyle: Microsoft
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
#AlignConsecutiveAssignments: AcrossComments
AlignConsecutiveBitFields: Consecutive
AlignConsecutiveMacros: Consecutive
AlignConsecutiveDeclarations: Consecutive
AlignEscapedNewlines: Left
AlignTrailingComments: true
AlignOperands: true
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AlignArrayOfStructures: Left
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: Always
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
Expand Down Expand Up @@ -51,9 +49,9 @@ SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 0
SpacesInAngles: true
SpacesInCStyleCastParentheses: true
SpacesInContainerLiterals: false
SpacesInContainerLiterals: true
SpacesInParentheses: true
SpacesInSquareBrackets: true
TabWidth: 4
UseTab: AlignWithSpaces
UseTab: ForIndentation
SortIncludes: Never
2 changes: 1 addition & 1 deletion .github/workflows/build-linux-gcc_x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: 'Upload Artifact'
uses: actions/upload-artifact@v2.2.4
with:
name: hosae-release
name: chronon-release
path: release/
retention-days: 30

2 changes: 1 addition & 1 deletion .github/workflows/build-windows-gcc_x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: 'Upload Artifact'
uses: actions/upload-artifact@v2.2.4
with:
name: hosae-release
name: chronon-release
path: release/
retention-days: 30

14 changes: 7 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

cmake_minimum_required(VERSION 3.5.1)

project(hosae)
project(Chronon)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_C_STANDARD 11)
Expand Down Expand Up @@ -66,15 +66,15 @@ add_definitions(-DGIT_BRANCH="${GIT_BRANCH}")

##############################################################

set(HOSAE_OUTPUT_DIR "${CMAKE_SOURCE_DIR}/release/")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${HOSAE_OUTPUT_DIR}")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${HOSAE_OUTPUT_DIR}")
set(CHRONON_OUTPUT_DIR "${CMAKE_SOURCE_DIR}/release/")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CHRONON_OUTPUT_DIR}")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CHRONON_OUTPUT_DIR}")
set(CMAKE_SHARED_LIBRARY_PREFIX "")
foreach (OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${HOSAE_OUTPUT_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${HOSAE_OUTPUT_DIR})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${HOSAE_OUTPUT_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CHRONON_OUTPUT_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CHRONON_OUTPUT_DIR})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CHRONON_OUTPUT_DIR})
endforeach (OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES)

include_directories(qcommon/include/)
Expand Down
24 changes: 12 additions & 12 deletions engine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ elseif (UNIX)
)
endif ()

add_executable(hosae-engine WIN32
add_executable(chronon-engine WIN32
app.cpp
hunk.cpp
input.cpp
Expand Down Expand Up @@ -122,36 +122,36 @@ add_executable(hosae-engine WIN32
../3rdparty/glew/src/glew.c
)

set_target_properties(hosae-engine PROPERTIES OUTPUT_NAME hosae)
set_target_properties(chronon-engine PROPERTIES OUTPUT_NAME Chronon)

target_compile_definitions(hosae-engine PRIVATE
target_compile_definitions(chronon-engine PRIVATE
GLEW_STATIC
)
target_include_directories(hosae-engine PRIVATE
target_include_directories(chronon-engine PRIVATE
./
../
../3rdparty/
../3rdparty/glew/include/
)

target_link_libraries(hosae-engine hosae-game)
target_link_libraries(chronon-engine chronon-game)

find_package(SDL2 CONFIG)
if (${SDL2_FOUND})
target_link_libraries(hosae-engine ${SDL2_LIBRARIES})
target_link_libraries(chronon-engine ${SDL2_LIBRARIES})
else ()
message("Linking against SDL2 in repository.")
target_include_directories(hosae-engine PRIVATE ../3rdparty/sdl2/include/)
target_link_directories(hosae-engine PRIVATE ../3rdparty/sdl2/lib/)
target_link_libraries(hosae-engine SDL2)
target_include_directories(chronon-engine PRIVATE ../3rdparty/sdl2/include/)
target_link_directories(chronon-engine PRIVATE ../3rdparty/sdl2/lib/)
target_link_libraries(chronon-engine SDL2)
endif ()

set(OpenGL_GL_PREFERENCE GLVND)
find_package(OpenGL REQUIRED)
target_link_libraries(hosae-engine ${OPENGL_LIBRARIES})
target_link_libraries(chronon-engine ${OPENGL_LIBRARIES})

if (WIN32)
target_link_libraries(hosae-engine
target_link_libraries(chronon-engine
mingw32
Imm32
Setupapi
Expand All @@ -160,5 +160,5 @@ if (WIN32)
Winmm
)
elseif (UNIX AND NOT APPLE)
target_link_libraries(hosae-engine X11 Xext dl)
target_link_libraries(chronon-engine X11 Xext dl)
endif ()
2 changes: 1 addition & 1 deletion engine/ape/ape.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "../client/client.h"

namespace nox::ape
namespace chr::ape
{
enum class OpCode
{
Expand Down
26 changes: 13 additions & 13 deletions engine/app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "client/keys.h"
#include "client/input.h"

nox::App *nox::globalApp = nullptr;
chr::App *chr::globalApp = nullptr;

void nox::App::Initialize()
void chr::App::Initialize()
{
int status = SDL_Init(
SDL_INIT_VIDEO |
Expand All @@ -48,13 +48,13 @@ void nox::App::Initialize()
Qcommon_Init( argc_, argv_ );
}

[[noreturn]] void nox::App::Run()
[[noreturn]] void chr::App::Run()
{
unsigned int time, newTime;
unsigned int oldTime = GetNumMilliseconds();
while ( true )
{
nox::globalApp->PollEvents();
chr::globalApp->PollEvents();

do
{
Expand All @@ -73,7 +73,7 @@ void nox::App::Initialize()

unsigned int sys_frame_time = 0;// todo: kill

void nox::App::SendKeyEvents()
void chr::App::SendKeyEvents()
{
SDL_PumpEvents();

Expand All @@ -82,13 +82,13 @@ void nox::App::SendKeyEvents()
sys_frame_time = GetNumMilliseconds();// FIXME: should this be at start?
}

unsigned int nox::App::GetNumMilliseconds()
unsigned int chr::App::GetNumMilliseconds()
{
lastMs_ = SDL_GetTicks();
return lastMs_;
}

char *nox::App::GetClipboardData()
char *chr::App::GetClipboardData()
{
if ( !SDL_HasClipboardText() )
{
Expand All @@ -99,7 +99,7 @@ char *nox::App::GetClipboardData()
}

bool IN_HandleEvent( const SDL_Event &event );
void nox::App::PollEvents()
void chr::App::PollEvents()
{
SDL_Event event;
while ( SDL_PollEvent( &event ) )
Expand Down Expand Up @@ -140,7 +140,7 @@ void nox::App::PollEvents()
/**
* This pushes the given string to the native terminal/console.
*/
void nox::App::PushConsoleOutput( const char *text )
void chr::App::PushConsoleOutput( const char *text )
{
#if defined( _WIN32 ) && defined( _MSC_VER )
OutputDebugString( text );
Expand All @@ -149,7 +149,7 @@ void nox::App::PushConsoleOutput( const char *text )
#endif
}

void nox::App::ShowCursor( bool show )
void chr::App::ShowCursor( bool show )
{
SDL_ShowCursor( show );
}
Expand All @@ -163,9 +163,9 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLin
extern "C" int main( int argc, char **argv )
{
#endif
nox::globalApp = new nox::App( argc, argv );
chr::globalApp = new chr::App( argc, argv );

// todo: consider combining these??
nox::globalApp->Initialize();
nox::globalApp->Run();
chr::globalApp->Initialize();
chr::globalApp->Run();
}
2 changes: 1 addition & 1 deletion engine/app.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

#pragma once

namespace nox
namespace chr
{
class App
{
Expand Down
2 changes: 1 addition & 1 deletion engine/client/cl_input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ void CL_SendCmd( void )

if ( cls.state == ca_connected )
{
if ( cls.netchan.message.cursize || nox::globalApp->GetCurrentMillisecond() - cls.netchan.last_sent > 1000 )
if ( cls.netchan.message.cursize || chr::globalApp->GetCurrentMillisecond() - cls.netchan.last_sent > 1000 )
Netchan_Transmit( &cls.netchan, 0, buf.data );
return;
}
Expand Down
20 changes: 10 additions & 10 deletions engine/client/cl_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,7 @@ void CL_Disconnect( void )
{
int time;

time = nox::globalApp->GetNumMilliseconds() - cl.timedemo_start;
time = chr::globalApp->GetNumMilliseconds() - cl.timedemo_start;
if ( time > 0 )
Com_Printf( "%i frames, %3.1f seconds: %3.1f fps\n", cl.timedemo_frames,
time / 1000.0, cl.timedemo_frames * 1000.0 / time );
Expand Down Expand Up @@ -858,7 +858,7 @@ void CL_Skins_f( void )
continue;
Com_Printf( "client %i: %s\n", i, cl.configstrings[ CS_PLAYERSKINS + i ] );
SCR_UpdateScreen();
nox::globalApp->SendKeyEvents();// pump message loop
chr::globalApp->SendKeyEvents();// pump message loop
CL_ParseClientinfo( i );
}
}
Expand Down Expand Up @@ -1443,7 +1443,7 @@ CL_InitLocal
void CL_InitLocal( void )
{
cls.state = ca_disconnected;
cls.realtime = nox::globalApp->GetNumMilliseconds();
cls.realtime = chr::globalApp->GetNumMilliseconds();

CL_InitInput();

Expand Down Expand Up @@ -1683,7 +1683,7 @@ CL_SendCommand
void CL_SendCommand()
{
// get new key events
nox::globalApp->SendKeyEvents();
chr::globalApp->SendKeyEvents();

// allow mice or other external controllers to add commands
IN_Commands();
Expand Down Expand Up @@ -1725,7 +1725,7 @@ void CL_Frame( unsigned int msec )
// decide the simulation time
cls.frametime = extratime / 1000.0;
cl.time += extratime;
cls.realtime = nox::globalApp->GetCurrentMillisecond();
cls.realtime = chr::globalApp->GetCurrentMillisecond();

extratime = 0;
#if 0
Expand All @@ -1738,7 +1738,7 @@ void CL_Frame( unsigned int msec )

// if in the debugger last frame, don't timeout
if ( msec > 5000 )
cls.netchan.last_received = nox::globalApp->GetNumMilliseconds();
cls.netchan.last_received = chr::globalApp->GetNumMilliseconds();

// fetch results from server
CL_ReadPackets();
Expand All @@ -1756,10 +1756,10 @@ void CL_Frame( unsigned int msec )

// update the screen
if ( host_speeds->value )
time_before_ref = nox::globalApp->GetNumMilliseconds();
time_before_ref = chr::globalApp->GetNumMilliseconds();
SCR_UpdateScreen();
if ( host_speeds->value )
time_after_ref = nox::globalApp->GetNumMilliseconds();
time_after_ref = chr::globalApp->GetNumMilliseconds();

// update audio
S_Update( cl.refdef.vieworg, cl.v_forward, cl.v_right, cl.v_up );
Expand All @@ -1780,13 +1780,13 @@ void CL_Frame( unsigned int msec )
{
if ( !lasttimecalled )
{
lasttimecalled = nox::globalApp->GetNumMilliseconds();
lasttimecalled = chr::globalApp->GetNumMilliseconds();
if ( log_stats_file )
fprintf( log_stats_file, "0\n" );
}
else
{
unsigned int now = nox::globalApp->GetNumMilliseconds();
unsigned int now = chr::globalApp->GetNumMilliseconds();

if ( log_stats_file )
fprintf( log_stats_file, "%d\n", now - lasttimecalled );
Expand Down
2 changes: 1 addition & 1 deletion engine/client/cl_parse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ void CL_RegisterSounds( void )
if ( !cl.configstrings[ CS_SOUNDS + i ][ 0 ] )
break;
cl.sound_precache[ i ] = S_RegisterSound( cl.configstrings[ CS_SOUNDS + i ] );
nox::globalApp->SendKeyEvents();// pump message loop
chr::globalApp->SendKeyEvents();// pump message loop
}
S_EndRegistration();
}
Expand Down
8 changes: 4 additions & 4 deletions engine/client/cl_scrn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ void SCR_BeginLoadingPlaque( void )
else
scr_draw_loading = 1;
SCR_UpdateScreen();
cls.disable_screen = nox::globalApp->GetNumMilliseconds();
cls.disable_screen = chr::globalApp->GetNumMilliseconds();
cls.disable_servercount = cl.servercount;
}

Expand Down Expand Up @@ -629,7 +629,7 @@ void SCR_TimeRefresh_f()
return;
}

start = nox::globalApp->GetNumMilliseconds();
start = chr::globalApp->GetNumMilliseconds();

if ( Cmd_Argc() == 2 )
{// run without page flipping
Expand All @@ -653,7 +653,7 @@ void SCR_TimeRefresh_f()
}
}

stop = nox::globalApp->GetNumMilliseconds();
stop = chr::globalApp->GetNumMilliseconds();
time = ( stop - start ) / 1000.0;
Com_Printf( "%lf seconds (%lf fps)\n", time, 128 / time );
}
Expand Down Expand Up @@ -1267,7 +1267,7 @@ void SCR_UpdateScreen()
// do nothing at all
if ( cls.disable_screen )
{
if ( nox::globalApp->GetNumMilliseconds() - cls.disable_screen > 120000 )
if ( chr::globalApp->GetNumMilliseconds() - cls.disable_screen > 120000 )
{
cls.disable_screen = 0;
Com_Printf( "Loading plaque timed out.\n" );
Expand Down
Loading

0 comments on commit 85c221f

Please sign in to comment.