Skip to content

Commit

Permalink
探索済みを保持しておくことで高速化
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Ojii committed Mar 8, 2024
1 parent cdffdf8 commit 416a7ed
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions dll_src/Bevel_And_Emboss_M.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,14 +237,15 @@ int bevel_and_emboss(lua_State *L) {

//rikky_module.bordering
std::vector< std::vector<Point> > p;
int border_i = 0;
while(1)
{
std::vector<Point> pb;
Point tmp_point = {-1, -1};
for(int i = 0; i < w * h; i++) {
if(border_ans[i]) {
tmp_point.x = i % w;
tmp_point.y = i / w;
for(; border_i < w * h; border_i++) {
if(border_ans[border_i]) {
tmp_point.x = border_i % w;
tmp_point.y = border_i / w;
break;
}
}
Expand Down

0 comments on commit 416a7ed

Please sign in to comment.