Browse Source

Clean up switch style

pull/109/head
Anders Jenbo 7 years ago
parent
commit
aa2752839a
  1. 11
      Source/automap.cpp
  2. 2
      Source/control.cpp
  3. 1
      Source/list.h
  4. 18
      Source/stores.cpp

11
Source/automap.cpp

@ -499,6 +499,7 @@ void DrawAutomapPlr()
DrawLine(x, y, x - AutoMapYPos, y - AMPlayerX, COLOR_PLAYER);
DrawLine(x - AutoMapYPos, y - AMPlayerX, x - AMPlayerX, y - AMPlayerX, COLOR_PLAYER);
DrawLine(x - AutoMapYPos, y - AMPlayerX, x - AMPlayerY - AMPlayerX, y, COLOR_PLAYER);
break;
}
}
@ -589,7 +590,7 @@ void SetAutomapView(int x, int y)
} else if (GetAutomapType(xx - 1, yy, FALSE) & 0x4000) {
automapview[xx - 1][yy] = 1;
}
return;
break;
case 3:
if (solid) {
if (GetAutomapType(xx + 1, yy, FALSE) == 0x4007)
@ -597,7 +598,7 @@ void SetAutomapView(int x, int y)
} else if (GetAutomapType(xx, yy - 1, FALSE) & 0x4000) {
automapview[xx][yy - 1] = 1;
}
return;
break;
case 4:
if (solid) {
if (GetAutomapType(xx, yy + 1, FALSE) == 0x4007)
@ -612,7 +613,7 @@ void SetAutomapView(int x, int y)
if (GetAutomapType(xx - 1, yy - 1, FALSE) & 0x4000)
automapview[xx - 1][yy - 1] = 1;
}
return;
break;
case 5:
if (solid) {
if (GetAutomapType(xx, yy - 1, FALSE) & 0x4000)
@ -622,7 +623,7 @@ void SetAutomapView(int x, int y)
} else if (GetAutomapType(xx - 1, yy, FALSE) & 0x4000) {
automapview[xx - 1][yy] = 1;
}
return;
break;
case 6:
if (solid) {
if (GetAutomapType(xx - 1, yy, FALSE) & 0x4000)
@ -632,7 +633,7 @@ void SetAutomapView(int x, int y)
} else if (GetAutomapType(xx, yy - 1, FALSE) & 0x4000) {
automapview[xx][yy - 1] = 1;
}
return;
break;
}
}

2
Source/control.cpp

@ -2175,8 +2175,6 @@ int DrawDurIcon4Item(ItemStruct *item, int x, int frame)
case ITYPE_STAFF:
frame = 8;
break;
default:
break;
}
} else {
frame = 1;

1
Source/list.h

@ -151,6 +151,7 @@ void TList<T>::Insert(T *node, InsertPos pos, T *ref)
break;
case BEFORE:
i->InsertBefore(node, reflink);
break;
}
}

18
Source/stores.cpp

@ -1818,19 +1818,19 @@ void S_SmithEnter()
gossipstart = QUEST_GRISWOLD2;
gossipend = QUEST_GRISWOLD13;
StartStore(STORE_GOSSIP);
return;
break;
case 12:
StartStore(STORE_SBUY);
return;
break;
case 14:
StartStore(STORE_SPBUY);
return;
break;
case 16:
StartStore(STORE_SSELL);
return;
break;
case 18:
StartStore(STORE_SREPAIR);
return;
break;
case 20:
stextflag = STORE_NONE;
break;
@ -2536,20 +2536,20 @@ void S_HealerEnter()
gossipstart = QUEST_PEPIN2;
gossipend = QUEST_PEPIN11;
StartStore(STORE_GOSSIP);
return;
break;
case 14:
if (plr[myplr]._pHitPoints != plr[myplr]._pMaxHP)
PlaySFX(IS_CAST8);
drawhpflag = TRUE;
plr[myplr]._pHitPoints = plr[myplr]._pMaxHP;
plr[myplr]._pHPBase = plr[myplr]._pMaxHPBase;
return;
break;
case 16:
StartStore(STORE_HBUY);
return;
break;
case 18:
stextflag = STORE_NONE;
return;
break;
}
}

Loading…
Cancel
Save