This source file includes following definitions.
- hook_raw_image_addr
- vid_get_viewport_live_fb
- vid_get_bitmap_fb
- vid_get_viewport_fb
- vid_get_viewport_fb_d
- vid_get_viewport_width
- vid_get_viewport_height
- camera_jpeg_count_str
- vid_get_palette_type
- vid_get_palette_size
- vid_get_bitmap_active_palette
- vid_get_bitmap_active_buffer
- vid_get_viewport_width_proper
- vid_get_viewport_height_proper
- vid_get_viewport_fullscreen_height
- vid_get_viewport_fullscreen_width
- vid_get_viewport_display_xoffset_proper
- vid_get_viewport_display_yoffset_proper
1 #include "platform.h"
2
3 char *hook_raw_image_addr()
4 {
5 return (char*)0x41643DEC;
6
7
8 }
9
10 void *vid_get_viewport_live_fb()
11 {
12
13 void **fb=(void **)0x210C;
14 unsigned char buff = *((unsigned char*)0x1F74);
15 if (buff == 0) {
16 buff = 2;
17 }
18 else {
19 buff--;
20 }
21
22 return fb[buff] + *(int *)(0x1F74 + 0xd4);
23 }
24
25 void *vid_get_bitmap_fb()
26 {
27 return (void*)0x403F1000;
28 }
29
30 void *vid_get_viewport_fb()
31 {
32 return (void *)0x40A05158;
33 }
34
35 void *vid_get_viewport_fb_d()
36 {
37 return (void*)(*(int*)(0x2884 + 0x54));
38 }
39
40 int vid_get_viewport_width()
41 {
42 return 360;
43 }
44
45 long vid_get_viewport_height()
46 {
47 return 240;
48 }
49
50 char *camera_jpeg_count_str()
51 {
52 return (char *)0x525E4;
53 }
54
55
56
57 int vid_get_palette_type() { return 3; }
58 int vid_get_palette_size() { return 256*4; }
59
60 void *vid_get_bitmap_active_palette() {
61 return (void *)*(unsigned int*)(0x5164+0x28);
62 }
63 void *vid_get_bitmap_active_buffer()
64 {
65 return (void*)(*(int*)(0x5164+0x14));
66 }
67
68 extern int _GetVRAMHPixelsSize();
69 extern int _GetVRAMVPixelsSize();
70
71 int vid_get_viewport_width_proper() {
72 return ((mode_get()&MODE_MASK) == MODE_PLAY)?720:_GetVRAMHPixelsSize();
73 }
74
75 int vid_get_viewport_height_proper() {
76 return ((mode_get()&MODE_MASK) == MODE_PLAY)?240:_GetVRAMVPixelsSize();
77 }
78
79 int vid_get_viewport_fullscreen_height() {
80
81 int m = mode_get();
82 if((m&MODE_MASK) != MODE_PLAY && (m&MODE_SHOOTING_MASK) == MODE_STITCH) {
83 return 240;
84 }
85 return vid_get_viewport_height_proper();
86 }
87 int vid_get_viewport_fullscreen_width() {
88
89 int m = mode_get();
90 if((m&MODE_MASK) != MODE_PLAY && (m&MODE_SHOOTING_MASK) == MODE_STITCH) {
91 return 720;
92 }
93 return vid_get_viewport_width_proper();
94 }
95 int vid_get_viewport_display_xoffset_proper() {
96 int val=0;
97 int m = mode_get();
98 if((m&MODE_MASK) != MODE_PLAY && (m&MODE_SHOOTING_MASK) == MODE_STITCH) {
99 short dir=0;
100 short seq=0;
101 get_property_case(PROPCASE_STITCH_DIRECTION,&dir,sizeof(dir));
102 get_property_case(PROPCASE_STITCH_SEQUENCE,&seq,sizeof(seq));
103
104
105 if(dir==0) {
106 val = seq?270:90;
107 } else {
108 val = seq?90:270;
109 }
110 }
111 return val;
112 }
113 int vid_get_viewport_display_yoffset_proper() {
114 int m = mode_get();
115 return ((m&MODE_MASK) != MODE_PLAY && (m&MODE_SHOOTING_MASK) == MODE_STITCH)?60:0;
116 }