/programs/games/piton/kolibri.ld |
---|
File deleted |
/programs/games/piton/system/stdlib.c |
---|
File deleted |
/programs/games/piton/system/gblib.h |
---|
File deleted |
/programs/games/piton/system/string.c |
---|
File deleted |
/programs/games/piton/system/stdlib.h |
---|
File deleted |
/programs/games/piton/system/string.h |
---|
File deleted |
/programs/games/piton/system/kolibri.c |
---|
File deleted |
/programs/games/piton/system/gblib.c |
---|
File deleted |
/programs/games/piton/system/kolibri.h |
---|
File deleted |
/programs/games/piton/system |
---|
Property changes: |
Deleted: tsvn:logminsize |
-5 |
\ No newline at end of property |
/programs/games/piton/readme.txt |
---|
1,10 → 1,10 |
Èãðà Piton |
âåðñèÿ 0.3.1 |
âåðñèÿ 0.3 |
============== |
Ðåìåéê äëÿ ÎÑ Êîëèáðè. |
Èñïîëüçóåòñÿ áèáëèîòåêà gblib. |
Íàïèñàíà ñ èñïîëüçîâàíèåì áèáëèîòåêè gblib. |
Óïðàâëåíèå: |
- ñòðåëî÷êè |
15,7 → 15,7 |
àâòîð: Àëåêñàíäð Áîãîìàç aka Albom |
e-mail: albom85@yandex.ru |
site: http://albom85.narod.ru |
site: http://albom06.boom.ru |
30 ÿíâàðÿ 2011 ãîäà |
11 àïðåëÿ 2008 ãîäà |
/programs/games/piton/c_code.c |
---|
1,11 → 1,10 |
#include "kolibri.h" |
#include "stdio.h" |
#include "stdlib.h" |
#include "string.h" |
#include "system/kolibri.h" |
#include "system/stdlib.h" |
#include "system/string.h" |
#include "system/gblib.h" |
#include "gblib.h" |
#include "az3.h" |
#include "az4.h" |
24,7 → 23,7 |
//===================================== |
char STR_TITLE[] = {"Piton 0.3.1"}; |
char STR_TITLE[] = {"Piton 0.3"}; |
int mode; |
char score[10]; |
176,7 → 175,7 |
{ |
case 0: |
gb_bar(&screen, 0, 0, scrw, scrh, 0xbb); |
az_puts("Ï È Ò Î Í 0.3.1", 10, 60); |
az_puts("Ï È Ò Î Í 0.3", 10, 60); |
az_puts("ðåìåéê äëÿ ÎÑ Êîëèáðè", 10, 120); |
az_puts("àâòîð: À. Áîãîìàç", 10, 135); |
press_space(); |
204,7 → 203,7 |
az_puts("Ê Î Í Å Ö È Ã Ð Û", 10, 60); |
kol_screen_wait_rr(); |
kol_paint_image(0, 0, scrw, scrh, screen.bmp); |
kol_sleep(170); |
kol_sleep(120); |
mode = 0; |
return; |
}; |
283,7 → 282,7 |
for (;;) |
{ |
kol_sleep(7); |
kol_sleep(9); |
if ( 1 == mode) |
{ |
/programs/games/piton/compile.bat |
---|
1,12 → 1,5 |
del *.o |
fasm asm_code.asm asm_code.o |
fasm asm_code.asm |
gcc -c c_code.c |
gcc -c system/kolibri.c |
gcc -c system/stdlib.c |
gcc -c system/string.c |
gcc -c system/gblib.c |
ld -nostdlib -T kolibri.ld -o piton asm_code.o kolibri.o stdlib.o string.o gblib.o c_code.o |
objcopy piton -O binary |
kpack piton |
del *.o |
ld -nostdlib -T kolibri.ld -o piton.kex asm_code.obj kolibri.o stdlib.o string.o gblib.o c_code.o |
objcopy piton.kex -O binary |
pause |
/programs/games/piton/gblib.h |
---|
0,0 → 1,17 |
typedef struct |
{ |
int w __attribute__((packed)); |
int h __attribute__((packed)); |
char *bmp __attribute__((packed)); |
char *alpha __attribute__((packed)); |
} GB_BMP __attribute__((packed)); |
void gb_pixel_set(GB_BMP *b, int x, int y, unsigned c); |
int gb_pixel_get(GB_BMP *b, int x, int y, unsigned *c); |
void gb_line(GB_BMP *b, int x1, int y1, int x2, int y2, unsigned c); |
void gb_rect(GB_BMP *b, int x, int y, int w, int h, unsigned c); |
void gb_bar(GB_BMP *b, int x, int y, int w, int h, unsigned c); |
void gb_circle(GB_BMP *b, int x, int y, int r, unsigned c); |
void gb_image_set(GB_BMP *b_dest, int x_d, int y_d, GB_BMP *b_src, int x_s, int y_s, int w, int h); |
void gb_image_set_t(GB_BMP *b_dest, int x_d, int y_d, GB_BMP *b_src, int x_s, int y_s, int w, int h, unsigned c); |
/programs/games/piton/kolibri.h |
---|
0,0 → 1,73 |
#define NULL ((void*)0) |
typedef struct |
{ |
unsigned p00 __attribute__((packed)); |
unsigned p04 __attribute__((packed)); |
unsigned p08 __attribute__((packed)); |
unsigned p12 __attribute__((packed)); |
unsigned p16 __attribute__((packed)); |
char p20 __attribute__((packed)); |
char *p21 __attribute__((packed)); |
} kol_struct70 __attribute__((packed)); |
typedef struct |
{ |
unsigned p00 __attribute__((packed)); |
char p04 __attribute__((packed)); |
char p05[3] __attribute__((packed)); |
unsigned p08 __attribute__((packed)); |
unsigned p12 __attribute__((packed)); |
unsigned p16 __attribute__((packed)); |
unsigned p20 __attribute__((packed)); |
unsigned p24 __attribute__((packed)); |
unsigned p28 __attribute__((packed)); |
unsigned p32[2] __attribute__((packed)); |
} kol_struct_BDVK __attribute__((packed)); |
typedef struct |
{ |
char *name __attribute__((packed)); |
void *data __attribute__((packed)); |
} kol_struct_import __attribute__((packed)); |
void kol_exit(); |
void kol_sleep(unsigned d); |
void kol_wnd_define(unsigned x, unsigned y, unsigned w, unsigned h, unsigned c); |
void kol_wnd_caption(char *s); |
void kol_event_mask(unsigned e); |
unsigned kol_event_wait(); |
unsigned kol_event_wait_time(unsigned time); |
unsigned kol_event_check(); |
void kol_paint_start(); |
void kol_paint_end(); |
void kol_paint_pixel(unsigned x, unsigned y, unsigned c); |
void kol_paint_bar(unsigned x, unsigned y, unsigned w, unsigned h, unsigned c); |
void kol_paint_line(unsigned x1, unsigned y1, unsigned x2, unsigned y2, unsigned c); |
void kol_paint_string(unsigned x, unsigned y, char *s, unsigned c); |
void kol_paint_image(unsigned x, unsigned y, unsigned w, unsigned h, char *d); |
unsigned kol_key_get(); |
void kol_btn_define(unsigned x, unsigned y, unsigned w, unsigned h, unsigned d, unsigned c); |
unsigned kol_btn_get(); |
void kol_btn_type(unsigned t); |
unsigned kol_mouse_pos(); |
unsigned kol_mouse_posw(); |
unsigned kol_mouse_btn(); |
void kol_board_putc(char c); |
void kol_board_puts(char *s); |
unsigned kol_file_70(kol_struct70 *k); |
kol_struct_import* kol_cofflib_load(char *name); |
void* kol_cofflib_procload (kol_struct_import *imp, char *name); |
unsigned kol_cofflib_procnum (kol_struct_import *imp); |
void kol_cofflib_procname (kol_struct_import *imp, char *name, unsigned n); |
unsigned kol_system_cpufreq(); |
unsigned kol_system_mem(); |
unsigned kol_system_memfree(); |
unsigned kol_system_time_get(); |
void kol_path_file2dir(char *dir, char *fname); |
void kol_path_full(char *full, char *fname); |
void kol_screen_wait_rr(); |
unsigned kol_skin_height(); |
/programs/games/piton/stdlib.h |
---|
0,0 → 1,14 |
#define RAND_MAX 0x7FFFU |
#define isspace(c) ((c)==' ') |
#define abs(i) (((i)<0)?(-(i)):(i)) |
#define random(num) ((rand()*(num))/((RAND_MAX+1))) |
void* malloc(unsigned size); |
void free(void *pointer); |
void* realloc(void* pointer, unsigned size); |
void srand (unsigned seed); |
int rand (void); |
/programs/games/piton/string.h |
---|
0,0 → 1,9 |
void* memset(void *mem, int c, unsigned size); |
void* memcpy(void *dst, const void *src, unsigned size); |
char* strcat(char* strDest, const char* strSource); |
int strcmp(const char* string1, const char* string2); |
char* strcpy(char *strDest, const char *strSource); |
char* strncpy(char *strDest, const char *strSource, unsigned n); |
int strlen(const char* string); |