fix: Get rid of fixed screen sizes (GE0_SCREEN_HEIGHT related code)#2
Open
MrAMS wants to merge 3 commits intoOSESO:draftfrom
Open
fix: Get rid of fixed screen sizes (GE0_SCREEN_HEIGHT related code)#2MrAMS wants to merge 3 commits intoOSESO:draftfrom
MrAMS wants to merge 3 commits intoOSESO:draftfrom
Conversation
Collaborator
|
非常感谢,不过。此PR会导致 ”默认宽度128,高度128“这一假定被破坏。而原版引擎的好多代码都是写死成为128*128的屏幕服务的 因此,需要重新考虑程序内所有127、128,以及其他和绘图有关的数据结构(如line_is_draw[])的尺寸。 考虑到后面的文字渲染部分(regx,regy,charArray)在原始版本里都是在尺寸固定的假定下设计的。需要重算的地方有些多。 我本身的打算是移植完全部后再统一梳理屏幕尺寸的问题的。不知道你这个功能是否着急合并呢。因为在现在合并可能会导致后面移植其他api时稍微麻烦一点点(其实也不是太麻烦,你想现在合也可以) |
Member
Author
|
了解,不是很急着合并,主要是配合你的工作,按你的节奏来就行。先完成移植,之后再逐步完善也行(先完成再完美hhh) 。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
主要是这个commit,主要做了以下工作:
screen.h以及display.h里面的SCREEN_HEIGHT等,统一命名为GE0_SCREEN_HEIGHT等SCREEN_HEIGHT等宏定义,GE0应该适配各种尺寸的屏幕,不应当写死尺寸,应当诸如通过编译参数-DSCREEN_HEIGHT=128传入屏幕参数todo: Why x here is 64?,代码,我认为这里的64应该是所谓的SCREEN_WIDTH_BYTES,源代码中宽度为128,每个点空间4bit,SCREEN_WIDTH_BYTES=128*4/8=64,所以这里就是64SCREEN_ADDR宏函数是写死的6,我认为这里的6就是log2(64)即log2(SCREEN_WIDTH_BYTES),所以这里也需要修,所以我加入了一个BITS_TO_REPRESENT宏魔法,用于编译期计算log2(SCREEN_WIDTH_BYTES)