Skip to content

Commit b2b3021

Browse files
committed
Migrated from local SVN
Mostly the vanilla HLM, simple, using plain-text communications, unsecure and ideal for tutorials and teaching (without any serious use so! Or you should provide a different low-level network protocol). Most of it was written in 2006 (no 1 missing), so aside some small adaptations I did later on, it's all old Java.
0 parents  commit b2b3021

File tree

266 files changed

+24799
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

266 files changed

+24799
-0
lines changed

.classpath

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path=""/>
4+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
5+
<classpathentry kind="output" path=""/>
6+
</classpath>

.project

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>HLM</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.jdt.core.javanature</nature>
16+
</natures>
17+
</projectDescription>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
encoding/<project>=UTF-8

Dummy.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
I am dummy

Dummy2.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
I am dummy

bak-modulesList.txt

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
Module:SModule: Java
2+
Methods:
3+
Method:addModule::string:string. return:int. endofmethod.
4+
Method:removeModule::string. return:int. endofmethod.
5+
No more methods.
6+
7+
Module:Chat: Java
8+
Methods:
9+
Method:createAccount::string:string. return:int. endofmethod.
10+
Method:login::string:string. return:int. endofmethod.
11+
Method:logout::string. return:int. endofmethod.
12+
Method:getPrivateMessages::string. return:string. endofmethod.
13+
Method:addPrivateMessages::string:string:string. return:int. endofmethod.
14+
Method:addFriend::string:string. return:int. endofmethod.
15+
Method:removeFriend::string:string. return:int. endofmethod.
16+
Method:getEvents::string. return:string. endofmethod.
17+
Method:getFriends::string. return:string. endofmethod.
18+
Method:joinRoom::string:string. return:int. endofmethod.
19+
Method:leaveRoom::string:string. return:int. endofmethod.
20+
Method:getMessages::string:string. return:string. endofmethod.
21+
Method:addMessage::string:string:string. return:int. endofmethod.
22+
Method:test::. return:int. endofmethod.
23+
No more methods.
24+
25+
Module:SeeThem: Java
26+
Methods:
27+
Method:managePos::string:string:float:float:float:float:int:int. return:string. endofmethod.
28+
Method:giveEntities2D::float:float:float:float. return:string. endofmethod.
29+
Method:givePlayer2D::string. return:string. endofmethod.
30+
Method:updateSubjects::float:float. return:string. endofmethod.
31+
No more methods.
32+
33+
Module:SeeThem2: Java
34+
Methods:
35+
Method:managePos::string:string:float:float:float:float:int:float. return:string. endofmethod.
36+
Method:giveEntities2D::float:float:float:float. return:string. endofmethod.
37+
Method:givePlayer2D::string. return:string. endofmethod.
38+
Method:updateSubjects::float:float:float. return:string. endofmethod.
39+
No more methods.
40+
41+
Module:PlayerReceiver: Java
42+
Methods:
43+
Method:managePos::int:float:float:float:float:int. return:string. endofmethod.
44+
No more methods.
45+
Module:DummyReceiver3: Java
46+
Methods:
47+
Method:managePos::float:float. return:string. endofmethod.
48+
Method:returnPos::noparameters. return:string. endofmethod.
49+
No more methods.
50+
Module:DummyReceiver3: Java
51+
Methods:
52+
Method:managePos::float:float. return:string. endofmethod.
53+
Method:returnPos::noparameters. return:string. endofmethod.
54+
No more methods.
55+
Module:PlayerReceiverF: Java
56+
Methods:
57+
Method:managePos::int:float:float:float:float:int. return:string. endofmethod.
58+
No more methods.
59+
Module:PlayerReceiverF: Java
60+
Methods:
61+
Method:managePos::int:float:float:float:float:int. return:string. endofmethod.
62+
No more methods.
63+
Module:MFile: Java
64+
Methods:
65+
Method:getName::noparameters. return:string. endofmethod.
66+
Method:getAbsolutePath::noparameters. return:string. endofmethod.
67+
Method:isDirectory::noparameters. return:int. endofmethod.
68+
Method:listFiles::noparameters. return:string. endofmethod.
69+
No more methods.

cclient/Entity.cpp

+180
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
#include "../../necro_core/ncore.h"
2+
#include "entity.h"
3+
4+
void Entity::setStatut(int newStatut)
5+
{
6+
statut = newStatut;
7+
}
8+
9+
int Entity::getStatut()
10+
{
11+
return (statut);
12+
}
13+
14+
void Entity::setPos(float x, float z)
15+
{
16+
posX = x;
17+
posZ = z;
18+
oldX = posX;
19+
oldZ = posZ;
20+
}
21+
22+
23+
void Entity::setPos(float x, float y, float z)
24+
{
25+
// The old coord. are used to smooth the move. We suppose that anyone has the same speed, so we might be able to do a little interpolation
26+
// Pretty old solution...
27+
oldX = posX;
28+
oldY = posY;
29+
oldZ = posZ;
30+
31+
posX = x;
32+
posY = y;
33+
posZ = z;
34+
}
35+
36+
void Entity::setDir(float direc)
37+
{
38+
dir = direc;
39+
}
40+
41+
42+
float Entity::getPosX()
43+
{
44+
return (posX);
45+
}
46+
47+
float Entity::getPosY()
48+
{
49+
return (posY);
50+
}
51+
52+
float Entity::getPosZ()
53+
{
54+
return (posZ);
55+
}
56+
57+
float Entity::getOldX()
58+
{
59+
return (oldX);
60+
}
61+
62+
float Entity::getOldY()
63+
{
64+
return (oldY);
65+
}
66+
67+
float Entity::getOldZ()
68+
{
69+
return (oldZ);
70+
}
71+
72+
void Entity::setOldX(float x)
73+
{
74+
oldX = x;
75+
}
76+
77+
void Entity::setOldY(float y)
78+
{
79+
oldY = y;
80+
}
81+
82+
void Entity::setOldZ(float Z)
83+
{
84+
oldZ = Z;
85+
}
86+
87+
float Entity::getDir()
88+
{
89+
return (dir);
90+
}
91+
92+
int Entity::getId()
93+
{
94+
return (Id);
95+
}
96+
97+
void Entity::setId(int Id)
98+
{
99+
Entity::Id = Id;
100+
}
101+
102+
void Entity::setNick(char * nick)
103+
{
104+
strcpy(Entity::nick ,nick);
105+
}
106+
107+
void Entity::setRealName(char * realname)
108+
{
109+
strcpy(Entity::realName, realname);
110+
}
111+
112+
void Entity::setInvent1(int invent1)
113+
{
114+
Entity::invent1 = invent1;
115+
}
116+
117+
void Entity::setInvent2(int invent2)
118+
{
119+
Entity::invent2 = invent2;
120+
}
121+
122+
void Entity::setInvent3(int invent3)
123+
{
124+
Entity::invent3 = invent3;
125+
}
126+
127+
void Entity::setInvent4(int invent4)
128+
{
129+
Entity::invent4 = invent4;
130+
}
131+
132+
void Entity::setMindEnergy(int minEne)
133+
{
134+
Entity::mindEnergy = minEne;
135+
}
136+
137+
void Entity::setSectInfo(int sectInfo)
138+
{
139+
Entity::sectInfo = sectInfo;
140+
}
141+
142+
char * Entity::getNick()
143+
{
144+
return (Entity::nick);
145+
}
146+
147+
char * Entity::getRealName()
148+
{
149+
return (Entity::realName);
150+
}
151+
152+
int Entity::getInvent1()
153+
{
154+
return (Entity::invent1);
155+
}
156+
157+
int Entity::getInvent2()
158+
{
159+
return (Entity::invent2);
160+
}
161+
162+
int Entity::getInvent3()
163+
{
164+
return (Entity::invent3);
165+
}
166+
167+
int Entity::getInvent4()
168+
{
169+
return (Entity::invent4);
170+
}
171+
172+
int Entity::getMindEnergy()
173+
{
174+
return (Entity::mindEnergy);
175+
}
176+
177+
int Entity::getSectInfo()
178+
{
179+
return (Entity::sectInfo);
180+
}

cclient/Entity.h

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#ifndef ENTITY_H
2+
#define ENTITY_H 1
3+
4+
class Entity
5+
{
6+
public:
7+
void setStatut(int newStatut);
8+
int getStatut();
9+
void setPos(float x,float y);
10+
void setPos(float x, float y, float z);
11+
void setDir(float direc);
12+
void setId(int Id);
13+
void setNick(char * nick);
14+
void setRealName(char * realname);
15+
void setInvent1(int invent1);
16+
void setInvent2(int invent2);
17+
void setInvent3(int invent3);
18+
void setInvent4(int invent4);
19+
void setMindEnergy(int minEne);
20+
void setSectInfo(int sectInfo);
21+
float getPosX();
22+
float getPosY();
23+
float getPosZ();
24+
float getOldX();
25+
float getOldY();
26+
float getOldZ();
27+
void setOldX(float x);
28+
void setOldY(float y);
29+
void setOldZ(float z);
30+
float getDir();
31+
int getId();
32+
char * getNick();
33+
char * getRealName();
34+
int getInvent1();
35+
int getInvent2();
36+
int getInvent3();
37+
int getInvent4();
38+
int getMindEnergy();
39+
int getSectInfo();
40+
41+
float posX;
42+
float posY;
43+
float posZ;
44+
float oldX;
45+
float oldY;
46+
float oldZ;
47+
float dir;
48+
int statut;
49+
int Id;
50+
char nick[20];
51+
char realName[50];
52+
int invent1;
53+
int invent2;
54+
int invent3;
55+
int invent4;
56+
int mindEnergy;
57+
int sectInfo;
58+
};
59+
60+
#endif

0 commit comments

Comments
 (0)