zoomedit: Recreated ZoomEdit based on Glademm.
This commit is contained in:
parent
258eb984ba
commit
356efaf89a
79 changed files with 33518 additions and 6964 deletions
295
Drawer.cpp
295
Drawer.cpp
|
@ -1,295 +0,0 @@
|
||||||
#include "Drawer.h"
|
|
||||||
#include "Window.h"
|
|
||||||
#include <GL/gl.h>
|
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
|
|
||||||
void Drawer::realize(GtkWidget *widget, Drawer *drawer) {
|
|
||||||
GdkGLContext *context = gtk_widget_get_gl_context(widget);
|
|
||||||
GdkGLDrawable *drawable = gtk_widget_get_gl_drawable(widget);
|
|
||||||
|
|
||||||
if(!gdk_gl_drawable_gl_begin(drawable, context))
|
|
||||||
return;
|
|
||||||
|
|
||||||
glClearColor(0, 0, 0, 1);
|
|
||||||
|
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
|
||||||
glEnable(GL_BLEND);
|
|
||||||
|
|
||||||
glEnable(GL_LINE_SMOOTH);
|
|
||||||
glEnable(GL_POINT_SMOOTH);
|
|
||||||
|
|
||||||
glMatrixMode(GL_MODELVIEW);
|
|
||||||
glLoadIdentity();
|
|
||||||
|
|
||||||
gdk_gl_drawable_gl_end(drawable);
|
|
||||||
}
|
|
||||||
|
|
||||||
gboolean Drawer::eventHandler(GtkWidget *widget, GdkEvent *event, Drawer *drawer) {
|
|
||||||
switch(event->type) {
|
|
||||||
case GDK_CONFIGURE:
|
|
||||||
drawer->updateViewport();
|
|
||||||
drawer->updateScrollbars();
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
case GDK_EXPOSE:
|
|
||||||
drawer->render();
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
case GDK_MOTION_NOTIFY:
|
|
||||||
drawer->updateHoveredPoint(event->motion.x, event->motion.y);
|
|
||||||
drawer->window->getActiveTool()->getEventHandler()->motion(
|
|
||||||
drawer->window->getEditManager().getHoveredVertex(), drawer->scale);
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
case GDK_ENTER_NOTIFY:
|
|
||||||
drawer->updateHoveredPoint(event->crossing.x, event->crossing.y);
|
|
||||||
drawer->window->getActiveTool()->getEventHandler()->motion(
|
|
||||||
drawer->window->getEditManager().getHoveredVertex(), drawer->scale);
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
case GDK_LEAVE_NOTIFY:
|
|
||||||
drawer->window->getEditManager().setHoveredVertex(NULL, drawer->scale);
|
|
||||||
drawer->window->getActiveTool()->getEventHandler()->motion(
|
|
||||||
drawer->window->getEditManager().getHoveredVertex(), drawer->scale);
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
case GDK_BUTTON_PRESS:
|
|
||||||
drawer->window->getActiveTool()->getEventHandler()->buttonPress(event->button.button,
|
|
||||||
drawer->window->getEditManager().getHoveredVertex());
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
case GDK_BUTTON_RELEASE:
|
|
||||||
drawer->window->getActiveTool()->getEventHandler()->buttonRelease(event->button.button,
|
|
||||||
drawer->window->getEditManager().getHoveredVertex());
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
case GDK_SCROLL:
|
|
||||||
switch(event->scroll.direction) {
|
|
||||||
case GDK_SCROLL_UP:
|
|
||||||
drawer->zoom(1, event->scroll.x/widget->allocation.width, event->scroll.y/widget->allocation.height);
|
|
||||||
break;
|
|
||||||
case GDK_SCROLL_DOWN:
|
|
||||||
drawer->zoom(-1, event->scroll.x/widget->allocation.width, event->scroll.y/widget->allocation.height);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Drawer::valueChanged(GtkAdjustment *adjustment, Drawer *drawer) {
|
|
||||||
drawer->updateScrolling();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Drawer::updateViewport() {
|
|
||||||
GdkGLContext *context = gtk_widget_get_gl_context(drawingArea);
|
|
||||||
GdkGLDrawable *drawable = gtk_widget_get_gl_drawable(drawingArea);
|
|
||||||
|
|
||||||
if(!gdk_gl_drawable_gl_begin(drawable, context))
|
|
||||||
return;
|
|
||||||
|
|
||||||
glViewport(0, 0, getWidth(), getHeight());
|
|
||||||
|
|
||||||
glMatrixMode(GL_PROJECTION);
|
|
||||||
glLoadIdentity();
|
|
||||||
|
|
||||||
if(getWidth() != 0 && getHeight() != 0)
|
|
||||||
glScalef(2.0f/getWidth(), -2.0f/getHeight(), 1);
|
|
||||||
|
|
||||||
gdk_gl_drawable_gl_end(drawable);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Drawer::updateScrolling() {
|
|
||||||
if((getImageWidth())*scale < getWidth())
|
|
||||||
xCenter = 0;
|
|
||||||
else
|
|
||||||
xCenter = gtk_adjustment_get_value(hAdjustment);
|
|
||||||
|
|
||||||
g_object_set(G_OBJECT(hRuler), "lower", xCenter-getWidth()/scale/2, "upper", xCenter+getWidth()/scale/2, NULL);
|
|
||||||
|
|
||||||
if((getImageHeight())*scale < getHeight())
|
|
||||||
yCenter = 0;
|
|
||||||
else
|
|
||||||
yCenter = gtk_adjustment_get_value(vAdjustment);
|
|
||||||
|
|
||||||
g_object_set(G_OBJECT(vRuler), "lower", yCenter-getHeight()/scale/2, "upper", yCenter+getHeight()/scale/2, NULL);
|
|
||||||
|
|
||||||
gtk_widget_queue_draw(drawingArea);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Drawer::updateScrollbars(float x, float y) {
|
|
||||||
const gdouble imageWidth = getImageWidth(), imageHeight = getImageHeight();
|
|
||||||
const gdouble minX = -imageWidth/2, maxX = imageWidth/2;
|
|
||||||
const gdouble minY = -imageHeight/2, maxY = imageHeight/2;
|
|
||||||
const gdouble width = getWidth()/scale, height = getHeight()/scale;
|
|
||||||
gdouble lower, upper, pageSize, value;
|
|
||||||
|
|
||||||
|
|
||||||
gdk_window_freeze_updates(drawingArea->window);
|
|
||||||
|
|
||||||
g_object_get(G_OBJECT(hAdjustment), "lower", &lower, "upper", &upper, "page_size", &pageSize, NULL);
|
|
||||||
g_object_set(G_OBJECT(hAdjustment), "lower", minX + width/2, "upper", maxX + width/2, "page_size", width, NULL);
|
|
||||||
gtk_adjustment_changed(hAdjustment);
|
|
||||||
|
|
||||||
if(pageSize > (upper-lower) && width < imageWidth)
|
|
||||||
value = 0;
|
|
||||||
else
|
|
||||||
value = gtk_adjustment_get_value(hAdjustment) + (x-0.5)*(pageSize-width);
|
|
||||||
gtk_adjustment_set_value(hAdjustment, MAX(MIN(value, maxX - width/2), minX + width/2));
|
|
||||||
|
|
||||||
g_object_get(G_OBJECT(vAdjustment), "lower", &lower, "upper", &upper, "page_size", &pageSize, NULL);
|
|
||||||
g_object_set(G_OBJECT(vAdjustment), "lower", minY + height/2, "upper", maxY + height/2, "page_size", height, NULL);
|
|
||||||
gtk_adjustment_changed(vAdjustment);
|
|
||||||
|
|
||||||
if(pageSize > (upper-lower) && height < imageHeight)
|
|
||||||
value = 0;
|
|
||||||
else
|
|
||||||
value = gtk_adjustment_get_value(vAdjustment) + (y-0.5)*(pageSize-height);
|
|
||||||
gtk_adjustment_set_value(vAdjustment, MAX(MIN(value, maxY - height/2), minY + height/2));
|
|
||||||
|
|
||||||
gdk_window_thaw_updates(drawingArea->window);
|
|
||||||
|
|
||||||
updateScrolling();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Drawer::updateHoveredPoint(float x, float y) {
|
|
||||||
Vertex v(x, y);
|
|
||||||
viewToImage(&v);
|
|
||||||
window->getEditManager().setHoveredVertex(&v, scale);
|
|
||||||
|
|
||||||
g_object_set(G_OBJECT(hRuler), "position", v.getX(), NULL);
|
|
||||||
g_object_set(G_OBJECT(vRuler), "position", v.getY(), NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Drawer::render() {
|
|
||||||
GdkGLContext *context = gtk_widget_get_gl_context(drawingArea);
|
|
||||||
GdkGLDrawable *drawable = gtk_widget_get_gl_drawable(drawingArea);
|
|
||||||
|
|
||||||
Rectangle rect(0, 0, drawingArea->allocation.width, drawingArea->allocation.height);
|
|
||||||
|
|
||||||
viewToImage(&rect.getVertex1());
|
|
||||||
viewToImage(&rect.getVertex2());
|
|
||||||
|
|
||||||
if(!gdk_gl_drawable_gl_begin(drawable, context))
|
|
||||||
return;
|
|
||||||
|
|
||||||
glMatrixMode(GL_MODELVIEW);
|
|
||||||
glPushMatrix();
|
|
||||||
|
|
||||||
glScalef(scale, scale, 1);
|
|
||||||
glTranslatef(-xCenter, -yCenter, 0);
|
|
||||||
|
|
||||||
renderer.render(window->getLevel(), rect, scale);
|
|
||||||
|
|
||||||
if(window->getActiveTool()->getRenderer())
|
|
||||||
window->getActiveTool()->getRenderer()->render(window->getLevel(), rect, scale);
|
|
||||||
|
|
||||||
glMatrixMode(GL_MODELVIEW);
|
|
||||||
glPopMatrix();
|
|
||||||
|
|
||||||
gdk_gl_drawable_swap_buffers(drawable);
|
|
||||||
gdk_gl_drawable_gl_end(drawable);
|
|
||||||
}
|
|
||||||
|
|
||||||
Drawer::Drawer(Window *window, GdkGLConfig *glconfig) : renderer(&window->getEditManager()) {
|
|
||||||
this->window = window;
|
|
||||||
zoomExp = 0;
|
|
||||||
scale = 100;
|
|
||||||
xCenter = 0;
|
|
||||||
yCenter = 0;
|
|
||||||
|
|
||||||
drawer = gtk_table_new(3, 3, FALSE);
|
|
||||||
g_object_ref_sink(G_OBJECT(drawer));
|
|
||||||
|
|
||||||
drawingArea = gtk_drawing_area_new();
|
|
||||||
gtk_widget_set_gl_capability(drawingArea, glconfig, NULL, TRUE, GDK_GL_RGBA_TYPE);
|
|
||||||
g_signal_connect(G_OBJECT(drawingArea), "realize", G_CALLBACK(realize), this);
|
|
||||||
g_signal_connect(G_OBJECT(drawingArea), "configure-event", G_CALLBACK(eventHandler), this);
|
|
||||||
g_signal_connect(G_OBJECT(drawingArea), "expose-event", G_CALLBACK(eventHandler), this);
|
|
||||||
g_signal_connect(G_OBJECT(drawingArea), "button-press-event", G_CALLBACK(eventHandler), this);
|
|
||||||
g_signal_connect(G_OBJECT(drawingArea), "button-release-event", G_CALLBACK(eventHandler), this);
|
|
||||||
g_signal_connect(G_OBJECT(drawingArea), "enter-notify-event", G_CALLBACK(eventHandler), this);
|
|
||||||
g_signal_connect(G_OBJECT(drawingArea), "leave-notify-event", G_CALLBACK(eventHandler), this);
|
|
||||||
g_signal_connect(G_OBJECT(drawingArea), "motion-notify-event", G_CALLBACK(eventHandler), this);
|
|
||||||
g_signal_connect(G_OBJECT(drawingArea), "scroll-event", G_CALLBACK(eventHandler), this);
|
|
||||||
gtk_widget_add_events(drawingArea, GDK_SCROLL_MASK | GDK_POINTER_MOTION_MASK | GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_BUTTON_RELEASE_MASK);
|
|
||||||
gtk_table_attach(GTK_TABLE(drawer), drawingArea, 1, 2, 1, 2, (GtkAttachOptions)(GTK_FILL|GTK_EXPAND|GTK_SHRINK), (GtkAttachOptions)(GTK_FILL|GTK_EXPAND|GTK_SHRINK), 0, 0);
|
|
||||||
|
|
||||||
hAdjustment = GTK_ADJUSTMENT(gtk_adjustment_new(0, 0, 0, 10, 100, 100));
|
|
||||||
GtkWidget *hScroll = gtk_hscrollbar_new(hAdjustment);
|
|
||||||
g_signal_connect(G_OBJECT(hScroll), "value-changed", G_CALLBACK(valueChanged), this);
|
|
||||||
gtk_table_attach(GTK_TABLE(drawer), hScroll, 1, 2, 2, 3, (GtkAttachOptions)(GTK_FILL|GTK_EXPAND|GTK_SHRINK), (GtkAttachOptions)0, 0, 0);
|
|
||||||
|
|
||||||
vAdjustment = GTK_ADJUSTMENT(gtk_adjustment_new(0, 0, 0, 10, 100, 100));
|
|
||||||
GtkWidget *vScroll = gtk_vscrollbar_new(vAdjustment);
|
|
||||||
g_signal_connect(G_OBJECT(vScroll), "value-changed", G_CALLBACK(valueChanged), this);
|
|
||||||
gtk_table_attach(GTK_TABLE(drawer), vScroll, 2, 3, 1, 2, (GtkAttachOptions)0, (GtkAttachOptions)(GTK_FILL|GTK_EXPAND|GTK_SHRINK), 0, 0);
|
|
||||||
|
|
||||||
hRuler = gtk_hruler_new();
|
|
||||||
gtk_table_attach(GTK_TABLE(drawer), hRuler, 1, 2, 0, 1, (GtkAttachOptions)(GTK_FILL|GTK_EXPAND|GTK_SHRINK), (GtkAttachOptions)0, 0, 0);
|
|
||||||
|
|
||||||
vRuler = gtk_vruler_new();
|
|
||||||
gtk_table_attach(GTK_TABLE(drawer), vRuler, 0, 1, 1, 2, (GtkAttachOptions)0, (GtkAttachOptions)(GTK_FILL|GTK_EXPAND|GTK_SHRINK), 0, 0);
|
|
||||||
|
|
||||||
gtk_widget_show_all(drawer);
|
|
||||||
}
|
|
||||||
|
|
||||||
Drawer::~Drawer() {
|
|
||||||
g_object_unref(G_OBJECT(drawer));
|
|
||||||
}
|
|
||||||
|
|
||||||
void Drawer::zoom(int zoom, float x, float y) {
|
|
||||||
zoomExp = MAX(MIN(zoomExp + zoom, 50), -100);
|
|
||||||
|
|
||||||
scale = 100*powf(1.1f, zoomExp);
|
|
||||||
|
|
||||||
updateScrollbars(x, y);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Drawer::imageToView(Vertex *v) const {
|
|
||||||
v->setX((v->getX()-xCenter)*scale + getWidth()/2);
|
|
||||||
v->setY((v->getY()-yCenter)*scale + getHeight()/2);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Drawer::viewToImage(Vertex *v) const {
|
|
||||||
v->setX((v->getX()-getWidth()/2)/scale+xCenter);
|
|
||||||
v->setY((v->getY()-getHeight()/2)/scale+yCenter);
|
|
||||||
}
|
|
||||||
|
|
||||||
float Drawer::getImageWidth() const {
|
|
||||||
float max = 0;
|
|
||||||
|
|
||||||
for(Level::iterator object = window->getLevel().begin(); object != window->getLevel().end(); object++) {
|
|
||||||
if((*object)->isOfType("Room")) {
|
|
||||||
const Polygon &polygon = ((Room*)&**object)->getPolygon();
|
|
||||||
|
|
||||||
for(Polygon::const_iterator v = polygon.begin(); v != polygon.end(); v++) {
|
|
||||||
max = fmaxf(max, fabsf(v->getX()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return (2*max+1);
|
|
||||||
}
|
|
||||||
|
|
||||||
float Drawer::getImageHeight() const {
|
|
||||||
float max = 0;
|
|
||||||
|
|
||||||
for(Level::iterator object = window->getLevel().begin(); object != window->getLevel().end(); object++) {
|
|
||||||
if((*object)->isOfType("Room")) {
|
|
||||||
const Polygon &polygon = ((Room*)&**object)->getPolygon();
|
|
||||||
|
|
||||||
for(Polygon::const_iterator v = polygon.begin(); v != polygon.end(); v++) {
|
|
||||||
max = fmaxf(max, fabsf(v->getY()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return (2*max+1);
|
|
||||||
}
|
|
84
Drawer.h
84
Drawer.h
|
@ -1,84 +0,0 @@
|
||||||
#ifndef DRAWER_H_
|
|
||||||
#define DRAWER_H_
|
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
|
||||||
#include <gtk/gtkgl.h>
|
|
||||||
#include "Vertex.h"
|
|
||||||
#include "Renderer.h"
|
|
||||||
|
|
||||||
class Window;
|
|
||||||
|
|
||||||
|
|
||||||
class Drawer {
|
|
||||||
private:
|
|
||||||
GtkWidget *drawer;
|
|
||||||
GtkWidget *drawingArea;
|
|
||||||
GtkAdjustment *hAdjustment, *vAdjustment;
|
|
||||||
GtkWidget *hRuler, *vRuler;
|
|
||||||
int zoomExp;
|
|
||||||
|
|
||||||
Window *window;
|
|
||||||
|
|
||||||
Renderer renderer;
|
|
||||||
|
|
||||||
float scale;
|
|
||||||
float xCenter, yCenter;
|
|
||||||
|
|
||||||
// prevent shallow copy
|
|
||||||
Drawer(const Drawer &w);
|
|
||||||
const Drawer& operator=(const Drawer &w);
|
|
||||||
|
|
||||||
void updateViewport();
|
|
||||||
void updateScrolling();
|
|
||||||
void updateScrollbars(float x = 0.5f, float y = 0.5f);
|
|
||||||
|
|
||||||
void updateHoveredPoint(float x, float y);
|
|
||||||
|
|
||||||
void render();
|
|
||||||
|
|
||||||
gint getWidth() const {
|
|
||||||
return drawingArea->allocation.width;
|
|
||||||
}
|
|
||||||
|
|
||||||
gint getHeight() const {
|
|
||||||
return drawingArea->allocation.height;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void realize(GtkWidget *widget, Drawer *drawer);
|
|
||||||
static gboolean eventHandler(GtkWidget *widget, GdkEvent *event, Drawer *drawer);
|
|
||||||
static void valueChanged(GtkAdjustment *adjustment, Drawer *drawer);
|
|
||||||
|
|
||||||
public:
|
|
||||||
Drawer(Window *window, GdkGLConfig *glconfig);
|
|
||||||
virtual ~Drawer();
|
|
||||||
|
|
||||||
void zoom(int zoom, float x = 0.5f, float y = 0.5f);
|
|
||||||
|
|
||||||
void imageToView(Vertex *v) const;
|
|
||||||
void viewToImage(Vertex *v) const;
|
|
||||||
|
|
||||||
float getImageWidth() const;
|
|
||||||
float getImageHeight() const;
|
|
||||||
|
|
||||||
float getXCenter() const {
|
|
||||||
return xCenter;
|
|
||||||
}
|
|
||||||
|
|
||||||
float getYCenter() const {
|
|
||||||
return yCenter;
|
|
||||||
}
|
|
||||||
|
|
||||||
float getScale() const {
|
|
||||||
return scale;
|
|
||||||
}
|
|
||||||
|
|
||||||
GtkWidget *getWidget() const {
|
|
||||||
return drawer;
|
|
||||||
}
|
|
||||||
|
|
||||||
void update() {
|
|
||||||
updateScrollbars();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*DRAWER_H_*/
|
|
24
Edge.h
24
Edge.h
|
@ -1,24 +0,0 @@
|
||||||
#ifndef EDGE_H_
|
|
||||||
#define EDGE_H_
|
|
||||||
|
|
||||||
#include "LevelVertex.h"
|
|
||||||
#include "Line.h"
|
|
||||||
|
|
||||||
|
|
||||||
class Edge {
|
|
||||||
private:
|
|
||||||
LevelVertex vertex1, vertex2;
|
|
||||||
|
|
||||||
public:
|
|
||||||
Edge(const LevelVertex &v1, const LevelVertex &v2)
|
|
||||||
: vertex1(v1), vertex2(v2) {}
|
|
||||||
|
|
||||||
const LevelVertex& getVertex1() const {return vertex1;}
|
|
||||||
const LevelVertex& getVertex2() const {return vertex2;}
|
|
||||||
|
|
||||||
Line toLine() const {
|
|
||||||
return Line(*vertex1, *vertex2);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*EDGE_H_*/
|
|
|
@ -1,18 +0,0 @@
|
||||||
#ifndef EDGEPROVIDER_H_
|
|
||||||
#define EDGEPROVIDER_H_
|
|
||||||
|
|
||||||
#include "Edge.h"
|
|
||||||
|
|
||||||
|
|
||||||
class EdgeProvider {
|
|
||||||
public:
|
|
||||||
virtual ~EdgeProvider() {}
|
|
||||||
|
|
||||||
virtual const Edge* getEdge(size_t id) const = 0;
|
|
||||||
virtual size_t getEdgeCount() const = 0;
|
|
||||||
|
|
||||||
virtual void moveEdge(size_t id, float x, float y) {}
|
|
||||||
virtual void rotateEdge(size_t id, Vertex m, float a) {}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*EDGEPROVIDER_H_*/
|
|
150
EditManager.cpp
150
EditManager.cpp
|
@ -1,150 +0,0 @@
|
||||||
#include "EditManager.h"
|
|
||||||
#include "Window.h"
|
|
||||||
|
|
||||||
|
|
||||||
bool EditManager::lineOk(const Room &newRoom, const Line &l) const {
|
|
||||||
Line l2;
|
|
||||||
|
|
||||||
for(size_t i = 0; i+2 < newRoom.getPolygon().size(); i++) {
|
|
||||||
l2.setVertex1(newRoom.getPolygon()[i]);
|
|
||||||
l2.setVertex2(newRoom.getPolygon()[i+1]);
|
|
||||||
|
|
||||||
if(l.intersects(l2, NULL) == INTERSECTION_SEGMENT_SEGMENT) return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(newRoom.getPolygon().size() > 1) {
|
|
||||||
l2.setVertex1(newRoom.getPolygon()[newRoom.getPolygon().size()-2]);
|
|
||||||
l2.setVertex2(newRoom.getPolygon().back());
|
|
||||||
if(l2.contains(l.getVertex2())) return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
for(Level::iterator room = window->getLevel().begin(); room != window->getLevel().end(); room++) {
|
|
||||||
if((*room)->isOfType("Room") && ((Room*)&**room)->getPolygon().intersects(l))
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
EditManager::EditManager(Window *window) {
|
|
||||||
this->window = window;
|
|
||||||
|
|
||||||
hoveredObject = NULL;
|
|
||||||
selectedObject = NULL;
|
|
||||||
|
|
||||||
hasHoveredVertex = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void EditManager::redraw() {
|
|
||||||
window->redraw();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool EditManager::addRoom(const Room &newRoom) {
|
|
||||||
if(newRoom.getPolygon().size() > 2 && polygonOk(newRoom.getPolygon())) {
|
|
||||||
Room *room = new Room(newRoom);
|
|
||||||
room->setName(idManager.generate("room"));
|
|
||||||
|
|
||||||
window->getLevel().addWithChildren(SharedPtr<LevelObject>(room));
|
|
||||||
selectedObject = room;
|
|
||||||
|
|
||||||
window->resetTool();
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
const Vertex* EditManager::getHoveredVertex() const {
|
|
||||||
if(hasHoveredVertex) return &hoveredVertex;
|
|
||||||
else return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
void EditManager::setHoveredVertex(const Vertex *v, float scale) {
|
|
||||||
if(v) {
|
|
||||||
hasHoveredVertex = true;
|
|
||||||
hoveredVertex = *v;
|
|
||||||
|
|
||||||
hoveredObject = NULL;
|
|
||||||
|
|
||||||
for(Level::iterator object = window->getLevel().begin(); object != window->getLevel().end(); object++) {
|
|
||||||
if(!window->getActiveTool()->hoverFilter(**object))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if((*object)->hit(*v, scale)) {
|
|
||||||
if(hoveredObject && (*object)->getPriority() < hoveredObject->getPriority())
|
|
||||||
continue;
|
|
||||||
|
|
||||||
hoveredObject = &**object;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
hasHoveredVertex = false;
|
|
||||||
hoveredObject = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
window->update();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool EditManager::vertexOk(const Vertex &v, const Room *newRoom) const {
|
|
||||||
Line l;
|
|
||||||
|
|
||||||
for(Level::iterator room = window->getLevel().begin(); room != window->getLevel().end(); room++) {
|
|
||||||
if((*room)->isOfType("Room") && ((Room*)&**room)->getPolygon().contains(v)) return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!newRoom)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if(newRoom->getPolygon().empty())
|
|
||||||
return true;
|
|
||||||
|
|
||||||
l.setVertex1(newRoom->getPolygon().back());
|
|
||||||
l.setVertex2(v);
|
|
||||||
|
|
||||||
return lineOk(*newRoom, l);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool EditManager::polygonOk(const Polygon& polygon) const {
|
|
||||||
Line l, l2;
|
|
||||||
|
|
||||||
if(polygon.empty()) return false;
|
|
||||||
|
|
||||||
for(Level::iterator object = window->getLevel().begin(); object != window->getLevel().end(); object++) {
|
|
||||||
if(!(*object)->isOfType("Room"))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
Room *room = (Room*)&**object;
|
|
||||||
|
|
||||||
if(room->getPolygon().empty()) continue;
|
|
||||||
|
|
||||||
if(room->getPolygon().contains(polygon.front()))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if(polygon.contains(room->getPolygon().front()))
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(polygon.size() == 1)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if(!polygon.isSimple())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
for(Polygon::const_iterator it = polygon.begin(); it != polygon.end(); it++) {
|
|
||||||
Polygon::const_iterator it2 = it+1;
|
|
||||||
if(it2 == polygon.end()) it2 = polygon.begin();
|
|
||||||
|
|
||||||
l.setVertex1(*it);
|
|
||||||
l.setVertex2(*it2);
|
|
||||||
|
|
||||||
for(Level::iterator room = window->getLevel().begin(); room != window->getLevel().end(); room++) {
|
|
||||||
if((*room)->isOfType("Room") && ((Room*)&**room)->getPolygon().intersects(l))
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
|
@ -1,52 +0,0 @@
|
||||||
#ifndef EDITMANAGER_H_
|
|
||||||
#define EDITMANAGER_H_
|
|
||||||
|
|
||||||
#include "SharedPtr.h"
|
|
||||||
#include "Room.h"
|
|
||||||
#include "IdManager.h"
|
|
||||||
|
|
||||||
|
|
||||||
class Window;
|
|
||||||
|
|
||||||
|
|
||||||
class EditManager {
|
|
||||||
private:
|
|
||||||
IdManager idManager;
|
|
||||||
|
|
||||||
Window *window;
|
|
||||||
|
|
||||||
LevelObject *hoveredObject;
|
|
||||||
LevelObject *selectedObject;
|
|
||||||
|
|
||||||
Vertex hoveredVertex;
|
|
||||||
bool hasHoveredVertex;
|
|
||||||
|
|
||||||
bool lineOk(const Room &newRoom, const Line &l) const;
|
|
||||||
|
|
||||||
public:
|
|
||||||
EditManager(Window *window);
|
|
||||||
|
|
||||||
void redraw();
|
|
||||||
|
|
||||||
LevelObject* getHoveredObject() {
|
|
||||||
return hoveredObject;
|
|
||||||
}
|
|
||||||
|
|
||||||
void setSelectedObject(LevelObject *object) {
|
|
||||||
selectedObject = object;
|
|
||||||
}
|
|
||||||
|
|
||||||
LevelObject* getSelectedObject() {
|
|
||||||
return selectedObject;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool addRoom(const Room &room);
|
|
||||||
|
|
||||||
const Vertex* getHoveredVertex() const;
|
|
||||||
void setHoveredVertex(const Vertex *v, float scale);
|
|
||||||
|
|
||||||
bool vertexOk(const Vertex &v, const Room *newRoom = NULL) const;
|
|
||||||
bool polygonOk(const Polygon &polygon) const;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*EDITMANAGER_H_*/
|
|
|
@ -1,17 +0,0 @@
|
||||||
#ifndef EVENTHANDLER_H_
|
|
||||||
#define EVENTHANDLER_H_
|
|
||||||
|
|
||||||
#include "Vertex.h"
|
|
||||||
|
|
||||||
|
|
||||||
class EventHandler {
|
|
||||||
public:
|
|
||||||
virtual ~EventHandler() {}
|
|
||||||
|
|
||||||
virtual bool buttonPress(unsigned int button, const Vertex *v) {return false;}
|
|
||||||
virtual bool buttonRelease(unsigned int button, const Vertex *v) {return false;}
|
|
||||||
virtual bool motion(const Vertex *v) {return false;}
|
|
||||||
virtual bool motion(const Vertex *v, float scale) {return motion(v);}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*EVENTHANDLER_H_*/
|
|
407
FileManager.cpp
407
FileManager.cpp
|
@ -1,407 +0,0 @@
|
||||||
#include "FileManager.h"
|
|
||||||
#include "Window.h"
|
|
||||||
|
|
||||||
|
|
||||||
bool FileManager::writeTriangle(xmlTextWriterPtr writer, const Triangle &triangle, float height) {
|
|
||||||
// <triangle>
|
|
||||||
if(xmlTextWriterStartElement(writer, (xmlChar*)"triangle") < 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
//if(xmlTextWriterWriteAttribute(writer, (xmlChar*)"texture", (xmlChar*)"t0") < 0)
|
|
||||||
// return false;
|
|
||||||
|
|
||||||
float y = 0.0f;
|
|
||||||
if(triangle.getDirection() == Triangle::CW) y = height;
|
|
||||||
|
|
||||||
if(!writeVertex(writer, triangle.getVertexA().getX(), y, triangle.getVertexA().getY()))
|
|
||||||
return false;
|
|
||||||
//if(!writeTexCoords(writer, triangle.getVertexA().getX(), triangle.getVertexA().getY()))
|
|
||||||
// return false;
|
|
||||||
|
|
||||||
if(!writeVertex(writer, triangle.getVertexB().getX(), y, triangle.getVertexB().getY()))
|
|
||||||
return false;
|
|
||||||
//if(!writeTexCoords(writer, triangle.getVertexB().getX(), triangle.getVertexB().getY()))
|
|
||||||
// return false;
|
|
||||||
|
|
||||||
if(!writeVertex(writer, triangle.getVertexC().getX(), y, triangle.getVertexC().getY()))
|
|
||||||
return false;
|
|
||||||
//if(!writeTexCoords(writer, triangle.getVertexC().getX(), triangle.getVertexC().getY()))
|
|
||||||
// return false;
|
|
||||||
|
|
||||||
// </triangle>
|
|
||||||
if(xmlTextWriterEndElement(writer) < 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// <triangle>
|
|
||||||
if(xmlTextWriterStartElement(writer, (xmlChar*)"triangle") < 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
//if(xmlTextWriterWriteAttribute(writer, (xmlChar*)"texture", (xmlChar*)"t0") < 0)
|
|
||||||
// return false;
|
|
||||||
|
|
||||||
y = height;
|
|
||||||
if(triangle.getDirection() == Triangle::CW) y = 0.0f;
|
|
||||||
|
|
||||||
if(!writeVertex(writer, triangle.getVertexC().getX(), y, triangle.getVertexC().getY()))
|
|
||||||
return false;
|
|
||||||
//if(!writeTexCoords(writer, triangle.getVertexC().getX(), triangle.getVertexC().getY()))
|
|
||||||
// return false;
|
|
||||||
|
|
||||||
if(!writeVertex(writer, triangle.getVertexB().getX(), y, triangle.getVertexB().getY()))
|
|
||||||
return false;
|
|
||||||
//if(!writeTexCoords(writer, triangle.getVertexB().getX(), triangle.getVertexB().getY()))
|
|
||||||
// return false;
|
|
||||||
|
|
||||||
if(!writeVertex(writer, triangle.getVertexA().getX(), y, triangle.getVertexA().getY()))
|
|
||||||
return false;
|
|
||||||
//if(!writeTexCoords(writer, triangle.getVertexA().getX(), triangle.getVertexA().getY()))
|
|
||||||
// return false;
|
|
||||||
|
|
||||||
// </triangle>
|
|
||||||
if(xmlTextWriterEndElement(writer) < 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool FileManager::writeSide(xmlTextWriterPtr writer, const Vertex &v1, const Vertex &v2, float height) {
|
|
||||||
// <triangle>
|
|
||||||
if(xmlTextWriterStartElement(writer, (xmlChar*)"triangle") < 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
//if(xmlTextWriterWriteAttribute(writer, (xmlChar*)"texture", (xmlChar*)"t0") < 0)
|
|
||||||
// return false;
|
|
||||||
|
|
||||||
if(!writeVertex(writer, v1.getX(), 0, v1.getY()))
|
|
||||||
return false;
|
|
||||||
if(!writeTexCoords(writer, v1.getX(), v1.getY()))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if(!writeVertex(writer, v2.getX(), 0, v2.getY()))
|
|
||||||
return false;
|
|
||||||
if(!writeTexCoords(writer, v2.getX(), v2.getY()))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if(!writeVertex(writer, v2.getX(), height, v2.getY()))
|
|
||||||
return false;
|
|
||||||
if(!writeTexCoords(writer, v2.getX(), v2.getY()))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// </triangle>
|
|
||||||
if(xmlTextWriterEndElement(writer) < 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// <triangle>
|
|
||||||
if(xmlTextWriterStartElement(writer, (xmlChar*)"triangle") < 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
//if(xmlTextWriterWriteAttribute(writer, (xmlChar*)"texture", (xmlChar*)"t0") < 0)
|
|
||||||
// return false;
|
|
||||||
|
|
||||||
if(!writeVertex(writer, v2.getX(), height, v2.getY()))
|
|
||||||
return false;
|
|
||||||
if(!writeTexCoords(writer, v2.getX(), v2.getY()))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if(!writeVertex(writer, v1.getX(), height, v1.getY()))
|
|
||||||
return false;
|
|
||||||
if(!writeTexCoords(writer, v1.getX(), v1.getY()))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if(!writeVertex(writer, v1.getX(), 0, v1.getY()))
|
|
||||||
return false;
|
|
||||||
if(!writeTexCoords(writer, v1.getX(), v1.getY()))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// </triangle>
|
|
||||||
if(xmlTextWriterEndElement(writer) < 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool FileManager::writeVertex(xmlTextWriterPtr writer, float x, float y, float z) {
|
|
||||||
// <vertex>
|
|
||||||
if(xmlTextWriterStartElement(writer, (xmlChar*)"vertex") < 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if(xmlTextWriterWriteFormatAttribute(writer, (xmlChar*)"x", "%f", x) < 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if(xmlTextWriterWriteFormatAttribute(writer, (xmlChar*)"y", "%f", y) < 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if(xmlTextWriterWriteFormatAttribute(writer, (xmlChar*)"z", "%f", z) < 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// </vertex>
|
|
||||||
if(xmlTextWriterEndElement(writer) < 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool FileManager::writeTexCoords(xmlTextWriterPtr writer, float s, float t) {
|
|
||||||
// <texcoords>
|
|
||||||
if(xmlTextWriterStartElement(writer, (xmlChar*)"texcoords") < 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if(xmlTextWriterWriteFormatAttribute(writer, (xmlChar*)"s", "%f", s) < 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if(xmlTextWriterWriteFormatAttribute(writer, (xmlChar*)"t", "%f", t) < 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// </texcoords>
|
|
||||||
if(xmlTextWriterEndElement(writer) < 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool FileManager::writeStart(xmlTextWriterPtr writer, const Vertex3d &start) {
|
|
||||||
// <vertex>
|
|
||||||
if(xmlTextWriterStartElement(writer, (xmlChar*)"start") < 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if(xmlTextWriterWriteFormatAttribute(writer, (xmlChar*)"x", "%f", start.getX()) < 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if(xmlTextWriterWriteFormatAttribute(writer, (xmlChar*)"y", "%f", start.getY()) < 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if(xmlTextWriterWriteFormatAttribute(writer, (xmlChar*)"z", "%f", start.getZ()) < 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
// </vertex>
|
|
||||||
if(xmlTextWriterEndElement(writer) < 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
FileManager::FileManager(Window *window) {
|
|
||||||
this->window = window;
|
|
||||||
|
|
||||||
filename = NULL;
|
|
||||||
dirty = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
FileManager::~FileManager() {
|
|
||||||
if(filename)
|
|
||||||
g_free(filename);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool FileManager::save(GtkWindow *parent) {
|
|
||||||
if(filename == NULL)
|
|
||||||
return saveAs(parent);
|
|
||||||
|
|
||||||
return write();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool FileManager::saveAs(GtkWindow *parent) {
|
|
||||||
GtkWidget *dialog = gtk_file_chooser_dialog_new(NULL, parent, GTK_FILE_CHOOSER_ACTION_SAVE,
|
|
||||||
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL);
|
|
||||||
|
|
||||||
gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(dialog), TRUE);
|
|
||||||
|
|
||||||
if(filename)
|
|
||||||
gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(dialog), filename);
|
|
||||||
else
|
|
||||||
gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(dialog), "level.lvl");
|
|
||||||
|
|
||||||
if(gtk_dialog_run(GTK_DIALOG(dialog)) != GTK_RESPONSE_ACCEPT) {
|
|
||||||
gtk_widget_destroy(dialog);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(filename)
|
|
||||||
g_free(filename);
|
|
||||||
|
|
||||||
filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
|
|
||||||
|
|
||||||
gtk_widget_destroy(dialog);
|
|
||||||
|
|
||||||
if(!filename)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return write();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool FileManager::write() {
|
|
||||||
xmlTextWriterPtr writer;
|
|
||||||
|
|
||||||
writer = xmlNewTextWriterFilename(filename, 9);
|
|
||||||
if(!writer)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if(xmlTextWriterStartDocument(writer, NULL, "UTF-8", NULL) < 0) {
|
|
||||||
xmlFreeTextWriter(writer);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(xmlTextWriterStartDTD(writer, (xmlChar*)"level", (xmlChar*)"-//libzoom//DTD level 0.1//EN", (xmlChar*)"level.dtd") < 0) {
|
|
||||||
xmlFreeTextWriter(writer);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(xmlTextWriterSetIndent(writer, 1) < 0) {
|
|
||||||
xmlFreeTextWriter(writer);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(xmlTextWriterSetIndentString(writer, (xmlChar*)" ") < 0) {
|
|
||||||
xmlFreeTextWriter(writer);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(xmlTextWriterEndDTD(writer) < 0) {
|
|
||||||
xmlFreeTextWriter(writer);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// <level>
|
|
||||||
if(xmlTextWriterStartElement(writer, (xmlChar*)"level") < 0) {
|
|
||||||
xmlFreeTextWriter(writer);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// <info>
|
|
||||||
if(xmlTextWriterStartElement(writer, (xmlChar*)"info") < 0) {
|
|
||||||
xmlFreeTextWriter(writer);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(xmlTextWriterWriteElement(writer, (xmlChar*)"name", (xmlChar*)"Level") < 0) {
|
|
||||||
xmlFreeTextWriter(writer);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(xmlTextWriterWriteElement(writer, (xmlChar*)"desc", (xmlChar*)"Description") < 0) {
|
|
||||||
xmlFreeTextWriter(writer);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
for(Level::iterator object = window->getLevel().begin(); ; object++) {
|
|
||||||
if(object == window->getLevel().end()) {
|
|
||||||
xmlFreeTextWriter(writer);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!(*object)->isOfType("PlayerStart"))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if(!writeStart(writer, *(PlayerStart*)&**object)) {
|
|
||||||
xmlFreeTextWriter(writer);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
// </info>
|
|
||||||
if(xmlTextWriterEndElement(writer) < 0) {
|
|
||||||
xmlFreeTextWriter(writer);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// <rooms>
|
|
||||||
if(xmlTextWriterStartElement(writer, (xmlChar*)"rooms") < 0) {
|
|
||||||
xmlFreeTextWriter(writer);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
for(Level::iterator object = window->getLevel().begin(); object != window->getLevel().end(); object++) {
|
|
||||||
if(!(*object)->isOfType("Room"))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
Room *room = (Room*)&**object;
|
|
||||||
|
|
||||||
// <room>
|
|
||||||
if(xmlTextWriterStartElement(writer, (xmlChar*)"room") < 0) {
|
|
||||||
xmlFreeTextWriter(writer);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(xmlTextWriterWriteAttribute(writer, (xmlChar*)"id", (xmlChar*)room->getName().c_str()) < 0) {
|
|
||||||
xmlFreeTextWriter(writer);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<Triangle> triangles;
|
|
||||||
room->getPolygon().triangulate(triangles);
|
|
||||||
|
|
||||||
for(std::vector<Triangle>::iterator triangle = triangles.begin(); triangle != triangles.end(); triangle++) {
|
|
||||||
if(!writeTriangle(writer, *triangle, room->getHeight())) {
|
|
||||||
xmlFreeTextWriter(writer);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<Vertex> vertices = room->getPolygon();
|
|
||||||
|
|
||||||
if(room->getPolygon().getDirection() == Triangle::CCW) {
|
|
||||||
vertices = std::vector<Vertex>(vertices.rbegin(), vertices.rend());
|
|
||||||
}
|
|
||||||
|
|
||||||
for(std::vector<Vertex>::iterator v1 = vertices.begin(); v1 != vertices.end(); v1++) {
|
|
||||||
std::vector<Vertex>::iterator v2 = v1+1;
|
|
||||||
if(v2 == vertices.end()) v2 = vertices.begin();
|
|
||||||
|
|
||||||
if(!writeSide(writer, *v1, *v2, room->getHeight())) {
|
|
||||||
xmlFreeTextWriter(writer);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// </room>
|
|
||||||
if(xmlTextWriterEndElement(writer) < 0) {
|
|
||||||
xmlFreeTextWriter(writer);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// </rooms>
|
|
||||||
if(xmlTextWriterEndElement(writer) < 0) {
|
|
||||||
xmlFreeTextWriter(writer);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// <gates>
|
|
||||||
if(xmlTextWriterStartElement(writer, (xmlChar*)"gates") < 0) {
|
|
||||||
xmlFreeTextWriter(writer);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// </gates>
|
|
||||||
if(xmlTextWriterEndElement(writer) < 0) {
|
|
||||||
xmlFreeTextWriter(writer);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// <textures>
|
|
||||||
if(xmlTextWriterStartElement(writer, (xmlChar*)"textures") < 0) {
|
|
||||||
xmlFreeTextWriter(writer);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// </textures>
|
|
||||||
if(xmlTextWriterEndElement(writer) < 0) {
|
|
||||||
xmlFreeTextWriter(writer);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// </level>
|
|
||||||
if(xmlTextWriterEndElement(writer) < 0) {
|
|
||||||
xmlFreeTextWriter(writer);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(xmlTextWriterEndDocument(writer) < 0) {
|
|
||||||
xmlFreeTextWriter(writer);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
xmlFreeTextWriter(writer);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
|
@ -1,41 +0,0 @@
|
||||||
#ifndef FILEMANAGER_H_
|
|
||||||
#define FILEMANAGER_H_
|
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
|
||||||
#include <libxml/xmlwriter.h>
|
|
||||||
#include "Triangle.h"
|
|
||||||
#include "Vertex3d.h"
|
|
||||||
|
|
||||||
|
|
||||||
class Window;
|
|
||||||
|
|
||||||
|
|
||||||
class FileManager
|
|
||||||
{
|
|
||||||
private:
|
|
||||||
Window *window;
|
|
||||||
|
|
||||||
gchar *filename;
|
|
||||||
bool dirty;
|
|
||||||
|
|
||||||
// prevent shallow copy
|
|
||||||
FileManager(const FileManager &f);
|
|
||||||
const FileManager& operator=(const FileManager &f);
|
|
||||||
|
|
||||||
bool writeTriangle(xmlTextWriterPtr writer, const Triangle &triangle, float height);
|
|
||||||
bool writeSide(xmlTextWriterPtr writer, const Vertex &v1, const Vertex &v2, float height);
|
|
||||||
bool writeVertex(xmlTextWriterPtr writer, float x, float y, float z);
|
|
||||||
bool writeTexCoords(xmlTextWriterPtr writer, float s, float t);
|
|
||||||
bool writeStart(xmlTextWriterPtr writer, const Vertex3d &start);
|
|
||||||
|
|
||||||
public:
|
|
||||||
FileManager(Window *window);
|
|
||||||
virtual ~FileManager();
|
|
||||||
|
|
||||||
bool save(GtkWindow *parent);
|
|
||||||
bool saveAs(GtkWindow *parent);
|
|
||||||
|
|
||||||
bool write();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*FILEMANAGER_H_*/
|
|
4
Gui/Makefile.am
Normal file
4
Gui/Makefile.am
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
noinst_LTLIBRARIES = libgui.la
|
||||||
|
|
||||||
|
libgui_la_SOURCES = Window.cpp
|
||||||
|
libgui_la_CPPFLAGS = $(glademm_CFLAGS) $(GTKGLEXT_CFLAGS)
|
445
Gui/Makefile.in
Normal file
445
Gui/Makefile.in
Normal file
|
@ -0,0 +1,445 @@
|
||||||
|
# Makefile.in generated by automake 1.10 from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
|
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||||
|
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||||
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
@SET_MAKE@
|
||||||
|
|
||||||
|
VPATH = @srcdir@
|
||||||
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
|
install_sh_DATA = $(install_sh) -c -m 644
|
||||||
|
install_sh_PROGRAM = $(install_sh) -c
|
||||||
|
install_sh_SCRIPT = $(install_sh) -c
|
||||||
|
INSTALL_HEADER = $(INSTALL_DATA)
|
||||||
|
transform = $(program_transform_name)
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
build_triplet = @build@
|
||||||
|
host_triplet = @host@
|
||||||
|
subdir = Gui
|
||||||
|
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
|
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||||
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
|
$(ACLOCAL_M4)
|
||||||
|
mkinstalldirs = $(install_sh) -d
|
||||||
|
CONFIG_HEADER = $(top_builddir)/config.h
|
||||||
|
CONFIG_CLEAN_FILES =
|
||||||
|
LTLIBRARIES = $(noinst_LTLIBRARIES)
|
||||||
|
libgui_la_LIBADD =
|
||||||
|
am_libgui_la_OBJECTS = libgui_la-Window.lo
|
||||||
|
libgui_la_OBJECTS = $(am_libgui_la_OBJECTS)
|
||||||
|
DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
|
||||||
|
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||||
|
am__depfiles_maybe = depfiles
|
||||||
|
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||||
|
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||||
|
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||||
|
--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||||
|
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||||
|
CXXLD = $(CXX)
|
||||||
|
CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||||
|
--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
|
||||||
|
$(LDFLAGS) -o $@
|
||||||
|
SOURCES = $(libgui_la_SOURCES)
|
||||||
|
DIST_SOURCES = $(libgui_la_SOURCES)
|
||||||
|
ETAGS = etags
|
||||||
|
CTAGS = ctags
|
||||||
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
AMTAR = @AMTAR@
|
||||||
|
AR = @AR@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AWK = @AWK@
|
||||||
|
CC = @CC@
|
||||||
|
CCDEPMODE = @CCDEPMODE@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CXX = @CXX@
|
||||||
|
CXXCPP = @CXXCPP@
|
||||||
|
CXXDEPMODE = @CXXDEPMODE@
|
||||||
|
CXXFLAGS = @CXXFLAGS@
|
||||||
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DEFS = @DEFS@
|
||||||
|
DEPDIR = @DEPDIR@
|
||||||
|
ECHO = @ECHO@
|
||||||
|
ECHO_C = @ECHO_C@
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_T = @ECHO_T@
|
||||||
|
EGREP = @EGREP@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
F77 = @F77@
|
||||||
|
FFLAGS = @FFLAGS@
|
||||||
|
GREP = @GREP@
|
||||||
|
GTKGLEXT_CFLAGS = @GTKGLEXT_CFLAGS@
|
||||||
|
GTKGLEXT_LIBS = @GTKGLEXT_LIBS@
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LIBOBJS = @LIBOBJS@
|
||||||
|
LIBS = @LIBS@
|
||||||
|
LIBTOOL = @LIBTOOL@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
MAINT = @MAINT@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
MKDIR_P = @MKDIR_P@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_STRING = @PACKAGE_STRING@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
PKG_CONFIG = @PKG_CONFIG@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
SED = @SED@
|
||||||
|
SET_MAKE = @SET_MAKE@
|
||||||
|
SHELL = @SHELL@
|
||||||
|
STRIP = @STRIP@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
abs_builddir = @abs_builddir@
|
||||||
|
abs_srcdir = @abs_srcdir@
|
||||||
|
abs_top_builddir = @abs_top_builddir@
|
||||||
|
abs_top_srcdir = @abs_top_srcdir@
|
||||||
|
ac_ct_CC = @ac_ct_CC@
|
||||||
|
ac_ct_CXX = @ac_ct_CXX@
|
||||||
|
ac_ct_F77 = @ac_ct_F77@
|
||||||
|
am__include = @am__include@
|
||||||
|
am__leading_dot = @am__leading_dot@
|
||||||
|
am__quote = @am__quote@
|
||||||
|
am__tar = @am__tar@
|
||||||
|
am__untar = @am__untar@
|
||||||
|
bindir = @bindir@
|
||||||
|
build = @build@
|
||||||
|
build_alias = @build_alias@
|
||||||
|
build_cpu = @build_cpu@
|
||||||
|
build_os = @build_os@
|
||||||
|
build_vendor = @build_vendor@
|
||||||
|
builddir = @builddir@
|
||||||
|
datadir = @datadir@
|
||||||
|
datarootdir = @datarootdir@
|
||||||
|
docdir = @docdir@
|
||||||
|
dvidir = @dvidir@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
glademm_CFLAGS = @glademm_CFLAGS@
|
||||||
|
glademm_LIBS = @glademm_LIBS@
|
||||||
|
host = @host@
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_cpu = @host_cpu@
|
||||||
|
host_os = @host_os@
|
||||||
|
host_vendor = @host_vendor@
|
||||||
|
htmldir = @htmldir@
|
||||||
|
includedir = @includedir@
|
||||||
|
infodir = @infodir@
|
||||||
|
install_sh = @install_sh@
|
||||||
|
libdir = @libdir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
localedir = @localedir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
mandir = @mandir@
|
||||||
|
mkdir_p = @mkdir_p@
|
||||||
|
oldincludedir = @oldincludedir@
|
||||||
|
pdfdir = @pdfdir@
|
||||||
|
prefix = @prefix@
|
||||||
|
program_transform_name = @program_transform_name@
|
||||||
|
psdir = @psdir@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
target_alias = @target_alias@
|
||||||
|
top_builddir = @top_builddir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
noinst_LTLIBRARIES = libgui.la
|
||||||
|
libgui_la_SOURCES = Window.cpp
|
||||||
|
libgui_la_CPPFLAGS = $(glademm_CFLAGS) $(GTKGLEXT_CFLAGS)
|
||||||
|
all: all-am
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
.SUFFIXES: .cpp .lo .o .obj
|
||||||
|
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
|
@for dep in $?; do \
|
||||||
|
case '$(am__configure_deps)' in \
|
||||||
|
*$$dep*) \
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||||
|
&& exit 0; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Gui/Makefile'; \
|
||||||
|
cd $(top_srcdir) && \
|
||||||
|
$(AUTOMAKE) --gnu Gui/Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
|
@case '$?' in \
|
||||||
|
*config.status*) \
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||||
|
*) \
|
||||||
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||||
|
esac;
|
||||||
|
|
||||||
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
|
||||||
|
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
|
||||||
|
clean-noinstLTLIBRARIES:
|
||||||
|
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
|
||||||
|
@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
|
||||||
|
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
|
||||||
|
test "$$dir" != "$$p" || dir=.; \
|
||||||
|
echo "rm -f \"$${dir}/so_locations\""; \
|
||||||
|
rm -f "$${dir}/so_locations"; \
|
||||||
|
done
|
||||||
|
libgui.la: $(libgui_la_OBJECTS) $(libgui_la_DEPENDENCIES)
|
||||||
|
$(CXXLINK) $(libgui_la_OBJECTS) $(libgui_la_LIBADD) $(LIBS)
|
||||||
|
|
||||||
|
mostlyclean-compile:
|
||||||
|
-rm -f *.$(OBJEXT)
|
||||||
|
|
||||||
|
distclean-compile:
|
||||||
|
-rm -f *.tab.c
|
||||||
|
|
||||||
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgui_la-Window.Plo@am__quote@
|
||||||
|
|
||||||
|
.cpp.o:
|
||||||
|
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||||
|
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||||
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||||
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
|
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
|
||||||
|
|
||||||
|
.cpp.obj:
|
||||||
|
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||||
|
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||||
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||||
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
|
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||||
|
|
||||||
|
.cpp.lo:
|
||||||
|
@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||||
|
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||||
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||||
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
|
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
|
||||||
|
|
||||||
|
libgui_la-Window.lo: Window.cpp
|
||||||
|
@am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgui_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libgui_la-Window.lo -MD -MP -MF $(DEPDIR)/libgui_la-Window.Tpo -c -o libgui_la-Window.lo `test -f 'Window.cpp' || echo '$(srcdir)/'`Window.cpp
|
||||||
|
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/libgui_la-Window.Tpo $(DEPDIR)/libgui_la-Window.Plo
|
||||||
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Window.cpp' object='libgui_la-Window.lo' libtool=yes @AMDEPBACKSLASH@
|
||||||
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
|
@am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libgui_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libgui_la-Window.lo `test -f 'Window.cpp' || echo '$(srcdir)/'`Window.cpp
|
||||||
|
|
||||||
|
mostlyclean-libtool:
|
||||||
|
-rm -f *.lo
|
||||||
|
|
||||||
|
clean-libtool:
|
||||||
|
-rm -rf .libs _libs
|
||||||
|
|
||||||
|
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||||
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | \
|
||||||
|
$(AWK) ' { files[$$0] = 1; } \
|
||||||
|
END { for (i in files) print i; }'`; \
|
||||||
|
mkid -fID $$unique
|
||||||
|
tags: TAGS
|
||||||
|
|
||||||
|
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||||
|
$(TAGS_FILES) $(LISP)
|
||||||
|
tags=; \
|
||||||
|
here=`pwd`; \
|
||||||
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | \
|
||||||
|
$(AWK) ' { files[$$0] = 1; } \
|
||||||
|
END { for (i in files) print i; }'`; \
|
||||||
|
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||||
|
test -n "$$unique" || unique=$$empty_fix; \
|
||||||
|
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||||
|
$$tags $$unique; \
|
||||||
|
fi
|
||||||
|
ctags: CTAGS
|
||||||
|
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||||
|
$(TAGS_FILES) $(LISP)
|
||||||
|
tags=; \
|
||||||
|
here=`pwd`; \
|
||||||
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||||
|
unique=`for i in $$list; do \
|
||||||
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
done | \
|
||||||
|
$(AWK) ' { files[$$0] = 1; } \
|
||||||
|
END { for (i in files) print i; }'`; \
|
||||||
|
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||||
|
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||||
|
$$tags $$unique
|
||||||
|
|
||||||
|
GTAGS:
|
||||||
|
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||||
|
&& cd $(top_srcdir) \
|
||||||
|
&& gtags -i $(GTAGS_ARGS) $$here
|
||||||
|
|
||||||
|
distclean-tags:
|
||||||
|
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||||
|
|
||||||
|
distdir: $(DISTFILES)
|
||||||
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
list='$(DISTFILES)'; \
|
||||||
|
dist_files=`for file in $$list; do echo $$file; done | \
|
||||||
|
sed -e "s|^$$srcdirstrip/||;t" \
|
||||||
|
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||||
|
case $$dist_files in \
|
||||||
|
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||||
|
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||||
|
sort -u` ;; \
|
||||||
|
esac; \
|
||||||
|
for file in $$dist_files; do \
|
||||||
|
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||||
|
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||||
|
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||||
|
fi; \
|
||||||
|
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||||
|
else \
|
||||||
|
test -f $(distdir)/$$file \
|
||||||
|
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
check-am: all-am
|
||||||
|
check: check-am
|
||||||
|
all-am: Makefile $(LTLIBRARIES)
|
||||||
|
installdirs:
|
||||||
|
install: install-am
|
||||||
|
install-exec: install-exec-am
|
||||||
|
install-data: install-data-am
|
||||||
|
uninstall: uninstall-am
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
|
||||||
|
installcheck: installcheck-am
|
||||||
|
install-strip:
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
`test -z '$(STRIP)' || \
|
||||||
|
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||||
|
mostlyclean-generic:
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
@echo "This command is intended for maintainers to use"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
clean: clean-am
|
||||||
|
|
||||||
|
clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
|
||||||
|
mostlyclean-am
|
||||||
|
|
||||||
|
distclean: distclean-am
|
||||||
|
-rm -rf ./$(DEPDIR)
|
||||||
|
-rm -f Makefile
|
||||||
|
distclean-am: clean-am distclean-compile distclean-generic \
|
||||||
|
distclean-tags
|
||||||
|
|
||||||
|
dvi: dvi-am
|
||||||
|
|
||||||
|
dvi-am:
|
||||||
|
|
||||||
|
html: html-am
|
||||||
|
|
||||||
|
info: info-am
|
||||||
|
|
||||||
|
info-am:
|
||||||
|
|
||||||
|
install-data-am:
|
||||||
|
|
||||||
|
install-dvi: install-dvi-am
|
||||||
|
|
||||||
|
install-exec-am:
|
||||||
|
|
||||||
|
install-html: install-html-am
|
||||||
|
|
||||||
|
install-info: install-info-am
|
||||||
|
|
||||||
|
install-man:
|
||||||
|
|
||||||
|
install-pdf: install-pdf-am
|
||||||
|
|
||||||
|
install-ps: install-ps-am
|
||||||
|
|
||||||
|
installcheck-am:
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-am
|
||||||
|
-rm -rf ./$(DEPDIR)
|
||||||
|
-rm -f Makefile
|
||||||
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-am
|
||||||
|
|
||||||
|
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||||
|
mostlyclean-libtool
|
||||||
|
|
||||||
|
pdf: pdf-am
|
||||||
|
|
||||||
|
pdf-am:
|
||||||
|
|
||||||
|
ps: ps-am
|
||||||
|
|
||||||
|
ps-am:
|
||||||
|
|
||||||
|
uninstall-am:
|
||||||
|
|
||||||
|
.MAKE: install-am install-strip
|
||||||
|
|
||||||
|
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||||
|
clean-libtool clean-noinstLTLIBRARIES ctags distclean \
|
||||||
|
distclean-compile distclean-generic distclean-libtool \
|
||||||
|
distclean-tags distdir dvi dvi-am html html-am info info-am \
|
||||||
|
install install-am install-data install-data-am install-dvi \
|
||||||
|
install-dvi-am install-exec install-exec-am install-html \
|
||||||
|
install-html-am install-info install-info-am install-man \
|
||||||
|
install-pdf install-pdf-am install-ps install-ps-am \
|
||||||
|
install-strip installcheck installcheck-am installdirs \
|
||||||
|
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||||
|
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||||
|
pdf pdf-am ps ps-am tags uninstall uninstall-am
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
15
Gui/Window.cpp
Normal file
15
Gui/Window.cpp
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
#include "Window.h"
|
||||||
|
|
||||||
|
namespace ZoomEdit {
|
||||||
|
namespace Gui {
|
||||||
|
|
||||||
|
Window::Window(BaseObjectType *cobject, const Glib::RefPtr<Gnome::Glade::Xml> &xml)
|
||||||
|
: Gtk::Window(cobject) {
|
||||||
|
xml->connect_clicked("MenuItemQuit", sigc::mem_fun(this, &Window::hide));
|
||||||
|
}
|
||||||
|
|
||||||
|
Window::~Window() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
19
Gui/Window.h
Normal file
19
Gui/Window.h
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
#ifndef ZOOMEDIT_GUI_WINDOW_H_
|
||||||
|
#define ZOOMEDIT_GUI_WINDOW_H_
|
||||||
|
|
||||||
|
#include <gtkmm/window.h>
|
||||||
|
#include <libglademm/xml.h>
|
||||||
|
|
||||||
|
namespace ZoomEdit {
|
||||||
|
namespace Gui {
|
||||||
|
|
||||||
|
class Window : public Gtk::Window {
|
||||||
|
public:
|
||||||
|
Window(BaseObjectType *cobject, const Glib::RefPtr<Gnome::Glade::Xml> &xml);
|
||||||
|
virtual ~Window();
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /*WINDOW_H_*/
|
|
@ -1,63 +0,0 @@
|
||||||
#include "IdManager.h"
|
|
||||||
|
|
||||||
#include <sstream>
|
|
||||||
|
|
||||||
|
|
||||||
bool IdManager::add(const std::string &id) {
|
|
||||||
if(!valid(id)) return false;
|
|
||||||
|
|
||||||
return usedIds.insert(id).second;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IdManager::remove(const std::string &id) {
|
|
||||||
return (usedIds.erase(id) > 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IdManager::isValid(const std::string &id) const {
|
|
||||||
if(id.empty()) return false;
|
|
||||||
if(id[0] >= '0' && id[0] <= '9') return false;
|
|
||||||
if(id.size() >= 3) {
|
|
||||||
if(std::tolower(id[0]) == 'x' && std::tolower(id[1]) == 'm' && std::tolower(id[2]) == 'l')
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
for(std::string::const_iterator c = id.begin(); c != id.end(); c++) {
|
|
||||||
if(!(*c >= '0' && *c <= '9') && !(*c >= 'A' && *c <= 'Z') && !(*c >= 'a' && *c <= 'z')
|
|
||||||
&& *c != '_' && *c != '-' && *c != '.')
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IdManager::unique(const std::string &id) const {
|
|
||||||
return (usedIds.find(id) == usedIds.end());
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IdManager::valid(const std::string &id) const {
|
|
||||||
return isValid(id) && unique(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string IdManager::generate(const std::string &prefix) {
|
|
||||||
if(!isValid(prefix)) return std::string();
|
|
||||||
|
|
||||||
unsigned long n = 0;
|
|
||||||
|
|
||||||
std::map<std::string, unsigned long>::iterator it = prefixMap.find(prefix);
|
|
||||||
if(it != prefixMap.end()) {
|
|
||||||
n = it->second + 1;
|
|
||||||
prefixMap.erase(it);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::ostringstream id;
|
|
||||||
|
|
||||||
do {
|
|
||||||
id.str(std::string());
|
|
||||||
id << prefix << n++;
|
|
||||||
} while(!unique(id.str()));
|
|
||||||
|
|
||||||
prefixMap.insert(std::make_pair<std::string, unsigned long>(prefix, n-1));
|
|
||||||
usedIds.insert(id.str());
|
|
||||||
|
|
||||||
return id.str();
|
|
||||||
}
|
|
26
IdManager.h
26
IdManager.h
|
@ -1,26 +0,0 @@
|
||||||
#ifndef IDMANAGER_H_
|
|
||||||
#define IDMANAGER_H_
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <set>
|
|
||||||
#include <map>
|
|
||||||
|
|
||||||
|
|
||||||
class IdManager {
|
|
||||||
private:
|
|
||||||
std::set<std::string> usedIds;
|
|
||||||
std::map<std::string, unsigned long> prefixMap;
|
|
||||||
|
|
||||||
bool isValid(const std::string &id) const;
|
|
||||||
bool unique(const std::string &id) const;
|
|
||||||
|
|
||||||
public:
|
|
||||||
bool add(const std::string &id);
|
|
||||||
bool remove(const std::string &id);
|
|
||||||
|
|
||||||
bool valid(const std::string &id) const;
|
|
||||||
|
|
||||||
std::string generate(const std::string &prefix);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*IDMANAGER_H_*/
|
|
66
Instance.cpp
Normal file
66
Instance.cpp
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
#include <iostream>
|
||||||
|
#include "Instance.h"
|
||||||
|
|
||||||
|
namespace ZoomEdit {
|
||||||
|
|
||||||
|
guint Instance::instances = 0;
|
||||||
|
|
||||||
|
Instance::Instance() : window(NULL) {
|
||||||
|
instances++;
|
||||||
|
|
||||||
|
#ifdef GLIBMM_EXCEPTIONS_ENABLED
|
||||||
|
try
|
||||||
|
{
|
||||||
|
xml = Gnome::Glade::Xml::create("zoomedit.glade");
|
||||||
|
}
|
||||||
|
catch(const Gnome::Glade::XmlError& ex)
|
||||||
|
{
|
||||||
|
std::cerr << ex.what() << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
std::auto_ptr<Gnome::Glade::XmlError> error;
|
||||||
|
xml = Gnome::Glade::Xml::create("zoomedit.glade", "", "", error);
|
||||||
|
if(error.get())
|
||||||
|
{
|
||||||
|
std::cerr << error->what() << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
xml->get_widget_derived("WindowMain", window);
|
||||||
|
if(!window) {
|
||||||
|
xml.clear();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
window->signal_hide().connect(sigc::mem_fun(this, &Instance::destroy));
|
||||||
|
|
||||||
|
window->show();
|
||||||
|
}
|
||||||
|
|
||||||
|
Instance::~Instance() {
|
||||||
|
if(window)
|
||||||
|
delete window;
|
||||||
|
|
||||||
|
instances--;
|
||||||
|
if(!instances)
|
||||||
|
Gtk::Main::quit();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Instance::create() {
|
||||||
|
Instance *instance = new Instance();
|
||||||
|
|
||||||
|
if(!instance->xml) {
|
||||||
|
delete instance;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Instance::destroy() {
|
||||||
|
delete this;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
29
Instance.h
Normal file
29
Instance.h
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
#ifndef ZOOMEDIT_INSTANCE_H_
|
||||||
|
#define ZOOMEDIT_INSTANCE_H_
|
||||||
|
|
||||||
|
#include <gtkmm/main.h>
|
||||||
|
#include <libglademm/xml.h>
|
||||||
|
#include "Gui/Window.h"
|
||||||
|
|
||||||
|
namespace ZoomEdit {
|
||||||
|
|
||||||
|
class Instance {
|
||||||
|
public:
|
||||||
|
virtual ~Instance();
|
||||||
|
|
||||||
|
static bool create();
|
||||||
|
|
||||||
|
private:
|
||||||
|
static guint instances;
|
||||||
|
|
||||||
|
Glib::RefPtr<Gnome::Glade::Xml> xml;
|
||||||
|
Gui::Window *window;
|
||||||
|
|
||||||
|
Instance();
|
||||||
|
|
||||||
|
void destroy();
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /*ZOOMEDIT_INSTANCE_H_*/
|
29
Level.h
29
Level.h
|
@ -1,29 +0,0 @@
|
||||||
#ifndef LEVEL_H_
|
|
||||||
#define LEVEL_H_
|
|
||||||
|
|
||||||
|
|
||||||
#include "LevelObject.h"
|
|
||||||
#include "SharedPtr.h"
|
|
||||||
#include "PlayerStart.h"
|
|
||||||
#include "Portal.h"
|
|
||||||
#include "LevelVertex.h"
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
class Level : public std::vector<SharedPtr<LevelObject> > {
|
|
||||||
public:
|
|
||||||
Level() {
|
|
||||||
addWithChildren(SharedPtr<LevelObject>(new PlayerStart()));
|
|
||||||
addWithChildren(SharedPtr<LevelObject>(new Portal(2, 2, 0.4f)));
|
|
||||||
}
|
|
||||||
|
|
||||||
void addWithChildren(SharedPtr<LevelObject> object) {
|
|
||||||
push_back(object);
|
|
||||||
|
|
||||||
std::vector<SharedPtr<LevelObject> > children = object->getChildren();
|
|
||||||
|
|
||||||
for(std::vector<SharedPtr<LevelObject> >::iterator child = children.begin(); child != children.end(); child++)
|
|
||||||
addWithChildren(*child);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*LEVEL_H_*/
|
|
74
LevelEdge.h
74
LevelEdge.h
|
@ -1,74 +0,0 @@
|
||||||
#ifndef LEVELEDGE_H_
|
|
||||||
#define LEVELEDGE_H_
|
|
||||||
|
|
||||||
#include "LevelObject.h"
|
|
||||||
#include "EdgeProvider.h"
|
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
|
|
||||||
class LevelEdge : public LevelObject {
|
|
||||||
private:
|
|
||||||
EdgeProvider *provider;
|
|
||||||
size_t id;
|
|
||||||
|
|
||||||
static const float width = 1;
|
|
||||||
|
|
||||||
public:
|
|
||||||
LevelEdge(EdgeProvider *p, size_t i, LevelObject *parent)
|
|
||||||
: LevelObject(parent), provider(p), id(i) {}
|
|
||||||
|
|
||||||
virtual bool hit(const Vertex &v, float scale) const {
|
|
||||||
const Edge &edge = **this;
|
|
||||||
const Vertex &v1 = *edge.getVertex1(), &v2 = *edge.getVertex2();
|
|
||||||
|
|
||||||
float width = this->width/scale;
|
|
||||||
|
|
||||||
if(v.getX() < fminf(v1.getX(), v2.getX())-width)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if(v.getX() > fmaxf(v1.getX(), v2.getX())+width)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if(v.getY() < fminf(v1.getY(), v2.getY())-width)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if(v.getY() > fmaxf(v1.getY(), v2.getY())+width)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
Vertex r = v2 - v1, p = v - v1;
|
|
||||||
r *= (r.getX()*p.getX() + r.getY()*p.getY())/v1.distanceSq(v2);
|
|
||||||
|
|
||||||
return (r.distanceSq(p) <= width*width);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual int getPriority() const {return 500;}
|
|
||||||
|
|
||||||
virtual const char* getType() const {
|
|
||||||
return "LevelEdge";
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool canMove() const {return true;}
|
|
||||||
|
|
||||||
virtual void move(float x, float y) {
|
|
||||||
provider->moveEdge(id, x, y);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool canRotate() const {return true;}
|
|
||||||
|
|
||||||
virtual void rotate(Vertex m, float a) {
|
|
||||||
provider->rotateEdge(id, m, a);
|
|
||||||
}
|
|
||||||
|
|
||||||
const EdgeProvider* getProvider() const {
|
|
||||||
return provider;
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t getId() const {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
const Edge* operator->() const {return provider->getEdge(id);}
|
|
||||||
const Edge& operator*() const {return *provider->getEdge(id);}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*LEVELEDGE_H_*/
|
|
|
@ -1,35 +0,0 @@
|
||||||
#ifndef LEVELOBJECT_H_
|
|
||||||
#define LEVELOBJECT_H_
|
|
||||||
|
|
||||||
#include "Object.h"
|
|
||||||
#include "Vertex.h"
|
|
||||||
#include <list>
|
|
||||||
|
|
||||||
|
|
||||||
class LevelObject : public Object {
|
|
||||||
private:
|
|
||||||
LevelObject *parent;
|
|
||||||
|
|
||||||
public:
|
|
||||||
LevelObject(LevelObject *p = NULL) : parent(p) {}
|
|
||||||
virtual ~LevelObject() {}
|
|
||||||
|
|
||||||
LevelObject* getParent() const {
|
|
||||||
return parent;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual std::vector<SharedPtr<LevelObject> > getChildren() {
|
|
||||||
return std::vector<SharedPtr<LevelObject> >();
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool hit(const Vertex &v) const {return false;}
|
|
||||||
virtual bool hit(const Vertex &v, float scale) const {return hit(v);};
|
|
||||||
virtual int getPriority() const {return 0;}
|
|
||||||
|
|
||||||
virtual bool canMove() const {return false;}
|
|
||||||
virtual void move(float x, float y) {}
|
|
||||||
virtual bool canRotate() const {return false;}
|
|
||||||
virtual void rotate(Vertex m, float a) {}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*LEVELOBJECT_H_*/
|
|
|
@ -1,56 +0,0 @@
|
||||||
#ifndef LEVELVERTEX_H_
|
|
||||||
#define LEVELVERTEX_H_
|
|
||||||
|
|
||||||
#include "LevelObject.h"
|
|
||||||
#include "VertexProvider.h"
|
|
||||||
|
|
||||||
|
|
||||||
class LevelVertex : public LevelObject {
|
|
||||||
private:
|
|
||||||
VertexProvider *provider;
|
|
||||||
size_t id;
|
|
||||||
|
|
||||||
public:
|
|
||||||
LevelVertex(VertexProvider *p, size_t i, LevelObject *parent)
|
|
||||||
: LevelObject(parent), provider(p), id(i) {}
|
|
||||||
|
|
||||||
virtual const char* getType() const {
|
|
||||||
return "LevelVertex";
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool hit(const Vertex &v, float scale) const {
|
|
||||||
return (provider->getVertex(id)->distanceSq(v) < (3.5f*3.5f)/(scale*scale));
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual int getPriority() const {
|
|
||||||
return 1000;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool canMove() const {return true;}
|
|
||||||
|
|
||||||
virtual void move(float x, float y) {
|
|
||||||
provider->moveVertex(id, x, y);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool canRotate() const {return true;}
|
|
||||||
|
|
||||||
virtual void rotate(Vertex m, float a) {
|
|
||||||
provider->rotateVertex(id, m, a);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool canConnect() const {return provider->canConnectVertex(id);}
|
|
||||||
virtual size_t connect() {return provider->connectVertex(id);}
|
|
||||||
|
|
||||||
VertexProvider* getProvider() const {
|
|
||||||
return provider;
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t getId() const {
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
const Vertex* operator->() const {return provider->getVertex(id);}
|
|
||||||
const Vertex& operator*() const {return *provider->getVertex(id);}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*LEVELVERTEX_H_*/
|
|
104
Line.cpp
104
Line.cpp
|
@ -1,104 +0,0 @@
|
||||||
#include "Line.h"
|
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
|
|
||||||
bool Line::contains(const Vertex &v) const {
|
|
||||||
if(fabsf(v1.getX() - v2.getX()) < 1E-6 && fabsf(v1.getY() - v2.getY()) < 1E-6) {
|
|
||||||
if(fabsf(v1.getX() - v.getX()) < 1E-6 && fabsf(v1.getY() - v.getY()) < 1E-6)
|
|
||||||
return true;
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(fabsf(v1.getX() - v2.getX()) < 1E-6) {
|
|
||||||
if(fabsf(v1.getX() - v.getX()) >= 1E-6)
|
|
||||||
return false;
|
|
||||||
else if(v.getY() - fminf(v1.getY(), v2.getY()) > -1E-6 && v.getY() - fmaxf(v1.getY(), v2.getY()) < 1E-6)
|
|
||||||
return true;
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(fabsf(v1.getY() - v2.getY()) < 1E-6) {
|
|
||||||
if(fabsf(v1.getY() - v.getY()) >= 1E-6)
|
|
||||||
return false;
|
|
||||||
else if(v.getX() - fminf(v1.getX(), v2.getX()) > -1E-6 && v.getX() - fmaxf(v1.getX(), v2.getX()) < 1E-6)
|
|
||||||
return true;
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if(fabsf((v.getX()-v1.getX())/(v2.getX()-v1.getX()) - (v.getY()-v1.getY())/(v2.getY()-v1.getY())) < 1E-6)
|
|
||||||
return true;
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
int Line::intersects(const Line &l, Vertex *v) const {
|
|
||||||
float xa1 = v1.getX(), ya1 = v1.getY();
|
|
||||||
float xa2 = v2.getX(), ya2 = v2.getY();
|
|
||||||
float xb1 = l.v1.getX(), yb1 = l.v1.getY();
|
|
||||||
float xb2 = l.v2.getX(), yb2 = l.v2.getY();
|
|
||||||
float temp;
|
|
||||||
bool switched = false;
|
|
||||||
Vertex v2;
|
|
||||||
|
|
||||||
|
|
||||||
if(!v) v = &v2;
|
|
||||||
|
|
||||||
if(fabsf(xa1 - xa2) < 1E-6 && fabsf(ya1 - ya2) < 1E-6) return INTERSECTION_ERROR;
|
|
||||||
if(fabsf(xb1 - xb2) < 1E-6 && fabsf(yb1 - yb2) < 1E-6) return INTERSECTION_ERROR;
|
|
||||||
|
|
||||||
if(fabsf(xa1 - xa2) < 1E-6 || fabsf(xb1 - xb2) < 1E-6) {
|
|
||||||
temp = xa1; xa1 = ya1; ya1 = temp;
|
|
||||||
temp = xa2; xa2 = ya2; ya2 = temp;
|
|
||||||
temp = xb1; xb1 = yb1; yb1 = temp;
|
|
||||||
temp = xb2; xb2 = yb2; yb2 = temp;
|
|
||||||
|
|
||||||
switched = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(fabsf(xa1 - xa2) < 1E-6 && fabsf(xb1 - xb2) < 1E-6)
|
|
||||||
return (fabsf(xa1 - xb1) < 1E-6) ? INTERSECTION_IDENTICAL : INTERSECTION_NONE;
|
|
||||||
|
|
||||||
if(fabsf(xa1 - xa2) < 1E-6) {
|
|
||||||
v->setX(xa1);
|
|
||||||
v->setY(yb1);
|
|
||||||
}
|
|
||||||
else if(fabsf(xb1 - xb2) < 1E-6) {
|
|
||||||
v->setX(xb1);
|
|
||||||
v->setY(ya1);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
float ma = (ya2-ya1)/(xa2-xa1);
|
|
||||||
float mb = (yb2-yb1)/(xb2-xb1);
|
|
||||||
float ba = ya1 - ma*xa1;
|
|
||||||
float bb = yb1 - mb*xb1;
|
|
||||||
|
|
||||||
if(fabsf(ma - mb) < 1E-6) return (fabsf(ba - bb) < 1E-6) ? INTERSECTION_IDENTICAL : INTERSECTION_NONE;
|
|
||||||
|
|
||||||
v->setX((bb-ba)/(ma-mb));
|
|
||||||
v->setY(ma*v->getX() + ba);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(switched) {
|
|
||||||
temp = v->getX(); v->setX(v->getY()); v->setY(temp);
|
|
||||||
|
|
||||||
//switch back everything for segment tests
|
|
||||||
temp = xa1; xa1 = ya1; ya1 = temp;
|
|
||||||
temp = xa2; xa2 = ya2; ya2 = temp;
|
|
||||||
temp = xb1; xb1 = yb1; yb1 = temp;
|
|
||||||
temp = xb2; xb2 = yb2; yb2 = temp;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(v->getX() < fminf(xa1,xa2) || v->getX() > fmaxf(xa1, xa2) || v->getY() < fminf(ya1,ya2) || v->getY() > fmaxf(ya1, ya2)) {
|
|
||||||
if(v->getX() < fminf(xb1,xb2) || v->getX() > fmaxf(xb1, xb2) || v->getY() < fminf(yb1,yb2) || v->getY() > fmaxf(yb1, yb2))
|
|
||||||
return INTERSECTION_LINE_LINE;
|
|
||||||
else
|
|
||||||
return INTERSECTION_LINE_SEGMENT;
|
|
||||||
}
|
|
||||||
else if(v->getX() < fminf(xb1,xb2) || v->getX() > fmaxf(xb1, xb2) || v->getY() < fminf(yb1,yb2) || v->getY() > fmaxf(yb1, yb2))
|
|
||||||
return INTERSECTION_SEGMENT_LINE;
|
|
||||||
else
|
|
||||||
return INTERSECTION_SEGMENT_SEGMENT;
|
|
||||||
}
|
|
||||||
|
|
44
Line.h
44
Line.h
|
@ -1,44 +0,0 @@
|
||||||
#ifndef LINE_H_
|
|
||||||
#define LINE_H_
|
|
||||||
|
|
||||||
#include "Vertex.h"
|
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
|
|
||||||
#define INTERSECTION_ERROR -1
|
|
||||||
#define INTERSECTION_NONE 0
|
|
||||||
#define INTERSECTION_IDENTICAL 1
|
|
||||||
#define INTERSECTION_LINE 2
|
|
||||||
#define INTERSECTION_LINE_LINE 2
|
|
||||||
#define INTERSECTION_LINE_SEGMENT 3
|
|
||||||
#define INTERSECTION_SEGMENT_LINE 6
|
|
||||||
#define INTERSECTION_SEGMENT_SEGMENT 7
|
|
||||||
|
|
||||||
class Line {
|
|
||||||
private:
|
|
||||||
Vertex v1, v2;
|
|
||||||
public:
|
|
||||||
Line() {}
|
|
||||||
Line(const Vertex& vertex1, const Vertex& vertex2) :
|
|
||||||
v1(vertex1), v2(vertex2) {}
|
|
||||||
Line(float x1, float y1, float x2, float y2) :
|
|
||||||
v1(x1, y1), v2(x2, y2) {}
|
|
||||||
|
|
||||||
Vertex &getVertex1() {return v1;}
|
|
||||||
const Vertex &getVertex1() const {return v1;}
|
|
||||||
void setVertex1(const Vertex &v) {v1 = v;}
|
|
||||||
|
|
||||||
Vertex &getVertex2() {return v2;}
|
|
||||||
const Vertex &getVertex2() const {return v2;}
|
|
||||||
void setVertex2(const Vertex &v) {v2 = v;}
|
|
||||||
|
|
||||||
float lengthSq() const {return v1.distanceSq(v2);}
|
|
||||||
float length() const {return sqrtf(lengthSq());}
|
|
||||||
|
|
||||||
bool contains(const Vertex &v) const;
|
|
||||||
|
|
||||||
int intersects(const Line &l, Vertex *v) const;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif /*LINE_H_*/
|
|
14
Makefile.am
14
Makefile.am
|
@ -1,10 +1,6 @@
|
||||||
|
SUBDIRS = Gui
|
||||||
|
|
||||||
bin_PROGRAMS = zoomedit
|
bin_PROGRAMS = zoomedit
|
||||||
zoomedit_SOURCES = zoomedit.cpp UIManager.cpp Renderer.cpp Vertex.cpp \
|
zoomedit_SOURCES = zoomedit.cpp Instance.cpp
|
||||||
Line.cpp Polygon.cpp Rectangle.cpp Triangle.cpp \
|
zoomedit_CPPFLAGS = $(glademm_CFLAGS) $(GTKGLEXT_CFLAGS)
|
||||||
IdManager.cpp WindowManager.cpp SidebarManager.cpp \
|
zoomedit_LDADD = Gui/libgui.la $(glademm_LIBS) $(GTKGLEXT_LIBS)
|
||||||
Window.cpp SidebarView.cpp SidebarAdd.cpp Drawer.cpp \
|
|
||||||
EditManager.cpp FileManager.cpp SidebarToolbox.cpp \
|
|
||||||
ToolSelector.cpp ToolAddPolygon.cpp ToolAddRect.cpp \
|
|
||||||
ToolGrab.cpp ToolRotate.cpp Vertex3d.cpp Room.cpp
|
|
||||||
zoomedit_CPPFLAGS = @GTK_CFLAGS@ @GTKGLEXT_CFLAGS@ @libxml2_CFLAGS@
|
|
||||||
zoomedit_LDADD = @GTK_LIBS@ @GTKGLEXT_LIBS@ @libxml2_LIBS@
|
|
||||||
|
|
659
Makefile.in
659
Makefile.in
|
@ -30,14 +30,17 @@ POST_INSTALL = :
|
||||||
NORMAL_UNINSTALL = :
|
NORMAL_UNINSTALL = :
|
||||||
PRE_UNINSTALL = :
|
PRE_UNINSTALL = :
|
||||||
POST_UNINSTALL = :
|
POST_UNINSTALL = :
|
||||||
|
build_triplet = @build@
|
||||||
|
host_triplet = @host@
|
||||||
bin_PROGRAMS = zoomedit$(EXEEXT)
|
bin_PROGRAMS = zoomedit$(EXEEXT)
|
||||||
subdir = .
|
subdir = .
|
||||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||||
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
||||||
$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
|
$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
|
||||||
compile depcomp install-sh missing
|
compile config.guess config.sub depcomp install-sh ltmain.sh \
|
||||||
|
missing
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
$(ACLOCAL_M4)
|
$(ACLOCAL_M4)
|
||||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||||
|
@ -49,35 +52,37 @@ am__installdirs = "$(DESTDIR)$(bindir)"
|
||||||
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||||
PROGRAMS = $(bin_PROGRAMS)
|
PROGRAMS = $(bin_PROGRAMS)
|
||||||
am_zoomedit_OBJECTS = zoomedit-zoomedit.$(OBJEXT) \
|
am_zoomedit_OBJECTS = zoomedit-zoomedit.$(OBJEXT) \
|
||||||
zoomedit-UIManager.$(OBJEXT) zoomedit-Renderer.$(OBJEXT) \
|
zoomedit-Instance.$(OBJEXT)
|
||||||
zoomedit-Vertex.$(OBJEXT) zoomedit-Line.$(OBJEXT) \
|
|
||||||
zoomedit-Polygon.$(OBJEXT) zoomedit-Rectangle.$(OBJEXT) \
|
|
||||||
zoomedit-Triangle.$(OBJEXT) zoomedit-IdManager.$(OBJEXT) \
|
|
||||||
zoomedit-WindowManager.$(OBJEXT) \
|
|
||||||
zoomedit-SidebarManager.$(OBJEXT) zoomedit-Window.$(OBJEXT) \
|
|
||||||
zoomedit-SidebarView.$(OBJEXT) zoomedit-SidebarAdd.$(OBJEXT) \
|
|
||||||
zoomedit-Drawer.$(OBJEXT) zoomedit-EditManager.$(OBJEXT) \
|
|
||||||
zoomedit-FileManager.$(OBJEXT) \
|
|
||||||
zoomedit-SidebarToolbox.$(OBJEXT) \
|
|
||||||
zoomedit-ToolSelector.$(OBJEXT) \
|
|
||||||
zoomedit-ToolAddPolygon.$(OBJEXT) \
|
|
||||||
zoomedit-ToolAddRect.$(OBJEXT) zoomedit-ToolGrab.$(OBJEXT) \
|
|
||||||
zoomedit-ToolRotate.$(OBJEXT) zoomedit-Vertex3d.$(OBJEXT) \
|
|
||||||
zoomedit-Room.$(OBJEXT)
|
|
||||||
zoomedit_OBJECTS = $(am_zoomedit_OBJECTS)
|
zoomedit_OBJECTS = $(am_zoomedit_OBJECTS)
|
||||||
zoomedit_DEPENDENCIES =
|
am__DEPENDENCIES_1 =
|
||||||
|
zoomedit_DEPENDENCIES = Gui/libgui.la $(am__DEPENDENCIES_1) \
|
||||||
|
$(am__DEPENDENCIES_1)
|
||||||
DEFAULT_INCLUDES = -I.@am__isrc@
|
DEFAULT_INCLUDES = -I.@am__isrc@
|
||||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||||
am__depfiles_maybe = depfiles
|
am__depfiles_maybe = depfiles
|
||||||
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||||
|
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||||
|
--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||||
|
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||||
CXXLD = $(CXX)
|
CXXLD = $(CXX)
|
||||||
CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
|
CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
|
||||||
-o $@
|
--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
|
||||||
|
$(LDFLAGS) -o $@
|
||||||
SOURCES = $(zoomedit_SOURCES)
|
SOURCES = $(zoomedit_SOURCES)
|
||||||
DIST_SOURCES = $(zoomedit_SOURCES)
|
DIST_SOURCES = $(zoomedit_SOURCES)
|
||||||
|
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||||
|
html-recursive info-recursive install-data-recursive \
|
||||||
|
install-dvi-recursive install-exec-recursive \
|
||||||
|
install-html-recursive install-info-recursive \
|
||||||
|
install-pdf-recursive install-ps-recursive install-recursive \
|
||||||
|
installcheck-recursive installdirs-recursive pdf-recursive \
|
||||||
|
ps-recursive uninstall-recursive
|
||||||
|
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||||
|
distclean-recursive maintainer-clean-recursive
|
||||||
ETAGS = etags
|
ETAGS = etags
|
||||||
CTAGS = ctags
|
CTAGS = ctags
|
||||||
|
DIST_SUBDIRS = $(SUBDIRS)
|
||||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
distdir = $(PACKAGE)-$(VERSION)
|
distdir = $(PACKAGE)-$(VERSION)
|
||||||
top_distdir = $(distdir)
|
top_distdir = $(distdir)
|
||||||
|
@ -91,6 +96,7 @@ distuninstallcheck_listfiles = find . -type f -print
|
||||||
distcleancheck_listfiles = find . -type f -print
|
distcleancheck_listfiles = find . -type f -print
|
||||||
ACLOCAL = @ACLOCAL@
|
ACLOCAL = @ACLOCAL@
|
||||||
AMTAR = @AMTAR@
|
AMTAR = @AMTAR@
|
||||||
|
AR = @AR@
|
||||||
AUTOCONF = @AUTOCONF@
|
AUTOCONF = @AUTOCONF@
|
||||||
AUTOHEADER = @AUTOHEADER@
|
AUTOHEADER = @AUTOHEADER@
|
||||||
AUTOMAKE = @AUTOMAKE@
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
@ -101,21 +107,23 @@ CFLAGS = @CFLAGS@
|
||||||
CPP = @CPP@
|
CPP = @CPP@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
CXX = @CXX@
|
CXX = @CXX@
|
||||||
|
CXXCPP = @CXXCPP@
|
||||||
CXXDEPMODE = @CXXDEPMODE@
|
CXXDEPMODE = @CXXDEPMODE@
|
||||||
CXXFLAGS = @CXXFLAGS@
|
CXXFLAGS = @CXXFLAGS@
|
||||||
CYGPATH_W = @CYGPATH_W@
|
CYGPATH_W = @CYGPATH_W@
|
||||||
DEFS = @DEFS@
|
DEFS = @DEFS@
|
||||||
DEPDIR = @DEPDIR@
|
DEPDIR = @DEPDIR@
|
||||||
|
ECHO = @ECHO@
|
||||||
ECHO_C = @ECHO_C@
|
ECHO_C = @ECHO_C@
|
||||||
ECHO_N = @ECHO_N@
|
ECHO_N = @ECHO_N@
|
||||||
ECHO_T = @ECHO_T@
|
ECHO_T = @ECHO_T@
|
||||||
EGREP = @EGREP@
|
EGREP = @EGREP@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
|
F77 = @F77@
|
||||||
|
FFLAGS = @FFLAGS@
|
||||||
GREP = @GREP@
|
GREP = @GREP@
|
||||||
GTKGLEXT_CFLAGS = @GTKGLEXT_CFLAGS@
|
GTKGLEXT_CFLAGS = @GTKGLEXT_CFLAGS@
|
||||||
GTKGLEXT_LIBS = @GTKGLEXT_LIBS@
|
GTKGLEXT_LIBS = @GTKGLEXT_LIBS@
|
||||||
GTK_CFLAGS = @GTK_CFLAGS@
|
|
||||||
GTK_LIBS = @GTK_LIBS@
|
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
@ -124,6 +132,8 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
LDFLAGS = @LDFLAGS@
|
LDFLAGS = @LDFLAGS@
|
||||||
LIBOBJS = @LIBOBJS@
|
LIBOBJS = @LIBOBJS@
|
||||||
LIBS = @LIBS@
|
LIBS = @LIBS@
|
||||||
|
LIBTOOL = @LIBTOOL@
|
||||||
|
LN_S = @LN_S@
|
||||||
LTLIBOBJS = @LTLIBOBJS@
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
MAINT = @MAINT@
|
MAINT = @MAINT@
|
||||||
MAKEINFO = @MAKEINFO@
|
MAKEINFO = @MAKEINFO@
|
||||||
|
@ -137,6 +147,8 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
PKG_CONFIG = @PKG_CONFIG@
|
PKG_CONFIG = @PKG_CONFIG@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
SED = @SED@
|
||||||
SET_MAKE = @SET_MAKE@
|
SET_MAKE = @SET_MAKE@
|
||||||
SHELL = @SHELL@
|
SHELL = @SHELL@
|
||||||
STRIP = @STRIP@
|
STRIP = @STRIP@
|
||||||
|
@ -147,28 +159,37 @@ abs_top_builddir = @abs_top_builddir@
|
||||||
abs_top_srcdir = @abs_top_srcdir@
|
abs_top_srcdir = @abs_top_srcdir@
|
||||||
ac_ct_CC = @ac_ct_CC@
|
ac_ct_CC = @ac_ct_CC@
|
||||||
ac_ct_CXX = @ac_ct_CXX@
|
ac_ct_CXX = @ac_ct_CXX@
|
||||||
|
ac_ct_F77 = @ac_ct_F77@
|
||||||
am__include = @am__include@
|
am__include = @am__include@
|
||||||
am__leading_dot = @am__leading_dot@
|
am__leading_dot = @am__leading_dot@
|
||||||
am__quote = @am__quote@
|
am__quote = @am__quote@
|
||||||
am__tar = @am__tar@
|
am__tar = @am__tar@
|
||||||
am__untar = @am__untar@
|
am__untar = @am__untar@
|
||||||
bindir = @bindir@
|
bindir = @bindir@
|
||||||
|
build = @build@
|
||||||
build_alias = @build_alias@
|
build_alias = @build_alias@
|
||||||
|
build_cpu = @build_cpu@
|
||||||
|
build_os = @build_os@
|
||||||
|
build_vendor = @build_vendor@
|
||||||
builddir = @builddir@
|
builddir = @builddir@
|
||||||
datadir = @datadir@
|
datadir = @datadir@
|
||||||
datarootdir = @datarootdir@
|
datarootdir = @datarootdir@
|
||||||
docdir = @docdir@
|
docdir = @docdir@
|
||||||
dvidir = @dvidir@
|
dvidir = @dvidir@
|
||||||
exec_prefix = @exec_prefix@
|
exec_prefix = @exec_prefix@
|
||||||
|
glademm_CFLAGS = @glademm_CFLAGS@
|
||||||
|
glademm_LIBS = @glademm_LIBS@
|
||||||
|
host = @host@
|
||||||
host_alias = @host_alias@
|
host_alias = @host_alias@
|
||||||
|
host_cpu = @host_cpu@
|
||||||
|
host_os = @host_os@
|
||||||
|
host_vendor = @host_vendor@
|
||||||
htmldir = @htmldir@
|
htmldir = @htmldir@
|
||||||
includedir = @includedir@
|
includedir = @includedir@
|
||||||
infodir = @infodir@
|
infodir = @infodir@
|
||||||
install_sh = @install_sh@
|
install_sh = @install_sh@
|
||||||
libdir = @libdir@
|
libdir = @libdir@
|
||||||
libexecdir = @libexecdir@
|
libexecdir = @libexecdir@
|
||||||
libxml2_CFLAGS = @libxml2_CFLAGS@
|
|
||||||
libxml2_LIBS = @libxml2_LIBS@
|
|
||||||
localedir = @localedir@
|
localedir = @localedir@
|
||||||
localstatedir = @localstatedir@
|
localstatedir = @localstatedir@
|
||||||
mandir = @mandir@
|
mandir = @mandir@
|
||||||
|
@ -185,21 +206,15 @@ sysconfdir = @sysconfdir@
|
||||||
target_alias = @target_alias@
|
target_alias = @target_alias@
|
||||||
top_builddir = @top_builddir@
|
top_builddir = @top_builddir@
|
||||||
top_srcdir = @top_srcdir@
|
top_srcdir = @top_srcdir@
|
||||||
zoomedit_SOURCES = zoomedit.cpp UIManager.cpp Renderer.cpp Vertex.cpp \
|
SUBDIRS = Gui
|
||||||
Line.cpp Polygon.cpp Rectangle.cpp Triangle.cpp \
|
zoomedit_SOURCES = zoomedit.cpp Instance.cpp
|
||||||
IdManager.cpp WindowManager.cpp SidebarManager.cpp \
|
zoomedit_CPPFLAGS = $(glademm_CFLAGS) $(GTKGLEXT_CFLAGS)
|
||||||
Window.cpp SidebarView.cpp SidebarAdd.cpp Drawer.cpp \
|
zoomedit_LDADD = Gui/libgui.la $(glademm_LIBS) $(GTKGLEXT_LIBS)
|
||||||
EditManager.cpp FileManager.cpp SidebarToolbox.cpp \
|
|
||||||
ToolSelector.cpp ToolAddPolygon.cpp ToolAddRect.cpp \
|
|
||||||
ToolGrab.cpp ToolRotate.cpp Vertex3d.cpp Room.cpp
|
|
||||||
|
|
||||||
zoomedit_CPPFLAGS = @GTK_CFLAGS@ @GTKGLEXT_CFLAGS@ @libxml2_CFLAGS@
|
|
||||||
zoomedit_LDADD = @GTK_LIBS@ @GTKGLEXT_LIBS@ @libxml2_LIBS@
|
|
||||||
all: config.h
|
all: config.h
|
||||||
$(MAKE) $(AM_MAKEFLAGS) all-am
|
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: .cpp .o .obj
|
.SUFFIXES: .cpp .lo .o .obj
|
||||||
am--refresh:
|
am--refresh:
|
||||||
@:
|
@:
|
||||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
|
@ -256,10 +271,11 @@ install-binPROGRAMS: $(bin_PROGRAMS)
|
||||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||||
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||||
if test -f $$p \
|
if test -f $$p \
|
||||||
|
|| test -f $$p1 \
|
||||||
; then \
|
; then \
|
||||||
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
|
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||||
echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
|
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
|
||||||
$(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
|
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
|
||||||
else :; fi; \
|
else :; fi; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -272,7 +288,11 @@ uninstall-binPROGRAMS:
|
||||||
done
|
done
|
||||||
|
|
||||||
clean-binPROGRAMS:
|
clean-binPROGRAMS:
|
||||||
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
|
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||||
|
f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||||
|
echo " rm -f $$p $$f"; \
|
||||||
|
rm -f $$p $$f ; \
|
||||||
|
done
|
||||||
zoomedit$(EXEEXT): $(zoomedit_OBJECTS) $(zoomedit_DEPENDENCIES)
|
zoomedit$(EXEEXT): $(zoomedit_OBJECTS) $(zoomedit_DEPENDENCIES)
|
||||||
@rm -f zoomedit$(EXEEXT)
|
@rm -f zoomedit$(EXEEXT)
|
||||||
$(CXXLINK) $(zoomedit_OBJECTS) $(zoomedit_LDADD) $(LIBS)
|
$(CXXLINK) $(zoomedit_OBJECTS) $(zoomedit_LDADD) $(LIBS)
|
||||||
|
@ -283,30 +303,7 @@ mostlyclean-compile:
|
||||||
distclean-compile:
|
distclean-compile:
|
||||||
-rm -f *.tab.c
|
-rm -f *.tab.c
|
||||||
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zoomedit-Drawer.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zoomedit-Instance.Po@am__quote@
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zoomedit-EditManager.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zoomedit-FileManager.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zoomedit-IdManager.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zoomedit-Line.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zoomedit-Polygon.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zoomedit-Rectangle.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zoomedit-Renderer.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zoomedit-Room.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zoomedit-SidebarAdd.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zoomedit-SidebarManager.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zoomedit-SidebarToolbox.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zoomedit-SidebarView.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zoomedit-ToolAddPolygon.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zoomedit-ToolAddRect.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zoomedit-ToolGrab.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zoomedit-ToolRotate.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zoomedit-ToolSelector.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zoomedit-Triangle.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zoomedit-UIManager.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zoomedit-Vertex.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zoomedit-Vertex3d.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zoomedit-Window.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zoomedit-WindowManager.Po@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zoomedit-zoomedit.Po@am__quote@
|
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zoomedit-zoomedit.Po@am__quote@
|
||||||
|
|
||||||
.cpp.o:
|
.cpp.o:
|
||||||
|
@ -323,6 +320,13 @@ distclean-compile:
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||||
|
|
||||||
|
.cpp.lo:
|
||||||
|
@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||||
|
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||||
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||||
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
|
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
|
||||||
|
|
||||||
zoomedit-zoomedit.o: zoomedit.cpp
|
zoomedit-zoomedit.o: zoomedit.cpp
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-zoomedit.o -MD -MP -MF $(DEPDIR)/zoomedit-zoomedit.Tpo -c -o zoomedit-zoomedit.o `test -f 'zoomedit.cpp' || echo '$(srcdir)/'`zoomedit.cpp
|
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-zoomedit.o -MD -MP -MF $(DEPDIR)/zoomedit-zoomedit.Tpo -c -o zoomedit-zoomedit.o `test -f 'zoomedit.cpp' || echo '$(srcdir)/'`zoomedit.cpp
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-zoomedit.Tpo $(DEPDIR)/zoomedit-zoomedit.Po
|
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-zoomedit.Tpo $(DEPDIR)/zoomedit-zoomedit.Po
|
||||||
|
@ -337,341 +341,98 @@ zoomedit-zoomedit.obj: zoomedit.cpp
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-zoomedit.obj `if test -f 'zoomedit.cpp'; then $(CYGPATH_W) 'zoomedit.cpp'; else $(CYGPATH_W) '$(srcdir)/zoomedit.cpp'; fi`
|
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-zoomedit.obj `if test -f 'zoomedit.cpp'; then $(CYGPATH_W) 'zoomedit.cpp'; else $(CYGPATH_W) '$(srcdir)/zoomedit.cpp'; fi`
|
||||||
|
|
||||||
zoomedit-UIManager.o: UIManager.cpp
|
zoomedit-Instance.o: Instance.cpp
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-UIManager.o -MD -MP -MF $(DEPDIR)/zoomedit-UIManager.Tpo -c -o zoomedit-UIManager.o `test -f 'UIManager.cpp' || echo '$(srcdir)/'`UIManager.cpp
|
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-Instance.o -MD -MP -MF $(DEPDIR)/zoomedit-Instance.Tpo -c -o zoomedit-Instance.o `test -f 'Instance.cpp' || echo '$(srcdir)/'`Instance.cpp
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-UIManager.Tpo $(DEPDIR)/zoomedit-UIManager.Po
|
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-Instance.Tpo $(DEPDIR)/zoomedit-Instance.Po
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='UIManager.cpp' object='zoomedit-UIManager.o' libtool=no @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Instance.cpp' object='zoomedit-Instance.o' libtool=no @AMDEPBACKSLASH@
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-UIManager.o `test -f 'UIManager.cpp' || echo '$(srcdir)/'`UIManager.cpp
|
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-Instance.o `test -f 'Instance.cpp' || echo '$(srcdir)/'`Instance.cpp
|
||||||
|
|
||||||
zoomedit-UIManager.obj: UIManager.cpp
|
zoomedit-Instance.obj: Instance.cpp
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-UIManager.obj -MD -MP -MF $(DEPDIR)/zoomedit-UIManager.Tpo -c -o zoomedit-UIManager.obj `if test -f 'UIManager.cpp'; then $(CYGPATH_W) 'UIManager.cpp'; else $(CYGPATH_W) '$(srcdir)/UIManager.cpp'; fi`
|
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-Instance.obj -MD -MP -MF $(DEPDIR)/zoomedit-Instance.Tpo -c -o zoomedit-Instance.obj `if test -f 'Instance.cpp'; then $(CYGPATH_W) 'Instance.cpp'; else $(CYGPATH_W) '$(srcdir)/Instance.cpp'; fi`
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-UIManager.Tpo $(DEPDIR)/zoomedit-UIManager.Po
|
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-Instance.Tpo $(DEPDIR)/zoomedit-Instance.Po
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='UIManager.cpp' object='zoomedit-UIManager.obj' libtool=no @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Instance.cpp' object='zoomedit-Instance.obj' libtool=no @AMDEPBACKSLASH@
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-UIManager.obj `if test -f 'UIManager.cpp'; then $(CYGPATH_W) 'UIManager.cpp'; else $(CYGPATH_W) '$(srcdir)/UIManager.cpp'; fi`
|
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-Instance.obj `if test -f 'Instance.cpp'; then $(CYGPATH_W) 'Instance.cpp'; else $(CYGPATH_W) '$(srcdir)/Instance.cpp'; fi`
|
||||||
|
|
||||||
zoomedit-Renderer.o: Renderer.cpp
|
mostlyclean-libtool:
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-Renderer.o -MD -MP -MF $(DEPDIR)/zoomedit-Renderer.Tpo -c -o zoomedit-Renderer.o `test -f 'Renderer.cpp' || echo '$(srcdir)/'`Renderer.cpp
|
-rm -f *.lo
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-Renderer.Tpo $(DEPDIR)/zoomedit-Renderer.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Renderer.cpp' object='zoomedit-Renderer.o' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-Renderer.o `test -f 'Renderer.cpp' || echo '$(srcdir)/'`Renderer.cpp
|
|
||||||
|
|
||||||
zoomedit-Renderer.obj: Renderer.cpp
|
clean-libtool:
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-Renderer.obj -MD -MP -MF $(DEPDIR)/zoomedit-Renderer.Tpo -c -o zoomedit-Renderer.obj `if test -f 'Renderer.cpp'; then $(CYGPATH_W) 'Renderer.cpp'; else $(CYGPATH_W) '$(srcdir)/Renderer.cpp'; fi`
|
-rm -rf .libs _libs
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-Renderer.Tpo $(DEPDIR)/zoomedit-Renderer.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Renderer.cpp' object='zoomedit-Renderer.obj' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-Renderer.obj `if test -f 'Renderer.cpp'; then $(CYGPATH_W) 'Renderer.cpp'; else $(CYGPATH_W) '$(srcdir)/Renderer.cpp'; fi`
|
|
||||||
|
|
||||||
zoomedit-Vertex.o: Vertex.cpp
|
distclean-libtool:
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-Vertex.o -MD -MP -MF $(DEPDIR)/zoomedit-Vertex.Tpo -c -o zoomedit-Vertex.o `test -f 'Vertex.cpp' || echo '$(srcdir)/'`Vertex.cpp
|
-rm -f libtool
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-Vertex.Tpo $(DEPDIR)/zoomedit-Vertex.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Vertex.cpp' object='zoomedit-Vertex.o' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-Vertex.o `test -f 'Vertex.cpp' || echo '$(srcdir)/'`Vertex.cpp
|
|
||||||
|
|
||||||
zoomedit-Vertex.obj: Vertex.cpp
|
# This directory's subdirectories are mostly independent; you can cd
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-Vertex.obj -MD -MP -MF $(DEPDIR)/zoomedit-Vertex.Tpo -c -o zoomedit-Vertex.obj `if test -f 'Vertex.cpp'; then $(CYGPATH_W) 'Vertex.cpp'; else $(CYGPATH_W) '$(srcdir)/Vertex.cpp'; fi`
|
# into them and run `make' without going through this Makefile.
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-Vertex.Tpo $(DEPDIR)/zoomedit-Vertex.Po
|
# To change the values of `make' variables: instead of editing Makefiles,
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Vertex.cpp' object='zoomedit-Vertex.obj' libtool=no @AMDEPBACKSLASH@
|
# (1) if the variable is set in `config.status', edit `config.status'
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
# (which will cause the Makefiles to be regenerated when you run `make');
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-Vertex.obj `if test -f 'Vertex.cpp'; then $(CYGPATH_W) 'Vertex.cpp'; else $(CYGPATH_W) '$(srcdir)/Vertex.cpp'; fi`
|
# (2) otherwise, pass the desired values on the `make' command line.
|
||||||
|
$(RECURSIVE_TARGETS):
|
||||||
|
@failcom='exit 1'; \
|
||||||
|
for f in x $$MAKEFLAGS; do \
|
||||||
|
case $$f in \
|
||||||
|
*=* | --[!k]*);; \
|
||||||
|
*k*) failcom='fail=yes';; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
dot_seen=no; \
|
||||||
|
target=`echo $@ | sed s/-recursive//`; \
|
||||||
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
echo "Making $$target in $$subdir"; \
|
||||||
|
if test "$$subdir" = "."; then \
|
||||||
|
dot_seen=yes; \
|
||||||
|
local_target="$$target-am"; \
|
||||||
|
else \
|
||||||
|
local_target="$$target"; \
|
||||||
|
fi; \
|
||||||
|
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||||
|
|| eval $$failcom; \
|
||||||
|
done; \
|
||||||
|
if test "$$dot_seen" = "no"; then \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||||
|
fi; test -z "$$fail"
|
||||||
|
|
||||||
zoomedit-Line.o: Line.cpp
|
$(RECURSIVE_CLEAN_TARGETS):
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-Line.o -MD -MP -MF $(DEPDIR)/zoomedit-Line.Tpo -c -o zoomedit-Line.o `test -f 'Line.cpp' || echo '$(srcdir)/'`Line.cpp
|
@failcom='exit 1'; \
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-Line.Tpo $(DEPDIR)/zoomedit-Line.Po
|
for f in x $$MAKEFLAGS; do \
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Line.cpp' object='zoomedit-Line.o' libtool=no @AMDEPBACKSLASH@
|
case $$f in \
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
*=* | --[!k]*);; \
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-Line.o `test -f 'Line.cpp' || echo '$(srcdir)/'`Line.cpp
|
*k*) failcom='fail=yes';; \
|
||||||
|
esac; \
|
||||||
zoomedit-Line.obj: Line.cpp
|
done; \
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-Line.obj -MD -MP -MF $(DEPDIR)/zoomedit-Line.Tpo -c -o zoomedit-Line.obj `if test -f 'Line.cpp'; then $(CYGPATH_W) 'Line.cpp'; else $(CYGPATH_W) '$(srcdir)/Line.cpp'; fi`
|
dot_seen=no; \
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-Line.Tpo $(DEPDIR)/zoomedit-Line.Po
|
case "$@" in \
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Line.cpp' object='zoomedit-Line.obj' libtool=no @AMDEPBACKSLASH@
|
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
*) list='$(SUBDIRS)' ;; \
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-Line.obj `if test -f 'Line.cpp'; then $(CYGPATH_W) 'Line.cpp'; else $(CYGPATH_W) '$(srcdir)/Line.cpp'; fi`
|
esac; \
|
||||||
|
rev=''; for subdir in $$list; do \
|
||||||
zoomedit-Polygon.o: Polygon.cpp
|
if test "$$subdir" = "."; then :; else \
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-Polygon.o -MD -MP -MF $(DEPDIR)/zoomedit-Polygon.Tpo -c -o zoomedit-Polygon.o `test -f 'Polygon.cpp' || echo '$(srcdir)/'`Polygon.cpp
|
rev="$$subdir $$rev"; \
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-Polygon.Tpo $(DEPDIR)/zoomedit-Polygon.Po
|
fi; \
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Polygon.cpp' object='zoomedit-Polygon.o' libtool=no @AMDEPBACKSLASH@
|
done; \
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
rev="$$rev ."; \
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-Polygon.o `test -f 'Polygon.cpp' || echo '$(srcdir)/'`Polygon.cpp
|
target=`echo $@ | sed s/-recursive//`; \
|
||||||
|
for subdir in $$rev; do \
|
||||||
zoomedit-Polygon.obj: Polygon.cpp
|
echo "Making $$target in $$subdir"; \
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-Polygon.obj -MD -MP -MF $(DEPDIR)/zoomedit-Polygon.Tpo -c -o zoomedit-Polygon.obj `if test -f 'Polygon.cpp'; then $(CYGPATH_W) 'Polygon.cpp'; else $(CYGPATH_W) '$(srcdir)/Polygon.cpp'; fi`
|
if test "$$subdir" = "."; then \
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-Polygon.Tpo $(DEPDIR)/zoomedit-Polygon.Po
|
local_target="$$target-am"; \
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Polygon.cpp' object='zoomedit-Polygon.obj' libtool=no @AMDEPBACKSLASH@
|
else \
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
local_target="$$target"; \
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-Polygon.obj `if test -f 'Polygon.cpp'; then $(CYGPATH_W) 'Polygon.cpp'; else $(CYGPATH_W) '$(srcdir)/Polygon.cpp'; fi`
|
fi; \
|
||||||
|
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||||
zoomedit-Rectangle.o: Rectangle.cpp
|
|| eval $$failcom; \
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-Rectangle.o -MD -MP -MF $(DEPDIR)/zoomedit-Rectangle.Tpo -c -o zoomedit-Rectangle.o `test -f 'Rectangle.cpp' || echo '$(srcdir)/'`Rectangle.cpp
|
done && test -z "$$fail"
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-Rectangle.Tpo $(DEPDIR)/zoomedit-Rectangle.Po
|
tags-recursive:
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Rectangle.cpp' object='zoomedit-Rectangle.o' libtool=no @AMDEPBACKSLASH@
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-Rectangle.o `test -f 'Rectangle.cpp' || echo '$(srcdir)/'`Rectangle.cpp
|
done
|
||||||
|
ctags-recursive:
|
||||||
zoomedit-Rectangle.obj: Rectangle.cpp
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-Rectangle.obj -MD -MP -MF $(DEPDIR)/zoomedit-Rectangle.Tpo -c -o zoomedit-Rectangle.obj `if test -f 'Rectangle.cpp'; then $(CYGPATH_W) 'Rectangle.cpp'; else $(CYGPATH_W) '$(srcdir)/Rectangle.cpp'; fi`
|
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-Rectangle.Tpo $(DEPDIR)/zoomedit-Rectangle.Po
|
done
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Rectangle.cpp' object='zoomedit-Rectangle.obj' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-Rectangle.obj `if test -f 'Rectangle.cpp'; then $(CYGPATH_W) 'Rectangle.cpp'; else $(CYGPATH_W) '$(srcdir)/Rectangle.cpp'; fi`
|
|
||||||
|
|
||||||
zoomedit-Triangle.o: Triangle.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-Triangle.o -MD -MP -MF $(DEPDIR)/zoomedit-Triangle.Tpo -c -o zoomedit-Triangle.o `test -f 'Triangle.cpp' || echo '$(srcdir)/'`Triangle.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-Triangle.Tpo $(DEPDIR)/zoomedit-Triangle.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Triangle.cpp' object='zoomedit-Triangle.o' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-Triangle.o `test -f 'Triangle.cpp' || echo '$(srcdir)/'`Triangle.cpp
|
|
||||||
|
|
||||||
zoomedit-Triangle.obj: Triangle.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-Triangle.obj -MD -MP -MF $(DEPDIR)/zoomedit-Triangle.Tpo -c -o zoomedit-Triangle.obj `if test -f 'Triangle.cpp'; then $(CYGPATH_W) 'Triangle.cpp'; else $(CYGPATH_W) '$(srcdir)/Triangle.cpp'; fi`
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-Triangle.Tpo $(DEPDIR)/zoomedit-Triangle.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Triangle.cpp' object='zoomedit-Triangle.obj' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-Triangle.obj `if test -f 'Triangle.cpp'; then $(CYGPATH_W) 'Triangle.cpp'; else $(CYGPATH_W) '$(srcdir)/Triangle.cpp'; fi`
|
|
||||||
|
|
||||||
zoomedit-IdManager.o: IdManager.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-IdManager.o -MD -MP -MF $(DEPDIR)/zoomedit-IdManager.Tpo -c -o zoomedit-IdManager.o `test -f 'IdManager.cpp' || echo '$(srcdir)/'`IdManager.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-IdManager.Tpo $(DEPDIR)/zoomedit-IdManager.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='IdManager.cpp' object='zoomedit-IdManager.o' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-IdManager.o `test -f 'IdManager.cpp' || echo '$(srcdir)/'`IdManager.cpp
|
|
||||||
|
|
||||||
zoomedit-IdManager.obj: IdManager.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-IdManager.obj -MD -MP -MF $(DEPDIR)/zoomedit-IdManager.Tpo -c -o zoomedit-IdManager.obj `if test -f 'IdManager.cpp'; then $(CYGPATH_W) 'IdManager.cpp'; else $(CYGPATH_W) '$(srcdir)/IdManager.cpp'; fi`
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-IdManager.Tpo $(DEPDIR)/zoomedit-IdManager.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='IdManager.cpp' object='zoomedit-IdManager.obj' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-IdManager.obj `if test -f 'IdManager.cpp'; then $(CYGPATH_W) 'IdManager.cpp'; else $(CYGPATH_W) '$(srcdir)/IdManager.cpp'; fi`
|
|
||||||
|
|
||||||
zoomedit-WindowManager.o: WindowManager.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-WindowManager.o -MD -MP -MF $(DEPDIR)/zoomedit-WindowManager.Tpo -c -o zoomedit-WindowManager.o `test -f 'WindowManager.cpp' || echo '$(srcdir)/'`WindowManager.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-WindowManager.Tpo $(DEPDIR)/zoomedit-WindowManager.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='WindowManager.cpp' object='zoomedit-WindowManager.o' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-WindowManager.o `test -f 'WindowManager.cpp' || echo '$(srcdir)/'`WindowManager.cpp
|
|
||||||
|
|
||||||
zoomedit-WindowManager.obj: WindowManager.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-WindowManager.obj -MD -MP -MF $(DEPDIR)/zoomedit-WindowManager.Tpo -c -o zoomedit-WindowManager.obj `if test -f 'WindowManager.cpp'; then $(CYGPATH_W) 'WindowManager.cpp'; else $(CYGPATH_W) '$(srcdir)/WindowManager.cpp'; fi`
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-WindowManager.Tpo $(DEPDIR)/zoomedit-WindowManager.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='WindowManager.cpp' object='zoomedit-WindowManager.obj' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-WindowManager.obj `if test -f 'WindowManager.cpp'; then $(CYGPATH_W) 'WindowManager.cpp'; else $(CYGPATH_W) '$(srcdir)/WindowManager.cpp'; fi`
|
|
||||||
|
|
||||||
zoomedit-SidebarManager.o: SidebarManager.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-SidebarManager.o -MD -MP -MF $(DEPDIR)/zoomedit-SidebarManager.Tpo -c -o zoomedit-SidebarManager.o `test -f 'SidebarManager.cpp' || echo '$(srcdir)/'`SidebarManager.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-SidebarManager.Tpo $(DEPDIR)/zoomedit-SidebarManager.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='SidebarManager.cpp' object='zoomedit-SidebarManager.o' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-SidebarManager.o `test -f 'SidebarManager.cpp' || echo '$(srcdir)/'`SidebarManager.cpp
|
|
||||||
|
|
||||||
zoomedit-SidebarManager.obj: SidebarManager.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-SidebarManager.obj -MD -MP -MF $(DEPDIR)/zoomedit-SidebarManager.Tpo -c -o zoomedit-SidebarManager.obj `if test -f 'SidebarManager.cpp'; then $(CYGPATH_W) 'SidebarManager.cpp'; else $(CYGPATH_W) '$(srcdir)/SidebarManager.cpp'; fi`
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-SidebarManager.Tpo $(DEPDIR)/zoomedit-SidebarManager.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='SidebarManager.cpp' object='zoomedit-SidebarManager.obj' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-SidebarManager.obj `if test -f 'SidebarManager.cpp'; then $(CYGPATH_W) 'SidebarManager.cpp'; else $(CYGPATH_W) '$(srcdir)/SidebarManager.cpp'; fi`
|
|
||||||
|
|
||||||
zoomedit-Window.o: Window.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-Window.o -MD -MP -MF $(DEPDIR)/zoomedit-Window.Tpo -c -o zoomedit-Window.o `test -f 'Window.cpp' || echo '$(srcdir)/'`Window.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-Window.Tpo $(DEPDIR)/zoomedit-Window.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Window.cpp' object='zoomedit-Window.o' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-Window.o `test -f 'Window.cpp' || echo '$(srcdir)/'`Window.cpp
|
|
||||||
|
|
||||||
zoomedit-Window.obj: Window.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-Window.obj -MD -MP -MF $(DEPDIR)/zoomedit-Window.Tpo -c -o zoomedit-Window.obj `if test -f 'Window.cpp'; then $(CYGPATH_W) 'Window.cpp'; else $(CYGPATH_W) '$(srcdir)/Window.cpp'; fi`
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-Window.Tpo $(DEPDIR)/zoomedit-Window.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Window.cpp' object='zoomedit-Window.obj' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-Window.obj `if test -f 'Window.cpp'; then $(CYGPATH_W) 'Window.cpp'; else $(CYGPATH_W) '$(srcdir)/Window.cpp'; fi`
|
|
||||||
|
|
||||||
zoomedit-SidebarView.o: SidebarView.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-SidebarView.o -MD -MP -MF $(DEPDIR)/zoomedit-SidebarView.Tpo -c -o zoomedit-SidebarView.o `test -f 'SidebarView.cpp' || echo '$(srcdir)/'`SidebarView.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-SidebarView.Tpo $(DEPDIR)/zoomedit-SidebarView.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='SidebarView.cpp' object='zoomedit-SidebarView.o' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-SidebarView.o `test -f 'SidebarView.cpp' || echo '$(srcdir)/'`SidebarView.cpp
|
|
||||||
|
|
||||||
zoomedit-SidebarView.obj: SidebarView.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-SidebarView.obj -MD -MP -MF $(DEPDIR)/zoomedit-SidebarView.Tpo -c -o zoomedit-SidebarView.obj `if test -f 'SidebarView.cpp'; then $(CYGPATH_W) 'SidebarView.cpp'; else $(CYGPATH_W) '$(srcdir)/SidebarView.cpp'; fi`
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-SidebarView.Tpo $(DEPDIR)/zoomedit-SidebarView.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='SidebarView.cpp' object='zoomedit-SidebarView.obj' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-SidebarView.obj `if test -f 'SidebarView.cpp'; then $(CYGPATH_W) 'SidebarView.cpp'; else $(CYGPATH_W) '$(srcdir)/SidebarView.cpp'; fi`
|
|
||||||
|
|
||||||
zoomedit-SidebarAdd.o: SidebarAdd.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-SidebarAdd.o -MD -MP -MF $(DEPDIR)/zoomedit-SidebarAdd.Tpo -c -o zoomedit-SidebarAdd.o `test -f 'SidebarAdd.cpp' || echo '$(srcdir)/'`SidebarAdd.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-SidebarAdd.Tpo $(DEPDIR)/zoomedit-SidebarAdd.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='SidebarAdd.cpp' object='zoomedit-SidebarAdd.o' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-SidebarAdd.o `test -f 'SidebarAdd.cpp' || echo '$(srcdir)/'`SidebarAdd.cpp
|
|
||||||
|
|
||||||
zoomedit-SidebarAdd.obj: SidebarAdd.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-SidebarAdd.obj -MD -MP -MF $(DEPDIR)/zoomedit-SidebarAdd.Tpo -c -o zoomedit-SidebarAdd.obj `if test -f 'SidebarAdd.cpp'; then $(CYGPATH_W) 'SidebarAdd.cpp'; else $(CYGPATH_W) '$(srcdir)/SidebarAdd.cpp'; fi`
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-SidebarAdd.Tpo $(DEPDIR)/zoomedit-SidebarAdd.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='SidebarAdd.cpp' object='zoomedit-SidebarAdd.obj' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-SidebarAdd.obj `if test -f 'SidebarAdd.cpp'; then $(CYGPATH_W) 'SidebarAdd.cpp'; else $(CYGPATH_W) '$(srcdir)/SidebarAdd.cpp'; fi`
|
|
||||||
|
|
||||||
zoomedit-Drawer.o: Drawer.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-Drawer.o -MD -MP -MF $(DEPDIR)/zoomedit-Drawer.Tpo -c -o zoomedit-Drawer.o `test -f 'Drawer.cpp' || echo '$(srcdir)/'`Drawer.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-Drawer.Tpo $(DEPDIR)/zoomedit-Drawer.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Drawer.cpp' object='zoomedit-Drawer.o' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-Drawer.o `test -f 'Drawer.cpp' || echo '$(srcdir)/'`Drawer.cpp
|
|
||||||
|
|
||||||
zoomedit-Drawer.obj: Drawer.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-Drawer.obj -MD -MP -MF $(DEPDIR)/zoomedit-Drawer.Tpo -c -o zoomedit-Drawer.obj `if test -f 'Drawer.cpp'; then $(CYGPATH_W) 'Drawer.cpp'; else $(CYGPATH_W) '$(srcdir)/Drawer.cpp'; fi`
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-Drawer.Tpo $(DEPDIR)/zoomedit-Drawer.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Drawer.cpp' object='zoomedit-Drawer.obj' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-Drawer.obj `if test -f 'Drawer.cpp'; then $(CYGPATH_W) 'Drawer.cpp'; else $(CYGPATH_W) '$(srcdir)/Drawer.cpp'; fi`
|
|
||||||
|
|
||||||
zoomedit-EditManager.o: EditManager.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-EditManager.o -MD -MP -MF $(DEPDIR)/zoomedit-EditManager.Tpo -c -o zoomedit-EditManager.o `test -f 'EditManager.cpp' || echo '$(srcdir)/'`EditManager.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-EditManager.Tpo $(DEPDIR)/zoomedit-EditManager.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='EditManager.cpp' object='zoomedit-EditManager.o' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-EditManager.o `test -f 'EditManager.cpp' || echo '$(srcdir)/'`EditManager.cpp
|
|
||||||
|
|
||||||
zoomedit-EditManager.obj: EditManager.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-EditManager.obj -MD -MP -MF $(DEPDIR)/zoomedit-EditManager.Tpo -c -o zoomedit-EditManager.obj `if test -f 'EditManager.cpp'; then $(CYGPATH_W) 'EditManager.cpp'; else $(CYGPATH_W) '$(srcdir)/EditManager.cpp'; fi`
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-EditManager.Tpo $(DEPDIR)/zoomedit-EditManager.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='EditManager.cpp' object='zoomedit-EditManager.obj' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-EditManager.obj `if test -f 'EditManager.cpp'; then $(CYGPATH_W) 'EditManager.cpp'; else $(CYGPATH_W) '$(srcdir)/EditManager.cpp'; fi`
|
|
||||||
|
|
||||||
zoomedit-FileManager.o: FileManager.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-FileManager.o -MD -MP -MF $(DEPDIR)/zoomedit-FileManager.Tpo -c -o zoomedit-FileManager.o `test -f 'FileManager.cpp' || echo '$(srcdir)/'`FileManager.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-FileManager.Tpo $(DEPDIR)/zoomedit-FileManager.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='FileManager.cpp' object='zoomedit-FileManager.o' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-FileManager.o `test -f 'FileManager.cpp' || echo '$(srcdir)/'`FileManager.cpp
|
|
||||||
|
|
||||||
zoomedit-FileManager.obj: FileManager.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-FileManager.obj -MD -MP -MF $(DEPDIR)/zoomedit-FileManager.Tpo -c -o zoomedit-FileManager.obj `if test -f 'FileManager.cpp'; then $(CYGPATH_W) 'FileManager.cpp'; else $(CYGPATH_W) '$(srcdir)/FileManager.cpp'; fi`
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-FileManager.Tpo $(DEPDIR)/zoomedit-FileManager.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='FileManager.cpp' object='zoomedit-FileManager.obj' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-FileManager.obj `if test -f 'FileManager.cpp'; then $(CYGPATH_W) 'FileManager.cpp'; else $(CYGPATH_W) '$(srcdir)/FileManager.cpp'; fi`
|
|
||||||
|
|
||||||
zoomedit-SidebarToolbox.o: SidebarToolbox.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-SidebarToolbox.o -MD -MP -MF $(DEPDIR)/zoomedit-SidebarToolbox.Tpo -c -o zoomedit-SidebarToolbox.o `test -f 'SidebarToolbox.cpp' || echo '$(srcdir)/'`SidebarToolbox.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-SidebarToolbox.Tpo $(DEPDIR)/zoomedit-SidebarToolbox.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='SidebarToolbox.cpp' object='zoomedit-SidebarToolbox.o' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-SidebarToolbox.o `test -f 'SidebarToolbox.cpp' || echo '$(srcdir)/'`SidebarToolbox.cpp
|
|
||||||
|
|
||||||
zoomedit-SidebarToolbox.obj: SidebarToolbox.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-SidebarToolbox.obj -MD -MP -MF $(DEPDIR)/zoomedit-SidebarToolbox.Tpo -c -o zoomedit-SidebarToolbox.obj `if test -f 'SidebarToolbox.cpp'; then $(CYGPATH_W) 'SidebarToolbox.cpp'; else $(CYGPATH_W) '$(srcdir)/SidebarToolbox.cpp'; fi`
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-SidebarToolbox.Tpo $(DEPDIR)/zoomedit-SidebarToolbox.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='SidebarToolbox.cpp' object='zoomedit-SidebarToolbox.obj' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-SidebarToolbox.obj `if test -f 'SidebarToolbox.cpp'; then $(CYGPATH_W) 'SidebarToolbox.cpp'; else $(CYGPATH_W) '$(srcdir)/SidebarToolbox.cpp'; fi`
|
|
||||||
|
|
||||||
zoomedit-ToolSelector.o: ToolSelector.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-ToolSelector.o -MD -MP -MF $(DEPDIR)/zoomedit-ToolSelector.Tpo -c -o zoomedit-ToolSelector.o `test -f 'ToolSelector.cpp' || echo '$(srcdir)/'`ToolSelector.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-ToolSelector.Tpo $(DEPDIR)/zoomedit-ToolSelector.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ToolSelector.cpp' object='zoomedit-ToolSelector.o' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-ToolSelector.o `test -f 'ToolSelector.cpp' || echo '$(srcdir)/'`ToolSelector.cpp
|
|
||||||
|
|
||||||
zoomedit-ToolSelector.obj: ToolSelector.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-ToolSelector.obj -MD -MP -MF $(DEPDIR)/zoomedit-ToolSelector.Tpo -c -o zoomedit-ToolSelector.obj `if test -f 'ToolSelector.cpp'; then $(CYGPATH_W) 'ToolSelector.cpp'; else $(CYGPATH_W) '$(srcdir)/ToolSelector.cpp'; fi`
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-ToolSelector.Tpo $(DEPDIR)/zoomedit-ToolSelector.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ToolSelector.cpp' object='zoomedit-ToolSelector.obj' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-ToolSelector.obj `if test -f 'ToolSelector.cpp'; then $(CYGPATH_W) 'ToolSelector.cpp'; else $(CYGPATH_W) '$(srcdir)/ToolSelector.cpp'; fi`
|
|
||||||
|
|
||||||
zoomedit-ToolAddPolygon.o: ToolAddPolygon.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-ToolAddPolygon.o -MD -MP -MF $(DEPDIR)/zoomedit-ToolAddPolygon.Tpo -c -o zoomedit-ToolAddPolygon.o `test -f 'ToolAddPolygon.cpp' || echo '$(srcdir)/'`ToolAddPolygon.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-ToolAddPolygon.Tpo $(DEPDIR)/zoomedit-ToolAddPolygon.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ToolAddPolygon.cpp' object='zoomedit-ToolAddPolygon.o' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-ToolAddPolygon.o `test -f 'ToolAddPolygon.cpp' || echo '$(srcdir)/'`ToolAddPolygon.cpp
|
|
||||||
|
|
||||||
zoomedit-ToolAddPolygon.obj: ToolAddPolygon.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-ToolAddPolygon.obj -MD -MP -MF $(DEPDIR)/zoomedit-ToolAddPolygon.Tpo -c -o zoomedit-ToolAddPolygon.obj `if test -f 'ToolAddPolygon.cpp'; then $(CYGPATH_W) 'ToolAddPolygon.cpp'; else $(CYGPATH_W) '$(srcdir)/ToolAddPolygon.cpp'; fi`
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-ToolAddPolygon.Tpo $(DEPDIR)/zoomedit-ToolAddPolygon.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ToolAddPolygon.cpp' object='zoomedit-ToolAddPolygon.obj' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-ToolAddPolygon.obj `if test -f 'ToolAddPolygon.cpp'; then $(CYGPATH_W) 'ToolAddPolygon.cpp'; else $(CYGPATH_W) '$(srcdir)/ToolAddPolygon.cpp'; fi`
|
|
||||||
|
|
||||||
zoomedit-ToolAddRect.o: ToolAddRect.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-ToolAddRect.o -MD -MP -MF $(DEPDIR)/zoomedit-ToolAddRect.Tpo -c -o zoomedit-ToolAddRect.o `test -f 'ToolAddRect.cpp' || echo '$(srcdir)/'`ToolAddRect.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-ToolAddRect.Tpo $(DEPDIR)/zoomedit-ToolAddRect.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ToolAddRect.cpp' object='zoomedit-ToolAddRect.o' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-ToolAddRect.o `test -f 'ToolAddRect.cpp' || echo '$(srcdir)/'`ToolAddRect.cpp
|
|
||||||
|
|
||||||
zoomedit-ToolAddRect.obj: ToolAddRect.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-ToolAddRect.obj -MD -MP -MF $(DEPDIR)/zoomedit-ToolAddRect.Tpo -c -o zoomedit-ToolAddRect.obj `if test -f 'ToolAddRect.cpp'; then $(CYGPATH_W) 'ToolAddRect.cpp'; else $(CYGPATH_W) '$(srcdir)/ToolAddRect.cpp'; fi`
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-ToolAddRect.Tpo $(DEPDIR)/zoomedit-ToolAddRect.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ToolAddRect.cpp' object='zoomedit-ToolAddRect.obj' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-ToolAddRect.obj `if test -f 'ToolAddRect.cpp'; then $(CYGPATH_W) 'ToolAddRect.cpp'; else $(CYGPATH_W) '$(srcdir)/ToolAddRect.cpp'; fi`
|
|
||||||
|
|
||||||
zoomedit-ToolGrab.o: ToolGrab.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-ToolGrab.o -MD -MP -MF $(DEPDIR)/zoomedit-ToolGrab.Tpo -c -o zoomedit-ToolGrab.o `test -f 'ToolGrab.cpp' || echo '$(srcdir)/'`ToolGrab.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-ToolGrab.Tpo $(DEPDIR)/zoomedit-ToolGrab.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ToolGrab.cpp' object='zoomedit-ToolGrab.o' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-ToolGrab.o `test -f 'ToolGrab.cpp' || echo '$(srcdir)/'`ToolGrab.cpp
|
|
||||||
|
|
||||||
zoomedit-ToolGrab.obj: ToolGrab.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-ToolGrab.obj -MD -MP -MF $(DEPDIR)/zoomedit-ToolGrab.Tpo -c -o zoomedit-ToolGrab.obj `if test -f 'ToolGrab.cpp'; then $(CYGPATH_W) 'ToolGrab.cpp'; else $(CYGPATH_W) '$(srcdir)/ToolGrab.cpp'; fi`
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-ToolGrab.Tpo $(DEPDIR)/zoomedit-ToolGrab.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ToolGrab.cpp' object='zoomedit-ToolGrab.obj' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-ToolGrab.obj `if test -f 'ToolGrab.cpp'; then $(CYGPATH_W) 'ToolGrab.cpp'; else $(CYGPATH_W) '$(srcdir)/ToolGrab.cpp'; fi`
|
|
||||||
|
|
||||||
zoomedit-ToolRotate.o: ToolRotate.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-ToolRotate.o -MD -MP -MF $(DEPDIR)/zoomedit-ToolRotate.Tpo -c -o zoomedit-ToolRotate.o `test -f 'ToolRotate.cpp' || echo '$(srcdir)/'`ToolRotate.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-ToolRotate.Tpo $(DEPDIR)/zoomedit-ToolRotate.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ToolRotate.cpp' object='zoomedit-ToolRotate.o' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-ToolRotate.o `test -f 'ToolRotate.cpp' || echo '$(srcdir)/'`ToolRotate.cpp
|
|
||||||
|
|
||||||
zoomedit-ToolRotate.obj: ToolRotate.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-ToolRotate.obj -MD -MP -MF $(DEPDIR)/zoomedit-ToolRotate.Tpo -c -o zoomedit-ToolRotate.obj `if test -f 'ToolRotate.cpp'; then $(CYGPATH_W) 'ToolRotate.cpp'; else $(CYGPATH_W) '$(srcdir)/ToolRotate.cpp'; fi`
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-ToolRotate.Tpo $(DEPDIR)/zoomedit-ToolRotate.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ToolRotate.cpp' object='zoomedit-ToolRotate.obj' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-ToolRotate.obj `if test -f 'ToolRotate.cpp'; then $(CYGPATH_W) 'ToolRotate.cpp'; else $(CYGPATH_W) '$(srcdir)/ToolRotate.cpp'; fi`
|
|
||||||
|
|
||||||
zoomedit-Vertex3d.o: Vertex3d.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-Vertex3d.o -MD -MP -MF $(DEPDIR)/zoomedit-Vertex3d.Tpo -c -o zoomedit-Vertex3d.o `test -f 'Vertex3d.cpp' || echo '$(srcdir)/'`Vertex3d.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-Vertex3d.Tpo $(DEPDIR)/zoomedit-Vertex3d.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Vertex3d.cpp' object='zoomedit-Vertex3d.o' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-Vertex3d.o `test -f 'Vertex3d.cpp' || echo '$(srcdir)/'`Vertex3d.cpp
|
|
||||||
|
|
||||||
zoomedit-Vertex3d.obj: Vertex3d.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-Vertex3d.obj -MD -MP -MF $(DEPDIR)/zoomedit-Vertex3d.Tpo -c -o zoomedit-Vertex3d.obj `if test -f 'Vertex3d.cpp'; then $(CYGPATH_W) 'Vertex3d.cpp'; else $(CYGPATH_W) '$(srcdir)/Vertex3d.cpp'; fi`
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-Vertex3d.Tpo $(DEPDIR)/zoomedit-Vertex3d.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Vertex3d.cpp' object='zoomedit-Vertex3d.obj' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-Vertex3d.obj `if test -f 'Vertex3d.cpp'; then $(CYGPATH_W) 'Vertex3d.cpp'; else $(CYGPATH_W) '$(srcdir)/Vertex3d.cpp'; fi`
|
|
||||||
|
|
||||||
zoomedit-Room.o: Room.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-Room.o -MD -MP -MF $(DEPDIR)/zoomedit-Room.Tpo -c -o zoomedit-Room.o `test -f 'Room.cpp' || echo '$(srcdir)/'`Room.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-Room.Tpo $(DEPDIR)/zoomedit-Room.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Room.cpp' object='zoomedit-Room.o' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-Room.o `test -f 'Room.cpp' || echo '$(srcdir)/'`Room.cpp
|
|
||||||
|
|
||||||
zoomedit-Room.obj: Room.cpp
|
|
||||||
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT zoomedit-Room.obj -MD -MP -MF $(DEPDIR)/zoomedit-Room.Tpo -c -o zoomedit-Room.obj `if test -f 'Room.cpp'; then $(CYGPATH_W) 'Room.cpp'; else $(CYGPATH_W) '$(srcdir)/Room.cpp'; fi`
|
|
||||||
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/zoomedit-Room.Tpo $(DEPDIR)/zoomedit-Room.Po
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='Room.cpp' object='zoomedit-Room.obj' libtool=no @AMDEPBACKSLASH@
|
|
||||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(zoomedit_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o zoomedit-Room.obj `if test -f 'Room.cpp'; then $(CYGPATH_W) 'Room.cpp'; else $(CYGPATH_W) '$(srcdir)/Room.cpp'; fi`
|
|
||||||
|
|
||||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||||
|
@ -683,10 +444,23 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||||
mkid -fID $$unique
|
mkid -fID $$unique
|
||||||
tags: TAGS
|
tags: TAGS
|
||||||
|
|
||||||
TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||||
$(TAGS_FILES) $(LISP)
|
$(TAGS_FILES) $(LISP)
|
||||||
tags=; \
|
tags=; \
|
||||||
here=`pwd`; \
|
here=`pwd`; \
|
||||||
|
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||||
|
include_option=--etags-include; \
|
||||||
|
empty_fix=.; \
|
||||||
|
else \
|
||||||
|
include_option=--include; \
|
||||||
|
empty_fix=; \
|
||||||
|
fi; \
|
||||||
|
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
if test "$$subdir" = .; then :; else \
|
||||||
|
test ! -f $$subdir/TAGS || \
|
||||||
|
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||||
|
fi; \
|
||||||
|
done; \
|
||||||
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
|
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
|
||||||
unique=`for i in $$list; do \
|
unique=`for i in $$list; do \
|
||||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||||
|
@ -699,7 +473,7 @@ TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||||
$$tags $$unique; \
|
$$tags $$unique; \
|
||||||
fi
|
fi
|
||||||
ctags: CTAGS
|
ctags: CTAGS
|
||||||
CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||||
$(TAGS_FILES) $(LISP)
|
$(TAGS_FILES) $(LISP)
|
||||||
tags=; \
|
tags=; \
|
||||||
here=`pwd`; \
|
here=`pwd`; \
|
||||||
|
@ -749,6 +523,23 @@ distdir: $(DISTFILES)
|
||||||
|| exit 1; \
|
|| exit 1; \
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
|
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||||
|
if test "$$subdir" = .; then :; else \
|
||||||
|
test -d "$(distdir)/$$subdir" \
|
||||||
|
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||||
|
|| exit 1; \
|
||||||
|
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||||
|
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||||
|
(cd $$subdir && \
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) \
|
||||||
|
top_distdir="$$top_distdir" \
|
||||||
|
distdir="$$distdir/$$subdir" \
|
||||||
|
am__remove_distdir=: \
|
||||||
|
am__skip_length_check=: \
|
||||||
|
distdir) \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
||||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||||
|
@ -847,21 +638,22 @@ distcleancheck: distclean
|
||||||
$(distcleancheck_listfiles) ; \
|
$(distcleancheck_listfiles) ; \
|
||||||
exit 1; } >&2
|
exit 1; } >&2
|
||||||
check-am: all-am
|
check-am: all-am
|
||||||
check: check-am
|
check: check-recursive
|
||||||
all-am: Makefile $(PROGRAMS) config.h
|
all-am: Makefile $(PROGRAMS) config.h
|
||||||
installdirs:
|
installdirs: installdirs-recursive
|
||||||
|
installdirs-am:
|
||||||
for dir in "$(DESTDIR)$(bindir)"; do \
|
for dir in "$(DESTDIR)$(bindir)"; do \
|
||||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||||
done
|
done
|
||||||
install: install-am
|
install: install-recursive
|
||||||
install-exec: install-exec-am
|
install-exec: install-exec-recursive
|
||||||
install-data: install-data-am
|
install-data: install-data-recursive
|
||||||
uninstall: uninstall-am
|
uninstall: uninstall-recursive
|
||||||
|
|
||||||
install-am: all-am
|
install-am: all-am
|
||||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
|
||||||
installcheck: installcheck-am
|
installcheck: installcheck-recursive
|
||||||
install-strip:
|
install-strip:
|
||||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
@ -877,82 +669,87 @@ distclean-generic:
|
||||||
maintainer-clean-generic:
|
maintainer-clean-generic:
|
||||||
@echo "This command is intended for maintainers to use"
|
@echo "This command is intended for maintainers to use"
|
||||||
@echo "it deletes files that may require special tools to rebuild."
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
clean: clean-am
|
clean: clean-recursive
|
||||||
|
|
||||||
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
|
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
|
||||||
|
|
||||||
distclean: distclean-am
|
distclean: distclean-recursive
|
||||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||||
-rm -rf ./$(DEPDIR)
|
-rm -rf ./$(DEPDIR)
|
||||||
-rm -f Makefile
|
-rm -f Makefile
|
||||||
distclean-am: clean-am distclean-compile distclean-generic \
|
distclean-am: clean-am distclean-compile distclean-generic \
|
||||||
distclean-hdr distclean-tags
|
distclean-hdr distclean-libtool distclean-tags
|
||||||
|
|
||||||
dvi: dvi-am
|
dvi: dvi-recursive
|
||||||
|
|
||||||
dvi-am:
|
dvi-am:
|
||||||
|
|
||||||
html: html-am
|
html: html-recursive
|
||||||
|
|
||||||
info: info-am
|
info: info-recursive
|
||||||
|
|
||||||
info-am:
|
info-am:
|
||||||
|
|
||||||
install-data-am:
|
install-data-am:
|
||||||
|
|
||||||
install-dvi: install-dvi-am
|
install-dvi: install-dvi-recursive
|
||||||
|
|
||||||
install-exec-am: install-binPROGRAMS
|
install-exec-am: install-binPROGRAMS
|
||||||
|
|
||||||
install-html: install-html-am
|
install-html: install-html-recursive
|
||||||
|
|
||||||
install-info: install-info-am
|
install-info: install-info-recursive
|
||||||
|
|
||||||
install-man:
|
install-man:
|
||||||
|
|
||||||
install-pdf: install-pdf-am
|
install-pdf: install-pdf-recursive
|
||||||
|
|
||||||
install-ps: install-ps-am
|
install-ps: install-ps-recursive
|
||||||
|
|
||||||
installcheck-am:
|
installcheck-am:
|
||||||
|
|
||||||
maintainer-clean: maintainer-clean-am
|
maintainer-clean: maintainer-clean-recursive
|
||||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||||
-rm -rf $(top_srcdir)/autom4te.cache
|
-rm -rf $(top_srcdir)/autom4te.cache
|
||||||
-rm -rf ./$(DEPDIR)
|
-rm -rf ./$(DEPDIR)
|
||||||
-rm -f Makefile
|
-rm -f Makefile
|
||||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
mostlyclean: mostlyclean-am
|
mostlyclean: mostlyclean-recursive
|
||||||
|
|
||||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic
|
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||||
|
mostlyclean-libtool
|
||||||
|
|
||||||
pdf: pdf-am
|
pdf: pdf-recursive
|
||||||
|
|
||||||
pdf-am:
|
pdf-am:
|
||||||
|
|
||||||
ps: ps-am
|
ps: ps-recursive
|
||||||
|
|
||||||
ps-am:
|
ps-am:
|
||||||
|
|
||||||
uninstall-am: uninstall-binPROGRAMS
|
uninstall-am: uninstall-binPROGRAMS
|
||||||
|
|
||||||
.MAKE: install-am install-strip
|
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
|
||||||
|
install-strip
|
||||||
|
|
||||||
.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
|
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
|
||||||
clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \
|
all all-am am--refresh check check-am clean clean-binPROGRAMS \
|
||||||
dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \
|
clean-generic clean-libtool ctags ctags-recursive dist \
|
||||||
distclean-compile distclean-generic distclean-hdr \
|
dist-all dist-bzip2 dist-gzip dist-shar dist-tarZ dist-zip \
|
||||||
distclean-tags distcleancheck distdir distuninstallcheck dvi \
|
distcheck distclean distclean-compile distclean-generic \
|
||||||
dvi-am html html-am info info-am install install-am \
|
distclean-hdr distclean-libtool distclean-tags distcleancheck \
|
||||||
install-binPROGRAMS install-data install-data-am install-dvi \
|
distdir distuninstallcheck dvi dvi-am html html-am info \
|
||||||
install-dvi-am install-exec install-exec-am install-html \
|
info-am install install-am install-binPROGRAMS install-data \
|
||||||
install-html-am install-info install-info-am install-man \
|
install-data-am install-dvi install-dvi-am install-exec \
|
||||||
install-pdf install-pdf-am install-ps install-ps-am \
|
install-exec-am install-html install-html-am install-info \
|
||||||
install-strip installcheck installcheck-am installdirs \
|
install-info-am install-man install-pdf install-pdf-am \
|
||||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
install-ps install-ps-am install-strip installcheck \
|
||||||
mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
|
installcheck-am installdirs installdirs-am maintainer-clean \
|
||||||
tags uninstall uninstall-am uninstall-binPROGRAMS
|
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||||
|
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||||
|
tags tags-recursive uninstall uninstall-am \
|
||||||
|
uninstall-binPROGRAMS
|
||||||
|
|
||||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
|
18
Object.h
18
Object.h
|
@ -1,18 +0,0 @@
|
||||||
#ifndef OBJECT_H_
|
|
||||||
#define OBJECT_H_
|
|
||||||
|
|
||||||
#include <cstring>
|
|
||||||
|
|
||||||
|
|
||||||
class Object {
|
|
||||||
public:
|
|
||||||
virtual ~Object() {}
|
|
||||||
|
|
||||||
virtual const char* getType() const = 0;
|
|
||||||
|
|
||||||
bool isOfType(const char *type) const {
|
|
||||||
return (std::strcmp(getType(), type) == 0);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*OBJECT_H_*/
|
|
|
@ -1,28 +0,0 @@
|
||||||
#ifndef PLAYERSTART_H_
|
|
||||||
#define PLAYERSTART_H_
|
|
||||||
|
|
||||||
#include "LevelObject.h"
|
|
||||||
#include "Vertex3d.h"
|
|
||||||
|
|
||||||
|
|
||||||
class PlayerStart : public Vertex3d, public LevelObject {
|
|
||||||
public:
|
|
||||||
virtual bool hit(const Vertex &v) const {
|
|
||||||
return (v.distanceSq(Vertex(getX(), getZ())) < 0.09);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual int getPriority() const {return 10;}
|
|
||||||
|
|
||||||
virtual const char* getType() const {
|
|
||||||
return "PlayerStart";
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool canMove() const {return true;}
|
|
||||||
|
|
||||||
virtual void move(float x, float y) {
|
|
||||||
setX(getX()+x);
|
|
||||||
setZ(getZ()+y);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*PLAYERSTART_H_*/
|
|
360
Polygon.cpp
360
Polygon.cpp
|
@ -1,360 +0,0 @@
|
||||||
#include "Polygon.h"
|
|
||||||
#include "Line.h"
|
|
||||||
#include <list>
|
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
|
|
||||||
float Polygon::signedArea() const {
|
|
||||||
float d = 0.0;
|
|
||||||
|
|
||||||
for(const_iterator it = begin(); it != end(); it++) {
|
|
||||||
const_iterator it2 = it+1;
|
|
||||||
if(it2 == end()) it2 = begin();
|
|
||||||
|
|
||||||
d += (it2->getX()+it->getX())*(it2->getY()-it->getY());
|
|
||||||
}
|
|
||||||
|
|
||||||
return d/2;
|
|
||||||
}
|
|
||||||
|
|
||||||
float Polygon::area() const {
|
|
||||||
return fabsf(signedArea());
|
|
||||||
}
|
|
||||||
|
|
||||||
float Polygon::perimeter() const {
|
|
||||||
float d = 0.0;
|
|
||||||
|
|
||||||
for(const_iterator it = begin(); it != end(); it++) {
|
|
||||||
const_iterator it2 = it+1;
|
|
||||||
if(it2 == end()) it2 = begin();
|
|
||||||
|
|
||||||
d += it->distance(*it2);
|
|
||||||
}
|
|
||||||
|
|
||||||
return d;
|
|
||||||
}
|
|
||||||
|
|
||||||
int Polygon::quadrant(const Vertex &v) const {
|
|
||||||
if(v.getX() > 0 && v.getY() >= 0) return 1;
|
|
||||||
if(v.getX() >= 0 && v.getY() < 0) return 2;
|
|
||||||
if(v.getX() < 0 && v.getY() <= 0) return 3;
|
|
||||||
if(v.getX() <= 0 && v.getY() > 0) return 4;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Polygon::contains(const Vertex &v) const {
|
|
||||||
const Line d1(-1, -1, 1, 1);
|
|
||||||
const Line d2(-1, 1, 1, -1);
|
|
||||||
int d = 0;
|
|
||||||
int q, ql, q2;
|
|
||||||
Line l;
|
|
||||||
Vertex v2;
|
|
||||||
|
|
||||||
|
|
||||||
if(empty()) return false;
|
|
||||||
|
|
||||||
v2 = back() - v;
|
|
||||||
q = quadrant(v2);
|
|
||||||
|
|
||||||
if(q == 0) return true;
|
|
||||||
|
|
||||||
for(const_iterator it = begin(); it != end(); it++) {
|
|
||||||
ql = q;
|
|
||||||
|
|
||||||
v2 = *it - v;
|
|
||||||
q = quadrant(v2);
|
|
||||||
|
|
||||||
if(q == 0) return true;
|
|
||||||
|
|
||||||
switch(q-ql) {
|
|
||||||
case 0:
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
case -3:
|
|
||||||
d++;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
case -1:
|
|
||||||
d--;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
l.setVertex1(((it == begin()) ? back() : *(it-1)) - v);
|
|
||||||
l.setVertex2(v2);
|
|
||||||
|
|
||||||
if(q == 1 || q == 3) {
|
|
||||||
if(!(l.intersects(d2, &v2) & INTERSECTION_LINE)) return false;
|
|
||||||
|
|
||||||
q2 = quadrant(v2);
|
|
||||||
if(q2 == 0) return true;
|
|
||||||
|
|
||||||
if((q == 1 && q2 == 2) || (q == 3 && q2 == 4)) d -= 2;
|
|
||||||
else d += 2;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if(!(l.intersects(d1, &v2) & INTERSECTION_LINE)) return false;
|
|
||||||
|
|
||||||
q2 = quadrant(v2);
|
|
||||||
if(q2 == 0) return true;
|
|
||||||
|
|
||||||
if((q == 2 && q2 == 3) || (q == 4 && q2 == 1)) d -= 2;
|
|
||||||
else d += 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return (d != 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Polygon::intersects(const Line &l) const {
|
|
||||||
Line line;
|
|
||||||
|
|
||||||
for(const_iterator it = begin(); it != end(); it++) {
|
|
||||||
const_iterator it2 = it+1;
|
|
||||||
if(it2 == end()) it2 = begin();
|
|
||||||
|
|
||||||
line.setVertex1(*it);
|
|
||||||
line.setVertex2(*it2);
|
|
||||||
|
|
||||||
if(l.intersects(line, NULL) == INTERSECTION_SEGMENT_SEGMENT)
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Polygon::isConcave(const Direction &dir, const Vertex &v1, const Vertex &v2, const Vertex &v3) const {
|
|
||||||
switch(dir) {
|
|
||||||
case Triangle::CW:
|
|
||||||
return (v1.getX()-v2.getX())*(v3.getY()-v2.getY()) > (v3.getX()-v2.getX())*(v1.getY()-v2.getY());
|
|
||||||
case Triangle::CCW:
|
|
||||||
return (v1.getX()-v2.getX())*(v3.getY()-v2.getY()) < (v3.getX()-v2.getX())*(v1.getY()-v2.getY());
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Polygon::intersections(std::vector<Intersection> *intersections) const {
|
|
||||||
bool ret = false;
|
|
||||||
size_t s = size();
|
|
||||||
|
|
||||||
for(size_t i = 0; i+2 < s; i++) {
|
|
||||||
Line l(at(i), at(i+1));
|
|
||||||
|
|
||||||
for(size_t j = i+2; j < s; j++) {
|
|
||||||
if(i == (j+1)%s) continue;
|
|
||||||
|
|
||||||
Line l2(at(j), at((j+1)%s));
|
|
||||||
|
|
||||||
Vertex v;
|
|
||||||
if(l.intersects(l2, &v) == INTERSECTION_SEGMENT_SEGMENT) {
|
|
||||||
if(intersections) {
|
|
||||||
Intersection in = {i, i+1, j, ((j+1)%s), v};
|
|
||||||
|
|
||||||
intersections->push_back(in);
|
|
||||||
ret = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
Polygon::Direction Polygon::getDirection() const {
|
|
||||||
float area = signedArea();
|
|
||||||
|
|
||||||
return (area > 0) ? Triangle::CW : (area < 0) ? Triangle::CCW : Triangle::UNKNOWN;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Polygon::isSimple() const {
|
|
||||||
return !intersections();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Polygon::simplify(std::list<Polygon> &polygons) const {
|
|
||||||
std::vector<Intersection> ins;
|
|
||||||
std::vector<Intersection*> inlist;
|
|
||||||
|
|
||||||
if(!intersections(&ins)) return false;
|
|
||||||
|
|
||||||
size_t s = size();
|
|
||||||
size_t start = 0;
|
|
||||||
|
|
||||||
for(size_t i = 1; i < s; i++) {
|
|
||||||
if(at(i).getX() < at(start).getX())
|
|
||||||
start = i;
|
|
||||||
else if(at(i).getX() == at(start).getX() && at(i).getY() < at(start).getY())
|
|
||||||
start = i;
|
|
||||||
}
|
|
||||||
|
|
||||||
int dir = Triangle(at((s+start-1)%s), at(start), at((start+1)%s)).getDirection();
|
|
||||||
|
|
||||||
size_t i2 = start;
|
|
||||||
const Vertex *v2 = &at(i2);
|
|
||||||
bool intersected;
|
|
||||||
|
|
||||||
polygons.push_back(Polygon());
|
|
||||||
|
|
||||||
do {
|
|
||||||
intersected = false;
|
|
||||||
|
|
||||||
size_t i = i2;
|
|
||||||
|
|
||||||
if(dir == Triangle::CW)
|
|
||||||
i2 = (i2+1)%s;
|
|
||||||
else
|
|
||||||
i2 = (s+i2-1)%s;
|
|
||||||
|
|
||||||
const Vertex *v1 = v2;
|
|
||||||
v2 = &at(i2);
|
|
||||||
|
|
||||||
float dl = v2->distanceSq(*v1);
|
|
||||||
|
|
||||||
Intersection *intr = NULL;
|
|
||||||
Vertex *v = NULL;
|
|
||||||
float dv = 0;
|
|
||||||
size_t v3 = 0, v4 = 0;
|
|
||||||
|
|
||||||
for(std::vector<Intersection>::iterator in = ins.begin(); in != ins.end(); ++in) {
|
|
||||||
float di = v2->distanceSq(in->v);
|
|
||||||
|
|
||||||
if(di >= dl || v1 == &in->v)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if(v && di < dv)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if((i == in->va1 && i2 == in->va2) || (i == in->va2 && i2 == in->va1)) {
|
|
||||||
intr = &*in;
|
|
||||||
|
|
||||||
v = &in->v;
|
|
||||||
dv = di;
|
|
||||||
v3 = in->vb1;
|
|
||||||
v4 = in->vb2;
|
|
||||||
}
|
|
||||||
else if((i == in->vb1 && i2 == in->vb2) || (i == in->vb2 && i2 == in->vb1)) {
|
|
||||||
intr = &*in;
|
|
||||||
|
|
||||||
v = &in->v;
|
|
||||||
dv = di;
|
|
||||||
v3 = in->va1;
|
|
||||||
v4 = in->va2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(intr) {
|
|
||||||
if(isConcave(Triangle::CW, *v1, *v2, at(v4))) {
|
|
||||||
if(!Line(*v1, *v2).contains(at(v3))) {
|
|
||||||
i2 = v3;
|
|
||||||
dir = Triangle::CW;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if(!Line(*v1, *v2).contains(at(v4))) {
|
|
||||||
i2 = v4;
|
|
||||||
dir = Triangle::CCW;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
v2 = v;
|
|
||||||
intersected = true;
|
|
||||||
|
|
||||||
std::vector<Intersection*>::reverse_iterator it = inlist.rbegin();
|
|
||||||
for(; it != inlist.rend(); it++) {
|
|
||||||
if(*it == intr) break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(it != inlist.rend()) {
|
|
||||||
inlist.erase(it.base()-1, inlist.end());
|
|
||||||
|
|
||||||
polygons.push_back(Polygon());
|
|
||||||
|
|
||||||
while(!polygons.front().empty()) {
|
|
||||||
polygons.back().push_back(polygons.front().back());
|
|
||||||
polygons.front().pop_back();
|
|
||||||
|
|
||||||
if(v->distanceSq(polygons.back().back()) < 1E-12)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
inlist.push_back(intr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
polygons.front().push_back(*v2);
|
|
||||||
} while(i2 != start || intersected);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Polygon::doTriangulate(std::vector<Triangle> &triangles) const {
|
|
||||||
size_t s = size();
|
|
||||||
|
|
||||||
if(s < 3) return;
|
|
||||||
|
|
||||||
std::vector<size_t> p;
|
|
||||||
std::list<size_t> concave;
|
|
||||||
Direction dir = getDirection();
|
|
||||||
|
|
||||||
for(size_t i = 0; i < s; i++) {
|
|
||||||
p.push_back((i+1)%s);
|
|
||||||
|
|
||||||
if(isConcave(dir, at(i), at((i+1)%s), at((i+2)%s)))
|
|
||||||
concave.push_back((i+1)%s);
|
|
||||||
}
|
|
||||||
|
|
||||||
for(size_t i = 0; i < p.size() && p.size() > 3; i++) {
|
|
||||||
size_t s2 = p.size();
|
|
||||||
|
|
||||||
const Vertex *v0 = &at(p[i]);
|
|
||||||
const Vertex *v1 = &at(p[(i+1)%s2]);
|
|
||||||
const Vertex *v2 = &at(p[(i+2)%s2]);
|
|
||||||
const Vertex *v3 = &at(p[(i+3)%s2]);
|
|
||||||
const Vertex *v4 = &at(p[(i+4)%s2]);
|
|
||||||
|
|
||||||
|
|
||||||
if(isConcave(dir, *v1, *v2, *v3))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
Triangle t(*v1, *v2, *v3);
|
|
||||||
|
|
||||||
std::list<size_t>::iterator it = concave.begin();
|
|
||||||
|
|
||||||
for(; it != concave.end(); it++) {
|
|
||||||
if(*it != p[(i+1)%s2] && *it != p[(i+3)%s2] && t.contains(at(*it)))
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(it != concave.end())
|
|
||||||
continue;
|
|
||||||
|
|
||||||
triangles.push_back(t);
|
|
||||||
|
|
||||||
if(isConcave(dir, *v2, *v3, *v4) && !isConcave(dir, *v1, *v3, *v4))
|
|
||||||
concave.remove(p[(i+3)%s2]);
|
|
||||||
|
|
||||||
if(isConcave(dir, *v0, *v1, *v2) && !isConcave(dir, *v0, *v1, *v3)) {
|
|
||||||
concave.remove(p[(i+1)%s2]);
|
|
||||||
}
|
|
||||||
|
|
||||||
p.erase(p.begin()+(i+2)%s2);
|
|
||||||
i = -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
triangles.push_back(Triangle(at(p[0]), at(p[1]), at(p[2])));
|
|
||||||
}
|
|
||||||
|
|
||||||
void Polygon::triangulate(std::vector<Triangle> &triangles) const {
|
|
||||||
std::list<Polygon> polygons;
|
|
||||||
|
|
||||||
if(simplify(polygons)) {
|
|
||||||
for(std::list<Polygon>::iterator p = polygons.begin(); p != polygons.end(); p++)
|
|
||||||
p->doTriangulate(triangles);
|
|
||||||
}
|
|
||||||
else doTriangulate(triangles);
|
|
||||||
}
|
|
43
Polygon.h
43
Polygon.h
|
@ -1,43 +0,0 @@
|
||||||
#ifndef POLYGON_H_
|
|
||||||
#define POLYGON_H_
|
|
||||||
|
|
||||||
#include "Vertex.h"
|
|
||||||
#include "Line.h"
|
|
||||||
#include "Triangle.h"
|
|
||||||
#include <vector>
|
|
||||||
#include <list>
|
|
||||||
|
|
||||||
class Polygon : public std::vector<Vertex> {
|
|
||||||
private:
|
|
||||||
struct Intersection {
|
|
||||||
size_t va1, va2, vb1, vb2;
|
|
||||||
Vertex v;
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef Triangle::Direction Direction;
|
|
||||||
|
|
||||||
int quadrant(const Vertex &v) const;
|
|
||||||
|
|
||||||
float signedArea() const;
|
|
||||||
|
|
||||||
bool isConcave(const Triangle::Direction &dir, const Vertex &v1, const Vertex &v2, const Vertex &v3) const;
|
|
||||||
|
|
||||||
bool intersections(std::vector<Intersection> *intersections = NULL) const;
|
|
||||||
|
|
||||||
void doTriangulate(std::vector<Triangle> &triangles) const;
|
|
||||||
public:
|
|
||||||
float area() const;
|
|
||||||
float perimeter() const;
|
|
||||||
|
|
||||||
bool contains(const Vertex &v) const;
|
|
||||||
bool intersects(const Line &l) const;
|
|
||||||
|
|
||||||
Triangle::Direction getDirection() const;
|
|
||||||
|
|
||||||
bool isSimple() const;
|
|
||||||
bool simplify(std::list<Polygon> &polygons) const;
|
|
||||||
|
|
||||||
void triangulate(std::vector<Triangle> &triangles) const;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*POLYGON_H_*/
|
|
141
Portal.h
141
Portal.h
|
@ -1,141 +0,0 @@
|
||||||
#ifndef PORTAL_H_
|
|
||||||
#define PORTAL_H_
|
|
||||||
|
|
||||||
#include "LevelObject.h"
|
|
||||||
#include "Polygon.h"
|
|
||||||
#include "VertexProvider.h"
|
|
||||||
#include "LevelVertex.h"
|
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
|
|
||||||
class Portal : public LevelObject, public VertexProvider {
|
|
||||||
private:
|
|
||||||
float width, height, thickness;
|
|
||||||
Vertex pos;
|
|
||||||
float orient;
|
|
||||||
|
|
||||||
Vertex vertices[4];
|
|
||||||
float s, c;
|
|
||||||
bool connected[4];
|
|
||||||
|
|
||||||
|
|
||||||
void updateVertices() {
|
|
||||||
float x = width/2*c;
|
|
||||||
float y = width/2*s;
|
|
||||||
float ts = thickness/2*s;
|
|
||||||
float tc = thickness/2*c;
|
|
||||||
|
|
||||||
vertices[0].setLocation(pos.getX()-x-ts, pos.getY()-y+tc);
|
|
||||||
vertices[1].setLocation(pos.getX()-x+ts, pos.getY()-y-tc);
|
|
||||||
vertices[2].setLocation(pos.getX()+x+ts, pos.getY()+y-tc);
|
|
||||||
vertices[3].setLocation(pos.getX()+x-ts, pos.getY()+y+tc);
|
|
||||||
}
|
|
||||||
|
|
||||||
void updateOrient() {
|
|
||||||
s = sinf(orient);
|
|
||||||
c = cosf(orient);
|
|
||||||
|
|
||||||
updateVertices();
|
|
||||||
}
|
|
||||||
|
|
||||||
Polygon createPolygon() const {
|
|
||||||
Polygon p;
|
|
||||||
|
|
||||||
for(int i = 0; i < 4; i++)
|
|
||||||
p.push_back(vertices[i]);
|
|
||||||
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
|
||||||
Portal(float width, float height, float thickness) {
|
|
||||||
this->width = width;
|
|
||||||
this->height = height;
|
|
||||||
this->thickness = thickness;
|
|
||||||
|
|
||||||
orient = 0;
|
|
||||||
|
|
||||||
for(int i = 0; i < 4; i++) {
|
|
||||||
connected[i] = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
updateOrient();
|
|
||||||
}
|
|
||||||
|
|
||||||
float getWidth() const {return width;}
|
|
||||||
float getHeight() const {return height;}
|
|
||||||
float getThickness() const {return thickness;}
|
|
||||||
|
|
||||||
const Vertex& getPosition() const {return pos;}
|
|
||||||
void setPosition(Vertex v) {pos = v; updateVertices();}
|
|
||||||
|
|
||||||
float getOrientation() const {return orient;}
|
|
||||||
void setOrientation(float orient) {this->orient = orient; updateOrient();}
|
|
||||||
|
|
||||||
virtual std::vector<SharedPtr<LevelObject> > getChildren() {
|
|
||||||
std::vector<SharedPtr<LevelObject> > children;
|
|
||||||
|
|
||||||
for(size_t i = 0; i < 4; i++)
|
|
||||||
children.push_back(SharedPtr<LevelObject>(new LevelVertex(this, i, this)));
|
|
||||||
|
|
||||||
return children;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool hit(const Vertex &v) const {return createPolygon().contains(v);}
|
|
||||||
virtual int getPriority() const {return 1;}
|
|
||||||
|
|
||||||
virtual const char* getType() const {
|
|
||||||
return "Portal";
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void move(float x, float y) {
|
|
||||||
pos += Vertex(x, y);
|
|
||||||
updateVertices();
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void rotate(Vertex m, float a) {
|
|
||||||
orient = fmodf(orient+a, 2*M_PI);
|
|
||||||
|
|
||||||
s = sinf(a);
|
|
||||||
c = cosf(a);
|
|
||||||
|
|
||||||
pos -= m;
|
|
||||||
pos.setLocation(c*pos.getX() - s*pos.getY(), c*pos.getY() + s*pos.getX());
|
|
||||||
pos += m;
|
|
||||||
|
|
||||||
updateOrient();
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual const Vertex* getVertex(size_t id) const {
|
|
||||||
return &vertices[id];
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual size_t getVertexCount() const {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool canMove() const {return true;}
|
|
||||||
|
|
||||||
virtual void moveVertex(size_t id, float x, float y) {
|
|
||||||
move(x, y);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool canRotate() const {return true;}
|
|
||||||
|
|
||||||
virtual void rotateVertex(size_t id, Vertex m, float a) {
|
|
||||||
rotate(m, a);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool canConnectVertex(size_t id) const {
|
|
||||||
return !connected[id];
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual size_t connectVertex(size_t id) {
|
|
||||||
connected[id] = true;
|
|
||||||
connected[(7-id)%4] = true;
|
|
||||||
|
|
||||||
return (7-id)%4;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*PORTAL_H_*/
|
|
|
@ -1,50 +0,0 @@
|
||||||
#include "Rectangle.h"
|
|
||||||
|
|
||||||
bool Rectangle::contains(const Vertex &v) const {
|
|
||||||
return (edges(v) == EDGE_NONE);
|
|
||||||
}
|
|
||||||
|
|
||||||
int Rectangle::edges(const Vertex &v) const {
|
|
||||||
int ret = EDGE_NONE;
|
|
||||||
|
|
||||||
if(v.getX() < v1.getX()) ret |= EDGE_LEFT;
|
|
||||||
else if(v.getX() >= v2.getX()) ret |= EDGE_RIGHT;
|
|
||||||
|
|
||||||
if(v.getY() < v1.getY()) ret |= EDGE_TOP;
|
|
||||||
else if(v.getY() >= v2.getY()) ret |= EDGE_BOTTOM;
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
int Rectangle::intersects(const Line &l, Vertex *v, int edge) const {
|
|
||||||
const Line top(v1.getX(), v1.getY(), v2.getX(), v1.getY());
|
|
||||||
const Line bottom(v1.getX(), v2.getY(), v2.getX(), v2.getY());
|
|
||||||
const Line left(v1.getX(), v1.getY(), v1.getX(), v2.getY());
|
|
||||||
const Line right(v2.getX(), v1.getY(), v2.getX(), v2.getY());
|
|
||||||
|
|
||||||
if(edge == EDGE_NONE) edge = edges(l.getVertex1());
|
|
||||||
|
|
||||||
if((edge & EDGE_TOP) && (top.intersects(l, v) == INTERSECTION_SEGMENT_SEGMENT))
|
|
||||||
return EDGE_TOP;
|
|
||||||
if((edge & EDGE_BOTTOM) && (bottom.intersects(l, v) == INTERSECTION_SEGMENT_SEGMENT))
|
|
||||||
return EDGE_BOTTOM;
|
|
||||||
if((edge & EDGE_LEFT) && (left.intersects(l, v) == INTERSECTION_SEGMENT_SEGMENT))
|
|
||||||
return EDGE_LEFT;
|
|
||||||
if((edge & EDGE_RIGHT) && (right.intersects(l, v) == INTERSECTION_SEGMENT_SEGMENT))
|
|
||||||
return EDGE_RIGHT;
|
|
||||||
|
|
||||||
v->setLocation(0, 0);
|
|
||||||
|
|
||||||
return EDGE_NONE;
|
|
||||||
}
|
|
||||||
|
|
||||||
int Rectangle::intersects(const Line &l, Vertex *v1, Vertex *v2, int edge) const {
|
|
||||||
int ret = EDGE_NONE;
|
|
||||||
|
|
||||||
if(edge == EDGE_NONE) edge = edges(l.getVertex1());
|
|
||||||
|
|
||||||
ret |= intersects(l, v1, edge);
|
|
||||||
ret |= intersects(l, v2, EDGE_ALL^edge);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
50
Rectangle.h
50
Rectangle.h
|
@ -1,50 +0,0 @@
|
||||||
#ifndef RECTANGLE_H_
|
|
||||||
#define RECTANGLE_H_
|
|
||||||
|
|
||||||
#include "Vertex.h"
|
|
||||||
#include "Line.h"
|
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
|
|
||||||
#define EDGE_NONE 0
|
|
||||||
#define EDGE_LEFT (1<<0)
|
|
||||||
#define EDGE_RIGHT (1<<1)
|
|
||||||
#define EDGE_TOP (1<<2)
|
|
||||||
#define EDGE_BOTTOM (1<<3)
|
|
||||||
#define EDGE_ALL (EDGE_LEFT|EDGE_RIGHT|EDGE_TOP|EDGE_BOTTOM)
|
|
||||||
|
|
||||||
class Rectangle {
|
|
||||||
private:
|
|
||||||
Vertex v1, v2;
|
|
||||||
public:
|
|
||||||
Rectangle() {}
|
|
||||||
Rectangle(const Vertex& vertex1, const Vertex& vertex2) : v1(vertex1), v2(vertex2) {}
|
|
||||||
Rectangle(float x, float y, float width, float height)
|
|
||||||
: v1(x, y), v2(x+width, y+height) {}
|
|
||||||
|
|
||||||
Vertex &getVertex1() {return v1;}
|
|
||||||
const Vertex &getVertex1() const {return v1;}
|
|
||||||
void setVertex1(const Vertex &v) {v1 = v;}
|
|
||||||
|
|
||||||
Vertex &getVertex2() {return v2;}
|
|
||||||
const Vertex &getVertex2() const {return v2;}
|
|
||||||
void setVertex2(const Vertex &v) {v2 = v;}
|
|
||||||
|
|
||||||
float getWidth() const {return v2.getX()-v1.getX();}
|
|
||||||
void setWidth(float width) {v2.setX(v1.getX()+width);}
|
|
||||||
|
|
||||||
float getHeight() const {return v2.getY()-v1.getY();}
|
|
||||||
void setHeight(float height) {v2.setY(v1.getY()+height);}
|
|
||||||
|
|
||||||
float area() const {return getWidth()*getHeight();}
|
|
||||||
|
|
||||||
bool contains(const Vertex &v) const;
|
|
||||||
|
|
||||||
int edges(const Vertex &v) const;
|
|
||||||
|
|
||||||
int intersects(const Line &l, Vertex *v, int edge = EDGE_NONE) const;
|
|
||||||
int intersects(const Line &l, Vertex *v1, Vertex *v2, int edge = EDGE_NONE) const;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#endif /*RECTANGLE_H_*/
|
|
255
Renderer.cpp
255
Renderer.cpp
|
@ -1,255 +0,0 @@
|
||||||
#include "Renderer.h"
|
|
||||||
#include "PlayerStart.h"
|
|
||||||
#include <GL/gl.h>
|
|
||||||
|
|
||||||
|
|
||||||
void Renderer::drawGrid(const Rectangle &rect, float scale) {
|
|
||||||
float depth = log10f(scale)-0.75f;
|
|
||||||
float depth2 = floorf(depth);
|
|
||||||
float step = powf(0.1f, depth2);
|
|
||||||
float f;
|
|
||||||
int i;
|
|
||||||
float x1 = rect.getVertex1().getX(), y1 = rect.getVertex1().getY();
|
|
||||||
float x2 = rect.getVertex2().getX(), y2 = rect.getVertex2().getY();
|
|
||||||
|
|
||||||
|
|
||||||
glBegin(GL_LINES);
|
|
||||||
|
|
||||||
for(i = 0; 0.4f*(depth-depth2+i-1) < 0.5f; i++) {
|
|
||||||
f = fminf(0.4f*(depth-depth2+i), 0.5f);
|
|
||||||
glColor3f(f, f, f);
|
|
||||||
|
|
||||||
for(f = x1 - fmodf(x1, step) - step; f <= x2; f+=step) {
|
|
||||||
glVertex2f(f, y1);
|
|
||||||
glVertex2f(f, y2);
|
|
||||||
}
|
|
||||||
|
|
||||||
for(f = y1 - fmodf(y1, step) - step; f <= y2; f+=step) {
|
|
||||||
glVertex2f(x1, f);
|
|
||||||
glVertex2f(x2, f);
|
|
||||||
}
|
|
||||||
|
|
||||||
step *= 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
glEnd();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Renderer::fillPolygon(const Polygon &polygon) {
|
|
||||||
std::vector<Triangle> triangles;
|
|
||||||
|
|
||||||
polygon.triangulate(triangles);
|
|
||||||
|
|
||||||
glBegin(GL_TRIANGLES);
|
|
||||||
|
|
||||||
for(std::vector<Triangle>::iterator t = triangles.begin(); t != triangles.end(); t++) {
|
|
||||||
glVertex2f(t->getVertexA().getX(), t->getVertexA().getY());
|
|
||||||
glVertex2f(t->getVertexB().getX(), t->getVertexB().getY());
|
|
||||||
glVertex2f(t->getVertexC().getX(), t->getVertexC().getY());
|
|
||||||
}
|
|
||||||
|
|
||||||
glEnd();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Renderer::drawPolygon(const Polygon &polygon) {
|
|
||||||
glBegin(GL_LINE_LOOP);
|
|
||||||
|
|
||||||
for(Polygon::const_iterator vertex = polygon.begin(); vertex != polygon.end(); vertex++)
|
|
||||||
glVertex2f(vertex->getX(), vertex->getY());
|
|
||||||
|
|
||||||
glEnd();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Renderer::drawCircle(const Vertex &m, float r, int n) {
|
|
||||||
glBegin(GL_LINE_LOOP);
|
|
||||||
|
|
||||||
for(int i = 0; i < n; i++)
|
|
||||||
glVertex2f(m.getX()+r*cosf(2*M_PI*i/n), m.getY()+r*sinf(2*M_PI*i/n));
|
|
||||||
|
|
||||||
glEnd();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Renderer::drawCircleDotted(const Vertex &m, float r, int n, int d, float rot) {
|
|
||||||
glBegin(GL_LINES);
|
|
||||||
|
|
||||||
for(int i = 0; i < n; i++) {
|
|
||||||
if(2*d*(i%(n/d)) >= n)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
glVertex2f(m.getX()+r*cosf(rot+2*M_PI*i/n), m.getY()+r*sinf(rot+2*M_PI*i/n));
|
|
||||||
glVertex2f(m.getX()+r*cosf(rot+2*M_PI*(i+1)/n), m.getY()+r*sinf(rot+2*M_PI*(i+1)/n));
|
|
||||||
}
|
|
||||||
|
|
||||||
glEnd();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Renderer::fillCircle(const Vertex &m, float r, int n) {
|
|
||||||
glBegin(GL_POLYGON);
|
|
||||||
|
|
||||||
for(int i = 0; i < n; i++)
|
|
||||||
glVertex2f(m.getX()+r*cosf(2*M_PI*i/n), m.getY()+r*sinf(2*M_PI*i/n));
|
|
||||||
|
|
||||||
glEnd();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Renderer::drawCross(const Vertex &m, float r) {
|
|
||||||
glBegin(GL_LINES);
|
|
||||||
|
|
||||||
glVertex2f(m.getX()-r*M_SQRT1_2, m.getY()-r*M_SQRT1_2);
|
|
||||||
glVertex2f(m.getX()+r*M_SQRT1_2, m.getY()+r*M_SQRT1_2);
|
|
||||||
|
|
||||||
glVertex2f(m.getX()+r*M_SQRT1_2, m.getY()-r*M_SQRT1_2);
|
|
||||||
glVertex2f(m.getX()-r*M_SQRT1_2, m.getY()+r*M_SQRT1_2);
|
|
||||||
|
|
||||||
glEnd();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Renderer::renderObject(const LevelObject &object, bool selected, bool hovered, float scale) {
|
|
||||||
if(object.isOfType("LevelVertex"))
|
|
||||||
renderLevelVertex(*(LevelVertex*)&object, selected, hovered, scale);
|
|
||||||
else if(object.isOfType("LevelEdge"))
|
|
||||||
renderLevelEdge(*(LevelEdge*)&object, selected, hovered, scale);
|
|
||||||
else if(object.isOfType("Room"))
|
|
||||||
renderRoom(*(Room*)&object, selected, hovered, scale);
|
|
||||||
else if(object.isOfType("PlayerStart"))
|
|
||||||
renderPlayerStart(*(PlayerStart*)&object, selected, hovered, scale);
|
|
||||||
else if(object.isOfType("Portal"))
|
|
||||||
renderPortal(*(Portal*)&object, selected, hovered, scale);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Renderer::renderLevelVertex(const LevelVertex &vertex, bool selected, bool hovered, float scale) {
|
|
||||||
if(!selected && !hovered) return;
|
|
||||||
|
|
||||||
glColor4f(0.0f, 0.0f, 0.0f, 1.0f);
|
|
||||||
fillCircle(*vertex, 3.5f/scale, 16);
|
|
||||||
|
|
||||||
glLineWidth(1.0f);
|
|
||||||
if(hovered)
|
|
||||||
glColor4f(1.0f, 0.9f, 0.0f, 0.9f);
|
|
||||||
else
|
|
||||||
glColor4f(1.0f, 0.7f, 0.0f, 0.9f);
|
|
||||||
drawCircle(*vertex, 3.5f/scale, 16);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Renderer::renderLevelEdge(const LevelEdge &edge, bool selected, bool hovered, float scale) {
|
|
||||||
if(selected) {
|
|
||||||
glColor4f(1.0f, 1.0f, 1.0f, 0.9f);
|
|
||||||
glLineWidth(2.0f);
|
|
||||||
}
|
|
||||||
else if(hovered) {
|
|
||||||
glColor4f(0.0f, 0.7f, 1.0f, 0.7f);
|
|
||||||
glLineWidth(2.0f);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return;
|
|
||||||
|
|
||||||
glBegin(GL_LINES);
|
|
||||||
|
|
||||||
glVertex2f(edge->getVertex1()->getX(), edge->getVertex1()->getY());
|
|
||||||
glVertex2f(edge->getVertex2()->getX(), edge->getVertex2()->getY());
|
|
||||||
|
|
||||||
glEnd();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Renderer::renderRoom(const Room &room, bool selected, bool hovered, float scale) {
|
|
||||||
if(selected)
|
|
||||||
glColor4f(0.0f, 0.7f, 1.0f, 0.2f);
|
|
||||||
else
|
|
||||||
glColor4f(0.0f, 0.7f, 1.0f, 0.3f);
|
|
||||||
|
|
||||||
fillPolygon(room.getPolygon());
|
|
||||||
|
|
||||||
if(selected) {
|
|
||||||
glColor4f(1.0f, 1.0f, 1.0f, 0.9f);
|
|
||||||
glLineWidth(2.0f);
|
|
||||||
}
|
|
||||||
else if(hovered) {
|
|
||||||
glColor4f(0.0f, 0.7f, 1.0f, 0.7f);
|
|
||||||
glLineWidth(2.0f);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
glColor4f(0.0f, 0.7f, 1.0f, 0.7f);
|
|
||||||
glLineWidth(1.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
glBegin(GL_LINES);
|
|
||||||
|
|
||||||
for(size_t i = 0; i < room.getEdgeCount(); i++) {
|
|
||||||
const Edge *edge = room.getEdge(i);
|
|
||||||
glVertex2f(edge->getVertex1()->getX(), edge->getVertex1()->getY());
|
|
||||||
glVertex2f(edge->getVertex2()->getX(), edge->getVertex2()->getY());
|
|
||||||
}
|
|
||||||
|
|
||||||
glEnd();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Renderer::renderPlayerStart(const PlayerStart &start, bool selected, bool hovered, float scale) {
|
|
||||||
if(selected) {
|
|
||||||
glColor4f(1.0f, 1.0f, 1.0f, 0.9f);
|
|
||||||
glLineWidth(2.0f);
|
|
||||||
}
|
|
||||||
else if(hovered) {
|
|
||||||
glColor4f(0.0f, 0.7f, 0.7f, 0.7f);
|
|
||||||
glLineWidth(2.0f);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
glColor4f(0.0f, 0.7f, 0.7f, 0.7f);
|
|
||||||
glLineWidth(1.0f);
|
|
||||||
}
|
|
||||||
drawCircle(Vertex(start.getX(), start.getZ()), 0.3f);
|
|
||||||
|
|
||||||
glLineWidth(2.0f);
|
|
||||||
glColor4f(1.0f, 1.0f, 1.0f, 0.7f);
|
|
||||||
drawCross(Vertex(start.getX(), start.getZ()), 0.5f/sqrtf(scale));
|
|
||||||
}
|
|
||||||
|
|
||||||
void Renderer::renderPortal(const Portal &portal, bool selected, bool hovered, float scale) {
|
|
||||||
if(selected) {
|
|
||||||
glColor4f(1.0f, 1.0f, 1.0f, 0.9f);
|
|
||||||
glLineWidth(2.0f);
|
|
||||||
}
|
|
||||||
else if(hovered) {
|
|
||||||
glColor4f(0.0f, 0.7f, 0.7f, 0.7f);
|
|
||||||
glLineWidth(2.0f);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
glColor4f(0.0f, 0.7f, 0.7f, 0.7f);
|
|
||||||
glLineWidth(1.0f);
|
|
||||||
}
|
|
||||||
|
|
||||||
float s = sinf(portal.getOrientation());
|
|
||||||
float c = cosf(portal.getOrientation());
|
|
||||||
float x = portal.getWidth()/2*c;
|
|
||||||
float y = portal.getWidth()/2*s;
|
|
||||||
float ts = portal.getThickness()/2*s;
|
|
||||||
float tc = portal.getThickness()/2*c;
|
|
||||||
|
|
||||||
glBegin(GL_LINES);
|
|
||||||
|
|
||||||
glVertex2f(portal.getPosition().getX()-x+ts, portal.getPosition().getY()-y-tc);
|
|
||||||
glVertex2f(portal.getPosition().getX()-x-ts, portal.getPosition().getY()-y+tc);
|
|
||||||
|
|
||||||
glVertex2f(portal.getPosition().getX()+x+ts, portal.getPosition().getY()+y-tc);
|
|
||||||
glVertex2f(portal.getPosition().getX()+x-ts, portal.getPosition().getY()+y+tc);
|
|
||||||
|
|
||||||
glColor4f(1.0f, 1.0f, 1.0f, 0.9f);
|
|
||||||
|
|
||||||
glVertex2f(portal.getPosition().getX()-x, portal.getPosition().getY()-y);
|
|
||||||
glVertex2f(portal.getPosition().getX()+x, portal.getPosition().getY()+y);
|
|
||||||
|
|
||||||
glEnd();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Renderer::render(const Level &level, const Rectangle &rect, float scale) {
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
|
||||||
|
|
||||||
glLineWidth(1.0f);
|
|
||||||
glPointSize(10.0f);
|
|
||||||
|
|
||||||
drawGrid(rect, scale);
|
|
||||||
|
|
||||||
for(Level::const_iterator object = level.begin(); object != level.end(); object++) {
|
|
||||||
renderObject(**object, (&**object == editManager->getSelectedObject()),
|
|
||||||
(&**object == editManager->getHoveredObject()), scale);
|
|
||||||
}
|
|
||||||
}
|
|
47
Renderer.h
47
Renderer.h
|
@ -1,47 +0,0 @@
|
||||||
#ifndef RENDERER_H_
|
|
||||||
#define RENDERER_H_
|
|
||||||
|
|
||||||
#include "Rectangle.h"
|
|
||||||
#include "Polygon.h"
|
|
||||||
#include "EditManager.h"
|
|
||||||
#include "Level.h"
|
|
||||||
#include "Room.h"
|
|
||||||
#include "PlayerStart.h"
|
|
||||||
#include "Portal.h"
|
|
||||||
#include "LevelEdge.h"
|
|
||||||
|
|
||||||
|
|
||||||
class Renderer {
|
|
||||||
private:
|
|
||||||
EditManager *editManager;
|
|
||||||
|
|
||||||
void drawGrid(const Rectangle &rect, float scale);
|
|
||||||
|
|
||||||
protected:
|
|
||||||
void fillPolygon(const Polygon &polygon);
|
|
||||||
void drawPolygon(const Polygon &polygon);
|
|
||||||
void fillCircle(const Vertex &m, float r, int n = 64);
|
|
||||||
void drawCircle(const Vertex &m, float r, int n = 64);
|
|
||||||
void drawCircleDotted(const Vertex &m, float r, int n = 64, int d = 8, float rot = 0);
|
|
||||||
void drawCross(const Vertex &m, float r);
|
|
||||||
|
|
||||||
void renderObject(const LevelObject &object, bool selected, bool hovered, float scale);
|
|
||||||
|
|
||||||
void renderLevelVertex(const LevelVertex &vertex, bool selected, bool hovered, float scale);
|
|
||||||
void renderLevelEdge(const LevelEdge &edge, bool selected, bool hovered, float scale);
|
|
||||||
|
|
||||||
void renderRoom(const Room &room, bool selected, bool hovered, float scale);
|
|
||||||
void renderPlayerStart(const PlayerStart &start, bool selected, bool hovered, float scale);
|
|
||||||
void renderPortal(const Portal &portal, bool selected, bool hovered, float scale);
|
|
||||||
|
|
||||||
public:
|
|
||||||
Renderer(EditManager *editManager) {
|
|
||||||
this->editManager = editManager;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual ~Renderer() {}
|
|
||||||
|
|
||||||
virtual void render(const Level &level, const Rectangle &rect, float scale);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*RENDERER_H_*/
|
|
46
Room.cpp
46
Room.cpp
|
@ -1,46 +0,0 @@
|
||||||
#include "Room.h"
|
|
||||||
#include "LevelEdge.h"
|
|
||||||
|
|
||||||
|
|
||||||
const Room& Room::operator=(const Room &room) {
|
|
||||||
vertices.clear();
|
|
||||||
edges.clear();
|
|
||||||
|
|
||||||
name = room.name;
|
|
||||||
height = room.height;
|
|
||||||
|
|
||||||
vertices = room.vertices;
|
|
||||||
|
|
||||||
for(std::vector<Edge>::const_iterator edge = room.edges.begin(); edge != room.edges.end(); edge++) {
|
|
||||||
LevelVertex v1(this, edge->getVertex1().getId(), this);
|
|
||||||
LevelVertex v2(this, edge->getVertex2().getId(), this);
|
|
||||||
edges.push_back(Edge(v1, v2));
|
|
||||||
}
|
|
||||||
|
|
||||||
return room;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<SharedPtr<LevelObject> > Room::getChildren() {
|
|
||||||
std::vector<SharedPtr<LevelObject> > children;
|
|
||||||
|
|
||||||
for(size_t i = 0; i < vertices.size(); i++) {
|
|
||||||
if(vertices[i]->isDirect())
|
|
||||||
children.push_back(SharedPtr<LevelObject>(new LevelVertex(this, i, this)));
|
|
||||||
}
|
|
||||||
|
|
||||||
for(size_t i = 0; i < edges.size(); i++)
|
|
||||||
children.push_back(SharedPtr<LevelObject>(new LevelEdge(this, i, this)));
|
|
||||||
|
|
||||||
return children;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Room::rotate(Vertex m, float a) {
|
|
||||||
float s = sinf(a);
|
|
||||||
float c = cosf(a);
|
|
||||||
|
|
||||||
for(std::vector<SharedPtr<RoomVertex> >::iterator v = vertices.begin(); v != vertices.end(); v++) {
|
|
||||||
**v -= m;
|
|
||||||
(*v)->setLocation(c*(**v)->getX() - s*(**v)->getY(), c*(**v)->getY() + s*(**v)->getX());
|
|
||||||
**v += m;
|
|
||||||
}
|
|
||||||
}
|
|
210
Room.h
210
Room.h
|
@ -1,210 +0,0 @@
|
||||||
#ifndef ROOM_H_
|
|
||||||
#define ROOM_H_
|
|
||||||
|
|
||||||
#include "Polygon.h"
|
|
||||||
#include "SharedPtr.h"
|
|
||||||
#include "LevelObject.h"
|
|
||||||
#include "VertexProvider.h"
|
|
||||||
#include "EdgeProvider.h"
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
|
|
||||||
class Room : public LevelObject, private VertexProvider, private EdgeProvider {
|
|
||||||
private:
|
|
||||||
class RoomVertex {
|
|
||||||
public:
|
|
||||||
virtual const Vertex& operator*() const = 0;
|
|
||||||
const Vertex* operator->() {return &**this;}
|
|
||||||
|
|
||||||
virtual ~RoomVertex() {}
|
|
||||||
|
|
||||||
virtual const Vertex& operator+=(const Vertex &v) {return **this;}
|
|
||||||
virtual const Vertex& operator-=(const Vertex &v) {return **this;}
|
|
||||||
|
|
||||||
virtual void setLocation(float x, float y) {}
|
|
||||||
|
|
||||||
virtual bool isDirect() const = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
class RoomVertexDirect : public RoomVertex {
|
|
||||||
private:
|
|
||||||
Vertex vertex;
|
|
||||||
|
|
||||||
public:
|
|
||||||
RoomVertexDirect(const Vertex &v) : vertex(v) {}
|
|
||||||
|
|
||||||
virtual const Vertex& operator*() const {
|
|
||||||
return vertex;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual const Vertex& operator+=(const Vertex &v) {
|
|
||||||
vertex += v;
|
|
||||||
return vertex;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual const Vertex& operator-=(const Vertex &v) {
|
|
||||||
vertex -= v;
|
|
||||||
return vertex;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void setLocation(float x, float y) {
|
|
||||||
vertex.setLocation(x, y);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool isDirect() const {return true;}
|
|
||||||
};
|
|
||||||
|
|
||||||
class RoomVertexIndirect : public RoomVertex {
|
|
||||||
private:
|
|
||||||
LevelVertex vertex;
|
|
||||||
|
|
||||||
public:
|
|
||||||
RoomVertexIndirect(const LevelVertex &v) : vertex(v) {}
|
|
||||||
|
|
||||||
virtual const Vertex& operator*() const {
|
|
||||||
return *vertex;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool isDirect() const {return false;}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
std::string name;
|
|
||||||
float height;
|
|
||||||
|
|
||||||
std::vector<SharedPtr<RoomVertex> > vertices;
|
|
||||||
std::vector<Edge> edges;
|
|
||||||
|
|
||||||
void addEdge() {
|
|
||||||
if(vertices.size() < 2)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if(vertices.size() == 2) {
|
|
||||||
edges.push_back(Edge(LevelVertex(this, 0, this), LevelVertex(this, 1, this)));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
edges.push_back(Edge(LevelVertex(this, vertices.size()-2, this), LevelVertex(this, vertices.size()-1, this)));
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
|
||||||
Room() {height = 10;}
|
|
||||||
Room(std::string name) {this->name = name; height = 10;}
|
|
||||||
|
|
||||||
Room(const Room &room) : name(room.name), height(room.height), vertices(room.vertices) {
|
|
||||||
for(std::vector<Edge>::const_iterator edge = room.edges.begin(); edge != room.edges.end(); edge++) {
|
|
||||||
LevelVertex v1(this, edge->getVertex1().getId(), this);
|
|
||||||
LevelVertex v2(this, edge->getVertex2().getId(), this);
|
|
||||||
edges.push_back(Edge(v1, v2));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const Room& operator=(const Room &room);
|
|
||||||
|
|
||||||
std::string &getName() {return name;}
|
|
||||||
const std::string &getName() const {return name;}
|
|
||||||
void setName(const std::string &name) {this->name = name;}
|
|
||||||
|
|
||||||
float getHeight() const {return height;}
|
|
||||||
void setHeight(float height) {this->height = height;}
|
|
||||||
|
|
||||||
void addVertex(Vertex v) {
|
|
||||||
vertices.push_back(SharedPtr<RoomVertex>(new RoomVertexDirect(v)));
|
|
||||||
addEdge();
|
|
||||||
}
|
|
||||||
|
|
||||||
void addVertex(LevelVertex &v) {
|
|
||||||
size_t s = v.connect();
|
|
||||||
|
|
||||||
if(s == v.getId()) {
|
|
||||||
vertices.push_back(SharedPtr<RoomVertex>(new RoomVertexIndirect(v)));
|
|
||||||
addEdge();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if(vertices.empty()) {
|
|
||||||
LevelVertex v2(v.getProvider(), s, v.getParent());
|
|
||||||
|
|
||||||
vertices.push_back(SharedPtr<RoomVertex>(new RoomVertexIndirect(v2)));
|
|
||||||
vertices.push_back(SharedPtr<RoomVertex>(new RoomVertexIndirect(v)));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
LevelVertex v2(v.getProvider(), s, v.getParent());
|
|
||||||
|
|
||||||
vertices.push_back(SharedPtr<RoomVertex>(new RoomVertexIndirect(v)));
|
|
||||||
addEdge();
|
|
||||||
vertices.push_back(SharedPtr<RoomVertex>(new RoomVertexIndirect(v2)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void close() {
|
|
||||||
if(vertices.size() >= 2)
|
|
||||||
edges.push_back(Edge(LevelVertex(this, vertices.size()-1, this), LevelVertex(this, 0, this)));
|
|
||||||
}
|
|
||||||
|
|
||||||
Polygon getPolygon() const {
|
|
||||||
Polygon polygon;
|
|
||||||
|
|
||||||
for(std::vector<SharedPtr<RoomVertex> >::const_iterator v = vertices.begin(); v != vertices.end(); v++)
|
|
||||||
polygon.push_back(***v);
|
|
||||||
|
|
||||||
return polygon;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool hit(const Vertex &v) const {return getPolygon().contains(v);}
|
|
||||||
virtual int getPriority() const {return 0;}
|
|
||||||
|
|
||||||
virtual std::vector<SharedPtr<LevelObject> > getChildren();
|
|
||||||
|
|
||||||
virtual const char* getType() const {
|
|
||||||
return "Room";
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool canMove() const {return true;}
|
|
||||||
|
|
||||||
virtual void move(float x, float y) {
|
|
||||||
Vertex m(x, y);
|
|
||||||
|
|
||||||
for(std::vector<SharedPtr<RoomVertex> >::iterator v = vertices.begin(); v != vertices.end(); v++)
|
|
||||||
**v += m;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool canRotate() const {return true;}
|
|
||||||
|
|
||||||
virtual void rotate(Vertex m, float a);
|
|
||||||
|
|
||||||
virtual const Vertex* getVertex(size_t id) const {
|
|
||||||
return &**vertices[id];
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual size_t getVertexCount() const {
|
|
||||||
return vertices.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void moveVertex(size_t id, float x, float y) {
|
|
||||||
*vertices[id] += Vertex(x, y);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void rotateVertex(size_t id, Vertex m, float a) {
|
|
||||||
rotate(m, a);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual const Edge* getEdge(size_t id) const {
|
|
||||||
return &edges[id];
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual size_t getEdgeCount() const {
|
|
||||||
return edges.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void moveEdge(size_t id, float x, float y) {
|
|
||||||
moveVertex(id, x, y);
|
|
||||||
moveVertex((id+1)%vertices.size(), x, y);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void rotateEdge(size_t id, Vertex m, float a) {
|
|
||||||
rotate(m, a);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*ROOM_H_*/
|
|
46
SharedPtr.h
46
SharedPtr.h
|
@ -1,46 +0,0 @@
|
||||||
#ifndef SHAREDPTR_H_
|
|
||||||
#define SHAREDPTR_H_
|
|
||||||
|
|
||||||
template <class T>
|
|
||||||
class SharedPtr {
|
|
||||||
private:
|
|
||||||
class Counter {
|
|
||||||
public:
|
|
||||||
Counter(T *o) : object(o), refCount(1) {}
|
|
||||||
~Counter() {delete object;}
|
|
||||||
|
|
||||||
T *object;
|
|
||||||
unsigned int refCount;
|
|
||||||
};
|
|
||||||
|
|
||||||
Counter *counter;
|
|
||||||
|
|
||||||
public:
|
|
||||||
SharedPtr(T *o) : counter(new Counter(o)) {}
|
|
||||||
|
|
||||||
SharedPtr(const SharedPtr<T> &c) : counter(c.counter) {
|
|
||||||
counter->refCount++;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual ~SharedPtr() {
|
|
||||||
if(--counter->refCount == 0)
|
|
||||||
delete counter;
|
|
||||||
}
|
|
||||||
|
|
||||||
SharedPtr<T>& operator=(const SharedPtr<T>& c) {
|
|
||||||
c.counter->refCount++;
|
|
||||||
if(--counter->refCount == 0)
|
|
||||||
delete counter;
|
|
||||||
|
|
||||||
counter = c.counter;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
T* operator->() {return counter->object;}
|
|
||||||
T& operator*() {return *counter->object;}
|
|
||||||
|
|
||||||
const T* operator->() const {return counter->object;}
|
|
||||||
const T& operator*() const {return *counter->object;}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*SHAREDPTR_H_*/
|
|
16
Sidebar.h
16
Sidebar.h
|
@ -1,16 +0,0 @@
|
||||||
#ifndef SIDEBAR_H_
|
|
||||||
#define SIDEBAR_H_
|
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
|
||||||
|
|
||||||
|
|
||||||
class Sidebar {
|
|
||||||
public:
|
|
||||||
virtual ~Sidebar() {}
|
|
||||||
|
|
||||||
virtual GtkWidget* getWidget() = 0;
|
|
||||||
|
|
||||||
virtual void update() = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*SIDEBAR_H_*/
|
|
|
@ -1,24 +0,0 @@
|
||||||
#include "SidebarAdd.h"
|
|
||||||
|
|
||||||
|
|
||||||
SidebarAdd::SidebarAdd(EditManager *editor) {
|
|
||||||
this->editor = editor;
|
|
||||||
|
|
||||||
sidebar = gtk_vbox_new(FALSE, 0);
|
|
||||||
g_object_ref_sink(G_OBJECT(sidebar));
|
|
||||||
|
|
||||||
GtkWidget *labelRoomInfo = gtk_label_new(NULL);
|
|
||||||
gtk_label_set_markup(GTK_LABEL(labelRoomInfo), "<b>Add room</b>");
|
|
||||||
gtk_misc_set_alignment(GTK_MISC(labelRoomInfo), 0.0, 0.5);
|
|
||||||
gtk_box_pack_start(GTK_BOX(sidebar), labelRoomInfo, FALSE, FALSE, 5);
|
|
||||||
|
|
||||||
gtk_widget_show_all(sidebar);
|
|
||||||
}
|
|
||||||
|
|
||||||
SidebarAdd::~SidebarAdd() {
|
|
||||||
g_object_unref(G_OBJECT(sidebar));
|
|
||||||
}
|
|
||||||
|
|
||||||
GtkWidget* SidebarAdd::getWidget() {
|
|
||||||
return sidebar;
|
|
||||||
}
|
|
27
SidebarAdd.h
27
SidebarAdd.h
|
@ -1,27 +0,0 @@
|
||||||
#ifndef SIDEBARADD_H_
|
|
||||||
#define SIDEBARADD_H_
|
|
||||||
|
|
||||||
#include "Sidebar.h"
|
|
||||||
#include "EditManager.h"
|
|
||||||
|
|
||||||
|
|
||||||
class SidebarAdd : public Sidebar {
|
|
||||||
private:
|
|
||||||
GtkWidget *sidebar;
|
|
||||||
|
|
||||||
EditManager *editor;
|
|
||||||
|
|
||||||
// prevent shallow copy
|
|
||||||
SidebarAdd(const SidebarAdd &w);
|
|
||||||
const SidebarAdd& operator=(const SidebarAdd &w);
|
|
||||||
|
|
||||||
public:
|
|
||||||
SidebarAdd(EditManager *editor);
|
|
||||||
virtual ~SidebarAdd();
|
|
||||||
|
|
||||||
GtkWidget* getWidget();
|
|
||||||
|
|
||||||
void update() {}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*SIDEBARADD_H_*/
|
|
|
@ -1,62 +0,0 @@
|
||||||
#include "SidebarManager.h"
|
|
||||||
#include "Window.h"
|
|
||||||
|
|
||||||
|
|
||||||
SidebarManager::SidebarManager(Window *window)
|
|
||||||
: sidebarToolbox(window), toolGrab(&window->getEditManager()),
|
|
||||||
toolRotate(&window->getEditManager()), toolAddRect(&window->getEditManager()),
|
|
||||||
toolAddPolygon(&window->getEditManager())
|
|
||||||
{
|
|
||||||
this->window = window;
|
|
||||||
activeSidebar = NULL;
|
|
||||||
|
|
||||||
sidebar = gtk_vbox_new(FALSE, 0);
|
|
||||||
g_object_ref_sink(G_OBJECT(sidebar));
|
|
||||||
|
|
||||||
gtk_box_pack_start(GTK_BOX(sidebar), sidebarToolbox.getWidget(), FALSE, FALSE, 0);
|
|
||||||
|
|
||||||
gtk_box_pack_start(GTK_BOX(sidebar), gtk_hseparator_new(), FALSE, FALSE, 5);
|
|
||||||
|
|
||||||
toolLabel = gtk_label_new(sidebarToolbox.getActiveTool().getName());
|
|
||||||
|
|
||||||
gtk_box_pack_start(GTK_BOX(sidebar), toolLabel, FALSE, FALSE, 0);
|
|
||||||
|
|
||||||
scrolledWindow = gtk_scrolled_window_new(NULL, NULL);
|
|
||||||
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledWindow), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
|
||||||
gtk_box_pack_start_defaults(GTK_BOX(sidebar), scrolledWindow);
|
|
||||||
gtk_widget_show(scrolledWindow);
|
|
||||||
|
|
||||||
viewport = gtk_viewport_new(NULL, NULL);
|
|
||||||
gtk_container_add(GTK_CONTAINER(scrolledWindow), viewport);
|
|
||||||
|
|
||||||
sidebarToolbox.addTool(&toolGrab);
|
|
||||||
sidebarToolbox.addTool(&toolRotate);
|
|
||||||
sidebarToolbox.addTool(&toolAddRect);
|
|
||||||
sidebarToolbox.addTool(&toolAddPolygon);
|
|
||||||
|
|
||||||
gtk_widget_show(sidebar);
|
|
||||||
}
|
|
||||||
|
|
||||||
SidebarManager::~SidebarManager() {
|
|
||||||
g_object_unref(G_OBJECT(sidebar));
|
|
||||||
}
|
|
||||||
|
|
||||||
void SidebarManager::update() {
|
|
||||||
Sidebar *newSidebar = activeSidebar;
|
|
||||||
|
|
||||||
newSidebar = window->getActiveTool()->getSidebar();
|
|
||||||
|
|
||||||
if(activeSidebar != newSidebar) {
|
|
||||||
if(activeSidebar)
|
|
||||||
gtk_container_remove(GTK_CONTAINER(viewport), gtk_bin_get_child(GTK_BIN(viewport)));
|
|
||||||
|
|
||||||
gtk_container_add(GTK_CONTAINER(viewport), newSidebar->getWidget());
|
|
||||||
|
|
||||||
activeSidebar = newSidebar;
|
|
||||||
}
|
|
||||||
|
|
||||||
gtk_label_set_text(GTK_LABEL(toolLabel), sidebarToolbox.getActiveTool().getName());
|
|
||||||
|
|
||||||
sidebarToolbox.update();
|
|
||||||
activeSidebar->update();
|
|
||||||
}
|
|
|
@ -1,55 +0,0 @@
|
||||||
#ifndef SIDEBARMANAGER_H_
|
|
||||||
#define SIDEBARMANAGER_H_
|
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
|
||||||
#include "Sidebar.h"
|
|
||||||
#include "SidebarToolbox.h"
|
|
||||||
#include "EditManager.h"
|
|
||||||
#include "ToolGrab.h"
|
|
||||||
#include "ToolRotate.h"
|
|
||||||
#include "ToolAddRect.h"
|
|
||||||
#include "ToolAddPolygon.h"
|
|
||||||
|
|
||||||
|
|
||||||
class Window;
|
|
||||||
|
|
||||||
|
|
||||||
class SidebarManager {
|
|
||||||
private:
|
|
||||||
GtkWidget *sidebar, *toolLabel, *scrolledWindow, *viewport;
|
|
||||||
|
|
||||||
SidebarToolbox sidebarToolbox;
|
|
||||||
|
|
||||||
Sidebar *activeSidebar;
|
|
||||||
|
|
||||||
Window *window;
|
|
||||||
|
|
||||||
ToolGrab toolGrab;
|
|
||||||
ToolRotate toolRotate;
|
|
||||||
ToolAddRect toolAddRect;
|
|
||||||
ToolAddPolygon toolAddPolygon;
|
|
||||||
|
|
||||||
// prevent shallow copy
|
|
||||||
SidebarManager(const SidebarManager &w);
|
|
||||||
const SidebarManager& operator=(const SidebarManager &w);
|
|
||||||
|
|
||||||
public:
|
|
||||||
SidebarManager(Window *window);
|
|
||||||
virtual ~SidebarManager();
|
|
||||||
|
|
||||||
GtkWidget* getWidget() {
|
|
||||||
return sidebar;
|
|
||||||
}
|
|
||||||
|
|
||||||
void resetTool() {
|
|
||||||
sidebarToolbox.resetTool();
|
|
||||||
}
|
|
||||||
|
|
||||||
Tool* getActiveTool() {
|
|
||||||
return &sidebarToolbox.getActiveTool();
|
|
||||||
}
|
|
||||||
|
|
||||||
void update();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*SIDEBARMANAGER_H_*/
|
|
|
@ -1,126 +0,0 @@
|
||||||
#include "SidebarToolbox.h"
|
|
||||||
#include "Window.h"
|
|
||||||
|
|
||||||
|
|
||||||
void SidebarToolbox::buttonToggled(GtkWidget *button, SidebarToolbox *toolbox) {
|
|
||||||
if(!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button)))
|
|
||||||
return;
|
|
||||||
|
|
||||||
toolbox->activateTool(toolbox->buttonsRev[button]);
|
|
||||||
|
|
||||||
toolbox->window->update();
|
|
||||||
}
|
|
||||||
|
|
||||||
void SidebarToolbox::sizeAllocate(GtkWidget *widget, GtkAllocation *allocation, SidebarToolbox *toolbox) {
|
|
||||||
toolbox->updateRows(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void SidebarToolbox::updateRows(bool changed) {
|
|
||||||
GtkRequisition requisition;
|
|
||||||
|
|
||||||
gtk_widget_size_request(buttons[tools.front()], &requisition);
|
|
||||||
|
|
||||||
int cols = MAX(1, widget->allocation.width/requisition.width);
|
|
||||||
int rows = (tools.size()+cols-1)/cols;
|
|
||||||
|
|
||||||
if(changed || this->cols != cols || this->rows != rows) {
|
|
||||||
this->cols = cols;
|
|
||||||
this->rows = rows;
|
|
||||||
|
|
||||||
for(std::map<Tool*, GtkWidget*>::iterator button = buttons.begin(); button != buttons.end(); button++) {
|
|
||||||
if(gtk_widget_get_parent(button->second))
|
|
||||||
gtk_container_remove(GTK_CONTAINER(widget), button->second);
|
|
||||||
}
|
|
||||||
|
|
||||||
gtk_table_resize(GTK_TABLE(widget), MAX(1, rows), MAX(1, cols));
|
|
||||||
|
|
||||||
int iCol = 0, iRow = 0;
|
|
||||||
for(std::list<Tool*>::iterator tool = tools.begin(); tool != tools.end(); tool++) {
|
|
||||||
gtk_table_attach(GTK_TABLE(widget), buttons[*tool], iCol, iCol+1, iRow, iRow+1, GTK_FILL, GTK_FILL, 0, 0);
|
|
||||||
|
|
||||||
iCol++;
|
|
||||||
if(iCol >= cols) {
|
|
||||||
iRow++;
|
|
||||||
iCol = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void SidebarToolbox::activateTool(Tool *tool) {
|
|
||||||
if(activeTool == tool)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if(activeTool)
|
|
||||||
activeTool->deactivate();
|
|
||||||
|
|
||||||
activeTool = tool;
|
|
||||||
tool->activate();
|
|
||||||
}
|
|
||||||
|
|
||||||
SidebarToolbox::SidebarToolbox(Window *window) : toolSelector(&window->getEditManager()) {
|
|
||||||
this->window = window;
|
|
||||||
|
|
||||||
widget = gtk_table_new(1, 1, TRUE);
|
|
||||||
g_object_ref_sink(G_OBJECT(widget));
|
|
||||||
|
|
||||||
g_signal_connect(G_OBJECT(widget), "size-allocate", G_CALLBACK(sizeAllocate), this);
|
|
||||||
|
|
||||||
addTool(&toolSelector);
|
|
||||||
activeTool = NULL;
|
|
||||||
activateTool(&toolSelector);
|
|
||||||
|
|
||||||
gtk_widget_show(widget);
|
|
||||||
}
|
|
||||||
|
|
||||||
SidebarToolbox::~SidebarToolbox() {
|
|
||||||
for(std::map<Tool*, GtkWidget*>::iterator button = buttons.begin(); button != buttons.end(); button++) {
|
|
||||||
g_object_unref(G_OBJECT(button->second));
|
|
||||||
}
|
|
||||||
|
|
||||||
g_object_unref(G_OBJECT(widget));
|
|
||||||
}
|
|
||||||
|
|
||||||
void SidebarToolbox::addTool(Tool *tool) {
|
|
||||||
GtkWidget *button;
|
|
||||||
if(tools.empty())
|
|
||||||
button = gtk_radio_button_new(NULL);
|
|
||||||
else
|
|
||||||
button = gtk_radio_button_new_from_widget(GTK_RADIO_BUTTON(buttons[tools.front()]));
|
|
||||||
g_object_ref_sink(G_OBJECT(button));
|
|
||||||
gtk_toggle_button_set_mode(GTK_TOGGLE_BUTTON(button), FALSE);
|
|
||||||
gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
|
|
||||||
gtk_button_set_image(GTK_BUTTON(button), tool->getImage());
|
|
||||||
|
|
||||||
gtk_widget_show(button);
|
|
||||||
g_signal_connect(G_OBJECT(button), "toggled", G_CALLBACK(buttonToggled), this);
|
|
||||||
|
|
||||||
tools.push_back(tool);
|
|
||||||
buttons.insert(std::pair<Tool*, GtkWidget*>(tool, button));
|
|
||||||
buttonsRev.insert(std::pair<GtkWidget*, Tool*>(button, tool));
|
|
||||||
|
|
||||||
updateRows(true);
|
|
||||||
update();
|
|
||||||
}
|
|
||||||
|
|
||||||
void SidebarToolbox::removeTool(Tool *tool) {
|
|
||||||
if(tool == activeTool) {
|
|
||||||
activateTool(&toolSelector);
|
|
||||||
}
|
|
||||||
|
|
||||||
tools.remove(tool);
|
|
||||||
|
|
||||||
buttonsRev.erase(buttons[tool]);
|
|
||||||
g_object_unref(G_OBJECT(buttons[tool]));
|
|
||||||
buttons.erase(tool);
|
|
||||||
|
|
||||||
updateRows(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
void SidebarToolbox::update() {
|
|
||||||
for(std::list<Tool*>::iterator tool = tools.begin(); tool != tools.end(); tool++) {
|
|
||||||
gtk_widget_set_tooltip_text(buttons[*tool], (*tool)->getName());
|
|
||||||
gtk_widget_set_sensitive(buttons[*tool], (*tool)->isSensitive());
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,64 +0,0 @@
|
||||||
#ifndef SIDEBARTOOLBOX_H_
|
|
||||||
#define SIDEBARTOOLBOX_H_
|
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
|
||||||
#include <map>
|
|
||||||
#include <list>
|
|
||||||
#include "EditManager.h"
|
|
||||||
#include "Sidebar.h"
|
|
||||||
#include "Tool.h"
|
|
||||||
#include "ToolSelector.h"
|
|
||||||
|
|
||||||
|
|
||||||
class Window;
|
|
||||||
|
|
||||||
|
|
||||||
class SidebarToolbox : Sidebar {
|
|
||||||
private:
|
|
||||||
GtkWidget *widget;
|
|
||||||
|
|
||||||
Window *window;
|
|
||||||
|
|
||||||
std::list<Tool*> tools;
|
|
||||||
std::map<Tool*, GtkWidget*> buttons;
|
|
||||||
std::map<GtkWidget*, Tool*> buttonsRev;
|
|
||||||
|
|
||||||
Tool *activeTool;
|
|
||||||
|
|
||||||
ToolSelector toolSelector;
|
|
||||||
|
|
||||||
int cols, rows;
|
|
||||||
|
|
||||||
void updateRows(bool changed);
|
|
||||||
void activateTool(Tool *tool);
|
|
||||||
|
|
||||||
// prevent shallow copy
|
|
||||||
SidebarToolbox(const SidebarToolbox &w);
|
|
||||||
const SidebarToolbox& operator=(const SidebarToolbox &w);
|
|
||||||
|
|
||||||
static void buttonToggled(GtkWidget *button, SidebarToolbox *toolbox);
|
|
||||||
static void sizeAllocate(GtkWidget *widget, GtkAllocation *allocation, SidebarToolbox *toolbox);
|
|
||||||
|
|
||||||
public:
|
|
||||||
SidebarToolbox(Window *window);
|
|
||||||
virtual ~SidebarToolbox();
|
|
||||||
|
|
||||||
GtkWidget* getWidget() {
|
|
||||||
return widget;
|
|
||||||
}
|
|
||||||
|
|
||||||
void resetTool() {
|
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(buttons[&toolSelector]), TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
Tool& getActiveTool() {
|
|
||||||
return *activeTool;
|
|
||||||
}
|
|
||||||
|
|
||||||
void addTool(Tool *tool);
|
|
||||||
void removeTool(Tool *tool);
|
|
||||||
|
|
||||||
void update();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*SIDEBARTOOLBOX_H_*/
|
|
196
SidebarView.cpp
196
SidebarView.cpp
|
@ -1,196 +0,0 @@
|
||||||
#include "SidebarView.h"
|
|
||||||
#include "PlayerStart.h"
|
|
||||||
#include "ToolSelector.h"
|
|
||||||
|
|
||||||
|
|
||||||
void SidebarView::spinButtonChanged(GtkWidget *spinbutton, SidebarView *view) {
|
|
||||||
if(!view->editManager->getSelectedObject())
|
|
||||||
return;
|
|
||||||
|
|
||||||
if(view->editManager->getSelectedObject()->isOfType("Room")) {
|
|
||||||
if(spinbutton == view->spinButtonHeight)
|
|
||||||
((Room*)view->editManager->getSelectedObject())->setHeight(gtk_spin_button_get_value(GTK_SPIN_BUTTON(spinbutton)));
|
|
||||||
}
|
|
||||||
else if(view->editManager->getSelectedObject()->isOfType("PlayerStart")) {
|
|
||||||
if(spinbutton == view->spinButtonX)
|
|
||||||
((PlayerStart*)view->editManager->getSelectedObject())->setX(gtk_spin_button_get_value(GTK_SPIN_BUTTON(spinbutton)));
|
|
||||||
else if(spinbutton == view->spinButtonY)
|
|
||||||
((PlayerStart*)view->editManager->getSelectedObject())->setY(gtk_spin_button_get_value(GTK_SPIN_BUTTON(spinbutton)));
|
|
||||||
else if(spinbutton == view->spinButtonZ)
|
|
||||||
((PlayerStart*)view->editManager->getSelectedObject())->setZ(gtk_spin_button_get_value(GTK_SPIN_BUTTON(spinbutton)));
|
|
||||||
}
|
|
||||||
|
|
||||||
view->editManager->redraw();
|
|
||||||
}
|
|
||||||
|
|
||||||
SidebarView::SidebarView(EditManager *editManager) {
|
|
||||||
this->editManager = editManager;
|
|
||||||
|
|
||||||
sidebar = gtk_vbox_new(FALSE, 0);
|
|
||||||
g_object_ref_sink(G_OBJECT(sidebar));
|
|
||||||
|
|
||||||
labelType = gtk_label_new(NULL);
|
|
||||||
gtk_misc_set_alignment(GTK_MISC(labelType), 0.0, 0.5);
|
|
||||||
gtk_box_pack_start(GTK_BOX(sidebar), labelType, FALSE, FALSE, 5);
|
|
||||||
|
|
||||||
gtk_box_pack_start(GTK_BOX(sidebar), gtk_hseparator_new(), FALSE, FALSE, 5);
|
|
||||||
|
|
||||||
labelName = gtk_label_new("Name: ");
|
|
||||||
gtk_misc_set_alignment(GTK_MISC(labelName), 0.0, 0.5);
|
|
||||||
gtk_widget_set_no_show_all(labelName, TRUE);
|
|
||||||
gtk_box_pack_start(GTK_BOX(sidebar), labelName, FALSE, FALSE, 0);
|
|
||||||
|
|
||||||
entryName = gtk_entry_new();
|
|
||||||
gtk_widget_set_size_request(entryName, 0, -1);
|
|
||||||
//g_signal_connect(G_OBJECT(entryName), "focus-out-event", G_CALLBACK(sidebarNameFocusOutEvent), NULL);
|
|
||||||
//gtk_widget_add_events(entryName, GDK_FOCUS_CHANGE_MASK);
|
|
||||||
gtk_widget_set_no_show_all(entryName, TRUE);
|
|
||||||
gtk_box_pack_start(GTK_BOX(sidebar), entryName, FALSE, FALSE, 0);
|
|
||||||
|
|
||||||
tableRoomData = gtk_table_new(2, 3, FALSE);
|
|
||||||
gtk_table_set_row_spacings(GTK_TABLE(tableRoomData), 5);
|
|
||||||
gtk_widget_set_no_show_all(tableRoomData, TRUE);
|
|
||||||
gtk_box_pack_start(GTK_BOX(sidebar), tableRoomData, FALSE, FALSE, 5);
|
|
||||||
|
|
||||||
GtkWidget *labelAreaLabel = gtk_label_new("Room area: ");
|
|
||||||
gtk_misc_set_alignment(GTK_MISC(labelAreaLabel), 0.0, 0.5);
|
|
||||||
gtk_widget_show(labelAreaLabel);
|
|
||||||
gtk_table_attach(GTK_TABLE(tableRoomData), labelAreaLabel, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
|
|
||||||
|
|
||||||
labelArea = gtk_label_new(NULL);
|
|
||||||
gtk_misc_set_alignment(GTK_MISC(labelArea), 1.0, 0.5);
|
|
||||||
gtk_widget_show(labelArea);
|
|
||||||
gtk_table_attach_defaults(GTK_TABLE(tableRoomData), labelArea, 1, 2, 0, 1);
|
|
||||||
|
|
||||||
GtkWidget *labelPerimeterLabel = gtk_label_new("Room perimeter: ");
|
|
||||||
gtk_misc_set_alignment(GTK_MISC(labelPerimeterLabel), 0.0, 0.5);
|
|
||||||
gtk_widget_show(labelPerimeterLabel);
|
|
||||||
gtk_table_attach(GTK_TABLE(tableRoomData), labelPerimeterLabel, 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0);
|
|
||||||
|
|
||||||
labelPerimeter = gtk_label_new(NULL);
|
|
||||||
gtk_misc_set_alignment(GTK_MISC(labelPerimeter), 1.0, 0.5);
|
|
||||||
gtk_widget_show(labelPerimeter);
|
|
||||||
gtk_table_attach_defaults(GTK_TABLE(tableRoomData), labelPerimeter, 1, 2, 1, 2);
|
|
||||||
|
|
||||||
GtkWidget *labelHeight = gtk_label_new("Height: ");
|
|
||||||
gtk_misc_set_alignment(GTK_MISC(labelHeight), 0.0, 0.5);
|
|
||||||
gtk_widget_show(labelHeight);
|
|
||||||
gtk_table_attach(GTK_TABLE(tableRoomData), labelHeight, 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0);
|
|
||||||
|
|
||||||
spinButtonHeight = gtk_spin_button_new_with_range(0, 10000, 0.1f);
|
|
||||||
gtk_spin_button_set_digits(GTK_SPIN_BUTTON(spinButtonHeight), 2);
|
|
||||||
gtk_entry_set_alignment(GTK_ENTRY(spinButtonHeight), 1.0);
|
|
||||||
gtk_widget_show(spinButtonHeight);
|
|
||||||
gtk_table_attach(GTK_TABLE(tableRoomData), spinButtonHeight, 1, 2, 2, 3, (GtkAttachOptions)(GTK_EXPAND|GTK_SHRINK|GTK_FILL),
|
|
||||||
(GtkAttachOptions)(GTK_EXPAND|GTK_FILL), 0, 0);
|
|
||||||
gtk_widget_set_size_request(spinButtonHeight, 0, -1);
|
|
||||||
g_signal_connect(G_OBJECT(spinButtonHeight), "value-changed", G_CALLBACK(spinButtonChanged), this);
|
|
||||||
|
|
||||||
tablePlayerStart = gtk_table_new(2, 4, FALSE);
|
|
||||||
gtk_table_set_row_spacings(GTK_TABLE(tablePlayerStart), 5);
|
|
||||||
gtk_widget_set_no_show_all(tablePlayerStart, TRUE);
|
|
||||||
gtk_box_pack_start(GTK_BOX(sidebar), tablePlayerStart, FALSE, FALSE, 5);
|
|
||||||
|
|
||||||
GtkWidget *labelCoordinates = gtk_label_new("Coordinates:");
|
|
||||||
gtk_misc_set_alignment(GTK_MISC(labelCoordinates), 0.0, 0.5);
|
|
||||||
gtk_widget_show(labelCoordinates);
|
|
||||||
gtk_table_attach(GTK_TABLE(tablePlayerStart), labelCoordinates, 0, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
|
|
||||||
|
|
||||||
GtkWidget *labelX = gtk_label_new("X: ");
|
|
||||||
gtk_misc_set_alignment(GTK_MISC(labelX), 0.0, 0.5);
|
|
||||||
gtk_widget_show(labelX);
|
|
||||||
gtk_table_attach(GTK_TABLE(tablePlayerStart), labelX, 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0);
|
|
||||||
|
|
||||||
spinButtonX = gtk_spin_button_new_with_range(-10000, 10000, 0.01f);
|
|
||||||
gtk_spin_button_set_digits(GTK_SPIN_BUTTON(spinButtonX), 2);
|
|
||||||
gtk_entry_set_alignment(GTK_ENTRY(spinButtonX), 1.0);
|
|
||||||
gtk_widget_show(spinButtonX);
|
|
||||||
gtk_table_attach(GTK_TABLE(tablePlayerStart), spinButtonX, 1, 2, 1, 2, (GtkAttachOptions)(GTK_EXPAND|GTK_SHRINK|GTK_FILL),
|
|
||||||
(GtkAttachOptions)(GTK_EXPAND|GTK_FILL), 0, 0);
|
|
||||||
gtk_widget_set_size_request(spinButtonX, 0, -1);
|
|
||||||
g_signal_connect(G_OBJECT(spinButtonX), "value-changed", G_CALLBACK(spinButtonChanged), this);
|
|
||||||
|
|
||||||
GtkWidget *labelY = gtk_label_new("Y: ");
|
|
||||||
gtk_misc_set_alignment(GTK_MISC(labelY), 0.0, 0.5);
|
|
||||||
gtk_widget_show(labelY);
|
|
||||||
gtk_table_attach(GTK_TABLE(tablePlayerStart), labelY, 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0);
|
|
||||||
|
|
||||||
spinButtonY = gtk_spin_button_new_with_range(-10000, 10000, 0.01f);
|
|
||||||
gtk_spin_button_set_digits(GTK_SPIN_BUTTON(spinButtonY), 2);
|
|
||||||
gtk_entry_set_alignment(GTK_ENTRY(spinButtonY), 1.0);
|
|
||||||
gtk_widget_show(spinButtonY);
|
|
||||||
gtk_table_attach(GTK_TABLE(tablePlayerStart), spinButtonY, 1, 2, 2, 3, (GtkAttachOptions)(GTK_EXPAND|GTK_SHRINK|GTK_FILL),
|
|
||||||
(GtkAttachOptions)(GTK_EXPAND|GTK_FILL), 0, 0);
|
|
||||||
gtk_widget_set_size_request(spinButtonY, 0, -1);
|
|
||||||
g_signal_connect(G_OBJECT(spinButtonY), "value-changed", G_CALLBACK(spinButtonChanged), this);
|
|
||||||
|
|
||||||
GtkWidget *labelZ = gtk_label_new("Z: ");
|
|
||||||
gtk_misc_set_alignment(GTK_MISC(labelZ), 0.0, 0.5);
|
|
||||||
gtk_widget_show(labelZ);
|
|
||||||
gtk_table_attach(GTK_TABLE(tablePlayerStart), labelZ, 0, 1, 3, 4, GTK_FILL, GTK_FILL, 0, 0);
|
|
||||||
|
|
||||||
spinButtonZ = gtk_spin_button_new_with_range(-10000, 10000, 0.01f);
|
|
||||||
gtk_spin_button_set_digits(GTK_SPIN_BUTTON(spinButtonZ), 2);
|
|
||||||
gtk_entry_set_alignment(GTK_ENTRY(spinButtonZ), 1.0);
|
|
||||||
gtk_widget_show(spinButtonZ);
|
|
||||||
gtk_table_attach(GTK_TABLE(tablePlayerStart), spinButtonZ, 1, 2, 3, 4, (GtkAttachOptions)(GTK_EXPAND|GTK_SHRINK|GTK_FILL),
|
|
||||||
(GtkAttachOptions)(GTK_EXPAND|GTK_FILL), 0, 0);
|
|
||||||
gtk_widget_set_size_request(spinButtonZ, 0, -1);
|
|
||||||
g_signal_connect(G_OBJECT(spinButtonZ), "value-changed", G_CALLBACK(spinButtonChanged), this);
|
|
||||||
|
|
||||||
gtk_widget_show_all(sidebar);
|
|
||||||
}
|
|
||||||
|
|
||||||
SidebarView::~SidebarView() {
|
|
||||||
g_object_unref(G_OBJECT(sidebar));
|
|
||||||
}
|
|
||||||
|
|
||||||
GtkWidget* SidebarView::getWidget() {
|
|
||||||
return sidebar;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SidebarView::update() {
|
|
||||||
gtk_widget_hide(labelName);
|
|
||||||
gtk_widget_hide(entryName);
|
|
||||||
gtk_widget_hide(tableRoomData);
|
|
||||||
gtk_widget_hide(tablePlayerStart);
|
|
||||||
|
|
||||||
if(editManager->getSelectedObject()) {
|
|
||||||
if(editManager->getSelectedObject()->isOfType("Room")) {
|
|
||||||
Room *room = (Room*)editManager->getSelectedObject();
|
|
||||||
|
|
||||||
gtk_label_set_markup(GTK_LABEL(labelType), "<b>Room info:</b>");
|
|
||||||
|
|
||||||
gtk_widget_show(labelName);
|
|
||||||
|
|
||||||
gtk_entry_set_text(GTK_ENTRY(entryName), room->getName().c_str());
|
|
||||||
gtk_widget_show(entryName);
|
|
||||||
|
|
||||||
gchar *string = g_strdup_printf("%.2f", room->getPolygon().area());
|
|
||||||
gtk_label_set_text(GTK_LABEL(labelArea), string);
|
|
||||||
g_free(string);
|
|
||||||
|
|
||||||
string = g_strdup_printf("%.2f", room->getPolygon().perimeter());
|
|
||||||
gtk_label_set_text(GTK_LABEL(labelPerimeter), string);
|
|
||||||
g_free(string);
|
|
||||||
|
|
||||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinButtonHeight), room->getHeight());
|
|
||||||
|
|
||||||
gtk_widget_show(tableRoomData);
|
|
||||||
}
|
|
||||||
else if(editManager->getSelectedObject()->isOfType("PlayerStart")) {
|
|
||||||
PlayerStart *playerStart = (PlayerStart*)editManager->getSelectedObject();
|
|
||||||
|
|
||||||
gtk_label_set_markup(GTK_LABEL(labelType), "<b>Player start:</b>");
|
|
||||||
|
|
||||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinButtonX), playerStart->getX());
|
|
||||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinButtonY), playerStart->getY());
|
|
||||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinButtonZ), playerStart->getZ());
|
|
||||||
|
|
||||||
gtk_widget_show(tablePlayerStart);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
gtk_label_set_markup(GTK_LABEL(labelType), "<b>[Nothing selected]</b>");
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,34 +0,0 @@
|
||||||
#ifndef SIDEBARVIEW_H_
|
|
||||||
#define SIDEBARVIEW_H_
|
|
||||||
|
|
||||||
#include "Sidebar.h"
|
|
||||||
#include "EditManager.h"
|
|
||||||
|
|
||||||
|
|
||||||
class ToolSelector;
|
|
||||||
|
|
||||||
class SidebarView : public Sidebar {
|
|
||||||
private:
|
|
||||||
GtkWidget *sidebar;
|
|
||||||
GtkWidget *labelType, *labelName, *entryName;
|
|
||||||
GtkWidget *tableRoomData, *labelArea, *labelPerimeter, *spinButtonHeight;
|
|
||||||
GtkWidget *tablePlayerStart, *spinButtonX, *spinButtonY, *spinButtonZ;
|
|
||||||
|
|
||||||
EditManager *editManager;
|
|
||||||
|
|
||||||
// prevent shallow copy
|
|
||||||
SidebarView(const SidebarView &w);
|
|
||||||
const SidebarView& operator=(const SidebarView &w);
|
|
||||||
|
|
||||||
static void spinButtonChanged(GtkWidget *spinbutton, SidebarView *view);
|
|
||||||
|
|
||||||
public:
|
|
||||||
SidebarView(EditManager *editManager);
|
|
||||||
virtual ~SidebarView();
|
|
||||||
|
|
||||||
GtkWidget* getWidget();
|
|
||||||
|
|
||||||
void update();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*SIDEBARVIEW_H_*/
|
|
35
Tool.h
35
Tool.h
|
@ -1,35 +0,0 @@
|
||||||
#ifndef TOOL_H_
|
|
||||||
#define TOOL_H_
|
|
||||||
|
|
||||||
#include "Object.h"
|
|
||||||
#include "EventHandler.h"
|
|
||||||
#include "Sidebar.h"
|
|
||||||
#include "Renderer.h"
|
|
||||||
#include <gtk/gtk.h>
|
|
||||||
|
|
||||||
|
|
||||||
class Tool : public Object {
|
|
||||||
public:
|
|
||||||
virtual ~Tool() {}
|
|
||||||
|
|
||||||
virtual void activate() {};
|
|
||||||
virtual void deactivate() {};
|
|
||||||
|
|
||||||
virtual const char* getName() const {
|
|
||||||
return getType();
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual GtkWidget* getImage() = 0;
|
|
||||||
|
|
||||||
virtual bool isSensitive() const {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool hoverFilter(const LevelObject &object) const = 0;
|
|
||||||
|
|
||||||
virtual EventHandler* getEventHandler() = 0;
|
|
||||||
virtual Sidebar* getSidebar() = 0;
|
|
||||||
virtual Renderer* getRenderer() {return NULL;}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*TOOL_H_*/
|
|
|
@ -1,86 +0,0 @@
|
||||||
#include "ToolAddPolygon.h"
|
|
||||||
#include <GL/gl.h>
|
|
||||||
|
|
||||||
|
|
||||||
ToolAddPolygon::ToolAddPolygon(EditManager *editManager) : Renderer(editManager), sidebar(editManager) {
|
|
||||||
this->editManager = editManager;
|
|
||||||
|
|
||||||
image = gtk_image_new_from_stock(GTK_STOCK_MISSING_IMAGE, GTK_ICON_SIZE_BUTTON);
|
|
||||||
g_object_ref_sink(G_OBJECT(image));
|
|
||||||
}
|
|
||||||
|
|
||||||
ToolAddPolygon::~ToolAddPolygon() {
|
|
||||||
g_object_unref(G_OBJECT(image));
|
|
||||||
}
|
|
||||||
|
|
||||||
void ToolAddPolygon::activate() {
|
|
||||||
newRoom = Room();
|
|
||||||
|
|
||||||
editManager->setSelectedObject(NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ToolAddPolygon::deactivate() {
|
|
||||||
newRoom.close();
|
|
||||||
editManager->addRoom(newRoom);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ToolAddPolygon::render(const Level &level, const Rectangle &rect, float scale) {
|
|
||||||
if(editManager->polygonOk(newRoom.getPolygon()))
|
|
||||||
glColor4f(0.0f, 0.7f, 1.0f, 0.2f);
|
|
||||||
else
|
|
||||||
glColor4f(1.0f, 0.3f, 0.3f, 0.2f);
|
|
||||||
|
|
||||||
fillPolygon(newRoom.getPolygon());
|
|
||||||
|
|
||||||
glLineWidth(2.0f);
|
|
||||||
glColor4f(0.0f, 0.7f, 1.0f, 0.7f);
|
|
||||||
|
|
||||||
glBegin(GL_LINES);
|
|
||||||
|
|
||||||
for(size_t i = 0; i < newRoom.getEdgeCount(); i++) {
|
|
||||||
const Edge *edge = newRoom.getEdge(i);
|
|
||||||
glVertex2f(edge->getVertex1()->getX(), edge->getVertex1()->getY());
|
|
||||||
glVertex2f(edge->getVertex2()->getX(), edge->getVertex2()->getY());
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!newRoom.getPolygon().empty() && editManager->getHoveredVertex()) {
|
|
||||||
if(!editManager->vertexOk(*editManager->getHoveredVertex(), &newRoom))
|
|
||||||
glColor4f(1.0f, 0.3f, 0.3f, 0.7f);
|
|
||||||
|
|
||||||
glVertex2f(newRoom.getPolygon().back().getX(), newRoom.getPolygon().back().getY());
|
|
||||||
glVertex2f(editManager->getHoveredVertex()->getX(), editManager->getHoveredVertex()->getY());
|
|
||||||
}
|
|
||||||
|
|
||||||
glEnd();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ToolAddPolygon::buttonPress(unsigned int button, const Vertex *v) {
|
|
||||||
if(button != 1)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if(editManager->getHoveredObject() && editManager->getHoveredObject()->isOfType("LevelVertex")) {
|
|
||||||
LevelVertex *vertex = (LevelVertex*)editManager->getHoveredObject();
|
|
||||||
|
|
||||||
if(!vertex->canConnect())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if(!editManager->vertexOk(**vertex, &newRoom))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
newRoom.addVertex(*vertex);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if(!v)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if(!editManager->vertexOk(*v, &newRoom))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
newRoom.addVertex(*v);
|
|
||||||
}
|
|
||||||
|
|
||||||
editManager->redraw();
|
|
||||||
sidebar.update();
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
|
@ -1,67 +0,0 @@
|
||||||
#ifndef TOOLADDPOLYGON_H_
|
|
||||||
#define TOOLADDPOLYGON_H_
|
|
||||||
|
|
||||||
#include "Tool.h"
|
|
||||||
#include "EditManager.h"
|
|
||||||
#include "SidebarAdd.h"
|
|
||||||
#include "LevelVertex.h"
|
|
||||||
|
|
||||||
|
|
||||||
class ToolAddPolygon : public Tool, private EventHandler, private Renderer {
|
|
||||||
private:
|
|
||||||
GtkWidget *image;
|
|
||||||
|
|
||||||
EditManager *editManager;
|
|
||||||
|
|
||||||
SidebarAdd sidebar;
|
|
||||||
|
|
||||||
Room newRoom;
|
|
||||||
|
|
||||||
// prevent shallow copy
|
|
||||||
ToolAddPolygon(const ToolAddPolygon &t);
|
|
||||||
const ToolAddPolygon& operator=(const ToolAddPolygon &t);
|
|
||||||
|
|
||||||
public:
|
|
||||||
ToolAddPolygon(EditManager *editManager);
|
|
||||||
virtual ~ToolAddPolygon();
|
|
||||||
|
|
||||||
virtual void activate();
|
|
||||||
virtual void deactivate();
|
|
||||||
|
|
||||||
virtual const char *getType() const {
|
|
||||||
return "ToolAddPolygon";
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual const char *getName() const {
|
|
||||||
return "Add polygonal room";
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual GtkWidget *getImage() {
|
|
||||||
return image;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool hoverFilter(const LevelObject &object) const {
|
|
||||||
if(!object.isOfType("LevelVertex"))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return ((LevelVertex*)&object)->canConnect();
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual EventHandler* getEventHandler() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual Renderer *getRenderer() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void render(const Level &level, const Rectangle &rect, float scale);
|
|
||||||
|
|
||||||
virtual bool buttonPress(unsigned int button, const Vertex *v);
|
|
||||||
|
|
||||||
virtual Sidebar* getSidebar() {
|
|
||||||
return &sidebar;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*TOOLADDPOLYGON_H_*/
|
|
|
@ -1,95 +0,0 @@
|
||||||
#include "ToolAddRect.h"
|
|
||||||
#include <GL/gl.h>
|
|
||||||
|
|
||||||
|
|
||||||
Room ToolAddRect::createRoom() {
|
|
||||||
const Vertex *v2 = editManager->getHoveredVertex();
|
|
||||||
|
|
||||||
Room room;
|
|
||||||
room.addVertex(v1);
|
|
||||||
room.addVertex(Vertex(v1.getX(), v2->getY()));
|
|
||||||
room.addVertex(*v2);
|
|
||||||
room.addVertex(Vertex(v2->getX(), v1.getY()));
|
|
||||||
room.close();
|
|
||||||
|
|
||||||
return room;
|
|
||||||
}
|
|
||||||
|
|
||||||
ToolAddRect::ToolAddRect(EditManager *editManager) : Renderer(editManager), sidebar(editManager) {
|
|
||||||
this->editManager = editManager;
|
|
||||||
|
|
||||||
pressed = false;
|
|
||||||
|
|
||||||
image = gtk_image_new_from_stock(GTK_STOCK_MISSING_IMAGE, GTK_ICON_SIZE_BUTTON);
|
|
||||||
g_object_ref_sink(G_OBJECT(image));
|
|
||||||
}
|
|
||||||
|
|
||||||
ToolAddRect::~ToolAddRect() {
|
|
||||||
g_object_unref(G_OBJECT(image));
|
|
||||||
}
|
|
||||||
|
|
||||||
void ToolAddRect::activate() {
|
|
||||||
editManager->setSelectedObject(NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ToolAddRect::render(const Level &level, const Rectangle &rect, float scale) {
|
|
||||||
if(!pressed || !editManager->getHoveredVertex())
|
|
||||||
return;
|
|
||||||
|
|
||||||
Room room = createRoom();
|
|
||||||
|
|
||||||
if(editManager->polygonOk(room.getPolygon()))
|
|
||||||
glColor4f(0.0f, 0.7f, 1.0f, 0.2f);
|
|
||||||
else
|
|
||||||
glColor4f(1.0f, 0.3f, 0.3f, 0.2f);
|
|
||||||
|
|
||||||
fillPolygon(room.getPolygon());
|
|
||||||
|
|
||||||
glLineWidth(2.0f);
|
|
||||||
glColor4f(0.0f, 0.7f, 1.0f, 0.7f);
|
|
||||||
drawPolygon(room.getPolygon());
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ToolAddRect::buttonPress(unsigned int button, const Vertex *v) {
|
|
||||||
if(button != 1)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if(!v)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if(!editManager->vertexOk(*v))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
pressed = true;
|
|
||||||
v1 = *v;
|
|
||||||
|
|
||||||
editManager->redraw();
|
|
||||||
sidebar.update();
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ToolAddRect::buttonRelease(unsigned int button, const Vertex *v) {
|
|
||||||
if(button != 1 || !pressed)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
pressed = false;
|
|
||||||
|
|
||||||
if(v) {
|
|
||||||
Room room = createRoom();
|
|
||||||
|
|
||||||
if(editManager->polygonOk(room.getPolygon())) {
|
|
||||||
editManager->addRoom(room);
|
|
||||||
|
|
||||||
editManager->redraw();
|
|
||||||
sidebar.update();
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
editManager->redraw();
|
|
||||||
sidebar.update();
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
|
@ -1,65 +0,0 @@
|
||||||
#ifndef TOOLADDRECT_H_
|
|
||||||
#define TOOLADDRECT_H_
|
|
||||||
|
|
||||||
#include "Tool.h"
|
|
||||||
#include "SidebarAdd.h"
|
|
||||||
|
|
||||||
|
|
||||||
class ToolAddRect : public Tool, private EventHandler, private Renderer {
|
|
||||||
private:
|
|
||||||
GtkWidget *image;
|
|
||||||
|
|
||||||
EditManager *editManager;
|
|
||||||
|
|
||||||
SidebarAdd sidebar;
|
|
||||||
|
|
||||||
bool pressed;
|
|
||||||
Vertex v1;
|
|
||||||
|
|
||||||
// prevent shallow copy
|
|
||||||
ToolAddRect(const ToolAddRect &t);
|
|
||||||
const ToolAddRect& operator=(const ToolAddRect &t);
|
|
||||||
|
|
||||||
Room createRoom();
|
|
||||||
|
|
||||||
public:
|
|
||||||
ToolAddRect(EditManager *editManager);
|
|
||||||
virtual ~ToolAddRect();
|
|
||||||
|
|
||||||
virtual void activate();
|
|
||||||
|
|
||||||
virtual const char *getType() const {
|
|
||||||
return "ToolAddRect";
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual const char *getName() const {
|
|
||||||
return "Add rectangular room";
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual GtkWidget *getImage() {
|
|
||||||
return image;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool hoverFilter(const LevelObject &object) const {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual EventHandler* getEventHandler() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual Renderer *getRenderer() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void render(const Level &level, const Rectangle &rect, float scale);
|
|
||||||
|
|
||||||
virtual bool buttonPress(unsigned int button, const Vertex *v);
|
|
||||||
virtual bool buttonRelease(unsigned int button, const Vertex *v);
|
|
||||||
|
|
||||||
virtual Sidebar* getSidebar() {
|
|
||||||
return &sidebar;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*TOOLADDRECT_H_*/
|
|
62
ToolGrab.cpp
62
ToolGrab.cpp
|
@ -1,62 +0,0 @@
|
||||||
#include "ToolGrab.h"
|
|
||||||
|
|
||||||
ToolGrab::ToolGrab(EditManager *editManager) : sidebar(editManager) {
|
|
||||||
this->editManager = editManager;
|
|
||||||
|
|
||||||
pressed = false;
|
|
||||||
|
|
||||||
image = gtk_image_new_from_stock(GTK_STOCK_MISSING_IMAGE, GTK_ICON_SIZE_BUTTON);
|
|
||||||
g_object_ref_sink(G_OBJECT(image));
|
|
||||||
}
|
|
||||||
|
|
||||||
ToolGrab::~ToolGrab() {
|
|
||||||
g_object_unref(G_OBJECT(image));
|
|
||||||
}
|
|
||||||
|
|
||||||
void ToolGrab::activate() {
|
|
||||||
pressed = false;
|
|
||||||
editManager->setSelectedObject(NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ToolGrab::buttonPress(unsigned int button, const Vertex *v) {
|
|
||||||
if(button != 1 || !editManager->getHoveredObject())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
pressed = true;
|
|
||||||
grabbedVertex = *v;
|
|
||||||
|
|
||||||
editManager->setSelectedObject(editManager->getHoveredObject());
|
|
||||||
|
|
||||||
editManager->redraw();
|
|
||||||
sidebar.update();
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ToolGrab::buttonRelease(unsigned int button, const Vertex *v) {
|
|
||||||
if(button != 1)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
pressed = false;
|
|
||||||
|
|
||||||
editManager->setSelectedObject(NULL);
|
|
||||||
|
|
||||||
editManager->redraw();
|
|
||||||
sidebar.update();
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ToolGrab::motion(const Vertex *v) {
|
|
||||||
if(!pressed)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if(!v)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
editManager->getSelectedObject()->move(v->getX()-grabbedVertex.getX(), v->getY()-grabbedVertex.getY());
|
|
||||||
|
|
||||||
grabbedVertex = *v;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
59
ToolGrab.h
59
ToolGrab.h
|
@ -1,59 +0,0 @@
|
||||||
#ifndef TOOLGRAB_H_
|
|
||||||
#define TOOLGRAB_H_
|
|
||||||
|
|
||||||
#include "Tool.h"
|
|
||||||
#include "EditManager.h"
|
|
||||||
#include "SidebarView.h"
|
|
||||||
|
|
||||||
|
|
||||||
class ToolGrab : public Tool, private EventHandler {
|
|
||||||
private:
|
|
||||||
GtkWidget *image;
|
|
||||||
|
|
||||||
EditManager *editManager;
|
|
||||||
|
|
||||||
SidebarView sidebar;
|
|
||||||
|
|
||||||
bool pressed;
|
|
||||||
Vertex grabbedVertex;
|
|
||||||
|
|
||||||
// prevent shallow copy
|
|
||||||
ToolGrab(const ToolGrab &t);
|
|
||||||
const ToolGrab& operator=(const ToolGrab &t);
|
|
||||||
|
|
||||||
public:
|
|
||||||
ToolGrab(EditManager *editManager);
|
|
||||||
virtual ~ToolGrab();
|
|
||||||
|
|
||||||
virtual void activate();
|
|
||||||
|
|
||||||
virtual const char *getType() const {
|
|
||||||
return "ToolGrab";
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual const char *getName() const {
|
|
||||||
return "Grab";
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual GtkWidget *getImage() {
|
|
||||||
return image;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool hoverFilter(const LevelObject &object) const {
|
|
||||||
return object.canMove();
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual EventHandler* getEventHandler() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool buttonPress(unsigned int button, const Vertex *v);
|
|
||||||
virtual bool buttonRelease(unsigned int button, const Vertex *v);
|
|
||||||
virtual bool motion(const Vertex *v);
|
|
||||||
|
|
||||||
virtual Sidebar* getSidebar() {
|
|
||||||
return &sidebar;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*TOOLGRAB_H_*/
|
|
|
@ -1,96 +0,0 @@
|
||||||
#include "ToolRotate.h"
|
|
||||||
#include <GL/gl.h>
|
|
||||||
|
|
||||||
|
|
||||||
ToolRotate::ToolRotate(EditManager *editManager) : Renderer(editManager), sidebar(editManager) {
|
|
||||||
this->editManager = editManager;
|
|
||||||
|
|
||||||
pressed = false;
|
|
||||||
|
|
||||||
image = gtk_image_new_from_stock(GTK_STOCK_MISSING_IMAGE, GTK_ICON_SIZE_BUTTON);
|
|
||||||
g_object_ref_sink(G_OBJECT(image));
|
|
||||||
}
|
|
||||||
|
|
||||||
ToolRotate::~ToolRotate() {
|
|
||||||
g_object_unref(G_OBJECT(image));
|
|
||||||
}
|
|
||||||
|
|
||||||
void ToolRotate::activate() {
|
|
||||||
pressed = false;
|
|
||||||
editManager->setSelectedObject(NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ToolRotate::buttonPress(unsigned int button, const Vertex *v) {
|
|
||||||
if(button != 1 || !editManager->getHoveredObject())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
pressed = true;
|
|
||||||
valid = false;
|
|
||||||
vertexRot = vertex = *v;
|
|
||||||
|
|
||||||
editManager->setSelectedObject(editManager->getHoveredObject());
|
|
||||||
|
|
||||||
editManager->redraw();
|
|
||||||
sidebar.update();
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ToolRotate::buttonRelease(unsigned int button, const Vertex *v) {
|
|
||||||
if(button != 1)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
pressed = false;
|
|
||||||
|
|
||||||
editManager->setSelectedObject(NULL);
|
|
||||||
|
|
||||||
editManager->redraw();
|
|
||||||
sidebar.update();
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ToolRotate::motion(const Vertex *v, float scale) {
|
|
||||||
if(!pressed)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if(!v)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
vertex = *v;
|
|
||||||
|
|
||||||
float a = atan2((vertex-vertexRot).getY(), (vertex-vertexRot).getX());
|
|
||||||
|
|
||||||
if(vertexRot.distanceSq(vertex) > (10*10)/(scale*scale)) {
|
|
||||||
if(valid)
|
|
||||||
editManager->getSelectedObject()->rotate(vertexRot, a-angle);
|
|
||||||
|
|
||||||
else
|
|
||||||
valid = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
valid = false;
|
|
||||||
|
|
||||||
angle = a;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ToolRotate::render(const Level &level, const Rectangle &rect, float scale) {
|
|
||||||
Renderer::render(level, rect, scale);
|
|
||||||
|
|
||||||
if(pressed && valid) {
|
|
||||||
glLineWidth(1.0f);
|
|
||||||
glColor4f(1.0f, 1.0f, 1.0f, 0.7f);
|
|
||||||
drawCircleDotted(vertexRot, vertexRot.distance(vertex), 64, 16, angle);
|
|
||||||
|
|
||||||
glLineWidth(2.0f);
|
|
||||||
|
|
||||||
glBegin(GL_LINES);
|
|
||||||
|
|
||||||
glVertex2f(vertexRot.getX(), vertexRot.getY());
|
|
||||||
glVertex2f(vertex.getX(), vertex.getY());
|
|
||||||
|
|
||||||
glEnd();
|
|
||||||
}
|
|
||||||
}
|
|
65
ToolRotate.h
65
ToolRotate.h
|
@ -1,65 +0,0 @@
|
||||||
#ifndef TOOLROTATE_H_
|
|
||||||
#define TOOLROTATE_H_
|
|
||||||
|
|
||||||
#include "Tool.h"
|
|
||||||
#include "SidebarView.h"
|
|
||||||
#include "Renderer.h"
|
|
||||||
|
|
||||||
class ToolRotate : public Tool, private EventHandler, private Renderer {
|
|
||||||
private:
|
|
||||||
GtkWidget *image;
|
|
||||||
|
|
||||||
EditManager *editManager;
|
|
||||||
|
|
||||||
SidebarView sidebar;
|
|
||||||
|
|
||||||
bool pressed, valid;
|
|
||||||
float angle;
|
|
||||||
Vertex vertexRot, vertex;
|
|
||||||
|
|
||||||
// prevent shallow copy
|
|
||||||
ToolRotate(const ToolRotate &t);
|
|
||||||
const ToolRotate& operator=(const ToolRotate &t);
|
|
||||||
|
|
||||||
public:
|
|
||||||
ToolRotate(EditManager *editManager);
|
|
||||||
virtual ~ToolRotate();
|
|
||||||
|
|
||||||
virtual void activate();
|
|
||||||
|
|
||||||
virtual const char *getType() const {
|
|
||||||
return "ToolRotate";
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual const char *getName() const {
|
|
||||||
return "Rotate";
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual GtkWidget *getImage() {
|
|
||||||
return image;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool hoverFilter(const LevelObject &object) const {
|
|
||||||
return object.canRotate();
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual EventHandler* getEventHandler() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool buttonPress(unsigned int button, const Vertex *v);
|
|
||||||
virtual bool buttonRelease(unsigned int button, const Vertex *v);
|
|
||||||
virtual bool motion(const Vertex *v, float scale);
|
|
||||||
|
|
||||||
virtual Renderer *getRenderer() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void render(const Level &level, const Rectangle &rect, float scale);
|
|
||||||
|
|
||||||
virtual Sidebar* getSidebar() {
|
|
||||||
return &sidebar;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*TOOLROTATE_H_*/
|
|
|
@ -1,25 +0,0 @@
|
||||||
#include "ToolSelector.h"
|
|
||||||
|
|
||||||
|
|
||||||
ToolSelector::ToolSelector(EditManager *editManager) : sidebar(editManager) {
|
|
||||||
this->editManager = editManager;
|
|
||||||
|
|
||||||
image = gtk_image_new_from_stock(GTK_STOCK_MISSING_IMAGE, GTK_ICON_SIZE_BUTTON);
|
|
||||||
g_object_ref_sink(G_OBJECT(image));
|
|
||||||
}
|
|
||||||
|
|
||||||
ToolSelector::~ToolSelector() {
|
|
||||||
g_object_unref(G_OBJECT(image));
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ToolSelector::buttonPress(unsigned int button, const Vertex *v) {
|
|
||||||
if(button != 1)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
editManager->setSelectedObject(editManager->getHoveredObject());
|
|
||||||
|
|
||||||
editManager->redraw();
|
|
||||||
sidebar.update();
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
|
@ -1,52 +0,0 @@
|
||||||
#ifndef TOOLSELECTOR_H_
|
|
||||||
#define TOOLSELECTOR_H_
|
|
||||||
|
|
||||||
#include "Tool.h"
|
|
||||||
#include "EditManager.h"
|
|
||||||
#include "SidebarView.h"
|
|
||||||
|
|
||||||
|
|
||||||
class ToolSelector : public Tool, public EventHandler {
|
|
||||||
private:
|
|
||||||
GtkWidget *image;
|
|
||||||
|
|
||||||
EditManager *editManager;
|
|
||||||
|
|
||||||
SidebarView sidebar;
|
|
||||||
|
|
||||||
// prevent shallow copy
|
|
||||||
ToolSelector(const ToolSelector &t);
|
|
||||||
const ToolSelector& operator=(const ToolSelector &t);
|
|
||||||
|
|
||||||
public:
|
|
||||||
ToolSelector(EditManager *editManager);
|
|
||||||
virtual ~ToolSelector();
|
|
||||||
|
|
||||||
virtual const char *getType() const {
|
|
||||||
return "ToolSelector";
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual const char *getName() const {
|
|
||||||
return "Select";
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual GtkWidget *getImage() {
|
|
||||||
return image;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool hoverFilter(const LevelObject &object) const {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual EventHandler *getEventHandler() {
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool buttonPress(unsigned int button, const Vertex *v);
|
|
||||||
|
|
||||||
virtual Sidebar* getSidebar() {
|
|
||||||
return &sidebar;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*TOOLSELECTOR_H_*/
|
|
70
Triangle.cpp
70
Triangle.cpp
|
@ -1,70 +0,0 @@
|
||||||
#include "Triangle.h"
|
|
||||||
#include "Line.h"
|
|
||||||
#include <math.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
|
|
||||||
Triangle::Direction Triangle::getDirection() const {
|
|
||||||
float c = (va.getX()-vb.getX())*(vc.getY()-vb.getY()) - (vc.getX()-vb.getX())*(va.getY()-vb.getY());
|
|
||||||
|
|
||||||
return (c < 0) ? CW : (c > 0) ? CCW : UNKNOWN;
|
|
||||||
}
|
|
||||||
|
|
||||||
float Triangle::area() const {
|
|
||||||
float a = vb.distanceSq(vc);
|
|
||||||
float b = vc.distanceSq(va);
|
|
||||||
float c = va.distanceSq(vb);
|
|
||||||
|
|
||||||
return sqrt((a+b+c)*a+b+c - 2*(a*a+b*b+c*c))/4;
|
|
||||||
}
|
|
||||||
|
|
||||||
float Triangle::perimeter() const {
|
|
||||||
return va.distance(vb) + vb.distance(vc) + vc.distance(va);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Triangle::contains(const Vertex &v) const {
|
|
||||||
float a = (v.getX()-vb.getX())*(vc.getY()-vb.getY()) - (vc.getX()-vb.getX())*(v.getY()-vb.getY());
|
|
||||||
float b = (v.getX()-vc.getX())*(va.getY()-vc.getY()) - (va.getX()-vc.getX())*(v.getY()-vc.getY());
|
|
||||||
float c = (v.getX()-va.getX())*(vb.getY()-va.getY()) - (vb.getX()-va.getX())*(v.getY()-va.getY());
|
|
||||||
|
|
||||||
switch(getDirection()) {
|
|
||||||
case CW:
|
|
||||||
return ((a < 1E-6) && (b < 1E-6) && (c < 1E-6));
|
|
||||||
case CCW:
|
|
||||||
return ((a > -1E-6) && (b > -1E-6) && (c > -1E-6));
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Triangle::onEdge(const Vertex &v) const {
|
|
||||||
return (Line(va, vb).contains(v) || Line(vb, vc).contains(v) || Line(vc, va).contains(v));
|
|
||||||
}
|
|
||||||
|
|
||||||
int Triangle::intersectionCount(const Line &l) const {
|
|
||||||
int ret = 0;
|
|
||||||
Vertex v1, v2, v3;
|
|
||||||
|
|
||||||
printf("Testing line: (%f %f) (%f %f)\n", l.getVertex1().getX(), l.getVertex1().getY(), l.getVertex2().getX(), l.getVertex2().getY());
|
|
||||||
if(Line(va, vb).intersects(l, &v1) == INTERSECTION_SEGMENT_SEGMENT) {
|
|
||||||
printf("Intersection: (%f %f)\n", v1.getX(), v1.getY());
|
|
||||||
ret++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(Line(vb, vc).intersects(l, &v2) == INTERSECTION_SEGMENT_SEGMENT) {
|
|
||||||
printf("Intersection: (%f %f)\n", v2.getX(), v2.getY());
|
|
||||||
if(v2.distanceSq(v1) >= 1E-6)
|
|
||||||
ret++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(Line(vc, va).intersects(l, &v3) == INTERSECTION_SEGMENT_SEGMENT) {
|
|
||||||
printf("Intersection: (%f %f)\n", v3.getX(), v3.getY());
|
|
||||||
if(v3.distanceSq(v1) >= 1E-6 && v3.distanceSq(v2) >= 1E-6)
|
|
||||||
ret++;
|
|
||||||
}
|
|
||||||
|
|
||||||
printf("Found %i intersections.\n", ret);
|
|
||||||
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
42
Triangle.h
42
Triangle.h
|
@ -1,42 +0,0 @@
|
||||||
#ifndef TRIANGLE_H_
|
|
||||||
#define TRIANGLE_H_
|
|
||||||
|
|
||||||
|
|
||||||
#include "Vertex.h"
|
|
||||||
#include "Line.h"
|
|
||||||
|
|
||||||
class Triangle {
|
|
||||||
private:
|
|
||||||
Vertex va, vb, vc;
|
|
||||||
public:
|
|
||||||
enum Direction {
|
|
||||||
CW, CCW, UNKNOWN
|
|
||||||
};
|
|
||||||
|
|
||||||
Triangle() {}
|
|
||||||
Triangle(const Vertex& vertexa, const Vertex& vertexb, const Vertex& vertexc)
|
|
||||||
: va(vertexa), vb(vertexb), vc(vertexc) {}
|
|
||||||
|
|
||||||
Vertex &getVertexA() {return va;}
|
|
||||||
const Vertex &getVertexA() const {return va;}
|
|
||||||
void setVertexA(const Vertex &v) {va = v;}
|
|
||||||
|
|
||||||
Vertex &getVertexB() {return vb;}
|
|
||||||
const Vertex &getVertexB() const {return vb;}
|
|
||||||
void setVertexB(const Vertex &v) {vb = v;}
|
|
||||||
|
|
||||||
Vertex &getVertexC() {return vc;}
|
|
||||||
const Vertex &getVertexC() const {return vc;}
|
|
||||||
void setVertexC(const Vertex &v) {vc = v;}
|
|
||||||
|
|
||||||
Direction getDirection() const;
|
|
||||||
|
|
||||||
float area() const;
|
|
||||||
float perimeter() const;
|
|
||||||
|
|
||||||
bool contains(const Vertex &v) const;
|
|
||||||
bool onEdge(const Vertex &v) const;
|
|
||||||
int intersectionCount(const Line &l) const;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*TRIANGLE_H_*/
|
|
105
UIManager.cpp
105
UIManager.cpp
|
@ -1,105 +0,0 @@
|
||||||
#include "UIManager.h"
|
|
||||||
#include "Window.h"
|
|
||||||
|
|
||||||
|
|
||||||
const gchar* UIManager::uiData = (const gchar*)
|
|
||||||
"<ui>"
|
|
||||||
"<menubar>"
|
|
||||||
"<menu action=\"fileMenu\">"
|
|
||||||
"<menuitem action=\"new\"/>"
|
|
||||||
"<menuitem action=\"open\"/>"
|
|
||||||
"<menuitem action=\"save\"/>"
|
|
||||||
"<menuitem action=\"saveAs\"/>"
|
|
||||||
"<separator/>"
|
|
||||||
"<menuitem action=\"quit\"/>"
|
|
||||||
"</menu>"
|
|
||||||
"</menubar>"
|
|
||||||
"<toolbar action=\"toolbar1\">"
|
|
||||||
"<separator/>"
|
|
||||||
"<toolitem action=\"zoomIn\"/>"
|
|
||||||
"<toolitem action=\"zoomOut\"/>"
|
|
||||||
"<separator/>"
|
|
||||||
"</toolbar>"
|
|
||||||
"</ui>";
|
|
||||||
|
|
||||||
|
|
||||||
void UIManager::handleAction(GtkAction *action, UIManager *uiManager) {
|
|
||||||
const gchar* name = gtk_action_get_name(action);
|
|
||||||
|
|
||||||
if(!strcmp(name, "save"))
|
|
||||||
uiManager->window->handleAction(SAVE);
|
|
||||||
else if(!strcmp(name, "saveAs"))
|
|
||||||
uiManager->window->handleAction(SAVE_AS);
|
|
||||||
else if(!strcmp(name, "zoomIn"))
|
|
||||||
uiManager->window->handleAction(ZOOM_IN);
|
|
||||||
else if(!strcmp(name, "zoomOut"))
|
|
||||||
uiManager->window->handleAction(ZOOM_OUT);
|
|
||||||
}
|
|
||||||
|
|
||||||
GtkActionGroup* UIManager::createActions() {
|
|
||||||
GtkActionGroup *actionGroup = gtk_action_group_new("actions");
|
|
||||||
GtkAction *action;
|
|
||||||
|
|
||||||
action = gtk_action_new("fileMenu", "_File", NULL, NULL);
|
|
||||||
gtk_action_group_add_action(actionGroup, action);
|
|
||||||
g_object_unref(G_OBJECT(action));
|
|
||||||
|
|
||||||
action = gtk_action_new("toolbar1", "Toolbar", NULL, NULL);
|
|
||||||
gtk_action_group_add_action(actionGroup, action);
|
|
||||||
g_object_unref(G_OBJECT(action));
|
|
||||||
|
|
||||||
action = gtk_action_new("new", "_New", NULL, GTK_STOCK_NEW);
|
|
||||||
g_signal_connect(G_OBJECT(action), "activate", G_CALLBACK(handleAction), this);
|
|
||||||
gtk_action_group_add_action_with_accel(actionGroup, action, NULL);
|
|
||||||
g_object_unref(G_OBJECT(action));
|
|
||||||
|
|
||||||
action = gtk_action_new("open", "_Open", NULL, GTK_STOCK_OPEN);
|
|
||||||
g_signal_connect(G_OBJECT(action), "activate", G_CALLBACK(handleAction), this);
|
|
||||||
gtk_action_group_add_action_with_accel(actionGroup, action, NULL);
|
|
||||||
g_object_unref(G_OBJECT(action));
|
|
||||||
|
|
||||||
action = gtk_action_new("save", "_Save", NULL, GTK_STOCK_SAVE);
|
|
||||||
g_signal_connect(G_OBJECT(action), "activate", G_CALLBACK(handleAction), this);
|
|
||||||
gtk_action_group_add_action_with_accel(actionGroup, action, NULL);
|
|
||||||
g_object_unref(G_OBJECT(action));
|
|
||||||
|
|
||||||
action = gtk_action_new("saveAs", "Save _As", NULL, NULL);
|
|
||||||
g_signal_connect(G_OBJECT(action), "activate", G_CALLBACK(handleAction), this);
|
|
||||||
gtk_action_group_add_action(actionGroup, action);
|
|
||||||
g_object_unref(G_OBJECT(action));
|
|
||||||
|
|
||||||
action = gtk_action_new("zoomIn", "Zoom _in", NULL, GTK_STOCK_ZOOM_IN);
|
|
||||||
g_signal_connect(G_OBJECT(action), "activate", G_CALLBACK(handleAction), this);
|
|
||||||
gtk_action_group_add_action_with_accel(actionGroup, action, NULL);
|
|
||||||
g_object_unref(G_OBJECT(action));
|
|
||||||
|
|
||||||
action = gtk_action_new("zoomOut", "Zoom _out", NULL, GTK_STOCK_ZOOM_OUT);
|
|
||||||
g_signal_connect(G_OBJECT(action), "activate", G_CALLBACK(handleAction), this);
|
|
||||||
gtk_action_group_add_action_with_accel(actionGroup, action, NULL);
|
|
||||||
g_object_unref(G_OBJECT(action));
|
|
||||||
|
|
||||||
action = gtk_action_new("quit", "_Quit", NULL, GTK_STOCK_QUIT);
|
|
||||||
g_signal_connect(G_OBJECT(action), "activate", G_CALLBACK(gtk_main_quit), NULL);
|
|
||||||
gtk_action_group_add_action_with_accel(actionGroup, action, NULL);
|
|
||||||
g_object_unref(G_OBJECT(action));
|
|
||||||
|
|
||||||
return actionGroup;
|
|
||||||
}
|
|
||||||
|
|
||||||
UIManager::UIManager(Window *window) {
|
|
||||||
this->window = window;
|
|
||||||
|
|
||||||
uiManager = gtk_ui_manager_new();
|
|
||||||
|
|
||||||
gtk_ui_manager_add_ui_from_string(uiManager, uiData, -1, NULL);
|
|
||||||
|
|
||||||
GtkActionGroup *actions = createActions();
|
|
||||||
gtk_ui_manager_insert_action_group(uiManager, actions, 0);
|
|
||||||
g_object_unref(G_OBJECT(actions));
|
|
||||||
|
|
||||||
gtk_ui_manager_ensure_update(uiManager);
|
|
||||||
}
|
|
||||||
|
|
||||||
UIManager::~UIManager() {
|
|
||||||
g_object_unref(G_OBJECT(uiManager));
|
|
||||||
}
|
|
43
UIManager.h
43
UIManager.h
|
@ -1,43 +0,0 @@
|
||||||
#ifndef UIMANAGER_H_
|
|
||||||
#define UIMANAGER_H_
|
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
|
||||||
|
|
||||||
|
|
||||||
class Window;
|
|
||||||
|
|
||||||
|
|
||||||
class UIManager {
|
|
||||||
private:
|
|
||||||
static const gchar* uiData;
|
|
||||||
|
|
||||||
GtkUIManager *uiManager;
|
|
||||||
Window *window;
|
|
||||||
|
|
||||||
GtkActionGroup* createActions();
|
|
||||||
|
|
||||||
static void handleAction(GtkAction *action, UIManager *uiManager);
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
|
||||||
enum Action {
|
|
||||||
SAVE, SAVE_AS, ZOOM_IN, ZOOM_OUT
|
|
||||||
};
|
|
||||||
|
|
||||||
UIManager(Window *window);
|
|
||||||
virtual ~UIManager();
|
|
||||||
|
|
||||||
GtkWidget* getMenu() {
|
|
||||||
return gtk_ui_manager_get_widget(uiManager, "/ui/menubar");
|
|
||||||
}
|
|
||||||
|
|
||||||
GtkWidget* getToolbar() {
|
|
||||||
return gtk_ui_manager_get_widget(uiManager, "/ui/toolbar1");
|
|
||||||
}
|
|
||||||
|
|
||||||
GtkAccelGroup* getAccels() {
|
|
||||||
return gtk_ui_manager_get_accel_group(uiManager);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*UIMANAGER_H_*/
|
|
55
Vertex.cpp
55
Vertex.cpp
|
@ -1,55 +0,0 @@
|
||||||
#include "Vertex.h"
|
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
float Vertex::distanceSq(const Vertex &v) const {
|
|
||||||
return (x - v.x)*(x - v.x) + (y - v.y)*(y - v.y);
|
|
||||||
}
|
|
||||||
|
|
||||||
float Vertex::distance(const Vertex &v) const {
|
|
||||||
return sqrtf(distanceSq(v));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Vertex Vertex::operator+(const Vertex &v) const {
|
|
||||||
return Vertex(x + v.x, y + v.y);
|
|
||||||
}
|
|
||||||
|
|
||||||
Vertex Vertex::operator-(const Vertex &v) const {
|
|
||||||
return Vertex(x - v.x, y - v.y);
|
|
||||||
}
|
|
||||||
|
|
||||||
Vertex Vertex::operator*(float f) const {
|
|
||||||
return Vertex(x*f, y*f);
|
|
||||||
}
|
|
||||||
|
|
||||||
Vertex Vertex::operator/(float f) const {
|
|
||||||
return Vertex(x/f, y/f);
|
|
||||||
}
|
|
||||||
|
|
||||||
Vertex& Vertex::operator+=(const Vertex &v) {
|
|
||||||
x += v.x;
|
|
||||||
y += v.y;
|
|
||||||
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
Vertex& Vertex::operator-=(const Vertex &v) {
|
|
||||||
x -= v.x;
|
|
||||||
y -= v.y;
|
|
||||||
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
Vertex& Vertex::operator*=(float f) {
|
|
||||||
x *= f;
|
|
||||||
y *= f;
|
|
||||||
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
Vertex& Vertex::operator/=(float f) {
|
|
||||||
x /= f;
|
|
||||||
y /= f;
|
|
||||||
|
|
||||||
return *this;
|
|
||||||
}
|
|
35
Vertex.h
35
Vertex.h
|
@ -1,35 +0,0 @@
|
||||||
#ifndef VERTEX_H_
|
|
||||||
#define VERTEX_H_
|
|
||||||
|
|
||||||
class Vertex {
|
|
||||||
private:
|
|
||||||
float x, y;
|
|
||||||
|
|
||||||
public:
|
|
||||||
Vertex() {x = y = 0.0;}
|
|
||||||
Vertex(float x, float y) {this->x = x; this->y = y;}
|
|
||||||
|
|
||||||
float getX() const {return x;}
|
|
||||||
void setX(float x) {this->x = x;}
|
|
||||||
|
|
||||||
float getY() const {return y;}
|
|
||||||
void setY(float y) {this->y = y;}
|
|
||||||
|
|
||||||
void setLocation(float x, float y) {this->x = x; this->y = y;}
|
|
||||||
|
|
||||||
float distanceSq(const Vertex &v) const;
|
|
||||||
float distance(const Vertex &v) const;
|
|
||||||
|
|
||||||
Vertex operator+(const Vertex &v) const;
|
|
||||||
Vertex operator-(const Vertex &v) const;
|
|
||||||
Vertex operator*(float f) const;
|
|
||||||
Vertex operator/(float f) const;
|
|
||||||
|
|
||||||
Vertex& operator+=(const Vertex &v);
|
|
||||||
Vertex& operator-=(const Vertex &v);
|
|
||||||
Vertex& operator*=(float f);
|
|
||||||
Vertex& operator/=(float f);
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*VERTEX_H_*/
|
|
35
Vertex3d.cpp
35
Vertex3d.cpp
|
@ -1,35 +0,0 @@
|
||||||
#include "Vertex3d.h"
|
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
float Vertex3d::distanceSq(const Vertex3d &v) const {
|
|
||||||
return (x - v.x)*(x - v.x) + (y - v.y)*(y - v.y) + (z - v.z)*(z - v.z);
|
|
||||||
}
|
|
||||||
|
|
||||||
float Vertex3d::distance(const Vertex3d &v) const {
|
|
||||||
return sqrtf(distanceSq(v));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Vertex3d Vertex3d::operator+(const Vertex3d &v) const {
|
|
||||||
return Vertex3d(x + v.x, y + v.y, z + v.z);
|
|
||||||
}
|
|
||||||
|
|
||||||
Vertex3d Vertex3d::operator-(const Vertex3d &v) const {
|
|
||||||
return Vertex3d(x - v.x, y - v.y, z - v.z);
|
|
||||||
}
|
|
||||||
|
|
||||||
Vertex3d& Vertex3d::operator+=(const Vertex3d &v) {
|
|
||||||
x += v.x;
|
|
||||||
y += v.y;
|
|
||||||
z += v.z;
|
|
||||||
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
Vertex3d& Vertex3d::operator-=(const Vertex3d &v) {
|
|
||||||
x -= v.x;
|
|
||||||
y -= v.y;
|
|
||||||
z -= v.z;
|
|
||||||
|
|
||||||
return *this;
|
|
||||||
}
|
|
33
Vertex3d.h
33
Vertex3d.h
|
@ -1,33 +0,0 @@
|
||||||
#ifndef VERTEX3D_H_
|
|
||||||
#define VERTEX3D_H_
|
|
||||||
|
|
||||||
class Vertex3d {
|
|
||||||
private:
|
|
||||||
float x, y, z;
|
|
||||||
|
|
||||||
public:
|
|
||||||
Vertex3d() {x = y = z = 0.0;}
|
|
||||||
Vertex3d(float x, float y, float z) {this->x = x; this->y = y; this->z = z;}
|
|
||||||
|
|
||||||
float getX() const {return x;}
|
|
||||||
void setX(float x) {this->x = x;}
|
|
||||||
|
|
||||||
float getY() const {return y;}
|
|
||||||
void setY(float y) {this->y = y;}
|
|
||||||
|
|
||||||
float getZ() const {return z;}
|
|
||||||
void setZ(float z) {this->z = z;}
|
|
||||||
|
|
||||||
void setLocation(float x, float y, float z) {this->x = x; this->y = y; this->z = z;}
|
|
||||||
|
|
||||||
float distanceSq(const Vertex3d &v) const;
|
|
||||||
float distance(const Vertex3d &v) const;
|
|
||||||
|
|
||||||
Vertex3d operator+(const Vertex3d &v) const;
|
|
||||||
Vertex3d operator-(const Vertex3d &v) const;
|
|
||||||
|
|
||||||
Vertex3d& operator+=(const Vertex3d &v);
|
|
||||||
Vertex3d& operator-=(const Vertex3d &v);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*VERTEX3D_H_*/
|
|
|
@ -1,23 +0,0 @@
|
||||||
#ifndef VERTEXPROVIDER_H_
|
|
||||||
#define VERTEXPROVIDER_H_
|
|
||||||
|
|
||||||
#include "Vertex.h"
|
|
||||||
|
|
||||||
|
|
||||||
class LevelVertex;
|
|
||||||
|
|
||||||
class VertexProvider {
|
|
||||||
public:
|
|
||||||
virtual ~VertexProvider() {}
|
|
||||||
|
|
||||||
virtual const Vertex* getVertex(size_t id) const = 0;
|
|
||||||
virtual size_t getVertexCount() const = 0;
|
|
||||||
|
|
||||||
virtual void moveVertex(size_t id, float x, float y) {}
|
|
||||||
virtual void rotateVertex(size_t id, Vertex m, float a) {}
|
|
||||||
|
|
||||||
virtual bool canConnectVertex(size_t id) const {return false;}
|
|
||||||
virtual size_t connectVertex(size_t id) {return id;}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*VERTEXPROVIDER_H_*/
|
|
72
Window.cpp
72
Window.cpp
|
@ -1,72 +0,0 @@
|
||||||
#include "Window.h"
|
|
||||||
#include "WindowManager.h"
|
|
||||||
|
|
||||||
|
|
||||||
gboolean Window::deleteEvent(GtkWidget *widget, GdkEvent *event, Window *window) {
|
|
||||||
gtk_widget_hide(widget);
|
|
||||||
|
|
||||||
window->manager->windowClosed(window);
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
Window::Window(GdkGLConfig *glconfig, WindowManager *manager)
|
|
||||||
: uiManager(this), editor(this), drawer(this, glconfig), sidebar(this),
|
|
||||||
fileManager(this)
|
|
||||||
{
|
|
||||||
this->manager = manager;
|
|
||||||
|
|
||||||
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
|
||||||
gtk_window_set_default_size(GTK_WINDOW(window), 640, 480);
|
|
||||||
g_signal_connect(G_OBJECT(window), "delete-event", G_CALLBACK(deleteEvent), this);
|
|
||||||
|
|
||||||
GtkWidget *vbox = gtk_vbox_new(FALSE, 0);
|
|
||||||
gtk_container_add(GTK_CONTAINER(window), vbox);
|
|
||||||
|
|
||||||
gtk_box_pack_start(GTK_BOX(vbox), uiManager.getMenu(), FALSE, FALSE, 0);
|
|
||||||
gtk_box_pack_start(GTK_BOX(vbox), uiManager.getToolbar(), FALSE, FALSE, 0);
|
|
||||||
|
|
||||||
gtk_window_add_accel_group(GTK_WINDOW(window), uiManager.getAccels());
|
|
||||||
|
|
||||||
GtkWidget *hPaned = gtk_hpaned_new();
|
|
||||||
gtk_box_pack_end(GTK_BOX(vbox), hPaned, TRUE, TRUE, 0);
|
|
||||||
|
|
||||||
gtk_paned_pack1(GTK_PANED(hPaned), drawer.getWidget(), TRUE, TRUE);
|
|
||||||
|
|
||||||
gtk_paned_pack2(GTK_PANED(hPaned), sidebar.getWidget(), FALSE, TRUE);
|
|
||||||
sidebar.update();
|
|
||||||
|
|
||||||
gtk_widget_show_all(vbox);
|
|
||||||
}
|
|
||||||
|
|
||||||
Window::~Window() {
|
|
||||||
gtk_widget_destroy(window);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Window::show() {
|
|
||||||
gtk_widget_show(window);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Window::update() {
|
|
||||||
drawer.update();
|
|
||||||
sidebar.update();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Window::handleAction(UIManager::Action action) {
|
|
||||||
switch(action) {
|
|
||||||
case UIManager::SAVE:
|
|
||||||
fileManager.save(GTK_WINDOW(window));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case UIManager::SAVE_AS:
|
|
||||||
fileManager.saveAs(GTK_WINDOW(window));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case UIManager::ZOOM_IN:
|
|
||||||
drawer.zoom(2);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case UIManager::ZOOM_OUT:
|
|
||||||
drawer.zoom(-2);
|
|
||||||
}
|
|
||||||
}
|
|
69
Window.h
69
Window.h
|
@ -1,69 +0,0 @@
|
||||||
#ifndef WINDOW_H_
|
|
||||||
#define WINDOW_H_
|
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
|
||||||
#include <gtk/gtkgl.h>
|
|
||||||
#include "UIManager.h"
|
|
||||||
#include "Drawer.h"
|
|
||||||
#include "SidebarManager.h"
|
|
||||||
#include "FileManager.h"
|
|
||||||
#include "EditManager.h"
|
|
||||||
#include "Level.h"
|
|
||||||
|
|
||||||
|
|
||||||
class WindowManager;
|
|
||||||
|
|
||||||
|
|
||||||
class Window {
|
|
||||||
private:
|
|
||||||
GtkWidget *window;
|
|
||||||
|
|
||||||
UIManager uiManager;
|
|
||||||
|
|
||||||
EditManager editor;
|
|
||||||
|
|
||||||
Drawer drawer;
|
|
||||||
SidebarManager sidebar;
|
|
||||||
|
|
||||||
FileManager fileManager;
|
|
||||||
|
|
||||||
WindowManager *manager;
|
|
||||||
|
|
||||||
Level level;
|
|
||||||
|
|
||||||
// prevent shallow copy
|
|
||||||
Window(const Window &w);
|
|
||||||
const Window& operator=(const Window &w);
|
|
||||||
|
|
||||||
static gboolean deleteEvent(GtkWidget *widget, GdkEvent *event, Window *window);
|
|
||||||
|
|
||||||
public:
|
|
||||||
Window(GdkGLConfig *glconfig, WindowManager *manager);
|
|
||||||
virtual ~Window();
|
|
||||||
|
|
||||||
void show();
|
|
||||||
void update();
|
|
||||||
void handleAction(UIManager::Action action);
|
|
||||||
|
|
||||||
void redraw() {
|
|
||||||
drawer.update();
|
|
||||||
}
|
|
||||||
|
|
||||||
void resetTool() {
|
|
||||||
sidebar.resetTool();
|
|
||||||
}
|
|
||||||
|
|
||||||
Tool* getActiveTool() {
|
|
||||||
return sidebar.getActiveTool();
|
|
||||||
}
|
|
||||||
|
|
||||||
EditManager& getEditManager() {
|
|
||||||
return editor;
|
|
||||||
}
|
|
||||||
|
|
||||||
Level& getLevel() {
|
|
||||||
return level;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*WINDOW_H_*/
|
|
|
@ -1,28 +0,0 @@
|
||||||
#include "WindowManager.h"
|
|
||||||
|
|
||||||
|
|
||||||
WindowManager::WindowManager(GdkGLConfig *glconfig) {
|
|
||||||
this->glconfig = glconfig;
|
|
||||||
|
|
||||||
windows.push_back(new Window(glconfig, this));
|
|
||||||
}
|
|
||||||
|
|
||||||
WindowManager::~WindowManager() {
|
|
||||||
for(std::list<Window*>::iterator w = windows.begin(); w != windows.end(); w++)
|
|
||||||
delete *w;
|
|
||||||
}
|
|
||||||
|
|
||||||
void WindowManager::run() {
|
|
||||||
for(std::list<Window*>::iterator w = windows.begin(); w != windows.end(); w++)
|
|
||||||
(*w)->show();
|
|
||||||
|
|
||||||
gtk_main();
|
|
||||||
}
|
|
||||||
|
|
||||||
void WindowManager::windowClosed(Window *window) {
|
|
||||||
windows.remove(window);
|
|
||||||
delete window;
|
|
||||||
|
|
||||||
if(windows.empty())
|
|
||||||
gtk_main_quit();
|
|
||||||
}
|
|
|
@ -1,24 +0,0 @@
|
||||||
#ifndef WINDOWMANAGER_H_
|
|
||||||
#define WINDOWMANAGER_H_
|
|
||||||
|
|
||||||
#include <list>
|
|
||||||
#include <gtk/gtk.h>
|
|
||||||
#include <gtk/gtkgl.h>
|
|
||||||
#include "Window.h"
|
|
||||||
|
|
||||||
|
|
||||||
class WindowManager {
|
|
||||||
private:
|
|
||||||
GdkGLConfig *glconfig;
|
|
||||||
std::list<Window*> windows;
|
|
||||||
|
|
||||||
public:
|
|
||||||
WindowManager(GdkGLConfig *glconfig);
|
|
||||||
virtual ~WindowManager();
|
|
||||||
|
|
||||||
void run();
|
|
||||||
|
|
||||||
void windowClosed(Window *window);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /*WINDOWMANAGER_H_*/
|
|
6790
aclocal.m4
vendored
6790
aclocal.m4
vendored
File diff suppressed because it is too large
Load diff
1516
config.guess
vendored
Executable file
1516
config.guess
vendored
Executable file
File diff suppressed because it is too large
Load diff
19
config.h.in
19
config.h.in
|
@ -1,19 +1,14 @@
|
||||||
/* config.h.in. Generated from configure.in by autoheader. */
|
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||||
|
#undef HAVE_DLFCN_H
|
||||||
|
|
||||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||||
#undef HAVE_INTTYPES_H
|
#undef HAVE_INTTYPES_H
|
||||||
|
|
||||||
/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
|
|
||||||
to 0 otherwise. */
|
|
||||||
#undef HAVE_MALLOC
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <memory.h> header file. */
|
/* Define to 1 if you have the <memory.h> header file. */
|
||||||
#undef HAVE_MEMORY_H
|
#undef HAVE_MEMORY_H
|
||||||
|
|
||||||
/* Define to 1 if your system has a GNU libc compatible `realloc' function,
|
|
||||||
and to 0 otherwise. */
|
|
||||||
#undef HAVE_REALLOC
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <stdint.h> header file. */
|
/* Define to 1 if you have the <stdint.h> header file. */
|
||||||
#undef HAVE_STDINT_H
|
#undef HAVE_STDINT_H
|
||||||
|
|
||||||
|
@ -61,9 +56,3 @@
|
||||||
|
|
||||||
/* Version number of package */
|
/* Version number of package */
|
||||||
#undef VERSION
|
#undef VERSION
|
||||||
|
|
||||||
/* Define to rpl_malloc if the replacement function should be used. */
|
|
||||||
#undef malloc
|
|
||||||
|
|
||||||
/* Define to rpl_realloc if the replacement function should be used. */
|
|
||||||
#undef realloc
|
|
||||||
|
|
1622
config.sub
vendored
Executable file
1622
config.sub
vendored
Executable file
File diff suppressed because it is too large
Load diff
|
@ -4,7 +4,7 @@
|
||||||
AC_PREREQ(2.59)
|
AC_PREREQ(2.59)
|
||||||
AC_INIT(zoomedit, 0.1, matthias@gamezock.de)
|
AC_INIT(zoomedit, 0.1, matthias@gamezock.de)
|
||||||
AC_CONFIG_SRCDIR([zoomedit.cpp])
|
AC_CONFIG_SRCDIR([zoomedit.cpp])
|
||||||
AM_CONFIG_HEADER([config.h])
|
AC_CONFIG_HEADER([config.h])
|
||||||
|
|
||||||
AM_INIT_AUTOMAKE(zoomedit, 0.1)
|
AM_INIT_AUTOMAKE(zoomedit, 0.1)
|
||||||
AM_MAINTAINER_MODE
|
AM_MAINTAINER_MODE
|
||||||
|
@ -12,12 +12,13 @@ AM_MAINTAINER_MODE
|
||||||
# Checks for programs.
|
# Checks for programs.
|
||||||
AC_PROG_CXX
|
AC_PROG_CXX
|
||||||
AM_PROG_CC_C_O
|
AM_PROG_CC_C_O
|
||||||
|
AC_PROG_LIBTOOL
|
||||||
|
|
||||||
# Checks for libraries.
|
# Checks for libraries.
|
||||||
#AC_CHECK_LIB(m, [sqrt])
|
#AC_CHECK_LIB(m, [sqrt])
|
||||||
AM_PATH_GTK_2_0(2.8.0,,AC_MSG_ERROR(zoomedit needs GTK+ 2.8.0))
|
PKG_CHECK_MODULES(glademm, libglademm-2.4, , AC_MSG_ERROR(Test for libglademm-2.4 failed.))
|
||||||
AM_PATH_GTKGLEXT_1_0(1.0.0,,AC_MSG_ERROR(zoomedit needs GtkGLExt))
|
AM_PATH_GTKGLEXT_1_0(1.0.0,,AC_MSG_ERROR(Test for GtkGLExt failed.))
|
||||||
PKG_CHECK_MODULES(libxml2, libxml-2.0, , AC_MSG_ERROR(Test for libxml2 failed.))
|
#PKG_CHECK_MODULES(libxml2, libxml-2.0, , AC_MSG_ERROR(Test for libxml2 failed.))
|
||||||
|
|
||||||
|
|
||||||
# Checks for header files.
|
# Checks for header files.
|
||||||
|
@ -28,10 +29,10 @@ PKG_CHECK_MODULES(libxml2, libxml-2.0, , AC_MSG_ERROR(Test for libxml2 failed.))
|
||||||
#AC_HEADER_TIME
|
#AC_HEADER_TIME
|
||||||
|
|
||||||
# Checks for library functions.
|
# Checks for library functions.
|
||||||
AC_FUNC_MALLOC
|
#AC_FUNC_MALLOC
|
||||||
AC_FUNC_REALLOC
|
#AC_FUNC_REALLOC
|
||||||
|
|
||||||
#AC_CHECK_FUNCS([sqrtf], , AC_MSG_ERROR([required function sqrtf not found]))
|
#AC_CHECK_FUNCS([sqrtf], , AC_MSG_ERROR([required function sqrtf not found]))
|
||||||
|
|
||||||
AC_CONFIG_FILES([Makefile])
|
AC_CONFIG_FILES([Makefile Gui/Makefile])
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
19
zoomedit.cpp
19
zoomedit.cpp
|
@ -1,22 +1,23 @@
|
||||||
#include <gtk/gtk.h>
|
#include <gtkmm/main.h>
|
||||||
#include <gtk/gtkgl.h>
|
//#include <gtk/gtkgl.h>
|
||||||
#include "WindowManager.h"
|
#include "Instance.h"
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
gtk_init(&argc, &argv);
|
Gtk::Main gtk(&argc, &argv);
|
||||||
gtk_gl_init(&argc, &argv);
|
//gtk_gl_init(&argc, &argv);
|
||||||
|
|
||||||
GdkGLConfig *glconfig = gdk_gl_config_new_by_mode((GdkGLConfigMode)(GDK_GL_MODE_RGB | GDK_GL_MODE_DOUBLE));
|
/*GdkGLConfig *glconfig = gdk_gl_config_new_by_mode((GdkGLConfigMode)(GDK_GL_MODE_RGB | GDK_GL_MODE_DOUBLE));
|
||||||
if(!glconfig) glconfig = gdk_gl_config_new_by_mode(GDK_GL_MODE_RGB);
|
if(!glconfig) glconfig = gdk_gl_config_new_by_mode(GDK_GL_MODE_RGB);
|
||||||
if(!glconfig) {
|
if(!glconfig) {
|
||||||
g_print("*** No appropriate OpenGL-capable visual found.\n");
|
g_print("*** No appropriate OpenGL-capable visual found.\n");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
WindowManager windowManager(glconfig);
|
if(!ZoomEdit::Instance::create())
|
||||||
|
return 1;
|
||||||
|
|
||||||
windowManager.run();
|
gtk.run();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
270
zoomedit.glade
Normal file
270
zoomedit.glade
Normal file
|
@ -0,0 +1,270 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
|
||||||
|
<!--Generated with glade3 3.4.0 on Sun Apr 6 15:12:10 2008 -->
|
||||||
|
<glade-interface>
|
||||||
|
<widget class="GtkWindow" id="WindowMain">
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<property name="default_width">640</property>
|
||||||
|
<property name="default_height">480</property>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkVBox" id="vbox1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkMenuBar" id="menubar">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkMenuItem" id="menuitemfile">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<property name="label" translatable="yes">_File</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkMenu" id="menu1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkImageMenuItem" id="imagemenuitem1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<property name="label" translatable="yes">gtk-new</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="use_stock">True</property>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkImageMenuItem" id="imagemenuitem2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<property name="label" translatable="yes">gtk-open</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="use_stock">True</property>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkImageMenuItem" id="imagemenuitem3">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<property name="label" translatable="yes">gtk-save</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="use_stock">True</property>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkImageMenuItem" id="imagemenuitem4">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<property name="label" translatable="yes">gtk-save-as</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="use_stock">True</property>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkImageMenuItem" id="MenuItemQuit">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<property name="label" translatable="yes">gtk-quit</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="use_stock">True</property>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkMenuItem" id="menuitemedit">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<property name="label" translatable="yes">_Edit</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkMenu" id="menu2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkImageMenuItem" id="imagemenuitem6">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<property name="label" translatable="yes">gtk-cut</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="use_stock">True</property>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkImageMenuItem" id="imagemenuitem7">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<property name="label" translatable="yes">gtk-copy</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="use_stock">True</property>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkImageMenuItem" id="imagemenuitem8">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<property name="label" translatable="yes">gtk-paste</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="use_stock">True</property>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkImageMenuItem" id="imagemenuitem9">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<property name="label" translatable="yes">gtk-delete</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="use_stock">True</property>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkMenuItem" id="menuitemview">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<property name="label" translatable="yes">_View</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkMenuItem" id="menuitemhelp">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<property name="label" translatable="yes">_Help</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkMenu" id="menu3">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkImageMenuItem" id="imagemenuitem10">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<property name="label" translatable="yes">gtk-about</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="use_stock">True</property>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkToolbar" id="toolbar">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkToolButton" id="toolbutton1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<property name="stock_id">gtk-zoom-in</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkToolButton" id="toolbutton2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<property name="stock_id">gtk-zoom-out</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkHPaned" id="hpanedMain">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkTable" id="tableDrawer">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<property name="n_rows">2</property>
|
||||||
|
<property name="n_columns">2</property>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkDrawingArea" id="DrawingArea">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkVScrollbar" id="Vscrollbar">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<property name="adjustment">0 0 100 1 10 10</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="right_attach">2</property>
|
||||||
|
<property name="x_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkHScrollbar" id="Hscrollbar">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<property name="adjustment">0 0 100 1 10 10</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="top_attach">1</property>
|
||||||
|
<property name="bottom_attach">2</property>
|
||||||
|
<property name="y_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="resize">False</property>
|
||||||
|
<property name="shrink">True</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkStatusbar" id="statusbar">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<property name="spacing">2</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="position">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</glade-interface>
|
Reference in a new issue