mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-03-13 23:18:16 +00:00
rogueviz::magiccube:: updated to conform with new rogueviz
This commit is contained in:
parent
c750bc9573
commit
2f76a23d99
@ -1,16 +1,11 @@
|
||||
#include "../hyper.h"
|
||||
|
||||
namespace hr {
|
||||
namespace rogueviz {
|
||||
|
||||
#if CAP_CRYSTAL
|
||||
|
||||
void curvepoint(const hyperpoint& H1);
|
||||
dqi_poly& queuecurve(color_t linecol, color_t fillcol, PPR prio);
|
||||
|
||||
namespace magic {
|
||||
|
||||
bool on = false;
|
||||
|
||||
int back = 0x202020;
|
||||
|
||||
int magiccolors[14] = { 0xFFFFFF, 0xFFFF00, 0x0000FF, 0x00FF00, 0xFF0000, 0xFF8000, 0x800080, 0x808080, 0x00FFFF, 0x80FFFF, 0x4040C0, 0x40C040, 0xC04040, 0xC0A040 };
|
||||
@ -52,7 +47,7 @@ void magic(int sides) {
|
||||
start_game();
|
||||
|
||||
build(crystal::c0, 0);
|
||||
on = true;
|
||||
vizid = (void*) &magic;
|
||||
}
|
||||
|
||||
void curveline(hyperpoint a, hyperpoint b, int lev) {
|
||||
@ -65,7 +60,7 @@ void curveline(hyperpoint a, hyperpoint b, int lev) {
|
||||
}
|
||||
|
||||
bool magic_markers(cell *c, const transmatrix& V) {
|
||||
if(!on) return false;
|
||||
if(vizid != &magic) return false;
|
||||
timerghost = false;
|
||||
if(c->landparam == back) {
|
||||
if(GDIM == 2)
|
||||
@ -132,7 +127,7 @@ void twos_to_fours(vector<int>& zeros, crystal::coord co, int d) {
|
||||
}
|
||||
|
||||
bool magic_rotate(cell *c) {
|
||||
if(!on) return false;
|
||||
if(vizid != &magic) return false;
|
||||
if(c->landparam != back) return false;
|
||||
vector<int> zeros;
|
||||
auto co = crystal::get_coord(c->master);
|
||||
@ -149,20 +144,21 @@ bool magic_rotate(cell *c) {
|
||||
}
|
||||
|
||||
bool magic_rugkey(int sym, int uni) {
|
||||
if((cmode & sm::NORMAL) && uni == 'p' && on) {
|
||||
if(vizid != &magic) return false;
|
||||
if((cmode & sm::NORMAL) && uni == 'p') {
|
||||
rug::texturesize = 4096;
|
||||
if(rug::rugged) rug::close();
|
||||
else rug::init();
|
||||
return true;
|
||||
}
|
||||
if((cmode & sm::NORMAL) && uni == 'r' && on) {
|
||||
if((cmode & sm::NORMAL) && uni == 'r') {
|
||||
mine::performMarkCommand(mouseover);
|
||||
return true;
|
||||
}
|
||||
if((cmode & sm::NORMAL) && uni == 'R' && on) {
|
||||
if((cmode & sm::NORMAL) && uni == 'R') {
|
||||
build(crystal::c0, 0);
|
||||
}
|
||||
if((cmode & sm::NORMAL) && uni == 'k' && on) {
|
||||
}
|
||||
if((cmode & sm::NORMAL) && uni == 'k') {
|
||||
crystal::view_coordinates = !crystal::view_coordinates;
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user