Browse Source

Remove duplicate code in DRLG_MRectTrans

pull/4529/head
Anders Jenbo 4 years ago
parent
commit
408c665a3c
  1. 22
      Source/gendung.cpp

22
Source/gendung.cpp

@ -476,30 +476,24 @@ void DRLG_InitTrans()
TransVal = 1;
}
void DRLG_MRectTrans(int x1, int y1, int x2, int y2)
void DRLG_RectTrans(int x1, int y1, int x2, int y2)
{
x1 = 2 * x1 + 17;
y1 = 2 * y1 + 17;
x2 = 2 * x2 + 16;
y2 = 2 * y2 + 16;
for (int j = y1; j <= y2; j++) {
for (int i = x1; i <= x2; i++) {
dTransVal[i][j] = TransVal;
}
}
TransVal++;
}
void DRLG_RectTrans(int x1, int y1, int x2, int y2)
void DRLG_MRectTrans(int x1, int y1, int x2, int y2)
{
for (int j = y1; j <= y2; j++) {
for (int i = x1; i <= x2; i++) {
dTransVal[i][j] = TransVal;
}
}
TransVal++;
x1 = 2 * x1 + 17;
y1 = 2 * y1 + 17;
x2 = 2 * x2 + 16;
y2 = 2 * y2 + 16;
DRLG_RectTrans(x1, y1, x2, y2);
}
void DRLG_CopyTrans(int sx, int sy, int dx, int dy)

Loading…
Cancel
Save