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
< User:OneBanana | Gallery
Jump to navigationJump to search (→And) |
|||
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; | ||
− | + | //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++; | |
− | + | } | |
− | + | } | |
− | + | } | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 16:02, 1 March 2015
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++; } }
}