Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 185578 | Differences between
and this patch

Collapse All | Expand All

(-)p47/import/opengl.d (-342 / +344 lines)
Lines 1-6 Link Here
1
import std.c.windows.windows;
1
version (Win32) {
2
2
	private import std.c.windows.windows;
3
extern(Windows):
3
	extern(Windows):
4
}
5
version (linux) {
6
	extern(C):
7
}
4
8
5
alias uint GLenum;
9
alias uint GLenum;
6
alias ubyte GLboolean;
10
alias ubyte GLboolean;
Lines 1111-1455 Link Here
1111
1115
1112
/*************************************************************/
1116
/*************************************************************/
1113
1117
1114
extern(Windows) void /*APIENTRY*/glAccum (GLenum op, GLfloat value);
1118
void /*APIENTRY*/glAccum (GLenum op, GLfloat value);
1115
extern(Windows) void /*APIENTRY*/glAlphaFunc (GLenum func, GLclampf ref);
1119
void /*APIENTRY*/glAlphaFunc (GLenum func, GLclampf ref);
1116
extern(Windows) GLboolean /*APIENTRY*/glAreTexturesResident (GLsizei n, GLuint *textures, GLboolean *residences);
1120
GLboolean /*APIENTRY*/glAreTexturesResident (GLsizei n, GLuint *textures, GLboolean *residences);
1117
extern(Windows) void /*APIENTRY*/glArrayElement (GLint i);
1121
void /*APIENTRY*/glArrayElement (GLint i);
1118
extern(Windows) void /*APIENTRY*/glBegin (GLenum mode);
1122
void /*APIENTRY*/glBegin (GLenum mode);
1119
extern(Windows) void /*APIENTRY*/glBindTexture (GLenum target, GLuint texture);
1123
void /*APIENTRY*/glBindTexture (GLenum target, GLuint texture);
1120
extern(Windows) void /*APIENTRY*/glBitmap (GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, GLubyte *bitmap);
1124
void /*APIENTRY*/glBitmap (GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, GLubyte *bitmap);
1121
extern(Windows) void /*APIENTRY*/glBlendFunc (GLenum sfactor, GLenum dfactor);
1125
void /*APIENTRY*/glBlendFunc (GLenum sfactor, GLenum dfactor);
1122
extern(Windows) void /*APIENTRY*/glCallList (GLuint list);
1126
void /*APIENTRY*/glCallList (GLuint list);
1123
extern(Windows) void /*APIENTRY*/glCallLists (GLsizei n, GLenum type, GLvoid *lists);
1127
void /*APIENTRY*/glCallLists (GLsizei n, GLenum type, GLvoid *lists);
1124
extern(Windows) void /*APIENTRY*/glClear (GLbitfield mask);
1128
void /*APIENTRY*/glClear (GLbitfield mask);
1125
extern(Windows) void /*APIENTRY*/glClearAccum (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
1129
void /*APIENTRY*/glClearAccum (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
1126
extern(Windows) void /*APIENTRY*/glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
1130
void /*APIENTRY*/glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
1127
extern(Windows) void /*APIENTRY*/glClearDepth (GLclampd depth);
1131
void /*APIENTRY*/glClearDepth (GLclampd depth);
1128
extern(Windows) void /*APIENTRY*/glClearIndex (GLfloat c);
1132
void /*APIENTRY*/glClearIndex (GLfloat c);
1129
extern(Windows) void /*APIENTRY*/glClearStencil (GLint s);
1133
void /*APIENTRY*/glClearStencil (GLint s);
1130
extern(Windows) void /*APIENTRY*/glClipPlane (GLenum plane, GLdouble *equation);
1134
void /*APIENTRY*/glClipPlane (GLenum plane, GLdouble *equation);
1131
extern(Windows) void /*APIENTRY*/glColor3b (GLbyte red, GLbyte green, GLbyte blue);
1135
void /*APIENTRY*/glColor3b (GLbyte red, GLbyte green, GLbyte blue);
1132
extern(Windows) void /*APIENTRY*/glColor3bv (GLbyte *v);
1136
void /*APIENTRY*/glColor3bv (GLbyte *v);
1133
extern(Windows) void /*APIENTRY*/glColor3d (GLdouble red, GLdouble green, GLdouble blue);
1137
void /*APIENTRY*/glColor3d (GLdouble red, GLdouble green, GLdouble blue);
1134
extern(Windows) void /*APIENTRY*/glColor3dv (GLdouble *v);
1138
void /*APIENTRY*/glColor3dv (GLdouble *v);
1135
extern(Windows) void /*APIENTRY*/glColor3f (GLfloat red, GLfloat green, GLfloat blue);
1139
void /*APIENTRY*/glColor3f (GLfloat red, GLfloat green, GLfloat blue);
1136
extern(Windows) void /*APIENTRY*/glColor3fv (GLfloat *v);
1140
void /*APIENTRY*/glColor3fv (GLfloat *v);
1137
extern(Windows) void /*APIENTRY*/glColor3i (GLint red, GLint green, GLint blue);
1141
void /*APIENTRY*/glColor3i (GLint red, GLint green, GLint blue);
1138
extern(Windows) void /*APIENTRY*/glColor3iv (GLint *v);
1142
void /*APIENTRY*/glColor3iv (GLint *v);
1139
extern(Windows) void /*APIENTRY*/glColor3s (GLshort red, GLshort green, GLshort blue);
1143
void /*APIENTRY*/glColor3s (GLshort red, GLshort green, GLshort blue);
1140
extern(Windows) void /*APIENTRY*/glColor3sv (GLshort *v);
1144
void /*APIENTRY*/glColor3sv (GLshort *v);
1141
extern(Windows) void /*APIENTRY*/glColor3ub (GLubyte red, GLubyte green, GLubyte blue);
1145
void /*APIENTRY*/glColor3ub (GLubyte red, GLubyte green, GLubyte blue);
1142
extern(Windows) void /*APIENTRY*/glColor3ubv (GLubyte *v);
1146
void /*APIENTRY*/glColor3ubv (GLubyte *v);
1143
extern(Windows) void /*APIENTRY*/glColor3ui (GLuint red, GLuint green, GLuint blue);
1147
void /*APIENTRY*/glColor3ui (GLuint red, GLuint green, GLuint blue);
1144
extern(Windows) void /*APIENTRY*/glColor3uiv (GLuint *v);
1148
void /*APIENTRY*/glColor3uiv (GLuint *v);
1145
extern(Windows) void /*APIENTRY*/glColor3us (GLushort red, GLushort green, GLushort blue);
1149
void /*APIENTRY*/glColor3us (GLushort red, GLushort green, GLushort blue);
1146
extern(Windows) void /*APIENTRY*/glColor3usv (GLushort *v);
1150
void /*APIENTRY*/glColor3usv (GLushort *v);
1147
extern(Windows) void /*APIENTRY*/glColor4b (GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
1151
void /*APIENTRY*/glColor4b (GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
1148
extern(Windows) void /*APIENTRY*/glColor4bv (GLbyte *v);
1152
void /*APIENTRY*/glColor4bv (GLbyte *v);
1149
extern(Windows) void /*APIENTRY*/glColor4d (GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
1153
void /*APIENTRY*/glColor4d (GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
1150
extern(Windows) void /*APIENTRY*/glColor4dv (GLdouble *v);
1154
void /*APIENTRY*/glColor4dv (GLdouble *v);
1151
extern(Windows) void /*APIENTRY*/glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
1155
void /*APIENTRY*/glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
1152
extern(Windows) void /*APIENTRY*/glColor4fv (GLfloat *v);
1156
void /*APIENTRY*/glColor4fv (GLfloat *v);
1153
extern(Windows) void /*APIENTRY*/glColor4i (GLint red, GLint green, GLint blue, GLint alpha);
1157
void /*APIENTRY*/glColor4i (GLint red, GLint green, GLint blue, GLint alpha);
1154
extern(Windows) void /*APIENTRY*/glColor4iv (GLint *v);
1158
void /*APIENTRY*/glColor4iv (GLint *v);
1155
extern(Windows) void /*APIENTRY*/glColor4s (GLshort red, GLshort green, GLshort blue, GLshort alpha);
1159
void /*APIENTRY*/glColor4s (GLshort red, GLshort green, GLshort blue, GLshort alpha);
1156
extern(Windows) void /*APIENTRY*/glColor4sv (GLshort *v);
1160
void /*APIENTRY*/glColor4sv (GLshort *v);
1157
extern(Windows) void /*APIENTRY*/glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
1161
void /*APIENTRY*/glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
1158
extern(Windows) void /*APIENTRY*/glColor4ubv (GLubyte *v);
1162
void /*APIENTRY*/glColor4ubv (GLubyte *v);
1159
extern(Windows) void /*APIENTRY*/glColor4ui (GLuint red, GLuint green, GLuint blue, GLuint alpha);
1163
void /*APIENTRY*/glColor4ui (GLuint red, GLuint green, GLuint blue, GLuint alpha);
1160
extern(Windows) void /*APIENTRY*/glColor4uiv (GLuint *v);
1164
void /*APIENTRY*/glColor4uiv (GLuint *v);
1161
extern(Windows) void /*APIENTRY*/glColor4us (GLushort red, GLushort green, GLushort blue, GLushort alpha);
1165
void /*APIENTRY*/glColor4us (GLushort red, GLushort green, GLushort blue, GLushort alpha);
1162
extern(Windows) void /*APIENTRY*/glColor4usv (GLushort *v);
1166
void /*APIENTRY*/glColor4usv (GLushort *v);
1163
extern(Windows) void /*APIENTRY*/glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
1167
void /*APIENTRY*/glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
1164
extern(Windows) void /*APIENTRY*/glColorMaterial (GLenum face, GLenum mode);
1168
void /*APIENTRY*/glColorMaterial (GLenum face, GLenum mode);
1165
extern(Windows) void /*APIENTRY*/glColorPointer (GLint size, GLenum type, GLsizei stride, GLvoid *pointer);
1169
void /*APIENTRY*/glColorPointer (GLint size, GLenum type, GLsizei stride, GLvoid *pointer);
1166
extern(Windows) void /*APIENTRY*/glCopyPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
1170
void /*APIENTRY*/glCopyPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
1167
extern(Windows) void /*APIENTRY*/glCopyTexImage1D (GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border);
1171
void /*APIENTRY*/glCopyTexImage1D (GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border);
1168
extern(Windows) void /*APIENTRY*/glCopyTexImage2D (GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
1172
void /*APIENTRY*/glCopyTexImage2D (GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
1169
extern(Windows) void /*APIENTRY*/glCopyTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
1173
void /*APIENTRY*/glCopyTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
1170
extern(Windows) void /*APIENTRY*/glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
1174
void /*APIENTRY*/glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
1171
extern(Windows) void /*APIENTRY*/glCullFace (GLenum mode);
1175
void /*APIENTRY*/glCullFace (GLenum mode);
1172
extern(Windows) void /*APIENTRY*/glDeleteLists (GLuint list, GLsizei range);
1176
void /*APIENTRY*/glDeleteLists (GLuint list, GLsizei range);
1173
extern(Windows) void /*APIENTRY*/glDeleteTextures (GLsizei n, GLuint *textures);
1177
void /*APIENTRY*/glDeleteTextures (GLsizei n, GLuint *textures);
1174
extern(Windows) void /*APIENTRY*/glDepthFunc (GLenum func);
1178
void /*APIENTRY*/glDepthFunc (GLenum func);
1175
extern(Windows) void /*APIENTRY*/glDepthMask (GLboolean flag);
1179
void /*APIENTRY*/glDepthMask (GLboolean flag);
1176
extern(Windows) void /*APIENTRY*/glDepthRange (GLclampd zNear, GLclampd zFar);
1180
void /*APIENTRY*/glDepthRange (GLclampd zNear, GLclampd zFar);
1177
extern(Windows) void /*APIENTRY*/glDisable (GLenum cap);
1181
void /*APIENTRY*/glDisable (GLenum cap);
1178
extern(Windows) void /*APIENTRY*/glDisableClientState (GLenum array);
1182
void /*APIENTRY*/glDisableClientState (GLenum array);
1179
extern(Windows) void /*APIENTRY*/glDrawArrays (GLenum mode, GLint first, GLsizei count);
1183
void /*APIENTRY*/glDrawArrays (GLenum mode, GLint first, GLsizei count);
1180
extern(Windows) void /*APIENTRY*/glDrawBuffer (GLenum mode);
1184
void /*APIENTRY*/glDrawBuffer (GLenum mode);
1181
extern(Windows) void /*APIENTRY*/glDrawElements (GLenum mode, GLsizei count, GLenum type, GLvoid *indices);
1185
void /*APIENTRY*/glDrawElements (GLenum mode, GLsizei count, GLenum type, GLvoid *indices);
1182
extern(Windows) void /*APIENTRY*/glDrawPixels (GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
1186
void /*APIENTRY*/glDrawPixels (GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
1183
extern(Windows) void /*APIENTRY*/glEdgeFlag (GLboolean flag);
1187
void /*APIENTRY*/glEdgeFlag (GLboolean flag);
1184
extern(Windows) void /*APIENTRY*/glEdgeFlagPointer (GLsizei stride, GLvoid *pointer);
1188
void /*APIENTRY*/glEdgeFlagPointer (GLsizei stride, GLvoid *pointer);
1185
extern(Windows) void /*APIENTRY*/glEdgeFlagv (GLboolean *flag);
1189
void /*APIENTRY*/glEdgeFlagv (GLboolean *flag);
1186
extern(Windows) void /*APIENTRY*/glEnable (GLenum cap);
1190
void /*APIENTRY*/glEnable (GLenum cap);
1187
extern(Windows) void /*APIENTRY*/glEnableClientState (GLenum array);
1191
void /*APIENTRY*/glEnableClientState (GLenum array);
1188
extern(Windows) void /*APIENTRY*/glEnd ();
1192
void /*APIENTRY*/glEnd ();
1189
extern(Windows) void /*APIENTRY*/glEndList ();
1193
void /*APIENTRY*/glEndList ();
1190
extern(Windows) void /*APIENTRY*/glEvalCoord1d (GLdouble u);
1194
void /*APIENTRY*/glEvalCoord1d (GLdouble u);
1191
extern(Windows) void /*APIENTRY*/glEvalCoord1dv (GLdouble *u);
1195
void /*APIENTRY*/glEvalCoord1dv (GLdouble *u);
1192
extern(Windows) void /*APIENTRY*/glEvalCoord1f (GLfloat u);
1196
void /*APIENTRY*/glEvalCoord1f (GLfloat u);
1193
extern(Windows) void /*APIENTRY*/glEvalCoord1fv (GLfloat *u);
1197
void /*APIENTRY*/glEvalCoord1fv (GLfloat *u);
1194
extern(Windows) void /*APIENTRY*/glEvalCoord2d (GLdouble u, GLdouble v);
1198
void /*APIENTRY*/glEvalCoord2d (GLdouble u, GLdouble v);
1195
extern(Windows) void /*APIENTRY*/glEvalCoord2dv (GLdouble *u);
1199
void /*APIENTRY*/glEvalCoord2dv (GLdouble *u);
1196
extern(Windows) void /*APIENTRY*/glEvalCoord2f (GLfloat u, GLfloat v);
1200
void /*APIENTRY*/glEvalCoord2f (GLfloat u, GLfloat v);
1197
extern(Windows) void /*APIENTRY*/glEvalCoord2fv (GLfloat *u);
1201
void /*APIENTRY*/glEvalCoord2fv (GLfloat *u);
1198
extern(Windows) void /*APIENTRY*/glEvalMesh1 (GLenum mode, GLint i1, GLint i2);
1202
void /*APIENTRY*/glEvalMesh1 (GLenum mode, GLint i1, GLint i2);
1199
extern(Windows) void /*APIENTRY*/glEvalMesh2 (GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
1203
void /*APIENTRY*/glEvalMesh2 (GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
1200
extern(Windows) void /*APIENTRY*/glEvalPoint1 (GLint i);
1204
void /*APIENTRY*/glEvalPoint1 (GLint i);
1201
extern(Windows) void /*APIENTRY*/glEvalPoint2 (GLint i, GLint j);
1205
void /*APIENTRY*/glEvalPoint2 (GLint i, GLint j);
1202
extern(Windows) void /*APIENTRY*/glFeedbackBuffer (GLsizei size, GLenum type, GLfloat *buffer);
1206
void /*APIENTRY*/glFeedbackBuffer (GLsizei size, GLenum type, GLfloat *buffer);
1203
extern(Windows) void /*APIENTRY*/glFinish ();
1207
void /*APIENTRY*/glFinish ();
1204
extern(Windows) void /*APIENTRY*/glFlush ();
1208
void /*APIENTRY*/glFlush ();
1205
extern(Windows) void /*APIENTRY*/glFogf (GLenum pname, GLfloat param);
1209
void /*APIENTRY*/glFogf (GLenum pname, GLfloat param);
1206
extern(Windows) void /*APIENTRY*/glFogfv (GLenum pname, GLfloat *params);
1210
void /*APIENTRY*/glFogfv (GLenum pname, GLfloat *params);
1207
extern(Windows) void /*APIENTRY*/glFogi (GLenum pname, GLint param);
1211
void /*APIENTRY*/glFogi (GLenum pname, GLint param);
1208
extern(Windows) void /*APIENTRY*/glFogiv (GLenum pname, GLint *params);
1212
void /*APIENTRY*/glFogiv (GLenum pname, GLint *params);
1209
extern(Windows) void /*APIENTRY*/glFrontFace (GLenum mode);
1213
void /*APIENTRY*/glFrontFace (GLenum mode);
1210
extern(Windows) void /*APIENTRY*/glFrustum (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
1214
void /*APIENTRY*/glFrustum (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
1211
extern(Windows) GLuint /*APIENTRY*/glGenLists (GLsizei range);
1215
GLuint /*APIENTRY*/glGenLists (GLsizei range);
1212
extern(Windows) void /*APIENTRY*/glGenTextures (GLsizei n, GLuint *textures);
1216
void /*APIENTRY*/glGenTextures (GLsizei n, GLuint *textures);
1213
extern(Windows) void /*APIENTRY*/glGetBooleanv (GLenum pname, GLboolean *params);
1217
void /*APIENTRY*/glGetBooleanv (GLenum pname, GLboolean *params);
1214
extern(Windows) void /*APIENTRY*/glGetClipPlane (GLenum plane, GLdouble *equation);
1218
void /*APIENTRY*/glGetClipPlane (GLenum plane, GLdouble *equation);
1215
extern(Windows) void /*APIENTRY*/glGetDoublev (GLenum pname, GLdouble *params);
1219
void /*APIENTRY*/glGetDoublev (GLenum pname, GLdouble *params);
1216
extern(Windows) GLenum /*APIENTRY*/glGetError ();
1220
GLenum /*APIENTRY*/glGetError ();
1217
extern(Windows) void /*APIENTRY*/glGetFloatv (GLenum pname, GLfloat *params);
1221
void /*APIENTRY*/glGetFloatv (GLenum pname, GLfloat *params);
1218
extern(Windows) void /*APIENTRY*/glGetIntegerv (GLenum pname, GLint *params);
1222
void /*APIENTRY*/glGetIntegerv (GLenum pname, GLint *params);
1219
extern(Windows) void /*APIENTRY*/glGetLightfv (GLenum light, GLenum pname, GLfloat *params);
1223
void /*APIENTRY*/glGetLightfv (GLenum light, GLenum pname, GLfloat *params);
1220
extern(Windows) void /*APIENTRY*/glGetLightiv (GLenum light, GLenum pname, GLint *params);
1224
void /*APIENTRY*/glGetLightiv (GLenum light, GLenum pname, GLint *params);
1221
extern(Windows) void /*APIENTRY*/glGetMapdv (GLenum target, GLenum query, GLdouble *v);
1225
void /*APIENTRY*/glGetMapdv (GLenum target, GLenum query, GLdouble *v);
1222
extern(Windows) void /*APIENTRY*/glGetMapfv (GLenum target, GLenum query, GLfloat *v);
1226
void /*APIENTRY*/glGetMapfv (GLenum target, GLenum query, GLfloat *v);
1223
extern(Windows) void /*APIENTRY*/glGetMapiv (GLenum target, GLenum query, GLint *v);
1227
void /*APIENTRY*/glGetMapiv (GLenum target, GLenum query, GLint *v);
1224
extern(Windows) void /*APIENTRY*/glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params);
1228
void /*APIENTRY*/glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params);
1225
extern(Windows) void /*APIENTRY*/glGetMaterialiv (GLenum face, GLenum pname, GLint *params);
1229
void /*APIENTRY*/glGetMaterialiv (GLenum face, GLenum pname, GLint *params);
1226
extern(Windows) void /*APIENTRY*/glGetPixelMapfv (GLenum map, GLfloat *values);
1230
void /*APIENTRY*/glGetPixelMapfv (GLenum map, GLfloat *values);
1227
extern(Windows) void /*APIENTRY*/glGetPixelMapuiv (GLenum map, GLuint *values);
1231
void /*APIENTRY*/glGetPixelMapuiv (GLenum map, GLuint *values);
1228
extern(Windows) void /*APIENTRY*/glGetPixelMapusv (GLenum map, GLushort *values);
1232
void /*APIENTRY*/glGetPixelMapusv (GLenum map, GLushort *values);
1229
extern(Windows) void /*APIENTRY*/glGetPointerv (GLenum pname, GLvoid* *params);
1233
void /*APIENTRY*/glGetPointerv (GLenum pname, GLvoid* *params);
1230
extern(Windows) void /*APIENTRY*/glGetPolygonStipple (GLubyte *mask);
1234
void /*APIENTRY*/glGetPolygonStipple (GLubyte *mask);
1231
extern(Windows) GLubyte * /*APIENTRY*/glGetString (GLenum name);
1235
GLubyte * /*APIENTRY*/glGetString (GLenum name);
1232
extern(Windows) void /*APIENTRY*/glGetTexEnvfv (GLenum target, GLenum pname, GLfloat *params);
1236
void /*APIENTRY*/glGetTexEnvfv (GLenum target, GLenum pname, GLfloat *params);
1233
extern(Windows) void /*APIENTRY*/glGetTexEnviv (GLenum target, GLenum pname, GLint *params);
1237
void /*APIENTRY*/glGetTexEnviv (GLenum target, GLenum pname, GLint *params);
1234
extern(Windows) void /*APIENTRY*/glGetTexGendv (GLenum coord, GLenum pname, GLdouble *params);
1238
void /*APIENTRY*/glGetTexGendv (GLenum coord, GLenum pname, GLdouble *params);
1235
extern(Windows) void /*APIENTRY*/glGetTexGenfv (GLenum coord, GLenum pname, GLfloat *params);
1239
void /*APIENTRY*/glGetTexGenfv (GLenum coord, GLenum pname, GLfloat *params);
1236
extern(Windows) void /*APIENTRY*/glGetTexGeniv (GLenum coord, GLenum pname, GLint *params);
1240
void /*APIENTRY*/glGetTexGeniv (GLenum coord, GLenum pname, GLint *params);
1237
extern(Windows) void /*APIENTRY*/glGetTexImage (GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);
1241
void /*APIENTRY*/glGetTexImage (GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);
1238
extern(Windows) void /*APIENTRY*/glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params);
1242
void /*APIENTRY*/glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params);
1239
extern(Windows) void /*APIENTRY*/glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params);
1243
void /*APIENTRY*/glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params);
1240
extern(Windows) void /*APIENTRY*/glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
1244
void /*APIENTRY*/glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
1241
extern(Windows) void /*APIENTRY*/glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
1245
void /*APIENTRY*/glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
1242
extern(Windows) void /*APIENTRY*/glHint (GLenum target, GLenum mode);
1246
void /*APIENTRY*/glHint (GLenum target, GLenum mode);
1243
extern(Windows) void /*APIENTRY*/glIndexMask (GLuint mask);
1247
void /*APIENTRY*/glIndexMask (GLuint mask);
1244
extern(Windows) void /*APIENTRY*/glIndexPointer (GLenum type, GLsizei stride, GLvoid *pointer);
1248
void /*APIENTRY*/glIndexPointer (GLenum type, GLsizei stride, GLvoid *pointer);
1245
extern(Windows) void /*APIENTRY*/glIndexd (GLdouble c);
1249
void /*APIENTRY*/glIndexd (GLdouble c);
1246
extern(Windows) void /*APIENTRY*/glIndexdv (GLdouble *c);
1250
void /*APIENTRY*/glIndexdv (GLdouble *c);
1247
extern(Windows) void /*APIENTRY*/glIndexf (GLfloat c);
1251
void /*APIENTRY*/glIndexf (GLfloat c);
1248
extern(Windows) void /*APIENTRY*/glIndexfv (GLfloat *c);
1252
void /*APIENTRY*/glIndexfv (GLfloat *c);
1249
extern(Windows) void /*APIENTRY*/glIndexi (GLint c);
1253
void /*APIENTRY*/glIndexi (GLint c);
1250
extern(Windows) void /*APIENTRY*/glIndexiv (GLint *c);
1254
void /*APIENTRY*/glIndexiv (GLint *c);
1251
extern(Windows) void /*APIENTRY*/glIndexs (GLshort c);
1255
void /*APIENTRY*/glIndexs (GLshort c);
1252
extern(Windows) void /*APIENTRY*/glIndexsv (GLshort *c);
1256
void /*APIENTRY*/glIndexsv (GLshort *c);
1253
extern(Windows) void /*APIENTRY*/glIndexub (GLubyte c);
1257
void /*APIENTRY*/glIndexub (GLubyte c);
1254
extern(Windows) void /*APIENTRY*/glIndexubv (GLubyte *c);
1258
void /*APIENTRY*/glIndexubv (GLubyte *c);
1255
extern(Windows) void /*APIENTRY*/glInitNames ();
1259
void /*APIENTRY*/glInitNames ();
1256
extern(Windows) void /*APIENTRY*/glInterleavedArrays (GLenum format, GLsizei stride, GLvoid *pointer);
1260
void /*APIENTRY*/glInterleavedArrays (GLenum format, GLsizei stride, GLvoid *pointer);
1257
extern(Windows) GLboolean /*APIENTRY*/glIsEnabled (GLenum cap);
1261
GLboolean /*APIENTRY*/glIsEnabled (GLenum cap);
1258
extern(Windows) GLboolean /*APIENTRY*/glIsList (GLuint list);
1262
GLboolean /*APIENTRY*/glIsList (GLuint list);
1259
extern(Windows) GLboolean /*APIENTRY*/glIsTexture (GLuint texture);
1263
GLboolean /*APIENTRY*/glIsTexture (GLuint texture);
1260
extern(Windows) void /*APIENTRY*/glLightModelf (GLenum pname, GLfloat param);
1264
void /*APIENTRY*/glLightModelf (GLenum pname, GLfloat param);
1261
extern(Windows) void /*APIENTRY*/glLightModelfv (GLenum pname, GLfloat *params);
1265
void /*APIENTRY*/glLightModelfv (GLenum pname, GLfloat *params);
1262
extern(Windows) void /*APIENTRY*/glLightModeli (GLenum pname, GLint param);
1266
void /*APIENTRY*/glLightModeli (GLenum pname, GLint param);
1263
extern(Windows) void /*APIENTRY*/glLightModeliv (GLenum pname, GLint *params);
1267
void /*APIENTRY*/glLightModeliv (GLenum pname, GLint *params);
1264
extern(Windows) void /*APIENTRY*/glLightf (GLenum light, GLenum pname, GLfloat param);
1268
void /*APIENTRY*/glLightf (GLenum light, GLenum pname, GLfloat param);
1265
extern(Windows) void /*APIENTRY*/glLightfv (GLenum light, GLenum pname, GLfloat *params);
1269
void /*APIENTRY*/glLightfv (GLenum light, GLenum pname, GLfloat *params);
1266
extern(Windows) void /*APIENTRY*/glLighti (GLenum light, GLenum pname, GLint param);
1270
void /*APIENTRY*/glLighti (GLenum light, GLenum pname, GLint param);
1267
extern(Windows) void /*APIENTRY*/glLightiv (GLenum light, GLenum pname, GLint *params);
1271
void /*APIENTRY*/glLightiv (GLenum light, GLenum pname, GLint *params);
1268
extern(Windows) void /*APIENTRY*/glLineStipple (GLint factor, GLushort pattern);
1272
void /*APIENTRY*/glLineStipple (GLint factor, GLushort pattern);
1269
extern(Windows) void /*APIENTRY*/glLineWidth (GLfloat width);
1273
void /*APIENTRY*/glLineWidth (GLfloat width);
1270
extern(Windows) void /*APIENTRY*/glListBase (GLuint base);
1274
void /*APIENTRY*/glListBase (GLuint base);
1271
extern(Windows) void /*APIENTRY*/glLoadIdentity ();
1275
void /*APIENTRY*/glLoadIdentity ();
1272
extern(Windows) void /*APIENTRY*/glLoadMatrixd (GLdouble *m);
1276
void /*APIENTRY*/glLoadMatrixd (GLdouble *m);
1273
extern(Windows) void /*APIENTRY*/glLoadMatrixf (GLfloat *m);
1277
void /*APIENTRY*/glLoadMatrixf (GLfloat *m);
1274
extern(Windows) void /*APIENTRY*/glLoadName (GLuint name);
1278
void /*APIENTRY*/glLoadName (GLuint name);
1275
extern(Windows) void /*APIENTRY*/glLogicOp (GLenum opcode);
1279
void /*APIENTRY*/glLogicOp (GLenum opcode);
1276
extern(Windows) void /*APIENTRY*/glMap1d (GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, GLdouble *points);
1280
void /*APIENTRY*/glMap1d (GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, GLdouble *points);
1277
extern(Windows) void /*APIENTRY*/glMap1f (GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, GLfloat *points);
1281
void /*APIENTRY*/glMap1f (GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, GLfloat *points);
1278
extern(Windows) void /*APIENTRY*/glMap2d (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble *points);
1282
void /*APIENTRY*/glMap2d (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble *points);
1279
extern(Windows) void /*APIENTRY*/glMap2f (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat *points);
1283
void /*APIENTRY*/glMap2f (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat *points);
1280
extern(Windows) void /*APIENTRY*/glMapGrid1d (GLint un, GLdouble u1, GLdouble u2);
1284
void /*APIENTRY*/glMapGrid1d (GLint un, GLdouble u1, GLdouble u2);
1281
extern(Windows) void /*APIENTRY*/glMapGrid1f (GLint un, GLfloat u1, GLfloat u2);
1285
void /*APIENTRY*/glMapGrid1f (GLint un, GLfloat u1, GLfloat u2);
1282
extern(Windows) void /*APIENTRY*/glMapGrid2d (GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);
1286
void /*APIENTRY*/glMapGrid2d (GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);
1283
extern(Windows) void /*APIENTRY*/glMapGrid2f (GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);
1287
void /*APIENTRY*/glMapGrid2f (GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);
1284
extern(Windows) void /*APIENTRY*/glMaterialf (GLenum face, GLenum pname, GLfloat param);
1288
void /*APIENTRY*/glMaterialf (GLenum face, GLenum pname, GLfloat param);
1285
extern(Windows) void /*APIENTRY*/glMaterialfv (GLenum face, GLenum pname, GLfloat *params);
1289
void /*APIENTRY*/glMaterialfv (GLenum face, GLenum pname, GLfloat *params);
1286
extern(Windows) void /*APIENTRY*/glMateriali (GLenum face, GLenum pname, GLint param);
1290
void /*APIENTRY*/glMateriali (GLenum face, GLenum pname, GLint param);
1287
extern(Windows) void /*APIENTRY*/glMaterialiv (GLenum face, GLenum pname, GLint *params);
1291
void /*APIENTRY*/glMaterialiv (GLenum face, GLenum pname, GLint *params);
1288
extern(Windows) void /*APIENTRY*/glMatrixMode (GLenum mode);
1292
void /*APIENTRY*/glMatrixMode (GLenum mode);
1289
extern(Windows) void /*APIENTRY*/glMultMatrixd (GLdouble *m);
1293
void /*APIENTRY*/glMultMatrixd (GLdouble *m);
1290
extern(Windows) void /*APIENTRY*/glMultMatrixf (GLfloat *m);
1294
void /*APIENTRY*/glMultMatrixf (GLfloat *m);
1291
extern(Windows) void /*APIENTRY*/glNewList (GLuint list, GLenum mode);
1295
void /*APIENTRY*/glNewList (GLuint list, GLenum mode);
1292
extern(Windows) void /*APIENTRY*/glNormal3b (GLbyte nx, GLbyte ny, GLbyte nz);
1296
void /*APIENTRY*/glNormal3b (GLbyte nx, GLbyte ny, GLbyte nz);
1293
extern(Windows) void /*APIENTRY*/glNormal3bv (GLbyte *v);
1297
void /*APIENTRY*/glNormal3bv (GLbyte *v);
1294
extern(Windows) void /*APIENTRY*/glNormal3d (GLdouble nx, GLdouble ny, GLdouble nz);
1298
void /*APIENTRY*/glNormal3d (GLdouble nx, GLdouble ny, GLdouble nz);
1295
extern(Windows) void /*APIENTRY*/glNormal3dv (GLdouble *v);
1299
void /*APIENTRY*/glNormal3dv (GLdouble *v);
1296
extern(Windows) void /*APIENTRY*/glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz);
1300
void /*APIENTRY*/glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz);
1297
extern(Windows) void /*APIENTRY*/glNormal3fv (GLfloat *v);
1301
void /*APIENTRY*/glNormal3fv (GLfloat *v);
1298
extern(Windows) void /*APIENTRY*/glNormal3i (GLint nx, GLint ny, GLint nz);
1302
void /*APIENTRY*/glNormal3i (GLint nx, GLint ny, GLint nz);
1299
extern(Windows) void /*APIENTRY*/glNormal3iv (GLint *v);
1303
void /*APIENTRY*/glNormal3iv (GLint *v);
1300
extern(Windows) void /*APIENTRY*/glNormal3s (GLshort nx, GLshort ny, GLshort nz);
1304
void /*APIENTRY*/glNormal3s (GLshort nx, GLshort ny, GLshort nz);
1301
extern(Windows) void /*APIENTRY*/glNormal3sv (GLshort *v);
1305
void /*APIENTRY*/glNormal3sv (GLshort *v);
1302
extern(Windows) void /*APIENTRY*/glNormalPointer (GLenum type, GLsizei stride, GLvoid *pointer);
1306
void /*APIENTRY*/glNormalPointer (GLenum type, GLsizei stride, GLvoid *pointer);
1303
extern(Windows) void /*APIENTRY*/glOrtho (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
1307
void /*APIENTRY*/glOrtho (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
1304
extern(Windows) void /*APIENTRY*/glPassThrough (GLfloat token);
1308
void /*APIENTRY*/glPassThrough (GLfloat token);
1305
extern(Windows) void /*APIENTRY*/glPixelMapfv (GLenum map, GLsizei mapsize, GLfloat *values);
1309
void /*APIENTRY*/glPixelMapfv (GLenum map, GLsizei mapsize, GLfloat *values);
1306
extern(Windows) void /*APIENTRY*/glPixelMapuiv (GLenum map, GLsizei mapsize, GLuint *values);
1310
void /*APIENTRY*/glPixelMapuiv (GLenum map, GLsizei mapsize, GLuint *values);
1307
extern(Windows) void /*APIENTRY*/glPixelMapusv (GLenum map, GLsizei mapsize, GLushort *values);
1311
void /*APIENTRY*/glPixelMapusv (GLenum map, GLsizei mapsize, GLushort *values);
1308
extern(Windows) void /*APIENTRY*/glPixelStoref (GLenum pname, GLfloat param);
1312
void /*APIENTRY*/glPixelStoref (GLenum pname, GLfloat param);
1309
extern(Windows) void /*APIENTRY*/glPixelStorei (GLenum pname, GLint param);
1313
void /*APIENTRY*/glPixelStorei (GLenum pname, GLint param);
1310
extern(Windows) void /*APIENTRY*/glPixelTransferf (GLenum pname, GLfloat param);
1314
void /*APIENTRY*/glPixelTransferf (GLenum pname, GLfloat param);
1311
extern(Windows) void /*APIENTRY*/glPixelTransferi (GLenum pname, GLint param);
1315
void /*APIENTRY*/glPixelTransferi (GLenum pname, GLint param);
1312
extern(Windows) void /*APIENTRY*/glPixelZoom (GLfloat xfactor, GLfloat yfactor);
1316
void /*APIENTRY*/glPixelZoom (GLfloat xfactor, GLfloat yfactor);
1313
extern(Windows) void /*APIENTRY*/glPointSize (GLfloat size);
1317
void /*APIENTRY*/glPointSize (GLfloat size);
1314
extern(Windows) void /*APIENTRY*/glPolygonMode (GLenum face, GLenum mode);
1318
void /*APIENTRY*/glPolygonMode (GLenum face, GLenum mode);
1315
extern(Windows) void /*APIENTRY*/glPolygonOffset (GLfloat factor, GLfloat units);
1319
void /*APIENTRY*/glPolygonOffset (GLfloat factor, GLfloat units);
1316
extern(Windows) void /*APIENTRY*/glPolygonStipple (GLubyte *mask);
1320
void /*APIENTRY*/glPolygonStipple (GLubyte *mask);
1317
extern(Windows) void /*APIENTRY*/glPopAttrib ();
1321
void /*APIENTRY*/glPopAttrib ();
1318
extern(Windows) void /*APIENTRY*/glPopClientAttrib ();
1322
void /*APIENTRY*/glPopClientAttrib ();
1319
extern(Windows) void /*APIENTRY*/glPopMatrix ();
1323
void /*APIENTRY*/glPopMatrix ();
1320
extern(Windows) void /*APIENTRY*/glPopName ();
1324
void /*APIENTRY*/glPopName ();
1321
extern(Windows) void /*APIENTRY*/glPrioritizeTextures (GLsizei n, GLuint *textures, GLclampf *priorities);
1325
void /*APIENTRY*/glPrioritizeTextures (GLsizei n, GLuint *textures, GLclampf *priorities);
1322
extern(Windows) void /*APIENTRY*/glPushAttrib (GLbitfield mask);
1326
void /*APIENTRY*/glPushAttrib (GLbitfield mask);
1323
extern(Windows) void /*APIENTRY*/glPushClientAttrib (GLbitfield mask);
1327
void /*APIENTRY*/glPushClientAttrib (GLbitfield mask);
1324
extern(Windows) void /*APIENTRY*/glPushMatrix ();
1328
void /*APIENTRY*/glPushMatrix ();
1325
extern(Windows) void /*APIENTRY*/glPushName (GLuint name);
1329
void /*APIENTRY*/glPushName (GLuint name);
1326
extern(Windows) void /*APIENTRY*/glRasterPos2d (GLdouble x, GLdouble y);
1330
void /*APIENTRY*/glRasterPos2d (GLdouble x, GLdouble y);
1327
extern(Windows) void /*APIENTRY*/glRasterPos2dv (GLdouble *v);
1331
void /*APIENTRY*/glRasterPos2dv (GLdouble *v);
1328
extern(Windows) void /*APIENTRY*/glRasterPos2f (GLfloat x, GLfloat y);
1332
void /*APIENTRY*/glRasterPos2f (GLfloat x, GLfloat y);
1329
extern(Windows) void /*APIENTRY*/glRasterPos2fv (GLfloat *v);
1333
void /*APIENTRY*/glRasterPos2fv (GLfloat *v);
1330
extern(Windows) void /*APIENTRY*/glRasterPos2i (GLint x, GLint y);
1334
void /*APIENTRY*/glRasterPos2i (GLint x, GLint y);
1331
extern(Windows) void /*APIENTRY*/glRasterPos2iv (GLint *v);
1335
void /*APIENTRY*/glRasterPos2iv (GLint *v);
1332
extern(Windows) void /*APIENTRY*/glRasterPos2s (GLshort x, GLshort y);
1336
void /*APIENTRY*/glRasterPos2s (GLshort x, GLshort y);
1333
extern(Windows) void /*APIENTRY*/glRasterPos2sv (GLshort *v);
1337
void /*APIENTRY*/glRasterPos2sv (GLshort *v);
1334
extern(Windows) void /*APIENTRY*/glRasterPos3d (GLdouble x, GLdouble y, GLdouble z);
1338
void /*APIENTRY*/glRasterPos3d (GLdouble x, GLdouble y, GLdouble z);
1335
extern(Windows) void /*APIENTRY*/glRasterPos3dv (GLdouble *v);
1339
void /*APIENTRY*/glRasterPos3dv (GLdouble *v);
1336
extern(Windows) void /*APIENTRY*/glRasterPos3f (GLfloat x, GLfloat y, GLfloat z);
1340
void /*APIENTRY*/glRasterPos3f (GLfloat x, GLfloat y, GLfloat z);
1337
extern(Windows) void /*APIENTRY*/glRasterPos3fv (GLfloat *v);
1341
void /*APIENTRY*/glRasterPos3fv (GLfloat *v);
1338
extern(Windows) void /*APIENTRY*/glRasterPos3i (GLint x, GLint y, GLint z);
1342
void /*APIENTRY*/glRasterPos3i (GLint x, GLint y, GLint z);
1339
extern(Windows) void /*APIENTRY*/glRasterPos3iv (GLint *v);
1343
void /*APIENTRY*/glRasterPos3iv (GLint *v);
1340
extern(Windows) void /*APIENTRY*/glRasterPos3s (GLshort x, GLshort y, GLshort z);
1344
void /*APIENTRY*/glRasterPos3s (GLshort x, GLshort y, GLshort z);
1341
extern(Windows) void /*APIENTRY*/glRasterPos3sv (GLshort *v);
1345
void /*APIENTRY*/glRasterPos3sv (GLshort *v);
1342
extern(Windows) void /*APIENTRY*/glRasterPos4d (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
1346
void /*APIENTRY*/glRasterPos4d (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
1343
extern(Windows) void /*APIENTRY*/glRasterPos4dv (GLdouble *v);
1347
void /*APIENTRY*/glRasterPos4dv (GLdouble *v);
1344
extern(Windows) void /*APIENTRY*/glRasterPos4f (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
1348
void /*APIENTRY*/glRasterPos4f (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
1345
extern(Windows) void /*APIENTRY*/glRasterPos4fv (GLfloat *v);
1349
void /*APIENTRY*/glRasterPos4fv (GLfloat *v);
1346
extern(Windows) void /*APIENTRY*/glRasterPos4i (GLint x, GLint y, GLint z, GLint w);
1350
void /*APIENTRY*/glRasterPos4i (GLint x, GLint y, GLint z, GLint w);
1347
extern(Windows) void /*APIENTRY*/glRasterPos4iv (GLint *v);
1351
void /*APIENTRY*/glRasterPos4iv (GLint *v);
1348
extern(Windows) void /*APIENTRY*/glRasterPos4s (GLshort x, GLshort y, GLshort z, GLshort w);
1352
void /*APIENTRY*/glRasterPos4s (GLshort x, GLshort y, GLshort z, GLshort w);
1349
extern(Windows) void /*APIENTRY*/glRasterPos4sv (GLshort *v);
1353
void /*APIENTRY*/glRasterPos4sv (GLshort *v);
1350
extern(Windows) void /*APIENTRY*/glReadBuffer (GLenum mode);
1354
void /*APIENTRY*/glReadBuffer (GLenum mode);
1351
extern(Windows) void /*APIENTRY*/glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
1355
void /*APIENTRY*/glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
1352
extern(Windows) void /*APIENTRY*/glRectd (GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
1356
void /*APIENTRY*/glRectd (GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
1353
extern(Windows) void /*APIENTRY*/glRectdv (GLdouble *v1, GLdouble *v2);
1357
void /*APIENTRY*/glRectdv (GLdouble *v1, GLdouble *v2);
1354
extern(Windows) void /*APIENTRY*/glRectf (GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
1358
void /*APIENTRY*/glRectf (GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
1355
extern(Windows) void /*APIENTRY*/glRectfv (GLfloat *v1, GLfloat *v2);
1359
void /*APIENTRY*/glRectfv (GLfloat *v1, GLfloat *v2);
1356
extern(Windows) void /*APIENTRY*/glRecti (GLint x1, GLint y1, GLint x2, GLint y2);
1360
void /*APIENTRY*/glRecti (GLint x1, GLint y1, GLint x2, GLint y2);
1357
extern(Windows) void /*APIENTRY*/glRectiv (GLint *v1, GLint *v2);
1361
void /*APIENTRY*/glRectiv (GLint *v1, GLint *v2);
1358
extern(Windows) void /*APIENTRY*/glRects (GLshort x1, GLshort y1, GLshort x2, GLshort y2);
1362
void /*APIENTRY*/glRects (GLshort x1, GLshort y1, GLshort x2, GLshort y2);
1359
extern(Windows) void /*APIENTRY*/glRectsv (GLshort *v1, GLshort *v2);
1363
void /*APIENTRY*/glRectsv (GLshort *v1, GLshort *v2);
1360
extern(Windows) GLint /*APIENTRY*/glRenderMode (GLenum mode);
1364
GLint /*APIENTRY*/glRenderMode (GLenum mode);
1361
extern(Windows) void /*APIENTRY*/glRotated (GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
1365
void /*APIENTRY*/glRotated (GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
1362
extern(Windows) void /*APIENTRY*/glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
1366
void /*APIENTRY*/glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
1363
extern(Windows) void /*APIENTRY*/glScaled (GLdouble x, GLdouble y, GLdouble z);
1367
void /*APIENTRY*/glScaled (GLdouble x, GLdouble y, GLdouble z);
1364
extern(Windows) void /*APIENTRY*/glScalef (GLfloat x, GLfloat y, GLfloat z);
1368
void /*APIENTRY*/glScalef (GLfloat x, GLfloat y, GLfloat z);
1365
extern(Windows) void /*APIENTRY*/glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
1369
void /*APIENTRY*/glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
1366
extern(Windows) void /*APIENTRY*/glSelectBuffer (GLsizei size, GLuint *buffer);
1370
void /*APIENTRY*/glSelectBuffer (GLsizei size, GLuint *buffer);
1367
extern(Windows) void /*APIENTRY*/glShadeModel (GLenum mode);
1371
void /*APIENTRY*/glShadeModel (GLenum mode);
1368
extern(Windows) void /*APIENTRY*/glStencilFunc (GLenum func, GLint ref, GLuint mask);
1372
void /*APIENTRY*/glStencilFunc (GLenum func, GLint ref, GLuint mask);
1369
extern(Windows) void /*APIENTRY*/glStencilMask (GLuint mask);
1373
void /*APIENTRY*/glStencilMask (GLuint mask);
1370
extern(Windows) void /*APIENTRY*/glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
1374
void /*APIENTRY*/glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
1371
extern(Windows) void /*APIENTRY*/glTexCoord1d (GLdouble s);
1375
void /*APIENTRY*/glTexCoord1d (GLdouble s);
1372
extern(Windows) void /*APIENTRY*/glTexCoord1dv (GLdouble *v);
1376
void /*APIENTRY*/glTexCoord1dv (GLdouble *v);
1373
extern(Windows) void /*APIENTRY*/glTexCoord1f (GLfloat s);
1377
void /*APIENTRY*/glTexCoord1f (GLfloat s);
1374
extern(Windows) void /*APIENTRY*/glTexCoord1fv (GLfloat *v);
1378
void /*APIENTRY*/glTexCoord1fv (GLfloat *v);
1375
extern(Windows) void /*APIENTRY*/glTexCoord1i (GLint s);
1379
void /*APIENTRY*/glTexCoord1i (GLint s);
1376
extern(Windows) void /*APIENTRY*/glTexCoord1iv (GLint *v);
1380
void /*APIENTRY*/glTexCoord1iv (GLint *v);
1377
extern(Windows) void /*APIENTRY*/glTexCoord1s (GLshort s);
1381
void /*APIENTRY*/glTexCoord1s (GLshort s);
1378
extern(Windows) void /*APIENTRY*/glTexCoord1sv (GLshort *v);
1382
void /*APIENTRY*/glTexCoord1sv (GLshort *v);
1379
extern(Windows) void /*APIENTRY*/glTexCoord2d (GLdouble s, GLdouble t);
1383
void /*APIENTRY*/glTexCoord2d (GLdouble s, GLdouble t);
1380
extern(Windows) void /*APIENTRY*/glTexCoord2dv (GLdouble *v);
1384
void /*APIENTRY*/glTexCoord2dv (GLdouble *v);
1381
extern(Windows) void /*APIENTRY*/glTexCoord2f (GLfloat s, GLfloat t);
1385
void /*APIENTRY*/glTexCoord2f (GLfloat s, GLfloat t);
1382
extern(Windows) void /*APIENTRY*/glTexCoord2fv (GLfloat *v);
1386
void /*APIENTRY*/glTexCoord2fv (GLfloat *v);
1383
extern(Windows) void /*APIENTRY*/glTexCoord2i (GLint s, GLint t);
1387
void /*APIENTRY*/glTexCoord2i (GLint s, GLint t);
1384
extern(Windows) void /*APIENTRY*/glTexCoord2iv (GLint *v);
1388
void /*APIENTRY*/glTexCoord2iv (GLint *v);
1385
extern(Windows) void /*APIENTRY*/glTexCoord2s (GLshort s, GLshort t);
1389
void /*APIENTRY*/glTexCoord2s (GLshort s, GLshort t);
1386
extern(Windows) void /*APIENTRY*/glTexCoord2sv (GLshort *v);
1390
void /*APIENTRY*/glTexCoord2sv (GLshort *v);
1387
extern(Windows) void /*APIENTRY*/glTexCoord3d (GLdouble s, GLdouble t, GLdouble r);
1391
void /*APIENTRY*/glTexCoord3d (GLdouble s, GLdouble t, GLdouble r);
1388
extern(Windows) void /*APIENTRY*/glTexCoord3dv (GLdouble *v);
1392
void /*APIENTRY*/glTexCoord3dv (GLdouble *v);
1389
extern(Windows) void /*APIENTRY*/glTexCoord3f (GLfloat s, GLfloat t, GLfloat r);
1393
void /*APIENTRY*/glTexCoord3f (GLfloat s, GLfloat t, GLfloat r);
1390
extern(Windows) void /*APIENTRY*/glTexCoord3fv (GLfloat *v);
1394
void /*APIENTRY*/glTexCoord3fv (GLfloat *v);
1391
extern(Windows) void /*APIENTRY*/glTexCoord3i (GLint s, GLint t, GLint r);
1395
void /*APIENTRY*/glTexCoord3i (GLint s, GLint t, GLint r);
1392
extern(Windows) void /*APIENTRY*/glTexCoord3iv (GLint *v);
1396
void /*APIENTRY*/glTexCoord3iv (GLint *v);
1393
extern(Windows) void /*APIENTRY*/glTexCoord3s (GLshort s, GLshort t, GLshort r);
1397
void /*APIENTRY*/glTexCoord3s (GLshort s, GLshort t, GLshort r);
1394
extern(Windows) void /*APIENTRY*/glTexCoord3sv (GLshort *v);
1398
void /*APIENTRY*/glTexCoord3sv (GLshort *v);
1395
extern(Windows) void /*APIENTRY*/glTexCoord4d (GLdouble s, GLdouble t, GLdouble r, GLdouble q);
1399
void /*APIENTRY*/glTexCoord4d (GLdouble s, GLdouble t, GLdouble r, GLdouble q);
1396
extern(Windows) void /*APIENTRY*/glTexCoord4dv (GLdouble *v);
1400
void /*APIENTRY*/glTexCoord4dv (GLdouble *v);
1397
extern(Windows) void /*APIENTRY*/glTexCoord4f (GLfloat s, GLfloat t, GLfloat r, GLfloat q);
1401
void /*APIENTRY*/glTexCoord4f (GLfloat s, GLfloat t, GLfloat r, GLfloat q);
1398
extern(Windows) void /*APIENTRY*/glTexCoord4fv (GLfloat *v);
1402
void /*APIENTRY*/glTexCoord4fv (GLfloat *v);
1399
extern(Windows) void /*APIENTRY*/glTexCoord4i (GLint s, GLint t, GLint r, GLint q);
1403
void /*APIENTRY*/glTexCoord4i (GLint s, GLint t, GLint r, GLint q);
1400
extern(Windows) void /*APIENTRY*/glTexCoord4iv (GLint *v);
1404
void /*APIENTRY*/glTexCoord4iv (GLint *v);
1401
extern(Windows) void /*APIENTRY*/glTexCoord4s (GLshort s, GLshort t, GLshort r, GLshort q);
1405
void /*APIENTRY*/glTexCoord4s (GLshort s, GLshort t, GLshort r, GLshort q);
1402
extern(Windows) void /*APIENTRY*/glTexCoord4sv (GLshort *v);
1406
void /*APIENTRY*/glTexCoord4sv (GLshort *v);
1403
extern(Windows) void /*APIENTRY*/glTexCoordPointer (GLint size, GLenum type, GLsizei stride, GLvoid *pointer);
1407
void /*APIENTRY*/glTexCoordPointer (GLint size, GLenum type, GLsizei stride, GLvoid *pointer);
1404
extern(Windows) void /*APIENTRY*/glTexEnvf (GLenum target, GLenum pname, GLfloat param);
1408
void /*APIENTRY*/glTexEnvf (GLenum target, GLenum pname, GLfloat param);
1405
extern(Windows) void /*APIENTRY*/glTexEnvfv (GLenum target, GLenum pname, GLfloat *params);
1409
void /*APIENTRY*/glTexEnvfv (GLenum target, GLenum pname, GLfloat *params);
1406
extern(Windows) void /*APIENTRY*/glTexEnvi (GLenum target, GLenum pname, GLint param);
1410
void /*APIENTRY*/glTexEnvi (GLenum target, GLenum pname, GLint param);
1407
extern(Windows) void /*APIENTRY*/glTexEnviv (GLenum target, GLenum pname, GLint *params);
1411
void /*APIENTRY*/glTexEnviv (GLenum target, GLenum pname, GLint *params);
1408
extern(Windows) void /*APIENTRY*/glTexGend (GLenum coord, GLenum pname, GLdouble param);
1412
void /*APIENTRY*/glTexGend (GLenum coord, GLenum pname, GLdouble param);
1409
extern(Windows) void /*APIENTRY*/glTexGendv (GLenum coord, GLenum pname, GLdouble *params);
1413
void /*APIENTRY*/glTexGendv (GLenum coord, GLenum pname, GLdouble *params);
1410
extern(Windows) void /*APIENTRY*/glTexGenf (GLenum coord, GLenum pname, GLfloat param);
1414
void /*APIENTRY*/glTexGenf (GLenum coord, GLenum pname, GLfloat param);
1411
extern(Windows) void /*APIENTRY*/glTexGenfv (GLenum coord, GLenum pname, GLfloat *params);
1415
void /*APIENTRY*/glTexGenfv (GLenum coord, GLenum pname, GLfloat *params);
1412
extern(Windows) void /*APIENTRY*/glTexGeni (GLenum coord, GLenum pname, GLint param);
1416
void /*APIENTRY*/glTexGeni (GLenum coord, GLenum pname, GLint param);
1413
extern(Windows) void /*APIENTRY*/glTexGeniv (GLenum coord, GLenum pname, GLint *params);
1417
void /*APIENTRY*/glTexGeniv (GLenum coord, GLenum pname, GLint *params);
1414
extern(Windows) void /*APIENTRY*/glTexImage1D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, GLvoid *pixels);
1418
void /*APIENTRY*/glTexImage1D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, GLvoid *pixels);
1415
extern(Windows) void /*APIENTRY*/glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, GLvoid *pixels);
1419
void /*APIENTRY*/glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, GLvoid *pixels);
1416
extern(Windows) void /*APIENTRY*/glTexParameterf (GLenum target, GLenum pname, GLfloat param);
1420
void /*APIENTRY*/glTexParameterf (GLenum target, GLenum pname, GLfloat param);
1417
extern(Windows) void /*APIENTRY*/glTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
1421
void /*APIENTRY*/glTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
1418
extern(Windows) void /*APIENTRY*/glTexParameteri (GLenum target, GLenum pname, GLint param);
1422
void /*APIENTRY*/glTexParameteri (GLenum target, GLenum pname, GLint param);
1419
extern(Windows) void /*APIENTRY*/glTexParameteriv (GLenum target, GLenum pname, GLint *params);
1423
void /*APIENTRY*/glTexParameteriv (GLenum target, GLenum pname, GLint *params);
1420
extern(Windows) void /*APIENTRY*/glTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, GLvoid *pixels);
1424
void /*APIENTRY*/glTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, GLvoid *pixels);
1421
extern(Windows) void /*APIENTRY*/glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
1425
void /*APIENTRY*/glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
1422
extern(Windows) void /*APIENTRY*/glTranslated (GLdouble x, GLdouble y, GLdouble z);
1426
void /*APIENTRY*/glTranslated (GLdouble x, GLdouble y, GLdouble z);
1423
extern(Windows) void /*APIENTRY*/glTranslatef (GLfloat x, GLfloat y, GLfloat z);
1427
void /*APIENTRY*/glTranslatef (GLfloat x, GLfloat y, GLfloat z);
1424
extern(Windows) void /*APIENTRY*/glVertex2d (GLdouble x, GLdouble y);
1428
void /*APIENTRY*/glVertex2d (GLdouble x, GLdouble y);
1425
extern(Windows) void /*APIENTRY*/glVertex2dv (GLdouble *v);
1429
void /*APIENTRY*/glVertex2dv (GLdouble *v);
1426
extern(Windows) void /*APIENTRY*/glVertex2f (GLfloat x, GLfloat y);
1430
void /*APIENTRY*/glVertex2f (GLfloat x, GLfloat y);
1427
extern(Windows) void /*APIENTRY*/glVertex2fv (GLfloat *v);
1431
void /*APIENTRY*/glVertex2fv (GLfloat *v);
1428
extern(Windows) void /*APIENTRY*/glVertex2i (GLint x, GLint y);
1432
void /*APIENTRY*/glVertex2i (GLint x, GLint y);
1429
extern(Windows) void /*APIENTRY*/glVertex2iv (GLint *v);
1433
void /*APIENTRY*/glVertex2iv (GLint *v);
1430
extern(Windows) void /*APIENTRY*/glVertex2s (GLshort x, GLshort y);
1434
void /*APIENTRY*/glVertex2s (GLshort x, GLshort y);
1431
extern(Windows) void /*APIENTRY*/glVertex2sv (GLshort *v);
1435
void /*APIENTRY*/glVertex2sv (GLshort *v);
1432
extern(Windows) void /*APIENTRY*/glVertex3d (GLdouble x, GLdouble y, GLdouble z);
1436
void /*APIENTRY*/glVertex3d (GLdouble x, GLdouble y, GLdouble z);
1433
extern(Windows) void /*APIENTRY*/glVertex3dv (GLdouble *v);
1437
void /*APIENTRY*/glVertex3dv (GLdouble *v);
1434
extern(Windows) void /*APIENTRY*/glVertex3f (GLfloat x, GLfloat y, GLfloat z);
1438
void /*APIENTRY*/glVertex3f (GLfloat x, GLfloat y, GLfloat z);
1435
extern(Windows) void /*APIENTRY*/glVertex3fv (GLfloat *v);
1439
void /*APIENTRY*/glVertex3fv (GLfloat *v);
1436
extern(Windows) void /*APIENTRY*/glVertex3i (GLint x, GLint y, GLint z);
1440
void /*APIENTRY*/glVertex3i (GLint x, GLint y, GLint z);
1437
extern(Windows) void /*APIENTRY*/glVertex3iv (GLint *v);
1441
void /*APIENTRY*/glVertex3iv (GLint *v);
1438
extern(Windows) void /*APIENTRY*/glVertex3s (GLshort x, GLshort y, GLshort z);
1442
void /*APIENTRY*/glVertex3s (GLshort x, GLshort y, GLshort z);
1439
extern(Windows) void /*APIENTRY*/glVertex3sv (GLshort *v);
1443
void /*APIENTRY*/glVertex3sv (GLshort *v);
1440
extern(Windows) void /*APIENTRY*/glVertex4d (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
1444
void /*APIENTRY*/glVertex4d (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
1441
extern(Windows) void /*APIENTRY*/glVertex4dv (GLdouble *v);
1445
void /*APIENTRY*/glVertex4dv (GLdouble *v);
1442
extern(Windows) void /*APIENTRY*/glVertex4f (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
1446
void /*APIENTRY*/glVertex4f (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
1443
extern(Windows) void /*APIENTRY*/glVertex4fv (GLfloat *v);
1447
void /*APIENTRY*/glVertex4fv (GLfloat *v);
1444
extern(Windows) void /*APIENTRY*/glVertex4i (GLint x, GLint y, GLint z, GLint w);
1448
void /*APIENTRY*/glVertex4i (GLint x, GLint y, GLint z, GLint w);
1445
extern(Windows) void /*APIENTRY*/glVertex4iv (GLint *v);
1449
void /*APIENTRY*/glVertex4iv (GLint *v);
1446
extern(Windows) void /*APIENTRY*/glVertex4s (GLshort x, GLshort y, GLshort z, GLshort w);
1450
void /*APIENTRY*/glVertex4s (GLshort x, GLshort y, GLshort z, GLshort w);
1447
extern(Windows) void /*APIENTRY*/glVertex4sv (GLshort *v);
1451
void /*APIENTRY*/glVertex4sv (GLshort *v);
1448
extern(Windows) void /*APIENTRY*/glVertexPointer (GLint size, GLenum type, GLsizei stride, GLvoid *pointer);
1452
void /*APIENTRY*/glVertexPointer (GLint size, GLenum type, GLsizei stride, GLvoid *pointer);
1449
extern(Windows) void /*APIENTRY*/glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
1453
void /*APIENTRY*/glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
1450
1451
1454
1452
extern(Windows):
1453
1455
1454
/* EXT_vertex_array */
1456
/* EXT_vertex_array */
1455
typedef void (* PFNGLARRAYELEMENTEXTPROC) (GLint i);
1457
typedef void (* PFNGLARRAYELEMENTEXTPROC) (GLint i);
Lines 1483-1486 Link Here
1483
typedef void (* PFNGLGETCOLORTABLEPARAMETERFVEXTPROC)
1485
typedef void (* PFNGLGETCOLORTABLEPARAMETERFVEXTPROC)
1484
    (GLenum target, GLenum pname, GLfloat *params);
1486
    (GLenum target, GLenum pname, GLfloat *params);
1485
1487
1486
import openglu;
1488
//import openglu;
(-)p47/import/openglu.d (-2 / +6 lines)
Lines 1-6 Link Here
1
import opengl;
1
import opengl;
2
2
3
extern(Windows):
3
version (Win32) {
4
	extern(Windows):
5
}
6
version (linux) {
7
	extern(C):
8
}
4
9
5
GLubyte* gluErrorString (
10
GLubyte* gluErrorString (
6
    GLenum   errCode);
11
    GLenum   errCode);
Lines 357-363 Link Here
357
362
358
/****           Tesselation constants           ****/
363
/****           Tesselation constants           ****/
359
364
360
//const extended GLU_TESS_MAX_COORD            = 1.0e150;
361
const real GLU_TESS_MAX_COORD            = 1.0e150;
365
const real GLU_TESS_MAX_COORD            = 1.0e150;
362
366
363
/* TessProperty */
367
/* TessProperty */
(-)p47/import/SDL.d (-2 / +4 lines)
Lines 31-37 Link Here
31
import SDL_events;
31
import SDL_events;
32
import SDL_video;
32
import SDL_video;
33
import SDL_byteorder;
33
import SDL_byteorder;
34
import SDL_version;
34
import SDL_Version;
35
35
36
extern(C):
36
extern(C):
37
37
Lines 73-78 Link Here
73
 */
73
 */
74
void SDL_Quit();
74
void SDL_Quit();
75
75
76
/+
76
void SDL_SetModuleHandle(void *hInst);
77
void SDL_SetModuleHandle(void *hInst);
77
extern(Windows) void* GetModuleHandle(char*);
78
extern(Windows) void* GetModuleHandle(char*);
78
79
Lines 87-90 Link Here
87
static ~this()
88
static ~this()
88
{
89
{
89
	SDL_Quit();
90
	SDL_Quit();
90
}
91
}
92
+/
(-)p47/import/SDL_endian.d (-2 / +2 lines)
Lines 57-65 Link Here
57
Uint64 SDL_Swap64(Uint64 val) {
57
Uint64 SDL_Swap64(Uint64 val) {
58
	Uint32 hi, lo;
58
	Uint32 hi, lo;
59
	/* Separate into high and low 32-bit values and swap them */
59
	/* Separate into high and low 32-bit values and swap them */
60
	lo = (Uint32)(val&0xFFFFFFFF);
60
	lo = cast(Uint32)(val&0xFFFFFFFF);
61
	val >>= 32;
61
	val >>= 32;
62
	hi = (Uint32)(val&0xFFFFFFFF);
62
	hi = cast(Uint32)(val&0xFFFFFFFF);
63
	val = SDL_Swap32(lo);
63
	val = SDL_Swap32(lo);
64
	val <<= 32;
64
	val <<= 32;
65
	val |= SDL_Swap32(hi);
65
	val |= SDL_Swap32(hi);
(-)p47/import/SDL_events.d (-1 / +1 lines)
Lines 304-310 Link Here
304
  If 'state' is set to SDL_QUERY, SDL_EventState() will return the 
304
  If 'state' is set to SDL_QUERY, SDL_EventState() will return the 
305
  current processing state of the specified event.
305
  current processing state of the specified event.
306
*/
306
*/
307
const uint SDL_QUERY	= -1;
307
const uint SDL_QUERY	= cast(uint) -1;
308
const uint SDL_IGNORE	= 0;
308
const uint SDL_IGNORE	= 0;
309
const uint SDL_DISABLE	= 0;
309
const uint SDL_DISABLE	= 0;
310
const uint SDL_ENABLE	= 1;
310
const uint SDL_ENABLE	= 1;
(-)p47/import/SDL_getenv.d (+2 lines)
Lines 2-7 Link Here
2
2
3
extern(C):
3
extern(C):
4
4
5
/+
5
/* Put a variable of the form "name=value" into the environment */
6
/* Put a variable of the form "name=value" into the environment */
6
int SDL_putenv(char *variable);
7
int SDL_putenv(char *variable);
7
int putenv(char* X) { return SDL_putenv(X); }
8
int putenv(char* X) { return SDL_putenv(X); }
Lines 9-11 Link Here
9
/* Retrieve a variable named "name" from the environment */
10
/* Retrieve a variable named "name" from the environment */
10
char *SDL_getenv(char *name);
11
char *SDL_getenv(char *name);
11
char *getenv(char* X) { return SDL_getenv(X); }
12
char *getenv(char* X) { return SDL_getenv(X); }
13
+/
(-)p47/import/SDL_Keysym.d (+308 lines)
Line 0 Link Here
1
/*
2
    SDL - Simple DirectMedia Layer
3
    Copyright (C) 1997, 1998, 1999, 2000, 2001  Sam Lantinga
4
5
    This library is free software; you can redistribute it and/or
6
    modify it under the terms of the GNU Library General Public
7
    License as published by the Free Software Foundation; either
8
    version 2 of the License, or (at your option) any later version.
9
10
    This library is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
    Library General Public License for more details.
14
15
    You should have received a copy of the GNU Library General Public
16
    License along with this library; if not, write to the Free
17
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
19
    Sam Lantinga
20
    slouken@devolution.com
21
*/
22
23
/* What we really want is a mapping of every raw key on the keyboard.
24
   To support international keyboards, we use the range 0xA1 - 0xFF
25
   as international virtual keycodes.  We'll follow in the footsteps of X11...
26
   The names of the keys
27
 */
28
 
29
alias int SDLKey;
30
enum {
31
	/* The keyboard syms have been cleverly chosen to map to ASCII */
32
	SDLK_UNKNOWN		= 0,
33
	SDLK_FIRST		= 0,
34
	SDLK_BACKSPACE		= 8,
35
	SDLK_TAB		= 9,
36
	SDLK_CLEAR		= 12,
37
	SDLK_RETURN		= 13,
38
	SDLK_PAUSE		= 19,
39
	SDLK_ESCAPE		= 27,
40
	SDLK_SPACE		= 32,
41
	SDLK_EXCLAIM		= 33,
42
	SDLK_QUOTEDBL		= 34,
43
	SDLK_HASH		= 35,
44
	SDLK_DOLLAR		= 36,
45
	SDLK_AMPERSAND		= 38,
46
	SDLK_QUOTE		= 39,
47
	SDLK_LEFTPAREN		= 40,
48
	SDLK_RIGHTPAREN		= 41,
49
	SDLK_ASTERISK		= 42,
50
	SDLK_PLUS		= 43,
51
	SDLK_COMMA		= 44,
52
	SDLK_MINUS		= 45,
53
	SDLK_PERIOD		= 46,
54
	SDLK_SLASH		= 47,
55
	SDLK_0			= 48,
56
	SDLK_1			= 49,
57
	SDLK_2			= 50,
58
	SDLK_3			= 51,
59
	SDLK_4			= 52,
60
	SDLK_5			= 53,
61
	SDLK_6			= 54,
62
	SDLK_7			= 55,
63
	SDLK_8			= 56,
64
	SDLK_9			= 57,
65
	SDLK_COLON		= 58,
66
	SDLK_SEMICOLON		= 59,
67
	SDLK_LESS		= 60,
68
	SDLK_EQUALS		= 61,
69
	SDLK_GREATER		= 62,
70
	SDLK_QUESTION		= 63,
71
	SDLK_AT			= 64,
72
	/* 
73
	   Skip uppercase letters
74
	 */
75
	SDLK_LEFTBRACKET	= 91,
76
	SDLK_BACKSLASH		= 92,
77
	SDLK_RIGHTBRACKET	= 93,
78
	SDLK_CARET		= 94,
79
	SDLK_UNDERSCORE		= 95,
80
	SDLK_BACKQUOTE		= 96,
81
	SDLK_a			= 97,
82
	SDLK_b			= 98,
83
	SDLK_c			= 99,
84
	SDLK_d			= 100,
85
	SDLK_e			= 101,
86
	SDLK_f			= 102,
87
	SDLK_g			= 103,
88
	SDLK_h			= 104,
89
	SDLK_i			= 105,
90
	SDLK_j			= 106,
91
	SDLK_k			= 107,
92
	SDLK_l			= 108,
93
	SDLK_m			= 109,
94
	SDLK_n			= 110,
95
	SDLK_o			= 111,
96
	SDLK_p			= 112,
97
	SDLK_q			= 113,
98
	SDLK_r			= 114,
99
	SDLK_s			= 115,
100
	SDLK_t			= 116,
101
	SDLK_u			= 117,
102
	SDLK_v			= 118,
103
	SDLK_w			= 119,
104
	SDLK_x			= 120,
105
	SDLK_y			= 121,
106
	SDLK_z			= 122,
107
	SDLK_DELETE		= 127,
108
	/* End of ASCII mapped keysyms */
109
110
	/* International keyboard syms */
111
	SDLK_WORLD_0		= 160,		/* 0xA0 */
112
	SDLK_WORLD_1		= 161,
113
	SDLK_WORLD_2		= 162,
114
	SDLK_WORLD_3		= 163,
115
	SDLK_WORLD_4		= 164,
116
	SDLK_WORLD_5		= 165,
117
	SDLK_WORLD_6		= 166,
118
	SDLK_WORLD_7		= 167,
119
	SDLK_WORLD_8		= 168,
120
	SDLK_WORLD_9		= 169,
121
	SDLK_WORLD_10		= 170,
122
	SDLK_WORLD_11		= 171,
123
	SDLK_WORLD_12		= 172,
124
	SDLK_WORLD_13		= 173,
125
	SDLK_WORLD_14		= 174,
126
	SDLK_WORLD_15		= 175,
127
	SDLK_WORLD_16		= 176,
128
	SDLK_WORLD_17		= 177,
129
	SDLK_WORLD_18		= 178,
130
	SDLK_WORLD_19		= 179,
131
	SDLK_WORLD_20		= 180,
132
	SDLK_WORLD_21		= 181,
133
	SDLK_WORLD_22		= 182,
134
	SDLK_WORLD_23		= 183,
135
	SDLK_WORLD_24		= 184,
136
	SDLK_WORLD_25		= 185,
137
	SDLK_WORLD_26		= 186,
138
	SDLK_WORLD_27		= 187,
139
	SDLK_WORLD_28		= 188,
140
	SDLK_WORLD_29		= 189,
141
	SDLK_WORLD_30		= 190,
142
	SDLK_WORLD_31		= 191,
143
	SDLK_WORLD_32		= 192,
144
	SDLK_WORLD_33		= 193,
145
	SDLK_WORLD_34		= 194,
146
	SDLK_WORLD_35		= 195,
147
	SDLK_WORLD_36		= 196,
148
	SDLK_WORLD_37		= 197,
149
	SDLK_WORLD_38		= 198,
150
	SDLK_WORLD_39		= 199,
151
	SDLK_WORLD_40		= 200,
152
	SDLK_WORLD_41		= 201,
153
	SDLK_WORLD_42		= 202,
154
	SDLK_WORLD_43		= 203,
155
	SDLK_WORLD_44		= 204,
156
	SDLK_WORLD_45		= 205,
157
	SDLK_WORLD_46		= 206,
158
	SDLK_WORLD_47		= 207,
159
	SDLK_WORLD_48		= 208,
160
	SDLK_WORLD_49		= 209,
161
	SDLK_WORLD_50		= 210,
162
	SDLK_WORLD_51		= 211,
163
	SDLK_WORLD_52		= 212,
164
	SDLK_WORLD_53		= 213,
165
	SDLK_WORLD_54		= 214,
166
	SDLK_WORLD_55		= 215,
167
	SDLK_WORLD_56		= 216,
168
	SDLK_WORLD_57		= 217,
169
	SDLK_WORLD_58		= 218,
170
	SDLK_WORLD_59		= 219,
171
	SDLK_WORLD_60		= 220,
172
	SDLK_WORLD_61		= 221,
173
	SDLK_WORLD_62		= 222,
174
	SDLK_WORLD_63		= 223,
175
	SDLK_WORLD_64		= 224,
176
	SDLK_WORLD_65		= 225,
177
	SDLK_WORLD_66		= 226,
178
	SDLK_WORLD_67		= 227,
179
	SDLK_WORLD_68		= 228,
180
	SDLK_WORLD_69		= 229,
181
	SDLK_WORLD_70		= 230,
182
	SDLK_WORLD_71		= 231,
183
	SDLK_WORLD_72		= 232,
184
	SDLK_WORLD_73		= 233,
185
	SDLK_WORLD_74		= 234,
186
	SDLK_WORLD_75		= 235,
187
	SDLK_WORLD_76		= 236,
188
	SDLK_WORLD_77		= 237,
189
	SDLK_WORLD_78		= 238,
190
	SDLK_WORLD_79		= 239,
191
	SDLK_WORLD_80		= 240,
192
	SDLK_WORLD_81		= 241,
193
	SDLK_WORLD_82		= 242,
194
	SDLK_WORLD_83		= 243,
195
	SDLK_WORLD_84		= 244,
196
	SDLK_WORLD_85		= 245,
197
	SDLK_WORLD_86		= 246,
198
	SDLK_WORLD_87		= 247,
199
	SDLK_WORLD_88		= 248,
200
	SDLK_WORLD_89		= 249,
201
	SDLK_WORLD_90		= 250,
202
	SDLK_WORLD_91		= 251,
203
	SDLK_WORLD_92		= 252,
204
	SDLK_WORLD_93		= 253,
205
	SDLK_WORLD_94		= 254,
206
	SDLK_WORLD_95		= 255,		/* 0xFF */
207
208
	/* Numeric keypad */
209
	SDLK_KP0		= 256,
210
	SDLK_KP1		= 257,
211
	SDLK_KP2		= 258,
212
	SDLK_KP3		= 259,
213
	SDLK_KP4		= 260,
214
	SDLK_KP5		= 261,
215
	SDLK_KP6		= 262,
216
	SDLK_KP7		= 263,
217
	SDLK_KP8		= 264,
218
	SDLK_KP9		= 265,
219
	SDLK_KP_PERIOD		= 266,
220
	SDLK_KP_DIVIDE		= 267,
221
	SDLK_KP_MULTIPLY	= 268,
222
	SDLK_KP_MINUS		= 269,
223
	SDLK_KP_PLUS		= 270,
224
	SDLK_KP_ENTER		= 271,
225
	SDLK_KP_EQUALS		= 272,
226
227
	/* Arrows + Home/End pad */
228
	SDLK_UP			= 273,
229
	SDLK_DOWN		= 274,
230
	SDLK_RIGHT		= 275,
231
	SDLK_LEFT		= 276,
232
	SDLK_INSERT		= 277,
233
	SDLK_HOME		= 278,
234
	SDLK_END		= 279,
235
	SDLK_PAGEUP		= 280,
236
	SDLK_PAGEDOWN		= 281,
237
238
	/* Function keys */
239
	SDLK_F1			= 282,
240
	SDLK_F2			= 283,
241
	SDLK_F3			= 284,
242
	SDLK_F4			= 285,
243
	SDLK_F5			= 286,
244
	SDLK_F6			= 287,
245
	SDLK_F7			= 288,
246
	SDLK_F8			= 289,
247
	SDLK_F9			= 290,
248
	SDLK_F10		= 291,
249
	SDLK_F11		= 292,
250
	SDLK_F12		= 293,
251
	SDLK_F13		= 294,
252
	SDLK_F14		= 295,
253
	SDLK_F15		= 296,
254
255
	/* Key state modifier keys */
256
	SDLK_NUMLOCK		= 300,
257
	SDLK_CAPSLOCK		= 301,
258
	SDLK_SCROLLOCK		= 302,
259
	SDLK_RSHIFT		= 303,
260
	SDLK_LSHIFT		= 304,
261
	SDLK_RCTRL		= 305,
262
	SDLK_LCTRL		= 306,
263
	SDLK_RALT		= 307,
264
	SDLK_LALT		= 308,
265
	SDLK_RMETA		= 309,
266
	SDLK_LMETA		= 310,
267
	SDLK_LSUPER		= 311,		/* Left "Windows" key */
268
	SDLK_RSUPER		= 312,		/* Right "Windows" key */
269
	SDLK_MODE		= 313,		/* "Alt Gr" key */
270
	SDLK_COMPOSE		= 314,		/* Multi-key compose key */
271
272
	/* Miscellaneous function keys */
273
	SDLK_HELP		= 315,
274
	SDLK_PRINT		= 316,
275
	SDLK_SYSREQ		= 317,
276
	SDLK_BREAK		= 318,
277
	SDLK_MENU		= 319,
278
	SDLK_POWER		= 320,		/* Power Macintosh power key */
279
	SDLK_EURO		= 321,		/* Some european keyboards */
280
	SDLK_UNDO		= 322,		/* Atari keyboard has Undo */
281
282
	/* Add any other keys here */
283
284
	SDLK_LAST
285
}
286
287
/* Enumeration of valid key mods (possibly OR'd together) */
288
alias int SDLMod;
289
enum {
290
	KMOD_NONE  = 0x0000,
291
	KMOD_LSHIFT= 0x0001,
292
	KMOD_RSHIFT= 0x0002,
293
	KMOD_LCTRL = 0x0040,
294
	KMOD_RCTRL = 0x0080,
295
	KMOD_LALT  = 0x0100,
296
	KMOD_RALT  = 0x0200,
297
	KMOD_LMETA = 0x0400,
298
	KMOD_RMETA = 0x0800,
299
	KMOD_NUM   = 0x1000,
300
	KMOD_CAPS  = 0x2000,
301
	KMOD_MODE  = 0x4000,
302
	KMOD_RESERVED = 0x8000
303
}
304
305
const uint KMOD_CTRL	= (KMOD_LCTRL|KMOD_RCTRL);
306
const uint KMOD_SHIFT	= (KMOD_LSHIFT|KMOD_RSHIFT);
307
const uint KMOD_ALT		= (KMOD_LALT|KMOD_RALT);
308
const uint KMOD_META	= (KMOD_LMETA|KMOD_RMETA);
(-)p47/import/SDL_mixer.d (-1 / +24 lines)
Lines 22-30 Link Here
22
22
23
// convert to D by shinichiro.h
23
// convert to D by shinichiro.h
24
24
25
/* $Id: SDL_mixer.d,v 1.1.1.1 2003/11/28 17:26:28 kenta Exp $ */
25
/* $Id: SDL_mixer.d,v 1.1.1.1 2005/06/18 00:46:00 kenta Exp $ */
26
26
27
import SDL;
27
import SDL;
28
import SDL_active;   
29
import SDL_joystick;  
30
import SDL_mutex;   
31
import SDL_timer;
32
import SDL_audio;      
33
import SDL_endian;  
34
import SDL_keyboard;  
35
import SDL_quit;
36
import SDL_types;
37
import SDL_byteorder;  
38
import SDL_error;
39
import SDL_Keysym;    
40
import SDL_rwops;   
41
import SDL_version;
42
import SDL_cdrom;   
43
import SDL_events;  
44
import SDL_syswm;  
45
import SDL_Version;
46
import SDL_copying;  
47
import SDL_getenv;
48
import SDL_mouse;   
49
import SDL_thread;  
50
import SDL_video;
28
51
29
extern (C) {
52
extern (C) {
30
53
(-)p47/import/SDL_mouse.d (+2 lines)
Lines 109-114 Link Here
109
const uint SDL_BUTTON_LEFT		= 1;
109
const uint SDL_BUTTON_LEFT		= 1;
110
const uint SDL_BUTTON_MIDDLE	= 2;
110
const uint SDL_BUTTON_MIDDLE	= 2;
111
const uint SDL_BUTTON_RIGHT		= 3;
111
const uint SDL_BUTTON_RIGHT		= 3;
112
const uint SDL_BUTTON_WHEELUP	= 4;
113
const uint SDL_BUTTON_WHEELDOWN	= 5;
112
const uint SDL_BUTTON_LMASK		= SDL_PRESSED << (SDL_BUTTON_LEFT - 1);
114
const uint SDL_BUTTON_LMASK		= SDL_PRESSED << (SDL_BUTTON_LEFT - 1);
113
const uint SDL_BUTTON_MMASK		= SDL_PRESSED << (SDL_BUTTON_MIDDLE - 1);
115
const uint SDL_BUTTON_MMASK		= SDL_PRESSED << (SDL_BUTTON_MIDDLE - 1);
114
const uint SDL_BUTTON_RMASK		= SDL_PRESSED << (SDL_BUTTON_RIGHT - 1);
116
const uint SDL_BUTTON_RMASK		= SDL_PRESSED << (SDL_BUTTON_RIGHT - 1);
(-)p47/import/SDL_quit.d (-1 / +1 lines)
Lines 43-47 Link Here
43
bit SDL_QuitRequested()
43
bit SDL_QuitRequested()
44
{
44
{
45
	SDL_PumpEvents();
45
	SDL_PumpEvents();
46
	return SDL_PeepEvents(null, 0, SDL_PEEKEVENT, SDL_QUITMASK);
46
	return cast(bit)SDL_PeepEvents(null, 0, SDL_PEEKEVENT, SDL_QUITMASK);
47
}
47
}
(-)p47/import/SDL_rwops.d (-9 / +23 lines)
Lines 28-33 Link Here
28
28
29
extern(C):
29
extern(C):
30
30
31
typedef int (*_seek_func_t)(SDL_RWops *context, int offset, int whence);
32
typedef int (*_read_func_t)(SDL_RWops *context, void *ptr, int size, int maxnum);
33
typedef int (*_write_func_t)(SDL_RWops *context, void *ptr, int size, int num);
34
typedef int (*_close_func_t)(SDL_RWops *context);
35
31
/* This is the read/write operation structure -- very basic */
36
/* This is the read/write operation structure -- very basic */
32
37
33
struct SDL_RWops {
38
struct SDL_RWops {
Lines 35-56 Link Here
35
		SEEK_SET, SEEK_CUR, SEEK_END
40
		SEEK_SET, SEEK_CUR, SEEK_END
36
	   Returns the final offset in the data source.
41
	   Returns the final offset in the data source.
37
	 */
42
	 */
38
	int (*seek)(SDL_RWops *context, int offset, int whence);
43
	_seek_func_t seek;
44
//	int (*seek)(SDL_RWops *context, int offset, int whence);
39
45
40
	/* Read up to 'num' objects each of size 'objsize' from the data
46
	/* Read up to 'num' objects each of size 'objsize' from the data
41
	   source to the area pointed at by 'ptr'.
47
	   source to the area pointed at by 'ptr'.
42
	   Returns the number of objects read, or -1 if the read failed.
48
	   Returns the number of objects read, or -1 if the read failed.
43
	 */
49
	 */
44
	int (*read)(SDL_RWops *context, void *ptr, int size, int maxnum);
50
	_read_func_t read;
51
//	int (*read)(SDL_RWops *context, void *ptr, int size, int maxnum);
45
52
46
	/* Write exactly 'num' objects each of size 'objsize' from the area
53
	/* Write exactly 'num' objects each of size 'objsize' from the area
47
	   pointed at by 'ptr' to data source.
54
	   pointed at by 'ptr' to data source.
48
	   Returns 'num', or -1 if the write failed.
55
	   Returns 'num', or -1 if the write failed.
49
	 */
56
	 */
50
	int (*write)(SDL_RWops *context, void *ptr, int size, int num);
57
	_write_func_t write;
58
//	int (*write)(SDL_RWops *context, void *ptr, int size, int num);
51
59
52
	/* Close and free an allocated SDL_FSops structure */
60
	/* Close and free an allocated SDL_FSops structure */
53
	int (*close)(SDL_RWops *context);
61
	_close_func_t close;
62
//	int (*close)(SDL_RWops *context);
54
63
55
	Uint32 type;
64
	Uint32 type;
56
	union {
65
	union {
Lines 84-118 Link Here
84
/* Macros to easily read and write from an SDL_RWops structure */
93
/* Macros to easily read and write from an SDL_RWops structure */
85
int SDL_RWseek(SDL_RWops *ctx, int offset, int whence)
94
int SDL_RWseek(SDL_RWops *ctx, int offset, int whence)
86
{
95
{
87
	int (*seek)(SDL_RWops *context, int offset, int whence);
96
	_seek_func_t seek;
97
//	int (*seek)(SDL_RWops *context, int offset, int whence);
88
	seek = ctx.seek;
98
	seek = ctx.seek;
89
	return (*seek)(ctx, offset, whence);
99
	return (*seek)(ctx, offset, whence);
90
}
100
}
91
101
92
int SDL_RWtell(SDL_RWops *ctx)
102
int SDL_RWtell(SDL_RWops *ctx)
93
{
103
{
94
	int (*seek)(SDL_RWops *context, int offset, int whence);
104
	_seek_func_t seek;
105
//	int (*seek)(SDL_RWops *context, int offset, int whence);
95
	seek = ctx.seek;
106
	seek = ctx.seek;
96
	return (*seek)(ctx, 0, 1);
107
	return (*seek)(ctx, 0, 1);
97
}
108
}
98
109
99
int SDL_RWread(SDL_RWops *ctx, void* ptr, int size, int n)
110
int SDL_RWread(SDL_RWops *ctx, void* ptr, int size, int n)
100
{
111
{
101
	int (*read)(SDL_RWops *context, void *ptr, int size, int maxnum);
112
	_read_func_t read;
113
//	int (*read)(SDL_RWops *context, void *ptr, int size, int maxnum);
102
	read = ctx.read;
114
	read = ctx.read;
103
	return (*read)(ctx, ptr, size, n);
115
	return (*read)(ctx, ptr, size, n);
104
}
116
}
105
117
106
int SDL_RWwrite(SDL_RWops *ctx, void* ptr, int size, int n)
118
int SDL_RWwrite(SDL_RWops *ctx, void* ptr, int size, int n)
107
{
119
{
108
	int (*write)(SDL_RWops *context, void *ptr, int size, int num);
120
	_write_func_t write;
121
//	int (*write)(SDL_RWops *context, void *ptr, int size, int num);
109
	write = ctx.write;
122
	write = ctx.write;
110
	return (*write)(ctx, ptr, size, n);
123
	return (*write)(ctx, ptr, size, n);
111
}
124
}
112
125
113
int SDL_RWclose(SDL_RWops *ctx)
126
int SDL_RWclose(SDL_RWops *ctx)
114
{
127
{
115
	int (*close)(SDL_RWops *context);
128
	_close_func_t close;
129
//	int (*close)(SDL_RWops *context);
116
	close = ctx.close;
130
	close = ctx.close;
117
	return (*close)(ctx);
131
	return (*close)(ctx);
118
}
132
}
(-)p47/import/SDL_syswm.d (-1 / +1 lines)
Lines 22-28 Link Here
22
22
23
/* Include file for SDL custom system window manager hooks */
23
/* Include file for SDL custom system window manager hooks */
24
24
25
import SDL_version;
25
import SDL_Version;
26
26
27
extern(C):
27
extern(C):
28
28
(-)p47/import/SDL_Version.d (+75 lines)
Line 0 Link Here
1
/*
2
    SDL - Simple DirectMedia Layer
3
    Copyright (C) 1997, 1998, 1999, 2000, 2001  Sam Lantinga
4
5
    This library is free software; you can redistribute it and/or
6
    modify it under the terms of the GNU Library General Public
7
    License as published by the Free Software Foundation; either
8
    version 2 of the License, or (at your option) any later version.
9
10
    This library is distributed in the hope that it will be useful,
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
    Library General Public License for more details.
14
15
    You should have received a copy of the GNU Library General Public
16
    License along with this library; if not, write to the Free
17
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
19
    Sam Lantinga
20
    slouken@devolution.com
21
*/
22
23
/* This header defines the current SDL version */
24
25
import SDL_types;
26
27
extern(C):
28
29
/* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL
30
*/
31
const uint SDL_MAJOR_VERSION	= 1;
32
const uint SDL_MINOR_VERSION	= 2;
33
const uint SDL_PATCHLEVEL		= 6;
34
35
struct SDL_version {
36
	Uint8 major;
37
	Uint8 minor;
38
	Uint8 patch;
39
}
40
41
/* This macro can be used to fill a version structure with the compile-time
42
 * version of the SDL library.
43
 */
44
void SDL_VERSION(SDL_version* X)
45
{
46
	X.major = SDL_MAJOR_VERSION;
47
	X.minor = SDL_MINOR_VERSION;
48
	X.patch = SDL_PATCHLEVEL;
49
}
50
51
/* This macro turns the version numbers into a numeric value:
52
   (1,2,3) -> (1203)
53
   This assumes that there will never be more than 100 patchlevels
54
*/
55
uint SDL_VERSIONNUM(Uint8 X, Uint8 Y, Uint8 Z)
56
{
57
	return X * 1000 + Y * 100 + Z;
58
}
59
60
/* This is the version number macro for the current SDL version */
61
const uint SDL_COMPILEDVERSION = SDL_MAJOR_VERSION * 1000 +
62
									SDL_MINOR_VERSION * 100 +
63
									SDL_PATCHLEVEL;
64
65
/* This macro will evaluate to true if compiled with SDL at least X.Y.Z */
66
bit SDL_VERSION_ATLEAST(Uint8 X, Uint8 Y, Uint8 Z)
67
{
68
	return (SDL_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z));
69
}
70
71
/* This function gets the version of the dynamically linked SDL library.
72
   it should NOT be used to fill a version structure, instead you should
73
   use the SDL_Version() macro.
74
 */
75
SDL_version * SDL_Linked_Version();
(-)p47/Makefile (+29 lines)
Line 0 Link Here
1
DSRC=$(shell find src -name "*.d")
2
SOURCES=$(DSRC) import/SDL_video.d import/SDL_mixer.d
3
OBJS=$(SOURCES:.d=.o)
4
CFLAGS=
5
DFLAGS=-O -release -Iimport -Isrc -I/usr/X11R6/include/
6
EXE=parsec47
7
COBJS=src/dirent_d.o
8
9
all: $(EXE)
10
11
$(EXE): import/SDL_Keysym.d $(OBJS) $(COBJS)
12
	gcc $(CFLAGS) -o $@ $(OBJS) $(COBJS) -lbulletml_d -L/usr/local/lib -L/usr/lib -lgphobos -lpthread -lGLU -lGL -lglut -lm -lstdc++ -lSDL -lSDL_mixer
13
14
$(OBJS): %.o: %.d
15
	gdmd -d -c -of$@ $(DFLAGS) $<
16
17
src/dirent_d.o: src/dirent_d.c
18
	gcc -c $< -o $@
19
20
import/SDL_Keysym.d:
21
	mv import/SDL_keysym.d import/SDL_Keysym.d
22
23
24
clean:  rm src/*.o
25
	rm src/abagames/p47/*.o
26
	rm src/abagames/util/*.o
27
	rm src/abagames/util/sdl/*.o
28
	rm src/abagames/util/bulletml/*.o
29
	rm import/*.o
(-)p47/src/abagames/p47/Bonus.d (-8 / +8 lines)
Lines 5-11 Link Here
5
 */
5
 */
6
module abagames.p47.Bonus;
6
module abagames.p47.Bonus;
7
7
8
private:
8
//private:
9
import std.math;
9
import std.math;
10
import opengl;
10
import opengl;
11
import abagames.util.Vector;
11
import abagames.util.Vector;
Lines 63-69 Link Here
63
  }
63
  }
64
64
65
  public override void init(ActorInitializer ini) {
65
  public override void init(ActorInitializer ini) {
66
    BonusInitializer bi = (BonusInitializer) ini;
66
    BonusInitializer bi = cast(BonusInitializer) ini;
67
    field = bi.field;
67
    field = bi.field;
68
    ship = bi.ship;
68
    ship = bi.ship;
69
    manager = bi.manager;
69
    manager = bi.manager;
Lines 126-138 Link Here
126
	missBonus();
126
	missBonus();
127
	isExist = false;
127
	isExist = false;
128
	return;
128
	return;
129
      }    
129
      }
130
    }
130
    }
131
    cnt++;
131
    cnt++;
132
    if (cnt < RETRO_CNT)
132
    if (cnt < RETRO_CNT)
133
      return;
133
      return;
134
    float d = pos.dist(ship.pos);
134
    float d = pos.dist(ship.pos);
135
    if (d < ACQUIRE_WIDTH * (1 + (float) inhaleCnt * 0.2) && ship.cnt >= -Ship.INVINCIBLE_CNT) {
135
    if (d < ACQUIRE_WIDTH * (1 + cast(float) inhaleCnt * 0.2) && ship.cnt >= -Ship.INVINCIBLE_CNT) {
136
      getBonus();
136
      getBonus();
137
      isExist = false;
137
      isExist = false;
138
      return;
138
      return;
Lines 157-164 Link Here
157
  public override void draw() {
157
  public override void draw() {
158
    float retro;
158
    float retro;
159
    if (cnt < RETRO_CNT)
159
    if (cnt < RETRO_CNT)
160
      retro = 1 - (float) cnt / RETRO_CNT;
160
      retro = 1 - cast(float) cnt / RETRO_CNT;
161
    else 
161
    else
162
      retro = 0;
162
      retro = 0;
163
    float d = cnt * 0.1;
163
    float d = cnt * 0.1;
164
    float ox = sin(d) * 0.3;
164
    float ox = sin(d) * 0.3;
Lines 176-184 Link Here
176
	Screen3D.setColor(0.4, 0.9, 0.6, 0.7);
176
	Screen3D.setColor(0.4, 0.9, 0.6, 0.7);
177
      else
177
      else
178
	Screen3D.setColor(0.8, 0.9, 0.5, 0.7);
178
	Screen3D.setColor(0.8, 0.9, 0.5, 0.7);
179
      P47Screen.drawBoxLine(pos.x - ox - BOX_SIZE / 2, pos.y - oy - BOX_SIZE / 2, 
179
      P47Screen.drawBoxLine(pos.x - ox - BOX_SIZE / 2, pos.y - oy - BOX_SIZE / 2,
180
			    BOX_SIZE, BOX_SIZE);
180
			    BOX_SIZE, BOX_SIZE);
181
      P47Screen.drawBoxLine(pos.x + ox - BOX_SIZE / 2, pos.y + oy - BOX_SIZE / 2, 
181
      P47Screen.drawBoxLine(pos.x + ox - BOX_SIZE / 2, pos.y + oy - BOX_SIZE / 2,
182
			    BOX_SIZE, BOX_SIZE);
182
			    BOX_SIZE, BOX_SIZE);
183
      P47Screen.drawBoxLine(pos.x - oy - BOX_SIZE / 2, pos.y + ox - BOX_SIZE / 2,
183
      P47Screen.drawBoxLine(pos.x - oy - BOX_SIZE / 2, pos.y + ox - BOX_SIZE / 2,
184
			    BOX_SIZE, BOX_SIZE);
184
			    BOX_SIZE, BOX_SIZE);
(-)p47/src/abagames/p47/BulletActor.d (-14 / +14 lines)
Lines 5-11 Link Here
5
 */
5
 */
6
module abagames.p47.BulletActor;
6
module abagames.p47.BulletActor;
7
7
8
private:
8
//private:
9
import std.math;
9
import std.math;
10
import opengl;
10
import opengl;
11
import bulletml;
11
import bulletml;
Lines 59-65 Link Here
59
  }
59
  }
60
60
61
  public override void init(ActorInitializer ini) {
61
  public override void init(ActorInitializer ini) {
62
    BulletActorInitializer bi = (BulletActorInitializer) ini;
62
    BulletActorInitializer bi = cast(BulletActorInitializer) ini;
63
    field = bi.field;
63
    field = bi.field;
64
    ship = bi.ship;
64
    ship = bi.ship;
65
    bullet = new P47Bullet(nextId);
65
    bullet = new P47Bullet(nextId);
Lines 80-87 Link Here
80
    backToRetro = false;
80
    backToRetro = false;
81
  }
81
  }
82
82
83
  public void set(BulletMLRunner* runner, 
83
  public void set(BulletMLRunner* runner,
84
		  float x, float y, float deg, float speed, float rank, 
84
		  float x, float y, float deg, float speed, float rank,
85
		  float speedRank, int shape, int color, float size, float xReverse) {
85
		  float speedRank, int shape, int color, float size, float xReverse) {
86
    bullet.set(runner, x, y, deg, speed, rank);
86
    bullet.set(runner, x, y, deg, speed, rank);
87
    bullet.isMorph = false;
87
    bullet.isMorph = false;
Lines 89-96 Link Here
89
    start(speedRank, shape, color, size, xReverse);
89
    start(speedRank, shape, color, size, xReverse);
90
  }
90
  }
91
91
92
  public void set(BulletMLRunner* runner, 
92
  public void set(BulletMLRunner* runner,
93
		  float x, float y, float deg, float speed, float rank, 
93
		  float x, float y, float deg, float speed, float rank,
94
		  float speedRank, int shape, int color, float size, float xReverse,
94
		  float speedRank, int shape, int color, float size, float xReverse,
95
		  BulletMLParser *morph[], int morphNum, int morphIdx, int morphCnt) {
95
		  BulletMLParser *morph[], int morphNum, int morphIdx, int morphCnt) {
96
    bullet.set(runner, x, y, deg, speed, rank);
96
    bullet.set(runner, x, y, deg, speed, rank);
Lines 163-170 Link Here
163
	if (hd >= 0 && hd <= SHIP_HIT_WIDTH) {
163
	if (hd >= 0 && hd <= SHIP_HIT_WIDTH) {
164
	  ship.destroyed();
164
	  ship.destroyed();
165
	}
165
	}
166
      } 
166
      }
167
    }   
167
    }
168
  }
168
  }
169
169
170
  public override void move() {
170
  public override void move() {
Lines 200-208 Link Here
200
      if (cnt > BULLET_DISAPPEAR_CNT)
200
      if (cnt > BULLET_DISAPPEAR_CNT)
201
	toRetro();
201
	toRetro();
202
    }
202
    }
203
    bullet.pos.x += 
203
    bullet.pos.x +=
204
      (sin(bullet.deg) * bullet.speed + bullet.acc.x) * sr * bullet.xReverse;
204
      (sin(bullet.deg) * bullet.speed + bullet.acc.x) * sr * bullet.xReverse;
205
    bullet.pos.y += 
205
    bullet.pos.y +=
206
      (cos(bullet.deg) * bullet.speed - bullet.acc.y) * sr;
206
      (cos(bullet.deg) * bullet.speed - bullet.acc.y) * sr;
207
    if (isVisible) {
207
    if (isVisible) {
208
      totalBulletsSpeed += bullet.speed * sr;
208
      totalBulletsSpeed += bullet.speed * sr;
Lines 231-238 Link Here
231
  private void drawRetro(float d) {
231
  private void drawRetro(float d) {
232
    float rt = 1 - rtCnt / RETRO_CNT;
232
    float rt = 1 - rtCnt / RETRO_CNT;
233
    P47Screen.setRetroParam(rt, 0.4 * bullet.bulletSize);
233
    P47Screen.setRetroParam(rt, 0.4 * bullet.bulletSize);
234
    P47Screen.setRetroColor(bulletColor[bullet.color][0], 
234
    P47Screen.setRetroColor(bulletColor[bullet.color][0],
235
			    bulletColor[bullet.color][1], 
235
			    bulletColor[bullet.color][1],
236
			    bulletColor[bullet.color][2], 1);
236
			    bulletColor[bullet.color][2], 1);
237
    float x, y, tx, px, py, fx, fy;
237
    float x, y, tx, px, py, fx, fy;
238
    for (int i = 0; i < shapePos[bullet.shape].length; i++) {
238
    for (int i = 0; i < shapePos[bullet.shape].length; i++) {
Lines 291-299 Link Here
291
  private static const float SHAPE_BASE_COLOR_R = 1;
291
  private static const float SHAPE_BASE_COLOR_R = 1;
292
  private static const float SHAPE_BASE_COLOR_G = 0.9;
292
  private static const float SHAPE_BASE_COLOR_G = 0.9;
293
  private static const float SHAPE_BASE_COLOR_B = 0.7;
293
  private static const float SHAPE_BASE_COLOR_B = 0.7;
294
  private static const float bulletColor[BULLET_COLOR_NUM][3] = 
294
  private static const float bulletColor[BULLET_COLOR_NUM][3] =
295
    [
295
    [
296
     [1, 0, 0], [0.2, 1, 0.4], [0.3, 0.3, 1], [1, 1, 0], 
296
     [1, 0, 0], [0.2, 1, 0.4], [0.3, 0.3, 1], [1, 1, 0],
297
     ];
297
     ];
298
298
299
  public static void createDisplayLists() {
299
  public static void createDisplayLists() {
(-)p47/src/abagames/p47/BulletActorPool.d (-10 / +10 lines)
Lines 32-41 Link Here
32
  }
32
  }
33
33
34
  public void addBullet(float deg, float speed) {
34
  public void addBullet(float deg, float speed) {
35
    BulletActor ba = (BulletActor) getInstance();
35
    BulletActor ba = cast(BulletActor) getInstance();
36
    if (!ba)
36
    if (!ba)
37
      return;
37
      return;
38
    P47Bullet rb = (P47Bullet) Bullet.now;
38
    P47Bullet rb = cast(P47Bullet) Bullet.now;
39
    if (rb.isMorph) {
39
    if (rb.isMorph) {
40
      BulletMLRunner *runner = BulletMLRunner_new_parser(rb.morphParser[rb.morphIdx]);
40
      BulletMLRunner *runner = BulletMLRunner_new_parser(rb.morphParser[rb.morphIdx]);
41
      BulletActorPool.registFunctions(runner);
41
      BulletActorPool.registFunctions(runner);
Lines 51-62 Link Here
51
  }
51
  }
52
52
53
  public void addBullet(BulletMLState *state, float deg, float speed) {
53
  public void addBullet(BulletMLState *state, float deg, float speed) {
54
    BulletActor ba = (BulletActor) getInstance();
54
    BulletActor ba = cast(BulletActor) getInstance();
55
    if (!ba)
55
    if (!ba)
56
      return;
56
      return;
57
    BulletMLRunner* runner = BulletMLRunner_new_state(state);
57
    BulletMLRunner* runner = BulletMLRunner_new_state(state);
58
    registFunctions(runner);
58
    registFunctions(runner);
59
    P47Bullet rb = (P47Bullet) Bullet.now;
59
    P47Bullet rb = cast(P47Bullet) Bullet.now;
60
    if (rb.isMorph)
60
    if (rb.isMorph)
61
      ba.set(runner, Bullet.now.pos.x, Bullet.now.pos.y, deg, speed, 
61
      ba.set(runner, Bullet.now.pos.x, Bullet.now.pos.y, deg, speed, 
62
	     Bullet.now.rank, 
62
	     Bullet.now.rank, 
Lines 72-78 Link Here
72
			       float x, float y, float deg, float speed,
72
			       float x, float y, float deg, float speed,
73
			       float rank, 
73
			       float rank, 
74
			       float speedRank, int shape, int color, float size, float xReverse) {
74
			       float speedRank, int shape, int color, float size, float xReverse) {
75
    BulletActor ba = (BulletActor) getInstance();
75
    BulletActor ba = cast(BulletActor) getInstance();
76
    if (!ba)
76
    if (!ba)
77
      return null;
77
      return null;
78
    ba.set(runner, x, y, deg, speed, rank, speedRank, shape, color, size, xReverse);
78
    ba.set(runner, x, y, deg, speed, rank, speedRank, shape, color, size, xReverse);
Lines 99-105 Link Here
99
			       float rank,
99
			       float rank,
100
			       float speedRank, int shape, int color, float size, float xReverse,
100
			       float speedRank, int shape, int color, float size, float xReverse,
101
			       BulletMLParser *morph[], int morphNum, int morphCnt) {
101
			       BulletMLParser *morph[], int morphNum, int morphCnt) {
102
    BulletActor ba = (BulletActor) getInstance();
102
    BulletActor ba = cast(BulletActor) getInstance();
103
    if (!ba)
103
    if (!ba)
104
      return null;
104
      return null;
105
    ba.set(runner, x, y, deg, speed, rank, 
105
    ba.set(runner, x, y, deg, speed, rank, 
Lines 119-132 Link Here
119
  }
119
  }
120
  
120
  
121
  public void killMe(Bullet bullet) {
121
  public void killMe(Bullet bullet) {
122
    assert(((BulletActor) actor[bullet.id]).bullet.id == bullet.id);
122
    assert((cast(BulletActor) actor[bullet.id]).bullet.id == bullet.id);
123
    ((BulletActor) actor[bullet.id]).remove();
123
    (cast(BulletActor) actor[bullet.id]).remove();
124
  }
124
  }
125
125
126
  public override void clear() {
126
  public override void clear() {
127
    for (int i = 0; i < actor.length; i++) {
127
    for (int i = 0; i < actor.length; i++) {
128
      if (actor[i].isExist)
128
      if (actor[i].isExist)
129
	((BulletActor) actor[i]).remove();
129
	(cast(BulletActor) actor[i]).remove();
130
    }
130
    }
131
  }
131
  }
132
132
Lines 155-161 Link Here
155
  double getAimDirectionWithXRev_(BulletMLRunner* r) {
155
  double getAimDirectionWithXRev_(BulletMLRunner* r) {
156
    Vector b = Bullet.now.pos;
156
    Vector b = Bullet.now.pos;
157
    Vector t = Bullet.target;
157
    Vector t = Bullet.target;
158
    float xrev = ((P47Bullet) Bullet.now).xReverse;
158
    float xrev = (cast(P47Bullet) Bullet.now).xReverse;
159
    return rtod(std.math.atan2(t.x - b.x, t.y - b.y) * xrev);
159
    return rtod(std.math.atan2(t.x - b.x, t.y - b.y) * xrev);
160
  }
160
  }
161
}
161
}
(-)p47/src/abagames/p47/Enemy.d (-27 / +27 lines)
Lines 5-11 Link Here
5
 */
5
 */
6
module abagames.p47.Enemy;
6
module abagames.p47.Enemy;
7
7
8
private:
8
//private:
9
import std.math;
9
import std.math;
10
import opengl;
10
import opengl;
11
import bulletml;
11
import bulletml;
Lines 78-84 Link Here
78
  int velCnt;
78
  int velCnt;
79
  bool damaged;
79
  bool damaged;
80
  int bossTimer;
80
  int bossTimer;
81
  
81
82
  public static this() {
82
  public static this() {
83
    rand = new Rand;
83
    rand = new Rand;
84
  }
84
  }
Lines 88-94 Link Here
88
  }
88
  }
89
89
90
  public override void init(ActorInitializer ini) {
90
  public override void init(ActorInitializer ini) {
91
    EnemyInitializer ei = (EnemyInitializer) ini;
91
    EnemyInitializer ei = cast(EnemyInitializer) ini;
92
    field = ei.field;
92
    field = ei.field;
93
    bullets = ei.bullets;
93
    bullets = ei.bullets;
94
    shots = ei.shots;
94
    shots = ei.shots;
Lines 107-119 Link Here
107
  }
107
  }
108
108
109
  public void set(Vector p, float d, EnemyType type, BulletMLParser *moveParser) {
109
  public void set(Vector p, float d, EnemyType type, BulletMLParser *moveParser) {
110
    pos.x = p.x; 
110
    pos.x = p.x;
111
    pos.y = p.y;
111
    pos.y = p.y;
112
    this.type = type;
112
    this.type = type;
113
    BulletMLRunner *moveRunner = BulletMLRunner_new_parser(moveParser);
113
    BulletMLRunner *moveRunner = BulletMLRunner_new_parser(moveParser);
114
    BulletActorPool.registFunctions(moveRunner);
114
    BulletActorPool.registFunctions(moveRunner);
115
    moveBullet = bullets.addBullet(moveRunner,
115
    moveBullet = bullets.addBullet(moveRunner,
116
				   pos.x, pos.y, d, 0, 0.5, 
116
				   pos.x, pos.y, d, 0, 0.5,
117
				   1, 0, 0, 1, 1);
117
				   1, 0, 0, 1, 1);
118
    if (!moveBullet)
118
    if (!moveBullet)
119
      return;
119
      return;
Lines 131-137 Link Here
131
  }
131
  }
132
132
133
  public void setBoss(Vector p, float d, EnemyType type) {
133
  public void setBoss(Vector p, float d, EnemyType type) {
134
    pos.x = p.x; 
134
    pos.x = p.x;
135
    pos.y = p.y;
135
    pos.y = p.y;
136
    this.type = type;
136
    this.type = type;
137
    moveBullet = null;
137
    moveBullet = null;
Lines 154-160 Link Here
154
      int idx1 = rand.nextInt(movePointNum);
154
      int idx1 = rand.nextInt(movePointNum);
155
      int idx2 = rand.nextInt(movePointNum);
155
      int idx2 = rand.nextInt(movePointNum);
156
      if (idx1 == idx2) {
156
      if (idx1 == idx2) {
157
	idx2++; 
157
	idx2++;
158
	if (idx2 >= movePointNum) idx2 = 0;
158
	if (idx2 >= movePointNum) idx2 = 0;
159
      }
159
      }
160
      Vector mp = movePoint[idx1];
160
      Vector mp = movePoint[idx1];
Lines 198-205 Link Here
198
    if (br.morphCnt > 0)
198
    if (br.morphCnt > 0)
199
      ba = bullets.addBullet
199
      ba = bullets.addBullet
200
	(br.parser, runner,
200
	(br.parser, runner,
201
	 bx, by, baseDeg, 0, br.rank, 
201
	 bx, by, baseDeg, 0, br.rank,
202
	 br.speedRank, 
202
	 br.speedRank,
203
	 br.shape, br.color, br.bulletSize,
203
	 br.shape, br.color, br.bulletSize,
204
	 br.xReverse * xr,
204
	 br.xReverse * xr,
205
	 br.morphParser, br.morphNum, br.morphCnt);
205
	 br.morphParser, br.morphNum, br.morphCnt);
Lines 207-213 Link Here
207
      ba = bullets.addBullet
207
      ba = bullets.addBullet
208
	(br.parser, runner,
208
	(br.parser, runner,
209
	 bx, by, baseDeg, 0, br.rank,
209
	 bx, by, baseDeg, 0, br.rank,
210
	 br.speedRank, 
210
	 br.speedRank,
211
	 br.shape, br.color, br.bulletSize,
211
	 br.shape, br.color, br.bulletSize,
212
	 br.xReverse * xr);
212
	 br.xReverse * xr);
213
    return ba;
213
    return ba;
Lines 234-240 Link Here
234
  }
234
  }
235
235
236
  private void addBonuses(Vector p, int sl) {
236
  private void addBonuses(Vector p, int sl) {
237
    int bn = (float) sl * 3 / (((float) cnt / 30) + 1) * Bonus.rate + 0.9;
237
    int bn = cast(int)(cast(float) sl * 3 / ((cast(float) cnt / 30) + 1) * Bonus.rate + 0.9);
238
    manager.addBonus(pos, p, bn);
238
    manager.addBonus(pos, p, bn);
239
  }
239
  }
240
240
Lines 277-283 Link Here
277
  private static int LOCK_DAMAGE = 7;
277
  private static int LOCK_DAMAGE = 7;
278
  private static const int ENEMY_TYPE_SCORE[] = [100, 500, 1000, 5000, 10000];
278
  private static const int ENEMY_TYPE_SCORE[] = [100, 500, 1000, 5000, 10000];
279
  private static const int ENEMY_WING_SCORE = 1000;
279
  private static const int ENEMY_WING_SCORE = 1000;
280
  
280
281
  private void addDamage(int dmg) {
281
  private void addDamage(int dmg) {
282
    shield -= dmg;
282
    shield -= dmg;
283
    if (shield <= 0) {
283
    if (shield <= 0) {
Lines 342-348 Link Here
342
342
343
  // Check shots and rolls hit the enemy.
343
  // Check shots and rolls hit the enemy.
344
  private int checkHit(Vector p, float xofs, float yofs) {
344
  private int checkHit(Vector p, float xofs, float yofs) {
345
    if (fabs(p.x - pos.x) < type.collisionSize.x + xofs && 
345
    if (fabs(p.x - pos.x) < type.collisionSize.x + xofs &&
346
	fabs(p.y - pos.y) < type.collisionSize.y + yofs)
346
	fabs(p.y - pos.y) < type.collisionSize.y + yofs)
347
      return HIT;
347
      return HIT;
348
    if (type.wingCollision) {
348
    if (type.wingCollision) {
Lines 350-356 Link Here
350
	if (battery[i].shield <= 0)
350
	if (battery[i].shield <= 0)
351
	  continue;
351
	  continue;
352
	BatteryType bt = type.batteryType[i];
352
	BatteryType bt = type.batteryType[i];
353
	if (fabs(p.x - pos.x - bt.collisionPos.x) < bt.collisionSize.x + xofs && 
353
	if (fabs(p.x - pos.x - bt.collisionPos.x) < bt.collisionSize.x + xofs &&
354
	    fabs(p.y - pos.y - bt.collisionPos.y) < bt.collisionSize.y + yofs)
354
	    fabs(p.y - pos.y - bt.collisionPos.y) < bt.collisionSize.y + yofs)
355
	  return i;
355
	  return i;
356
      }
356
      }
Lines 371-377 Link Here
371
	  continue;
371
	  continue;
372
	BatteryType bt = type.batteryType[i];
372
	BatteryType bt = type.batteryType[i];
373
	float by = pos.y + bt.collisionPos.y;
373
	float by = pos.y + bt.collisionPos.y;
374
	if (fabs(p.x - pos.x - bt.collisionPos.x) < bt.collisionSize.x + xofs && 
374
	if (fabs(p.x - pos.x - bt.collisionPos.x) < bt.collisionSize.x + xofs &&
375
	    by < lock.lockMinY && by > p.y) {
375
	    by < lock.lockMinY && by > p.y) {
376
	  lock.lockMinY = by;
376
	  lock.lockMinY = by;
377
	  lp = i;
377
	  lp = i;
Lines 389-395 Link Here
389
    for (int i = 0; i < shots.actor.length; i++) {
389
    for (int i = 0; i < shots.actor.length; i++) {
390
      if (!shots.actor[i].isExist)
390
      if (!shots.actor[i].isExist)
391
	continue;
391
	continue;
392
      Vector sp = ((Shot) shots.actor[i]).pos;
392
      Vector sp = (cast(Shot) shots.actor[i]).pos;
393
      ch = checkHit(sp, 0.7, 0);
393
      ch = checkHit(sp, 0.7, 0);
394
      if (ch >= HIT) {
394
      if (ch >= HIT) {
395
	manager.addParticle(sp, rand.nextSignedFloat(0.3), 0, Shot.SPEED / 4);
395
	manager.addParticle(sp, rand.nextSignedFloat(0.3), 0, Shot.SPEED / 4);
Lines 407-413 Link Here
407
      for (int i = 0; i < rolls.actor.length; i++) {
407
      for (int i = 0; i < rolls.actor.length; i++) {
408
	if (!rolls.actor[i].isExist)
408
	if (!rolls.actor[i].isExist)
409
	  continue;
409
	  continue;
410
	Roll rl = (Roll) rolls.actor[i];
410
	Roll rl = cast(Roll) rolls.actor[i];
411
	ch = checkHit(rl.pos[0], 1.0, 1.0);
411
	ch = checkHit(rl.pos[0], 1.0, 1.0);
412
	if (ch >= HIT) {
412
	if (ch >= HIT) {
413
	  for (int i = 0; i < 4; i++)
413
	  for (int i = 0; i < 4; i++)
Lines 420-428 Link Here
420
	      continue;
420
	      continue;
421
	  }
421
	  }
422
	  if (ch == HIT)
422
	  if (ch == HIT)
423
	    addDamage(rd);
423
	    addDamage(cast(int)rd);
424
	  else
424
	  else
425
	    addDamageBattery(ch, rd);
425
	    addDamageBattery(ch, cast(int)rd);
426
	}
426
	}
427
      }
427
      }
428
    } else if (type.type != EnemyType.SMALL) {
428
    } else if (type.type != EnemyType.SMALL) {
Lines 430-436 Link Here
430
      for (int i = 0; i < locks.actor.length; i++) {
430
      for (int i = 0; i < locks.actor.length; i++) {
431
	if (!locks.actor[i].isExist)
431
	if (!locks.actor[i].isExist)
432
	  continue;
432
	  continue;
433
	Lock lk = (Lock) locks.actor[i];
433
	Lock lk = cast(Lock) locks.actor[i];
434
	if (lk.state == Lock.SEARCH || lk.state == Lock.SEARCHED) {
434
	if (lk.state == Lock.SEARCH || lk.state == Lock.SEARCHED) {
435
	  ch = checkLocked(lk.pos[0], 2.5, lk);
435
	  ch = checkLocked(lk.pos[0], 2.5, lk);
436
	  if (ch >= HIT) {
436
	  if (ch >= HIT) {
Lines 494-500 Link Here
494
    float od = d - deg;
494
    float od = d - deg;
495
    if (od > std.math.PI)
495
    if (od > std.math.PI)
496
      od -= std.math.PI * 2;
496
      od -= std.math.PI * 2;
497
    else if (od < -std.math.PI) 
497
    else if (od < -std.math.PI)
498
      od += std.math.PI * 2;
498
      od += std.math.PI * 2;
499
    float aod = std.math.fabs(od);
499
    float aod = std.math.fabs(od);
500
    if (aod < BOSS_MOVE_DEG) {
500
    if (aod < BOSS_MOVE_DEG) {
Lines 595-601 Link Here
595
	if (z < 0)
595
	if (z < 0)
596
	  z -= APPEARANCE_Z / 60;
596
	  z -= APPEARANCE_Z / 60;
597
	appCnt--;
597
	appCnt--;
598
	mtr = 1.0 - (float)appCnt / APPEARANCE_CNT;
598
	mtr = 1.0 - cast(float)appCnt / APPEARANCE_CNT;
599
      } else if (dstCnt > 0) {
599
      } else if (dstCnt > 0) {
600
	addFragments(1, z, 0.05, rand.nextSignedFloat(std.math.PI));
600
	addFragments(1, z, 0.05, rand.nextSignedFloat(std.math.PI));
601
	manager.clearBullets();
601
	manager.clearBullets();
Lines 609-615 Link Here
609
	  manager.setBossShieldMeter(0, 0, 0, 0, 0, 0);
609
	  manager.setBossShieldMeter(0, 0, 0, 0, 0, 0);
610
	  return;
610
	  return;
611
	}
611
	}
612
	mtr = (float)dstCnt / DESTROYED_CNT;
612
	mtr = cast(float)dstCnt / DESTROYED_CNT;
613
      } else if (timeoutCnt > 0) {
613
      } else if (timeoutCnt > 0) {
614
	z += DESTROYED_Z / 60;
614
	z += DESTROYED_Z / 60;
615
	timeoutCnt--;
615
	timeoutCnt--;
Lines 641-656 Link Here
641
    if (appCnt > 0) {
641
    if (appCnt > 0) {
642
      // Appearance effect of the boss.
642
      // Appearance effect of the boss.
643
      P47Screen.setRetroZ(z);
643
      P47Screen.setRetroZ(z);
644
      ap = (float) appCnt / APPEARANCE_CNT;
644
      ap = cast(float) appCnt / APPEARANCE_CNT;
645
      P47Screen.setRetroParam(1, type.retroSize * (1 + ap * 10));
645
      P47Screen.setRetroParam(1, type.retroSize * (1 + ap * 10));
646
      P47Screen.setRetroColor(type.r, type.g, type.b, (1 - ap));
646
      P47Screen.setRetroColor(type.r, type.g, type.b, (1 - ap));
647
    } else if (dstCnt > 0) {
647
    } else if (dstCnt > 0) {
648
      P47Screen.setRetroZ(z);
648
      P47Screen.setRetroZ(z);
649
      ap = (float) dstCnt / DESTROYED_CNT / 2 + 0.5;
649
      ap = cast(float) dstCnt / DESTROYED_CNT / 2 + 0.5;
650
      P47Screen.setRetroColor(type.r, type.g, type.b, ap);
650
      P47Screen.setRetroColor(type.r, type.g, type.b, ap);
651
    } else if (timeoutCnt > 0) {
651
    } else if (timeoutCnt > 0) {
652
      P47Screen.setRetroZ(z);
652
      P47Screen.setRetroZ(z);
653
      ap = (float) timeoutCnt / TIMEOUT_CNT;
653
      ap = cast(float) timeoutCnt / TIMEOUT_CNT;
654
      P47Screen.setRetroColor(type.r, type.g, type.b, ap);
654
      P47Screen.setRetroColor(type.r, type.g, type.b, ap);
655
    } else {
655
    } else {
656
      P47Screen.setRetroParam(1, type.retroSize);
656
      P47Screen.setRetroParam(1, type.retroSize);
Lines 728-734 Link Here
728
  Ship ship;
728
  Ship ship;
729
  P47GameManager manager;
729
  P47GameManager manager;
730
730
731
  public this(Field field, BulletActorPool bullets, ActorPool shots, 
731
  public this(Field field, BulletActorPool bullets, ActorPool shots,
732
	      ActorPool rolls, ActorPool locks, Ship ship, P47GameManager manager) {
732
	      ActorPool rolls, ActorPool locks, Ship ship, P47GameManager manager) {
733
    this.field = field;
733
    this.field = field;
734
    this.bullets = bullets;
734
    this.bullets = bullets;
(-)p47/src/abagames/p47/EnemyType.d (-12 / +12 lines)
Lines 123-129 Link Here
123
123
124
  // To avoid using the same morph pattern.
124
  // To avoid using the same morph pattern.
125
  private static bool usedMorphParser[BarrageManager.BARRAGE_MAX];
125
  private static bool usedMorphParser[BarrageManager.BARRAGE_MAX];
126
  
126
127
  private void setBarrageType(Barrage br, int btn, int mode) {
127
  private void setBarrageType(Barrage br, int btn, int mode) {
128
    br.parser = barrageManager.parser
128
    br.parser = barrageManager.parser
129
      [btn]
129
      [btn]
Lines 236-242 Link Here
236
    }
236
    }
237
  }
237
  }
238
238
239
  private static const float[][] enemySize = 
239
  private static const float[][] enemySize =
240
    [
240
    [
241
     [0.3, 0.3, 0.3, 0.1,  0.1,  1.0, 0.4, 0.6, 0.9],
241
     [0.3, 0.3, 0.3, 0.1,  0.1,  1.0, 0.4, 0.6, 0.9],
242
     [0.4, 0.2, 0.4, 0.1,  0.15,  2.2, 0.2, 1.6, 1.0],
242
     [0.4, 0.2, 0.4, 0.1,  0.15,  2.2, 0.2, 1.6, 1.0],
Lines 244-252 Link Here
244
     [0.9, 0.3, 0.7, 0.2,  0.25,  5.0, 0.6, 3.0, 1.5],
244
     [0.9, 0.3, 0.7, 0.2,  0.25,  5.0, 0.6, 3.0, 1.5],
245
     [1.2, 0.2, 0.9, 0.1,  0.3,  7.0, 0.8, 4.5, 1.5],
245
     [1.2, 0.2, 0.9, 0.1,  0.3,  7.0, 0.8, 4.5, 1.5],
246
     ];
246
     ];
247
  private enum {
247
//  private enum {
248
    SMALL, MIDDLE, LARGE, MIDDLEBOSS, LARGEBOSS,
248
//    SMALL, MIDDLE, LARGE, MIDDLEBOSS, LARGEBOSS,
249
  }
249
  //}
250
250
251
  // Set the shepe of the BatteryType.
251
  // Set the shepe of the BatteryType.
252
  private void setEnemyShapeAndWings(int size) {
252
  private void setEnemyShapeAndWings(int size) {
Lines 370-376 Link Here
370
  }
370
  }
371
371
372
  // Set the barrage of the BatteryType.
372
  // Set the barrage of the BatteryType.
373
  private void setBattery(float rank, int n, int barrageType, int barrageIntense, 
373
  private void setBattery(float rank, int n, int barrageType, int barrageIntense,
374
			  int idx, int ptnIdx, float slow, int mode) {
374
			  int idx, int ptnIdx, float slow, int mode) {
375
    BatteryType bt = batteryType[idx];
375
    BatteryType bt = batteryType[idx];
376
    BatteryType bt2 = batteryType[idx + 1];
376
    BatteryType bt2 = batteryType[idx + 1];
Lines 482-493 Link Here
482
      shield = 40 + rand.nextInt(10);
482
      shield = 40 + rand.nextInt(10);
483
      setBattery(sr, 1, BarrageManager.MIDDLESUB, NORMAL, 0, 0, 1, mode);
483
      setBattery(sr, 1, BarrageManager.MIDDLESUB, NORMAL, 0, 0, 1, mode);
484
      fireInterval = 100 + rand.nextInt(60);
484
      fireInterval = 100 + rand.nextInt(60);
485
      firePeriod = fireInterval / (1.8 + rand.nextFloat(0.7));
485
      firePeriod = cast(int)(fireInterval / (1.8 + rand.nextFloat(0.7)));
486
    } else {
486
    } else {
487
      shield = 30 + rand.nextInt(8);
487
      shield = 30 + rand.nextInt(8);
488
      setBattery(sr, 1, BarrageManager.MIDDLESUB_LOCK, NORMAL, 0, 0, 1, mode);
488
      setBattery(sr, 1, BarrageManager.MIDDLESUB_LOCK, NORMAL, 0, 0, 1, mode);
489
      fireInterval = 72 + rand.nextInt(30);
489
      fireInterval = 72 + rand.nextInt(30);
490
      firePeriod = fireInterval / (1.2 + rand.nextFloat(0.2));
490
      firePeriod = cast(int)(fireInterval / (1.2 + rand.nextFloat(0.2)));
491
    }
491
    }
492
    if (rank < 10)
492
    if (rank < 10)
493
      firePeriod /= (2 - rank * 0.1);
493
      firePeriod /= (2 - rank * 0.1);
Lines 565-577 Link Here
565
      setBattery(sr1, 1, BarrageManager.MIDDLESUB, NORMAL, 0, 0, 1, mode);
565
      setBattery(sr1, 1, BarrageManager.MIDDLESUB, NORMAL, 0, 0, 1, mode);
566
      setBattery(sr2, 1, BarrageManager.MIDDLESUB, NORMAL, 2, 0, 1, mode);
566
      setBattery(sr2, 1, BarrageManager.MIDDLESUB, NORMAL, 2, 0, 1, mode);
567
      fireInterval = 150 + rand.nextInt(60);
567
      fireInterval = 150 + rand.nextInt(60);
568
      firePeriod = fireInterval / (1.3 + rand.nextFloat(0.8));
568
      firePeriod = cast(int)(fireInterval / (1.3 + rand.nextFloat(0.8)));
569
    } else {
569
    } else {
570
      shield = 45 + rand.nextInt(8);
570
      shield = 45 + rand.nextInt(8);
571
      setBattery(sr1, 1, BarrageManager.MIDDLESUB_LOCK, NORMAL, 0, 0, 1, mode);
571
      setBattery(sr1, 1, BarrageManager.MIDDLESUB_LOCK, NORMAL, 0, 0, 1, mode);
572
      setBattery(sr2, 1, BarrageManager.MIDDLESUB_LOCK, NORMAL, 2, 0, 1, mode);
572
      setBattery(sr2, 1, BarrageManager.MIDDLESUB_LOCK, NORMAL, 2, 0, 1, mode);
573
      fireInterval = 100 + rand.nextInt(50);
573
      fireInterval = 100 + rand.nextInt(50);
574
      firePeriod = fireInterval / (1.2 + rand.nextFloat(0.2));
574
      firePeriod = cast(int)(fireInterval / (1.2 + rand.nextFloat(0.2)));
575
    }
575
    }
576
    if (rank < 10)
576
    if (rank < 10)
577
      firePeriod /= (2 - rank * 0.1);
577
      firePeriod /= (2 - rank * 0.1);
Lines 609-615 Link Here
609
    }
609
    }
610
    shield = 300 + rand.nextInt(50);
610
    shield = 300 + rand.nextInt(50);
611
    fireInterval = 200 + rand.nextInt(40);
611
    fireInterval = 200 + rand.nextInt(40);
612
    firePeriod = fireInterval / (1.2 + rand.nextFloat(0.4));
612
    firePeriod = cast(int)(fireInterval / (1.2 + rand.nextFloat(0.4)));
613
    if (rank < 10)
613
    if (rank < 10)
614
      firePeriod /= (2 - rank * 0.1);
614
      firePeriod /= (2 - rank * 0.1);
615
  }
615
  }
Lines 650-656 Link Here
650
    }
650
    }
651
    shield = 400 + rand.nextInt(50);
651
    shield = 400 + rand.nextInt(50);
652
    fireInterval = 220 + rand.nextInt(60);
652
    fireInterval = 220 + rand.nextInt(60);
653
    firePeriod = fireInterval / (1.2 + rand.nextFloat(0.3));
653
    firePeriod = cast(int)(fireInterval / (1.2 + rand.nextFloat(0.3)));
654
    if (rank < 10)
654
    if (rank < 10)
655
      firePeriod /= (2 - rank * 0.1);
655
      firePeriod /= (2 - rank * 0.1);
656
  }
656
  }
(-)p47/src/abagames/p47/Field.d (-9 / +9 lines)
Lines 5-11 Link Here
5
 */
5
 */
6
module abagames.p47.Field;
6
module abagames.p47.Field;
7
7
8
private:
8
//private:
9
import std.math;
9
import std.math;
10
import opengl;
10
import opengl;
11
import abagames.util.Vector;
11
import abagames.util.Vector;
Lines 97-103 Link Here
97
    float d = -RING_NUM * RING_ANGLE_INT / 2 + roll;
97
    float d = -RING_NUM * RING_ANGLE_INT / 2 + roll;
98
    for (int i = 0; i < RING_NUM; i++) {
98
    for (int i = 0; i < RING_NUM; i++) {
99
      for (int j = 1; j < 8; j++) {
99
      for (int j = 1; j < 8; j++) {
100
	float sc = (float) j / 16 + 0.5;
100
	float sc = cast(float) j / 16 + 0.5;
101
	glPushMatrix();
101
	glPushMatrix();
102
	glTranslatef(0, 0, z);
102
	glTranslatef(0, 0, z);
103
	glRotatef(d, 1, 0, 0);
103
	glRotatef(d, 1, 0, 0);
Lines 118-124 Link Here
118
  }
118
  }
119
119
120
  public bool checkHit(Vector p, float space) {
120
  public bool checkHit(Vector p, float space) {
121
    if (p.x < -size.x + space || p.x > size.x - space || 
121
    if (p.x < -size.x + space || p.x > size.x - space ||
122
	p.y < -size.y + space || p.y > size.y - space)
122
	p.y < -size.y + space || p.y > size.y - space)
123
      return true;
123
      return true;
124
    return false;
124
    return false;
Lines 126-132 Link Here
126
126
127
  private static const int RING_POS_NUM = 16;
127
  private static const int RING_POS_NUM = 16;
128
  private static Vector ringPos[RING_POS_NUM];
128
  private static Vector ringPos[RING_POS_NUM];
129
  private static const float RING_DEG = std.math.PI / 3 / ((float) (RING_POS_NUM / 2) + 0.5);
129
  private static const float RING_DEG = std.math.PI / 3 / (cast(float) (RING_POS_NUM / 2) + 0.5);
130
  private static const float RING_RADIUS = 10;
130
  private static const float RING_RADIUS = 10;
131
  private static const float RING_SIZE = 0.5;
131
  private static const float RING_SIZE = 0.5;
132
132
Lines 134-143 Link Here
134
    glBegin(GL_LINE_STRIP);
134
    glBegin(GL_LINE_STRIP);
135
    for (int i = 0; i <= RING_POS_NUM / 2 - 2; i++) {
135
    for (int i = 0; i <= RING_POS_NUM / 2 - 2; i++) {
136
      glVertex3f(ringPos[i].x, RING_SIZE, ringPos[i].y);
136
      glVertex3f(ringPos[i].x, RING_SIZE, ringPos[i].y);
137
    } 
137
    }
138
    for (int i = RING_POS_NUM / 2 - 2; i >= 0; i--) {
138
    for (int i = RING_POS_NUM / 2 - 2; i >= 0; i--) {
139
      glVertex3f(ringPos[i].x, -RING_SIZE, ringPos[i].y);
139
      glVertex3f(ringPos[i].x, -RING_SIZE, ringPos[i].y);
140
    } 
140
    }
141
    glVertex3f(ringPos[0].x, RING_SIZE, ringPos[0].y);
141
    glVertex3f(ringPos[0].x, RING_SIZE, ringPos[0].y);
142
    glEnd();
142
    glEnd();
143
    glBegin(GL_LINE_STRIP);
143
    glBegin(GL_LINE_STRIP);
Lines 150-165 Link Here
150
    glBegin(GL_LINE_STRIP);
150
    glBegin(GL_LINE_STRIP);
151
    for (int i = RING_POS_NUM / 2 + 1;  i <= RING_POS_NUM - 1; i++) {
151
    for (int i = RING_POS_NUM / 2 + 1;  i <= RING_POS_NUM - 1; i++) {
152
      glVertex3f(ringPos[i].x, RING_SIZE, ringPos[i].y);
152
      glVertex3f(ringPos[i].x, RING_SIZE, ringPos[i].y);
153
    } 
153
    }
154
    for (int i = RING_POS_NUM - 1; i >= RING_POS_NUM / 2 + 1; i--) {
154
    for (int i = RING_POS_NUM - 1; i >= RING_POS_NUM / 2 + 1; i--) {
155
      glVertex3f(ringPos[i].x, -RING_SIZE, ringPos[i].y);
155
      glVertex3f(ringPos[i].x, -RING_SIZE, ringPos[i].y);
156
    } 
156
    }
157
    glVertex3f(ringPos[RING_POS_NUM / 2 + 1].x, RING_SIZE, ringPos[RING_POS_NUM / 2 + 1].y);
157
    glVertex3f(ringPos[RING_POS_NUM / 2 + 1].x, RING_SIZE, ringPos[RING_POS_NUM / 2 + 1].y);
158
    glEnd();
158
    glEnd();
159
  }
159
  }
160
160
161
  public static void createDisplayLists() {
161
  public static void createDisplayLists() {
162
    float d = -RING_DEG * ((float) (RING_POS_NUM / 2) - 0.5);
162
    float d = -RING_DEG * (cast(float) (RING_POS_NUM / 2) - 0.5);
163
    for (int i = 0; i < RING_POS_NUM; i++, d += RING_DEG) {
163
    for (int i = 0; i < RING_POS_NUM; i++, d += RING_DEG) {
164
      ringPos[i] = new Vector;
164
      ringPos[i] = new Vector;
165
      ringPos[i].x = sin(d) * RING_RADIUS;
165
      ringPos[i].x = sin(d) * RING_RADIUS;
(-)p47/src/abagames/p47/Fragment.d (-2 / +2 lines)
Lines 5-11 Link Here
5
 */
5
 */
6
module abagames.p47.Fragment;
6
module abagames.p47.Fragment;
7
7
8
private:
8
//private:
9
import std.math;
9
import std.math;
10
import opengl;
10
import opengl;
11
import abagames.util.Vector;
11
import abagames.util.Vector;
Lines 43-49 Link Here
43
  }
43
  }
44
44
45
  public override void init(ActorInitializer ini) {
45
  public override void init(ActorInitializer ini) {
46
    FragmentInitializer fi = (FragmentInitializer) ini;
46
    FragmentInitializer fi = cast(FragmentInitializer) ini;
47
    for (int i = 0; i < POINT_NUM; i++) {
47
    for (int i = 0; i < POINT_NUM; i++) {
48
      pos[i] = new Vector;
48
      pos[i] = new Vector;
49
      vel[i] = new Vector;
49
      vel[i] = new Vector;
(-)p47/src/abagames/p47/LetterRender.d (-11 / +11 lines)
Lines 5-11 Link Here
5
 */
5
 */
6
module abagames.p47.LetterRender;
6
module abagames.p47.LetterRender;
7
7
8
private:
8
//private:
9
import opengl;
9
import opengl;
10
import abagames.util.sdl.Screen3D;
10
import abagames.util.sdl.Screen3D;
11
import abagames.p47.P47Screen;
11
import abagames.p47.P47Screen;
Lines 23-29 Link Here
23
    WHITE, RED
23
    WHITE, RED
24
  }
24
  }
25
25
26
  private static void changeColor(int c) {
26
  public static void changeColor(int c) {
27
    colorIdx = c * LETTER_NUM;
27
    colorIdx = c * LETTER_NUM;
28
  }
28
  }
29
29
Lines 177-198 Link Here
177
    float x, y, length, size, t;
177
    float x, y, length, size, t;
178
    int deg;
178
    int deg;
179
    for (int i = 0;; i++) {
179
    for (int i = 0;; i++) {
180
      deg = (int) spData[idx][i][4];
180
      deg = cast(int) spData[idx][i][4];
181
      if (deg > 99990) break;
181
      if (deg > 99990) break;
182
      x = -spData[idx][i][0]; 
182
      x = -spData[idx][i][0];
183
      y = -spData[idx][i][1];
183
      y = -spData[idx][i][1];
184
      size = spData[idx][i][2]; 
184
      size = spData[idx][i][2];
185
      length = spData[idx][i][3];
185
      length = spData[idx][i][3];
186
      size *= 0.66f; 
186
      size *= 0.66f;
187
      length *= 0.6f;
187
      length *= 0.6f;
188
      x = -x; 
188
      x = -x;
189
      y = y;
189
      y = y;
190
      deg %= 180;
190
      deg %= 180;
191
      if (deg <= 45 || deg > 135) 
191
      if (deg <= 45 || deg > 135)
192
	drawBox(x, y, size, length, r, g, b);
192
	drawBox(x, y, size, length, r, g, b);
193
      else 
193
      else
194
	drawBox(x, y, length, size, r, g, b);
194
	drawBox(x, y, length, size, r, g, b);
195
    }    
195
    }
196
  }
196
  }
197
197
198
  private static const int LETTER_NUM = 42;
198
  private static const int LETTER_NUM = 42;
Lines 215-221 Link Here
215
    glDeleteLists(displayListIdx, LETTER_NUM * 2);
215
    glDeleteLists(displayListIdx, LETTER_NUM * 2);
216
  }
216
  }
217
217
218
  private static float[5][16][] spData = 
218
  private static float[5][16][] spData =
219
    [[
219
    [[
220
     [0, 1.15f, 0.65f, 0.3f, 0],
220
     [0, 1.15f, 0.65f, 0.3f, 0],
221
     [-0.6f, 0.55f, 0.65f, 0.3f, 90], [0.6f, 0.55f, 0.65f, 0.3f, 90],
221
     [-0.6f, 0.55f, 0.65f, 0.3f, 90], [0.6f, 0.55f, 0.65f, 0.3f, 90],
(-)p47/src/abagames/p47/Lock.d (-1 / +1 lines)
Lines 52-58 Link Here
52
  }
52
  }
53
53
54
  public override void init(ActorInitializer ini) {
54
  public override void init(ActorInitializer ini) {
55
    LockInitializer li = (LockInitializer) ini;
55
    LockInitializer li = cast(LockInitializer) ini;
56
    ship = li.ship;
56
    ship = li.ship;
57
    field = li.field;
57
    field = li.field;
58
    manager = li.manager;
58
    manager = li.manager;
(-)p47/src/abagames/p47/LuminousActorPool.d (-1 / +1 lines)
Lines 22-28 Link Here
22
  public void drawLuminous() {
22
  public void drawLuminous() {
23
    for (int i = 0; i < actor.length; i++) {
23
    for (int i = 0; i < actor.length; i++) {
24
      if (actor[i].isExist)
24
      if (actor[i].isExist)
25
	((LuminousActor) actor[i]).drawLuminous();
25
	(cast(LuminousActor) actor[i]).drawLuminous();
26
    }
26
    }
27
  }
27
  }
28
}
28
}
(-)p47/src/abagames/p47/LuminousScreen.d (-4 / +4 lines)
Lines 5-11 Link Here
5
 */
5
 */
6
module abagames.p47.LuminousScreen;
6
module abagames.p47.LuminousScreen;
7
7
8
private:
8
//private:
9
import std.math;
9
import std.math;
10
import std.string;
10
import std.string;
11
import opengl;
11
import opengl;
Lines 19-25 Link Here
19
  GLuint luminousTexture;
19
  GLuint luminousTexture;
20
  const int LUMINOUS_TEXTURE_WIDTH_MAX = 64;
20
  const int LUMINOUS_TEXTURE_WIDTH_MAX = 64;
21
  const int LUMINOUS_TEXTURE_HEIGHT_MAX = 64;
21
  const int LUMINOUS_TEXTURE_HEIGHT_MAX = 64;
22
  GLuint td[LUMINOUS_TEXTURE_WIDTH_MAX * LUMINOUS_TEXTURE_HEIGHT_MAX * 4 * uint.size];
22
  GLuint td[LUMINOUS_TEXTURE_WIDTH_MAX * LUMINOUS_TEXTURE_HEIGHT_MAX * 4 * uint.sizeof];
23
  int luminousTextureWidth = 64, luminousTextureHeight = 64;
23
  int luminousTextureWidth = 64, luminousTextureHeight = 64;
24
  int screenWidth, screenHeight;
24
  int screenWidth, screenHeight;
25
  float luminous;
25
  float luminous;
Lines 27-33 Link Here
27
  private void makeLuminousTexture() {
27
  private void makeLuminousTexture() {
28
    uint *data = td;
28
    uint *data = td;
29
    int i;
29
    int i;
30
    memset(data, 0, luminousTextureWidth * luminousTextureHeight * 4 * uint.size);
30
   // cast(data, 0, luminousTextureWidth * luminousTextureHeight * 4 * uint.sizeof);
31
    glGenTextures(1, &luminousTexture);
31
    glGenTextures(1, &luminousTexture);
32
    glBindTexture(GL_TEXTURE_2D, luminousTexture);
32
    glBindTexture(GL_TEXTURE_2D, luminousTexture);
33
    glTexImage2D(GL_TEXTURE_2D, 0, 4, luminousTextureWidth, luminousTextureHeight, 0,
33
    glTexImage2D(GL_TEXTURE_2D, 0, 4, luminousTextureWidth, luminousTextureHeight, 0,
Lines 57-63 Link Here
57
57
58
  public void endRenderToTexture() {
58
  public void endRenderToTexture() {
59
    glBindTexture(GL_TEXTURE_2D, luminousTexture);
59
    glBindTexture(GL_TEXTURE_2D, luminousTexture);
60
    glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 
60
    glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA,
61
		     0, 0, luminousTextureWidth, luminousTextureHeight, 0);
61
		     0, 0, luminousTextureWidth, luminousTextureHeight, 0);
62
    glViewport(0, 0, screenWidth, screenHeight);
62
    glViewport(0, 0, screenWidth, screenHeight);
63
  }
63
  }
(-)p47/src/abagames/p47/P47Boot.d (-3 / +3 lines)
Lines 6-12 Link Here
6
module abagames.p47.P47Boot;
6
module abagames.p47.P47Boot;
7
7
8
private:
8
private:
9
import std.string;
9
//import std.string;
10
import std.c.stdlib;
10
import std.c.stdlib;
11
import abagames.util.Logger;
11
import abagames.util.Logger;
12
import abagames.util.sdl.Pad;
12
import abagames.util.sdl.Pad;
Lines 42-48 Link Here
42
	throw new Exception("Invalid options");
42
	throw new Exception("Invalid options");
43
      }
43
      }
44
      i++;
44
      i++;
45
      float b = (float) atoi(args[i]) / 100;
45
      float b = cast(float) atoi(args[i]) / 100;
46
      if (b < 0 || b > 1) {
46
      if (b < 0 || b > 1) {
47
	usage(args[0]);
47
	usage(args[0]);
48
	throw new Exception("Invalid options");
48
	throw new Exception("Invalid options");
Lines 55-61 Link Here
55
	throw new Exception("Invalid options");
55
	throw new Exception("Invalid options");
56
      }
56
      }
57
      i++;
57
      i++;
58
      float l = (float) atoi(args[i]) / 100;
58
      float l = cast(float) atoi(args[i]) / 100;
59
      if (l < 0 || l > 1) {
59
      if (l < 0 || l > 1) {
60
	usage(args[0]);
60
	usage(args[0]);
61
	throw new Exception("Invalid options");
61
	throw new Exception("Invalid options");
(-)p47/src/abagames/p47/P47GameManager.d (-26 / +49 lines)
Lines 5-14 Link Here
5
 */
5
 */
6
module abagames.p47.P47GameManager;
6
module abagames.p47.P47GameManager;
7
7
8
private:
8
//private:
9
import std.math;
9
import std.math;
10
import opengl;
10
import opengl;
11
import SDL;
11
import SDL;
12
import SDL_active;   
13
import SDL_joystick;  
14
import SDL_mutex;   
15
import SDL_timer;
16
import SDL_audio;      
17
import SDL_endian;  
18
import SDL_keyboard;  
19
import SDL_quit;
20
import SDL_types;
21
import SDL_byteorder;  
22
import SDL_error;
23
import SDL_Keysym;    
24
import SDL_rwops;   
25
import SDL_version;
26
import SDL_cdrom;   
27
import SDL_events;  
28
import SDL_syswm;  
29
import SDL_Version;
30
import SDL_copying;  
31
import SDL_getenv;
32
import SDL_mouse;   
33
import SDL_thread;  
34
import SDL_video;
12
import bulletml;
35
import bulletml;
13
import abagames.util.Rand;
36
import abagames.util.Rand;
14
import abagames.util.Vector;
37
import abagames.util.Vector;
Lines 88-96 Link Here
88
111
89
  // Initialize actor pools, load BGMs/SEs and textures.
112
  // Initialize actor pools, load BGMs/SEs and textures.
90
  public override void init() {
113
  public override void init() {
91
    pad = (Pad) input;
114
    pad = cast(Pad) input;
92
    prefManager = (P47PrefManager) abstPrefManager;
115
    prefManager = cast(P47PrefManager) abstPrefManager;
93
    screen = (P47Screen) abstScreen;
116
    screen = cast(P47Screen) abstScreen;
94
    rand = new Rand;
117
    rand = new Rand;
95
    Field.createDisplayLists();
118
    Field.createDisplayLists();
96
    field = new Field;
119
    field = new Field;
Lines 177-198 Link Here
177
  }
200
  }
178
201
179
  public void addParticle(Vector pos, float deg, float ofs, float speed) {
202
  public void addParticle(Vector pos, float deg, float ofs, float speed) {
180
    Particle pt = (Particle) particles.getInstanceForced();
203
    Particle pt = cast(Particle) particles.getInstanceForced();
181
    assert(pt);
204
    assert(pt);
182
    pt.set(pos, deg, ofs, speed);
205
    pt.set(pos, deg, ofs, speed);
183
  }
206
  }
184
207
185
  public void addFragments(int n, float x1, float y1, float x2, float y2, float z, 
208
  public void addFragments(int n, float x1, float y1, float x2, float y2, float z,
186
			   float speed, float deg) {
209
			   float speed, float deg) {
187
    for (int i = 0; i < n; i++) {
210
    for (int i = 0; i < n; i++) {
188
      Fragment ft = (Fragment) fragments.getInstanceForced();
211
      Fragment ft = cast(Fragment) fragments.getInstanceForced();
189
      assert(ft);
212
      assert(ft);
190
      ft.set(x1, y1, x2, y2, z, speed, deg);
213
      ft.set(x1, y1, x2, y2, z, speed, deg);
191
    }
214
    }
192
  }
215
  }
193
216
194
  public void addEnemy(Vector pos, float d, EnemyType type, BulletMLParser *moveParser) {
217
  public void addEnemy(Vector pos, float d, EnemyType type, BulletMLParser *moveParser) {
195
    Enemy en = (Enemy) enemies.getInstance();
218
    Enemy en = cast(Enemy) enemies.getInstance();
196
    if (!en)
219
    if (!en)
197
      return;
220
      return;
198
    en.set(pos, d, type, moveParser);
221
    en.set(pos, d, type, moveParser);
Lines 202-234 Link Here
202
    for (int i = 0; i < bullets.actor.length; i++) {
225
    for (int i = 0; i < bullets.actor.length; i++) {
203
      if (!bullets.actor[i].isExist)
226
      if (!bullets.actor[i].isExist)
204
	continue;
227
	continue;
205
      ((BulletActor) bullets.actor[i]).toRetro();
228
      (cast(BulletActor) bullets.actor[i]).toRetro();
206
    }
229
    }
207
  }
230
  }
208
231
209
  public void addBoss(Vector pos, float d, EnemyType type) {
232
  public void addBoss(Vector pos, float d, EnemyType type) {
210
    Enemy en = (Enemy) enemies.getInstance();
233
    Enemy en = cast(Enemy) enemies.getInstance();
211
    if (!en)
234
    if (!en)
212
      return;
235
      return;
213
    en.setBoss(pos, d, type);
236
    en.setBoss(pos, d, type);
214
  }
237
  }
215
238
216
  public void addShot(Vector pos, float deg) {
239
  public void addShot(Vector pos, float deg) {
217
    Shot shot = (Shot) shots.getInstance();
240
    Shot shot = cast(Shot) shots.getInstance();
218
    if (!shot)
241
    if (!shot)
219
      return;
242
      return;
220
    shot.set(pos, deg);
243
    shot.set(pos, deg);
221
  }
244
  }
222
245
223
  public void addRoll() {
246
  public void addRoll() {
224
    Roll roll = (Roll) rolls.getInstance();
247
    Roll roll = cast(Roll) rolls.getInstance();
225
    if (!roll)
248
    if (!roll)
226
      return;
249
      return;
227
    roll.set();
250
    roll.set();
228
  }
251
  }
229
252
230
  public void addLock() {
253
  public void addLock() {
231
    Lock lock = (Lock) locks.getInstance();
254
    Lock lock = cast(Lock) locks.getInstance();
232
    if (!lock)
255
    if (!lock)
233
      return;
256
      return;
234
    lock.set();
257
    lock.set();
Lines 238-244 Link Here
238
    for (int i = 0; i < rolls.actor.length; i++) {
261
    for (int i = 0; i < rolls.actor.length; i++) {
239
      if (!rolls.actor[i].isExist)
262
      if (!rolls.actor[i].isExist)
240
	continue;
263
	continue;
241
      ((Roll) rolls.actor[i]).released = true;
264
      (cast(Roll) rolls.actor[i]).released = true;
242
    }
265
    }
243
  }
266
  }
244
267
Lines 246-259 Link Here
246
    for (int i = 0; i < locks.actor.length; i++) {
269
    for (int i = 0; i < locks.actor.length; i++) {
247
      if (!locks.actor[i].isExist)
270
      if (!locks.actor[i].isExist)
248
	continue;
271
	continue;
249
      ((Lock) locks.actor[i]).released = true;
272
      (cast(Lock) locks.actor[i]).released = true;
250
    }
273
    }
251
  }
274
  }
252
275
253
276
254
  public void addBonus(Vector pos, Vector ofs, int num) {
277
  public void addBonus(Vector pos, Vector ofs, int num) {
255
    for (int i = 0; i < num; i++) {
278
    for (int i = 0; i < num; i++) {
256
      Bonus bonus = (Bonus) bonuses.getInstance();
279
      Bonus bonus = cast(Bonus) bonuses.getInstance();
257
      if (!bonus)
280
      if (!bonus)
258
	return;
281
	return;
259
      bonus.set(pos, ofs);
282
      bonus.set(pos, ofs);
Lines 262-272 Link Here
262
285
263
  public void setBossShieldMeter(int bs, int s1, int s2, int s3, int s4, float r) {
286
  public void setBossShieldMeter(int bs, int s1, int s2, int s3, int s4, float r) {
264
    r *= 0.7;
287
    r *= 0.7;
265
    bossShield = bs * r;
288
    bossShield = cast(int)(bs * r);
266
    bossWingShield[0] = s1 * r ;
289
    bossWingShield[0] = cast(int)(s1 * r);
267
    bossWingShield[1] = s2 * r;
290
    bossWingShield[1] = cast(int)(s2 * r);
268
    bossWingShield[2] = s3 * r;
291
    bossWingShield[2] = cast(int)(s3 * r);
269
    bossWingShield[3] = s4 * r;
292
    bossWingShield[3] = cast(int)(s4 * r);
270
  }
293
  }
271
294
272
  // Difficulty.
295
  // Difficulty.
Lines 341-347 Link Here
341
    rolls.clear();
364
    rolls.clear();
342
    locks.clear();
365
    locks.clear();
343
    setScreenShake(0, 0);
366
    setScreenShake(0, 0);
344
    mainLoop.interval = interval = mainLoop.INTERVAL_BASE;
367
    mainLoop.interval = cast(int)(interval = mainLoop.INTERVAL_BASE);
345
    cnt = 0;
368
    cnt = 0;
346
    if (score > prefManager.hiScore[mode][difficulty][parsecSlot])
369
    if (score > prefManager.hiScore[mode][difficulty][parsecSlot])
347
      prefManager.hiScore[mode][difficulty][parsecSlot] = score;
370
      prefManager.hiScore[mode][difficulty][parsecSlot] = score;
Lines 396-405 Link Here
396
	if (sm > 1.75)
419
	if (sm > 1.75)
397
	  sm = 1.75;
420
	  sm = 1.75;
398
	interval += (sm * mainLoop.INTERVAL_BASE - interval) * 0.1;
421
	interval += (sm * mainLoop.INTERVAL_BASE - interval) * 0.1;
399
	mainLoop.interval = interval;
422
	mainLoop.interval = cast(int)(interval);
400
      } else {
423
      } else {
401
	interval += (mainLoop.INTERVAL_BASE - interval) * 0.08;
424
	interval += (mainLoop.INTERVAL_BASE - interval) * 0.08;
402
	mainLoop.interval = interval;
425
	mainLoop.interval = cast(int)(interval);
403
      }
426
      }
404
    }
427
    }
405
  }
428
  }
Lines 452-458 Link Here
452
	startTitle();
475
	startTitle();
453
    } else if (cnt > 500) {
476
    } else if (cnt > 500) {
454
	startTitle();
477
	startTitle();
455
    } 
478
    }
456
    field.move();
479
    field.move();
457
    enemies.move();
480
    enemies.move();
458
    bullets.move();
481
    bullets.move();
Lines 578-584 Link Here
578
    LetterRender.drawNum(Bonus.bonusScore, 24, 20, 12, LetterRender.TO_UP);
601
    LetterRender.drawNum(Bonus.bonusScore, 24, 20, 12, LetterRender.TO_UP);
579
  }
602
  }
580
603
581
  private void drawLeft() {
604
  public void drawLeft() {
582
    if (left < 0)
605
    if (left < 0)
583
      return;
606
      return;
584
    LetterRender.drawString("LEFT", 520, 260, 25, LetterRender.TO_DOWN);
607
    LetterRender.drawString("LEFT", 520, 260, 25, LetterRender.TO_DOWN);
(-)p47/src/abagames/p47/P47PrefManager.d (+4 lines)
Lines 53-58 Link Here
53
    auto File fd = new File;
53
    auto File fd = new File;
54
    try {
54
    try {
55
      int ver;
55
      int ver;
56
//      if (exists(PREF_FILE) == 0){
57
  //      init();
58
    //    save();
59
      //}
56
      fd.open(PREF_FILE);
60
      fd.open(PREF_FILE);
57
      fd.read(ver);
61
      fd.read(ver);
58
      if (ver == PREV_VERSION_NUM) {
62
      if (ver == PREV_VERSION_NUM) {
(-)p47/src/abagames/p47/P47Screen.d (-4 / +4 lines)
Lines 5-11 Link Here
5
 */
5
 */
6
module abagames.p47.P47Screen;
6
module abagames.p47.P47Screen;
7
7
8
private:
8
//private:
9
import std.math;
9
import std.math;
10
import opengl;
10
import opengl;
11
import abagames.util.Rand;
11
import abagames.util.Rand;
Lines 33-39 Link Here
33
    glDisable(GL_CULL_FACE);
33
    glDisable(GL_CULL_FACE);
34
    glDisable(GL_DEPTH_TEST);
34
    glDisable(GL_DEPTH_TEST);
35
    glDisable(GL_TEXTURE_2D);
35
    glDisable(GL_TEXTURE_2D);
36
    glDisable(GL_COLOR_MATERIAL);    
36
    glDisable(GL_COLOR_MATERIAL);
37
    rand = new Rand;
37
    rand = new Rand;
38
    if (luminous > 0) {
38
    if (luminous > 0) {
39
      luminousScreen = new LuminousScreen;
39
      luminousScreen = new LuminousScreen;
Lines 128-134 Link Here
128
      float ly = std.math.fabs(y2 - y1);
128
      float ly = std.math.fabs(y2 - y1);
129
      glBegin(GL_QUADS);
129
      glBegin(GL_QUADS);
130
      if (lx < ly) {
130
      if (lx < ly) {
131
	int n = ly / ds;
131
	int n = cast(int)(ly / ds);
132
	if (n > 0) {
132
	if (n > 0) {
133
	  float xo = (x2 - x1) / n, xos  = 0;
133
	  float xo = (x2 - x1) / n, xos  = 0;
134
	  float yo;
134
	  float yo;
Lines 152-158 Link Here
152
	  }
152
	  }
153
	}
153
	}
154
      } else {
154
      } else {
155
	int n = lx / ds;
155
	int n = cast(int)(lx / ds);
156
	if (n > 0) {
156
	if (n > 0) {
157
	  float yo = (y2 - y1) / n, yos = 0;
157
	  float yo = (y2 - y1) / n, yos = 0;
158
	  float xo;
158
	  float xo;
(-)p47/src/abagames/p47/Roll.d (-1 / +1 lines)
Lines 40-46 Link Here
40
  }
40
  }
41
41
42
  public override void init(ActorInitializer ini) {
42
  public override void init(ActorInitializer ini) {
43
    RollInitializer ri = (RollInitializer) ini;
43
    RollInitializer ri = cast(RollInitializer) ini;
44
    ship = ri.ship;
44
    ship = ri.ship;
45
    field = ri.field;
45
    field = ri.field;
46
    manager = ri.manager;
46
    manager = ri.manager;
(-)p47/src/abagames/p47/Shot.d (-1 / +1 lines)
Lines 35-41 Link Here
35
  }
35
  }
36
36
37
  public override void init(ActorInitializer ini) {
37
  public override void init(ActorInitializer ini) {
38
    ShotInitializer si = (ShotInitializer) ini;
38
    ShotInitializer si = cast(ShotInitializer) ini;
39
    field = si.field;
39
    field = si.field;
40
    pos = new Vector;
40
    pos = new Vector;
41
    vel = new Vector;
41
    vel = new Vector;
(-)p47/src/abagames/util/Logger.d (-8 / +8 lines)
Lines 52-77 Link Here
52
public class Logger {
52
public class Logger {
53
53
54
  public static void info(char[] msg) {
54
  public static void info(char[] msg) {
55
    stderr.writeLine("Info: " ~ msg);
55
//    stderr.writeLine("Info: " ~ msg);
56
  }
56
  }
57
57
58
  public static void info(int n) {
58
  public static void info(int n) {
59
    if (n >= 0)
59
  //  if (n >= 0)
60
      stderr.writeLine("Info: " ~ std.string.toString(n));
60
  //    stderr.writeLine("Info: " ~ std.string.toString(n));
61
    else
61
//    else
62
      stderr.writeLine("Info: -" ~ std.string.toString(-n));
62
  //    stderr.writeLine("Info: -" ~ std.string.toString(-n));
63
  }
63
  }
64
64
65
  public static void error(char[] msg) {
65
  public static void error(char[] msg) {
66
    stderr.writeLine("Error: " ~ msg);
66
   // stderr.writeLine("Error: " ~ msg);
67
  }
67
  }
68
68
69
  public static void error(Exception e) {
69
  public static void error(Exception e) {
70
    stderr.writeLine("Error: " ~ e.toString());
70
  //  stderr.writeLine("Error: " ~ e.toString());
71
  }
71
  }
72
72
73
  public static void error(Error e) {
73
  public static void error(Error e) {
74
    stderr.writeLine("Error: " ~ e.toString());
74
    //stderr.writeLine("Error: " ~ e.toString());
75
    if (e.next)
75
    if (e.next)
76
      error(e.next);
76
      error(e.next);
77
  }
77
  }
(-)p47/src/abagames/util/sdl/Input.d (+23 lines)
Lines 7-12 Link Here
7
7
8
private:
8
private:
9
import SDL;
9
import SDL;
10
import SDL_active;   
11
import SDL_joystick;  
12
import SDL_mutex;   
13
import SDL_timer;
14
import SDL_audio;      
15
import SDL_endian;  
16
import SDL_keyboard;  
17
import SDL_quit;
18
import SDL_types;
19
import SDL_byteorder;  
20
import SDL_error;
21
import SDL_Keysym;    
22
import SDL_rwops;   
23
import SDL_version;
24
import SDL_cdrom;   
25
import SDL_events;  
26
import SDL_syswm;  
27
import SDL_Version;
28
import SDL_copying;  
29
import SDL_getenv;
30
import SDL_mouse;   
31
import SDL_thread;  
32
import SDL_video;
10
33
11
/**
34
/**
12
 * Input device interface.
35
 * Input device interface.
(-)p47/src/abagames/util/sdl/MainLoop.d (-1 / +24 lines)
Lines 8-13 Link Here
8
private:
8
private:
9
import std.string;
9
import std.string;
10
import SDL;
10
import SDL;
11
import SDL_active;   
12
import SDL_joystick;  
13
import SDL_mutex;   
14
import SDL_timer;
15
import SDL_audio;      
16
import SDL_endian;  
17
import SDL_keyboard;  
18
import SDL_quit;
19
import SDL_types;
20
import SDL_byteorder;  
21
import SDL_error;
22
import SDL_Keysym;    
23
import SDL_rwops;   
24
import SDL_version;
25
import SDL_cdrom;   
26
import SDL_events;  
27
import SDL_syswm;  
28
import SDL_Version;
29
import SDL_copying;  
30
import SDL_getenv;
31
import SDL_mouse;   
32
import SDL_thread;  
33
import SDL_video;
11
import abagames.util.Logger;
34
import abagames.util.Logger;
12
import abagames.util.Rand;
35
import abagames.util.Rand;
13
import abagames.util.PrefManager;
36
import abagames.util.PrefManager;
Lines 88-94 Link Here
88
      if (event.type == SDL_QUIT)
111
      if (event.type == SDL_QUIT)
89
	breakLoop();
112
	breakLoop();
90
      nowTick = SDL_GetTicks();
113
      nowTick = SDL_GetTicks();
91
      frame = (int) (nowTick-prvTickCount) / interval;
114
      frame = cast(int) (nowTick-prvTickCount) / interval;
92
      if (frame <= 0) {
115
      if (frame <= 0) {
93
	frame = 1;
116
	frame = 1;
94
	SDL_Delay(prvTickCount+interval-nowTick);
117
	SDL_Delay(prvTickCount+interval-nowTick);
(-)p47/src/abagames/util/sdl/Pad.d (+23 lines)
Lines 8-13 Link Here
8
private:
8
private:
9
import std.string;
9
import std.string;
10
import SDL;
10
import SDL;
11
import SDL_active;   
12
import SDL_joystick;  
13
import SDL_mutex;   
14
import SDL_timer;
15
import SDL_audio;      
16
import SDL_endian;  
17
import SDL_keyboard;  
18
import SDL_quit;
19
import SDL_types;
20
import SDL_byteorder;  
21
import SDL_error;
22
import SDL_Keysym;    
23
import SDL_rwops;   
24
import SDL_version;
25
import SDL_cdrom;   
26
import SDL_events;  
27
import SDL_syswm;  
28
import SDL_Version;
29
import SDL_copying;  
30
import SDL_getenv;
31
import SDL_mouse;   
32
import SDL_thread;  
33
import SDL_video;
11
import abagames.util.sdl.Input;
34
import abagames.util.sdl.Input;
12
import abagames.util.sdl.SDLInitFailedException;
35
import abagames.util.sdl.SDLInitFailedException;
13
36
(-)p47/src/abagames/util/sdl/Screen3D.d (-3 / +26 lines)
Lines 8-13 Link Here
8
private:
8
private:
9
import std.string;
9
import std.string;
10
import SDL;
10
import SDL;
11
import SDL_active;   
12
import SDL_joystick;  
13
import SDL_mutex;   
14
import SDL_timer;
15
import SDL_audio;      
16
import SDL_endian;  
17
import SDL_keyboard;  
18
import SDL_quit;
19
import SDL_types;
20
import SDL_byteorder;  
21
import SDL_error;
22
import SDL_Keysym;    
23
import SDL_rwops;   
24
import SDL_version;
25
import SDL_cdrom;   
26
import SDL_events;  
27
import SDL_syswm;  
28
import SDL_Version;
29
import SDL_copying;  
30
import SDL_getenv;
31
import SDL_mouse;   
32
import SDL_thread;  
33
import SDL_video;
11
import opengl;
34
import opengl;
12
import abagames.util.Logger;
35
import abagames.util.Logger;
13
import abagames.util.sdl.Screen;
36
import abagames.util.sdl.Screen;
Lines 47-53 Link Here
47
      videoFlags = SDL_OPENGL | SDL_RESIZABLE;
70
      videoFlags = SDL_OPENGL | SDL_RESIZABLE;
48
    } else {
71
    } else {
49
      videoFlags = SDL_OPENGL | SDL_FULLSCREEN;
72
      videoFlags = SDL_OPENGL | SDL_FULLSCREEN;
50
    } 
73
    }
51
    if (SDL_SetVideoMode(width, height, 0, videoFlags) == null) {
74
    if (SDL_SetVideoMode(width, height, 0, videoFlags) == null) {
52
      throw new SDLInitFailedException
75
      throw new SDLInitFailedException
53
	("Unable to create SDL screen: " ~ std.string.toString(SDL_GetError()));
76
	("Unable to create SDL screen: " ~ std.string.toString(SDL_GetError()));
Lines 67-74 Link Here
67
    //gluPerspective(45.0f, (GLfloat)width/(GLfloat)height, nearPlane, farPlane);
90
    //gluPerspective(45.0f, (GLfloat)width/(GLfloat)height, nearPlane, farPlane);
68
    glFrustum(-nearPlane,
91
    glFrustum(-nearPlane,
69
	      nearPlane,
92
	      nearPlane,
70
	      -nearPlane * (GLfloat)height / (GLfloat)width,
93
	      -nearPlane * cast(GLfloat)height / cast(GLfloat)width,
71
	      nearPlane * (GLfloat)height / (GLfloat)width,
94
	      nearPlane * cast(GLfloat)height / cast(GLfloat)width,
72
	      0.1f, farPlane);
95
	      0.1f, farPlane);
73
    glMatrixMode(GL_MODELVIEW);
96
    glMatrixMode(GL_MODELVIEW);
74
  }
97
  }
(-)p47/src/abagames/util/sdl/Sound.d (+23 lines)
Lines 8-13 Link Here
8
private:
8
private:
9
import std.string;
9
import std.string;
10
import SDL;
10
import SDL;
11
import SDL_active;   
12
import SDL_joystick;  
13
import SDL_mutex;   
14
import SDL_timer;
15
import SDL_audio;      
16
import SDL_endian;  
17
import SDL_keyboard;  
18
import SDL_quit;
19
import SDL_types;
20
import SDL_byteorder;  
21
import SDL_error;
22
import SDL_Keysym;    
23
import SDL_rwops;   
24
import SDL_version;
25
import SDL_cdrom;   
26
import SDL_events;  
27
import SDL_syswm;  
28
import SDL_Version;
29
import SDL_copying;  
30
import SDL_getenv;
31
import SDL_mouse;   
32
import SDL_thread;  
33
import SDL_video;
11
import SDL_mixer;
34
import SDL_mixer;
12
import abagames.util.sdl.SDLInitFailedException;
35
import abagames.util.sdl.SDLInitFailedException;
13
36
(-)p47/src/abagames/util/sdl/Texture.d (+23 lines)
Lines 9-14 Link Here
9
import std.string;
9
import std.string;
10
import opengl;
10
import opengl;
11
import SDL;
11
import SDL;
12
import SDL_active;   
13
import SDL_joystick;  
14
import SDL_mutex;   
15
import SDL_timer;
16
import SDL_audio;      
17
import SDL_endian;  
18
import SDL_keyboard;  
19
import SDL_quit;
20
import SDL_types;
21
import SDL_byteorder;  
22
import SDL_error;
23
import SDL_Keysym;    
24
import SDL_rwops;   
25
import SDL_version;
26
import SDL_cdrom;   
27
import SDL_events;  
28
import SDL_syswm;  
29
import SDL_Version;
30
import SDL_copying;  
31
import SDL_getenv;
32
import SDL_mouse;   
33
import SDL_thread;  
34
import SDL_video;
12
import abagames.util.sdl.SDLInitFailedException;
35
import abagames.util.sdl.SDLInitFailedException;
13
36
14
/**
37
/**
(-)p47/src/dirent_d.c (-47 / +1 lines)
Lines 1-50 Link Here
1
#ifdef WINDOWS
2
1
3
#include <windows.h>
4
5
#include <stdio.h>
6
#include <malloc.h>
7
8
typedef struct {
9
	HANDLE h;
10
	char* prev;
11
} DIR;
12
13
DIR* opendir(char* dir) {
14
	WIN32_FIND_DATA fd;
15
	HANDLE h;
16
	DIR* d;
17
	char buf[MAX_PATH];
18
19
	sprintf(buf, "%s/*", dir);
20
	h = FindFirstFileA(buf, &fd);
21
	d = (DIR*)malloc(sizeof(DIR));
22
	d->h = h;
23
	d->prev = 0;
24
	return d;
25
}
26
27
char* readdir_filename(DIR* d) {
28
	WIN32_FIND_DATA fd;
29
	BOOL ret = FindNextFileA(d->h, &fd);
30
	if (ret) {
31
		if (d->prev != 0) free(d->prev);
32
		d->prev = malloc(sizeof(char) * strlen(fd.cFileName));
33
		strcpy(d->prev, fd.cFileName);
34
		return d->prev;
35
	}
36
	else {
37
		return NULL;
38
	}
39
}
40
41
int closedir(DIR* d) {
42
	FindClose(d->h);
43
	free(d->prev);
44
	free(d);
45
}
46
47
#else // ! WINDOWS
48
2
49
#include "dirent.h"
3
#include "dirent.h"
50
#include "unistd.h"
4
#include "unistd.h"
Lines 55-59 Link Here
55
	else return ent->d_name;
9
	else return ent->d_name;
56
}
10
}
57
11
58
#endif // WINDOWS
12
59
13
(-)p47/src/mt.d (-4 / +4 lines)
Lines 162-168 Link Here
162
    y ^= (y << 15) & 0xefc60000UL;
162
    y ^= (y << 15) & 0xefc60000UL;
163
    y ^= (y >> 18);
163
    y ^= (y >> 18);
164
164
165
    return (long)(y>>1);
165
    return cast(long)(y>>1);
166
}
166
}
167
167
168
/* generates a random number on [0,1]-real-interval */
168
/* generates a random number on [0,1]-real-interval */
Lines 179-185 Link Here
179
    y ^= (y << 15) & 0xefc60000UL;
179
    y ^= (y << 15) & 0xefc60000UL;
180
    y ^= (y >> 18);
180
    y ^= (y >> 18);
181
181
182
    return (double)y * (1.0/4294967295.0); 
182
    return cast(double)y * (1.0/4294967295.0); 
183
    /* divided by 2^32-1 */ 
183
    /* divided by 2^32-1 */ 
184
}
184
}
185
185
Lines 197-203 Link Here
197
    y ^= (y << 15) & 0xefc60000UL;
197
    y ^= (y << 15) & 0xefc60000UL;
198
    y ^= (y >> 18);
198
    y ^= (y >> 18);
199
199
200
    return (double)y * (1.0/4294967296.0); 
200
    return cast(double)y * (1.0/4294967296.0); 
201
    /* divided by 2^32 */
201
    /* divided by 2^32 */
202
}
202
}
203
203
Lines 215-221 Link Here
215
    y ^= (y << 15) & 0xefc60000UL;
215
    y ^= (y << 15) & 0xefc60000UL;
216
    y ^= (y >> 18);
216
    y ^= (y >> 18);
217
217
218
    return ((double)y + 0.5) * (1.0/4294967296.0); 
218
    return (cast(double)y + 0.5) * (1.0/4294967296.0); 
219
    /* divided by 2^32 */
219
    /* divided by 2^32 */
220
}
220
}
221
221

Return to bug 185578