From 4c3d99f8e662b1570c39a9831eac1667d980e119 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 9 Oct 2025 01:47:12 +0000 Subject: [PATCH 1/2] Initial commit of modified files from installation Co-authored-by: zhang.lyuan --- cpputest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpputest b/cpputest index 40d62a2..e332d88 160000 --- a/cpputest +++ b/cpputest @@ -1 +1 @@ -Subproject commit 40d62a2cec9fbf5626ea90f3afbe451ceb6dac8c +Subproject commit e332d88164090beba1060bd3159aea5ded3f5bba From b5f44bd44513c87608cd25abe16f09a23c730192 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 9 Oct 2025 05:38:34 +0000 Subject: [PATCH 2/2] Fix typo in Makefile and add shutdown server functionality Co-authored-by: zhang.lyuan --- Makefile | 10 +++++----- src/html_ui/html_game.c | 3 +++ src/html_ui/html_game.h | 2 +- src/main.o | Bin 0 -> 3168 bytes 4 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 src/main.o diff --git a/Makefile b/Makefile index 896ea8d..d0366ba 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ INCLUDE_DIRS =\ $(SRC_DIRS)\ $(CPPUTEST_HOME)/include -PRDUCT_MAIN_OBJ = src/main.o +PRODUCT_MAIN_OBJ = src/main.o include $(CPPUTEST_HOME)/build/MakefileWorker.mk @@ -40,8 +40,8 @@ $(EVALUATOR_LIB) : .PHONY: product product : $(PRODUCT) -$(PRODUCT): $(TARGET_LIB) $(PRDUCT_MAIN_OBJ) $(EVALUATOR_LIB) $(CPPUTEST_LIB) +$(PRODUCT): $(TARGET_LIB) $(PRODUCT_MAIN_OBJ) $(EVALUATOR_LIB) $(CPPUTEST_LIB) @echo 'Building target: $@' - $(CC) -o $@ -g $^ $(LD_LIBRARIES) - @echo 'Running the game. Go to your browser to play at http://localhst:8888' - ./$(PRODUCT) \ No newline at end of file + g++ -o $@ -g $(PRODUCT_MAIN_OBJ) $(TARGET_LIB) $(EVALUATOR_LIB) $(CPPUTEST_LIB) $(LD_LIBRARIES) + @echo 'Build completed. To run the game, execute: ./$(PRODUCT)' + @echo 'Then go to your browser to play at http://localhost:8888' \ No newline at end of file diff --git a/src/html_ui/html_game.c b/src/html_ui/html_game.c index f3239ba..f592f79 100644 --- a/src/html_ui/html_game.c +++ b/src/html_ui/html_game.c @@ -7,6 +7,9 @@ #include "agent.h" #include "ui_agent.h" +// Define the global function pointer +void (*shutdown_server)(void) = NULL; + static int ui_adaptor_pool_add_ui_adaptor(agent_t * ui); static agent_t * ui_adaptor_pool_get_ui_adaptor_by_id(int id); static void ui_adaptor_pool_remove(int id); diff --git a/src/html_ui/html_game.h b/src/html_ui/html_game.h index eb105ca..ac135c0 100644 --- a/src/html_ui/html_game.h +++ b/src/html_ui/html_game.h @@ -9,6 +9,6 @@ #define HTML_GAME_H_ int execute_game_command(const char * command, const char *parameters, char * buffer, int buffer_size); -void (*shutdown_server)(void); +extern void (*shutdown_server)(void); #endif /* HTML_GAME_H_ */ diff --git a/src/main.o b/src/main.o new file mode 100644 index 0000000000000000000000000000000000000000..4921fd5367bb43e9fe05a1acb37fe4673d800968 GIT binary patch literal 3168 zcmb_eO=uit7=C9bv)%0GXR~RW#8|Ubm$pKuNd%P^+f`}1LhvA@)PqcCcPE=A`xAC% z)2N6-K@1h~q{Wk7#Dizgg2h5F6$CGyi$w}rya=tt_nG6o+#81R zaAF)Cc9a_n3*qLP#zJb+dMcFZ_uE%K>t&z+dGz+3cW3@uFN_e4rr06Gtd+^$wNmMC zt%K<|twLtn8s(Ns=Pswx98a6Gwi4o;&>!ZUBlKW5VTerLq$HT^kpz>pL#Y{ z(WLA^(Ik`dnl=zkDhw1QeZ_r2t5c5GZ_Fn}c{qf>G=#@iCB<1EVt;c8|HTkq&J|V^ ztMOee=#O=kS{ zeo*gT?Kr;I%&(t=3lCfuG-Ouw~#p zj=$D&8+)RoC<>ZwPqE&*v)1GK_@#C`b@H~oT0iidsAQfpNcDi*JeR<&lI_3UM*n}{ z2ye80ekJA~>d>9ULC_FW!}A3WXIDpADf0fvSp4n4UBf*oi-GF@R7HKGbevTwji^qh^ zKlowDw=~lB+dj<$N%{X)`L~rL)(`JaJpUQykbjYzjyYA-1)XGBYL)&yjnhpXWf0$Q z@e^CrmsJ0zI)Adys2^`ty#6PcL(F*nU6lyyt3&cj|1}SatlNE_L?+lih`3GtEkm3e z%Kt?u8l--q?z50I|Bn*pkMEWE%ewr^TvDk&DY7exR3Eqfh54lXU#k2S<%jjhUdHp| zd?03g{m-cdIm}}^B)|0E@u0b~i!wjZ?e3}k@~uREK>Q+&sKi8k?J;&)k+Ki)!@sV0 G{r>`mnJp3k literal 0 HcmV?d00001