Jump to content

  • Log In with Google      Sign In   
  • Create Account

shabtronic

Member Since 07 Dec 2011
Offline Last Active Dec 02 2013 10:00 PM

Posts I've Made

In Topic: the compiler doesn't compile the script

02 December 2013 - 09:43 PM

I had a quick look at the exe - coz I'm so nosey and enjoy mystery .exe's smile.png it's a legit PE, I didn't check for any nasties but it's:

 

"Allegro Game Creator"

 

uses:

OpenAL

wxWidgets

OpenGL

some GCC stuff

and a few more

 

 

probably doesn't load because it uses a few .dlls

 

libgcc_s_dw2-1.dll

libgcj-13.dll

 

and it does have that function above in there:

 

int __thiscall sub_401838(void *this, int a2)
{
  int v2; // ebx@1
  int v3; // ebx@6
  int v4; // eax@6
  int v5; // ebx@16
  void (__thiscall *v6)(_DWORD, _DWORD, _DWORD); // ebx@16
  void *v8; // [sp+44h] [bp-16Ch]@1
  char v9; // [sp+48h] [bp-168h]@4
  char v10; // [sp+100h] [bp-B0h]@4
  char v11; // [sp+108h] [bp-A8h]@1
  char v12; // [sp+114h] [bp-9Ch]@1
  char v13; // [sp+120h] [bp-90h]@1
  char v14; // [sp+12Ch] [bp-84h]@1
  char v15; // [sp+138h] [bp-78h]@1
  char v16; // [sp+144h] [bp-6Ch]@6
  char v17; // [sp+150h] [bp-60h]@10
  char v18; // [sp+15Ch] [bp-54h]@16
  char v19; // [sp+168h] [bp-48h]@16
  char v20; // [sp+174h] [bp-3Ch]@16
  int v21; // [sp+180h] [bp-30h]@16
  int v22; // [sp+184h] [bp-2Ch]@14
  int v23; // [sp+188h] [bp-28h]@12
  int v24; // [sp+18Ch] [bp-24h]@4
  int v25; // [sp+190h] [bp-20h]@1
  int v26; // [sp+194h] [bp-1Ch]@1
 
  v8 = this;
  sub_90112C(&v11);
  sub_901210("Executable Files(*.exe)|*.exe");
  sub_9008CC("compile");
  sub_9008CC(&unk_9EE184);
  sub_9008CC(&unk_9EE184);
  sub_9008CC("compilesavedlg");
  v2 = sub_98D050(576);
  sub_4F5E00(v8, &v12, &v13, &v14, &v11, 6, &dword_C3CB04, &dword_C3CAFC, &v15);
  v26 = v2;
  sub_9011C0(&v15);
  sub_9011C0(&v14);
  sub_9011C0(&v13);
  sub_9011C0(&v12);
  v25 = (*(int (__thiscall **)(int))(*(_DWORD *)v26 + 956))(v26);
  if ( v25 == 5101 )
    sub_4E3A32(0);
  if ( v25 == 5100 )
  {
    sub_8B2DE8(&v10);
    sub_799F20(&v9);
    v24 = sub_79ADD0(dword_C37024, "build");
    if ( v24 >= 0 )
    {
      v3 = sub_4FB696(*((_DWORD *)v8 + 122));
      sub_4FB5CA(*((_DWORD *)v8 + 122));
      v4 = sub_92B2E0(&v16);
      v24 = sub_79C5C0("sec", v4, v3);
      sub_9011C0(&v16);
      if ( v24 >= 0 )
      {
        v24 = sub_79D9D0(&v9);
        if ( v24 >= 0 )
        {
          (*(void (__thiscall **)(char *, int))(*(_DWORD *)v26 + 1024))(&v17, v26);
          v24 = sub_8B2D50(&v17);
          sub_9011C0(&v17);
          if ( v24 >= 0 )
          {
            v23 = (*(int (__thiscall **)(int, _DWORD, _DWORD))(*(_DWORD *)dword_C37024 + 196))(dword_C37024, "build", 0);
            if ( v23 )
            {
              v22 = (*(int (__thiscall **)(int, _DWORD))(*(_DWORD *)v23 + 52))(v23, "void main()");
              if ( v22 )
              {
                sub_4E3A32(1);
                sub_9008CC("compiling");
                sub_9008CC("please wait while the script is being compiled");
                v5 = sub_98D050(588);
                sub_504D58(&v18, &v19, 100, v8, 6);
                v21 = v5;
                sub_9011C0(&v19);
                sub_9011C0(&v18);
                (*(void (__thiscall **)(int, char *, _DWORD))(*(_DWORD *)v23 + 168))(v23, &v10, 0);
                v6 = *(void (__thiscall **)(_DWORD, _DWORD, _DWORD))(*(_DWORD *)v21 + 1000);
                sub_900B20(off_9E5488);
                v6(v21, &v20, 0);
                sub_9011C0(&v20);
              }
              else
              {
                (*(void (__thiscall **)(int, char[4], _DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)dword_C37024 + 24))(
                  dword_C37024,
                  "sec",
                  0,
                  0,
                  0,
                  "your script must have Void Main() function");
              }
            }
            else
            {
              (*(void (__thiscall **)(int, char[4], _DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)dword_C37024 + 24))(
                dword_C37024,
                "sec",
                0,
                0,
                0,
                "can't load the compile byet code");
            }
          }
          else
          {
            (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)dword_C37024 + 24))(
              dword_C37024,
              "sec",
              0,
              0,
              0,
              "can't Open the given file for compilation!");
          }
        }
        else
        {
          (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)dword_C37024 + 24))(
            dword_C37024,
            "sec",
            0,
            0,
            0,
            "unknown error!");
        }
      }
      else
      {
        (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)dword_C37024 + 24))(
          dword_C37024,
          "sec",
          0,
          0,
          0,
          "can't get the script!");
      }
    }
    else
    {
      (*(void (__thiscall **)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)dword_C37024 + 24))(
        dword_C37024,
        "sec",
        0,
        0,
        0,
        "can't start compilation");
    }
    sub_8B1590(&v9);
    sub_8B2E30(&v10);
  }
  return sub_9011C0(&v11);
}

In Topic: Help BCB 6.00

22 November 2013 - 06:26 PM

Hi Andreas

 

>>However, BCB6 is more than 10 years old already. Any particular reason why you're still using it?

 

I know :) - I use BCB 6.00 for my really fast R&D work - the compiler is uber fast and the VCL component architecture is wicked and the portable install size is 30mb - for me it's the fastest way to do disposable native c++ R&D work.

Quite tragically I have to totally ditch it soon tho - since the debugger doesn't work in x64 :( 

 

Shabby


In Topic: Help BCB 6.00

22 November 2013 - 04:35 PM

Update to my problem

 

Investigating the problem further - it seems it's related to stl stringstream - it gets stuck in some sort of deallocation 

 

so I commented out anything to do with stringstream - which is a lot of the stdstring extension - and I get no hang - yaay!! but I also no fully working string - booo!!

 

I really don't understand the under the hood stl code - it's all voodoo to me, looks like the stream code is used for int/float to string conversion so I can easily work around it.

 

I'm guessing that it's a Borland compiler/STL port issue - I actually tested this and is completely a STL port issue (with a standalone exe - no angelscript) - nothing to do with angelscript :)

 

and easy fix for any other crazy folk using BCB 6 - is to enable

 

 # define _STLP_DEBUG_UNINITIALIZED 1

 

in STL's STL_USER_CONFIG.h 

 

no more windows hang - yaaay :)


In Topic: Help BCB 6.00

22 November 2013 - 11:39 AM

Hi Andreas

 

Yes I tried that eariler, I changed the AS_USE_STRINGPOOL define, no joy tho :(

 

btw - thx for your awesome work Angelscript, my fav scripting lang by far!

 

 

 

Shabby


In Topic: noob help with global class functions

04 May 2013 - 01:40 PM

Hey Andreas 

 

Yeah I thought there would be some sort of declaration I was missing, I just couldn't find it in the doc.

 

Just got my vec2,vec3 and vec4 classes 100% matched to GLSL and my own native classes - let the uber quick prototyping begin :)

 

Just wanted to say - thanks for all your awesome work on Angelscript - it's like a dream come true - soo soo soo easy to bind to native c++

it's the script system I've been after for ages - but only just found it now :)

 

 

Shabby


PARTNERS