Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
sprites like MJ's Trabajo Basura (not unregr. Fourspriter)
#19
slenkar Wrote:maybe module writers could specify if the module is written for speed or size,and make 2 versions
ah dunno
+1 :!:

In fact, these can be done already using #IFDEF
e.g. We could create an ID like OPT_MEM or OPT_SIZE, and do something like:
Code:
...
#ifdef OPT_MEM
...
// Code for memory optimization goes here
...
#else
...
// Code for speed optimization goes here
...
#endif
The compiler could then insert a
#define OPT_MEM at the beginning, using a flag like --opt=mem or --opt=size,
or much simpler: the programmer can insert a #define OPT_MEM at the beginning of the code.

This could be very handy for things like:
  • FP routines (using routines provided by Britlion, for example, instead of ROM ones).
  • Using ROM drawing & printing primitives (CLS, PRINT, DRAW, PLOT, CIRCLE)
The program will be slower, but definitely shorter (e.g. for text adventures, or games having many rooms, etc).
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)