Skip to content

Commit

Permalink
Merge branch 'master' into swrenderer
Browse files Browse the repository at this point in the history
Conflicts:
	Resources/Locales/ja_jp/openspades.po
	Resources/Locales/pot/openspades.pot
  • Loading branch information
yvt committed Feb 14, 2014
2 parents 24768a9 + 40a1f44 commit 8a5b91c
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 37 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ Installation

Licensing
----------------------------------------------------------------------------------------------------
Please see the file called LICENSE.
Please see the file named LICENSE.

Note that other assets including sounds and models are not open source.
30 changes: 13 additions & 17 deletions Resources/Locales/ja_jp/openspades.po
Original file line number Diff line number Diff line change
Expand Up @@ -286,37 +286,37 @@ msgctxt "Preferences"
msgid "Exponential Power"
msgstr "マウス加速指数"

#: ../../Scripts/Gui/Preferences.as:675
#: ../../Scripts/Gui/Preferences.as:675 ../../Scripts/Gui/Preferences.as:676
msgctxt "Preferences"
msgid "Reload"
msgstr "リロード"

#: ../../Scripts/Gui/Preferences.as:676
#: ../../Scripts/Gui/Preferences.as:676 ../../Scripts/Gui/Preferences.as:677
msgctxt "Preferences"
msgid "Capture Color"
msgstr "色をコピー"

#: ../../Scripts/Gui/Preferences.as:677
#: ../../Scripts/Gui/Preferences.as:677 ../../Scripts/Gui/Preferences.as:678
msgctxt "Preferences"
msgid "Equip Spade"
msgstr "スペードを装備"

#: ../../Scripts/Gui/Preferences.as:678
#: ../../Scripts/Gui/Preferences.as:678 ../../Scripts/Gui/Preferences.as:679
msgctxt "Preferences"
msgid "Equip Block"
msgstr "ブロックを装備"

#: ../../Scripts/Gui/Preferences.as:679
#: ../../Scripts/Gui/Preferences.as:679 ../../Scripts/Gui/Preferences.as:680
msgctxt "Preferences"
msgid "Equip Weapon"
msgstr "銃を装備"

#: ../../Scripts/Gui/Preferences.as:680
#: ../../Scripts/Gui/Preferences.as:680 ../../Scripts/Gui/Preferences.as:681
msgctxt "Preferences"
msgid "Equip Grenade"
msgstr "手榴弾を装備"

#: ../../Scripts/Gui/Preferences.as:681
#: ../../Scripts/Gui/Preferences.as:681 ../../Scripts/Gui/Preferences.as:682
msgctxt "Preferences"
msgid "Switch Tools by Wheel"
msgstr "ホイールで装備切替"
Expand Down Expand Up @@ -472,49 +472,41 @@ msgid "Say Team"
msgstr "チームチャット"

#: ../../../Sources/Client/Client.cpp:2250
#: ../../../Sources/Client/Client.cpp:2215
msgctxt "Client"
msgid "NOW LOADING"
msgstr "読み込み中"

#: ../../../Sources/Client/Client.cpp:2545
#: ../../../Sources/Client/Client.cpp:2510
msgctxt "Client"
msgid "Out of Block"
msgstr "ブロックがありません"

#: ../../../Sources/Client/Client.cpp:2550
#: ../../../Sources/Client/Client.cpp:2515
msgctxt "Client"
msgid "Out of Grenade"
msgstr "手榴弾がありません"

#: ../../../Sources/Client/Client.cpp:2558
#: ../../../Sources/Client/Client.cpp:2523
msgctxt "Client"
msgid "Reloading"
msgstr "リロード中"

#: ../../../Sources/Client/Client.cpp:2561
#: ../../../Sources/Client/Client.cpp:2526
msgctxt "Client"
msgid "Out of Ammo"
msgstr "弾切れです"

#: ../../../Sources/Client/Client.cpp:2564
#: ../../../Sources/Client/Client.cpp:2529
msgctxt "Client"
msgid "Press [{0}] to Reload"
msgstr "[{0}] を押すとリロードします"

#: ../../../Sources/Client/Client.cpp:2600
#: ../../../Sources/Client/Client.cpp:2565
msgctxt "Client"
msgid "Waiting for respawn"
msgstr "リスポーンを待機中"

#: ../../../Sources/Client/Client.cpp:2643
#: ../../../Sources/Client/Client.cpp:2608
msgctxt "Client"
msgid "Following {0}"
msgstr "{0} を追跡中"
Expand Down Expand Up @@ -560,13 +552,11 @@ msgid "{0}'s Territory"
msgstr "{0}のテリトリー"

#: ../../../Sources/Gui/MainScreen.cpp:230
#: ../../../Sources/Gui/MainScreen.cpp:223
msgctxt "MainScreen"
msgid "NOW LOADING"
msgstr "読み込み中"

#: ../../../Sources/Client/Client.cpp:2598
#: ../../../Sources/Client/Client.cpp:2563
msgctxt "Client"
msgid "You will respawn in: {0}"
msgstr "リスポーンまであと: {0}秒"
Expand Down Expand Up @@ -970,3 +960,9 @@ msgstr ""
msgctxt "StartupScreen"
msgid "Custom"
msgstr "カスタム"

#: ../../Scripts/Gui/Preferences.as:675
msgctxt "Preferences"
msgid "Invert Y-axis Mouse Input"
msgstr "Y軸の入力を反転"

31 changes: 13 additions & 18 deletions Resources/Locales/pot/openspades.pot
Original file line number Diff line number Diff line change
Expand Up @@ -281,37 +281,37 @@ msgctxt "Preferences"
msgid "Exponential Power"
msgstr ""

#: ../../Scripts/Gui/Preferences.as:675
#: ../../Scripts/Gui/Preferences.as:675 ../../Scripts/Gui/Preferences.as:676
msgctxt "Preferences"
msgid "Reload"
msgstr ""

#: ../../Scripts/Gui/Preferences.as:676
#: ../../Scripts/Gui/Preferences.as:676 ../../Scripts/Gui/Preferences.as:677
msgctxt "Preferences"
msgid "Capture Color"
msgstr ""

#: ../../Scripts/Gui/Preferences.as:677
#: ../../Scripts/Gui/Preferences.as:677 ../../Scripts/Gui/Preferences.as:678
msgctxt "Preferences"
msgid "Equip Spade"
msgstr ""

#: ../../Scripts/Gui/Preferences.as:678
#: ../../Scripts/Gui/Preferences.as:678 ../../Scripts/Gui/Preferences.as:679
msgctxt "Preferences"
msgid "Equip Block"
msgstr ""

#: ../../Scripts/Gui/Preferences.as:679
#: ../../Scripts/Gui/Preferences.as:679 ../../Scripts/Gui/Preferences.as:680
msgctxt "Preferences"
msgid "Equip Weapon"
msgstr ""

#: ../../Scripts/Gui/Preferences.as:680
#: ../../Scripts/Gui/Preferences.as:680 ../../Scripts/Gui/Preferences.as:681
msgctxt "Preferences"
msgid "Equip Grenade"
msgstr ""

#: ../../Scripts/Gui/Preferences.as:681
#: ../../Scripts/Gui/Preferences.as:681 ../../Scripts/Gui/Preferences.as:682
msgctxt "Preferences"
msgid "Switch Tools by Wheel"
msgstr ""
Expand Down Expand Up @@ -466,50 +466,42 @@ msgctxt "Client"
msgid "Say Team"
msgstr ""

#: ../../../Sources/Client/Client.cpp:2250
#: ../../../Sources/Client/Client.cpp:2215
#: ../../../Sources/Client/Client.cpp:2219
msgctxt "Client"
msgid "NOW LOADING"
msgstr ""

#: ../../../Sources/Client/Client.cpp:2545
#: ../../../Sources/Client/Client.cpp:2510
msgctxt "Client"
msgid "Out of Block"
msgstr ""

#: ../../../Sources/Client/Client.cpp:2550
#: ../../../Sources/Client/Client.cpp:2515
msgctxt "Client"
msgid "Out of Grenade"
msgstr ""

#: ../../../Sources/Client/Client.cpp:2558
#: ../../../Sources/Client/Client.cpp:2523
msgctxt "Client"
msgid "Reloading"
msgstr ""

#: ../../../Sources/Client/Client.cpp:2561
#: ../../../Sources/Client/Client.cpp:2526
msgctxt "Client"
msgid "Out of Ammo"
msgstr ""

#: ../../../Sources/Client/Client.cpp:2564
#: ../../../Sources/Client/Client.cpp:2529
msgctxt "Client"
msgid "Press [{0}] to Reload"
msgstr ""

#: ../../../Sources/Client/Client.cpp:2600
#: ../../../Sources/Client/Client.cpp:2565
msgctxt "Client"
msgid "Waiting for respawn"
msgstr ""

#: ../../../Sources/Client/Client.cpp:2643
#: ../../../Sources/Client/Client.cpp:2608
msgctxt "Client"
msgid "Following {0}"
msgstr ""
Expand Down Expand Up @@ -555,13 +547,11 @@ msgid "{0}'s Territory"
msgstr ""

#: ../../../Sources/Gui/MainScreen.cpp:230
#: ../../../Sources/Gui/MainScreen.cpp:223
msgctxt "MainScreen"
msgid "NOW LOADING"
msgstr ""

#: ../../../Sources/Client/Client.cpp:2598
#: ../../../Sources/Client/Client.cpp:2563
msgctxt "Client"
msgid "You will respawn in: {0}"
msgstr ""
Expand Down Expand Up @@ -949,3 +939,8 @@ msgstr ""
msgctxt "StartupScreen"
msgid "Custom"
msgstr ""

#: ../../Scripts/Gui/Preferences.as:675
msgctxt "Preferences"
msgid "Invert Y-axis Mouse Input"
msgstr ""
1 change: 1 addition & 0 deletions Resources/Scripts/Gui/Preferences.as
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,7 @@ namespace spades {
ConfigNumberFormatter(2, "x"));
layouter.AddSliderField(_Tr("Preferences", "Exponential Power"), "cg_mouseExpPower", 0.5, 1.5, 0.02,
ConfigNumberFormatter(2, "", "^"));
layouter.AddToggleField(_Tr("Preferences", "Invert Y-axis Mouse Input"), "cg_invertMouseY");
layouter.AddControl(_Tr("Preferences", "Reload"), "cg_keyReloadWeapon");
layouter.AddControl(_Tr("Preferences", "Capture Color"), "cg_keyCaptureColor");
layouter.AddControl(_Tr("Preferences", "Equip Spade"), "cg_keyToolSpade");
Expand Down
4 changes: 4 additions & 0 deletions Sources/Client/Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ SPADES_SETTING(cg_ejectBrass, "1");
SPADES_SETTING(cg_mouseSensitivity, "1");
SPADES_SETTING(cg_zoomedMouseSensScale, "0.6");
SPADES_SETTING(cg_mouseExpPower, "1");
SPADES_SETTING(cg_invertMouseY, "0");

SPADES_SETTING(cg_chatBeep, "1");
SPADES_SETTING(cg_hitIndicator, "1");
Expand Down Expand Up @@ -915,6 +916,9 @@ namespace spades {
x *= (float)cg_mouseSensitivity;
y *= (float)cg_mouseSensitivity;

if(cg_invertMouseY)
y = -y;

p->Turn(x * 0.003f, y * 0.003f);
}
}
Expand Down
4 changes: 3 additions & 1 deletion Sources/Client/Quake3Font.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ namespace spades {
color *= a;
renderer->SetColorAlphaPremultiplied(color);

float invScale = 1.f / scale;

for(size_t i = 0; i < txt.size();){
size_t chrLen = 0;
uint32_t ch = GetCodePointFromUTF8String(txt, i, &chrLen);
Expand Down Expand Up @@ -169,7 +171,7 @@ namespace spades {
fallback:
DrawFallback(ch, MakeVector2(x, y + yMin) * scale + offset,
(yMax - yMin) * scale, color);
x += MeasureFallback(ch, (yMax - yMin) * scale);
x += MeasureFallback(ch, (yMax - yMin) * scale) * invScale;
}
}
}
Expand Down

0 comments on commit 8a5b91c

Please sign in to comment.