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_buffer
- vid_get_viewport_fullscreen_width
- vid_get_viewport_fullscreen_height
- vid_get_viewport_display_xoffset_proper
- vid_get_viewport_display_yoffset_proper
1 #include "platform.h"
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 char *hook_raw_image_addr()
18 {
19
20
21
22
23
24
25 return (char*)(0x424B41C0);
26 }
27
28
29 void *vid_get_viewport_live_fb()
30 {
31 void **fb=(void **)0x2180;
32 unsigned char buff = *((unsigned char*)0x1FD8);
33 if (buff == 0) buff = 2; else buff--;
34 return fb[buff];
35 }
36
37
38 void *vid_get_bitmap_fb()
39 {
40 return (void*)0x403F1000;
41 }
42
43
44 void *vid_get_viewport_fb()
45 {
46 return (void*)0x415F9E20;
47 }
48
49
50 void *vid_get_viewport_fb_d()
51 {
52
53 return (void*)(*(int*)(0x2950+0x58));
54 }
55
56
57 int vid_get_viewport_width()
58 {
59 return 360;
60 }
61
62 long vid_get_viewport_height()
63 {
64 return 240;
65 }
66
67 char *camera_jpeg_count_str()
68 {
69 return (void*)0x5408C;
70 }
71
72
73 int vid_get_palette_type() { return 3; }
74 int vid_get_palette_size() { return 256*4; }
75
76
77
78
79
80
81 void *vid_get_bitmap_active_buffer()
82 {
83 return (void*)(*(int*)(0x5744+0x14));
84 }
85
86 extern int _GetVRAMHPixelsSize();
87 extern int _GetVRAMVPixelsSize();
88
89 int vid_get_viewport_fullscreen_width() {
90 int mode = mode_get()&MODE_MASK;
91 int mode_shoot = mode_get()&MODE_SHOOTING_MASK;
92 return ((mode == MODE_PLAY) ||
93 (mode != MODE_PLAY && mode_shoot == MODE_STITCH))?720:_GetVRAMHPixelsSize();
94 }
95
96 int vid_get_viewport_fullscreen_height() {
97 int mode = mode_get()&MODE_MASK;
98 int mode_shoot = mode_get()&MODE_SHOOTING_MASK;
99 return ((mode == MODE_PLAY) ||
100 (mode != MODE_PLAY && mode_shoot == MODE_STITCH))?240:_GetVRAMVPixelsSize();
101 }
102
103 int vid_get_viewport_display_xoffset_proper() {
104 int val=0;
105 int mode = mode_get()&MODE_MASK;
106 int mode_shoot = mode_get()&MODE_SHOOTING_MASK;
107 if(mode != MODE_PLAY && mode_shoot == MODE_STITCH) {
108 short dir=0;
109 short seq=0;
110 get_property_case(PROPCASE_STITCH_DIRECTION,&dir,sizeof(dir));
111 get_property_case(PROPCASE_STITCH_SEQUENCE,&seq,sizeof(seq));
112
113
114 if(dir==0) {
115 val = seq?270:90;
116 } else {
117 val = seq?90:270;
118 }
119 }
120 return val;
121 }
122
123 int vid_get_viewport_display_yoffset_proper() {
124 int mode = mode_get()&MODE_MASK;
125 int mode_shoot = mode_get()&MODE_SHOOTING_MASK;
126 return (mode != MODE_PLAY && mode_shoot == MODE_STITCH)?70:0;
127 }