mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 08:53:02 +00:00
Remove all trailing Spaces.
Change the Name shown for the ScreenSaver in the String to a more fitting one. Add a German Resource. svn path=/trunk/; revision=30574
This commit is contained in:
parent
daffd42203
commit
61705cebb5
6 changed files with 137 additions and 39 deletions
|
@ -1,8 +1,8 @@
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <scrnsave.h>
|
#include <scrnsave.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/glu.h>
|
#include <GL/glu.h>
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
@ -129,11 +129,11 @@ HGLRC InitOGLWindow(HWND hWnd)
|
||||||
pfd.dwFlags = PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW | PFD_DOUBLEBUFFER;
|
pfd.dwFlags = PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW | PFD_DOUBLEBUFFER;
|
||||||
pfd.cColorBits = 24;
|
pfd.cColorBits = 24;
|
||||||
pfd.cDepthBits = 24;
|
pfd.cDepthBits = 24;
|
||||||
|
|
||||||
nFormat = ChoosePixelFormat(hDC, &pfd);
|
nFormat = ChoosePixelFormat(hDC, &pfd);
|
||||||
DescribePixelFormat(hDC, nFormat, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
|
DescribePixelFormat(hDC, nFormat, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
|
||||||
SetPixelFormat(hDC, nFormat, &pfd);
|
SetPixelFormat(hDC, nFormat, &pfd);
|
||||||
|
|
||||||
hRC = wglCreateContext(hDC);
|
hRC = wglCreateContext(hDC);
|
||||||
wglMakeCurrent(hDC, hRC);
|
wglMakeCurrent(hDC, hRC);
|
||||||
|
|
||||||
|
@ -157,13 +157,13 @@ void InitOpenGL(GLsizei width, GLsizei height)
|
||||||
glLoadIdentity(); // Reset The Projection Matrix
|
glLoadIdentity(); // Reset The Projection Matrix
|
||||||
|
|
||||||
// Calculate The Aspect Ratio Of The Window
|
// Calculate The Aspect Ratio Of The Window
|
||||||
gluPerspective (45.0f, (GLfloat)(width)/(GLfloat)(height),1.0f, 1000.0f);
|
gluPerspective (45.0f, (GLfloat)(width)/(GLfloat)(height),1.0f, 1000.0f);
|
||||||
|
|
||||||
glMatrixMode(GL_MODELVIEW); // Select The Modelview Matrix
|
glMatrixMode(GL_MODELVIEW); // Select The Modelview Matrix
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
// Start Of User Initialization
|
// Start Of User Initialization
|
||||||
LoadGLTextures(); // Load The Textures From Our Resource File
|
LoadGLTextures(); // Load The Textures From Our Resource File
|
||||||
|
|
||||||
glClearColor (0.0f, 0.0f, 0.0f, 0.5f); // Black Background
|
glClearColor (0.0f, 0.0f, 0.0f, 0.5f); // Black Background
|
||||||
glClearDepth (1.0f); // Depth Buffer Setup
|
glClearDepth (1.0f); // Depth Buffer Setup
|
||||||
glDepthFunc (GL_LEQUAL); // The Type Of Depth Testing (Less Or Equal)
|
glDepthFunc (GL_LEQUAL); // The Type Of Depth Testing (Less Or Equal)
|
||||||
|
@ -174,7 +174,7 @@ void InitOpenGL(GLsizei width, GLsizei height)
|
||||||
glBlendFunc(GL_ONE,GL_SRC_ALPHA); // Set Blending Mode (Cheap / Quick)
|
glBlendFunc(GL_ONE,GL_SRC_ALPHA); // Set Blending Mode (Cheap / Quick)
|
||||||
glEnable(GL_BLEND);
|
glEnable(GL_BLEND);
|
||||||
|
|
||||||
|
|
||||||
for (loop=0; loop<50; loop++) // Loop To Initialize 50 Objects
|
for (loop=0; loop<50; loop++) // Loop To Initialize 50 Objects
|
||||||
{
|
{
|
||||||
SetObject(loop); // Call SetObject To Assign New Random Values
|
SetObject(loop); // Call SetObject To Assign New Random Values
|
||||||
|
@ -227,7 +227,7 @@ void Display()
|
||||||
|
|
||||||
Sleep(15); // Create A Short Delay (15 Milliseconds)
|
Sleep(15); // Create A Short Delay (15 Milliseconds)
|
||||||
|
|
||||||
glFlush ();
|
glFlush ();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -251,7 +251,7 @@ BOOL AboutProc(HWND hdlg, UINT msg, WPARAM wpm, LPARAM lpm){
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
switch(LOWORD(wpm)){
|
switch(LOWORD(wpm)){
|
||||||
case IDOK:
|
case IDOK:
|
||||||
EndDialog(hdlg, LOWORD(wpm));
|
EndDialog(hdlg, LOWORD(wpm));
|
||||||
break;
|
break;
|
||||||
case WEBPAGE1:
|
case WEBPAGE1:
|
||||||
ShellExecute(NULL, "open", "http://nehe.gamedev.net", NULL, NULL, SW_SHOWNORMAL);
|
ShellExecute(NULL, "open", "http://nehe.gamedev.net", NULL, NULL, SW_SHOWNORMAL);
|
||||||
|
@ -264,8 +264,8 @@ BOOL AboutProc(HWND hdlg, UINT msg, WPARAM wpm, LPARAM lpm){
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
LRESULT WINAPI ScreenSaverProc(HWND hWnd, UINT message,
|
LRESULT WINAPI ScreenSaverProc(HWND hWnd, UINT message,
|
||||||
WPARAM wParam, LPARAM lParam)
|
WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
static HGLRC hRC;
|
static HGLRC hRC;
|
||||||
static DWORD timer = 1;
|
static DWORD timer = 1;
|
||||||
|
@ -274,33 +274,33 @@ LRESULT WINAPI ScreenSaverProc(HWND hWnd, UINT message,
|
||||||
int width;
|
int width;
|
||||||
int height;
|
int height;
|
||||||
|
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
case WM_CREATE:
|
case WM_CREATE:
|
||||||
ReadRegistry();
|
ReadRegistry();
|
||||||
hRC = InitOGLWindow(hWnd);
|
hRC = InitOGLWindow(hWnd);
|
||||||
GetClientRect (hWnd, &WindowRect);
|
GetClientRect (hWnd, &WindowRect);
|
||||||
width = WindowRect.right - WindowRect.left;
|
width = WindowRect.right - WindowRect.left;
|
||||||
height = WindowRect.bottom - WindowRect.top;
|
height = WindowRect.bottom - WindowRect.top;
|
||||||
InitOpenGL(width,height);
|
InitOpenGL(width,height);
|
||||||
SetTimer(hWnd, timer, 5, NULL);
|
SetTimer(hWnd, timer, 5, NULL);
|
||||||
break;
|
break;
|
||||||
case WM_TIMER:
|
case WM_TIMER:
|
||||||
hDC = GetDC(hWnd);
|
hDC = GetDC(hWnd);
|
||||||
Display();
|
Display();
|
||||||
SwapBuffers(hDC);
|
SwapBuffers(hDC);
|
||||||
ReleaseDC(hWnd, hDC);
|
ReleaseDC(hWnd, hDC);
|
||||||
break;
|
break;
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
wglMakeCurrent(NULL, NULL);
|
wglMakeCurrent(NULL, NULL);
|
||||||
wglDeleteContext(hRC);
|
wglDeleteContext(hRC);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return DefScreenSaverProc(hWnd, message, wParam, lParam);
|
return DefScreenSaverProc(hWnd, message, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL WINAPI ScreenSaverConfigureDialog(HWND hDlg, UINT message,
|
BOOL WINAPI ScreenSaverConfigureDialog(HWND hDlg, UINT message,
|
||||||
WPARAM wParam, LPARAM lParam)
|
WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
switch (message)
|
switch (message)
|
||||||
|
|
|
@ -2,9 +2,9 @@ NAME LESSON38SAVER.SCR
|
||||||
|
|
||||||
DESCRIPTION 'Lesson38Saver screen saver'
|
DESCRIPTION 'Lesson38Saver screen saver'
|
||||||
|
|
||||||
HEAPSIZE 1024
|
HEAPSIZE 1024
|
||||||
STACKSIZE 4096
|
STACKSIZE 4096
|
||||||
|
|
||||||
EXPORTS
|
EXPORTS
|
||||||
ScreenSaverProc
|
ScreenSaverProc
|
||||||
ScreenSaverConfigureDialog
|
ScreenSaverConfigureDialog
|
||||||
|
|
|
@ -10,4 +10,5 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||||
|
|
||||||
#include <reactos/version.rc>
|
#include <reactos/version.rc>
|
||||||
|
|
||||||
|
#include "lang/de-DE.rc"
|
||||||
#include "lang/en-US.rc"
|
#include "lang/en-US.rc"
|
||||||
|
|
97
rosapps/applications/screensavers/butterflies/lang/de-DE.rc
Normal file
97
rosapps/applications/screensavers/butterflies/lang/de-DE.rc
Normal file
|
@ -0,0 +1,97 @@
|
||||||
|
#include "resource.h"
|
||||||
|
|
||||||
|
#define APSTUDIO_READONLY_SYMBOLS
|
||||||
|
#include "afxres.h"
|
||||||
|
#undef APSTUDIO_READONLY_SYMBOLS
|
||||||
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||||
|
#ifdef _WIN32
|
||||||
|
LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
|
||||||
|
#pragma code_page(1252)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
IDD_DLG_SCREEN DIALOG DISCARDABLE 0, 0, 172, 57
|
||||||
|
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
|
CAPTION "Schmetterlinge Einstellungen"
|
||||||
|
FONT 8, "MS Sans Serif"
|
||||||
|
BEGIN
|
||||||
|
DEFPUSHBUTTON "OK",IDOK,7,35,50,14
|
||||||
|
PUSHBUTTON "Abbrechen",IDCANCEL,61,35,50,14
|
||||||
|
CONTROL "Schmetterlinge rotieren",ROTATE,"Button",BS_AUTOCHECKBOX |
|
||||||
|
WS_TABSTOP,45,15,85,8
|
||||||
|
PUSHBUTTON "Über",IDABOUT,115,35,50,14
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_DLG_ABOUT DIALOG DISCARDABLE 0, 0, 149, 79
|
||||||
|
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
|
CAPTION "Über"
|
||||||
|
FONT 8, "MS Sans Serif"
|
||||||
|
BEGIN
|
||||||
|
DEFPUSHBUTTON "OK",IDOK,48,58,56,14
|
||||||
|
CTEXT "Schmetterlinge",IDC_STATIC,7,7,135,9
|
||||||
|
CTEXT "Demo von: NeHe ",IDC_STATIC,7,20,135,8
|
||||||
|
CTEXT "http://nehe.gamedev.net",WEBPAGE1,7,29,135,8,SS_NOTIFY |
|
||||||
|
NOT WS_GROUP
|
||||||
|
CTEXT "Bildschirmschoner von: tHaPuTeR",IDC_STATIC,7,38,135,8,NOT
|
||||||
|
WS_GROUP
|
||||||
|
CTEXT "http://www.thaputer.com",WEBPAGE2,7,47,135,8,SS_NOTIFY |
|
||||||
|
NOT WS_GROUP
|
||||||
|
END
|
||||||
|
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
GUIDELINES DESIGNINFO DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
IDD_DLG_SCREEN, DIALOG
|
||||||
|
BEGIN
|
||||||
|
LEFTMARGIN, 7
|
||||||
|
RIGHTMARGIN, 165
|
||||||
|
TOPMARGIN, 7
|
||||||
|
BOTTOMMARGIN, 50
|
||||||
|
END
|
||||||
|
|
||||||
|
IDD_DLG_ABOUT, DIALOG
|
||||||
|
BEGIN
|
||||||
|
LEFTMARGIN, 7
|
||||||
|
RIGHTMARGIN, 142
|
||||||
|
TOPMARGIN, 7
|
||||||
|
BOTTOMMARGIN, 72
|
||||||
|
END
|
||||||
|
END
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
1 TEXTINCLUDE DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
"resource.h\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
2 TEXTINCLUDE DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
"#include ""afxres.h""\r\n"
|
||||||
|
"\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
3 TEXTINCLUDE DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
"\r\n"
|
||||||
|
"\0"
|
||||||
|
END
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
IDB_BUTTERFLY1 BITMAP DISCARDABLE "res/butterfly1.bmp"
|
||||||
|
IDB_BUTTERFLY2 BITMAP DISCARDABLE "res/butterfly2.bmp"
|
||||||
|
IDB_BUTTERFLY3 BITMAP DISCARDABLE "res/butterfly3.bmp"
|
||||||
|
|
||||||
|
|
||||||
|
STRINGTABLE DISCARDABLE
|
||||||
|
BEGIN
|
||||||
|
IDS_STR_DESCRIP "Schmetterlinge"
|
||||||
|
END
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef APSTUDIO_INVOKED
|
||||||
|
|
||||||
|
#endif
|
|
@ -28,29 +28,29 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||||
|
|
||||||
IDD_DLG_SCREEN DIALOG DISCARDABLE 0, 0, 172, 57
|
IDD_DLG_SCREEN DIALOG DISCARDABLE 0, 0, 172, 57
|
||||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
CAPTION "Butterflies Screen Saver Settings"
|
CAPTION "Butterflies ScreenSaver Settings"
|
||||||
FONT 8, "MS Sans Serif"
|
FONT 8, "MS Sans Serif"
|
||||||
BEGIN
|
BEGIN
|
||||||
DEFPUSHBUTTON "OK",IDOK,7,35,50,14
|
DEFPUSHBUTTON "OK",IDOK,7,35,50,14
|
||||||
PUSHBUTTON "Cancel",IDCANCEL,61,35,50,14
|
PUSHBUTTON "Cancel",IDCANCEL,61,35,50,14
|
||||||
CONTROL "Rotate Butterflies",ROTATE,"Button",BS_AUTOCHECKBOX |
|
CONTROL "Rotate Butterflies",ROTATE,"Button",BS_AUTOCHECKBOX |
|
||||||
WS_TABSTOP,56,15,70,8
|
WS_TABSTOP,56,15,70,8
|
||||||
PUSHBUTTON "About",IDABOUT,115,35,50,14
|
PUSHBUTTON "About",IDABOUT,115,35,50,14
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_DLG_ABOUT DIALOG DISCARDABLE 0, 0, 149, 79
|
IDD_DLG_ABOUT DIALOG DISCARDABLE 0, 0, 149, 79
|
||||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
CAPTION "About "
|
CAPTION "About"
|
||||||
FONT 8, "MS Sans Serif"
|
FONT 8, "MS Sans Serif"
|
||||||
BEGIN
|
BEGIN
|
||||||
DEFPUSHBUTTON "OK",IDOK,48,58,56,14
|
DEFPUSHBUTTON "OK",IDOK,48,58,56,14
|
||||||
CTEXT "Lesson38Saver",IDC_STATIC,7,7,135,9
|
CTEXT "Butterflies ScreenSaver",IDC_STATIC,7,7,135,9
|
||||||
CTEXT "Demo by: NeHe ",IDC_STATIC,7,20,135,8
|
CTEXT "Demo by: NeHe ",IDC_STATIC,7,20,135,8
|
||||||
CTEXT "http://nehe.gamedev.net",WEBPAGE1,7,29,135,8,SS_NOTIFY |
|
CTEXT "http://nehe.gamedev.net",WEBPAGE1,7,29,135,8,SS_NOTIFY |
|
||||||
NOT WS_GROUP
|
NOT WS_GROUP
|
||||||
CTEXT "ScreenSaver by: tHaPuTeR",IDC_STATIC,7,38,135,8,NOT
|
CTEXT "ScreenSaver by: tHaPuTeR",IDC_STATIC,7,38,135,8,NOT
|
||||||
WS_GROUP
|
WS_GROUP
|
||||||
CTEXT "http://www.thaputer.com",WEBPAGE2,7,47,135,8,SS_NOTIFY |
|
CTEXT "http://www.thaputer.com",WEBPAGE2,7,47,135,8,SS_NOTIFY |
|
||||||
NOT WS_GROUP
|
NOT WS_GROUP
|
||||||
END
|
END
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ END
|
||||||
//
|
//
|
||||||
|
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
GUIDELINES DESIGNINFO DISCARDABLE
|
GUIDELINES DESIGNINFO DISCARDABLE
|
||||||
BEGIN
|
BEGIN
|
||||||
IDD_DLG_SCREEN, DIALOG
|
IDD_DLG_SCREEN, DIALOG
|
||||||
BEGIN
|
BEGIN
|
||||||
|
@ -88,18 +88,18 @@ END
|
||||||
// TEXTINCLUDE
|
// TEXTINCLUDE
|
||||||
//
|
//
|
||||||
|
|
||||||
1 TEXTINCLUDE DISCARDABLE
|
1 TEXTINCLUDE DISCARDABLE
|
||||||
BEGIN
|
BEGIN
|
||||||
"resource.h\0"
|
"resource.h\0"
|
||||||
END
|
END
|
||||||
|
|
||||||
2 TEXTINCLUDE DISCARDABLE
|
2 TEXTINCLUDE DISCARDABLE
|
||||||
BEGIN
|
BEGIN
|
||||||
"#include ""afxres.h""\r\n"
|
"#include ""afxres.h""\r\n"
|
||||||
"\0"
|
"\0"
|
||||||
END
|
END
|
||||||
|
|
||||||
3 TEXTINCLUDE DISCARDABLE
|
3 TEXTINCLUDE DISCARDABLE
|
||||||
BEGIN
|
BEGIN
|
||||||
"\r\n"
|
"\r\n"
|
||||||
"\0"
|
"\0"
|
||||||
|
@ -122,9 +122,9 @@ IDB_BUTTERFLY3 BITMAP DISCARDABLE "res/butterfly3.bmp"
|
||||||
// String Table
|
// String Table
|
||||||
//
|
//
|
||||||
|
|
||||||
STRINGTABLE DISCARDABLE
|
STRINGTABLE DISCARDABLE
|
||||||
BEGIN
|
BEGIN
|
||||||
IDS_STR_DESCRIP "Lesson38Saver"
|
IDS_STR_DESCRIP "Butterflies"
|
||||||
END
|
END
|
||||||
|
|
||||||
#endif // English (U.S.) resources
|
#endif // English (U.S.) resources
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#define IDD_DLG_SCREEN 2003
|
#define IDD_DLG_SCREEN 2003
|
||||||
|
|
||||||
// Next default values for new objects
|
// Next default values for new objects
|
||||||
//
|
//
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 108
|
#define _APS_NEXT_RESOURCE_VALUE 108
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue