-
Notifications
You must be signed in to change notification settings - Fork 0
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
core: introduce patch data classes and crude parser upgrade beginnings #1
base: main
Are you sure you want to change the base?
Conversation
@@ -79,7 +84,7 @@ func build_gamepack_text() -> String: | |||
if sound_type != sound_types[-1]: | |||
soundtypes_str += " " | |||
|
|||
var gamepack_text: String = """<?xml version="1.0"?> | |||
var gamepack_text: String = """<?xm000l version="1.0"?> |
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.
whoops- fix this
@@ -133,3 +133,13 @@ class FuncGodotTextureData: | |||
|
|||
func _init(in_name: String): | |||
name = in_name | |||
|
|||
class FuncGodotPatchVertex: |
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.
this doesn't feel like a great solution, but for now and simplicity's sake, I'm treating patches as special objects, though in the map file proper they are part of brush defs.
0: current_patch.texture_idx = map_data.register_texture(buf_str) | ||
1,2: current_patch.indices[component_idx - 1] = float(buf_str) | ||
3,4,5: pass # Contains face attributes, which are currently unsupported in func_godot | ||
|
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.
Still needs the rest of the vertices to be read
@@ -286,13 +349,20 @@ func commit_face() -> void: | |||
current_brush.faces.append(current_face) | |||
current_face = FuncGodotMapData.FuncGodotFace.new() | |||
|
|||
func commit_patch() -> void: | |||
|
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.
if this overall split is kept, the current_patch = patch.new() call should happen here instead of where it's currently happening
This commit introduces a few changes to prepare for integrating Quake 3's quadratic Bezier patches: updating the token parser and scope.
Part 1 of at least 2.