QTfrontend/net/hwmapoptimizer.h
author Wuzzy <almikes@aol.com>
Thu, 27 Apr 2017 21:00:28 +0200
changeset 12366 05fe955e2763
parent 10256 b07288b729c4
permissions -rw-r--r--
Fix engine crash in ACF mission 5 when skipping animation after killing wave 2 while the cyborg is talking Also harden the code against double function calls
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10256
b07288b729c4 Some further work on map optimizer
unc0rr
parents:
diff changeset
     1
#ifndef HWMAPOPTIMIZER_H
b07288b729c4 Some further work on map optimizer
unc0rr
parents:
diff changeset
     2
#define HWMAPOPTIMIZER_H
b07288b729c4 Some further work on map optimizer
unc0rr
parents:
diff changeset
     3
b07288b729c4 Some further work on map optimizer
unc0rr
parents:
diff changeset
     4
#include "tcpBase.h"
b07288b729c4 Some further work on map optimizer
unc0rr
parents:
diff changeset
     5
#include "drawmapscene.h"
b07288b729c4 Some further work on map optimizer
unc0rr
parents:
diff changeset
     6
b07288b729c4 Some further work on map optimizer
unc0rr
parents:
diff changeset
     7
class HWMapOptimizer : public TCPBase
b07288b729c4 Some further work on map optimizer
unc0rr
parents:
diff changeset
     8
{
b07288b729c4 Some further work on map optimizer
unc0rr
parents:
diff changeset
     9
    Q_OBJECT
b07288b729c4 Some further work on map optimizer
unc0rr
parents:
diff changeset
    10
public:
b07288b729c4 Some further work on map optimizer
unc0rr
parents:
diff changeset
    11
    explicit HWMapOptimizer(QObject *parent = 0);
b07288b729c4 Some further work on map optimizer
unc0rr
parents:
diff changeset
    12
b07288b729c4 Some further work on map optimizer
unc0rr
parents:
diff changeset
    13
    void optimizeMap(const Paths & paths);
b07288b729c4 Some further work on map optimizer
unc0rr
parents:
diff changeset
    14
    bool couldBeRemoved();
b07288b729c4 Some further work on map optimizer
unc0rr
parents:
diff changeset
    15
    
b07288b729c4 Some further work on map optimizer
unc0rr
parents:
diff changeset
    16
signals:    
b07288b729c4 Some further work on map optimizer
unc0rr
parents:
diff changeset
    17
    void optimizedMap(const Paths & paths);
b07288b729c4 Some further work on map optimizer
unc0rr
parents:
diff changeset
    18
    
b07288b729c4 Some further work on map optimizer
unc0rr
parents:
diff changeset
    19
public slots:
b07288b729c4 Some further work on map optimizer
unc0rr
parents:
diff changeset
    20
b07288b729c4 Some further work on map optimizer
unc0rr
parents:
diff changeset
    21
protected:
b07288b729c4 Some further work on map optimizer
unc0rr
parents:
diff changeset
    22
    QStringList getArguments();
b07288b729c4 Some further work on map optimizer
unc0rr
parents:
diff changeset
    23
    void onClientDisconnect();
b07288b729c4 Some further work on map optimizer
unc0rr
parents:
diff changeset
    24
    void SendToClientFirst();
b07288b729c4 Some further work on map optimizer
unc0rr
parents:
diff changeset
    25
b07288b729c4 Some further work on map optimizer
unc0rr
parents:
diff changeset
    26
private:
b07288b729c4 Some further work on map optimizer
unc0rr
parents:
diff changeset
    27
    Paths m_paths;
b07288b729c4 Some further work on map optimizer
unc0rr
parents:
diff changeset
    28
};
b07288b729c4 Some further work on map optimizer
unc0rr
parents:
diff changeset
    29
b07288b729c4 Some further work on map optimizer
unc0rr
parents:
diff changeset
    30
#endif // HWMAPOPTIMIZER_H