Olly
03-04-2013, 04:51 PM
OCR has a mind of its own, seems to work perfectly today, add this into text.simba(?) and call setupOSRFilter in and load2007Fonts in setupSRL and getUptext should work, if you find any bugs please post.
Font is included in the attachments, rename to "07UpChars" and create a folder in Fonts named as 2007Fonts and place in there. you need the newest 993 simba build for this.
const
fontPath_07 = fontPath + '2007Fonts\';
const
ocr_Limit_High = 190;
ocr_Limit_Med = 130;
ocr_Limit_Low = 65;
ocr_White = 16777215;
ocr_Yellow = 65535;
ocr_Blue = 16776960;
ocr_Purple = 8388736;
const
OF_LN = 256;
OF_HN = -1;
function TOCRStruct(r_low,r_high,g_low,g_high,b_low,b_high, set_col: integer; is_text_color: boolean): tocrfilterdata;
begin
result.r_low := r_low;
result.r_high := r_high;
result.g_low := g_low;
result.g_high := g_high;
result.b_low := b_low;
result.b_high := b_high;
result.set_col := set_col;
result._type := 0;
result.is_text_color:= is_text_color;
end;
//to-do: add level filters, filter any futher bugs
procedure setupOSRFilter;
var
filterdata: TOCRFilterDataArray;
begin
setlength(filterdata, 3);
filterdata[0] := TOCRStruct(65, OF_HN, OF_LN, 190, OF_LN, 190, ocr_Blue, True); // blue
filterdata[1] := TOCRStruct(OF_LN, 190, OF_LN, 190, 65, OF_HN, ocr_Yellow, True); // yellow
filterdata[2] := TOCRStruct(65, OF_HN, 65, OF_HN, 65, OF_HN, ocr_Purple, False); // shadow
rs_ResetUpTextFilter;
rs_SetUpTextFilter(filterdata);
end;
procedure load2007Fonts;
var
fontNames: tstringarray;
i: integer;
begin
fontNames := ['07UpChars'];
for i := 0 to high(fontNames) do
if loadFont(fontPath_07 + fontNames[i], true) then
loadFont(fontPath_07 + fontNames[i], false);
end;
Replace the old getUpText with this (in text.simba)
function getUpText: string;
begin
result := rs_GetUpTextAtEx(5, 5, true, '07UpChars');
end;
Attack Man / 4 more options
Attack Man / 4 more options
Attack Man / 4 more options
Walk here
Walk here / 1 more options
Walk here / 1 more options
Climb-down Trapdoor / 2 more options
Walk here
Talk-to Gee / 2 more options
Talk-to Gee / 2 more options
Walk here
Talk-to Cook / 2 more options
Talk-to Cook / 2 more options
Font is included in the attachments, rename to "07UpChars" and create a folder in Fonts named as 2007Fonts and place in there. you need the newest 993 simba build for this.
const
fontPath_07 = fontPath + '2007Fonts\';
const
ocr_Limit_High = 190;
ocr_Limit_Med = 130;
ocr_Limit_Low = 65;
ocr_White = 16777215;
ocr_Yellow = 65535;
ocr_Blue = 16776960;
ocr_Purple = 8388736;
const
OF_LN = 256;
OF_HN = -1;
function TOCRStruct(r_low,r_high,g_low,g_high,b_low,b_high, set_col: integer; is_text_color: boolean): tocrfilterdata;
begin
result.r_low := r_low;
result.r_high := r_high;
result.g_low := g_low;
result.g_high := g_high;
result.b_low := b_low;
result.b_high := b_high;
result.set_col := set_col;
result._type := 0;
result.is_text_color:= is_text_color;
end;
//to-do: add level filters, filter any futher bugs
procedure setupOSRFilter;
var
filterdata: TOCRFilterDataArray;
begin
setlength(filterdata, 3);
filterdata[0] := TOCRStruct(65, OF_HN, OF_LN, 190, OF_LN, 190, ocr_Blue, True); // blue
filterdata[1] := TOCRStruct(OF_LN, 190, OF_LN, 190, 65, OF_HN, ocr_Yellow, True); // yellow
filterdata[2] := TOCRStruct(65, OF_HN, 65, OF_HN, 65, OF_HN, ocr_Purple, False); // shadow
rs_ResetUpTextFilter;
rs_SetUpTextFilter(filterdata);
end;
procedure load2007Fonts;
var
fontNames: tstringarray;
i: integer;
begin
fontNames := ['07UpChars'];
for i := 0 to high(fontNames) do
if loadFont(fontPath_07 + fontNames[i], true) then
loadFont(fontPath_07 + fontNames[i], false);
end;
Replace the old getUpText with this (in text.simba)
function getUpText: string;
begin
result := rs_GetUpTextAtEx(5, 5, true, '07UpChars');
end;
Attack Man / 4 more options
Attack Man / 4 more options
Attack Man / 4 more options
Walk here
Walk here / 1 more options
Walk here / 1 more options
Climb-down Trapdoor / 2 more options
Walk here
Talk-to Gee / 2 more options
Talk-to Gee / 2 more options
Walk here
Talk-to Cook / 2 more options
Talk-to Cook / 2 more options