• R/O
  • HTTP
  • SSH
  • HTTPS

common_source_project-fm7: Commit

Common Source Code Project for Qt (a.k.a for FM-7).


Commit MetaInfo

Revisionb9662289461fdb1e69aa0d71a348a21a01dbf5b4 (tree)
Time2019-01-07 15:26:23
AuthorK.Ohta <whatisthis.sowhat@gmai...>
CommiterK.Ohta

Log Message

[VM][FMTOWNS] Apply namespace FMTOWNS to some devices.

Change Summary

Incremental Difference

--- a/source/src/vm/fmtowns/towns_crtc.cpp
+++ b/source/src/vm/fmtowns/towns_crtc.cpp
@@ -10,6 +10,7 @@
1010
1111 #include "towns_crtc.h"
1212
13+namespace FMTOWNS {
1314 enum {
1415 EVENT_CRTC_VSTART = 0,
1516 EVENT_CRTC_VST1 = 2,
@@ -447,3 +448,5 @@ bool TOWNS_CRTC::load_state(FILEIO* state_fio)
447448
448449 return true;
449450 }
451+
452+}
--- a/source/src/vm/fmtowns/towns_crtc.h
+++ b/source/src/vm/fmtowns/towns_crtc.h
@@ -88,42 +88,46 @@
8888 */
8989 #define TOWNS_CRTC_MAX_LINES 1024
9090 #define TOWNS_CRTC_MAX_PIXELS 1024
91-enum {
92- TOWNS_CRTC_REG_HSW1 = 0,
93- TOWNS_CRTC_REG_HSW2 = 1,
94- TOWNS_CRTC_REG_HST = 4,
95- TOWNS_CRTC_REG_VST1,
96- TOWNS_CRTC_REG_VST2,
97- TOWNS_CRTC_REG_EET,
91+namespace FMTOWNS {
92+
93+ enum {
94+ TOWNS_CRTC_REG_HSW1 = 0,
95+ TOWNS_CRTC_REG_HSW2 = 1,
96+ TOWNS_CRTC_REG_HST = 4,
97+ TOWNS_CRTC_REG_VST1,
98+ TOWNS_CRTC_REG_VST2,
99+ TOWNS_CRTC_REG_EET,
98100
99- TOWNS_CRTC_REG_VST, // 8
100- TOWNS_CRTC_REG_HDS0,
101- TOWNS_CRTC_REG_HDE0,
102- TOWNS_CRTC_REG_HDS1,
103- TOWNS_CRTC_REG_HDE1,
104- TOWNS_CRTC_REG_VDS0,
105- TOWNS_CRTC_REG_VDE0,
106- TOWNS_CRTC_REG_VDS1,
101+ TOWNS_CRTC_REG_VST, // 8
102+ TOWNS_CRTC_REG_HDS0,
103+ TOWNS_CRTC_REG_HDE0,
104+ TOWNS_CRTC_REG_HDS1,
105+ TOWNS_CRTC_REG_HDE1,
106+ TOWNS_CRTC_REG_VDS0,
107+ TOWNS_CRTC_REG_VDE0,
108+ TOWNS_CRTC_REG_VDS1,
107109
108- TOWNS_CRTC_REG_VDE1,
109- TOWNS_CRTC_REG_FA0,
110- TOWNS_CRTC_REG_HAJ0,
111- TOWNS_CRTC_REG_FO0,
112- TOWNS_CRTC_REG_LO0,
113- TOWNS_CRTC_REG_FA1,
114- TOWNS_CRTC_REG_HAJ1,
115- TOWNS_CRTC_REG_FO1,
110+ TOWNS_CRTC_REG_VDE1,
111+ TOWNS_CRTC_REG_FA0,
112+ TOWNS_CRTC_REG_HAJ0,
113+ TOWNS_CRTC_REG_FO0,
114+ TOWNS_CRTC_REG_LO0,
115+ TOWNS_CRTC_REG_FA1,
116+ TOWNS_CRTC_REG_HAJ1,
117+ TOWNS_CRTC_REG_FO1,
116118
117- TOWNS_CRTC_REG_LO1,
118- TOWNS_CRTC_REG_EHAJ,
119- TOWNS_CRTC_REG_EVAJ,
120- TOWNS_CRTC_REG_ZOOM,
121- TOWNS_CRTC_REG_DISPMODE, // 28
122- TOWNS_CRTC_REG_CLK, // 29
123- TOWNS_CRTC_REG_DUMMY, // 30
124- TOWNS_CRTC_REG_CTRL, // 31
125-};
119+ TOWNS_CRTC_REG_LO1,
120+ TOWNS_CRTC_REG_EHAJ,
121+ TOWNS_CRTC_REG_EVAJ,
122+ TOWNS_CRTC_REG_ZOOM,
123+ TOWNS_CRTC_REG_DISPMODE, // 28
124+ TOWNS_CRTC_REG_CLK, // 29
125+ TOWNS_CRTC_REG_DUMMY, // 30
126+ TOWNS_CRTC_REG_CTRL, // 31
127+ };
128+}
126129
130+namespace FMTOWNS {
127131 class TOWNS_CRTC : public DEVICE
128132 {
129133 private:
@@ -282,6 +286,7 @@ public:
282286 }
283287
284288 };
289+}
285290
286291 #endif
287292
--- a/source/src/vm/fmtowns/towns_memory.cpp
+++ b/source/src/vm/fmtowns/towns_memory.cpp
@@ -10,6 +10,8 @@
1010 #include "./towns_memory.h"
1111 #include "../i386.h"
1212
13+namespace FMTOWNS {
14+
1315 void TOWNS_MEMORY::initialize()
1416 {
1517
@@ -1153,3 +1155,5 @@ bool TOWNS_MEMORY::process_state(FILEIO* state_fio, bool loading)
11531155 }
11541156 return true;
11551157 }
1158+
1159+}
--- a/source/src/vm/fmtowns/towns_memory.h
+++ b/source/src/vm/fmtowns/towns_memory.h
@@ -39,6 +39,7 @@ class I386;
3939 // c2201000 - fffbffff : Reserved.
4040 // FFFC0000 - FFFFFFFF : Towns System ROM.
4141
42+namespace FMTOWNS {
4243 enum {
4344 TOWNS_MEMORY_NORMAL = 0,
4445 TOWNS_MEMORY_FMR_VRAM,
@@ -57,17 +58,22 @@ enum {
5758 TOWNS_MEMORY_TYPE_WAVERAM,
5859 TOWNS_MEMORY_TYPE_SYSTEM_ROM,
5960 };
60-
61+}
6162 // Please set from config
6263 #define TOWNS_EXTRAM_PAGES 6
6364
6465 class I386;
6566 class BEEP;
66-class TOWNS_VRAM;
67-class TOWNS_SPRITE;
68-class TOWNS_ROM_CARD;
69-class TOWNS_CMOS;
70-class TOWNS_PCM;
67+
68+namespace FMTOWNS {
69+ class TOWNS_VRAM;
70+ class TOWNS_SPRITE;
71+ class TOWNS_ROM_CARD;
72+ class TOWNS_CMOS;
73+ class TOWNS_PCM;
74+}
75+
76+namespace FMTOWNS {
7177 class TOWNS_MEMORY : public DEVICE
7278 {
7379 protected:
@@ -220,5 +226,6 @@ public:
220226
221227 };
222228
229+}
223230 #endif
224231
--- a/source/src/vm/fmtowns/towns_sprite.cpp
+++ b/source/src/vm/fmtowns/towns_sprite.cpp
@@ -10,6 +10,8 @@
1010 #include "../../common.h"
1111 #include "./towns_sprite.h"
1212
13+namespace FMTOWNS {
14+
1315 void TOWNS_SPRITE::initialize(void)
1416 {
1517 memset(index_ram, 0x00, sizeof(index_ram));
@@ -824,3 +826,5 @@ bool TOWNS_SPRITE::load_state(FILEIO *state_fio)
824826 }
825827 return true;
826828 }
829+
830+}
--- a/source/src/vm/fmtowns/towns_sprite.h
+++ b/source/src/vm/fmtowns/towns_sprite.h
@@ -16,46 +16,51 @@
1616 #define SIG_FMTOWNS_RENDER_SPRITE_CLEAR_VRAM 263
1717
1818
19-enum {
20- ROT_FMTOWNS_SPRITE_0 = 0,
21- ROT_FMTOWNS_SPRITE_90,
22- ROT_FMTOWNS_SPRITE_180,
23- ROT_FMTOWNS_SPRITE_270
24-};
25-
26-
27-class TOWNS_VRAM;
19+namespace FMTOWNS {
20+ enum {
21+ ROT_FMTOWNS_SPRITE_0 = 0,
22+ ROT_FMTOWNS_SPRITE_90,
23+ ROT_FMTOWNS_SPRITE_180,
24+ ROT_FMTOWNS_SPRITE_270
25+ };
26+}
2827
2928 #define TOWNS_SPRITE_CACHE_NUM 512
3029
31-typedef struct {
32- uint16_t num;
33- uint8_t rotate_type;
34- uint16_t attribute;
35- uint16_t color;
36-
37- bool is_halfx;
38- bool is_halfy;
39- bool enable_offset;
40- bool is_32768;
41- bool is_impose;
42- bool is_disp;
43-} sprite_table_t;
30+namespace FMTOWNS {
31+ typedef struct {
32+ uint16_t num;
33+ uint8_t rotate_type;
34+ uint16_t attribute;
35+ uint16_t color;
36+
37+ bool is_halfx;
38+ bool is_halfy;
39+ bool enable_offset;
40+ bool is_32768;
41+ bool is_impose;
42+ bool is_disp;
43+ } sprite_table_t;
4444
45-typedef struct {
46- bool is_use;
47- uint16_t num;
48- uint16_t attribute;
49- uint8_t rotate_type;
50- bool is_32768;
51- bool is_halfx;
52- bool is_halfy;
53- uint16_t* pixels;
54- uint16_t* masks;
55- uint16_t color;
56-} sprite_cache_t;
45+ typedef struct {
46+ bool is_use;
47+ uint16_t num;
48+ uint16_t attribute;
49+ uint8_t rotate_type;
50+ bool is_32768;
51+ bool is_halfx;
52+ bool is_halfy;
53+ uint16_t* pixels;
54+ uint16_t* masks;
55+ uint16_t color;
56+ } sprite_cache_t;
57+}
5758
58-class TOWNS_VRAM;
59+namespace FMTOWNS {
60+ class TOWNS_VRAM;
61+}
62+
63+namespace FMTOWNS {
5964 class TOWNS_SPRITE : public DEVICE
6065 {
6166
@@ -477,5 +482,6 @@ __DECL_VECTORIZED_LOOP
477482 }
478483 }
479484 }
485+}
480486
481487 #endif /* _TOWNS_SPRITE_H */
--- a/source/src/vm/fmtowns/towns_vram.cpp
+++ b/source/src/vm/fmtowns/towns_vram.cpp
@@ -17,6 +17,8 @@
1717 #define _USE_ALPHA_CHANNEL
1818 #endif
1919
20+namespace FMTOWNS {
21+
2022 void TOWNS_VRAM::initialize()
2123 {
2224 #ifdef _USE_ALPHA_CHANNEL
@@ -807,6 +809,6 @@ __exit_0:
807809 return;
808810 }
809811
810-
812+}
811813 #undef _CLEAR_COLOR
812814
--- a/source/src/vm/fmtowns/towns_vram.h
+++ b/source/src/vm/fmtowns/towns_vram.h
@@ -32,6 +32,7 @@
3232 #define SIG_TOWNS_VRAM_SET_VLINE 0x07
3333 #define SIG_TOWNS_RENDER_FLAG 0x08
3434
35+namespace FMTOWNS {
3536 class TOWNS_VRAM : public DEVICE
3637 {
3738 protected:
@@ -169,4 +170,5 @@ public:
169170 };
170171 };
171172
173+}
172174 #endif
Show on old repository browser