diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2015-11-20 08:58:44 -0500 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2015-11-20 08:58:44 -0500 |
commit | 19ef54b2c5ffcaefdce352c6f195a62c05c42767 (patch) | |
tree | 2c8dbf3aea3539d2f4c6db3ef56eb1880fd14786 /src/gameplay.cpp | |
parent | 6be7b11513cdedc17358da314c6e5a5630be00c1 (diff) | |
parent | cc4cd76409894615887e0b39d7db5b722138a613 (diff) |
inv/background merge
Diffstat (limited to 'src/gameplay.cpp')
-rw-r--r-- | src/gameplay.cpp | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/src/gameplay.cpp b/src/gameplay.cpp index 1d9fac6..52aceb8 100644 --- a/src/gameplay.cpp +++ b/src/gameplay.cpp @@ -6,6 +6,35 @@ extern World *currentWorld; extern Player *player; extern void mainLoop(void); +extern SDL_Window *window; +extern bool fadeEnable; + +void story(void){ + for(int i=0;i<600;i++){ + glMatrixMode(GL_PROJECTION); + glPushMatrix(); + glLoadIdentity(); + glOrtho((offset.x-SCREEN_WIDTH/2),(offset.x+SCREEN_WIDTH/2),offset.y-SCREEN_HEIGHT/2,offset.y+SCREEN_HEIGHT/2,-1,1); + glMatrixMode(GL_MODELVIEW); + glPushMatrix(); + glLoadIdentity(); + glEnable(GL_STENCIL_TEST); + glPushMatrix(); + + glPushAttrib( GL_DEPTH_BUFFER_BIT | GL_LIGHTING_BIT ); + glClear(GL_COLOR_BUFFER_BIT); + + glColor4f(0.0f,0.0f,0.0f,0.0f); + glRectf(-SCREEN_WIDTH/2,0,SCREEN_WIDTH/2,SCREEN_HEIGHT); + glColor4f(1.0f,1.0f,1.0f,1.0f); + ui::importantText("Oh hello, where are you?"); + //ui::setFontSize(16); + //ui::putText(54,540,"BITC."); + + glPopMatrix(); + SDL_GL_SwapWindow(window); + } +} void waitForDialog(void){ do{ @@ -130,13 +159,12 @@ void initEverything(void){ test->addMob(MS_RABBIT,200,100); test->addMob(MS_BIRD,-500,500); - - test->addObject(2, 500,200); + currentWorld->addObject(SWORD_WOOD, false, NULL, 500,200); + currentWorld->addObject(FLASHLIGHT, true, "This looks important, do you want to pick it up?",600,200); /* * Link all the entities that were just created to the initial world, and setup a test AI function. */ currentWorld->npc[0]->addAIFunc(giveTestQuest,false); - } |