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_proper
- vid_get_viewport_height_proper
- camera_jpeg_count_str
- vid_get_bitmap_active_palette
- vid_get_bitmap_active_buffer
- _MoveFocusLensToDistance
1 #include "platform.h"
2 #include "lolevel.h"
3 #include "debug_led.h"
4
5 char *hook_raw_image_addr()
6 {
7 return (char*)0x1056B960;
8 }
9
10 void *vid_get_viewport_live_fb()
11 {
12
13
14
15
16
17
18
19
20 void **fb=(void **)0x5364;
21 unsigned char buff = *((unsigned char*)0x537c);
22 if (buff == 0) {
23 buff = 2;
24 }
25 else {
26 buff--;
27 }
28 return fb[buff];
29 }
30
31 void *vid_get_bitmap_fb()
32 {
33 return (void*)0x103C79A0;
34 }
35
36 void *vid_get_viewport_fb()
37 {
38 return (void*) 0x105F2C4C;
39 }
40
41 void *vid_get_viewport_fb_d()
42 {
43 return (void*)(*(int*)0x72fdc);
44 }
45
46 int vid_get_viewport_width_proper() {
47 int m = mode_get();
48 if((m&MODE_MASK) == MODE_PLAY) {
49 return 720;
50 }
51
52 if((m&MODE_SHOOTING_MASK) == MODE_STITCH) {
53 return 360;
54 }
55 return *(int*)0x36630;
56 }
57
58 int vid_get_viewport_height_proper() {
59 int m = mode_get();
60 if((m&MODE_MASK) == MODE_PLAY) {
61 return 240;
62 }
63
64 if((m&MODE_SHOOTING_MASK) == MODE_STITCH) {
65 return 120;
66 }
67 return *(int*)0x36634;
68 }
69
70 char *camera_jpeg_count_str()
71 {
72 return (char*)0x81c70;
73 }
74
75 void *vid_get_bitmap_active_palette() {
76 return (void *)0x72cf8;
77 }
78
79 void *vid_get_bitmap_active_buffer()
80 {
81 return (void*)(*(int*)0x6adc);
82 }
83
84 volatile char* bitmap_buffer[2] = { (char*)0x103c79a0, (char*)(0x103c79a0 + 0x15180) };
85
86
87 extern void _orig_MoveFocusLensToDistance(short *dist);
88
89 void _MoveFocusLensToDistance(short *dist)
90 {
91
92
93
94
95
96 int shmode, afl;
97 _GetPropertyCase(PROPCASE_SHOOTING_MODE, &shmode, 4);
98 _GetPropertyCase(PROPCASE_AF_LOCK, &afl, 4);
99 if (shmode == 19)
100 {
101 if (get_movie_status() != 4) return;
102 }
103 else if (!afl)
104 {
105 return;
106 }
107 int speedlimitflag = *(int*)0xb23c;
108 *(int*)0xb23c = 0;
109 _orig_MoveFocusLensToDistance(dist);
110 *(int*)0xb23c = speedlimitflag;
111 }