aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Changelog8
-rw-r--r--Makefile5
-rw-r--r--assets/items/ITEM_PAGE.pngbin0 -> 331 bytes
-rw-r--r--include/entities.h3
-rw-r--r--main.cpp7
-rw-r--r--src/entities.cpp22
-rw-r--r--src/gameplay.cpp31
-rw-r--r--xcf/page.xcfbin0 -> 1059 bytes
8 files changed, 57 insertions, 19 deletions
diff --git a/Changelog b/Changelog
index 6d5fa3b..44ff8a4 100644
--- a/Changelog
+++ b/Changelog
@@ -444,3 +444,11 @@
- 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
diff --git a/Makefile b/Makefile
index 6eeca1a..81862c0 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,7 @@ WIN_LIBS = -lopengl32 -lglew32 -lmingw32 -lSDL2main -lSDL2 -lSDL2_image -lSDL2_m
FLAGS = -std=c++11 -Iinclude -Iinclude/freetype2 -Wall -Wextra -Werror
MFLAGS64 = 64
+
all:
@echo "Building for 32-bit target"
@rm -f out/*.o
@@ -17,11 +18,11 @@ all:
@rm -f out64/*.o
@cd src; $(MAKE) $(MFLAGS64)
@echo " CXX main.cpp"
- @g++ $(FLAGS) -m64 -o main main.cpp out64/*.o $(LIBS) -lX11
+ @g++ $(FLAGS) -m64 -o main main.cpp out64/*.o $(LIBS)
win32:
@g++ $(FLAGS) -o main main.cpp src/*.cpp $(WIN_LIBS)
-
+
clean:
@echo " RM main"
@-rm -f main
diff --git a/assets/items/ITEM_PAGE.png b/assets/items/ITEM_PAGE.png
new file mode 100644
index 0000000..ac132c6
--- /dev/null
+++ b/assets/items/ITEM_PAGE.png
Binary files differ
diff --git a/include/entities.h b/include/entities.h
index 6d192fe..6b8cc32 100644
--- a/include/entities.h
+++ b/include/entities.h
@@ -32,7 +32,8 @@ enum MOB_SUB {
MS_RABBIT = 1,
MS_BIRD,
MS_TRIGGER,
- MS_DOOR
+ MS_DOOR,
+ MS_PAGE
};
enum BUILD_SUB{
diff --git a/main.cpp b/main.cpp
index 7eaaa84..e5aba88 100644
--- a/main.cpp
+++ b/main.cpp
@@ -198,15 +198,11 @@ extern int fadeIntensity;
/*******************************************************************************
* 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.
@@ -905,6 +901,7 @@ void logic(){
m->wander((rand()%240 + 15)); // Make the mob wander :)
break;
case MS_TRIGGER:
+ case MS_PAGE:
m->wander(0);
break;
case MS_DOOR:
diff --git a/src/entities.cpp b/src/entities.cpp
index c307a31..23a4ae6 100644
--- a/src/entities.cpp
+++ b/src/entities.cpp
@@ -1,7 +1,7 @@
#include <entities.h>
#include <ui.h>
-#include <unistd.h>
+//#include <unistd.h>
extern FILE* names;
extern unsigned int loops;
@@ -153,15 +153,22 @@ Mob::Mob(int sub){
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);
@@ -248,6 +255,7 @@ void Entity::draw(void){ //draws the entities
break;
case MS_BIRD:
case MS_DOOR:
+ case MS_PAGE:
default:
tex->bind(0);
break;
@@ -471,7 +479,17 @@ void Mob::wander(int timeRun){
}
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;
}
diff --git a/src/gameplay.cpp b/src/gameplay.cpp
index ba2c8d9..1670929 100644
--- a/src/gameplay.cpp
+++ b/src/gameplay.cpp
@@ -51,14 +51,27 @@ void worldSpawnHill1_hillBlock(Mob *callee){
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!");
}
@@ -113,7 +126,7 @@ void initEverything(void){
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);
diff --git a/xcf/page.xcf b/xcf/page.xcf
new file mode 100644
index 0000000..bf39c18
--- /dev/null
+++ b/xcf/page.xcf
Binary files differ