The server is building, but still needs work
There is some missing character creation/unloading code, and there are a few other issues highlighted by TODO tags, see below. In general, 'mapIndex' has been renamed to 'roomIndex'. Multiple rooms have not been fully implemented yet, but I'm working on it. Other issues: * FileFormat needs to be changed to MapLoader * Server's character movement is still slaved to the clients The client does not build.
This commit is contained in:
@@ -45,7 +45,7 @@ struct CharacterData {
|
||||
std::string avatar;
|
||||
|
||||
//world position
|
||||
int mapIndex = 0;
|
||||
int roomIndex = 0;
|
||||
Vector2 origin = {0.0,0.0};
|
||||
Vector2 motion = {0.0,0.0};
|
||||
Vector2 bounds = {0.0,0.0};
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
//TODO: I'm unhappy with using this system, there needs to be a way to handle saving/loading better
|
||||
|
||||
class DummyFormat {
|
||||
public:
|
||||
void Load(Region** const, int x, int y);
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
#ifndef REGION_HPP_
|
||||
#define REGION_HPP_
|
||||
|
||||
#define REGION_WIDTH 20
|
||||
#define REGION_HEIGHT 20
|
||||
#define REGION_DEPTH 3
|
||||
constexpr int REGION_WIDTH = 20;
|
||||
constexpr int REGION_HEIGHT = 20;
|
||||
constexpr int REGION_DEPTH = 3;
|
||||
|
||||
class Region {
|
||||
public:
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
#include "region_pager.hpp"
|
||||
|
||||
//NOTE: When operating on a region, setTile() & getTile() *are not* zero indexed, but when operating on the entire map they *are* zero indexed.
|
||||
//TODO: enforce all possible parameter counts
|
||||
//TODO: update the map API to handle multiple rooms
|
||||
|
||||
static int setTile(lua_State* L) {
|
||||
if (lua_gettop(L) == 5) {
|
||||
|
||||
Reference in New Issue
Block a user