Skip to content

Commit 6bbab45

Browse files
committed
fblibrary: Minor renames in draw_gpoly() sub-functs
1 parent 9a21ed4 commit 6bbab45

File tree

1 file changed

+24
-22
lines changed

1 file changed

+24
-22
lines changed

bflibrary/src/general/poly_gp.c

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ static TbPixel gpoly_pixel_noshade(struct gpoly_blends *p_bld, const struct gpol
439439
return ret_l;
440440
}
441441

442-
static void gpoly_stb_drw_incr2(struct gpoly_blends *p_bld, const struct gpoly_factors *p_inc)
442+
static void gpoly_stb_drw_incr4(struct gpoly_blends *p_bld, const struct gpoly_factors *p_inc)
443443
{
444444
int loc_2d;
445445
ubyte a3b_h, a3b_l;
@@ -465,7 +465,7 @@ static void gpoly_stb_drw_incr2(struct gpoly_blends *p_bld, const struct gpoly_f
465465
p_bld->B[1] = (a3b_h << 8) | a3b_l;
466466
}
467467

468-
static void gpoly_stb_drw_decr1a(struct gpoly_blends *p_bld, const struct gpoly_factors *p_inc)
468+
static void gpoly_stb_drw_decr4(struct gpoly_blends *p_bld, const struct gpoly_factors *p_inc)
469469
{
470470
int loc_2d;
471471
ubyte a3b_h, a3b_l;
@@ -491,7 +491,7 @@ static void gpoly_stb_drw_decr1a(struct gpoly_blends *p_bld, const struct gpoly_
491491
p_bld->B[1] = (a3b_h << 8) | a3b_l;
492492
}
493493

494-
static void gpoly_stb_drw_incr4(struct gpoly_blends *p_bld, const struct gpoly_factors *p_inc)
494+
static void gpoly_stb_drw_incr3(struct gpoly_blends *p_bld, const struct gpoly_factors *p_inc)
495495
{
496496
int loc_2d;
497497
ubyte a3b_h, a3b_l;
@@ -514,7 +514,7 @@ static void gpoly_stb_drw_incr4(struct gpoly_blends *p_bld, const struct gpoly_f
514514
p_bld->B[1] = (a3b_h << 8) | a3b_l;
515515
}
516516

517-
static void gpoly_stb_drw_decr4(struct gpoly_blends *p_bld, const struct gpoly_factors *p_inc)
517+
static void gpoly_stb_drw_decr3(struct gpoly_blends *p_bld, const struct gpoly_factors *p_inc)
518518
{
519519
int loc_2d;
520520
ubyte a3b_h, a3b_l;
@@ -655,6 +655,7 @@ void gpoly_sta_md03(struct gpoly_state *st)
655655

656656
st->var_098 = loc_incB_U << 16;
657657
st->var_094 = loc_incB_U >> 16;
658+
658659
fctr_e = loc_incB_V >> 16;
659660
fctr_f = ((loc_incB_V << 16) & 0xFFFFFF00) | (st->var_094 & 0xFF);
660661
if ((fctr_f & 0x80) != 0) {
@@ -1035,6 +1036,7 @@ void gpoly_sta_md27(struct gpoly_state *st)
10351036

10361037
st->var_098 = loc_incB_U << 16;
10371038
st->var_094 = loc_incB_U >> 16;
1039+
10381040
fctr_e = loc_incB_V >> 16;
10391041
fctr_f = ((loc_incB_V << 16) & 0xFFFFFF00) | (st->var_094 & 0xFF);
10401042
if ((fctr_f & 0x80) != 0) {
@@ -1287,7 +1289,7 @@ void gpoly_rasterize_shaded_bound(struct gpoly_state *st)
12871289
{
12881290
for (;curr_Y < 0; curr_Y++)
12891291
{
1290-
gpoly_stb_drw_incr2(&bld, &st->incA);
1292+
gpoly_stb_drw_incr4(&bld, &st->incA);
12911293
loc_0FC = range_beg;
12921294
curr_X -= range_beg >> 16;
12931295
range_end += loc_128;
@@ -1312,19 +1314,19 @@ void gpoly_rasterize_shaded_bound(struct gpoly_state *st)
13121314
if (range_beg_scr < 0)
13131315
{
13141316
for (; curr_X > 0; curr_X--) {
1315-
gpoly_stb_drw_decr1a(&bld, &st->incB);
1317+
gpoly_stb_drw_decr4(&bld, &st->incB);
13161318
}
13171319
for (; curr_X < 0; curr_X++) {
1318-
gpoly_stb_drw_incr2(&bld, &st->incB);
1320+
gpoly_stb_drw_incr4(&bld, &st->incB);
13191321
}
13201322
}
13211323
else
13221324
{
13231325
for (; curr_X < range_beg_scr; curr_X++) {
1324-
gpoly_stb_drw_incr2(&bld, &st->incB);
1326+
gpoly_stb_drw_incr4(&bld, &st->incB);
13251327
}
13261328
for (; curr_X > range_beg_scr; curr_X--) {
1327-
gpoly_stb_drw_decr1a(&bld, &st->incB);
1329+
gpoly_stb_drw_decr4(&bld, &st->incB);
13281330
}
13291331
}
13301332
bld_bkp = bld;
@@ -1365,7 +1367,7 @@ void gpoly_rasterize_shaded_bound(struct gpoly_state *st)
13651367
curr_X += (loc_0FC >> 16);
13661368
range_beg = loc_0FC;
13671369
bld = bld_bkp;
1368-
gpoly_stb_drw_incr2(&bld, &st->incA);
1370+
gpoly_stb_drw_incr4(&bld, &st->incA);
13691371
out_ln = &loc_0F4[ln_len];
13701372
}
13711373

@@ -1453,7 +1455,7 @@ void gpoly_rasterize_shaded_nobound(struct gpoly_state *st)
14531455
{
14541456
for (;curr_Y < 0; curr_Y++)
14551457
{
1456-
gpoly_stb_drw_incr2(&bld, &st->incA);
1458+
gpoly_stb_drw_incr4(&bld, &st->incA);
14571459
loc_0FC = range_beg;
14581460
curr_X -= loc_0FC >> 16;
14591461
range_end += loc_128;
@@ -1506,7 +1508,7 @@ void gpoly_rasterize_shaded_nobound(struct gpoly_state *st)
15061508
range_beg = loc_12C + loc_0FC;
15071509
range_end = loc_128 + loc_0F8;
15081510
bld = bld_bkp;
1509-
gpoly_stb_drw_incr2(&bld, &st->incA);
1511+
gpoly_stb_drw_incr4(&bld, &st->incA);
15101512
out_ln = &loc_0F4[ln_len];
15111513
}
15121514

@@ -1597,7 +1599,7 @@ void gpoly_rasterize_noshade_bound(struct gpoly_state *st)
15971599
{
15981600
for (; curr_Y < 0; curr_Y++)
15991601
{
1600-
gpoly_stb_drw_incr4(&bld, &st->incA);
1602+
gpoly_stb_drw_incr3(&bld, &st->incA);
16011603
range_beg += loc_12C;
16021604
range_end += loc_128;
16031605
out_ln += ln_len;
@@ -1614,19 +1616,19 @@ void gpoly_rasterize_noshade_bound(struct gpoly_state *st)
16141616
if (range_beg_scr < 0)
16151617
{
16161618
for (; curr_X > 0; curr_X--) {
1617-
gpoly_stb_drw_decr4(&bld, &st->incB);
1619+
gpoly_stb_drw_decr3(&bld, &st->incB);
16181620
}
16191621
for (; curr_X < 0; curr_X++) {
1620-
gpoly_stb_drw_incr4(&bld, &st->incB);
1622+
gpoly_stb_drw_incr3(&bld, &st->incB);
16211623
}
16221624
}
16231625
else
16241626
{
16251627
for (; curr_X < range_beg_scr; curr_X++) {
1626-
gpoly_stb_drw_incr4(&bld, &st->incB);
1628+
gpoly_stb_drw_incr3(&bld, &st->incB);
16271629
}
16281630
for (; curr_X > range_beg_scr; curr_X--) {
1629-
gpoly_stb_drw_decr4(&bld, &st->incB);
1631+
gpoly_stb_drw_decr3(&bld, &st->incB);
16301632
}
16311633
}
16321634
bld_bkp = bld;
@@ -1662,7 +1664,7 @@ void gpoly_rasterize_noshade_bound(struct gpoly_state *st)
16621664
range_beg = loc_12C + loc_0FC;
16631665
range_end = loc_128 + loc_0F8;
16641666
bld = bld_bkp;
1665-
gpoly_stb_drw_incr4(&bld, &st->incA);
1667+
gpoly_stb_drw_incr3(&bld, &st->incA);
16661668
out_ln = &loc_0F4[ln_len];
16671669
}
16681670

@@ -1752,7 +1754,7 @@ void gpoly_rasterize_noshade_nobound(struct gpoly_state *st)
17521754
{
17531755
for (; curr_Y < 0; curr_Y++)
17541756
{
1755-
gpoly_stb_drw_incr4(&bld, &st->incA);
1757+
gpoly_stb_drw_incr3(&bld, &st->incA);
17561758
range_beg += loc_12C;
17571759
range_end += loc_128;
17581760
out_ln += ln_len;
@@ -1769,13 +1771,13 @@ void gpoly_rasterize_noshade_nobound(struct gpoly_state *st)
17691771
if (range_beg_scr > curr_X)
17701772
{
17711773
for (; curr_X < range_beg_scr; curr_X++) {
1772-
gpoly_stb_drw_incr4(&bld, &st->incB);
1774+
gpoly_stb_drw_incr3(&bld, &st->incB);
17731775
}
17741776
}
17751777
else
17761778
{
17771779
for (; curr_X > range_beg_scr; curr_X--) {
1778-
gpoly_stb_drw_decr4(&bld, &st->incB);
1780+
gpoly_stb_drw_decr3(&bld, &st->incB);
17791781
}
17801782
}
17811783
bld_bkp = bld;
@@ -1809,7 +1811,7 @@ void gpoly_rasterize_noshade_nobound(struct gpoly_state *st)
18091811
range_beg = loc_12C + loc_0FC;
18101812
range_end = loc_128 + loc_0F8;
18111813
bld = bld_bkp;
1812-
gpoly_stb_drw_incr4(&bld, &st->incA);
1814+
gpoly_stb_drw_incr3(&bld, &st->incA);
18131815
out_ln = &loc_0F4[ln_len];
18141816
}
18151817

0 commit comments

Comments
 (0)