mirror of
https://github.com/reactos/reactos.git
synced 2025-02-20 15:35:04 +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 <scrnsave.h>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
#include "resource.h"
|
||||
|
@ -129,11 +129,11 @@ HGLRC InitOGLWindow(HWND hWnd)
|
|||
pfd.dwFlags = PFD_SUPPORT_OPENGL | PFD_DRAW_TO_WINDOW | PFD_DOUBLEBUFFER;
|
||||
pfd.cColorBits = 24;
|
||||
pfd.cDepthBits = 24;
|
||||
|
||||
|
||||
nFormat = ChoosePixelFormat(hDC, &pfd);
|
||||
DescribePixelFormat(hDC, nFormat, sizeof(PIXELFORMATDESCRIPTOR), &pfd);
|
||||
SetPixelFormat(hDC, nFormat, &pfd);
|
||||
|
||||
|
||||
hRC = wglCreateContext(hDC);
|
||||
wglMakeCurrent(hDC, hRC);
|
||||
|
||||
|
@ -157,13 +157,13 @@ void InitOpenGL(GLsizei width, GLsizei height)
|
|||
glLoadIdentity(); // Reset The Projection Matrix
|
||||
|
||||
// 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
|
||||
glLoadIdentity();
|
||||
// Start Of User Initialization
|
||||
LoadGLTextures(); // Load The Textures From Our Resource File
|
||||
|
||||
|
||||
glClearColor (0.0f, 0.0f, 0.0f, 0.5f); // Black Background
|
||||
glClearDepth (1.0f); // Depth Buffer Setup
|
||||
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)
|
||||
glEnable(GL_BLEND);
|
||||
|
||||
|
||||
|
||||
for (loop=0; loop<50; loop++) // Loop To Initialize 50 Objects
|
||||
{
|
||||
SetObject(loop); // Call SetObject To Assign New Random Values
|
||||
|
@ -227,7 +227,7 @@ void Display()
|
|||
|
||||
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:
|
||||
switch(LOWORD(wpm)){
|
||||
case IDOK:
|
||||
EndDialog(hdlg, LOWORD(wpm));
|
||||
EndDialog(hdlg, LOWORD(wpm));
|
||||
break;
|
||||
case WEBPAGE1:
|
||||
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;
|
||||
}
|
||||
|
||||
LRESULT WINAPI ScreenSaverProc(HWND hWnd, UINT message,
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
LRESULT WINAPI ScreenSaverProc(HWND hWnd, UINT message,
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
static HGLRC hRC;
|
||||
static DWORD timer = 1;
|
||||
|
@ -274,33 +274,33 @@ LRESULT WINAPI ScreenSaverProc(HWND hWnd, UINT message,
|
|||
int width;
|
||||
int height;
|
||||
|
||||
switch (message)
|
||||
{
|
||||
case WM_CREATE:
|
||||
switch (message)
|
||||
{
|
||||
case WM_CREATE:
|
||||
ReadRegistry();
|
||||
hRC = InitOGLWindow(hWnd);
|
||||
GetClientRect (hWnd, &WindowRect);
|
||||
GetClientRect (hWnd, &WindowRect);
|
||||
width = WindowRect.right - WindowRect.left;
|
||||
height = WindowRect.bottom - WindowRect.top;
|
||||
InitOpenGL(width,height);
|
||||
SetTimer(hWnd, timer, 5, NULL);
|
||||
break;
|
||||
break;
|
||||
case WM_TIMER:
|
||||
hDC = GetDC(hWnd);
|
||||
Display();
|
||||
SwapBuffers(hDC);
|
||||
ReleaseDC(hWnd, hDC);
|
||||
break;
|
||||
case WM_DESTROY:
|
||||
case WM_DESTROY:
|
||||
wglMakeCurrent(NULL, NULL);
|
||||
wglDeleteContext(hRC);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return DefScreenSaverProc(hWnd, message, wParam, lParam);
|
||||
}
|
||||
|
||||
BOOL WINAPI ScreenSaverConfigureDialog(HWND hDlg, UINT message,
|
||||
BOOL WINAPI ScreenSaverConfigureDialog(HWND hDlg, UINT message,
|
||||
WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message)
|
||||
|
|
|
@ -2,9 +2,9 @@ NAME LESSON38SAVER.SCR
|
|||
|
||||
DESCRIPTION 'Lesson38Saver screen saver'
|
||||
|
||||
HEAPSIZE 1024
|
||||
STACKSIZE 4096
|
||||
HEAPSIZE 1024
|
||||
STACKSIZE 4096
|
||||
|
||||
EXPORTS
|
||||
ScreenSaverProc
|
||||
ScreenSaverConfigureDialog
|
||||
EXPORTS
|
||||
ScreenSaverProc
|
||||
ScreenSaverConfigureDialog
|
||||
|
|
|
@ -10,4 +10,5 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
|||
|
||||
#include <reactos/version.rc>
|
||||
|
||||
#include "lang/de-DE.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
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Butterflies Screen Saver Settings"
|
||||
CAPTION "Butterflies ScreenSaver Settings"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,7,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
|
||||
PUSHBUTTON "About",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 "About "
|
||||
CAPTION "About"
|
||||
FONT 8, "MS Sans Serif"
|
||||
BEGIN
|
||||
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 "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
|
||||
CTEXT "ScreenSaver by: tHaPuTeR",IDC_STATIC,7,38,135,8,NOT
|
||||
CTEXT "ScreenSaver by: tHaPuTeR",IDC_STATIC,7,38,135,8,NOT
|
||||
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
|
||||
END
|
||||
|
||||
|
@ -61,7 +61,7 @@ END
|
|||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO DISCARDABLE
|
||||
GUIDELINES DESIGNINFO DISCARDABLE
|
||||
BEGIN
|
||||
IDD_DLG_SCREEN, DIALOG
|
||||
BEGIN
|
||||
|
@ -88,18 +88,18 @@ END
|
|||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE DISCARDABLE
|
||||
1 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE DISCARDABLE
|
||||
2 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE DISCARDABLE
|
||||
3 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
|
@ -122,9 +122,9 @@ IDB_BUTTERFLY3 BITMAP DISCARDABLE "res/butterfly3.bmp"
|
|||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
STRINGTABLE DISCARDABLE
|
||||
BEGIN
|
||||
IDS_STR_DESCRIP "Lesson38Saver"
|
||||
IDS_STR_DESCRIP "Butterflies"
|
||||
END
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
#define IDD_DLG_SCREEN 2003
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 108
|
||||
|
|
Loading…
Reference in a new issue