This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
manualObject->begin("Island", Ogre::RenderOperation::OT_TRIANGLE_LIST); | |
for(uint z = 0; z < mapSize; ++z) | |
{ | |
for(uint x = 0; x < mapSize; ++x) | |
{ | |
if(mapData[z * mapSize + x] == 0) | |
continue; | |
//TOP AND DOWN QUADS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for(uint z = 0; z < mapSize; ++z) | |
{ | |
for(uint x = 0; x < mapSize; ++x) | |
{ | |
int index = z * mapSize + x; | |
if(mapData[index] == 0) | |
continue; | |
positionsMap[index] = Vector3(x, mapData[index] * 0.05, z); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(j, b, u){ | |
var ItemsCollection = b.Collection.extend({ | |
setSelectedModel: function(model){ | |
this.each(function(model){ | |
model.set('selected', false); | |
}); | |
model.set('selected', true); | |
model.trigger('selected'); | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{ | |
label: '1', | |
items: [{ | |
label: '1 - 1' | |
}, { | |
label: '1 - 2', | |
items: [{ | |
label: '1 - 2 - 1' | |
}, { | |
label: '1 - 2 - 2', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(j, b, u){ | |
var ItemModel = b.Model.extend({ | |
itemsCollection: null, | |
defaults: { | |
label: '-', | |
items: [], | |
selected: false | |
}, | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Protocol::Request request; | |
request.mutable_island()->mutable_binoms()->set_id(99999); | |
request.mutable_island()->mutable_heigthmap()->set_id(1111); | |
std::ostringstream messageStream; | |
request.SerializeToOstream(&messageStream); | |
QByteArray block; | |
QDataStream out(&block, QIODevice::WriteOnly); | |
out.setVersion(QDataStream::Qt_4_8); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef MAINWINDOW_H | |
#define MAINWINDOW_H | |
#include <QtGui/QMainWindow> | |
#include <QPainter> | |
class MainWindow : public QMainWindow | |
{ | |
Q_OBJECT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "MainWindow.h" | |
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) | |
{ | |
} | |
MainWindow::~MainWindow() | |
{ | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <QtGui/QApplication> | |
#include "MainWindow.h" | |
int main(int argc, char *argv[]) | |
{ | |
QApplication a(argc, argv); | |
MainWindow w; | |
w.show(); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Standard awesome library | |
require("awful") | |
require("awful.autofocus") | |
require("awful.rules") | |
-- Theme handling library | |
require("beautiful") | |
-- Notification library | |
require("naughty") | |
-- {{{ Error handling |
OlderNewer