mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 05:52:59 +00:00 
			
		
		
		
	some work on RogueViz
This commit is contained in:
		
							
								
								
									
										10
									
								
								rogueviz.cpp
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								rogueviz.cpp
									
									
									
									
									
								
							| @@ -147,7 +147,7 @@ hyperpoint where(int i) { | |||||||
|   auto m = vdata[i].m; |   auto m = vdata[i].m; | ||||||
|   if(m->base == currentmap->gamestart()) return tC0(m->at); |   if(m->base == currentmap->gamestart()) return tC0(m->at); | ||||||
|   else {  |   else {  | ||||||
|     notimpl(); // actually probably that's a buug |     // notimpl(); // actually probably that's a buug | ||||||
|     return inverse(shmup::ggmatrix(currentmap->gamestart())) * (shmup::ggmatrix(m->base) * tC0(m->at)); |     return inverse(shmup::ggmatrix(currentmap->gamestart())) * (shmup::ggmatrix(m->base) * tC0(m->at)); | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
| @@ -169,7 +169,7 @@ void addedge(int i, int j, edgeinfo *ei) { | |||||||
|      |      | ||||||
|     addedge(i, id, ei); |     addedge(i, id, ei); | ||||||
|     addedge(id, j, ei); |     addedge(id, j, ei); | ||||||
|     shmup::virtualRebase(vd.m, true); |     shmup::virtualRebase(vdata[i].m, true); | ||||||
|     } |     } | ||||||
|   else addedge0(i, j, ei); |   else addedge0(i, j, ei); | ||||||
|   } |   } | ||||||
| @@ -309,7 +309,7 @@ namespace anygraph { | |||||||
|     vdata.reserve(N); |     vdata.reserve(N); | ||||||
|     while(true) { |     while(true) { | ||||||
|       string s = readLabel_s(f); |       string s = readLabel_s(f); | ||||||
|       if(s == "" || s == "-1") break; |       if(s == "" || s == "#ROGUEVIZ_ENDOFDATA") break; | ||||||
|       int id = getid(s); |       int id = getid(s); | ||||||
|       vertexdata& vd(vdata[id]); |       vertexdata& vd(vdata[id]); | ||||||
|       vd.name = s; |       vd.name = s; | ||||||
| @@ -1774,7 +1774,7 @@ string cname() { | |||||||
|  |  | ||||||
| template<class T> function<void(presmode)> roguevizslide(char c, T t) { | template<class T> function<void(presmode)> roguevizslide(char c, T t) { | ||||||
|   return [c,t] (presmode mode) { |   return [c,t] (presmode mode) { | ||||||
|     mapeditor::canvasback = 0x101010; |     patterns::canvasback = 0x101010; | ||||||
|     setCanvas(mode, c); |     setCanvas(mode, c); | ||||||
|     if(mode == 1 || mode == pmGeometryStart) t(); |     if(mode == 1 || mode == pmGeometryStart) t(); | ||||||
|    |    | ||||||
| @@ -1792,7 +1792,7 @@ template<class T> function<void(presmode)> roguevizslide(char c, T t) { | |||||||
|  |  | ||||||
| template<class T, class T1> function<void(presmode)> roguevizslide_action(char c, T t, T1 act) { | template<class T, class T1> function<void(presmode)> roguevizslide_action(char c, T t, T1 act) { | ||||||
|   return [c,t,act] (presmode mode) { |   return [c,t,act] (presmode mode) { | ||||||
|     mapeditor::canvasback = 0x101010; |     patterns::canvasback = 0x101010; | ||||||
|     setCanvas(mode, c); |     setCanvas(mode, c); | ||||||
|     if(mode == pmStart || mode == pmGeometryStart) t(); |     if(mode == pmStart || mode == pmGeometryStart) t(); | ||||||
|    |    | ||||||
|   | |||||||
| @@ -1,5 +1,7 @@ | |||||||
| namespace rogueviz { | namespace rogueviz { | ||||||
|  |  | ||||||
|  |   void init(); | ||||||
|  |    | ||||||
| struct edgeinfo { | struct edgeinfo { | ||||||
|   int i, j; |   int i, j; | ||||||
|   double weight, weight2; |   double weight, weight2; | ||||||
| @@ -30,6 +32,8 @@ struct vertexdata { | |||||||
|  |  | ||||||
| extern vector<vertexdata> vdata; | extern vector<vertexdata> vdata; | ||||||
|   |   | ||||||
|  |   void storeall(); | ||||||
|  |  | ||||||
|   namespace anygraph { |   namespace anygraph { | ||||||
|     extern double R, alpha, T; |     extern double R, alpha, T; | ||||||
|     extern vector<pair<double, double> > coords; |     extern vector<pair<double, double> > coords; | ||||||
| @@ -40,4 +44,5 @@ extern vector<vertexdata> vdata; | |||||||
|     } |     } | ||||||
|    |    | ||||||
|   extern ld ggamma; |   extern ld ggamma; | ||||||
|  |   extern bool showlabels; | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue