Revision 0b050556
Added by Leszek Koltunski almost 2 years ago
src/main/java/org/distorted/objectlib/main/TwistyObject.java | ||
---|---|---|
1536 | 1536 |
|
1537 | 1537 |
mMesh.setTextureMap(maps,mNumCubitFaces*cubit); |
1538 | 1538 |
} |
1539 |
|
|
1540 |
for(int i=0; i<mNumOverrides; i++) |
|
1541 |
{ |
|
1542 |
int[] cubitFaces = mStickerOverrides[i].getCubitFaces(); |
|
1543 |
int length = cubitFaces.length/2; |
|
1544 |
|
|
1545 |
for(int j=0; j<length; j++) |
|
1546 |
overrideCubitFaceColor(i,cubitFaces[2*j],cubitFaces[2*j+1], ratioW, ratioH); |
|
1547 |
} |
|
1548 |
} |
|
1549 |
|
|
1550 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
1551 |
|
|
1552 |
private void overrideCubitFaceColor(int override, int cubit, int face, float ratioW, float ratioH) |
|
1553 |
{ |
|
1554 |
final Static4D[] maps = new Static4D[1]; |
|
1555 |
int color = mNumTextures-mNumOverrides+1+override; |
|
1556 |
int row = (mNumTexRows-1) - color/mNumTexCols; |
|
1557 |
int col = color%mNumTexCols; |
|
1558 |
maps[0] = new Static4D(col*ratioW, row*ratioH, ratioW, ratioH); |
|
1559 |
mMesh.setTextureMap(maps,mNumCubitFaces*cubit+face); |
|
1539 | 1560 |
} |
1540 | 1561 |
|
1541 | 1562 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Sticker overrides finished. Add crazy planets JSONs and icons.