OpenTTD Source 20260311-master-g511d3794ce
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, CONTENT_TYPE_END>
 Bitset of chosen content types.
using ContentID = uint32_t
 Unique identifier for the content.

Enumerations

enum  ContentType : uint8_t {
  CONTENT_TYPE_BEGIN = 1 , CONTENT_TYPE_BASE_GRAPHICS = 1 , CONTENT_TYPE_NEWGRF = 2 , CONTENT_TYPE_AI = 3 ,
  CONTENT_TYPE_AI_LIBRARY = 4 , CONTENT_TYPE_SCENARIO = 5 , CONTENT_TYPE_HEIGHTMAP = 6 , CONTENT_TYPE_BASE_SOUNDS = 7 ,
  CONTENT_TYPE_BASE_MUSIC = 8 , CONTENT_TYPE_GAME = 9 , CONTENT_TYPE_GAME_LIBRARY = 10 , CONTENT_TYPE_END ,
  INVALID_CONTENT_TYPE = 0xFF
}
 The values in the enum are important; they are used as database 'keys'. 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 37 of file tcp_content_type.h.

◆ ContentTypes

Bitset of chosen content types.

Definition at line 34 of file tcp_content_type.h.

Enumeration Type Documentation

◆ ContentType

enum ContentType : uint8_t

The values in the enum are important; they are used as database 'keys'.

Enumerator
CONTENT_TYPE_BEGIN 

Helper to mark the begin of the types.

CONTENT_TYPE_BASE_GRAPHICS 

The content consists of base graphics.

CONTENT_TYPE_NEWGRF 

The content consists of a NewGRF.

CONTENT_TYPE_AI 

The content consists of an AI.

CONTENT_TYPE_AI_LIBRARY 

The content consists of an AI library.

CONTENT_TYPE_SCENARIO 

The content consists of a scenario.

CONTENT_TYPE_HEIGHTMAP 

The content consists of a heightmap.

CONTENT_TYPE_BASE_SOUNDS 

The content consists of base sounds.

CONTENT_TYPE_BASE_MUSIC 

The content consists of base music.

CONTENT_TYPE_GAME 

The content consists of a game script.

CONTENT_TYPE_GAME_LIBRARY 

The content consists of a GS library.

CONTENT_TYPE_END 

Helper to mark the end of the types.

INVALID_CONTENT_TYPE 

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 39 of file tcp_content_type.h.