Author Topic: Mode 7 engine  (Read 25942 times)

0 Members and 1 Guest are viewing this topic.

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: Mode 7 engine
« Reply #60 on: February 04, 2013, 01:06:56 am »
__attribute__ is the GCC-specific way to attach extra (not defined by the C/C++ standard but useful nevertheless) implementation-defined semantic information to functions, variables and statements, which triggers changes in the behaviour of the code generation. Several other compilers have their own way to attach implementation-defined information, with their own names for the implementation-defined prefix and the implementation-defined attributes, e.g. __declspec with MSC.
For instance, __attribute__((always_inline)) will try extra hard (more than inline / __inline__) to inline a function, and complain if for some reason, it cannot perform said inlining. The opposite is __attribute__((noinline)), which will force GCC to provide an out-of-line function even if it might have wanted to inline the function (e.g. in C, because it's "static", i.e. limited to the current TU, and has a single caller).
There are dozens of other GCC attributes, the most significant of which are supported by compilers which pretend to be GCC (especially Clang, and less so ICC). Some attributes are available across all targets, while some others are platform-specific (e.g. banks of memory which require special instructions, interrupt handlers with special epilogue / prologue, interrupt vectors, etc.).

Note that the C++11 standard defines a generic way to attach attributes to functions / variables / statements (though it defines a ridiculously small number of attributes, IIRC only [[noreturn]] and [[carries_dependency]]), but most of the major C++ compilers do not support it at all, or at least, in a fully spec-compliant way. No released version of GCC supports generalized attributes yet.
« Last Edit: February 04, 2013, 01:30:29 am by Lionel Debroux »
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: Mode 7 engine
« Reply #61 on: March 21, 2013, 07:46:15 am »
Necro,

I looked in the engine and it seems that it only supports fixed-size tilemaps right ?

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: Mode 7 engine
« Reply #62 on: March 25, 2013, 01:02:46 pm »
Plop,

I'm having big problems with it D: if you're reading this please go to http://ourl.ca/18582 to help me, I describe my problem there.