├── .gitattributes ├── pic.png ├── SCENE VERSION ├── Keygen.rc ├── minifmod.lib ├── data │ ├── textures │ │ ├── Icon.ico │ │ ├── pic.bmp │ │ ├── red_grafiti.png │ │ └── red_grafiti2.raw │ └── sounds │ │ └── anarchymenu6.xm ├── FILE_ID.DIZ ├── Keygen.dsw ├── resource.h ├── VertScroll.h ├── Keygen.sln ├── miniF.h ├── Keygen.vcxproj.filters ├── minifmod.h ├── miniF.cpp ├── Keygen.dsp ├── BitmapMan.h ├── Keygen.vcxproj ├── VertScroll.cpp ├── RED.NFO ├── BitmapMan.cpp └── Keygen.cpp ├── CONSOLE VERSION ├── keygen.cpp ├── keygen.vcxproj.filters ├── keygen.sln └── keygen.vcxproj └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /pic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xyl2k/c0decalc-cutlet-maker-keygen/HEAD/pic.png -------------------------------------------------------------------------------- /SCENE VERSION/Keygen.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xyl2k/c0decalc-cutlet-maker-keygen/HEAD/SCENE VERSION/Keygen.rc -------------------------------------------------------------------------------- /SCENE VERSION/minifmod.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xyl2k/c0decalc-cutlet-maker-keygen/HEAD/SCENE VERSION/minifmod.lib -------------------------------------------------------------------------------- /SCENE VERSION/data/textures/Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xyl2k/c0decalc-cutlet-maker-keygen/HEAD/SCENE VERSION/data/textures/Icon.ico -------------------------------------------------------------------------------- /SCENE VERSION/data/textures/pic.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xyl2k/c0decalc-cutlet-maker-keygen/HEAD/SCENE VERSION/data/textures/pic.bmp -------------------------------------------------------------------------------- /SCENE VERSION/data/sounds/anarchymenu6.xm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xyl2k/c0decalc-cutlet-maker-keygen/HEAD/SCENE VERSION/data/sounds/anarchymenu6.xm -------------------------------------------------------------------------------- /SCENE VERSION/data/textures/red_grafiti.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xyl2k/c0decalc-cutlet-maker-keygen/HEAD/SCENE VERSION/data/textures/red_grafiti.png -------------------------------------------------------------------------------- /SCENE VERSION/data/textures/red_grafiti2.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xyl2k/c0decalc-cutlet-maker-keygen/HEAD/SCENE VERSION/data/textures/red_grafiti2.raw -------------------------------------------------------------------------------- /SCENE VERSION/FILE_ID.DIZ: -------------------------------------------------------------------------------- 1 | ______________________________ 2 | ;| ____ \\ _//_ __ |_ 3 | ;| |__/ // \_ | | | |; 4 | ;| ___// ___|| |_| |; 5 | ;| \__/ /___| _|; 6 | ;|__/\________________________|;;; 7 | Cutlet.Maker.v1.0f.Keygen-RED.zip 8 | | Disk: 1/1 +;;| 9 | | Date: 04/10/2o18 +;;| 10 | +--------------------------------+ 11 | | [R]EVERSE [E]NGINEER'S [D]REAM | 12 | +--------------------------------+ -------------------------------------------------------------------------------- /SCENE VERSION/Keygen.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "Keygen"=".\Keygen.dsp" - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Global: 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<3> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | -------------------------------------------------------------------------------- /CONSOLE VERSION/keygen.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | // Keygen for Cutlet Maker 5 | // 2018, By Xyl, cybercrime-tracker.net 6 | 7 | using namespace std; 8 | 9 | int rol(int x, int n) { 10 | int y = x << n | x >> (32 - n); 11 | 12 | for (int i = 0; i < n; i++) 13 | x = ((x & 0x80) ? 0x01 : 0x00) | (x << 1); 14 | 15 | x = x & 0xFFFF0000; 16 | y = y & 0x0000FFFF; 17 | 18 | x = x + y; 19 | return x; 20 | } 21 | 22 | int main(int argc, const char** argv) 23 | { 24 | int nCode = 0; 25 | cout << "Input Code: "; 26 | cin >> nCode; 27 | 28 | int nAnswer = rol(0x75BCD17 * (~(nCode & 0xABD13D59) & ~(~nCode & 0x542EC2A6)), 16); 29 | nAnswer = 0xDFB38D3u * nAnswer % 0x5F5E100; 30 | 31 | cout << "Output Answer: " << nAnswer << endl; 32 | return 0; 33 | } -------------------------------------------------------------------------------- /SCENE VERSION/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Keygen.rc 4 | // 5 | #define IDD_MAINDIALOG 103 6 | #define IDB_BITMAP1 106 7 | #define IDI_ICON1 107 8 | #define IDR_RAW1 1001 9 | #define IDR_MODFILE1 1002 10 | #define IDC_EDIT1 1003 11 | #define IDC_EDIT2 1004 12 | #define IDC_EDIT3 1005 13 | #define IDC_STATIC1 1006 14 | 15 | // Next default values for new objects 16 | // 17 | #ifdef APSTUDIO_INVOKED 18 | #ifndef APSTUDIO_READONLY_SYMBOLS 19 | #define _APS_NEXT_RESOURCE_VALUE 108 20 | #define _APS_NEXT_COMMAND_VALUE 40001 21 | #define _APS_NEXT_CONTROL_VALUE 1007 22 | #define _APS_NEXT_SYMED_VALUE 101 23 | #endif 24 | #endif 25 | -------------------------------------------------------------------------------- /SCENE VERSION/VertScroll.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #define FONT_SIZE 12 10 | using namespace std; 11 | 12 | class CVertScroll 13 | { 14 | public: 15 | CVertScroll(); 16 | ~CVertScroll(); 17 | 18 | int set(const char *s); 19 | void buildFont(HDC hDC, bool textured=true); // Build Our Bitmap Font 20 | void glPrint(const char *text); // Custom GL "Print" Routine 21 | void draw(); 22 | void drawTexScroll(); 23 | 24 | bool setFont(CHAR fontName[32], int fontSize, BOOL italic, BOOL bold); 25 | bool buildTexture(COLORREF color); 26 | void move(float dy); 27 | GLuint LoadTextureMN(const int x, const int y, LPVOID pData); 28 | 29 | float m_xPos, m_yPos; 30 | int m_pressed; 31 | int m_counter; 32 | 33 | vector m_s; 34 | HFONT m_currFont; 35 | GLuint m_scrollTex; 36 | int m_texW, m_texH; 37 | float m_y, m_incY; 38 | }; 39 | 40 | -------------------------------------------------------------------------------- /SCENE VERSION/Keygen.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Keygen", "Keygen.vcxproj", "{95B4946C-3A2E-4E86-A290-1EEEDA9C1FA2}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x86 = Debug|x86 11 | Release|x86 = Release|x86 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {95B4946C-3A2E-4E86-A290-1EEEDA9C1FA2}.Debug|x86.ActiveCfg = Debug|Win32 15 | {95B4946C-3A2E-4E86-A290-1EEEDA9C1FA2}.Debug|x86.Build.0 = Debug|Win32 16 | {95B4946C-3A2E-4E86-A290-1EEEDA9C1FA2}.Release|x86.ActiveCfg = Release|Win32 17 | {95B4946C-3A2E-4E86-A290-1EEEDA9C1FA2}.Release|x86.Build.0 = Release|Win32 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /CONSOLE VERSION/keygen.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Fichiers sources 20 | 21 | 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Cutlet Maker keygen 2 | 3 | Keygen for the ATM malware Cutlet Maker, it unlock the following versions: 4 | 5 | cutlet maker 1.0 F (cm17F.exe) 6 | * [66b0d9b10c2898d388bdfd2be4a66ac76d5822f4](https://www.virustotal.com/en/file/4a340a0a95f2af5ab7f3bfe6f304154e617d0c47ce31ee8426c70b86e195320c/analysis/) 7 | 8 | cutlet maker 1.02 (cm15.vmp.exe) 9 | * [8584ba9a58d90264c1ff91d7ca8710545d67b4f5](https://www.virustotal.com/en/file/c18b23cc493f89d73a2710ebb177d54beafe0edf0e17cc79e28d9efdfb69a630/analysis/) 10 | * [44b1eea742b63c7abc479e96c316bcd613e26ff2](https://www.virustotal.com/en/file/d1a0b2a251fa69818784e8937403c18f09b2c37eead80ba61a3edf4ac2b6b7ff/analysis/) 11 | 12 | Console version if you are just interested by the c0decalc algorithm, scene version if you want more than just an algo. 13 | 14 | If you are looking for a compiled version search for Cutlet.Maker.v1.0f.Keygen.only-RED.zip ([d1ae319c70661d971c70840c88fdf8314849f763](https://www.virustotal.com/en/file/d7e4c6ebdfd65bbde8f7d897c8e2653ec4e2feafd5aacb2c0aa219ee227e3e7b/analysis/)) 15 | 16 | ![pic](pic.png) -------------------------------------------------------------------------------- /CONSOLE VERSION/keygen.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "keygen", "keygen.vcxproj", "{55205213-34A2-4A1C-8529-1C79C479D912}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {55205213-34A2-4A1C-8529-1C79C479D912}.Debug|x64.ActiveCfg = Debug|x64 17 | {55205213-34A2-4A1C-8529-1C79C479D912}.Debug|x64.Build.0 = Debug|x64 18 | {55205213-34A2-4A1C-8529-1C79C479D912}.Debug|x86.ActiveCfg = Debug|Win32 19 | {55205213-34A2-4A1C-8529-1C79C479D912}.Debug|x86.Build.0 = Debug|Win32 20 | {55205213-34A2-4A1C-8529-1C79C479D912}.Release|x64.ActiveCfg = Release|x64 21 | {55205213-34A2-4A1C-8529-1C79C479D912}.Release|x64.Build.0 = Release|x64 22 | {55205213-34A2-4A1C-8529-1C79C479D912}.Release|x86.ActiveCfg = Release|Win32 23 | {55205213-34A2-4A1C-8529-1C79C479D912}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | EndGlobal 29 | -------------------------------------------------------------------------------- /SCENE VERSION/miniF.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | /////////////////////////////////////////////////////////////////////////// 4 | // 5 | // miniF.h 6 | // Copyright(c) 2007, Wiccaan 7 | // 8 | /////////////////////////////////////////////////////////////////////////// 9 | // A quick wrapper around the miniFMod functions to allow 10 | // easy use of the basic functions. 11 | /////////////////////////////////////////////////////////////////////////// 12 | // This program is free software; you can redistribute it and/or modify 13 | // it under the terms of the GNU General Public License as published by 14 | // the Free Software Foundation; either version 3 of the License, or 15 | // (at your option) any later version. 16 | // 17 | // This program is distributed in the hope that it will be useful, 18 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | // GNU General Public License for more details. 21 | // 22 | // You should have received a copy of the GNU General Public License 23 | // along with this program. If not, see . 24 | /////////////////////////////////////////////////////////////////////////// 25 | 26 | #include 27 | #include "minifmod.h" 28 | 29 | typedef struct 30 | { 31 | int length; 32 | int pos; 33 | void *data; 34 | } MEMFILE; 35 | 36 | unsigned int memopen ( char* name ); 37 | void memclose ( unsigned int handle ); 38 | int memread ( void *buffer, int size, unsigned int handle ); 39 | void memseek ( unsigned int handle, int pos, signed char mode ); 40 | int memtell ( unsigned int handle ); 41 | 42 | class miniF 43 | { 44 | public: 45 | miniF( VOID ); 46 | ~miniF( VOID ); 47 | 48 | BOOL LoadMusic ( int iResource ); 49 | BOOL Play ( VOID ); 50 | BOOL Stop ( VOID ); 51 | 52 | private: 53 | FMUSIC_MODULE *mod; 54 | }; -------------------------------------------------------------------------------- /SCENE VERSION/Keygen.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {99d6072e-9373-431b-b525-3fe344fc0f69} 6 | cpp;c;cxx;rc;def;r;odl;idl;hpj;bat 7 | 8 | 9 | {3bb8ce5f-4449-454f-93c0-76bd192542d2} 10 | h;hpp;hxx;hm;inl 11 | 12 | 13 | {c50c3961-44b2-4e03-bb90-8e170ac964f4} 14 | ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | 32 | 33 | Source Files 34 | 35 | 36 | 37 | 38 | Header Files 39 | 40 | 41 | Header Files 42 | 43 | 44 | Header Files 45 | 46 | 47 | Header Files 48 | 49 | 50 | Header Files 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | Resource Files 60 | 61 | 62 | Resource Files 63 | 64 | 65 | -------------------------------------------------------------------------------- /SCENE VERSION/minifmod.h: -------------------------------------------------------------------------------- 1 | /******************************************************************************/ 2 | /* MINIFMOD.H */ 3 | /* ---------------- */ 4 | /* MiniFMOD public source code release. */ 5 | /* This source is provided as-is. Firelight Technologies will not support */ 6 | /* or answer questions about the source provided. */ 7 | /* MiniFMOD Sourcecode is copyright (c) Firelight Technologies, 2000-2004. */ 8 | /* MiniFMOD Sourcecode is in no way representative of FMOD 3 source. */ 9 | /* Firelight Technologies is a registered company name. */ 10 | /* This source must not be redistributed without this notice. */ 11 | /******************************************************************************/ 12 | 13 | //========================================================================================== 14 | // MINIFMOD Main header file. Copyright (c), Firelight Technologies, 2000-2004. 15 | // Based on FMOD, copyright (c), Firelight Technologies, 2000-2004. 16 | //========================================================================================== 17 | 18 | #ifndef _MINIFMOD_H_ 19 | #define _MINIFMOD_H_ 20 | 21 | //=============================================================================================== 22 | //= DEFINITIONS 23 | //=============================================================================================== 24 | 25 | // fmod defined types 26 | typedef struct FMUSIC_MODULE FMUSIC_MODULE; 27 | 28 | //=============================================================================================== 29 | //= FUNCTION PROTOTYPES 30 | //=============================================================================================== 31 | 32 | #ifdef __cplusplus 33 | extern "C" { 34 | #endif 35 | 36 | // ================================== 37 | // Initialization / Global functions. 38 | // ================================== 39 | typedef void (*SAMPLELOADCALLBACK)(void *buff, int lenbytes, int numbits, int instno, int sampno); 40 | typedef void (*FMUSIC_CALLBACK)(FMUSIC_MODULE *mod, unsigned char param); 41 | 42 | // this must be called before FSOUND_Init! 43 | void FSOUND_File_SetCallbacks(unsigned int (*OpenCallback)(char *name), 44 | void (*CloseCallback)(unsigned int handle), 45 | int (*ReadCallback)(void *buffer, int size, unsigned int handle), 46 | void (*SeekCallback)(unsigned int handle, int pos, signed char mode), 47 | int (*TellCallback)(unsigned int handle)); 48 | 49 | // ============================================================================================= 50 | // FMUSIC API 51 | // ============================================================================================= 52 | 53 | // Song management / playback functions. 54 | // ===================================== 55 | 56 | FMUSIC_MODULE * FMUSIC_LoadSong(char *data, SAMPLELOADCALLBACK sampleloadcallback); 57 | signed char FMUSIC_FreeSong(FMUSIC_MODULE *mod); 58 | signed char FMUSIC_PlaySong(FMUSIC_MODULE *mod); 59 | signed char FMUSIC_StopSong(FMUSIC_MODULE *mod); 60 | 61 | // Runtime song information. 62 | // ========================= 63 | 64 | int FMUSIC_GetOrder(FMUSIC_MODULE *mod); 65 | int FMUSIC_GetRow(FMUSIC_MODULE *mod); 66 | unsigned int FMUSIC_GetTime(FMUSIC_MODULE *mod); 67 | 68 | #ifdef __cplusplus 69 | } 70 | #endif 71 | 72 | #endif 73 | -------------------------------------------------------------------------------- /SCENE VERSION/miniF.cpp: -------------------------------------------------------------------------------- 1 | #include "miniF.h" 2 | 3 | /////////////////////////////////////////////////////////////////////////// 4 | // 5 | // miniF.cpp 6 | // Copyright(c) 2007, Wiccaan 7 | // 8 | /////////////////////////////////////////////////////////////////////////// 9 | // A quick wrapper around the miniFMod functions to allow 10 | // easy use of the basic functions. 11 | /////////////////////////////////////////////////////////////////////////// 12 | // This program is free software; you can redistribute it and/or modify 13 | // it under the terms of the GNU General Public License as published by 14 | // the Free Software Foundation; either version 3 of the License, or 15 | // (at your option) any later version. 16 | // 17 | // This program is distributed in the hope that it will be useful, 18 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 | // GNU General Public License for more details. 21 | // 22 | // You should have received a copy of the GNU General Public License 23 | // along with this program. If not, see . 24 | /////////////////////////////////////////////////////////////////////////// 25 | 26 | 27 | miniF::miniF() 28 | { 29 | FSOUND_File_SetCallbacks( memopen, memclose, memread, memseek, memtell ); 30 | } 31 | miniF::~miniF(){} 32 | 33 | BOOL miniF::LoadMusic(int iResource) 34 | { 35 | mod = FMUSIC_LoadSong( MAKEINTRESOURCEA(iResource), NULL ); 36 | 37 | if( !mod ) 38 | return false; 39 | return true; 40 | } 41 | 42 | BOOL miniF::Play() 43 | { 44 | if( !mod ) 45 | return false; 46 | 47 | return (BOOL)FMUSIC_PlaySong( mod ); 48 | } 49 | 50 | BOOL miniF::Stop() 51 | { 52 | if( !mod ) 53 | return false; 54 | 55 | return (BOOL)FMUSIC_StopSong( mod ); 56 | } 57 | 58 | 59 | //-------------------------------------------------------------------------------------------- 60 | // 61 | // Callbacks 62 | // 63 | //-------------------------------------------------------------------------------------------- 64 | unsigned int memopen(char *name) 65 | { 66 | MEMFILE *memfile; 67 | memfile = (MEMFILE *)calloc( sizeof(MEMFILE), 1 ); 68 | 69 | HRSRC rec; 70 | HGLOBAL handle; 71 | 72 | rec = FindResource( NULL, name, "MODFILE" ); 73 | handle = LoadResource( NULL, rec ); 74 | 75 | memfile->data = LockResource( handle ); 76 | memfile->length = SizeofResource( NULL, rec ); 77 | memfile->pos = 0; 78 | 79 | return (unsigned int)memfile; 80 | } 81 | 82 | void memclose(unsigned int handle) 83 | { 84 | MEMFILE *memfile = (MEMFILE *)handle; 85 | free( memfile ); 86 | } 87 | 88 | int memread(void *buffer, int size, unsigned int handle) 89 | { 90 | MEMFILE *memfile = (MEMFILE *)handle; 91 | if( memfile->pos + size >= memfile->length ) 92 | size = memfile->length - memfile->pos; 93 | 94 | memcpy( buffer, (char *)memfile->data + memfile->pos, size ); 95 | memfile->pos += size; 96 | 97 | return size; 98 | } 99 | 100 | void memseek(unsigned int handle, int pos, signed char mode) 101 | { 102 | MEMFILE *memfile = (MEMFILE *)handle; 103 | 104 | if( mode == SEEK_SET ) 105 | memfile->pos = pos; 106 | else if( mode == SEEK_CUR ) 107 | memfile->pos += pos; 108 | else if( mode == SEEK_END ) 109 | memfile->pos = memfile->length + pos; 110 | 111 | if( memfile->pos > memfile->length ) 112 | memfile->pos = memfile->length; 113 | } 114 | 115 | int memtell(unsigned int handle) 116 | { 117 | MEMFILE *memfile = (MEMFILE *)handle; 118 | return memfile->pos; 119 | } 120 | 121 | //-------------------------------------------------------------------------------------------- 122 | //-------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------- /SCENE VERSION/Keygen.dsp: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Project File - Name="Keygen" - Package Owner=<4> 2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00 3 | # ** DO NOT EDIT ** 4 | 5 | # TARGTYPE "Win32 (x86) Application" 0x0101 6 | 7 | CFG=Keygen - Win32 Debug 8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE, 9 | !MESSAGE use the Export Makefile command and run 10 | !MESSAGE 11 | !MESSAGE NMAKE /f "Keygen.mak". 12 | !MESSAGE 13 | !MESSAGE You can specify a configuration when running NMAKE 14 | !MESSAGE by defining the macro CFG on the command line. For example: 15 | !MESSAGE 16 | !MESSAGE NMAKE /f "Keygen.mak" CFG="Keygen - Win32 Debug" 17 | !MESSAGE 18 | !MESSAGE Possible choices for configuration are: 19 | !MESSAGE 20 | !MESSAGE "Keygen - Win32 Release" (based on "Win32 (x86) Application") 21 | !MESSAGE "Keygen - Win32 Debug" (based on "Win32 (x86) Application") 22 | !MESSAGE 23 | 24 | # Begin Project 25 | # PROP AllowPerConfigDependencies 0 26 | # PROP Scc_ProjName "" 27 | # PROP Scc_LocalPath "" 28 | CPP=cl.exe 29 | MTL=midl.exe 30 | RSC=rc.exe 31 | 32 | !IF "$(CFG)" == "Keygen - Win32 Release" 33 | 34 | # PROP BASE Use_MFC 0 35 | # PROP BASE Use_Debug_Libraries 0 36 | # PROP BASE Output_Dir "Release" 37 | # PROP BASE Intermediate_Dir "Release" 38 | # PROP BASE Target_Dir "" 39 | # PROP Use_MFC 0 40 | # PROP Use_Debug_Libraries 0 41 | # PROP Output_Dir "Release" 42 | # PROP Intermediate_Dir "Release" 43 | # PROP Target_Dir "" 44 | # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c 45 | # ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c 46 | # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 47 | # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 48 | # ADD BASE RSC /l 0x409 /d "NDEBUG" 49 | # ADD RSC /l 0x409 /d "NDEBUG" 50 | BSC32=bscmake.exe 51 | # ADD BASE BSC32 /nologo 52 | # ADD BSC32 /nologo 53 | LINK32=link.exe 54 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 55 | # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 56 | 57 | !ELSEIF "$(CFG)" == "Keygen - Win32 Debug" 58 | 59 | # PROP BASE Use_MFC 0 60 | # PROP BASE Use_Debug_Libraries 1 61 | # PROP BASE Output_Dir "Debug" 62 | # PROP BASE Intermediate_Dir "Debug" 63 | # PROP BASE Target_Dir "" 64 | # PROP Use_MFC 0 65 | # PROP Use_Debug_Libraries 1 66 | # PROP Output_Dir "Debug" 67 | # PROP Intermediate_Dir "Debug" 68 | # PROP Target_Dir "" 69 | # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c 70 | # ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c 71 | # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 72 | # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 73 | # ADD BASE RSC /l 0x409 /d "_DEBUG" 74 | # ADD RSC /l 0x409 /d "_DEBUG" 75 | BSC32=bscmake.exe 76 | # ADD BASE BSC32 /nologo 77 | # ADD BSC32 /nologo 78 | LINK32=link.exe 79 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept 80 | # ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept 81 | 82 | !ENDIF 83 | 84 | # Begin Target 85 | 86 | # Name "Keygen - Win32 Release" 87 | # Name "Keygen - Win32 Debug" 88 | # Begin Group "Source Files" 89 | 90 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" 91 | # Begin Source File 92 | 93 | SOURCE=.\Keygen.cpp 94 | # End Source File 95 | # Begin Source File 96 | 97 | SOURCE=.\Keygen.rc 98 | # End Source File 99 | # End Group 100 | # Begin Group "Header Files" 101 | 102 | # PROP Default_Filter "h;hpp;hxx;hm;inl" 103 | # End Group 104 | # Begin Group "Resource Files" 105 | 106 | # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" 107 | # End Group 108 | # End Target 109 | # End Project 110 | -------------------------------------------------------------------------------- /SCENE VERSION/BitmapMan.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __aBitmapMan_h__ 3 | #define __aBitmapMan_h__ 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | #define PALETTEPOS 54 10 | #define MONO(rd,gn,bl) ( ((int)(rd)*11 + (int)(gn)*16 + (int)(bl)*5) >> 5) 11 | #define RANGE(x,Li,Ls) { if (x < Li) x = Li; if (x > Ls) x = Ls; } 12 | 13 | const char ErrorsBitMap[11][57] = 14 | { 15 | "0: There was no error", 16 | "1: Error opening .bmp file. Possible cause: do not exist", 17 | "2: Error reading BitMapFileHeader from file", 18 | "3: Failed to close the file", 19 | "4: Error moving file pointer", 20 | "5: Error reading BitMapInfoHeader", 21 | "6: There is no memory to read the palette", 22 | "7: Error reading palette from image", 23 | "8: Wrong BMP file format", 24 | "9: No memory to read the image", 25 | "10: Error reading image" 26 | }; 27 | 28 | typedef struct RGB_type 29 | { 30 | BYTE red, green, blue; 31 | } RGB_type; 32 | 33 | class BitmapMan 34 | { 35 | 36 | protected: 37 | char filename[80]; // File name on disk 38 | char bfType[3]; // ASCII "BM" 39 | int bfSize; // File size in bytes (Longword) 40 | int bfOffBits; // Distance in bytes from the end of the header. 41 | // (byte 14) where the image as such begins 42 | int ErrorCode; // Integer denoting the error code when reading 43 | // from the file (see error table) 44 | int biSize; // Header size (40 bytes) 45 | int biWidth; // Image width in pixels 46 | int biHeight; // Image length in pixels 47 | short int biPlanes; // Number of planes in the image. It should be 1 48 | short int biBitCount; // Bits per pixel 49 | int biCompression; // Compression type 50 | int biSizeImage; // Size in bytes of the compressed image 51 | int biXPelsPerMeter; // Horizontal resolution in pixels / meters 52 | int biYPelsPerMeter; // Vertical horizontal in pixels / meters 53 | int biClrUsed; // Number of colors used 54 | int biClrImportant; // Number of "important" colors 55 | int PaletteSize; // Number of entries in color map. It is deduced 56 | BYTE *bmiColors, // Color Map (blue,green,red,0) ... 57 | *image; // Bytes corresponding to the image 58 | 59 | public: 60 | int GetPaletteSize(); 61 | BYTE * GetPalette(); 62 | 63 | BitmapMan(); 64 | // Default constructor 65 | 66 | BitmapMan(const char theFilename[]); 67 | // Constructor given the name of a file 68 | 69 | BitmapMan(const BitmapMan& source); 70 | // Copy Constructor 71 | 72 | ~BitmapMan(); 73 | // Destructor 74 | 75 | int LoadImage(const char theFilename[]); 76 | // Load image into memory 77 | 78 | static int LoadDimensions(const char filename[], int &width, int &height); 79 | // Read bitmap dimensions from disk, without loading image 80 | // Returns 0 if there is no error. 81 | 82 | inline int Width(void); 83 | // Width in pixels 84 | 85 | inline int Height(void); 86 | // Height in pixels 87 | 88 | inline int theError(void); 89 | // Returns if there was an error code when reading 90 | 91 | inline short int BitsPerPixel(void); 92 | // Returns the number of bits per pixel in the image 93 | 94 | inline int GetNColors(void); 95 | 96 | 97 | void PrintColorMap(); 98 | // Print the palette as tuples (R,G,B) 99 | 100 | void PrintHeader(); 101 | // Prints the bitmap header 102 | 103 | int SaveBMP(const char *filename); 104 | // Save the BMP to disk with filename 105 | // Returns 0 if there are no problems, or any error code 106 | // otherwise... 107 | 108 | void FreeBitMap(); 109 | 110 | int SetRGBData(int nRows, int nCols, void* data); 111 | int SetRGBAData(int nRows, int nCols, void* data); 112 | int Set8bitsData(int nRows, int nCols, void *data, void *palette); 113 | int Set2bitsData(int nRows, int nCols, void *data, void *palette); 114 | void SetPalette(BYTE *newPalete); 115 | void *getBits(); 116 | bool LoadResource(UINT resourceNumber); 117 | 118 | private: 119 | BYTE GetErodePixelBAW(int i, int j, int n, int count); 120 | // Returns the erode of pixel i,j with matrix nxn 121 | // and with blank counter == count 122 | 123 | }; 124 | 125 | ///////////////////////////////////////////////////// 126 | // Inline functions that must be defined in the .h // 127 | ///////////////////////////////////////////////////// 128 | 129 | inline int BitmapMan::Width(void) 130 | { 131 | return biWidth; 132 | } 133 | 134 | inline int BitmapMan::Height(void) 135 | { 136 | return biHeight; 137 | } 138 | 139 | inline int BitmapMan::theError(void) 140 | { 141 | return ErrorCode; 142 | } 143 | 144 | inline short int BitmapMan::BitsPerPixel(void) 145 | { 146 | return biBitCount; 147 | } 148 | 149 | inline int BitmapMan::GetNColors(void) 150 | { 151 | return PaletteSize; 152 | } 153 | 154 | #endif 155 | -------------------------------------------------------------------------------- /CONSOLE VERSION/keygen.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | Debug 14 | x64 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | {55205213-34A2-4A1C-8529-1C79C479D912} 23 | Keygen 24 | 8.1 25 | 26 | 27 | 28 | Application 29 | true 30 | v140 31 | MultiByte 32 | 33 | 34 | Application 35 | false 36 | v140 37 | true 38 | MultiByte 39 | 40 | 41 | Application 42 | true 43 | v140 44 | MultiByte 45 | 46 | 47 | Application 48 | false 49 | v140 50 | true 51 | MultiByte 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | Level3 75 | Disabled 76 | true 77 | 78 | 79 | 80 | 81 | Level3 82 | Disabled 83 | true 84 | 85 | 86 | 87 | 88 | Level3 89 | MaxSpeed 90 | true 91 | true 92 | true 93 | 94 | 95 | true 96 | true 97 | 98 | 99 | 100 | 101 | Level3 102 | MaxSpeed 103 | true 104 | true 105 | true 106 | 107 | 108 | true 109 | true 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /SCENE VERSION/Keygen.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | 14 | 15 | 16 | {95B4946C-3A2E-4E86-A290-1EEEDA9C1FA2} 17 | 8.1 18 | Keygen 19 | 20 | 21 | 22 | Application 23 | v140 24 | false 25 | NotSet 26 | 27 | 28 | Application 29 | v140 30 | false 31 | MultiByte 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | .\Debug\ 47 | .\Debug\ 48 | true 49 | 50 | 51 | .\Release\ 52 | .\Release\ 53 | false 54 | 55 | 56 | 57 | MultiThreadedDebug 58 | Default 59 | Disabled 60 | true 61 | Level3 62 | true 63 | WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) 64 | .\Debug\ 65 | .\Debug\Keygen.pch 66 | .\Debug\ 67 | .\Debug\ 68 | EnableFastChecks 69 | 70 | 71 | true 72 | _DEBUG;%(PreprocessorDefinitions) 73 | .\Debug\Keygen.tlb 74 | true 75 | Win32 76 | 77 | 78 | 0x0409 79 | _DEBUG;%(PreprocessorDefinitions) 80 | 81 | 82 | true 83 | .\Debug\Keygen.bsc 84 | 85 | 86 | true 87 | true 88 | Windows 89 | .\Debug\Keygen.exe 90 | minifmod.lib;opengl32.lib;glu32.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) 91 | false 92 | 93 | 94 | 95 | 96 | MultiThreaded 97 | Default 98 | true 99 | true 100 | MaxSpeed 101 | true 102 | Level3 103 | WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) 104 | .\Release\ 105 | .\Release\Keygen.pch 106 | .\Release\ 107 | .\Release\ 108 | 109 | 110 | true 111 | NDEBUG;%(PreprocessorDefinitions) 112 | .\Release\Keygen.tlb 113 | true 114 | Win32 115 | 116 | 117 | 0x0409 118 | NDEBUG;%(PreprocessorDefinitions) 119 | 120 | 121 | true 122 | .\Release\Keygen.bsc 123 | 124 | 125 | true 126 | Windows 127 | .\Release\Keygen.exe 128 | minifmod.lib;opengl32.lib;glu32.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) 129 | false 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | -------------------------------------------------------------------------------- /SCENE VERSION/VertScroll.cpp: -------------------------------------------------------------------------------- 1 | #include "VertScroll.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include "objbase.h" 8 | #include "BitmapMan.h" 9 | 10 | using namespace std; 11 | 12 | CVertScroll::CVertScroll() 13 | { 14 | m_yPos = 120; 15 | m_xPos = 500; 16 | m_currFont = NULL; 17 | m_texW = 0; 18 | m_texH = 0; 19 | 20 | m_scrollTex = 0; 21 | 22 | m_pressed = -1; 23 | m_counter = 0; 24 | m_y = 0; 25 | } 26 | 27 | CVertScroll::~CVertScroll() 28 | { 29 | } 30 | 31 | void CVertScroll::drawTexScroll() 32 | { 33 | glBindTexture(GL_TEXTURE_2D, m_scrollTex); 34 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST/*_MIPMAP_LINEAR*/); 35 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); 36 | glEnable(GL_TEXTURE_2D); 37 | 38 | for (float x = 0.0f; x < 360.0f; x++) 39 | { 40 | float X = m_y + x; 41 | float s0 = sin(X/180.0f * 3.14159f)*20; 42 | float s1 = sin((X+1)/180.0f * 3.14159f)*20; 43 | glBegin(GL_QUADS); 44 | { 45 | glTexCoord2f(x/360.0f, 0); glVertex3f(m_xPos + m_texW / 360.0f * (x + 0), m_yPos - m_texH + s0, 0.0f); 46 | glTexCoord2f((x+1) / 360.0f, 0); glVertex3f(m_xPos + m_texW / 360.0f * (x + 1), m_yPos - m_texH + s1, 0.0f); 47 | glTexCoord2f((x+1) / 360.0f, 1); glVertex3f(m_xPos + m_texW / 360.0f * (x + 1), m_yPos + s1, 0.0f); 48 | glTexCoord2f(x / 360.0f, 1); glVertex3f(m_xPos + m_texW / 360.0f * (x + 0), m_yPos + s0, 0.0f); 49 | } 50 | glEnd(); 51 | } 52 | /* 53 | glBegin(GL_QUADS); 54 | { 55 | glTexCoord2f(0, 0); glVertex3f(m_xPos, m_yPos - m_texH + y, 0.0f); 56 | glTexCoord2f(1, 0); glVertex3f(m_xPos + m_texW, m_yPos - m_texH + y, 0.0f); 57 | glTexCoord2f(1, 1); glVertex3f(m_xPos + m_texW, m_yPos + y, 0.0f); 58 | glTexCoord2f(0, 1); glVertex3f(m_xPos, m_yPos + y, 0.0f); 59 | } 60 | glEnd(); 61 | */ 62 | glDisable(GL_TEXTURE_2D); 63 | } 64 | 65 | void CVertScroll::draw() 66 | { 67 | m_xPos -= 6; 68 | 69 | if (m_xPos + m_texW < 0) 70 | m_xPos = 500; 71 | 72 | glEnable(GL_BLEND); 73 | glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 74 | glDisable(GL_DEPTH_TEST); 75 | m_yPos = 40; 76 | 77 | m_y = m_y + 4.0f; 78 | if (m_y > 360.0f) 79 | m_y -= 360.0f; 80 | 81 | glPushMatrix(); 82 | /*glTranslatef(+250.0f, +120.0f / 2.0f, 0.0f); 83 | glRotatef(s-0.5f, 0, 0, 1); 84 | glTranslatef(-250.0f, -120.0f/2.0f, 0.0f); 85 | */ 86 | for (int y = 0; y < 7; y++) 87 | { 88 | switch (y) 89 | { 90 | case 0: 91 | case 6: 92 | case 1: 93 | case 5: 94 | case 2: 95 | case 4: 96 | glColor3f(1, 1, 1); 97 | break; 98 | case 3: 99 | glColor3f(1, 0.647059f, 0); 100 | break; 101 | } 102 | 103 | drawTexScroll(); 104 | m_yPos += m_texH * 1.25f; 105 | } 106 | glPopMatrix(); 107 | glDisable(GL_BLEND); 108 | } 109 | 110 | bool CVertScroll::setFont(CHAR fontName[32], int fontSize, BOOL italic, BOOL bold) 111 | { 112 | LOGFONT log; 113 | log.lfHeight = fontSize; 114 | log.lfWidth = fontSize; 115 | log.lfEscapement = 0; 116 | log.lfOrientation = 0; 117 | log.lfWeight = (bold) ? FW_BOLD : 0; 118 | log.lfItalic = italic; 119 | log.lfUnderline = 0; 120 | log.lfStrikeOut = 0; 121 | log.lfCharSet = DEFAULT_CHARSET; 122 | log.lfOutPrecision = OUT_TT_PRECIS; 123 | log.lfClipPrecision = CLIP_DEFAULT_PRECIS; 124 | //log.lfQuality = PROOF_QUALITY; 125 | //log.lfQuality = DEFAULT_QUALITY; 126 | log.lfQuality = ANTIALIASED_QUALITY; 127 | log.lfPitchAndFamily = 0; 128 | memcpy(log.lfFaceName, fontName, sizeof(CHAR) * 32); 129 | 130 | if (m_currFont) 131 | DeleteObject(m_currFont); 132 | m_currFont = CreateFontIndirect(&log); 133 | if (!m_currFont) 134 | return 0; 135 | return 1; 136 | } 137 | 138 | bool CVertScroll::buildTexture(COLORREF color) 139 | { 140 | HDC hdc = CreateCompatibleDC(NULL); 141 | if (!hdc) 142 | return 0; 143 | static int m_iTextures = 0; 144 | 145 | 146 | if (m_iTextures == 0) 147 | { 148 | ::CoInitialize(NULL); 149 | m_iTextures++; 150 | } 151 | //SetStretchBltMode(hdc, HALFTONE); 152 | //SetBkColor(hdc, RGB(0,0,0)); 153 | SetBkMode(hdc, TRANSPARENT); 154 | //SetBkMode(hdc, OPAQUE); 155 | SetBkColor(hdc, 0); 156 | //SetDCPenColor(hdc, fg); 157 | SetTextColor(hdc, color); 158 | HFONT oldFont = (HFONT)SelectObject(hdc, m_currFont); 159 | 160 | TEXTMETRIC infoText; 161 | GetTextMetrics(hdc, &infoText); 162 | SIZE maxSize; 163 | maxSize.cx = 0; 164 | maxSize.cy = 0; 165 | 166 | for (unsigned int i = 0; i < m_s.size(); i++) 167 | { 168 | SIZE s; 169 | GetTextExtentPoint32(hdc, m_s[i].c_str(), m_s[i].length(), &s); 170 | if (s.cx > maxSize.cx) 171 | maxSize.cx = s.cx; 172 | maxSize.cy += s.cy; 173 | } 174 | 175 | maxSize.cx += 2; 176 | maxSize.cy += 2; 177 | 178 | // now, we are going to create a memory bitmap 179 | BITMAPINFO bmi; 180 | bmi.bmiHeader.biClrImportant = 0; 181 | bmi.bmiHeader.biClrUsed = 0; 182 | bmi.bmiHeader.biBitCount = 32; 183 | bmi.bmiHeader.biCompression = BI_RGB; 184 | bmi.bmiHeader.biWidth = maxSize.cx; 185 | bmi.bmiHeader.biHeight = maxSize.cy; 186 | bmi.bmiHeader.biPlanes = 1; 187 | bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); 188 | bmi.bmiHeader.biSizeImage = maxSize.cx*maxSize.cy * 4; // 4 bytes per pixel 189 | 190 | //GlobalCompact(-1); 191 | BYTE * pixels = NULL; 192 | HBITMAP bmpHandle = CreateDIBSection(hdc, &bmi, DIB_RGB_COLORS, (void **)&pixels, NULL, NULL); 193 | if (!bmpHandle) 194 | return 0; 195 | 196 | COLORREF *p = (COLORREF *)pixels; 197 | int nColors = bmi.bmiHeader.biSizeImage / 4; 198 | //COLORREF bk = bkColor.ToColorRef(); 199 | 200 | //black but opaque 201 | for (int i = 0; i < nColors; i++, p++) 202 | //*p = 0; 203 | *p = *p | 0xff000000; 204 | 205 | 206 | HBITMAP pOldBmp = (HBITMAP)SelectObject(hdc, bmpHandle); 207 | 208 | int y0 = 0; 209 | int x0 = 0; 210 | SIZE textSize; 211 | for (unsigned int i = 0; i < m_s.size(); i++) 212 | { 213 | GetTextExtentPoint32(hdc, m_s[i].c_str(), m_s[i].length(), &textSize); 214 | TextOut(hdc, x0, y0, m_s[i].c_str(), m_s[i].length()); 215 | y0 += textSize.cy; 216 | } 217 | 218 | p = (COLORREF *)pixels; 219 | 220 | for (int i = 0; i < nColors; i++, p++) 221 | *p = (*p & 0xff000000) ? 0 : *p | 0xffffffff; 222 | //*p = 0xff00ffff; 223 | //*p = (*p == 0) ? 0xff000000 : *p | 0xff000000; 224 | //BitmapMan b; b.SetRGBAData(maxSize.cy, maxSize.cx, pixels); b.SaveBMP("c:\\temp\\test.bmp"); 225 | 226 | 227 | m_texW = maxSize.cx; 228 | m_texH = maxSize.cy; 229 | 230 | 231 | m_scrollTex = LoadTextureMN(m_texW, m_texH, pixels); 232 | //*p = 0xffffffff; 233 | //m_scrollTex = LoadTextureMN(12, 12, p); 234 | 235 | SelectObject(hdc, pOldBmp); 236 | SelectObject(hdc, oldFont); 237 | DeleteObject(bmpHandle); 238 | return true; 239 | } 240 | 241 | GLuint CVertScroll::LoadTextureMN(const int x, const int y, LPVOID pData) 242 | { 243 | GLuint textureID; // = SOIL_load_OGL_texture(file.c_str(), SOIL_LOAD_AUTO, SOIL_CREATE_NEW_ID, SOIL_FLAG_MIPMAPS); 244 | glGenTextures(1, &textureID); 245 | glBindTexture(GL_TEXTURE_2D, textureID); 246 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR/*_MIPMAP_LINEAR*/); 247 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 248 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); 249 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); 250 | glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); 251 | //gluBuild2DMipmaps(GL_TEXTURE_2D, 4, x, y, GL_RGBA, GL_UNSIGNED_BYTE, pData); 252 | GLenum e = glGetError(); 253 | glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, x, y, 0, GL_RGBA, GL_UNSIGNED_BYTE, pData); 254 | e = glGetError(); 255 | glBindTexture(GL_TEXTURE_2D, 0); 256 | glFlush(); 257 | 258 | return textureID; 259 | } 260 | 261 | void CVertScroll::move(float dy) 262 | { 263 | m_pressed = (dy < 0); 264 | m_counter = 10; 265 | 266 | m_yPos += dy; 267 | if (m_yPos - m_texH > 1024) 268 | m_yPos = m_yPos - m_texH - 1024; 269 | else if (m_yPos < 0) 270 | m_yPos = 0; 271 | 272 | } 273 | 274 | int CVertScroll::set(const char *s) 275 | { 276 | m_s.clear(); 277 | m_s.push_back(std::string(s)); 278 | setFont("TERMINAL", FONT_SIZE, 0, 0); 279 | buildTexture(0xff000000); 280 | return 0; 281 | } 282 | 283 | -------------------------------------------------------------------------------- /SCENE VERSION/RED.NFO: -------------------------------------------------------------------------------- 1 | /\ 2 | //\\ 3 | // \\ 4 | //// /\ \\\\ 5 | //////\/\\//\/\\\\\\ 6 | //////// / \/ \ \\\\\\\\ 7 | _________/ /\ /\ \_________ 8 | /\ /___ ______/ \/ \______ ___\ /\ 9 | //\\// // /\ /\ \\ \\//\\ 10 | // \/ _// \ \ / / \\_ \/ \\ 11 | // __ \_____/\ \ \/ / /\_____/ __ \\ 12 | / \____/ /__ ___\ \ / /___ __\ \____/ \ 13 | \__________ \ / / \ \/ / \ \ / __________/ 14 | / / / _ \ //\/\\ / _ \ \ \ 15 | / / /_//_///\ /\\\_\\_\ \ \ 16 | /\ / \ \\___// /\/\ \\___// / \ /\ 17 | / / / __ \/ \ _/\/ /\ \/\_ / \/ __ \ \ \ 18 | / / /\ / ///\ \__\\ \ \/ / //__/ /\\\ \ /\ \ \ 19 | / / / \ / /// /\____ \ / /\ \ / ____/\ \\\ \ / \ \ \ 20 | / / / / / \\\ \____ \ \\//\\// / ____/ /// \ \ \ \ \ 21 | \/ / \ \ \\\__ \ \ \/ \/ / / __/// / / \ \/ 22 | \ __/ / \\_ \__/\ \_ _/ /\__/ _// \ \__ / 23 | \ \_____ _/ \ \____/ / /\ \ \____/ / \_ _____/ / 24 | \ \ ___/ / \ \___ / / 25 | \_____ __ ______/ / _/ \_ \ \______ __ _____/ 26 | // // \__ / \__ /\ __/ \ __/ \\ \\ 27 | // // _/ / // \\ \ \_ \\ \\ 28 | // // / /______// /\ \\______\ \ \\ \\ 29 | ___________//__\\_____/ \/ \/ \_____//__\\__________ 30 | | ____ \\ _//_ ________ |_ 31 | | |__/ // \_ | | | | 32 | | // ___|| |_______| | 33 | | ___// / | | 34 | | \__/ /_____| _| 35 | |_______/\_______________ _______________________| 36 | __________ ___ \ / ___ __________ 37 | \ _____ \/ / / /\ \ \ \/ _____ / 38 | / \ \ \/ / \ \/ / / \ 39 | \ / \ / ______ / /\ \ ______ \ / \ / 40 | /\\//\ \__ \ / // //\\ \\ \ / __/ /\\//\ 41 | /\\ \/ \ \ \/ // ///\\\ \\ \/ / / \/ //\ 42 | \ \\ /\ \__ \__/\ / \ \\/\// / \ /\__/ __/ /\ // / 43 | \ \\/ \__ \______ \//\ \ \/\/ / /\\/ ______/ __/ \// / 44 | \/ \_ _//_ \ \ \\ \ \ / / // / / _\\_ _/ \/ 45 | \\ \_\ \__ \\ \ \/\/ / // __/ /_/ // 46 | __________________\\__\\_ \ \\ \ /\ / // / _//__//_________________ 47 | / _____________________ \ \ \\// \\// / / ____________________ \ 48 | \/ \__ \ \ \/ /\ \/ / / __/ \/ 49 | / \ \ / \ / / \ 50 | \_ ______________/ \___/ \___/ \_____________ _/ 51 | / \________/ \________/ \ 52 | \ ________ RELEASE iNFOS ________ / 53 | /\/ \_______________________________________________/ \/\ 54 | / \ 55 | 56 | 57 | RED CREW PROUDLY PRESENTS ANOTHER FiNE RELEASE CALLED 58 | 59 | 60 | Cutlet Maker v1.0f 61 | 62 | CRACKED BY...........: TEAM RED 63 | PROTECTiON...........: shit 64 | OPERATiNG SYSTEM.....: XP/7/8/10 65 | WEBSiTE..............: https://cutletv2.cf/ 66 | RELEASE DATE.........: 04/10/2o18 67 | RELEASE TYPE.........: Keygen 68 | 69 | 70 | \_ _______________________________________________ _/ 71 | / \________/ \________/ \ 72 | \ ________ DESCRiPTiON ________ / 73 | /\/ \_______________________________________________/ \/\ 74 | / \ 75 | 76 | 77 | FiLEZ: 78 | AUTORUN.INF - c905ee6cf11a24caf7c95a6f7422fb72 79 | cm17F.exe - fac356509a156a8f11ce69f149198108 80 | Stimulator22.exe - 2b3a13a952853263142a83030ed11709 81 | Safe_Mode_Networking (????????).vbs - 1f1568ff1f10d7960ae207c02bddb43a 82 | REBOOT.bat - 53f10a12965660deff9a08532192bf40 83 | 84 | DOCS: 85 | wincor-guide.docx - a75368fb83f7ce342c0eecc3cc705a3d 86 | Winkor.docx - 38c334e4e170297a58c218c6a023930c 87 | ?????? ??????.docx - ef2a8d543aa9af4cbb0a42b3c5463627 88 | 1155.docx - 4b65f136016b22c447230ac3f79a4dd7 89 | WINC2000.pdf - b8effb7133a2122f32c71e461d2a1c08 90 | 91 | 92 | If for some reason this release 'crash'... then install the VC++ 93 | Redistributable for VS2015. 94 | https://www.microsoft.com/en-us/download/details.aspx?id=48145 95 | 96 | 97 | 98 | \_ _______________________________________________ _/ 99 | / \________/ \________/ \ 100 | \ ________ iNSTALLATiONS ________ / 101 | /\/ \_______________________________________________/ \/\ 102 | / \ 103 | 104 | [1] iNSTALL APPLiCATiON 105 | [2] USE KEYGEN TO GET VALiD SERiAL 106 | [3] ENJOY ANOTHER FiNE RELEASE FROM RED CREW :) 107 | 108 | 109 | 110 | \_ _______________________________________________ _/ 111 | / \________/ \________/ \ 112 | \ ________ TEAM NEWS ________ / 113 | /\/ \_______________________________________________/ \/\ 114 | / \ 115 | 116 | 117 | 118 | CELEBRATING 10 YEARS ! 119 | 120 | 121 | 122 | \_ _______________________________________________ _/ 123 | / \________/ \________/ \ 124 | \ ________ CONTACTS ________ / 125 | /\/ \_______________________________________________/ \/\ 126 | / \ 127 | 128 | EMAiL ...............: N/A 129 | SiTE ................: N/A 130 | FORUM ...............: N/A 131 | DiSTRO ..............: https://distro.webscene.ir/RED 132 | IRC .................: N/A 133 | 134 | We are a closed group, if we need you then we will contact you! 135 | 136 | \_ _______________________________________________ _/ 137 | / \________/ \________/ \ 138 | \ ________ GREETiNGS ________ / 139 | /\/ \_______________________________________________/ \/\ 140 | / \ 141 | 142 | Greetz goes to: AT4RE, SND, CiM, FFF, URET, TSRh, OMB, DARKSiDERS 143 | And all who keep the scene alive. 144 | __ __ 145 | /_/\ /\_\ 146 | \_\/ \/_/ 147 | \_________ _________/ 148 | _\ REVERSE ENGINEER'S DREAM-MAERD S'REENIGNE ESREVER /_ 149 | \______________ _______________/ 150 | __________ ___ \ / ___ __________ 151 | \ _____ \/ / / /\ \ \ \/ _____ / 152 | / \ \ \/ / \ \/ / / \ 153 | \ / \ / ______ / /\ \ ______ \ / \ / 154 | /\\//\ \__ \ / // //\\ \\ \ / __/ /\\//\ 155 | /\\ \/ \ \ \/ // ///\\\ \\ \/ / / \/ //\ 156 | \ \\ /\ \__ \__/\ / \ \\/\// / \ /\__/ __/ /\ // / 157 | \ \\/ \__ \______ \//\ \ \/\/ / /\\/ ______/ __/ \// / 158 | \/ \_ _//_ \ \ \\ \ \ / / // / / _\\_ _/ \/ 159 | \\ \_\ \__ \\ \ \/\/ / // __/ /_/ // Xsp!d3r 160 | _\\__\\_ \ \\ \ /\ / // / _//__//_ 161 | \____ \ \ \\// \\// / / ____/ 162 | \__ \ \ \/ /\ \/ / / __/ 163 | \ \ \ //\\ / / / 164 | \ \_ \// \\/ _/ / 165 | //\ \_/ /\ \_/ /\\ 166 | _\\ \ \_//\\_/ / //_ 167 | / _\\/ /_/\/\_\ \//_ \ 168 | \ \ \ /_\ /_\ / / / 169 | \ \ \ \_//\\_/ / / / 170 | \_\ \/ \\// \/ /_/ 171 | \__/\ /\/\ /\__/ 172 | \_\\ //_/ 173 | \\// 174 | \/ -------------------------------------------------------------------------------- /SCENE VERSION/BitmapMan.cpp: -------------------------------------------------------------------------------- 1 | #include "BitmapMan.h" 2 | 3 | BitmapMan::BitmapMan() 4 | { 5 | memset(filename, 0, 80); 6 | memset(bfType, 0, 3); 7 | 8 | bfSize = biSize = biWidth = biHeight = 0; 9 | biPlanes = biBitCount = 0; 10 | bfOffBits = ErrorCode = biCompression = biSizeImage = 11 | biXPelsPerMeter = biYPelsPerMeter = biClrUsed = 12 | biClrImportant = PaletteSize = 0; 13 | bmiColors = image = NULL; 14 | } 15 | 16 | int BitmapMan::LoadDimensions(const char filename[], int &width, int &height) 17 | { 18 | FILE *f; 19 | fopen_s(&f, filename, "wb"); 20 | if (f == NULL) 21 | return 1; 22 | if (fseek(f, 18, SEEK_SET)) 23 | { 24 | fclose(f); 25 | return 2; 26 | } 27 | if (fread(&width, 4, 1, f) != 1 || fread(&height, 4, 1, f) != 1) 28 | { 29 | fclose(f); 30 | return 3; 31 | } 32 | #ifdef __CHANGE_ENDIAN__ 33 | width = intChangeEndian(width); 34 | height = intChangeEndian(height); 35 | #endif 36 | fclose(f); 37 | return 0; 38 | } 39 | 40 | BitmapMan::BitmapMan(const char theFilename[]) 41 | { 42 | bmiColors = image = NULL; 43 | ErrorCode = LoadImage(theFilename); 44 | } 45 | 46 | BitmapMan::BitmapMan(const BitmapMan& source) 47 | { 48 | int longitud; 49 | 50 | strcpy_s<80>(filename, source.filename); 51 | memcpy(bfType, source.bfType, 3); 52 | bfSize = source.bfSize; 53 | bfOffBits = source.bfOffBits; 54 | ErrorCode = source.ErrorCode; 55 | biSize = source.biSize; 56 | biWidth = source.biWidth; 57 | biHeight = source.biHeight; 58 | biPlanes = source.biPlanes; 59 | biBitCount = source.biBitCount; 60 | biCompression = source.biCompression; 61 | biSizeImage = source.biSizeImage; 62 | biXPelsPerMeter = source.biXPelsPerMeter; 63 | biYPelsPerMeter = source.biYPelsPerMeter; 64 | biClrUsed = source.biClrUsed; 65 | biClrImportant = source.biClrImportant; 66 | PaletteSize = source.PaletteSize; 67 | image = NULL; 68 | bmiColors = NULL; 69 | if (PaletteSize > 0) 70 | { 71 | bmiColors = new BYTE[4 * PaletteSize]; 72 | if (bmiColors == NULL) 73 | { 74 | ErrorCode = 6; 75 | return; 76 | } 77 | memcpy(bmiColors, source.bmiColors, 4 * PaletteSize); 78 | } 79 | longitud = (biSizeImage > 0) ? biSizeImage : bfSize - bfOffBits; 80 | image = new BYTE[longitud]; 81 | if (image == NULL) 82 | { 83 | ErrorCode = 9; 84 | return; 85 | } 86 | memcpy(image, source.image, longitud); 87 | } 88 | 89 | 90 | void BitmapMan::FreeBitMap() 91 | { 92 | if (bmiColors != NULL) delete[](BYTE *)bmiColors; 93 | if (image != NULL) delete[](BYTE *)image; 94 | image = NULL; 95 | bmiColors = NULL; 96 | biWidth = 0; 97 | } 98 | 99 | BitmapMan::~BitmapMan() 100 | { 101 | FreeBitMap(); 102 | } 103 | 104 | void BitmapMan::PrintHeader() 105 | { 106 | printf("\n%s\n", filename); 107 | printf("------------------------------\n"); 108 | printf("bfType = %s\n", bfType); 109 | printf("bfSize = %ld\n", bfSize); 110 | printf("bfOffBits = %ld\n", bfOffBits); 111 | printf("biSize = %ld\n", biSize); 112 | printf("biWidth = %ld\n", biWidth); 113 | printf("biHeight = %ld\n", biHeight); 114 | printf("biPlanes = %hd\n", biPlanes); 115 | printf("biBitCount = %hd\n", biBitCount); 116 | printf("biCompression = %ld\n", biCompression); 117 | printf("biSizeImage = %ld\n", biSizeImage); 118 | printf("biXPelsPerMeter = %ld\n", biXPelsPerMeter); 119 | printf("biYPelsPerMeter = %ld\n", biYPelsPerMeter); 120 | printf("biClrUsed = %ld\n", biClrUsed); 121 | printf("biClrImportant = %ld\n", biClrImportant); 122 | printf("Press \n"); 123 | fflush(stdin); 124 | getchar(); 125 | } 126 | 127 | void BitmapMan::PrintColorMap() 128 | { 129 | int i; 130 | 131 | printf("\nColor Map\n---------\n"); 132 | /* 133 | for (i=0; i\n"); 142 | fflush(stdin); 143 | getchar(); 144 | } 145 | 146 | 147 | int BitmapMan::SaveBMP(const char *filename) 148 | { 149 | FILE *f; 150 | int cero = 0; 151 | size_t longitud = bfSize - bfOffBits; 152 | bfOffBits = 54 + PaletteSize * 4; 153 | bfSize = bfOffBits + longitud; 154 | //size_t longitud=(biSizeImage > 0) ? biSizeImage : bfSize-bfOffBits; 155 | 156 | fopen_s(&f, filename, "wb"); 157 | if (f == NULL) 158 | { 159 | ErrorCode = 1; 160 | return ErrorCode; 161 | } 162 | if (fwrite(&bfType, 1, 2, f) != 2 || fwrite(&bfSize, 4, 1, f) != 1) 163 | { 164 | ErrorCode = 2; 165 | fclose(f); 166 | return ErrorCode; 167 | } 168 | if (fwrite(&cero, 4, 1, f) != 1) 169 | { 170 | ErrorCode = 2; 171 | fclose(f); 172 | return ErrorCode; 173 | } 174 | 175 | #ifdef __CHANGE_ENDIAN__ 176 | bfSize = intChangeEndian(bfSize); 177 | bfOffBits = intChangeEndian(bfOffBits); 178 | biSize = intChangeEndian(biSize); 179 | biWidth = intChangeEndian(biWidth); 180 | biHeight = intChangeEndian(biHeight); 181 | biPlanes = short intChangeEndian(biPlanes); 182 | biBitCount = short intChangeEndian(biBitCount); 183 | biCompression = intChangeEndian(biCompression); 184 | biSizeImage = intChangeEndian(biSizeImage); 185 | biXPelsPerMeter = intChangeEndian(biXPelsPerMeter); 186 | biYPelsPerMeter = intChangeEndian(biYPelsPerMeter); 187 | biClrUsed = intChangeEndian(biClrUsed); 188 | biClrImportant = intChangeEndian(biClrImportant); 189 | #endif 190 | 191 | if (fwrite(&bfOffBits, 4, 1, f) != 1 || 192 | fwrite(&biSize, 4, 1, f) != 1 || 193 | fwrite(&biWidth, 4, 1, f) != 1 || 194 | fwrite(&biHeight, 4, 1, f) != 1 || 195 | fwrite(&biPlanes, 2, 1, f) != 1 || 196 | fwrite(&biBitCount, 2, 1, f) != 1 || 197 | fwrite(&biCompression, 4, 1, f) != 1 || 198 | fwrite(&biSizeImage, 4, 1, f) != 1 || 199 | fwrite(&biXPelsPerMeter, 4, 1, f) != 1 || 200 | fwrite(&biYPelsPerMeter, 4, 1, f) != 1 || 201 | fwrite(&biClrUsed, 4, 1, f) != 1 || 202 | fwrite(&biClrImportant, 4, 1, f) != 1) 203 | { 204 | ErrorCode = 5; 205 | fclose(f); 206 | return ErrorCode; 207 | } 208 | 209 | #ifdef __CHANGE_ENDIAN__ 210 | bfSize = intChangeEndian(bfSize); 211 | bfOffBits = intChangeEndian(bfOffBits); 212 | biSize = intChangeEndian(biSize); 213 | biWidth = intChangeEndian(biWidth); 214 | biHeight = intChangeEndian(biHeight); 215 | biPlanes = short intChangeEndian(biPlanes); 216 | biBitCount = short intChangeEndian(biBitCount); 217 | biCompression = intChangeEndian(biCompression); 218 | biSizeImage = intChangeEndian(biSizeImage); 219 | biXPelsPerMeter = intChangeEndian(biXPelsPerMeter); 220 | biYPelsPerMeter = intChangeEndian(biYPelsPerMeter); 221 | biClrUsed = intChangeEndian(biClrUsed); 222 | biClrImportant = intChangeEndian(biClrImportant); 223 | #endif 224 | 225 | if (biBitCount != 24) 226 | { 227 | if (fwrite(bmiColors, 1, (unsigned int)4 * PaletteSize, f) != (unsigned int)4 * PaletteSize) 228 | { 229 | ErrorCode = 7; 230 | fclose(f); 231 | return ErrorCode; 232 | } 233 | } 234 | if (fwrite(image, 1, longitud, f) != longitud) 235 | { 236 | ErrorCode = 10; 237 | fclose(f); 238 | return ErrorCode; 239 | } 240 | if (fclose(f) == -1) 241 | { 242 | ErrorCode = 3; 243 | fclose(f); 244 | return ErrorCode; 245 | } 246 | ErrorCode = 0; 247 | return ErrorCode; 248 | } 249 | 250 | 251 | int BitmapMan::SetRGBData(int nRows, int nCols, void* data) 252 | { 253 | bfType[0] = 'B'; bfType[1] = 'M'; bfType[2] = 0; 254 | bfOffBits = 54; // + nothing because there is not palette 255 | biSize = 40; 256 | biWidth = nCols; 257 | biHeight = nRows; 258 | biPlanes = 1; 259 | biBitCount = 24; 260 | biCompression = 0; 261 | biSizeImage = 0; 262 | biXPelsPerMeter = 0; 263 | biYPelsPerMeter = 0; 264 | biClrUsed = 0; 265 | biClrImportant = 0; 266 | PaletteSize = 0; 267 | bmiColors = NULL; 268 | int lineWidth = biWidth * 3; 269 | if (lineWidth & 3) 270 | lineWidth += 4 - (lineWidth & 3); 271 | image = new BYTE[lineWidth*biHeight]; 272 | memcpy(image, data, lineWidth*biHeight); 273 | biSizeImage = lineWidth*biHeight; 274 | bfSize = bfOffBits + biSizeImage; 275 | return 0; 276 | } 277 | 278 | int BitmapMan::SetRGBAData(int nRows, int nCols, void* data) 279 | { 280 | bfType[0] = 'B'; bfType[1] = 'M'; bfType[2] = 0; 281 | bfOffBits = 54; // + nothing because there is not palette 282 | biSize = 40; 283 | biWidth = nCols; 284 | biHeight = nRows; 285 | biPlanes = 1; 286 | biBitCount = 32; 287 | biCompression = 0; 288 | biSizeImage = 0; 289 | biXPelsPerMeter = 0; 290 | biYPelsPerMeter = 0; 291 | biClrUsed = 0; 292 | biClrImportant = 0; 293 | PaletteSize = 0; 294 | bmiColors = NULL; 295 | int lineWidth = biWidth * 4; 296 | image = new BYTE[lineWidth*biHeight]; 297 | memcpy(image, data, lineWidth*biHeight); 298 | biSizeImage = lineWidth*biHeight; 299 | bfSize = bfOffBits + biSizeImage; 300 | return 0; 301 | } 302 | int BitmapMan::Set8bitsData(int nRows, int nCols, void *data, void *palette) 303 | { 304 | bfType[0] = 'B'; bfType[1] = 'M'; bfType[2] = 0; 305 | bfOffBits = 54 + 1024; // +1024 (palette size) 306 | biSize = 40; 307 | biWidth = nCols; 308 | biHeight = nRows; 309 | biPlanes = 1; 310 | biBitCount = 8; 311 | biCompression = 0; 312 | biXPelsPerMeter = 0; 313 | biYPelsPerMeter = 0; 314 | biClrUsed = 0; 315 | biClrImportant = 256; // all colors are important 316 | PaletteSize = 256; 317 | bmiColors = new BYTE[1024]; 318 | memcpy(bmiColors, palette, 1024); 319 | int realWidth = biWidth; 320 | if (realWidth & 3) 321 | realWidth += 4 - (realWidth & 3); 322 | image = new BYTE[realWidth*biHeight]; 323 | if (image == NULL) 324 | return 1; 325 | memcpy(image, data, realWidth*biHeight); 326 | biSizeImage = realWidth*biHeight; 327 | bfSize = bfOffBits + biSizeImage; 328 | return 0; 329 | } 330 | 331 | int BitmapMan::Set2bitsData(int nRows, int nCols, void *data, void *palette) 332 | { 333 | bfType[0] = 'B'; bfType[1] = 'M'; bfType[2] = 0; 334 | bfOffBits = 54 + 8; // +8 (palette size) 335 | biSize = 40; 336 | biWidth = nCols; 337 | biHeight = nRows; 338 | biPlanes = 1; 339 | biBitCount = 1; 340 | biCompression = 0; 341 | biXPelsPerMeter = 0; 342 | biYPelsPerMeter = 0; 343 | biClrUsed = 0; 344 | biClrImportant = 0; // all ones 345 | PaletteSize = 2; 346 | bmiColors = new BYTE[8]; 347 | memcpy(bmiColors, palette, 8); 348 | int nBitsPerRow = biWidth; 349 | if ((biWidth % 32) != 0) 350 | nBitsPerRow += 32 - biWidth % 32; 351 | int realWidth = nBitsPerRow / 8; 352 | image = new BYTE[realWidth*biHeight]; 353 | if (image == NULL) 354 | return 1; 355 | memcpy(image, data, realWidth*biHeight); 356 | biSizeImage = realWidth*biHeight; 357 | bfSize = bfOffBits + biSizeImage; 358 | return 0; 359 | } 360 | 361 | int BitmapMan::LoadImage(const char theFilename[]) 362 | { 363 | FILE *f; 364 | size_t longitud; 365 | 366 | FreeBitMap(); 367 | strcpy_s<80>(filename, theFilename); 368 | bmiColors = NULL; 369 | image = NULL; 370 | fopen_s(&f, filename, "rb"); 371 | if (f == NULL) 372 | { 373 | ErrorCode = 1; 374 | return ErrorCode; 375 | } 376 | bfType[2] = 0x00; 377 | if (fread(&bfType, 2, 1, f) != 1 || fread(&bfSize, 4, 1, f) != 1) 378 | { 379 | ErrorCode = 2; 380 | fclose(f); 381 | return ErrorCode; 382 | } 383 | /* 384 | if (fseek(f, 10, SEEK_SET)) 385 | { 386 | ErrorCode = 4; 387 | fclose(f); 388 | return; 389 | } 390 | */ 391 | fread(&bfOffBits, 4, 1, f); 392 | // byte 10 393 | if (fread(&bfOffBits, 4, 1, f) != 1 || 394 | fread(&biSize, 4, 1, f) != 1 || 395 | fread(&biWidth, 4, 1, f) != 1 || 396 | fread(&biHeight, 4, 1, f) != 1 || 397 | fread(&biPlanes, 2, 1, f) != 1 || 398 | fread(&biBitCount, 2, 1, f) != 1 || 399 | fread(&biCompression, 4, 1, f) != 1 || 400 | fread(&biSizeImage, 4, 1, f) != 1 || 401 | fread(&biXPelsPerMeter, 4, 1, f) != 1 || 402 | fread(&biYPelsPerMeter, 4, 1, f) != 1 || 403 | fread(&biClrUsed, 4, 1, f) != 1 || 404 | fread(&biClrImportant, 4, 1, f) != 1) 405 | { 406 | ErrorCode = 5; 407 | fclose(f); 408 | return ErrorCode; 409 | } 410 | 411 | 412 | if (biBitCount != 24) 413 | { 414 | PaletteSize = (biClrUsed != 0) ? biClrUsed : (1 << biBitCount); 415 | if (PaletteSize > 0) 416 | { 417 | bmiColors = new BYTE[4 * PaletteSize]; 418 | if (bmiColors == NULL) 419 | { 420 | ErrorCode = 6; 421 | fclose(f); 422 | return ErrorCode; 423 | } 424 | if (fread(bmiColors, 1, 4 * PaletteSize, f) != (unsigned int)4 * PaletteSize) 425 | { 426 | ErrorCode = 7; 427 | fclose(f); 428 | return ErrorCode; 429 | } 430 | } 431 | else 432 | { 433 | ErrorCode = 8; 434 | fclose(f); 435 | return ErrorCode; 436 | } 437 | } 438 | else 439 | PaletteSize = 0; 440 | if (fseek(f, bfOffBits, SEEK_SET)) 441 | { 442 | ErrorCode = 10; 443 | fclose(f); 444 | return ErrorCode; 445 | } 446 | longitud = (biSizeImage > 0) ? biSizeImage : bfSize - bfOffBits; 447 | image = new BYTE[longitud]; 448 | if (image == NULL) 449 | { 450 | ErrorCode = 9; 451 | fclose(f); 452 | return ErrorCode; 453 | } 454 | if (fread(image, 1, longitud, f) != longitud) 455 | { 456 | ErrorCode = 10; 457 | fclose(f); 458 | return ErrorCode; 459 | } 460 | if (fclose(f) == -1) 461 | { 462 | ErrorCode = 3; 463 | fclose(f); 464 | return ErrorCode; 465 | } 466 | ErrorCode = 0; 467 | return ErrorCode; 468 | } 469 | 470 | void BitmapMan::SetPalette(BYTE *newPalete) 471 | { 472 | if (biBitCount != 24) 473 | memcpy(bmiColors, newPalete, PaletteSize * 4); 474 | } 475 | 476 | void *BitmapMan::getBits() 477 | { 478 | return (void *)image; 479 | } 480 | 481 | bool BitmapMan::LoadResource(UINT resourceNumber) 482 | { 483 | FreeBitMap(); 484 | HRSRC hr = FindResource(NULL, MAKEINTRESOURCE(resourceNumber), RT_BITMAP); 485 | if (hr == NULL) 486 | return false; 487 | 488 | HGLOBAL hg = ::LoadResource(NULL, hr); 489 | LPBITMAPINFOHEADER lpbihInfo = (LPBITMAPINFOHEADER)LockResource(hg); 490 | BYTE *pPalette, *pImage; 491 | if (lpbihInfo->biBitCount < 24) 492 | { 493 | pPalette = (PBYTE)(lpbihInfo + 1); // skip header 494 | PaletteSize = (1 << (lpbihInfo->biBitCount)) * sizeof(RGBQUAD); 495 | bfOffBits = 54 + PaletteSize; 496 | pImage = (PBYTE)(pPalette)+bfOffBits; 497 | bmiColors = new BYTE[PaletteSize]; 498 | memcpy(bmiColors, pPalette, PaletteSize); 499 | } 500 | else 501 | { 502 | PaletteSize = 0; 503 | bmiColors = NULL; 504 | bfOffBits = 54; 505 | pImage = (PBYTE)(lpbihInfo + 1); 506 | } 507 | 508 | // pImage points to the image 509 | 510 | biWidth = (unsigned short)lpbihInfo->biWidth; 511 | biHeight = (unsigned short)lpbihInfo->biHeight; 512 | biBitCount = lpbihInfo->biBitCount; 513 | biSize = lpbihInfo->biSize; 514 | biPlanes = lpbihInfo->biPlanes; 515 | biCompression = lpbihInfo->biCompression; 516 | int lineWidth = biWidth * 3; 517 | if (lineWidth & 3) 518 | lineWidth += 4 - (lineWidth & 3); 519 | biSizeImage = lineWidth*biHeight; 520 | bfSize = bfOffBits + biSizeImage; 521 | biXPelsPerMeter = biYPelsPerMeter = biClrUsed = biClrImportant = 0; 522 | image = new BYTE[biSizeImage]; 523 | memcpy(image, pImage, biSizeImage); 524 | UnlockResource(hg); 525 | FreeResource(hg); 526 | return true; 527 | } 528 | 529 | 530 | BYTE * BitmapMan::GetPalette() 531 | { 532 | if (biBitCount <= 8) 533 | return bmiColors; 534 | return NULL; 535 | } 536 | 537 | int BitmapMan::GetPaletteSize() 538 | { 539 | return PaletteSize; 540 | } 541 | -------------------------------------------------------------------------------- /SCENE VERSION/Keygen.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "resource.h" 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include "VertScroll.h" 8 | #include "minif.h" 9 | 10 | #pragma comment(lib, "minifmod.lib") 11 | #pragma comment(lib, "winmm.lib") 12 | #pragma comment(lib, "legacy_stdio_definitions.lib") 13 | 14 | HINSTANCE myhInstance; 15 | HDC hDC1; 16 | HWND hEdit1; 17 | HGLRC hglrc1; 18 | unsigned int g_tex1 = 0; 19 | CVertScroll g_scroll; 20 | miniF fMod; 21 | // Set up the pixel format 22 | 23 | int MySetPixelFormat(HDC hdc) 24 | { 25 | 26 | 27 | PIXELFORMATDESCRIPTOR pfd = { 28 | sizeof(PIXELFORMATDESCRIPTOR), // size of this pfd 29 | 1, // version number 30 | PFD_DRAW_TO_WINDOW | // support window 31 | PFD_SUPPORT_OPENGL | // support OpenGL 32 | PFD_DOUBLEBUFFER, // double buffered 33 | PFD_TYPE_RGBA, // RGBA type 34 | 24, // 24-bit color depth 35 | 0, 0, 0, 0, 0, 0, // color bits ignored 36 | 0, // no alpha buffer 37 | 0, // shift bit ignored 38 | 0, // no accumulation buffer 39 | 0, 0, 0, 0, // accum bits ignored 40 | 32, // 32-bit z-buffer 41 | 0, // no stencil buffer 42 | 0, // no auxiliary buffer 43 | PFD_MAIN_PLANE, // main layer 44 | 0, // reserved 45 | 0, 0, 0 // layer masks ignored 46 | }; 47 | 48 | int iPixelFormat; 49 | 50 | // get the device context's best, available pixel format match 51 | if ((iPixelFormat = ChoosePixelFormat(hdc, &pfd)) == 0) 52 | { 53 | MessageBox(NULL, "ChoosePixelFormat Failed", NULL, MB_OK); 54 | return 0; 55 | } 56 | 57 | // make that match the device context's current pixel format 58 | if (SetPixelFormat(hdc, iPixelFormat, &pfd) == FALSE) 59 | { 60 | MessageBox(NULL, "SetPixelFormat Failed", NULL, MB_OK); 61 | return 0; 62 | } 63 | 64 | return 1; 65 | } 66 | 67 | HDC hdcDialog = NULL; 68 | 69 | 70 | LRESULT onNcPaint(HWND hwnd, WPARAM wParam, LPARAM lParam) 71 | { 72 | // draw Frame 73 | // HBRUSH mBrush = CreateSolidBrush( RGB(0,113,201) ); 74 | HDC hdc = GetWindowDC(hwnd); 75 | // HDC hdc = GetDCEx(hwnd, (HRGN)wParam, DCX_WINDOW);//|DCX_INTERSECTRGN); 76 | 77 | RECT mRect, wndRect; 78 | GetWindowRect(hwnd, &mRect); 79 | wndRect = mRect; 80 | mRect.right -= mRect.left; 81 | mRect.bottom -= mRect.top; 82 | mRect.left = 0; 83 | mRect.top = 0; 84 | 85 | HBRUSH brush = CreateSolidBrush(RGB(0, 0, 0)); /* White Brush */ 86 | FillRect(hdcDialog, &mRect, brush); /* Fills the toolbar's background white */ 87 | 88 | 89 | 90 | 91 | 92 | // draw window text 93 | char wndText[100]; 94 | RECT textRect; 95 | textRect.left = 9 + 16 + 9; 96 | textRect.top = 0; 97 | textRect.right = 1000; 98 | textRect.bottom = 32; 99 | GetWindowText(hwnd, wndText, 99); 100 | //int oldMode = SetBkMode(hdc, TRANSPARENT); 101 | //int oldMode = SetBkMode(memDC, TRANSPARENT); 102 | SetBkMode(hdc, TRANSPARENT); 103 | 104 | HFONT oldFont, hfont0 = CreateFont(-13, 0, 0, 0, 0, FALSE, FALSE, FALSE, 1, 0, 0, 0, 0, "Ms Shell Dlg"); 105 | oldFont = (HFONT)SelectObject(hdc, hfont0); 106 | DrawText(hdc, wndText, -1, &textRect, DT_VCENTER | DT_SINGLELINE | DT_LEFT); 107 | SelectObject(hdc, oldFont); 108 | DeleteObject(hfont0); 109 | 110 | // BitBlt(hdc, 0,0, mRect.right,mRect.bottom, memDC, 0,0, SRCCOPY); 111 | 112 | ReleaseDC(hwnd, hdc); 113 | // ValidateRgn(hwnd, (HRGN)wParam); 114 | return 0; 115 | } 116 | 117 | unsigned int LoadTextureMN(const int x, const int y, LPVOID pData) 118 | { 119 | GLuint textureID; // = SOIL_load_OGL_texture(file.c_str(), SOIL_LOAD_AUTO, SOIL_CREATE_NEW_ID, SOIL_FLAG_MIPMAPS); 120 | glGenTextures(1, &textureID); 121 | glBindTexture(GL_TEXTURE_2D, textureID); 122 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR/*_MIPMAP_LINEAR*/); 123 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 124 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); 125 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); 126 | glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); 127 | //gluBuild2DMipmaps(GL_TEXTURE_2D, 4, x, y, GL_RGBA, GL_UNSIGNED_BYTE, pData); 128 | GLenum e = glGetError(); 129 | glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, x, y, 0, GL_RGBA, GL_UNSIGNED_BYTE, pData); 130 | e = glGetError(); 131 | glBindTexture(GL_TEXTURE_2D, 0); 132 | glFlush(); 133 | 134 | return textureID; 135 | } 136 | 137 | BOOL LoadTexture() 138 | { 139 | /* GLuint textureID = SOIL_load_OGL_texture(file.c_str(), SOIL_LOAD_AUTO, SOIL_CREATE_NEW_ID, SOIL_FLAG_MIPMAPS); 140 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR); 141 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); 142 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); 143 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); 144 | glBindTexture(GL_TEXTURE_2D, 0); 145 | */ 146 | GLuint Status = FALSE; // Status Indicator 147 | myhInstance = GetModuleHandle(NULL); 148 | 149 | HRSRC hrsrc = FindResource(myhInstance, MAKEINTRESOURCE(IDR_RAW1), "RAW"); 150 | HGLOBAL hGlob = LoadResource(myhInstance, hrsrc); 151 | LPVOID pData = LockResource(hGlob); 152 | if (!pData) 153 | Status = FALSE; 154 | 155 | if (g_tex1 = LoadTextureMN(400, 200, pData)) 156 | { 157 | Status = TRUE; // Set The Status To TRUE 158 | } 159 | 160 | return Status; // Return The Status 161 | } 162 | 163 | void NCPaint(HWND hWnd, HRGN hRgn) 164 | { 165 | HDC hDC; 166 | char s[] = "RED"; 167 | 168 | hDC = GetWindowDC(hWnd); 169 | TextOut(hDC, 0, 0, s, strlen(s)); 170 | ReleaseDC(hWnd, hDC); 171 | } 172 | 173 | int rol(int x, int n) 174 | { 175 | int y = x << n | x >> (32 - n); 176 | 177 | for (int i = 0; i < n; i++) 178 | x = ((x & 0x80) ? 0x01 : 0x00) | (x << 1); 179 | 180 | x = x & 0xFFFF0000; 181 | y = y & 0x0000FFFF; 182 | 183 | x = x + y; 184 | return x; 185 | } 186 | 187 | void computeCode(HWND hWnd) 188 | { 189 | 190 | int nCode = 0; 191 | HWND h = GetDlgItem(hWnd, IDC_EDIT2); 192 | char text[101]; 193 | GetWindowText(h, text, 100); 194 | int len = strlen(text); 195 | if (len > 0) 196 | nCode = atoi(text); 197 | 198 | if (nCode == 0) 199 | { 200 | h = GetDlgItem(hWnd, IDC_EDIT3); 201 | SetWindowText(h, "none"); 202 | } 203 | else 204 | { 205 | int nAnswer = rol(0x75BCD17 * (~(nCode & 0xABD13D59) & ~(~nCode & 0x542EC2A6)), 16); 206 | nAnswer = 0xDFB38D3u * nAnswer % 0x5F5E100; 207 | 208 | // converting nAnswer into a number 209 | sprintf(text, "%d", nAnswer); 210 | h = GetDlgItem(hWnd, IDC_EDIT3); 211 | SetWindowText(h, text); 212 | } 213 | } 214 | 215 | // +---------------------------------------------------------------------------- 216 | // | -DialogProc()- 217 | // | This is the callback function that processes the messages sent to our 218 | // | dialog box. Most everything of consequence in such a program is either 219 | // | done here or called from here. 220 | // +---------------------------------------------------------------------------- 221 | BOOL CALLBACK DialogProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) 222 | { 223 | // check message type 224 | switch (uMsg) 225 | { 226 | case WM_COMMAND: 227 | // here's where you would process commands sent to the dialog box 228 | switch (LOWORD(wParam)) 229 | { 230 | case IDOK: 231 | // OK button clicked - perform data validation and such here 232 | EndDialog(hWnd, TRUE); 233 | break; 234 | 235 | case IDCANCEL: 236 | // Cancel button clicked 237 | EndDialog(hWnd, FALSE); 238 | break; 239 | case IDC_EDIT2: 240 | if (HIWORD(wParam) == EN_CHANGE) 241 | computeCode(hWnd); 242 | break; 243 | } 244 | 245 | //case WM_NCPAINT: 246 | //{ 247 | //DefWindowProc(hWnd, uMsg, wParam, lParam); 248 | //NCPaint(hWnd, (HRGN)wParam); 249 | //return 1; 250 | /* 251 | HDC hdc = ::GetWindowDC(hWnd); 252 | 253 | ::SetTextColor(hdc, RGB(0, 0, 0)); 254 | ::SetBkColor(hdc, RGB(255, 255, 255)); 255 | HBRUSH brush = CreateSolidBrush(RGB(0, 0, 0)); 256 | RECT r = { 0,-100,500,600 }; 257 | FillRect(hdc, &r, brush); 258 | ReleaseDC(hWnd, hdc); 259 | return 0;*/ 260 | //} 261 | // printf("WM_NCPAINT -"); 262 | // printf("wParam: 0x%08d lParam 0x%08x\n", wParam, lParam); 263 | //onNcPaint(hWnd, wParam, lParam); 264 | //return 0; 265 | case WM_KEYDOWN: 266 | case WM_KEYUP: 267 | { 268 | //HWND e2 = GetDlgItem(hWnd, IDC_EDIT2); 269 | //SetFocus(e2); 270 | //SendDlgItemMessage(hWnd, IDC_EDIT2, WM_SETFOCUS, 0, 0); 271 | //SendMessage(e2, uMsg, wParam, lParam); 272 | break; 273 | } 274 | 275 | case WM_INITDIALOG: 276 | { 277 | 278 | HICON hIcon = LoadIcon(myhInstance, MAKEINTRESOURCE(IDI_ICON1)); 279 | SendMessage(hWnd, WM_SETICON, ICON_SMALL, (LPARAM)hIcon); 280 | SendMessage(hWnd, WM_SETICON, ICON_BIG, (LPARAM)hIcon); 281 | 282 | if (!fMod.LoadMusic(IDR_MODFILE1)) 283 | printf("\n Error load File .xm\n"); 284 | else 285 | fMod.Play(); 286 | 287 | //int extendedStyle = GetWindowLong(hWnd, GWL_EXSTYLE); 288 | //SetWindowLong(hWnd, GWL_EXSTYLE, extendedStyle | WS_EX_DLGMODALFRAME); 289 | 290 | HWND e2 = GetDlgItem(hWnd, IDC_EDIT2); 291 | 292 | //int extendedStyle = GetWindowLong(e2, GWL_EXSTYLE); 293 | //SetWindowLong(e2, GWL_EXSTYLE, extendedStyle); 294 | 295 | SetWindowText(e2, ""); 296 | //ShowWindow(e2, SWP_HIDEWINDOW); 297 | HWND e3 = GetDlgItem(hWnd, IDC_EDIT3); 298 | SetWindowText(e3, "none"); 299 | int extendedStyle = GetWindowLong(e3, GWL_EXSTYLE); 300 | SetWindowLong(e3, GWL_EXSTYLE, extendedStyle| ES_READONLY); 301 | 302 | int w = GetSystemMetrics(SM_CXSCREEN); 303 | int h = GetSystemMetrics(SM_CYSCREEN); 304 | RECT r; 305 | GetWindowRect(hWnd, &r); 306 | int xlen = r.right - r.left; 307 | int ylen = r.bottom - r.top; 308 | if (ylen < 0) 309 | ylen = -ylen; 310 | int x = (w - xlen) >> 1; 311 | int y = (h - ylen) >> 1; 312 | 313 | SetWindowPos(hWnd, HWND_TOP, x, y, 0, 0, SWP_NOSIZE | SWP_SHOWWINDOW); 314 | //EnableWindow(e3, 0); 315 | //SendMessage(e3, /*EM_SETCUEBANNER*/0x1501, 0, (LPARAM)L""); 316 | 317 | //long gwl = GetWindowLong(hWnd, GWL_STYLE); 318 | //gwl = gwl & ~WS_SYSMENU; 319 | //SetWindowLong(hWnd, GWL_STYLE, gwl); 320 | 321 | //HBRUSH brush = CreateSolidBrush(RGB(0, 0, 255)); 322 | //SetClassLongPtr(hWnd, GCLP_HBRBACKGROUND, (LONG)brush); 323 | hdcDialog = GetDC(hWnd); 324 | 325 | 326 | //int aElements[2] = { COLOR_WINDOW, COLOR_ACTIVECAPTION }; 327 | //DWORD aOldColors[2]; 328 | //DWORD aNewColors[2]; 329 | 330 | //aOldColors[0] = GetSysColor(aElements[0]); 331 | //aOldColors[1] = GetSysColor(aElements[1]); 332 | //aNewColors[0] = RGB(0xff, 0xff, 0xff); // light gray 333 | //aNewColors[1] = RGB(0xA0, 0xA0, 0xA0); // dark purple 334 | 335 | //SetSysColors(2, aElements, aNewColors); 336 | //SetSysColors(2, aElements, aOldColors); 337 | 338 | //SetBkColor(hdcDialog, RGB(0, 0, 0)); 339 | //SendMessage(hWnd, WM_ERASEBKGND, (WPARAM)hdcDialog, NULL); 340 | // perform any necessary initialization here - return FALSE if you 341 | // set the focus to a control yourself, otherwise just break and 342 | // allow the function to return TRUE to indicate that the keyboard 343 | // focus should be set automatically 344 | // First, let's get the handle to all the window we created in the Dialog 345 | // with the resource editor 346 | hEdit1 = GetDlgItem(hWnd, IDC_EDIT1); 347 | 348 | // For every window, we get the HDC 349 | hDC1 = GetDC(hEdit1); 350 | 351 | // OpenGL Initialization 352 | 353 | MySetPixelFormat(hDC1); 354 | 355 | hglrc1 = wglCreateContext(hDC1); 356 | wglMakeCurrent(hDC1, hglrc1); 357 | 358 | LoadTexture(); 359 | 360 | g_scroll.set(" . . . . . REVERSE ENGiNEER'S DREAM proudly presents another fine release Cutlet Maker v1.0f *keygen* Credits de cette petite CrackTro . . . . . . LOGO by Xspider/RED . . . . Muzaxx 'Anarchy_menu-06' by 4-mat . . . . Code by Xylitol/RED Greetings to . . . . . . BytePlayeR Xspider Bispoo qpt^j KKR MiSSiNG iN ByTES Encrypto fr334life . . . . h o p . . . . . . . . h o p . . . . . . . h o p . . . Teams greeting now . . . . . . . AT4RE SND CiM FFF URET TSRh OMB DARKSiDERS "); 361 | 362 | SetTimer(hWnd, 1, 30, NULL); 363 | 364 | break; 365 | } 366 | case WM_CTLCOLORDLG: 367 | { 368 | return (INT_PTR)GetStockObject(WHITE_BRUSH); 369 | } 370 | 371 | case WM_ERASEBKGND: 372 | { 373 | HPEN pen; 374 | HBRUSH brush; 375 | RECT rect; 376 | 377 | pen = CreatePen(PS_SOLID, 1, RGB(0,0,0)); 378 | brush = CreateSolidBrush(RGB(0, 0, 0)); 379 | HGDIOBJ oPen = SelectObject((HDC)wParam, pen); 380 | HGDIOBJ oBrush = SelectObject((HDC)wParam, brush); 381 | 382 | GetClientRect(hWnd, &rect); 383 | 384 | Rectangle((HDC)wParam, rect.left, rect.top, rect.right, rect.bottom); 385 | SelectObject((HDC)wParam, oPen); 386 | SelectObject((HDC)wParam, oBrush); 387 | DeleteObject(pen); 388 | DeleteObject(brush); 389 | 390 | // here, draw bitmap 391 | HBITMAP hBitmap = LoadBitmap(myhInstance, MAKEINTRESOURCE(IDB_BITMAP1)); // from "resource.rc/Bitmap/IDB_KEYBD2" 392 | HDC hMemDC = CreateCompatibleDC((HDC)wParam); 393 | HANDLE prev = SelectObject(hMemDC, hBitmap); 394 | 395 | RECT r; 396 | 397 | HWND hEdit2 = GetDlgItem(hWnd, IDC_EDIT2); 398 | GetWindowRect(hEdit2, &r); 399 | 400 | 401 | //BitBlt((HDC)wParam, 0, 500, 235, 49, hMemDC, 0, 0, SRCCOPY); 402 | BitBlt((HDC)wParam, 150, 330, 235, 80, hMemDC, 0, 0, SRCCOPY); 403 | 404 | SelectObject(hMemDC, prev); 405 | DeleteObject(hBitmap); 406 | DeleteDC(hMemDC); 407 | 408 | return TRUE; 409 | break; 410 | } 411 | 412 | 413 | case WM_CTLCOLORSTATIC: 414 | { 415 | HDC hdcEdit = (HDC)wParam; //Get handles 416 | SetTextColor(hdcEdit, RGB(255, 255, 255)); // Text color 417 | SetBkMode(hdcEdit, TRANSPARENT); // EditBox Backround Mode (note: OPAQUE can be used) 418 | static HBRUSH hbrushEditBox = CreateSolidBrush(RGB(0, 0, 0)); 419 | SetBkColor(hdcEdit, (LONG)hbrushEditBox); // Backround color for EditBox 420 | return (LONG)hbrushEditBox; // Paint it 421 | break; 422 | } 423 | 424 | case WM_CTLCOLOREDIT: 425 | { 426 | HDC hdcEdit = (HDC)wParam; //Get handles 427 | SetTextColor(hdcEdit, RGB(255, 255, 255)); // Text color 428 | SetBkMode(hdcEdit, TRANSPARENT); // EditBox Backround Mode (note: OPAQUE can be used) 429 | static HBRUSH hbrushEditBox = CreateSolidBrush(RGB(0, 0, 0)); 430 | SetBkColor(hdcEdit, (LONG)hbrushEditBox); // Backround color for EditBox 431 | return (LONG)hbrushEditBox; // Paint it 432 | break; 433 | } 434 | case WM_PAINT: 435 | { 436 | PAINTSTRUCT ps; 437 | HDC hdc = BeginPaint(hWnd, &ps); 438 | //HBRUSH brush = CreateSolidBrush(RGB(0, 0, 0)); /* White Brush */ 439 | 440 | //SendMessage(hWnd, WM_ERASEBKGND, brush, NULL); /* Erases the background */ 441 | 442 | //GetClientRect(hWnd_toolbar, rectangle); /* Gets the toolbar's area */ 443 | 444 | //FillRect(GetDC(hWnd_toolbar), &rectangle, whitebrush); /* Fills the toolbar's background white */ 445 | 446 | EndPaint(hWnd, &ps); 447 | /* 448 | HWND s1 = GetDlgItem(hWnd, IDC_STATIC1); 449 | hdc = GetDC(s1); 450 | SetBkColor(hdc, RGB(0, 0, 0)); 451 | SetTextColor(hdc, RGB(255, 255, 255)); 452 | SendMessage(s1, WM_ERASEBKGND, 0, 0); 453 | ReleaseDC(s1, hdc); 454 | */ 455 | 456 | break; 457 | } 458 | case WM_TIMER: 459 | { 460 | 461 | int captionHeight = 25; 462 | //SendDlgItemMessage(hWnd, IDC_EDIT2, WM_SETFOCUS, 0, 0); 463 | wglMakeCurrent(hDC1, hglrc1); 464 | RECT r; 465 | GetWindowRect(hEdit1, &r); 466 | glViewport(0, 0, r.right-r.left, r.bottom-r.top); 467 | 468 | 469 | glShadeModel(GL_SMOOTH); // Enable Smooth Shading 470 | glClearColor(0.0f, 0.0f, 0.0f, 1.0f); // Black Background 471 | glClearDepth(1.0f); // Depth Buffer Setup 472 | glEnable(GL_DEPTH_TEST); // Enables Depth Testing 473 | //glDepthFunc(GL_LEQUAL); // The Type Of Depth Testing To Do 474 | glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); // Really Nice Perspective Calculations 475 | 476 | glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 477 | 478 | 479 | glMatrixMode(GL_MODELVIEW); 480 | glLoadIdentity(); 481 | 482 | /* 483 | glViewport(0, r.bottom - r.top - captionHeight, r.right - r.left, r.bottom - r.top); 484 | glMatrixMode(GL_PROJECTION); 485 | glLoadIdentity(); 486 | glOrtho(0, r.right - r.left, 0, captionHeight, -1, 1); 487 | glColor3f(0, 0, 0); 488 | glBegin(GL_QUADS); 489 | { 490 | glVertex3f(0, 0, 0); 491 | glVertex3f(r.right - r.left, 0, 0); 492 | glVertex3f(r.right - r.left, captionHeight, 0); 493 | glVertex3f(0, captionHeight, 0); 494 | } 495 | glEnd(); 496 | 497 | 498 | 499 | glViewport(0, 0, r.right - r.left, r.bottom - r.top- captionHeight); 500 | */ 501 | 502 | glViewport(0, 0, r.right - r.left, r.bottom - r.top); 503 | glMatrixMode(GL_PROJECTION); 504 | glLoadIdentity(); 505 | glOrtho(0, r.right - r.left, 0, r.bottom - r.top, -1, 1); 506 | 507 | glMatrixMode(GL_MODELVIEW); 508 | glLoadIdentity(); 509 | 510 | glBindTexture(GL_TEXTURE_2D, g_tex1); 511 | glEnable(GL_TEXTURE_2D); 512 | 513 | static float step = 0.0f; 514 | 515 | float y2[2] = { 150.0f, 350.0f }; 516 | float y1[2] = { -200.0f, 150.0f}; 517 | float y [2]; 518 | 519 | // linear interpolation 520 | y[0] = (1.0f - step) * y1[0] + step * y2[0]; 521 | y[1] = (1.0f - step) * y1[1] + step * y2[1]; 522 | 523 | // updating step 524 | const int logoAnimationFrames = 120; 525 | step = step + 1.0f / logoAnimationFrames; 526 | if (step > 1.0f) 527 | step = 1.0f; 528 | glColor3f(1, 1, 1); 529 | glEnable(GL_BLEND); 530 | glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 531 | 532 | glBegin(GL_QUADS); 533 | glTexCoord2f(0, 1); 534 | glVertex3f(20, y[0], 0); 535 | 536 | glTexCoord2f(1, 1); 537 | glVertex3f(r.right - r.left-20, y[0], 0.0f); //left 538 | 539 | glTexCoord2f(1, 0); 540 | glVertex3f(r.right - r.left-20, y[1], 0.0f); //left 541 | 542 | glTexCoord2f(0, 0); 543 | glVertex3f(20, y[1], 0.0f); //left 544 | glEnd(); 545 | glDisable(GL_BLEND); 546 | 547 | g_scroll.draw(); 548 | 549 | 550 | SwapBuffers(hDC1); 551 | 552 | break; 553 | } 554 | 555 | default: 556 | // return zero if we do not process this message 557 | return FALSE; 558 | } 559 | 560 | // return nonzero if we did process the message 561 | return TRUE; 562 | } 563 | 564 | // +---------------------------------------------------------------------------- 565 | // | -WinMain()- 566 | // | Program entry point. Normally you'd find a message loop in WinMain(), but 567 | // | for a dialog-based application, all we have to do is create the dialog and 568 | // | then quit. You should probably add some kind of error-checking facility in 569 | // | case the call to DialogBox() fails. You might also wish to do something 570 | // | with the return value of DialogBox() if it's important. Finally, you could 571 | // | use DialogBoxParam() instead of DialogBox() if you wanted to pass a 572 | // | parameter to the dialog box. 573 | // +---------------------------------------------------------------------------- 574 | int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) 575 | { 576 | ::myhInstance = hInstance; 577 | DialogBox(hInstance, MAKEINTRESOURCE(IDD_MAINDIALOG), NULL, DialogProc); 578 | return 0; 579 | } 580 | 581 | --------------------------------------------------------------------------------