* deleted some old obsoelete files
* fixed problems with afxres.h in resources, thx to bLuma
This commit is contained in:
parent
e9946c4330
commit
3cba5a1e83
@ -1,23 +1,12 @@
|
|||||||
// Microsoft Visual C++ generated resource script.
|
// Microsoft Visual C++ generated resource script.
|
||||||
//
|
//
|
||||||
#include "resource1.h"
|
#include "resource.h"
|
||||||
|
|
||||||
#define APSTUDIO_READONLY_SYMBOLS
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Generated from the TEXTINCLUDE 2 resource.
|
|
||||||
//
|
|
||||||
#include "afxres.h"
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
#undef APSTUDIO_READONLY_SYMBOLS
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// German (Germany) resources
|
// German (Germany) resources
|
||||||
|
|
||||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
|
|
||||||
#pragma code_page(1252)
|
#pragma code_page(1252)
|
||||||
#endif //_WIN32
|
#endif //_WIN32
|
||||||
|
|
||||||
@ -38,7 +27,6 @@ IDI_ICON1 ICON "Pseu1.ico"
|
|||||||
|
|
||||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
|
||||||
#pragma code_page(1252)
|
#pragma code_page(1252)
|
||||||
#endif //_WIN32
|
#endif //_WIN32
|
||||||
|
|
||||||
@ -50,12 +38,11 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
|||||||
|
|
||||||
1 TEXTINCLUDE
|
1 TEXTINCLUDE
|
||||||
BEGIN
|
BEGIN
|
||||||
"resource1.h\0"
|
"resource.h\0"
|
||||||
END
|
END
|
||||||
|
|
||||||
2 TEXTINCLUDE
|
2 TEXTINCLUDE
|
||||||
BEGIN
|
BEGIN
|
||||||
"#include ""afxres.h""\r\n"
|
|
||||||
"\0"
|
"\0"
|
||||||
END
|
END
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
//{{NO_DEPENDENCIES}}
|
//{{NO_DEPENDENCIES}}
|
||||||
// Microsoft Developer Studio generated include file.
|
// Microsoft Visual C++ generated include file.
|
||||||
// Used by Script1.rc
|
// Used by PseuWoW.rc
|
||||||
//
|
//
|
||||||
#define IDI_ICON1 101
|
#define IDI_ICON1 101
|
||||||
|
|
||||||
@ -8,9 +8,9 @@
|
|||||||
//
|
//
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 104
|
#define _APS_NEXT_RESOURCE_VALUE 102
|
||||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1000
|
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||||
#define _APS_NEXT_SYMED_VALUE 101
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -1,158 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
|
||||||
<VisualStudioProject
|
|
||||||
ProjectType="Visual C++"
|
|
||||||
Version="7.10"
|
|
||||||
Name="PseuWoW_Controller"
|
|
||||||
RootNamespace="PseuWoW_Controller"
|
|
||||||
SccProjectName=""
|
|
||||||
SccLocalPath="">
|
|
||||||
<Platforms>
|
|
||||||
<Platform
|
|
||||||
Name="Win32"/>
|
|
||||||
</Platforms>
|
|
||||||
<Configurations>
|
|
||||||
<Configuration
|
|
||||||
Name="Debug|Win32"
|
|
||||||
OutputDirectory="$(SolutionDir)/bin"
|
|
||||||
IntermediateDirectory="$(SolutionDir)/temp/$(ProjectName)"
|
|
||||||
ConfigurationType="1"
|
|
||||||
UseOfMFC="0"
|
|
||||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
|
||||||
CharacterSet="2">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
RuntimeLibrary="2"
|
|
||||||
PrecompiledHeaderFile=".\Debug/PseuWoW_Controller.pch"
|
|
||||||
AssemblerListingLocation=".\Debug/"
|
|
||||||
ObjectFile=".\Debug/"
|
|
||||||
ProgramDataBaseFileName=".\Debug/"
|
|
||||||
WarningLevel="3"
|
|
||||||
SuppressStartupBanner="TRUE"
|
|
||||||
DebugInformationFormat="4"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
AdditionalDependencies="odbc32.lib odbccp32.lib sdl.lib sdl_net.lib sdlmain.lib"
|
|
||||||
OutputFile="$(OutDir)/$(InputName).exe"
|
|
||||||
LinkIncremental="1"
|
|
||||||
SuppressStartupBanner="TRUE"
|
|
||||||
GenerateDebugInformation="TRUE"
|
|
||||||
ProgramDatabaseFile=".\Debug/PseuWoW_Controller.pdb"
|
|
||||||
SubSystem="1"
|
|
||||||
TargetMachine="1"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
TypeLibraryName=".\Debug/PseuWoW_Controller.tlb"
|
|
||||||
HeaderFileName=""/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"
|
|
||||||
PreprocessorDefinitions="_DEBUG"
|
|
||||||
Culture="1031"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebDeploymentTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration
|
|
||||||
Name="Release|Win32"
|
|
||||||
OutputDirectory="$(SolutionDir)/bin"
|
|
||||||
IntermediateDirectory="$(SolutionDir)/temp/$(ProjectName)"
|
|
||||||
ConfigurationType="1"
|
|
||||||
UseOfMFC="0"
|
|
||||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
|
||||||
CharacterSet="2">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="1"
|
|
||||||
InlineFunctionExpansion="1"
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
|
|
||||||
StringPooling="TRUE"
|
|
||||||
RuntimeLibrary="2"
|
|
||||||
EnableFunctionLevelLinking="TRUE"
|
|
||||||
PrecompiledHeaderFile=".\Release/PseuWoW_Controller.pch"
|
|
||||||
AssemblerListingLocation=".\Release/"
|
|
||||||
ObjectFile=".\Release/"
|
|
||||||
ProgramDataBaseFileName=".\Release/"
|
|
||||||
WarningLevel="3"
|
|
||||||
SuppressStartupBanner="TRUE"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLinkerTool"
|
|
||||||
AdditionalDependencies="odbc32.lib odbccp32.lib sdl.lib sdl_net.lib sdlmain.lib"
|
|
||||||
OutputFile="$(OutDir)/$(InputName).exe"
|
|
||||||
LinkIncremental="2"
|
|
||||||
SuppressStartupBanner="TRUE"
|
|
||||||
ProgramDatabaseFile=".\Release/PseuWoW_Controller.pdb"
|
|
||||||
SubSystem="1"
|
|
||||||
TargetMachine="1"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"
|
|
||||||
TypeLibraryName=".\Release/PseuWoW_Controller.tlb"
|
|
||||||
HeaderFileName=""/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"
|
|
||||||
PreprocessorDefinitions="NDEBUG"
|
|
||||||
Culture="1031"/>
|
|
||||||
<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;rc;def;r;odl;idl;hpj;bat">
|
|
||||||
<File
|
|
||||||
RelativePath=".\Controller\Controller.cpp">
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="Header Files"
|
|
||||||
Filter="h;hpp;hxx;hm;inl">
|
|
||||||
<File
|
|
||||||
RelativePath=".\shared\controllercodes.h">
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="Resource Files"
|
|
||||||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
|
|
||||||
</Filter>
|
|
||||||
<File
|
|
||||||
RelativePath="ReadMe.txt">
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Globals>
|
|
||||||
</Globals>
|
|
||||||
</VisualStudioProject>
|
|
||||||
@ -1,319 +0,0 @@
|
|||||||
// PseuWoW_Controller.cpp : Defines the entry point for the console application.
|
|
||||||
//
|
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
#include <string>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include <SDL/SDL.h>
|
|
||||||
#include <SDL/SDL_net.h>
|
|
||||||
#include <SDL/SDL_thread.h>
|
|
||||||
|
|
||||||
#include "../shared/controllercodes.h"
|
|
||||||
|
|
||||||
#define gets(c) Gets(c)
|
|
||||||
|
|
||||||
#define MAXLEN 1024
|
|
||||||
|
|
||||||
bool DEBUG=true;
|
|
||||||
|
|
||||||
char *ver="PseuWoW Controlling Unit Build 1";
|
|
||||||
int error=0,port=10024;
|
|
||||||
SDL_Thread *connect_thread,*recieve_thread,*cmdhandler_thread,*quitproc_thread,*input_thread;
|
|
||||||
char *hostname="localhost";
|
|
||||||
bool ready=false,connected=false,authenticated=false,nopassword=true,quit=false,waitforinput;
|
|
||||||
TCPsocket tcpsock;
|
|
||||||
char *incomingtext;
|
|
||||||
unsigned char incomingcmd;
|
|
||||||
char *password,*outgoingtext;
|
|
||||||
char *remotever;
|
|
||||||
|
|
||||||
/////////// predeclare functions /////////////////////////
|
|
||||||
int connect(void *p);
|
|
||||||
void closeconnection(bool);
|
|
||||||
void quitproc(void);
|
|
||||||
int tquitproc(void *p);
|
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////
|
|
||||||
|
|
||||||
void Gets(char *z,int m) {
|
|
||||||
int ch;
|
|
||||||
int counter=0;
|
|
||||||
while((ch=getchar()) != '\n') {
|
|
||||||
z[counter++]=ch;
|
|
||||||
if(counter >= m)break;
|
|
||||||
if(quit){printf("Q: returning from input.");return;}
|
|
||||||
}
|
|
||||||
z[counter] = '\0'; /* Terminieren */
|
|
||||||
}
|
|
||||||
|
|
||||||
char *triml(char *data,int count){
|
|
||||||
data=data+count;
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool readconf(void){
|
|
||||||
|
|
||||||
// read the shit, then set nopassword=false :)
|
|
||||||
return 0; //error
|
|
||||||
}
|
|
||||||
|
|
||||||
void send(char code, char* sm_message="()"){
|
|
||||||
if(quit)return;
|
|
||||||
if(tcpsock==NULL){printf("ERROR: Tried to send data over a cloed socket!\n"); return;}
|
|
||||||
int sm_result;
|
|
||||||
char *packet=(char*)malloc(1024);
|
|
||||||
sprintf(packet,"%c%s",code,sm_message);
|
|
||||||
int len = strlen(packet) + 1; // add one for the terminating NULL
|
|
||||||
sm_result = SDLNet_TCP_Send(tcpsock,packet,len);
|
|
||||||
if( sm_result < len ) {
|
|
||||||
printf( "SDLNet_TCP_Send: %s\n", SDLNet_GetError() );
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
//printf("out: %i, %s\n",code,sm_message);
|
|
||||||
}
|
|
||||||
free(packet);
|
|
||||||
}
|
|
||||||
|
|
||||||
int recieve(void *p) {
|
|
||||||
int result;
|
|
||||||
char msg[MAXLEN];
|
|
||||||
while(connected) {
|
|
||||||
//printf("recieve: Waiting for incoming data...\n");
|
|
||||||
result = SDLNet_TCP_Recv(tcpsock,msg,MAXLEN);
|
|
||||||
if(result <= 0) {
|
|
||||||
// TCP Connection is broken. (because of error or closure)
|
|
||||||
//closeconnection(false);
|
|
||||||
|
|
||||||
quitproc_thread=SDL_CreateThread(tquitproc,NULL);
|
|
||||||
} else {
|
|
||||||
msg[result] = 0;
|
|
||||||
|
|
||||||
incomingcmd=msg[0];
|
|
||||||
incomingtext=triml(msg,1);
|
|
||||||
//printf("in: %i, %s\n",incomingcmd,incomingtext);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(DEBUG)printf("Reciever lost the connection, thread exited.\n");
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int connect(void *p){
|
|
||||||
if(quit)return 0;
|
|
||||||
IPaddress ip;
|
|
||||||
while(SDLNet_ResolveHost(&ip,hostname,port)==-1)SDL_Delay(100);
|
|
||||||
printf("Waiting for connection...\n");
|
|
||||||
while(tcpsock==NULL){
|
|
||||||
tcpsock=SDLNet_TCP_Open(&ip);
|
|
||||||
//SDL_Delay(100);
|
|
||||||
}
|
|
||||||
connected=true;
|
|
||||||
if(DEBUG)printf("Connection established.\n");
|
|
||||||
recieve_thread=SDL_CreateThread(recieve,NULL);
|
|
||||||
send(_REQUESTCONNECTION,ver);
|
|
||||||
if(DEBUG)printf("Thread exited: Connector\n");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void closeconnection(bool reconnect){
|
|
||||||
if(DEBUG)printf("Closing connections. Reconnect=%i\n",reconnect);
|
|
||||||
SDL_KillThread(recieve_thread);
|
|
||||||
SDLNet_TCP_Close(tcpsock);
|
|
||||||
tcpsock=NULL;
|
|
||||||
connected=false;
|
|
||||||
authenticated=false;
|
|
||||||
if(reconnect){
|
|
||||||
connect_thread=SDL_CreateThread(connect,NULL);
|
|
||||||
if(DEBUG)printf("Thread restarted: Connector\n");
|
|
||||||
}
|
|
||||||
// more to come
|
|
||||||
}
|
|
||||||
|
|
||||||
int tquitproc(void *p){
|
|
||||||
exit(0);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void quitproc(void){
|
|
||||||
static bool quitted;
|
|
||||||
if(quitted) return;
|
|
||||||
quitted=true;
|
|
||||||
printf("Quitting...\n");
|
|
||||||
quit=true;
|
|
||||||
SDL_KillThread(input_thread);
|
|
||||||
|
|
||||||
if(DEBUG)printf("Closing Connection\n");
|
|
||||||
closeconnection(false);
|
|
||||||
|
|
||||||
|
|
||||||
printf("End.\n");
|
|
||||||
|
|
||||||
//SDL_Delay(100);
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void forceclose(void){
|
|
||||||
//if(connected) disconnect();
|
|
||||||
quitproc();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int cmdhandler(void *p){
|
|
||||||
while(true){
|
|
||||||
if (incomingcmd!=_NODATA){
|
|
||||||
switch(incomingcmd){
|
|
||||||
//case _SENDTEXT:printf("%s\n",incomingtext);break; //bugged somehow
|
|
||||||
case _PASSWORDOK:{printf("%s has accepted the connection.\n",remotever);authenticated=true;}break;
|
|
||||||
case _PASSWORDWRONG:{printf("%s has rejected the connection, exiting...\n",remotever);SDL_Delay(2000);quitproc();}break;
|
|
||||||
//case _DISCONNECT:{printf("Got disconnected from the remote side!\n");closeconnection(false);}break; // no longer needed
|
|
||||||
case _REQUESTPASSWORD:
|
|
||||||
strcpy(remotever,incomingtext);
|
|
||||||
printf("%s requests a password.\n",remotever);
|
|
||||||
if (nopassword){
|
|
||||||
printf("Enter Password, max. 32 chars: ");
|
|
||||||
Gets(password,32);
|
|
||||||
}
|
|
||||||
send(_SENDPASSWORD,password);
|
|
||||||
printf("Password sent, waiting for answer...\n");
|
|
||||||
break;
|
|
||||||
case _RECIEVEDANDREADY:{printf("%s\n",incomingtext);ready=true;}break;
|
|
||||||
case _RECIEVEDBUTUNKNOWN:{printf("The opcode was not recognized by the remote side.\n");ready=true;}break;
|
|
||||||
case _UNKNOWNCOMMAND:{printf("Unknown command.\n");ready=true;}break;
|
|
||||||
case _BADCOMMAND:{printf("Bad command: %s\n",incomingtext);ready=true;}break;
|
|
||||||
default:{printf("Recieved unknown opcode!\n");}break;
|
|
||||||
}
|
|
||||||
incomingcmd=_NODATA;
|
|
||||||
}
|
|
||||||
SDL_Delay(1);
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool initproc(void){
|
|
||||||
printf("%s\n",ver);
|
|
||||||
if(DEBUG)printf("Allocating buffer memory...\n");
|
|
||||||
|
|
||||||
incomingtext=(char*)malloc(1024);
|
|
||||||
outgoingtext=(char*)malloc(1024);
|
|
||||||
password=(char*)malloc(32);
|
|
||||||
remotever=(char*)malloc(128);
|
|
||||||
// more malloc...
|
|
||||||
|
|
||||||
printf("Reading Config file... ");
|
|
||||||
if (readconf()) printf("done.\n"); else {
|
|
||||||
printf("error!\n");
|
|
||||||
//printf("Enter Password, max. 32 chars: ");
|
|
||||||
//scanf("%s",&password);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(DEBUG)printf("Initializing SDL...\n");
|
|
||||||
if(SDL_Init(0)==-1) {
|
|
||||||
printf("SDL_Init: %s\n", SDL_GetError());
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(DEBUG)printf("Initializing SDL_Net...\n");
|
|
||||||
if(SDLNet_Init()==-1) {
|
|
||||||
printf("SDLNet_Init: %s\n", SDLNet_GetError());
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if(DEBUG)printf("Starting threads...\n");
|
|
||||||
|
|
||||||
connect_thread=SDL_CreateThread(connect,NULL);
|
|
||||||
if(DEBUG)printf("Thread started: Connector\n");
|
|
||||||
cmdhandler_thread=SDL_CreateThread(cmdhandler,NULL);
|
|
||||||
if(DEBUG)printf("Thread started: CmdHandler\n");
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
int waitfortimeout(void *p){
|
|
||||||
int timeout;
|
|
||||||
for (timeout=10000;timeout>0||!ready;timeout--){
|
|
||||||
SDL_Delay(1);
|
|
||||||
if(timeout%1000==0) printf(".");
|
|
||||||
}
|
|
||||||
if(!ready) closeconnection(); // still not ready? disconnect!
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
void showhelp(void){
|
|
||||||
printf("commands - displays a list of commands the remote side supports\n");
|
|
||||||
printf("ver - show version\n");
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IsLocalCommand(char *txt){
|
|
||||||
if(strcmp(outgoingtext,"help")==0){showhelp();return true;}
|
|
||||||
if(strcmp(outgoingtext,"ver")==0){printf("%s\n",ver);return true;}
|
|
||||||
if(strcmp(outgoingtext,"quit")==0||strcmp(outgoingtext,"exit")==0){quitproc();return true;}
|
|
||||||
if(strcmp(outgoingtext,"?")==0){showhelp();return true;}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
|
||||||
{
|
|
||||||
atexit(forceclose);
|
|
||||||
|
|
||||||
///! printf("%c",(char)_SAYHELLO);
|
|
||||||
if (!initproc()){
|
|
||||||
printf("Initialisation failed!\n");
|
|
||||||
return 1;
|
|
||||||
} else {
|
|
||||||
// more init...?
|
|
||||||
printf("Initialisation finished.\n");
|
|
||||||
while(!(authenticated&&connected)){
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SDL_Delay(1);
|
|
||||||
}
|
|
||||||
send(_RECIEVEDANDREADY);
|
|
||||||
printf("Authentication ok, opening console. You can enter commands now.\n");
|
|
||||||
printf("Type \"help\" for a short introduction\n");
|
|
||||||
while(true){
|
|
||||||
while(authenticated){
|
|
||||||
SDL_Delay(1);
|
|
||||||
|
|
||||||
if(ready){
|
|
||||||
printf("> ");
|
|
||||||
while(true){
|
|
||||||
/*if(!waitforinput){
|
|
||||||
SDL_CreateThread(tinput,NULL);
|
|
||||||
SDL_Delay(10);
|
|
||||||
while(waitforinput)SDL_Delay(1);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
Gets(outgoingtext,MAXLEN);
|
|
||||||
if(strlen(outgoingtext)<=0)printf("Maybe you want to enter something...?!\n> ");else break;
|
|
||||||
SDL_Delay(1);
|
|
||||||
}
|
|
||||||
if (!IsLocalCommand(outgoingtext)){send(_SENDCOMMAND,outgoingtext);ready=false;}
|
|
||||||
|
|
||||||
|
|
||||||
//SDL_CreateThread(waitfortimeout,NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
SDL_Delay(1);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@ -183,12 +183,6 @@
|
|||||||
<File
|
<File
|
||||||
RelativePath=".\Client\PseuWoW.h">
|
RelativePath=".\Client\PseuWoW.h">
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath=".\Client\PseuWoW.rc">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\Client\resource1.h">
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath=".\Client\SysDefs.h">
|
RelativePath=".\Client\SysDefs.h">
|
||||||
</File>
|
</File>
|
||||||
@ -350,7 +344,13 @@
|
|||||||
Name="Resource Files"
|
Name="Resource Files"
|
||||||
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
|
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
|
||||||
<File
|
<File
|
||||||
RelativePath=".\Pseu1.ico">
|
RelativePath=".\Client\Pseu1.ico">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\Client\PseuWoW.rc">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\Client\resource.h">
|
||||||
</File>
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
</Files>
|
</Files>
|
||||||
|
|||||||
@ -1,319 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="windows-1251"?>
|
|
||||||
<VisualStudioProject
|
|
||||||
ProjectType="Visual C++"
|
|
||||||
Version="7.10"
|
|
||||||
Name="sqlite"
|
|
||||||
ProjectGUID="{8F1DEA42-6A5B-4B62-839D-C141A7BFACF2}"
|
|
||||||
RootNamespace="sqlite"
|
|
||||||
SccProjectName=""
|
|
||||||
SccLocalPath="">
|
|
||||||
<Platforms>
|
|
||||||
<Platform
|
|
||||||
Name="Win32"/>
|
|
||||||
</Platforms>
|
|
||||||
<Configurations>
|
|
||||||
<Configuration
|
|
||||||
Name="Debug|Win32"
|
|
||||||
OutputDirectory="$(SolutionDir)/temp/$(ProjectName)/$(ConfigurationName)"
|
|
||||||
IntermediateDirectory="$(SolutionDir)/temp/$(ProjectName)/$(ConfigurationName)"
|
|
||||||
ConfigurationType="4"
|
|
||||||
UseOfMFC="0"
|
|
||||||
CharacterSet="2">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
Optimization="0"
|
|
||||||
AdditionalIncludeDirectories="dep/include/sqlite;dep/include"
|
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB"
|
|
||||||
MinimalRebuild="TRUE"
|
|
||||||
BasicRuntimeChecks="3"
|
|
||||||
RuntimeLibrary="3"
|
|
||||||
RuntimeTypeInfo="TRUE"
|
|
||||||
UsePrecompiledHeader="0"
|
|
||||||
PrecompiledHeaderFile="$(SolutionDir)/temp/$(ProjectName)/sqlite.pch"
|
|
||||||
AssemblerListingLocation="$(SolutionDir)temp/$(ProjectName)/$(ConfigurationName)/"
|
|
||||||
ObjectFile="$(SolutionDir)temp/$(ProjectName)/$(ConfigurationName)/"
|
|
||||||
ProgramDataBaseFileName="$(SolutionDir)temp/$(ProjectName)/$(ConfigurationName)/"
|
|
||||||
WarningLevel="3"
|
|
||||||
Detect64BitPortabilityProblems="TRUE"
|
|
||||||
DebugInformationFormat="3"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLibrarianTool"
|
|
||||||
OutputFile="./dep/lib/debug/sqlite.lib"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCManagedWrapperGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
|
||||||
</Configuration>
|
|
||||||
<Configuration
|
|
||||||
Name="Release|Win32"
|
|
||||||
OutputDirectory="$(SolutionDir)/temp/$(ProjectName)/$(ConfigurationName)"
|
|
||||||
IntermediateDirectory="$(SolutionDir)/temp/$(ProjectName)/$(ConfigurationName)"
|
|
||||||
ConfigurationType="4"
|
|
||||||
CharacterSet="2">
|
|
||||||
<Tool
|
|
||||||
Name="VCCLCompilerTool"
|
|
||||||
AdditionalIncludeDirectories="dep/include/sqlite;dep/include"
|
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB"
|
|
||||||
RuntimeLibrary="2"
|
|
||||||
RuntimeTypeInfo="TRUE"
|
|
||||||
UsePrecompiledHeader="0"
|
|
||||||
PrecompiledHeaderFile="$(SolutionDir)/temp/$(ProjectName)/sqlite.pch"
|
|
||||||
AssemblerListingLocation="$(SolutionDir)temp/$(ProjectName)/$(ConfigurationName)/"
|
|
||||||
ObjectFile="$(SolutionDir)temp/$(ProjectName)/$(ConfigurationName)/"
|
|
||||||
ProgramDataBaseFileName="$(SolutionDir)temp/$(ProjectName)/$(ConfigurationName)/"
|
|
||||||
WarningLevel="3"
|
|
||||||
Detect64BitPortabilityProblems="TRUE"
|
|
||||||
DebugInformationFormat="3"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCCustomBuildTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCLibrarianTool"
|
|
||||||
OutputFile="./dep/lib/release/sqlite.lib"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCMIDLTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPostBuildEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreBuildEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCPreLinkEventTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCResourceCompilerTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCWebServiceProxyGeneratorTool"/>
|
|
||||||
<Tool
|
|
||||||
Name="VCXMLDataGeneratorTool"/>
|
|
||||||
<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=".\dep\src\sqlite\alter.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\analyze.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\attach.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\auth.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\btree.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\build.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\callback.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\complete.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\date.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\delete.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\expr.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\fts1.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\fts1_hash.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\fts1_porter.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\fts1_tokenizer1.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\func.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\hash.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\insert.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\legacy.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\loadext.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\main.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\opcodes.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\os.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\os_os2.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\os_unix.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\os_win.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\pager.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\parse.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\pragma.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\prepare.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\printf.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\random.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\select.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\shell.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\table.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\tclsqlite.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\tokenize.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\trigger.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\update.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\utf.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\util.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\vacuum.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\vdbe.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\vdbeapi.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\vdbeaux.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\vdbefifo.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\vdbemem.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\vtab.c">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\where.c">
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
<Filter
|
|
||||||
Name="Header Files"
|
|
||||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
|
||||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\btree.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\fts1.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\fts1_hash.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\fts1_tokenizer.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\hash.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\keywordhash.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\opcodes.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\os.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\os_common.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\pager.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\parse.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\sqlite3.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\sqlite3ext.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\sqliteInt.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\vdbe.h">
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath=".\dep\src\sqlite\vdbeInt.h">
|
|
||||||
</File>
|
|
||||||
</Filter>
|
|
||||||
</Files>
|
|
||||||
<Globals>
|
|
||||||
</Globals>
|
|
||||||
</VisualStudioProject>
|
|
||||||
Loading…
x
Reference in New Issue
Block a user