*/
#include <windows.h>
-#include <gl.h>
-#include <glu.h>
+#include <GL/gl.h>
+#include <GL/glu.h>
#include <tchar.h>
#define APPNAME _T("Cylfrac")
case WM_PAINT:
{
DWORD ticks = oldticks;
+ POINT currpoint;
oldticks = GetTickCount();
DrawScene(hwnd, dc, oldticks - ticks);
- POINT currpoint;
if(fullscreen)
{
GetCursorPos(&currpoint);
{
int width = LOWORD(lParam);
int height = HIWORD(lParam);
+ float fscale;
glViewport(0, 0, width, height);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
- float fscale = 0.8/(float)lvls;
+ fscale = 0.8/(float)lvls;
glScalef(fscale, fscale, fscale);
break;
}
void ParseCommandLine(PSTR szCmdLine, int *chOption, HWND *hwndParent)
{
- int ch = *szCmdLine++;
+ int ch;
+
+ if (!strlen(szCmdLine))
+ return;
+
+ ch = *szCmdLine++;
if(ch == '-' || ch == '/')
ch = *szCmdLine++;
ch += 'a' - 'A';
*chOption = ch;
+
+ if (ch == 's' || ch == 'c')
+ return;
+
ch = *szCmdLine++;
if(ch == ':')
int iCmdShow)
{
HWND hwndParent;
- int chOption;
+ int chOption = 0;
MSG Message;
hInstance = hInst;