Skip to content

Commit

Permalink
Added discSkipToFrame function to SINGE.
Browse files Browse the repository at this point in the history
Added MadDog 1 to seektest.

git-svn-id: https://www.daphne-emu.com:9443/daphnesvn/branches/v_1_0@3165 c98d566b-fa28-4d4c-8a7b-932307ef5c1a
  • Loading branch information
matt committed Feb 5, 2010
1 parent f295225 commit 449fa24
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 1 deletion.
2 changes: 2 additions & 0 deletions daphne-changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Daphne Changelog

Next
- Added Time Traveler to seektest.
- Added Mad Dog 1 to seektest.
- Added SINGE function "discSkipToFrame".

v1.0.7
- Updated source code so it builds on the latest g++
Expand Down
12 changes: 12 additions & 0 deletions src/game/seektest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,14 @@ void seektest::set_preset(int val)
m_late2 = 53646;
strcpy(m_name, "Time Traveler");
break;
case 22: // Mad Dog 1
m_disc_fps = 29.97;
m_early1 = 137;
m_early2 = 138;
m_late1 = 38970;
m_late2 = 38971;
strcpy(m_name, "Mad Dog 1");
break;
default:
printline("SEEKTEST ERROR : unknown preset");
break;
Expand Down Expand Up @@ -539,6 +547,10 @@ bool seektest::handle_cmdline_arg(const char *arg)
{
set_preset(21);
}
else if (strcasecmp(arg, "-maddog")==0)
{
set_preset(22);
}

// no match
else
Expand Down
37 changes: 37 additions & 0 deletions src/game/singe/singeproxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ void sep_startup(const char *script)
lua_register(g_se_lua_context, "discSkipBackward", sep_skip_backward);
lua_register(g_se_lua_context, "discSkipBlanking", sep_skip_blanking);
lua_register(g_se_lua_context, "discSkipForward", sep_skip_forward);
lua_register(g_se_lua_context, "discSkipToFrame", sep_skip_to_frame);
lua_register(g_se_lua_context, "discStepBackward", sep_step_backward);
lua_register(g_se_lua_context, "discStepForward", sep_step_forward);
lua_register(g_se_lua_context, "discStop", sep_stop);
Expand Down Expand Up @@ -1040,6 +1041,42 @@ static int sep_skip_forward(lua_State *L)
return 0;
}

/*
static int sep_search(lua_State *L)
{
char s[6] = { 0 };
int n = lua_gettop(L);
if (n == 1)
if (lua_isnumber(L, 1))
{
g_pSingeIn->framenum_to_frame(lua_tonumber(L, 1), s);
g_pSingeIn->pre_search(s, true);
}
return 0;
}
*/

static int sep_skip_to_frame(lua_State *L)
{
int n = lua_gettop(L);

if (n == 1)
{
if (lua_isnumber(L, 1))
{
// TODO : implement this for real on the daphne side of things instead of having to do a search/play hack
char s[6] = { 0 };
g_pSingeIn->framenum_to_frame(lua_tonumber(L, 1), s);
g_pSingeIn->pre_search(s, true);
g_pSingeIn->pre_play();
}
}

return 0;
}

static int sep_sound_load(lua_State *L)
{
int n = lua_gettop(L);
Expand Down
1 change: 1 addition & 0 deletions src/game/singe/singeproxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ static int sep_sprite_height(lua_State *L);
static int sep_sprite_load(lua_State *L);
static int sep_sprite_width(lua_State *L);
static int sep_skip_forward(lua_State *L);
static int sep_skip_to_frame(lua_State *L);
static int sep_step_backward(lua_State *L);
static int sep_step_forward(lua_State *L);
static int sep_stop(lua_State *L);
2 changes: 1 addition & 1 deletion src/unit_tests/video_stubs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ void vid_blank()
{
}

void draw_string(char *t, int col, int row, SDL_Surface *overlay)
void draw_string(const char *t, int col, int row, SDL_Surface *overlay)
{
SDL_FillRect(overlay, NULL, 0xFFFFFFFF);
}
Expand Down

0 comments on commit 449fa24

Please sign in to comment.