Kp
f1a6757693
Use objptridx_t for obj_create
2014-01-10 03:20:11 +00:00
Kp
a748065fe5
Explicitly delete valptridx subtype default constructors
2014-01-06 04:17:57 +00:00
Kp
8218af34b5
Add special type to let obj_*link take either pointer or index
2014-01-03 04:04:04 +00:00
Kp
094dfbf3d4
Reduce header inclusions
2013-12-31 03:22:03 +00:00
Kp
745633eabe
Use vector to allow rendering unlimited robots
2013-12-29 04:54:08 +00:00
Kp
073f00974a
Eliminate uses of the typedef struct X { ... } X; pattern
...
C++ does not require this pattern.
import re, fileinput
to = re.compile(r'^typedef struct ([a-z_A-Z]+)\s*{')
tc = re.compile(r'^}(.*?)\s*([a-z_A-Z]+);$')
osn = None
for line in fileinput.input(inplace=True):
m = to.match(line)
if m:
osn = m.group(1)
print 'struct %s\n{' % osn
continue
if osn:
m = tc.match(line)
if m:
csn = m.group(2)
if osn == csn:
print '}%s;' % m.group(1)
osn = None
continue
else:
osn = None
print line,
2013-12-28 22:48:07 +00:00
Kp
dfbe78c214
Remove useless 'unused' field in grs_bitmap
...
Saves a realignment to pointer boundary.
2013-12-28 22:38:02 +00:00
Kp
2d274dba8b
Tighten SWAPINT
2013-12-28 22:37:00 +00:00
Kp
cc9f7f669d
Tighten definition of SWAPSHORT
2013-12-28 22:36:59 +00:00
Kp
1694eed536
Match PHYSFSX_readSXE?? return types to the internal type
2013-12-28 22:03:50 +00:00
Kp
7fb4c6307f
Add debug option -no-grab to prevent window grabbing
2013-12-22 20:56:55 +00:00
Kp
456c2d0bb0
Scrub control codes from stdout/file, but not HUD/console
2013-12-22 20:56:55 +00:00
Kp
a7bd19a7ca
Convert fvi to use countarray for segment list
...
Also fixes a bug where seglist could receive wrong elements when
fvi_sub recursive call returns a type other than HIT_NONE. Bug caused
by badly named variables:
int ii;
for (ii=0;i < temp_n_segs && *n_segs < MAX_FVI_SEGS-1;)
seglist[(*n_segs)++] = temp_seglist[ii++];
The wrong counter is used for first part of the conditional, so
uninitialized elements of temp_seglist could be read back if i
(==n_segs_visited) is smaller than temp_n_segs or elements could be
skipped if i is greater than temp_n_segs.
2013-12-22 20:56:53 +00:00
Kp
038bbad26a
Rearrange headers to build under all test modes
2013-12-22 20:56:35 +00:00
Kp
58e740c0bd
Remove unused declaration of Center_names
2013-12-22 20:56:35 +00:00
Kp
fe7c9fa444
Use countarray for HUD_messages
2013-12-22 20:56:33 +00:00
Kp
7894647bc9
Let PHYSFSX_puts receive optional string length
2013-12-22 20:13:22 +00:00
Kp
84a0dcba27
Rename con_puts length template
2013-12-22 20:12:41 +00:00
Kp
6de986d39c
Print file offset on read error
2013-12-22 20:02:26 +00:00
Kp
f269ed7374
Make Been_visited a local bit array
2013-12-22 05:29:25 +00:00
Kp
9a7185f770
Store warning segments in countarray object
2013-12-22 05:27:16 +00:00
Kp
a8e9f9f624
Store found segments in countarray object
...
Raise MAX_FOUND_SEGS to MAX_SEGMENTS to ease code reuse.
2013-12-22 01:54:15 +00:00
Kp
c31c67c587
Store selected segments in countarray object
2013-12-22 01:54:15 +00:00
Kp
b1c5307eb1
Use array for palette_array_t
2013-12-22 00:37:36 +00:00
Kp
e9f9cb676f
Centralize palette utilities
2013-12-22 00:05:13 +00:00
Kp
a3d66a3b37
Add typedef palette_array_t for palette data
2013-12-22 00:05:13 +00:00
Kp
11f7bc51ee
Use unsigned count of frames in a vclip
2013-12-22 00:05:13 +00:00
Kp
1e8036bd24
Split compiler.h for PCH compatibility
2013-12-21 05:12:38 +00:00
Kp
5d801ce386
Add #error diagnostics to compiler.h
2013-12-21 01:54:38 +00:00
Kp
fbf1f8a658
Annotate mem_malloc/calloc/realloc as __attribute__((alloc_size))
2013-12-20 03:33:32 +00:00
Kp
737fe73dd7
Annotate mem_malloc/mem_calloc as __attribute__((malloc))
2013-12-20 03:24:39 +00:00
Kp
e4b091dd38
Make ogl_pal a ubyte (*)[256*3] to improve checking
2013-12-20 03:19:40 +00:00
Kp
3bf16e57dc
Remove PHYSFSX_gets, PHYSFSX_readString
...
They do not check for a buffer overflow.
2013-12-20 03:16:46 +00:00
Kp
c561c3d514
Move multi_send_data_direct type into template parameter
...
Optimizing compilers may now delete the size check.
2013-12-20 03:08:19 +00:00
Kp
f0bae2c8cd
Add EVENT_WINDOW_CREATED to centralize window init/deinit logic
2013-12-20 02:51:24 +00:00
Kp
03821fab0d
Rely on libc strdup if DEBUG_MEMORY_ALLOCATIONS is unset
...
If !DEBUG_MEMORY_ALLOCATIONS, our strdup is not special. Rely on the
compiler one, which might be.
2013-12-19 03:31:24 +00:00
Kp
aba6c2dfee
Pass glow_values as array<> to retain size information
2013-12-19 03:31:24 +00:00
Kp
a40c19f770
Fix con_puts buffer overread
...
ASan reports a 2K read from a small string literal.
Also, fix silly double copy in con_add_buffer_line and delete too-short
memset in con_add_buffer_line.
2013-12-19 03:31:24 +00:00
Kp
2f18c5037d
Store group lists as countarray objects
2013-12-18 03:48:52 +00:00
Kp
e8de74b8bf
Reject inappropriate printf usage
2013-12-17 04:03:35 +00:00
Kp
21cc89e2c8
Use ui_dputs_at instead of ui_dprintf_at where possible
2013-12-17 04:03:34 +00:00
Kp
7efeb3f29d
Use PHYSFSX_puts instead of PHYSFSX_printf where possible
2013-12-17 04:03:34 +00:00
Kp
c3c1695ba5
Use gr_ustring instead of gr_uprintf where possible
2013-12-17 04:03:34 +00:00
Kp
1bf3722670
Use gr_string instead of gr_printf where possible
2013-12-17 04:03:34 +00:00
Kp
3d79fe9b40
Use editor_status instead of editor_status_fmt where possible
2013-12-17 04:03:34 +00:00
Kp
a99b07c98e
Use Error_puts instead of Error where possible
2013-12-17 04:03:34 +00:00
Kp
f82ba904bd
Use Warning_puts instead of Warning where possible
2013-12-17 04:03:34 +00:00
Kp
335cabcc79
Use con_puts instead of con_printf where possible
2013-12-17 04:03:34 +00:00
Kp
be041a9cfc
Add type checking for ui_create_dialog
2013-12-17 03:49:24 +00:00
Kp
d1fa9ff7a6
Simplify setup for ui_messagebox_n
2013-12-15 21:54:59 +00:00