forked from KolibriOS/kolibrios
Marble Match-3 game release candidate
git-svn-id: svn://kolibrios.org@5324 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
ffb9d09ce6
commit
c5b22e42d3
@ -68,7 +68,7 @@ void kol_wnd_resize(unsigned w, unsigned h)
|
||||
void wnd_draw()
|
||||
{
|
||||
|
||||
char tmp[] = "Fps:000 | Marble Match-3 Beta by Roman Shuvalov";
|
||||
char tmp[] = "Fps:000 | Marble Match-3 ";
|
||||
|
||||
kol_paint_start();
|
||||
|
||||
|
@ -646,11 +646,7 @@ void GameTerm() {
|
||||
|
||||
void GameKeyDown(int key, int first) {
|
||||
|
||||
if (key == RS_KEY_A) {
|
||||
|
||||
game.time = 50;
|
||||
|
||||
};
|
||||
|
||||
switch (key) {
|
||||
case RS_KEY_LEFT:
|
||||
@ -704,14 +700,6 @@ void GameKeyDown(int key, int first) {
|
||||
|
||||
if (game.status == STATUS_PLAYING) {
|
||||
|
||||
|
||||
#ifndef RS_KOS
|
||||
if (key == RS_KEY_SPACE) {
|
||||
game.score = 101;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
if (key == RS_KEY_ESCAPE) {
|
||||
game.time = 0;
|
||||
game.score = 0;
|
||||
@ -719,13 +707,6 @@ void GameKeyDown(int key, int first) {
|
||||
game.need_redraw = 1;
|
||||
};
|
||||
|
||||
if (key == RS_KEY_A) {
|
||||
soundbuf_play(&game.sound_bang);
|
||||
};
|
||||
// if (key == RS_KEY_Z) {
|
||||
// soundbuf_play(&game.sound_tack);
|
||||
// };
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -211,6 +211,14 @@ typedef struct rs_game_t {
|
||||
extern rs_game_t game;
|
||||
void game_reg_init();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* __
|
||||
/cc\
|
||||
/aaaa\
|
||||
@ -218,6 +226,10 @@ void game_reg_init();
|
||||
\eeee/
|
||||
------------------------------- */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void GameProcess();
|
||||
|
||||
void game_ding(int i);
|
||||
|
@ -5,23 +5,6 @@
|
||||
|
||||
#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();
|
||||
|
@ -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) {
|
||||
|
||||
// unsigned char *scaled_buffer = malloc(w*k_scale*h*k_scale*3);
|
||||
int i, j;
|
||||
|
||||
|
||||
// if (scaled_buffer != NULL) {
|
||||
|
||||
int i, j;
|
||||
|
||||
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];
|
||||
};
|
||||
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);
|
||||
// }
|
||||
// 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);
|
||||
|
||||
|
||||
kol_paint_image(0, 0, w*k_scale, h*k_scale, scaled_buffer);
|
||||
|
||||
};
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#define RS_STRINGS_H
|
||||
|
||||
#ifndef RS_KOS
|
||||
#include "strings_ru.h"
|
||||
#include "strings_en.h"
|
||||
#else
|
||||
|
||||
#ifdef LANG_RU
|
||||
|
Loading…
Reference in New Issue
Block a user