Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Auto Sync] Sync with ZH repo 29-08-2024 #14

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions 3.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,18 +201,18 @@ With these function libraries, we can run more programs in Navy. To run Xian Jia
实现了"在自己构建的全栈计算机系统中播放幻灯片进行决赛现场答辩"的目标. -->
NSlider is the simplest displayable application in Navy. It is a slide show player that supports page turning. In the 2018 Second Loongson Cup Competition, the Nanjing University team achieved the goal of "presenting slides in their self-built full-stack computer system for the final on-site defense" by running NSlider on their self-implemented out-of-order processor.

<!-- 现在你也可以在自己构建的计算机系统上运行NSlider了, 但你首先需要实现`SDL_UpdateRect()`这个API.
<!-- 现在你也可以在自己构建的计算机系统上运行NSlider了, 但你需要先了解SDL的一些概念和API.
SDL的绘图模块引入了一个`Surface`的概念, 它可以看成一张具有多种属性的画布,
具体可以通过RTFM查阅`Surface`结构体中的成员含义.
`SDL_UpdateRect()`的作用是将画布中的指定矩形区域同步到屏幕上. -->
你需要实现以下两个与`Surface`相关的API: -->
Now you can also run NSlider on your self-built computer system, but you need to implement the `SDL_UpdateRect()` API first. The SDL drawing module introduces the concept of a `Surface`, which can be thought of as a canvas with various attributes. You can refer to RTFM to understand the meaning of the members in the `Surface` structure. The purpose of `SDL_UpdateRect()` is to synchronize the specified rectangular area of the canvas to the screen.

<!-- > #### todo::运行NSlider
> 我们提供了一个脚本来把PDF版本的, 比例为4:3的幻灯片转换成BMP图像, 并拷贝到`navy-apps/fsimg/`中.
> 你需要提供一个满足条件的PDF文件, 然后参考相应的README文件进行操作.
> 但你可能会在转换时遇到一些问题, 具体请自行解决.
>
> 然后在miniSDL中实现`SDL_UpdateRect()`, 如果你的实现正确, 运行NSlider时将会显示第一张幻灯片.
* `SDL_BlitSurface()`: 将一张画布中的指定矩形区域复制到另一张画布的指定位置
> 你很可能是第一次接触SDL的API, 为此你还需要RTFM, 并通过RTFSC来理解已有代码的行为. -->

> #### todo::Run NSlider
Expand Down Expand Up @@ -241,13 +241,13 @@ Now you can also run NSlider on your self-built computer system, but you need to
<!-- #### MENU (开机菜单)

开机菜单是另一个行为比较简单的程序, 它会展示一个菜单, 用户可以选择运行哪一个程序.
为了运行它, 你还需要在miniSDL中实现两个绘图相关的API:
* `SDL_FillRect()`: 往画布的指定矩形区域中填充指定的颜色
* `SDL_BlitSurface()`: 将一张画布中的指定矩形区域复制到另一张画布的指定位置
* `SDL_UpdateRect()`: 将画布中的指定矩形区域同步到屏幕上
> 然后在miniSDL中实现`SDL_BlitSurface()`和`SDL_UpdateRect()`.
> 如果你的实现正确, 运行NSlider时将会显示第一张幻灯片.

开机菜单还会显示一些英文字体, 这些字体的信息以BDF格式存储,
Navy中提供了一个libbdf库来解析BDF格式, 生成相应字符的像素信息, 并封装成SDL的`Surface`.
实现了`SDL_BlitSurface()`之后, 我们就可以很方便地在屏幕上输出字符串的像素信息了. -->
为了运行它, 你还需要在miniSDL中实现`SDL_FillRect()`, -->

#### MENU (Boot Menu)

Expand Down