Skip to content

Commit

Permalink
adding solution file
Browse files Browse the repository at this point in the history
  • Loading branch information
L1quid committed Jan 22, 2011
1 parent 1976dcd commit fee29c8
Show file tree
Hide file tree
Showing 8 changed files with 298 additions and 111 deletions.
232 changes: 232 additions & 0 deletions explosivo.sln

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion explosivo/Emitter.h
Expand Up @@ -2,7 +2,7 @@
#define _DEMOS_EMITTER_H

#include "Streamlet.h"
#include "../../wdl/ptrlist.h"
#include "../wdl/ptrlist.h"

class Emitter
{
Expand Down
2 changes: 1 addition & 1 deletion explosivo/Firework.h
Expand Up @@ -14,7 +14,7 @@

#include "chipmunk.h"
#include "config.h"
#include "../../wdl/ptrlist.h"
#include "../wdl/ptrlist.h"
#include "intel_rand.h"

extern agg::rgba8 g_kulers[5];
Expand Down
2 changes: 1 addition & 1 deletion explosivo/Menu.h
Expand Up @@ -4,7 +4,7 @@
#include "config.h"
#include "MenuItem.h"
#include "PopupMenuItem.h"
#include "../../wdl/ptrlist.h"
#include "../wdl/ptrlist.h"

#define ITEM_SPACING 10

Expand Down
2 changes: 1 addition & 1 deletion explosivo/Streamlet.h
Expand Up @@ -2,7 +2,7 @@
#define _DEMOS_STREAMLET_H

#include <windows.h>
#include "../../wdl/ptrlist.h"
#include "../wdl/ptrlist.h"
#include "config.h"

class Streamlet
Expand Down
6 changes: 5 additions & 1 deletion explosivo/explosivo.cpp
Expand Up @@ -24,7 +24,7 @@ cpSpace *g_space = NULL;
#include "scopelock.h"
//#include "Emitter.h"
//#include "Streamlet.h"
#include "../../wdl/ptrlist.h"
#include "../wdl/ptrlist.h"
#include "resource.h"
#include "png.h"

Expand Down Expand Up @@ -1263,6 +1263,10 @@ void init_kuler()
const int delimiter_len = strlen(delimiter);
std::string color_data = GetUrl::Gimme("http://antimac.org/etc/kuler.php");
const char *base_char = color_data.c_str();

if (!base_char || !strcmp(base_char, ""))
return;

int idx = 0;
int i = -1;
int r, g, b;
Expand Down
108 changes: 2 additions & 106 deletions explosivo/explosivo.vcproj
Expand Up @@ -63,7 +63,7 @@
<Tool
Name="VCLinkerTool"
AdditionalOptions="/fixed:no"
AdditionalDependencies="../../pnglib/zlib/projects/visualc6/Win32_LIB_Debug/zlibd.lib wsock32.lib"
AdditionalDependencies="wsock32.lib"
Version="0.2"
LinkIncremental="2"
GenerateDebugInformation="true"
Expand Down Expand Up @@ -145,7 +145,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="../../pnglib/zlib/projects/visualc6/Win32_LIB_Release/zlib.lib wsock32.lib"
AdditionalDependencies="../libpng/zlib/projects/visualc6/Win32_LIB_Release/zlib.lib wsock32.lib"
LinkIncremental="1"
GenerateDebugInformation="false"
SubSystem="2"
Expand Down Expand Up @@ -1143,110 +1143,6 @@
>
</File>
</Filter>
<Filter
Name="jnetlib"
>
<File
RelativePath="..\..\jnetlib\asyncdns.cpp"
>
</File>
<File
RelativePath="..\..\jnetlib\asyncdns.h"
>
</File>
<File
RelativePath="..\..\jnetlib\connection.cpp"
>
</File>
<File
RelativePath="..\..\jnetlib\connection.h"
>
</File>
<File
RelativePath="..\..\jnetlib\httpget.cpp"
>
</File>
<File
RelativePath="..\..\jnetlib\httpget.h"
>
</File>
<File
RelativePath="..\..\jnetlib\httppost.cpp"
>
</File>
<File
RelativePath="..\..\jnetlib\httppost.h"
>
</File>
<File
RelativePath="..\..\jnetlib\httpserv.cpp"
>
</File>
<File
RelativePath="..\..\jnetlib\httpserv.h"
>
</File>
<File
RelativePath="..\..\jnetlib\ircclient.cpp"
>
</File>
<File
RelativePath="..\..\jnetlib\ircclient.h"
>
</File>
<File
RelativePath="..\..\jnetlib\jnetlib.h"
>
</File>
<File
RelativePath="..\..\jnetlib\listen.cpp"
>
</File>
<File
RelativePath="..\..\jnetlib\listen.h"
>
</File>
<File
RelativePath="..\..\jnetlib\netinc.h"
>
</File>
<File
RelativePath="..\..\jnetlib\sslconnection.cpp"
>
</File>
<File
RelativePath="..\..\jnetlib\sslconnection.h"
>
</File>
<File
RelativePath="..\..\jnetlib\ssllisten.cpp"
>
</File>
<File
RelativePath="..\..\jnetlib\ssllisten.h"
>
</File>
<File
RelativePath="..\..\jnetlib\udpconnection.h"
>
</File>
<File
RelativePath="..\..\jnetlib\util.cpp"
>
</File>
<File
RelativePath="..\..\jnetlib\util.h"
>
</File>
<File
RelativePath="..\..\jnetlib\webserver.cpp"
>
</File>
<File
RelativePath="..\..\jnetlib\webserver.h"
>
</File>
</Filter>
</Filter>
<Filter
Name="Header Files"
Expand Down
55 changes: 55 additions & 0 deletions jnetlib/asyncdns.h
@@ -0,0 +1,55 @@
/*
** JNetLib
** Copyright (C) 2000-2001 Nullsoft, Inc.
** Author: Justin Frankel
** File: asyncdns.h - JNL portable asynchronous DNS interface
** License: see jnetlib.h
**
** Usage:
** 1. Create JNL_AsyncDNS object, optionally with the number of cache entries.
** 2. call resolve() to resolve a hostname into an address. The return value of
** resolve is 0 on success (host successfully resolved), 1 on wait (meaning
** try calling resolve() with the same hostname in a few hundred milliseconds
** or so), or -1 on error (i.e. the host can't resolve).
** 3. call reverse() to do reverse dns (ala resolve()).
** 4. enjoy.
*/

#ifndef _ASYNCDNS_H_
#define _ASYNCDNS_H_

class JNL_AsyncDNS
{
public:
JNL_AsyncDNS(int max_cache_entries=64);
~JNL_AsyncDNS();

int resolve(char *hostname, unsigned long *addr); // return 0 on success, 1 on wait, -1 on unresolvable
int reverse(unsigned long addr, char *hostname); // return 0 on success, 1 on wait, -1 on unresolvable. hostname must be at least 256 bytes.

private:
typedef struct
{
int last_used; // timestamp.
char resolved;
char mode; // 1=reverse
char hostname[256];
unsigned long addr;
}
cache_entry;

cache_entry *m_cache;
int m_cache_size;
volatile int m_thread_kill;
#ifdef _WIN32
HANDLE m_thread;
static unsigned long WINAPI _threadfunc(LPVOID _d);
#else
pthread_t m_thread;
static unsigned int _threadfunc(void *_d);
#endif
void makesurethreadisrunning(void);

};

#endif //_ASYNCDNS_H_

0 comments on commit fee29c8

Please sign in to comment.