Skip to content

Commit

Permalink
Fix up fteqcc's typedefs.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6303 fc73d0e0-1445-4013-8a0c-d673dee63da5
  • Loading branch information
Spoike committed Aug 8, 2022
1 parent a0f2ffd commit f8af9b1
Show file tree
Hide file tree
Showing 13 changed files with 198 additions and 160 deletions.
35 changes: 34 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1534,7 +1534,9 @@ SET(FTE_MENU_SYS true CACHE BOOL "Compile System Menu.")
IF(FTE_MENU_SYS)
ADD_CUSTOM_TARGET(menusys ALL
VERBATIM
COMMAND fteqcc -srcfile "${CMAKE_CURRENT_SOURCE_DIR}/quakec/menusys/menu.src" -o "${CMAKE_CURRENT_BINARY_DIR}/menu.dat"
DEPENDS fteqcc
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/quakec/menusys/"
COMMAND fteqcc -srcfile "menu.src" -o "${CMAKE_CURRENT_BINARY_DIR}/menu.dat"
BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/menu.dat" "${CMAKE_CURRENT_BINARY_DIR}/menu.lno"
SOURCES
quakec/menusys/menu.src
Expand Down Expand Up @@ -1572,3 +1574,34 @@ IF(FTE_MENU_SYS)
quakec/menusys/menu/quit.qc
)
ENDIF()

SET(FTE_CSADDON true CACHE BOOL "CS Addon.")
IF(FTE_CSADDON)
ADD_CUSTOM_TARGET(csaddon ALL
VERBATIM
DEPENDS fteqcc
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/quakec/csaddon/src/"
COMMAND fteqcc -srcfile "csaddon.src" -o "${CMAKE_CURRENT_BINARY_DIR}/csaddon.dat"
BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/csaddon.dat" "${CMAKE_CURRENT_BINARY_DIR}/csaddon.lno"
SOURCES
quakec/csaddon/src/csaddon.src

quakec/csaddon/src/csplat.qc
quakec/csaddon/src/csfixups.qc

quakec/csaddon/src/editor_lights.qc
quakec/csaddon/src/editor_terrain.qc
quakec/csaddon/src/brush_selection.qc
quakec/csaddon/src/brush_history.qc
quakec/csaddon/src/brush_manip.qc
quakec/csaddon/src/brush_draw.qc
quakec/csaddon/src/brush_vertedit.qc
quakec/csaddon/src/editor_brushes.qc
quakec/csaddon/src/editor_ents.qc
quakec/csaddon/src/textfield.qc
quakec/csaddon/src/editor_particles.qc
quakec/csaddon/src/menu.qc
quakec/csaddon/src/cam.qc
quakec/csaddon/src/csaddon.qc
)
ENDIF()
3 changes: 2 additions & 1 deletion engine/qclib/progslib.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ ev_struct, //big complex type
ev_union, //not really sure why this is separate from struct
ev_accessor,//some weird type to provide class-like functions over a basic type.
ev_enum, //just a numeric type
ev_boolean //exists to optimise if(-0) workarounds.
ev_typedef, //so typedefs can refer to their original type (primarily for structs).
ev_boolean, //exists to optimise if(-0) workarounds. engine just sees int/float.
} etype_t;
enum {
DEBUG_TRACE_OFF, //debugging should be off.
Expand Down
8 changes: 7 additions & 1 deletion engine/qclib/qcc.h
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,13 @@ extern int pr_token_line_last;
extern QCC_type_t *pr_immediate_type;
extern QCC_eval_t pr_immediate;

extern int verbose;
#define VERBOSE_WARNINGSONLY -1
#define VERBOSE_PROGRESS 0
#define VERBOSE_STANDARD 1
#define VERBOSE_DEBUG 2
#define VERBOSE_DEBUGSTATEMENTS 3 //figuring out the files can be expensive.

extern pbool keyword_asm;
extern pbool keyword_break;
extern pbool keyword_case;
Expand Down Expand Up @@ -1089,7 +1096,6 @@ void QCC_PR_EmitArraySetFunction(QCC_def_t *defscope, QCC_def_t *thearray, char
void QCC_PR_EmitClassFromFunction(QCC_def_t *defscope, QCC_type_t *basetype);

void QCC_PR_ParseDefs (char *classname, pbool fatal);
void QCC_PR_ParseTypedef(void);
QCC_def_t *QCC_PR_DummyDef(QCC_type_t *type, const char *name, QCC_function_t *scope, int arraysize, QCC_def_t *rootsymbol, unsigned int ofs, int referable, unsigned int flags);
void QCC_PR_ParseInitializerDef(QCC_def_t *def, unsigned int flags);
void QCC_PR_FinaliseFunctions(void);
Expand Down
1 change: 1 addition & 0 deletions engine/qclib/qcc_cmdlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const unsigned int type_size[] = {1, //void
0, //ev_union. variable sized.
0, //ev_accessor...
0, //ev_enum...
0, //ev_typedef
1, //ev_bool...
};

Expand Down
Loading

0 comments on commit f8af9b1

Please sign in to comment.