mirror of
https://github.com/ondra-novak/gates_of_skeldal.git
synced 2025-07-20 13:15:16 -04:00
github publish
This commit is contained in:
commit
506e23bf32
542 changed files with 120675 additions and 0 deletions
328
UTILS/ITEMLIST.C
Normal file
328
UTILS/ITEMLIST.C
Normal file
|
@ -0,0 +1,328 @@
|
|||
#include <types.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#define SV_ITLIST 0x8001
|
||||
#define SV_SNDLIST 0x8002
|
||||
#define SV_END 0x8000
|
||||
|
||||
|
||||
typedef struct titem
|
||||
{
|
||||
char jmeno[32]; //32 Jmeno predmetu
|
||||
char popis[32]; //64
|
||||
short zmeny[24]; //112 Tabulka, jakych zmen ma na hracovy vlastnosti
|
||||
short podminky[4];//120 Tabulka, jake vlastnosti musi mit hrac k pouziti predmetu
|
||||
short hmotnost,nosnost,druh; //126 druh = Typ predmetu
|
||||
short umisteni; //128 Kam se predmet umisti?
|
||||
word flags; //130 ruzne vlajky
|
||||
short spell,magie,sound_handle;//136 specialni kouzla / rukojet zvuku
|
||||
short use_event; //140 specialni udalost
|
||||
unsigned short ikona,vzhled; //144 ikony a vzhled
|
||||
short user_value; //146 uzivatelska hodnota
|
||||
short keynum; //148 cislo klice
|
||||
short polohy[2][2]; //156 souradnice poloh pro zobrazeni v inv
|
||||
char typ_zbrane; //160 Typ zbrane
|
||||
char unused;
|
||||
short sound; //cislo zvuku
|
||||
short v_letu[16]; //192
|
||||
int cena;
|
||||
char weapon_attack; //relativni handle k souboru s animaci utok
|
||||
char hitpos; //pozice zasahu animace
|
||||
short rezerva[13]; //224 rezervovane
|
||||
}TITEM;
|
||||
|
||||
#define isweapon(p) ((p)>=1 && (p)<=3)
|
||||
|
||||
char sekceid[]="<BLOCK>";
|
||||
TITEM *itlist;
|
||||
int item_count;
|
||||
char *sound;
|
||||
char listsize;
|
||||
int pagelen;
|
||||
|
||||
char pr_name=0,pr_type=0,pr_sound=0,pr_umist=0,pr_zbran=0,pr_hmotn=0,pr_popis=0;
|
||||
char grp_sort=0,pr_number=0,pr_cena=0;
|
||||
|
||||
char _typy_zbrani[]=
|
||||
"Me‡\0"
|
||||
"Sekera\0"
|
||||
"Kladivo\0"
|
||||
"H–l\0"
|
||||
"D˜ka\0"
|
||||
"St©eln \0"
|
||||
"Ostatn¡\0";
|
||||
|
||||
char _typy_veci[]=
|
||||
"Nespecifikov no\0"
|
||||
"Zbra¤ tv ©¡ v tv ©\0"
|
||||
"Vrhac¡ zbra¤\0"
|
||||
"St©eln zbra¤\0"
|
||||
"Zbroj\0"
|
||||
"Svitek / H–lka\0"
|
||||
"Lektvar\0"
|
||||
"Voda\0"
|
||||
"J¡dlo\0"
|
||||
"Speci ln¡\0"
|
||||
"Runa\0"
|
||||
"Pen¡ze\0"
|
||||
"Svitek s textem\0"
|
||||
"Prach\0"
|
||||
"Ostatn¡\0";
|
||||
|
||||
char _umisteni_veci[]=
|
||||
"Nikam\0"
|
||||
"Zavazadlo\0"
|
||||
"Na tˆlo (naho©e)\0"
|
||||
"Na tˆlo (dole)\0"
|
||||
"Na hlavu\0"
|
||||
"Na nohy\0"
|
||||
"Kutna\0"
|
||||
"Na krk\0"
|
||||
"Do ruky\0"
|
||||
"Obouru‡\0"
|
||||
"Prsten\0"
|
||||
"›¡p\0";
|
||||
|
||||
|
||||
long load_section(FILE *f,void **section, int *sct_type,long *sect_size)
|
||||
//
|
||||
{
|
||||
long s;
|
||||
char c[20];
|
||||
|
||||
*section=NULL;
|
||||
fread(c,1,sizeof(sekceid),f);
|
||||
if (strcmp(c,sekceid)) return -1;
|
||||
fread(sct_type,1,sizeof(*sct_type),f);
|
||||
fread(sect_size,1,sizeof(*sect_size),f);
|
||||
fread(&s,1,sizeof(s),f);
|
||||
*section=malloc(*sect_size);
|
||||
s=fread(*section,1,*sect_size,f);
|
||||
return s;
|
||||
}
|
||||
|
||||
void load_items_dat(char *name)
|
||||
{
|
||||
FILE *f;
|
||||
void *temp;
|
||||
int type;
|
||||
long size;
|
||||
|
||||
f=fopen(name,"rb");
|
||||
if (f==NULL)
|
||||
{
|
||||
printf("Nemohu otevrit soubor %s\n",name);
|
||||
exit(1);
|
||||
}
|
||||
do
|
||||
{
|
||||
load_section(f,&temp,&type,&size);
|
||||
switch (type)
|
||||
{
|
||||
case SV_ITLIST:itlist=temp;item_count=size/sizeof(TITEM);break;
|
||||
case SV_SNDLIST:sound=temp;listsize=size;break;
|
||||
|
||||
case SV_END:
|
||||
default: free(temp);break;
|
||||
}
|
||||
}
|
||||
while (type!=SV_END);
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
char *find_str(char *sound,int number,long listsize)
|
||||
{
|
||||
char *c;
|
||||
static char none[]="<nic>";
|
||||
static char unknown[]="<ref.error>";
|
||||
|
||||
c=sound;
|
||||
if (!number) return none;
|
||||
number--;
|
||||
while (c-sound<listsize && number--) c+=strlen(c)+1;
|
||||
if (c-sound<listsize) return c;
|
||||
return &unknown;
|
||||
}
|
||||
|
||||
void print_polozka(int num,TITEM *t)
|
||||
{
|
||||
if (pr_number) printf("%3d³",num);
|
||||
if (pr_name) printf("%-32s³",t->jmeno);
|
||||
if (pr_type) printf("%-20s³",find_str(_typy_veci,t->druh+1,sizeof(_typy_veci)));
|
||||
if (pr_umist) printf("%-20s³",find_str(_umisteni_veci,t->umisteni+1,sizeof(_umisteni_veci)));
|
||||
if (pr_zbran) printf("%-10s³",isweapon(t->druh)?find_str(_typy_zbrani,t->typ_zbrane+1,sizeof(_typy_zbrani)):" ");
|
||||
if (pr_hmotn) printf("%6d³",t->hmotnost);
|
||||
if (pr_cena) printf("%6d³",t->cena);
|
||||
if (pr_sound) printf("%-12s³",find_str(sound,t->sound,listsize));
|
||||
if (pr_popis) printf("%s",t->popis);
|
||||
puts("");
|
||||
}
|
||||
|
||||
void print_head()
|
||||
{
|
||||
int lines=0;
|
||||
if (pr_number) printf("ID "),lines+=4;
|
||||
if (pr_name) printf("%-32s ","Jmeno veci"),lines+=33;
|
||||
if (pr_type) printf("%-20s ","Typ veci"),lines+=21;
|
||||
if (pr_umist) printf("%-20s ","Umisteni"),lines+=21;
|
||||
if (pr_zbran) printf("%-10s ","Zbran"),lines+=11;
|
||||
if (pr_hmotn) printf("%-6s ","Vaha"),lines+=7;
|
||||
if (pr_cena) printf("%-6s ","Cena"),lines+=7;
|
||||
if (pr_sound) printf("%-12s ","Zvuk"),lines+=13;
|
||||
if (pr_popis) printf("%s","Popis"),lines+=6;
|
||||
puts("");
|
||||
if (lines) while (lines--) putc(196,stdout);
|
||||
puts("");
|
||||
}
|
||||
|
||||
void endpage(int i)
|
||||
{
|
||||
if (pagelen && i%pagelen==0)
|
||||
{
|
||||
if (i) putc(12,stdout);
|
||||
print_head();
|
||||
}
|
||||
}
|
||||
|
||||
void counting_sort(TITEM *sr,TITEM *tg,int count,int *idnums)
|
||||
{
|
||||
int tridy[30][20];
|
||||
int i,j,c;
|
||||
TITEM *s;
|
||||
|
||||
memset(tridy,0,sizeof(tridy));
|
||||
for(i=0,s=sr;i<count;i++,s++) tridy[s->druh][isweapon(s->druh)?s->typ_zbrane:0]++;
|
||||
c=0;
|
||||
for(i=0;i<30;i++)
|
||||
for(j=0;j<20;j++)
|
||||
{
|
||||
register int d;
|
||||
d=tridy[i][j];
|
||||
tridy[i][j]=c;
|
||||
c+=d;
|
||||
}
|
||||
for(i=0,s=sr;i<count;i++,s++)
|
||||
{
|
||||
int c=tridy[s->druh][isweapon(s->druh)?s->typ_zbrane:0]++;
|
||||
tg[c]=*s;
|
||||
idnums[c]=i;
|
||||
}
|
||||
}
|
||||
|
||||
void print_list()
|
||||
{
|
||||
int i;
|
||||
TITEM *t;
|
||||
|
||||
if (!pagelen) print_head();
|
||||
if (!grp_sort)
|
||||
{
|
||||
for(i=0,t=itlist;i<item_count;i++,t++)
|
||||
{
|
||||
endpage(i);
|
||||
print_polozka(i,t);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
TITEM *list;
|
||||
int *nums;
|
||||
list=(TITEM *)malloc(sizeof(TITEM)*item_count);
|
||||
nums=(int *)malloc(sizeof(int)*item_count);
|
||||
counting_sort(itlist,list,item_count,nums);
|
||||
for(i=0,t=list;i<item_count;i++,t++)
|
||||
{
|
||||
endpage(i);
|
||||
print_polozka(nums[i],t);
|
||||
}
|
||||
free(list);
|
||||
free(nums);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma aux setmode modify [eax]=\
|
||||
"mov eax,55h"\
|
||||
"int 10h"
|
||||
void setmode();
|
||||
|
||||
void help()
|
||||
{
|
||||
puts("\nUsage: ITEMLIST ATSUZPHGNMC* [pagelen]\n"
|
||||
"\n"
|
||||
"A - jmeno veci\n"
|
||||
"C - cena\n"
|
||||
"H - hmotnost\n"
|
||||
"N - ID cislo\n"
|
||||
"P - popis\n"
|
||||
"S - prirazeni zvuku\n"
|
||||
"T - typ veci\n"
|
||||
"U - umisteni\n"
|
||||
"Z - typ zbrane\n"
|
||||
"* - Vsechny udaje, odpovida zapisu: ACHNPSTUZ\n"
|
||||
"\n"
|
||||
"G - Setridi vypis do trid\n"
|
||||
"M - Nastavi rezim 132x25zn pro vypis\n"
|
||||
"\n"
|
||||
"Pagelen - Delka stranky v radkach (min 3), default 0\n"
|
||||
"\n"
|
||||
"Zapis bez parametru je ekvivaletni zapisu NATS");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
void arguments(char *arg)
|
||||
{
|
||||
if (!*arg)
|
||||
{
|
||||
pr_number=1;
|
||||
pr_name=1;
|
||||
pr_type=1;
|
||||
pr_sound=1;
|
||||
puts("Parametry: NATS");
|
||||
puts("Pouzij ITEMLIST ? pro napovedu\n");
|
||||
}
|
||||
else
|
||||
while (*arg)
|
||||
switch(toupper(*arg++))
|
||||
{
|
||||
case 'A': pr_name=1;break;
|
||||
case 'T': pr_type=1;break;
|
||||
case 'S': pr_sound=1;break;
|
||||
case 'U': pr_umist=1;break;
|
||||
case 'Z': pr_zbran=1;break;
|
||||
case 'P': pr_popis=1;break;
|
||||
case 'H': pr_hmotn=1;break;
|
||||
case 'G': grp_sort=1;break;
|
||||
case 'N': pr_number=1;break;
|
||||
case 'M': setmode();break;
|
||||
case 'C': pr_cena=1;break;
|
||||
case '*': pr_name=pr_type=pr_sound=pr_umist=pr_zbran=pr_popis=pr_hmotn=pr_number=pr_cena=1;break;
|
||||
case '0':
|
||||
case '1':
|
||||
case '2':
|
||||
case '3':
|
||||
case '4':
|
||||
case '5':
|
||||
case '6':
|
||||
case '7':
|
||||
case '8':
|
||||
case '9':arg--;
|
||||
sscanf(arg,"%d",&pagelen);
|
||||
pagelen-=2;
|
||||
if (pagelen<1) pagelen=0;
|
||||
return;
|
||||
default: help();
|
||||
}
|
||||
}
|
||||
|
||||
main(int argc,char **argv)
|
||||
{
|
||||
int i;
|
||||
if (argc<2)arguments("");
|
||||
else
|
||||
for(i=1;i<argc;i++) arguments(argv[i]);
|
||||
load_items_dat("items.dat");
|
||||
print_list();
|
||||
}
|
73
UTILS/Podlahar/Podlahar.cpp
Normal file
73
UTILS/Podlahar/Podlahar.cpp
Normal file
|
@ -0,0 +1,73 @@
|
|||
// Podlahar.cpp : Defines the class behaviors for the application.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "Podlahar.h"
|
||||
#include "PodlaharDlg.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#endif
|
||||
|
||||
|
||||
// CPodlaharApp
|
||||
|
||||
BEGIN_MESSAGE_MAP(CPodlaharApp, CWinApp)
|
||||
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// CPodlaharApp construction
|
||||
|
||||
CPodlaharApp::CPodlaharApp()
|
||||
{
|
||||
// TODO: add construction code here,
|
||||
// Place all significant initialization in InitInstance
|
||||
}
|
||||
|
||||
|
||||
// The one and only CPodlaharApp object
|
||||
|
||||
CPodlaharApp theApp;
|
||||
|
||||
|
||||
// CPodlaharApp initialization
|
||||
|
||||
BOOL CPodlaharApp::InitInstance()
|
||||
{
|
||||
// InitCommonControls() is required on Windows XP if an application
|
||||
// manifest specifies use of ComCtl32.dll version 6 or later to enable
|
||||
// visual styles. Otherwise, any window creation will fail.
|
||||
InitCommonControls();
|
||||
|
||||
CWinApp::InitInstance();
|
||||
|
||||
AfxEnableControlContainer();
|
||||
|
||||
// Standard initialization
|
||||
// If you are not using these features and wish to reduce the size
|
||||
// of your final executable, you should remove from the following
|
||||
// the specific initialization routines you do not need
|
||||
// Change the registry key under which our settings are stored
|
||||
// TODO: You should modify this string to be something appropriate
|
||||
// such as the name of your company or organization
|
||||
SetRegistryKey(_T("Local AppWizard-Generated Applications"));
|
||||
|
||||
CPodlaharDlg dlg;
|
||||
m_pMainWnd = &dlg;
|
||||
INT_PTR nResponse = dlg.DoModal();
|
||||
if (nResponse == IDOK)
|
||||
{
|
||||
// TODO: Place code here to handle when the dialog is
|
||||
// dismissed with OK
|
||||
}
|
||||
else if (nResponse == IDCANCEL)
|
||||
{
|
||||
// TODO: Place code here to handle when the dialog is
|
||||
// dismissed with Cancel
|
||||
}
|
||||
|
||||
// Since the dialog has been closed, return FALSE so that we exit the
|
||||
// application, rather than start the application's message pump.
|
||||
return FALSE;
|
||||
}
|
31
UTILS/Podlahar/Podlahar.h
Normal file
31
UTILS/Podlahar/Podlahar.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
// Podlahar.h : main header file for the PROJECT_NAME application
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __AFXWIN_H__
|
||||
#error include 'stdafx.h' before including this file for PCH
|
||||
#endif
|
||||
|
||||
#include "resource.h" // main symbols
|
||||
|
||||
|
||||
// CPodlaharApp:
|
||||
// See Podlahar.cpp for the implementation of this class
|
||||
//
|
||||
|
||||
class CPodlaharApp : public CWinApp
|
||||
{
|
||||
public:
|
||||
CPodlaharApp();
|
||||
|
||||
// Overrides
|
||||
public:
|
||||
virtual BOOL InitInstance();
|
||||
|
||||
// Implementation
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
extern CPodlaharApp theApp;
|
200
UTILS/Podlahar/Podlahar.rc
Normal file
200
UTILS/Podlahar/Podlahar.rc
Normal file
|
@ -0,0 +1,200 @@
|
|||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_OLE_RESOURCES\r\n"
|
||||
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
|
||||
"\r\n"
|
||||
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
|
||||
"LANGUAGE 9, 1\r\n"
|
||||
"#pragma code_page(1252)\r\n"
|
||||
"#include ""res\\Podlahar.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
|
||||
"#include ""afxres.rc"" // Standard components\r\n"
|
||||
"#endif\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDR_MAINFRAME ICON "res\\Podlahar.ico"
|
||||
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
LANGUAGE 9, 1
|
||||
#pragma code_page(1252)
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_ABOUTBOX DIALOGEX 0, 0, 235, 55
|
||||
STYLE DS_MODALFRAME | DS_SHELLFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "About Podlahar"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20
|
||||
LTEXT "Podlahar Version 1.0",IDC_STATIC,40,10,119,8,
|
||||
SS_NOPREFIX
|
||||
LTEXT "Copyright (C) 2005",IDC_STATIC,40,25,119,8
|
||||
DEFPUSHBUTTON "OK",IDOK,178,7, 50,16,WS_GROUP
|
||||
END
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// HTML
|
||||
//
|
||||
|
||||
IDR_HTML_PODLAHAR_DIALOG HTML "Podlahar.htm"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
IDD_PODLAHAR_DIALOG DIALOGEX 0, 0, 320, 200
|
||||
STYLE DS_SHELLFONT | WS_POPUP | WS_VISIBLE | WS_CAPTION
|
||||
| DS_MODALFRAME
|
||||
| WS_SYSMENU
|
||||
EXSTYLE WS_EX_APPWINDOW
|
||||
CAPTION "Podlahar"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
END
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,0,0,1
|
||||
PRODUCTVERSION 1,0,0,1
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904e4"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "TODO: <Company name>"
|
||||
VALUE "FileDescription", "TODO: <File description>"
|
||||
VALUE "FileVersion", "1.0.0.1"
|
||||
VALUE "InternalName", "Podlahar.exe"
|
||||
VALUE "LegalCopyright", "TODO: (c) <Company name>. All rights reserved."
|
||||
VALUE "OriginalFilename","Podlahar.exe"
|
||||
VALUE "ProductName", "TODO: <Product name>"
|
||||
VALUE "ProductVersion", "1.0.0.1"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x0409, 1252
|
||||
END
|
||||
END
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_ABOUTBOX, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 228
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 48
|
||||
END
|
||||
IDD_PODLAHAR_DIALOG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 313
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 193
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_ABOUTBOX "&About Podlahar..."
|
||||
END
|
||||
|
||||
|
||||
#endif
|
||||
#ifdef _UNICODE
|
||||
IDR_MANIFEST RT_MANIFEST "res\\Podlahar.manifest"
|
||||
#endif
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
#define _AFX_NO_SPLITTER_RESOURCES
|
||||
#define _AFX_NO_OLE_RESOURCES
|
||||
#define _AFX_NO_TRACKER_RESOURCES
|
||||
#define _AFX_NO_PROPERTY_RESOURCES
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
LANGUAGE 9, 1
|
||||
#pragma code_page(1252)
|
||||
#include "res\\Podlahar.rc2" // non-Microsoft Visual C++ edited resources
|
||||
#include "afxres.rc" // Standard components
|
||||
#endif
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
193
UTILS/Podlahar/Podlahar.vcproj
Normal file
193
UTILS/Podlahar/Podlahar.vcproj
Normal file
|
@ -0,0 +1,193 @@
|
|||
<?xml version="1.0" encoding="windows-1250"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="Podlahar"
|
||||
ProjectGUID="{2599382B-023F-453B-87FC-984BE9EA1B95}"
|
||||
Keyword="MFCProj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="2"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
TreatWChar_tAsBuiltInType="TRUE"
|
||||
UsePrecompiledHeader="3"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="4"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="FALSE"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories="$(IntDir)"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="2"
|
||||
CharacterSet="2">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG"
|
||||
MinimalRebuild="FALSE"
|
||||
RuntimeLibrary="2"
|
||||
TreatWChar_tAsBuiltInType="TRUE"
|
||||
UsePrecompiledHeader="3"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="TRUE"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="TRUE"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="FALSE"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories="$(IntDir)"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath=".\Podlahar.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\PodlaharDlg.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\stdafx.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
<File
|
||||
RelativePath=".\Podlahar.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\PodlaharDlg.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Resource.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\stdafx.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
|
||||
<File
|
||||
RelativePath=".\res\Podlahar.ico">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Podlahar.rc">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\res\Podlahar.rc2">
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\Podlahar.htm"
|
||||
DeploymentContent="TRUE">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\res\Podlahar.manifest">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ReadMe.txt">
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
161
UTILS/Podlahar/PodlaharDlg.cpp
Normal file
161
UTILS/Podlahar/PodlaharDlg.cpp
Normal file
|
@ -0,0 +1,161 @@
|
|||
// PodlaharDlg.cpp : implementation file
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "Podlahar.h"
|
||||
#include "PodlaharDlg.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#endif
|
||||
|
||||
|
||||
// CAboutDlg dialog used for App About
|
||||
|
||||
class CAboutDlg : public CDialog
|
||||
{
|
||||
public:
|
||||
CAboutDlg();
|
||||
|
||||
// Dialog Data
|
||||
enum { IDD = IDD_ABOUTBOX };
|
||||
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
|
||||
{
|
||||
}
|
||||
|
||||
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
}
|
||||
|
||||
BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// CPodlaharDlg dialog
|
||||
|
||||
BEGIN_DHTML_EVENT_MAP(CPodlaharDlg)
|
||||
DHTML_EVENT_ONCLICK(_T("ButtonOK"), OnButtonOK)
|
||||
DHTML_EVENT_ONCLICK(_T("ButtonCancel"), OnButtonCancel)
|
||||
END_DHTML_EVENT_MAP()
|
||||
|
||||
|
||||
CPodlaharDlg::CPodlaharDlg(CWnd* pParent /*=NULL*/)
|
||||
: CDHtmlDialog(CPodlaharDlg::IDD, CPodlaharDlg::IDH, pParent)
|
||||
{
|
||||
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
|
||||
}
|
||||
|
||||
void CPodlaharDlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDHtmlDialog::DoDataExchange(pDX);
|
||||
}
|
||||
|
||||
BEGIN_MESSAGE_MAP(CPodlaharDlg, CDHtmlDialog)
|
||||
ON_WM_SYSCOMMAND()
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// CPodlaharDlg message handlers
|
||||
|
||||
BOOL CPodlaharDlg::OnInitDialog()
|
||||
{
|
||||
CDHtmlDialog::OnInitDialog();
|
||||
|
||||
// Add "About..." menu item to system menu.
|
||||
|
||||
// IDM_ABOUTBOX must be in the system command range.
|
||||
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
|
||||
ASSERT(IDM_ABOUTBOX < 0xF000);
|
||||
|
||||
CMenu* pSysMenu = GetSystemMenu(FALSE);
|
||||
if (pSysMenu != NULL)
|
||||
{
|
||||
CString strAboutMenu;
|
||||
strAboutMenu.LoadString(IDS_ABOUTBOX);
|
||||
if (!strAboutMenu.IsEmpty())
|
||||
{
|
||||
pSysMenu->AppendMenu(MF_SEPARATOR);
|
||||
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
|
||||
}
|
||||
}
|
||||
|
||||
// Set the icon for this dialog. The framework does this automatically
|
||||
// when the application's main window is not a dialog
|
||||
SetIcon(m_hIcon, TRUE); // Set big icon
|
||||
SetIcon(m_hIcon, FALSE); // Set small icon
|
||||
|
||||
// TODO: Add extra initialization here
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
}
|
||||
|
||||
void CPodlaharDlg::OnSysCommand(UINT nID, LPARAM lParam)
|
||||
{
|
||||
if ((nID & 0xFFF0) == IDM_ABOUTBOX)
|
||||
{
|
||||
CAboutDlg dlgAbout;
|
||||
dlgAbout.DoModal();
|
||||
}
|
||||
else
|
||||
{
|
||||
CDHtmlDialog::OnSysCommand(nID, lParam);
|
||||
}
|
||||
}
|
||||
|
||||
// If you add a minimize button to your dialog, you will need the code below
|
||||
// to draw the icon. For MFC applications using the document/view model,
|
||||
// this is automatically done for you by the framework.
|
||||
|
||||
void CPodlaharDlg::OnPaint()
|
||||
{
|
||||
if (IsIconic())
|
||||
{
|
||||
CPaintDC dc(this); // device context for painting
|
||||
|
||||
SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0);
|
||||
|
||||
// Center icon in client rectangle
|
||||
int cxIcon = GetSystemMetrics(SM_CXICON);
|
||||
int cyIcon = GetSystemMetrics(SM_CYICON);
|
||||
CRect rect;
|
||||
GetClientRect(&rect);
|
||||
int x = (rect.Width() - cxIcon + 1) / 2;
|
||||
int y = (rect.Height() - cyIcon + 1) / 2;
|
||||
|
||||
// Draw the icon
|
||||
dc.DrawIcon(x, y, m_hIcon);
|
||||
}
|
||||
else
|
||||
{
|
||||
CDHtmlDialog::OnPaint();
|
||||
}
|
||||
}
|
||||
|
||||
// The system calls this function to obtain the cursor to display while the user drags
|
||||
// the minimized window.
|
||||
HCURSOR CPodlaharDlg::OnQueryDragIcon()
|
||||
{
|
||||
return static_cast<HCURSOR>(m_hIcon);
|
||||
}
|
||||
HRESULT CPodlaharDlg::OnButtonOK(IHTMLElement* /*pElement*/)
|
||||
{
|
||||
OnOK();
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CPodlaharDlg::OnButtonCancel(IHTMLElement* /*pElement*/)
|
||||
{
|
||||
OnCancel();
|
||||
return S_OK;
|
||||
}
|
34
UTILS/Podlahar/PodlaharDlg.h
Normal file
34
UTILS/Podlahar/PodlaharDlg.h
Normal file
|
@ -0,0 +1,34 @@
|
|||
// PodlaharDlg.h : header file
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
// CPodlaharDlg dialog
|
||||
class CPodlaharDlg : public CDHtmlDialog
|
||||
{
|
||||
// Construction
|
||||
public:
|
||||
CPodlaharDlg(CWnd* pParent = NULL); // standard constructor
|
||||
|
||||
// Dialog Data
|
||||
enum { IDD = IDD_PODLAHAR_DIALOG, IDH = IDR_HTML_PODLAHAR_DIALOG };
|
||||
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
||||
|
||||
HRESULT OnButtonOK(IHTMLElement *pElement);
|
||||
HRESULT OnButtonCancel(IHTMLElement *pElement);
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
HICON m_hIcon;
|
||||
|
||||
// Generated message map functions
|
||||
virtual BOOL OnInitDialog();
|
||||
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
|
||||
afx_msg void OnPaint();
|
||||
afx_msg HCURSOR OnQueryDragIcon();
|
||||
DECLARE_MESSAGE_MAP()
|
||||
DECLARE_DHTML_EVENT_MAP()
|
||||
};
|
23
UTILS/Podlahar/Resource.h
Normal file
23
UTILS/Podlahar/Resource.h
Normal file
|
@ -0,0 +1,23 @@
|
|||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by Podlahar.RC
|
||||
//
|
||||
#define IDR_MAINFRAME 128
|
||||
#define IDM_ABOUTBOX 0x0010
|
||||
#define IDD_ABOUTBOX 100
|
||||
#define IDS_ABOUTBOX 101
|
||||
#define IDD_PODLAHAR_DIALOG 102
|
||||
#define IDR_HTML_PODLAHAR_DIALOG 104
|
||||
#define IDR_MANIFEST CREATEPROCESS_MANIFEST_RESOURCE_ID
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
#define _APS_NEXT_RESOURCE_VALUE 129
|
||||
#define _APS_NEXT_CONTROL_VALUE 1000
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||
#endif
|
||||
#endif
|
BIN
UTILS/Podlahar/res/Podlahar.ico
Normal file
BIN
UTILS/Podlahar/res/Podlahar.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
13
UTILS/Podlahar/res/Podlahar.rc2
Normal file
13
UTILS/Podlahar/res/Podlahar.rc2
Normal file
|
@ -0,0 +1,13 @@
|
|||
//
|
||||
// Podlahar.RC2 - resources Microsoft Visual C++ does not edit directly
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#error this file is not editable by Microsoft Visual C++
|
||||
#endif //APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Add manually edited resources here...
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
7
UTILS/Podlahar/stdafx.cpp
Normal file
7
UTILS/Podlahar/stdafx.cpp
Normal file
|
@ -0,0 +1,7 @@
|
|||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// Podlahar.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
|
43
UTILS/Podlahar/stdafx.h
Normal file
43
UTILS/Podlahar/stdafx.h
Normal file
|
@ -0,0 +1,43 @@
|
|||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently,
|
||||
// but are changed infrequently
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef VC_EXTRALEAN
|
||||
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
|
||||
#endif
|
||||
|
||||
// Modify the following defines if you have to target a platform prior to the ones specified below.
|
||||
// Refer to MSDN for the latest info on corresponding values for different platforms.
|
||||
#ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4 or later.
|
||||
#define WINVER 0x0400 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINNT // Allow use of features specific to Windows NT 4 or later.
|
||||
#define _WIN32_WINNT 0x0400 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
|
||||
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_IE // Allow use of features specific to IE 4.0 or later.
|
||||
#define _WIN32_IE 0x0400 // Change this to the appropriate value to target IE 5.0 or later.
|
||||
#endif
|
||||
|
||||
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit
|
||||
|
||||
// turns off MFC's hiding of some common and often safely ignored warning messages
|
||||
#define _AFX_ALL_WARNINGS
|
||||
|
||||
#include <afxwin.h> // MFC core and standard components
|
||||
#include <afxext.h> // MFC extensions
|
||||
#include <afxdisp.h> // MFC Automation classes
|
||||
|
||||
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
|
||||
#ifndef _AFX_NO_AFXCMN_SUPPORT
|
||||
#include <afxcmn.h> // MFC support for Windows Common Controls
|
||||
#endif // _AFX_NO_AFXCMN_SUPPORT
|
||||
|
||||
#include <afxdhtml.h> // HTML Dialogs
|
Loading…
Add table
Add a link
Reference in a new issue