aboutsummaryrefslogtreecommitdiffstats
path: root/src/gameplay.cpp
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2015-11-17 08:38:51 -0500
committerClyne Sullivan <tullivan99@gmail.com>2015-11-17 08:38:51 -0500
commitfcf3e396c57b285b621624f63f9acd6515c58ef9 (patch)
tree03969def5fbea60e9003e56c94ccca1492eebe26 /src/gameplay.cpp
parent20b29fccb6da62d5a07a02477fabac3a80d350dd (diff)
cutscenes, arenas
Diffstat (limited to 'src/gameplay.cpp')
-rw-r--r--src/gameplay.cpp27
1 files changed, 23 insertions, 4 deletions
diff --git a/src/gameplay.cpp b/src/gameplay.cpp
index fcc501c..e5d7251 100644
--- a/src/gameplay.cpp
+++ b/src/gameplay.cpp
@@ -41,9 +41,26 @@ int giveTestQuest(NPC *speaker){
return 0;
}
+static Arena *a;
+
+void CUTSCENEEE(void){
+ char opt[]=":K.";
+ player->vel.x = 0;
+ ui::dialogBox(player->name,opt,"No way I\'m gettin\' up this hill.");
+
+ waitForDialog();
+
+ a = new Arena(currentWorld,player);
+
+ currentWorld = a;
+
+ /*player->right = true;
+ player->left = false;
+ player->loc.x += HLINE * 5;*/
+}
+
float playerSpawnHillFunc(float x){
- x=-x;
- return (float)(pow(2,(x+200)/5) + 80);
+ return (float)(pow(2,(-x+200)/5) + 80);
}
void initEverything(void){
unsigned int i;
@@ -104,13 +121,15 @@ void initEverything(void){
currentWorld->addStructure(STRUCTURET,(rand()%120*HLINE),10,test,iw);
/*
- * Spawn a mob.
+ * Spawn some mobs.
*/
+
+ playerSpawnHill->addMob(MS_TRIGGER,-1300,0,CUTSCENEEE);
test->addMob(MS_RABBIT,200,100);
test->addMob(MS_BIRD,-500,500);
- currentWorld->addObject(2, 500,200);
+ test->addObject(2, 500,200);
/*
* Link all the entities that were just created to the initial world, and setup a test AI function.