The Wiki for Tale 6 is in read-only mode and is available for archival and reference purposes only. Please visit the current Tale 11 Wiki in the meantime.

If you have any issues with this Wiki, please post in #wiki-editing on Discord or contact Brad in-game.

Difference between revisions of "User:OneBanana/Gallery/Test Page 1"

From ATITD6
Jump to navigationJump to search
Line 131: Line 131:
  
  
 +
public void newframe() {
 +
  //Toggle maps each frame
 +
  i=oldind;
 +
  oldind=newind;
 +
  newind=i;
 +
 +
  i=0;
 +
  mapind=oldind;
 +
  for (int y=0;y<height;y++) {
 +
    for (int x=0;x<width;x++) {
 +
  short data = (short)((ripplemap[mapind-width]+ripplemap[mapind+width]+
 +
ripplemap[mapind-1]+ripplemap[mapind+1])>>1);
 +
      data -= ripplemap[newind+i];
 +
      data -= data >> 5;
 +
      ripplemap[newind+i]=data;
 +
 +
  //where data=0 then still, where data>0 then wave
 +
  data = (short)(1024-data);
 +
 +
      //offsets
 +
      a=((x-hwidth)*data/1024)+hwidth;
 +
      b=((y-hheight)*data/1024)+hheight;
  
public void newframe() {
+
       //bounds check
  2      //Toggle maps each frame
+
      if (a>=width) a=width-1;
  3      i=oldind;
+
      if (a<0) a=0;
  4      oldind=newind;
+
      if (b>=height) b=height-1;
  5      newind=i;
+
      if (b<0) b=0;
  6
+
 
  7      i=0;
+
      ripple[i]=texture[a+(b*width)];
  8      mapind=oldind;
+
      mapind++;
  9      for (int y=0;y<height;y++) {
+
  i++;
10        for (int x=0;x<width;x++) {
+
    }
11       short data = (short)((ripplemap[mapind-width]+ripplemap[mapind+width]+
+
  }
12 ripplemap[mapind-1]+ripplemap[mapind+1])>>1);
+
}
13          data -= ripplemap[newind+i];
 
14          data -= data >> 5;
 
15          ripplemap[newind+i]=data;
 
16
 
17       //where data=0 then still, where data>0 then wave
 
18       data = (short)(1024-data);
 
19
 
20          //offsets
 
21        a=((x-hwidth)*data/1024)+hwidth;
 
22          b=((y-hheight)*data/1024)+hheight;
 
23
 
24       //bounds check
 
25          if (a>=width) a=width-1;
 
26          if (a<0) a=0;
 
27          if (b>=height) b=height-1;
 
28          if (b<0) b=0;
 
29
 
30          ripple[i]=texture[a+(b*width)];
 
31          mapind++;
 
32       i++;
 
33        }
 
34      }
 
35    }
 

Revision as of 16:02, 1 March 2015

Hypno001.gif












Builders

Megalopolis Section Builder Built ?
Central Structure TBA TBA
Ramp TBA TBA
Ramp TBA TBA
Ramp TBA TBA
Ramp TBA TBA
Wall TBA TBA
Wall TBA TBA
Wall TBA TBA
Wall TBA TBA
Wall TBA TBA
Wall TBA TBA
Wall TBA TBA
Wall TBA TBA
Tower TBA TBA
Tower TBA TBA
Tower TBA TBA
Tower TBA TBA
Bridge TBA TBA
Bridge TBA TBA
Bridge TBA TBA
Bridge TBA TBA
Gate TBA TBA
Gate TBA TBA
Gate TBA TBA
Gate TBA TBA
Side TBA TBA
Side TBA TBA
Side TBA TBA
Side TBA TBA
Side TBA TBA
Side TBA TBA
Side TBA TBA
Side TBA TBA
Edge TBA TBA
Edge TBA TBA
Edge TBA TBA
Edge TBA TBA
Edge TBA TBA
Edge TBA TBA
Edge TBA TBA
Edge TBA TBA
Tower TBA TBA
Tower TBA TBA
Tower TBA TBA
Tower TBA TBA
Tower TBA TBA
Tower TBA TBA
Tower TBA TBA
Tower TBA TBA


And

public void newframe() {

 //Toggle maps each frame
 i=oldind;
 oldind=newind;
 newind=i;
 i=0;
 mapind=oldind;
 for (int y=0;y<height;y++) {
   for (int x=0;x<width;x++) {
  short data = (short)((ripplemap[mapind-width]+ripplemap[mapind+width]+

ripplemap[mapind-1]+ripplemap[mapind+1])>>1);

     data -= ripplemap[newind+i];
     data -= data >> 5;
     ripplemap[newind+i]=data;
  //where data=0 then still, where data>0 then wave
  data = (short)(1024-data);
     //offsets
     a=((x-hwidth)*data/1024)+hwidth;
     b=((y-hheight)*data/1024)+hheight;
     //bounds check
     if (a>=width) a=width-1;
     if (a<0) a=0;
     if (b>=height) b=height-1;
     if (b<0) b=0;
     ripple[i]=texture[a+(b*width)];
     mapind++;
  i++;
   }
 }

}