/programs/games/heliothryx/localization-tool/font.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/programs/games/heliothryx/localization-tool/index.html |
---|
File deleted |
/programs/games/heliothryx/Tupfile.lua |
---|
1,21 → 1,8 |
if tup.getconfig("NO_FASM") ~= "" or tup.getconfig("NO_GCC") ~= "" then return end |
-- tup.rule("echo \"#define LANG_" .. ((tup.getconfig("LANG") == "") and "en" or tup.getconfig("LANG")) .. "\" > lang.h", {"lang.h"}) |
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR") |
tup.include(HELPERDIR .. "/use_gcc.lua") |
tup.include(HELPERDIR .. "/use_sound.lua") |
LDFLAGS = LDFLAGS .. " -T kolibri.ld" |
tup.append_table(OBJS, tup.rule("start.asm", "fasm %f %o", "start.o")) |
if tup.getconfig("LANG") == "ru" |
then C_LANG = "LANG_RU" |
elseif tup.getconfig("LANG") == "sp" |
then C_LANG = "LANG_SP" -- just for example, other languages are not implemented |
else C_LANG = "LANG_EN" -- default language is English |
end |
CFLAGS = CFLAGS .. " -DRS_KOS -D" .. C_LANG .. " " |
compile_gcc{ "system/kolibri.c", "game/rs/rsmicrolibc.c", "game/rs/rsplatform_kos.c", "game/rs/rsmx.c", "game/rsnoise.c", "game/rsgentex.c", "game/rsgame.c", "game/rsgamedraw.c", "game/rskos.c", "game/rsgametext.c", "game/rsgamemenu.c"} |
compile_gcc{"system/kolibri.c", "game/rs/rsmicrolibc.c", "game/rs/rsplatform_kos.c", "game/rs/rsmx.c", "game/rsnoise.c", "game/rsgentex.c", "game/rsmain.c", "game/rsgame.c", "game/rsgamedraw.c", "game/rskos.c", "game/rsgametext.c", "game/rsgamemenu.c"} |
link_gcc ("heliothryx") |
/programs/games/heliothryx/game/rs/rsmicrolibc.c |
---|
170,24 → 170,5 |
} |
char* strchr(char* s, int c) { |
while (*s) { |
if (*s == (char) c) { |
return s; |
}; |
s++; |
}; |
return NULL; |
}; |
unsigned int strlen ( char * str ) { |
unsigned int len = 0; |
while ( *str ) { |
len++; |
str++; |
}; |
return len; |
}; |
/programs/games/heliothryx/game/rs/rsmicrolibc.h |
---|
50,7 → 50,4 |
void* memset(void *mem, int c, unsigned size); |
void* memcpy(void *dst, const void *src, unsigned size); |
char* strchr(char* s, int c); |
unsigned int strlen ( char * str ); |
#endif |
/programs/games/heliothryx/game/rs/rsplatform.h |
---|
40,26 → 40,22 |
#define RS_KEY_X 45 |
unsigned int get_time(); |
typedef void RSFUNC0(); |
/*typedef void RSFUNC1i(int); |
typedef void RSFUNC1i(int); |
typedef void RSFUNC2i(int,int); |
typedef void RSFUNC1i1f(int,float); */ |
typedef void RSFUNC1i1f(int,float); |
typedef RSFUNC0 *PRSFUNC0; |
/*typedef RSFUNC1i *PRSFUNC1i; |
typedef RSFUNC1i *PRSFUNC1i; |
typedef RSFUNC2i *PRSFUNC2i; |
typedef RSFUNC1i1f *PRSFUNC1i1f;*/ |
typedef RSFUNC1i1f *PRSFUNC1i1f; |
/* |
void NullFunc0(); |
void NullFunc1i(int i); |
void NullFunc2i(int i, int j); |
void NullFunc1i1f(int i, float f); |
*/ |
typedef struct rs_app_t { |
66,26 → 62,21 |
unsigned short app_time; |
unsigned short delta_time; |
/* |
PRSFUNC2i OnSize; |
PRSFUNC2i OnKeyDown; |
PRSFUNC1i OnKeyUp; |
PRSFUNC2i OnMouseDown; |
PRSFUNC2i OnMouseUp; |
PRSFUNC0 OnAppProcess; |
PRSFUNC0 rsAppOnInitDisplay; |
PRSFUNC0 rsAppOnTermDisplay; |
*/ |
} rs_app_t; |
extern rs_app_t rs_app; |
//void rsAppZero(); |
void rsAppZero(); |
/programs/games/heliothryx/game/rs/rsplatform_kos.c |
---|
240,3 → 240,5 |
kol_exit(); |
} |
/programs/games/heliothryx/game/rsgame.c |
---|
24,7 → 24,6 |
#endif |
rs_game_t game; |
163,24 → 162,6 |
for (i = 0; i < snd->length_samples; i++) { |
snd->data[i] = ( 1.0 - 1.0*i/snd->length_samples ) * sin( ( (1.0 - 0.48*i/snd->length_samples) * freq ) *i) * amp; |
}; |
/* |
// ok |
rs_sgen_init(2, snd->length_samples); |
rs_sgen_func_pm(1, 880.0, 21.0, 0.3, 110.0, 0.3); |
rs_sgen_func_normalize(1, 1.0); |
rs_sgen_func_lowpass(0, 1, 1.0, 0.0, 1.0); |
rs_sgen_wave_out(0); |
memcpy(snd->data, rs_sgen_reg.wave_out, snd->length_samples*2 ); |
rs_sgen_term(); |
*/ |
rskos_snd_update_buffer(&snd->hbuf, snd->data, snd->length_samples); |
}; |
215,7 → 196,7 |
game.status = STATUS_MENU; |
game.window_scale = 2; |
#ifndef RS_KOS |
#ifdef RS_LINUX |
game.window_scale = 3; |
window_scale_str[3] = '3'; |
#endif |
440,7 → 421,7 |
rs_gen_term(); |
#ifndef RS_KOS |
#ifdef RS_LINUX |
rs_audio_init(RS_AUDIO_FMT_MONO16, RS_AUDIO_FREQ_16000, 0); |
#endif |
465,7 → 446,7 |
DEBUG10("--- Game Term ---"); |
#ifndef RS_KOS |
#ifdef RS_LINUX |
rs_audio_term(); |
#endif |
530,7 → 511,6 |
if ( (game.menu_index == MENU_SETTINGS) && (game.menu_item_index == MENU_ITEM_WINDOW_SCALE) ) { |
game_change_window_scale(-1); |
game_ding(1); |
}; |
//PlayBuffer(hBuff, 0); |
540,7 → 520,6 |
if ( (game.menu_index == MENU_SETTINGS) && (game.menu_item_index == MENU_ITEM_WINDOW_SCALE) ) { |
game_change_window_scale(1); |
game_ding(1); |
}; |
//StopBuffer(hBuff); |
612,17 → 591,7 |
}; |
void GameMouseDown(int x, int y) { |
game.tx = x; |
game.ty = y; |
DEBUG10f("Mouse Down %d, %d \n", x, y); |
}; |
void GameMouseUp(int x, int y) { |
// |
}; |
void game_change_window_scale(int d) { |
int scale = window_scale_str[3] - '0'; |
652,9 → 621,6 |
rskos_resize_window( GAME_WIDTH * scale, GAME_HEIGHT * scale ); |
window_scale_str[3] = scale + '0'; |
}; |
void game_ding(int i) { |
/programs/games/heliothryx/game/rsgame.h |
---|
8,15 → 8,7 |
*/ |
#ifndef RS_LINUX |
#ifndef RS_WIN32 |
#ifndef RS_KOS |
#error Please specify platform |
#endif |
#endif |
#endif |
#include "rskos.h" |
#include "rs/rsplatform.h" |
//#include "rs/rstexture.h" |
190,9 → 182,6 |
void GameKeyDown(int key, int first); |
void GameKeyUp(int key); |
void GameMouseDown(int x, int y); |
void GameMouseUp(int x, int y); |
void game_change_window_scale(int d); |
#endif // RSGAME_H_INCLUDED |
/programs/games/heliothryx/game/rsgamedraw.c |
---|
6,9 → 6,9 |
#include "rsnoise.h" |
#include "strings.h" |
void game_draw() { |
int w = 320; |
76,9 → 76,9 |
texture_draw(&game.framebuffer, &game.tex_rocks[i], 250+80*rs_noise(i,150), 60+60*rs_noise(i,1110), DRAW_MODE_ADDITIVE ); |
}; |
game_textout( GAME_WIDTH/2 - 100, 40, 1, "HELI0THRYX"); |
game_textout( GAME_WIDTH/2 - 8, 58, 3, "TECHDEM0"); |
game_textout( 2, GAME_HEIGHT-10, 2, L_BOTTOM_LINE_DEVELOPER_INFO); |
game_textout( GAME_WIDTH/2 - 100, 40, 1, "HELIOTHRYX"); |
game_textout( GAME_WIDTH/2 - 8, 58, 3, "TECHDEMO"); |
game_textout( 2, GAME_HEIGHT-10, 2, "DEVELOPER: ROMAN SHUVALOV` TOGLIATTI_ 2014"); |
}; |
} |
100,8 → 100,8 |
}; |
}; |
game_textout( 2, 2, 2, L_TECHDEMO_LINE1 ); |
game_textout( 2, 12, 2, L_TECHDEMO_LINE2 ); |
game_textout( 2, 2, 2, "THIS IS TECHDEMO` "); |
game_textout( 2, 12, 2, "USE ARROWS TO MOVE_ <A> TO SHOOT_ <ESC> TO EXIT` "); |
}; |
/programs/games/heliothryx/game/rsgamemenu.c |
---|
4,8 → 4,6 |
#include "rskos.h" |
#include "strings.h" |
PRSFUNC0 menu_actions[] = { |
/* a */ &menu_action_start, |
/* b */ &menu_action_exit, |
14,38 → 12,27 |
char window_scale_str[] = "c< 2X >"; |
/* |
First char: |
- letter a...z means action (a = 0th, b = 1st, c = 2nd, see menu_actions[] above) |
- number 0...9 means goto menu #0, #1, #2... see menu_titles[] below |
- space ' ' means no action, menu item is unselectable |
- empty string "" is now allowed and can cause segfault |
String from second char is label of menu item |
*/ |
char* menu_main_titles[] = { |
"a"L_START, |
"1"L_SETTINGS, |
"2"L_ABOUT, |
"b"L_QUIT, |
"a5TART", |
"15ETTING5", |
"2ABOUT", |
"bQUIT", |
0 |
}; |
char* menu_settings_titles[] = { |
" "L_WINDOW_SCALE, |
" WINDOW SCALE:", |
window_scale_str, |
" ", |
"0"L_DONE, |
"0DONE", |
0 |
}; |
char* menu_about_titles[] = { |
" "L_DEVELOPED_BY, |
" "L_ROMAN_SHUVALOV, |
" DEVELOPED BY", |
" ROMAN SHUVALOV", |
" ", |
"0"L_DONE, |
"0DONE", |
0 |
}; |
126,7 → 113,7 |
}; |
void menu_action_exit() { |
#ifdef RS_KOS |
#ifndef RS_LINUX |
GameTerm(); |
#endif |
rskos_exit(); |
/programs/games/heliothryx/game/rsgametext.c |
---|
217,7 → 217,7 |
11, 25, |
6, 0, |
// 31 not implemented - need to create up-left DOT for percent(%) sign |
// 31 not implemented |
16, 26-16, |
16, 26+16, |
16, 26, |
226,8 → 226,8 |
}; |
unsigned int ch_seg[64] = { |
0b00111111 /* | 1<<12 | 1<<19 */, // 0 or O |
uint32_t ch_seg[64] = { |
0b00111111, // // for cross-line in O | 1<<12 | 1<<19, // 0 |
1<<26 | 1<<8 | 1<<9 | 1<<3, // 1 |
0b01011011, // 2 |
1<<0 | 1<<12 | 1<<15 | 1<<2 | 1<<3, // 3 |
261,12 → 261,12 |
1<<5 | 1<<4 | 1<<3, // L |
1<<5 | 1<<4 | 1<<1 | 1<<2 | 1<<16 | 1<<12, // M |
1<<5 | 1<<4 | 1<<16 | 1<<11 | 1<<1 | 1<<2, // N |
1<<16 | 1<<11 | 1<<19 | 1<<12 | 1<<6 | 1<<8 | 1<<9, // O - FREE SYMBOL |
0b00111111, // O |
1<<4 | 1<<5 | 1<<0 | 1<<1 | 1<<6, // P |
1<<0 | 1<<1 | 1<<13 | 1<<27 | 1<<4 | 1<<5 | 1<<11, // Q // old: 0b00111111 | 1<<11, // Q |
1<<0 | 1<<1 | 1<<6 | 1<<5 | 1<<4 | 1<<11, // R |
(1 << 18 | 1 << 13) | (1 << 29 | 1 << 26) | (1 << 5 | 1 << 2) | (1 << 19 | 1 << 12), // percent(%) sign, s == 5 -> // 0b01101101, // S |
0b01101101, // S |
1<<0 | 1<<8 | 1<<9, // T |
1<<1 | 1<<2 | 1<<3 | 1<<4 | 1<<5, // U |
1<<1 | 1<<13 | 1<<17 | 1<<5, // V |
296,7 → 296,7 |
1<<4 | 1<<18 | 1<<28 | 1<<1 | 1<<2, // l // old symmetric: 1<<4 | 1<<18 | 1<<10 | 1<<2, // l // old: 1<<19 | 1<<12 | 1<<1 | 1<<2, // lЛ |
1<<5 | 1<<4 | 1<<3 | 1<<1 | 1<<2 | 1<<9 | 1<<21, // mЩ, |
1<<4 | 1<<5 | 1<<0 | 1<<1 | 1<<2, // n |
(1<<8 | 1<<9) | 1<<10 | 1<<18, // 'o' for arrow up ^ |
1<<0 | 1<<12 | 1<<15 | 1<<2 | 1<<3, // oЗ |
}; |
/programs/games/heliothryx/game/rskos.c |
---|
1,6 → 1,6 |
#include "rskos.h" |
#ifndef RS_KOS |
#ifdef RS_LINUX |
#include "rs/rstexture.h" |
#include "rs/rsgl.h" |
/programs/games/heliothryx/game/rskos.h |
---|
16,7 → 16,7 |
// sound |
#ifndef SNDBUF |
#ifndef RS_KOS |
#ifdef RS_LINUX |
#include "rs/rsaudio.h" |
typedef rs_sound_t* SNDBUF; |
#else |
/programs/games/heliothryx/game/rsmain.c |
---|
0,0 → 1,14 |
#include "rsmain.h" |
#include "rsgame.h" |
void rs_main_init() { |
rs_app.rsAppOnInitDisplay = GameInit; |
rs_app.rsAppOnTermDisplay = GameTerm; |
rs_app.OnKeyDown = GameKeyDown; |
rs_app.OnKeyUp = GameKeyUp; |
rs_app.OnAppProcess = GameProcess; |
}; |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/programs/games/heliothryx/game/rsmain.h |
---|
0,0 → 1,3 |
#include "rs/rsplatform.h" |
void rs_main_init(); |
Property changes: |
Added: svn:executable |
+* |
\ No newline at end of property |
/programs/games/heliothryx/game/rssoundgen.c |
---|
1,17 → 1,13 |
#include "rssoundgen.h" |
/* |
#include "rsnoise.h" |
#include "rs/rsmx.h" |
#ifdef RS_KOS |
#include "rs/rsplatform.h" |
#else |
#include <stdlib.h> |
#include <math.h> |
#include <string.h> |
#endif |
rs_sgen_reg_t rs_sgen_reg; |
458,4 → 454,4 |
}; |
}; |
*/ |
/programs/games/heliothryx/game/rssoundgen.h |
---|
3,8 → 3,10 |
#include "rsgame.h" |
//#include "rs/rsaudio.h" |
/* |
#include "rs/rsaudio.h" |
typedef struct rs_sgen_reg_t { |
int wave_length; |
int waves_count; |
38,6 → 40,6 |
//void rs_gen_func_mult_add_value(int dest, int src, float val_mult, float val_add); |
*/ |
#endif |
/programs/games/heliothryx/readme.utf8.txt |
---|
8,9 → 8,3 |
Heliothryx -- game that is developed for contest. |
Developer: Roman Shuvalov (http://board.kolibrios.org/memberlist.php?mode=viewprofile&u=6469) |
For Localization: |
Text strings are encoded in special format. |
Please check out special tool (localization-tool/index.html). |
There are instructions and text converter. |