Page 6 of 7 FirstFirst ... 4567 LastLast
Results 126 to 150 of 162

Thread: Scar++

  1. #126
    Join Date
    Jun 2007
    Location
    La Mirada, CA
    Posts
    2,484
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    Still working on this Boberman?

    We are just getting into structures. I don't really know if anything c++ specific I that I have learned that will benefit this yet but I still have yet to look at the code.

    Loops and statements are pretty universal so nothing new was learned there. The only libraries that we have really interacted with so far are:

    iostream
    fstream
    string
    cctype
    math (very little)
    vector

    I believe that is it. Hopefully I will be able to help soon enough though.
    Last edited by HyperSecret; 04-03-2009 at 07:25 PM.

    "Failure is the opportunity to begin again more intelligently" (Henry Ford)


  2. #127
    Join Date
    Dec 2007
    Location
    Somewhere in Idaho
    Posts
    480
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yes, work is still happening on scar++, right now at a slow pace. I have University studies that take precedence over scar++ development (unfortunately). However, What I am learning in school now will ultimately lead to some pretty good stuff for scar++ If I do say so myself

  3. #128
    Join Date
    Feb 2007
    Posts
    143
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by boberman View Post
    Yes, work is still happening on scar++, right now at a slow pace. I have University studies that take precedence over scar++ development (unfortunately). However, What I am learning in school now will ultimately lead to some pretty good stuff for scar++ If I do say so myself
    Very good work with your project!!! i just wanted to bring some things to your attention.

    1) i rewrote all the WINDOWS handles to WIN32 because it wouldnt compile in vista or xp with those handles.

    2) the find color tolerace functions return the value relative to the window specified and not relative to the active window, this can be solved by adding xs to x and ys to y, to get the actual position not the relative.

    didnt really try to call much else

    very good work!!!

  4. #129
    Join Date
    Aug 2007
    Location
    England
    Posts
    136
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    this looks awsome, but how do i use it :P

    im using visual studio, cant get it to work at all

    i've put all the hearder files in
    C:\Program Files\Microsoft C#\VC\include

    and the libScar++.a in
    C:\Program Files\Microsoft C#\VC\lib

    and the Scar++.dll in the project file...

    i still get 122 errors...

    1>------ Build started: Project: Scar++ Testing, Configuration: Debug Win32 ------
    1>Compiling...
    1>main.cpp
    1>c:\program files\microsoft c#\vc\include\mouse.h(9) : error C2065: 'stdcall' : undeclared identifier
    1>c:\program files\microsoft c#\vc\include\mouse.h(9) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\program files\microsoft c#\vc\include\mouse.h(9) : error C2491: '__attribute__' : definition of dllimport data not allowed
    1>c:\program files\microsoft c#\vc\include\mouse.h(9) : error C2199: syntax error : found 'void (' at global scope (was a declaration intended?)
    1>c:\program files\microsoft c#\vc\include\mouse.h(10) : error C2065: 'stdcall' : undeclared identifier
    1>c:\program files\microsoft c#\vc\include\mouse.h(10) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\program files\microsoft c#\vc\include\mouse.h(10) : error C2374: '__attribute__' : redefinition; multiple initialization
    1> c:\program files\microsoft c#\vc\include\mouse.h(9) : see declaration of '__attribute__'
    1>c:\program files\microsoft c#\vc\include\mouse.h(10) : error C2491: '__attribute__' : definition of dllimport data not allowed
    1>c:\program files\microsoft c#\vc\include\mouse.h(10) : error C2199: syntax error : found 'void (' at global scope (was a declaration intended?)
    1>c:\program files\microsoft c#\vc\include\mouse.h(11) : error C2065: 'stdcall' : undeclared identifier
    1>c:\program files\microsoft c#\vc\include\mouse.h(11) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\program files\microsoft c#\vc\include\mouse.h(11) : error C2374: '__attribute__' : redefinition; multiple initialization
    1> c:\program files\microsoft c#\vc\include\mouse.h(9) : see declaration of '__attribute__'
    1>c:\program files\microsoft c#\vc\include\mouse.h(11) : error C2491: '__attribute__' : definition of dllimport data not allowed
    1>c:\program files\microsoft c#\vc\include\mouse.h(11) : error C2199: syntax error : found 'void (' at global scope (was a declaration intended?)
    1>c:\program files\microsoft c#\vc\include\mouse.h(12) : error C2065: 'stdcall' : undeclared identifier
    1>c:\program files\microsoft c#\vc\include\mouse.h(12) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\program files\microsoft c#\vc\include\mouse.h(12) : error C2374: '__attribute__' : redefinition; multiple initialization
    1> c:\program files\microsoft c#\vc\include\mouse.h(9) : see declaration of '__attribute__'
    1>c:\program files\microsoft c#\vc\include\mouse.h(12) : error C2491: '__attribute__' : definition of dllimport data not allowed
    1>c:\program files\microsoft c#\vc\include\mouse.h(12) : error C2199: syntax error : found 'void (' at global scope (was a declaration intended?)
    1>c:\program files\microsoft c#\vc\include\mouse.h(13) : error C2065: 'stdcall' : undeclared identifier
    1>c:\program files\microsoft c#\vc\include\mouse.h(13) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\program files\microsoft c#\vc\include\mouse.h(13) : error C2374: '__attribute__' : redefinition; multiple initialization
    1> c:\program files\microsoft c#\vc\include\mouse.h(9) : see declaration of '__attribute__'
    1>c:\program files\microsoft c#\vc\include\mouse.h(13) : error C2491: '__attribute__' : definition of dllimport data not allowed
    1>c:\program files\microsoft c#\vc\include\mouse.h(13) : error C2199: syntax error : found 'void (' at global scope (was a declaration intended?)
    1>c:\program files\microsoft c#\vc\include\mouse.h(14) : error C2065: 'stdcall' : undeclared identifier
    1>c:\program files\microsoft c#\vc\include\mouse.h(14) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\program files\microsoft c#\vc\include\mouse.h(14) : error C2374: '__attribute__' : redefinition; multiple initialization
    1> c:\program files\microsoft c#\vc\include\mouse.h(9) : see declaration of '__attribute__'
    1>c:\program files\microsoft c#\vc\include\mouse.h(14) : error C2491: '__attribute__' : definition of dllimport data not allowed
    1>c:\program files\microsoft c#\vc\include\mouse.h(14) : error C2199: syntax error : found 'void (' at global scope (was a declaration intended?)
    1>c:\program files\microsoft c#\vc\include\mouse.h(15) : error C2065: 'stdcall' : undeclared identifier
    1>c:\program files\microsoft c#\vc\include\mouse.h(15) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\program files\microsoft c#\vc\include\mouse.h(15) : error C2374: '__attribute__' : redefinition; multiple initialization
    1> c:\program files\microsoft c#\vc\include\mouse.h(9) : see declaration of '__attribute__'
    1>c:\program files\microsoft c#\vc\include\mouse.h(15) : error C2491: '__attribute__' : definition of dllimport data not allowed
    1>c:\program files\microsoft c#\vc\include\mouse.h(15) : error C2199: syntax error : found 'void (' at global scope (was a declaration intended?)
    1>c:\program files\microsoft c#\vc\include\mouse.h(16) : error C2065: 'stdcall' : undeclared identifier
    1>c:\program files\microsoft c#\vc\include\mouse.h(16) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\program files\microsoft c#\vc\include\mouse.h(16) : error C2374: '__attribute__' : redefinition; multiple initialization
    1> c:\program files\microsoft c#\vc\include\mouse.h(9) : see declaration of '__attribute__'
    1>c:\program files\microsoft c#\vc\include\mouse.h(16) : error C2491: '__attribute__' : definition of dllimport data not allowed
    1>c:\program files\microsoft c#\vc\include\mouse.h(16) : error C2199: syntax error : found 'void (' at global scope (was a declaration intended?)
    1>c:\program files\microsoft c#\vc\include\mouse.h(17) : error C2065: 'stdcall' : undeclared identifier
    1>c:\program files\microsoft c#\vc\include\mouse.h(17) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\program files\microsoft c#\vc\include\mouse.h(17) : error C2374: '__attribute__' : redefinition; multiple initialization
    1> c:\program files\microsoft c#\vc\include\mouse.h(9) : see declaration of '__attribute__'
    1>c:\program files\microsoft c#\vc\include\mouse.h(17) : error C2491: '__attribute__' : definition of dllimport data not allowed
    1>c:\program files\microsoft c#\vc\include\mouse.h(17) : error C2199: syntax error : found 'void (' at global scope (was a declaration intended?)
    1>c:\program files\microsoft c#\vc\include\mouse.h(18) : error C2065: 'stdcall' : undeclared identifier
    1>c:\program files\microsoft c#\vc\include\mouse.h(18) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\program files\microsoft c#\vc\include\mouse.h(18) : error C2374: '__attribute__' : redefinition; multiple initialization
    1> c:\program files\microsoft c#\vc\include\mouse.h(9) : see declaration of '__attribute__'
    1>c:\program files\microsoft c#\vc\include\mouse.h(18) : error C2491: '__attribute__' : definition of dllimport data not allowed
    1>c:\program files\microsoft c#\vc\include\mouse.h(18) : error C2199: syntax error : found 'void (' at global scope (was a declaration intended?)
    1>c:\program files\microsoft c#\vc\include\mouse.h(19) : error C2065: 'stdcall' : undeclared identifier
    1>c:\program files\microsoft c#\vc\include\mouse.h(19) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\program files\microsoft c#\vc\include\mouse.h(19) : error C2374: '__attribute__' : redefinition; multiple initialization
    1> c:\program files\microsoft c#\vc\include\mouse.h(9) : see declaration of '__attribute__'
    1>c:\program files\microsoft c#\vc\include\mouse.h(19) : error C2491: '__attribute__' : definition of dllimport data not allowed
    1>c:\program files\microsoft c#\vc\include\mouse.h(19) : error C2199: syntax error : found 'void (' at global scope (was a declaration intended?)
    1>c:\program files\microsoft c#\vc\include\mouse.h(20) : error C2065: 'stdcall' : undeclared identifier
    1>c:\program files\microsoft c#\vc\include\mouse.h(20) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\program files\microsoft c#\vc\include\mouse.h(20) : error C2374: '__attribute__' : redefinition; multiple initialization
    1> c:\program files\microsoft c#\vc\include\mouse.h(9) : see declaration of '__attribute__'
    1>c:\program files\microsoft c#\vc\include\mouse.h(20) : error C2491: '__attribute__' : definition of dllimport data not allowed
    1>c:\program files\microsoft c#\vc\include\mouse.h(20) : error C2199: syntax error : found 'void (' at global scope (was a declaration intended?)
    1>c:\program files\microsoft c#\vc\include\mouse.h(21) : error C2065: 'stdcall' : undeclared identifier
    1>c:\program files\microsoft c#\vc\include\mouse.h(21) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\program files\microsoft c#\vc\include\mouse.h(21) : error C2374: '__attribute__' : redefinition; multiple initialization
    1> c:\program files\microsoft c#\vc\include\mouse.h(9) : see declaration of '__attribute__'
    1>c:\program files\microsoft c#\vc\include\mouse.h(21) : error C2491: '__attribute__' : definition of dllimport data not allowed
    1>c:\program files\microsoft c#\vc\include\mouse.h(21) : error C2199: syntax error : found 'void (' at global scope (was a declaration intended?)
    1>c:\program files\microsoft c#\vc\include\mouse.h(22) : error C2065: 'stdcall' : undeclared identifier
    1>c:\program files\microsoft c#\vc\include\mouse.h(22) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\program files\microsoft c#\vc\include\mouse.h(22) : error C2374: '__attribute__' : redefinition; multiple initialization
    1> c:\program files\microsoft c#\vc\include\mouse.h(9) : see declaration of '__attribute__'
    1>c:\program files\microsoft c#\vc\include\mouse.h(22) : error C2491: '__attribute__' : definition of dllimport data not allowed
    1>c:\program files\microsoft c#\vc\include\mouse.h(22) : error C2199: syntax error : found 'void (' at global scope (was a declaration intended?)
    1>c:\program files\microsoft c#\vc\include\mouse.h(23) : error C2065: 'stdcall' : undeclared identifier
    1>c:\program files\microsoft c#\vc\include\mouse.h(23) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\program files\microsoft c#\vc\include\mouse.h(23) : error C2374: '__attribute__' : redefinition; multiple initialization
    1> c:\program files\microsoft c#\vc\include\mouse.h(9) : see declaration of '__attribute__'
    1>c:\program files\microsoft c#\vc\include\mouse.h(23) : error C2491: '__attribute__' : definition of dllimport data not allowed
    1>c:\program files\microsoft c#\vc\include\mouse.h(23) : error C2199: syntax error : found 'void (' at global scope (was a declaration intended?)
    1>c:\program files\microsoft c#\vc\include\mouse.h(24) : error C2065: 'stdcall' : undeclared identifier
    1>c:\program files\microsoft c#\vc\include\mouse.h(24) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\program files\microsoft c#\vc\include\mouse.h(24) : error C2374: '__attribute__' : redefinition; multiple initialization
    1> c:\program files\microsoft c#\vc\include\mouse.h(9) : see declaration of '__attribute__'
    1>c:\program files\microsoft c#\vc\include\mouse.h(24) : error C2491: '__attribute__' : definition of dllimport data not allowed
    1>c:\program files\microsoft c#\vc\include\mouse.h(24) : error C2199: syntax error : found 'void (' at global scope (was a declaration intended?)
    1>c:\program files\microsoft c#\vc\include\mouse.h(25) : error C2065: 'stdcall' : undeclared identifier
    1>c:\program files\microsoft c#\vc\include\mouse.h(25) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\program files\microsoft c#\vc\include\mouse.h(25) : error C2374: '__attribute__' : redefinition; multiple initialization
    1> c:\program files\microsoft c#\vc\include\mouse.h(9) : see declaration of '__attribute__'
    1>c:\program files\microsoft c#\vc\include\mouse.h(25) : error C2491: '__attribute__' : definition of dllimport data not allowed
    1>c:\program files\microsoft c#\vc\include\mouse.h(25) : error C2199: syntax error : found 'void (' at global scope (was a declaration intended?)
    1>c:\program files\microsoft c#\vc\include\mouse.h(26) : error C2065: 'stdcall' : undeclared identifier
    1>c:\program files\microsoft c#\vc\include\mouse.h(26) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\program files\microsoft c#\vc\include\mouse.h(26) : error C2374: '__attribute__' : redefinition; multiple initialization
    1> c:\program files\microsoft c#\vc\include\mouse.h(9) : see declaration of '__attribute__'
    1>c:\program files\microsoft c#\vc\include\mouse.h(26) : error C2491: '__attribute__' : definition of dllimport data not allowed
    1>c:\program files\microsoft c#\vc\include\mouse.h(26) : error C2199: syntax error : found 'void (' at global scope (was a declaration intended?)
    1>c:\program files\microsoft c#\vc\include\mouse.h(27) : error C2065: 'stdcall' : undeclared identifier
    1>c:\program files\microsoft c#\vc\include\mouse.h(27) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\program files\microsoft c#\vc\include\mouse.h(27) : error C2374: '__attribute__' : redefinition; multiple initialization
    1> c:\program files\microsoft c#\vc\include\mouse.h(9) : see declaration of '__attribute__'
    1>c:\program files\microsoft c#\vc\include\mouse.h(27) : error C2491: '__attribute__' : definition of dllimport data not allowed
    1>c:\program files\microsoft c#\vc\include\mouse.h(27) : error C2199: syntax error : found 'void (' at global scope (was a declaration intended?)
    1>c:\program files\microsoft c#\vc\include\mouse.h(28) : error C2065: 'stdcall' : undeclared identifier
    1>c:\program files\microsoft c#\vc\include\mouse.h(28) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    1>c:\program files\microsoft c#\vc\include\mouse.h(28) : error C2374: '__attribute__' : redefinition; multiple initialization
    1> c:\program files\microsoft c#\vc\include\mouse.h(9) : see declaration of '__attribute__'
    1>c:\program files\microsoft c#\vc\include\mouse.h(28) : error C2491: '__attribute__' : definition of dllimport data not allowed
    1>c:\program files\microsoft c#\vc\include\mouse.h(28) : error C2199: syntax error : found 'bool (' at global scope (was a declaration intended?)
    1>c:\program files\microsoft c#\vc\include\mouse.h(30) : error C2065: 'stdcall' : undeclared identifier
    1>c:\program files\microsoft c#\vc\include\mouse.h(30) : error C2448: '__attribute__' : function-style initializer appears to be a function definition
    1>c:\program files\microsoft c#\vc\include\mouse.h(31) : error C2065: 'stdcall' : undeclared identifier
    1>c:\program files\microsoft c#\vc\include\mouse.h(31) : error C2448: '__attribute__' : function-style initializer appears to be a function definition
    1>c:\program files\microsoft c#\vc\include\mouse.h(33) : error C2065: 'stdcall' : undeclared identifier
    1>c:\program files\microsoft c#\vc\include\mouse.h(33) : error C2448: '__attribute__' : function-style initializer appears to be a function definition
    1>c:\program files\microsoft c#\vc\include\mouse.h(34) : error C2065: 'stdcall' : undeclared identifier
    1>c:\program files\microsoft c#\vc\include\mouse.h(34) : error C2448: '__attribute__' : function-style initializer appears to be a function definition
    1>c:\program files\microsoft c#\vc\include\mouse.h(37) : error C2065: 'stdcall' : undeclared identifier
    1>c:\program files\microsoft c#\vc\include\mouse.h(37) : error C2448: '__attribute__' : function-style initializer appears to be a function definition
    1>c:\program files\microsoft c#\vc\include\mouse.h(38) : error C2065: 'stdcall' : undeclared identifier
    1>c:\program files\microsoft c#\vc\include\mouse.h(38) : error C2448: '__attribute__' : function-style initializer appears to be a function definition
    1>c:\program files\microsoft c#\vc\include\mouse.h(41) : error C2065: 'stdcall' : undeclared identifier
    1>c:\program files\microsoft c#\vc\include\mouse.h(41) : error C2448: '__attribute__' : function-style initializer appears to be a function definition
    1>c:\program files\microsoft c#\vc\include\mouse.h(42) : error C2065: 'stdcall' : undeclared identifier
    1>c:\program files\microsoft c#\vc\include\mouse.h(42) : error C2448: '__attribute__' : function-style initializer appears to be a function definition
    1>c:\program files\microsoft c#\vc\include\mouse.h(44) : error C2065: 'stdcall' : undeclared identifier
    1>c:\program files\microsoft c#\vc\include\mouse.h(44) : error C2448: '__attribute__' : function-style initializer appears to be a function definition
    1>c:\program files\microsoft c#\vc\include\mouse.h(45) : error C2065: 'stdcall' : undeclared identifier
    1>c:\program files\microsoft c#\vc\include\mouse.h(45) : error C2448: '__attribute__' : function-style initializer appears to be a function definition
    1>c:\program files\microsoft c#\vc\include\mouse.h(48) : error C2065: 'stdcall' : undeclared identifier
    1>c:\program files\microsoft c#\vc\include\mouse.h(48) : error C2448: '__attribute__' : function-style initializer appears to be a function definition
    1>c:\program files\microsoft c#\vc\include\mouse.h(48) : fatal error C1003: error count exceeds 100; stopping compilation
    1>Build log was saved at "file://c:\Users\Sam\C++ Coding\Scar++ Testing\Scar++ Testing\Debug\BuildLog.htm"
    1>Scar++ Testing - 122 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


    yours
    tv
    Last edited by Tv-XxX; 10-14-2009 at 07:44 PM.

  5. #130
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Hey TV, that was kind of a large bump, thread is like 5 months old, but maybe its still being worked on well see...

  6. #131
    Join Date
    Aug 2007
    Location
    England
    Posts
    136
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    sorry didnt realise :P if its not been worked on then fair enough, im sure from looking at the cpp files i can make use of the commands i need anyways

    Yours
    Tv

  7. #132
    Join Date
    Jan 2007
    Location
    Kansas
    Posts
    3,760
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    This hasn't been worked on in a while. Maybe you can respark boberman's interests


  8. #133
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    2,851
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    I think this is a great idea and should be kept alive.
    PLUS! Make an option to make code closedsource

  9. #134
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by marpis View Post
    PLUS! Make an option to make code closedsource
    Huh?



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  10. #135
    Join Date
    Jul 2007
    Location
    Norway.
    Posts
    1,938
    Mentioned
    3 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Wizzup? View Post
    Huh?
    I think he means an option to obfuscate the code.

  11. #136
    Join Date
    Sep 2009
    Posts
    66
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I think closed source software clearly means closed source software, not program which source code is formatted to look like a helicopter and which can be used to wash clothes.

  12. #137
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    No I think he means, Make it able to run obfuscated scripts.
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  13. #138
    Join Date
    Dec 2007
    Location
    Somewhere in Idaho
    Posts
    480
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Tv-XxX View Post
    sorry didnt realise :P if its not been worked on then fair enough, im sure from looking at the cpp files i can make use of the commands i need anyways

    Yours
    Tv
    Tv, I still have interest in the project, I just have a lot of stuff going on. Last time development happened was when I was off on a school break. Well, unfortunately for Scar++ I went to school year round this year, so that is somewhat the reason for the lag in development.

    Scar++ doesn't have C# compatible headers right now. I'm more focused on getting it useful for C++ at the moment. If I get time in the future I will write them, just understand that it isn't really a priority.

    As for the closed source thing. Scar++ doesn't have any sort of licensing. I I where to put one on it I would probably go for the creative commons or put it into public domain. I don't like the idea of making a tools license forcing a user to change the licensing of their program just to match it. (ALA GPL).

    If you mean code obfuscation, well, there is nothing stopping it from being able to be built with obfuscated code. There just isn't much reason to do so. (Most people don't have the skill to break down an assembly level file and recreate it)

    If I have time, I'll work on it, I just don't have time

  14. #139
    Join Date
    Aug 2007
    Location
    England
    Posts
    136
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    but still :P I cant get it to work with devc++ or microsoft c++ any idea why?

    yours
    tv

  15. #140
    Join Date
    Sep 2009
    Posts
    66
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yeah, this fails miserably when compiling with Visual Studio 2008. Big part of errors got fixed when replaced checks for macro MSVC to _MSC_VER. Another one I quickly spotted was usage of identifier stdcall, when right one is __stdcall. I also had to change several compiler options.

    I'll keep bashing these errors and post a diff here when I manage to compile it.

    EDIT: Damn, I have to get some zlib development stuff. :/

    EDIT2: Got it compiling but with frigging many warnings, I'll fix some of those before posting diff.

    In function FindDTM there is one switch statement which doesn't have anything but default case. Of course I replaced the whole statement with contents of default case. There is one thing about it, though. THe default case ended with break, which would break out of switch. Is this meant behaviour and it should be removed, or is it meant to break out of loop where the switch was? I took it out to let you think about correct behaviour, but I still wanted to check it from you.

    And btw Tv, it's only good thing that you can't get it working with Dev-C++.
    Last edited by fronty; 10-15-2009 at 06:51 PM.

  16. #141
    Join Date
    Dec 2007
    Location
    Somewhere in Idaho
    Posts
    480
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by fronty View Post
    Yeah, this fails miserably when compiling with Visual Studio 2008. Big part of errors got fixed when replaced checks for macro MSVC to _MSC_VER. Another one I quickly spotted was usage of identifier stdcall, when right one is __stdcall. I also had to change several compiler options.

    I'll keep bashing these errors and post a diff here when I manage to compile it.

    EDIT: Damn, I have to get some zlib development stuff. :/

    EDIT2: Got it compiling but with frigging many warnings, I'll fix some of those before posting diff.

    In function FindDTM there is one switch statement which doesn't have anything but default case. Of course I replaced the whole statement with contents of default case. There is one thing about it, though. THe default case ended with break, which would break out of switch. Is this meant behaviour and it should be removed, or is it meant to break out of loop where the switch was? I took it out to let you think about correct behaviour, but I still wanted to check it from you.

    And btw Tv, it's only good thing that you can't get it working with Dev-C++.
    Didn't I upload the VC++ project file? It compiles fine on mine (other then the tons of warnings. GCC doesn't mind them as much). Ill update the svn to my local copy just to be sure.

    The DTM Thing is there for the potential future of putting shapes into the dtm. Right now, dtms will only find square objects. In the future I was hoping to put in a more scar-like dtm finding function.

    The break was ment to terminate the loop. Looks like it doesn't do that, nice catch. (it would still find dtm's, but that will slow it down. Putting in a proper break should provide a little speed boost for larger dtms.)
    Last edited by boberman; 10-15-2009 at 07:50 PM.

  17. #142
    Join Date
    Sep 2009
    Posts
    66
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yes, I used your project file and I used it to build it. Didn't work with Visual Studio 9.0 Professional SP1.

    Created this patch with TortoiseSVN with default settings, didn't check if it works.

    I added usage for unreferenced parameters like (x);. That shouldn't change speed or size or anything, because things like that will be optimized away, because they don't really do anything.

    Code:
    Index: bitmap.cpp
    ===================================================================
    --- bitmap.cpp	(revision 47)
    +++ bitmap.cpp	(working copy)
    @@ -16,28 +16,34 @@
     
     EXPORT IMAGE BitmapFromString(int Width, int Height, std::string data)
     {
    -   if(data[0] == 'b')
    -   {
    -      int outputSize;
    -      unsigned char* output;
    -      unsigned char* dOutput;
    +	(Height);
    +	(Width);
     
    -      data.erase(0, 1);
    -      output = base64Dec(data, outputSize);
    -      dOutput = decompress(output, outputSize, outputSize);
    +	if(data[0] == 'b')
    +	{
    +		int outputSize;
    +		unsigned char* output;
    +		unsigned char* dOutput;
     
    -      delete[] output; // Avoid memory leaks
    -      output = NULL;
    +		data.erase(0, 1);
    +		output = base64Dec(data, outputSize);
    +		dOutput = decompress(output, outputSize, outputSize);
     
    -      /* TODO (#1#): Write BitmapFromString Function */
    -   }
    -   return NULL;
    +		delete[] output; // Avoid memory leaks
    +		output = NULL;
    +
    +		/* TODO (#1#): Write BitmapFromString Function */
    +	}
    +	return NULL;
     }
     
     EXPORT IMAGE BitmapFromString2(bool Validate, std::string str)
     {
    -   /* TODO (#1#): Write BitmapFromString2 function */   
    -   return NULL;
    +	(Validate);
    +	(str);
    +
    +	/* TODO (#1#): Write BitmapFromString2 function */   
    +	return NULL;
     }
     
     EXPORT IMAGE BitmapFromMem(HDC hDC)
    @@ -70,24 +76,38 @@
     
     EXPORT IMAGE CreateBitmapMaskFromText(std::string Text, int Chars)
     {
    -   /* TODO (#1#): Write CreateBitmapMaskFromText Function */
    -   return NULL;
    +	(Text);
    +	(Chars);
    +
    +	/* TODO (#1#): Write CreateBitmapMaskFromText Function */
    +	return NULL;
     } 
     
     EXPORT IMAGE CreateBitmapFromText(std::string Text, int Chars, int TextColor)
     {
    -   /* TODO (#1#): Write CreateBitmapFromText Function */
    -   return NULL;
    +	(Text);
    +	(Chars);
    +	(TextColor);
    +
    +	/* TODO (#1#): Write CreateBitmapFromText Function */
    +	return NULL;
     }
     
     EXPORT IMAGE CreateMirroredBitmap(IMAGE bitmap)
     {
    -   /* TODO (#1#): Write CreateMirroredBitmap */
    +	(bitmap);
    +
    +	/* TODO (#1#): Write CreateMirroredBitmap */
     	return NULL;
     }
     
     EXPORT std::vector< std::vector<int> > GetBitmapAreaColors(int xs, int ys, int xe, int ye)
     {
    +	(xs);
    +	(ys);
    +	(xe);
    +	(ye);
    +
     	std::vector< std::vector<int> > empty;
     	return empty;
     }
    Index: cimath.h
    ===================================================================
    --- cimath.h	(revision 47)
    +++ cimath.h	(working copy)
    @@ -4,7 +4,7 @@
     // Compiler independant math
     
     #include <math.h>
    -#ifdef MSVC
    +#ifdef _MSC_VER
     int lround(double in);
     #endif
     #endif
    \ No newline at end of file
    Index: ColorFind.cpp
    ===================================================================
    --- ColorFind.cpp	(revision 47)
    +++ ColorFind.cpp	(working copy)
    @@ -359,14 +359,19 @@
     // The way my sprial tolerance looks makes these functions pretty much the same.
     EXPORT bool FindColorCircle(int& x, int& y, int color, int mx, int my, int r)
     {
    -   return FindColorSpiralTolerance(x, y, color, x - r, y - r, x + r, y + r, 0);
    +	(mx);
    +	(my);
    +	return FindColorSpiralTolerance(x, y, color, x - r, y - r, x + r, y + r, 0);
     }
     
     EXPORT bool FindColorCircleTolerance(int& x, int& y, int color, int mx, int my,
                                              int r, int Tolerance)
     {
    -   return FindColorSpiralTolerance(x, y, color, x - r, y - r, x + r,
    -                                              y + r, Tolerance);
    +	(mx);
    +	(my);
    +
    +	return FindColorSpiralTolerance(x, y, color, x - r, y - r, x + r, y + r,
    +		Tolerance);
     }
     
     /*   EXPORT bool FindColorTriangle(int& x, int& y, int color, int x1, int y1, int x2,
    Index: dtm.cpp
    ===================================================================
    --- dtm.cpp	(revision 47)
    +++ dtm.cpp	(working copy)
    @@ -76,7 +76,7 @@
     
     void DTM::setColor(int color, int nodeNum)
     {
    -   if (nodeNum < nodes.size())
    +   if ((unsigned)nodeNum < nodes.size())
        {
           nodes[nodeNum]->setColor(color);
        }
    @@ -84,7 +84,7 @@
     
     void DTM::setTol(int tol, int nodeNum)
     {
    -   if (nodeNum < nodes.size())
    +   if ((unsigned)nodeNum < nodes.size())
        {
           nodes[nodeNum]->setTol(tol);
        }
    @@ -116,7 +116,7 @@
           int shape = 0;
           int tol = 0;
           int parent = 0;
    -      int found = 0;
    +      int found = false;
     
           // This chunk will convert the from a DTM to a string.
           for(int j = 4; j >= 1; --j)
    @@ -131,7 +131,7 @@
              parent = (parent << 8) + decompressed[(i * 36) + j + 31];
           }
     
    -      if ((parent == -1) || (parent == nodes.size()))
    +      if ((parent == -1) || ((unsigned int)parent == nodes.size()))
              out = new DTMNode(NULL, x, y, color, shape, area, tol, found);
           else
              out = new DTMNode(nodes[parent], x, y, color, shape, area, tol, found);
    @@ -154,7 +154,7 @@
        std::string out = inStr.substr(0, inStr.size() / 2);
        for (size_t i = 0; i < strSize; ++i)
        {
    -      char currChar = tolower(inStr[i]);
    +      char currChar = (char)tolower(inStr[i]);
           size_t outIndex = (i / 2);
           out[outIndex] = ((out[outIndex] & 0xF) << 4);
           if ((currChar >= 'a') && (currChar <= 'f'))
    @@ -184,7 +184,7 @@
     
     DTMNode* DTM::nodeAt(int i) const
     {
    -   if (i < nodes.size())
    +   if ((unsigned)i < nodes.size())
           return nodes[i];
        else
           return NULL;
    @@ -242,20 +242,16 @@
                 }
                 else
                 {
    -               switch (node->getShape())
    -               {
    -                  default:
    -                     int gv;
    -                     int dist = node->getArea() << 1;
    -                     if((FindColorTolerance(gv, gv, node->getColor(),
    -                         newCoord.x - dist, newCoord.y - dist, newCoord.x + dist,
    -                         newCoord.y + dist, node->getTol())) != node->getFound())
    -                     {
    -                        valid = false;
    -                        break;
    -                     }
    -               }
    -            }
    +				int gv;
    +				int dist = node->getArea() << 1;
    +				if((FindColorTolerance(gv, gv, node->getColor(),
    +					newCoord.x - dist, newCoord.y - dist, newCoord.x + dist,
    +                    newCoord.y + dist, node->getTol())) != node->getFound())
    +				{
    +						valid = false;
    +						break;
    +				}
    +			}
                 ++i;
              }
     
    @@ -350,16 +346,12 @@
                       }
                       else
                       {
    -                     switch(next->getShape())
    -                     {
    -                        default:
    -                           int gv;
    -                           int boxSize = next->getArea() << 1;
    -                           if((FindColorTolerance(gv, gv, next->getColor(),
    -                                 lround(newX - boxSize), lround(newY - boxSize), lround(newX + boxSize),
    -                                 lround(newY + boxSize), next->getTol()) != next->getFound()))
    -                              valid = false;
    -                     }
    +                     int gv;
    +                     int boxSize = next->getArea() << 1;
    +                     if((FindColorTolerance(gv, gv, next->getColor(),
    +                     lround(newX - boxSize), lround(newY - boxSize), lround(newX + boxSize),
    +                     lround(newY + boxSize), next->getTol()) != next->getFound()))
    +                     valid = false;
                       }
                    }
                    ++j;
    Index: dtm.h
    ===================================================================
    --- dtm.h	(revision 47)
    +++ dtm.h	(working copy)
    @@ -1,6 +1,6 @@
    -#ifndef _DTM_H_
    -#define _DTM_H_
    -
    +#ifndef _DTM_H_
    +#define _DTM_H_
    +
     #include "preprocessor.h"
     #include <vector>
     #include <string>
    @@ -12,13 +12,13 @@
        public:
           DTMNode(DTMNode* myParent, int myX, int myY, int myColor, int myShape,
                   int myArea, int myTol, bool myFound);
    -      POINT getCoords() const;
    -      void setColor(int inColor) { color = inColor; }
    +      POINT getCoords() const;
    +      void setColor(int inColor) { color = inColor; }
           void setTol(int inTol) { tol = inTol; }
           int getColor() const;
           int getShape() const;
           int getArea() const;
    -      int getTol() const;
    +      int getTol() const;
           bool getFound() const;
           DTMNode* getParent() const;
        private:
    @@ -37,10 +37,10 @@
        protected:
           std::vector<DTMNode*> nodes;
           std::string makeDecompressable(std::string inStr);
    -   public:
    -      void setAllColor(int color);
    -      void setAllTol(int tol);
    -      void setColor(int color, int nodenum);
    +   public:
    +      void setAllColor(int color);
    +      void setAllTol(int tol);
    +      void setColor(int color, int nodenum);
           void setTol(int tol, int nodeNum);
           DTM(std::vector<DTMNode*> newNodes);
           DTM(std::string dtmFromString);
    @@ -50,8 +50,8 @@
           DTMNode* nodeAt(int i) const;
     };
     
    -EXPORT bool FindDTM(const DTM& theDTM, int& x, int& y, int x1, int y1, int x2, int y2);
    -EXPORT bool FindDTMRotated(const DTM& theDTM, int& x, int& y, int x1,
    -                           int y1, int x2, int y2, double minAngle,
    -                           double maxAngle, double step, double& angle);
    +EXPORT bool FindDTM(const DTM& theDTM, int& x, int& y, int x1, int y1, int x2, int y2);
    +EXPORT bool FindDTMRotated(const DTM& theDTM, int& x, int& y, int x1,
    +                           int y1, int x2, int y2, double minAngle,
    +                           double maxAngle, double step, double& angle);
     #endif
    Index: extraFuncs.cpp
    ===================================================================
    --- extraFuncs.cpp	(revision 47)
    +++ extraFuncs.cpp	(working copy)
    @@ -4,7 +4,7 @@
     #include <assert.h>
     #include <zlib.h>
     
    -#ifdef MSVC
    +#ifdef _MSC_VER
     int lround(double in)
     {
        return (int)(in + .5);
    @@ -143,7 +143,7 @@
     
        short currByteSize = 0;
        unsigned char carryOver;
    -   unsigned char outByte;
    +   unsigned char outByte = 0;
     
        while(i < inSize)
        {
    Index: extraFuncs.h
    ===================================================================
    --- extraFuncs.h	(revision 47)
    +++ extraFuncs.h	(working copy)
    @@ -1,8 +1,8 @@
     #ifndef _EXTRA_FUNCS_H_
     #define _EXTRA_FUNCS_H_
     #include "scarStructs.h"
    -#include <string>
    -#include "os.h"
    +#include <string>
    +#include "os.h"
     
     /* This file is for any function that has its uses elsewhere but doesnt really
        Fit in the other catgories */
    @@ -15,16 +15,16 @@
           return a;
        else
           return b;
    -}
    +}
     
     bool tBoxCompair(TBox a, TBox b);
     void tBoxCorrect(TBox& in);
     
    -std::string literalStringValue(std::string inString);
    -unsigned char* decompress(unsigned char* in, int inLen, int& outLen);
    -unsigned char* base64Dec(std::string in, int& outLen);
    -
    -IMAGE GetRawScreenData(int& xs, int& ys, int& xe, int& ye, HDC screen);
    -
    +std::string literalStringValue(std::string inString);
    +unsigned char* decompress(unsigned char* in, int inLen, int& outLen);
    +unsigned char* base64Dec(std::string in, int& outLen);
    +
    +IMAGE GetRawScreenData(int& xs, int& ys, int& xe, int& ye, HDC screen);
    +
     unsigned int GetRawColor(int x, int y, IMAGE data);
     #endif
    Index: Keyboard.cpp
    ===================================================================
    --- Keyboard.cpp	(revision 47)
    +++ Keyboard.cpp	(working copy)
    @@ -1,22 +1,22 @@
     #include "Keyboard.h"
    -#include "scarmain.h"
    +#include "scarmain.h"
     
    -#ifdef WINDOWS
    +#ifdef WINDOWS
     EXPORT void SendKeys(std::string S)
     {
        SendKeysWait(S, 0, 1); // Same function, nobody will notice 1ms
     }
     
     EXPORT void SendKeysWait(std::string text, int tWait, int tRandom)
    -{
    +{
        Scar* window = returnScarObject();
    -   HWND client = window->returnClient();
    +   HWND client = window->returnClient();
     
        for(unsigned int i = 0; i < text.size(); ++i)
    -   {
    +   {
     #ifdef WINDOWS
           if(GetFocus() != client)
    -         SetFocus(client);
    +         SetFocus(client);
     #endif
           Sleep(tWait + rand() % tRandom);
           KeyDown(GetKeyCode(text[i]));
    @@ -37,12 +37,12 @@
     
     EXPORT void SendArrowWait(int Key, int WaitTime)
     {
    -   short newKey;
    +   short newKey;
        Scar* window = returnScarObject();
        HWND client = window->returnClient();
        
        switch (Key) // Microsoft Virtual key codes
    -   {
    +   {
     #ifdef WINDOWS
           case 0:
              newKey = VK_UP;
    @@ -55,25 +55,25 @@
              break;
           case 3:
              newKey = VK_LEFT;
    -         break;
    -#else
    -      case 0:
    -         newKey = XK_Up;
    -         break;
    -      case 1:
    -         newKey = XK_Right;
    -         break;
    -      case 2:
    -         newKey = XK_Down;
    -         break;
    -      case 3:
    -         newKey = XK_Left;
    -         break;
    +         break;
    +#else
    +      case 0:
    +         newKey = XK_Up;
    +         break;
    +      case 1:
    +         newKey = XK_Right;
    +         break;
    +      case 2:
    +         newKey = XK_Down;
    +         break;
    +      case 3:
    +         newKey = XK_Left;
    +         break;
     #endif
           default:
              newKey = 0;
        }
    -
    +
     #ifdef WINDOWS
        if(GetFocus() != client) // Make sure the keys are going to the right place
           SetFocus(client);
    @@ -98,23 +98,23 @@
        SendInput was for Win2k and Higher, so at least this should work with the few
        Win98 people out there */
     EXPORT void KeyDown(int Key)
    -{
    +{
     #ifdef WINDOWS
        keybd_event(Key, 0, 0, 0);
    -#else
    -   Display* display = returnScarObject()->returnDisplay();
    -   XTestFakeKeyEvent(display, XKeysymToKeycode(display, Key), true, 0);
    -#endif
    +#else
    +   Display* display = returnScarObject()->returnDisplay();
    +   XTestFakeKeyEvent(display, XKeysymToKeycode(display, Key), true, 0);
    +#endif
     }
     
     EXPORT void KeyUp(int Key)
    -{
    +{
     #ifdef WINDOWS
        keybd_event(Key, 0, KEYEVENTF_KEYUP, 0);
    -#else
    -   Display* display = returnScarObject()->returnDisplay();
    -   XTestFakeKeyEvent(display, XKeysymToKeycode(display, Key), false, 0);
    -#endif
    +#else
    +   Display* display = returnScarObject()->returnDisplay();
    +   XTestFakeKeyEvent(display, XKeysymToKeycode(display, Key), false, 0);
    +#endif
     }
     
     EXPORT void KeyDownSilent(int Key)
    @@ -128,12 +128,12 @@
     }
     
     EXPORT int GetKeyCode(char Key)
    -{
    +{
     #ifdef WINDOWS
    -   return VkKeyScan(Key);
    -#else
    -   char buf[] = {Key, '\0'};
    -   return XStringToKeysym(buf);
    +   return VkKeyScan(Key);
    +#else
    +   char buf[] = {Key, '\0'};
    +   return XStringToKeysym(buf);
     #endif
     }
     
    @@ -142,7 +142,7 @@
        int newKey;
        
        switch (Key) // I wish there was a better way to do this, but alas none of
    -   {            // the key codes are in order :(
    +   {            // the key codes are in order :(
     #ifdef WINDOWS
           case 0:
              newKey = VK_SHIFT;
    @@ -170,8 +170,8 @@
              break;
           case 8:
              newKey = VK_RMENU;
    -         break;
    -#else
    +         break;
    +#else
           case 0:
              newKey = XK_Shift_Lock;
              break;
    @@ -198,17 +198,17 @@
              break;
           case 8:
              newKey = VK_Hyper_R;
    -         break;
    +         break;
     #endif
           default:
              newKey = 0;  
    -   }
    +   }
     #ifdef WINDOWS
    -   return (GetKeyState(newKey) < 0);
    -#else
    -   Display* display = returnScarObject()->returnDisplay();
    -   char keys[32];
    -   XQueryKeymap(display, keys);
    +   return (GetKeyState(newKey) < 0);
    +#else
    +   Display* display = returnScarObject()->returnDisplay();
    +   char keys[32];
    +   XQueryKeymap(display, keys);
     #endif
     }
     
    @@ -251,4 +251,4 @@
     {
        return (GetKeyState(VK_NUMPAD0 + Key) < 0);
     }
    -#endif
    +#endif
    Index: Mouse.cpp
    ===================================================================
    --- Mouse.cpp	(revision 47)
    +++ Mouse.cpp	(working copy)
    @@ -162,6 +162,13 @@
                            int ctrlSpacing, int ctrlVariance)
     {
     /* TODO (#1#): Write MoveMouseSplineEx */
    +	(x);
    +	(y);
    +	(rx);
    +	(ry);
    +	(mouseSpeed);
    +	(ctrlSpacing);
    +	(ctrlVariance);
     }
     
     EXPORT void _MoveMouseSplineFrom(int x0, int y0, int x1, int y1, int rx, int ry)
    Index: Plugin.cpp
    ===================================================================
    --- Plugin.cpp	(revision 47)
    +++ Plugin.cpp	(working copy)
    @@ -1,9 +1,9 @@
     #include "os.h"
     #include "Plugin.h"
     
    -#ifndef MSVC
    -typedef long (*GFInfo)(int index, void** address, char** def) __attribute__((stdcall));
    -typedef long (*GFCount)() __attribute__((stdcall));
    +#ifndef _MSC_VER
    +typedef long (*GFInfo)(int index, void** address, char** def) __attribute__((__stdcall));
    +typedef long (*GFCount)() __attribute__((__stdcall));
     #else
     typedef long (__stdcall *GFInfo)(int index, void** address, char** def);
     typedef long (__stdcall *GFCount)();
    @@ -32,7 +32,6 @@
                    if ((space != string::npos) && (par != string::npos))
                    {
                       newName = newName.substr(space + 1, par - space - 1);
    -                  size_t pos = newName.find_first_of("(;:) ");
                       functions[newName] = addr;
                    }
                 }
    Index: preprocessor.h
    ===================================================================
    --- preprocessor.h	(revision 47)
    +++ preprocessor.h	(working copy)
    @@ -1,28 +1,28 @@
     #ifndef _PREPROCESSOR_H_
     #define _PREPROCESSOR_H_
    -
    +
     // Linux doesn't use the same dllexport stuff.
     #ifndef LINUX
     #   if BUILDING_DLL
    -#      ifdef MSVC
    +#      ifdef _MSC_VER
     #         define EXPORT __declspec(dllexport)
     #         define CLASS class __declspec (dllexport)
     #      else
    -#         define EXPORT __declspec (dllexport) __attribute__((stdcall))
    +#         define EXPORT __declspec (dllexport) __attribute__((__stdcall))
     #         define CLASS class __declspec (dllexport)
     #      endif
     #   else /* Not BUILDING_DLL */
    -#      ifdef MSVC
    +#      ifdef _MSC_VER
     #         define EXPORT __declspec (dllimport)
     #         define CLASS class __declspec (dllimport)
     #      else
    -#         define EXPORT __declspec (dllimport) __attribute__((stdcall))
    +#         define EXPORT __declspec (dllimport) __attribute__((__stdcall))
     #         define CLASS class __declspec (dllimport)
     #      endif
     #   endif /* Not BUILDING_DLL */
     #else     /* Linux environment */
    -#   define EXPORT
    +#   define EXPORT
     #   define CLASS class
     #endif
    -
    -#endif /* header endif */
    +
    +#endif /* header endif */
    Index: Scar++.vcproj
    ===================================================================
    --- Scar++.vcproj	(revision 47)
    +++ Scar++.vcproj	(working copy)
    @@ -1,9 +1,10 @@
     <?xml version="1.0" encoding="UTF-8"?>
     <VisualStudioProject
     	ProjectType="Visual C++"
    -	Version="9.00"
    +	Version="9,00"
     	Name="Scar++"
     	ProjectGUID="{B45C07E5-3055-4DC3-8124-78D20C1948BE}"
    +	RootNamespace="Scar++"
     	Keyword="Win32Proj"
     	TargetFrameworkVersion="0"
     	>
    @@ -41,13 +42,13 @@
     				Optimization="3"
     				OmitFramePointers="true"
     				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SCAR_EXPORTS;WINDOWS;BUILDING_DLL"
    -				MinimalRebuild="true"
    -				BasicRuntimeChecks="3"
    +				MinimalRebuild="false"
    +				BasicRuntimeChecks="0"
     				RuntimeLibrary="3"
     				UsePrecompiledHeader="0"
    -				WarningLevel="3"
    -				Detect64BitPortabilityProblems="true"
    -				DebugInformationFormat="4"
    +				WarningLevel="4"
    +				Detect64BitPortabilityProblems="false"
    +				DebugInformationFormat="0"
     			/>
     			<Tool
     				Name="VCManagedResourceCompilerTool"
    @@ -60,6 +61,7 @@
     			/>
     			<Tool
     				Name="VCLinkerTool"
    +				AdditionalDependencies="zdll.lib"
     				LinkIncremental="2"
     				GenerateDebugInformation="true"
     				SubSystem="2"
    Index: scarmain.cpp
    ===================================================================
    --- scarmain.cpp	(revision 47)
    +++ scarmain.cpp	(working copy)
    @@ -1,4 +1,4 @@
    -#ifdef MSVC
    +#ifdef _MSC_VER
     // MSVC is dumb, it won't let us use pre-processors unless one is
     // declared on the first line.
     #endif
    @@ -52,6 +52,9 @@
                            DWORD reason        /* Reason this function is being called. */ ,
                            LPVOID reserved     /* Not used. */ )
     {
    +	(hInst);
    +	(reserved);
    +
         switch (reason)
         {
           case DLL_PROCESS_ATTACH:

  18. #143
    Join Date
    Dec 2007
    Location
    Somewhere in Idaho
    Posts
    480
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    fonty, I've applied your patch. however, do note that the way I was using standard call was indeed correct. In GCC, __attribute__((stdcall)) is the notation to do standard calls. in MSVC it is __stdcall. It is a difference in compilers and definitely not a c standard.

    I went ahead and applied your patch to my local branch for now, but undid your __stdcall changes. I'll apply it as soon as assembla lets me (Dang thing is down for now)

  19. #144
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    I think that creating statements that will be optimized away to prevent compiler warnings is totally useless, and not pretty. Better let the compiler warn about it; it does so for a reason.

    Or just disable the warning?



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  20. #145
    Join Date
    Dec 2007
    Location
    Somewhere in Idaho
    Posts
    480
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well, what's Ironic is that vc++ warns if the statements aren't there, gcc warns that the statements ARE there

    Whatever though, I'll clean it up later if I ever get the time to fix things up.

  21. #146
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by boberman View Post
    Well, what's Ironic is that vc++ warns if the statements aren't there, gcc warns that the statements ARE there

    Whatever though, I'll clean it up later if I ever get the time to fix things up.
    Why not use gcc on windows too though?

    EDIT: Yeah, that's quite ironic, but expected.
    Last edited by Wizzup?; 10-16-2009 at 12:12 AM.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  22. #147
    Join Date
    Dec 2007
    Location
    Somewhere in Idaho
    Posts
    480
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Wizzup? View Post
    Why not use gcc on windows too though?

    EDIT: Yeah, that's quite ironic, but expected.
    I use gcc (mingw) as my primary compiler. I just tried to get things setup so that MSVC can work as well.

  23. #148
    Join Date
    Sep 2009
    Posts
    66
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Oh yeah, I didn't spot that those stdcalls were in blocks meant for non-MSVC. I just spotted how it complained about syntax error at stdcall and changed it into __stdcall, and then spotted usage of macro MSVC and changed it.

    I prefer that kind of preventing of those warnings, and I think every part of code that causes compiler warning should be corrected. Most of those warnings were in functions (or methods, don't remember) that aren't fully implemented, so those statements will be removed in future. Some of those warnings came from functions which are implemented and those parameters really were of no use. I think disabling warnings is definitely not The Right Thing To Do in any case.

    I prefer native utilities on every platform. GCC doesn't even support Windows, so I think using VC or ICC for C++, or some other programs that support Windows for Windows development, and GNU's compilers on BSD/Linux/others or some other compilers for different languages, like pcc for C and fpc for Pascal.

    WTF? Doesn't GCC warn about unused parameters? Do you compile with -W -Wall -Wextra?
    Last edited by fronty; 10-16-2009 at 10:48 AM.

  24. #149
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by fronty View Post
    Oh yeah, I didn't spot that those stdcalls were in blocks meant for non-MSVC. I just spotted how it complained about syntax error at stdcall and changed it into __stdcall, and then spotted usage of macro MSVC and changed it.

    I prefer that kind of preventing of those warnings, and I think every part of code that causes compiler warning should be corrected. Most of those warnings were in functions (or methods, don't remember) that aren't fully implemented, so those statements will be removed in future. Some of those warnings came from functions which are implemented and those parameters really were of no use. I think disabling warnings is definitely not The Right Thing To Do in any case.

    I prefer native utilities on every platform. GCC doesn't even support Windows, so I think using VC or ICC for C++, or some other programs that support Windows for Windows development, and GNU's compilers on BSD/Linux/others or some other compilers for different languages, like pcc for C and fpc for Pascal.

    WTF? Doesn't GCC warn about unused parameters? Do you compile with -W -Wall -Wextra?
    GCC should warn about unused parameters, but it also warns about useless statements, like the ones you added.
    GNU doesn't "support" Windows on idealogical level, but their compiler works fine for Windows. FPC is also cross platform.

    I dislike paying for any development tool.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  25. #150
    Join Date
    Sep 2009
    Posts
    66
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    MinGW works under Windows. Can you see MinGW in GCC tree? No.

    I know fpc is cross platform. Did I say it wasn't? No. I know I maybe didn't express my opinion very well, but what I meant was that fpc is an alternative for GCC for Pascal family, and one option like any other compiler for Pascal developement under Windows.

    You can get both ICC and VC for free.

    Some projects I've participated and which were supposed to be compilable with many compilers, including MSVC and GCC, without warnings, used macros for this purpose. IIRC in one project there was two macros, unused, and USE(). They were used and defined like this:
    Code:
    #ifdef __GNUC__
    # define unused __attribute__((unused))
    # define USE(x)
    #elif defined(_MSC_VER)
    # define unused
    # define USE(x) (x)
    #endif /* __GNUC__ */
    
    void func(int x unused)
    {
            USE(x);
            ...
    }
    I know this isn't very elegant solution, but I think it's better than long list of warnings.

Page 6 of 7 FirstFirst ... 4567 LastLast

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 guests)

Similar Threads

  1. Replies: 15
    Last Post: 09-22-2008, 12:32 PM
  2. SCAR Divi 3.01 DONT associate .scar files!!!
    By chimpy in forum News and General
    Replies: 1
    Last Post: 04-21-2007, 08:49 PM
  3. Replies: 28
    Last Post: 06-22-2006, 04:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •