Skip to content

Commit

Permalink
ZVISION: Fix wrong style.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marisa-Chan committed Feb 24, 2014
1 parent cb2503a commit 6210ead
Show file tree
Hide file tree
Showing 19 changed files with 141 additions and 151 deletions.
2 changes: 1 addition & 1 deletion engines/zvision/actions.h
Expand Up @@ -369,7 +369,7 @@ class ActionStreamVideo : public ResultAction {

private:
enum {
DIFFERENT_DIMENSIONS = 0x1 // 0x1 flags that the destRect dimensions are different from the original video dimensions
DIFFERENT_DIMENSIONS = 0x1 // 0x1 flags that the destRect dimensions are different from the original video dimensions
};

Common::String _fileName;
Expand Down
18 changes: 9 additions & 9 deletions engines/zvision/cursor_manager.h
Expand Up @@ -40,15 +40,15 @@ class ZVision;
* Mostly usable cursors
*/
enum CursorIndex {
CursorIndex_Active = 0,
CursorIndex_DownArr = 3,
CursorIndex_HandPu = 6,
CursorIndex_Idle = 11,
CursorIndex_Left = 12,
CursorIndex_Right = 13,
CursorIndex_UpArr = 17,
CursorIndex_ItemIdle = 18,
CursorIndex_ItemAct = 19
CursorIndex_Active = 0,
CursorIndex_DownArr = 3,
CursorIndex_HandPu = 6,
CursorIndex_Idle = 11,
CursorIndex_Left = 12,
CursorIndex_Right = 13,
CursorIndex_UpArr = 17,
CursorIndex_ItemIdle = 18,
CursorIndex_ItemAct = 19
};

/**
Expand Down
6 changes: 3 additions & 3 deletions engines/zvision/detection.h
Expand Up @@ -29,9 +29,9 @@
namespace ZVision {

enum ZVisionGameId {
GID_NONE = 0,
GID_NEMESIS = 1,
GID_GRANDINQUISITOR = 2
GID_NONE = 0,
GID_NEMESIS = 1,
GID_GRANDINQUISITOR = 2
};

struct ZVisionGameDescription {
Expand Down
4 changes: 2 additions & 2 deletions engines/zvision/lever_control.h
Expand Up @@ -55,8 +55,8 @@ class LeverControl : public Control {
};

enum {
ANGLE_DELTA = 30, // How far off a mouse angle can be and still be considered valid. This is in both directions, so the total buffer zone is (2 * ANGLE_DELTA)
ANIMATION_FRAME_TIME = 30 // In millis
ANGLE_DELTA = 30, // How far off a mouse angle can be and still be considered valid. This is in both directions, so the total buffer zone is (2 * ANGLE_DELTA)
ANIMATION_FRAME_TIME = 30 // In millis
};

private:
Expand Down
2 changes: 1 addition & 1 deletion engines/zvision/lzss_read_stream.h
Expand Up @@ -45,7 +45,7 @@ class LzssReadStream : public Common::ReadStream {

private:
enum {
BLOCK_SIZE = 0x1000
BLOCK_SIZE = 0x1000
};

private:
Expand Down
43 changes: 17 additions & 26 deletions engines/zvision/menu.cpp
Expand Up @@ -30,17 +30,17 @@
namespace ZVision {

enum {
SLOT_START_SLOT = 151,
SLOT_SPELL_1 = 191,
SLOT_USER_CHOSE_THIS_SPELL = 205,
SLOT_REVERSED_SPELLBOOK = 206
SLOT_START_SLOT = 151,
SLOT_SPELL_1 = 191,
SLOT_USER_CHOSE_THIS_SPELL = 205,
SLOT_REVERSED_SPELLBOOK = 206
};

enum {
menu_MAIN_SAVE = 0,
menu_MAIN_REST = 1,
menu_MAIN_PREF = 2,
menu_MAIN_EXIT = 3
menu_MAIN_SAVE = 0,
menu_MAIN_REST = 1,
menu_MAIN_PREF = 2,
menu_MAIN_EXIT = 3
};

menuHandler::menuHandler(ZVision *engine) {
Expand Down Expand Up @@ -264,8 +264,7 @@ void menuZgi::onMouseMove(const Common::Point &Pos) {
}
break;

case menu_MAIN:
{
case menu_MAIN: {
int last_item = mouse_on_item;
mouse_on_item = -1;

Expand Down Expand Up @@ -510,29 +509,25 @@ void menuZgi::process(uint32 deltatime) {
if (redraw) {
_engine->getRenderManager()->blitSurfaceToMenu(menuback[menu_MAIN][0], 30, scrollPos[menu_MAIN]);

if (menu_bar_flag & menuBar_Exit)
{
if (menu_bar_flag & menuBar_Exit) {
if (mouse_on_item == menu_MAIN_EXIT)
_engine->getRenderManager()->blitSurfaceToMenu(menubar[menu_MAIN_EXIT][1], 320 + 135, scrollPos[menu_MAIN]);
else
_engine->getRenderManager()->blitSurfaceToMenu(menubar[menu_MAIN_EXIT][0], 320 + 135, scrollPos[menu_MAIN]);
}
if (menu_bar_flag & menuBar_Settings)
{
if (menu_bar_flag & menuBar_Settings) {
if (mouse_on_item == menu_MAIN_PREF)
_engine->getRenderManager()->blitSurfaceToMenu(menubar[menu_MAIN_PREF][1], 320, scrollPos[menu_MAIN]);
else
_engine->getRenderManager()->blitSurfaceToMenu(menubar[menu_MAIN_PREF][0], 320, scrollPos[menu_MAIN]);
}
if (menu_bar_flag & menuBar_Restore)
{
if (menu_bar_flag & menuBar_Restore) {
if (mouse_on_item == menu_MAIN_REST)
_engine->getRenderManager()->blitSurfaceToMenu(menubar[menu_MAIN_REST][1], 320 - 135, scrollPos[menu_MAIN]);
else
_engine->getRenderManager()->blitSurfaceToMenu(menubar[menu_MAIN_REST][0], 320 - 135, scrollPos[menu_MAIN]);
}
if (menu_bar_flag & menuBar_Save)
{
if (menu_bar_flag & menuBar_Save) {
if (mouse_on_item == menu_MAIN_SAVE)
_engine->getRenderManager()->blitSurfaceToMenu(menubar[menu_MAIN_SAVE][1], 320 - 135 * 2, scrollPos[menu_MAIN]);
else
Expand Down Expand Up @@ -698,8 +693,7 @@ void menuNem::onMouseMove(const Common::Point &Pos) {

void menuNem::process(uint32 deltatime) {
if (inmenu) {
if (!scrolled)
{
if (!scrolled) {
float scrl = 32.0 * 2.0 * (deltatime / 1000.0);

if (scrl == 0)
Expand All @@ -709,8 +703,7 @@ void menuNem::process(uint32 deltatime) {
redraw = true;
}

if (scrollPos >= 0)
{
if (scrollPos >= 0) {
scrolled = true;
scrollPos = 0;
}
Expand Down Expand Up @@ -747,8 +740,7 @@ void menuNem::process(uint32 deltatime) {
}
} else {
scrolled = false;
if (scrollPos > -32)
{
if (scrollPos > -32) {
float scrl = 32.0 * 2.0 * (deltatime / 1000.0);

if (scrl == 0)
Expand All @@ -759,8 +751,7 @@ void menuNem::process(uint32 deltatime) {

scrollPos -= scrl;
redraw = true;
}
else
} else
scrollPos = -32;

if (redraw) {
Expand Down
18 changes: 9 additions & 9 deletions engines/zvision/menu.h
Expand Up @@ -32,12 +32,12 @@
namespace ZVision {

enum menuBar {
menuBar_Exit = 0x1,
menuBar_Settings = 0x2,
menuBar_Restore = 0x4,
menuBar_Save = 0x8,
menuBar_Items = 0x100,
menuBar_Magic = 0x200
menuBar_Exit = 0x1,
menuBar_Settings = 0x2,
menuBar_Restore = 0x4,
menuBar_Save = 0x8,
menuBar_Items = 0x100,
menuBar_Magic = 0x200
};

class menuHandler {
Expand Down Expand Up @@ -80,9 +80,9 @@ class menuZgi: public menuHandler {
float scrollPos[3];

enum {
menu_ITEM = 0,
menu_MAGIC = 1,
menu_MAIN = 2
menu_ITEM = 0,
menu_MAGIC = 1,
menu_MAIN = 2
};

bool clean;
Expand Down
4 changes: 2 additions & 2 deletions engines/zvision/meta_animation.h
Expand Up @@ -64,8 +64,8 @@ class MetaAnimation {

private:
enum FileType {
RLF = 1,
AVI = 2
RLF = 1,
AVI = 2
};

private:
Expand Down
3 changes: 1 addition & 2 deletions engines/zvision/music_node.cpp
Expand Up @@ -109,8 +109,7 @@ bool MusicNode::process(uint32 deltaTimeInMillis) {
deltaTimeInMillis = _crossfade_time;
_newvol += floor(((float)(_crossfade_target - _newvol) / (float)_crossfade_time)) * (float)deltaTimeInMillis;
_crossfade_time -= deltaTimeInMillis;
}
else {
} else {
_crossfade = false;
_newvol = _crossfade_target;
}
Expand Down
14 changes: 7 additions & 7 deletions engines/zvision/puzzle.h
Expand Up @@ -42,10 +42,10 @@ struct Puzzle {

/** How criteria should be decided */
enum CriteriaOperator {
EQUAL_TO,
NOT_EQUAL_TO,
GREATER_THAN,
LESS_THAN
EQUAL_TO,
NOT_EQUAL_TO,
GREATER_THAN,
LESS_THAN
};

/** Criteria for a Puzzle result to be fired */
Expand All @@ -64,9 +64,9 @@ struct Puzzle {
};

enum StateFlags {
ONCE_PER_INST = 0x01,
DO_ME_NOW = 0x02, // Somewhat useless flag since anything that needs to be done immediately has no criteria
DISABLED = 0x04
ONCE_PER_INST = 0x01,
DO_ME_NOW = 0x02, // Somewhat useless flag since anything that needs to be done immediately has no criteria
DISABLED = 0x04
};

uint32 key;
Expand Down
6 changes: 3 additions & 3 deletions engines/zvision/render_table.h
Expand Up @@ -36,9 +36,9 @@ class RenderTable {

public:
enum RenderState {
PANORAMA,
TILT,
FLAT
PANORAMA,
TILT,
FLAT
};

private:
Expand Down
4 changes: 2 additions & 2 deletions engines/zvision/rlf_animation.h
Expand Up @@ -42,8 +42,8 @@ class RlfAnimation {

private:
enum EncodingType {
Masked,
Simple
Masked,
Simple
};

struct Frame {
Expand Down
2 changes: 1 addition & 1 deletion engines/zvision/save_manager.h
Expand Up @@ -54,7 +54,7 @@ class SaveManager {
static const uint32 SAVEGAME_ID;

enum {
SAVE_VERSION = 1
SAVE_VERSION = 1
};

public:
Expand Down

0 comments on commit 6210ead

Please sign in to comment.