void NPC::drawThingy(void) const
{
if (dialogCount) {
- auto w = width / 3;
- glColor3ub(255, 255, 0);
- glRectf(loc.x + w, loc.y + height, loc.x + w * 2, loc.y + height + w);
+ const auto w = width / 3;
+ GLfloat tex_coord[] = {
+ 0, 0, 1, 0, 1, 1,
+ 1, 1, 0, 1, 0, 0
+ };
+ const GLfloat c[4] = {
+ loc.x + w, loc.y + height, loc.x + w * 2, loc.y + height + w
+ };
+ GLfloat coords[] = {
+ c[0], c[1], z, c[2], c[1], z, c[2], c[3], z,
+ c[2], c[3], z, c[0], c[3], z, c[0], c[1], z
+ };
+
+ glUseProgram(worldShader);
+ glEnableVertexAttribArray(worldShader_attribute_coord);
+ glEnableVertexAttribArray(worldShader_attribute_tex);
+ glVertexAttribPointer(worldShader_attribute_coord, 3, GL_FLOAT, GL_FALSE, 0, coords);
+ glVertexAttribPointer(worldShader_attribute_tex, 2, GL_FLOAT, GL_FALSE, 0, tex_coord);
+ glDrawArrays(GL_TRIANGLES, 0, 6);
+ glDisableVertexAttribArray(worldShader_attribute_coord);
+ glDisableVertexAttribArray(worldShader_attribute_tex);
+ glUseProgram(0);
}
}
return 0;
}
+/*Particles::Particles(const Structures *&s, vec2 vell, Color c, float d, )
+{
+
+}*/
+
Particles::Particles(float x, float y, float w, float h, float vx, float vy, Color c, float d)
{
loc = vec2 {x, y};
0.0, 1.0,
1.0, 1.0};
- GLfloat backdrop[] = {offset.x - SCREEN_WIDTH / 2, offset.y - SCREEN_HEIGHT / 2, 1.0,
+ GLfloat backdrop[] = {offset.x - SCREEN_WIDTH / 2 - 1, offset.y - SCREEN_HEIGHT / 2, 1.0,
offset.x + SCREEN_WIDTH / 2, offset.y - SCREEN_HEIGHT / 2, 1.0,
- offset.x - SCREEN_WIDTH / 2, offset.y + SCREEN_HEIGHT / 2, 1.0,
+ offset.x - SCREEN_WIDTH / 2 - 1, offset.y + SCREEN_HEIGHT / 2, 1.0,
offset.x + SCREEN_WIDTH / 2, offset.y + SCREEN_HEIGHT / 2, 1.0};
glUniform1i(textShader_uniform_texture, 0);
<npc name="Johnny" hasDialog="false" x="300" />
<npc name="Big Dave" hasDialog="true" x="300" />
- <page x="-200" id="assets/pages/gootaGoFast.png" cid="canSprint" cvalue="1"/>
+ <page x="-200" id="assets/pages/gootaGoFast.png" cid="canSprint" cvalue="1" />
+ <page x="-500" id="assets/pages/gootaJump.png" cid="canJump" cvalue="1" />
<village name="Big Dave's bagel emporium! The greatest place on earth!">
<structure type="0" x="-300" inside="playerSpawnHill1_Building1.xml"/>