Replace RBX/RBXNU references with RNR
This commit is contained in:
parent
34bbcc31e8
commit
ca265c5b75
|
|
@ -7,9 +7,9 @@ project(player)
|
||||||
project(server)
|
project(server)
|
||||||
project(studio)
|
project(studio)
|
||||||
|
|
||||||
option(COMPILE_PLAYER "Compile the RBXNU Player" ON)
|
option(COMPILE_PLAYER "Compile the RNR Player" ON)
|
||||||
option(COMPILE_SERVER "Compile the RBXNU Server" ON)
|
option(COMPILE_SERVER "Compile the RNR Server" ON)
|
||||||
option(COMPILE_STUDIO "Compile the RBXNU Studio" ON)
|
option(COMPILE_STUDIO "Compile the RNR Studio" ON)
|
||||||
|
|
||||||
find_package(Boost REQUIRED)
|
find_package(Boost REQUIRED)
|
||||||
find_package(cglm REQUIRED CONFIG)
|
find_package(cglm REQUIRED CONFIG)
|
||||||
|
|
@ -47,8 +47,8 @@ if(COMPILE_PLAYER OR COMPILE_STUDIO)
|
||||||
qt_standard_project_setup()
|
qt_standard_project_setup()
|
||||||
|
|
||||||
qt_add_library(qt_common STATIC
|
qt_add_library(qt_common STATIC
|
||||||
src/client/common/RBXNUGraphicsWidget.cpp
|
src/client/common/RNRGraphicsWidget.cpp
|
||||||
src/include/client/common/RBXNUGraphicsWidget.hpp
|
src/include/client/common/RNRGraphicsWidget.hpp
|
||||||
src/client/common/Adorn.cpp
|
src/client/common/Adorn.cpp
|
||||||
src/include/client/common/Adorn.hpp
|
src/include/client/common/Adorn.hpp
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
#include <client/common/RBXNUGraphicsWidget.hpp>
|
#include <client/common/RNRGraphicsWidget.hpp>
|
||||||
|
|
||||||
RBXNUGraphicsWidget::RBXNUGraphicsWidget(QWidget* parent) : QOpenGLWidget(parent)
|
RNRGraphicsWidget::RNRGraphicsWidget(QWidget* parent) : QOpenGLWidget(parent)
|
||||||
{
|
{
|
||||||
gl_adorn = new GL::Adorn();
|
gl_adorn = new GL::Adorn();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RBXNUGraphicsWidget::initializeGL()
|
void RNRGraphicsWidget::initializeGL()
|
||||||
{
|
{
|
||||||
printf("qt_common: initializeGL\n");
|
printf("qt_common: initializeGL\n");
|
||||||
|
|
||||||
|
|
@ -14,13 +14,13 @@ void RBXNUGraphicsWidget::initializeGL()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RBXNUGraphicsWidget::paintGL()
|
void RNRGraphicsWidget::paintGL()
|
||||||
{
|
{
|
||||||
this->delta_time = ((double)timer.elapsed())/1000.0;
|
this->delta_time = ((double)timer.elapsed())/1000.0;
|
||||||
timer.start();
|
timer.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RBXNUGraphicsWidget::resizeGL(int w, int h)
|
void RNRGraphicsWidget::resizeGL(int w, int h)
|
||||||
{
|
{
|
||||||
printf("qt_common: resizeGL %i %i\n", w, h);
|
printf("qt_common: resizeGL %i %i\n", w, h);
|
||||||
}
|
}
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
StudioWindow::StudioWindow()
|
StudioWindow::StudioWindow()
|
||||||
{
|
{
|
||||||
setWindowTitle(QString("RBXNU Studio"));
|
setWindowTitle(QString("RNR Studio"));
|
||||||
|
|
||||||
QPixmap icon_pixmap = QPixmap();
|
QPixmap icon_pixmap = QPixmap();
|
||||||
icon_pixmap.loadFromData(icon_png, icon_png_size);
|
icon_pixmap.loadFromData(icon_png, icon_png_size);
|
||||||
|
|
@ -12,7 +12,7 @@ StudioWindow::StudioWindow()
|
||||||
QWidget *content_widget = new QWidget();
|
QWidget *content_widget = new QWidget();
|
||||||
QGridLayout* grid = new QGridLayout();
|
QGridLayout* grid = new QGridLayout();
|
||||||
|
|
||||||
this->graphics_widget = new RBXNUGraphicsWidget();
|
this->graphics_widget = new RNRGraphicsWidget();
|
||||||
|
|
||||||
grid->addWidget(this->graphics_widget, 0, 0, 1, 1);
|
grid->addWidget(this->graphics_widget, 0, 0, 1, 1);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#include <engine/app/humanoid/Humanoid.hpp>
|
#include <engine/app/humanoid/Humanoid.hpp>
|
||||||
|
|
||||||
RBX::Humanoid::Humanoid()
|
RNR::Humanoid::Humanoid()
|
||||||
{
|
{
|
||||||
this->setName("Humanoid");
|
this->setName("Humanoid");
|
||||||
}
|
}
|
||||||
|
|
@ -1,27 +1,27 @@
|
||||||
#include <engine/app/v8/tree/Instance.hpp>
|
#include <engine/app/v8/tree/Instance.hpp>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
RBX::Instance::Instance()
|
RNR::Instance::Instance()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RBX::Instance::Instance(std::string name)
|
RNR::Instance::Instance(std::string name)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RBX::Instance::contains(RBX::Instance* child)
|
bool RNR::Instance::contains(RNR::Instance* child)
|
||||||
{
|
{
|
||||||
auto child_it = std::find(m_children.begin(), m_children.end(), (boost::shared_ptr<RBX::Instance>)child);
|
auto child_it = std::find(m_children.begin(), m_children.end(), (boost::shared_ptr<RNR::Instance>)child);
|
||||||
if(child_it != m_children.end())
|
if(child_it != m_children.end())
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RBX::Instance::isAncestorOf(RBX::Instance* instance)
|
bool RNR::Instance::isAncestorOf(RNR::Instance* instance)
|
||||||
{
|
{
|
||||||
RBX::Instance* instance_parent = instance->m_parent;
|
RNR::Instance* instance_parent = instance->m_parent;
|
||||||
while(instance_parent != 0)
|
while(instance_parent != 0)
|
||||||
{
|
{
|
||||||
instance_parent = instance_parent->m_parent;
|
instance_parent = instance_parent->m_parent;
|
||||||
|
|
@ -31,22 +31,22 @@ bool RBX::Instance::isAncestorOf(RBX::Instance* instance)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RBX::Instance::askSetParent(RBX::Instance* instance)
|
bool RNR::Instance::askSetParent(RNR::Instance* instance)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RBX::Instance::canSetParent(RBX::Instance* instance)
|
bool RNR::Instance::canSetParent(RNR::Instance* instance)
|
||||||
{
|
{
|
||||||
return !instance || instance->canAddChild(this);
|
return !instance || instance->canAddChild(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RBX::Instance::askAddChild(RBX::Instance* instance)
|
bool RNR::Instance::askAddChild(RNR::Instance* instance)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RBX::Instance::canAddChild(RBX::Instance* instance)
|
bool RNR::Instance::canAddChild(RNR::Instance* instance)
|
||||||
{
|
{
|
||||||
if(instance->contains(this) || instance->m_parent == this)
|
if(instance->contains(this) || instance->m_parent == this)
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -55,7 +55,7 @@ bool RBX::Instance::canAddChild(RBX::Instance* instance)
|
||||||
return instance->askSetParent(this);
|
return instance->askSetParent(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RBX::Instance::setName(std::string name)
|
void RNR::Instance::setName(std::string name)
|
||||||
{
|
{
|
||||||
if(name != this->m_name)
|
if(name != this->m_name)
|
||||||
{
|
{
|
||||||
|
|
@ -64,7 +64,7 @@ void RBX::Instance::setName(std::string name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RBX::Instance::setParent(RBX::Instance* newParent)
|
void RNR::Instance::setParent(RNR::Instance* newParent)
|
||||||
{
|
{
|
||||||
if(newParent != m_parent)
|
if(newParent != m_parent)
|
||||||
{
|
{
|
||||||
|
|
@ -82,8 +82,8 @@ void RBX::Instance::setParent(RBX::Instance* newParent)
|
||||||
|
|
||||||
if(m_parent)
|
if(m_parent)
|
||||||
{
|
{
|
||||||
std::vector<boost::shared_ptr<RBX::Instance>>* children = m_parent->getChildren();
|
std::vector<boost::shared_ptr<RNR::Instance>>* children = m_parent->getChildren();
|
||||||
auto child_it = std::find(children->begin(), children->end(), (boost::shared_ptr<RBX::Instance>)this);
|
auto child_it = std::find(children->begin(), children->end(), (boost::shared_ptr<RNR::Instance>)this);
|
||||||
if(child_it != children->end())
|
if(child_it != children->end())
|
||||||
children->erase(child_it);
|
children->erase(child_it);
|
||||||
if(m_parent->numChildren() == 0)
|
if(m_parent->numChildren() == 0)
|
||||||
|
|
@ -93,12 +93,12 @@ void RBX::Instance::setParent(RBX::Instance* newParent)
|
||||||
}
|
}
|
||||||
|
|
||||||
m_parent = newParent;
|
m_parent = newParent;
|
||||||
m_parent->m_children.push_back((boost::shared_ptr<RBX::Instance>)this);
|
m_parent->m_children.push_back((boost::shared_ptr<RNR::Instance>)this);
|
||||||
newParent->onChildAdded(this);
|
newParent->onChildAdded(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RBX::Instance::onChildAdded(RBX::Instance* childAdded)
|
void RNR::Instance::onChildAdded(RNR::Instance* childAdded)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,21 +1,21 @@
|
||||||
#include <engine/app/v8/world/World.hpp>
|
#include <engine/app/v8/world/World.hpp>
|
||||||
|
|
||||||
RBX::World::World()
|
RNR::World::World()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RBX::World::preStep()
|
void RNR::World::preStep()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
double RBX::World::step(float timestep)
|
double RNR::World::step(float timestep)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RBX::World::update()
|
void RNR::World::update()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,16 +1,16 @@
|
||||||
#include <engine/network/Guid.hpp>
|
#include <engine/network/Guid.hpp>
|
||||||
|
|
||||||
RBX::Guid::Guid()
|
RNR::Guid::Guid()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RBX::Guid::compare(RBX::Guid* a, RBX::Guid* b)
|
void RNR::Guid::compare(RNR::Guid* a, RNR::Guid* b)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RBX::Guid::generateGUID(std::string* result)
|
void RNR::Guid::generateGUID(std::string* result)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
namespace GL
|
namespace GL
|
||||||
{
|
{
|
||||||
// 2d rendering api
|
// 2d rendering api
|
||||||
class Adorn : public RBX::Adorn
|
class Adorn : public RNR::Adorn
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Adorn();
|
Adorn();
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,12 @@
|
||||||
#include <QElapsedTimer>
|
#include <QElapsedTimer>
|
||||||
#include <client/common/Adorn.hpp>
|
#include <client/common/Adorn.hpp>
|
||||||
|
|
||||||
class RBXNUGraphicsWidget : public QOpenGLWidget
|
class RNRGraphicsWidget : public QOpenGLWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RBXNUGraphicsWidget(QWidget* parent = nullptr);
|
RNRGraphicsWidget(QWidget* parent = nullptr);
|
||||||
|
|
||||||
double delta_time;
|
double delta_time;
|
||||||
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
#include <QTreeWidget>
|
#include <QTreeWidget>
|
||||||
#include <client/common/RBXNUGraphicsWidget.hpp>
|
#include <client/common/RNRGraphicsWidget.hpp>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
class StudioWindow : public QMainWindow
|
class StudioWindow : public QMainWindow
|
||||||
|
|
@ -12,7 +12,7 @@ class StudioWindow : public QMainWindow
|
||||||
public:
|
public:
|
||||||
StudioWindow();
|
StudioWindow();
|
||||||
|
|
||||||
RBXNUGraphicsWidget* graphics_widget;
|
RNRGraphicsWidget* graphics_widget;
|
||||||
QTreeWidget* datamodel_tree;
|
QTreeWidget* datamodel_tree;
|
||||||
protected:
|
protected:
|
||||||
void closeEvent(QCloseEvent* event);
|
void closeEvent(QCloseEvent* event);
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
namespace RBX
|
namespace RNR
|
||||||
{
|
{
|
||||||
class Name
|
class Name
|
||||||
{
|
{
|
||||||
|
|
@ -10,8 +10,8 @@ namespace RBX
|
||||||
|
|
||||||
char* c_str();
|
char* c_str();
|
||||||
|
|
||||||
static void compare(const RBX::Name *a, const RBX::Name *b);
|
static void compare(const RNR::Name *a, const RNR::Name *b);
|
||||||
static void declare(const char* sName, int dictionaryIndex);
|
static void declare(const char* sName, int dictionaryIndex);
|
||||||
static std::map<int, RBX::Name*>* dictionary();
|
static std::map<int, RNR::Name*>* dictionary();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
// TODO: add G3D
|
// TODO: add G3D
|
||||||
|
|
||||||
namespace RBX
|
namespace RNR
|
||||||
{
|
{
|
||||||
// 2d rendering api
|
// 2d rendering api
|
||||||
class Adorn
|
class Adorn
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include <engine/app/gui/Adorn.hpp>
|
#include <engine/app/gui/Adorn.hpp>
|
||||||
|
|
||||||
namespace RBX
|
namespace RNR
|
||||||
{
|
{
|
||||||
void renderForceField(boost::shared_ptr<RBX::Instance> *descendant, RBX::Adorn *adorn, int cycle);
|
void renderForceField(boost::shared_ptr<RNR::Instance> *descendant, RNR::Adorn *adorn, int cycle);
|
||||||
}
|
}
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include <engine/app/v8/tree/Instance.hpp>
|
#include <engine/app/v8/tree/Instance.hpp>
|
||||||
|
|
||||||
namespace RBX
|
namespace RNR
|
||||||
{
|
{
|
||||||
class Humanoid : Instance
|
class Humanoid : Instance
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,38 +4,38 @@
|
||||||
#include <engine/app/Name.hpp>
|
#include <engine/app/Name.hpp>
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
namespace RBX
|
namespace RNR
|
||||||
{
|
{
|
||||||
class Instance
|
class Instance
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
std::string m_name;
|
std::string m_name;
|
||||||
RBX::Instance* m_parent;
|
RNR::Instance* m_parent;
|
||||||
std::vector<boost::shared_ptr<RBX::Instance>> m_children;
|
std::vector<boost::shared_ptr<RNR::Instance>> m_children;
|
||||||
bool m_archivable;
|
bool m_archivable;
|
||||||
public:
|
public:
|
||||||
Instance();
|
Instance();
|
||||||
Instance(std::string name);
|
Instance(std::string name);
|
||||||
|
|
||||||
bool contains(RBX::Instance* child);
|
bool contains(RNR::Instance* child);
|
||||||
bool isAncestorOf(RBX::Instance* instance);
|
bool isAncestorOf(RNR::Instance* instance);
|
||||||
|
|
||||||
virtual bool askSetParent(RBX::Instance* instance); // derive this
|
virtual bool askSetParent(RNR::Instance* instance); // derive this
|
||||||
bool canSetParent(RBX::Instance* instance);
|
bool canSetParent(RNR::Instance* instance);
|
||||||
virtual bool askAddChild(RBX::Instance* instance); // derive this
|
virtual bool askAddChild(RNR::Instance* instance); // derive this
|
||||||
bool canAddChild(RBX::Instance* instance);
|
bool canAddChild(RNR::Instance* instance);
|
||||||
|
|
||||||
void createChild(boost::shared_ptr<RBX::Instance>* result, const RBX::Name *className);
|
void createChild(boost::shared_ptr<RNR::Instance>* result, const RNR::Name *className);
|
||||||
|
|
||||||
RBX::Instance* getParent() { return this->m_parent; };
|
RNR::Instance* getParent() { return this->m_parent; };
|
||||||
std::string getName() { return this->m_name; };
|
std::string getName() { return this->m_name; };
|
||||||
|
|
||||||
void setParent(RBX::Instance* newParent);
|
void setParent(RNR::Instance* newParent);
|
||||||
void setName(std::string name);
|
void setName(std::string name);
|
||||||
std::vector<boost::shared_ptr<RBX::Instance>>* getChildren() { return &this->m_children; };
|
std::vector<boost::shared_ptr<RNR::Instance>>* getChildren() { return &this->m_children; };
|
||||||
int numChildren() { return this->m_children.size(); };
|
int numChildren() { return this->m_children.size(); };
|
||||||
|
|
||||||
void onChildAdded(RBX::Instance* childAdded);
|
void onChildAdded(RNR::Instance* childAdded);
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
namespace RBX
|
namespace RNR
|
||||||
{
|
{
|
||||||
class World
|
class World
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace RBX
|
namespace RNR
|
||||||
{
|
{
|
||||||
class Guid
|
class Guid
|
||||||
{
|
{
|
||||||
|
|
@ -10,6 +10,6 @@ namespace RBX
|
||||||
Guid();
|
Guid();
|
||||||
|
|
||||||
static void generateGUID(std::string *result);
|
static void generateGUID(std::string *result);
|
||||||
static void compare(RBX::Guid* a, RBX::Guid* b);
|
static void compare(RNR::Guid* a, RNR::Guid* b);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
namespace RBX
|
namespace RNR
|
||||||
{
|
{
|
||||||
class TextureProxyBase
|
class TextureProxyBase
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue