QTfrontend/pageplayrecord.cpp
author Xeli
Thu, 20 Oct 2011 22:54:34 +0200
branchhedgeroid
changeset 6047 10011f051f9c
parent 6009 14f6fc9869f2
child 6042 8b5345758f62
permissions -rw-r--r--
Changed package name from org.hedgewars.mobile to org.hedgewars.hedgeroid to upload it to the market
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
579
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
     1
/*
1066
1f1b3686a2b0 Update copyright headers a bit
unc0rr
parents: 720
diff changeset
     2
 * Hedgewars, a free turn based strategy game
4976
088d40d8aba2 Happy 2011 :)
koda
parents: 3236
diff changeset
     3
 * Copyright (c) 2006-2011 Andrey Korotaev <unC0Rr@gmail.com>
579
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
     4
 *
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
     7
 * the Free Software Foundation; version 2 of the License
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
     8
 *
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    12
 * GNU General Public License for more details.
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    13
 *
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    15
 * along with this program; if not, write to the Free Software
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    17
 */
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    18
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    19
#include <QFont>
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    20
#include <QGridLayout>
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    21
#include <QPushButton>
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    22
#include <QListWidget>
627
92e136c3eb46 Button for renaming demo and save files
unc0rr
parents: 603
diff changeset
    23
#include <QListWidgetItem>
92e136c3eb46 Button for renaming demo and save files
unc0rr
parents: 603
diff changeset
    24
#include <QFileInfo>
92e136c3eb46 Button for renaming demo and save files
unc0rr
parents: 603
diff changeset
    25
#include <QMessageBox>
92e136c3eb46 Button for renaming demo and save files
unc0rr
parents: 603
diff changeset
    26
#include <QInputDialog>
579
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    27
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    28
#include "hwconsts.h"
5205
78138ae93820 some headers cleanup and rename of stats and playrecord pages for consistency
koda
parents: 4976
diff changeset
    29
#include "pageplayrecord.h"
579
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    30
1153
825931b81ad4 Iconed "Back" button everywhere
unc0rr
parents: 1066
diff changeset
    31
PagePlayDemo::PagePlayDemo(QWidget* parent) : AbstractPage(parent)
579
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    32
{
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    33
    QFont * font14 = new QFont("MS Shell Dlg", 14);
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    34
    QGridLayout * pageLayout = new QGridLayout(this);
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    35
    pageLayout->setColumnStretch(0, 1);
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    36
    pageLayout->setColumnStretch(1, 2);
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    37
    pageLayout->setColumnStretch(2, 1);
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    38
    pageLayout->setRowStretch(2, 100);
579
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    39
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    40
    BtnPlayDemo = new QPushButton(this);
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    41
    BtnPlayDemo->setFont(*font14);
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    42
    BtnPlayDemo->setText(QPushButton::tr("Play demo"));
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    43
    pageLayout->addWidget(BtnPlayDemo, 3, 2);
579
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    44
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    45
    BtnRenameRecord = new QPushButton(this);
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    46
    BtnRenameRecord->setText(QPushButton::tr("Rename"));
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    47
    pageLayout->addWidget(BtnRenameRecord, 0, 2);
627
92e136c3eb46 Button for renaming demo and save files
unc0rr
parents: 603
diff changeset
    48
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    49
    BtnRemoveRecord = new QPushButton(this);
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    50
    BtnRemoveRecord->setText(QPushButton::tr("Delete"));
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    51
    pageLayout->addWidget(BtnRemoveRecord, 1, 2);
720
97a9d67d5c3e - Add 'Delete' button to demos and saves pages
unc0rr
parents: 628
diff changeset
    52
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    53
    DemosList = new QListWidget(this);
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    54
    DemosList->setGeometry(QRect(170, 10, 311, 311));
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    55
    pageLayout->addWidget(DemosList, 0, 1, 3, 1);
627
92e136c3eb46 Button for renaming demo and save files
unc0rr
parents: 603
diff changeset
    56
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    57
    connect(BtnRenameRecord, SIGNAL(clicked()), this, SLOT(renameRecord()));
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    58
    connect(BtnRemoveRecord, SIGNAL(clicked()), this, SLOT(removeRecord()));
6009
14f6fc9869f2 code cleanup/etc
sheepluva
parents: 5865
diff changeset
    59
14f6fc9869f2 code cleanup/etc
sheepluva
parents: 5865
diff changeset
    60
14f6fc9869f2 code cleanup/etc
sheepluva
parents: 5865
diff changeset
    61
    BtnBack = addButton(":/res/Exit.png", pageLayout, 3, 0, true);
14f6fc9869f2 code cleanup/etc
sheepluva
parents: 5865
diff changeset
    62
    connect(BtnBack, SIGNAL(clicked()), this, SIGNAL(goBack()));
579
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    63
}
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    64
581
909141b17f68 Better 'Load' page
unc0rr
parents: 580
diff changeset
    65
void PagePlayDemo::FillFromDir(RecordType rectype)
579
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    66
{
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    67
    QDir dir;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    68
    QString extension;
581
909141b17f68 Better 'Load' page
unc0rr
parents: 580
diff changeset
    69
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    70
    recType = rectype;
627
92e136c3eb46 Button for renaming demo and save files
unc0rr
parents: 603
diff changeset
    71
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    72
    dir.cd(cfgdir->absolutePath());
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    73
    if (rectype == RT_Demo)
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    74
    {
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    75
        dir.cd("Demos");
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    76
        extension = "hwd";
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    77
        BtnPlayDemo->setText(QPushButton::tr("Play demo"));
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    78
    } else
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    79
    {
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    80
        dir.cd("Saves");
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    81
        extension = "hws";
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    82
        BtnPlayDemo->setText(QPushButton::tr("Load"));
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    83
    }
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    84
    dir.setFilter(QDir::Files);
580
d3ebf84e9fad Working 'Load' page
unc0rr
parents: 579
diff changeset
    85
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    86
    QStringList sl = dir.entryList(QStringList(QString("*.%2.%1").arg(extension, *cProtoVer)));
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    87
    sl.replaceInStrings(QRegExp(QString("^(.*)\\.%2\\.%1$").arg(extension, *cProtoVer)), "\\1");
580
d3ebf84e9fad Working 'Load' page
unc0rr
parents: 579
diff changeset
    88
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    89
    DemosList->clear();
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    90
    DemosList->addItems(sl);
579
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    91
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    92
    for (int i = 0; i < DemosList->count(); ++i)
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    93
    {
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    94
        DemosList->item(i)->setData(Qt::UserRole, dir.absoluteFilePath(QString("%1.%3.%2").arg(sl[i], extension, *cProtoVer)));
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    95
        DemosList->item(i)->setIcon(recType == RT_Demo ? QIcon(":/res/file_demo.png") : QIcon(":/res/file_save.png"));
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
    96
    }
579
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    97
}
94db15de0392 - Some changes to make build process clear
unc0rr
parents:
diff changeset
    98
627
92e136c3eb46 Button for renaming demo and save files
unc0rr
parents: 603
diff changeset
    99
void PagePlayDemo::renameRecord()
92e136c3eb46 Button for renaming demo and save files
unc0rr
parents: 603
diff changeset
   100
{
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   101
    QListWidgetItem * curritem = DemosList->currentItem();
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   102
    if (!curritem)
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   103
    {
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   104
        QMessageBox::critical(this,
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   105
                tr("Error"),
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   106
                tr("Please select record from the list"),
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   107
                tr("OK"));
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   108
        return ;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   109
    }
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   110
    QFile rfile(curritem->data(Qt::UserRole).toString());
627
92e136c3eb46 Button for renaming demo and save files
unc0rr
parents: 603
diff changeset
   111
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   112
    QFileInfo finfo(rfile);
627
92e136c3eb46 Button for renaming demo and save files
unc0rr
parents: 603
diff changeset
   113
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   114
    bool ok;
627
92e136c3eb46 Button for renaming demo and save files
unc0rr
parents: 603
diff changeset
   115
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   116
    QString newname = QInputDialog::getText(this, tr("Rename dialog"), tr("Enter new file name:"), QLineEdit::Normal, finfo.completeBaseName().replace("." + *cProtoVer, ""), &ok);
627
92e136c3eb46 Button for renaming demo and save files
unc0rr
parents: 603
diff changeset
   117
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   118
    if(ok && newname.size())
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   119
    {
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   120
        QString newfullname = QString("%1/%2.%3.%4")
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   121
                                      .arg(finfo.absolutePath())
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   122
                                      .arg(newname)
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   123
                                      .arg(*cProtoVer)
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   124
                                      .arg(finfo.suffix());
627
92e136c3eb46 Button for renaming demo and save files
unc0rr
parents: 603
diff changeset
   125
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   126
        ok = rfile.rename(newfullname);
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   127
        if(!ok)
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   128
            QMessageBox::critical(this, tr("Error"), tr("Cannot rename to") + newfullname);
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   129
        else
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   130
            FillFromDir(recType);
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   131
    }
627
92e136c3eb46 Button for renaming demo and save files
unc0rr
parents: 603
diff changeset
   132
}
720
97a9d67d5c3e - Add 'Delete' button to demos and saves pages
unc0rr
parents: 628
diff changeset
   133
97a9d67d5c3e - Add 'Delete' button to demos and saves pages
unc0rr
parents: 628
diff changeset
   134
void PagePlayDemo::removeRecord()
97a9d67d5c3e - Add 'Delete' button to demos and saves pages
unc0rr
parents: 628
diff changeset
   135
{
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   136
    QListWidgetItem * curritem = DemosList->currentItem();
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   137
    if (!curritem)
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   138
    {
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   139
        QMessageBox::critical(this,
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   140
                tr("Error"),
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   141
                tr("Please select record from the list"),
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   142
                tr("OK"));
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   143
        return ;
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   144
    }
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   145
    QFile rfile(curritem->data(Qt::UserRole).toString());
720
97a9d67d5c3e - Add 'Delete' button to demos and saves pages
unc0rr
parents: 628
diff changeset
   146
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   147
    bool ok;
720
97a9d67d5c3e - Add 'Delete' button to demos and saves pages
unc0rr
parents: 628
diff changeset
   148
2948
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   149
    ok = rfile.remove();
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   150
    if(!ok)
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   151
        QMessageBox::critical(this, tr("Error"), tr("Cannot delete file"));
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   152
    else
3f21a9dc93d0 Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents: 2742
diff changeset
   153
        FillFromDir(recType);
720
97a9d67d5c3e - Add 'Delete' button to demos and saves pages
unc0rr
parents: 628
diff changeset
   154
}
5865
35387d27f73a Save demo when loaded from save game finishes
unc0rr
parents: 5205
diff changeset
   155
35387d27f73a Save demo when loaded from save game finishes
unc0rr
parents: 5205
diff changeset
   156
bool PagePlayDemo::isSave()
35387d27f73a Save demo when loaded from save game finishes
unc0rr
parents: 5205
diff changeset
   157
{
35387d27f73a Save demo when loaded from save game finishes
unc0rr
parents: 5205
diff changeset
   158
    return recType == RT_Save;
35387d27f73a Save demo when loaded from save game finishes
unc0rr
parents: 5205
diff changeset
   159
}