Skip to content

Commit e9451de

Browse files
committed
Ensure new entity classes can be registered appropriately.
1 parent 0c0e5d6 commit e9451de

File tree

3 files changed

+23
-33
lines changed

3 files changed

+23
-33
lines changed

game/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software
1717
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1818
]]
1919

20-
add_library(chronon-game STATIC
20+
add_library(chronon-game OBJECT
2121
entity/entity.cpp
2222
entity/entity_manager.cpp
2323
entity/entity_player.cpp
@@ -43,14 +43,12 @@ add_library(chronon-game STATIC
4343
g_utils.cpp
4444
g_weapon.cpp
4545
m_actor.cpp
46-
m_flash.cpp
4746
m_move.cpp
4847
p_client.cpp
4948
p_hud.cpp
5049
p_trail.cpp
5150
p_view.cpp
5251
p_weapon.cpp
53-
q_shared.cpp
5452
)
5553

5654
target_compile_definitions(chronon-game PRIVATE GAME_HARD_LINKED)

game/entity/entity_player.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,4 +240,4 @@ void Player::SelectSpawnPoint() const
240240
}
241241
}
242242

243-
//REGISTER_ENTITY_CLASS( player, Player )
243+
REGISTER_ENTITY_CLASS( player, Player )

game/q_shared.h

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,25 @@
1-
/*
2-
Copyright (C) 1997-2001 Id Software, Inc.
3-
Copyright (C) 2019 Mark Sowden <markelswo@gmail.com>
4-
5-
This program is free software; you can redistribute it and/or
6-
modify it under the terms of the GNU General Public License
7-
as published by the Free Software Foundation; either version 2
8-
of the License, or (at your option) any later version.
1+
/******************************************************************************
2+
Copyright © 1997-2001 Id Software, Inc.
3+
Copyright © 2020-2025 Mark E Sowden <hogsy@oldtimes-software.com>
94
10-
This program is distributed in the hope that it will be useful,
11-
but WITHOUT ANY WARRANTY; without even the implied warranty of
12-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5+
This program is free software; you can redistribute it and/or
6+
modify it under the terms of the GNU General Public License
7+
as published by the Free Software Foundation; either version 2
8+
of the License, or (at your option) any later version.
139
14-
See the GNU General Public License for more details.
10+
This program is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1513
16-
You should have received a copy of the GNU General Public License
17-
along with this program; if not, write to the Free Software
18-
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19-
20-
*/
14+
See the GNU General Public License for more details.
2115
16+
You should have received a copy of the GNU General Public License
17+
along with this program; if not, write to the Free Software
18+
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19+
******************************************************************************/
2220
// q_shared.h -- included first by ALL program modules
2321

24-
#if defined( _MSC_VER )
25-
// unknown pragmas are SUPPOSED to be ignored, but....
26-
# pragma warning( disable : 4244 )// MIPS
27-
# pragma warning( disable : 4136 )// X86
28-
# pragma warning( disable : 4051 )// ALPHA
29-
30-
# pragma warning( disable : 4018 )// signed/unsigned mismatch
31-
# pragma warning( disable : 4305 )// truncation from const double to float
32-
#endif
22+
#pragma once
3323

3424
#include <cassert>
3525
#include <cmath>
@@ -59,8 +49,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
5949

6050
namespace chr
6151
{
62-
typedef unsigned int uint;
63-
}
52+
typedef unsigned char uchar;
53+
typedef unsigned short ushort;
54+
typedef unsigned int uint;
55+
}// namespace chr
6456

6557
typedef unsigned char byte;// todo: move this into our own namespace...
6658

@@ -159,7 +151,7 @@ namespace chr
159151

160152
static inline ColourF32 ConvertColourU8ToColourF32( const ColourU8 &src )
161153
{
162-
return ( ColourF32 ){
154+
return ( ColourF32 ) {
163155
( ( float ) src.r ) / 255.0f,
164156
( ( float ) src.g ) / 255.0f,
165157
( ( float ) src.b ) / 255.0f,

0 commit comments

Comments
 (0)