/
Base.h
186 lines (159 loc) · 4.02 KB
/
Base.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
// vim: set fdm=marker ts=4 sw=4:
#ifndef _BASE_H_
#define _BASE_H_
// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include <wx/generic/aboutdlgg.h>
#include <wx/aboutdlg.h>
#include <wx/url.h> //for wxURL/wxURI
#include <wx/cmdline.h>
#include <wx/dnd.h>
#include <wx/process.h>
#include <wx/txtstrm.h>
#include <wx/list.h>
#include <wx/tokenzr.h>
#include <wx/app.h>
#include <wx/grid.h>
#include <wx/laywin.h>
#include <wx/treectrl.h>
#include <wx/spinctrl.h>
#include <wx/artprov.h>
#include <wx/clipbrd.h>
#include <wx/combobox.h>
#include <wx/colordlg.h>
#include <wx/wxhtml.h>
#include <wx/imaglist.h>
#include <wx/dataobj.h>
#include <wx/dcclient.h>
#include <wx/bmpbuttn.h>
#include <wx/menu.h>
#include <wx/toolbar.h>
#include <wx/tooltip.h>
#include <wx/statusbr.h>
#include <wx/msgdlg.h>
#include <wx/textdlg.h>
#include <wx/timer.h>
#include <wx/statline.h>
#include <wx/listctrl.h>
#include <wx/dir.h>
#include <wx/dirctrl.h>
#include <wx/file.h>
#include <wx/mimetype.h>
#include <wx/regex.h>
#include <wx/taskbar.h>
#include <wx/xml/xml.h>
#include <wx/aui/aui.h>
#include <wx/stc/stc.h>
#include <wx/ffile.h>
#include <wx/bitmap.h>
#include <wx/mstream.h>
#include <wx/stream.h>
#include <wx/sstream.h>
#include <wx/config.h>
#include <wx/confbase.h>
#include <wx/fileconf.h>
#include <wx/fontenum.h>
#include <wx/socket.h>
#include <wx/hash.h>
#include <wx/clipbrd.h>
#include <wx/thread.h>
#include <wx/image.h>
#include <wx/dcbuffer.h>
#include <wx/colordlg.h>
#include <wx/popupwin.h>
#include <wx/strconv.h>
// boost
#include <boost/shared_ptr.hpp>
#include <boost/regex.hpp>
// stl
#include <vector>
#include <map>
#include <algorithm>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <signal.h>
#include <SDL/SDL.h>
#include <SDL/SDL_mixer.h>
wxBitmap wxGetBitmapFromMemory(const void * data, size_t length);
// adlib
#include "adlib.h"
#include "outchip.h"
#include "setfreq.h"
#include "fmopl.h"
#include "convert.h"
#include "Bnk.h"
#include "Ims.h"
#include "PeakMeter.h"
#include "Sound.h"
#include "ActionPanel.h"
#include "SliderPanel.h"
#include "IssViewer.h"
#include "Hangul.h"
#include "Iss.h"
// gfxwidgets
#include "GButton.h"
#include "GSlider.h"
#include "GHanLabel.h"
using namespace std;
#define STOP 0
#define PLAYING 1
#define STOPPED 2
#define SONG_END 3
#define REPEAT_NO 0 // 지금 곡 연주하고 중지
#define REPEAT_ALL 1 // 지금 곡 연주 끝나면 다음곡으로..
#define REPEAT_THIS 2 // 지금 곡 반복 연주
#define PREPARE_BUFFER_COUNT 20
#define PREPARE_BUFFER_SIZE 512*2
// --------------------------------------------
extern wxString exePath;
extern int m_volume;
extern int m_playMode;
extern int m_repeatMode;
extern int m_playingBuffer;
extern int m_playingBufferIndex;
void init_prepare_pcm_buffer(void);
void alloc_prepare_pcm_buffer (int bufferIndex);
void free_prepare_pcm_buffer (int bufferIndex);
void prepare_next (void *userdata, int len, int bufferIndex);
// --------------------------------------------
enum {
ID_INVOKE_APP = wxID_HIGHEST+1,
ID_OPEN_FILE,
ID_ABORT,
ID_START,
ID_RUN,
ID_GO,
ID_STEP_INTO,
ID_STEP_OUT,
ID_STEP_OVER,
ID_RUN_TO_CURSOR,
ID_TOGGLE_BREAKPOINT,
ID_CLEAR_ALL_BREAKPOINTS,
ID_STOP,
ID_VIEW_CONSOLE,
ID_VIEW_WATCH,
ID_VIEW_CALLSTACK,
ID_VIEW_BREAKPOINT,
ID_VIEW_REGISTER,
ID_VIEW_MEMORY,
ID_REPEAT_NO,
ID_REPEAT_THIS,
ID_REPEAT_ALL,
};
// --------------------------------------------
#define MENU_BAR myFrame->m_menuBar
#define STATUS_BAR myFrame->m_statusBar
#define CONFIG myFrame->m_config
#define M_MGR myFrame->m_mgr
#define MEMORY myFrame->m_memory
#define SLIDER myFrame->m_slider
#define GET_BITMAP(name) \
wxBitmap(exePath + wxT("/icons/") + \
wxString(name, wxConvUTF8) + \
wxT(".png"), wxBITMAP_TYPE_PNG)
#endif