Announcement

Collapse
No announcement yet.

Translate this c header into inc for PBWin

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

  • Translate this c header into inc for PBWin

    Dear developers

    I try to translated this c header file into an pb inc file but I don't
    know how I can this translated this

    Here is my translated inc file:

    Can somebody help me if this is corrected ?

    Thank you

    The resource site: http://nehe.gamedev.net

    Code:
    '/********************
    '*                   *
    '*   NeHeGL Header   *
    '*                   *
    '**********************************************************************************
    '*                                                                                *
    '*   You Need To Provide The Following Functions:                                 *
    '*                                                                                *
    '*   BOOL Initialize (GL_Window* window, Keys* keys);                             *
    '*       Performs All Your Initialization                                         *
    '*       Returns TRUE If Initialization Was Successful, FALSE If Not              *
    '*       'window' Is A Parameter Used In Calls To NeHeGL                          *
    '*       'keys' Is A Structure Containing The Up/Down Status Of keys              *
    '*                                                                                *
    '*   void Deinitialize (void);                                                    *
    '*       Performs All Your DeInitialization                                       *
    '*                                                                                *
    '*   void Update (DWORD milliseconds);                                            *
    '*       Perform Motion Updates                                                   *
    '*       'milliseconds' Is The Number Of Milliseconds Passed Since The Last Call  *
    '*       With Whatever Accuracy GetTickCount() Provides                           *
    '*                                                                                *
    '*   void Draw (void);                                                            *
    '*       Perform All Your Scene Drawing                                           *
    '*                                                                                *
    '*********************************************************************************/
    
    '#ifndef GL_FRAMEWORK__INCLUDED
    '#define GL_FRAMEWORK__INCLUDED
    
    '#include <windows.h>                               // Header File For Windows
    #INCLUDE "Win32API.inc"
    
    'typedef struct {                                   // Structure For Keyboard Stuff
    '    BOOL keyDown [256];                            // Holds TRUE / FALSE For Each Key
    '} Keys;                                            // Keys
    
    TYPE Keys
        keyDown(256) AS LONG
    END TYPE
    
    'typedef struct {                                    // Contains Information Vital To Applications
    '    HINSTANCE       hInstance;                      // Application Instance
    '    const char*         className;                  // Application ClassName
    '} Application;                                      // Application
    
    TYPE Application
        hInstance AS DWORD
        className AS ASCIIZ PTR
    END TYPE
    
    'typedef struct {                                    // Window Creation Info
    '    Application*        application;                // Application Structure
    '    char*               title;                      // Window Title
    '    int                 width;                      // Width
    '    int                 height;                     // Height
    '    int                 bitsPerPixel;               // Bits Per Pixel
    '    BOOL                isFullScreen;               // FullScreen?
    '} GL_WindowInit;                                    // GL_WindowInit
    
    TYPE GL_WindowInit
        m_application AS Application
        m_title AS ASCIIZ PTR
        m_width AS LONG
        m_height AS LONG
        m_bitsPerPixel AS LONG
        m_isFullScreen AS LONG
    END TYPE
    
    'typedef struct {                                    // Contains Information Vital To A Window
    '    Keys*               keys;                       // Key Structure
    '    HWND                hWnd;                       // Window Handle
    '    HDC                 hDC;                        // Device Context
    '    HGLRC               hRC;                        // Rendering Context
    '    GL_WindowInit       init;                       // Window Init
    '    BOOL                isVisible;                  // Window Visible?
    '    DWORD               lastTickCount;              // Tick Counter
    '} GL_Window;                                        // GL_Window
    
    TYPE GL_Window
        m_keys          AS Keys
        hWnd            AS DWORD
        hDC             AS DWORD
        hRC             AS DWORD
        m_init          AS GL_WindowInit
        m_isVisible     AS LONG
        m_lastTickCount AS DWORD
    END TYPE
    
    'void TerminateApplication (GL_Window* window);      // Terminate The Application
    DECLARE SUB TerminateApplication(BYREF window AS GL_Window)
    
    'void ToggleFullscreen (GL_Window* window);          // Toggle Fullscreen / Windowed Mode
    DECLARE SUB ToggleFullscreen(BYREF window AS GL_Window)
    
    '// These Are The Function You Must Provide
    'BOOL Initialize (GL_Window* window, Keys* keys);    // Performs All Your Initialization
    DECLARE FUNCTION Initialize(BYREF window AS GL_Window, BYREF keys_ AS Keys) AS LONG
    
    'void Deinitialize (void);                           // Performs All Your DeInitialization
    DECLARE SUB DeInitialize()
    
    'void Update (DWORD milliseconds);                   // Perform Motion Updates
    DECLARE SUB Update(BYVAL milliseconds AS DWORD)
    
    'void Draw (void);                                   // Perform All Your Scene Drawing
    DECLARE SUB OpenGLDraw()
    ------------------

  • #2
    what exactly is the problem ? Please post the C header as well.

    ------------------
    Listening is always better than talking, especially when the level of arrogance exceeds your IQ.
    -
    S. Pringels
    So here we are, this is the end.
    But all that dies, is born again.
    - From The Ashes (In This Moment)

    Comment


    • #3
      He posted the C stuff as comments. Just how much does he want to
      pay for the translation, won't be free from me!!!!!!!

      ------------------


      [This message has been edited by Cecil L. Williams (edited March 31, 2005).]

      Comment

      Working...
      X