Coder Social home page Coder Social logo

h3fontextension's Introduction

关于

H3CN是针对与英雄无敌3完全版的汉语字体扩展插件,插件源码基于对于英雄无敌3可执行文件3.2的逆向工程,该项目仅仅基于个人兴趣爱好,您可以在MIT协议约束内自由使用该源码,但商用必须注明出处。您可以对编码规则进行修改,生成自己的字库来兼容其他语言编码。

实现原理

替换掉了原本程序中绘制字体和计算词、行宽度的函数。使用GBK点阵汉字字库绘制汉字。您可以使用多种注入工具注入该插件到游戏,推荐使用HOMM3 HD

功能

  • 扩展游戏字体显示除原本的ASCII字符以外的所有GBK编码的所有汉字。兼容所有简体中文版英雄无敌3 3.1中所有用到的汉字。
  • 支持绘制汉字阴影,使得原本的英雄无敌3 3.1中文版中汉字缺少的阴影得到实现。
  • 动态计算消息框宽度,使得消息框能够根据游戏内实际显示的文本宽度进行扩展。原版3.1中文版中消息框被固定在了600宽度非常不美观。
  • 允许自定义游戏中9种使用的字体对应的汉字字体。可以定义每种字体的宽高以及字符间距。
  • 兼容32位色图像模式。

开发兼容

插件基于C++20和Visual Studio 2022进行开发,使用到了部分C++20的特性。源码中还有不少可以优化的地方,希望能够有高人指点进一步优化插件性能。源码请提交时使用UTF8进行编码。

程序依赖

H3API 英雄无敌3程序内部数据结构
Toml++ 配置文件读写

待实现内容

  1. 拥有图形界面的字体生成配置工具。
  2. 自定义字体行间距。
  3. 拆行式文本输出支持跨行彩色文本。即彩色文本头和尾不用在同一行,影响位置地图、任务简报。
  4. 与最新的ERA扩展兼容(当前仅兼容)(重要)
  5. 兼容GOG的4.0原始可执行文件,该可执行文件重新进行过编译,需要重新适配。
  6. 拆行美化,使得一些汉字中的标点符号出现位置更加合理。

h3fontextension's People

Contributors

tytannial avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

whliziwen

h3fontextension's Issues

如何使用

image 大佬,这个扩展怎么使用呀,能兼容最新的HOMM3 HOTA版本吗

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.