1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2026-02-24 17:29:43 +00:00

work in progress for 10.0

This commit is contained in:
Zeno Rogue
2017-07-04 15:38:33 +02:00
parent 13043dc417
commit 22c9217219
34 changed files with 2051 additions and 1290 deletions

View File

@@ -1,6 +1,6 @@
#define VER "9.4n"
#define VERNUM 9414
#define VERNUM_HEX 0x9414
#define VER "9.4n1"
#define VERNUM 9415
#define VERNUM_HEX 0x9415
#define GEN_M 0
#define GEN_F 1
@@ -40,7 +40,9 @@
#define GFX
#endif
#ifndef NOGL
#define GL
#endif
#define PSEUDOKEY_WHEELDOWN 2501
#define PSEUDOKEY_WHEELUP 2502
@@ -53,6 +55,8 @@
#define NOPNG
#endif
// #define INV
#ifndef MOBILE
#ifndef NOAUDIO
#define SDLAUDIO
@@ -72,6 +76,10 @@ bool buttonclicked;
void gdpush(int t);
#endif
#ifndef HYPERPATH
#define HYPERPATH ""
#endif
#include <stdio.h>
#ifdef NOSDL
@@ -151,7 +159,11 @@ typedef int SDL_Event;
#ifdef GL
#ifdef WINDOWS
#ifdef MAC
#define AVOID_GLEW
#endif
#ifndef AVOID_GLEW
#include <GL/glew.h>
#else
#define GL_GLEXT_PROTOTYPES 1
@@ -251,6 +263,9 @@ const char *loadlevel = NULL;
#include "game.cpp"
#include "landgen.cpp"
#include "orbs.cpp"
#ifdef INV
#include "inventory.cpp"
#endif
#include "system.cpp"
#include "geometry.cpp"
#include "polygons.cpp"
@@ -258,6 +273,9 @@ const char *loadlevel = NULL;
#ifndef MOBILE
#include "netgen.cpp"
#endif
#ifdef EXTRA
#include "extra/extra.cpp"
#endif
#include "graph.cpp"
#include "sound.cpp"
#include "achievement.cpp"
@@ -592,7 +610,7 @@ void mobile_draw(MOBPAR_FORMAL) {
displayTexts();
#endif
if((cmode != emVisual1 && cmode != emScores)) {
if((cmode != emBasicConfig && cmode != emScores)) {
if(clicked && lclicked && andmode == 1 && !inmenu) {
if(!mouseout2() && mouseoh[2] < 50 && mouseh[2] < 50) {
@@ -646,3 +664,35 @@ void mobile_draw(MOBPAR_FORMAL) {
#ifdef NOAUDIO
void playSound(cell*, const string &s, int vol) { printf("play sound: %s vol %d\n", s.c_str(), vol); }
#endif
// optional hooks
// you may include hyper.cpp from another file and define EXTRA_... to change some things
namespace extra {
// on drawing cells
void drawcell(cell *c, const transmatrix& V);
// on each frame
void frame();
// on stats drawing
void stats();
// return true if key is handled
bool handleKey(int sym, int uni);
// return true to exit immediately
bool main(int argc, char **argv);
// extra configuration, called together with reading arguments
void config();
// read command line arguments
int arg();
// change land distribution
eLand getNext(eLand old);
// change musics
bool changeMusic(eLand id);
}