Changeset 6331 for lang/d

Show
Ignore:
Timestamp:
02/07/08 16:12:01 (10 months ago)
Author:
itkz
Message:

support GDC on Mac OS X

Location:
lang/d/koke
Files:
1 added
5 modified

Legend:

Unmodified
Added
Removed
  • lang/d/koke/boot.d

    r6329 r6331  
    120120} 
    121121 
     122 
     123version (Darwin) 
     124{ 
     125        extern (C) int _d_run_Dmain(int argc, char* argv[]); 
     126        extern (C) int SDL_main(int argc, char* argv[]) { 
     127                return _d_run_Dmain(argc, argv); 
     128        } 
     129} 
  • lang/d/koke/config.d

    r6329 r6331  
    105105                        if(!isdigit(c)) throw new Error(format("not digit value ... '%s' -> '%s'", key, val)); 
    106106                } 
    107                 return atoi(val); 
     107                return cast(int)atoi(val); 
    108108        } 
    109109        float checkFloat(char[] key, char[] val) 
     
    123123                default: throw new Error(format("not boolean value ... '%s' -> '%s'", key, val)); 
    124124                } 
     125                return false; 
    125126        } 
    126127} 
  • lang/d/koke/hell2.d

    r6329 r6331  
    481481Uint8 Hell_isPushMouse() 
    482482{ 
    483         return g_pressMouseButton ^ (g_pressMouseButton & g_pressMouseButtonPrev); 
     483        return cast(Uint8)(g_pressMouseButton ^ (g_pressMouseButton & g_pressMouseButtonPrev)); 
    484484} 
    485485 
     
    524524                return false; 
    525525        } 
     526        return false; 
    526527} 
    527528 
     
    546547                return false; 
    547548        } 
     549        return false; 
    548550} 
    549551 
     
    706708         
    707709        glPushMatrix(); 
    708         glColor4ub(r, g, b, a); 
     710        glColor4ub(cast(GLubyte)r, cast(GLubyte)g, cast(GLubyte)b, cast(GLubyte)a); 
    709711        glTranslatef(x, y, 0); 
    710712        if(rot != 0) 
     
    760762        Texture.unbind(); 
    761763        glPushMatrix(); 
    762         glColor4ub(r, g, b, a); 
     764        glColor4ub(cast(GLubyte)r, cast(GLubyte)g, cast(GLubyte)b, cast(GLubyte)a); 
    763765 
    764766        glLineWidth(width); 
     
    790792        Texture.unbind(); 
    791793        glPushMatrix(); 
    792         glColor4ub(r, g, b, a); 
     794        glColor4ub(cast(GLubyte)r, cast(GLubyte)g, cast(GLubyte)b, cast(GLubyte)a); 
    793795        glTranslatef(x, y, 0); 
    794796        if(rot != 0) glRotatef(rot, 0, 0, -1); 
     
    832834        Texture.unbind(); 
    833835        glPushMatrix(); 
    834         glColor4ub(r, g, b, a); 
     836        glColor4ub(cast(GLubyte)r, cast(GLubyte)g, cast(GLubyte)b, cast(GLubyte)a); 
    835837        if(width <= 0) 
    836838        { 
     
    898900         
    899901        glPushMatrix(); 
    900         glColor4ub(r, g, b, alpha); 
     902        glColor4ub(cast(GLubyte)r, cast(GLubyte)g, cast(GLubyte)b, cast(GLubyte)alpha); 
    901903        //glColor4d(cast(float)r / 255.0 , cast(float)g / 255.0 , cast(float)b / 255.0 , cast(float)alpha / 255.0); 
    902904        glTranslatef(x, y, 0); 
     
    955957        Texture tex = g_fontTexture; 
    956958        tex.bind(); 
    957         glColor4ub(r, g, b, a); 
     959        glColor4ub(cast(GLubyte)r, cast(GLubyte)g, cast(GLubyte)b, cast(GLubyte)a); 
    958960         
    959961        float u = WIDTH  / cast(float)tex._width;  // テクスチャ座標の幅 
  • lang/d/koke/opengl.d

    r6329 r6331  
    11 
    2 version (Win32) { 
     2version (Windows) { 
    33        private import std.c.windows.windows; 
    4         extern(Windows): 
    54} 
    6 else { 
    7         extern(C): 
    8 } 
    9  
    10 //extern(System): 
     5 
     6extern(System): 
    117 
    128alias uint GLenum; 
     
    11201116 
    11211117void /*APIENTRY*/glAccum (GLenum op, GLfloat value); 
    1122 void /*APIENTRY*/glAlphaFunc (GLenum func, GLclampf ref); 
     1118void /*APIENTRY*/glAlphaFunc (GLenum func, GLclampf ref_); 
    11231119GLboolean /*APIENTRY*/glAreTexturesResident (GLsizei n, GLuint *textures, GLboolean *residences); 
    11241120void /*APIENTRY*/glArrayElement (GLint i); 
     
    13731369void /*APIENTRY*/glSelectBuffer (GLsizei size, GLuint *buffer); 
    13741370void /*APIENTRY*/glShadeModel (GLenum mode); 
    1375 void /*APIENTRY*/glStencilFunc (GLenum func, GLint ref, GLuint mask); 
     1371void /*APIENTRY*/glStencilFunc (GLenum func, GLint ref_, GLuint mask); 
    13761372void /*APIENTRY*/glStencilMask (GLuint mask); 
    13771373void /*APIENTRY*/glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); 
     
    14891485    (GLenum target, GLenum pname, GLfloat *params); 
    14901486 
    1491 //import openglu; 
  • lang/d/koke/openglu.d

    r6329 r6331  
    11import opengl; 
    22 
    3 version (Win32) { 
    4         extern(Windows): 
    5 } 
    6 else { 
    7         extern(C): 
    8 } 
     3extern(System): 
    94 
    105GLubyte* gluErrorString (