game/main.c

53 lines
1.1 KiB
C
Raw Normal View History

2025-11-23 18:21:50 +03:00
#include "axl.h"
2025-12-05 20:52:24 +03:00
#include "axl_vlq.h"
2025-12-04 16:52:03 +03:00
#include <windows.h>
2025-11-23 18:21:50 +03:00
2025-11-23 20:57:09 +03:00
int _start(void)
2025-11-23 18:21:50 +03:00
{
2025-12-04 16:52:03 +03:00
SetConsoleOutputCP(CP_UTF8);
2025-11-23 18:21:50 +03:00
axl_init();
2025-12-04 16:52:03 +03:00
axl_puts("Привет, мир!");
axl_puts("Hello, world!");
axl_puts("Bonjour le monde!");
axl_puts("Hola mundo!");
axl_puts("こんにちは世界!");
axl_puts("你好世界!");
axl_puts("안녕하세요 세계!");
axl_puts("สวัสดีชาวโลก!");
axl_puts("नमस्ते दुनिया!");
axl_puts("مرحبا بالعالم!");
2025-12-02 21:30:20 +03:00
void* fds = axl_malloc(83);
2025-11-23 20:57:09 +03:00
int* f = axl_malloc(sizeof(int));
2025-11-23 18:21:50 +03:00
*f = 4;
2025-11-27 20:42:39 +03:00
*(int*)(fds) = 4;
(void)axl_memcmp(f, fds, 4);
axl_free(fds);
axl_free(f);
2025-11-23 20:57:09 +03:00
(void)fds;
2025-11-23 18:21:50 +03:00
(void)f;
2025-12-05 20:52:24 +03:00
2025-12-05 20:52:39 +03:00
u32 new_len = 0;
2025-12-05 20:52:24 +03:00
u8 src[] = "Bonjour le monde!";
u32 src_len = axl_strlen((i8*)src);
for(u32 i = 0; i < src_len; i += 4)
{
u8 buff[AXL_VLQ_MAX_LEN + 1];
u32 encoded_l = axl_vlq_encode(*((u32*)(src + i)), buff);
2025-12-05 20:52:39 +03:00
new_len += encoded_l;
2025-12-05 20:52:24 +03:00
buff[encoded_l] = '\0';
axl_puts((i8*)buff);
}
2025-12-05 20:52:39 +03:00
(void)new_len;
2025-12-05 20:52:24 +03:00
2025-11-23 18:21:50 +03:00
return 0;
}