1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
|
#include "SDL_opengl.h"
#include "font_ogl.h"
#include "coordinate.h"
#include "release.h"
#include "help.h"
#include "config.h"
#include "tweak/tweak.h"
namespace PRJID {
void Help::gameplay() {
static GLuint dl=0;
if (dl!=0) { glCallList(dl); return; }
dl = glGenLists(1);
glNewList(dl,GL_COMPILE);
glColor3ub(250,250,250);
glPushMatrix();
glTranslatef(10,350,0);
Font_ogl::write("Enemy bombers are approaching Glysen, our capital.");
glTranslatef(0,14,0);
Font_ogl::write("The situation is without hope.");
glTranslatef(0,14,0);
Font_ogl::write("But with the new experimental mech we");
glTranslatef(0,14,0);
Font_ogl::write("developed you can at least try to");
glTranslatef(0,14,0);
Font_ogl::write("take as many of them with you as possible.");
glTranslatef(0,14,0);
Font_ogl::write("Good hunting.");
glTranslatef(0,14,0);
Font_ogl::write("The green bar shows shelter structural integrity.");
glTranslatef(0,14,0);
Font_ogl::write("");
glPopMatrix();
glEndList();
}
void Help::mouselock() {
glColor3f(1,1,0);
Font_ogl::write(C3(320,240+60),"Click to grab mouse!",false,FA_CENTER);
}
void Help::mouselock_off() {
glColor3f(1,1,0);
Font_ogl::write(C3(320,240+60),"Mouse grabbed.",false,FA_CENTER);
Font_ogl::write(C3(320,240+80),"Press 'm' if you wish to release it.",false,FA_CENTER);
}
void Help::controls() {
static GLuint dl=0;
if (dl!=0) { glCallList(dl); return; }
dl = glGenLists(1);
glNewList(dl,GL_COMPILE);
glColor3ub(250,250,250);
glPushMatrix();
glTranslatef(330,350,0);
Font_ogl::write("'m' to toggle mouselook! 'r' to invert mouse");
glTranslatef(0,14,0);
Font_ogl::write("w,a,s,d or arrow keys to move.");
glTranslatef(0,14,0);
Font_ogl::write("Left Mousebutton fires gun.");
glTranslatef(0,14,0);
Font_ogl::write("Space activates Jumpjets.");
glTranslatef(0,14,0);
Font_ogl::write("Escape to exit.");
glTranslatef(0,14,0);
Font_ogl::write("f to toggle fullscreen.");
glTranslatef(0,14,0);
Font_ogl::write("v to toggle audio.");
glTranslatef(0,14,0);
Font_ogl::write("F1 or h for this help.");
glPopMatrix();
glEndList();
}
void Help::paused() {
glColor3ub(250,250,250);
glPushMatrix();
glScalef(2,2,2);
glTranslatef(125,10,0);
Font_ogl::write("game paused");
glPopMatrix();
}
void Help::title() {
glColor3ub(250,250,250);
glPushMatrix();
glScalef(2,2,2);
glTranslatef(125,22,0);
Font_ogl::write(FULLNAME);
glPopMatrix();
}
void Help::gameover() {
static GLuint dl=0;
if (dl!=0) { glCallList(dl); return; }
dl = glGenLists(1);
glNewList(dl,GL_COMPILE);
glColor3ub(250,250,250);
glPushMatrix();
glTranslatef(
Tweak::ui_gameover_x_i(),
Tweak::ui_gameover_y_i(),0);
Font_ogl::write(" Game over ",false,FA_CENTER);
glTranslatef(0,14,0);
Font_ogl::write("Press Escape to exit",false,FA_CENTER);
glPopMatrix();
glEndList();
}
void Help::fin() {
static GLuint dl=0;
if (dl!=0) { glCallList(dl); return; }
dl = glGenLists(1);
glNewList(dl,GL_COMPILE);
glColor3ub(250,250,250);
glPushMatrix();
glTranslatef(
Tweak::ui_gameover_x_i(),
Tweak::ui_gameover_y_i(),0);
Font_ogl::write(" You made it! ",false,FA_CENTER);
glTranslatef(0,14,0);
Font_ogl::write("Press Escape to exit",false,FA_CENTER);
glPopMatrix();
glEndList();
}
} //namespace
|