weird bug happened where lots stuf corrupted, better i commit asap
This commit is contained in:
parent
b07bb475a7
commit
aa92184cf5
243 changed files with 488 additions and 92 deletions
102
games/forespend/res/fonts/dos.fnt
Normal file
102
games/forespend/res/fonts/dos.fnt
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
info face="6x6 Font Monospaced Regular" size=32 bold=0 italic=0 charset="" unicode=0 stretchH=100 smooth=1 aa=1 padding=1,1,1,1 spacing=-2,-2
|
||||
common lineHeight=38 base=32 scaleW=512 scaleH=512 pages=1 packed=0
|
||||
page id=0 file="dos.png"
|
||||
chars count=97
|
||||
char id=0 x=474 y=200 width=32 height=40 xoffset=-1 yoffset=-1 xadvance=30 page=0 chnl=0
|
||||
char id=10 x=0 y=0 width=0 height=0 xoffset=-1 yoffset=0 xadvance=0 page=0 chnl=0
|
||||
char id=32 x=0 y=0 width=0 height=0 xoffset=-1 yoffset=0 xadvance=37 page=0 chnl=0
|
||||
char id=33 x=390 y=160 width=40 height=40 xoffset=10 yoffset=-1 xadvance=38 page=0 chnl=0
|
||||
char id=34 x=351 y=160 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=35 x=433 y=240 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=36 x=237 y=240 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=37 x=315 y=240 width=40 height=40 xoffset=-1 yoffset=-1 xadvance=38 page=0 chnl=0
|
||||
char id=38 x=472 y=240 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=39 x=0 y=200 width=40 height=40 xoffset=10 yoffset=-1 xadvance=38 page=0 chnl=0
|
||||
char id=40 x=200 y=200 width=39 height=40 xoffset=4 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=41 x=239 y=200 width=39 height=40 xoffset=4 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=42 x=84 y=280 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=43 x=355 y=240 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=44 x=80 y=200 width=40 height=40 xoffset=10 yoffset=-1 xadvance=38 page=0 chnl=0
|
||||
char id=45 x=276 y=240 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=46 x=40 y=200 width=40 height=40 xoffset=10 yoffset=-1 xadvance=38 page=0 chnl=0
|
||||
char id=47 x=79 y=240 width=40 height=40 xoffset=-1 yoffset=-1 xadvance=38 page=0 chnl=0
|
||||
char id=48 x=39 y=40 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=49 x=0 y=160 width=39 height=40 xoffset=4 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=50 x=39 y=160 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=51 x=78 y=160 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=52 x=117 y=160 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=53 x=156 y=160 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=54 x=195 y=160 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=55 x=234 y=160 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=56 x=273 y=160 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=57 x=312 y=160 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=58 x=160 y=200 width=40 height=40 xoffset=10 yoffset=-1 xadvance=38 page=0 chnl=0
|
||||
char id=59 x=120 y=200 width=40 height=40 xoffset=10 yoffset=-1 xadvance=38 page=0 chnl=0
|
||||
char id=60 x=434 y=200 width=40 height=40 xoffset=-1 yoffset=-1 xadvance=38 page=0 chnl=0
|
||||
char id=61 x=394 y=240 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=62 x=0 y=240 width=39 height=40 xoffset=4 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=63 x=469 y=160 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=64 x=119 y=240 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=65 x=0 y=0 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=66 x=39 y=0 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=67 x=78 y=0 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=68 x=117 y=0 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=69 x=156 y=0 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=70 x=195 y=0 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=71 x=234 y=0 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=72 x=273 y=0 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=73 x=312 y=0 width=39 height=40 xoffset=4 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=74 x=351 y=0 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=75 x=390 y=0 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=76 x=429 y=0 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=77 x=468 y=0 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=78 x=0 y=40 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=79 x=39 y=40 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=80 x=78 y=40 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=81 x=117 y=40 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=82 x=156 y=40 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=83 x=195 y=40 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=84 x=234 y=40 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=85 x=273 y=40 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=86 x=312 y=40 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=87 x=351 y=40 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=88 x=390 y=40 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=89 x=429 y=40 width=40 height=40 xoffset=-1 yoffset=-1 xadvance=38 page=0 chnl=0
|
||||
char id=90 x=469 y=40 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=91 x=278 y=200 width=39 height=40 xoffset=4 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=92 x=158 y=240 width=40 height=40 xoffset=-1 yoffset=-1 xadvance=38 page=0 chnl=0
|
||||
char id=93 x=317 y=200 width=39 height=40 xoffset=4 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=94 x=198 y=240 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=95 x=0 y=280 width=45 height=40 xoffset=-6 yoffset=-1 xadvance=38 page=0 chnl=0
|
||||
char id=96 x=430 y=160 width=39 height=40 xoffset=4 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=97 x=0 y=80 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=98 x=39 y=80 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=99 x=78 y=80 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=100 x=117 y=80 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=101 x=156 y=80 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=102 x=195 y=80 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=103 x=234 y=80 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=104 x=273 y=80 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=105 x=312 y=80 width=39 height=40 xoffset=4 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=106 x=351 y=80 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=107 x=390 y=80 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=108 x=429 y=80 width=39 height=40 xoffset=4 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=109 x=468 y=80 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=110 x=0 y=120 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=111 x=39 y=120 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=112 x=78 y=120 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=113 x=117 y=120 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=114 x=156 y=120 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=115 x=195 y=120 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=116 x=234 y=120 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=117 x=273 y=120 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=118 x=312 y=120 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=119 x=351 y=120 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=120 x=390 y=120 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=121 x=429 y=120 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=122 x=468 y=120 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=123 x=356 y=200 width=39 height=40 xoffset=4 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=124 x=39 y=240 width=40 height=40 xoffset=10 yoffset=-1 xadvance=38 page=0 chnl=0
|
||||
char id=125 x=395 y=200 width=39 height=40 xoffset=10 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
char id=126 x=45 y=280 width=39 height=40 xoffset=-1 yoffset=-1 xadvance=37 page=0 chnl=0
|
||||
kernings count=0
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 5.9 KiB |
|
|
@ -77,4 +77,4 @@ h ezra_0.0 ffffff
|
|||
|
||||
}
|
||||
# end of range ffffff
|
||||
}
|
||||
}
|
||||
|
|
@ -7,7 +7,7 @@ uniform vec4 colDiffuse;
|
|||
const float BITS=8.0;
|
||||
uniform bool DITHER=false;
|
||||
uniform bool DEPTH=true;
|
||||
uniform bool BLOOM=true;
|
||||
uniform bool BLOOM=false;
|
||||
uniform bool BLUR=false;
|
||||
uniform float redbits=4.;
|
||||
uniform float greenbits=4.;
|
||||
|
|
|
|||
|
|
@ -8,22 +8,36 @@ client::client() {
|
|||
void client::boot() {
|
||||
this->framerate=60;
|
||||
this->tickrate=20;
|
||||
// SetConfigFlags();
|
||||
SetConfigFlags(FLAG_VSYNC_HINT|FLAG_WINDOW_RESIZABLE);
|
||||
InitWindow(380,240,"forespend - 0.03h");
|
||||
initthemes();
|
||||
this->currentscene=new mainmenu();
|
||||
this->currentscene->boot();
|
||||
target=LoadRenderTexture(380,240);
|
||||
display=LoadShader(
|
||||
AT("res/shaders/screen.vs"),
|
||||
AT("res/shaders/screen.fs")
|
||||
);
|
||||
}
|
||||
void client::draw() {
|
||||
BeginDrawing();
|
||||
BeginTextureMode(target);
|
||||
ClearBackground(rl::WHITE);
|
||||
this->currentscene->draw();
|
||||
EndTextureMode();
|
||||
BeginDrawing();
|
||||
BeginShaderMode(display);
|
||||
DrawTexturePro(
|
||||
target.texture,{0,0,380,-240},{0,0,(float)GetScreenWidth(),(float)GetScreenHeight()},{0,0},0,rl::WHITE
|
||||
);
|
||||
EndShaderMode();
|
||||
EndDrawing();
|
||||
|
||||
}
|
||||
void client::exit() {
|
||||
this->currentscene->exit();
|
||||
delete this->currentscene;
|
||||
UnloadRenderTexture(target);
|
||||
UnloadShader(display);
|
||||
}
|
||||
void client::tick() {
|
||||
this->currentscene->tick();
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ class client :public enginend::program{
|
|||
public:
|
||||
|
||||
RenderTexture2D target;
|
||||
Shader display;
|
||||
const char* CONF() final{return "client.tdf";}
|
||||
client();
|
||||
void boot() override;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ using namespace enginend::nodes::twod::relative;
|
|||
class mainmenu :public virtual enginend::scene{
|
||||
private:
|
||||
Texture2D bg= LoadTexture(AT("res/images/tilesheet.png"));
|
||||
|
||||
public:
|
||||
void boot() override {
|
||||
this->nodes=std::vector<enginend::nodes::node*>{
|
||||
|
|
|
|||
1
games/forespend/src/client/scenes/world/entity.cpp
Normal file
1
games/forespend/src/client/scenes/world/entity.cpp
Normal file
|
|
@ -0,0 +1 @@
|
|||
#include "../../../common/world/entity.h"
|
||||
26
games/forespend/src/client/scenes/world/world.cpp
Normal file
26
games/forespend/src/client/scenes/world/world.cpp
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#include "../../../common/world/world.h"
|
||||
void world::boot() {
|
||||
players->boot();
|
||||
entities->boot();
|
||||
buildings->boot();
|
||||
terrain=new enginend::nodes::trid::object3d(AT("res/models/world.obj"));
|
||||
worldrender=LoadShader(
|
||||
AT("res/shaders/tile.vs"),
|
||||
AT("res/shaders/tile.fs")
|
||||
);
|
||||
|
||||
}
|
||||
void world::draw() {
|
||||
BeginShaderMode(worldrender);
|
||||
terrain->draw();
|
||||
EndShaderMode();
|
||||
players->draw();
|
||||
entities->draw();
|
||||
buildings->draw();
|
||||
}
|
||||
void world::exit() {
|
||||
players->exit();
|
||||
entities->exit();
|
||||
buildings->exit();
|
||||
}
|
||||
|
||||
|
|
@ -1 +0,0 @@
|
|||
#include "entity.h"
|
||||
|
|
@ -2,25 +2,23 @@
|
|||
#include <enginend/engine.h>
|
||||
|
||||
class world :public enginend::scene{
|
||||
public:
|
||||
enginend::group *players;
|
||||
enginend::group *entities;
|
||||
enginend::group *buildings;
|
||||
bool singleplayer;
|
||||
// server side
|
||||
world() {
|
||||
players=new enginend::group({});
|
||||
entities=new enginend::group({});
|
||||
nodes.push_back(players);
|
||||
|
||||
};
|
||||
world();
|
||||
void tick() override;
|
||||
~world();
|
||||
|
||||
Model terrain;
|
||||
std::vector<Model*> buildingmodels;
|
||||
std::vector<Model*> entitymodels;
|
||||
std::vector<Model*> models;
|
||||
|
||||
// client side
|
||||
void boot() override;
|
||||
void draw() override;
|
||||
void exit() override;
|
||||
enginend::nodes::trid::object3d* terrain;
|
||||
Shader worldrender;
|
||||
unsigned char* tiles;
|
||||
|
||||
|
||||
};
|
||||
|
|
@ -10,6 +10,11 @@ std::string androidpackage="kn.kinfuyuki.forespend";
|
|||
inline const char* COMMONCONFIG(){return "common.tdf";}
|
||||
tiny::ErrorLevel tiny::level{4};
|
||||
int main(int argc, char** argv) {
|
||||
{
|
||||
system("echo $PWD");
|
||||
system("ls $PWD/res");
|
||||
system("ls $PWD/res/fonts");
|
||||
}
|
||||
enginend::program* game;
|
||||
tiny::startup("forespend","0.03g-rewrite.5");
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,21 @@
|
|||
#include "server.h"
|
||||
|
||||
server::server() {}
|
||||
server::server() {
|
||||
w=new world;
|
||||
}
|
||||
|
||||
void server::boot() {}
|
||||
void server::draw() {}
|
||||
void server::exit() {}
|
||||
void server::tick() {}
|
||||
void server::boot() {
|
||||
|
||||
}
|
||||
void server::exit() {
|
||||
|
||||
}
|
||||
void server::draw() {
|
||||
|
||||
}
|
||||
void server::tick() {
|
||||
w->tick();
|
||||
}
|
||||
server::~server() {
|
||||
delete w;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,13 +2,16 @@
|
|||
|
||||
#include <enginend/engine.h>
|
||||
|
||||
#include "../common/world/world.h"
|
||||
|
||||
class server : public enginend::program{
|
||||
public:
|
||||
world* w;
|
||||
server();
|
||||
const char* CONF() final{return "client.tdf";}
|
||||
|
||||
void boot() override;
|
||||
void tick() override;
|
||||
void draw() override;
|
||||
void exit() override;
|
||||
};
|
||||
~server();
|
||||
};
|
||||
|
|
|
|||
19
games/forespend/src/server/world/world.cpp
Normal file
19
games/forespend/src/server/world/world.cpp
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#include "../../common/world/world.h"
|
||||
|
||||
world::world() {
|
||||
players=new enginend::group({});
|
||||
entities=new enginend::group({});
|
||||
buildings=new enginend::group({});
|
||||
nodes.push_back(players);
|
||||
}
|
||||
void world::tick() {
|
||||
players->tick();
|
||||
entities->tick();
|
||||
buildings->tick();
|
||||
}
|
||||
|
||||
world::~world() {
|
||||
for (enginend::nodes::node* n: players->children){delete n;}
|
||||
for (enginend::nodes::node* n: entities->children){delete n;}
|
||||
for (enginend::nodes::node* n: buildings->children){delete n;}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue