Skip to content

Commit

Permalink
HOPKINS: Standardize the use of g_PTRNUL
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke committed Apr 3, 2013
1 parent b22a9b1 commit 177df08
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions engines/hopkins/computer.cpp
Expand Up @@ -44,9 +44,9 @@ ComputerManager::ComputerManager(HopkinsEngine *vm) {
memset(_menuText[i]._line, 0, 90);
}
Common::fill(&_inputBuf[0], &_inputBuf[200], '\0');
_breakoutSpr = NULL;
_breakoutSpr = g_PTRNUL;
_textColor = 0;
_breakoutLevel = NULL;
_breakoutLevel = (int16 *)g_PTRNUL;
_breakoutBrickNbr = 0;
_breakoutScore = 0;
_breakoutLives = 0;
Expand Down
2 changes: 1 addition & 1 deletion engines/hopkins/events.cpp
Expand Up @@ -44,7 +44,7 @@ EventsManager::EventsManager(HopkinsEngine *vm) {
_mouseSpriteId = 0;
_curMouseButton = 0;
_mouseButton = 0;
_mouseCursor = NULL;
_mouseCursor = g_PTRNUL;
_gameCounter = 0;
_rateCounter = 0;
_escKeyFl = false;
Expand Down
8 changes: 4 additions & 4 deletions engines/hopkins/globals.cpp
Expand Up @@ -113,11 +113,11 @@ Globals::Globals(HopkinsEngine *vm) {
_oceanDirection = DIR_NONE;

// Initialize pointers
_levelSpriteBuf = NULL;
_saveData = NULL;
_levelSpriteBuf = g_PTRNUL;
_saveData = (Savegame *)g_PTRNUL;
_answerBuffer = g_PTRNUL;
_characterSpriteBuf = NULL;
_optionDialogSpr = NULL;
_characterSpriteBuf = g_PTRNUL;
_optionDialogSpr = g_PTRNUL;

// Reset flags
_censorshipFl = false;
Expand Down
6 changes: 3 additions & 3 deletions engines/hopkins/graphics.cpp
Expand Up @@ -42,15 +42,15 @@ GraphicsManager::GraphicsManager(HopkinsEngine *vm) {
_initGraphicsFl = false;
_screenWidth = _screenHeight = 0;
_screenLineSize = 0;
PAL_PIXELS = NULL;
PAL_PIXELS = g_PTRNUL;
_lineNbr = 0;
_videoPtr = NULL;
_scrollOffset = 0;
_scrollPosX = 0;
_largeScreenFl = false;
_oldScrollPosX = 0;
_backBuffer = NULL;
_frontBuffer = NULL;
_backBuffer = g_PTRNUL;
_frontBuffer = g_PTRNUL;
_screenBuffer = g_PTRNUL;
_backupScreen = g_PTRNUL;
_showDirtyRects = false;
Expand Down
2 changes: 1 addition & 1 deletion engines/hopkins/menu.cpp
Expand Up @@ -44,7 +44,7 @@ MenuManager::MenuManager(HopkinsEngine *vm) {
}

int MenuManager::menu() {
byte *spriteData = NULL;
byte *spriteData = g_PTRNUL;
MenuSelection menuIndex;
Common::Point mousePos;
signed int result;
Expand Down
8 changes: 4 additions & 4 deletions engines/hopkins/objects.cpp
Expand Up @@ -101,10 +101,10 @@ ObjectsManager::ObjectsManager(HopkinsEngine *vm) {
_curObjectIndex = 0;
_forestFl = false;
_mapCarPosX = _mapCarPosY = 0;
_forestSprite = NULL;
_gestureBuf = NULL;
_forestSprite = g_PTRNUL;
_gestureBuf = g_PTRNUL;
_curGestureFile = 0;
_headSprites = NULL;
_headSprites = g_PTRNUL;
_homeRateCounter = 0;
_lastDirection = DIR_NONE;
_oldDirection = DIR_NONE;
Expand Down Expand Up @@ -193,7 +193,7 @@ void ObjectsManager::changeObject(int objIndex) {
}

byte *ObjectsManager::loadObjectFromFile(int objIndex, bool mode) {
byte *dataP = NULL;
byte *dataP = g_PTRNUL;
int objectFileNum = _objectAuthIcons[objIndex]._objectFileNum;
int idx = _objectAuthIcons[objIndex]._idx;

Expand Down
8 changes: 4 additions & 4 deletions engines/hopkins/talk.cpp
Expand Up @@ -37,10 +37,10 @@ namespace Hopkins {

TalkManager::TalkManager(HopkinsEngine *vm) {
_vm = vm;
_characterBuffer = NULL;
_characterPalette = NULL;
_characterSprite = NULL;
_characterAnim = NULL;
_characterBuffer = g_PTRNUL;
_characterPalette = g_PTRNUL;
_characterSprite = g_PTRNUL;
_characterAnim = g_PTRNUL;
_characterSize = 0;
_dialogueMesgId1 = _dialogueMesgId2 = _dialogueMesgId3 = _dialogueMesgId4 = 0;
_paletteBufferIdx = 0;
Expand Down

0 comments on commit 177df08

Please sign in to comment.