Skip to content

Commit

Permalink
0.7.15
Browse files Browse the repository at this point in the history
  • Loading branch information
yoktobit committed Feb 1, 2014
1 parent f3b2773 commit 185ef16
Show file tree
Hide file tree
Showing 13 changed files with 36 additions and 25 deletions.
6 changes: 3 additions & 3 deletions android/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="de.yoktobit.morzyn" android:versionCode="8" android:installLocation="auto" android:versionName="0.7.15">
<manifest package="de.yoktobit.morzyn" xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="0.7.15" android:installLocation="auto" android:versionCode="9">
<application android:name="org.qtproject.qt5.android.bindings.QtApplication" android:icon="@drawable/icon" android:label="Morzyn">
<activity android:screenOrientation="sensorLandscape" android:name="org.qtproject.qt5.android.bindings.QtActivity" android:label="@string/app_name" android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|locale|fontScale|keyboard|keyboardHidden|navigation">
<activity android:name="org.qtproject.qt5.android.bindings.QtActivity" android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|locale|fontScale|keyboard|keyboardHidden|navigation" android:screenOrientation="sensorLandscape" android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
Expand Down Expand Up @@ -32,7 +32,7 @@
</activity>
</application>
<uses-sdk android:targetSdkVersion="14" android:minSdkVersion="9"/>
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:anyDensity="true"/>
<supports-screens android:normalScreens="true" android:anyDensity="true" android:smallScreens="true" android:largeScreens="true"/>
<!-- %%INSERT_PERMISSIONS -->
<!-- %%INSERT_FEATURES -->
<uses-permission android:name="android.permission.INTERNET"/>
Expand Down
14 changes: 11 additions & 3 deletions cpp/gameservice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,7 @@ void GameService::buy(Creature *creature)

bool GameService::isCastable(int x, int y, Creature* creature)
{
bool bIsCastable = true;
qDebug() << "begin isCastable at" << x << "," << y;
Player* player = game->currentPlayer();
int nPlayerX = player->x();
Expand All @@ -1048,11 +1049,17 @@ bool GameService::isCastable(int x, int y, Creature* creature)
if (xDist <= 1 && yDist <= 1 && !(xDist == 0 && yDist == 0))
{
qDebug() << "end isCastable with true";
return true;
}
else
{
setMessage(tr("You have to cast your spell exactly beside you"));
bIsCastable = false;
}
Creature* existingCreature = getCreatureAt(x, y);
if (existingCreature && existingCreature->alive())
{
setMessage(tr("You can't cast a creature where another one exists."));
bIsCastable = false;
}
}
else
Expand All @@ -1064,21 +1071,22 @@ bool GameService::isCastable(int x, int y, Creature* creature)
if (getCreatureAt(x, y) && isEnemy(getCreatureAt(x, y)))
{
qDebug() << "end isCastable with true (" << getDistance(game->currentPlayer(), x, y) << "<=" << scroll->range();
return true;
}
else
{
setMessage(tr("You have to cast this spell on an enemy creature"));
bIsCastable = false;
}
}
else
{
setMessage(tr("This creature is not in the range of your spell"));
bIsCastable = false;
}
qDebug() << getDistance(game->currentPlayer(), x, y) << ">" << scroll->range();
}
qDebug() << "end isCastable with false";
return false;
return bIsCastable;
}

void GameService::castCreature(int x, int y, Creature *creature)
Expand Down
2 changes: 1 addition & 1 deletion cpp/morzyn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
QString locale = QLocale::system().name();

QTranslator translator;
translator.load(QString("morzyn_") + locale, "translations");
translator.load(QString("morzyn_") + locale.left(2).toLower(), "translations");
app->installTranslator(&translator);

GameService gs;
Expand Down
8 changes: 4 additions & 4 deletions qml/DistanceAttackImage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Image {

function playOneOf(sound1, sound2, sound3)
{
if (!mainWindow.playSounds || os === "sailfish") return;
if (!mainWindow.playSounds || os === "sailfish_sick") return;
var randomnumber = Math.floor(Math.random() * 3);
console.log("DistFire " + randomnumber);
switch (randomnumber)
Expand Down Expand Up @@ -141,11 +141,11 @@ Image {
{
animationFinished(attackedCreature, nDamage);
distFly01.stop(); distFly02.stop(); distFly03.stop();
if (nDamage > 0 && (!attackingCreature.immune || attackingCreature.immune !== attackedCreature.immune) && os !== "sailfish")
if (nDamage > 0 && (!attackingCreature.immune || attackingCreature.immune !== attackedCreature.immune) && os !== "sailfish_sick")
{
playOneOf(distHit01, distHit02, distHit03);
}
else if (os !== "sailfish")
else if (os !== "sailfish_sick")
{
playOneOf(distMiss01, distMiss02, distMiss03);
}
Expand Down Expand Up @@ -175,7 +175,7 @@ Image {
console.log("toY: " + distanceAttackImageAnimationY.to);
visible = true;
distanceAttackImageAnimation.start();
if (os !== "sailfish") {
if (os !== "sailfish_sick") {
playOneOf(distFire01, distFire02, distFire03);
playOneOf(distFly01, distFly02, distFly03);
}
Expand Down
6 changes: 3 additions & 3 deletions qml/GameView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Rectangle {

function playMeleeHit()
{
if (!mainWindow.playSounds || os === "sailfish") return;
if (!mainWindow.playSounds || os === "sailfish_sick") return;
var randomnumber = Math.floor(Math.random() * 5);
console.log("MeleeHit " + randomnumber);
switch (randomnumber)
Expand Down Expand Up @@ -76,7 +76,7 @@ Rectangle {

function playMeleeMiss()
{
if (!mainWindow.playSounds || os === "sailfish") return;
if (!mainWindow.playSounds || os === "sailfish_sick") return;
var randomnumber = Math.floor(Math.random() * 3);
console.log("MeleeMiss " + randomnumber);
switch (randomnumber)
Expand Down Expand Up @@ -139,7 +139,7 @@ Rectangle {
gameService.placePlayers();
console.log("ImageFilename Player 0" + game.creatures[0].imageFilename);
allreadyShown = true;
if (os !== "sailfish")
if (os !== "sailfish_sick")
titleSound.volume = 0.0;
else
titleSound.pause();
Expand Down
2 changes: 1 addition & 1 deletion qml/MainMenuView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Rectangle {
if (mainWindow.musicActivated && mainWindow.applicationActive)
{
titleSound.morzynPlay();
if (os !== "sailfish" && titleSound.volume !== 1.0)
if (os !== "sailfish_sick" && titleSound.volume !== 1.0)
titleSound.volume = 1.0;
titleSound.isBehaviourEnabled = true;
}
Expand Down
9 changes: 4 additions & 5 deletions qml/MorzynPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Page {
mainWindow.titleSoundLastPlayState = false;
console.log("TitleSound was not running");
}
if (os === "sailfish")
if (os === "sailfish_sick")
titleSound.pause();
else
titleSound.volume = 0.0;
Expand All @@ -63,7 +63,7 @@ Page {
if (mainWindow.titleSoundLastPlayState)
{
titleSound.morzynPlay();
if (os !== "sailfish")
if (os !== "sailfish_sick")
titleSound.volume = 1.0;
console.log("TitleSound resumed");
}
Expand All @@ -73,11 +73,10 @@ Page {

MorzynAudio {
id: titleSound
// temporary disabled
source: "sounds/morzyn intro.mp3"
autoPlay: false
loops: Audio.Infinite
/*Behavior on volume {
Behavior on volume {
PropertyAnimation {
duration: 2000
onRunningChanged: {
Expand All @@ -90,7 +89,7 @@ Page {
}
}
}
}*/
}
}
}
}
4 changes: 2 additions & 2 deletions qml/OptionsView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ Item {
if (mainWindow.musicActivated && game.state === "optionsState")
{
titleSound.morzynPlay();
if (os !== "sailfish")
if (os !== "sailfish_sick")
titleSound.volume = 1.0;
}
else
{
if (os === "sailfish")
if (os === "sailfish_sick")
titleSound.pause();
else
titleSound.volume = 0.0;
Expand Down
2 changes: 1 addition & 1 deletion qml/TitleView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Rectangle {
onStateChanged: {
if (game.state == "spellSelectState")
{
if (os === "sailfish")
if (os === "sailfish_sick")
titleSound.pause();
else
titleSound.volume = 0.0;
Expand Down
2 changes: 1 addition & 1 deletion rpm/harbour-morzyn.spec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Name: harbour-morzyn
%{?qtc_builddir:%define _builddir %qtc_builddir}
Summary: Morzyn - A Tribute to Morkin 2
Version: 0.7.15
Release: 1
Release: 2
Group: Qt/Qt
License: LICENSE
Source0: %{name}-%{version}.tar.bz2
Expand Down
2 changes: 1 addition & 1 deletion rpm/harbour-morzyn.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Name: harbour-morzyn
Summary: Morzyn - A Tribute to Morkin 2
Version: 0.7.15
Release: 1
Release: 2
Group: Qt/Qt
License: LICENSE
Sources:
Expand Down
Binary file modified translations/morzyn_de.qm
Binary file not shown.
4 changes: 4 additions & 0 deletions translations/morzyn_de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@
<source>Select a spell!</source>
<translation>Wähle einen Zauber!</translation>
</message>
<message>
<source>You can&apos;t cast a creature where another one exists.</source>
<translation type="unfinished">Du kannst keine Kreatur dort zaubern, wo schon eine ist.</translation>
</message>
</context>
<context>
<name>GameView</name>
Expand Down

0 comments on commit 185ef16

Please sign in to comment.