#define get_screen_pitch() \
screen_pitch \
+#elif defined(PND_BUILD)
+
+static u16 *screen_pixels = NULL;
+
+#define get_screen_pixels() \
+ screen_pixels \
+
+#define get_screen_pitch() \
+ resolution_width \
+
#else
#ifdef GP2X_BUILD
#endif
+void expand_blend(u32 *screen_src_ptr, u16 *screen_dest_ptr,
+ u32 start, u32 end);
+
#ifndef ARM_ARCH
void expand_blend(u32 *screen_src_ptr, u16 *screen_dest_ptr,
screen_pixels = (u16 *)gpsp_gp2x_screen + screen_offset;
}
+#elif defined(PND_BUILD)
+
+void flip_screen()
+{
+ screen_pixels = fb_flip_screen();
+}
+
#else
#define integer_scale_copy_2() \
GE_CMD(NOP, 0);
}
-#elif defined(WIZ_BUILD)
+#elif defined(WIZ_BUILD) || defined(PND_BUILD)
void init_video()
{
*p++ = col;
}
+#elif defined(PND_BUILD)
+
+void video_resolution_large()
+{
+ resolution_width = 400;
+ resolution_height = 272;
+
+ fb_set_mode(400, 272, 1, 15, screen_filter);
+ flip_screen();
+ clear_screen(0);
+}
+
+void video_resolution_small()
+{
+ resolution_width = 240;
+ resolution_height = 160;
+
+ fb_set_mode(240, 160, 4, screen_scale, screen_filter);
+ flip_screen();
+ clear_screen(0);
+}
+
+void set_gba_resolution(video_scale_type scale)
+{
+ screen_scale = scale;
+}
+
+void clear_screen(u16 color)
+{
+ u32 col = ((u32)color << 16) | color;
+ u32 *p = (u32 *)get_screen_pixels();
+ int c = resolution_width * resolution_height / 2;
+ while (c-- > 0)
+ *p++ = col;
+}
+
#else
void video_resolution_large()
u32 pitch = get_screen_pitch();
u16 *dest_ptr = get_screen_pixels() + dest_x + (dest_y * pitch);
+ s32 w1 = dest_x + w > pitch ? pitch - dest_x : w;
u16 *src_ptr = src;
- u32 line_skip = pitch - w;
- u32 x, y;
+ s32 x, y;
for(y = 0; y < h; y++)
{
- for(x = 0; x < w; x++, src_ptr++, dest_ptr++)
+ for(x = 0; x < w1; x++)
{
- *dest_ptr = *src_ptr;
+ dest_ptr[x] = src_ptr[x];
}
- dest_ptr += line_skip;
+ src_ptr += w;
+ dest_ptr += pitch;
}
}