Multi line comments in case we every want to support C89.

This commit is contained in:
NathanSweet 2013-04-12 08:07:16 +02:00
parent 0496318431
commit ed6a062942
8 changed files with 29 additions and 29 deletions

View File

@ -72,8 +72,8 @@ void _ExampleRegionAttachment_dispose (Attachment* attachment) {
} }
void _ExampleRegionAttachment_draw (Attachment* attachment, Slot* slot) { void _ExampleRegionAttachment_draw (Attachment* attachment, Slot* slot) {
// ExampleRegionAttachment* self = (ExampleRegionAttachment*)attachment; /* ExampleRegionAttachment* self = (ExampleRegionAttachment*)attachment;
// Draw or queue region for drawing. Draw or queue region for drawing. */
} }
RegionAttachment* RegionAttachment_create (const char* name, AtlasRegion* region) { RegionAttachment* RegionAttachment_create (const char* name, AtlasRegion* region) {

View File

@ -108,48 +108,48 @@ char* _Util_readFile (const char* path, int* length);
char* _readFile (const char* path, int* length); char* _readFile (const char* path, int* length);
void _Skeleton_init (Skeleton* self, SkeletonData* data, // void _Skeleton_init (Skeleton* self, SkeletonData* data, /**/
void (*dispose) (Skeleton* skeleton)); void (*dispose) (Skeleton* skeleton));
void _Skeleton_deinit (Skeleton* self); void _Skeleton_deinit (Skeleton* self);
/**/ /**/
void _Attachment_init (Attachment* self, const char* name, AttachmentType type, // void _Attachment_init (Attachment* self, const char* name, AttachmentType type, /**/
void (*dispose) (Attachment* self), // void (*dispose) (Attachment* self), /**/
void (*draw) (Attachment* self, struct Slot* slot)); void (*draw) (Attachment* self, struct Slot* slot));
void _Attachment_deinit (Attachment* self); void _Attachment_deinit (Attachment* self);
/**/ /**/
void _RegionAttachment_init (RegionAttachment* self, const char* name, // void _RegionAttachment_init (RegionAttachment* self, const char* name, /**/
void (*dispose) (Attachment* self), // void (*dispose) (Attachment* self), /**/
void (*draw) (Attachment* self, struct Slot* slot)); void (*draw) (Attachment* self, struct Slot* slot));
void _RegionAttachment_deinit (RegionAttachment* self); void _RegionAttachment_deinit (RegionAttachment* self);
/**/ /**/
void _Timeline_init (Timeline* self, // void _Timeline_init (Timeline* self, /**/
void (*dispose) (Timeline* self), // void (*dispose) (Timeline* self), /**/
void (*apply) (const Timeline* self, Skeleton* skeleton, float time, float alpha)); void (*apply) (const Timeline* self, Skeleton* skeleton, float time, float alpha));
void _Timeline_deinit (Timeline* self); void _Timeline_deinit (Timeline* self);
/**/ /**/
void _CurveTimeline_init (CurveTimeline* self, int frameCount, // void _CurveTimeline_init (CurveTimeline* self, int frameCount, /**/
void (*dispose) (Timeline* self), // void (*dispose) (Timeline* self), /**/
void (*apply) (const Timeline* self, Skeleton* skeleton, float time, float alpha)); void (*apply) (const Timeline* self, Skeleton* skeleton, float time, float alpha));
void _CurveTimeline_deinit (CurveTimeline* self); void _CurveTimeline_deinit (CurveTimeline* self);
/**/ /**/
void _AtlasPage_init (AtlasPage* self, const char* name, // void _AtlasPage_init (AtlasPage* self, const char* name, /**/
void (*dispose) (AtlasPage* self)); void (*dispose) (AtlasPage* self));
void _AtlasPage_deinit (AtlasPage* self); void _AtlasPage_deinit (AtlasPage* self);
/**/ /**/
void _AttachmentLoader_init (AttachmentLoader* self, // void _AttachmentLoader_init (AttachmentLoader* self, /**/
void (*dispose) (AttachmentLoader* self), // void (*dispose) (AttachmentLoader* self), /**/
Attachment* (*newAttachment) (AttachmentLoader* self, Skin* skin, AttachmentType type, const char* name)); Attachment* (*newAttachment) (AttachmentLoader* self, Skin* skin, AttachmentType type, const char* name));
void _AttachmentLoader_deinit (AttachmentLoader* self); void _AttachmentLoader_deinit (AttachmentLoader* self);
void _AttachmentLoader_setError (AttachmentLoader* self, const char* error1, const char* error2); void _AttachmentLoader_setError (AttachmentLoader* self, const char* error1, const char* error2);

View File

@ -70,8 +70,8 @@ typedef struct _TimelineVtable {
void (*dispose) (Timeline* self); void (*dispose) (Timeline* self);
} _TimelineVtable; } _TimelineVtable;
void _Timeline_init (Timeline* self, // void _Timeline_init (Timeline* self, /**/
void (*dispose) (Timeline* self), // void (*dispose) (Timeline* self), /**/
void (*apply) (const Timeline* self, Skeleton* skeleton, float time, float alpha)) { void (*apply) (const Timeline* self, Skeleton* skeleton, float time, float alpha)) {
CONST_CAST(_TimelineVtable*, self->vtable) = NEW(_TimelineVtable); CONST_CAST(_TimelineVtable*, self->vtable) = NEW(_TimelineVtable);
VTABLE(Timeline, self) ->dispose = dispose; VTABLE(Timeline, self) ->dispose = dispose;
@ -96,8 +96,8 @@ static const float CURVE_LINEAR = 0;
static const float CURVE_STEPPED = -1; static const float CURVE_STEPPED = -1;
static const int CURVE_SEGMENTS = 10; static const int CURVE_SEGMENTS = 10;
void _CurveTimeline_init (CurveTimeline* self, int frameCount, // void _CurveTimeline_init (CurveTimeline* self, int frameCount, /**/
void (*dispose) (Timeline* self), // void (*dispose) (Timeline* self), /**/
void (*apply) (const Timeline* self, Skeleton* skeleton, float time, float alpha)) { void (*apply) (const Timeline* self, Skeleton* skeleton, float time, float alpha)) {
_Timeline_init(SUPER(self), dispose, apply); _Timeline_init(SUPER(self), dispose, apply);
self->curves = CALLOC(float, (frameCount - 1) * 6); self->curves = CALLOC(float, (frameCount - 1) * 6);
@ -203,7 +203,7 @@ void _BaseTimeline_dispose (Timeline* timeline) {
} }
/* Many timelines have structure identical to struct BaseTimeline and extend CurveTimeline. **/ /* Many timelines have structure identical to struct BaseTimeline and extend CurveTimeline. **/
struct BaseTimeline* _BaseTimeline_create (int frameCount, int frameSize, // struct BaseTimeline* _BaseTimeline_create (int frameCount, int frameSize, /**/
void (*apply) (const Timeline* self, Skeleton* skeleton, float time, float alpha)) { void (*apply) (const Timeline* self, Skeleton* skeleton, float time, float alpha)) {
struct BaseTimeline* self = NEW(struct BaseTimeline); struct BaseTimeline* self = NEW(struct BaseTimeline);

View File

@ -35,7 +35,7 @@ typedef struct _AtlasPageVtable {
void (*dispose) (AtlasPage* self); void (*dispose) (AtlasPage* self);
} _AtlasPageVtable; } _AtlasPageVtable;
void _AtlasPage_init (AtlasPage* self, const char* name, // void _AtlasPage_init (AtlasPage* self, const char* name, /**/
void (*dispose) (AtlasPage* self)) { void (*dispose) (AtlasPage* self)) {
CONST_CAST(_AtlasPageVtable*, self->vtable) = NEW(_AtlasPageVtable); CONST_CAST(_AtlasPageVtable*, self->vtable) = NEW(_AtlasPageVtable);
VTABLE(AtlasPage, self) ->dispose = dispose; VTABLE(AtlasPage, self) ->dispose = dispose;
@ -283,11 +283,11 @@ Atlas* Atlas_readAtlas (const char* begin, int length, const char* dir) {
Atlas* Atlas_readAtlasFile (const char* path) { Atlas* Atlas_readAtlasFile (const char* path) {
Atlas* atlas = 0; Atlas* atlas = 0;
// Get directory from atlas path. /* Get directory from atlas path. */
const char* lastForwardSlash = strrchr(path, '/'); const char* lastForwardSlash = strrchr(path, '/');
const char* lastBackwardSlash = strrchr(path, '\\'); const char* lastBackwardSlash = strrchr(path, '\\');
const char* lastSlash = lastForwardSlash > lastBackwardSlash ? lastForwardSlash : lastBackwardSlash; const char* lastSlash = lastForwardSlash > lastBackwardSlash ? lastForwardSlash : lastBackwardSlash;
if (lastSlash == path) lastSlash++; // Never drop starting slash. if (lastSlash == path) lastSlash++; /* Never drop starting slash. */
int dirLength = lastSlash ? lastSlash - path : 0; int dirLength = lastSlash ? lastSlash - path : 0;
char* dir = MALLOC(char, dirLength + 1); char* dir = MALLOC(char, dirLength + 1);
memcpy(dir, path, dirLength); memcpy(dir, path, dirLength);

View File

@ -36,8 +36,8 @@ typedef struct _AttachmentVtable {
void (*dispose) (Attachment* self); void (*dispose) (Attachment* self);
} _AttachmentVtable; } _AttachmentVtable;
void _Attachment_init (Attachment* self, const char* name, AttachmentType type, // void _Attachment_init (Attachment* self, const char* name, AttachmentType type, /**/
void (*dispose) (Attachment* self), // void (*dispose) (Attachment* self), /**/
void (*draw) (Attachment* self, struct Slot* slot)) { void (*draw) (Attachment* self, struct Slot* slot)) {
CONST_CAST(_AttachmentVtable*, self->vtable) = NEW(_AttachmentVtable); CONST_CAST(_AttachmentVtable*, self->vtable) = NEW(_AttachmentVtable);

View File

@ -36,8 +36,8 @@ typedef struct _AttachmentLoaderVtable {
void (*dispose) (AttachmentLoader* self); void (*dispose) (AttachmentLoader* self);
} _AttachmentLoaderVtable; } _AttachmentLoaderVtable;
void _AttachmentLoader_init (AttachmentLoader* self, // void _AttachmentLoader_init (AttachmentLoader* self, /**/
void (*dispose) (AttachmentLoader* self), // void (*dispose) (AttachmentLoader* self), /**/
Attachment* (*newAttachment) (AttachmentLoader* self, Skin* skin, AttachmentType type, const char* name)) { Attachment* (*newAttachment) (AttachmentLoader* self, Skin* skin, AttachmentType type, const char* name)) {
CONST_CAST(_AttachmentLoaderVtable*, self->vtable) = NEW(_AttachmentLoaderVtable); CONST_CAST(_AttachmentLoaderVtable*, self->vtable) = NEW(_AttachmentLoaderVtable);
VTABLE(AttachmentLoader, self) ->dispose = dispose; VTABLE(AttachmentLoader, self) ->dispose = dispose;

View File

@ -31,8 +31,8 @@
namespace spine { namespace spine {
#endif #endif
void _RegionAttachment_init (RegionAttachment* self, const char* name, // void _RegionAttachment_init (RegionAttachment* self, const char* name, /**/
void (*dispose) (Attachment* self), // void (*dispose) (Attachment* self), /**/
void (*draw) (Attachment* self, struct Slot* slot)) { void (*draw) (Attachment* self, struct Slot* slot)) {
self->scaleX = 1; self->scaleX = 1;
self->scaleY = 1; self->scaleY = 1;

View File

@ -70,7 +70,7 @@ void Slot_setToBindPose (Slot* self) {
Attachment* attachment = 0; Attachment* attachment = 0;
if (self->data->attachmentName) { if (self->data->attachmentName) {
// Find slot index. /* Find slot index. */
int i; int i;
for (i = 0; i < self->skeleton->data->slotCount; ++i) { for (i = 0; i < self->skeleton->data->slotCount; ++i) {
if (self->data == self->skeleton->data->slots[i]) { if (self->data == self->skeleton->data->slots[i]) {