mirror of
https://github.com/NevermindZZT/letter-shell.git
synced 2025-01-21 10:02:54 +08:00
优化 推箱子加入game命令组
This commit is contained in:
parent
698626bc46
commit
5425dbef84
@ -11,11 +11,15 @@
|
||||
#include "shell_cmd_group.h"
|
||||
|
||||
extern int main_2048(int argc, char *argv[]);
|
||||
extern int main_pushbox(int argc, char* argv[]);
|
||||
|
||||
|
||||
ShellCommand gameGroup[] =
|
||||
{
|
||||
SHELL_CMD_GROUP_ITEM(SHELL_TYPE_CMD_MAIN, 2048, main_2048,
|
||||
game 2048\n2048 [param]\nParam: blackwhite bluered or null),
|
||||
SHELL_CMD_GROUP_ITEM(SHELL_TYPE_CMD_MAIN,
|
||||
pushbox, main_pushbox, game pushbox),
|
||||
SHELL_CMD_GROUP_END()
|
||||
};
|
||||
SHELL_EXPORT_CMD_GROUP(SHELL_CMD_PERMISSION(0)|SHELL_CMD_TYPE(SHELL_TYPE_CMD_MAIN), game, gameGroup, games);
|
||||
|
@ -5,8 +5,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
|
||||
#define printf(...) shellPrint(shellPushbox, ##__VA_ARGS__)
|
||||
@ -91,6 +89,7 @@ void pushbox_print_map()
|
||||
}
|
||||
printf( "\r\n");
|
||||
}
|
||||
printf("w,a,s,d or q\n");
|
||||
}
|
||||
|
||||
//推箱子
|
||||
@ -182,6 +181,3 @@ int main_pushbox(int argc, char* argv[])
|
||||
printf( "\033[?25l\033[2J");
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
SHELL_EXPORT_CMD(
|
||||
SHELL_CMD_PERMISSION(0) | SHELL_CMD_TYPE(SHELL_TYPE_CMD_MAIN) | SHELL_CMD_DISABLE_RETURN,
|
||||
pushbox, main_pushbox, game pushbox);
|
Loading…
x
Reference in New Issue
Block a user