the first source

This commit is contained in:
2009-08-30 12:50:03 +04:00
commit 1e9ae4d6bb
44 changed files with 1547 additions and 0 deletions

1
AlienDefender Normal file
View File

@@ -0,0 +1 @@
hello

248
Makefile Normal file
View File

@@ -0,0 +1,248 @@
#############################################################################
# Makefile for building: wavetrace
# Generated by qmake (2.01a) (Qt 4.5.2) on: ?? ???. 29 18:07:48 2009
# Project: wavetrace.pro
# Template: app
# Command: /usr/bin/qmake -Wall -spec ../../../../share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug -o Makefile wavetrace.pro
#############################################################################
####### Compiler, tools and options
CC = gcc
CXX = g++
DEFINES = -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED
CFLAGS = -pipe -g -Wall -W -D_REENTRANT $(DEFINES)
CXXFLAGS = -pipe -g -Wall -W -D_REENTRANT $(DEFINES)
INCPATH = -I../../../../share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4 -I/usr/include -I. -I.
LINK = g++
LFLAGS =
LIBS = $(SUBLIBS) -L/usr/lib/qt4 -L/usr/X11R6/lib -lQtOpenGL -L/usr/lib/qt4 -L/usr/X11R6/lib -pthread -pthread -pthread -pthread -pthread -pthread -pthread -pthread -lQtGui -pthread -lpng -lfreetype -lgobject-2.0 -lSM -lICE -pthread -pthread -lXrender -lXrandr -lXinerama -lfontconfig -lXext -lX11 -lQtNetwork -pthread -pthread -lQtCore -lz -lm -pthread -lgthread-2.0 -lrt -lglib-2.0 -ldl -lGLU -lGL -lpthread
AR = ar cqs
RANLIB =
QMAKE = /usr/bin/qmake
TAR = tar -cf
COMPRESS = gzip -9f
COPY = cp -f
SED = sed
COPY_FILE = $(COPY)
COPY_DIR = $(COPY) -r
INSTALL_FILE = install -m 644 -p
INSTALL_DIR = $(COPY_DIR)
INSTALL_PROGRAM = install -m 755 -p
DEL_FILE = rm -f
SYMLINK = ln -sf
DEL_DIR = rmdir
MOVE = mv -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p
####### Output directory
OBJECTS_DIR = ./
####### Files
SOURCES = main.cpp \
mainwindow.cpp \
adpainter.cpp \
aliens.cpp \
towers.cpp moc_mainwindow.cpp
OBJECTS = main.o \
mainwindow.o \
adpainter.o \
aliens.o \
towers.o \
moc_mainwindow.o
DIST = ../../../../share/qt4/mkspecs/common/g++.conf \
../../../../share/qt4/mkspecs/common/unix.conf \
../../../../share/qt4/mkspecs/common/linux.conf \
../../../../share/qt4/mkspecs/qconfig.pri \
../../../../share/qt4/mkspecs/features/qt_functions.prf \
../../../../share/qt4/mkspecs/features/qt_config.prf \
../../../../share/qt4/mkspecs/features/exclusive_builds.prf \
../../../../share/qt4/mkspecs/features/default_pre.prf \
../../../../share/qt4/mkspecs/features/debug.prf \
../../../../share/qt4/mkspecs/features/default_post.prf \
../../../../share/qt4/mkspecs/features/warn_on.prf \
../../../../share/qt4/mkspecs/features/qt.prf \
../../../../share/qt4/mkspecs/features/unix/opengl.prf \
../../../../share/qt4/mkspecs/features/unix/thread.prf \
../../../../share/qt4/mkspecs/features/moc.prf \
../../../../share/qt4/mkspecs/features/resources.prf \
../../../../share/qt4/mkspecs/features/uic.prf \
../../../../share/qt4/mkspecs/features/yacc.prf \
../../../../share/qt4/mkspecs/features/lex.prf \
../../../../share/qt4/mkspecs/features/include_source_dir.prf \
wavetrace.pro
QMAKE_TARGET = wavetrace
DESTDIR =
TARGET = wavetrace
first: all
####### Implicit rules
.SUFFIXES: .o .c .cpp .cc .cxx .C
.cpp.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
.cc.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
.cxx.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
.C.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
.c.o:
$(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
####### Build rules
all: Makefile $(TARGET)
$(TARGET): ui_mainwindow.h $(OBJECTS)
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
Makefile: wavetrace.pro ../../../../share/qt4/mkspecs/linux-g++/qmake.conf ../../../../share/qt4/mkspecs/common/g++.conf \
../../../../share/qt4/mkspecs/common/unix.conf \
../../../../share/qt4/mkspecs/common/linux.conf \
../../../../share/qt4/mkspecs/qconfig.pri \
../../../../share/qt4/mkspecs/features/qt_functions.prf \
../../../../share/qt4/mkspecs/features/qt_config.prf \
../../../../share/qt4/mkspecs/features/exclusive_builds.prf \
../../../../share/qt4/mkspecs/features/default_pre.prf \
../../../../share/qt4/mkspecs/features/debug.prf \
../../../../share/qt4/mkspecs/features/default_post.prf \
../../../../share/qt4/mkspecs/features/warn_on.prf \
../../../../share/qt4/mkspecs/features/qt.prf \
../../../../share/qt4/mkspecs/features/unix/opengl.prf \
../../../../share/qt4/mkspecs/features/unix/thread.prf \
../../../../share/qt4/mkspecs/features/moc.prf \
../../../../share/qt4/mkspecs/features/resources.prf \
../../../../share/qt4/mkspecs/features/uic.prf \
../../../../share/qt4/mkspecs/features/yacc.prf \
../../../../share/qt4/mkspecs/features/lex.prf \
../../../../share/qt4/mkspecs/features/include_source_dir.prf \
/usr/lib/qt4/libQtOpenGL.prl \
/usr/lib/qt4/libQtGui.prl \
/usr/lib/qt4/libQtCore.prl \
/usr/lib/qt4/libQtNetwork.prl
$(QMAKE) -Wall -spec ../../../../share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug -o Makefile wavetrace.pro
../../../../share/qt4/mkspecs/common/g++.conf:
../../../../share/qt4/mkspecs/common/unix.conf:
../../../../share/qt4/mkspecs/common/linux.conf:
../../../../share/qt4/mkspecs/qconfig.pri:
../../../../share/qt4/mkspecs/features/qt_functions.prf:
../../../../share/qt4/mkspecs/features/qt_config.prf:
../../../../share/qt4/mkspecs/features/exclusive_builds.prf:
../../../../share/qt4/mkspecs/features/default_pre.prf:
../../../../share/qt4/mkspecs/features/debug.prf:
../../../../share/qt4/mkspecs/features/default_post.prf:
../../../../share/qt4/mkspecs/features/warn_on.prf:
../../../../share/qt4/mkspecs/features/qt.prf:
../../../../share/qt4/mkspecs/features/unix/opengl.prf:
../../../../share/qt4/mkspecs/features/unix/thread.prf:
../../../../share/qt4/mkspecs/features/moc.prf:
../../../../share/qt4/mkspecs/features/resources.prf:
../../../../share/qt4/mkspecs/features/uic.prf:
../../../../share/qt4/mkspecs/features/yacc.prf:
../../../../share/qt4/mkspecs/features/lex.prf:
../../../../share/qt4/mkspecs/features/include_source_dir.prf:
/usr/lib/qt4/libQtOpenGL.prl:
/usr/lib/qt4/libQtGui.prl:
/usr/lib/qt4/libQtCore.prl:
/usr/lib/qt4/libQtNetwork.prl:
qmake: FORCE
@$(QMAKE) -Wall -spec ../../../../share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug -o Makefile wavetrace.pro
dist:
@$(CHK_DIR_EXISTS) .tmp/wavetrace1.0.0 || $(MKDIR) .tmp/wavetrace1.0.0
$(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/wavetrace1.0.0/ && $(COPY_FILE) --parents mainwindow.h adpainter.h aliens.h basestruct.h towers.h .tmp/wavetrace1.0.0/ && $(COPY_FILE) --parents main.cpp mainwindow.cpp adpainter.cpp aliens.cpp towers.cpp .tmp/wavetrace1.0.0/ && $(COPY_FILE) --parents mainwindow.ui .tmp/wavetrace1.0.0/ && (cd `dirname .tmp/wavetrace1.0.0` && $(TAR) wavetrace1.0.0.tar wavetrace1.0.0 && $(COMPRESS) wavetrace1.0.0.tar) && $(MOVE) `dirname .tmp/wavetrace1.0.0`/wavetrace1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/wavetrace1.0.0
clean:compiler_clean
-$(DEL_FILE) $(OBJECTS)
-$(DEL_FILE) *~ core *.core
####### Sub-libraries
distclean: clean
-$(DEL_FILE) $(TARGET)
-$(DEL_FILE) Makefile
mocclean: compiler_moc_header_clean compiler_moc_source_clean
mocables: compiler_moc_header_make_all compiler_moc_source_make_all
compiler_moc_header_make_all: moc_mainwindow.cpp
compiler_moc_header_clean:
-$(DEL_FILE) moc_mainwindow.cpp
moc_mainwindow.cpp: adpainter.h \
basestruct.h \
aliens.h \
mainwindow.h
/usr/bin/moc $(DEFINES) $(INCPATH) mainwindow.h -o moc_mainwindow.cpp
compiler_rcc_make_all:
compiler_rcc_clean:
compiler_image_collection_make_all: qmake_image_collection.cpp
compiler_image_collection_clean:
-$(DEL_FILE) qmake_image_collection.cpp
compiler_moc_source_make_all:
compiler_moc_source_clean:
compiler_uic_make_all: ui_mainwindow.h
compiler_uic_clean:
-$(DEL_FILE) ui_mainwindow.h
ui_mainwindow.h: mainwindow.ui
/usr/bin/uic mainwindow.ui -o ui_mainwindow.h
compiler_yacc_decl_make_all:
compiler_yacc_decl_clean:
compiler_yacc_impl_make_all:
compiler_yacc_impl_clean:
compiler_lex_make_all:
compiler_lex_clean:
compiler_clean: compiler_moc_header_clean compiler_uic_clean
####### Compile
main.o: main.cpp mainwindow.h \
adpainter.h \
basestruct.h \
aliens.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
mainwindow.o: mainwindow.cpp mainwindow.h \
adpainter.h \
basestruct.h \
aliens.h \
ui_mainwindow.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o mainwindow.o mainwindow.cpp
adpainter.o: adpainter.cpp adpainter.h \
basestruct.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o adpainter.o adpainter.cpp
aliens.o: aliens.cpp aliens.h \
basestruct.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o aliens.o aliens.cpp
towers.o: towers.cpp towers.h \
basestruct.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o towers.o towers.cpp
moc_mainwindow.o: moc_mainwindow.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mainwindow.o moc_mainwindow.cpp
####### Install
install: FORCE
uninstall: FORCE
FORCE:

143
adpainter.cpp Normal file
View File

@@ -0,0 +1,143 @@
#include "adpainter.h"
adpainter::adpainter(int width, int height, int adpcellsize)
{
QString str;
QPixmap tmpAlPixmap;
int i=1;
cellsize = adpcellsize;
buff = new QPixmap(width,height);
background = new QPixmap(width,height);
pen = new QPen();
brush = new QBrush();
str.setNum(i);
while (i != 0) {
str.setNum(i);
tmpAlPixmap.load("./images/Aliens/Al_00_" + str + ".png");
qDebug() << tmpAlPixmap.isNull();
if (!tmpAlPixmap.isNull()) {
AlienPix.push_back(tmpAlPixmap);
tmpAlPixmap = 0;
i++;
}
else i = 0;
}
qDebug() << "pictures:" << AlienPix.size();
AnimAlien = 0;
StepAlien = 0;
}
void adpainter::clear()
{
painter.begin(background);
pen->setColor(QColor::fromRgb(qRgb(150,150,150)));
painter.setPen(*pen);
painter.fillRect(buff->rect(),QColor::fromRgb(qRgb(150,150,150)));
painter.end();
}
void adpainter::drawgrid()
{
int i;
painter.begin(background);
pen->setColor(QColor::fromRgb(qRgb(100,100,100)));
painter.setPen(*pen);
for (i = 0;i<buff->width()/cellsize;i++)
{
painter.drawLine(i*cellsize,0,i*cellsize,background->height());
}
for (i = 0;i<buff->height()/cellsize;i++)
{
painter.drawLine(0,i*cellsize,background->width(),i*cellsize);
}
painter.end();
}
void adpainter::drawAliens(deque<QPointF> path, FPVector * position)
{
float tmpdx,tmpdy,arctg,tmpdx1,tmpdy1;
arctg = 0;
QTransform rotated;
painter.begin(buff);
pen->setColor(QColor::fromRgb(qRgb(80,200,100)));
brush->setColor(QColor::fromRgb(qRgb(230,10,10)));
brush->setStyle(Qt::SolidPattern);
painter.setPen(*pen);
painter.setBrush(*brush);
painter.drawPixmap(0,0,*background);
for (unsigned int i = 0; i < path.size(); i++){
painter.drawEllipse(path[i].x() * cellsize +1, path[i].y() * cellsize +1, cellsize - 2, cellsize - 2);
}
tmpdx = position->pnt.x() - path.at(StepAlien).x()*cellsize;
tmpdy = position->pnt.y() - path.at(StepAlien).y()*cellsize;
tmpdx1 = position->pnt.x() - path.at(StepAlien+1).x()*cellsize;
tmpdy1 = position->pnt.y() - path.at(StepAlien+1).y()*cellsize;
/*if (qAbs(tmpdy1) > 0.01 && qAbs(tmpdx1) > 0.01)*/ arctg = atan(tmpdx1/tmpdy1);
if (AlienPix.size() > 0) {
//painter.rotate((arctg/3.1415)*180);
rotated.rotateRadians(arctg/* + 3.1415/2*/);
qDebug() << "angle:" << arctg;
painter.save();
painter.translate(position->pnt.x()+cellsize,position->pnt.y()+cellsize);
//if (arctg == 0) painter.rotate(90);
position->angle = 180*(-arctg)/3.1415;
painter.rotate(position->angle);
//position->pnt.setX(path.at(0).x());
//position->pnt.setY(path.at(0).y());
painter.drawPixmap(0, 0, cellsize*2, cellsize*2, AlienPix.at(AnimAlien));
AnimAlien++;
painter.restore();
rotated.reset();
if (qAbs(tmpdx) < 1 && qAbs(tmpdy) < 1) StepAlien++;
else {
if (qAbs(tmpdx) <= qAbs(tmpdy)) {
if (tmpdy < 0) position->pnt.ry()++;
else position->pnt.ry()--;
}
if (qAbs(tmpdx) >= qAbs(tmpdy)) {
if (tmpdx < 0) position->pnt.rx()++;
else position->pnt.rx()--;
}
}
if (AnimAlien >= AlienPix.size()) AnimAlien = 0;
if (StepAlien >= path.size()) StepAlien = 0;
//qDebug() << StepAlien;
}
painter.end();
}
void adpainter::drawcell(QPoint pnt)
{
painter.begin(background);
pen->setColor(QColor::fromRgb(qRgb(0,0,0)));
brush->setColor(QColor::fromRgb(qRgb(0,0,0)));
brush->setStyle(Qt::SolidPattern);
painter.setPen(*pen);
painter.setBrush(*brush);
painter.drawRect(pnt.x()*cellsize+1,pnt.y()*cellsize+1,cellsize - 2, cellsize - 2);
painter.end();
}
void adpainter::clearcell(QPoint pnt)
{
painter.begin(background);
pen->setColor(QColor::fromRgb(qRgb(150,150,150)));
brush->setColor(QColor::fromRgb(qRgb(150,150,150)));
brush->setStyle(Qt::SolidPattern);
painter.setPen(*pen);
painter.setBrush(*brush);
painter.drawRect(pnt.x()*cellsize+1,pnt.y()*cellsize+1,cellsize - 2, cellsize - 2);
painter.end();
}
QPixmap * adpainter::getPixmap()
{
return buff;
}

47
adpainter.h Normal file
View File

@@ -0,0 +1,47 @@
#ifndef ADPAINTER_H
#define ADPAINTER_H
#include "basestruct.h"
#include <vector>
#include <cmath>
#include <QPainter>
#include <QTransform>
#include <QPaintEvent>
#include <QPaintDevice>
#include <QBrush>
#include <QPen>
#include <QPixmap>
#include <QImage>
#include <QColor>
#include <QPoint>
#include <QDebug>
using std::deque;
using std::vector;
using std::atan;
class adpainter
{
public:
adpainter(int width, int height, int adpcellsize);
void drawgrid();
void drawcell(QPoint pnt);
void clearcell(QPoint pnt);
void clear();
QPixmap * getPixmap();
void drawAliens(deque<QPointF> path, FPVector * position);//int xa, int ya);
unsigned int AnimAlien, StepAlien;
private:
QPixmap * buff;
QPixmap * background;
QPainter painter;
QPen * pen;
QBrush * brush;
vector<QPixmap> AlienPix;
int cellsize;
};
#endif // ADPAINTER_H

BIN
adpainter.o Normal file

Binary file not shown.

290
aliens.cpp Normal file
View File

@@ -0,0 +1,290 @@
#include "aliens.h"
using std::vector;
Aliens::Aliens(int TmpDestx, int TmpDesty, int afw, int afh, int alcellsize)
{
cellsize = alcellsize;
DestPoint.setX(TmpDestx);
DestPoint.setY(TmpDesty);
fw = afw;
fh = afh;
AliensCnt = -1;
CurWave = 0;
Cells = new int*[fw];
TmpCells = new int*[fw];
for (int i = 0; i < fw; i++) {
Cells[i] = new int[fh];
TmpCells[i] = new int[fh];
}
clearCells();
}
void Aliens::clearCells()
{
for (int i = 0; i < fw; i++) for (int j = 0; j < fh; j++) Cells[i][j] = 0;
}
bool Aliens::AddAlien()
{
bool ok;
Alien al;
AliensCnt++;
//if (CurWave < 0) CurWave = 0;
//if (AliensCnt > curAliens.size()) ReDim Preserve Aliens(AliensCnt) As Alien
//Aliens(AliensCnt) = SrcAliens(CurWave)
curAliens.push_back(al); //srcAliens[CurWave]);
// curAliens[AliensCnt].Level = CurWave + 1;
curAliens[AliensCnt].Position.pnt.setX(0);
curAliens[AliensCnt].Position.pnt.setY(fh/2); //(int)(fh/2+(1-0.58)*6);
DestPoint.setX(fw - 1);
DestPoint.setY(fh / 2); //curAliens[AliensCnt].Position.pnt.y();
curAliens[AliensCnt].DestPnt = DestPoint;
// curAliens[AliensCnt].MaxFrame = 0; //srcAliens[CurWave].MaxFrame;
// curAliens[AliensCnt].PicFrame = 0;
for (int i = 0; i < fw; i++) {
for (int j = 0; j < fh; j++) TmpCells[i][j] = Cells[i][j];
}
ok = CreatePath(&curAliens[AliensCnt]);
return ok;
}
bool Aliens::CreatePath(Alien * al)
{
QPointF tp;
deque<QPointF> tmpPnt;
//tmpPnt.clear();
// AliensTmpDestX = fw - 1;//al->Destpnt.x();
// AliensTmpDestY = fh / 2;//al->Destpnt.y();
// al->Position.pnt.x() = 0;
// al->Position.pnt.y() = fh / 2;
if (WaveTrace(al))
{
for (int j=0; j<4; j++)
{
tmpPnt.clear();
tp = al->path[0];
tmpPnt.push_back(tp);
for (unsigned int i = 0; i < al->path.size() - 1; i++)
{
tp.setX((al->path[i].x() + al->path[i + 1].x()) / 2);
tp.setY((al->path[i].y() + al->path[i + 1].y()) / 2);
tmpPnt.push_back(tp);
}
tp = al->path[al->path.size() - 1];
tmpPnt.push_back(tp);
al->path.swap(tmpPnt);
al->Position.pnt.setX(al->path.at(0).x()*cellsize);
al->Position.pnt.setY(al->path.at(0).y()*cellsize);
}
return true;
}
return false;
//return WaveTrace(al);
}
/*bool Aliens::PathIntersect(Alien* Al, Rectangle rect)
{
//PathIntersect = False
for (int i = Al->PathIndex; i<=Al->path.size(); i++) // To UBound(Al.path(), 1)
if (Al->path[i].x + 0.5 >= rect.x0 - 1 && Al->path[i].x + 0.5 <= rect.x1 + 1)
if (Al->path[i].y + 0.5 >= rect.y0 - 1 && Al->path[i].y + 0.5 <= rect.y1 + 1)
return true; //PathIntersect = True //Exit Function
return false;
}*/
bool Aliens::WaveTrace(Alien * al) {
bool stop = false;
int step = 2;
QPoint cp, tp;
QRect fr(0, 0, fw, fh);
vector<QPoint> tmpp, curp;
cp = al->Position.pnt;
curp.push_back(cp);
TmpCells[cp.x()][cp.y()] = 1;
while (!stop) {
tmpp = curp;
curp.clear();
stop = true;
for (unsigned int i = 0; i < tmpp.size(); i++) {
cp = tmpp[i];
if (cp == al->DestPnt) {
TmpCells[cp.x()][cp.y()] = step;
qDebug() << "true";
InvWaveTrace(cp, step, al);
qDebug() << al->path.size();
return true;
}
tp.setX(cp.x() - 1);
tp.setY(cp.y());
if (fr.contains(tp) && TmpCells[tp.x()][tp.y()] == 0) {
TmpCells[tp.x()][tp.y()] = step;
curp.push_back(tp);
stop = false;
}
tp.setX(cp.x() + 1);
if (fr.contains(tp) && TmpCells[tp.x()][tp.y()] == 0) {
TmpCells[tp.x()][tp.y()] = step;
curp.push_back(tp);
stop = false;
}
tp.setX(cp.x());
tp.setY(cp.y() - 1);
if (fr.contains(tp) && TmpCells[tp.x()][tp.y()] == 0) {
TmpCells[tp.x()][tp.y()] = step;
curp.push_back(tp);
stop = false;
}
tp.setY(cp.y() + 1);
if (fr.contains(tp) && TmpCells[tp.x()][tp.y()] == 0) {
TmpCells[tp.x()][tp.y()] = step;
curp.push_back(tp);
stop = false;
}
}
step++;
}
qDebug() << "false";
return false;
}
void Aliens::InvWaveTrace(QPoint cp, int cnt, Alien * al)
{
QPoint wp, Ppnt;
int Ind, c, AliensTmpDestX, AliensTmpDestY, xpp, ypp, xnn, ynn;
unsigned char chk;
Ppnt = wp = cp;
xnn=0;
xpp=0;
ynn=0;
ypp=0;
cnt--;
al->path.push_front(Ppnt);
AliensTmpDestX = al->Position.pnt.x();
AliensTmpDestY = al->Position.pnt.y();
while (cnt > 1)
{
cnt--;
chk = 0;
Ind = 0;
c = 0;
if (wp.x() - 1 >= 0 && TmpCells[wp.x()-1][wp.y()] == cnt)
{
chk = chk | 0x01;
c++;
}
if (wp.x() + 1 < fw && TmpCells[wp.x()+1][wp.y()] == cnt)
{
chk = chk | 0x02;
c++;
}
if (wp.y() - 1 >= 0 && TmpCells[wp.x()][wp.y()-1] == cnt)
{
chk = chk | 0x04;
c++;
}
if (wp.y() + 1 < fh && TmpCells[wp.x()][wp.y()+1] == cnt)
{
chk = chk | 0x08;
c++;
}
if (c == 0 || chk == 0) qDebug() << "ERROR!!!";
if (c > 1)
{
if ((chk & 0x01)==0x01 && (chk & 0x04)==0x04)
{
if (xnn <= ynn && Ind == 0){
wp.rx()--;
xnn++;
if (xnn == ynn) xnn++;
Ind = 1;
} else if (Ind == 0) {
wp.ry()--;
ynn++;
ynn++;
Ind = 1;
}
}
if ((chk & 0x02)==0x02 && (chk & 0x04)==0x04)
{
if (xpp <= ynn && Ind == 0){
wp.rx()++;
xpp++;
if (xpp == ynn) xpp++;
Ind = 1;
} else if (Ind == 0) {
wp.ry()--;
ynn++;
ynn++;
Ind = 1;
}
}
if ((chk & 0x01)==0x01 && (chk & 0x08)==0x08)
{
if (xnn <= ypp && Ind == 0){
wp.rx()--;
xnn++;
if (xnn == ypp) xnn++;
Ind = 1;
} else if (Ind == 0) {
wp.ry()++;
ypp++;
ypp++;
Ind = 1;
}
}
if ((chk & 0x02)==0x02 && (chk & 0x08)==0x08)
{
if (xpp <= ypp && Ind == 0){
wp.rx()++;
xpp++;
if (xpp == ypp) xpp++;
Ind = 1;
} else if (Ind == 0) {
wp.ry()++;
ypp++;
ypp++;
Ind = 1;
}
}
}
if (c == 1 || Ind == 0)
{
xnn=0;
xpp=0;
ynn=0;
ypp=0;
if ((chk & 0x01)==0x01) {
wp.rx()--;
xnn++;
}
else if ((chk & 0x02)==0x02) {
wp.rx()++;
xpp++;
}
else if ((chk & 0x04)==0x04) {
wp.ry()--;
ynn++;
}
else if ((chk & 0x08)==0x08) {
wp.ry()++;
ypp++;
}
}
Ppnt = wp;
al->path.push_front(Ppnt);
}
}
void Aliens::clearAliens()
{
AliensCnt = - 1;
curAliens.clear();
}

30
aliens.h Normal file
View File

@@ -0,0 +1,30 @@
#ifndef ALIENS_H
#define ALIENS_H
#include "basestruct.h"
//#include <vector>
class Aliens
{
public:
Aliens(int TmpDestx, int TmpDesty, int afw, int afh, int alcellsize);
deque<Alien> srcAliens;
deque<Alien> curAliens;
//vector< vector<int> > TmpCells;
int ** Cells;
int fw, fh, AliensCnt, CurWave;
QPoint DestPoint;
//bool PathIntersect(Alien* Al, Rectangle rect);
bool AddAlien();
void clearAliens();
void clearCells();
private:
int cellsize;
int ** TmpCells;
bool CreatePath(Alien* al);
bool WaveTrace(Alien* al);
void InvWaveTrace(QPoint cp, int cnt, Alien* al);
};
#endif // ALIENS_H

BIN
aliens.o Normal file

Binary file not shown.

98
basestruct.h Normal file
View File

@@ -0,0 +1,98 @@
#ifndef BASESTRUCT_H
#define BASESTRUCT_H
#include <vector>
#include <deque>
#include <QPoint>
#include <QPointF>
#include <QRect>
#include <QDebug>
using std::vector;
using std::deque;
struct FPVector
{
QPoint pnt;
float angle;
};
/*
struct Effect
{
float Health;
float Speed;
int Armor;
int CntHealth;
int CntSpeed;
int CntArmor;
};
*/
struct Alien
{
// unsigned char AName[64];
FPVector Position;
/* int FlX;
int FlY;
int Armor;
int Level;
int Money;
int PathIndex;
int PicIndl;
int MaxFrame;
float Health;
float Speed;
float PicFrame;
float PicInc;
float Regeneration;*/
deque<QPointF> path;//path() As Point
QPoint DestPnt;
// Effect Effects;
};
struct Tower
{
//unsigned char TName[64];
//Rectangle Position;
//float angle;
//int flx;
//int fly;
QPointF Center;
//Point FirePnt;
//int BaseType;
//int Damage;
//float Radius;
//float DamageRadius;
//float FireSpeed;
//float DPS;
//int Level;
//int Cost;
//int UpgradeCost;
//int Aim;
//int FireCnt;
//Effect Effects;
};
/*
struct Splash
{
FPVector Position;
int flx;
int fly;
Point DestPnt;
int DestAlien;
int BaseType;
int Damage;
float DamageRadius;
float Speed;
Effect Effects;
int PicInd;
float PicFrame;
int MaxFrame;
};
*/
#endif // BASESTRUCT_H

BIN
images/Aliens/Al_00_0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

BIN
images/Aliens/Al_00_1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

BIN
images/Aliens/Al_00_10.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

BIN
images/Aliens/Al_00_11.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

BIN
images/Aliens/Al_00_12.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

BIN
images/Aliens/Al_00_13.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

BIN
images/Aliens/Al_00_14.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

BIN
images/Aliens/Al_00_15.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

BIN
images/Aliens/Al_00_16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

BIN
images/Aliens/Al_00_17.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

BIN
images/Aliens/Al_00_18.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

BIN
images/Aliens/Al_00_19.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

BIN
images/Aliens/Al_00_2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

BIN
images/Aliens/Al_00_3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

BIN
images/Aliens/Al_00_4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

BIN
images/Aliens/Al_00_5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

BIN
images/Aliens/Al_00_6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

BIN
images/Aliens/Al_00_7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

BIN
images/Aliens/Al_00_8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

BIN
images/Aliens/Al_00_9.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

10
main.cpp Normal file
View File

@@ -0,0 +1,10 @@
#include <QtGui/QApplication>
#include "mainwindow.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}

BIN
main.o Normal file

Binary file not shown.

100
mainwindow.cpp Normal file
View File

@@ -0,0 +1,100 @@
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent), ui(new Ui::MainWindow)
{
ui->setupUi(this);
cellsize = 16;
destx = this->width() / cellsize / 2;
desty = this->height() / cellsize;
QTimer *timer = new QTimer(this);
adp = new adpainter(this->width(),this->height(),cellsize);
adp->clear();
adp->drawgrid();
connect(timer, SIGNAL(timeout()), this, SLOT(ADrender()));
aliens = new Aliens(destx, desty, this->width() / cellsize ,this->height() / cellsize, cellsize);
aliens->AddAlien();
this->setGeometry(100,100,this->width(),this->height());
//qDebug() << "QT version" << qVersion();
//AnimAlien = 0;
timer->start(50);
}
void MainWindow::ADrender()
{
adp->drawAliens(aliens->curAliens[0].path, &aliens->curAliens[0].Position);
this->repaint();
}
void MainWindow::paintEvent(QPaintEvent*)
{
QPainter painter;
painter.begin(this);
painter.drawPixmap(0,0,*adp->getPixmap());
painter.end();
}
void MainWindow::mouseMoveEvent ( QMouseEvent * event )
{
if (mousebt == 1) ClearCell(event->x(),event->y());
else SetCell(event->x(),event->y());
}
void MainWindow::mousePressEvent ( QMouseEvent * event )
{
if (event->button() == Qt::RightButton) {
ClearCell(event->x(),event->y());
mousebt = 1;
} else {
SetCell(event->x(),event->y());
mousebt = 0;
}
}
void MainWindow::SetCell(int x, int y)
{
QPoint cp;
QRect wdrect(0, 0, (this->width() / cellsize) * cellsize, (this->height() / cellsize) * cellsize);
if (wdrect.contains(x,y)) {
cp.setX((int) x / cellsize);
cp.setY((int) y / cellsize);
//qDebug() << "click: " << cp.x() << ";" << cp.y();
aliens->Cells[cp.x()][cp.y()] = - 1;
adp->drawcell(cp);
aliens->clearAliens();
adp->StepAlien=0;
adp->AnimAlien=0;
if (!aliens->AddAlien()) ClearCell(x,y);
}
}
void MainWindow::ClearCell(int x, int y)
{
QPoint cp;
QRect wdrect(0, 0, (this->width() / cellsize) * cellsize, (this->height() / cellsize) * cellsize);
if (wdrect.contains(x,y)) {
cp.setX((int) x / cellsize);
cp.setY((int) y / cellsize);
//qDebug() << "click: " << cp.x() << ";" << cp.y();
aliens->Cells[cp.x()][cp.y()] = 0;
adp->clearcell(cp);
aliens->clearAliens();
aliens->AddAlien();
}
}
MainWindow::~MainWindow()
{
delete ui;
delete aliens;
delete adp;
}

40
mainwindow.h Normal file
View File

@@ -0,0 +1,40 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QtGui/QMainWindow>
#include <QtDebug>
#include <QTimer>
#include "adpainter.h"
#include "aliens.h"
namespace Ui
{
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = 0);
~MainWindow();
public slots:
void ADrender();
private:
void paintEvent(QPaintEvent*);
void SetCell(int x, int y);
void ClearCell(int x, int y);
void mouseMoveEvent ( QMouseEvent * event );
void mousePressEvent ( QMouseEvent * event );
Ui::MainWindow *ui;
Aliens * aliens;
adpainter * adp;
bool mousebt;
int cellsize, destx, desty;
//unsigned int AnimAlien;
};
#endif // MAINWINDOW_H

BIN
mainwindow.o Normal file

Binary file not shown.

39
mainwindow.ui Normal file
View File

@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>400</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>800</width>
<height>400</height>
</size>
</property>
<property name="baseSize">
<size>
<width>800</width>
<height>400</height>
</size>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="widget"/>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources/>
<connections/>
</ui>

73
moc_mainwindow.cpp Normal file
View File

@@ -0,0 +1,73 @@
/****************************************************************************
** Meta object code from reading C++ file 'mainwindow.h'
**
** Created: Sat Aug 29 11:41:18 2009
** by: The Qt Meta Object Compiler version 61 (Qt 4.5.2)
**
** WARNING! All changes made in this file will be lost!
*****************************************************************************/
#include "mainwindow.h"
#if !defined(Q_MOC_OUTPUT_REVISION)
#error "The header file 'mainwindow.h' doesn't include <QObject>."
#elif Q_MOC_OUTPUT_REVISION != 61
#error "This file was generated using the moc from 4.5.2. It"
#error "cannot be used with the include files from this version of Qt."
#error "(The moc has changed too much.)"
#endif
QT_BEGIN_MOC_NAMESPACE
static const uint qt_meta_data_MainWindow[] = {
// content:
2, // revision
0, // classname
0, 0, // classinfo
1, 12, // methods
0, 0, // properties
0, 0, // enums/sets
0, 0, // constructors
// slots: signature, parameters, type, tag, flags
12, 11, 11, 11, 0x0a,
0 // eod
};
static const char qt_meta_stringdata_MainWindow[] = {
"MainWindow\0\0ADrender()\0"
};
const QMetaObject MainWindow::staticMetaObject = {
{ &QMainWindow::staticMetaObject, qt_meta_stringdata_MainWindow,
qt_meta_data_MainWindow, 0 }
};
const QMetaObject *MainWindow::metaObject() const
{
return &staticMetaObject;
}
void *MainWindow::qt_metacast(const char *_clname)
{
if (!_clname) return 0;
if (!strcmp(_clname, qt_meta_stringdata_MainWindow))
return static_cast<void*>(const_cast< MainWindow*>(this));
return QMainWindow::qt_metacast(_clname);
}
int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
_id = QMainWindow::qt_metacall(_c, _id, _a);
if (_id < 0)
return _id;
if (_c == QMetaObject::InvokeMetaMethod) {
switch (_id) {
case 0: ADrender(); break;
default: ;
}
_id -= 1;
}
return _id;
}
QT_END_MOC_NAMESPACE

BIN
moc_mainwindow.o Normal file

Binary file not shown.

11
towers.cpp Normal file
View File

@@ -0,0 +1,11 @@
#include "towers.h"
towers::towers()
{
}
void towers::AddTower(QPointF point, int ** cells)
{
}

15
towers.h Normal file
View File

@@ -0,0 +1,15 @@
#ifndef TOWERS_H
#define TOWERS_H
#include "basestruct.h"
class towers
{
public:
towers();
deque<Tower> srcTowers;
deque<Tower> curTowers;
void AddTower(QPointF point, int ** cells);
};
#endif // TOWERS_H

BIN
towers.o Normal file

Binary file not shown.

63
ui_mainwindow.h Normal file
View File

@@ -0,0 +1,63 @@
/********************************************************************************
** Form generated from reading ui file 'mainwindow.ui'
**
** Created: Sat Aug 29 00:10:28 2009
** by: Qt User Interface Compiler version 4.5.2
**
** WARNING! All changes made in this file will be lost when recompiling ui file!
********************************************************************************/
#ifndef UI_MAINWINDOW_H
#define UI_MAINWINDOW_H
#include <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QHeaderView>
#include <QtGui/QMainWindow>
#include <QtGui/QWidget>
QT_BEGIN_NAMESPACE
class Ui_MainWindow
{
public:
QWidget *widget;
void setupUi(QMainWindow *MainWindow)
{
if (MainWindow->objectName().isEmpty())
MainWindow->setObjectName(QString::fromUtf8("MainWindow"));
MainWindow->resize(800, 400);
QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(MainWindow->sizePolicy().hasHeightForWidth());
MainWindow->setSizePolicy(sizePolicy);
MainWindow->setMinimumSize(QSize(800, 400));
MainWindow->setBaseSize(QSize(800, 400));
widget = new QWidget(MainWindow);
widget->setObjectName(QString::fromUtf8("widget"));
MainWindow->setCentralWidget(widget);
retranslateUi(MainWindow);
QMetaObject::connectSlotsByName(MainWindow);
} // setupUi
void retranslateUi(QMainWindow *MainWindow)
{
MainWindow->setWindowTitle(QApplication::translate("MainWindow", "MainWindow", 0, QApplication::UnicodeUTF8));
Q_UNUSED(MainWindow);
} // retranslateUi
};
namespace Ui {
class MainWindow: public Ui_MainWindow {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_MAINWINDOW_H

BIN
wavetrace Executable file

Binary file not shown.

18
wavetrace.pro Normal file
View File

@@ -0,0 +1,18 @@
# -------------------------------------------------
# Project created by QtCreator 2009-08-17T19:38:55
# -------------------------------------------------
QT += network \
opengl
TARGET = wavetrace
TEMPLATE = app
SOURCES += main.cpp \
mainwindow.cpp \
adpainter.cpp \
aliens.cpp \
towers.cpp
HEADERS += mainwindow.h \
adpainter.h \
aliens.h \
basestruct.h \
towers.h
FORMS += mainwindow.ui

321
wavetrace.pro.user Normal file
View File

@@ -0,0 +1,321 @@
<!DOCTYPE QtCreatorProject>
<qtcreator>
<data>
<variable>RunConfiguration0-CommandLineArguments</variable>
<valuelist type="QVariantList" />
</data>
<data>
<variable>RunConfiguration0-ProFile</variable>
<value type="QString" >wavetrace.pro</value>
</data>
<data>
<variable>RunConfiguration0-RunConfiguration.name</variable>
<value type="QString" >wavetrace</value>
</data>
<data>
<variable>RunConfiguration0-UseDyldImageSuffix</variable>
<value type="bool" >false</value>
</data>
<data>
<variable>RunConfiguration0-UseTerminal</variable>
<value type="bool" >false</value>
</data>
<data>
<variable>RunConfiguration0-UserEnvironmentChanges</variable>
<valuelist type="QVariantList" />
</data>
<data>
<variable>RunConfiguration0-UserSetName</variable>
<value type="bool" >false</value>
</data>
<data>
<variable>RunConfiguration0-type</variable>
<value type="QString" >Qt4ProjectManager.Qt4RunConfiguration</value>
</data>
<data>
<variable>activeRunConfiguration</variable>
<value type="int" >0</value>
</data>
<data>
<variable>activebuildconfiguration</variable>
<value type="QString" >Debug</value>
</data>
<data>
<variable>buildConfiguration-Debug</variable>
<valuemap type="QVariantMap" >
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
<value key="QtVersionId" type="int" >0</value>
<value key="addQDumper" type="" ></value>
<value key="buildDirectory" type="QString" >/home/andrey/sm11/Alien Defender/wavetrace</value>
</valuemap>
</data>
<data>
<variable>buildConfiguration-Release</variable>
<valuemap type="QVariantMap" >
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Release</value>
<value key="QtVersionId" type="int" >0</value>
<value key="addQDumper" type="" ></value>
</valuemap>
</data>
<data>
<variable>buildconfiguration-Debug-buildstep0</variable>
<valuemap type="QVariantMap" >
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
<valuelist key="abstractProcess.Environment" type="QVariantList" >
<value type="QString" >ANT_HOME=/usr/share/ant</value>
<value type="QString" >CONFIG_PROTECT_MASK=/etc/gentoo-release /etc/sandbox.d /etc/env.d/java/ /etc/udev/rules.d /etc/fonts/fonts.conf /etc/gconf /etc/terminfo /etc/ca-certificates.conf /etc/revdep-rebuild</value>
<value type="QString" >CVS_RSH=ssh</value>
<value type="QString" >DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-eOteATVjzF,guid=b44512b6036a44fadd13f7184a99195c</value>
<value type="QString" >DESKTOP_SESSION=gnome</value>
<value type="QString" >DESKTOP_STARTUP_ID=</value>
<value type="QString" >DISPLAY=:0.0</value>
<value type="QString" >EDITOR=/bin/nano</value>
<value type="QString" >GCC_SPECS=</value>
<value type="QString" >GDK_USE_XFT=1</value>
<value type="QString" >GDMSESSION=gnome</value>
<value type="QString" >GDM_LANG=ru_RU.UTF-8</value>
<value type="QString" >GDM_XSERVER_LOCATION=local</value>
<value type="QString" >GNOME_DESKTOP_SESSION_ID=this-is-deprecated</value>
<value type="QString" >GNOME_KEYRING_SOCKET=/tmp/keyring-QdwkGk/socket</value>
<value type="QString" >GTK_RC_FILES=/etc/gtk/gtkrc:/home/andrey/.gtkrc-1.2-gnome2</value>
<value type="QString" >HOME=/home/andrey</value>
<value type="QString" >INFOPATH=/usr/share/info:/usr/share/binutils-data/i686-pc-linux-gnu/2.19.1/info:/usr/share/gcc-data/i486-pc-linux-gnu/4.1.2/info:/usr/share/gcc-data/i686-pc-linux-gnu/4.3.3/info</value>
<value type="QString" >JAVAC=/home/andrey/.gentoo/java-config-2/current-user-vm/bin/javac</value>
<value type="QString" >JAVA_HOME=/home/andrey/.gentoo/java-config-2/current-user-vm</value>
<value type="QString" >JDK_HOME=/home/andrey/.gentoo/java-config-2/current-user-vm</value>
<value type="QString" >LANG=ru_RU.UTF-8</value>
<value type="QString" >LESS=-R -M --shift 5</value>
<value type="QString" >LESSOPEN=|lesspipe.sh %s</value>
<value type="QString" >LOGNAME=andrey</value>
<value type="QString" >MANPATH=/home/andrey/.gentoo/java-config-2/current-user-vm/man:/usr/local/share/man:/usr/share/man:/usr/share/binutils-data/i686-pc-linux-gnu/2.19.1/man:/usr/share/gcc-data/i486-pc-linux-gnu/4.1.2/man:/usr/share/gcc-data/i686-pc-linux-gnu/4.3.3/man:/etc/java-config/system-vm/man/:/usr/qt/3/doc/man:/opt/opera/share/man</value>
<value type="QString" >OPENGL_PROFILE=xorg-x11</value>
<value type="QString" >ORBIT_SOCKETDIR=/tmp/orbit-andrey</value>
<value type="QString" >PAGER=/usr/bin/less</value>
<value type="QString" >PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i486-pc-linux-gnu/gcc-bin/4.1.2:/usr/i686-pc-linux-gnu/gcc-bin/4.3.3:/usr/qt/3/bin:/usr/games/bin</value>
<value type="QString" >PWD=/home/andrey</value>
<value type="QString" >QMAKESPEC=linux-g++</value>
<value type="QString" >QTDIR=/usr</value>
<value type="QString" >SESSION_MANAGER=local/buull-eeePC:@/tmp/.ICE-unix/26832,unix/buull-eeePC:/tmp/.ICE-unix/26832</value>
<value type="QString" >SHELL=/bin/bash</value>
<value type="QString" >SHLVL=0</value>
<value type="QString" >SSH_AGENT_PID=26858</value>
<value type="QString" >SSH_AUTH_SOCK=/tmp/keyring-QdwkGk/socket.ssh</value>
<value type="QString" >USER=andrey</value>
<value type="QString" >USERNAME=andrey</value>
<value type="QString" >WINDOWPATH=7</value>
<value type="QString" >XAUTHORITY=/home/andrey/.Xauthority</value>
<value type="QString" >XDG_CONFIG_DIRS=/etc/xdg</value>
<value type="QString" >XDG_DATA_DIRS=/usr/local/share:/usr/share:/usr/share/gdm</value>
<value type="QString" >XDG_SESSION_COOKIE=998ded06c94c2e848fb0b05949c4e51c-1251547484.422246-434250397</value>
<value type="QString" >XSESSION=icewm</value>
</valuelist>
<valuelist key="abstractProcess.arguments" type="QVariantList" >
<value type="QString" >/home/andrey/sm11/Alien Defender/wavetrace/wavetrace.pro</value>
<value type="QString" >-spec</value>
<value type="QString" >/usr/share/qt4/mkspecs/linux-g++</value>
<value type="QString" >-r</value>
<value type="QString" >CONFIG+=debug</value>
<value type="QString" >-Wall</value>
</valuelist>
<value key="abstractProcess.command" type="QString" >/usr/bin/qmake</value>
<value key="abstractProcess.enabled" type="bool" >false</value>
<value key="abstractProcess.workingDirectory" type="QString" >/home/andrey/sm11/Alien Defender/wavetrace</value>
<value key="buildConfiguration" type="int" >2</value>
<valuelist key="qmakeArgs" type="QVariantList" >
<value type="QString" >-Wall</value>
</valuelist>
</valuemap>
</data>
<data>
<variable>buildconfiguration-Debug-buildstep1</variable>
<valuemap type="QVariantMap" >
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
<valuelist key="abstractProcess.Environment" type="QVariantList" >
<value type="QString" >ANT_HOME=/usr/share/ant</value>
<value type="QString" >CONFIG_PROTECT_MASK=/etc/gentoo-release /etc/sandbox.d /etc/env.d/java/ /etc/udev/rules.d /etc/fonts/fonts.conf /etc/gconf /etc/terminfo /etc/ca-certificates.conf /etc/revdep-rebuild</value>
<value type="QString" >CVS_RSH=ssh</value>
<value type="QString" >DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-eOteATVjzF,guid=b44512b6036a44fadd13f7184a99195c</value>
<value type="QString" >DESKTOP_SESSION=gnome</value>
<value type="QString" >DESKTOP_STARTUP_ID=</value>
<value type="QString" >DISPLAY=:0.0</value>
<value type="QString" >EDITOR=/bin/nano</value>
<value type="QString" >GCC_SPECS=</value>
<value type="QString" >GDK_USE_XFT=1</value>
<value type="QString" >GDMSESSION=gnome</value>
<value type="QString" >GDM_LANG=ru_RU.UTF-8</value>
<value type="QString" >GDM_XSERVER_LOCATION=local</value>
<value type="QString" >GNOME_DESKTOP_SESSION_ID=this-is-deprecated</value>
<value type="QString" >GNOME_KEYRING_SOCKET=/tmp/keyring-QdwkGk/socket</value>
<value type="QString" >GTK_RC_FILES=/etc/gtk/gtkrc:/home/andrey/.gtkrc-1.2-gnome2</value>
<value type="QString" >HOME=/home/andrey</value>
<value type="QString" >INFOPATH=/usr/share/info:/usr/share/binutils-data/i686-pc-linux-gnu/2.19.1/info:/usr/share/gcc-data/i486-pc-linux-gnu/4.1.2/info:/usr/share/gcc-data/i686-pc-linux-gnu/4.3.3/info</value>
<value type="QString" >JAVAC=/home/andrey/.gentoo/java-config-2/current-user-vm/bin/javac</value>
<value type="QString" >JAVA_HOME=/home/andrey/.gentoo/java-config-2/current-user-vm</value>
<value type="QString" >JDK_HOME=/home/andrey/.gentoo/java-config-2/current-user-vm</value>
<value type="QString" >LANG=ru_RU.UTF-8</value>
<value type="QString" >LESS=-R -M --shift 5</value>
<value type="QString" >LESSOPEN=|lesspipe.sh %s</value>
<value type="QString" >LOGNAME=andrey</value>
<value type="QString" >MANPATH=/home/andrey/.gentoo/java-config-2/current-user-vm/man:/usr/local/share/man:/usr/share/man:/usr/share/binutils-data/i686-pc-linux-gnu/2.19.1/man:/usr/share/gcc-data/i486-pc-linux-gnu/4.1.2/man:/usr/share/gcc-data/i686-pc-linux-gnu/4.3.3/man:/etc/java-config/system-vm/man/:/usr/qt/3/doc/man:/opt/opera/share/man</value>
<value type="QString" >OPENGL_PROFILE=xorg-x11</value>
<value type="QString" >ORBIT_SOCKETDIR=/tmp/orbit-andrey</value>
<value type="QString" >PAGER=/usr/bin/less</value>
<value type="QString" >PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i486-pc-linux-gnu/gcc-bin/4.1.2:/usr/i686-pc-linux-gnu/gcc-bin/4.3.3:/usr/qt/3/bin:/usr/games/bin</value>
<value type="QString" >PWD=/home/andrey</value>
<value type="QString" >QMAKESPEC=linux-g++</value>
<value type="QString" >QTDIR=/usr</value>
<value type="QString" >SESSION_MANAGER=local/buull-eeePC:@/tmp/.ICE-unix/26832,unix/buull-eeePC:/tmp/.ICE-unix/26832</value>
<value type="QString" >SHELL=/bin/bash</value>
<value type="QString" >SHLVL=0</value>
<value type="QString" >SSH_AGENT_PID=26858</value>
<value type="QString" >SSH_AUTH_SOCK=/tmp/keyring-QdwkGk/socket.ssh</value>
<value type="QString" >USER=andrey</value>
<value type="QString" >USERNAME=andrey</value>
<value type="QString" >WINDOWPATH=7</value>
<value type="QString" >XAUTHORITY=/home/andrey/.Xauthority</value>
<value type="QString" >XDG_CONFIG_DIRS=/etc/xdg</value>
<value type="QString" >XDG_DATA_DIRS=/usr/local/share:/usr/share:/usr/share/gdm</value>
<value type="QString" >XDG_SESSION_COOKIE=998ded06c94c2e848fb0b05949c4e51c-1251547484.422246-434250397</value>
<value type="QString" >XSESSION=icewm</value>
</valuelist>
<valuelist key="abstractProcess.arguments" type="QVariantList" >
<value type="QString" >-j3</value>
<value type="QString" >-w</value>
</valuelist>
<value key="abstractProcess.command" type="QString" >/usr/bin/make</value>
<value key="abstractProcess.enabled" type="bool" >true</value>
<value key="abstractProcess.workingDirectory" type="QString" >/home/andrey/sm11/Alien Defender/wavetrace</value>
<valuelist key="makeargs" type="QVariantList" >
<value type="QString" >-j3</value>
</valuelist>
</valuemap>
</data>
<data>
<variable>buildconfiguration-Debug-cleanstep0</variable>
<valuemap type="QVariantMap" >
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Debug</value>
<valuelist key="abstractProcess.Environment" type="QVariantList" >
<value type="QString" >ANT_HOME=/usr/share/ant</value>
<value type="QString" >CONFIG_PROTECT_MASK=/etc/gentoo-release /etc/sandbox.d /etc/env.d/java/ /etc/udev/rules.d /etc/fonts/fonts.conf /etc/gconf /etc/terminfo /etc/ca-certificates.conf /etc/revdep-rebuild</value>
<value type="QString" >CVS_RSH=ssh</value>
<value type="QString" >DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-iS6sKMEKdx,guid=d594cb8104679cd3cf55dd174a8fe9e9</value>
<value type="QString" >DESKTOP_SESSION=gnome</value>
<value type="QString" >DESKTOP_STARTUP_ID=</value>
<value type="QString" >DISPLAY=:0.0</value>
<value type="QString" >EDITOR=/bin/nano</value>
<value type="QString" >GCC_SPECS=</value>
<value type="QString" >GDK_USE_XFT=1</value>
<value type="QString" >GDMSESSION=gnome</value>
<value type="QString" >GDM_LANG=ru_RU.UTF-8</value>
<value type="QString" >GDM_XSERVER_LOCATION=local</value>
<value type="QString" >GNOME_DESKTOP_SESSION_ID=this-is-deprecated</value>
<value type="QString" >GNOME_KEYRING_SOCKET=/tmp/keyring-FOm1wP/socket</value>
<value type="QString" >GTK_RC_FILES=/etc/gtk/gtkrc:/home/andrey/.gtkrc-1.2-gnome2</value>
<value type="QString" >HOME=/home/andrey</value>
<value type="QString" >INFOPATH=/usr/share/info:/usr/share/binutils-data/i686-pc-linux-gnu/2.19.1/info:/usr/share/gcc-data/i486-pc-linux-gnu/4.1.2/info:/usr/share/gcc-data/i686-pc-linux-gnu/4.3.3/info</value>
<value type="QString" >JAVAC=/home/andrey/.gentoo/java-config-2/current-user-vm/bin/javac</value>
<value type="QString" >JAVA_HOME=/home/andrey/.gentoo/java-config-2/current-user-vm</value>
<value type="QString" >JDK_HOME=/home/andrey/.gentoo/java-config-2/current-user-vm</value>
<value type="QString" >LANG=ru_RU.UTF-8</value>
<value type="QString" >LESS=-R -M --shift 5</value>
<value type="QString" >LESSOPEN=|lesspipe.sh %s</value>
<value type="QString" >LOGNAME=andrey</value>
<value type="QString" >MANPATH=/home/andrey/.gentoo/java-config-2/current-user-vm/man:/usr/local/share/man:/usr/share/man:/usr/share/binutils-data/i686-pc-linux-gnu/2.19.1/man:/usr/share/gcc-data/i486-pc-linux-gnu/4.1.2/man:/usr/share/gcc-data/i686-pc-linux-gnu/4.3.3/man:/etc/java-config/system-vm/man/:/usr/qt/3/doc/man:/opt/opera/share/man</value>
<value type="QString" >OPENGL_PROFILE=xorg-x11</value>
<value type="QString" >ORBIT_SOCKETDIR=/tmp/orbit-andrey</value>
<value type="QString" >PAGER=/usr/bin/less</value>
<value type="QString" >PATH=/usr/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i486-pc-linux-gnu/gcc-bin/4.1.2:/usr/i686-pc-linux-gnu/gcc-bin/4.3.3:/usr/qt/3/bin:/usr/games/bin</value>
<value type="QString" >PWD=/home/andrey</value>
<value type="QString" >QMAKESPEC=linux-g++</value>
<value type="QString" >QTDIR=/usr</value>
<value type="QString" >SESSION_MANAGER=local/buull-eeePC:@/tmp/.ICE-unix/4700,unix/buull-eeePC:/tmp/.ICE-unix/4700</value>
<value type="QString" >SHELL=/bin/bash</value>
<value type="QString" >SHLVL=0</value>
<value type="QString" >SSH_AGENT_PID=4726</value>
<value type="QString" >SSH_AUTH_SOCK=/tmp/keyring-FOm1wP/socket.ssh</value>
<value type="QString" >USER=andrey</value>
<value type="QString" >USERNAME=andrey</value>
<value type="QString" >WINDOWPATH=7</value>
<value type="QString" >XAUTHORITY=/home/andrey/.Xauthority</value>
<value type="QString" >XDG_CONFIG_DIRS=/etc/xdg</value>
<value type="QString" >XDG_DATA_DIRS=/usr/local/share:/usr/share:/usr/share/gdm</value>
<value type="QString" >XDG_SESSION_COOKIE=998ded06c94c2e848fb0b05949c4e51c-1250945512.215104-728413348</value>
<value type="QString" >XSESSION=icewm</value>
</valuelist>
<valuelist key="abstractProcess.arguments" type="QVariantList" >
<value type="QString" >clean</value>
<value type="QString" >-w</value>
</valuelist>
<value key="abstractProcess.command" type="QString" >/usr/bin/make</value>
<value key="abstractProcess.enabled" type="bool" >true</value>
<value key="abstractProcess.workingDirectory" type="QString" >/home/andrey/sm11/Alien Defender/wavetrace</value>
</valuemap>
</data>
<data>
<variable>buildconfiguration-Release-buildstep0</variable>
<valuemap type="QVariantMap" >
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Release</value>
<value key="buildConfiguration" type="int" >0</value>
</valuemap>
</data>
<data>
<variable>buildconfiguration-Release-buildstep1</variable>
<valuemap type="QVariantMap" >
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Release</value>
</valuemap>
</data>
<data>
<variable>buildconfiguration-Release-cleanstep0</variable>
<valuemap type="QVariantMap" >
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" >Release</value>
</valuemap>
</data>
<data>
<variable>buildconfigurations</variable>
<valuelist type="QVariantList" >
<value type="QString" >Debug</value>
<value type="QString" >Release</value>
</valuelist>
</data>
<data>
<variable>buildstep0</variable>
<valuemap type="QVariantMap" >
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" ></value>
<value key="mkspec" type="QString" ></value>
</valuemap>
</data>
<data>
<variable>buildstep1</variable>
<valuemap type="QVariantMap" >
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" ></value>
</valuemap>
</data>
<data>
<variable>buildsteps</variable>
<valuelist type="QVariantList" >
<value type="QString" >trolltech.qt4projectmanager.qmake</value>
<value type="QString" >trolltech.qt4projectmanager.make</value>
</valuelist>
</data>
<data>
<variable>cleanstep0</variable>
<valuemap type="QVariantMap" >
<value key="ProjectExplorer.BuildConfiguration.DisplayName" type="QString" ></value>
<value key="clean" type="bool" >true</value>
</valuemap>
</data>
<data>
<variable>cleansteps</variable>
<valuelist type="QVariantList" >
<value type="QString" >trolltech.qt4projectmanager.make</value>
</valuelist>
</data>
<data>
<variable>defaultFileEncoding</variable>
<value type="QByteArray" >UTF-8</value>
</data>
<data>
<variable>project</variable>
<valuemap type="QVariantMap" />
</data>
</qtcreator>