google-site-verification: googlebaca44933768a824.html [CSS] ISurface Table - Old Royal Hack Forum

Announcement

Collapse
No announcement yet.

[CSS] ISurface Table

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [CSS] ISurface Table

    Hey guys :),

    I belive the ISurface table has changed a bit after the update of CSS to the OB engine.
    All functions until "DrawLine" are working except the CreateFont and SetFontGlyphSet function.

    Any Fixes or Ideas are welcome ^^.

    My finding: CreateFont moved from VTable pos 63 to 68.

    #2
    Re: [CSS] ISurface Table

    yeah , i cannot draw any text too.
    IP: 93.127.228.26
    Mail: [email protected]

    Comment


      #3
      Re: [CSS] ISurface Table

      Ok you can Obtain a Font with the SchemeManager but the drawing doesnt work because of DrawColoredText -.-

      Comment


        #4
        Re: [CSS] ISurface Table

        Pad the fucking classes... How hard is that?

        Comment


          #5
          Re: [CSS] ISurface Table

          Or you just use this like in TF2 ...
          Works for me ....

          Code:
          void PrintText(int x, int y, DWORD dwColor, const char *pszText, ... )
          {
          	if( pszText == NULL )
          		return;
          
          	va_list va_alist;
          	char szBuffer[1024] = { '\0' };
          	wchar_t szString[1024] = { '\0' };
          
          	va_start( va_alist, pszText );
          	vsprintf( szBuffer, pszText, va_alist );
          	va_end( va_alist );
          
          	wsprintfW( szString, L"%S", szBuffer );
          
          	g_pSurface->DrawSetTextPos( x, y );
          	g_pSurface->DrawSetTextFont(font_1 );
          	g_pSurface->DrawSetTextColor( RED(dwColor), GREEN(dwColor), BLUE(dwColor), ALPHA(dwColor) );
          	g_pSurface->DrawPrintText( szString, wcslen( szString ) );
          }
          Credits ... don?t know

          and for me the normal SetFontGlyphSet ... works ....

          Code:
          void FontInit()
          {
          	font_1 = g_pMatSystemSurface->CreateFont();	
          	g_pMatSystemSurface->SetFontGlyphSet( font_1, "Arial", 14, 450, 0, 0, 0x200 );
          }

          btw, anyone knows whats wrong with PaintTraverse ?
          Has the vTable changed or the index ?

          thx,
          Helo

          Comment


            #6
            Re: [CSS] ISurface Table

            Yea I came to nearly the same code as yours :) PaintTraverse is still at 40.

            Comment

            Working...
            X