Last change
on this file since 608 was
80,
checked in by Sam Hocevar, 15 years ago
|
- Adding the Golgotha source code. Not sure what's going to be interesting
in there, but since it's all public domain, there's certainly stuff to
pick up.
|
File size:
1.2 KB
|
Line | |
---|
1 | /********************************************************************** <BR>
|
---|
2 | This file is part of Crack dot Com's free source code release of
|
---|
3 | Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
|
---|
4 | information about compiling & licensing issues visit this URL</a>
|
---|
5 | <PRE> If that doesn't help, contact Jonathan Clark at
|
---|
6 | golgotha_source@usa.net (Subject should have "GOLG" in it)
|
---|
7 | ***********************************************************************/
|
---|
8 |
|
---|
9 | #include "test.hh"
|
---|
10 |
|
---|
11 | CStart startup("Test1");
|
---|
12 |
|
---|
13 | class CTest1 : public CBase
|
---|
14 | {
|
---|
15 | protected:
|
---|
16 | virtual char *Type() { return "Test1"; }
|
---|
17 | public:
|
---|
18 | char Message[80];
|
---|
19 |
|
---|
20 | CTest1(char *name) : CBase(name) { strcpy(Message, "Init"); }
|
---|
21 |
|
---|
22 | virtual void Action(char *command)
|
---|
23 | {
|
---|
24 | switch (command[0]) {
|
---|
25 | case 'p':
|
---|
26 | print();
|
---|
27 | break;
|
---|
28 | case 'a':
|
---|
29 | printf("You pressed my A!\n");
|
---|
30 | break;
|
---|
31 | case 'm':
|
---|
32 | printf("My message to you '%s'!\n", Message);
|
---|
33 | break;
|
---|
34 | }
|
---|
35 | }
|
---|
36 | };
|
---|
37 |
|
---|
38 | class CTest1Foundry : public CFoundry
|
---|
39 | {
|
---|
40 | public:
|
---|
41 | char *Type() { return "Test1"; }
|
---|
42 | CBase *Make(char *name) { return new CTest1(name); }
|
---|
43 | } CTest1Foundry;
|
---|
44 |
|
---|
45 | extern "C" void test1(int a, int b)
|
---|
46 | {
|
---|
47 | printf("Test 1 succesfully executed with %d and %d\n",a,b);
|
---|
48 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.