- fixed NPC spawning world location stuff
- messed with threads/forks
- re-fixed/added indoor environment; fixed indoor background
+
+12/18/2015:
+===========
+
+ - upgraded development utilities
+ - began working on pages, made sprite and handler
+ - GLSL shaders are better
+ - redid theme_jazz
FLAGS = -std=c++11 -Iinclude -Iinclude/freetype2 -Wall -Wextra -Werror\r
\r
MFLAGS64 = 64\r
+\r
all:\r
@echo "Building for 32-bit target"\r
@rm -f out/*.o\r
@rm -f out64/*.o\r
@cd src; $(MAKE) $(MFLAGS64)\r
@echo " CXX main.cpp"\r
- @g++ $(FLAGS) -m64 -o main main.cpp out64/*.o $(LIBS) -lX11\r
+ @g++ $(FLAGS) -m64 -o main main.cpp out64/*.o $(LIBS)\r
\r
win32:\r
@g++ $(FLAGS) -o main main.cpp src/*.cpp $(WIN_LIBS)\r
- \r
+\r
clean:\r
@echo " RM main"\r
@-rm -f main\r
MS_RABBIT = 1,
MS_BIRD,
MS_TRIGGER,
- MS_DOOR
+ MS_DOOR,
+ MS_PAGE
};
enum BUILD_SUB{
/*******************************************************************************
* MAIN ************************************************************************
*******************************************************************************/
-
-#include <X11/Xlib.h>
-
+
int main(/*int argc, char *argv[]*/){
//*argv = (char *)argc;
gameRunning=false;
- XInitThreads();
-
/*!
* (Attempt to) Initialize SDL libraries so that we can use SDL facilities and eventually
* make openGL calls. Exit if there was an error.
m->wander((rand()%240 + 15)); // Make the mob wander :)
break;
case MS_TRIGGER:
+ case MS_PAGE:
m->wander(0);
break;
case MS_DOOR:
#include <entities.h>
#include <ui.h>
-#include <unistd.h>
+//#include <unistd.h>
extern FILE* names;
extern unsigned int loops;
width = HLINE * 8;
height = HLINE * 8;
tex = new Texturec(1, "assets/robin.png");
+ break;
case MS_TRIGGER:
width = HLINE * 20;
height = 2000;
tex = new Texturec(0);
+ break;
case MS_DOOR:
width = HLINE * 12;
height = HLINE * 19;
tex = new Texturec(1,"assets/door.png");
break;
+ case MS_PAGE:
+ width = HLINE * 6;
+ height = HLINE * 4;
+ tex = new Texturec(1,"assets/items/ITEM_PAGE.png");
+ break;
}
inv = new Inventory(NPC_INV_SIZE);
break;
case MS_BIRD:
case MS_DOOR:
+ case MS_PAGE:
default:
tex->bind(0);
break;
}
break;
- case MS_DOOR:
+ case MS_PAGE:
+ if(ui::mouse.x > loc.x &&
+ ui::mouse.x < loc.x + width &&
+ SDL_GetMouseState(NULL, NULL) & SDL_BUTTON(SDL_BUTTON_RIGHT)){
+ if(speed != 666){
+ speed = 666;
+ hey(this);
+ speed = 0;
+ }
+ }
+ break;
default:
break;
}
static Arena *a;
void worldSpawnHill2_infoSprint(Mob *callee){
- callee->alive = false;
- a = new Arena(currentWorld,player);
- a->setBackground(BG_FOREST);
- a->setBGM("assets/music/embark.wav");
- ui::toggleWhiteFast();
- ui::waitForCover();
- currentWorld = a;
- ui::toggleWhiteFast();
+
+ ui::dialogBox(player->name,":Nah:Sure",false,"This page would like to take you somewhere.");
+ ui::waitForDialog();
+ switch(ui::dialogOptChosen){
+ case 1:
+ ui::dialogBox(player->name,NULL,true,"Cool.");
+ callee->alive = false;
+ a = new Arena(currentWorld,player);
+ a->setBackground(BG_FOREST);
+ a->setBGM("assets/music/embark.wav");
+ ui::toggleWhiteFast();
+ ui::waitForCover();
+ currentWorld = a;
+ ui::toggleWhiteFast();
+ break;
+ case 2:
+ default:
+ ui::dialogBox(player->name,NULL,false,"Okay then.");
+ break;
+ }
+
//ui::dialogBox("B-) ",NULL,true,"Press \'Shift\' to run!");
}
worldSpawnHill2->generate(700);
worldSpawnHill2->setBackground(BG_FOREST);
worldSpawnHill2->setBGM("assets/music/ozone.wav");
- worldSpawnHill2->addMob(MS_TRIGGER,-400,0,worldSpawnHill2_infoSprint);
+ worldSpawnHill2->addMob(MS_PAGE,-400,0,worldSpawnHill2_infoSprint);
worldSpawnHill3 = new World();
worldSpawnHill3->generateFunc(1000,gen_worldSpawnHill3);