diff options
Diffstat (limited to 'Game')
-rw-r--r-- | Game/Code/Classes/UVisualizer.pas | 33 | ||||
-rw-r--r-- | Game/Code/Screens/UScreenSing.pas | 6 |
2 files changed, 39 insertions, 0 deletions
diff --git a/Game/Code/Classes/UVisualizer.pas b/Game/Code/Classes/UVisualizer.pas index 6fb5b7a7..08e4b594 100644 --- a/Game/Code/Classes/UVisualizer.pas +++ b/Game/Code/Classes/UVisualizer.pas @@ -133,6 +133,39 @@ end; procedure TVideoPlayback_ProjectM.MoveTo(Time: real); begin + // this code MAY be able to be cut down... but Im not 100% sure.. + // in here, we cant realy move to a specific time, since its all random generated + // but a call to this function will change the preset, which changes the pattern + projectM_reset(pm); +
+ pm^.fullscreen := 0;
+ pm^.renderTarget^.texsize := texsize;
+ pm^.gx := gx;
+ pm^.gy := gy;
+ pm^.fps := fps;
+ pm^.renderTarget^.usePbuffers := 0;
+
+ pm^.fontURL := PChar(projectM_Dir+'/fonts');
+ pm^.presetURL := PChar(projectM_Dir+'/presets');
+
+ glPushAttrib(GL_ALL_ATTRIB_BITS);
+ projectM_init(pm);
+ glMatrixMode(GL_PROJECTION);
+ glPushMatrix();
+ glMatrixMode(GL_MODELVIEW);
+ glPushMatrix();
+ glMatrixMode(GL_TEXTURE);
+ glPushMatrix();
+
+ projectM_resetGL(pm, ScreenW, ScreenH);
+ glMatrixMode(GL_PROJECTION);
+ glPopMatrix();
+ glMatrixMode(GL_MODELVIEW);
+ glPopMatrix();
+ glMatrixMode(GL_TEXTURE);
+ glPopMatrix();
+ glPopAttrib(); + end; function TVideoPlayback_ProjectM.getPosition: real; diff --git a/Game/Code/Screens/UScreenSing.pas b/Game/Code/Screens/UScreenSing.pas index b3b92446..e62b9339 100644 --- a/Game/Code/Screens/UScreenSing.pas +++ b/Game/Code/Screens/UScreenSing.pas @@ -157,6 +157,12 @@ begin VideoPlayback.play;
end; + + SDLK_TAB: //Change Visualization Preset + begin + if AktSong.VideoLoaded then
+ VideoPlayback.MoveTo( now ); // move to a random position
+ end;
SDLK_RETURN: begin |