multiple selections support in editmode
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6647 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -337,13 +337,18 @@ block *blockcopy(const block &s)
|
||||
return b;
|
||||
}
|
||||
|
||||
void blockpaste(const block &b)
|
||||
void blockpaste(const block &b, int bx, int by)
|
||||
{
|
||||
const sqr *q = (const sqr *)((&b)+1);
|
||||
for(int y = b.y; y<b.ys+b.y; y++) for(int x = b.x; x<b.xs+b.x; x++) *S(x,y) = *q++;
|
||||
for(int y = by; y<b.ys+by; y++) for(int x = bx; x<b.xs+bx; x++) *S(x,y) = *q++;
|
||||
remipmore(b);
|
||||
}
|
||||
|
||||
void blockpaste(const block &b)
|
||||
{
|
||||
blockpaste(b, b.x, b.y);
|
||||
}
|
||||
|
||||
void freeblock(block *&b)
|
||||
{
|
||||
if(b) { delete[] (uchar *)b; b = NULL; }
|
||||
|
||||
Reference in New Issue
Block a user