PAS and Visual Studio

Learn more on how to use Sandbox, or submit your own tutorials or resources.
northstar
Member
Member
Posts: 208
Joined: March 1st, 2012, 1:17 pm
Name: steven

PAS and Visual Studio

Postby northstar » July 31st, 2014, 1:08 pm

hey guys... i need some help setting up VS... i've tried and tried and keep stumbling into errors in the build. i may not do alot in VS, but if i want to change or implement a few things in it... i would like to be able to do it... a real step-by-step would be appreciated... some of the stops include cannot open/find rpgobjects and cannot (etc) sdl main c... i use 2.7.1 btw... i'm about to throw my computer out the window lol...
stev

User avatar
Wind Astella
Member
Member
Posts: 112
Joined: June 4th, 2013, 6:18 am
Name: Nik Mirza
IRC Username: windastella
Contact:

Re: PAS and Visual Studio

Postby Wind Astella » July 31st, 2014, 7:07 pm

I recommand Codeblock with MinGW other than that I can't help with VS. But it seem that your download if broken since it is missing some stuff (rpgobjects.cpp maybe) Try redownload the game. Btw use the moddb link since the link in the website is broken.

Hirato
Developer
Developer
Posts: 689
Joined: May 30th, 2009, 1:23 pm
IRC Username: hirato

Re: PAS and Visual Studio

Postby Hirato » August 1st, 2014, 9:14 am

the visual studio project isn't maintained.
In theory the code should compile fine (no guarantee), but the project file itself will need some updating at least.
It's easiest to just use codeblocks and mingw though.
This is not a url, clicking it is pointless

northstar
Member
Member
Posts: 208
Joined: March 1st, 2012, 1:17 pm
Name: steven

Re: PAS and Visual Studio

Postby northstar » August 1st, 2014, 11:40 am

ahhh... well that explains it... i suppose AN answer is better than no answer... i will try CB and ming... hey, if it works it works (shrug)...
thx guys

northstar
Member
Member
Posts: 208
Joined: March 1st, 2012, 1:17 pm
Name: steven

Re: PAS and Visual Studio

Postby northstar » August 1st, 2014, 4:28 pm

ok, i've got CB in 2.7.1 down to one replicated programming error...

Code: Select all

template<class MDL> struct vertcommands : modelcommands<MDL, struct MDL::vertmesh>
{
    typedef struct MDL::part part;
    typedef struct MDL::skin skin;

    static void loadpart(char *model, float *smooth)
    {
        if(!MDL::loading) { conoutf("not loading an %s", MDL::formatname()); return; }
        defformatstring(filename)("%s/%s", MDL::dir, model);
        part &mdl = *new part;
        MDL::loading->parts.add(&mdl);
        mdl.model = MDL::loading;
        mdl.index = MDL::loading->parts.length()-1;
        if(mdl.index) mdl.pitchscale = mdl.pitchoffset = mdl.pitchmin = mdl.pitchmax = 0;
        mdl.meshes = MDL::loading->sharemeshes(path(filename), double(*smooth > 0 ? cos(clamp(*smooth, 0.0f, 180.0f)*RAD) : 2));
        if(!mdl.meshes) conoutf("could not load %s", filename);
        else mdl.initskins();
    }

    static void setpitch(float *pitchscale, float *pitchoffset, float *pitchmin, float *pitchmax)
    {
        if(!MDL::loading || MDL::loading->parts.empty()) { conoutf("not loading an %s", MDL::formatname()); return; }
        part &mdl = *MDL::loading->parts.last();

        mdl.pitchscale = *pitchscale;
        mdl.pitchoffset = *pitchoffset;
        if(*pitchmin || *pitchmax)
        {
            mdl.pitchmin = *pitchmin;
            mdl.pitchmax = *pitchmax;
        }
        else
        {
            mdl.pitchmin = -360*fabs(mdl.pitchscale) + mdl.pitchoffset;
            mdl.pitchmax = 360*fabs(mdl.pitchscale) + mdl.pitchoffset;
        }
    }

    static void setanim(char *anim, int *frame, int *range, float *speed, int *priority)
    {
        if(!MDL::loading || MDL::loading->parts.empty()) { conoutf("not loading an %s", MDL::formatname()); return; }
        vector<int> anims;
        findanims(anim, anims);
        if(anims.empty()) conoutf("could not find animation %s", anim);
        else loopv(anims)
        {
            MDL::loading->parts.last()->setanim(0, anims[i], *frame, *range, *speed, *priority);
        }
    }

    vertcommands()
    {
        if(MDL::multiparted()) modelcommands(loadpart, "load", "sf");
        modelcommands(setpitch, "pitch", "ffff");
        if(MDL::animated()) modelcommands(setanim, "anim", "siiff");
    }
};


on the bottom

Code: Select all

vertcommands()
    {
        if(MDL::multiparted()) modelcommands(loadpart, "load", "sf");
        modelcommands(setpitch, "pitch", "ffff");
        if(MDL::animated()) modelcommands(setanim, "anim", "siiff");
    }


i get what appears to be a simple programming error which was done in more than one template

error: missing template arguements before '(' token

if i can fix this, i can fix the rest of the templates, and 2.7.1 will build (i already // them out and it built)

the last one that builds is 2.5

northstar
Member
Member
Posts: 208
Joined: March 1st, 2012, 1:17 pm
Name: steven

Re: PAS and Visual Studio

Postby northstar » August 1st, 2014, 4:47 pm

ok... i got it

in engine/vertmodel.h

Code: Select all

 vertcommands()
    {
        if(MDL::multiparted()) this->modelcommand(loadpart, "load", "sf");
        this->modelcommand(setpitch, "pitch", "ffff");
        if(MDL::animated()) this->modelcommand(setanim, "anim", "siiff");
    }


in engine/skelmodel.h

Code: Select all

skelcommands()
    {
        if(MDL::multiparted()) this->modelcommand(loadpart, "load", "ssf");
        this->modelcommand(settag, "tag", "ssffffff");
        this->modelcommand(setpitch, "pitch", "sffff");
        this->modelcommand(setpitchtarget, "pitchtarget", "ssiff");
        this->modelcommand(setpitchcorrect, "pitchcorrect", "ssfff");
        if(MDL::animated())
        {
            this->modelcommand(setanim, "anim", "ssfiii");
            this->modelcommand(setanimpart, "animpart", "s");
            this->modelcommand(setadjust, "adjust", "sffffff");
        }
    }


sweet...

northstar
Member
Member
Posts: 208
Joined: March 1st, 2012, 1:17 pm
Name: steven

Re: PAS and Visual Studio

Postby northstar » August 1st, 2014, 5:45 pm

for those who might think of dabbling into code, i also found (for me) that i had to put two files into the bin...

libgcc_s_dw2.1.dll
libstdc++6.dll

which (for me) were located in the c:minGW>bin folder

baba11
Member
Member
Posts: 1
Joined: November 11th, 2014, 1:18 am
Name: harry

Re: PAS and Visual Studio

Postby baba11 » November 11th, 2014, 1:19 am

Idk what to say since the ideal editing view is in first person mode. You can switch to thirdperson mode by typing "thirdperson 1" in the console. (enter the console by pressing the "~" key". I'm too can feel what you meant when I'm making maps. Brothers LOL



______________________________
Get free demos for 250-315 practice exam questions - pass4sure marks in Aruba paced test engine to help you pass wikipedia latest resource Harvard University dumps exam by using Lynn University
Last edited by baba11 on December 3rd, 2014, 6:01 am, edited 1 time in total.

lisaa
Member
Member
Posts: 2
Joined: December 1st, 2014, 5:18 am
Name: lisaa

Re: PAS and Visual Studio

Postby lisaa » December 1st, 2014, 5:20 am

Thanks harry


Return to “Tutorials and Resources”

Who is online

Users browsing this forum: No registered users and 2 guests