accidentally flipped v2 and v3, fixed
This commit is contained in:
parent
9c1d79812d
commit
acedcb1e23
|
@ -170,18 +170,12 @@ The following is a list of global operators and their effect:
|
|||
- logical and
|
||||
- `or`
|
||||
- logical or
|
||||
- `nor`
|
||||
- logical nor
|
||||
- `nand`
|
||||
- logical nand
|
||||
- `xor`
|
||||
- logical xor
|
||||
- `band`
|
||||
- bitwise and
|
||||
- `bor`
|
||||
- bitwise or
|
||||
- `bnor`
|
||||
- bitwise nor
|
||||
- `bxor`
|
||||
- bitwise xor
|
||||
- `srl`
|
||||
|
|
|
@ -1,47 +1,48 @@
|
|||
fn build(ProjectConfig c) {
|
||||
fn :build (ProjectConfig) {
|
||||
set c to pop;
|
||||
|
||||
c.name("MMO Project");
|
||||
c.mode("dev");
|
||||
|
||||
c.client([
|
||||
LanguageSettings(
|
||||
"c", ! lang
|
||||
"src/client.ztl", ! file
|
||||
"client/", ! out path
|
||||
[ ! ffi settings
|
||||
LanguageSettings {
|
||||
"c", /* lang */
|
||||
"src/client.ztl", /* file */
|
||||
"client/", /* out path */
|
||||
[ /* ffi */
|
||||
FFISetting {
|
||||
"raylib", ! libary name
|
||||
"$RAYLIB_PATH/libraylib.a", ! path
|
||||
"./", ! local path
|
||||
"make build", ! build command
|
||||
"raylib",
|
||||
"$RAYLIB_PATH/libraylib.a",
|
||||
"./",
|
||||
"make build",
|
||||
}
|
||||
]
|
||||
)
|
||||
]);
|
||||
}
|
||||
])
|
||||
|
||||
c.server([
|
||||
LanguageSettings(
|
||||
LanguageSettings {
|
||||
"javascript",
|
||||
"src/server.ztl",
|
||||
"server/"
|
||||
)
|
||||
}
|
||||
]);
|
||||
|
||||
c.common([
|
||||
LanguageSettings(
|
||||
LanguageSettings {
|
||||
"c",
|
||||
"src/common.ztl",
|
||||
"client/"
|
||||
},
|
||||
LanguageSettings(
|
||||
LanguageSettings {
|
||||
"javascript",
|
||||
"src/common.ztl",
|
||||
"server/"
|
||||
),
|
||||
LanguageSettings(
|
||||
},
|
||||
LanguageSettings {
|
||||
"sqlite",
|
||||
"src/common.ztl",
|
||||
"db/"
|
||||
)
|
||||
}
|
||||
]);
|
||||
|
||||
c.build();
|
||||
|
|
|
@ -1,93 +1,94 @@
|
|||
use "common.ztl";
|
||||
use "raylib" as rl;
|
||||
use "common.ztl"
|
||||
|
||||
fn main (i32 argc, str[] argv) i32 {
|
||||
set screen_width to 800 as i32;
|
||||
set screen_height to 450 as i32;
|
||||
fn :login (9p :s Player :p str :password) Player[] {
|
||||
s.auth(p.username, password);
|
||||
return s.read("players");
|
||||
}
|
||||
|
||||
set username to argv[0];
|
||||
set password to argv[1];
|
||||
|
||||
set server to 9p("localhost:25565");
|
||||
fn :main (i32 :argc str[] :argv) i32 {
|
||||
set :screen_width to i32 800;
|
||||
set :screen_height to i32 450;
|
||||
|
||||
set me to Player(
|
||||
server,
|
||||
username,
|
||||
Vec(0.0 1.0 2.0),
|
||||
set :username to argv[0];
|
||||
set :password to argv[1];
|
||||
|
||||
set :me to Player
|
||||
username
|
||||
0.0 1.0 2.0
|
||||
purple
|
||||
);
|
||||
;
|
||||
|
||||
set players to me.login(password);
|
||||
set :players to Player[] login(password);
|
||||
|
||||
set camera to rl.Camera3D(
|
||||
Vec(0.0, 1.0, 0.0),
|
||||
45.0,
|
||||
CAMERA_PERSPECTIVE,
|
||||
Vec(me.pos.x + 10.0,
|
||||
me.pos.y + 10.0,
|
||||
me.pos.z),
|
||||
set :camera to Camera3D
|
||||
0.0 1.0 0.0
|
||||
45.0
|
||||
:CAMERA_PERSPECTIVE
|
||||
add me.pos.x 10.0
|
||||
add me.pos.y 10.0
|
||||
me.pos.z
|
||||
me.pos
|
||||
);
|
||||
;
|
||||
|
||||
rl.init_window("zwl client : raylib", screen_width, screen_height);
|
||||
rl.set_target_fps(60);
|
||||
init_window( "zwl client : raylib" screen_width screen_height);
|
||||
set_target_fps( 60);
|
||||
|
||||
!!
|
||||
Main game loop
|
||||
!!
|
||||
while ( not rl.window_should_close() ) { ! Detect window close button or ESC key
|
||||
/* Main game loop */
|
||||
while ( not window_should_close ) {
|
||||
|
||||
set player_updated to false;
|
||||
set :player_updated to false;
|
||||
|
||||
if (rl.is_key_down(KEY_RIGHT)) {
|
||||
set me.pos.x to (me.pos.x + 0.2);
|
||||
set player_updated to true;
|
||||
if (is_key_down(:KEY_RIGHT)) {
|
||||
set me.pos.x to {add me.pos.x 0.2};
|
||||
set :player_updated true;
|
||||
}
|
||||
|
||||
if (rl.is_key_down(KEY_LEFT)) {
|
||||
set me.pos.x to (me.pos.x + 0.2);
|
||||
set player_updated to true;
|
||||
if (is_key_down(:KEY_LEFT)) {
|
||||
set me.pos.x to {sub me.pos.x 0.2};
|
||||
set :player_updated true;
|
||||
}
|
||||
|
||||
if (rl.is_key_down(KEY_DOWN)) {
|
||||
set me.pos.z to (me.pos.z + 0.2);
|
||||
set player_updated to true;
|
||||
if (is_key_down(:KEY_DOWN)) {
|
||||
set me.pos.z to {add me.pos.z 0.2};
|
||||
set :player_updated true;
|
||||
}
|
||||
|
||||
if (rl.is_key_down(KEY_UP)) {
|
||||
set me.pos.z to (me.pos.z - 0.2);
|
||||
set player_updated to true;
|
||||
if (is_key_down(:KEY_UP)) {
|
||||
set me.pos.z to {sub me.pos.z 0.2};
|
||||
set :player_updated true;
|
||||
}
|
||||
|
||||
me.sync_camera(camera);
|
||||
|
||||
if (player_updated) {
|
||||
set players to me.move();
|
||||
set :players me.move();
|
||||
} else {
|
||||
set players to me.ping();
|
||||
set :players me.ping();
|
||||
}
|
||||
|
||||
rl.begin_drawing();
|
||||
rl.clear_background(RAYWHITE);
|
||||
begin_drawing();
|
||||
clear_background(RAYWHITE);
|
||||
|
||||
rl.begin_mode_3d(camera);
|
||||
begin_mode_3d(camera);
|
||||
|
||||
! Draw floor
|
||||
rl.draw_grid(30, 1.0);
|
||||
/* Draw floor */
|
||||
draw_grid(30 1.0);
|
||||
|
||||
rl.draw_cube(me.pos, 0.5, 0.5, 0.5, me.apperance);
|
||||
draw_cube(me.pos 0.5 0.5 0.5 me.apperance);
|
||||
|
||||
for (player in players) {
|
||||
rl.draw_cube(player.pos, 0.5, 0.5, 0.5, player.apperance);
|
||||
for :player in players {
|
||||
draw_cube(player.pos 0.5 0.5 0.5 player.apperance);
|
||||
}
|
||||
|
||||
rl.end_mode_3d();
|
||||
end_mode_3d();
|
||||
|
||||
rl.end_drawing();
|
||||
end_drawing();
|
||||
}
|
||||
/* Detect window close button or ESC key */
|
||||
|
||||
me.logout();
|
||||
close_window(); ! Close window and OpenGL context
|
||||
close_window(); /*Close window and OpenGL context */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,37 +1,19 @@
|
|||
type Vec {
|
||||
init(f32 x, f32 y, f32 z) {
|
||||
set this.x to x;
|
||||
set this.y to y;
|
||||
set this.z to z;
|
||||
}
|
||||
}
|
||||
set :Vec to type {
|
||||
f32 :x,
|
||||
f32 :y,
|
||||
f32 :z,
|
||||
};
|
||||
|
||||
type Color {
|
||||
init(i8 r, i8 g, i8 b) {
|
||||
set this.r to r;
|
||||
set this.g to g;
|
||||
set this.b to b;
|
||||
}
|
||||
}
|
||||
set :Color to type {
|
||||
i8 :r,
|
||||
i8 :g,
|
||||
i8 :b,
|
||||
};
|
||||
|
||||
type Player {
|
||||
init (9p server, str username, Vec pos, Color color) {
|
||||
set this.server to server;
|
||||
set this.username to username;
|
||||
set this.pos to pos;
|
||||
set this.color to color;
|
||||
}
|
||||
set :Player to type {
|
||||
str :username,
|
||||
Vec :pos,
|
||||
Color :color,
|
||||
};
|
||||
|
||||
login (str password) Player[] {
|
||||
this.server.auth(this.username, password);
|
||||
set this.players to server.open("players");
|
||||
return players.read();
|
||||
}
|
||||
|
||||
logout() {
|
||||
this.players.flush();
|
||||
this.server.clunk();
|
||||
}
|
||||
}
|
||||
|
||||
const purple is Color(255, 255, 0);
|
||||
set immutable :purple to Color {255 255 0};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use "common.ztl";
|
||||
use "common.ztl"
|
||||
|
||||
fn main (i32 argc, str[] argv) i32 {
|
||||
set s to 9p (
|
||||
fn :main (i32 :argc []str :argv) i32 {
|
||||
set s to 9p {
|
||||
version,
|
||||
auth,
|
||||
error,
|
||||
|
@ -15,61 +15,59 @@ fn main (i32 argc, str[] argv) i32 {
|
|||
clunk,
|
||||
remove,
|
||||
stat,
|
||||
);
|
||||
};
|
||||
|
||||
s.host("0.0.0.0:25565");
|
||||
s.host("0.0.0.0:25565")
|
||||
};
|
||||
|
||||
return 0;
|
||||
}
|
||||
fn :version(9pmsg :m) {
|
||||
|
||||
fn version(9pmsg m) {
|
||||
};
|
||||
|
||||
}
|
||||
fn :auth(9pmsg :m) {
|
||||
|
||||
fn auth(9pmsg m) {
|
||||
};
|
||||
|
||||
}
|
||||
fn :error(9pmsg :m) {
|
||||
|
||||
fn error(9pmsg m) {
|
||||
};
|
||||
|
||||
}
|
||||
fn :flush(9pmsg :m) {
|
||||
|
||||
fn flush(9pmsg m) {
|
||||
};
|
||||
|
||||
}
|
||||
fn :attach(9pmsg :m) {
|
||||
|
||||
fn attach(9pmsg m) {
|
||||
};
|
||||
|
||||
}
|
||||
fn :walk(9pmsg :m) {
|
||||
|
||||
fn walk(9pmsg m) {
|
||||
};
|
||||
|
||||
}
|
||||
fn :open(9pmsg :m) {
|
||||
|
||||
fn open(9pmsg m) {
|
||||
};
|
||||
|
||||
}
|
||||
fn :create(9pmsg :m) {
|
||||
|
||||
fn create(9pmsg m) {
|
||||
};
|
||||
|
||||
}
|
||||
fn :read(9pmsg :m) {
|
||||
|
||||
fn read(9pmsg m) {
|
||||
};
|
||||
|
||||
}
|
||||
fn :write(9pmsg :m) {
|
||||
|
||||
fn write(9pmsg m) {
|
||||
};
|
||||
|
||||
}
|
||||
fn :clunk(9pmsg :m) {
|
||||
|
||||
fn clunk(9pmsg m) {
|
||||
};
|
||||
|
||||
}
|
||||
fn :remove(9pmsg :m) {
|
||||
|
||||
fn remove(9pmsg m) {
|
||||
};
|
||||
|
||||
}
|
||||
fn :stat(9pmsg :m) {
|
||||
|
||||
fn stat(9pmsg m) {
|
||||
|
||||
}
|
||||
};
|
||||
|
|
|
@ -4,9 +4,11 @@ local syntax = require 'core.syntax'
|
|||
syntax.add {
|
||||
name = "Zongor's Transpiler Language",
|
||||
files = { "%.ztl$" },
|
||||
block_comment = { '/*', '*/' },
|
||||
comment = "!",
|
||||
block_comment = { '!!', '!!' },
|
||||
patterns = {
|
||||
{ pattern = { "/%*", "%*/" }, type = "comment" },
|
||||
{ pattern = { "!!", "!!" }, type = "comment" }, -- tested ok
|
||||
{ pattern = "!.*", type = "comment" },
|
||||
{ pattern = { '"', '"', '\\' }, type = "string" },
|
||||
{ pattern = { "'", "'", '\\' }, type = "string" },
|
||||
{ pattern = ";", type = "operator" },
|
||||
|
@ -14,24 +16,40 @@ syntax.add {
|
|||
{ pattern = "[viu][%d_]+", type = "keyword2" },
|
||||
{ pattern = "[A-Z][%w_]*", type = "keyword2" },
|
||||
{ pattern = "[9][%w_]*", type = "keyword2" },
|
||||
{ pattern = ":[%w_]*", type = "literal" },
|
||||
{ pattern = "-?%.?%d+f?", type = "number" },
|
||||
},
|
||||
symbols = {
|
||||
["fn"] = "keyword",
|
||||
["to"] = "keyword",
|
||||
["in"] = "keyword",
|
||||
["is"] = "keyword",
|
||||
["as"] = "keyword",
|
||||
["use"] = "keyword",
|
||||
["set"] = "keyword",
|
||||
["if"] = "keyword",
|
||||
["else"] = "keyword",
|
||||
["for"] = "keyword",
|
||||
["loop"] = "keyword",
|
||||
["while"] = "keyword",
|
||||
["push"] = "keyword",
|
||||
["pop"] = "keyword",
|
||||
["return"] = "keyword",
|
||||
["immutable"] = "keyword",
|
||||
["const"] = "keyword",
|
||||
["type"] = "keyword",
|
||||
["this"] = "keyword",
|
||||
|
||||
["eq"] = "keyword",
|
||||
["ne"] = "keyword",
|
||||
["mod"] = "keyword",
|
||||
["not"] = "keyword",
|
||||
["and"] = "keyword",
|
||||
["or"] = "keyword",
|
||||
["xor"] = "keyword",
|
||||
["band"] = "keyword",
|
||||
["bor"] = "keyword",
|
||||
["bxor"] = "keyword",
|
||||
["srl"] = "keyword",
|
||||
["sll"] = "keyword",
|
||||
|
||||
["char"] = "keyword2",
|
||||
["str"] = "keyword2",
|
||||
|
@ -42,4 +60,5 @@ syntax.add {
|
|||
|
||||
["true"] = "literal",
|
||||
["false"] = "literal",
|
||||
}}
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,48 +1,47 @@
|
|||
fn :build (ProjectConfig) {
|
||||
set c to pop;
|
||||
|
||||
fn build(ProjectConfig c) {
|
||||
c.name("MMO Project");
|
||||
c.mode("dev");
|
||||
|
||||
c.client([
|
||||
LanguageSettings {
|
||||
"c", /* lang */
|
||||
"src/client.ztl", /* file */
|
||||
"client/", /* out path */
|
||||
[ /* ffi */
|
||||
LanguageSettings(
|
||||
"c", ! lang
|
||||
"src/client.ztl", ! file
|
||||
"client/", ! out path
|
||||
[ ! ffi settings
|
||||
FFISetting {
|
||||
"raylib",
|
||||
"$RAYLIB_PATH/libraylib.a",
|
||||
"./",
|
||||
"make build",
|
||||
"raylib", ! libary name
|
||||
"$RAYLIB_PATH/libraylib.a", ! path
|
||||
"./", ! local path
|
||||
"make build", ! build command
|
||||
}
|
||||
]
|
||||
}
|
||||
])
|
||||
)
|
||||
]);
|
||||
|
||||
c.server([
|
||||
LanguageSettings {
|
||||
LanguageSettings(
|
||||
"javascript",
|
||||
"src/server.ztl",
|
||||
"server/"
|
||||
}
|
||||
)
|
||||
]);
|
||||
|
||||
c.common([
|
||||
LanguageSettings {
|
||||
LanguageSettings(
|
||||
"c",
|
||||
"src/common.ztl",
|
||||
"client/"
|
||||
},
|
||||
LanguageSettings {
|
||||
LanguageSettings(
|
||||
"javascript",
|
||||
"src/common.ztl",
|
||||
"server/"
|
||||
},
|
||||
LanguageSettings {
|
||||
),
|
||||
LanguageSettings(
|
||||
"sqlite",
|
||||
"src/common.ztl",
|
||||
"db/"
|
||||
}
|
||||
)
|
||||
]);
|
||||
|
||||
c.build();
|
||||
|
|
|
@ -1,94 +1,93 @@
|
|||
use "common.ztl"
|
||||
use "common.ztl";
|
||||
use "raylib" as rl;
|
||||
|
||||
fn :login (9p :s Player :p str :password) Player[] {
|
||||
s.auth(p.username, password);
|
||||
return s.read("players");
|
||||
}
|
||||
fn main (i32 argc, str[] argv) i32 {
|
||||
set screen_width to 800 as i32;
|
||||
set screen_height to 450 as i32;
|
||||
|
||||
set username to argv[0];
|
||||
set password to argv[1];
|
||||
|
||||
fn :main (i32 :argc str[] :argv) i32 {
|
||||
set :screen_width to i32 800;
|
||||
set :screen_height to i32 450;
|
||||
set server to 9p("localhost:25565");
|
||||
|
||||
set :username to argv[0];
|
||||
set :password to argv[1];
|
||||
|
||||
set :me to Player
|
||||
username
|
||||
0.0 1.0 2.0
|
||||
set me to Player(
|
||||
server,
|
||||
username,
|
||||
Vec(0.0, 1.0, 2.0),
|
||||
purple
|
||||
;
|
||||
);
|
||||
|
||||
set :players to Player[] login(password);
|
||||
set players to me.login(password);
|
||||
|
||||
set :camera to Camera3D
|
||||
0.0 1.0 0.0
|
||||
45.0
|
||||
:CAMERA_PERSPECTIVE
|
||||
add me.pos.x 10.0
|
||||
add me.pos.y 10.0
|
||||
me.pos.z
|
||||
set camera to rl.Camera3D(
|
||||
Vec(0.0, 1.0, 0.0),
|
||||
45.0,
|
||||
CAMERA_PERSPECTIVE,
|
||||
Vec(me.pos.x + 10.0,
|
||||
me.pos.y + 10.0,
|
||||
me.pos.z),
|
||||
me.pos
|
||||
;
|
||||
);
|
||||
|
||||
init_window( "zwl client : raylib" screen_width screen_height);
|
||||
set_target_fps( 60);
|
||||
rl.init_window("zwl client : raylib", screen_width, screen_height);
|
||||
rl.set_target_fps(60);
|
||||
|
||||
/* Main game loop */
|
||||
while ( not window_should_close ) {
|
||||
!!
|
||||
Main game loop
|
||||
!!
|
||||
while ( not rl.window_should_close() ) { ! Detect window close button or ESC key
|
||||
|
||||
set :player_updated to false;
|
||||
set player_updated to false;
|
||||
|
||||
if (is_key_down(:KEY_RIGHT)) {
|
||||
set me.pos.x to {add me.pos.x 0.2};
|
||||
set :player_updated true;
|
||||
if (rl.is_key_down(KEY_RIGHT)) {
|
||||
set me.pos.x to (me.pos.x + 0.2);
|
||||
set player_updated to true;
|
||||
}
|
||||
|
||||
if (is_key_down(:KEY_LEFT)) {
|
||||
set me.pos.x to {sub me.pos.x 0.2};
|
||||
set :player_updated true;
|
||||
if (rl.is_key_down(KEY_LEFT)) {
|
||||
set me.pos.x to (me.pos.x + 0.2);
|
||||
set player_updated to true;
|
||||
}
|
||||
|
||||
if (is_key_down(:KEY_DOWN)) {
|
||||
set me.pos.z to {add me.pos.z 0.2};
|
||||
set :player_updated true;
|
||||
if (rl.is_key_down(KEY_DOWN)) {
|
||||
set me.pos.z to (me.pos.z + 0.2);
|
||||
set player_updated to true;
|
||||
}
|
||||
|
||||
if (is_key_down(:KEY_UP)) {
|
||||
set me.pos.z to {sub me.pos.z 0.2};
|
||||
set :player_updated true;
|
||||
if (rl.is_key_down(KEY_UP)) {
|
||||
set me.pos.z to (me.pos.z - 0.2);
|
||||
set player_updated to true;
|
||||
}
|
||||
|
||||
me.sync_camera(camera);
|
||||
|
||||
if (player_updated) {
|
||||
set :players me.move();
|
||||
set players to me.move();
|
||||
} else {
|
||||
set :players me.ping();
|
||||
set players to me.ping();
|
||||
}
|
||||
|
||||
begin_drawing();
|
||||
clear_background(RAYWHITE);
|
||||
rl.begin_drawing();
|
||||
rl.clear_background(RAYWHITE);
|
||||
|
||||
begin_mode_3d(camera);
|
||||
rl.begin_mode_3d(camera);
|
||||
|
||||
/* Draw floor */
|
||||
draw_grid(30 1.0);
|
||||
! Draw floor
|
||||
rl.draw_grid(30, 1.0);
|
||||
|
||||
draw_cube(me.pos 0.5 0.5 0.5 me.apperance);
|
||||
rl.draw_cube(me.pos, 0.5, 0.5, 0.5, me.apperance);
|
||||
|
||||
for :player in players {
|
||||
draw_cube(player.pos 0.5 0.5 0.5 player.apperance);
|
||||
for (player in players) {
|
||||
rl.draw_cube(player.pos, 0.5, 0.5, 0.5, player.apperance);
|
||||
}
|
||||
|
||||
end_mode_3d();
|
||||
rl.end_mode_3d();
|
||||
|
||||
end_drawing();
|
||||
rl.end_drawing();
|
||||
}
|
||||
/* Detect window close button or ESC key */
|
||||
|
||||
me.logout();
|
||||
close_window(); /*Close window and OpenGL context */
|
||||
close_window(); ! Close window and OpenGL context
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,19 +1,37 @@
|
|||
set :Vec to type {
|
||||
f32 :x,
|
||||
f32 :y,
|
||||
f32 :z,
|
||||
};
|
||||
type Vec {
|
||||
init(f32 x, f32 y, f32 z) {
|
||||
set this.x to x;
|
||||
set this.y to y;
|
||||
set this.z to z;
|
||||
}
|
||||
}
|
||||
|
||||
set :Color to type {
|
||||
i8 :r,
|
||||
i8 :g,
|
||||
i8 :b,
|
||||
};
|
||||
type Color {
|
||||
init(i8 r, i8 g, i8 b) {
|
||||
set this.r to r;
|
||||
set this.g to g;
|
||||
set this.b to b;
|
||||
}
|
||||
}
|
||||
|
||||
set :Player to type {
|
||||
str :username,
|
||||
Vec :pos,
|
||||
Color :color,
|
||||
};
|
||||
type Player {
|
||||
init (9p server, str username, Vec pos, Color color) {
|
||||
set this.server to server;
|
||||
set this.username to username;
|
||||
set this.pos to pos;
|
||||
set this.color to color;
|
||||
}
|
||||
|
||||
set immutable :purple to Color {255 255 0};
|
||||
login (str password) Player[] {
|
||||
this.server.auth(this.username, password);
|
||||
set this.players to server.open("players");
|
||||
return players.read();
|
||||
}
|
||||
|
||||
logout() {
|
||||
this.players.flush();
|
||||
this.server.clunk();
|
||||
}
|
||||
}
|
||||
|
||||
const purple is Color(255, 255, 0);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use "common.ztl"
|
||||
use "common.ztl";
|
||||
|
||||
fn :main (i32 :argc []str :argv) i32 {
|
||||
set s to 9p {
|
||||
fn main (i32 argc, str[] argv) i32 {
|
||||
set s to 9p (
|
||||
version,
|
||||
auth,
|
||||
error,
|
||||
|
@ -15,59 +15,61 @@ fn :main (i32 :argc []str :argv) i32 {
|
|||
clunk,
|
||||
remove,
|
||||
stat,
|
||||
};
|
||||
);
|
||||
|
||||
s.host("0.0.0.0:25565")
|
||||
};
|
||||
s.host("0.0.0.0:25565");
|
||||
|
||||
fn :version(9pmsg :m) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
};
|
||||
fn version(9pmsg m) {
|
||||
|
||||
fn :auth(9pmsg :m) {
|
||||
}
|
||||
|
||||
};
|
||||
fn auth(9pmsg m) {
|
||||
|
||||
fn :error(9pmsg :m) {
|
||||
}
|
||||
|
||||
};
|
||||
fn error(9pmsg m) {
|
||||
|
||||
fn :flush(9pmsg :m) {
|
||||
}
|
||||
|
||||
};
|
||||
fn flush(9pmsg m) {
|
||||
|
||||
fn :attach(9pmsg :m) {
|
||||
}
|
||||
|
||||
};
|
||||
fn attach(9pmsg m) {
|
||||
|
||||
fn :walk(9pmsg :m) {
|
||||
}
|
||||
|
||||
};
|
||||
fn walk(9pmsg m) {
|
||||
|
||||
fn :open(9pmsg :m) {
|
||||
}
|
||||
|
||||
};
|
||||
fn open(9pmsg m) {
|
||||
|
||||
fn :create(9pmsg :m) {
|
||||
}
|
||||
|
||||
};
|
||||
fn create(9pmsg m) {
|
||||
|
||||
fn :read(9pmsg :m) {
|
||||
}
|
||||
|
||||
};
|
||||
fn read(9pmsg m) {
|
||||
|
||||
fn :write(9pmsg :m) {
|
||||
}
|
||||
|
||||
};
|
||||
fn write(9pmsg m) {
|
||||
|
||||
fn :clunk(9pmsg :m) {
|
||||
}
|
||||
|
||||
};
|
||||
fn clunk(9pmsg m) {
|
||||
|
||||
fn :remove(9pmsg :m) {
|
||||
}
|
||||
|
||||
};
|
||||
fn remove(9pmsg m) {
|
||||
|
||||
fn :stat(9pmsg :m) {
|
||||
}
|
||||
|
||||
};
|
||||
fn stat(9pmsg m) {
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue