MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Pages: 1

CmdList
CmdList
Reged: 04/06/05
Posts: 65
Send PM


PreTestBuild : MAME 0.171 support New Command List (include binary)
#351914 - 03/24/16 05:17 AM Attachment: mame0171b_pretest.7z 4066 KB (5 downloads)


Hello,

- Added support for "font color=..." tag
- Added support for "hr color=..." tag
- Changed high resolution for uicmd.png (Command List Glyph)
- Added support for Custom Auto Text (for example _(custom:A) = _[80])

- Added support for Custom External Glyph Image (for example _[80] = user/A-Button.png)


Download link (MAME 0.171 PreTestBuild with minimal version for test):


http://cmdlist.com/g5/bbs/board.php?bo_table=bo_wip&wr_id=8

Edited by CmdList (03/24/16 05:21 AM)



CmdList
CmdList
Reged: 04/06/05
Posts: 65
Send PM


description of the source code (include source file) new [Re: CmdList]
#351915 - 03/24/16 05:19 AM Attachment: 0171.2016-03-24.7z 99 KB (6 downloads)


1. src/emu/fileio.cpp
- added : emu_file::gets(std::string &s)
- support std::string

2. src/emu/fileio.h
- added : emu_file::gets(std::string &s)

3. src/emu/rendfont.cpp
- added support External Glyph Image files
- removed font color property. (no more needed)

4. src/emu/rendfont.h
- removed font color property. (no more needed)

5. src/emu/ui/cmddata.h
- removed font color property and const macro. (no more needed)
- removed color_table[]. (no more needed)
- removed default_text[]. (no more needed)
- removed expand_text[]. (no more needed)
- removed convert_text[]. (no more needed)
- added s_autotext[]. (support std::unordered_map)
- added s_glyphimage[]. (support std::unordered_map)

6. src/emu/ui/cmdrender.h
- renamed uicmd14.fh to uicmd.fh
- added std::unordered_map g_autotext
- added std::unordered_map g_glyphimage
- added convert_glyph_chars(...) : support for _[%d] glyph tag
- added set_glyph_image(), get_glyph_image(), init_glyph_image() : support for external glyph image files
- added set_auto_text(), get_auto_text(), init_auto_text() : support for custom defined replaced text
- added find_auto_text() : check auto text tag _(word...)
- added get_horizontal_rule() : support for <hr ...> tag
- changed convert_command_glyph(...) func : use std::unordered_map

7. src/emu/ui/custmenu.cpp
- changed "^!" to "_!" : support only tags beginning with '_'

8. src/emu/ui/datfile.cpp
- added TAG_SET_WRAP_WIDTH, TAG_SET_AUTO_TEXT, TAG_SET_IMAGE_FILE, TAG_MENUITEM : support new command.dat
- removed FILE *fp: don't support unicode text file
- added emu_file class : support for unicode text file
- added get_glyph_chars() : check glyph tag with _[%d]
- added new datfile_manager::index_menuidx(...) : support for new command.dat format
- added new datfile_manager::load_command_info(...) : support for new command.dat format

9. src/emu/ui/datfile.h
- removed FILE *fp: don't support unicode text file
- added emu_file class : support for unicode text file

10. src/emu/ui/datmenu.cpp
- removed machine().datfile().command_sub_menu() : no more needed
- added font color property.
- added support left align(move text), right align (move glyph)

11. src/emu/ui/menu.cpp
- added support for horizontal rule tag : <hr ...>
- added support left align(move text), right align (move glyph)

12. src/emu/ui/optsmenu.cpp
- changed "^!" to "_!" : support only tags beginning with '_'

13. src/emu/ui/selgame.cpp
- changed "@custom..." to "_(custom:...)" : support only tags beginning with '_'
- added font color property.

14. src/emu/ui/selsoft.cpp
- changed "@custom..." to "_(custom:...)" : support only tags beginning with '_'
- added font color property.

15. src/emu/ui/ui.cpp
- added support for font color tag : <font color=...></font>

16. src/emu/ui/ui.h
- changed wrap_text() : support for font color property.

17. renamed src/emu/ui/uicmd14.png to src/emu/ui/uicmd.png

18. src/lib/util/corefile.cpp
- added support for core_fgets() with std::string

19. src/lib/util/corefile.h
- added support for core_fgets() with std::string

20. src/lib/util/corestr.cpp
- added std::string strtrimcarriage() : instead chartrimcarriage()

Edited by CmdList (03/24/16 05:40 AM)



CmdList
CmdList
Reged: 04/06/05
Posts: 65
Send PM


For example support strategywiki.org glyph images new [Re: CmdList]
#351916 - 03/24/16 05:22 AM Attachment: wip0324.png 212 KB (3 downloads)


$info=pong,pongd,pongf
$set:image_file {
        _[80] = Cade/Arcade-Modifier-Tap.png
        _[81] = Cade/Arcade-Modifier-Air.png
        _[82] = Cade/Arcade-Modifier-(Air).png
        _[83] = Cade/Arcade-Modifier-Max.png
        _[84] = Cade/Arcade-Button-Kick.png
        _[85] = Cade/Arcade-Button-Punch.png
        _[86] = Cade/Arcade-Button-LPunch.png
        _[87] = Cade/Arcade-Button-MPunch.png
        _[88] = Cade/Arcade-Button-HPunch.png
        _[89] = Cade/Arcade-Button-LKick.png
        _[90] = Cade/Arcade-Button-MKick.png
        _[91] = Cade/Arcade-Button-HKick.png
        _[92] = Cade/Arcade-Stick-Left.png
        _[93] = Cade/Arcade-Stick-Right.png
        _[94] = Cade/Arcade-Stick-Up.png
        _[95] = Cade/Arcade-Stick-Down.png
        _[96] = Cade/Arcade-Stick-DL.png
        _[97] = Cade/Arcade-Stick-DR.png
        _[98] = Cade/Arcade-Stick-Qcf.png
        _[99] = Cade/Arcade-Stick-Hcb.png
        _[100] = Cade/Arcade-Stick-360.png
        _[101] = Cade/Arcade-Stick-Dp.png
        _[102] = Cade/Arcade-Stick-RDp.png
        _[103] = Cade/Arcade-Button-CPunch.png
        _[104] = Cade/Arcade-Button-DKick.png
        _[105] = Cade/Arcade-Button-Orange.png
        _[106] = Cade/Arcade-Button-Yellow.png
        _[107] = Cade/Arcade-NeoGeo-A.png
        _[108] = Cade/Arcade-NeoGeo-B.png
        _[109] = Cade/Arcade-NeoGeo-C.png
        _[110] = Cade/Arcade-NeoGeo-D.png
        _[111] = Cade/Arcade-Button-LeftPunch.png
        _[112] = Cade/Arcade-Button-LeftKick.png
        _[113] = Cade/Arcade-Button-RightPunch.png
        _[114] = Cade/Arcade-Button-RightKick.png
}
$set:auto_text {
        _(cade|Tap)        = _[80]
        _(cade|Air)        = _[81]
        _(cade|(Air)       = _[82]
        _(cade|Max)        = _[83]
        _(cade|Kick)       = _[84]
        _(cade|Punch)      = _[85]
        _(cade|LPunch)     = _[86]
        _(cade|MPunch)     = _[87]
        _(cade|HPunch)     = _[88]
        _(cade|LKick)      = _[89]
        _(cade|MKick)      = _[90]
        _(cade|HKick)      = _[91]
        _(cade|Left)       = _[92]
        _(cade|Right)      = _[93]
        _(cade|Up)         = _[94]
        _(cade|Down)       = _[95]
        _(cade|DL)         = _[96]
        _(cade|DR)         = _[97]
        _(cade|Qcf)        = _[98]
        _(cade|Hcb)        = _[99]
        _(cade|360)        = _[100]
        _(cade|Dp)         = _[101]
        _(cade|RDp)        = _[102]
        _(cade|CPunch)     = _[103]
        _(cade|DKick)      = _[104]
        _(cade|Orange)     = _[105]
        _(cade|Yellow)     = _[106]
        _(cade|NeoGeo|A)   = _[107]
        _(cade|NeoGeo|B)   = _[108]
        _(cade|NeoGeo|C)   = _[109]
        _(cade|NeoGeo|D)   = _[110]
        _(cade|LeftPunch)  = _[111]
        _(cade|LeftKick)   = _[112]
        _(cade|RightPunch) = _[113]
        _(cade|RightKick)  = _[114]
}
$menuitem = Test Auto Text {
        <hr color=rgb(200,200,32)>
        Move #1 (External Glyph)        _(cade|(Air) _(cade|Left)_+_(cade|NeoGeo|A)_(cade|NeoGeo|B)_(cade|NeoGeo|C)_(cade|NeoGeo|D)
        Move #2 (External Glyph)        _(cade|Air) _(cade|Left)or_(cade|Right)_+_(cade|Kick)or_(cade|Punch)
        Move #3 (Internal Glyph)        _2_3_6_+_A_B_C
}
$menuitem = Internal Glyph {
        <hr color=rgb(255,32,32)>
        <font color=rgb(255,0,0)>Glyph List</font> : 0 ... 79 (80 glyphs)
        _[0] _[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] 
}
$menuitem = External Glyph {
        <hr color=rgb(32,32,255)>
        <font color=rgb(0,0,255)>Image List</font> : 80 ... 114 (35 images)
        _[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] 
}

[ATTACHED IMAGE - CLICK FOR FULL SIZE]

Attachment

Edited by CmdList (03/24/16 05:36 AM)



Vas Crabb
BOFH
Reged: 12/13/05
Posts: 4462
Loc: Melbourne, Australia
Send PM


Re: PreTestBuild : MAME 0.171 support New Command List (include binary) new [Re: CmdList]
#351923 - 03/24/16 10:30 AM


First of all, your changes aren't against the latest MAME source. Several areas you've changed are very different in mainline MAME and your changes won't apply cleanly.

The code quality is bad. For example your strtrimcarriage function modifies a string passed by reference and returns a copy of that same modified string. This is horribly inefficient and wasteful, besides being useless semantics.

Your new overload of core_fgets is poorly implemented besides not applying cleanly.

I don't see the motivation for changing the magic character sequences the UI code recognises. It's doesn't achieve anything.

We handle UTF-8 and UTF-16 encodings at core_file level - why do you see a need to change emu_file, which is largely a wrapper, to add another kind of Unicode text support?

In short, these changes will never be accepted in this form.



redk9258
Regular
Reged: 09/21/03
Posts: 3968
Loc: Troy, Illinois USA
Send PM


Re: For example support strategywiki.org glyph images new [Re: CmdList]
#351925 - 03/24/16 12:21 PM


Please stop posting this on the NEWS SUBMISSION forum, It is not news. It belongs on the EMUCHAT forum.

Edited by redk9258 (03/24/16 12:21 PM)


Pages: 1

MAMEWorld >> EmuChat
View all threads Index   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Robbbert, Tafoid 
0 registered and 140 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 2001