C4GameVersion.h File Reference
#include "C4Version.h"
#include "lib/C4InputValidation.h"
Include dependency graph for C4GameVersion.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


struct  C4GameVersion


int CompareVersion (int iVer1, int iVer2, int iRVer1=C4XVER1, int iRVer2=C4XVER2)

Function Documentation

◆ CompareVersion()

int CompareVersion ( int  iVer1,
int  iVer2,
int  iRVer1 = C4XVER1,
int  iRVer2 = C4XVER2 

Definition at line 51 of file C4GameVersion.h.

Referenced by C4DefList::CheckEngineVersion(), and C4Game::OpenScenario().

53 {
54  if (iVer1 > iRVer1) return 1; if (iVer1 < iRVer1) return -1;
55  if (iVer2 > iRVer2) return 1; if (iVer2 < iRVer2) return -1;
56  return 0;
57 }
Here is the caller graph for this function: