shadowrecon Posted February 11, 2012 Share Posted February 11, 2012 So i was going through some fo srl functions and found they have a pretty bad ass walking include, i managed to find the library that goes with it, and im trying to port it over but im having a heck of a time. this is what im trying to fix atm heres the lines its calling function SPS_ColorBoxesMatchInline(var B1, B2: TIntegerArray; tol: extended): boolean; b:= SPS_ColorBoxesMatchInline(LargeMap[cm][x+xx][y+yy], SmallMap[xx][yy], tol); its something to do with the Tint arrays and how they have it set up i tried b:= SPS_ColorBoxesMatchInline(LargeMap[cm,x+xx,y+yy], SmallMap[xx,yy], tol); But that doesnt work, and by the way LargeMap is a T2dIntArray ---------- Post added at 11:15 AM ---------- Previous post was at 10:13 AM ---------- i have figured this problem out and just set up some types to fix the issue. Quote Link to comment Share on other sites More sharing options...
FHannes Posted February 11, 2012 Share Posted February 11, 2012 Hmm, it's not going to be that easy nto port SPS to SCAR, because the library it uses is absed on parts of the Simba source, so I doubt that will be compatible with SCAR, you'd have to replace the classes if uses from the Mufasa library (I think that's what it's called) with standard Delphi classes. Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted February 11, 2012 Author Share Posted February 11, 2012 yeah im figuring that out, ive got the lib and include to compile, but its not working.. err.. its a bad ass walking setup. ive played around with it on simba and really like how precise it is, but i think it may be more hassle than its worth. Quote Link to comment Share on other sites More sharing options...
FHannes Posted February 11, 2012 Share Posted February 11, 2012 I'll consider writing a port myself in the near future. Up until then, feel free to keep trying Quote Link to comment Share on other sites More sharing options...
rsutton Posted February 11, 2012 Share Posted February 11, 2012 Simba has an open source resource shadow. Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted February 12, 2012 Author Share Posted February 12, 2012 Simba has an open source resource shadow. Library's are not open source... once they are compiled they virtually impossible to take back apart.... i managed to locate a non complied version of the lib tho... (there not like includes, you can just open them with scar) Quote Link to comment Share on other sites More sharing options...
FHannes Posted February 12, 2012 Share Posted February 12, 2012 Library's are not open source... once they are compiled they virtually impossible to take back apart.... i managed to locate a non complied version of the lib tho... (there not like includes, you can just open them with scar) https://github.com/Coh3n/SPS/blob/master/plugin/source/sps.lpr Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted February 12, 2012 Share Posted February 12, 2012 This was buried somewhere on Wanted's list of "to-dos": port over contents of that dll. Don't think it's a seriously high priority though. Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted February 12, 2012 Author Share Posted February 12, 2012 https://github.com/Coh3n/SPS/blob/master/plugin/source/sps.lpr]Well you guys are correct, and i am wrong, but once they are compiled they are difficult to disassemble. didnt know all of the source was in the open.. err. lol ---------- Post added at 08:15 AM ---------- Previous post was at 04:13 AM ---------- Im havign trouble figuring out what the heck is bmp.FData[.....] function SPS_MakeColorBoxEx(bmp: TMufasaBitmap; x1, y1: integer): TIntegerArray; var x, y, width: integer; C: TRGB32; begin SetLength(Result, 3); width := bmp.Width; // may not be necessary, but should help a bit. for x := (x1 + 4) downto x1 do // flipped these to downto since order is irrelevant for y := (y1 + 4) downto y1 do // downto will calc the initial only once rather than each time. begin try C := bmp.FData[y * width + x]; Result[0] := Result[0] + C.R; Result[1] := Result[1] + C.G; Result[2] := Result[2] + C.B; except end; end; end; Quote Link to comment Share on other sites More sharing options...
FHannes Posted February 12, 2012 Share Posted February 12, 2012 once they are compiled they are difficult to disassemble. That's the general idea... Quote Link to comment Share on other sites More sharing options...
Wanted Posted February 12, 2012 Share Posted February 12, 2012 You're better off learning DTM walking than relying on SPS. I'm not going to port SPS to SCAR, instead someday I'll probably write something completely different that serves a similar purpose. Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted February 12, 2012 Author Share Posted February 12, 2012 You're better off learning DTM walking than relying on SPS. I'm not going to port SPS to SCAR, instead someday I'll probably write something completely different that serves a similar purpose. DTM walking? RSutton said something about that, but i forgot what it was. whats the concept ? Quote Link to comment Share on other sites More sharing options...