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:
Lucas GAUTHERON
2011-09-14 14:59:40 +00:00
parent 5eb99a8bd4
commit 8f90268d82
7 changed files with 236 additions and 129 deletions
+7 -2
View File
@@ -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; }