forked from metin2/server
1
0
Fork 0

Removed register types

This commit is contained in:
Exynox 2022-11-27 22:29:57 +02:00
parent 148223340c
commit 71189e7c08
1 changed files with 3 additions and 3 deletions

View File

@ -75,7 +75,7 @@ bool DecodeMatrix(const char* szsrc, const char* szpwd, char* lpdes, const unsig
void MatrixCardRndCoordinate(unsigned int & rows, unsigned int & cols) void MatrixCardRndCoordinate(unsigned int & rows, unsigned int & cols)
{ {
for (register unsigned int i = 0; i < (ASLENGTH >> 1); i++) for (unsigned int i = 0; i < (ASLENGTH >> 1); i++)
{ {
rows |= ((Random::get(0, MAX_ROWS - 1)) & 0x000000FF) << ((4 - i - 1) * 8); rows |= ((Random::get(0, MAX_ROWS - 1)) & 0x000000FF) << ((4 - i - 1) * 8);
cols |= ((Random::get(0, MAX_COLS - 1)) & 0x000000FF) << ((4 - i - 1) * 8); cols |= ((Random::get(0, MAX_COLS - 1)) & 0x000000FF) << ((4 - i - 1) * 8);
@ -98,7 +98,7 @@ bool ChkCoordinate(const unsigned int rows, const unsigned int cols, const char*
unsigned short * pmatrix = (unsigned short *)matrix; unsigned short * pmatrix = (unsigned short *)matrix;
unsigned short * panswer = (unsigned short *)answer; unsigned short * panswer = (unsigned short *)answer;
for (register unsigned int i = 0; i < (ASLENGTH >> 1); i++) for (unsigned int i = 0; i < (ASLENGTH >> 1); i++)
{ {
if (*(pmatrix + (ROW(rows, i) * MAX_COLS + COL(cols, i))) != *(panswer + i)) if (*(pmatrix + (ROW(rows, i) * MAX_COLS + COL(cols, i))) != *(panswer + i))
{ {
@ -143,7 +143,7 @@ void GetRightAnswer(const unsigned int rows, const unsigned int cols, const char
memset(answer, 0, nsize); memset(answer, 0, nsize);
for (register unsigned int i = 0; i < (ASLENGTH >> 1); i++) for (unsigned int i = 0; i < (ASLENGTH >> 1); i++)
{ {
char sztemp[3] = { 0, 0, 0 }; char sztemp[3] = { 0, 0, 0 };
memcpy(sztemp, (char*)(pmatrix + (ROW(rows, i) * MAX_COLS + COL(cols, i))), 2); memcpy(sztemp, (char*)(pmatrix + (ROW(rows, i) * MAX_COLS + COL(cols, i))), 2);