Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Generals/Code/GameEngine/Include/Common/MessageStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,10 @@ class GameMessage : public MemoryPoolObject

MSG_META_BEGIN_CAMERA_ROTATE_LEFT,
MSG_META_END_CAMERA_ROTATE_LEFT,
MSG_META_ALT_CAMERA_ROTATE_LEFT, ///< TheSuperHackers @feature Rotate camera in 45 degree increments
MSG_META_BEGIN_CAMERA_ROTATE_RIGHT,
MSG_META_END_CAMERA_ROTATE_RIGHT,
MSG_META_ALT_CAMERA_ROTATE_RIGHT, ///< TheSuperHackers @feature Rotate camera in 45 degree increments
MSG_META_BEGIN_CAMERA_ZOOM_IN,
MSG_META_END_CAMERA_ZOOM_IN,
MSG_META_BEGIN_CAMERA_ZOOM_OUT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3271,6 +3271,10 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
DEBUG_ASSERTCRASH(TheInGameUI->isCameraRotatingLeft(), ("Clearing rotate camera left, but it's already clear!"));
TheInGameUI->setCameraRotateLeft( false );
break;
case GameMessage::MSG_META_ALT_CAMERA_ROTATE_LEFT:
if (TheTacticalView->isCameraMovementFinished())
TheTacticalView->rotateCamera(-1.0f / 8.0f, 500);
break;
case GameMessage::MSG_META_BEGIN_CAMERA_ROTATE_RIGHT:
DEBUG_ASSERTCRASH(!TheInGameUI->isCameraRotatingRight(), ("Setting rotate camera right, but it's already set!"));
TheInGameUI->setCameraRotateRight( true );
Expand All @@ -3279,6 +3283,10 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
DEBUG_ASSERTCRASH(TheInGameUI->isCameraRotatingRight(), ("Clearing rotate camera right, but it's already clear!"));
TheInGameUI->setCameraRotateRight( false );
break;
case GameMessage::MSG_META_ALT_CAMERA_ROTATE_RIGHT:
if (TheTacticalView->isCameraMovementFinished())
TheTacticalView->rotateCamera(1.0f / 8.0f, 500);
break;
case GameMessage::MSG_META_BEGIN_CAMERA_ZOOM_IN:
DEBUG_ASSERTCRASH(!TheInGameUI->isCameraZoomingIn(), ("Setting zoom camera in, but it's already set!"));
TheInGameUI->setCameraZoomIn( true );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,24 @@ MetaMapRec *MetaMap::getMetaMapRec(GameMessage::Type t)
map->m_displayName = TheGameText->FETCH_OR_SUBSTITUTE("GUI:SelectNextIdleWorker", L"Next Idle Worker");
}
}
{
MetaMapRec* map = TheMetaMap->getMetaMapRec(GameMessage::MSG_META_ALT_CAMERA_ROTATE_LEFT);
if (map->m_key == MK_NONE) {
map->m_key = MK_KP4;
map->m_transition = DOWN;
map->m_modState = CTRL;
map->m_usableIn = COMMANDUSABLE_GAME;
}
}
{
MetaMapRec* map = TheMetaMap->getMetaMapRec(GameMessage::MSG_META_ALT_CAMERA_ROTATE_RIGHT);
if (map->m_key == MK_NONE) {
map->m_key = MK_KP6;
map->m_transition = DOWN;
map->m_modState = CTRL;
map->m_usableIn = COMMANDUSABLE_GAME;
}
}

#if defined(RTS_DEBUG)
{
Expand Down
2 changes: 2 additions & 0 deletions GeneralsMD/Code/GameEngine/Include/Common/MessageStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,10 @@ class GameMessage : public MemoryPoolObject

MSG_META_BEGIN_CAMERA_ROTATE_LEFT,
MSG_META_END_CAMERA_ROTATE_LEFT,
MSG_META_ALT_CAMERA_ROTATE_LEFT, ///< TheSuperHackers @feature Rotate camera in 45 degree increments
MSG_META_BEGIN_CAMERA_ROTATE_RIGHT,
MSG_META_END_CAMERA_ROTATE_RIGHT,
MSG_META_ALT_CAMERA_ROTATE_RIGHT, ///< TheSuperHackers @feature Rotate camera in 45 degree increments
MSG_META_BEGIN_CAMERA_ZOOM_IN,
MSG_META_END_CAMERA_ZOOM_IN,
MSG_META_BEGIN_CAMERA_ZOOM_OUT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3416,6 +3416,10 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
DEBUG_ASSERTCRASH(TheInGameUI->isCameraRotatingLeft(), ("Clearing rotate camera left, but it's already clear!"));
TheInGameUI->setCameraRotateLeft( false );
break;
case GameMessage::MSG_META_ALT_CAMERA_ROTATE_LEFT:
if (TheTacticalView->isCameraMovementFinished())
TheTacticalView->rotateCamera(-1.0f / 8.0f, 500, 100, 400);
break;
case GameMessage::MSG_META_BEGIN_CAMERA_ROTATE_RIGHT:
DEBUG_ASSERTCRASH(!TheInGameUI->isCameraRotatingRight(), ("Setting rotate camera right, but it's already set!"));
TheInGameUI->setCameraRotateRight( true );
Expand All @@ -3424,6 +3428,10 @@ GameMessageDisposition CommandTranslator::translateGameMessage(const GameMessage
DEBUG_ASSERTCRASH(TheInGameUI->isCameraRotatingRight(), ("Clearing rotate camera right, but it's already clear!"));
TheInGameUI->setCameraRotateRight( false );
break;
case GameMessage::MSG_META_ALT_CAMERA_ROTATE_RIGHT:
if (TheTacticalView->isCameraMovementFinished())
TheTacticalView->rotateCamera(1.0f / 8.0f, 500, 100, 400);
break;
case GameMessage::MSG_META_BEGIN_CAMERA_ZOOM_IN:
DEBUG_ASSERTCRASH(!TheInGameUI->isCameraZoomingIn(), ("Setting zoom camera in, but it's already set!"));
TheInGameUI->setCameraZoomIn( true );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,24 @@ MetaMapRec *MetaMap::getMetaMapRec(GameMessage::Type t)
map->m_displayName = TheGameText->FETCH_OR_SUBSTITUTE("GUI:SelectNextIdleWorker", L"Next Idle Worker");
}
}
{
MetaMapRec* map = TheMetaMap->getMetaMapRec(GameMessage::MSG_META_ALT_CAMERA_ROTATE_LEFT);
if (map->m_key == MK_NONE) {
map->m_key = MK_KP4;
map->m_transition = DOWN;
map->m_modState = CTRL;
map->m_usableIn = COMMANDUSABLE_GAME;
}
}
{
MetaMapRec* map = TheMetaMap->getMetaMapRec(GameMessage::MSG_META_ALT_CAMERA_ROTATE_RIGHT);
if (map->m_key == MK_NONE) {
map->m_key = MK_KP6;
map->m_transition = DOWN;
map->m_modState = CTRL;
map->m_usableIn = COMMANDUSABLE_GAME;
}
}

#if defined(RTS_DEBUG)
{
Expand Down
Loading