mirror of
https://github.com/autc04/Retro68.git
synced 2025-02-18 02:30:48 +00:00
Carbon HACKS (breaks other stuff)
This commit is contained in:
parent
a9337f529f
commit
54591b457a
@ -37,7 +37,7 @@ if(APPLE)
|
|||||||
target_link_libraries(Raytracer2 "-framework Carbon")
|
target_link_libraries(Raytracer2 "-framework Carbon")
|
||||||
else()
|
else()
|
||||||
set(CMAKE_CXX_FLAGS "-std=c++11")
|
set(CMAKE_CXX_FLAGS "-std=c++11")
|
||||||
|
if(FALSE)
|
||||||
# save 200KB of code by removing unused stuff
|
# save 200KB of code by removing unused stuff
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "-Wl,-gc-sections")
|
set(CMAKE_EXE_LINKER_FLAGS "-Wl,-gc-sections")
|
||||||
|
|
||||||
@ -55,4 +55,14 @@ else()
|
|||||||
add_application(FixedBenchmark CONSOLE
|
add_application(FixedBenchmark CONSOLE
|
||||||
FILES fixedbenchmark.cc fixed.h fixed.cc)
|
FILES fixedbenchmark.cc fixed.h fixed.cc)
|
||||||
endif()
|
endif()
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS "-Wl,-gc-sections -nostdlib")
|
||||||
|
add_definitions(-DRETRO_CARBON)
|
||||||
|
add_application(RaytracerCarbon
|
||||||
|
raytracer2.cc
|
||||||
|
fixed.h
|
||||||
|
fixed.cc
|
||||||
|
carb.r
|
||||||
|
)
|
||||||
|
target_link_libraries(RaytracerCarbon "-lstdc++" "-lc" retrocrt "-lc" "-lgcc" retrocrt "-lc" CarbonLib)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
3
Samples/Raytracer/carb.r
Normal file
3
Samples/Raytracer/carb.r
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
data 'carb' (0) {
|
||||||
|
$"00"
|
||||||
|
};
|
@ -22,17 +22,20 @@
|
|||||||
#include <ApplicationServices/ApplicationServices.h>
|
#include <ApplicationServices/ApplicationServices.h>
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
#ifdef RETRO_CARBON
|
||||||
|
//#define __FP__
|
||||||
|
#include <math.h>
|
||||||
|
#include <Carbon.h>
|
||||||
|
#else
|
||||||
#include <Quickdraw.h>
|
#include <Quickdraw.h>
|
||||||
#include <MacMemory.h>
|
#include <MacMemory.h>
|
||||||
#include <Sound.h>
|
#include <Sound.h>
|
||||||
#include <Events.h>
|
#include <Events.h>
|
||||||
#include <Fonts.h>
|
#include <Fonts.h>
|
||||||
#include <NumberFormatting.h>
|
#include <NumberFormatting.h>
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
QDGlobals qd;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "fixed.h"
|
#include "fixed.h"
|
||||||
@ -286,7 +289,11 @@ int main()
|
|||||||
}
|
}
|
||||||
Rect r2;
|
Rect r2;
|
||||||
SetRect(&r2,0,y,r.right,y+1);
|
SetRect(&r2,0,y,r.right,y+1);
|
||||||
|
#if TARGET_API_MAC_CARBON
|
||||||
|
CopyBits(&line, GetPortBitMapForCopyBits(GetWindowPort(win)), &line.bounds, &r2, srcCopy, NULL);
|
||||||
|
#else
|
||||||
CopyBits(&line, &win->portBits, &line.bounds, &r2, srcCopy, NULL);
|
CopyBits(&line, &win->portBits, &line.bounds, &r2, srcCopy, NULL);
|
||||||
|
#endif
|
||||||
if(Button())
|
if(Button())
|
||||||
return 0;
|
return 0;
|
||||||
#if TARGET_API_MAC_CARBON
|
#if TARGET_API_MAC_CARBON
|
||||||
|
@ -24,9 +24,10 @@ resource 'SIZE' (-1) {
|
|||||||
dontGetFrontClicks,
|
dontGetFrontClicks,
|
||||||
ignoreChildDiedEvents,
|
ignoreChildDiedEvents,
|
||||||
is32BitCompatible,
|
is32BitCompatible,
|
||||||
reserved,
|
|
||||||
reserved,
|
isHighLevelEventAware,
|
||||||
reserved,
|
onlyLocalHLEvents,
|
||||||
|
notStationeryAware,
|
||||||
reserved,
|
reserved,
|
||||||
reserved,
|
reserved,
|
||||||
reserved,
|
reserved,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user