Mercurial > otakunoraifu
changeset 18:4d7486cb20a9
Sync with upstream
author | thib |
---|---|
date | Tue, 16 Sep 2008 15:30:03 +0000 |
parents | a95c130b567b |
children | 94fe9153efa5 |
files | README autogen.sh config.h.in music2/koedec_ogg.cc music2/music.cc scn2k/scn2k_grp.cc scn2k/scn2k_text.cc window/button.cc |
diffstat | 8 files changed, 42 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/README +++ b/README @@ -76,6 +76,9 @@ です。 履歴 + 2008/9/1 0.07hb + Thibaut GIRKA さんの英語版 CLANNAD 用パッチをmerge + CLANNAD / KANOGI で動かなくなっているところがあったので修正 2008/1/6 0.07h し〜くるさんの Zaurus 版のパッチを merge libmad / tremor (libvorbisidec) に対応する
--- a/autogen.sh +++ b/autogen.sh @@ -1,7 +1,7 @@ #!/bin/sh -autoheader -aclocal -I . -I /usr/local/share/aclocal -autoconf +autoheader259 +aclocal19 -I . -I /usr/local/share/aclocal +autoconf259 # gcc 3.0.2 用の修正 # gtkmm の autoconf が変でエラーが出るので # 強制的にエラーの元になる行を削除
--- a/config.h.in +++ b/config.h.in @@ -1,4 +1,12 @@ /* config.h.in. Generated from configure.in by autoheader. */ +/* gettext 用 */ +#undef ENABLE_NLS +#undef HAVE_CATGETS +#undef HAVE_GETTEXT +#undef HAVE_LC_MESSAGES +#undef HAVE_STPCPY +#undef PACKAGE +#undef VERSION /* default display size */ #undef DISPSIZE @@ -139,5 +147,5 @@ /* Define to empty if `const' does not conform to ANSI C. */ #undef const -/* Define to `unsigned int' if <sys/types.h> does not define. */ +/* Define to `unsigned' if <sys/types.h> does not define. */ #undef size_t
--- a/music2/koedec_ogg.cc +++ b/music2/koedec_ogg.cc @@ -98,10 +98,20 @@ static long ogg_tellfunc(void* datasourc static int ogg_closefunc(void* datasource) { return 0; } + +static int fseek_wrap(FILE *f,ogg_int64_t off,int whence){ + if(f==NULL)return(-1); + return fseek(f,off,whence); +} + + int ogg_get_rate(FILE *stream) { OggVorbis_File vf; - ov_callbacks callback(OV_CALLBACKS_DEFAULT); + ov_callbacks callback; + callback.read_func = (size_t (*)(void*, size_t, size_t, void*))fread; + callback.seek_func = (int (*)(void*, ogg_int64_t, int))fseek_wrap; + callback.tell_func = (long int (*)(void*))ftell; callback.close_func = NULL; ov_test_callbacks(stream, &vf, NULL, 0, callback); int rate = vf.vi->rate;
--- a/music2/music.cc +++ b/music2/music.cc @@ -44,6 +44,7 @@ using namespace std; #define MUSIC_VOLUME 0.2 +#define MUSIC_VOLUME 1 int pcm_enable = 0; Mix_Chunk *play_chunk[MIX_PCM_SIZE];
--- a/scn2k/scn2k_grp.cc +++ b/scn2k/scn2k_grp.cc @@ -78,8 +78,8 @@ struct GrpObj { vector<Rect> src_pos; enum GrpType { FILLRECT = 1, FILE = 2, GAN = 3, MOJI = 4, DIGIT = 5} gtype; enum Attribute { NONE=0, WIPEON=1, SATURATE=2, HIDDEN=4, HIDDEN_GROUP=8, - UPDATE_PICTURE = 8, UPDATE_POS = 16, UPDATE_ALPHA = 32, UPDATE_SNUM = 64, UPDATE_CLIP = 128, UPDATE_VISIBLE = 256, - UPDATE_ALL = (8|16|32|64|128|256), + UPDATE_PICTURE = 16, UPDATE_POS = 32, UPDATE_ALPHA = 64, UPDATE_SNUM = 128, UPDATE_CLIP = 256, UPDATE_VISIBLE = 512, + UPDATE_ALL = (16|32|64|128|256|512), ANM_PLAYSTART = 0x8000, ANM_PLAYING = 0x10000, DIG_ZERO = 0x10000*2, DIG_SIGN = 0x10000*4, DIG_PACK=0x10000*8,DIG_SPACE=0x10000*16 }; @@ -235,7 +235,7 @@ int GrpObj::PosY() { } void GrpObj::SetUpdate(void) { attr = Attribute (attr | UPDATE_PICTURE); - Update(); //FIXME + //Update(); //FIXME } void GrpObj::SetPos(int index, int x,int y) { if (index < 0 || index > 8) { @@ -338,7 +338,7 @@ void GrpObj::Update(void) { } if (picture == 0) return; if (attr & UPDATE_POS) { - if (attr & SATURATE) { + if ( (attr & SATURATE) || zoom != -1) { int w=0, h=0; GetSrcGeom(w,h); picture->Move(_posx-w/2, _posy-h/2); @@ -709,7 +709,10 @@ void GrpObj::CreateGanSpecial(Event::Con void GrpObj::SetZoomRotate(int new_zoom, int new_rotate) { if (zoom == new_zoom && rotate == new_rotate) return; - if (new_zoom != -1) zoom = new_zoom; + if ( zoom == -1 || new_zoom == -1) { + attr = Attribute(attr | UPDATE_POS); // centering する + } + zoom = new_zoom; if (new_rotate != -1) rotate = new_rotate; if (zoom < 0) zoom = 256; if (rotate < 0) rotate = 0; @@ -1217,6 +1220,7 @@ bool GrpImpl::Pressed(int x, int y, void* pointer) { // マウスクリックでキャンセル if (g->status == WAIT_ANM) g->AbortAnm(); if (g->status == WAIT_SHAKE && g->anm2 != 0) { + g->anm2->Abort(); delete g->anm2; g->anm2 = 0; } @@ -1847,7 +1851,7 @@ void GrpImpl::Exec(Cmd& cmd) { CreateObj(cmd.args[0].value); if (cmd.cmd3 == 0x3e8 || cmd.cmd3 == 0x3eb || cmd.cmd3 == 0x4b0 || cmd.cmd3 == 0x578) { // FILE, GAN, MOJI, DIGIT ならば座標等の設定を行う - if (cmd.cmd4 >= 1+base_argc) { + if (cmd.cmd4 >= 1) { if (cmd.args[2+base_argc].value == 0) { if (cmd.cmd1 == 1) g.attr = GrpObj::Attribute(g.attr | GrpObj::HIDDEN | GrpObj::HIDDEN_GROUP); @@ -1862,10 +1866,10 @@ void GrpImpl::Exec(Cmd& cmd) { if (cmd.cmd1 == 1) SetObjChangedGroup(cmd.args[0].value); } - if (cmd.cmd4 >= 2+base_argc) { // 座標等も設定 + if (cmd.cmd4 >= 2) { // 座標等も設定 g.SetPos(0,cmd.args[3+base_argc].value, cmd.args[4+base_argc].value); } - if ( (cmd.cmd3 == 0x3e8 || cmd.cmd3 == 0x3eb) && cmd.cmd4 >= 4+base_argc) { // pattern 番号も設定 + if ( (cmd.cmd3 == 0x3e8 || cmd.cmd3 == 0x3eb) && cmd.cmd4 >= 3) { // pattern 番号も設定 g.SetSurfaceNum(cmd.args[5+base_argc].value); base_argc++; // 0x3e8 (FILE) / 0x3eb (GAN) の場合のみこのオプションは存在する }
--- a/scn2k/scn2k_text.cc +++ b/scn2k/scn2k_text.cc @@ -620,7 +620,7 @@ void TextImpl::show(int num) { } } void TextImpl::DrawBacklog(BacklogItem& item, Cmd& cmd) { - text->show(); + show(); text->wid->deactivate(); status_mask = Status(status_mask | BACKLOG_WAIT_MASK); drawn_backlog_item = item; @@ -632,7 +632,7 @@ void TextImpl::DrawBacklog(BacklogItem& item.text = text_stream; text_stream = saved_text; } - item.text.InsertColor(0, item.text.container.size(), 0xff,0xff,0); + item.text.InsertColor(0, item.text.container.size(), 0xff,0xff,0); text->StartText(item.text); text->wid->Flush(); if (item.face.empty()) text->ResetFace();
--- a/window/button.cc +++ b/window/button.cc @@ -28,6 +28,7 @@ /* r,g,b の基本色で number (0:left 1:right 2:up 3:down)の矢印のビットマップを作成する ** width/heightのどちらかを-1にすると、それにあわせてスケール */ +#include <stdlib.h> extern char* create_button(int number, int& width, int& height, int r, int g, int b); extern char* create_box(int& width, int& height, int r, int g, int b);