-
Notifications
You must be signed in to change notification settings - Fork 8
draw static sprites #21
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
base: minifb2
Are you sure you want to change the base?
Changes from all commits
a6aa766
c970ff5
50b3cbb
84524c7
ef9cfc7
2d1b048
1938d83
6b36a30
99a0eb5
bbdb97c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,6 +14,9 @@ pub const STATUS_LINES: u32 = 40; | |
| pub const BASE_WIDTH: u32 = 320; | ||
| pub const BASE_HEIGHT: u32 = 200; | ||
| pub const WALLPIC_WIDTH: usize = 64; | ||
| // where does this value come from? | ||
| pub const TILE_SIZE: f64 = 4.8; | ||
|
Comment on lines
+17
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm also quite interested in the calculations behind this value :p
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. iirc this was 4 in the initial implementation by @qhool. Not sure how he came up with that number, but the walls looked a bit short so I increased it in a previous PR until it seemed to roughly match the original game (there may be some accurate way to come up with this number) |
||
| pub const FIELD_OF_VIEW: f64 = PI / 2.0; | ||
|
|
||
| // ok this is not a constant, we may move it to an util module later, or rename this | ||
| pub fn norm_angle(a: f64) -> f64 { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this magic number mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for some reason there's an offset between the number stored in the map tiles and the picnum in the sprites file. In wolf4sdl it's 23, and the extra +2 I don't remember where it's coming from, but it was necessary for it to match with the correct sprite. (we should make these constants)