Skip to content

Commit

Permalink
Added actual files instead of symlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
alartum committed May 24, 2017
1 parent 219e8d0 commit 636551f
Show file tree
Hide file tree
Showing 9 changed files with 50,586 additions and 8 deletions.
4 changes: 2 additions & 2 deletions config/mm_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ max_FPS = 60
-- animation sequence for one state
-- HIGHER VALUES = LOWER SPEED
-- HIGHER VALUES = BETTER QUALITY
animation_time = 2
animation_time = 10


-- Delay between animation frames
frame_delay = 7
frame_delay = 20


-- Default tile size
Expand Down
2 changes: 1 addition & 1 deletion config/window_config.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- Field size in tiles
field_size = {height = 200, width = 200}
field_size = {height = 10, width = 10}

-- Maximum window size in pixels
-- The actual size will be chosen in runtime
Expand Down
7 changes: 7 additions & 0 deletions field/field.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,3 +428,10 @@ void Field::drawMinimap(){
draw(current_view);
}
}

void Field::init(){
generateTiles();
loadTileTextures();
generateEntities();
loadEntityTextures();
}
3 changes: 2 additions & 1 deletion field/field.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ class Field : public QSFMLWidget
Field(QWidget* parent = nullptr, const QPoint& pos = QPoint(),
const sf::Vector2u& sizeInTiles = sf::Vector2u(1, 1),
const sf::Vector2u& sizeInPixels = sf::Vector2u(600,600));

// Genrerates the entire new map
void init();
~Field();
void toggleMinimap();
// Sets model manager for every tile
Expand Down
9 changes: 8 additions & 1 deletion gamewindow/gamewindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ GameWindow::GameWindow(QWidget *parent) :
time_(0)
{
setCentralWidget(&field_);
setFixedSize(field_.size());

QMenu* fileMenu = menuBar()->addMenu(tr("&Options"));
QAction* plot_action = fileMenu->addAction(tr("&Plots"));
Expand Down Expand Up @@ -55,6 +54,8 @@ GameWindow::GameWindow(QWidget *parent) :
connect(resume_action, SIGNAL(triggered(bool)), &field_, SLOT(start()));
connect(resume_action, SIGNAL(triggered(bool)), &plot_timer_, SLOT(start()));
*/
setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);

plot_.setMinimumSize(300, 300);
plot_.setInteraction(QCP::iRangeZoom, true);
plot_.setInteraction(QCP::iRangeDrag, true);
Expand Down Expand Up @@ -137,3 +138,9 @@ void GameWindow::updatePlot(){
plot_.replot();
time_++;
}

void GameWindow::restartField(){
field_.generateTiles();
field_.generateEntities();

}
1 change: 1 addition & 0 deletions gamewindow/gamewindow.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public slots:
void showPlot();
void showHelp();
void updatePlot();
void restartField();
};

#endif // GAMEWINDOW_HPP
1 change: 0 additions & 1 deletion lib/qcustomplot.cpp

This file was deleted.

Loading

0 comments on commit 636551f

Please sign in to comment.