1646 adjust = &group->g.determ.adjusts[group->g.determ.num_adjusts - 1]; |
1646 adjust = &group->g.determ.adjusts[group->g.determ.num_adjusts - 1]; |
1647 |
1647 |
1648 /* The first var adjust doesn't have an operation specified, so we set it to add. */ |
1648 /* The first var adjust doesn't have an operation specified, so we set it to add. */ |
1649 adjust->operation = group->g.determ.num_adjusts == 1 ? DSGA_OP_ADD : (DeterministicSpriteGroupAdjustOperation)grf_load_byte(&buf); |
1649 adjust->operation = group->g.determ.num_adjusts == 1 ? DSGA_OP_ADD : (DeterministicSpriteGroupAdjustOperation)grf_load_byte(&buf); |
1650 adjust->variable = grf_load_byte(&buf); |
1650 adjust->variable = grf_load_byte(&buf); |
1651 adjust->parameter = IS_BYTE_INSIDE(adjust->variable, 0x60, 0x80) ? grf_load_byte(&buf) : 0; |
1651 if (adjust->variable == 0x7E) { |
|
1652 /* Link subroutine group */ |
|
1653 adjust->subroutine = GetGroupFromGroupID(setid, type, grf_load_byte(&buf)); |
|
1654 } else { |
|
1655 adjust->parameter = IS_BYTE_INSIDE(adjust->variable, 0x60, 0x80) ? grf_load_byte(&buf) : 0; |
|
1656 } |
1652 |
1657 |
1653 varadjust = grf_load_byte(&buf); |
1658 varadjust = grf_load_byte(&buf); |
1654 adjust->shift_num = GB(varadjust, 0, 5); |
1659 adjust->shift_num = GB(varadjust, 0, 5); |
1655 adjust->type = (DeterministicSpriteGroupAdjustType)GB(varadjust, 6, 2); |
1660 adjust->type = (DeterministicSpriteGroupAdjustType)GB(varadjust, 6, 2); |
1656 adjust->and_mask = grf_load_var(varsize, &buf); |
1661 adjust->and_mask = grf_load_var(varsize, &buf); |