Marble Match-3 game release candidate

git-svn-id: svn://kolibrios.org@5324 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
alpine 2014-12-31 12:40:51 +00:00
parent ffb9d09ce6
commit c5b22e42d3
6 changed files with 25 additions and 65 deletions

View File

@ -68,7 +68,7 @@ void kol_wnd_resize(unsigned w, unsigned h)
void wnd_draw() void wnd_draw()
{ {
char tmp[] = "Fps:000 | Marble Match-3 Beta by Roman Shuvalov"; char tmp[] = "Fps:000 | Marble Match-3 ";
kol_paint_start(); kol_paint_start();

View File

@ -646,11 +646,7 @@ void GameTerm() {
void GameKeyDown(int key, int first) { void GameKeyDown(int key, int first) {
if (key == RS_KEY_A) {
game.time = 50;
};
switch (key) { switch (key) {
case RS_KEY_LEFT: case RS_KEY_LEFT:
@ -704,14 +700,6 @@ void GameKeyDown(int key, int first) {
if (game.status == STATUS_PLAYING) { if (game.status == STATUS_PLAYING) {
#ifndef RS_KOS
if (key == RS_KEY_SPACE) {
game.score = 101;
};
#endif
if (key == RS_KEY_ESCAPE) { if (key == RS_KEY_ESCAPE) {
game.time = 0; game.time = 0;
game.score = 0; game.score = 0;
@ -719,13 +707,6 @@ void GameKeyDown(int key, int first) {
game.need_redraw = 1; game.need_redraw = 1;
}; };
if (key == RS_KEY_A) {
soundbuf_play(&game.sound_bang);
};
// if (key == RS_KEY_Z) {
// soundbuf_play(&game.sound_tack);
// };
}; };
}; };

View File

@ -211,6 +211,14 @@ typedef struct rs_game_t {
extern rs_game_t game; extern rs_game_t game;
void game_reg_init(); void game_reg_init();
/* __ /* __
/cc\ /cc\
/aaaa\ /aaaa\
@ -218,6 +226,10 @@ void game_reg_init();
\eeee/ \eeee/
------------------------------- */ ------------------------------- */
void GameProcess(); void GameProcess();
void game_ding(int i); void game_ding(int i);

View File

@ -5,23 +5,6 @@
#define GAME_COLORS_COUNT 8 #define GAME_COLORS_COUNT 8
//#define GAME_COLOR_BLACK 0
//#define GAME_COLOR_WHITE 1
//#define GAME_COLOR_YELLOW 2
//#define GAME_COLOR_RED 3
//#define GAME_COLOR_BLUE 4
//#define GAME_COLOR_ORANGE 5
//#define GAME_COLOR_GRAY 6
//#define GAME_COLOR_GREEN 7
//
//#define GAME_FONT_DEFAULT 0
//#define GAME_FONT_HEAVY 1
//#define GAME_FONT_TITLE 2
//#define GAME_FONT_LIGHT 3
//
//#define GAME_ALIGN_LEFT 0
//#define GAME_ALIGN_CENTER 1
//#define GAME_ALIGN_RIGHT 2
void game_font_init(); void game_font_init();

View File

@ -265,33 +265,17 @@ void rskos_snd_stop(SNDBUF *hbuf) {
void rskos_draw_area(int x, int y, int w, int h, int k_scale, unsigned char *data, unsigned char *scaled_buffer, int image_format) { void rskos_draw_area(int x, int y, int w, int h, int k_scale, unsigned char *data, unsigned char *scaled_buffer, int image_format) {
// unsigned char *scaled_buffer = malloc(w*k_scale*h*k_scale*3); int i, j;
for (i = 0; i < h*k_scale; i++) {
// if (scaled_buffer != NULL) { for (j = 0; j < w*k_scale; j++) {
scaled_buffer[ (i*w*k_scale + j)*3 + 0] = data[ ( (i/k_scale)*w + (j/k_scale) )*4 + 0];
int i, j; scaled_buffer[ (i*w*k_scale + j)*3 + 1] = data[ ( (i/k_scale)*w + (j/k_scale) )*4 + 1];
scaled_buffer[ (i*w*k_scale + j)*3 + 2] = data[ ( (i/k_scale)*w + (j/k_scale) )*4 + 2];
for (i = 0; i < h*k_scale; i++) {
for (j = 0; j < w*k_scale; j++) {
scaled_buffer[ (i*w*k_scale + j)*3 + 0] = data[ ( (i/k_scale)*w + (j/k_scale) )*4 + 0];
scaled_buffer[ (i*w*k_scale + j)*3 + 1] = data[ ( (i/k_scale)*w + (j/k_scale) )*4 + 1];
scaled_buffer[ (i*w*k_scale + j)*3 + 2] = data[ ( (i/k_scale)*w + (j/k_scale) )*4 + 2];
};
}; };
};
kol_paint_image(0, 0, w*k_scale, h*k_scale, scaled_buffer); kol_paint_image(0, 0, w*k_scale, h*k_scale, scaled_buffer);
// }
// else {
// //kol_paint_image_pal(0, 0, w, h, data, &image_format)
// h/=4;
// asm volatile ("int $0x40"::"a"(65), "b"(data), "c"(w*65536+h), "d"(0*65536+0), "D"(0), "S"(24) );
//// asm volatile ("int $0x40"::"a"(7), "c"(w*65536+h), "d"(x*65536+y), "b"(data));
// };
//
//// free(image_data);
}; };

View File

@ -2,7 +2,7 @@
#define RS_STRINGS_H #define RS_STRINGS_H
#ifndef RS_KOS #ifndef RS_KOS
#include "strings_ru.h" #include "strings_en.h"
#else #else
#ifdef LANG_RU #ifdef LANG_RU