/
trilirium
/
Pacman
Обзор
Документация
Войти
/
trilirium
/
Pacman
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Character.cpp
57 строк
1 KB
Trilirium
first commit
19 июн 2026, 11:07
19 июн 2026, 11:07
d44591e
Код
Авторство
О чём код?
// Character.cpp // ///////////////////////////////////////////////////////////////////////////// #include "Character.h" using namespace Puckman; ///////////////////////////////////////////////////////////////////////////// // initialization and cleanup ///////////////////////////////////////////////////////////////////////////// Character::Character() { } Character::~Character() { } void Character::resetState() { orientation = (Orientation)0; posX = posY = 0; tilePosX = tilePosY = 0; movOffsX = movOffsY = 0; sprite = color = priority = 0; flipX = flipY = false; } ///////////////////////////////////////////////////////////////////////////// // methods ///////////////////////////////////////////////////////////////////////////// // processes wraparound cases and return true if it has happened or it's close to happen bool Character::checkWrapAround() { // check if wraparound is going to happen on the right side if (tilePosX == 0x1d){ tilePosX = 0x3d; return true; } // check if wraparound is going to happen on the left side if (tilePosX == 0x3e){ tilePosX = 0x1e; return true; } // if the position is near the sides, return true if ((tilePosX < 0x21) || (tilePosX >= 0x3b)){ return true; } return false; }