Skip to content

Commit b14e178

Browse files
committed
Support for multiple surfaces etc. - these changes are incomplete, and I did them ages ago, but might as well submit them...
1 parent 67dbfe3 commit b14e178

File tree

13 files changed

+2598
-324
lines changed

13 files changed

+2598
-324
lines changed

docs/entities.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Entities
2+
3+
## Fields
4+
5+
I've prioritized fields we're missing below.
6+
7+
| Name | Description | Status |
8+
|----------|-------------|---------|
9+
| maxsx | ... | Pending |
10+
| maxsy | ... | Pending |
11+
| maxsz | ... | Pending |
12+
| sequence | ... | Pending |
13+
| cap | ... | Pending |
14+
| falloff | ... | Pending |
15+
| min | ... | Pending |
16+
| max | ... | Pending |

engine/app.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void chr::App::Initialize()
4747
unsigned int oldTime = GetNumMilliseconds();
4848
while ( true )
4949
{
50-
chr::globalApp->PollEvents();
50+
globalApp->PollEvents();
5151

5252
do
5353
{
@@ -104,10 +104,16 @@ void chr::App::PollEvents()
104104

105105
switch ( event.type )
106106
{
107+
default:
108+
break;
109+
107110
case SDL_WINDOWEVENT:
108111
{
109112
switch ( event.window.event )
110113
{
114+
default:
115+
break;
116+
111117
case SDL_WINDOWEVENT_ENTER:
112118
case SDL_WINDOWEVENT_FOCUS_GAINED:
113119
IN_Activate( true );

engine/client/ref.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3131

3232
typedef struct entity_s
3333
{
34+
entity_s() = default;
35+
~entity_s() = default;
36+
3437
struct model_s *model;// opaque type outside refresh
3538
float angles[ 3 ];
3639
vec3_t scale;
@@ -58,9 +61,6 @@ typedef struct entity_s
5861

5962
struct image_s *skin;// NULL for inline skin
6063
unsigned int flags;
61-
62-
// draw profile; only matters for MDA
63-
std::string profile{ "DFLT" };
6464
} entity_t;
6565

6666
#define ENTITY_FLAGS 68

engine/model/model.h

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/******************************************************************************
2+
Copyright © 1997-2001 Id Software, Inc.
3+
Copyright © 2020-2025 Mark E Sowden <hogsy@oldtimes-software.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.
9+
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.
13+
14+
See the GNU General Public License for more details.
15+
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+
21+
#pragma once
22+
23+
namespace chr
24+
{
25+
class Model
26+
{
27+
public:
28+
Model() = default;
29+
virtual ~Model();
30+
31+
virtual void Draw() = 0;
32+
};
33+
}// namespace chr

0 commit comments

Comments
 (0)