Ejjman
2010-04-15 22:00:13
Also: See post #9, and #12
No idea if I'm doing this right, and you can change anything.
First of all, in DDTM.scar, there's two things I can switch up.
1: Have each item have one color in Globals.scar. Only one color.
2: Use the first color from MSI_Item[Item].Colors[0].
I show how you can replace it below. So it's up to RM's discression.
Ddtm.scar
I'm not sure why you have an array of colors for some items. If you want to, I guess, keep that, then go with method 2.
Globals.scar. If you use the array of colors, then delete the first set of const.
Setup.scar
And ItemInfo.scar, change this for each log(for now) accordingly.
Tested and works.
The tolerance is not specific, and might need touching, but for now, its working.
No idea if I'm doing this right, and you can change anything.
First of all, in DDTM.scar, there's two things I can switch up.
1: Have each item have one color in Globals.scar. Only one color.
2: Use the first color from MSI_Item[Item].Colors[0].
I show how you can replace it below. So it's up to RM's discression.
Ddtm.scar
function MSI_LoadDTM(Which : integer) : integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..4] of TDTMPointDef;
TempTDTM: TDTM;
TheColor : integer;
begin
case PlayerSkills[CurrentPlayer][CurrentSkill] of
SKILL_WOODCUTTING :
begin
case Which of //This whole thing can be deleted, if....
LOGS_NORMAL: TheColor := COLOR_LOG_NORMAL;
LOGS_OAK: TheColor := COLOR_LOG_OAK;
LOGS_WILLOW: TheColor := COLOR_LOG_WILLOW;
LOGS_MAPLE: TheColor := COLOR_LOG_MAPLE;
LOGS_YEW: TheColor := COLOR_LOG_YEW;
end;
dtmMainPoint.x := 1155;
dtmMainPoint.y := 290;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := TheColor; //..place MSI_Item[Which].Colors[0]; instead of TheColor;
dtmMainPoint.Tolerance := LOG_TOLERANCE;
dtmSubPoints[0].x := 1155;
dtmSubPoints[0].y := 290;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := TheColor; //..place MSI_Item[Which].Colors[0]; instead of TheColor;
dtmSubPoints[0].Tolerance := LOG_TOLERANCE;
dtmSubPoints[1].x := 1164;
dtmSubPoints[1].y := 281;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 131072;
dtmSubPoints[1].Tolerance := 0;
dtmSubPoints[2].x := 1164;
dtmSubPoints[2].y := 290;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 131072;
dtmSubPoints[2].Tolerance := 0;
dtmSubPoints[3].x := 1147;
dtmSubPoints[3].y := 294;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 131072;
dtmSubPoints[3].Tolerance := 0;
dtmSubPoints[4].x := 1143;
dtmSubPoints[4].y := 280;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 131072;
dtmSubPoints[4].Tolerance := 0;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
//SKILL_MINING:
//New DDTM here
end;
end;I'm not sure why you have an array of colors for some items. If you want to, I guess, keep that, then go with method 2.
Globals.scar. If you use the array of colors, then delete the first set of const.
const
COLOR_LOG_NORMAL = 2770782;
COLOR_LOG_OAK = 3760770;
COLOR_LOG_WILLOW = 1325891;
COLOR_LOG_MAPLE = 867162;
COLOR_LOG_YEW = 669258;
const
LOG_TOLERANCE = 7;
Setup.scar
{.include srl/srl/msi/ddtm.scar}
And ItemInfo.scar, change this for each log(for now) accordingly.
DTM := MSI_LoadDTM(LOGS_XXXX);Tested and works.
The tolerance is not specific, and might need touching, but for now, its working.