OpenTTD Source 20260421-master-gc2fbc6fdeb
tcp_content_type.h File Reference

Basic types related to the content on the content server. More...

#include "../../3rdparty/md5/md5.h"
#include "../../string_type.h"
#include "../../textfile_type.h"

Go to the source code of this file.

Data Structures

struct  ContentInfo
 Container for all important information about a piece of content. More...

Typedefs

using ContentTypes = EnumBitSet<ContentType, uint16_t, ContentType::End>
 Bitset of chosen content types.
using ContentID = uint32_t
 Unique identifier for the content.

Enumerations

enum class  ContentType : uint8_t {
  Begin = 1 , BaseGraphics = 1 , NewGRF = 2 , Ai = 3 ,
  AiLibrary = 4 , Scenario = 5 , Heightmap = 6 , BaseSounds = 7 ,
  BaseMusic = 8 , Gs = 9 , GsLibrary = 10 , End ,
  Invalid = 0xFF
}
 The values in the enum are important; they are received over the network from the content servers. More...

Variables

static constexpr ContentID INVALID_CONTENT_ID = UINT32_MAX
 Sentinel for invalid content.

Detailed Description

Basic types related to the content on the content server.

Definition in file tcp_content_type.h.

Typedef Documentation

◆ ContentID

using ContentID = uint32_t

Unique identifier for the content.

Definition at line 42 of file tcp_content_type.h.

◆ ContentTypes

Bitset of chosen content types.

Definition at line 37 of file tcp_content_type.h.

Enumeration Type Documentation

◆ ContentType

enum class ContentType : uint8_t
strong

The values in the enum are important; they are received over the network from the content servers.

Enumerator
Begin 

Helper to mark the begin of the types.

BaseGraphics 

The content consists of base graphics.

NewGRF 

The content consists of a NewGRF.

Ai 

The content consists of an AI.

AiLibrary 

The content consists of an AI library.

Scenario 

The content consists of a scenario.

Heightmap 

The content consists of a heightmap.

BaseSounds 

The content consists of base sounds.

BaseMusic 

The content consists of base music.

Gs 

The content consists of a game script.

GsLibrary 

The content consists of a GS library.

End 

Helper to mark the end of the types.

Invalid 

Invalid/uninitialized content.

Definition at line 19 of file tcp_content_type.h.

Variable Documentation

◆ INVALID_CONTENT_ID

ContentID INVALID_CONTENT_ID = UINT32_MAX
staticconstexpr

Sentinel for invalid content.

Definition at line 44 of file tcp_content_type.h.