Skip to content

Commit

Permalink
just a few optimize in Put16x16.
Browse files Browse the repository at this point in the history
  • Loading branch information
bcc2528 authored Jan 12, 2025
1 parent 57ce1ef commit 6f334e0
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/towns/outside_world/outside_world.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,11 +339,8 @@ void Outside_World::WindowInterface::Put16x16(int x0,int y0,const unsigned char
auto srcPtr=icon16x16;
for(auto y=0; y<16; ++y)
{
for(auto x=0; x<16*4; ++x)
{
dstPtr[x]=*srcPtr;
++srcPtr;
}
std::memcpy(dstPtr,srcPtr,16*4);
srcPtr+=16*4;
dstPtr+=STATUS_WID*4;
}
}
Expand All @@ -353,11 +350,8 @@ void Outside_World::WindowInterface::Put16x16Invert(int x0,int y0,const unsigned
auto srcPtr=icon16x16;
for(auto y=0; y<16; ++y)
{
for(auto x=0; x<16*4; ++x)
{
dstPtr[x]=*srcPtr;
++srcPtr;
}
std::memcpy(dstPtr,srcPtr,16*4);
srcPtr+=16*4;
dstPtr-=STATUS_WID*4;
}
}
Expand Down

0 comments on commit 6f334e0

Please sign in to comment.