Scid  4.7.0
Macros | Typedefs | Functions | Variables
game.cpp File Reference
#include "game.h"
#include "bytebuf.h"
#include "common.h"
#include "dstring.h"
#include "naglatex.h"
#include "nagtext.h"
#include "position.h"
#include "stored.h"
#include "textbuf.h"
#include <algorithm>
#include <cstring>
Include dependency graph for game.cpp:

Go to the source code of this file.

Macros

#define ENCODE_NAG   11
 
#define ENCODE_COMMENT   12
 
#define ENCODE_START_MARKER   13
 
#define ENCODE_END_MARKER   14
 
#define ENCODE_END_GAME   15
 
#define ENCODE_FIRST   11
 
#define ENCODE_LAST   15
 

Typedefs

typedef GameGamePtr
 

Functions

void transPieces (char *s)
 
char transPiecesChar (char c)
 
uint strGetRatingType (const char *name)
 
void game_printNag (byte nag, char *str, bool asSymbol, gameFormatT format)
 
byte game_parseNag (std::pair< const char *, const char *> strview)
 
bool isSpecialMoveCode (byte val)
 
template<typename TCont >
errorT encodeTags (ByteBuffer *buf, const TCont &tagList)
 

Variables

int language = 0
 
const char * langPieces []
 
const char * ratingTypeNames [17]
 
constexpr int MOVE_CHUNKSIZE = 128
 
constexpr size_t MAX_TAG_LEN = 240
 

Macro Definition Documentation

◆ ENCODE_COMMENT

#define ENCODE_COMMENT   12

Definition at line 2945 of file game.cpp.

◆ ENCODE_END_GAME

#define ENCODE_END_GAME   15

Definition at line 2948 of file game.cpp.

◆ ENCODE_END_MARKER

#define ENCODE_END_MARKER   14

Definition at line 2947 of file game.cpp.

◆ ENCODE_FIRST

#define ENCODE_FIRST   11

Definition at line 2950 of file game.cpp.

◆ ENCODE_LAST

#define ENCODE_LAST   15

Definition at line 2951 of file game.cpp.

◆ ENCODE_NAG

#define ENCODE_NAG   11

Definition at line 2944 of file game.cpp.

◆ ENCODE_START_MARKER

#define ENCODE_START_MARKER   13

Definition at line 2946 of file game.cpp.

Typedef Documentation

◆ GamePtr

typedef Game* GamePtr

Definition at line 89 of file game.cpp.

Function Documentation

◆ encodeTags()

template<typename TCont >
errorT encodeTags ( ByteBuffer buf,
const TCont &  tagList 
)

Definition at line 3160 of file game.cpp.

◆ game_parseNag()

byte game_parseNag ( std::pair< const char *, const char *>  strview)

Definition at line 140 of file game.cpp.

◆ game_printNag()

void game_printNag ( byte  nag,
char *  str,
bool  asSymbol,
gameFormatT  format 
)

Definition at line 98 of file game.cpp.

◆ isSpecialMoveCode()

bool isSpecialMoveCode ( byte  val)
inline

Definition at line 2961 of file game.cpp.

◆ strGetRatingType()

uint strGetRatingType ( const char *  name)

Definition at line 80 of file game.cpp.

◆ transPieces()

void transPieces ( char *  s)

Definition at line 41 of file game.cpp.

◆ transPiecesChar()

char transPiecesChar ( char  c)

Definition at line 59 of file game.cpp.

Variable Documentation

◆ langPieces

const char* langPieces[]
Initial value:
= { "",
"PPKRQDRTBFNC", "PPKRQDRTBANC", "PBKKQDRTBLNS",
"PPKRQDRTBANC", "PpKKQDRTBLNP", "PPKKQDRVBSNJ",
"PGKKQVRBBFNH", "PBKKQDRTBLNS", "PBKKQDRTBLNS", "PPKRQDRTBANC", "PSKKQDRTBLNR", "" }

Definition at line 33 of file game.cpp.

◆ language

int language = 0

Definition at line 28 of file game.cpp.

◆ MAX_TAG_LEN

constexpr size_t MAX_TAG_LEN = 240

Definition at line 3133 of file game.cpp.

◆ MOVE_CHUNKSIZE

constexpr int MOVE_CHUNKSIZE = 128

Definition at line 436 of file game.cpp.

◆ ratingTypeNames

const char* ratingTypeNames[17]
Initial value:
= {
"Elo", "Rating", "Rapid", "ICCF", "USCF", "DWZ", "ECF",
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL
}

Definition at line 71 of file game.cpp.