rnd-20100214-2-src
[rocksndiamonds.git] / src / tools.c
index 07c5a491bb7a37e9962cd540c5900830f01b9703..773a59db1efd0efbe2a2ab69b5d6cf566ff7c37a 100644 (file)
@@ -7735,6 +7735,29 @@ void InitGraphicInfo_EM(void)
 #endif
 }
 
+void getGraphicSource_SP(struct GraphicInfo_SP *g_sp,
+                        int graphic, int sync_frame, int x, int y)
+{
+  int frame = getGraphicAnimationFrame(graphic, sync_frame);
+
+  getGraphicSource(graphic, frame, &g_sp->bitmap, &g_sp->src_x, &g_sp->src_y);
+}
+
+boolean isRandomAnimation_SP(int graphic)
+{
+  return (ANIM_MODE(graphic) == ANIM_RANDOM);
+}
+
+boolean isNextAnimationFrame_SP(int graphic, int sync_frame)
+{
+  return (IS_NEXT_FRAME(sync_frame, graphic));
+}
+
+int getGraphicInfo_Delay(int graphic)
+{
+  return graphic_info[graphic].anim_delay;
+}
+
 void PlayMenuSoundExt(int sound)
 {
   if (sound == SND_UNDEFINED)